diff --git a/retroshare-nogui/src/retroshare-nogui.pro b/retroshare-nogui/src/retroshare-nogui.pro index ec7571f3f..619531b37 100644 --- a/retroshare-nogui/src/retroshare-nogui.pro +++ b/retroshare-nogui/src/retroshare-nogui.pro @@ -186,18 +186,22 @@ protorpc { # Proto Services HEADERS += rpc/proto/rpcprotopeers.h \ rpc/proto/rpcprotosystem.h \ + rpc/proto/rpcprotochat.h \ SOURCES += rpc/proto/rpcprotopeers.cc \ rpc/proto/rpcprotosystem.cc \ + rpc/proto/rpcprotochat.cc \ # Generated ProtoBuf Code the RPC System HEADERS += rpc/proto/gencc/core.pb.h \ rpc/proto/gencc/peers.pb.h \ rpc/proto/gencc/system.pb.h \ + rpc/proto/gencc/chat.pb.h \ SOURCES += rpc/proto/gencc/core.pb.cc \ rpc/proto/gencc/peers.pb.cc \ rpc/proto/gencc/system.pb.cc \ + rpc/proto/gencc/chat.pb.cc \ QMAKE_CFLAGS += -pthread QMAKE_CXXFLAGS += -pthread diff --git a/retroshare-nogui/src/rpc/proto/gencc/chat.pb.cc b/retroshare-nogui/src/rpc/proto/gencc/chat.pb.cc new file mode 100644 index 000000000..cff430bdb --- /dev/null +++ b/retroshare-nogui/src/rpc/proto/gencc/chat.pb.cc @@ -0,0 +1,5019 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "chat.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace rsctrl { +namespace chat { + +namespace { + +const ::google::protobuf::Descriptor* ChatLobbyInfo_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ChatLobbyInfo_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* ChatLobbyInfo_LobbyState_descriptor_ = NULL; +const ::google::protobuf::Descriptor* ChatId_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ChatId_reflection_ = NULL; +const ::google::protobuf::Descriptor* ChatMessage_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ChatMessage_reflection_ = NULL; +const ::google::protobuf::Descriptor* ResponseChatLobbies_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ResponseChatLobbies_reflection_ = NULL; +const ::google::protobuf::Descriptor* RequestChatLobbies_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + RequestChatLobbies_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* RequestChatLobbies_LobbySet_descriptor_ = NULL; +const ::google::protobuf::Descriptor* RequestCreateLobby_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + RequestCreateLobby_reflection_ = NULL; +const ::google::protobuf::Descriptor* RequestJoinOrLeaveLobby_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + RequestJoinOrLeaveLobby_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* RequestJoinOrLeaveLobby_LobbyAction_descriptor_ = NULL; +const ::google::protobuf::Descriptor* RequestSetLobbyNickname_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + RequestSetLobbyNickname_reflection_ = NULL; +const ::google::protobuf::Descriptor* ResponseSetLobbyNickname_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ResponseSetLobbyNickname_reflection_ = NULL; +const ::google::protobuf::Descriptor* RequestRegisterEvents_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + RequestRegisterEvents_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* RequestRegisterEvents_RegisterAction_descriptor_ = NULL; +const ::google::protobuf::Descriptor* ResponseRegisterEvents_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ResponseRegisterEvents_reflection_ = NULL; +const ::google::protobuf::Descriptor* EventLobbyInvite_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + EventLobbyInvite_reflection_ = NULL; +const ::google::protobuf::Descriptor* EventChatMessage_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + EventChatMessage_reflection_ = NULL; +const ::google::protobuf::Descriptor* RequestSendMessage_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + RequestSendMessage_reflection_ = NULL; +const ::google::protobuf::Descriptor* ResponseSendMessage_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ResponseSendMessage_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* RequestMsgIds_descriptor_ = NULL; +const ::google::protobuf::EnumDescriptor* ResponseMsgIds_descriptor_ = NULL; +const ::google::protobuf::EnumDescriptor* LobbyPrivacyLevel_descriptor_ = NULL; +const ::google::protobuf::EnumDescriptor* ChatType_descriptor_ = NULL; + +} // namespace + + +void protobuf_AssignDesc_chat_2eproto() { + protobuf_AddDesc_chat_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "chat.proto"); + GOOGLE_CHECK(file != NULL); + ChatLobbyInfo_descriptor_ = file->message_type(0); + static const int ChatLobbyInfo_offsets_[11] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatLobbyInfo, lobby_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatLobbyInfo, lobby_topic_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatLobbyInfo, lobby_name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatLobbyInfo, lobby_nickname_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatLobbyInfo, privacy_level_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatLobbyInfo, lobby_state_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatLobbyInfo, no_peers_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatLobbyInfo, last_report_time_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatLobbyInfo, last_activity_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatLobbyInfo, participating_friends_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatLobbyInfo, nicknames_), + }; + ChatLobbyInfo_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ChatLobbyInfo_descriptor_, + ChatLobbyInfo::default_instance_, + ChatLobbyInfo_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatLobbyInfo, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatLobbyInfo, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ChatLobbyInfo)); + ChatLobbyInfo_LobbyState_descriptor_ = ChatLobbyInfo_descriptor_->enum_type(0); + ChatId_descriptor_ = file->message_type(1); + static const int ChatId_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatId, chat_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatId, chat_id_), + }; + ChatId_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ChatId_descriptor_, + ChatId::default_instance_, + ChatId_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatId, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatId, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ChatId)); + ChatMessage_descriptor_ = file->message_type(2); + static const int ChatMessage_offsets_[6] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatMessage, id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatMessage, msg_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatMessage, peer_nickname_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatMessage, chat_flags_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatMessage, send_time_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatMessage, recv_time_), + }; + ChatMessage_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ChatMessage_descriptor_, + ChatMessage::default_instance_, + ChatMessage_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatMessage, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChatMessage, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ChatMessage)); + ResponseChatLobbies_descriptor_ = file->message_type(3); + static const int ResponseChatLobbies_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseChatLobbies, status_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseChatLobbies, lobbies_), + }; + ResponseChatLobbies_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ResponseChatLobbies_descriptor_, + ResponseChatLobbies::default_instance_, + ResponseChatLobbies_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseChatLobbies, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseChatLobbies, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ResponseChatLobbies)); + RequestChatLobbies_descriptor_ = file->message_type(4); + static const int RequestChatLobbies_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestChatLobbies, lobby_set_), + }; + RequestChatLobbies_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + RequestChatLobbies_descriptor_, + RequestChatLobbies::default_instance_, + RequestChatLobbies_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestChatLobbies, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestChatLobbies, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(RequestChatLobbies)); + RequestChatLobbies_LobbySet_descriptor_ = RequestChatLobbies_descriptor_->enum_type(0); + RequestCreateLobby_descriptor_ = file->message_type(5); + static const int RequestCreateLobby_offsets_[4] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestCreateLobby, lobby_name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestCreateLobby, lobby_topic_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestCreateLobby, privacy_level_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestCreateLobby, invited_friends_), + }; + RequestCreateLobby_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + RequestCreateLobby_descriptor_, + RequestCreateLobby::default_instance_, + RequestCreateLobby_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestCreateLobby, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestCreateLobby, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(RequestCreateLobby)); + RequestJoinOrLeaveLobby_descriptor_ = file->message_type(6); + static const int RequestJoinOrLeaveLobby_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestJoinOrLeaveLobby, lobby_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestJoinOrLeaveLobby, action_), + }; + RequestJoinOrLeaveLobby_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + RequestJoinOrLeaveLobby_descriptor_, + RequestJoinOrLeaveLobby::default_instance_, + RequestJoinOrLeaveLobby_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestJoinOrLeaveLobby, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestJoinOrLeaveLobby, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(RequestJoinOrLeaveLobby)); + RequestJoinOrLeaveLobby_LobbyAction_descriptor_ = RequestJoinOrLeaveLobby_descriptor_->enum_type(0); + RequestSetLobbyNickname_descriptor_ = file->message_type(7); + static const int RequestSetLobbyNickname_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestSetLobbyNickname, nickname_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestSetLobbyNickname, lobby_ids_), + }; + RequestSetLobbyNickname_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + RequestSetLobbyNickname_descriptor_, + RequestSetLobbyNickname::default_instance_, + RequestSetLobbyNickname_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestSetLobbyNickname, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestSetLobbyNickname, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(RequestSetLobbyNickname)); + ResponseSetLobbyNickname_descriptor_ = file->message_type(8); + static const int ResponseSetLobbyNickname_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseSetLobbyNickname, status_), + }; + ResponseSetLobbyNickname_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ResponseSetLobbyNickname_descriptor_, + ResponseSetLobbyNickname::default_instance_, + ResponseSetLobbyNickname_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseSetLobbyNickname, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseSetLobbyNickname, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ResponseSetLobbyNickname)); + RequestRegisterEvents_descriptor_ = file->message_type(9); + static const int RequestRegisterEvents_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestRegisterEvents, action_), + }; + RequestRegisterEvents_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + RequestRegisterEvents_descriptor_, + RequestRegisterEvents::default_instance_, + RequestRegisterEvents_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestRegisterEvents, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestRegisterEvents, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(RequestRegisterEvents)); + RequestRegisterEvents_RegisterAction_descriptor_ = RequestRegisterEvents_descriptor_->enum_type(0); + ResponseRegisterEvents_descriptor_ = file->message_type(10); + static const int ResponseRegisterEvents_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseRegisterEvents, status_), + }; + ResponseRegisterEvents_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ResponseRegisterEvents_descriptor_, + ResponseRegisterEvents::default_instance_, + ResponseRegisterEvents_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseRegisterEvents, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseRegisterEvents, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ResponseRegisterEvents)); + EventLobbyInvite_descriptor_ = file->message_type(11); + static const int EventLobbyInvite_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EventLobbyInvite, lobby_), + }; + EventLobbyInvite_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + EventLobbyInvite_descriptor_, + EventLobbyInvite::default_instance_, + EventLobbyInvite_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EventLobbyInvite, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EventLobbyInvite, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(EventLobbyInvite)); + EventChatMessage_descriptor_ = file->message_type(12); + static const int EventChatMessage_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EventChatMessage, msg_), + }; + EventChatMessage_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + EventChatMessage_descriptor_, + EventChatMessage::default_instance_, + EventChatMessage_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EventChatMessage, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EventChatMessage, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(EventChatMessage)); + RequestSendMessage_descriptor_ = file->message_type(13); + static const int RequestSendMessage_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestSendMessage, msg_), + }; + RequestSendMessage_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + RequestSendMessage_descriptor_, + RequestSendMessage::default_instance_, + RequestSendMessage_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestSendMessage, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestSendMessage, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(RequestSendMessage)); + ResponseSendMessage_descriptor_ = file->message_type(14); + static const int ResponseSendMessage_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseSendMessage, status_), + }; + ResponseSendMessage_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ResponseSendMessage_descriptor_, + ResponseSendMessage::default_instance_, + ResponseSendMessage_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseSendMessage, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ResponseSendMessage, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ResponseSendMessage)); + RequestMsgIds_descriptor_ = file->enum_type(0); + ResponseMsgIds_descriptor_ = file->enum_type(1); + LobbyPrivacyLevel_descriptor_ = file->enum_type(2); + ChatType_descriptor_ = file->enum_type(3); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +inline void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_chat_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ChatLobbyInfo_descriptor_, &ChatLobbyInfo::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ChatId_descriptor_, &ChatId::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ChatMessage_descriptor_, &ChatMessage::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ResponseChatLobbies_descriptor_, &ResponseChatLobbies::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + RequestChatLobbies_descriptor_, &RequestChatLobbies::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + RequestCreateLobby_descriptor_, &RequestCreateLobby::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + RequestJoinOrLeaveLobby_descriptor_, &RequestJoinOrLeaveLobby::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + RequestSetLobbyNickname_descriptor_, &RequestSetLobbyNickname::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ResponseSetLobbyNickname_descriptor_, &ResponseSetLobbyNickname::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + RequestRegisterEvents_descriptor_, &RequestRegisterEvents::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ResponseRegisterEvents_descriptor_, &ResponseRegisterEvents::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + EventLobbyInvite_descriptor_, &EventLobbyInvite::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + EventChatMessage_descriptor_, &EventChatMessage::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + RequestSendMessage_descriptor_, &RequestSendMessage::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ResponseSendMessage_descriptor_, &ResponseSendMessage::default_instance()); +} + +} // namespace + +void protobuf_ShutdownFile_chat_2eproto() { + delete ChatLobbyInfo::default_instance_; + delete ChatLobbyInfo_reflection_; + delete ChatId::default_instance_; + delete ChatId_reflection_; + delete ChatMessage::default_instance_; + delete ChatMessage_reflection_; + delete ResponseChatLobbies::default_instance_; + delete ResponseChatLobbies_reflection_; + delete RequestChatLobbies::default_instance_; + delete RequestChatLobbies_reflection_; + delete RequestCreateLobby::default_instance_; + delete RequestCreateLobby_reflection_; + delete RequestJoinOrLeaveLobby::default_instance_; + delete RequestJoinOrLeaveLobby_reflection_; + delete RequestSetLobbyNickname::default_instance_; + delete RequestSetLobbyNickname_reflection_; + delete ResponseSetLobbyNickname::default_instance_; + delete ResponseSetLobbyNickname_reflection_; + delete RequestRegisterEvents::default_instance_; + delete RequestRegisterEvents_reflection_; + delete ResponseRegisterEvents::default_instance_; + delete ResponseRegisterEvents_reflection_; + delete EventLobbyInvite::default_instance_; + delete EventLobbyInvite_reflection_; + delete EventChatMessage::default_instance_; + delete EventChatMessage_reflection_; + delete RequestSendMessage::default_instance_; + delete RequestSendMessage_reflection_; + delete ResponseSendMessage::default_instance_; + delete ResponseSendMessage_reflection_; +} + +void protobuf_AddDesc_chat_2eproto() { + static bool already_here = false; + if (already_here) return; + already_here = true; + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::rsctrl::core::protobuf_AddDesc_core_2eproto(); + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\nchat.proto\022\013rsctrl.chat\032\ncore.proto\"\236\003" + "\n\rChatLobbyInfo\022\020\n\010lobby_id\030\001 \002(\t\022\023\n\013lob" + "by_topic\030\002 \002(\t\022\022\n\nlobby_name\030\003 \002(\t\022\026\n\016lo" + "bby_nickname\030\004 \002(\t\0225\n\rprivacy_level\030\005 \002(" + "\0162\036.rsctrl.chat.LobbyPrivacyLevel\022:\n\013lob" + "by_state\030\006 \002(\0162%.rsctrl.chat.ChatLobbyIn" + "fo.LobbyState\022\020\n\010no_peers\030\007 \002(\r\022\030\n\020last_" + "report_time\030\010 \002(\r\022\025\n\rlast_activity\030\t \002(\r" + "\022\035\n\025participating_friends\030\n \003(\t\022\021\n\tnickn" + "ames\030\013 \003(\t\"R\n\nLobbyState\022\025\n\021LOBBYSTATE_J" + "OINED\020\001\022\026\n\022LOBBYSTATE_INVITED\020\002\022\025\n\021LOBBY" + "STATE_PUBLIC\020\003\"C\n\006ChatId\022(\n\tchat_type\030\001 " + "\002(\0162\025.rsctrl.chat.ChatType\022\017\n\007chat_id\030\002 " + "\002(\t\"\214\001\n\013ChatMessage\022\037\n\002id\030\001 \002(\0132\023.rsctrl" + ".chat.ChatId\022\013\n\003msg\030\002 \002(\t\022\025\n\rpeer_nickna" + "me\030\003 \001(\t\022\022\n\nchat_flags\030\004 \001(\r\022\021\n\tsend_tim" + "e\030\005 \001(\r\022\021\n\trecv_time\030\006 \001(\r\"g\n\023ResponseCh" + "atLobbies\022#\n\006status\030\001 \002(\0132\023.rsctrl.core." + "Status\022+\n\007lobbies\030\002 \003(\0132\032.rsctrl.chat.Ch" + "atLobbyInfo\"\257\001\n\022RequestChatLobbies\022;\n\tlo" + "bby_set\030\001 \002(\0162(.rsctrl.chat.RequestChatL" + "obbies.LobbySet\"\\\n\010LobbySet\022\020\n\014LOBBYSET_" + "ALL\020\001\022\023\n\017LOBBYSET_JOINED\020\002\022\024\n\020LOBBYSET_I" + "NVITED\020\003\022\023\n\017LOBBYSET_PUBLIC\020\004\"\215\001\n\022Reques" + "tCreateLobby\022\022\n\nlobby_name\030\001 \002(\t\022\023\n\013lobb" + "y_topic\030\002 \002(\t\0225\n\rprivacy_level\030\004 \002(\0162\036.r" + "sctrl.chat.LobbyPrivacyLevel\022\027\n\017invited_" + "friends\030\003 \003(\t\"\243\001\n\027RequestJoinOrLeaveLobb" + "y\022\020\n\010lobby_id\030\001 \002(\t\022@\n\006action\030\002 \002(\01620.rs" + "ctrl.chat.RequestJoinOrLeaveLobby.LobbyA" + "ction\"4\n\013LobbyAction\022\022\n\016JOIN_OR_ACCEPT\020\001" + "\022\021\n\rLEAVE_OR_DENY\020\002\">\n\027RequestSetLobbyNi" + "ckname\022\020\n\010nickname\030\001 \002(\t\022\021\n\tlobby_ids\030\002 " + "\003(\t\"\?\n\030ResponseSetLobbyNickname\022#\n\006statu" + "s\030\001 \002(\0132\023.rsctrl.core.Status\"\212\001\n\025Request" + "RegisterEvents\022A\n\006action\030\001 \002(\01621.rsctrl." + "chat.RequestRegisterEvents.RegisterActio" + "n\".\n\016RegisterAction\022\014\n\010REGISTER\020\001\022\016\n\nDER" + "EGISTER\020\002\"=\n\026ResponseRegisterEvents\022#\n\006s" + "tatus\030\001 \002(\0132\023.rsctrl.core.Status\"=\n\020Even" + "tLobbyInvite\022)\n\005lobby\030\001 \002(\0132\032.rsctrl.cha" + "t.ChatLobbyInfo\"9\n\020EventChatMessage\022%\n\003m" + "sg\030\001 \002(\0132\030.rsctrl.chat.ChatMessage\";\n\022Re" + "questSendMessage\022%\n\003msg\030\001 \002(\0132\030.rsctrl.c" + "hat.ChatMessage\":\n\023ResponseSendMessage\022#" + "\n\006status\030\001 \002(\0132\023.rsctrl.core.Status*\320\001\n\r" + "RequestMsgIds\022\034\n\030MsgId_RequestChatLobbie" + "s\020\001\022\034\n\030MsgId_RequestCreateLobby\020\002\022!\n\035Msg" + "Id_RequestJoinOrLeaveLobby\020\003\022!\n\035MsgId_Re" + "questSetLobbyNickname\020\004\022\037\n\033MsgId_Request" + "RegisterEvents\020\005\022\034\n\030MsgId_RequestSendMes" + "sage\020\006*\314\001\n\016ResponseMsgIds\022\035\n\031MsgId_Respo" + "nseChatLobbies\020\001\022\"\n\036MsgId_ResponseSetLob" + "byNickname\020\004\022 \n\034MsgId_ResponseRegisterEv" + "ents\020\005\022\035\n\031MsgId_ResponseSendMessage\020\006\022\032\n" + "\026MsgId_EventLobbyInvite\020e\022\032\n\026MsgId_Event" + "ChatMessage\020f*<\n\021LobbyPrivacyLevel\022\023\n\017PR" + "IVACY_PRIVATE\020\001\022\022\n\016PRIVACY_PUBLIC\020\002*<\n\010C" + "hatType\022\020\n\014TYPE_PRIVATE\020\001\022\016\n\nTYPE_LOBBY\020" + "\002\022\016\n\nTYPE_GROUP\020\003", 2377); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "chat.proto", &protobuf_RegisterTypes); + ChatLobbyInfo::default_instance_ = new ChatLobbyInfo(); + ChatId::default_instance_ = new ChatId(); + ChatMessage::default_instance_ = new ChatMessage(); + ResponseChatLobbies::default_instance_ = new ResponseChatLobbies(); + RequestChatLobbies::default_instance_ = new RequestChatLobbies(); + RequestCreateLobby::default_instance_ = new RequestCreateLobby(); + RequestJoinOrLeaveLobby::default_instance_ = new RequestJoinOrLeaveLobby(); + RequestSetLobbyNickname::default_instance_ = new RequestSetLobbyNickname(); + ResponseSetLobbyNickname::default_instance_ = new ResponseSetLobbyNickname(); + RequestRegisterEvents::default_instance_ = new RequestRegisterEvents(); + ResponseRegisterEvents::default_instance_ = new ResponseRegisterEvents(); + EventLobbyInvite::default_instance_ = new EventLobbyInvite(); + EventChatMessage::default_instance_ = new EventChatMessage(); + RequestSendMessage::default_instance_ = new RequestSendMessage(); + ResponseSendMessage::default_instance_ = new ResponseSendMessage(); + ChatLobbyInfo::default_instance_->InitAsDefaultInstance(); + ChatId::default_instance_->InitAsDefaultInstance(); + ChatMessage::default_instance_->InitAsDefaultInstance(); + ResponseChatLobbies::default_instance_->InitAsDefaultInstance(); + RequestChatLobbies::default_instance_->InitAsDefaultInstance(); + RequestCreateLobby::default_instance_->InitAsDefaultInstance(); + RequestJoinOrLeaveLobby::default_instance_->InitAsDefaultInstance(); + RequestSetLobbyNickname::default_instance_->InitAsDefaultInstance(); + ResponseSetLobbyNickname::default_instance_->InitAsDefaultInstance(); + RequestRegisterEvents::default_instance_->InitAsDefaultInstance(); + ResponseRegisterEvents::default_instance_->InitAsDefaultInstance(); + EventLobbyInvite::default_instance_->InitAsDefaultInstance(); + EventChatMessage::default_instance_->InitAsDefaultInstance(); + RequestSendMessage::default_instance_->InitAsDefaultInstance(); + ResponseSendMessage::default_instance_->InitAsDefaultInstance(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_chat_2eproto); +} + +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_chat_2eproto { + StaticDescriptorInitializer_chat_2eproto() { + protobuf_AddDesc_chat_2eproto(); + } +} static_descriptor_initializer_chat_2eproto_; + +const ::google::protobuf::EnumDescriptor* RequestMsgIds_descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestMsgIds_descriptor_; +} +bool RequestMsgIds_IsValid(int value) { + switch(value) { + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + return true; + default: + return false; + } +} + +const ::google::protobuf::EnumDescriptor* ResponseMsgIds_descriptor() { + protobuf_AssignDescriptorsOnce(); + return ResponseMsgIds_descriptor_; +} +bool ResponseMsgIds_IsValid(int value) { + switch(value) { + case 1: + case 4: + case 5: + case 6: + case 101: + case 102: + return true; + default: + return false; + } +} + +const ::google::protobuf::EnumDescriptor* LobbyPrivacyLevel_descriptor() { + protobuf_AssignDescriptorsOnce(); + return LobbyPrivacyLevel_descriptor_; +} +bool LobbyPrivacyLevel_IsValid(int value) { + switch(value) { + case 1: + case 2: + return true; + default: + return false; + } +} + +const ::google::protobuf::EnumDescriptor* ChatType_descriptor() { + protobuf_AssignDescriptorsOnce(); + return ChatType_descriptor_; +} +bool ChatType_IsValid(int value) { + switch(value) { + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + + +// =================================================================== + +const ::google::protobuf::EnumDescriptor* ChatLobbyInfo_LobbyState_descriptor() { + protobuf_AssignDescriptorsOnce(); + return ChatLobbyInfo_LobbyState_descriptor_; +} +bool ChatLobbyInfo_LobbyState_IsValid(int value) { + switch(value) { + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +#ifndef _MSC_VER +const ChatLobbyInfo_LobbyState ChatLobbyInfo::LOBBYSTATE_JOINED; +const ChatLobbyInfo_LobbyState ChatLobbyInfo::LOBBYSTATE_INVITED; +const ChatLobbyInfo_LobbyState ChatLobbyInfo::LOBBYSTATE_PUBLIC; +const ChatLobbyInfo_LobbyState ChatLobbyInfo::LobbyState_MIN; +const ChatLobbyInfo_LobbyState ChatLobbyInfo::LobbyState_MAX; +const int ChatLobbyInfo::LobbyState_ARRAYSIZE; +#endif // _MSC_VER +#ifndef _MSC_VER +const int ChatLobbyInfo::kLobbyIdFieldNumber; +const int ChatLobbyInfo::kLobbyTopicFieldNumber; +const int ChatLobbyInfo::kLobbyNameFieldNumber; +const int ChatLobbyInfo::kLobbyNicknameFieldNumber; +const int ChatLobbyInfo::kPrivacyLevelFieldNumber; +const int ChatLobbyInfo::kLobbyStateFieldNumber; +const int ChatLobbyInfo::kNoPeersFieldNumber; +const int ChatLobbyInfo::kLastReportTimeFieldNumber; +const int ChatLobbyInfo::kLastActivityFieldNumber; +const int ChatLobbyInfo::kParticipatingFriendsFieldNumber; +const int ChatLobbyInfo::kNicknamesFieldNumber; +#endif // !_MSC_VER + +ChatLobbyInfo::ChatLobbyInfo() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void ChatLobbyInfo::InitAsDefaultInstance() { +} + +ChatLobbyInfo::ChatLobbyInfo(const ChatLobbyInfo& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void ChatLobbyInfo::SharedCtor() { + _cached_size_ = 0; + lobby_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + lobby_topic_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + lobby_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + lobby_nickname_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + privacy_level_ = 1; + lobby_state_ = 1; + no_peers_ = 0u; + last_report_time_ = 0u; + last_activity_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +ChatLobbyInfo::~ChatLobbyInfo() { + SharedDtor(); +} + +void ChatLobbyInfo::SharedDtor() { + if (lobby_id_ != &::google::protobuf::internal::kEmptyString) { + delete lobby_id_; + } + if (lobby_topic_ != &::google::protobuf::internal::kEmptyString) { + delete lobby_topic_; + } + if (lobby_name_ != &::google::protobuf::internal::kEmptyString) { + delete lobby_name_; + } + if (lobby_nickname_ != &::google::protobuf::internal::kEmptyString) { + delete lobby_nickname_; + } + if (this != default_instance_) { + } +} + +void ChatLobbyInfo::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ChatLobbyInfo::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ChatLobbyInfo_descriptor_; +} + +const ChatLobbyInfo& ChatLobbyInfo::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_chat_2eproto(); return *default_instance_; +} + +ChatLobbyInfo* ChatLobbyInfo::default_instance_ = NULL; + +ChatLobbyInfo* ChatLobbyInfo::New() const { + return new ChatLobbyInfo; +} + +void ChatLobbyInfo::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_lobby_id()) { + if (lobby_id_ != &::google::protobuf::internal::kEmptyString) { + lobby_id_->clear(); + } + } + if (has_lobby_topic()) { + if (lobby_topic_ != &::google::protobuf::internal::kEmptyString) { + lobby_topic_->clear(); + } + } + if (has_lobby_name()) { + if (lobby_name_ != &::google::protobuf::internal::kEmptyString) { + lobby_name_->clear(); + } + } + if (has_lobby_nickname()) { + if (lobby_nickname_ != &::google::protobuf::internal::kEmptyString) { + lobby_nickname_->clear(); + } + } + privacy_level_ = 1; + lobby_state_ = 1; + no_peers_ = 0u; + last_report_time_ = 0u; + } + if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { + last_activity_ = 0u; + } + participating_friends_.Clear(); + nicknames_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool ChatLobbyInfo::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required string lobby_id = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_lobby_id())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_id().data(), this->lobby_id().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_lobby_topic; + break; + } + + // required string lobby_topic = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_lobby_topic: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_lobby_topic())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_topic().data(), this->lobby_topic().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_lobby_name; + break; + } + + // required string lobby_name = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_lobby_name: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_lobby_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_name().data(), this->lobby_name().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(34)) goto parse_lobby_nickname; + break; + } + + // required string lobby_nickname = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_lobby_nickname: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_lobby_nickname())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_nickname().data(), this->lobby_nickname().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(40)) goto parse_privacy_level; + break; + } + + // required .rsctrl.chat.LobbyPrivacyLevel privacy_level = 5; + case 5: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_privacy_level: + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (rsctrl::chat::LobbyPrivacyLevel_IsValid(value)) { + set_privacy_level(static_cast< rsctrl::chat::LobbyPrivacyLevel >(value)); + } else { + mutable_unknown_fields()->AddVarint(5, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(48)) goto parse_lobby_state; + break; + } + + // required .rsctrl.chat.ChatLobbyInfo.LobbyState lobby_state = 6; + case 6: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_lobby_state: + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::rsctrl::chat::ChatLobbyInfo_LobbyState_IsValid(value)) { + set_lobby_state(static_cast< ::rsctrl::chat::ChatLobbyInfo_LobbyState >(value)); + } else { + mutable_unknown_fields()->AddVarint(6, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(56)) goto parse_no_peers; + break; + } + + // required uint32 no_peers = 7; + case 7: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_no_peers: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &no_peers_))); + set_has_no_peers(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(64)) goto parse_last_report_time; + break; + } + + // required uint32 last_report_time = 8; + case 8: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_last_report_time: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &last_report_time_))); + set_has_last_report_time(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(72)) goto parse_last_activity; + break; + } + + // required uint32 last_activity = 9; + case 9: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_last_activity: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &last_activity_))); + set_has_last_activity(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(82)) goto parse_participating_friends; + break; + } + + // repeated string participating_friends = 10; + case 10: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_participating_friends: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_participating_friends())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->participating_friends(0).data(), this->participating_friends(0).length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(82)) goto parse_participating_friends; + if (input->ExpectTag(90)) goto parse_nicknames; + break; + } + + // repeated string nicknames = 11; + case 11: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_nicknames: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_nicknames())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->nicknames(0).data(), this->nicknames(0).length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(90)) goto parse_nicknames; + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } + return true; +#undef DO_ +} + +void ChatLobbyInfo::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required string lobby_id = 1; + if (has_lobby_id()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_id().data(), this->lobby_id().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->lobby_id(), output); + } + + // required string lobby_topic = 2; + if (has_lobby_topic()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_topic().data(), this->lobby_topic().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 2, this->lobby_topic(), output); + } + + // required string lobby_name = 3; + if (has_lobby_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_name().data(), this->lobby_name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 3, this->lobby_name(), output); + } + + // required string lobby_nickname = 4; + if (has_lobby_nickname()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_nickname().data(), this->lobby_nickname().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 4, this->lobby_nickname(), output); + } + + // required .rsctrl.chat.LobbyPrivacyLevel privacy_level = 5; + if (has_privacy_level()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 5, this->privacy_level(), output); + } + + // required .rsctrl.chat.ChatLobbyInfo.LobbyState lobby_state = 6; + if (has_lobby_state()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 6, this->lobby_state(), output); + } + + // required uint32 no_peers = 7; + if (has_no_peers()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(7, this->no_peers(), output); + } + + // required uint32 last_report_time = 8; + if (has_last_report_time()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(8, this->last_report_time(), output); + } + + // required uint32 last_activity = 9; + if (has_last_activity()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(9, this->last_activity(), output); + } + + // repeated string participating_friends = 10; + for (int i = 0; i < this->participating_friends_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->participating_friends(i).data(), this->participating_friends(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 10, this->participating_friends(i), output); + } + + // repeated string nicknames = 11; + for (int i = 0; i < this->nicknames_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->nicknames(i).data(), this->nicknames(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 11, this->nicknames(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* ChatLobbyInfo::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required string lobby_id = 1; + if (has_lobby_id()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_id().data(), this->lobby_id().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->lobby_id(), target); + } + + // required string lobby_topic = 2; + if (has_lobby_topic()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_topic().data(), this->lobby_topic().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->lobby_topic(), target); + } + + // required string lobby_name = 3; + if (has_lobby_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_name().data(), this->lobby_name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->lobby_name(), target); + } + + // required string lobby_nickname = 4; + if (has_lobby_nickname()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_nickname().data(), this->lobby_nickname().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->lobby_nickname(), target); + } + + // required .rsctrl.chat.LobbyPrivacyLevel privacy_level = 5; + if (has_privacy_level()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 5, this->privacy_level(), target); + } + + // required .rsctrl.chat.ChatLobbyInfo.LobbyState lobby_state = 6; + if (has_lobby_state()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 6, this->lobby_state(), target); + } + + // required uint32 no_peers = 7; + if (has_no_peers()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(7, this->no_peers(), target); + } + + // required uint32 last_report_time = 8; + if (has_last_report_time()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(8, this->last_report_time(), target); + } + + // required uint32 last_activity = 9; + if (has_last_activity()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(9, this->last_activity(), target); + } + + // repeated string participating_friends = 10; + for (int i = 0; i < this->participating_friends_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->participating_friends(i).data(), this->participating_friends(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(10, this->participating_friends(i), target); + } + + // repeated string nicknames = 11; + for (int i = 0; i < this->nicknames_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->nicknames(i).data(), this->nicknames(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(11, this->nicknames(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int ChatLobbyInfo::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required string lobby_id = 1; + if (has_lobby_id()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->lobby_id()); + } + + // required string lobby_topic = 2; + if (has_lobby_topic()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->lobby_topic()); + } + + // required string lobby_name = 3; + if (has_lobby_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->lobby_name()); + } + + // required string lobby_nickname = 4; + if (has_lobby_nickname()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->lobby_nickname()); + } + + // required .rsctrl.chat.LobbyPrivacyLevel privacy_level = 5; + if (has_privacy_level()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->privacy_level()); + } + + // required .rsctrl.chat.ChatLobbyInfo.LobbyState lobby_state = 6; + if (has_lobby_state()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->lobby_state()); + } + + // required uint32 no_peers = 7; + if (has_no_peers()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->no_peers()); + } + + // required uint32 last_report_time = 8; + if (has_last_report_time()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->last_report_time()); + } + + } + if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { + // required uint32 last_activity = 9; + if (has_last_activity()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->last_activity()); + } + + } + // repeated string participating_friends = 10; + total_size += 1 * this->participating_friends_size(); + for (int i = 0; i < this->participating_friends_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->participating_friends(i)); + } + + // repeated string nicknames = 11; + total_size += 1 * this->nicknames_size(); + for (int i = 0; i < this->nicknames_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->nicknames(i)); + } + + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ChatLobbyInfo::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const ChatLobbyInfo* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void ChatLobbyInfo::MergeFrom(const ChatLobbyInfo& from) { + GOOGLE_CHECK_NE(&from, this); + participating_friends_.MergeFrom(from.participating_friends_); + nicknames_.MergeFrom(from.nicknames_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_lobby_id()) { + set_lobby_id(from.lobby_id()); + } + if (from.has_lobby_topic()) { + set_lobby_topic(from.lobby_topic()); + } + if (from.has_lobby_name()) { + set_lobby_name(from.lobby_name()); + } + if (from.has_lobby_nickname()) { + set_lobby_nickname(from.lobby_nickname()); + } + if (from.has_privacy_level()) { + set_privacy_level(from.privacy_level()); + } + if (from.has_lobby_state()) { + set_lobby_state(from.lobby_state()); + } + if (from.has_no_peers()) { + set_no_peers(from.no_peers()); + } + if (from.has_last_report_time()) { + set_last_report_time(from.last_report_time()); + } + } + if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) { + if (from.has_last_activity()) { + set_last_activity(from.last_activity()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void ChatLobbyInfo::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ChatLobbyInfo::CopyFrom(const ChatLobbyInfo& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ChatLobbyInfo::IsInitialized() const { + if ((_has_bits_[0] & 0x000001ff) != 0x000001ff) return false; + + return true; +} + +void ChatLobbyInfo::Swap(ChatLobbyInfo* other) { + if (other != this) { + std::swap(lobby_id_, other->lobby_id_); + std::swap(lobby_topic_, other->lobby_topic_); + std::swap(lobby_name_, other->lobby_name_); + std::swap(lobby_nickname_, other->lobby_nickname_); + std::swap(privacy_level_, other->privacy_level_); + std::swap(lobby_state_, other->lobby_state_); + std::swap(no_peers_, other->no_peers_); + std::swap(last_report_time_, other->last_report_time_); + std::swap(last_activity_, other->last_activity_); + participating_friends_.Swap(&other->participating_friends_); + nicknames_.Swap(&other->nicknames_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata ChatLobbyInfo::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ChatLobbyInfo_descriptor_; + metadata.reflection = ChatLobbyInfo_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int ChatId::kChatTypeFieldNumber; +const int ChatId::kChatIdFieldNumber; +#endif // !_MSC_VER + +ChatId::ChatId() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void ChatId::InitAsDefaultInstance() { +} + +ChatId::ChatId(const ChatId& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void ChatId::SharedCtor() { + _cached_size_ = 0; + chat_type_ = 1; + chat_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +ChatId::~ChatId() { + SharedDtor(); +} + +void ChatId::SharedDtor() { + if (chat_id_ != &::google::protobuf::internal::kEmptyString) { + delete chat_id_; + } + if (this != default_instance_) { + } +} + +void ChatId::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ChatId::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ChatId_descriptor_; +} + +const ChatId& ChatId::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_chat_2eproto(); return *default_instance_; +} + +ChatId* ChatId::default_instance_ = NULL; + +ChatId* ChatId::New() const { + return new ChatId; +} + +void ChatId::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + chat_type_ = 1; + if (has_chat_id()) { + if (chat_id_ != &::google::protobuf::internal::kEmptyString) { + chat_id_->clear(); + } + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool ChatId::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required .rsctrl.chat.ChatType chat_type = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (rsctrl::chat::ChatType_IsValid(value)) { + set_chat_type(static_cast< rsctrl::chat::ChatType >(value)); + } else { + mutable_unknown_fields()->AddVarint(1, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_chat_id; + break; + } + + // required string chat_id = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_chat_id: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_chat_id())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->chat_id().data(), this->chat_id().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } + return true; +#undef DO_ +} + +void ChatId::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.chat.ChatType chat_type = 1; + if (has_chat_type()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 1, this->chat_type(), output); + } + + // required string chat_id = 2; + if (has_chat_id()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->chat_id().data(), this->chat_id().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 2, this->chat_id(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* ChatId::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.chat.ChatType chat_type = 1; + if (has_chat_type()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 1, this->chat_type(), target); + } + + // required string chat_id = 2; + if (has_chat_id()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->chat_id().data(), this->chat_id().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->chat_id(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int ChatId::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.chat.ChatType chat_type = 1; + if (has_chat_type()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->chat_type()); + } + + // required string chat_id = 2; + if (has_chat_id()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->chat_id()); + } + + } + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ChatId::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const ChatId* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void ChatId::MergeFrom(const ChatId& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_chat_type()) { + set_chat_type(from.chat_type()); + } + if (from.has_chat_id()) { + set_chat_id(from.chat_id()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void ChatId::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ChatId::CopyFrom(const ChatId& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ChatId::IsInitialized() const { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + return true; +} + +void ChatId::Swap(ChatId* other) { + if (other != this) { + std::swap(chat_type_, other->chat_type_); + std::swap(chat_id_, other->chat_id_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata ChatId::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ChatId_descriptor_; + metadata.reflection = ChatId_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int ChatMessage::kIdFieldNumber; +const int ChatMessage::kMsgFieldNumber; +const int ChatMessage::kPeerNicknameFieldNumber; +const int ChatMessage::kChatFlagsFieldNumber; +const int ChatMessage::kSendTimeFieldNumber; +const int ChatMessage::kRecvTimeFieldNumber; +#endif // !_MSC_VER + +ChatMessage::ChatMessage() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void ChatMessage::InitAsDefaultInstance() { + id_ = const_cast< ::rsctrl::chat::ChatId*>(&::rsctrl::chat::ChatId::default_instance()); +} + +ChatMessage::ChatMessage(const ChatMessage& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void ChatMessage::SharedCtor() { + _cached_size_ = 0; + id_ = NULL; + msg_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + peer_nickname_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + chat_flags_ = 0u; + send_time_ = 0u; + recv_time_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +ChatMessage::~ChatMessage() { + SharedDtor(); +} + +void ChatMessage::SharedDtor() { + if (msg_ != &::google::protobuf::internal::kEmptyString) { + delete msg_; + } + if (peer_nickname_ != &::google::protobuf::internal::kEmptyString) { + delete peer_nickname_; + } + if (this != default_instance_) { + delete id_; + } +} + +void ChatMessage::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ChatMessage::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ChatMessage_descriptor_; +} + +const ChatMessage& ChatMessage::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_chat_2eproto(); return *default_instance_; +} + +ChatMessage* ChatMessage::default_instance_ = NULL; + +ChatMessage* ChatMessage::New() const { + return new ChatMessage; +} + +void ChatMessage::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_id()) { + if (id_ != NULL) id_->::rsctrl::chat::ChatId::Clear(); + } + if (has_msg()) { + if (msg_ != &::google::protobuf::internal::kEmptyString) { + msg_->clear(); + } + } + if (has_peer_nickname()) { + if (peer_nickname_ != &::google::protobuf::internal::kEmptyString) { + peer_nickname_->clear(); + } + } + chat_flags_ = 0u; + send_time_ = 0u; + recv_time_ = 0u; + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool ChatMessage::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required .rsctrl.chat.ChatId id = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_id())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_msg; + break; + } + + // required string msg = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_msg: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_msg())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->msg().data(), this->msg().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_peer_nickname; + break; + } + + // optional string peer_nickname = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_peer_nickname: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_peer_nickname())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->peer_nickname().data(), this->peer_nickname().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(32)) goto parse_chat_flags; + break; + } + + // optional uint32 chat_flags = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_chat_flags: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &chat_flags_))); + set_has_chat_flags(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(40)) goto parse_send_time; + break; + } + + // optional uint32 send_time = 5; + case 5: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_send_time: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &send_time_))); + set_has_send_time(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(48)) goto parse_recv_time; + break; + } + + // optional uint32 recv_time = 6; + case 6: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_recv_time: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &recv_time_))); + set_has_recv_time(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } + return true; +#undef DO_ +} + +void ChatMessage::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.chat.ChatId id = 1; + if (has_id()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->id(), output); + } + + // required string msg = 2; + if (has_msg()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->msg().data(), this->msg().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 2, this->msg(), output); + } + + // optional string peer_nickname = 3; + if (has_peer_nickname()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->peer_nickname().data(), this->peer_nickname().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 3, this->peer_nickname(), output); + } + + // optional uint32 chat_flags = 4; + if (has_chat_flags()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(4, this->chat_flags(), output); + } + + // optional uint32 send_time = 5; + if (has_send_time()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->send_time(), output); + } + + // optional uint32 recv_time = 6; + if (has_recv_time()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(6, this->recv_time(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* ChatMessage::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.chat.ChatId id = 1; + if (has_id()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->id(), target); + } + + // required string msg = 2; + if (has_msg()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->msg().data(), this->msg().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->msg(), target); + } + + // optional string peer_nickname = 3; + if (has_peer_nickname()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->peer_nickname().data(), this->peer_nickname().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->peer_nickname(), target); + } + + // optional uint32 chat_flags = 4; + if (has_chat_flags()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(4, this->chat_flags(), target); + } + + // optional uint32 send_time = 5; + if (has_send_time()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, this->send_time(), target); + } + + // optional uint32 recv_time = 6; + if (has_recv_time()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(6, this->recv_time(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int ChatMessage::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.chat.ChatId id = 1; + if (has_id()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->id()); + } + + // required string msg = 2; + if (has_msg()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->msg()); + } + + // optional string peer_nickname = 3; + if (has_peer_nickname()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->peer_nickname()); + } + + // optional uint32 chat_flags = 4; + if (has_chat_flags()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->chat_flags()); + } + + // optional uint32 send_time = 5; + if (has_send_time()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->send_time()); + } + + // optional uint32 recv_time = 6; + if (has_recv_time()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->recv_time()); + } + + } + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ChatMessage::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const ChatMessage* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void ChatMessage::MergeFrom(const ChatMessage& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_id()) { + mutable_id()->::rsctrl::chat::ChatId::MergeFrom(from.id()); + } + if (from.has_msg()) { + set_msg(from.msg()); + } + if (from.has_peer_nickname()) { + set_peer_nickname(from.peer_nickname()); + } + if (from.has_chat_flags()) { + set_chat_flags(from.chat_flags()); + } + if (from.has_send_time()) { + set_send_time(from.send_time()); + } + if (from.has_recv_time()) { + set_recv_time(from.recv_time()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void ChatMessage::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ChatMessage::CopyFrom(const ChatMessage& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ChatMessage::IsInitialized() const { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + if (has_id()) { + if (!this->id().IsInitialized()) return false; + } + return true; +} + +void ChatMessage::Swap(ChatMessage* other) { + if (other != this) { + std::swap(id_, other->id_); + std::swap(msg_, other->msg_); + std::swap(peer_nickname_, other->peer_nickname_); + std::swap(chat_flags_, other->chat_flags_); + std::swap(send_time_, other->send_time_); + std::swap(recv_time_, other->recv_time_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata ChatMessage::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ChatMessage_descriptor_; + metadata.reflection = ChatMessage_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int ResponseChatLobbies::kStatusFieldNumber; +const int ResponseChatLobbies::kLobbiesFieldNumber; +#endif // !_MSC_VER + +ResponseChatLobbies::ResponseChatLobbies() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void ResponseChatLobbies::InitAsDefaultInstance() { + status_ = const_cast< ::rsctrl::core::Status*>(&::rsctrl::core::Status::default_instance()); +} + +ResponseChatLobbies::ResponseChatLobbies(const ResponseChatLobbies& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void ResponseChatLobbies::SharedCtor() { + _cached_size_ = 0; + status_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +ResponseChatLobbies::~ResponseChatLobbies() { + SharedDtor(); +} + +void ResponseChatLobbies::SharedDtor() { + if (this != default_instance_) { + delete status_; + } +} + +void ResponseChatLobbies::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ResponseChatLobbies::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ResponseChatLobbies_descriptor_; +} + +const ResponseChatLobbies& ResponseChatLobbies::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_chat_2eproto(); return *default_instance_; +} + +ResponseChatLobbies* ResponseChatLobbies::default_instance_ = NULL; + +ResponseChatLobbies* ResponseChatLobbies::New() const { + return new ResponseChatLobbies; +} + +void ResponseChatLobbies::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_status()) { + if (status_ != NULL) status_->::rsctrl::core::Status::Clear(); + } + } + lobbies_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool ResponseChatLobbies::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required .rsctrl.core.Status status = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_status())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_lobbies; + break; + } + + // repeated .rsctrl.chat.ChatLobbyInfo lobbies = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_lobbies: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_lobbies())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_lobbies; + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } + return true; +#undef DO_ +} + +void ResponseChatLobbies::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.core.Status status = 1; + if (has_status()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->status(), output); + } + + // repeated .rsctrl.chat.ChatLobbyInfo lobbies = 2; + for (int i = 0; i < this->lobbies_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->lobbies(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* ResponseChatLobbies::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.core.Status status = 1; + if (has_status()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->status(), target); + } + + // repeated .rsctrl.chat.ChatLobbyInfo lobbies = 2; + for (int i = 0; i < this->lobbies_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 2, this->lobbies(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int ResponseChatLobbies::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.core.Status status = 1; + if (has_status()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->status()); + } + + } + // repeated .rsctrl.chat.ChatLobbyInfo lobbies = 2; + total_size += 1 * this->lobbies_size(); + for (int i = 0; i < this->lobbies_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->lobbies(i)); + } + + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ResponseChatLobbies::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const ResponseChatLobbies* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void ResponseChatLobbies::MergeFrom(const ResponseChatLobbies& from) { + GOOGLE_CHECK_NE(&from, this); + lobbies_.MergeFrom(from.lobbies_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_status()) { + mutable_status()->::rsctrl::core::Status::MergeFrom(from.status()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void ResponseChatLobbies::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ResponseChatLobbies::CopyFrom(const ResponseChatLobbies& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ResponseChatLobbies::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + if (has_status()) { + if (!this->status().IsInitialized()) return false; + } + for (int i = 0; i < lobbies_size(); i++) { + if (!this->lobbies(i).IsInitialized()) return false; + } + return true; +} + +void ResponseChatLobbies::Swap(ResponseChatLobbies* other) { + if (other != this) { + std::swap(status_, other->status_); + lobbies_.Swap(&other->lobbies_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata ResponseChatLobbies::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ResponseChatLobbies_descriptor_; + metadata.reflection = ResponseChatLobbies_reflection_; + return metadata; +} + + +// =================================================================== + +const ::google::protobuf::EnumDescriptor* RequestChatLobbies_LobbySet_descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestChatLobbies_LobbySet_descriptor_; +} +bool RequestChatLobbies_LobbySet_IsValid(int value) { + switch(value) { + case 1: + case 2: + case 3: + case 4: + return true; + default: + return false; + } +} + +#ifndef _MSC_VER +const RequestChatLobbies_LobbySet RequestChatLobbies::LOBBYSET_ALL; +const RequestChatLobbies_LobbySet RequestChatLobbies::LOBBYSET_JOINED; +const RequestChatLobbies_LobbySet RequestChatLobbies::LOBBYSET_INVITED; +const RequestChatLobbies_LobbySet RequestChatLobbies::LOBBYSET_PUBLIC; +const RequestChatLobbies_LobbySet RequestChatLobbies::LobbySet_MIN; +const RequestChatLobbies_LobbySet RequestChatLobbies::LobbySet_MAX; +const int RequestChatLobbies::LobbySet_ARRAYSIZE; +#endif // _MSC_VER +#ifndef _MSC_VER +const int RequestChatLobbies::kLobbySetFieldNumber; +#endif // !_MSC_VER + +RequestChatLobbies::RequestChatLobbies() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void RequestChatLobbies::InitAsDefaultInstance() { +} + +RequestChatLobbies::RequestChatLobbies(const RequestChatLobbies& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void RequestChatLobbies::SharedCtor() { + _cached_size_ = 0; + lobby_set_ = 1; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +RequestChatLobbies::~RequestChatLobbies() { + SharedDtor(); +} + +void RequestChatLobbies::SharedDtor() { + if (this != default_instance_) { + } +} + +void RequestChatLobbies::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* RequestChatLobbies::descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestChatLobbies_descriptor_; +} + +const RequestChatLobbies& RequestChatLobbies::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_chat_2eproto(); return *default_instance_; +} + +RequestChatLobbies* RequestChatLobbies::default_instance_ = NULL; + +RequestChatLobbies* RequestChatLobbies::New() const { + return new RequestChatLobbies; +} + +void RequestChatLobbies::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + lobby_set_ = 1; + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool RequestChatLobbies::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required .rsctrl.chat.RequestChatLobbies.LobbySet lobby_set = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::rsctrl::chat::RequestChatLobbies_LobbySet_IsValid(value)) { + set_lobby_set(static_cast< ::rsctrl::chat::RequestChatLobbies_LobbySet >(value)); + } else { + mutable_unknown_fields()->AddVarint(1, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } + return true; +#undef DO_ +} + +void RequestChatLobbies::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.chat.RequestChatLobbies.LobbySet lobby_set = 1; + if (has_lobby_set()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 1, this->lobby_set(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* RequestChatLobbies::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.chat.RequestChatLobbies.LobbySet lobby_set = 1; + if (has_lobby_set()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 1, this->lobby_set(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int RequestChatLobbies::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.chat.RequestChatLobbies.LobbySet lobby_set = 1; + if (has_lobby_set()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->lobby_set()); + } + + } + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void RequestChatLobbies::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const RequestChatLobbies* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void RequestChatLobbies::MergeFrom(const RequestChatLobbies& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_lobby_set()) { + set_lobby_set(from.lobby_set()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void RequestChatLobbies::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void RequestChatLobbies::CopyFrom(const RequestChatLobbies& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RequestChatLobbies::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + return true; +} + +void RequestChatLobbies::Swap(RequestChatLobbies* other) { + if (other != this) { + std::swap(lobby_set_, other->lobby_set_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata RequestChatLobbies::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = RequestChatLobbies_descriptor_; + metadata.reflection = RequestChatLobbies_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int RequestCreateLobby::kLobbyNameFieldNumber; +const int RequestCreateLobby::kLobbyTopicFieldNumber; +const int RequestCreateLobby::kPrivacyLevelFieldNumber; +const int RequestCreateLobby::kInvitedFriendsFieldNumber; +#endif // !_MSC_VER + +RequestCreateLobby::RequestCreateLobby() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void RequestCreateLobby::InitAsDefaultInstance() { +} + +RequestCreateLobby::RequestCreateLobby(const RequestCreateLobby& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void RequestCreateLobby::SharedCtor() { + _cached_size_ = 0; + lobby_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + lobby_topic_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + privacy_level_ = 1; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +RequestCreateLobby::~RequestCreateLobby() { + SharedDtor(); +} + +void RequestCreateLobby::SharedDtor() { + if (lobby_name_ != &::google::protobuf::internal::kEmptyString) { + delete lobby_name_; + } + if (lobby_topic_ != &::google::protobuf::internal::kEmptyString) { + delete lobby_topic_; + } + if (this != default_instance_) { + } +} + +void RequestCreateLobby::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* RequestCreateLobby::descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestCreateLobby_descriptor_; +} + +const RequestCreateLobby& RequestCreateLobby::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_chat_2eproto(); return *default_instance_; +} + +RequestCreateLobby* RequestCreateLobby::default_instance_ = NULL; + +RequestCreateLobby* RequestCreateLobby::New() const { + return new RequestCreateLobby; +} + +void RequestCreateLobby::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_lobby_name()) { + if (lobby_name_ != &::google::protobuf::internal::kEmptyString) { + lobby_name_->clear(); + } + } + if (has_lobby_topic()) { + if (lobby_topic_ != &::google::protobuf::internal::kEmptyString) { + lobby_topic_->clear(); + } + } + privacy_level_ = 1; + } + invited_friends_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool RequestCreateLobby::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required string lobby_name = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_lobby_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_name().data(), this->lobby_name().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_lobby_topic; + break; + } + + // required string lobby_topic = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_lobby_topic: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_lobby_topic())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_topic().data(), this->lobby_topic().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_invited_friends; + break; + } + + // repeated string invited_friends = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_invited_friends: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_invited_friends())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->invited_friends(0).data(), this->invited_friends(0).length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_invited_friends; + if (input->ExpectTag(32)) goto parse_privacy_level; + break; + } + + // required .rsctrl.chat.LobbyPrivacyLevel privacy_level = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_privacy_level: + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (rsctrl::chat::LobbyPrivacyLevel_IsValid(value)) { + set_privacy_level(static_cast< rsctrl::chat::LobbyPrivacyLevel >(value)); + } else { + mutable_unknown_fields()->AddVarint(4, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } + return true; +#undef DO_ +} + +void RequestCreateLobby::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required string lobby_name = 1; + if (has_lobby_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_name().data(), this->lobby_name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->lobby_name(), output); + } + + // required string lobby_topic = 2; + if (has_lobby_topic()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_topic().data(), this->lobby_topic().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 2, this->lobby_topic(), output); + } + + // repeated string invited_friends = 3; + for (int i = 0; i < this->invited_friends_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->invited_friends(i).data(), this->invited_friends(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 3, this->invited_friends(i), output); + } + + // required .rsctrl.chat.LobbyPrivacyLevel privacy_level = 4; + if (has_privacy_level()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 4, this->privacy_level(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* RequestCreateLobby::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required string lobby_name = 1; + if (has_lobby_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_name().data(), this->lobby_name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->lobby_name(), target); + } + + // required string lobby_topic = 2; + if (has_lobby_topic()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_topic().data(), this->lobby_topic().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->lobby_topic(), target); + } + + // repeated string invited_friends = 3; + for (int i = 0; i < this->invited_friends_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->invited_friends(i).data(), this->invited_friends(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(3, this->invited_friends(i), target); + } + + // required .rsctrl.chat.LobbyPrivacyLevel privacy_level = 4; + if (has_privacy_level()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 4, this->privacy_level(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int RequestCreateLobby::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required string lobby_name = 1; + if (has_lobby_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->lobby_name()); + } + + // required string lobby_topic = 2; + if (has_lobby_topic()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->lobby_topic()); + } + + // required .rsctrl.chat.LobbyPrivacyLevel privacy_level = 4; + if (has_privacy_level()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->privacy_level()); + } + + } + // repeated string invited_friends = 3; + total_size += 1 * this->invited_friends_size(); + for (int i = 0; i < this->invited_friends_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->invited_friends(i)); + } + + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void RequestCreateLobby::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const RequestCreateLobby* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void RequestCreateLobby::MergeFrom(const RequestCreateLobby& from) { + GOOGLE_CHECK_NE(&from, this); + invited_friends_.MergeFrom(from.invited_friends_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_lobby_name()) { + set_lobby_name(from.lobby_name()); + } + if (from.has_lobby_topic()) { + set_lobby_topic(from.lobby_topic()); + } + if (from.has_privacy_level()) { + set_privacy_level(from.privacy_level()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void RequestCreateLobby::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void RequestCreateLobby::CopyFrom(const RequestCreateLobby& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RequestCreateLobby::IsInitialized() const { + if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false; + + return true; +} + +void RequestCreateLobby::Swap(RequestCreateLobby* other) { + if (other != this) { + std::swap(lobby_name_, other->lobby_name_); + std::swap(lobby_topic_, other->lobby_topic_); + std::swap(privacy_level_, other->privacy_level_); + invited_friends_.Swap(&other->invited_friends_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata RequestCreateLobby::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = RequestCreateLobby_descriptor_; + metadata.reflection = RequestCreateLobby_reflection_; + return metadata; +} + + +// =================================================================== + +const ::google::protobuf::EnumDescriptor* RequestJoinOrLeaveLobby_LobbyAction_descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestJoinOrLeaveLobby_LobbyAction_descriptor_; +} +bool RequestJoinOrLeaveLobby_LobbyAction_IsValid(int value) { + switch(value) { + case 1: + case 2: + return true; + default: + return false; + } +} + +#ifndef _MSC_VER +const RequestJoinOrLeaveLobby_LobbyAction RequestJoinOrLeaveLobby::JOIN_OR_ACCEPT; +const RequestJoinOrLeaveLobby_LobbyAction RequestJoinOrLeaveLobby::LEAVE_OR_DENY; +const RequestJoinOrLeaveLobby_LobbyAction RequestJoinOrLeaveLobby::LobbyAction_MIN; +const RequestJoinOrLeaveLobby_LobbyAction RequestJoinOrLeaveLobby::LobbyAction_MAX; +const int RequestJoinOrLeaveLobby::LobbyAction_ARRAYSIZE; +#endif // _MSC_VER +#ifndef _MSC_VER +const int RequestJoinOrLeaveLobby::kLobbyIdFieldNumber; +const int RequestJoinOrLeaveLobby::kActionFieldNumber; +#endif // !_MSC_VER + +RequestJoinOrLeaveLobby::RequestJoinOrLeaveLobby() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void RequestJoinOrLeaveLobby::InitAsDefaultInstance() { +} + +RequestJoinOrLeaveLobby::RequestJoinOrLeaveLobby(const RequestJoinOrLeaveLobby& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void RequestJoinOrLeaveLobby::SharedCtor() { + _cached_size_ = 0; + lobby_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + action_ = 1; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +RequestJoinOrLeaveLobby::~RequestJoinOrLeaveLobby() { + SharedDtor(); +} + +void RequestJoinOrLeaveLobby::SharedDtor() { + if (lobby_id_ != &::google::protobuf::internal::kEmptyString) { + delete lobby_id_; + } + if (this != default_instance_) { + } +} + +void RequestJoinOrLeaveLobby::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* RequestJoinOrLeaveLobby::descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestJoinOrLeaveLobby_descriptor_; +} + +const RequestJoinOrLeaveLobby& RequestJoinOrLeaveLobby::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_chat_2eproto(); return *default_instance_; +} + +RequestJoinOrLeaveLobby* RequestJoinOrLeaveLobby::default_instance_ = NULL; + +RequestJoinOrLeaveLobby* RequestJoinOrLeaveLobby::New() const { + return new RequestJoinOrLeaveLobby; +} + +void RequestJoinOrLeaveLobby::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_lobby_id()) { + if (lobby_id_ != &::google::protobuf::internal::kEmptyString) { + lobby_id_->clear(); + } + } + action_ = 1; + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool RequestJoinOrLeaveLobby::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required string lobby_id = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_lobby_id())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_id().data(), this->lobby_id().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(16)) goto parse_action; + break; + } + + // required .rsctrl.chat.RequestJoinOrLeaveLobby.LobbyAction action = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_action: + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::rsctrl::chat::RequestJoinOrLeaveLobby_LobbyAction_IsValid(value)) { + set_action(static_cast< ::rsctrl::chat::RequestJoinOrLeaveLobby_LobbyAction >(value)); + } else { + mutable_unknown_fields()->AddVarint(2, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } + return true; +#undef DO_ +} + +void RequestJoinOrLeaveLobby::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required string lobby_id = 1; + if (has_lobby_id()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_id().data(), this->lobby_id().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->lobby_id(), output); + } + + // required .rsctrl.chat.RequestJoinOrLeaveLobby.LobbyAction action = 2; + if (has_action()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 2, this->action(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* RequestJoinOrLeaveLobby::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required string lobby_id = 1; + if (has_lobby_id()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_id().data(), this->lobby_id().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->lobby_id(), target); + } + + // required .rsctrl.chat.RequestJoinOrLeaveLobby.LobbyAction action = 2; + if (has_action()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 2, this->action(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int RequestJoinOrLeaveLobby::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required string lobby_id = 1; + if (has_lobby_id()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->lobby_id()); + } + + // required .rsctrl.chat.RequestJoinOrLeaveLobby.LobbyAction action = 2; + if (has_action()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->action()); + } + + } + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void RequestJoinOrLeaveLobby::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const RequestJoinOrLeaveLobby* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void RequestJoinOrLeaveLobby::MergeFrom(const RequestJoinOrLeaveLobby& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_lobby_id()) { + set_lobby_id(from.lobby_id()); + } + if (from.has_action()) { + set_action(from.action()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void RequestJoinOrLeaveLobby::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void RequestJoinOrLeaveLobby::CopyFrom(const RequestJoinOrLeaveLobby& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RequestJoinOrLeaveLobby::IsInitialized() const { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + return true; +} + +void RequestJoinOrLeaveLobby::Swap(RequestJoinOrLeaveLobby* other) { + if (other != this) { + std::swap(lobby_id_, other->lobby_id_); + std::swap(action_, other->action_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata RequestJoinOrLeaveLobby::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = RequestJoinOrLeaveLobby_descriptor_; + metadata.reflection = RequestJoinOrLeaveLobby_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int RequestSetLobbyNickname::kNicknameFieldNumber; +const int RequestSetLobbyNickname::kLobbyIdsFieldNumber; +#endif // !_MSC_VER + +RequestSetLobbyNickname::RequestSetLobbyNickname() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void RequestSetLobbyNickname::InitAsDefaultInstance() { +} + +RequestSetLobbyNickname::RequestSetLobbyNickname(const RequestSetLobbyNickname& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void RequestSetLobbyNickname::SharedCtor() { + _cached_size_ = 0; + nickname_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +RequestSetLobbyNickname::~RequestSetLobbyNickname() { + SharedDtor(); +} + +void RequestSetLobbyNickname::SharedDtor() { + if (nickname_ != &::google::protobuf::internal::kEmptyString) { + delete nickname_; + } + if (this != default_instance_) { + } +} + +void RequestSetLobbyNickname::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* RequestSetLobbyNickname::descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestSetLobbyNickname_descriptor_; +} + +const RequestSetLobbyNickname& RequestSetLobbyNickname::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_chat_2eproto(); return *default_instance_; +} + +RequestSetLobbyNickname* RequestSetLobbyNickname::default_instance_ = NULL; + +RequestSetLobbyNickname* RequestSetLobbyNickname::New() const { + return new RequestSetLobbyNickname; +} + +void RequestSetLobbyNickname::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_nickname()) { + if (nickname_ != &::google::protobuf::internal::kEmptyString) { + nickname_->clear(); + } + } + } + lobby_ids_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool RequestSetLobbyNickname::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required string nickname = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_nickname())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->nickname().data(), this->nickname().length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_lobby_ids; + break; + } + + // repeated string lobby_ids = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_lobby_ids: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_lobby_ids())); + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_ids(0).data(), this->lobby_ids(0).length(), + ::google::protobuf::internal::WireFormat::PARSE); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_lobby_ids; + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } + return true; +#undef DO_ +} + +void RequestSetLobbyNickname::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required string nickname = 1; + if (has_nickname()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->nickname().data(), this->nickname().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->nickname(), output); + } + + // repeated string lobby_ids = 2; + for (int i = 0; i < this->lobby_ids_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_ids(i).data(), this->lobby_ids(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + ::google::protobuf::internal::WireFormatLite::WriteString( + 2, this->lobby_ids(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* RequestSetLobbyNickname::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required string nickname = 1; + if (has_nickname()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->nickname().data(), this->nickname().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->nickname(), target); + } + + // repeated string lobby_ids = 2; + for (int i = 0; i < this->lobby_ids_size(); i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8String( + this->lobby_ids(i).data(), this->lobby_ids(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(2, this->lobby_ids(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int RequestSetLobbyNickname::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required string nickname = 1; + if (has_nickname()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->nickname()); + } + + } + // repeated string lobby_ids = 2; + total_size += 1 * this->lobby_ids_size(); + for (int i = 0; i < this->lobby_ids_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->lobby_ids(i)); + } + + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void RequestSetLobbyNickname::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const RequestSetLobbyNickname* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void RequestSetLobbyNickname::MergeFrom(const RequestSetLobbyNickname& from) { + GOOGLE_CHECK_NE(&from, this); + lobby_ids_.MergeFrom(from.lobby_ids_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_nickname()) { + set_nickname(from.nickname()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void RequestSetLobbyNickname::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void RequestSetLobbyNickname::CopyFrom(const RequestSetLobbyNickname& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RequestSetLobbyNickname::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + return true; +} + +void RequestSetLobbyNickname::Swap(RequestSetLobbyNickname* other) { + if (other != this) { + std::swap(nickname_, other->nickname_); + lobby_ids_.Swap(&other->lobby_ids_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata RequestSetLobbyNickname::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = RequestSetLobbyNickname_descriptor_; + metadata.reflection = RequestSetLobbyNickname_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int ResponseSetLobbyNickname::kStatusFieldNumber; +#endif // !_MSC_VER + +ResponseSetLobbyNickname::ResponseSetLobbyNickname() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void ResponseSetLobbyNickname::InitAsDefaultInstance() { + status_ = const_cast< ::rsctrl::core::Status*>(&::rsctrl::core::Status::default_instance()); +} + +ResponseSetLobbyNickname::ResponseSetLobbyNickname(const ResponseSetLobbyNickname& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void ResponseSetLobbyNickname::SharedCtor() { + _cached_size_ = 0; + status_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +ResponseSetLobbyNickname::~ResponseSetLobbyNickname() { + SharedDtor(); +} + +void ResponseSetLobbyNickname::SharedDtor() { + if (this != default_instance_) { + delete status_; + } +} + +void ResponseSetLobbyNickname::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ResponseSetLobbyNickname::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ResponseSetLobbyNickname_descriptor_; +} + +const ResponseSetLobbyNickname& ResponseSetLobbyNickname::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_chat_2eproto(); return *default_instance_; +} + +ResponseSetLobbyNickname* ResponseSetLobbyNickname::default_instance_ = NULL; + +ResponseSetLobbyNickname* ResponseSetLobbyNickname::New() const { + return new ResponseSetLobbyNickname; +} + +void ResponseSetLobbyNickname::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_status()) { + if (status_ != NULL) status_->::rsctrl::core::Status::Clear(); + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool ResponseSetLobbyNickname::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required .rsctrl.core.Status status = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_status())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } + return true; +#undef DO_ +} + +void ResponseSetLobbyNickname::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.core.Status status = 1; + if (has_status()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->status(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* ResponseSetLobbyNickname::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.core.Status status = 1; + if (has_status()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->status(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int ResponseSetLobbyNickname::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.core.Status status = 1; + if (has_status()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->status()); + } + + } + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ResponseSetLobbyNickname::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const ResponseSetLobbyNickname* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void ResponseSetLobbyNickname::MergeFrom(const ResponseSetLobbyNickname& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_status()) { + mutable_status()->::rsctrl::core::Status::MergeFrom(from.status()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void ResponseSetLobbyNickname::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ResponseSetLobbyNickname::CopyFrom(const ResponseSetLobbyNickname& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ResponseSetLobbyNickname::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + if (has_status()) { + if (!this->status().IsInitialized()) return false; + } + return true; +} + +void ResponseSetLobbyNickname::Swap(ResponseSetLobbyNickname* other) { + if (other != this) { + std::swap(status_, other->status_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata ResponseSetLobbyNickname::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ResponseSetLobbyNickname_descriptor_; + metadata.reflection = ResponseSetLobbyNickname_reflection_; + return metadata; +} + + +// =================================================================== + +const ::google::protobuf::EnumDescriptor* RequestRegisterEvents_RegisterAction_descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestRegisterEvents_RegisterAction_descriptor_; +} +bool RequestRegisterEvents_RegisterAction_IsValid(int value) { + switch(value) { + case 1: + case 2: + return true; + default: + return false; + } +} + +#ifndef _MSC_VER +const RequestRegisterEvents_RegisterAction RequestRegisterEvents::REGISTER; +const RequestRegisterEvents_RegisterAction RequestRegisterEvents::DEREGISTER; +const RequestRegisterEvents_RegisterAction RequestRegisterEvents::RegisterAction_MIN; +const RequestRegisterEvents_RegisterAction RequestRegisterEvents::RegisterAction_MAX; +const int RequestRegisterEvents::RegisterAction_ARRAYSIZE; +#endif // _MSC_VER +#ifndef _MSC_VER +const int RequestRegisterEvents::kActionFieldNumber; +#endif // !_MSC_VER + +RequestRegisterEvents::RequestRegisterEvents() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void RequestRegisterEvents::InitAsDefaultInstance() { +} + +RequestRegisterEvents::RequestRegisterEvents(const RequestRegisterEvents& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void RequestRegisterEvents::SharedCtor() { + _cached_size_ = 0; + action_ = 1; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +RequestRegisterEvents::~RequestRegisterEvents() { + SharedDtor(); +} + +void RequestRegisterEvents::SharedDtor() { + if (this != default_instance_) { + } +} + +void RequestRegisterEvents::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* RequestRegisterEvents::descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestRegisterEvents_descriptor_; +} + +const RequestRegisterEvents& RequestRegisterEvents::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_chat_2eproto(); return *default_instance_; +} + +RequestRegisterEvents* RequestRegisterEvents::default_instance_ = NULL; + +RequestRegisterEvents* RequestRegisterEvents::New() const { + return new RequestRegisterEvents; +} + +void RequestRegisterEvents::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + action_ = 1; + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool RequestRegisterEvents::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required .rsctrl.chat.RequestRegisterEvents.RegisterAction action = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::rsctrl::chat::RequestRegisterEvents_RegisterAction_IsValid(value)) { + set_action(static_cast< ::rsctrl::chat::RequestRegisterEvents_RegisterAction >(value)); + } else { + mutable_unknown_fields()->AddVarint(1, value); + } + } else { + goto handle_uninterpreted; + } + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } + return true; +#undef DO_ +} + +void RequestRegisterEvents::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.chat.RequestRegisterEvents.RegisterAction action = 1; + if (has_action()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 1, this->action(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* RequestRegisterEvents::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.chat.RequestRegisterEvents.RegisterAction action = 1; + if (has_action()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 1, this->action(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int RequestRegisterEvents::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.chat.RequestRegisterEvents.RegisterAction action = 1; + if (has_action()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->action()); + } + + } + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void RequestRegisterEvents::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const RequestRegisterEvents* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void RequestRegisterEvents::MergeFrom(const RequestRegisterEvents& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_action()) { + set_action(from.action()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void RequestRegisterEvents::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void RequestRegisterEvents::CopyFrom(const RequestRegisterEvents& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RequestRegisterEvents::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + return true; +} + +void RequestRegisterEvents::Swap(RequestRegisterEvents* other) { + if (other != this) { + std::swap(action_, other->action_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata RequestRegisterEvents::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = RequestRegisterEvents_descriptor_; + metadata.reflection = RequestRegisterEvents_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int ResponseRegisterEvents::kStatusFieldNumber; +#endif // !_MSC_VER + +ResponseRegisterEvents::ResponseRegisterEvents() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void ResponseRegisterEvents::InitAsDefaultInstance() { + status_ = const_cast< ::rsctrl::core::Status*>(&::rsctrl::core::Status::default_instance()); +} + +ResponseRegisterEvents::ResponseRegisterEvents(const ResponseRegisterEvents& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void ResponseRegisterEvents::SharedCtor() { + _cached_size_ = 0; + status_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +ResponseRegisterEvents::~ResponseRegisterEvents() { + SharedDtor(); +} + +void ResponseRegisterEvents::SharedDtor() { + if (this != default_instance_) { + delete status_; + } +} + +void ResponseRegisterEvents::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ResponseRegisterEvents::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ResponseRegisterEvents_descriptor_; +} + +const ResponseRegisterEvents& ResponseRegisterEvents::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_chat_2eproto(); return *default_instance_; +} + +ResponseRegisterEvents* ResponseRegisterEvents::default_instance_ = NULL; + +ResponseRegisterEvents* ResponseRegisterEvents::New() const { + return new ResponseRegisterEvents; +} + +void ResponseRegisterEvents::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_status()) { + if (status_ != NULL) status_->::rsctrl::core::Status::Clear(); + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool ResponseRegisterEvents::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required .rsctrl.core.Status status = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_status())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } + return true; +#undef DO_ +} + +void ResponseRegisterEvents::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.core.Status status = 1; + if (has_status()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->status(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* ResponseRegisterEvents::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.core.Status status = 1; + if (has_status()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->status(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int ResponseRegisterEvents::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.core.Status status = 1; + if (has_status()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->status()); + } + + } + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ResponseRegisterEvents::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const ResponseRegisterEvents* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void ResponseRegisterEvents::MergeFrom(const ResponseRegisterEvents& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_status()) { + mutable_status()->::rsctrl::core::Status::MergeFrom(from.status()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void ResponseRegisterEvents::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ResponseRegisterEvents::CopyFrom(const ResponseRegisterEvents& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ResponseRegisterEvents::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + if (has_status()) { + if (!this->status().IsInitialized()) return false; + } + return true; +} + +void ResponseRegisterEvents::Swap(ResponseRegisterEvents* other) { + if (other != this) { + std::swap(status_, other->status_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata ResponseRegisterEvents::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ResponseRegisterEvents_descriptor_; + metadata.reflection = ResponseRegisterEvents_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int EventLobbyInvite::kLobbyFieldNumber; +#endif // !_MSC_VER + +EventLobbyInvite::EventLobbyInvite() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void EventLobbyInvite::InitAsDefaultInstance() { + lobby_ = const_cast< ::rsctrl::chat::ChatLobbyInfo*>(&::rsctrl::chat::ChatLobbyInfo::default_instance()); +} + +EventLobbyInvite::EventLobbyInvite(const EventLobbyInvite& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void EventLobbyInvite::SharedCtor() { + _cached_size_ = 0; + lobby_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +EventLobbyInvite::~EventLobbyInvite() { + SharedDtor(); +} + +void EventLobbyInvite::SharedDtor() { + if (this != default_instance_) { + delete lobby_; + } +} + +void EventLobbyInvite::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* EventLobbyInvite::descriptor() { + protobuf_AssignDescriptorsOnce(); + return EventLobbyInvite_descriptor_; +} + +const EventLobbyInvite& EventLobbyInvite::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_chat_2eproto(); return *default_instance_; +} + +EventLobbyInvite* EventLobbyInvite::default_instance_ = NULL; + +EventLobbyInvite* EventLobbyInvite::New() const { + return new EventLobbyInvite; +} + +void EventLobbyInvite::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_lobby()) { + if (lobby_ != NULL) lobby_->::rsctrl::chat::ChatLobbyInfo::Clear(); + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool EventLobbyInvite::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required .rsctrl.chat.ChatLobbyInfo lobby = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_lobby())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } + return true; +#undef DO_ +} + +void EventLobbyInvite::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.chat.ChatLobbyInfo lobby = 1; + if (has_lobby()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->lobby(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* EventLobbyInvite::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.chat.ChatLobbyInfo lobby = 1; + if (has_lobby()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->lobby(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int EventLobbyInvite::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.chat.ChatLobbyInfo lobby = 1; + if (has_lobby()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->lobby()); + } + + } + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void EventLobbyInvite::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const EventLobbyInvite* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void EventLobbyInvite::MergeFrom(const EventLobbyInvite& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_lobby()) { + mutable_lobby()->::rsctrl::chat::ChatLobbyInfo::MergeFrom(from.lobby()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void EventLobbyInvite::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void EventLobbyInvite::CopyFrom(const EventLobbyInvite& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool EventLobbyInvite::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + if (has_lobby()) { + if (!this->lobby().IsInitialized()) return false; + } + return true; +} + +void EventLobbyInvite::Swap(EventLobbyInvite* other) { + if (other != this) { + std::swap(lobby_, other->lobby_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata EventLobbyInvite::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = EventLobbyInvite_descriptor_; + metadata.reflection = EventLobbyInvite_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int EventChatMessage::kMsgFieldNumber; +#endif // !_MSC_VER + +EventChatMessage::EventChatMessage() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void EventChatMessage::InitAsDefaultInstance() { + msg_ = const_cast< ::rsctrl::chat::ChatMessage*>(&::rsctrl::chat::ChatMessage::default_instance()); +} + +EventChatMessage::EventChatMessage(const EventChatMessage& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void EventChatMessage::SharedCtor() { + _cached_size_ = 0; + msg_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +EventChatMessage::~EventChatMessage() { + SharedDtor(); +} + +void EventChatMessage::SharedDtor() { + if (this != default_instance_) { + delete msg_; + } +} + +void EventChatMessage::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* EventChatMessage::descriptor() { + protobuf_AssignDescriptorsOnce(); + return EventChatMessage_descriptor_; +} + +const EventChatMessage& EventChatMessage::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_chat_2eproto(); return *default_instance_; +} + +EventChatMessage* EventChatMessage::default_instance_ = NULL; + +EventChatMessage* EventChatMessage::New() const { + return new EventChatMessage; +} + +void EventChatMessage::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_msg()) { + if (msg_ != NULL) msg_->::rsctrl::chat::ChatMessage::Clear(); + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool EventChatMessage::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required .rsctrl.chat.ChatMessage msg = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_msg())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } + return true; +#undef DO_ +} + +void EventChatMessage::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.chat.ChatMessage msg = 1; + if (has_msg()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->msg(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* EventChatMessage::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.chat.ChatMessage msg = 1; + if (has_msg()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->msg(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int EventChatMessage::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.chat.ChatMessage msg = 1; + if (has_msg()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->msg()); + } + + } + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void EventChatMessage::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const EventChatMessage* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void EventChatMessage::MergeFrom(const EventChatMessage& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_msg()) { + mutable_msg()->::rsctrl::chat::ChatMessage::MergeFrom(from.msg()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void EventChatMessage::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void EventChatMessage::CopyFrom(const EventChatMessage& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool EventChatMessage::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + if (has_msg()) { + if (!this->msg().IsInitialized()) return false; + } + return true; +} + +void EventChatMessage::Swap(EventChatMessage* other) { + if (other != this) { + std::swap(msg_, other->msg_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata EventChatMessage::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = EventChatMessage_descriptor_; + metadata.reflection = EventChatMessage_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int RequestSendMessage::kMsgFieldNumber; +#endif // !_MSC_VER + +RequestSendMessage::RequestSendMessage() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void RequestSendMessage::InitAsDefaultInstance() { + msg_ = const_cast< ::rsctrl::chat::ChatMessage*>(&::rsctrl::chat::ChatMessage::default_instance()); +} + +RequestSendMessage::RequestSendMessage(const RequestSendMessage& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void RequestSendMessage::SharedCtor() { + _cached_size_ = 0; + msg_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +RequestSendMessage::~RequestSendMessage() { + SharedDtor(); +} + +void RequestSendMessage::SharedDtor() { + if (this != default_instance_) { + delete msg_; + } +} + +void RequestSendMessage::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* RequestSendMessage::descriptor() { + protobuf_AssignDescriptorsOnce(); + return RequestSendMessage_descriptor_; +} + +const RequestSendMessage& RequestSendMessage::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_chat_2eproto(); return *default_instance_; +} + +RequestSendMessage* RequestSendMessage::default_instance_ = NULL; + +RequestSendMessage* RequestSendMessage::New() const { + return new RequestSendMessage; +} + +void RequestSendMessage::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_msg()) { + if (msg_ != NULL) msg_->::rsctrl::chat::ChatMessage::Clear(); + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool RequestSendMessage::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required .rsctrl.chat.ChatMessage msg = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_msg())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } + return true; +#undef DO_ +} + +void RequestSendMessage::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.chat.ChatMessage msg = 1; + if (has_msg()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->msg(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* RequestSendMessage::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.chat.ChatMessage msg = 1; + if (has_msg()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->msg(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int RequestSendMessage::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.chat.ChatMessage msg = 1; + if (has_msg()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->msg()); + } + + } + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void RequestSendMessage::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const RequestSendMessage* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void RequestSendMessage::MergeFrom(const RequestSendMessage& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_msg()) { + mutable_msg()->::rsctrl::chat::ChatMessage::MergeFrom(from.msg()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void RequestSendMessage::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void RequestSendMessage::CopyFrom(const RequestSendMessage& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RequestSendMessage::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + if (has_msg()) { + if (!this->msg().IsInitialized()) return false; + } + return true; +} + +void RequestSendMessage::Swap(RequestSendMessage* other) { + if (other != this) { + std::swap(msg_, other->msg_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata RequestSendMessage::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = RequestSendMessage_descriptor_; + metadata.reflection = RequestSendMessage_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int ResponseSendMessage::kStatusFieldNumber; +#endif // !_MSC_VER + +ResponseSendMessage::ResponseSendMessage() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void ResponseSendMessage::InitAsDefaultInstance() { + status_ = const_cast< ::rsctrl::core::Status*>(&::rsctrl::core::Status::default_instance()); +} + +ResponseSendMessage::ResponseSendMessage(const ResponseSendMessage& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void ResponseSendMessage::SharedCtor() { + _cached_size_ = 0; + status_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +ResponseSendMessage::~ResponseSendMessage() { + SharedDtor(); +} + +void ResponseSendMessage::SharedDtor() { + if (this != default_instance_) { + delete status_; + } +} + +void ResponseSendMessage::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ResponseSendMessage::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ResponseSendMessage_descriptor_; +} + +const ResponseSendMessage& ResponseSendMessage::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_chat_2eproto(); return *default_instance_; +} + +ResponseSendMessage* ResponseSendMessage::default_instance_ = NULL; + +ResponseSendMessage* ResponseSendMessage::New() const { + return new ResponseSendMessage; +} + +void ResponseSendMessage::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_status()) { + if (status_ != NULL) status_->::rsctrl::core::Status::Clear(); + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool ResponseSendMessage::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required .rsctrl.core.Status status = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_status())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } + return true; +#undef DO_ +} + +void ResponseSendMessage::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required .rsctrl.core.Status status = 1; + if (has_status()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->status(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* ResponseSendMessage::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required .rsctrl.core.Status status = 1; + if (has_status()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->status(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int ResponseSendMessage::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required .rsctrl.core.Status status = 1; + if (has_status()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->status()); + } + + } + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ResponseSendMessage::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const ResponseSendMessage* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void ResponseSendMessage::MergeFrom(const ResponseSendMessage& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_status()) { + mutable_status()->::rsctrl::core::Status::MergeFrom(from.status()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void ResponseSendMessage::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ResponseSendMessage::CopyFrom(const ResponseSendMessage& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ResponseSendMessage::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + if (has_status()) { + if (!this->status().IsInitialized()) return false; + } + return true; +} + +void ResponseSendMessage::Swap(ResponseSendMessage* other) { + if (other != this) { + std::swap(status_, other->status_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata ResponseSendMessage::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ResponseSendMessage_descriptor_; + metadata.reflection = ResponseSendMessage_reflection_; + return metadata; +} + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace chat +} // namespace rsctrl + +// @@protoc_insertion_point(global_scope) diff --git a/retroshare-nogui/src/rpc/proto/gencc/chat.pb.h b/retroshare-nogui/src/rpc/proto/gencc/chat.pb.h new file mode 100644 index 000000000..d6ebc3adf --- /dev/null +++ b/retroshare-nogui/src/rpc/proto/gencc/chat.pb.h @@ -0,0 +1,3325 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: chat.proto + +#ifndef PROTOBUF_chat_2eproto__INCLUDED +#define PROTOBUF_chat_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 2004000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 2004001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include "core.pb.h" +// @@protoc_insertion_point(includes) + +namespace rsctrl { +namespace chat { + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_chat_2eproto(); +void protobuf_AssignDesc_chat_2eproto(); +void protobuf_ShutdownFile_chat_2eproto(); + +class ChatLobbyInfo; +class ChatId; +class ChatMessage; +class ResponseChatLobbies; +class RequestChatLobbies; +class RequestCreateLobby; +class RequestJoinOrLeaveLobby; +class RequestSetLobbyNickname; +class ResponseSetLobbyNickname; +class RequestRegisterEvents; +class ResponseRegisterEvents; +class EventLobbyInvite; +class EventChatMessage; +class RequestSendMessage; +class ResponseSendMessage; + +enum ChatLobbyInfo_LobbyState { + ChatLobbyInfo_LobbyState_LOBBYSTATE_JOINED = 1, + ChatLobbyInfo_LobbyState_LOBBYSTATE_INVITED = 2, + ChatLobbyInfo_LobbyState_LOBBYSTATE_PUBLIC = 3 +}; +bool ChatLobbyInfo_LobbyState_IsValid(int value); +const ChatLobbyInfo_LobbyState ChatLobbyInfo_LobbyState_LobbyState_MIN = ChatLobbyInfo_LobbyState_LOBBYSTATE_JOINED; +const ChatLobbyInfo_LobbyState ChatLobbyInfo_LobbyState_LobbyState_MAX = ChatLobbyInfo_LobbyState_LOBBYSTATE_PUBLIC; +const int ChatLobbyInfo_LobbyState_LobbyState_ARRAYSIZE = ChatLobbyInfo_LobbyState_LobbyState_MAX + 1; + +const ::google::protobuf::EnumDescriptor* ChatLobbyInfo_LobbyState_descriptor(); +inline const ::std::string& ChatLobbyInfo_LobbyState_Name(ChatLobbyInfo_LobbyState value) { + return ::google::protobuf::internal::NameOfEnum( + ChatLobbyInfo_LobbyState_descriptor(), value); +} +inline bool ChatLobbyInfo_LobbyState_Parse( + const ::std::string& name, ChatLobbyInfo_LobbyState* value) { + return ::google::protobuf::internal::ParseNamedEnum( + ChatLobbyInfo_LobbyState_descriptor(), name, value); +} +enum RequestChatLobbies_LobbySet { + RequestChatLobbies_LobbySet_LOBBYSET_ALL = 1, + RequestChatLobbies_LobbySet_LOBBYSET_JOINED = 2, + RequestChatLobbies_LobbySet_LOBBYSET_INVITED = 3, + RequestChatLobbies_LobbySet_LOBBYSET_PUBLIC = 4 +}; +bool RequestChatLobbies_LobbySet_IsValid(int value); +const RequestChatLobbies_LobbySet RequestChatLobbies_LobbySet_LobbySet_MIN = RequestChatLobbies_LobbySet_LOBBYSET_ALL; +const RequestChatLobbies_LobbySet RequestChatLobbies_LobbySet_LobbySet_MAX = RequestChatLobbies_LobbySet_LOBBYSET_PUBLIC; +const int RequestChatLobbies_LobbySet_LobbySet_ARRAYSIZE = RequestChatLobbies_LobbySet_LobbySet_MAX + 1; + +const ::google::protobuf::EnumDescriptor* RequestChatLobbies_LobbySet_descriptor(); +inline const ::std::string& RequestChatLobbies_LobbySet_Name(RequestChatLobbies_LobbySet value) { + return ::google::protobuf::internal::NameOfEnum( + RequestChatLobbies_LobbySet_descriptor(), value); +} +inline bool RequestChatLobbies_LobbySet_Parse( + const ::std::string& name, RequestChatLobbies_LobbySet* value) { + return ::google::protobuf::internal::ParseNamedEnum( + RequestChatLobbies_LobbySet_descriptor(), name, value); +} +enum RequestJoinOrLeaveLobby_LobbyAction { + RequestJoinOrLeaveLobby_LobbyAction_JOIN_OR_ACCEPT = 1, + RequestJoinOrLeaveLobby_LobbyAction_LEAVE_OR_DENY = 2 +}; +bool RequestJoinOrLeaveLobby_LobbyAction_IsValid(int value); +const RequestJoinOrLeaveLobby_LobbyAction RequestJoinOrLeaveLobby_LobbyAction_LobbyAction_MIN = RequestJoinOrLeaveLobby_LobbyAction_JOIN_OR_ACCEPT; +const RequestJoinOrLeaveLobby_LobbyAction RequestJoinOrLeaveLobby_LobbyAction_LobbyAction_MAX = RequestJoinOrLeaveLobby_LobbyAction_LEAVE_OR_DENY; +const int RequestJoinOrLeaveLobby_LobbyAction_LobbyAction_ARRAYSIZE = RequestJoinOrLeaveLobby_LobbyAction_LobbyAction_MAX + 1; + +const ::google::protobuf::EnumDescriptor* RequestJoinOrLeaveLobby_LobbyAction_descriptor(); +inline const ::std::string& RequestJoinOrLeaveLobby_LobbyAction_Name(RequestJoinOrLeaveLobby_LobbyAction value) { + return ::google::protobuf::internal::NameOfEnum( + RequestJoinOrLeaveLobby_LobbyAction_descriptor(), value); +} +inline bool RequestJoinOrLeaveLobby_LobbyAction_Parse( + const ::std::string& name, RequestJoinOrLeaveLobby_LobbyAction* value) { + return ::google::protobuf::internal::ParseNamedEnum( + RequestJoinOrLeaveLobby_LobbyAction_descriptor(), name, value); +} +enum RequestRegisterEvents_RegisterAction { + RequestRegisterEvents_RegisterAction_REGISTER = 1, + RequestRegisterEvents_RegisterAction_DEREGISTER = 2 +}; +bool RequestRegisterEvents_RegisterAction_IsValid(int value); +const RequestRegisterEvents_RegisterAction RequestRegisterEvents_RegisterAction_RegisterAction_MIN = RequestRegisterEvents_RegisterAction_REGISTER; +const RequestRegisterEvents_RegisterAction RequestRegisterEvents_RegisterAction_RegisterAction_MAX = RequestRegisterEvents_RegisterAction_DEREGISTER; +const int RequestRegisterEvents_RegisterAction_RegisterAction_ARRAYSIZE = RequestRegisterEvents_RegisterAction_RegisterAction_MAX + 1; + +const ::google::protobuf::EnumDescriptor* RequestRegisterEvents_RegisterAction_descriptor(); +inline const ::std::string& RequestRegisterEvents_RegisterAction_Name(RequestRegisterEvents_RegisterAction value) { + return ::google::protobuf::internal::NameOfEnum( + RequestRegisterEvents_RegisterAction_descriptor(), value); +} +inline bool RequestRegisterEvents_RegisterAction_Parse( + const ::std::string& name, RequestRegisterEvents_RegisterAction* value) { + return ::google::protobuf::internal::ParseNamedEnum( + RequestRegisterEvents_RegisterAction_descriptor(), name, value); +} +enum RequestMsgIds { + MsgId_RequestChatLobbies = 1, + MsgId_RequestCreateLobby = 2, + MsgId_RequestJoinOrLeaveLobby = 3, + MsgId_RequestSetLobbyNickname = 4, + MsgId_RequestRegisterEvents = 5, + MsgId_RequestSendMessage = 6 +}; +bool RequestMsgIds_IsValid(int value); +const RequestMsgIds RequestMsgIds_MIN = MsgId_RequestChatLobbies; +const RequestMsgIds RequestMsgIds_MAX = MsgId_RequestSendMessage; +const int RequestMsgIds_ARRAYSIZE = RequestMsgIds_MAX + 1; + +const ::google::protobuf::EnumDescriptor* RequestMsgIds_descriptor(); +inline const ::std::string& RequestMsgIds_Name(RequestMsgIds value) { + return ::google::protobuf::internal::NameOfEnum( + RequestMsgIds_descriptor(), value); +} +inline bool RequestMsgIds_Parse( + const ::std::string& name, RequestMsgIds* value) { + return ::google::protobuf::internal::ParseNamedEnum( + RequestMsgIds_descriptor(), name, value); +} +enum ResponseMsgIds { + MsgId_ResponseChatLobbies = 1, + MsgId_ResponseSetLobbyNickname = 4, + MsgId_ResponseRegisterEvents = 5, + MsgId_ResponseSendMessage = 6, + MsgId_EventLobbyInvite = 101, + MsgId_EventChatMessage = 102 +}; +bool ResponseMsgIds_IsValid(int value); +const ResponseMsgIds ResponseMsgIds_MIN = MsgId_ResponseChatLobbies; +const ResponseMsgIds ResponseMsgIds_MAX = MsgId_EventChatMessage; +const int ResponseMsgIds_ARRAYSIZE = ResponseMsgIds_MAX + 1; + +const ::google::protobuf::EnumDescriptor* ResponseMsgIds_descriptor(); +inline const ::std::string& ResponseMsgIds_Name(ResponseMsgIds value) { + return ::google::protobuf::internal::NameOfEnum( + ResponseMsgIds_descriptor(), value); +} +inline bool ResponseMsgIds_Parse( + const ::std::string& name, ResponseMsgIds* value) { + return ::google::protobuf::internal::ParseNamedEnum( + ResponseMsgIds_descriptor(), name, value); +} +enum LobbyPrivacyLevel { + PRIVACY_PRIVATE = 1, + PRIVACY_PUBLIC = 2 +}; +bool LobbyPrivacyLevel_IsValid(int value); +const LobbyPrivacyLevel LobbyPrivacyLevel_MIN = PRIVACY_PRIVATE; +const LobbyPrivacyLevel LobbyPrivacyLevel_MAX = PRIVACY_PUBLIC; +const int LobbyPrivacyLevel_ARRAYSIZE = LobbyPrivacyLevel_MAX + 1; + +const ::google::protobuf::EnumDescriptor* LobbyPrivacyLevel_descriptor(); +inline const ::std::string& LobbyPrivacyLevel_Name(LobbyPrivacyLevel value) { + return ::google::protobuf::internal::NameOfEnum( + LobbyPrivacyLevel_descriptor(), value); +} +inline bool LobbyPrivacyLevel_Parse( + const ::std::string& name, LobbyPrivacyLevel* value) { + return ::google::protobuf::internal::ParseNamedEnum( + LobbyPrivacyLevel_descriptor(), name, value); +} +enum ChatType { + TYPE_PRIVATE = 1, + TYPE_LOBBY = 2, + TYPE_GROUP = 3 +}; +bool ChatType_IsValid(int value); +const ChatType ChatType_MIN = TYPE_PRIVATE; +const ChatType ChatType_MAX = TYPE_GROUP; +const int ChatType_ARRAYSIZE = ChatType_MAX + 1; + +const ::google::protobuf::EnumDescriptor* ChatType_descriptor(); +inline const ::std::string& ChatType_Name(ChatType value) { + return ::google::protobuf::internal::NameOfEnum( + ChatType_descriptor(), value); +} +inline bool ChatType_Parse( + const ::std::string& name, ChatType* value) { + return ::google::protobuf::internal::ParseNamedEnum( + ChatType_descriptor(), name, value); +} +// =================================================================== + +class ChatLobbyInfo : public ::google::protobuf::Message { + public: + ChatLobbyInfo(); + virtual ~ChatLobbyInfo(); + + ChatLobbyInfo(const ChatLobbyInfo& from); + + inline ChatLobbyInfo& operator=(const ChatLobbyInfo& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ChatLobbyInfo& default_instance(); + + void Swap(ChatLobbyInfo* other); + + // implements Message ---------------------------------------------- + + ChatLobbyInfo* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ChatLobbyInfo& from); + void MergeFrom(const ChatLobbyInfo& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef ChatLobbyInfo_LobbyState LobbyState; + static const LobbyState LOBBYSTATE_JOINED = ChatLobbyInfo_LobbyState_LOBBYSTATE_JOINED; + static const LobbyState LOBBYSTATE_INVITED = ChatLobbyInfo_LobbyState_LOBBYSTATE_INVITED; + static const LobbyState LOBBYSTATE_PUBLIC = ChatLobbyInfo_LobbyState_LOBBYSTATE_PUBLIC; + static inline bool LobbyState_IsValid(int value) { + return ChatLobbyInfo_LobbyState_IsValid(value); + } + static const LobbyState LobbyState_MIN = + ChatLobbyInfo_LobbyState_LobbyState_MIN; + static const LobbyState LobbyState_MAX = + ChatLobbyInfo_LobbyState_LobbyState_MAX; + static const int LobbyState_ARRAYSIZE = + ChatLobbyInfo_LobbyState_LobbyState_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + LobbyState_descriptor() { + return ChatLobbyInfo_LobbyState_descriptor(); + } + static inline const ::std::string& LobbyState_Name(LobbyState value) { + return ChatLobbyInfo_LobbyState_Name(value); + } + static inline bool LobbyState_Parse(const ::std::string& name, + LobbyState* value) { + return ChatLobbyInfo_LobbyState_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // required string lobby_id = 1; + inline bool has_lobby_id() const; + inline void clear_lobby_id(); + static const int kLobbyIdFieldNumber = 1; + inline const ::std::string& lobby_id() const; + inline void set_lobby_id(const ::std::string& value); + inline void set_lobby_id(const char* value); + inline void set_lobby_id(const char* value, size_t size); + inline ::std::string* mutable_lobby_id(); + inline ::std::string* release_lobby_id(); + + // required string lobby_topic = 2; + inline bool has_lobby_topic() const; + inline void clear_lobby_topic(); + static const int kLobbyTopicFieldNumber = 2; + inline const ::std::string& lobby_topic() const; + inline void set_lobby_topic(const ::std::string& value); + inline void set_lobby_topic(const char* value); + inline void set_lobby_topic(const char* value, size_t size); + inline ::std::string* mutable_lobby_topic(); + inline ::std::string* release_lobby_topic(); + + // required string lobby_name = 3; + inline bool has_lobby_name() const; + inline void clear_lobby_name(); + static const int kLobbyNameFieldNumber = 3; + inline const ::std::string& lobby_name() const; + inline void set_lobby_name(const ::std::string& value); + inline void set_lobby_name(const char* value); + inline void set_lobby_name(const char* value, size_t size); + inline ::std::string* mutable_lobby_name(); + inline ::std::string* release_lobby_name(); + + // required string lobby_nickname = 4; + inline bool has_lobby_nickname() const; + inline void clear_lobby_nickname(); + static const int kLobbyNicknameFieldNumber = 4; + inline const ::std::string& lobby_nickname() const; + inline void set_lobby_nickname(const ::std::string& value); + inline void set_lobby_nickname(const char* value); + inline void set_lobby_nickname(const char* value, size_t size); + inline ::std::string* mutable_lobby_nickname(); + inline ::std::string* release_lobby_nickname(); + + // required .rsctrl.chat.LobbyPrivacyLevel privacy_level = 5; + inline bool has_privacy_level() const; + inline void clear_privacy_level(); + static const int kPrivacyLevelFieldNumber = 5; + inline rsctrl::chat::LobbyPrivacyLevel privacy_level() const; + inline void set_privacy_level(rsctrl::chat::LobbyPrivacyLevel value); + + // required .rsctrl.chat.ChatLobbyInfo.LobbyState lobby_state = 6; + inline bool has_lobby_state() const; + inline void clear_lobby_state(); + static const int kLobbyStateFieldNumber = 6; + inline ::rsctrl::chat::ChatLobbyInfo_LobbyState lobby_state() const; + inline void set_lobby_state(::rsctrl::chat::ChatLobbyInfo_LobbyState value); + + // required uint32 no_peers = 7; + inline bool has_no_peers() const; + inline void clear_no_peers(); + static const int kNoPeersFieldNumber = 7; + inline ::google::protobuf::uint32 no_peers() const; + inline void set_no_peers(::google::protobuf::uint32 value); + + // required uint32 last_report_time = 8; + inline bool has_last_report_time() const; + inline void clear_last_report_time(); + static const int kLastReportTimeFieldNumber = 8; + inline ::google::protobuf::uint32 last_report_time() const; + inline void set_last_report_time(::google::protobuf::uint32 value); + + // required uint32 last_activity = 9; + inline bool has_last_activity() const; + inline void clear_last_activity(); + static const int kLastActivityFieldNumber = 9; + inline ::google::protobuf::uint32 last_activity() const; + inline void set_last_activity(::google::protobuf::uint32 value); + + // repeated string participating_friends = 10; + inline int participating_friends_size() const; + inline void clear_participating_friends(); + static const int kParticipatingFriendsFieldNumber = 10; + inline const ::std::string& participating_friends(int index) const; + inline ::std::string* mutable_participating_friends(int index); + inline void set_participating_friends(int index, const ::std::string& value); + inline void set_participating_friends(int index, const char* value); + inline void set_participating_friends(int index, const char* value, size_t size); + inline ::std::string* add_participating_friends(); + inline void add_participating_friends(const ::std::string& value); + inline void add_participating_friends(const char* value); + inline void add_participating_friends(const char* value, size_t size); + inline const ::google::protobuf::RepeatedPtrField< ::std::string>& participating_friends() const; + inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_participating_friends(); + + // repeated string nicknames = 11; + inline int nicknames_size() const; + inline void clear_nicknames(); + static const int kNicknamesFieldNumber = 11; + inline const ::std::string& nicknames(int index) const; + inline ::std::string* mutable_nicknames(int index); + inline void set_nicknames(int index, const ::std::string& value); + inline void set_nicknames(int index, const char* value); + inline void set_nicknames(int index, const char* value, size_t size); + inline ::std::string* add_nicknames(); + inline void add_nicknames(const ::std::string& value); + inline void add_nicknames(const char* value); + inline void add_nicknames(const char* value, size_t size); + inline const ::google::protobuf::RepeatedPtrField< ::std::string>& nicknames() const; + inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_nicknames(); + + // @@protoc_insertion_point(class_scope:rsctrl.chat.ChatLobbyInfo) + private: + inline void set_has_lobby_id(); + inline void clear_has_lobby_id(); + inline void set_has_lobby_topic(); + inline void clear_has_lobby_topic(); + inline void set_has_lobby_name(); + inline void clear_has_lobby_name(); + inline void set_has_lobby_nickname(); + inline void clear_has_lobby_nickname(); + inline void set_has_privacy_level(); + inline void clear_has_privacy_level(); + inline void set_has_lobby_state(); + inline void clear_has_lobby_state(); + inline void set_has_no_peers(); + inline void clear_has_no_peers(); + inline void set_has_last_report_time(); + inline void clear_has_last_report_time(); + inline void set_has_last_activity(); + inline void clear_has_last_activity(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* lobby_id_; + ::std::string* lobby_topic_; + ::std::string* lobby_name_; + ::std::string* lobby_nickname_; + int privacy_level_; + int lobby_state_; + ::google::protobuf::uint32 no_peers_; + ::google::protobuf::uint32 last_report_time_; + ::google::protobuf::RepeatedPtrField< ::std::string> participating_friends_; + ::google::protobuf::RepeatedPtrField< ::std::string> nicknames_; + ::google::protobuf::uint32 last_activity_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(11 + 31) / 32]; + + friend void protobuf_AddDesc_chat_2eproto(); + friend void protobuf_AssignDesc_chat_2eproto(); + friend void protobuf_ShutdownFile_chat_2eproto(); + + void InitAsDefaultInstance(); + static ChatLobbyInfo* default_instance_; +}; +// ------------------------------------------------------------------- + +class ChatId : public ::google::protobuf::Message { + public: + ChatId(); + virtual ~ChatId(); + + ChatId(const ChatId& from); + + inline ChatId& operator=(const ChatId& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ChatId& default_instance(); + + void Swap(ChatId* other); + + // implements Message ---------------------------------------------- + + ChatId* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ChatId& from); + void MergeFrom(const ChatId& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required .rsctrl.chat.ChatType chat_type = 1; + inline bool has_chat_type() const; + inline void clear_chat_type(); + static const int kChatTypeFieldNumber = 1; + inline rsctrl::chat::ChatType chat_type() const; + inline void set_chat_type(rsctrl::chat::ChatType value); + + // required string chat_id = 2; + inline bool has_chat_id() const; + inline void clear_chat_id(); + static const int kChatIdFieldNumber = 2; + inline const ::std::string& chat_id() const; + inline void set_chat_id(const ::std::string& value); + inline void set_chat_id(const char* value); + inline void set_chat_id(const char* value, size_t size); + inline ::std::string* mutable_chat_id(); + inline ::std::string* release_chat_id(); + + // @@protoc_insertion_point(class_scope:rsctrl.chat.ChatId) + private: + inline void set_has_chat_type(); + inline void clear_has_chat_type(); + inline void set_has_chat_id(); + inline void clear_has_chat_id(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* chat_id_; + int chat_type_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_chat_2eproto(); + friend void protobuf_AssignDesc_chat_2eproto(); + friend void protobuf_ShutdownFile_chat_2eproto(); + + void InitAsDefaultInstance(); + static ChatId* default_instance_; +}; +// ------------------------------------------------------------------- + +class ChatMessage : public ::google::protobuf::Message { + public: + ChatMessage(); + virtual ~ChatMessage(); + + ChatMessage(const ChatMessage& from); + + inline ChatMessage& operator=(const ChatMessage& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ChatMessage& default_instance(); + + void Swap(ChatMessage* other); + + // implements Message ---------------------------------------------- + + ChatMessage* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ChatMessage& from); + void MergeFrom(const ChatMessage& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required .rsctrl.chat.ChatId id = 1; + inline bool has_id() const; + inline void clear_id(); + static const int kIdFieldNumber = 1; + inline const ::rsctrl::chat::ChatId& id() const; + inline ::rsctrl::chat::ChatId* mutable_id(); + inline ::rsctrl::chat::ChatId* release_id(); + + // required string msg = 2; + inline bool has_msg() const; + inline void clear_msg(); + static const int kMsgFieldNumber = 2; + inline const ::std::string& msg() const; + inline void set_msg(const ::std::string& value); + inline void set_msg(const char* value); + inline void set_msg(const char* value, size_t size); + inline ::std::string* mutable_msg(); + inline ::std::string* release_msg(); + + // optional string peer_nickname = 3; + inline bool has_peer_nickname() const; + inline void clear_peer_nickname(); + static const int kPeerNicknameFieldNumber = 3; + inline const ::std::string& peer_nickname() const; + inline void set_peer_nickname(const ::std::string& value); + inline void set_peer_nickname(const char* value); + inline void set_peer_nickname(const char* value, size_t size); + inline ::std::string* mutable_peer_nickname(); + inline ::std::string* release_peer_nickname(); + + // optional uint32 chat_flags = 4; + inline bool has_chat_flags() const; + inline void clear_chat_flags(); + static const int kChatFlagsFieldNumber = 4; + inline ::google::protobuf::uint32 chat_flags() const; + inline void set_chat_flags(::google::protobuf::uint32 value); + + // optional uint32 send_time = 5; + inline bool has_send_time() const; + inline void clear_send_time(); + static const int kSendTimeFieldNumber = 5; + inline ::google::protobuf::uint32 send_time() const; + inline void set_send_time(::google::protobuf::uint32 value); + + // optional uint32 recv_time = 6; + inline bool has_recv_time() const; + inline void clear_recv_time(); + static const int kRecvTimeFieldNumber = 6; + inline ::google::protobuf::uint32 recv_time() const; + inline void set_recv_time(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:rsctrl.chat.ChatMessage) + private: + inline void set_has_id(); + inline void clear_has_id(); + inline void set_has_msg(); + inline void clear_has_msg(); + inline void set_has_peer_nickname(); + inline void clear_has_peer_nickname(); + inline void set_has_chat_flags(); + inline void clear_has_chat_flags(); + inline void set_has_send_time(); + inline void clear_has_send_time(); + inline void set_has_recv_time(); + inline void clear_has_recv_time(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::rsctrl::chat::ChatId* id_; + ::std::string* msg_; + ::std::string* peer_nickname_; + ::google::protobuf::uint32 chat_flags_; + ::google::protobuf::uint32 send_time_; + ::google::protobuf::uint32 recv_time_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(6 + 31) / 32]; + + friend void protobuf_AddDesc_chat_2eproto(); + friend void protobuf_AssignDesc_chat_2eproto(); + friend void protobuf_ShutdownFile_chat_2eproto(); + + void InitAsDefaultInstance(); + static ChatMessage* default_instance_; +}; +// ------------------------------------------------------------------- + +class ResponseChatLobbies : public ::google::protobuf::Message { + public: + ResponseChatLobbies(); + virtual ~ResponseChatLobbies(); + + ResponseChatLobbies(const ResponseChatLobbies& from); + + inline ResponseChatLobbies& operator=(const ResponseChatLobbies& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ResponseChatLobbies& default_instance(); + + void Swap(ResponseChatLobbies* other); + + // implements Message ---------------------------------------------- + + ResponseChatLobbies* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ResponseChatLobbies& from); + void MergeFrom(const ResponseChatLobbies& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required .rsctrl.core.Status status = 1; + inline bool has_status() const; + inline void clear_status(); + static const int kStatusFieldNumber = 1; + inline const ::rsctrl::core::Status& status() const; + inline ::rsctrl::core::Status* mutable_status(); + inline ::rsctrl::core::Status* release_status(); + + // repeated .rsctrl.chat.ChatLobbyInfo lobbies = 2; + inline int lobbies_size() const; + inline void clear_lobbies(); + static const int kLobbiesFieldNumber = 2; + inline const ::rsctrl::chat::ChatLobbyInfo& lobbies(int index) const; + inline ::rsctrl::chat::ChatLobbyInfo* mutable_lobbies(int index); + inline ::rsctrl::chat::ChatLobbyInfo* add_lobbies(); + inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::chat::ChatLobbyInfo >& + lobbies() const; + inline ::google::protobuf::RepeatedPtrField< ::rsctrl::chat::ChatLobbyInfo >* + mutable_lobbies(); + + // @@protoc_insertion_point(class_scope:rsctrl.chat.ResponseChatLobbies) + private: + inline void set_has_status(); + inline void clear_has_status(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::rsctrl::core::Status* status_; + ::google::protobuf::RepeatedPtrField< ::rsctrl::chat::ChatLobbyInfo > lobbies_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_chat_2eproto(); + friend void protobuf_AssignDesc_chat_2eproto(); + friend void protobuf_ShutdownFile_chat_2eproto(); + + void InitAsDefaultInstance(); + static ResponseChatLobbies* default_instance_; +}; +// ------------------------------------------------------------------- + +class RequestChatLobbies : public ::google::protobuf::Message { + public: + RequestChatLobbies(); + virtual ~RequestChatLobbies(); + + RequestChatLobbies(const RequestChatLobbies& from); + + inline RequestChatLobbies& operator=(const RequestChatLobbies& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const RequestChatLobbies& default_instance(); + + void Swap(RequestChatLobbies* other); + + // implements Message ---------------------------------------------- + + RequestChatLobbies* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const RequestChatLobbies& from); + void MergeFrom(const RequestChatLobbies& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef RequestChatLobbies_LobbySet LobbySet; + static const LobbySet LOBBYSET_ALL = RequestChatLobbies_LobbySet_LOBBYSET_ALL; + static const LobbySet LOBBYSET_JOINED = RequestChatLobbies_LobbySet_LOBBYSET_JOINED; + static const LobbySet LOBBYSET_INVITED = RequestChatLobbies_LobbySet_LOBBYSET_INVITED; + static const LobbySet LOBBYSET_PUBLIC = RequestChatLobbies_LobbySet_LOBBYSET_PUBLIC; + static inline bool LobbySet_IsValid(int value) { + return RequestChatLobbies_LobbySet_IsValid(value); + } + static const LobbySet LobbySet_MIN = + RequestChatLobbies_LobbySet_LobbySet_MIN; + static const LobbySet LobbySet_MAX = + RequestChatLobbies_LobbySet_LobbySet_MAX; + static const int LobbySet_ARRAYSIZE = + RequestChatLobbies_LobbySet_LobbySet_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + LobbySet_descriptor() { + return RequestChatLobbies_LobbySet_descriptor(); + } + static inline const ::std::string& LobbySet_Name(LobbySet value) { + return RequestChatLobbies_LobbySet_Name(value); + } + static inline bool LobbySet_Parse(const ::std::string& name, + LobbySet* value) { + return RequestChatLobbies_LobbySet_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // required .rsctrl.chat.RequestChatLobbies.LobbySet lobby_set = 1; + inline bool has_lobby_set() const; + inline void clear_lobby_set(); + static const int kLobbySetFieldNumber = 1; + inline ::rsctrl::chat::RequestChatLobbies_LobbySet lobby_set() const; + inline void set_lobby_set(::rsctrl::chat::RequestChatLobbies_LobbySet value); + + // @@protoc_insertion_point(class_scope:rsctrl.chat.RequestChatLobbies) + private: + inline void set_has_lobby_set(); + inline void clear_has_lobby_set(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + int lobby_set_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; + + friend void protobuf_AddDesc_chat_2eproto(); + friend void protobuf_AssignDesc_chat_2eproto(); + friend void protobuf_ShutdownFile_chat_2eproto(); + + void InitAsDefaultInstance(); + static RequestChatLobbies* default_instance_; +}; +// ------------------------------------------------------------------- + +class RequestCreateLobby : public ::google::protobuf::Message { + public: + RequestCreateLobby(); + virtual ~RequestCreateLobby(); + + RequestCreateLobby(const RequestCreateLobby& from); + + inline RequestCreateLobby& operator=(const RequestCreateLobby& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const RequestCreateLobby& default_instance(); + + void Swap(RequestCreateLobby* other); + + // implements Message ---------------------------------------------- + + RequestCreateLobby* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const RequestCreateLobby& from); + void MergeFrom(const RequestCreateLobby& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required string lobby_name = 1; + inline bool has_lobby_name() const; + inline void clear_lobby_name(); + static const int kLobbyNameFieldNumber = 1; + inline const ::std::string& lobby_name() const; + inline void set_lobby_name(const ::std::string& value); + inline void set_lobby_name(const char* value); + inline void set_lobby_name(const char* value, size_t size); + inline ::std::string* mutable_lobby_name(); + inline ::std::string* release_lobby_name(); + + // required string lobby_topic = 2; + inline bool has_lobby_topic() const; + inline void clear_lobby_topic(); + static const int kLobbyTopicFieldNumber = 2; + inline const ::std::string& lobby_topic() const; + inline void set_lobby_topic(const ::std::string& value); + inline void set_lobby_topic(const char* value); + inline void set_lobby_topic(const char* value, size_t size); + inline ::std::string* mutable_lobby_topic(); + inline ::std::string* release_lobby_topic(); + + // required .rsctrl.chat.LobbyPrivacyLevel privacy_level = 4; + inline bool has_privacy_level() const; + inline void clear_privacy_level(); + static const int kPrivacyLevelFieldNumber = 4; + inline rsctrl::chat::LobbyPrivacyLevel privacy_level() const; + inline void set_privacy_level(rsctrl::chat::LobbyPrivacyLevel value); + + // repeated string invited_friends = 3; + inline int invited_friends_size() const; + inline void clear_invited_friends(); + static const int kInvitedFriendsFieldNumber = 3; + inline const ::std::string& invited_friends(int index) const; + inline ::std::string* mutable_invited_friends(int index); + inline void set_invited_friends(int index, const ::std::string& value); + inline void set_invited_friends(int index, const char* value); + inline void set_invited_friends(int index, const char* value, size_t size); + inline ::std::string* add_invited_friends(); + inline void add_invited_friends(const ::std::string& value); + inline void add_invited_friends(const char* value); + inline void add_invited_friends(const char* value, size_t size); + inline const ::google::protobuf::RepeatedPtrField< ::std::string>& invited_friends() const; + inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_invited_friends(); + + // @@protoc_insertion_point(class_scope:rsctrl.chat.RequestCreateLobby) + private: + inline void set_has_lobby_name(); + inline void clear_has_lobby_name(); + inline void set_has_lobby_topic(); + inline void clear_has_lobby_topic(); + inline void set_has_privacy_level(); + inline void clear_has_privacy_level(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* lobby_name_; + ::std::string* lobby_topic_; + ::google::protobuf::RepeatedPtrField< ::std::string> invited_friends_; + int privacy_level_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; + + friend void protobuf_AddDesc_chat_2eproto(); + friend void protobuf_AssignDesc_chat_2eproto(); + friend void protobuf_ShutdownFile_chat_2eproto(); + + void InitAsDefaultInstance(); + static RequestCreateLobby* default_instance_; +}; +// ------------------------------------------------------------------- + +class RequestJoinOrLeaveLobby : public ::google::protobuf::Message { + public: + RequestJoinOrLeaveLobby(); + virtual ~RequestJoinOrLeaveLobby(); + + RequestJoinOrLeaveLobby(const RequestJoinOrLeaveLobby& from); + + inline RequestJoinOrLeaveLobby& operator=(const RequestJoinOrLeaveLobby& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const RequestJoinOrLeaveLobby& default_instance(); + + void Swap(RequestJoinOrLeaveLobby* other); + + // implements Message ---------------------------------------------- + + RequestJoinOrLeaveLobby* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const RequestJoinOrLeaveLobby& from); + void MergeFrom(const RequestJoinOrLeaveLobby& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef RequestJoinOrLeaveLobby_LobbyAction LobbyAction; + static const LobbyAction JOIN_OR_ACCEPT = RequestJoinOrLeaveLobby_LobbyAction_JOIN_OR_ACCEPT; + static const LobbyAction LEAVE_OR_DENY = RequestJoinOrLeaveLobby_LobbyAction_LEAVE_OR_DENY; + static inline bool LobbyAction_IsValid(int value) { + return RequestJoinOrLeaveLobby_LobbyAction_IsValid(value); + } + static const LobbyAction LobbyAction_MIN = + RequestJoinOrLeaveLobby_LobbyAction_LobbyAction_MIN; + static const LobbyAction LobbyAction_MAX = + RequestJoinOrLeaveLobby_LobbyAction_LobbyAction_MAX; + static const int LobbyAction_ARRAYSIZE = + RequestJoinOrLeaveLobby_LobbyAction_LobbyAction_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + LobbyAction_descriptor() { + return RequestJoinOrLeaveLobby_LobbyAction_descriptor(); + } + static inline const ::std::string& LobbyAction_Name(LobbyAction value) { + return RequestJoinOrLeaveLobby_LobbyAction_Name(value); + } + static inline bool LobbyAction_Parse(const ::std::string& name, + LobbyAction* value) { + return RequestJoinOrLeaveLobby_LobbyAction_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // required string lobby_id = 1; + inline bool has_lobby_id() const; + inline void clear_lobby_id(); + static const int kLobbyIdFieldNumber = 1; + inline const ::std::string& lobby_id() const; + inline void set_lobby_id(const ::std::string& value); + inline void set_lobby_id(const char* value); + inline void set_lobby_id(const char* value, size_t size); + inline ::std::string* mutable_lobby_id(); + inline ::std::string* release_lobby_id(); + + // required .rsctrl.chat.RequestJoinOrLeaveLobby.LobbyAction action = 2; + inline bool has_action() const; + inline void clear_action(); + static const int kActionFieldNumber = 2; + inline ::rsctrl::chat::RequestJoinOrLeaveLobby_LobbyAction action() const; + inline void set_action(::rsctrl::chat::RequestJoinOrLeaveLobby_LobbyAction value); + + // @@protoc_insertion_point(class_scope:rsctrl.chat.RequestJoinOrLeaveLobby) + private: + inline void set_has_lobby_id(); + inline void clear_has_lobby_id(); + inline void set_has_action(); + inline void clear_has_action(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* lobby_id_; + int action_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_chat_2eproto(); + friend void protobuf_AssignDesc_chat_2eproto(); + friend void protobuf_ShutdownFile_chat_2eproto(); + + void InitAsDefaultInstance(); + static RequestJoinOrLeaveLobby* default_instance_; +}; +// ------------------------------------------------------------------- + +class RequestSetLobbyNickname : public ::google::protobuf::Message { + public: + RequestSetLobbyNickname(); + virtual ~RequestSetLobbyNickname(); + + RequestSetLobbyNickname(const RequestSetLobbyNickname& from); + + inline RequestSetLobbyNickname& operator=(const RequestSetLobbyNickname& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const RequestSetLobbyNickname& default_instance(); + + void Swap(RequestSetLobbyNickname* other); + + // implements Message ---------------------------------------------- + + RequestSetLobbyNickname* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const RequestSetLobbyNickname& from); + void MergeFrom(const RequestSetLobbyNickname& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required string nickname = 1; + inline bool has_nickname() const; + inline void clear_nickname(); + static const int kNicknameFieldNumber = 1; + inline const ::std::string& nickname() const; + inline void set_nickname(const ::std::string& value); + inline void set_nickname(const char* value); + inline void set_nickname(const char* value, size_t size); + inline ::std::string* mutable_nickname(); + inline ::std::string* release_nickname(); + + // repeated string lobby_ids = 2; + inline int lobby_ids_size() const; + inline void clear_lobby_ids(); + static const int kLobbyIdsFieldNumber = 2; + inline const ::std::string& lobby_ids(int index) const; + inline ::std::string* mutable_lobby_ids(int index); + inline void set_lobby_ids(int index, const ::std::string& value); + inline void set_lobby_ids(int index, const char* value); + inline void set_lobby_ids(int index, const char* value, size_t size); + inline ::std::string* add_lobby_ids(); + inline void add_lobby_ids(const ::std::string& value); + inline void add_lobby_ids(const char* value); + inline void add_lobby_ids(const char* value, size_t size); + inline const ::google::protobuf::RepeatedPtrField< ::std::string>& lobby_ids() const; + inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_lobby_ids(); + + // @@protoc_insertion_point(class_scope:rsctrl.chat.RequestSetLobbyNickname) + private: + inline void set_has_nickname(); + inline void clear_has_nickname(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::std::string* nickname_; + ::google::protobuf::RepeatedPtrField< ::std::string> lobby_ids_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_chat_2eproto(); + friend void protobuf_AssignDesc_chat_2eproto(); + friend void protobuf_ShutdownFile_chat_2eproto(); + + void InitAsDefaultInstance(); + static RequestSetLobbyNickname* default_instance_; +}; +// ------------------------------------------------------------------- + +class ResponseSetLobbyNickname : public ::google::protobuf::Message { + public: + ResponseSetLobbyNickname(); + virtual ~ResponseSetLobbyNickname(); + + ResponseSetLobbyNickname(const ResponseSetLobbyNickname& from); + + inline ResponseSetLobbyNickname& operator=(const ResponseSetLobbyNickname& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ResponseSetLobbyNickname& default_instance(); + + void Swap(ResponseSetLobbyNickname* other); + + // implements Message ---------------------------------------------- + + ResponseSetLobbyNickname* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ResponseSetLobbyNickname& from); + void MergeFrom(const ResponseSetLobbyNickname& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required .rsctrl.core.Status status = 1; + inline bool has_status() const; + inline void clear_status(); + static const int kStatusFieldNumber = 1; + inline const ::rsctrl::core::Status& status() const; + inline ::rsctrl::core::Status* mutable_status(); + inline ::rsctrl::core::Status* release_status(); + + // @@protoc_insertion_point(class_scope:rsctrl.chat.ResponseSetLobbyNickname) + private: + inline void set_has_status(); + inline void clear_has_status(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::rsctrl::core::Status* status_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; + + friend void protobuf_AddDesc_chat_2eproto(); + friend void protobuf_AssignDesc_chat_2eproto(); + friend void protobuf_ShutdownFile_chat_2eproto(); + + void InitAsDefaultInstance(); + static ResponseSetLobbyNickname* default_instance_; +}; +// ------------------------------------------------------------------- + +class RequestRegisterEvents : public ::google::protobuf::Message { + public: + RequestRegisterEvents(); + virtual ~RequestRegisterEvents(); + + RequestRegisterEvents(const RequestRegisterEvents& from); + + inline RequestRegisterEvents& operator=(const RequestRegisterEvents& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const RequestRegisterEvents& default_instance(); + + void Swap(RequestRegisterEvents* other); + + // implements Message ---------------------------------------------- + + RequestRegisterEvents* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const RequestRegisterEvents& from); + void MergeFrom(const RequestRegisterEvents& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef RequestRegisterEvents_RegisterAction RegisterAction; + static const RegisterAction REGISTER = RequestRegisterEvents_RegisterAction_REGISTER; + static const RegisterAction DEREGISTER = RequestRegisterEvents_RegisterAction_DEREGISTER; + static inline bool RegisterAction_IsValid(int value) { + return RequestRegisterEvents_RegisterAction_IsValid(value); + } + static const RegisterAction RegisterAction_MIN = + RequestRegisterEvents_RegisterAction_RegisterAction_MIN; + static const RegisterAction RegisterAction_MAX = + RequestRegisterEvents_RegisterAction_RegisterAction_MAX; + static const int RegisterAction_ARRAYSIZE = + RequestRegisterEvents_RegisterAction_RegisterAction_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + RegisterAction_descriptor() { + return RequestRegisterEvents_RegisterAction_descriptor(); + } + static inline const ::std::string& RegisterAction_Name(RegisterAction value) { + return RequestRegisterEvents_RegisterAction_Name(value); + } + static inline bool RegisterAction_Parse(const ::std::string& name, + RegisterAction* value) { + return RequestRegisterEvents_RegisterAction_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // required .rsctrl.chat.RequestRegisterEvents.RegisterAction action = 1; + inline bool has_action() const; + inline void clear_action(); + static const int kActionFieldNumber = 1; + inline ::rsctrl::chat::RequestRegisterEvents_RegisterAction action() const; + inline void set_action(::rsctrl::chat::RequestRegisterEvents_RegisterAction value); + + // @@protoc_insertion_point(class_scope:rsctrl.chat.RequestRegisterEvents) + private: + inline void set_has_action(); + inline void clear_has_action(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + int action_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; + + friend void protobuf_AddDesc_chat_2eproto(); + friend void protobuf_AssignDesc_chat_2eproto(); + friend void protobuf_ShutdownFile_chat_2eproto(); + + void InitAsDefaultInstance(); + static RequestRegisterEvents* default_instance_; +}; +// ------------------------------------------------------------------- + +class ResponseRegisterEvents : public ::google::protobuf::Message { + public: + ResponseRegisterEvents(); + virtual ~ResponseRegisterEvents(); + + ResponseRegisterEvents(const ResponseRegisterEvents& from); + + inline ResponseRegisterEvents& operator=(const ResponseRegisterEvents& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ResponseRegisterEvents& default_instance(); + + void Swap(ResponseRegisterEvents* other); + + // implements Message ---------------------------------------------- + + ResponseRegisterEvents* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ResponseRegisterEvents& from); + void MergeFrom(const ResponseRegisterEvents& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required .rsctrl.core.Status status = 1; + inline bool has_status() const; + inline void clear_status(); + static const int kStatusFieldNumber = 1; + inline const ::rsctrl::core::Status& status() const; + inline ::rsctrl::core::Status* mutable_status(); + inline ::rsctrl::core::Status* release_status(); + + // @@protoc_insertion_point(class_scope:rsctrl.chat.ResponseRegisterEvents) + private: + inline void set_has_status(); + inline void clear_has_status(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::rsctrl::core::Status* status_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; + + friend void protobuf_AddDesc_chat_2eproto(); + friend void protobuf_AssignDesc_chat_2eproto(); + friend void protobuf_ShutdownFile_chat_2eproto(); + + void InitAsDefaultInstance(); + static ResponseRegisterEvents* default_instance_; +}; +// ------------------------------------------------------------------- + +class EventLobbyInvite : public ::google::protobuf::Message { + public: + EventLobbyInvite(); + virtual ~EventLobbyInvite(); + + EventLobbyInvite(const EventLobbyInvite& from); + + inline EventLobbyInvite& operator=(const EventLobbyInvite& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const EventLobbyInvite& default_instance(); + + void Swap(EventLobbyInvite* other); + + // implements Message ---------------------------------------------- + + EventLobbyInvite* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const EventLobbyInvite& from); + void MergeFrom(const EventLobbyInvite& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required .rsctrl.chat.ChatLobbyInfo lobby = 1; + inline bool has_lobby() const; + inline void clear_lobby(); + static const int kLobbyFieldNumber = 1; + inline const ::rsctrl::chat::ChatLobbyInfo& lobby() const; + inline ::rsctrl::chat::ChatLobbyInfo* mutable_lobby(); + inline ::rsctrl::chat::ChatLobbyInfo* release_lobby(); + + // @@protoc_insertion_point(class_scope:rsctrl.chat.EventLobbyInvite) + private: + inline void set_has_lobby(); + inline void clear_has_lobby(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::rsctrl::chat::ChatLobbyInfo* lobby_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; + + friend void protobuf_AddDesc_chat_2eproto(); + friend void protobuf_AssignDesc_chat_2eproto(); + friend void protobuf_ShutdownFile_chat_2eproto(); + + void InitAsDefaultInstance(); + static EventLobbyInvite* default_instance_; +}; +// ------------------------------------------------------------------- + +class EventChatMessage : public ::google::protobuf::Message { + public: + EventChatMessage(); + virtual ~EventChatMessage(); + + EventChatMessage(const EventChatMessage& from); + + inline EventChatMessage& operator=(const EventChatMessage& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const EventChatMessage& default_instance(); + + void Swap(EventChatMessage* other); + + // implements Message ---------------------------------------------- + + EventChatMessage* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const EventChatMessage& from); + void MergeFrom(const EventChatMessage& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required .rsctrl.chat.ChatMessage msg = 1; + inline bool has_msg() const; + inline void clear_msg(); + static const int kMsgFieldNumber = 1; + inline const ::rsctrl::chat::ChatMessage& msg() const; + inline ::rsctrl::chat::ChatMessage* mutable_msg(); + inline ::rsctrl::chat::ChatMessage* release_msg(); + + // @@protoc_insertion_point(class_scope:rsctrl.chat.EventChatMessage) + private: + inline void set_has_msg(); + inline void clear_has_msg(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::rsctrl::chat::ChatMessage* msg_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; + + friend void protobuf_AddDesc_chat_2eproto(); + friend void protobuf_AssignDesc_chat_2eproto(); + friend void protobuf_ShutdownFile_chat_2eproto(); + + void InitAsDefaultInstance(); + static EventChatMessage* default_instance_; +}; +// ------------------------------------------------------------------- + +class RequestSendMessage : public ::google::protobuf::Message { + public: + RequestSendMessage(); + virtual ~RequestSendMessage(); + + RequestSendMessage(const RequestSendMessage& from); + + inline RequestSendMessage& operator=(const RequestSendMessage& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const RequestSendMessage& default_instance(); + + void Swap(RequestSendMessage* other); + + // implements Message ---------------------------------------------- + + RequestSendMessage* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const RequestSendMessage& from); + void MergeFrom(const RequestSendMessage& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required .rsctrl.chat.ChatMessage msg = 1; + inline bool has_msg() const; + inline void clear_msg(); + static const int kMsgFieldNumber = 1; + inline const ::rsctrl::chat::ChatMessage& msg() const; + inline ::rsctrl::chat::ChatMessage* mutable_msg(); + inline ::rsctrl::chat::ChatMessage* release_msg(); + + // @@protoc_insertion_point(class_scope:rsctrl.chat.RequestSendMessage) + private: + inline void set_has_msg(); + inline void clear_has_msg(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::rsctrl::chat::ChatMessage* msg_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; + + friend void protobuf_AddDesc_chat_2eproto(); + friend void protobuf_AssignDesc_chat_2eproto(); + friend void protobuf_ShutdownFile_chat_2eproto(); + + void InitAsDefaultInstance(); + static RequestSendMessage* default_instance_; +}; +// ------------------------------------------------------------------- + +class ResponseSendMessage : public ::google::protobuf::Message { + public: + ResponseSendMessage(); + virtual ~ResponseSendMessage(); + + ResponseSendMessage(const ResponseSendMessage& from); + + inline ResponseSendMessage& operator=(const ResponseSendMessage& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ResponseSendMessage& default_instance(); + + void Swap(ResponseSendMessage* other); + + // implements Message ---------------------------------------------- + + ResponseSendMessage* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ResponseSendMessage& from); + void MergeFrom(const ResponseSendMessage& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required .rsctrl.core.Status status = 1; + inline bool has_status() const; + inline void clear_status(); + static const int kStatusFieldNumber = 1; + inline const ::rsctrl::core::Status& status() const; + inline ::rsctrl::core::Status* mutable_status(); + inline ::rsctrl::core::Status* release_status(); + + // @@protoc_insertion_point(class_scope:rsctrl.chat.ResponseSendMessage) + private: + inline void set_has_status(); + inline void clear_has_status(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::rsctrl::core::Status* status_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; + + friend void protobuf_AddDesc_chat_2eproto(); + friend void protobuf_AssignDesc_chat_2eproto(); + friend void protobuf_ShutdownFile_chat_2eproto(); + + void InitAsDefaultInstance(); + static ResponseSendMessage* default_instance_; +}; +// =================================================================== + + +// =================================================================== + +// ChatLobbyInfo + +// required string lobby_id = 1; +inline bool ChatLobbyInfo::has_lobby_id() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void ChatLobbyInfo::set_has_lobby_id() { + _has_bits_[0] |= 0x00000001u; +} +inline void ChatLobbyInfo::clear_has_lobby_id() { + _has_bits_[0] &= ~0x00000001u; +} +inline void ChatLobbyInfo::clear_lobby_id() { + if (lobby_id_ != &::google::protobuf::internal::kEmptyString) { + lobby_id_->clear(); + } + clear_has_lobby_id(); +} +inline const ::std::string& ChatLobbyInfo::lobby_id() const { + return *lobby_id_; +} +inline void ChatLobbyInfo::set_lobby_id(const ::std::string& value) { + set_has_lobby_id(); + if (lobby_id_ == &::google::protobuf::internal::kEmptyString) { + lobby_id_ = new ::std::string; + } + lobby_id_->assign(value); +} +inline void ChatLobbyInfo::set_lobby_id(const char* value) { + set_has_lobby_id(); + if (lobby_id_ == &::google::protobuf::internal::kEmptyString) { + lobby_id_ = new ::std::string; + } + lobby_id_->assign(value); +} +inline void ChatLobbyInfo::set_lobby_id(const char* value, size_t size) { + set_has_lobby_id(); + if (lobby_id_ == &::google::protobuf::internal::kEmptyString) { + lobby_id_ = new ::std::string; + } + lobby_id_->assign(reinterpret_cast(value), size); +} +inline ::std::string* ChatLobbyInfo::mutable_lobby_id() { + set_has_lobby_id(); + if (lobby_id_ == &::google::protobuf::internal::kEmptyString) { + lobby_id_ = new ::std::string; + } + return lobby_id_; +} +inline ::std::string* ChatLobbyInfo::release_lobby_id() { + clear_has_lobby_id(); + if (lobby_id_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = lobby_id_; + lobby_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// required string lobby_topic = 2; +inline bool ChatLobbyInfo::has_lobby_topic() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void ChatLobbyInfo::set_has_lobby_topic() { + _has_bits_[0] |= 0x00000002u; +} +inline void ChatLobbyInfo::clear_has_lobby_topic() { + _has_bits_[0] &= ~0x00000002u; +} +inline void ChatLobbyInfo::clear_lobby_topic() { + if (lobby_topic_ != &::google::protobuf::internal::kEmptyString) { + lobby_topic_->clear(); + } + clear_has_lobby_topic(); +} +inline const ::std::string& ChatLobbyInfo::lobby_topic() const { + return *lobby_topic_; +} +inline void ChatLobbyInfo::set_lobby_topic(const ::std::string& value) { + set_has_lobby_topic(); + if (lobby_topic_ == &::google::protobuf::internal::kEmptyString) { + lobby_topic_ = new ::std::string; + } + lobby_topic_->assign(value); +} +inline void ChatLobbyInfo::set_lobby_topic(const char* value) { + set_has_lobby_topic(); + if (lobby_topic_ == &::google::protobuf::internal::kEmptyString) { + lobby_topic_ = new ::std::string; + } + lobby_topic_->assign(value); +} +inline void ChatLobbyInfo::set_lobby_topic(const char* value, size_t size) { + set_has_lobby_topic(); + if (lobby_topic_ == &::google::protobuf::internal::kEmptyString) { + lobby_topic_ = new ::std::string; + } + lobby_topic_->assign(reinterpret_cast(value), size); +} +inline ::std::string* ChatLobbyInfo::mutable_lobby_topic() { + set_has_lobby_topic(); + if (lobby_topic_ == &::google::protobuf::internal::kEmptyString) { + lobby_topic_ = new ::std::string; + } + return lobby_topic_; +} +inline ::std::string* ChatLobbyInfo::release_lobby_topic() { + clear_has_lobby_topic(); + if (lobby_topic_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = lobby_topic_; + lobby_topic_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// required string lobby_name = 3; +inline bool ChatLobbyInfo::has_lobby_name() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void ChatLobbyInfo::set_has_lobby_name() { + _has_bits_[0] |= 0x00000004u; +} +inline void ChatLobbyInfo::clear_has_lobby_name() { + _has_bits_[0] &= ~0x00000004u; +} +inline void ChatLobbyInfo::clear_lobby_name() { + if (lobby_name_ != &::google::protobuf::internal::kEmptyString) { + lobby_name_->clear(); + } + clear_has_lobby_name(); +} +inline const ::std::string& ChatLobbyInfo::lobby_name() const { + return *lobby_name_; +} +inline void ChatLobbyInfo::set_lobby_name(const ::std::string& value) { + set_has_lobby_name(); + if (lobby_name_ == &::google::protobuf::internal::kEmptyString) { + lobby_name_ = new ::std::string; + } + lobby_name_->assign(value); +} +inline void ChatLobbyInfo::set_lobby_name(const char* value) { + set_has_lobby_name(); + if (lobby_name_ == &::google::protobuf::internal::kEmptyString) { + lobby_name_ = new ::std::string; + } + lobby_name_->assign(value); +} +inline void ChatLobbyInfo::set_lobby_name(const char* value, size_t size) { + set_has_lobby_name(); + if (lobby_name_ == &::google::protobuf::internal::kEmptyString) { + lobby_name_ = new ::std::string; + } + lobby_name_->assign(reinterpret_cast(value), size); +} +inline ::std::string* ChatLobbyInfo::mutable_lobby_name() { + set_has_lobby_name(); + if (lobby_name_ == &::google::protobuf::internal::kEmptyString) { + lobby_name_ = new ::std::string; + } + return lobby_name_; +} +inline ::std::string* ChatLobbyInfo::release_lobby_name() { + clear_has_lobby_name(); + if (lobby_name_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = lobby_name_; + lobby_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// required string lobby_nickname = 4; +inline bool ChatLobbyInfo::has_lobby_nickname() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void ChatLobbyInfo::set_has_lobby_nickname() { + _has_bits_[0] |= 0x00000008u; +} +inline void ChatLobbyInfo::clear_has_lobby_nickname() { + _has_bits_[0] &= ~0x00000008u; +} +inline void ChatLobbyInfo::clear_lobby_nickname() { + if (lobby_nickname_ != &::google::protobuf::internal::kEmptyString) { + lobby_nickname_->clear(); + } + clear_has_lobby_nickname(); +} +inline const ::std::string& ChatLobbyInfo::lobby_nickname() const { + return *lobby_nickname_; +} +inline void ChatLobbyInfo::set_lobby_nickname(const ::std::string& value) { + set_has_lobby_nickname(); + if (lobby_nickname_ == &::google::protobuf::internal::kEmptyString) { + lobby_nickname_ = new ::std::string; + } + lobby_nickname_->assign(value); +} +inline void ChatLobbyInfo::set_lobby_nickname(const char* value) { + set_has_lobby_nickname(); + if (lobby_nickname_ == &::google::protobuf::internal::kEmptyString) { + lobby_nickname_ = new ::std::string; + } + lobby_nickname_->assign(value); +} +inline void ChatLobbyInfo::set_lobby_nickname(const char* value, size_t size) { + set_has_lobby_nickname(); + if (lobby_nickname_ == &::google::protobuf::internal::kEmptyString) { + lobby_nickname_ = new ::std::string; + } + lobby_nickname_->assign(reinterpret_cast(value), size); +} +inline ::std::string* ChatLobbyInfo::mutable_lobby_nickname() { + set_has_lobby_nickname(); + if (lobby_nickname_ == &::google::protobuf::internal::kEmptyString) { + lobby_nickname_ = new ::std::string; + } + return lobby_nickname_; +} +inline ::std::string* ChatLobbyInfo::release_lobby_nickname() { + clear_has_lobby_nickname(); + if (lobby_nickname_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = lobby_nickname_; + lobby_nickname_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// required .rsctrl.chat.LobbyPrivacyLevel privacy_level = 5; +inline bool ChatLobbyInfo::has_privacy_level() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +inline void ChatLobbyInfo::set_has_privacy_level() { + _has_bits_[0] |= 0x00000010u; +} +inline void ChatLobbyInfo::clear_has_privacy_level() { + _has_bits_[0] &= ~0x00000010u; +} +inline void ChatLobbyInfo::clear_privacy_level() { + privacy_level_ = 1; + clear_has_privacy_level(); +} +inline rsctrl::chat::LobbyPrivacyLevel ChatLobbyInfo::privacy_level() const { + return static_cast< rsctrl::chat::LobbyPrivacyLevel >(privacy_level_); +} +inline void ChatLobbyInfo::set_privacy_level(rsctrl::chat::LobbyPrivacyLevel value) { + GOOGLE_DCHECK(rsctrl::chat::LobbyPrivacyLevel_IsValid(value)); + set_has_privacy_level(); + privacy_level_ = value; +} + +// required .rsctrl.chat.ChatLobbyInfo.LobbyState lobby_state = 6; +inline bool ChatLobbyInfo::has_lobby_state() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +inline void ChatLobbyInfo::set_has_lobby_state() { + _has_bits_[0] |= 0x00000020u; +} +inline void ChatLobbyInfo::clear_has_lobby_state() { + _has_bits_[0] &= ~0x00000020u; +} +inline void ChatLobbyInfo::clear_lobby_state() { + lobby_state_ = 1; + clear_has_lobby_state(); +} +inline ::rsctrl::chat::ChatLobbyInfo_LobbyState ChatLobbyInfo::lobby_state() const { + return static_cast< ::rsctrl::chat::ChatLobbyInfo_LobbyState >(lobby_state_); +} +inline void ChatLobbyInfo::set_lobby_state(::rsctrl::chat::ChatLobbyInfo_LobbyState value) { + GOOGLE_DCHECK(::rsctrl::chat::ChatLobbyInfo_LobbyState_IsValid(value)); + set_has_lobby_state(); + lobby_state_ = value; +} + +// required uint32 no_peers = 7; +inline bool ChatLobbyInfo::has_no_peers() const { + return (_has_bits_[0] & 0x00000040u) != 0; +} +inline void ChatLobbyInfo::set_has_no_peers() { + _has_bits_[0] |= 0x00000040u; +} +inline void ChatLobbyInfo::clear_has_no_peers() { + _has_bits_[0] &= ~0x00000040u; +} +inline void ChatLobbyInfo::clear_no_peers() { + no_peers_ = 0u; + clear_has_no_peers(); +} +inline ::google::protobuf::uint32 ChatLobbyInfo::no_peers() const { + return no_peers_; +} +inline void ChatLobbyInfo::set_no_peers(::google::protobuf::uint32 value) { + set_has_no_peers(); + no_peers_ = value; +} + +// required uint32 last_report_time = 8; +inline bool ChatLobbyInfo::has_last_report_time() const { + return (_has_bits_[0] & 0x00000080u) != 0; +} +inline void ChatLobbyInfo::set_has_last_report_time() { + _has_bits_[0] |= 0x00000080u; +} +inline void ChatLobbyInfo::clear_has_last_report_time() { + _has_bits_[0] &= ~0x00000080u; +} +inline void ChatLobbyInfo::clear_last_report_time() { + last_report_time_ = 0u; + clear_has_last_report_time(); +} +inline ::google::protobuf::uint32 ChatLobbyInfo::last_report_time() const { + return last_report_time_; +} +inline void ChatLobbyInfo::set_last_report_time(::google::protobuf::uint32 value) { + set_has_last_report_time(); + last_report_time_ = value; +} + +// required uint32 last_activity = 9; +inline bool ChatLobbyInfo::has_last_activity() const { + return (_has_bits_[0] & 0x00000100u) != 0; +} +inline void ChatLobbyInfo::set_has_last_activity() { + _has_bits_[0] |= 0x00000100u; +} +inline void ChatLobbyInfo::clear_has_last_activity() { + _has_bits_[0] &= ~0x00000100u; +} +inline void ChatLobbyInfo::clear_last_activity() { + last_activity_ = 0u; + clear_has_last_activity(); +} +inline ::google::protobuf::uint32 ChatLobbyInfo::last_activity() const { + return last_activity_; +} +inline void ChatLobbyInfo::set_last_activity(::google::protobuf::uint32 value) { + set_has_last_activity(); + last_activity_ = value; +} + +// repeated string participating_friends = 10; +inline int ChatLobbyInfo::participating_friends_size() const { + return participating_friends_.size(); +} +inline void ChatLobbyInfo::clear_participating_friends() { + participating_friends_.Clear(); +} +inline const ::std::string& ChatLobbyInfo::participating_friends(int index) const { + return participating_friends_.Get(index); +} +inline ::std::string* ChatLobbyInfo::mutable_participating_friends(int index) { + return participating_friends_.Mutable(index); +} +inline void ChatLobbyInfo::set_participating_friends(int index, const ::std::string& value) { + participating_friends_.Mutable(index)->assign(value); +} +inline void ChatLobbyInfo::set_participating_friends(int index, const char* value) { + participating_friends_.Mutable(index)->assign(value); +} +inline void ChatLobbyInfo::set_participating_friends(int index, const char* value, size_t size) { + participating_friends_.Mutable(index)->assign( + reinterpret_cast(value), size); +} +inline ::std::string* ChatLobbyInfo::add_participating_friends() { + return participating_friends_.Add(); +} +inline void ChatLobbyInfo::add_participating_friends(const ::std::string& value) { + participating_friends_.Add()->assign(value); +} +inline void ChatLobbyInfo::add_participating_friends(const char* value) { + participating_friends_.Add()->assign(value); +} +inline void ChatLobbyInfo::add_participating_friends(const char* value, size_t size) { + participating_friends_.Add()->assign(reinterpret_cast(value), size); +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +ChatLobbyInfo::participating_friends() const { + return participating_friends_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +ChatLobbyInfo::mutable_participating_friends() { + return &participating_friends_; +} + +// repeated string nicknames = 11; +inline int ChatLobbyInfo::nicknames_size() const { + return nicknames_.size(); +} +inline void ChatLobbyInfo::clear_nicknames() { + nicknames_.Clear(); +} +inline const ::std::string& ChatLobbyInfo::nicknames(int index) const { + return nicknames_.Get(index); +} +inline ::std::string* ChatLobbyInfo::mutable_nicknames(int index) { + return nicknames_.Mutable(index); +} +inline void ChatLobbyInfo::set_nicknames(int index, const ::std::string& value) { + nicknames_.Mutable(index)->assign(value); +} +inline void ChatLobbyInfo::set_nicknames(int index, const char* value) { + nicknames_.Mutable(index)->assign(value); +} +inline void ChatLobbyInfo::set_nicknames(int index, const char* value, size_t size) { + nicknames_.Mutable(index)->assign( + reinterpret_cast(value), size); +} +inline ::std::string* ChatLobbyInfo::add_nicknames() { + return nicknames_.Add(); +} +inline void ChatLobbyInfo::add_nicknames(const ::std::string& value) { + nicknames_.Add()->assign(value); +} +inline void ChatLobbyInfo::add_nicknames(const char* value) { + nicknames_.Add()->assign(value); +} +inline void ChatLobbyInfo::add_nicknames(const char* value, size_t size) { + nicknames_.Add()->assign(reinterpret_cast(value), size); +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +ChatLobbyInfo::nicknames() const { + return nicknames_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +ChatLobbyInfo::mutable_nicknames() { + return &nicknames_; +} + +// ------------------------------------------------------------------- + +// ChatId + +// required .rsctrl.chat.ChatType chat_type = 1; +inline bool ChatId::has_chat_type() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void ChatId::set_has_chat_type() { + _has_bits_[0] |= 0x00000001u; +} +inline void ChatId::clear_has_chat_type() { + _has_bits_[0] &= ~0x00000001u; +} +inline void ChatId::clear_chat_type() { + chat_type_ = 1; + clear_has_chat_type(); +} +inline rsctrl::chat::ChatType ChatId::chat_type() const { + return static_cast< rsctrl::chat::ChatType >(chat_type_); +} +inline void ChatId::set_chat_type(rsctrl::chat::ChatType value) { + GOOGLE_DCHECK(rsctrl::chat::ChatType_IsValid(value)); + set_has_chat_type(); + chat_type_ = value; +} + +// required string chat_id = 2; +inline bool ChatId::has_chat_id() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void ChatId::set_has_chat_id() { + _has_bits_[0] |= 0x00000002u; +} +inline void ChatId::clear_has_chat_id() { + _has_bits_[0] &= ~0x00000002u; +} +inline void ChatId::clear_chat_id() { + if (chat_id_ != &::google::protobuf::internal::kEmptyString) { + chat_id_->clear(); + } + clear_has_chat_id(); +} +inline const ::std::string& ChatId::chat_id() const { + return *chat_id_; +} +inline void ChatId::set_chat_id(const ::std::string& value) { + set_has_chat_id(); + if (chat_id_ == &::google::protobuf::internal::kEmptyString) { + chat_id_ = new ::std::string; + } + chat_id_->assign(value); +} +inline void ChatId::set_chat_id(const char* value) { + set_has_chat_id(); + if (chat_id_ == &::google::protobuf::internal::kEmptyString) { + chat_id_ = new ::std::string; + } + chat_id_->assign(value); +} +inline void ChatId::set_chat_id(const char* value, size_t size) { + set_has_chat_id(); + if (chat_id_ == &::google::protobuf::internal::kEmptyString) { + chat_id_ = new ::std::string; + } + chat_id_->assign(reinterpret_cast(value), size); +} +inline ::std::string* ChatId::mutable_chat_id() { + set_has_chat_id(); + if (chat_id_ == &::google::protobuf::internal::kEmptyString) { + chat_id_ = new ::std::string; + } + return chat_id_; +} +inline ::std::string* ChatId::release_chat_id() { + clear_has_chat_id(); + if (chat_id_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = chat_id_; + chat_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// ------------------------------------------------------------------- + +// ChatMessage + +// required .rsctrl.chat.ChatId id = 1; +inline bool ChatMessage::has_id() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void ChatMessage::set_has_id() { + _has_bits_[0] |= 0x00000001u; +} +inline void ChatMessage::clear_has_id() { + _has_bits_[0] &= ~0x00000001u; +} +inline void ChatMessage::clear_id() { + if (id_ != NULL) id_->::rsctrl::chat::ChatId::Clear(); + clear_has_id(); +} +inline const ::rsctrl::chat::ChatId& ChatMessage::id() const { + return id_ != NULL ? *id_ : *default_instance_->id_; +} +inline ::rsctrl::chat::ChatId* ChatMessage::mutable_id() { + set_has_id(); + if (id_ == NULL) id_ = new ::rsctrl::chat::ChatId; + return id_; +} +inline ::rsctrl::chat::ChatId* ChatMessage::release_id() { + clear_has_id(); + ::rsctrl::chat::ChatId* temp = id_; + id_ = NULL; + return temp; +} + +// required string msg = 2; +inline bool ChatMessage::has_msg() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void ChatMessage::set_has_msg() { + _has_bits_[0] |= 0x00000002u; +} +inline void ChatMessage::clear_has_msg() { + _has_bits_[0] &= ~0x00000002u; +} +inline void ChatMessage::clear_msg() { + if (msg_ != &::google::protobuf::internal::kEmptyString) { + msg_->clear(); + } + clear_has_msg(); +} +inline const ::std::string& ChatMessage::msg() const { + return *msg_; +} +inline void ChatMessage::set_msg(const ::std::string& value) { + set_has_msg(); + if (msg_ == &::google::protobuf::internal::kEmptyString) { + msg_ = new ::std::string; + } + msg_->assign(value); +} +inline void ChatMessage::set_msg(const char* value) { + set_has_msg(); + if (msg_ == &::google::protobuf::internal::kEmptyString) { + msg_ = new ::std::string; + } + msg_->assign(value); +} +inline void ChatMessage::set_msg(const char* value, size_t size) { + set_has_msg(); + if (msg_ == &::google::protobuf::internal::kEmptyString) { + msg_ = new ::std::string; + } + msg_->assign(reinterpret_cast(value), size); +} +inline ::std::string* ChatMessage::mutable_msg() { + set_has_msg(); + if (msg_ == &::google::protobuf::internal::kEmptyString) { + msg_ = new ::std::string; + } + return msg_; +} +inline ::std::string* ChatMessage::release_msg() { + clear_has_msg(); + if (msg_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = msg_; + msg_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// optional string peer_nickname = 3; +inline bool ChatMessage::has_peer_nickname() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void ChatMessage::set_has_peer_nickname() { + _has_bits_[0] |= 0x00000004u; +} +inline void ChatMessage::clear_has_peer_nickname() { + _has_bits_[0] &= ~0x00000004u; +} +inline void ChatMessage::clear_peer_nickname() { + if (peer_nickname_ != &::google::protobuf::internal::kEmptyString) { + peer_nickname_->clear(); + } + clear_has_peer_nickname(); +} +inline const ::std::string& ChatMessage::peer_nickname() const { + return *peer_nickname_; +} +inline void ChatMessage::set_peer_nickname(const ::std::string& value) { + set_has_peer_nickname(); + if (peer_nickname_ == &::google::protobuf::internal::kEmptyString) { + peer_nickname_ = new ::std::string; + } + peer_nickname_->assign(value); +} +inline void ChatMessage::set_peer_nickname(const char* value) { + set_has_peer_nickname(); + if (peer_nickname_ == &::google::protobuf::internal::kEmptyString) { + peer_nickname_ = new ::std::string; + } + peer_nickname_->assign(value); +} +inline void ChatMessage::set_peer_nickname(const char* value, size_t size) { + set_has_peer_nickname(); + if (peer_nickname_ == &::google::protobuf::internal::kEmptyString) { + peer_nickname_ = new ::std::string; + } + peer_nickname_->assign(reinterpret_cast(value), size); +} +inline ::std::string* ChatMessage::mutable_peer_nickname() { + set_has_peer_nickname(); + if (peer_nickname_ == &::google::protobuf::internal::kEmptyString) { + peer_nickname_ = new ::std::string; + } + return peer_nickname_; +} +inline ::std::string* ChatMessage::release_peer_nickname() { + clear_has_peer_nickname(); + if (peer_nickname_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = peer_nickname_; + peer_nickname_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// optional uint32 chat_flags = 4; +inline bool ChatMessage::has_chat_flags() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void ChatMessage::set_has_chat_flags() { + _has_bits_[0] |= 0x00000008u; +} +inline void ChatMessage::clear_has_chat_flags() { + _has_bits_[0] &= ~0x00000008u; +} +inline void ChatMessage::clear_chat_flags() { + chat_flags_ = 0u; + clear_has_chat_flags(); +} +inline ::google::protobuf::uint32 ChatMessage::chat_flags() const { + return chat_flags_; +} +inline void ChatMessage::set_chat_flags(::google::protobuf::uint32 value) { + set_has_chat_flags(); + chat_flags_ = value; +} + +// optional uint32 send_time = 5; +inline bool ChatMessage::has_send_time() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +inline void ChatMessage::set_has_send_time() { + _has_bits_[0] |= 0x00000010u; +} +inline void ChatMessage::clear_has_send_time() { + _has_bits_[0] &= ~0x00000010u; +} +inline void ChatMessage::clear_send_time() { + send_time_ = 0u; + clear_has_send_time(); +} +inline ::google::protobuf::uint32 ChatMessage::send_time() const { + return send_time_; +} +inline void ChatMessage::set_send_time(::google::protobuf::uint32 value) { + set_has_send_time(); + send_time_ = value; +} + +// optional uint32 recv_time = 6; +inline bool ChatMessage::has_recv_time() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +inline void ChatMessage::set_has_recv_time() { + _has_bits_[0] |= 0x00000020u; +} +inline void ChatMessage::clear_has_recv_time() { + _has_bits_[0] &= ~0x00000020u; +} +inline void ChatMessage::clear_recv_time() { + recv_time_ = 0u; + clear_has_recv_time(); +} +inline ::google::protobuf::uint32 ChatMessage::recv_time() const { + return recv_time_; +} +inline void ChatMessage::set_recv_time(::google::protobuf::uint32 value) { + set_has_recv_time(); + recv_time_ = value; +} + +// ------------------------------------------------------------------- + +// ResponseChatLobbies + +// required .rsctrl.core.Status status = 1; +inline bool ResponseChatLobbies::has_status() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void ResponseChatLobbies::set_has_status() { + _has_bits_[0] |= 0x00000001u; +} +inline void ResponseChatLobbies::clear_has_status() { + _has_bits_[0] &= ~0x00000001u; +} +inline void ResponseChatLobbies::clear_status() { + if (status_ != NULL) status_->::rsctrl::core::Status::Clear(); + clear_has_status(); +} +inline const ::rsctrl::core::Status& ResponseChatLobbies::status() const { + return status_ != NULL ? *status_ : *default_instance_->status_; +} +inline ::rsctrl::core::Status* ResponseChatLobbies::mutable_status() { + set_has_status(); + if (status_ == NULL) status_ = new ::rsctrl::core::Status; + return status_; +} +inline ::rsctrl::core::Status* ResponseChatLobbies::release_status() { + clear_has_status(); + ::rsctrl::core::Status* temp = status_; + status_ = NULL; + return temp; +} + +// repeated .rsctrl.chat.ChatLobbyInfo lobbies = 2; +inline int ResponseChatLobbies::lobbies_size() const { + return lobbies_.size(); +} +inline void ResponseChatLobbies::clear_lobbies() { + lobbies_.Clear(); +} +inline const ::rsctrl::chat::ChatLobbyInfo& ResponseChatLobbies::lobbies(int index) const { + return lobbies_.Get(index); +} +inline ::rsctrl::chat::ChatLobbyInfo* ResponseChatLobbies::mutable_lobbies(int index) { + return lobbies_.Mutable(index); +} +inline ::rsctrl::chat::ChatLobbyInfo* ResponseChatLobbies::add_lobbies() { + return lobbies_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::rsctrl::chat::ChatLobbyInfo >& +ResponseChatLobbies::lobbies() const { + return lobbies_; +} +inline ::google::protobuf::RepeatedPtrField< ::rsctrl::chat::ChatLobbyInfo >* +ResponseChatLobbies::mutable_lobbies() { + return &lobbies_; +} + +// ------------------------------------------------------------------- + +// RequestChatLobbies + +// required .rsctrl.chat.RequestChatLobbies.LobbySet lobby_set = 1; +inline bool RequestChatLobbies::has_lobby_set() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void RequestChatLobbies::set_has_lobby_set() { + _has_bits_[0] |= 0x00000001u; +} +inline void RequestChatLobbies::clear_has_lobby_set() { + _has_bits_[0] &= ~0x00000001u; +} +inline void RequestChatLobbies::clear_lobby_set() { + lobby_set_ = 1; + clear_has_lobby_set(); +} +inline ::rsctrl::chat::RequestChatLobbies_LobbySet RequestChatLobbies::lobby_set() const { + return static_cast< ::rsctrl::chat::RequestChatLobbies_LobbySet >(lobby_set_); +} +inline void RequestChatLobbies::set_lobby_set(::rsctrl::chat::RequestChatLobbies_LobbySet value) { + GOOGLE_DCHECK(::rsctrl::chat::RequestChatLobbies_LobbySet_IsValid(value)); + set_has_lobby_set(); + lobby_set_ = value; +} + +// ------------------------------------------------------------------- + +// RequestCreateLobby + +// required string lobby_name = 1; +inline bool RequestCreateLobby::has_lobby_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void RequestCreateLobby::set_has_lobby_name() { + _has_bits_[0] |= 0x00000001u; +} +inline void RequestCreateLobby::clear_has_lobby_name() { + _has_bits_[0] &= ~0x00000001u; +} +inline void RequestCreateLobby::clear_lobby_name() { + if (lobby_name_ != &::google::protobuf::internal::kEmptyString) { + lobby_name_->clear(); + } + clear_has_lobby_name(); +} +inline const ::std::string& RequestCreateLobby::lobby_name() const { + return *lobby_name_; +} +inline void RequestCreateLobby::set_lobby_name(const ::std::string& value) { + set_has_lobby_name(); + if (lobby_name_ == &::google::protobuf::internal::kEmptyString) { + lobby_name_ = new ::std::string; + } + lobby_name_->assign(value); +} +inline void RequestCreateLobby::set_lobby_name(const char* value) { + set_has_lobby_name(); + if (lobby_name_ == &::google::protobuf::internal::kEmptyString) { + lobby_name_ = new ::std::string; + } + lobby_name_->assign(value); +} +inline void RequestCreateLobby::set_lobby_name(const char* value, size_t size) { + set_has_lobby_name(); + if (lobby_name_ == &::google::protobuf::internal::kEmptyString) { + lobby_name_ = new ::std::string; + } + lobby_name_->assign(reinterpret_cast(value), size); +} +inline ::std::string* RequestCreateLobby::mutable_lobby_name() { + set_has_lobby_name(); + if (lobby_name_ == &::google::protobuf::internal::kEmptyString) { + lobby_name_ = new ::std::string; + } + return lobby_name_; +} +inline ::std::string* RequestCreateLobby::release_lobby_name() { + clear_has_lobby_name(); + if (lobby_name_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = lobby_name_; + lobby_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// required string lobby_topic = 2; +inline bool RequestCreateLobby::has_lobby_topic() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void RequestCreateLobby::set_has_lobby_topic() { + _has_bits_[0] |= 0x00000002u; +} +inline void RequestCreateLobby::clear_has_lobby_topic() { + _has_bits_[0] &= ~0x00000002u; +} +inline void RequestCreateLobby::clear_lobby_topic() { + if (lobby_topic_ != &::google::protobuf::internal::kEmptyString) { + lobby_topic_->clear(); + } + clear_has_lobby_topic(); +} +inline const ::std::string& RequestCreateLobby::lobby_topic() const { + return *lobby_topic_; +} +inline void RequestCreateLobby::set_lobby_topic(const ::std::string& value) { + set_has_lobby_topic(); + if (lobby_topic_ == &::google::protobuf::internal::kEmptyString) { + lobby_topic_ = new ::std::string; + } + lobby_topic_->assign(value); +} +inline void RequestCreateLobby::set_lobby_topic(const char* value) { + set_has_lobby_topic(); + if (lobby_topic_ == &::google::protobuf::internal::kEmptyString) { + lobby_topic_ = new ::std::string; + } + lobby_topic_->assign(value); +} +inline void RequestCreateLobby::set_lobby_topic(const char* value, size_t size) { + set_has_lobby_topic(); + if (lobby_topic_ == &::google::protobuf::internal::kEmptyString) { + lobby_topic_ = new ::std::string; + } + lobby_topic_->assign(reinterpret_cast(value), size); +} +inline ::std::string* RequestCreateLobby::mutable_lobby_topic() { + set_has_lobby_topic(); + if (lobby_topic_ == &::google::protobuf::internal::kEmptyString) { + lobby_topic_ = new ::std::string; + } + return lobby_topic_; +} +inline ::std::string* RequestCreateLobby::release_lobby_topic() { + clear_has_lobby_topic(); + if (lobby_topic_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = lobby_topic_; + lobby_topic_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// required .rsctrl.chat.LobbyPrivacyLevel privacy_level = 4; +inline bool RequestCreateLobby::has_privacy_level() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void RequestCreateLobby::set_has_privacy_level() { + _has_bits_[0] |= 0x00000004u; +} +inline void RequestCreateLobby::clear_has_privacy_level() { + _has_bits_[0] &= ~0x00000004u; +} +inline void RequestCreateLobby::clear_privacy_level() { + privacy_level_ = 1; + clear_has_privacy_level(); +} +inline rsctrl::chat::LobbyPrivacyLevel RequestCreateLobby::privacy_level() const { + return static_cast< rsctrl::chat::LobbyPrivacyLevel >(privacy_level_); +} +inline void RequestCreateLobby::set_privacy_level(rsctrl::chat::LobbyPrivacyLevel value) { + GOOGLE_DCHECK(rsctrl::chat::LobbyPrivacyLevel_IsValid(value)); + set_has_privacy_level(); + privacy_level_ = value; +} + +// repeated string invited_friends = 3; +inline int RequestCreateLobby::invited_friends_size() const { + return invited_friends_.size(); +} +inline void RequestCreateLobby::clear_invited_friends() { + invited_friends_.Clear(); +} +inline const ::std::string& RequestCreateLobby::invited_friends(int index) const { + return invited_friends_.Get(index); +} +inline ::std::string* RequestCreateLobby::mutable_invited_friends(int index) { + return invited_friends_.Mutable(index); +} +inline void RequestCreateLobby::set_invited_friends(int index, const ::std::string& value) { + invited_friends_.Mutable(index)->assign(value); +} +inline void RequestCreateLobby::set_invited_friends(int index, const char* value) { + invited_friends_.Mutable(index)->assign(value); +} +inline void RequestCreateLobby::set_invited_friends(int index, const char* value, size_t size) { + invited_friends_.Mutable(index)->assign( + reinterpret_cast(value), size); +} +inline ::std::string* RequestCreateLobby::add_invited_friends() { + return invited_friends_.Add(); +} +inline void RequestCreateLobby::add_invited_friends(const ::std::string& value) { + invited_friends_.Add()->assign(value); +} +inline void RequestCreateLobby::add_invited_friends(const char* value) { + invited_friends_.Add()->assign(value); +} +inline void RequestCreateLobby::add_invited_friends(const char* value, size_t size) { + invited_friends_.Add()->assign(reinterpret_cast(value), size); +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +RequestCreateLobby::invited_friends() const { + return invited_friends_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +RequestCreateLobby::mutable_invited_friends() { + return &invited_friends_; +} + +// ------------------------------------------------------------------- + +// RequestJoinOrLeaveLobby + +// required string lobby_id = 1; +inline bool RequestJoinOrLeaveLobby::has_lobby_id() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void RequestJoinOrLeaveLobby::set_has_lobby_id() { + _has_bits_[0] |= 0x00000001u; +} +inline void RequestJoinOrLeaveLobby::clear_has_lobby_id() { + _has_bits_[0] &= ~0x00000001u; +} +inline void RequestJoinOrLeaveLobby::clear_lobby_id() { + if (lobby_id_ != &::google::protobuf::internal::kEmptyString) { + lobby_id_->clear(); + } + clear_has_lobby_id(); +} +inline const ::std::string& RequestJoinOrLeaveLobby::lobby_id() const { + return *lobby_id_; +} +inline void RequestJoinOrLeaveLobby::set_lobby_id(const ::std::string& value) { + set_has_lobby_id(); + if (lobby_id_ == &::google::protobuf::internal::kEmptyString) { + lobby_id_ = new ::std::string; + } + lobby_id_->assign(value); +} +inline void RequestJoinOrLeaveLobby::set_lobby_id(const char* value) { + set_has_lobby_id(); + if (lobby_id_ == &::google::protobuf::internal::kEmptyString) { + lobby_id_ = new ::std::string; + } + lobby_id_->assign(value); +} +inline void RequestJoinOrLeaveLobby::set_lobby_id(const char* value, size_t size) { + set_has_lobby_id(); + if (lobby_id_ == &::google::protobuf::internal::kEmptyString) { + lobby_id_ = new ::std::string; + } + lobby_id_->assign(reinterpret_cast(value), size); +} +inline ::std::string* RequestJoinOrLeaveLobby::mutable_lobby_id() { + set_has_lobby_id(); + if (lobby_id_ == &::google::protobuf::internal::kEmptyString) { + lobby_id_ = new ::std::string; + } + return lobby_id_; +} +inline ::std::string* RequestJoinOrLeaveLobby::release_lobby_id() { + clear_has_lobby_id(); + if (lobby_id_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = lobby_id_; + lobby_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// required .rsctrl.chat.RequestJoinOrLeaveLobby.LobbyAction action = 2; +inline bool RequestJoinOrLeaveLobby::has_action() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void RequestJoinOrLeaveLobby::set_has_action() { + _has_bits_[0] |= 0x00000002u; +} +inline void RequestJoinOrLeaveLobby::clear_has_action() { + _has_bits_[0] &= ~0x00000002u; +} +inline void RequestJoinOrLeaveLobby::clear_action() { + action_ = 1; + clear_has_action(); +} +inline ::rsctrl::chat::RequestJoinOrLeaveLobby_LobbyAction RequestJoinOrLeaveLobby::action() const { + return static_cast< ::rsctrl::chat::RequestJoinOrLeaveLobby_LobbyAction >(action_); +} +inline void RequestJoinOrLeaveLobby::set_action(::rsctrl::chat::RequestJoinOrLeaveLobby_LobbyAction value) { + GOOGLE_DCHECK(::rsctrl::chat::RequestJoinOrLeaveLobby_LobbyAction_IsValid(value)); + set_has_action(); + action_ = value; +} + +// ------------------------------------------------------------------- + +// RequestSetLobbyNickname + +// required string nickname = 1; +inline bool RequestSetLobbyNickname::has_nickname() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void RequestSetLobbyNickname::set_has_nickname() { + _has_bits_[0] |= 0x00000001u; +} +inline void RequestSetLobbyNickname::clear_has_nickname() { + _has_bits_[0] &= ~0x00000001u; +} +inline void RequestSetLobbyNickname::clear_nickname() { + if (nickname_ != &::google::protobuf::internal::kEmptyString) { + nickname_->clear(); + } + clear_has_nickname(); +} +inline const ::std::string& RequestSetLobbyNickname::nickname() const { + return *nickname_; +} +inline void RequestSetLobbyNickname::set_nickname(const ::std::string& value) { + set_has_nickname(); + if (nickname_ == &::google::protobuf::internal::kEmptyString) { + nickname_ = new ::std::string; + } + nickname_->assign(value); +} +inline void RequestSetLobbyNickname::set_nickname(const char* value) { + set_has_nickname(); + if (nickname_ == &::google::protobuf::internal::kEmptyString) { + nickname_ = new ::std::string; + } + nickname_->assign(value); +} +inline void RequestSetLobbyNickname::set_nickname(const char* value, size_t size) { + set_has_nickname(); + if (nickname_ == &::google::protobuf::internal::kEmptyString) { + nickname_ = new ::std::string; + } + nickname_->assign(reinterpret_cast(value), size); +} +inline ::std::string* RequestSetLobbyNickname::mutable_nickname() { + set_has_nickname(); + if (nickname_ == &::google::protobuf::internal::kEmptyString) { + nickname_ = new ::std::string; + } + return nickname_; +} +inline ::std::string* RequestSetLobbyNickname::release_nickname() { + clear_has_nickname(); + if (nickname_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = nickname_; + nickname_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// repeated string lobby_ids = 2; +inline int RequestSetLobbyNickname::lobby_ids_size() const { + return lobby_ids_.size(); +} +inline void RequestSetLobbyNickname::clear_lobby_ids() { + lobby_ids_.Clear(); +} +inline const ::std::string& RequestSetLobbyNickname::lobby_ids(int index) const { + return lobby_ids_.Get(index); +} +inline ::std::string* RequestSetLobbyNickname::mutable_lobby_ids(int index) { + return lobby_ids_.Mutable(index); +} +inline void RequestSetLobbyNickname::set_lobby_ids(int index, const ::std::string& value) { + lobby_ids_.Mutable(index)->assign(value); +} +inline void RequestSetLobbyNickname::set_lobby_ids(int index, const char* value) { + lobby_ids_.Mutable(index)->assign(value); +} +inline void RequestSetLobbyNickname::set_lobby_ids(int index, const char* value, size_t size) { + lobby_ids_.Mutable(index)->assign( + reinterpret_cast(value), size); +} +inline ::std::string* RequestSetLobbyNickname::add_lobby_ids() { + return lobby_ids_.Add(); +} +inline void RequestSetLobbyNickname::add_lobby_ids(const ::std::string& value) { + lobby_ids_.Add()->assign(value); +} +inline void RequestSetLobbyNickname::add_lobby_ids(const char* value) { + lobby_ids_.Add()->assign(value); +} +inline void RequestSetLobbyNickname::add_lobby_ids(const char* value, size_t size) { + lobby_ids_.Add()->assign(reinterpret_cast(value), size); +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +RequestSetLobbyNickname::lobby_ids() const { + return lobby_ids_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +RequestSetLobbyNickname::mutable_lobby_ids() { + return &lobby_ids_; +} + +// ------------------------------------------------------------------- + +// ResponseSetLobbyNickname + +// required .rsctrl.core.Status status = 1; +inline bool ResponseSetLobbyNickname::has_status() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void ResponseSetLobbyNickname::set_has_status() { + _has_bits_[0] |= 0x00000001u; +} +inline void ResponseSetLobbyNickname::clear_has_status() { + _has_bits_[0] &= ~0x00000001u; +} +inline void ResponseSetLobbyNickname::clear_status() { + if (status_ != NULL) status_->::rsctrl::core::Status::Clear(); + clear_has_status(); +} +inline const ::rsctrl::core::Status& ResponseSetLobbyNickname::status() const { + return status_ != NULL ? *status_ : *default_instance_->status_; +} +inline ::rsctrl::core::Status* ResponseSetLobbyNickname::mutable_status() { + set_has_status(); + if (status_ == NULL) status_ = new ::rsctrl::core::Status; + return status_; +} +inline ::rsctrl::core::Status* ResponseSetLobbyNickname::release_status() { + clear_has_status(); + ::rsctrl::core::Status* temp = status_; + status_ = NULL; + return temp; +} + +// ------------------------------------------------------------------- + +// RequestRegisterEvents + +// required .rsctrl.chat.RequestRegisterEvents.RegisterAction action = 1; +inline bool RequestRegisterEvents::has_action() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void RequestRegisterEvents::set_has_action() { + _has_bits_[0] |= 0x00000001u; +} +inline void RequestRegisterEvents::clear_has_action() { + _has_bits_[0] &= ~0x00000001u; +} +inline void RequestRegisterEvents::clear_action() { + action_ = 1; + clear_has_action(); +} +inline ::rsctrl::chat::RequestRegisterEvents_RegisterAction RequestRegisterEvents::action() const { + return static_cast< ::rsctrl::chat::RequestRegisterEvents_RegisterAction >(action_); +} +inline void RequestRegisterEvents::set_action(::rsctrl::chat::RequestRegisterEvents_RegisterAction value) { + GOOGLE_DCHECK(::rsctrl::chat::RequestRegisterEvents_RegisterAction_IsValid(value)); + set_has_action(); + action_ = value; +} + +// ------------------------------------------------------------------- + +// ResponseRegisterEvents + +// required .rsctrl.core.Status status = 1; +inline bool ResponseRegisterEvents::has_status() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void ResponseRegisterEvents::set_has_status() { + _has_bits_[0] |= 0x00000001u; +} +inline void ResponseRegisterEvents::clear_has_status() { + _has_bits_[0] &= ~0x00000001u; +} +inline void ResponseRegisterEvents::clear_status() { + if (status_ != NULL) status_->::rsctrl::core::Status::Clear(); + clear_has_status(); +} +inline const ::rsctrl::core::Status& ResponseRegisterEvents::status() const { + return status_ != NULL ? *status_ : *default_instance_->status_; +} +inline ::rsctrl::core::Status* ResponseRegisterEvents::mutable_status() { + set_has_status(); + if (status_ == NULL) status_ = new ::rsctrl::core::Status; + return status_; +} +inline ::rsctrl::core::Status* ResponseRegisterEvents::release_status() { + clear_has_status(); + ::rsctrl::core::Status* temp = status_; + status_ = NULL; + return temp; +} + +// ------------------------------------------------------------------- + +// EventLobbyInvite + +// required .rsctrl.chat.ChatLobbyInfo lobby = 1; +inline bool EventLobbyInvite::has_lobby() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void EventLobbyInvite::set_has_lobby() { + _has_bits_[0] |= 0x00000001u; +} +inline void EventLobbyInvite::clear_has_lobby() { + _has_bits_[0] &= ~0x00000001u; +} +inline void EventLobbyInvite::clear_lobby() { + if (lobby_ != NULL) lobby_->::rsctrl::chat::ChatLobbyInfo::Clear(); + clear_has_lobby(); +} +inline const ::rsctrl::chat::ChatLobbyInfo& EventLobbyInvite::lobby() const { + return lobby_ != NULL ? *lobby_ : *default_instance_->lobby_; +} +inline ::rsctrl::chat::ChatLobbyInfo* EventLobbyInvite::mutable_lobby() { + set_has_lobby(); + if (lobby_ == NULL) lobby_ = new ::rsctrl::chat::ChatLobbyInfo; + return lobby_; +} +inline ::rsctrl::chat::ChatLobbyInfo* EventLobbyInvite::release_lobby() { + clear_has_lobby(); + ::rsctrl::chat::ChatLobbyInfo* temp = lobby_; + lobby_ = NULL; + return temp; +} + +// ------------------------------------------------------------------- + +// EventChatMessage + +// required .rsctrl.chat.ChatMessage msg = 1; +inline bool EventChatMessage::has_msg() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void EventChatMessage::set_has_msg() { + _has_bits_[0] |= 0x00000001u; +} +inline void EventChatMessage::clear_has_msg() { + _has_bits_[0] &= ~0x00000001u; +} +inline void EventChatMessage::clear_msg() { + if (msg_ != NULL) msg_->::rsctrl::chat::ChatMessage::Clear(); + clear_has_msg(); +} +inline const ::rsctrl::chat::ChatMessage& EventChatMessage::msg() const { + return msg_ != NULL ? *msg_ : *default_instance_->msg_; +} +inline ::rsctrl::chat::ChatMessage* EventChatMessage::mutable_msg() { + set_has_msg(); + if (msg_ == NULL) msg_ = new ::rsctrl::chat::ChatMessage; + return msg_; +} +inline ::rsctrl::chat::ChatMessage* EventChatMessage::release_msg() { + clear_has_msg(); + ::rsctrl::chat::ChatMessage* temp = msg_; + msg_ = NULL; + return temp; +} + +// ------------------------------------------------------------------- + +// RequestSendMessage + +// required .rsctrl.chat.ChatMessage msg = 1; +inline bool RequestSendMessage::has_msg() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void RequestSendMessage::set_has_msg() { + _has_bits_[0] |= 0x00000001u; +} +inline void RequestSendMessage::clear_has_msg() { + _has_bits_[0] &= ~0x00000001u; +} +inline void RequestSendMessage::clear_msg() { + if (msg_ != NULL) msg_->::rsctrl::chat::ChatMessage::Clear(); + clear_has_msg(); +} +inline const ::rsctrl::chat::ChatMessage& RequestSendMessage::msg() const { + return msg_ != NULL ? *msg_ : *default_instance_->msg_; +} +inline ::rsctrl::chat::ChatMessage* RequestSendMessage::mutable_msg() { + set_has_msg(); + if (msg_ == NULL) msg_ = new ::rsctrl::chat::ChatMessage; + return msg_; +} +inline ::rsctrl::chat::ChatMessage* RequestSendMessage::release_msg() { + clear_has_msg(); + ::rsctrl::chat::ChatMessage* temp = msg_; + msg_ = NULL; + return temp; +} + +// ------------------------------------------------------------------- + +// ResponseSendMessage + +// required .rsctrl.core.Status status = 1; +inline bool ResponseSendMessage::has_status() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void ResponseSendMessage::set_has_status() { + _has_bits_[0] |= 0x00000001u; +} +inline void ResponseSendMessage::clear_has_status() { + _has_bits_[0] &= ~0x00000001u; +} +inline void ResponseSendMessage::clear_status() { + if (status_ != NULL) status_->::rsctrl::core::Status::Clear(); + clear_has_status(); +} +inline const ::rsctrl::core::Status& ResponseSendMessage::status() const { + return status_ != NULL ? *status_ : *default_instance_->status_; +} +inline ::rsctrl::core::Status* ResponseSendMessage::mutable_status() { + set_has_status(); + if (status_ == NULL) status_ = new ::rsctrl::core::Status; + return status_; +} +inline ::rsctrl::core::Status* ResponseSendMessage::release_status() { + clear_has_status(); + ::rsctrl::core::Status* temp = status_; + status_ = NULL; + return temp; +} + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace chat +} // namespace rsctrl + +#ifndef SWIG +namespace google { +namespace protobuf { + +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::rsctrl::chat::ChatLobbyInfo_LobbyState>() { + return ::rsctrl::chat::ChatLobbyInfo_LobbyState_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::rsctrl::chat::RequestChatLobbies_LobbySet>() { + return ::rsctrl::chat::RequestChatLobbies_LobbySet_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::rsctrl::chat::RequestJoinOrLeaveLobby_LobbyAction>() { + return ::rsctrl::chat::RequestJoinOrLeaveLobby_LobbyAction_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::rsctrl::chat::RequestRegisterEvents_RegisterAction>() { + return ::rsctrl::chat::RequestRegisterEvents_RegisterAction_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< rsctrl::chat::RequestMsgIds>() { + return rsctrl::chat::RequestMsgIds_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< rsctrl::chat::ResponseMsgIds>() { + return rsctrl::chat::ResponseMsgIds_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< rsctrl::chat::LobbyPrivacyLevel>() { + return rsctrl::chat::LobbyPrivacyLevel_descriptor(); +} +template <> +inline const EnumDescriptor* GetEnumDescriptor< rsctrl::chat::ChatType>() { + return rsctrl::chat::ChatType_descriptor(); +} + +} // namespace google +} // namespace protobuf +#endif // SWIG + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_chat_2eproto__INCLUDED diff --git a/retroshare-nogui/src/rpc/proto/gencc/core.pb.cc b/retroshare-nogui/src/rpc/proto/gencc/core.pb.cc index f669e5f61..e95575c67 100644 --- a/retroshare-nogui/src/rpc/proto/gencc/core.pb.cc +++ b/retroshare-nogui/src/rpc/proto/gencc/core.pb.cc @@ -313,9 +313,9 @@ void protobuf_AddDesc_core_2eproto() { "RWARD\020\010\"3\n\tBandwidth\022\n\n\002up\030\001 \002(\002\022\014\n\004down" "\030\002 \002(\002\022\014\n\004name\030\003 \001(\t\":\n\014BandwidthSet\022*\n\n" "bandwidths\030\001 \003(\0132\026.rsctrl.core.Bandwidth" - "*\027\n\013ExtensionId\022\010\n\004CORE\020\000*A\n\tPackageId\022\t" - "\n\005PEERS\020\001\022\n\n\006SYSTEM\020\002\022\t\n\005FILES\020\003\022\010\n\004MSGS" - "\020\004\022\010\n\003GXS\020\350\007", 1292); + "*\027\n\013ExtensionId\022\010\n\004CORE\020\000*6\n\tPackageId\022\t" + "\n\005PEERS\020\001\022\n\n\006SYSTEM\020\002\022\010\n\004CHAT\020\003\022\010\n\003GXS\020\350" + "\007", 1281); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "core.proto", &protobuf_RegisterTypes); Status::default_instance_ = new Status(); @@ -368,7 +368,6 @@ bool PackageId_IsValid(int value) { case 1: case 2: case 3: - case 4: case 1000: return true; default: diff --git a/retroshare-nogui/src/rpc/proto/gencc/core.pb.h b/retroshare-nogui/src/rpc/proto/gencc/core.pb.h index ef2ab4074..8ed3d8e2d 100644 --- a/retroshare-nogui/src/rpc/proto/gencc/core.pb.h +++ b/retroshare-nogui/src/rpc/proto/gencc/core.pb.h @@ -153,8 +153,7 @@ inline bool ExtensionId_Parse( enum PackageId { PEERS = 1, SYSTEM = 2, - FILES = 3, - MSGS = 4, + CHAT = 3, GXS = 1000 }; bool PackageId_IsValid(int value); diff --git a/retroshare-nogui/src/rpc/proto/rpcprotochat.cc b/retroshare-nogui/src/rpc/proto/rpcprotochat.cc new file mode 100644 index 000000000..7fba114ba --- /dev/null +++ b/retroshare-nogui/src/rpc/proto/rpcprotochat.cc @@ -0,0 +1,1286 @@ +/* + * RetroShare External Interface. + * + * Copyright 2012-2012 by Robert Fernie. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License Version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. + * + * Please report all bugs and problems to "retroshare@lunamutt.com". + * + */ + +#include "rpc/proto/rpcprotochat.h" +#include "rpc/proto/gencc/chat.pb.h" + +#include +#include + +#include "util/rsstring.h" + +#include + +#include +#include + +#include + + +// Helper Functions -> maybe move to libretroshare/utils ?? +bool convertUTF8toWString(const std::string &msg_utf8, std::wstring &msg_wstr); +bool convertWStringToUTF8(const std::wstring &msg_wstr, std::string &msg_utf8); + +bool convertStringToLobbyId(const std::string &chat_id, ChatLobbyId &lobby_id); +bool convertLobbyIdToString(const ChatLobbyId &lobby_id, std::string &chat_id); + +bool fillLobbyInfoFromChatLobbyInfo(const ChatLobbyInfo &cfi, rsctrl::chat::ChatLobbyInfo *lobby); +bool fillLobbyInfoFromPublicChatLobbyRecord(const PublicChatLobbyRecord &pclr, rsctrl::chat::ChatLobbyInfo *lobby); +bool fillLobbyInfoFromChatLobbyInvite(const ChatLobbyInvite &cli, rsctrl::chat::ChatLobbyInfo *lobby); + +bool createQueuedEventSendMsg(const ChatInfo &chatinfo, rsctrl::chat::ChatType ctype, + std::string chat_id, const RpcEventRegister &ereg, RpcQueuedMsg &qmsg); + + +RpcProtoChat::RpcProtoChat(uint32_t serviceId) + :RpcQueueService(serviceId) +{ + return; +} + +//RpcProtoChat::msgsAccepted(std::list &msgIds); /* not used at the moment */ + +int RpcProtoChat::processMsg(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg) +{ + /* check the msgId */ + uint8_t topbyte = getRpcMsgIdExtension(msg_id); + uint16_t service = getRpcMsgIdService(msg_id); + uint8_t submsg = getRpcMsgIdSubMsg(msg_id); + bool isResponse = isRpcMsgIdResponse(msg_id); + + + std::cerr << "RpcProtoChat::processMsg() topbyte: " << (int32_t) topbyte; + std::cerr << " service: " << (int32_t) service << " submsg: " << (int32_t) submsg; + std::cerr << std::endl; + + if (isResponse) + { + std::cerr << "RpcProtoChat::processMsg() isResponse() - not processing"; + std::cerr << std::endl; + return 0; + } + + if (topbyte != (uint8_t) rsctrl::core::CORE) + { + std::cerr << "RpcProtoChat::processMsg() Extension Mismatch - not processing"; + std::cerr << std::endl; + return 0; + } + + if (service != (uint16_t) rsctrl::core::CHAT) + { + std::cerr << "RpcProtoChat::processMsg() Service Mismatch - not processing"; + std::cerr << std::endl; + return 0; + } + + if (!rsctrl::chat::RequestMsgIds_IsValid(submsg)) + { + std::cerr << "RpcProtoChat::processMsg() SubMsg Mismatch - not processing"; + std::cerr << std::endl; + return 0; + } + + switch(submsg) + { + case rsctrl::chat::MsgId_RequestChatLobbies: + processReqChatLobbies(chan_id, msg_id, req_id, msg); + break; + case rsctrl::chat::MsgId_RequestCreateLobby: + processReqCreateLobby(chan_id, msg_id, req_id, msg); + break; + + case rsctrl::chat::MsgId_RequestJoinOrLeaveLobby: + processReqJoinOrLeaveLobby(chan_id, msg_id, req_id, msg); + break; + + case rsctrl::chat::MsgId_RequestSetLobbyNickname: + processReqSetLobbyNickname(chan_id, msg_id, req_id, msg); + break; + + case rsctrl::chat::MsgId_RequestRegisterEvents: + processReqRegisterEvents(chan_id, msg_id, req_id, msg); + break; + + case rsctrl::chat::MsgId_RequestSendMessage: + processReqSendMessage(chan_id, msg_id, req_id, msg); + break; + + + default: + std::cerr << "RpcProtoChat::processMsg() ERROR should never get here"; + std::cerr << std::endl; + return 0; + } + + /* must have matched id to get here */ + return 1; +} + + +// Registrations. +//#define REGISTRATION_EVENT_CHAT 1 + +int RpcProtoChat::processReqChatLobbies(uint32_t chan_id, uint32_t /*msg_id*/, uint32_t req_id, const std::string &msg) +{ + std::cerr << "RpcProtoChat::processReqChatLobbies()"; + std::cerr << std::endl; + + // parse msg. + rsctrl::chat::RequestChatLobbies req; + if (!req.ParseFromString(msg)) + { + std::cerr << "RpcProtoChat::processReqChatLobbies() ERROR ParseFromString()"; + std::cerr << std::endl; + return 0; + } + + // response. + rsctrl::chat::ResponseChatLobbies resp; + bool success = true; + std::string errorMsg; + + // set these flags from request. + bool fetch_chatlobbylist = true; + bool fetch_invites = true; + bool fetch_publiclobbies = true; + + switch(req.lobby_set()) + { + case rsctrl::chat::RequestChatLobbies::LOBBYSET_ALL: + std::cerr << "RpcProtoChat::processReqChatLobbies() LOBBYSET_ALL"; + std::cerr << std::endl; + fetch_chatlobbylist = true; + fetch_invites = true; + fetch_publiclobbies = true; + break; + case rsctrl::chat::RequestChatLobbies::LOBBYSET_JOINED: + std::cerr << "RpcProtoChat::processReqChatLobbies() LOBBYSET_JOINED"; + std::cerr << std::endl; + fetch_chatlobbylist = true; + fetch_invites = false; + fetch_publiclobbies = false; + break; + case rsctrl::chat::RequestChatLobbies::LOBBYSET_INVITED: + std::cerr << "RpcProtoChat::processReqChatLobbies() LOBBYSET_INVITED"; + std::cerr << std::endl; + fetch_chatlobbylist = false; + fetch_invites = true; + fetch_publiclobbies = false; + break; + case rsctrl::chat::RequestChatLobbies::LOBBYSET_PUBLIC: + std::cerr << "RpcProtoChat::processReqChatLobbies() LOBBYSET_PUBLIC"; + std::cerr << std::endl; + fetch_chatlobbylist = false; + fetch_invites = false; + fetch_publiclobbies = true; + break; + default: + std::cerr << "RpcProtoChat::processReqChatLobbies() LOBBYSET ERROR"; + std::cerr << std::endl; + success = false; + errorMsg = "Invalid Lobby Set"; + } + + + std::set done_lobbies; // list of ones we've added already (to avoid duplicates). + + if (fetch_chatlobbylist) + { + std::cerr << "RpcProtoChat::processReqChatLobbies() Fetching chatlobbylist"; + std::cerr << std::endl; + + std::list cl_info; + std::list::iterator it; + + rsMsgs->getChatLobbyList(cl_info); + + for(it = cl_info.begin(); it != cl_info.end(); it++) + { + rsctrl::chat::ChatLobbyInfo *lobby = resp.add_lobbies(); + fillLobbyInfoFromChatLobbyInfo(*it, lobby); + + done_lobbies.insert(it->lobby_id); + + std::cerr << "\t Added Lobby: " << it->lobby_id; + std::cerr << std::endl; + } + } + + /* This is before Public Lobbies - as knowing you have been invited is + * more important, than the full info that might be gleaned from lobby. + * In the future, we might try to merge the info. + */ + if (fetch_invites) + { + std::cerr << "RpcProtoChat::processReqChatLobbies() Fetching invites"; + std::cerr << std::endl; + + std::list invites; + std::list::iterator it; + rsMsgs->getPendingChatLobbyInvites(invites); + + for(it = invites.begin(); it != invites.end(); it++) + { + if (done_lobbies.find(it->lobby_id) == done_lobbies.end()) + { + rsctrl::chat::ChatLobbyInfo *lobby = resp.add_lobbies(); + fillLobbyInfoFromChatLobbyInvite(*it, lobby); + + done_lobbies.insert(it->lobby_id); + + std::cerr << "\t Added Lobby: " << it->lobby_id; + std::cerr << std::endl; + } + else + { + std::cerr << "\t Skipping Already Added Lobby: " << it->lobby_id; + std::cerr << std::endl; + } + } + } + + if (fetch_publiclobbies) + { + std::cerr << "RpcProtoChat::processReqChatLobbies() Fetching public lobbies"; + std::cerr << std::endl; + + std::vector public_lobbies; + std::vector::iterator it; + + rsMsgs->getListOfNearbyChatLobbies(public_lobbies); + + for(it = public_lobbies.begin(); it != public_lobbies.end(); it++) + { + if (done_lobbies.find(it->lobby_id) == done_lobbies.end()) + { + rsctrl::chat::ChatLobbyInfo *lobby = resp.add_lobbies(); + fillLobbyInfoFromPublicChatLobbyRecord(*it, lobby); + + done_lobbies.insert(it->lobby_id); + + std::cerr << "\t Added Lobby: " << it->lobby_id; + std::cerr << std::endl; + } + else + { + std::cerr << "\t Skipping Already Added Lobby: " << it->lobby_id; + std::cerr << std::endl; + } + } + } + + + /* DONE - Generate Reply */ + if (success) + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::SUCCESS); + } + else + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::FAILED); + status->set_msg(errorMsg); + } + + std::string outmsg; + if (!resp.SerializeToString(&outmsg)) + { + std::cerr << "RpcProtoChat::processReqChatLobbies() ERROR SerialiseToString()"; + std::cerr << std::endl; + return 0; + } + + // Correctly Name Message. + uint32_t out_msg_id = constructMsgId(rsctrl::core::CORE, rsctrl::core::CHAT, + rsctrl::chat::MsgId_ResponseChatLobbies, true); + + // queue it. + queueResponse(chan_id, out_msg_id, req_id, outmsg); + + return 1; +} + + + +int RpcProtoChat::processReqCreateLobby(uint32_t chan_id, uint32_t /*msg_id*/, uint32_t req_id, const std::string &msg) +{ + std::cerr << "RpcProtoChat::processReqCreateLobby()"; + std::cerr << std::endl; + + // parse msg. + rsctrl::chat::RequestCreateLobby req; + if (!req.ParseFromString(msg)) + { + std::cerr << "RpcProtoChat::processReqCreateLobby() ERROR ParseFromString()"; + std::cerr << std::endl; + return 0; + } + + // response. + rsctrl::chat::ResponseChatLobbies resp; + bool success = true; + std::string errorMsg; + + /* convert msg parameters into local ones */ + + std::string lobby_name = req.lobby_name(); + std::string lobby_topic = req.lobby_topic(); + std::list invited_friends; + uint32_t lobby_privacy_type; + + switch(req.privacy_level()) + { + case rsctrl::chat::PRIVACY_PRIVATE: + std::cerr << "\tCreating Private Lobby"; + std::cerr << std::endl; + lobby_privacy_type = RS_CHAT_LOBBY_PRIVACY_LEVEL_PRIVATE; + break; + case rsctrl::chat::PRIVACY_PUBLIC: + std::cerr << "\tCreating Public Lobby"; + std::cerr << std::endl; + lobby_privacy_type = RS_CHAT_LOBBY_PRIVACY_LEVEL_PUBLIC; + break; + default: + std::cerr << "ERROR invalid Privacy Level"; + std::cerr << std::endl; + + success = false; + errorMsg = "Invalid Privacy Level"; + } + + int no_invites = req.invited_friends_size(); + for(int i = 0; i < no_invites; i++) + { + std::string peer = req.invited_friends(i); + /* check that they are a valid friend */ + if (!rsPeers->isFriend(peer)) // checks SSL ID. + { + std::cerr << "ERROR invalid SSL Friend ID: " << peer; + std::cerr << std::endl; + + success = false; + errorMsg = "Invalid SSL Friend ID"; + break; + } + + std::cerr << "Adding Valid Friend to Invites: " << peer; + std::cerr << std::endl; + + invited_friends.push_back(peer); + } + + ChatLobbyId created_lobby_id = 0; + if (success) + { + created_lobby_id = rsMsgs->createChatLobby(lobby_name,lobby_topic, + invited_friends,lobby_privacy_type); + + std::cerr << "Created Lobby Id: " << created_lobby_id; + std::cerr << std::endl; + + std::list cl_info; + std::list::iterator it; + + rsMsgs->getChatLobbyList(cl_info); + + bool found_entry = false; + for(it = cl_info.begin(); it != cl_info.end(); it++) + { + if (it->lobby_id == created_lobby_id) + { + std::cerr << "Found Created Lobby Id: " << created_lobby_id; + std::cerr << std::endl; + + rsctrl::chat::ChatLobbyInfo *lobby = resp.add_lobbies(); + fillLobbyInfoFromChatLobbyInfo(*it, lobby); + found_entry = true; + break; + } + } + + if (!found_entry) + { + std::cerr << "FAILED TO FIND Created Lobby Id: " << created_lobby_id; + std::cerr << std::endl; + + success = false; + errorMsg = "Chat Lobby Creation appears to have failed"; + } + } + + /* DONE - Generate Reply */ + if (success) + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::SUCCESS); + } + else + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::FAILED); + status->set_msg(errorMsg); + } + + std::string outmsg; + if (!resp.SerializeToString(&outmsg)) + { + std::cerr << "RpcProtoChat::processReqCreateLobbies() ERROR SerialiseToString()"; + std::cerr << std::endl; + return 0; + } + + // Correctly Name Message. + uint32_t out_msg_id = constructMsgId(rsctrl::core::CORE, rsctrl::core::CHAT, + rsctrl::chat::MsgId_ResponseChatLobbies, true); + + // queue it. + queueResponse(chan_id, out_msg_id, req_id, outmsg); + + return 1; +} + + + +int RpcProtoChat::processReqJoinOrLeaveLobby(uint32_t chan_id, uint32_t /*msg_id*/, uint32_t req_id, const std::string &msg) +{ + std::cerr << "RpcProtoChat::processReqJoinOrLeaveLobby()"; + std::cerr << std::endl; + + // parse msg. + rsctrl::chat::RequestJoinOrLeaveLobby req; + if (!req.ParseFromString(msg)) + { + std::cerr << "RpcProtoChat::processReqJoinOrLeaveLobby() ERROR ParseFromString()"; + std::cerr << std::endl; + return 0; + } + + // response. + rsctrl::chat::ResponseChatLobbies resp; + bool success = false; + std::string errorMsg; + + /* convert msg parameters into local ones */ + ChatLobbyId lobby_id = 0; + convertStringToLobbyId(req.lobby_id(), lobby_id); + + std::cerr << "Requested Lobby is: " << lobby_id; + std::cerr << std::endl; + + /* now must work out if its an invite or an existing lobby */ + /* look for a pending invitation */ + bool isPendingInvite = false; + { + std::list invites; + std::list::iterator it; + rsMsgs->getPendingChatLobbyInvites(invites); + + for(it = invites.begin(); it != invites.end(); it++) + { + if (it->lobby_id == lobby_id) + { + std::cerr << "It is a Pending Invite" << lobby_id; + std::cerr << std::endl; + + isPendingInvite = true; + break; + } + } + } + + switch(req.action()) + { + case rsctrl::chat::RequestJoinOrLeaveLobby::JOIN_OR_ACCEPT: + { + std::cerr << "Request to JOIN_OR_ACCEPT"; + std::cerr << std::endl; + + if (isPendingInvite) + { + if (!rsMsgs->acceptLobbyInvite(lobby_id)) + { + std::cerr << "ERROR acceptLobbyInvite FAILED"; + std::cerr << std::endl; + + success = false; + errorMsg = "AcceptLobbyInvite returned False"; + } + } + else + { + if (!rsMsgs->joinPublicChatLobby(lobby_id)) + { + std::cerr << "ERROR joinPublicChatLobby FAILED"; + std::cerr << std::endl; + + success = false; + errorMsg = "joinPublicChatLobby returned False"; + } + } + + break; + } + case rsctrl::chat::RequestJoinOrLeaveLobby::LEAVE_OR_DENY: + { + std::cerr << "Request to LEAVE_OR_DENY (No fail codes!)"; + std::cerr << std::endl; + + if (isPendingInvite) + { + // return void - so can't check. + rsMsgs->denyLobbyInvite(lobby_id); + } + else + { + // return void - so can't check. + rsMsgs->unsubscribeChatLobby(lobby_id); + } + + break; + } + default: + success = false; + errorMsg = "Unknown Action"; + } + + + if (success && (req.action() == rsctrl::chat::RequestJoinOrLeaveLobby::JOIN_OR_ACCEPT)) + { + std::list cl_info; + std::list::iterator it; + + rsMsgs->getChatLobbyList(cl_info); + + bool found_entry = false; + for(it = cl_info.begin(); it != cl_info.end(); it++) + { + if (it->lobby_id == lobby_id) + { + rsctrl::chat::ChatLobbyInfo *lobby = resp.add_lobbies(); + fillLobbyInfoFromChatLobbyInfo(*it, lobby); + found_entry = true; + break; + } + } + + if (!found_entry) + { + success = false; + errorMsg = "Chat Lobby JOIN/ACCEPT appears to have failed"; + } + } + + /* DONE - Generate Reply */ + if (success) + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::SUCCESS); + } + else + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::FAILED); + status->set_msg(errorMsg); + } + + std::string outmsg; + if (!resp.SerializeToString(&outmsg)) + { + std::cerr << "RpcProtoChat::processReqCreateLobbies() ERROR SerialiseToString()"; + std::cerr << std::endl; + return 0; + } + + // Correctly Name Message. + uint32_t out_msg_id = constructMsgId(rsctrl::core::CORE, rsctrl::core::CHAT, + rsctrl::chat::MsgId_ResponseChatLobbies, true); + + // queue it. + queueResponse(chan_id, out_msg_id, req_id, outmsg); + + return 1; +} + + + +int RpcProtoChat::processReqSetLobbyNickname(uint32_t chan_id, uint32_t /*msg_id*/, uint32_t req_id, const std::string &msg) +{ + std::cerr << "RpcProtoChat::processReqSetLobbyNickname()"; + std::cerr << std::endl; + + // parse msg. + rsctrl::chat::RequestSetLobbyNickname req; + if (!req.ParseFromString(msg)) + { + std::cerr << "RpcProtoChat::processReqSetLobbyNickname() ERROR ParseFromString()"; + std::cerr << std::endl; + return 0; + } + + // response. + rsctrl::chat::ResponseSetLobbyNickname resp; + bool success = true; + std::string errorMsg; + + /* convert msg parameters into local ones */ + std::string nickname = req.nickname(); + + std::cerr << "choosen nickname is: " << nickname; + std::cerr << std::endl; + + int no_lobbyids = req.lobby_ids_size(); + for(int i = 0; i < no_lobbyids; i++) + { + std::string idstr = req.lobby_ids(i); + ChatLobbyId id = 0; + convertStringToLobbyId(idstr, id); + + std::cerr << "setting nickname for lobby: " << id; + std::cerr << std::endl; + + if (!rsMsgs->setNickNameForChatLobby(id, nickname)) + { + std::cerr << "ERROR setting nickname for lobby: " << id; + std::cerr << std::endl; + + success = false; + errorMsg = "Failed to Set one of the nicknames"; + break; + } + + } + + if (no_lobbyids == 0) + { + std::cerr << "setting default nickname"; + std::cerr << std::endl; + + /* just do default instead */ + rsMsgs->setDefaultNickNameForChatLobby(nickname); + } + + /* DONE - Generate Reply */ + if (success) + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::SUCCESS); + } + else + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::FAILED); + status->set_msg(errorMsg); + } + + std::string outmsg; + if (!resp.SerializeToString(&outmsg)) + { + std::cerr << "RpcProtoChat::processReqCreateLobbies() ERROR SerialiseToString()"; + std::cerr << std::endl; + return 0; + } + + // Correctly Name Message. + uint32_t out_msg_id = constructMsgId(rsctrl::core::CORE, rsctrl::core::CHAT, + rsctrl::chat::MsgId_ResponseSetLobbyNickname, true); + + // queue it. + queueResponse(chan_id, out_msg_id, req_id, outmsg); + + return 1; + +} + + + +int RpcProtoChat::processReqRegisterEvents(uint32_t chan_id, uint32_t /*msg_id*/, uint32_t req_id, const std::string &msg) +{ + std::cerr << "RpcProtoChat::processReqRegisterEvents()"; + std::cerr << std::endl; + + // parse msg. + rsctrl::chat::RequestRegisterEvents req; + if (!req.ParseFromString(msg)) + { + std::cerr << "RpcProtoChat::processReqRegisterEvents() ERROR ParseFromString()"; + std::cerr << std::endl; + return 0; + } + + // response. + rsctrl::chat::ResponseRegisterEvents resp; + bool success = true; + bool doregister = false; + std::string errorMsg; + + switch(req.action()) + { + case rsctrl::chat::RequestRegisterEvents::REGISTER: + doregister = true; + break; + case rsctrl::chat::RequestRegisterEvents::DEREGISTER: + doregister = false; + break; + default: + std::cerr << "ERROR action is invalid"; + std::cerr << std::endl; + + success = false; + errorMsg = "RegisterEvent.Action is invalid"; + break; + } + + if (success) + { + if (doregister) + { + std::cerr << "Registering for Chat Events"; + std::cerr << std::endl; + + registerForEvents(chan_id, req_id, REGISTRATION_EVENT_CHAT); + } + else + { + std::cerr << "Deregistering for Chat Events"; + std::cerr << std::endl; + + deregisterForEvents(chan_id, req_id, REGISTRATION_EVENT_CHAT); + } + printEventRegister(std::cerr); + } + + + /* DONE - Generate Reply */ + if (success) + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::SUCCESS); + } + else + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::FAILED); + status->set_msg(errorMsg); + } + + std::string outmsg; + if (!resp.SerializeToString(&outmsg)) + { + std::cerr << "RpcProtoChat::processReqCreateLobbies() ERROR SerialiseToString()"; + std::cerr << std::endl; + return 0; + } + + // Correctly Name Message. + uint32_t out_msg_id = constructMsgId(rsctrl::core::CORE, rsctrl::core::CHAT, + rsctrl::chat::MsgId_ResponseRegisterEvents, true); + + // queue it. + queueResponse(chan_id, out_msg_id, req_id, outmsg); + + return 1; +} + + + +int RpcProtoChat::processReqSendMessage(uint32_t chan_id, uint32_t /*msg_id*/, uint32_t req_id, const std::string &msg) +{ + std::cerr << "RpcProtoChat::processReqSendMessage()"; + std::cerr << std::endl; + + // parse msg. + rsctrl::chat::RequestSendMessage req; + if (!req.ParseFromString(msg)) + { + std::cerr << "RpcProtoChat::processReqSendMessage() ERROR ParseFromString()"; + std::cerr << std::endl; + return 0; + } + + // response. + rsctrl::chat::ResponseSendMessage resp; + bool success = true; + std::string errorMsg; + + // Send the message. + bool priv_or_lobby = true; + std::string chat_id; + std::wstring chat_msg; + convertUTF8toWString(req.msg().msg(), chat_msg); + + std::cerr << "Chat Message is: " << req.msg().msg(); + std::cerr << std::endl; + + /* switch depending on type */ + switch(req.msg().id().chat_type()) + { + case rsctrl::chat::TYPE_PRIVATE: + // easy one. + chat_id = req.msg().id().chat_id(); + priv_or_lobby = true; + + std::cerr << "Sending Private Chat"; + std::cerr << std::endl; + + + break; + case rsctrl::chat::TYPE_LOBBY: + { + std::cerr << "Sending Lobby Chat"; + std::cerr << std::endl; + + /* convert string->ChatLobbyId */ + ChatLobbyId lobby_id; + if (!convertStringToLobbyId(req.msg().id().chat_id(), lobby_id)) + { + std::cerr << "ERROR Failed conversion of Lobby Id"; + std::cerr << std::endl; + + success = false; + errorMsg = "Failed Conversion of Lobby Id"; + } + /* convert lobby id to virtual peer id */ + else if (!rsMsgs->getVirtualPeerId(lobby_id, chat_id)) + { + std::cerr << "ERROR Invalid Lobby Id"; + std::cerr << std::endl; + + success = false; + errorMsg = "Invalid Lobby Id"; + } + priv_or_lobby = true; + break; + } + case rsctrl::chat::TYPE_GROUP: + + std::cerr << "Sending Group Chat"; + std::cerr << std::endl; + + priv_or_lobby = false; + break; + default: + + std::cerr << "ERROR Chat Type invalid"; + std::cerr << std::endl; + + success = false; + errorMsg = "Invalid Chat Type"; + break; + } + + if (success) + { + if (priv_or_lobby) + { + rsMsgs->sendPrivateChat(chat_id, chat_msg); + } + else + { + rsMsgs->sendPublicChat(chat_msg); + } + } + + /* DONE - Generate Reply */ + + if (success) + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::SUCCESS); + } + else + { + rsctrl::core::Status *status = resp.mutable_status(); + status->set_code(rsctrl::core::Status::FAILED); + status->set_msg(errorMsg); + } + + std::string outmsg; + if (!resp.SerializeToString(&outmsg)) + { + std::cerr << "RpcProtoChat::processReqSendMessage() ERROR SerialiseToString()"; + std::cerr << std::endl; + return 0; + } + + // Correctly Name Message. + uint32_t out_msg_id = constructMsgId(rsctrl::core::CORE, rsctrl::core::CHAT, + rsctrl::chat::MsgId_ResponseSendMessage, true); + + // queue it. + queueResponse(chan_id, out_msg_id, req_id, outmsg); + + return 1; +} + + // EVENTS. +int RpcProtoChat::locked_checkForEvents(uint32_t event, const std::list ®istered, std::list &events) +{ + /* Wow - here already! */ + std::cerr << "locked_checkForEvents()"; + std::cerr << std::endl; + + /* only one event type for now */ + if (event != REGISTRATION_EVENT_CHAT) + { + std::cerr << "ERROR Invalid Chat Event Type"; + std::cerr << std::endl; + + /* error */ + return 0; + } + + /* possible events */ + /* TODO lobby invites. how do we make sure these are only sent once? */ + + // Likewise with Chat Queues -> We'll have to track which items have been sent + // to which Chan Ids.... a bit painful. + + /* public chat queues */ + if (rsMsgs->getPublicChatQueueCount() > 0) + { + std::cerr << "Fetching Public Chat Queue"; + std::cerr << std::endl; + + std::list chats; + rsMsgs->getPublicChatQueue(chats); + std::list::iterator it; + for(it = chats.begin(); it != chats.end(); it++) + { + std::cerr << "Public Chat from : " << it->rsid; + std::cerr << " name: " << it->peer_nickname; + std::cerr << std::endl; + { + std::string msg_utf8; + librs::util::ConvertUtf16ToUtf8(it->msg, msg_utf8); + std::cerr << " Msg: " << msg_utf8; + std::cerr << std::endl; + } + + /* must send to all registered clients */ + std::list::const_iterator rit; + for(rit = registered.begin(); rit != registered.end(); rit++) + { + RpcQueuedMsg qmsg; + rsctrl::chat::ChatType ctype = rsctrl::chat::TYPE_GROUP; + std::string chat_id = ""; // No ID for group. + + if (createQueuedEventSendMsg(*it, ctype, chat_id, *rit, qmsg)) + { + std::cerr << "Created MsgEvent"; + std::cerr << std::endl; + + events.push_back(qmsg); + } + else + { + std::cerr << "ERROR Creating MsgEvent"; + std::cerr << std::endl; + } + } + } + } + + + /* private chat queues */ + bool incoming = true; // ignore outgoing for now. (client can request that some other way) + if (rsMsgs->getPrivateChatQueueCount(incoming) > 0) + { + std::cerr << "Fetching Private Chat Queues"; + std::cerr << std::endl; + + std::list priv_chat_ids; + std::list::iterator cit; + rsMsgs->getPrivateChatQueueIds(incoming, priv_chat_ids); + for(cit = priv_chat_ids.begin(); cit != priv_chat_ids.end(); cit++) + { + std::list chats; + rsMsgs->getPrivateChatQueue(incoming, *cit, chats); + rsMsgs->clearPrivateChatQueue(incoming, *cit); + + // Default to Private. + rsctrl::chat::ChatType ctype = rsctrl::chat::TYPE_PRIVATE; + std::string chat_id = *cit; + + + // Check if its actually a LobbyId. + ChatLobbyId lobby_id; + if (rsMsgs->isLobbyId(*cit, lobby_id)) + { + ctype = rsctrl::chat::TYPE_LOBBY; + chat_id.clear(); + convertLobbyIdToString(lobby_id, chat_id); + + std::cerr << "Lobby Chat Queue: " << chat_id; + std::cerr << std::endl; + } + else + { + std::cerr << "Private Chat Queue: " << *cit; + std::cerr << std::endl; + } + + std::list::iterator it; + for(it = chats.begin(); it != chats.end(); it++) + { + std::cerr << "Private Chat from : " << it->rsid; + std::cerr << " name: " << it->peer_nickname; + std::cerr << std::endl; + { + std::string msg_utf8; + librs::util::ConvertUtf16ToUtf8(it->msg, msg_utf8); + std::cerr << " Msg: " << msg_utf8; + std::cerr << std::endl; + } + /* must send to all registered clients */ + std::list::const_iterator rit; + for(rit = registered.begin(); rit != registered.end(); rit++) + { + RpcQueuedMsg qmsg; + if (createQueuedEventSendMsg(*it, ctype, chat_id, *rit, qmsg)) + { + std::cerr << "Created MsgEvent"; + std::cerr << std::endl; + + events.push_back(qmsg); + } + else + { + std::cerr << "ERROR Creating MsgEvent"; + std::cerr << std::endl; + } + } + } + } + } + + return 1; +} + + +/***** HELPER FUNCTIONS *****/ + + + +bool fillLobbyInfoFromChatLobbyInfo(const ChatLobbyInfo &cli, rsctrl::chat::ChatLobbyInfo *lobby) +{ + /* convert info into response */ + std::string chat_id; + convertLobbyIdToString(cli.lobby_id, chat_id); + lobby->set_lobby_id(chat_id); + lobby->set_lobby_name(cli.lobby_name); + lobby->set_lobby_topic(cli.lobby_topic); + + /* see if there's a specific nickname for here */ + std::string nick; + if (!rsMsgs->getNickNameForChatLobby(cli.lobby_id,nick)) + { + rsMsgs->getDefaultNickNameForChatLobby(nick); + } + + lobby->set_lobby_nickname(nick); + + // Could be Private or Public. + if (cli.lobby_privacy_level & RS_CHAT_LOBBY_PRIVACY_LEVEL_PRIVATE) + { + lobby->set_privacy_level(rsctrl::chat::PRIVACY_PRIVATE); + } + else + { + lobby->set_privacy_level(rsctrl::chat::PRIVACY_PUBLIC); + } + lobby->set_lobby_state(rsctrl::chat::ChatLobbyInfo::LOBBYSTATE_JOINED); + + lobby->set_no_peers(cli.nick_names.size()); + + lobby->set_last_report_time(0); + lobby->set_last_activity(cli.last_activity); + + std::set::const_iterator pit; + for(pit = cli.participating_friends.begin(); pit != cli.participating_friends.begin(); pit++) + { + lobby->add_participating_friends(*pit); + } + + std::map::const_iterator mit; + for(mit = cli.nick_names.begin(); mit != cli.nick_names.begin(); mit++) + { + lobby->add_nicknames(mit->first); + } + return true; +} + + +bool fillLobbyInfoFromPublicChatLobbyRecord(const PublicChatLobbyRecord &pclr, rsctrl::chat::ChatLobbyInfo *lobby) +{ + /* convert info into response */ + std::string chat_id; + convertLobbyIdToString(pclr.lobby_id, chat_id); + lobby->set_lobby_id(chat_id); + lobby->set_lobby_name(pclr.lobby_name); + lobby->set_lobby_topic(pclr.lobby_topic); + + /* see if there's a specific nickname for here */ + std::string nick; + if (!rsMsgs->getNickNameForChatLobby(pclr.lobby_id,nick)) + { + rsMsgs->getDefaultNickNameForChatLobby(nick); + } + + lobby->set_lobby_nickname(nick); + + lobby->set_privacy_level(rsctrl::chat::PRIVACY_PUBLIC); + lobby->set_lobby_state(rsctrl::chat::ChatLobbyInfo::LOBBYSTATE_PUBLIC); + + lobby->set_no_peers(pclr.total_number_of_peers); + + lobby->set_last_report_time(pclr.last_report_time); + lobby->set_last_activity(0); // Unknown. + + std::set::const_iterator it; + for(it = pclr.participating_friends.begin(); it != pclr.participating_friends.begin(); it++) + { + lobby->add_participating_friends(*it); + } + + //lobby->add_nicknames(); // Unknown. + return true; +} + + +bool fillLobbyInfoFromChatLobbyInvite(const ChatLobbyInvite &cli, rsctrl::chat::ChatLobbyInfo *lobby) +{ + /* convert info into response */ + std::string chat_id; + convertLobbyIdToString(cli.lobby_id, chat_id); + lobby->set_lobby_id(chat_id); + lobby->set_lobby_name(cli.lobby_name); + lobby->set_lobby_topic(cli.lobby_topic); + + /* see if there's a specific nickname for here */ + std::string nick; + if (!rsMsgs->getNickNameForChatLobby(cli.lobby_id,nick)) + { + rsMsgs->getDefaultNickNameForChatLobby(nick); + } + + lobby->set_lobby_nickname(nick); + + // Can be invited to both Public and Private. + if (cli.lobby_privacy_level & RS_CHAT_LOBBY_PRIVACY_LEVEL_PRIVATE) + { + lobby->set_privacy_level(rsctrl::chat::PRIVACY_PRIVATE); + } + else + { + lobby->set_privacy_level(rsctrl::chat::PRIVACY_PUBLIC); + } + lobby->set_lobby_state(rsctrl::chat::ChatLobbyInfo::LOBBYSTATE_INVITED); + + lobby->set_no_peers(0); // Unknown. + + lobby->set_last_report_time(0); // Unknown + lobby->set_last_activity(0); // Unknown + + // Unknown, but we can fill in the inviting party here (the only one we know). + lobby->add_participating_friends(cli.peer_id); + //lobby->add_nicknames(); // Unknown. + return true; +} + + +bool createQueuedEventSendMsg(const ChatInfo &chatinfo, rsctrl::chat::ChatType ctype, + std::string chat_id, const RpcEventRegister &ereg, RpcQueuedMsg &qmsg) +{ + + rsctrl::chat::EventChatMessage event; + rsctrl::chat::ChatMessage *msg = event.mutable_msg(); + rsctrl::chat::ChatId *id = msg->mutable_id(); + + id->set_chat_type(ctype); + id->set_chat_id(chat_id); + + msg->set_peer_nickname(chatinfo.peer_nickname); + msg->set_chat_flags(chatinfo.chatflags); + msg->set_send_time(chatinfo.sendTime); + msg->set_recv_time(chatinfo.recvTime); + + std::string msg_utf8; + if (!convertWStringToUTF8(chatinfo.msg, msg_utf8)) + { + std::cerr << "RpcProtoChat::createQueuedEventSendMsg() ERROR Converting Msg"; + std::cerr << std::endl; + return false; + } + + msg->set_msg(msg_utf8); + + /* DONE - Generate Reply */ + std::string outmsg; + if (!event.SerializeToString(&outmsg)) + { + std::cerr << "RpcProtoChat::createQueuedEventSendMsg() ERROR SerialiseToString()"; + std::cerr << std::endl; + return false; + } + + // Correctly Name Message. + qmsg.mMsgId = constructMsgId(rsctrl::core::CORE, rsctrl::core::CHAT, + rsctrl::chat::MsgId_EventChatMessage, true); + + qmsg.mChanId = ereg.mChanId; + qmsg.mReqId = ereg.mReqId; + qmsg.mMsg = outmsg; + + return true; +} + +bool convertUTF8toWString(const std::string &msg_utf8, std::wstring &msg_wstr) +{ + return librs::util::ConvertUtf8ToUtf16(msg_utf8, msg_wstr); +} + +bool convertWStringToUTF8(const std::wstring &msg_wstr, std::string &msg_utf8) +{ + return librs::util::ConvertUtf16ToUtf8(msg_wstr, msg_utf8); +} + + +/* dependent on ChatLobbyId definition as uint64_t */ +bool convertStringToLobbyId(const std::string &chat_id, ChatLobbyId &lobby_id) +{ + if (1 != sscanf(chat_id.c_str(), UINT64FMT, &lobby_id)) + { + return false; + } + return true; +} + +bool convertLobbyIdToString(const ChatLobbyId &lobby_id, std::string &chat_id) +{ + rs_sprintf(chat_id, UINT64FMT, lobby_id); + return true; +} + + diff --git a/retroshare-nogui/src/rpc/proto/rpcprotochat.h b/retroshare-nogui/src/rpc/proto/rpcprotochat.h new file mode 100644 index 000000000..d42ab37de --- /dev/null +++ b/retroshare-nogui/src/rpc/proto/rpcprotochat.h @@ -0,0 +1,53 @@ +/* + * RetroShare External Interface. + * + * Copyright 2012-2012 by Robert Fernie. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License Version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. + * + * Please report all bugs and problems to "retroshare@lunamutt.com". + * + */ + + +#ifndef RS_RPC_PROTO_CHAT_H +#define RS_RPC_PROTO_CHAT_H + +#include "rpc/rpcserver.h" + +// Registrations. +#define REGISTRATION_EVENT_CHAT 1 + +class RpcProtoChat: public RpcQueueService +{ +public: + RpcProtoChat(uint32_t serviceId); + virtual int processMsg(uint32_t chan_id, uint32_t msgId, uint32_t req_id, const std::string &msg); + +protected: + + int processReqChatLobbies(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg); + int processReqCreateLobby(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg); + int processReqJoinOrLeaveLobby(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg); + int processReqSetLobbyNickname(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg); + int processReqRegisterEvents(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg); + int processReqSendMessage(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, const std::string &msg); + + // EVENTS. + virtual int locked_checkForEvents(uint32_t event, const std::list ®istered, std::list &events); +}; + + +#endif /* RS_PROTO_CHAT_H */ diff --git a/retroshare-nogui/src/rpc/rpcserver.cc b/retroshare-nogui/src/rpc/rpcserver.cc index 4b796097b..484a7576e 100644 --- a/retroshare-nogui/src/rpc/rpcserver.cc +++ b/retroshare-nogui/src/rpc/rpcserver.cc @@ -27,6 +27,16 @@ #include + + +bool operator<(const RpcUniqueId &a, const RpcUniqueId &b) +{ + if (a.mChanId == b.mChanId) + return (a.mReqId < b.mReqId); + return (a.mChanId < b.mChanId); +} + + RpcServer::RpcServer(RpcMediator *med) :mMediator(med), mRpcMtx("RpcMtx") { @@ -91,12 +101,13 @@ int RpcServer::processMsg(uint32_t chan_id, uint32_t msg_id, uint32_t req_id, co return 0; } -int RpcServer::queueRequest_locked(uint32_t /* chan_id */, uint32_t /* msgId */, uint32_t req_id, RpcService *service) +int RpcServer::queueRequest_locked(uint32_t chan_id, uint32_t /* msgId */, uint32_t req_id, RpcService *service) { std::cerr << "RpcServer::queueRequest_locked() req_id: " << req_id; std::cerr << std::endl; RpcQueuedObj obj; + obj.mChanId = chan_id; obj.mReqId = req_id; obj.mService = service; @@ -118,7 +129,7 @@ bool RpcServer::checkPending() std::list::iterator it; for(it = mRpcQueue.begin(); it != mRpcQueue.end();) { - uint32_t out_chan_id = 0; + uint32_t out_chan_id = it->mChanId; uint32_t out_msg_id = 0; uint32_t out_req_id = it->mReqId; std::string out_msg; @@ -216,10 +227,10 @@ void RpcQueueService::reset(uint32_t chan_id) RsStackMutex stack(mQueueMtx); /********** LOCKED MUTEX ***************/ - std::list toRemove; + std::list toRemove; // iterate through and remove only chan_id items. - std::map::iterator mit; + std::map::iterator mit; for(mit = mResponses.begin(); mit != mResponses.end(); mit++) { if (mit->second.mChanId == chan_id) @@ -227,7 +238,7 @@ void RpcQueueService::reset(uint32_t chan_id) } /* remove items */ - std::list::iterator rit; + std::list::iterator rit; for(rit = toRemove.begin(); rit != toRemove.end(); rit++) { mit = mResponses.find(*rit); @@ -242,15 +253,16 @@ int RpcQueueService::getResponse(uint32_t &chan_id, uint32_t &msg_id, uint32_t & { RsStackMutex stack(mQueueMtx); /********** LOCKED MUTEX ***************/ - std::map::iterator it; + std::map::iterator it; - it = mResponses.find(req_id); + RpcUniqueId uid(chan_id, req_id); + it = mResponses.find(uid); if (it == mResponses.end()) { return 0; } - chan_id = it->second.mChanId; + // chan_id & req_id are already set. msg_id = it->second.mMsgId; msg = it->second.mMsg; @@ -269,7 +281,8 @@ int RpcQueueService::queueResponse(uint32_t chan_id, uint32_t msg_id, uint32_t r qmsg.mReqId = req_id; qmsg.mMsg = msg; - mResponses[req_id] = qmsg; + RpcUniqueId uid(chan_id, req_id); + mResponses[uid] = qmsg; return 1; } @@ -297,7 +310,7 @@ int RpcQueueService::getEvents(std::list &events) return 1; } -int RpcQueueService::locked_checkForEvents(uint32_t event, const std::list ®istered, std::list &events) +int RpcQueueService::locked_checkForEvents(uint32_t event, const std::list ®istered, std::list & /* events */) { std::cerr << "RpcQueueService::locked_checkForEvents() NOT IMPLEMENTED"; std::cerr << std::endl; diff --git a/retroshare-nogui/src/rpc/rpcserver.h b/retroshare-nogui/src/rpc/rpcserver.h index f92b4b5aa..47c90ca29 100644 --- a/retroshare-nogui/src/rpc/rpcserver.h +++ b/retroshare-nogui/src/rpc/rpcserver.h @@ -45,6 +45,19 @@ uint32_t constructMsgId(uint8_t ext, uint16_t service, uint8_t submsg, bool is_r * Also allows a natural seperation of the full interface into sections. */ +// The Combination of ChanId & ReqId must be unique for each RPC call. +// This is used as an map index, so failure to make it unique, will lead to lost entries. +class RpcUniqueId +{ + public: + RpcUniqueId():mChanId(0), mReqId(0) {return;} + RpcUniqueId(uint32_t chan_id, uint32_t req_id):mChanId(chan_id), mReqId(req_id) {return;} + uint32_t mChanId; + uint32_t mReqId; +}; + +bool operator<(const RpcUniqueId &a, const RpcUniqueId &b); + class RpcQueuedMsg { public: @@ -67,6 +80,7 @@ public: virtual int getEvents(std::list & /* events */) { return 0; } /* 0 = none, optional feature */ }; + class RpcEventRegister { public: @@ -98,7 +112,7 @@ virtual int locked_checkForEvents(uint32_t event, const std::list mResponses; + std::map mResponses; std::map > mEventRegister; }; @@ -107,6 +121,7 @@ private: class RpcQueuedObj { public: + uint32_t mChanId; uint32_t mReqId; RpcService *mService; }; diff --git a/retroshare-nogui/src/rpc/rpcsetup.cc b/retroshare-nogui/src/rpc/rpcsetup.cc index 5451d7196..528f5b425 100644 --- a/retroshare-nogui/src/rpc/rpcsetup.cc +++ b/retroshare-nogui/src/rpc/rpcsetup.cc @@ -26,6 +26,7 @@ #include "rpc/proto/rpcprotopeers.h" #include "rpc/proto/rpcprotosystem.h" +#include "rpc/proto/rpcprotochat.h" #include "rpc/rpcecho.h" @@ -41,6 +42,9 @@ RpcMediator *CreateRpcSystem(RpcComms *comms) RpcProtoSystem *system = new RpcProtoSystem(1); server->addService(system); + RpcProtoChat *chat = new RpcProtoChat(1); + server->addService(chat); + /* Finally an Echo Service - which will echo back any unprocesses commands. */ RpcEcho *echo = new RpcEcho(1); server->addService(echo); diff --git a/retroshare-nogui/src/ssh/rssshd.cc b/retroshare-nogui/src/ssh/rssshd.cc index 94360baed..ff1ca5294 100644 --- a/retroshare-nogui/src/ssh/rssshd.cc +++ b/retroshare-nogui/src/ssh/rssshd.cc @@ -500,6 +500,8 @@ int RsSshd::doRpcSystem() } } + mRpcSystem->reset(dummy_chan_id); // cleanup old channel items. + std::cerr << "RsSshd::doRpcSystem() Finished"; std::cerr << std::endl;