diff --git a/pokerth.proto b/pokerth.proto index c4e4339b..5cbfdbd1 100644 --- a/pokerth.proto +++ b/pokerth.proto @@ -1,6 +1,6 @@ /***************************************************************************** * PokerTH - The open source texas holdem engine * - * Copyright (C) 2006-2012 Felix Hammer, Florian Thauer, Lothar May * + * Copyright (C) 2006-2013 Felix Hammer, Florian Thauer, Lothar May * * * * This program is free software: you can redistribute it and/or modify * * it under the terms of the GNU Affero General Public License as * @@ -240,6 +240,16 @@ message GameListPlayerLeftMessage { required uint32 playerId = 2; } +message GameListSpectatorJoinedMessage { + required uint32 gameId = 1; + required uint32 playerId = 2; +} + +message GameListSpectatorLeftMessage { + required uint32 gameId = 1; + required uint32 playerId = 2; +} + message GameListAdminChangedMessage { required uint32 gameId = 1; required uint32 newAdminPlayerId = 2; @@ -279,6 +289,7 @@ message JoinExistingGameMessage { required uint32 gameId = 1; optional string password = 2; optional bool autoLeave = 3; + optional bool spectateOnly = 4; } message JoinNewGameMessage { @@ -333,6 +344,17 @@ message GamePlayerLeftMessage { required GamePlayerLeftReason gamePlayerLeftReason = 3; } +message GameSpectatorJoinedMessage { + required uint32 gameId = 1; + required uint32 playerId = 2; +} + +message GameSpectatorLeftMessage { + required uint32 gameId = 1; + required uint32 playerId = 2; + required GamePlayerLeftMessage.GamePlayerLeftReason gameSpectatorLeftReason = 3; +} + message GameAdminChangedMessage { required uint32 gameId = 1; required uint32 newAdminPlayerId = 2; @@ -802,6 +824,10 @@ message PokerTHMessage { Type_AdminRemoveGameAckMessage = 75; Type_AdminBanPlayerMessage = 76; Type_AdminBanPlayerAckMessage = 77; + Type_GameListSpectatorJoinedMessage = 78; + Type_GameListSpectatorLeftMessage = 79; + Type_GameSpectatorJoinedMessage = 80; + Type_GameSpectatorLeftMessage = 81; } required PokerTHMessageType messageType = 1; @@ -882,4 +908,8 @@ message PokerTHMessage { optional AdminRemoveGameAckMessage adminRemoveGameAckMessage = 76; optional AdminBanPlayerMessage adminBanPlayerMessage = 77; optional AdminBanPlayerAckMessage adminBanPlayerAckMessage = 78; + optional GameListSpectatorJoinedMessage gameListSpectatorJoinedMessage = 79; + optional GameListSpectatorLeftMessage gameListSpectatorLeftMessage = 80; + optional GameSpectatorJoinedMessage gameSpectatorJoinedMessage = 81; + optional GameSpectatorLeftMessage gameSpectatorLeftMessage = 82; } diff --git a/src/net/common/netpacketvalidator.cpp b/src/net/common/netpacketvalidator.cpp index 978d0631..99621995 100644 --- a/src/net/common/netpacketvalidator.cpp +++ b/src/net/common/netpacketvalidator.cpp @@ -132,6 +132,10 @@ NetPacketValidator::NetPacketValidator() m_validationMap.insert(make_pair(PokerTHMessage_PokerTHMessageType_Type_AdminRemoveGameAckMessage, ValidateAdminRemoveGameAckMessage)); m_validationMap.insert(make_pair(PokerTHMessage_PokerTHMessageType_Type_AdminBanPlayerMessage, ValidateAdminBanPlayerMessage)); m_validationMap.insert(make_pair(PokerTHMessage_PokerTHMessageType_Type_AdminBanPlayerAckMessage, ValidateAdminBanPlayerAckMessage)); + m_validationMap.insert(make_pair(PokerTHMessage_PokerTHMessageType_Type_GameListSpectatorJoinedMessage, ValidateGameListSpectatorJoinedMessage)); + m_validationMap.insert(make_pair(PokerTHMessage_PokerTHMessageType_Type_GameListSpectatorLeftMessage, ValidateGameListSpectatorLeftMessage)); + m_validationMap.insert(make_pair(PokerTHMessage_PokerTHMessageType_Type_GameSpectatorJoinedMessage, ValidateGameSpectatorJoinedMessage)); + m_validationMap.insert(make_pair(PokerTHMessage_PokerTHMessageType_Type_GameSpectatorLeftMessage, ValidateGameSpectatorLeftMessage)); } bool @@ -1223,3 +1227,55 @@ NetPacketValidator::ValidateGameInfo(const NetGameInfo &gameInfo) return retVal; } +bool +NetPacketValidator::ValidateGameListSpectatorJoinedMessage(const NetPacket &packet) +{ + bool retVal = false; + if (packet.GetMsg()->has_gamelistspectatorjoinedmessage()) { + const GameListSpectatorJoinedMessage &msg = packet.GetMsg()->gamelistspectatorjoinedmessage(); + if (msg.gameid() != 0 && msg.playerid() != 0) { + retVal = true; + } + } + return retVal; +} + +bool +NetPacketValidator::ValidateGameListSpectatorLeftMessage(const NetPacket &packet) +{ + bool retVal = false; + if (packet.GetMsg()->has_gamelistspectatorleftmessage()) { + const GameListSpectatorLeftMessage &msg = packet.GetMsg()->gamelistspectatorleftmessage(); + if (msg.gameid() != 0 && msg.playerid() != 0) { + retVal = true; + } + } + return retVal; +} + +bool +NetPacketValidator::ValidateGameSpectatorJoinedMessage(const NetPacket &packet) +{ + bool retVal = false; + if (packet.GetMsg()->has_gamespectatorjoinedmessage()) { + const GameSpectatorJoinedMessage &msg = packet.GetMsg()->gamespectatorjoinedmessage(); + if (msg.gameid() != 0 && msg.playerid() != 0) { + retVal = true; + } + } + return retVal; +} + +bool +NetPacketValidator::ValidateGameSpectatorLeftMessage(const NetPacket &packet) +{ + bool retVal = false; + if (packet.GetMsg()->has_gamespectatorleftmessage()) { + const GameSpectatorLeftMessage &msg = packet.GetMsg()->gamespectatorleftmessage(); + if (msg.gameid() != 0 && msg.playerid() != 0) { + retVal = true; + } + } + return retVal; +} + diff --git a/src/net/netpacketvalidator.h b/src/net/netpacketvalidator.h index f290075d..fef4059e 100644 --- a/src/net/netpacketvalidator.h +++ b/src/net/netpacketvalidator.h @@ -123,6 +123,10 @@ protected: static bool ValidateAdminRemoveGameAckMessage(const NetPacket &packet); static bool ValidateAdminBanPlayerMessage(const NetPacket &packet); static bool ValidateAdminBanPlayerAckMessage(const NetPacket &packet); + static bool ValidateGameListSpectatorJoinedMessage(const NetPacket &packet); + static bool ValidateGameListSpectatorLeftMessage(const NetPacket &packet); + static bool ValidateGameSpectatorJoinedMessage(const NetPacket &packet); + static bool ValidateGameSpectatorLeftMessage(const NetPacket &packet); static bool ValidateGameInfo(const NetGameInfo &gameInfo); diff --git a/src/third_party/protobuf/pokerth.pb.cc b/src/third_party/protobuf/pokerth.pb.cc index 42296dfa..4a32f390 100644 --- a/src/third_party/protobuf/pokerth.pb.cc +++ b/src/third_party/protobuf/pokerth.pb.cc @@ -30,6 +30,8 @@ void protobuf_ShutdownFile_pokerth_2eproto() { delete GameListUpdateMessage::default_instance_; delete GameListPlayerJoinedMessage::default_instance_; delete GameListPlayerLeftMessage::default_instance_; + delete GameListSpectatorJoinedMessage::default_instance_; + delete GameListSpectatorLeftMessage::default_instance_; delete GameListAdminChangedMessage::default_instance_; delete PlayerInfoRequestMessage::default_instance_; delete PlayerInfoReplyMessage::default_instance_; @@ -43,6 +45,8 @@ void protobuf_ShutdownFile_pokerth_2eproto() { delete JoinGameFailedMessage::default_instance_; delete GamePlayerJoinedMessage::default_instance_; delete GamePlayerLeftMessage::default_instance_; + delete GameSpectatorJoinedMessage::default_instance_; + delete GameSpectatorLeftMessage::default_instance_; delete GameAdminChangedMessage::default_instance_; delete RemovedFromGameMessage::default_instance_; delete KickPlayerRequestMessage::default_instance_; @@ -125,6 +129,8 @@ void protobuf_AddDesc_pokerth_2eproto() { GameListUpdateMessage::default_instance_ = new GameListUpdateMessage(); GameListPlayerJoinedMessage::default_instance_ = new GameListPlayerJoinedMessage(); GameListPlayerLeftMessage::default_instance_ = new GameListPlayerLeftMessage(); + GameListSpectatorJoinedMessage::default_instance_ = new GameListSpectatorJoinedMessage(); + GameListSpectatorLeftMessage::default_instance_ = new GameListSpectatorLeftMessage(); GameListAdminChangedMessage::default_instance_ = new GameListAdminChangedMessage(); PlayerInfoRequestMessage::default_instance_ = new PlayerInfoRequestMessage(); PlayerInfoReplyMessage::default_instance_ = new PlayerInfoReplyMessage(); @@ -138,6 +144,8 @@ void protobuf_AddDesc_pokerth_2eproto() { JoinGameFailedMessage::default_instance_ = new JoinGameFailedMessage(); GamePlayerJoinedMessage::default_instance_ = new GamePlayerJoinedMessage(); GamePlayerLeftMessage::default_instance_ = new GamePlayerLeftMessage(); + GameSpectatorJoinedMessage::default_instance_ = new GameSpectatorJoinedMessage(); + GameSpectatorLeftMessage::default_instance_ = new GameSpectatorLeftMessage(); GameAdminChangedMessage::default_instance_ = new GameAdminChangedMessage(); RemovedFromGameMessage::default_instance_ = new RemovedFromGameMessage(); KickPlayerRequestMessage::default_instance_ = new KickPlayerRequestMessage(); @@ -212,6 +220,8 @@ void protobuf_AddDesc_pokerth_2eproto() { GameListUpdateMessage::default_instance_->InitAsDefaultInstance(); GameListPlayerJoinedMessage::default_instance_->InitAsDefaultInstance(); GameListPlayerLeftMessage::default_instance_->InitAsDefaultInstance(); + GameListSpectatorJoinedMessage::default_instance_->InitAsDefaultInstance(); + GameListSpectatorLeftMessage::default_instance_->InitAsDefaultInstance(); GameListAdminChangedMessage::default_instance_->InitAsDefaultInstance(); PlayerInfoRequestMessage::default_instance_->InitAsDefaultInstance(); PlayerInfoReplyMessage::default_instance_->InitAsDefaultInstance(); @@ -225,6 +235,8 @@ void protobuf_AddDesc_pokerth_2eproto() { JoinGameFailedMessage::default_instance_->InitAsDefaultInstance(); GamePlayerJoinedMessage::default_instance_->InitAsDefaultInstance(); GamePlayerLeftMessage::default_instance_->InitAsDefaultInstance(); + GameSpectatorJoinedMessage::default_instance_->InitAsDefaultInstance(); + GameSpectatorLeftMessage::default_instance_->InitAsDefaultInstance(); GameAdminChangedMessage::default_instance_->InitAsDefaultInstance(); RemovedFromGameMessage::default_instance_->InitAsDefaultInstance(); KickPlayerRequestMessage::default_instance_->InitAsDefaultInstance(); @@ -5320,6 +5332,394 @@ void GameListPlayerLeftMessage::Swap(GameListPlayerLeftMessage* other) { } +// =================================================================== + +#ifndef _MSC_VER +const int GameListSpectatorJoinedMessage::kGameIdFieldNumber; +const int GameListSpectatorJoinedMessage::kPlayerIdFieldNumber; +#endif // !_MSC_VER + +GameListSpectatorJoinedMessage::GameListSpectatorJoinedMessage() + : ::google::protobuf::MessageLite() { + SharedCtor(); +} + +void GameListSpectatorJoinedMessage::InitAsDefaultInstance() { +} + +GameListSpectatorJoinedMessage::GameListSpectatorJoinedMessage(const GameListSpectatorJoinedMessage& from) + : ::google::protobuf::MessageLite() { + SharedCtor(); + MergeFrom(from); +} + +void GameListSpectatorJoinedMessage::SharedCtor() { + _cached_size_ = 0; + gameid_ = 0u; + playerid_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +GameListSpectatorJoinedMessage::~GameListSpectatorJoinedMessage() { + SharedDtor(); +} + +void GameListSpectatorJoinedMessage::SharedDtor() { + if (this != default_instance_) { + } +} + +void GameListSpectatorJoinedMessage::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const GameListSpectatorJoinedMessage& GameListSpectatorJoinedMessage::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_pokerth_2eproto(); return *default_instance_; +} + +GameListSpectatorJoinedMessage* GameListSpectatorJoinedMessage::default_instance_ = NULL; + +GameListSpectatorJoinedMessage* GameListSpectatorJoinedMessage::New() const { + return new GameListSpectatorJoinedMessage; +} + +void GameListSpectatorJoinedMessage::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + gameid_ = 0u; + playerid_ = 0u; + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +bool GameListSpectatorJoinedMessage::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 uint32 gameId = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &gameid_))); + set_has_gameid(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(16)) goto parse_playerId; + break; + } + + // required uint32 playerId = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_playerId: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &playerid_))); + set_has_playerid(); + } 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::WireFormatLite::SkipField(input, tag)); + break; + } + } + } + return true; +#undef DO_ +} + +void GameListSpectatorJoinedMessage::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required uint32 gameId = 1; + if (has_gameid()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->gameid(), output); + } + + // required uint32 playerId = 2; + if (has_playerid()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->playerid(), output); + } + +} + +int GameListSpectatorJoinedMessage::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required uint32 gameId = 1; + if (has_gameid()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->gameid()); + } + + // required uint32 playerId = 2; + if (has_playerid()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->playerid()); + } + + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void GameListSpectatorJoinedMessage::CheckTypeAndMergeFrom( + const ::google::protobuf::MessageLite& from) { + MergeFrom(*::google::protobuf::down_cast(&from)); +} + +void GameListSpectatorJoinedMessage::MergeFrom(const GameListSpectatorJoinedMessage& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_gameid()) { + set_gameid(from.gameid()); + } + if (from.has_playerid()) { + set_playerid(from.playerid()); + } + } +} + +void GameListSpectatorJoinedMessage::CopyFrom(const GameListSpectatorJoinedMessage& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GameListSpectatorJoinedMessage::IsInitialized() const { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + return true; +} + +void GameListSpectatorJoinedMessage::Swap(GameListSpectatorJoinedMessage* other) { + if (other != this) { + std::swap(gameid_, other->gameid_); + std::swap(playerid_, other->playerid_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::std::string GameListSpectatorJoinedMessage::GetTypeName() const { + return "GameListSpectatorJoinedMessage"; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int GameListSpectatorLeftMessage::kGameIdFieldNumber; +const int GameListSpectatorLeftMessage::kPlayerIdFieldNumber; +#endif // !_MSC_VER + +GameListSpectatorLeftMessage::GameListSpectatorLeftMessage() + : ::google::protobuf::MessageLite() { + SharedCtor(); +} + +void GameListSpectatorLeftMessage::InitAsDefaultInstance() { +} + +GameListSpectatorLeftMessage::GameListSpectatorLeftMessage(const GameListSpectatorLeftMessage& from) + : ::google::protobuf::MessageLite() { + SharedCtor(); + MergeFrom(from); +} + +void GameListSpectatorLeftMessage::SharedCtor() { + _cached_size_ = 0; + gameid_ = 0u; + playerid_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +GameListSpectatorLeftMessage::~GameListSpectatorLeftMessage() { + SharedDtor(); +} + +void GameListSpectatorLeftMessage::SharedDtor() { + if (this != default_instance_) { + } +} + +void GameListSpectatorLeftMessage::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const GameListSpectatorLeftMessage& GameListSpectatorLeftMessage::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_pokerth_2eproto(); return *default_instance_; +} + +GameListSpectatorLeftMessage* GameListSpectatorLeftMessage::default_instance_ = NULL; + +GameListSpectatorLeftMessage* GameListSpectatorLeftMessage::New() const { + return new GameListSpectatorLeftMessage; +} + +void GameListSpectatorLeftMessage::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + gameid_ = 0u; + playerid_ = 0u; + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +bool GameListSpectatorLeftMessage::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 uint32 gameId = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &gameid_))); + set_has_gameid(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(16)) goto parse_playerId; + break; + } + + // required uint32 playerId = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_playerId: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &playerid_))); + set_has_playerid(); + } 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::WireFormatLite::SkipField(input, tag)); + break; + } + } + } + return true; +#undef DO_ +} + +void GameListSpectatorLeftMessage::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required uint32 gameId = 1; + if (has_gameid()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->gameid(), output); + } + + // required uint32 playerId = 2; + if (has_playerid()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->playerid(), output); + } + +} + +int GameListSpectatorLeftMessage::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required uint32 gameId = 1; + if (has_gameid()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->gameid()); + } + + // required uint32 playerId = 2; + if (has_playerid()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->playerid()); + } + + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void GameListSpectatorLeftMessage::CheckTypeAndMergeFrom( + const ::google::protobuf::MessageLite& from) { + MergeFrom(*::google::protobuf::down_cast(&from)); +} + +void GameListSpectatorLeftMessage::MergeFrom(const GameListSpectatorLeftMessage& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_gameid()) { + set_gameid(from.gameid()); + } + if (from.has_playerid()) { + set_playerid(from.playerid()); + } + } +} + +void GameListSpectatorLeftMessage::CopyFrom(const GameListSpectatorLeftMessage& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GameListSpectatorLeftMessage::IsInitialized() const { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + return true; +} + +void GameListSpectatorLeftMessage::Swap(GameListSpectatorLeftMessage* other) { + if (other != this) { + std::swap(gameid_, other->gameid_); + std::swap(playerid_, other->playerid_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::std::string GameListSpectatorLeftMessage::GetTypeName() const { + return "GameListSpectatorLeftMessage"; +} + + // =================================================================== #ifndef _MSC_VER @@ -6587,6 +6987,7 @@ void SubscriptionRequestMessage::Swap(SubscriptionRequestMessage* other) { const int JoinExistingGameMessage::kGameIdFieldNumber; const int JoinExistingGameMessage::kPasswordFieldNumber; const int JoinExistingGameMessage::kAutoLeaveFieldNumber; +const int JoinExistingGameMessage::kSpectateOnlyFieldNumber; #endif // !_MSC_VER JoinExistingGameMessage::JoinExistingGameMessage() @@ -6608,6 +7009,7 @@ void JoinExistingGameMessage::SharedCtor() { gameid_ = 0u; password_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); autoleave_ = false; + spectateonly_ = false; ::memset(_has_bits_, 0, sizeof(_has_bits_)); } @@ -6647,6 +7049,7 @@ void JoinExistingGameMessage::Clear() { } } autoleave_ = false; + spectateonly_ = false; } ::memset(_has_bits_, 0, sizeof(_has_bits_)); } @@ -6698,6 +7101,22 @@ bool JoinExistingGameMessage::MergePartialFromCodedStream( } else { goto handle_uninterpreted; } + if (input->ExpectTag(32)) goto parse_spectateOnly; + break; + } + + // optional bool spectateOnly = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_spectateOnly: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &spectateonly_))); + set_has_spectateonly(); + } else { + goto handle_uninterpreted; + } if (input->ExpectAtEnd()) return true; break; } @@ -6735,6 +7154,11 @@ void JoinExistingGameMessage::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->autoleave(), output); } + // optional bool spectateOnly = 4; + if (has_spectateonly()) { + ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->spectateonly(), output); + } + } int JoinExistingGameMessage::ByteSize() const { @@ -6760,6 +7184,11 @@ int JoinExistingGameMessage::ByteSize() const { total_size += 1 + 1; } + // optional bool spectateOnly = 4; + if (has_spectateonly()) { + total_size += 1 + 1; + } + } GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = total_size; @@ -6784,6 +7213,9 @@ void JoinExistingGameMessage::MergeFrom(const JoinExistingGameMessage& from) { if (from.has_autoleave()) { set_autoleave(from.autoleave()); } + if (from.has_spectateonly()) { + set_spectateonly(from.spectateonly()); + } } } @@ -6804,6 +7236,7 @@ void JoinExistingGameMessage::Swap(JoinExistingGameMessage* other) { std::swap(gameid_, other->gameid_); std::swap(password_, other->password_); std::swap(autoleave_, other->autoleave_); + std::swap(spectateonly_, other->spectateonly_); std::swap(_has_bits_[0], other->_has_bits_[0]); std::swap(_cached_size_, other->_cached_size_); } @@ -8188,6 +8621,432 @@ void GamePlayerLeftMessage::Swap(GamePlayerLeftMessage* other) { } +// =================================================================== + +#ifndef _MSC_VER +const int GameSpectatorJoinedMessage::kGameIdFieldNumber; +const int GameSpectatorJoinedMessage::kPlayerIdFieldNumber; +#endif // !_MSC_VER + +GameSpectatorJoinedMessage::GameSpectatorJoinedMessage() + : ::google::protobuf::MessageLite() { + SharedCtor(); +} + +void GameSpectatorJoinedMessage::InitAsDefaultInstance() { +} + +GameSpectatorJoinedMessage::GameSpectatorJoinedMessage(const GameSpectatorJoinedMessage& from) + : ::google::protobuf::MessageLite() { + SharedCtor(); + MergeFrom(from); +} + +void GameSpectatorJoinedMessage::SharedCtor() { + _cached_size_ = 0; + gameid_ = 0u; + playerid_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +GameSpectatorJoinedMessage::~GameSpectatorJoinedMessage() { + SharedDtor(); +} + +void GameSpectatorJoinedMessage::SharedDtor() { + if (this != default_instance_) { + } +} + +void GameSpectatorJoinedMessage::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const GameSpectatorJoinedMessage& GameSpectatorJoinedMessage::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_pokerth_2eproto(); return *default_instance_; +} + +GameSpectatorJoinedMessage* GameSpectatorJoinedMessage::default_instance_ = NULL; + +GameSpectatorJoinedMessage* GameSpectatorJoinedMessage::New() const { + return new GameSpectatorJoinedMessage; +} + +void GameSpectatorJoinedMessage::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + gameid_ = 0u; + playerid_ = 0u; + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +bool GameSpectatorJoinedMessage::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 uint32 gameId = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &gameid_))); + set_has_gameid(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(16)) goto parse_playerId; + break; + } + + // required uint32 playerId = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_playerId: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &playerid_))); + set_has_playerid(); + } 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::WireFormatLite::SkipField(input, tag)); + break; + } + } + } + return true; +#undef DO_ +} + +void GameSpectatorJoinedMessage::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required uint32 gameId = 1; + if (has_gameid()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->gameid(), output); + } + + // required uint32 playerId = 2; + if (has_playerid()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->playerid(), output); + } + +} + +int GameSpectatorJoinedMessage::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required uint32 gameId = 1; + if (has_gameid()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->gameid()); + } + + // required uint32 playerId = 2; + if (has_playerid()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->playerid()); + } + + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void GameSpectatorJoinedMessage::CheckTypeAndMergeFrom( + const ::google::protobuf::MessageLite& from) { + MergeFrom(*::google::protobuf::down_cast(&from)); +} + +void GameSpectatorJoinedMessage::MergeFrom(const GameSpectatorJoinedMessage& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_gameid()) { + set_gameid(from.gameid()); + } + if (from.has_playerid()) { + set_playerid(from.playerid()); + } + } +} + +void GameSpectatorJoinedMessage::CopyFrom(const GameSpectatorJoinedMessage& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GameSpectatorJoinedMessage::IsInitialized() const { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + return true; +} + +void GameSpectatorJoinedMessage::Swap(GameSpectatorJoinedMessage* other) { + if (other != this) { + std::swap(gameid_, other->gameid_); + std::swap(playerid_, other->playerid_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::std::string GameSpectatorJoinedMessage::GetTypeName() const { + return "GameSpectatorJoinedMessage"; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int GameSpectatorLeftMessage::kGameIdFieldNumber; +const int GameSpectatorLeftMessage::kPlayerIdFieldNumber; +const int GameSpectatorLeftMessage::kGameSpectatorLeftReasonFieldNumber; +#endif // !_MSC_VER + +GameSpectatorLeftMessage::GameSpectatorLeftMessage() + : ::google::protobuf::MessageLite() { + SharedCtor(); +} + +void GameSpectatorLeftMessage::InitAsDefaultInstance() { +} + +GameSpectatorLeftMessage::GameSpectatorLeftMessage(const GameSpectatorLeftMessage& from) + : ::google::protobuf::MessageLite() { + SharedCtor(); + MergeFrom(from); +} + +void GameSpectatorLeftMessage::SharedCtor() { + _cached_size_ = 0; + gameid_ = 0u; + playerid_ = 0u; + gamespectatorleftreason_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +GameSpectatorLeftMessage::~GameSpectatorLeftMessage() { + SharedDtor(); +} + +void GameSpectatorLeftMessage::SharedDtor() { + if (this != default_instance_) { + } +} + +void GameSpectatorLeftMessage::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const GameSpectatorLeftMessage& GameSpectatorLeftMessage::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_pokerth_2eproto(); return *default_instance_; +} + +GameSpectatorLeftMessage* GameSpectatorLeftMessage::default_instance_ = NULL; + +GameSpectatorLeftMessage* GameSpectatorLeftMessage::New() const { + return new GameSpectatorLeftMessage; +} + +void GameSpectatorLeftMessage::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + gameid_ = 0u; + playerid_ = 0u; + gamespectatorleftreason_ = 0; + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +bool GameSpectatorLeftMessage::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 uint32 gameId = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &gameid_))); + set_has_gameid(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(16)) goto parse_playerId; + break; + } + + // required uint32 playerId = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_playerId: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &playerid_))); + set_has_playerid(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(24)) goto parse_gameSpectatorLeftReason; + break; + } + + // required .GamePlayerLeftMessage.GamePlayerLeftReason gameSpectatorLeftReason = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_gameSpectatorLeftReason: + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::GamePlayerLeftMessage_GamePlayerLeftReason_IsValid(value)) { + set_gamespectatorleftreason(static_cast< ::GamePlayerLeftMessage_GamePlayerLeftReason >(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::WireFormatLite::SkipField(input, tag)); + break; + } + } + } + return true; +#undef DO_ +} + +void GameSpectatorLeftMessage::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required uint32 gameId = 1; + if (has_gameid()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->gameid(), output); + } + + // required uint32 playerId = 2; + if (has_playerid()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->playerid(), output); + } + + // required .GamePlayerLeftMessage.GamePlayerLeftReason gameSpectatorLeftReason = 3; + if (has_gamespectatorleftreason()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 3, this->gamespectatorleftreason(), output); + } + +} + +int GameSpectatorLeftMessage::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required uint32 gameId = 1; + if (has_gameid()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->gameid()); + } + + // required uint32 playerId = 2; + if (has_playerid()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->playerid()); + } + + // required .GamePlayerLeftMessage.GamePlayerLeftReason gameSpectatorLeftReason = 3; + if (has_gamespectatorleftreason()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->gamespectatorleftreason()); + } + + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void GameSpectatorLeftMessage::CheckTypeAndMergeFrom( + const ::google::protobuf::MessageLite& from) { + MergeFrom(*::google::protobuf::down_cast(&from)); +} + +void GameSpectatorLeftMessage::MergeFrom(const GameSpectatorLeftMessage& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_gameid()) { + set_gameid(from.gameid()); + } + if (from.has_playerid()) { + set_playerid(from.playerid()); + } + if (from.has_gamespectatorleftreason()) { + set_gamespectatorleftreason(from.gamespectatorleftreason()); + } + } +} + +void GameSpectatorLeftMessage::CopyFrom(const GameSpectatorLeftMessage& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GameSpectatorLeftMessage::IsInitialized() const { + if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false; + + return true; +} + +void GameSpectatorLeftMessage::Swap(GameSpectatorLeftMessage* other) { + if (other != this) { + std::swap(gameid_, other->gameid_); + std::swap(playerid_, other->playerid_); + std::swap(gamespectatorleftreason_, other->gamespectatorleftreason_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::std::string GameSpectatorLeftMessage::GetTypeName() const { + return "GameSpectatorLeftMessage"; +} + + // =================================================================== #ifndef _MSC_VER @@ -20226,6 +21085,10 @@ bool PokerTHMessage_PokerTHMessageType_IsValid(int value) { case 75: case 76: case 77: + case 78: + case 79: + case 80: + case 81: return true; default: return false; @@ -20310,6 +21173,10 @@ const PokerTHMessage_PokerTHMessageType PokerTHMessage::Type_AdminRemoveGameMess const PokerTHMessage_PokerTHMessageType PokerTHMessage::Type_AdminRemoveGameAckMessage; const PokerTHMessage_PokerTHMessageType PokerTHMessage::Type_AdminBanPlayerMessage; const PokerTHMessage_PokerTHMessageType PokerTHMessage::Type_AdminBanPlayerAckMessage; +const PokerTHMessage_PokerTHMessageType PokerTHMessage::Type_GameListSpectatorJoinedMessage; +const PokerTHMessage_PokerTHMessageType PokerTHMessage::Type_GameListSpectatorLeftMessage; +const PokerTHMessage_PokerTHMessageType PokerTHMessage::Type_GameSpectatorJoinedMessage; +const PokerTHMessage_PokerTHMessageType PokerTHMessage::Type_GameSpectatorLeftMessage; const PokerTHMessage_PokerTHMessageType PokerTHMessage::PokerTHMessageType_MIN; const PokerTHMessage_PokerTHMessageType PokerTHMessage::PokerTHMessageType_MAX; const int PokerTHMessage::PokerTHMessageType_ARRAYSIZE; @@ -20393,6 +21260,10 @@ const int PokerTHMessage::kAdminRemoveGameMessageFieldNumber; const int PokerTHMessage::kAdminRemoveGameAckMessageFieldNumber; const int PokerTHMessage::kAdminBanPlayerMessageFieldNumber; const int PokerTHMessage::kAdminBanPlayerAckMessageFieldNumber; +const int PokerTHMessage::kGameListSpectatorJoinedMessageFieldNumber; +const int PokerTHMessage::kGameListSpectatorLeftMessageFieldNumber; +const int PokerTHMessage::kGameSpectatorJoinedMessageFieldNumber; +const int PokerTHMessage::kGameSpectatorLeftMessageFieldNumber; #endif // !_MSC_VER PokerTHMessage::PokerTHMessage() @@ -20478,6 +21349,10 @@ void PokerTHMessage::InitAsDefaultInstance() { adminremovegameackmessage_ = const_cast< ::AdminRemoveGameAckMessage*>(&::AdminRemoveGameAckMessage::default_instance()); adminbanplayermessage_ = const_cast< ::AdminBanPlayerMessage*>(&::AdminBanPlayerMessage::default_instance()); adminbanplayerackmessage_ = const_cast< ::AdminBanPlayerAckMessage*>(&::AdminBanPlayerAckMessage::default_instance()); + gamelistspectatorjoinedmessage_ = const_cast< ::GameListSpectatorJoinedMessage*>(&::GameListSpectatorJoinedMessage::default_instance()); + gamelistspectatorleftmessage_ = const_cast< ::GameListSpectatorLeftMessage*>(&::GameListSpectatorLeftMessage::default_instance()); + gamespectatorjoinedmessage_ = const_cast< ::GameSpectatorJoinedMessage*>(&::GameSpectatorJoinedMessage::default_instance()); + gamespectatorleftmessage_ = const_cast< ::GameSpectatorLeftMessage*>(&::GameSpectatorLeftMessage::default_instance()); } PokerTHMessage::PokerTHMessage(const PokerTHMessage& from) @@ -20566,6 +21441,10 @@ void PokerTHMessage::SharedCtor() { adminremovegameackmessage_ = NULL; adminbanplayermessage_ = NULL; adminbanplayerackmessage_ = NULL; + gamelistspectatorjoinedmessage_ = NULL; + gamelistspectatorleftmessage_ = NULL; + gamespectatorjoinedmessage_ = NULL; + gamespectatorleftmessage_ = NULL; ::memset(_has_bits_, 0, sizeof(_has_bits_)); } @@ -20652,6 +21531,10 @@ void PokerTHMessage::SharedDtor() { delete adminremovegameackmessage_; delete adminbanplayermessage_; delete adminbanplayerackmessage_; + delete gamelistspectatorjoinedmessage_; + delete gamelistspectatorleftmessage_; + delete gamespectatorjoinedmessage_; + delete gamespectatorleftmessage_; } } @@ -20922,6 +21805,20 @@ void PokerTHMessage::Clear() { if (has_adminbanplayerackmessage()) { if (adminbanplayerackmessage_ != NULL) adminbanplayerackmessage_->::AdminBanPlayerAckMessage::Clear(); } + if (has_gamelistspectatorjoinedmessage()) { + if (gamelistspectatorjoinedmessage_ != NULL) gamelistspectatorjoinedmessage_->::GameListSpectatorJoinedMessage::Clear(); + } + if (has_gamelistspectatorleftmessage()) { + if (gamelistspectatorleftmessage_ != NULL) gamelistspectatorleftmessage_->::GameListSpectatorLeftMessage::Clear(); + } + } + if (_has_bits_[80 / 32] & (0xffu << (80 % 32))) { + if (has_gamespectatorjoinedmessage()) { + if (gamespectatorjoinedmessage_ != NULL) gamespectatorjoinedmessage_->::GameSpectatorJoinedMessage::Clear(); + } + if (has_gamespectatorleftmessage()) { + if (gamespectatorleftmessage_ != NULL) gamespectatorleftmessage_->::GameSpectatorLeftMessage::Clear(); + } } ::memset(_has_bits_, 0, sizeof(_has_bits_)); } @@ -22024,6 +22921,62 @@ bool PokerTHMessage::MergePartialFromCodedStream( } else { goto handle_uninterpreted; } + if (input->ExpectTag(634)) goto parse_gameListSpectatorJoinedMessage; + break; + } + + // optional .GameListSpectatorJoinedMessage gameListSpectatorJoinedMessage = 79; + case 79: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_gameListSpectatorJoinedMessage: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_gamelistspectatorjoinedmessage())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(642)) goto parse_gameListSpectatorLeftMessage; + break; + } + + // optional .GameListSpectatorLeftMessage gameListSpectatorLeftMessage = 80; + case 80: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_gameListSpectatorLeftMessage: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_gamelistspectatorleftmessage())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(650)) goto parse_gameSpectatorJoinedMessage; + break; + } + + // optional .GameSpectatorJoinedMessage gameSpectatorJoinedMessage = 81; + case 81: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_gameSpectatorJoinedMessage: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_gamespectatorjoinedmessage())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(658)) goto parse_gameSpectatorLeftMessage; + break; + } + + // optional .GameSpectatorLeftMessage gameSpectatorLeftMessage = 82; + case 82: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_gameSpectatorLeftMessage: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_gamespectatorleftmessage())); + } else { + goto handle_uninterpreted; + } if (input->ExpectAtEnd()) return true; break; } @@ -22513,6 +23466,30 @@ void PokerTHMessage::SerializeWithCachedSizes( 78, this->adminbanplayerackmessage(), output); } + // optional .GameListSpectatorJoinedMessage gameListSpectatorJoinedMessage = 79; + if (has_gamelistspectatorjoinedmessage()) { + ::google::protobuf::internal::WireFormatLite::WriteMessage( + 79, this->gamelistspectatorjoinedmessage(), output); + } + + // optional .GameListSpectatorLeftMessage gameListSpectatorLeftMessage = 80; + if (has_gamelistspectatorleftmessage()) { + ::google::protobuf::internal::WireFormatLite::WriteMessage( + 80, this->gamelistspectatorleftmessage(), output); + } + + // optional .GameSpectatorJoinedMessage gameSpectatorJoinedMessage = 81; + if (has_gamespectatorjoinedmessage()) { + ::google::protobuf::internal::WireFormatLite::WriteMessage( + 81, this->gamespectatorjoinedmessage(), output); + } + + // optional .GameSpectatorLeftMessage gameSpectatorLeftMessage = 82; + if (has_gamespectatorleftmessage()) { + ::google::protobuf::internal::WireFormatLite::WriteMessage( + 82, this->gamespectatorleftmessage(), output); + } + } int PokerTHMessage::ByteSize() const { @@ -23082,6 +24059,36 @@ int PokerTHMessage::ByteSize() const { this->adminbanplayerackmessage()); } + // optional .GameListSpectatorJoinedMessage gameListSpectatorJoinedMessage = 79; + if (has_gamelistspectatorjoinedmessage()) { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->gamelistspectatorjoinedmessage()); + } + + // optional .GameListSpectatorLeftMessage gameListSpectatorLeftMessage = 80; + if (has_gamelistspectatorleftmessage()) { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->gamelistspectatorleftmessage()); + } + + } + if (_has_bits_[80 / 32] & (0xffu << (80 % 32))) { + // optional .GameSpectatorJoinedMessage gameSpectatorJoinedMessage = 81; + if (has_gamespectatorjoinedmessage()) { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->gamespectatorjoinedmessage()); + } + + // optional .GameSpectatorLeftMessage gameSpectatorLeftMessage = 82; + if (has_gamespectatorleftmessage()) { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->gamespectatorleftmessage()); + } + } GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = total_size; @@ -23349,6 +24356,20 @@ void PokerTHMessage::MergeFrom(const PokerTHMessage& from) { if (from.has_adminbanplayerackmessage()) { mutable_adminbanplayerackmessage()->::AdminBanPlayerAckMessage::MergeFrom(from.adminbanplayerackmessage()); } + if (from.has_gamelistspectatorjoinedmessage()) { + mutable_gamelistspectatorjoinedmessage()->::GameListSpectatorJoinedMessage::MergeFrom(from.gamelistspectatorjoinedmessage()); + } + if (from.has_gamelistspectatorleftmessage()) { + mutable_gamelistspectatorleftmessage()->::GameListSpectatorLeftMessage::MergeFrom(from.gamelistspectatorleftmessage()); + } + } + if (from._has_bits_[80 / 32] & (0xffu << (80 % 32))) { + if (from.has_gamespectatorjoinedmessage()) { + mutable_gamespectatorjoinedmessage()->::GameSpectatorJoinedMessage::MergeFrom(from.gamespectatorjoinedmessage()); + } + if (from.has_gamespectatorleftmessage()) { + mutable_gamespectatorleftmessage()->::GameSpectatorLeftMessage::MergeFrom(from.gamespectatorleftmessage()); + } } } @@ -23583,6 +24604,18 @@ bool PokerTHMessage::IsInitialized() const { if (has_adminbanplayerackmessage()) { if (!this->adminbanplayerackmessage().IsInitialized()) return false; } + if (has_gamelistspectatorjoinedmessage()) { + if (!this->gamelistspectatorjoinedmessage().IsInitialized()) return false; + } + if (has_gamelistspectatorleftmessage()) { + if (!this->gamelistspectatorleftmessage().IsInitialized()) return false; + } + if (has_gamespectatorjoinedmessage()) { + if (!this->gamespectatorjoinedmessage().IsInitialized()) return false; + } + if (has_gamespectatorleftmessage()) { + if (!this->gamespectatorleftmessage().IsInitialized()) return false; + } return true; } @@ -23666,6 +24699,10 @@ void PokerTHMessage::Swap(PokerTHMessage* other) { std::swap(adminremovegameackmessage_, other->adminremovegameackmessage_); std::swap(adminbanplayermessage_, other->adminbanplayermessage_); std::swap(adminbanplayerackmessage_, other->adminbanplayerackmessage_); + std::swap(gamelistspectatorjoinedmessage_, other->gamelistspectatorjoinedmessage_); + std::swap(gamelistspectatorleftmessage_, other->gamelistspectatorleftmessage_); + std::swap(gamespectatorjoinedmessage_, other->gamespectatorjoinedmessage_); + std::swap(gamespectatorleftmessage_, other->gamespectatorleftmessage_); std::swap(_has_bits_[0], other->_has_bits_[0]); std::swap(_has_bits_[1], other->_has_bits_[1]); std::swap(_has_bits_[2], other->_has_bits_[2]); diff --git a/src/third_party/protobuf/pokerth.pb.h b/src/third_party/protobuf/pokerth.pb.h index 1907f63d..feb0c9a9 100644 --- a/src/third_party/protobuf/pokerth.pb.h +++ b/src/third_party/protobuf/pokerth.pb.h @@ -48,6 +48,8 @@ class GameListNewMessage; class GameListUpdateMessage; class GameListPlayerJoinedMessage; class GameListPlayerLeftMessage; +class GameListSpectatorJoinedMessage; +class GameListSpectatorLeftMessage; class GameListAdminChangedMessage; class PlayerInfoRequestMessage; class PlayerInfoReplyMessage; @@ -61,6 +63,8 @@ class JoinGameAckMessage; class JoinGameFailedMessage; class GamePlayerJoinedMessage; class GamePlayerLeftMessage; +class GameSpectatorJoinedMessage; +class GameSpectatorLeftMessage; class GameAdminChangedMessage; class RemovedFromGameMessage; class KickPlayerRequestMessage; @@ -457,11 +461,15 @@ enum PokerTHMessage_PokerTHMessageType { PokerTHMessage_PokerTHMessageType_Type_AdminRemoveGameMessage = 74, PokerTHMessage_PokerTHMessageType_Type_AdminRemoveGameAckMessage = 75, PokerTHMessage_PokerTHMessageType_Type_AdminBanPlayerMessage = 76, - PokerTHMessage_PokerTHMessageType_Type_AdminBanPlayerAckMessage = 77 + PokerTHMessage_PokerTHMessageType_Type_AdminBanPlayerAckMessage = 77, + PokerTHMessage_PokerTHMessageType_Type_GameListSpectatorJoinedMessage = 78, + PokerTHMessage_PokerTHMessageType_Type_GameListSpectatorLeftMessage = 79, + PokerTHMessage_PokerTHMessageType_Type_GameSpectatorJoinedMessage = 80, + PokerTHMessage_PokerTHMessageType_Type_GameSpectatorLeftMessage = 81 }; bool PokerTHMessage_PokerTHMessageType_IsValid(int value); const PokerTHMessage_PokerTHMessageType PokerTHMessage_PokerTHMessageType_PokerTHMessageType_MIN = PokerTHMessage_PokerTHMessageType_Type_AnnounceMessage; -const PokerTHMessage_PokerTHMessageType PokerTHMessage_PokerTHMessageType_PokerTHMessageType_MAX = PokerTHMessage_PokerTHMessageType_Type_AdminBanPlayerAckMessage; +const PokerTHMessage_PokerTHMessageType PokerTHMessage_PokerTHMessageType_PokerTHMessageType_MAX = PokerTHMessage_PokerTHMessageType_Type_GameSpectatorLeftMessage; const int PokerTHMessage_PokerTHMessageType_PokerTHMessageType_ARRAYSIZE = PokerTHMessage_PokerTHMessageType_PokerTHMessageType_MAX + 1; enum NetGameMode { @@ -2467,6 +2475,164 @@ class GameListPlayerLeftMessage : public ::google::protobuf::MessageLite { }; // ------------------------------------------------------------------- +class GameListSpectatorJoinedMessage : public ::google::protobuf::MessageLite { + public: + GameListSpectatorJoinedMessage(); + virtual ~GameListSpectatorJoinedMessage(); + + GameListSpectatorJoinedMessage(const GameListSpectatorJoinedMessage& from); + + inline GameListSpectatorJoinedMessage& operator=(const GameListSpectatorJoinedMessage& from) { + CopyFrom(from); + return *this; + } + + static const GameListSpectatorJoinedMessage& default_instance(); + + void Swap(GameListSpectatorJoinedMessage* other); + + // implements Message ---------------------------------------------- + + GameListSpectatorJoinedMessage* New() const; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); + void CopyFrom(const GameListSpectatorJoinedMessage& from); + void MergeFrom(const GameListSpectatorJoinedMessage& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::std::string GetTypeName() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required uint32 gameId = 1; + inline bool has_gameid() const; + inline void clear_gameid(); + static const int kGameIdFieldNumber = 1; + inline ::google::protobuf::uint32 gameid() const; + inline void set_gameid(::google::protobuf::uint32 value); + + // required uint32 playerId = 2; + inline bool has_playerid() const; + inline void clear_playerid(); + static const int kPlayerIdFieldNumber = 2; + inline ::google::protobuf::uint32 playerid() const; + inline void set_playerid(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:GameListSpectatorJoinedMessage) + private: + inline void set_has_gameid(); + inline void clear_has_gameid(); + inline void set_has_playerid(); + inline void clear_has_playerid(); + + ::google::protobuf::uint32 gameid_; + ::google::protobuf::uint32 playerid_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_pokerth_2eproto(); + friend void protobuf_AssignDesc_pokerth_2eproto(); + friend void protobuf_ShutdownFile_pokerth_2eproto(); + + void InitAsDefaultInstance(); + static GameListSpectatorJoinedMessage* default_instance_; +}; +// ------------------------------------------------------------------- + +class GameListSpectatorLeftMessage : public ::google::protobuf::MessageLite { + public: + GameListSpectatorLeftMessage(); + virtual ~GameListSpectatorLeftMessage(); + + GameListSpectatorLeftMessage(const GameListSpectatorLeftMessage& from); + + inline GameListSpectatorLeftMessage& operator=(const GameListSpectatorLeftMessage& from) { + CopyFrom(from); + return *this; + } + + static const GameListSpectatorLeftMessage& default_instance(); + + void Swap(GameListSpectatorLeftMessage* other); + + // implements Message ---------------------------------------------- + + GameListSpectatorLeftMessage* New() const; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); + void CopyFrom(const GameListSpectatorLeftMessage& from); + void MergeFrom(const GameListSpectatorLeftMessage& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::std::string GetTypeName() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required uint32 gameId = 1; + inline bool has_gameid() const; + inline void clear_gameid(); + static const int kGameIdFieldNumber = 1; + inline ::google::protobuf::uint32 gameid() const; + inline void set_gameid(::google::protobuf::uint32 value); + + // required uint32 playerId = 2; + inline bool has_playerid() const; + inline void clear_playerid(); + static const int kPlayerIdFieldNumber = 2; + inline ::google::protobuf::uint32 playerid() const; + inline void set_playerid(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:GameListSpectatorLeftMessage) + private: + inline void set_has_gameid(); + inline void clear_has_gameid(); + inline void set_has_playerid(); + inline void clear_has_playerid(); + + ::google::protobuf::uint32 gameid_; + ::google::protobuf::uint32 playerid_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_pokerth_2eproto(); + friend void protobuf_AssignDesc_pokerth_2eproto(); + friend void protobuf_ShutdownFile_pokerth_2eproto(); + + void InitAsDefaultInstance(); + static GameListSpectatorLeftMessage* default_instance_; +}; +// ------------------------------------------------------------------- + class GameListAdminChangedMessage : public ::google::protobuf::MessageLite { public: GameListAdminChangedMessage(); @@ -3054,6 +3220,13 @@ class JoinExistingGameMessage : public ::google::protobuf::MessageLite { inline bool autoleave() const; inline void set_autoleave(bool value); + // optional bool spectateOnly = 4; + inline bool has_spectateonly() const; + inline void clear_spectateonly(); + static const int kSpectateOnlyFieldNumber = 4; + inline bool spectateonly() const; + inline void set_spectateonly(bool value); + // @@protoc_insertion_point(class_scope:JoinExistingGameMessage) private: inline void set_has_gameid(); @@ -3062,13 +3235,16 @@ class JoinExistingGameMessage : public ::google::protobuf::MessageLite { inline void clear_has_password(); inline void set_has_autoleave(); inline void clear_has_autoleave(); + inline void set_has_spectateonly(); + inline void clear_has_spectateonly(); ::std::string* password_; ::google::protobuf::uint32 gameid_; bool autoleave_; + bool spectateonly_; mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; + ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; friend void protobuf_AddDesc_pokerth_2eproto(); friend void protobuf_AssignDesc_pokerth_2eproto(); @@ -3635,6 +3811,174 @@ class GamePlayerLeftMessage : public ::google::protobuf::MessageLite { }; // ------------------------------------------------------------------- +class GameSpectatorJoinedMessage : public ::google::protobuf::MessageLite { + public: + GameSpectatorJoinedMessage(); + virtual ~GameSpectatorJoinedMessage(); + + GameSpectatorJoinedMessage(const GameSpectatorJoinedMessage& from); + + inline GameSpectatorJoinedMessage& operator=(const GameSpectatorJoinedMessage& from) { + CopyFrom(from); + return *this; + } + + static const GameSpectatorJoinedMessage& default_instance(); + + void Swap(GameSpectatorJoinedMessage* other); + + // implements Message ---------------------------------------------- + + GameSpectatorJoinedMessage* New() const; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); + void CopyFrom(const GameSpectatorJoinedMessage& from); + void MergeFrom(const GameSpectatorJoinedMessage& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::std::string GetTypeName() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required uint32 gameId = 1; + inline bool has_gameid() const; + inline void clear_gameid(); + static const int kGameIdFieldNumber = 1; + inline ::google::protobuf::uint32 gameid() const; + inline void set_gameid(::google::protobuf::uint32 value); + + // required uint32 playerId = 2; + inline bool has_playerid() const; + inline void clear_playerid(); + static const int kPlayerIdFieldNumber = 2; + inline ::google::protobuf::uint32 playerid() const; + inline void set_playerid(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:GameSpectatorJoinedMessage) + private: + inline void set_has_gameid(); + inline void clear_has_gameid(); + inline void set_has_playerid(); + inline void clear_has_playerid(); + + ::google::protobuf::uint32 gameid_; + ::google::protobuf::uint32 playerid_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_pokerth_2eproto(); + friend void protobuf_AssignDesc_pokerth_2eproto(); + friend void protobuf_ShutdownFile_pokerth_2eproto(); + + void InitAsDefaultInstance(); + static GameSpectatorJoinedMessage* default_instance_; +}; +// ------------------------------------------------------------------- + +class GameSpectatorLeftMessage : public ::google::protobuf::MessageLite { + public: + GameSpectatorLeftMessage(); + virtual ~GameSpectatorLeftMessage(); + + GameSpectatorLeftMessage(const GameSpectatorLeftMessage& from); + + inline GameSpectatorLeftMessage& operator=(const GameSpectatorLeftMessage& from) { + CopyFrom(from); + return *this; + } + + static const GameSpectatorLeftMessage& default_instance(); + + void Swap(GameSpectatorLeftMessage* other); + + // implements Message ---------------------------------------------- + + GameSpectatorLeftMessage* New() const; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); + void CopyFrom(const GameSpectatorLeftMessage& from); + void MergeFrom(const GameSpectatorLeftMessage& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::std::string GetTypeName() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required uint32 gameId = 1; + inline bool has_gameid() const; + inline void clear_gameid(); + static const int kGameIdFieldNumber = 1; + inline ::google::protobuf::uint32 gameid() const; + inline void set_gameid(::google::protobuf::uint32 value); + + // required uint32 playerId = 2; + inline bool has_playerid() const; + inline void clear_playerid(); + static const int kPlayerIdFieldNumber = 2; + inline ::google::protobuf::uint32 playerid() const; + inline void set_playerid(::google::protobuf::uint32 value); + + // required .GamePlayerLeftMessage.GamePlayerLeftReason gameSpectatorLeftReason = 3; + inline bool has_gamespectatorleftreason() const; + inline void clear_gamespectatorleftreason(); + static const int kGameSpectatorLeftReasonFieldNumber = 3; + inline ::GamePlayerLeftMessage_GamePlayerLeftReason gamespectatorleftreason() const; + inline void set_gamespectatorleftreason(::GamePlayerLeftMessage_GamePlayerLeftReason value); + + // @@protoc_insertion_point(class_scope:GameSpectatorLeftMessage) + private: + inline void set_has_gameid(); + inline void clear_has_gameid(); + inline void set_has_playerid(); + inline void clear_has_playerid(); + inline void set_has_gamespectatorleftreason(); + inline void clear_has_gamespectatorleftreason(); + + ::google::protobuf::uint32 gameid_; + ::google::protobuf::uint32 playerid_; + int gamespectatorleftreason_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; + + friend void protobuf_AddDesc_pokerth_2eproto(); + friend void protobuf_AssignDesc_pokerth_2eproto(); + friend void protobuf_ShutdownFile_pokerth_2eproto(); + + void InitAsDefaultInstance(); + static GameSpectatorLeftMessage* default_instance_; +}; +// ------------------------------------------------------------------- + class GameAdminChangedMessage : public ::google::protobuf::MessageLite { public: GameAdminChangedMessage(); @@ -8598,6 +8942,10 @@ class PokerTHMessage : public ::google::protobuf::MessageLite { static const PokerTHMessageType Type_AdminRemoveGameAckMessage = PokerTHMessage_PokerTHMessageType_Type_AdminRemoveGameAckMessage; static const PokerTHMessageType Type_AdminBanPlayerMessage = PokerTHMessage_PokerTHMessageType_Type_AdminBanPlayerMessage; static const PokerTHMessageType Type_AdminBanPlayerAckMessage = PokerTHMessage_PokerTHMessageType_Type_AdminBanPlayerAckMessage; + static const PokerTHMessageType Type_GameListSpectatorJoinedMessage = PokerTHMessage_PokerTHMessageType_Type_GameListSpectatorJoinedMessage; + static const PokerTHMessageType Type_GameListSpectatorLeftMessage = PokerTHMessage_PokerTHMessageType_Type_GameListSpectatorLeftMessage; + static const PokerTHMessageType Type_GameSpectatorJoinedMessage = PokerTHMessage_PokerTHMessageType_Type_GameSpectatorJoinedMessage; + static const PokerTHMessageType Type_GameSpectatorLeftMessage = PokerTHMessage_PokerTHMessageType_Type_GameSpectatorLeftMessage; static inline bool PokerTHMessageType_IsValid(int value) { return PokerTHMessage_PokerTHMessageType_IsValid(value); } @@ -9233,6 +9581,38 @@ class PokerTHMessage : public ::google::protobuf::MessageLite { inline ::AdminBanPlayerAckMessage* mutable_adminbanplayerackmessage(); inline ::AdminBanPlayerAckMessage* release_adminbanplayerackmessage(); + // optional .GameListSpectatorJoinedMessage gameListSpectatorJoinedMessage = 79; + inline bool has_gamelistspectatorjoinedmessage() const; + inline void clear_gamelistspectatorjoinedmessage(); + static const int kGameListSpectatorJoinedMessageFieldNumber = 79; + inline const ::GameListSpectatorJoinedMessage& gamelistspectatorjoinedmessage() const; + inline ::GameListSpectatorJoinedMessage* mutable_gamelistspectatorjoinedmessage(); + inline ::GameListSpectatorJoinedMessage* release_gamelistspectatorjoinedmessage(); + + // optional .GameListSpectatorLeftMessage gameListSpectatorLeftMessage = 80; + inline bool has_gamelistspectatorleftmessage() const; + inline void clear_gamelistspectatorleftmessage(); + static const int kGameListSpectatorLeftMessageFieldNumber = 80; + inline const ::GameListSpectatorLeftMessage& gamelistspectatorleftmessage() const; + inline ::GameListSpectatorLeftMessage* mutable_gamelistspectatorleftmessage(); + inline ::GameListSpectatorLeftMessage* release_gamelistspectatorleftmessage(); + + // optional .GameSpectatorJoinedMessage gameSpectatorJoinedMessage = 81; + inline bool has_gamespectatorjoinedmessage() const; + inline void clear_gamespectatorjoinedmessage(); + static const int kGameSpectatorJoinedMessageFieldNumber = 81; + inline const ::GameSpectatorJoinedMessage& gamespectatorjoinedmessage() const; + inline ::GameSpectatorJoinedMessage* mutable_gamespectatorjoinedmessage(); + inline ::GameSpectatorJoinedMessage* release_gamespectatorjoinedmessage(); + + // optional .GameSpectatorLeftMessage gameSpectatorLeftMessage = 82; + inline bool has_gamespectatorleftmessage() const; + inline void clear_gamespectatorleftmessage(); + static const int kGameSpectatorLeftMessageFieldNumber = 82; + inline const ::GameSpectatorLeftMessage& gamespectatorleftmessage() const; + inline ::GameSpectatorLeftMessage* mutable_gamespectatorleftmessage(); + inline ::GameSpectatorLeftMessage* release_gamespectatorleftmessage(); + // @@protoc_insertion_point(class_scope:PokerTHMessage) private: inline void set_has_messagetype(); @@ -9391,6 +9771,14 @@ class PokerTHMessage : public ::google::protobuf::MessageLite { inline void clear_has_adminbanplayermessage(); inline void set_has_adminbanplayerackmessage(); inline void clear_has_adminbanplayerackmessage(); + inline void set_has_gamelistspectatorjoinedmessage(); + inline void clear_has_gamelistspectatorjoinedmessage(); + inline void set_has_gamelistspectatorleftmessage(); + inline void clear_has_gamelistspectatorleftmessage(); + inline void set_has_gamespectatorjoinedmessage(); + inline void clear_has_gamespectatorjoinedmessage(); + inline void set_has_gamespectatorleftmessage(); + inline void clear_has_gamespectatorleftmessage(); ::AnnounceMessage* announcemessage_; ::InitMessage* initmessage_; @@ -9469,10 +9857,14 @@ class PokerTHMessage : public ::google::protobuf::MessageLite { ::AdminRemoveGameAckMessage* adminremovegameackmessage_; ::AdminBanPlayerMessage* adminbanplayermessage_; ::AdminBanPlayerAckMessage* adminbanplayerackmessage_; + ::GameListSpectatorJoinedMessage* gamelistspectatorjoinedmessage_; + ::GameListSpectatorLeftMessage* gamelistspectatorleftmessage_; + ::GameSpectatorJoinedMessage* gamespectatorjoinedmessage_; + ::GameSpectatorLeftMessage* gamespectatorleftmessage_; int messagetype_; mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(78 + 31) / 32]; + ::google::protobuf::uint32 _has_bits_[(82 + 31) / 32]; friend void protobuf_AddDesc_pokerth_2eproto(); friend void protobuf_AssignDesc_pokerth_2eproto(); @@ -11528,6 +11920,102 @@ inline void GameListPlayerLeftMessage::set_playerid(::google::protobuf::uint32 v // ------------------------------------------------------------------- +// GameListSpectatorJoinedMessage + +// required uint32 gameId = 1; +inline bool GameListSpectatorJoinedMessage::has_gameid() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void GameListSpectatorJoinedMessage::set_has_gameid() { + _has_bits_[0] |= 0x00000001u; +} +inline void GameListSpectatorJoinedMessage::clear_has_gameid() { + _has_bits_[0] &= ~0x00000001u; +} +inline void GameListSpectatorJoinedMessage::clear_gameid() { + gameid_ = 0u; + clear_has_gameid(); +} +inline ::google::protobuf::uint32 GameListSpectatorJoinedMessage::gameid() const { + return gameid_; +} +inline void GameListSpectatorJoinedMessage::set_gameid(::google::protobuf::uint32 value) { + set_has_gameid(); + gameid_ = value; +} + +// required uint32 playerId = 2; +inline bool GameListSpectatorJoinedMessage::has_playerid() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void GameListSpectatorJoinedMessage::set_has_playerid() { + _has_bits_[0] |= 0x00000002u; +} +inline void GameListSpectatorJoinedMessage::clear_has_playerid() { + _has_bits_[0] &= ~0x00000002u; +} +inline void GameListSpectatorJoinedMessage::clear_playerid() { + playerid_ = 0u; + clear_has_playerid(); +} +inline ::google::protobuf::uint32 GameListSpectatorJoinedMessage::playerid() const { + return playerid_; +} +inline void GameListSpectatorJoinedMessage::set_playerid(::google::protobuf::uint32 value) { + set_has_playerid(); + playerid_ = value; +} + +// ------------------------------------------------------------------- + +// GameListSpectatorLeftMessage + +// required uint32 gameId = 1; +inline bool GameListSpectatorLeftMessage::has_gameid() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void GameListSpectatorLeftMessage::set_has_gameid() { + _has_bits_[0] |= 0x00000001u; +} +inline void GameListSpectatorLeftMessage::clear_has_gameid() { + _has_bits_[0] &= ~0x00000001u; +} +inline void GameListSpectatorLeftMessage::clear_gameid() { + gameid_ = 0u; + clear_has_gameid(); +} +inline ::google::protobuf::uint32 GameListSpectatorLeftMessage::gameid() const { + return gameid_; +} +inline void GameListSpectatorLeftMessage::set_gameid(::google::protobuf::uint32 value) { + set_has_gameid(); + gameid_ = value; +} + +// required uint32 playerId = 2; +inline bool GameListSpectatorLeftMessage::has_playerid() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void GameListSpectatorLeftMessage::set_has_playerid() { + _has_bits_[0] |= 0x00000002u; +} +inline void GameListSpectatorLeftMessage::clear_has_playerid() { + _has_bits_[0] &= ~0x00000002u; +} +inline void GameListSpectatorLeftMessage::clear_playerid() { + playerid_ = 0u; + clear_has_playerid(); +} +inline ::google::protobuf::uint32 GameListSpectatorLeftMessage::playerid() const { + return playerid_; +} +inline void GameListSpectatorLeftMessage::set_playerid(::google::protobuf::uint32 value) { + set_has_playerid(); + playerid_ = value; +} + +// ------------------------------------------------------------------- + // GameListAdminChangedMessage // required uint32 gameId = 1; @@ -12070,6 +12558,28 @@ inline void JoinExistingGameMessage::set_autoleave(bool value) { autoleave_ = value; } +// optional bool spectateOnly = 4; +inline bool JoinExistingGameMessage::has_spectateonly() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void JoinExistingGameMessage::set_has_spectateonly() { + _has_bits_[0] |= 0x00000008u; +} +inline void JoinExistingGameMessage::clear_has_spectateonly() { + _has_bits_[0] &= ~0x00000008u; +} +inline void JoinExistingGameMessage::clear_spectateonly() { + spectateonly_ = false; + clear_has_spectateonly(); +} +inline bool JoinExistingGameMessage::spectateonly() const { + return spectateonly_; +} +inline void JoinExistingGameMessage::set_spectateonly(bool value) { + set_has_spectateonly(); + spectateonly_ = value; +} + // ------------------------------------------------------------------- // JoinNewGameMessage @@ -12500,6 +13010,125 @@ inline void GamePlayerLeftMessage::set_gameplayerleftreason(::GamePlayerLeftMess // ------------------------------------------------------------------- +// GameSpectatorJoinedMessage + +// required uint32 gameId = 1; +inline bool GameSpectatorJoinedMessage::has_gameid() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void GameSpectatorJoinedMessage::set_has_gameid() { + _has_bits_[0] |= 0x00000001u; +} +inline void GameSpectatorJoinedMessage::clear_has_gameid() { + _has_bits_[0] &= ~0x00000001u; +} +inline void GameSpectatorJoinedMessage::clear_gameid() { + gameid_ = 0u; + clear_has_gameid(); +} +inline ::google::protobuf::uint32 GameSpectatorJoinedMessage::gameid() const { + return gameid_; +} +inline void GameSpectatorJoinedMessage::set_gameid(::google::protobuf::uint32 value) { + set_has_gameid(); + gameid_ = value; +} + +// required uint32 playerId = 2; +inline bool GameSpectatorJoinedMessage::has_playerid() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void GameSpectatorJoinedMessage::set_has_playerid() { + _has_bits_[0] |= 0x00000002u; +} +inline void GameSpectatorJoinedMessage::clear_has_playerid() { + _has_bits_[0] &= ~0x00000002u; +} +inline void GameSpectatorJoinedMessage::clear_playerid() { + playerid_ = 0u; + clear_has_playerid(); +} +inline ::google::protobuf::uint32 GameSpectatorJoinedMessage::playerid() const { + return playerid_; +} +inline void GameSpectatorJoinedMessage::set_playerid(::google::protobuf::uint32 value) { + set_has_playerid(); + playerid_ = value; +} + +// ------------------------------------------------------------------- + +// GameSpectatorLeftMessage + +// required uint32 gameId = 1; +inline bool GameSpectatorLeftMessage::has_gameid() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void GameSpectatorLeftMessage::set_has_gameid() { + _has_bits_[0] |= 0x00000001u; +} +inline void GameSpectatorLeftMessage::clear_has_gameid() { + _has_bits_[0] &= ~0x00000001u; +} +inline void GameSpectatorLeftMessage::clear_gameid() { + gameid_ = 0u; + clear_has_gameid(); +} +inline ::google::protobuf::uint32 GameSpectatorLeftMessage::gameid() const { + return gameid_; +} +inline void GameSpectatorLeftMessage::set_gameid(::google::protobuf::uint32 value) { + set_has_gameid(); + gameid_ = value; +} + +// required uint32 playerId = 2; +inline bool GameSpectatorLeftMessage::has_playerid() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void GameSpectatorLeftMessage::set_has_playerid() { + _has_bits_[0] |= 0x00000002u; +} +inline void GameSpectatorLeftMessage::clear_has_playerid() { + _has_bits_[0] &= ~0x00000002u; +} +inline void GameSpectatorLeftMessage::clear_playerid() { + playerid_ = 0u; + clear_has_playerid(); +} +inline ::google::protobuf::uint32 GameSpectatorLeftMessage::playerid() const { + return playerid_; +} +inline void GameSpectatorLeftMessage::set_playerid(::google::protobuf::uint32 value) { + set_has_playerid(); + playerid_ = value; +} + +// required .GamePlayerLeftMessage.GamePlayerLeftReason gameSpectatorLeftReason = 3; +inline bool GameSpectatorLeftMessage::has_gamespectatorleftreason() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void GameSpectatorLeftMessage::set_has_gamespectatorleftreason() { + _has_bits_[0] |= 0x00000004u; +} +inline void GameSpectatorLeftMessage::clear_has_gamespectatorleftreason() { + _has_bits_[0] &= ~0x00000004u; +} +inline void GameSpectatorLeftMessage::clear_gamespectatorleftreason() { + gamespectatorleftreason_ = 0; + clear_has_gamespectatorleftreason(); +} +inline ::GamePlayerLeftMessage_GamePlayerLeftReason GameSpectatorLeftMessage::gamespectatorleftreason() const { + return static_cast< ::GamePlayerLeftMessage_GamePlayerLeftReason >(gamespectatorleftreason_); +} +inline void GameSpectatorLeftMessage::set_gamespectatorleftreason(::GamePlayerLeftMessage_GamePlayerLeftReason value) { + GOOGLE_DCHECK(::GamePlayerLeftMessage_GamePlayerLeftReason_IsValid(value)); + set_has_gamespectatorleftreason(); + gamespectatorleftreason_ = value; +} + +// ------------------------------------------------------------------- + // GameAdminChangedMessage // required uint32 gameId = 1; @@ -18283,6 +18912,122 @@ inline ::AdminBanPlayerAckMessage* PokerTHMessage::release_adminbanplayerackmess return temp; } +// optional .GameListSpectatorJoinedMessage gameListSpectatorJoinedMessage = 79; +inline bool PokerTHMessage::has_gamelistspectatorjoinedmessage() const { + return (_has_bits_[2] & 0x00004000u) != 0; +} +inline void PokerTHMessage::set_has_gamelistspectatorjoinedmessage() { + _has_bits_[2] |= 0x00004000u; +} +inline void PokerTHMessage::clear_has_gamelistspectatorjoinedmessage() { + _has_bits_[2] &= ~0x00004000u; +} +inline void PokerTHMessage::clear_gamelistspectatorjoinedmessage() { + if (gamelistspectatorjoinedmessage_ != NULL) gamelistspectatorjoinedmessage_->::GameListSpectatorJoinedMessage::Clear(); + clear_has_gamelistspectatorjoinedmessage(); +} +inline const ::GameListSpectatorJoinedMessage& PokerTHMessage::gamelistspectatorjoinedmessage() const { + return gamelistspectatorjoinedmessage_ != NULL ? *gamelistspectatorjoinedmessage_ : *default_instance_->gamelistspectatorjoinedmessage_; +} +inline ::GameListSpectatorJoinedMessage* PokerTHMessage::mutable_gamelistspectatorjoinedmessage() { + set_has_gamelistspectatorjoinedmessage(); + if (gamelistspectatorjoinedmessage_ == NULL) gamelistspectatorjoinedmessage_ = new ::GameListSpectatorJoinedMessage; + return gamelistspectatorjoinedmessage_; +} +inline ::GameListSpectatorJoinedMessage* PokerTHMessage::release_gamelistspectatorjoinedmessage() { + clear_has_gamelistspectatorjoinedmessage(); + ::GameListSpectatorJoinedMessage* temp = gamelistspectatorjoinedmessage_; + gamelistspectatorjoinedmessage_ = NULL; + return temp; +} + +// optional .GameListSpectatorLeftMessage gameListSpectatorLeftMessage = 80; +inline bool PokerTHMessage::has_gamelistspectatorleftmessage() const { + return (_has_bits_[2] & 0x00008000u) != 0; +} +inline void PokerTHMessage::set_has_gamelistspectatorleftmessage() { + _has_bits_[2] |= 0x00008000u; +} +inline void PokerTHMessage::clear_has_gamelistspectatorleftmessage() { + _has_bits_[2] &= ~0x00008000u; +} +inline void PokerTHMessage::clear_gamelistspectatorleftmessage() { + if (gamelistspectatorleftmessage_ != NULL) gamelistspectatorleftmessage_->::GameListSpectatorLeftMessage::Clear(); + clear_has_gamelistspectatorleftmessage(); +} +inline const ::GameListSpectatorLeftMessage& PokerTHMessage::gamelistspectatorleftmessage() const { + return gamelistspectatorleftmessage_ != NULL ? *gamelistspectatorleftmessage_ : *default_instance_->gamelistspectatorleftmessage_; +} +inline ::GameListSpectatorLeftMessage* PokerTHMessage::mutable_gamelistspectatorleftmessage() { + set_has_gamelistspectatorleftmessage(); + if (gamelistspectatorleftmessage_ == NULL) gamelistspectatorleftmessage_ = new ::GameListSpectatorLeftMessage; + return gamelistspectatorleftmessage_; +} +inline ::GameListSpectatorLeftMessage* PokerTHMessage::release_gamelistspectatorleftmessage() { + clear_has_gamelistspectatorleftmessage(); + ::GameListSpectatorLeftMessage* temp = gamelistspectatorleftmessage_; + gamelistspectatorleftmessage_ = NULL; + return temp; +} + +// optional .GameSpectatorJoinedMessage gameSpectatorJoinedMessage = 81; +inline bool PokerTHMessage::has_gamespectatorjoinedmessage() const { + return (_has_bits_[2] & 0x00010000u) != 0; +} +inline void PokerTHMessage::set_has_gamespectatorjoinedmessage() { + _has_bits_[2] |= 0x00010000u; +} +inline void PokerTHMessage::clear_has_gamespectatorjoinedmessage() { + _has_bits_[2] &= ~0x00010000u; +} +inline void PokerTHMessage::clear_gamespectatorjoinedmessage() { + if (gamespectatorjoinedmessage_ != NULL) gamespectatorjoinedmessage_->::GameSpectatorJoinedMessage::Clear(); + clear_has_gamespectatorjoinedmessage(); +} +inline const ::GameSpectatorJoinedMessage& PokerTHMessage::gamespectatorjoinedmessage() const { + return gamespectatorjoinedmessage_ != NULL ? *gamespectatorjoinedmessage_ : *default_instance_->gamespectatorjoinedmessage_; +} +inline ::GameSpectatorJoinedMessage* PokerTHMessage::mutable_gamespectatorjoinedmessage() { + set_has_gamespectatorjoinedmessage(); + if (gamespectatorjoinedmessage_ == NULL) gamespectatorjoinedmessage_ = new ::GameSpectatorJoinedMessage; + return gamespectatorjoinedmessage_; +} +inline ::GameSpectatorJoinedMessage* PokerTHMessage::release_gamespectatorjoinedmessage() { + clear_has_gamespectatorjoinedmessage(); + ::GameSpectatorJoinedMessage* temp = gamespectatorjoinedmessage_; + gamespectatorjoinedmessage_ = NULL; + return temp; +} + +// optional .GameSpectatorLeftMessage gameSpectatorLeftMessage = 82; +inline bool PokerTHMessage::has_gamespectatorleftmessage() const { + return (_has_bits_[2] & 0x00020000u) != 0; +} +inline void PokerTHMessage::set_has_gamespectatorleftmessage() { + _has_bits_[2] |= 0x00020000u; +} +inline void PokerTHMessage::clear_has_gamespectatorleftmessage() { + _has_bits_[2] &= ~0x00020000u; +} +inline void PokerTHMessage::clear_gamespectatorleftmessage() { + if (gamespectatorleftmessage_ != NULL) gamespectatorleftmessage_->::GameSpectatorLeftMessage::Clear(); + clear_has_gamespectatorleftmessage(); +} +inline const ::GameSpectatorLeftMessage& PokerTHMessage::gamespectatorleftmessage() const { + return gamespectatorleftmessage_ != NULL ? *gamespectatorleftmessage_ : *default_instance_->gamespectatorleftmessage_; +} +inline ::GameSpectatorLeftMessage* PokerTHMessage::mutable_gamespectatorleftmessage() { + set_has_gamespectatorleftmessage(); + if (gamespectatorleftmessage_ == NULL) gamespectatorleftmessage_ = new ::GameSpectatorLeftMessage; + return gamespectatorleftmessage_; +} +inline ::GameSpectatorLeftMessage* PokerTHMessage::release_gamespectatorleftmessage() { + clear_has_gamespectatorleftmessage(); + ::GameSpectatorLeftMessage* temp = gamespectatorleftmessage_; + gamespectatorleftmessage_ = NULL; + return temp; +} + // @@protoc_insertion_point(namespace_scope) diff --git a/tests/src/de/pokerth/protocol/ProtoBuf.java b/tests/src/de/pokerth/protocol/ProtoBuf.java index 1fff64b3..ed0e828d 100644 --- a/tests/src/de/pokerth/protocol/ProtoBuf.java +++ b/tests/src/de/pokerth/protocol/ProtoBuf.java @@ -9549,6 +9549,718 @@ public final class ProtoBuf { // @@protoc_insertion_point(class_scope:GameListPlayerLeftMessage) } + public interface GameListSpectatorJoinedMessageOrBuilder + extends com.google.protobuf.MessageLiteOrBuilder { + + // required uint32 gameId = 1; + boolean hasGameId(); + int getGameId(); + + // required uint32 playerId = 2; + boolean hasPlayerId(); + int getPlayerId(); + } + public static final class GameListSpectatorJoinedMessage extends + com.google.protobuf.GeneratedMessageLite + implements GameListSpectatorJoinedMessageOrBuilder { + // Use GameListSpectatorJoinedMessage.newBuilder() to construct. + private GameListSpectatorJoinedMessage(Builder builder) { + super(builder); + } + private GameListSpectatorJoinedMessage(boolean noInit) {} + + private static final GameListSpectatorJoinedMessage defaultInstance; + public static GameListSpectatorJoinedMessage getDefaultInstance() { + return defaultInstance; + } + + public GameListSpectatorJoinedMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private int bitField0_; + // required uint32 gameId = 1; + public static final int GAMEID_FIELD_NUMBER = 1; + private int gameId_; + public boolean hasGameId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getGameId() { + return gameId_; + } + + // required uint32 playerId = 2; + public static final int PLAYERID_FIELD_NUMBER = 2; + private int playerId_; + public boolean hasPlayerId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getPlayerId() { + return playerId_; + } + + private void initFields() { + gameId_ = 0; + playerId_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasGameId()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasPlayerId()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeUInt32(1, gameId_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(2, playerId_); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, gameId_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, playerId_); + } + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage, Builder> + implements de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessageOrBuilder { + // Construct using de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + gameId_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + playerId_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage getDefaultInstanceForType() { + return de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage.getDefaultInstance(); + } + + public de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage build() { + de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage buildPartial() { + de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage result = new de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.gameId_ = gameId_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.playerId_ = playerId_; + result.bitField0_ = to_bitField0_; + return result; + } + + public Builder mergeFrom(de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage other) { + if (other == de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage.getDefaultInstance()) return this; + if (other.hasGameId()) { + setGameId(other.getGameId()); + } + if (other.hasPlayerId()) { + setPlayerId(other.getPlayerId()); + } + return this; + } + + public final boolean isInitialized() { + if (!hasGameId()) { + + return false; + } + if (!hasPlayerId()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + + return this; + default: { + if (!parseUnknownField(input, extensionRegistry, tag)) { + + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + gameId_ = input.readUInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + playerId_ = input.readUInt32(); + break; + } + } + } + } + + private int bitField0_; + + // required uint32 gameId = 1; + private int gameId_ ; + public boolean hasGameId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getGameId() { + return gameId_; + } + public Builder setGameId(int value) { + bitField0_ |= 0x00000001; + gameId_ = value; + + return this; + } + public Builder clearGameId() { + bitField0_ = (bitField0_ & ~0x00000001); + gameId_ = 0; + + return this; + } + + // required uint32 playerId = 2; + private int playerId_ ; + public boolean hasPlayerId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getPlayerId() { + return playerId_; + } + public Builder setPlayerId(int value) { + bitField0_ |= 0x00000002; + playerId_ = value; + + return this; + } + public Builder clearPlayerId() { + bitField0_ = (bitField0_ & ~0x00000002); + playerId_ = 0; + + return this; + } + + // @@protoc_insertion_point(builder_scope:GameListSpectatorJoinedMessage) + } + + static { + defaultInstance = new GameListSpectatorJoinedMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:GameListSpectatorJoinedMessage) + } + + public interface GameListSpectatorLeftMessageOrBuilder + extends com.google.protobuf.MessageLiteOrBuilder { + + // required uint32 gameId = 1; + boolean hasGameId(); + int getGameId(); + + // required uint32 playerId = 2; + boolean hasPlayerId(); + int getPlayerId(); + } + public static final class GameListSpectatorLeftMessage extends + com.google.protobuf.GeneratedMessageLite + implements GameListSpectatorLeftMessageOrBuilder { + // Use GameListSpectatorLeftMessage.newBuilder() to construct. + private GameListSpectatorLeftMessage(Builder builder) { + super(builder); + } + private GameListSpectatorLeftMessage(boolean noInit) {} + + private static final GameListSpectatorLeftMessage defaultInstance; + public static GameListSpectatorLeftMessage getDefaultInstance() { + return defaultInstance; + } + + public GameListSpectatorLeftMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private int bitField0_; + // required uint32 gameId = 1; + public static final int GAMEID_FIELD_NUMBER = 1; + private int gameId_; + public boolean hasGameId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getGameId() { + return gameId_; + } + + // required uint32 playerId = 2; + public static final int PLAYERID_FIELD_NUMBER = 2; + private int playerId_; + public boolean hasPlayerId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getPlayerId() { + return playerId_; + } + + private void initFields() { + gameId_ = 0; + playerId_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasGameId()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasPlayerId()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeUInt32(1, gameId_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(2, playerId_); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, gameId_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, playerId_); + } + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage, Builder> + implements de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessageOrBuilder { + // Construct using de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + gameId_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + playerId_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage getDefaultInstanceForType() { + return de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage.getDefaultInstance(); + } + + public de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage build() { + de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage buildPartial() { + de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage result = new de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.gameId_ = gameId_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.playerId_ = playerId_; + result.bitField0_ = to_bitField0_; + return result; + } + + public Builder mergeFrom(de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage other) { + if (other == de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage.getDefaultInstance()) return this; + if (other.hasGameId()) { + setGameId(other.getGameId()); + } + if (other.hasPlayerId()) { + setPlayerId(other.getPlayerId()); + } + return this; + } + + public final boolean isInitialized() { + if (!hasGameId()) { + + return false; + } + if (!hasPlayerId()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + + return this; + default: { + if (!parseUnknownField(input, extensionRegistry, tag)) { + + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + gameId_ = input.readUInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + playerId_ = input.readUInt32(); + break; + } + } + } + } + + private int bitField0_; + + // required uint32 gameId = 1; + private int gameId_ ; + public boolean hasGameId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getGameId() { + return gameId_; + } + public Builder setGameId(int value) { + bitField0_ |= 0x00000001; + gameId_ = value; + + return this; + } + public Builder clearGameId() { + bitField0_ = (bitField0_ & ~0x00000001); + gameId_ = 0; + + return this; + } + + // required uint32 playerId = 2; + private int playerId_ ; + public boolean hasPlayerId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getPlayerId() { + return playerId_; + } + public Builder setPlayerId(int value) { + bitField0_ |= 0x00000002; + playerId_ = value; + + return this; + } + public Builder clearPlayerId() { + bitField0_ = (bitField0_ & ~0x00000002); + playerId_ = 0; + + return this; + } + + // @@protoc_insertion_point(builder_scope:GameListSpectatorLeftMessage) + } + + static { + defaultInstance = new GameListSpectatorLeftMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:GameListSpectatorLeftMessage) + } + public interface GameListAdminChangedMessageOrBuilder extends com.google.protobuf.MessageLiteOrBuilder { @@ -12005,6 +12717,10 @@ public final class ProtoBuf { // optional bool autoLeave = 3; boolean hasAutoLeave(); boolean getAutoLeave(); + + // optional bool spectateOnly = 4; + boolean hasSpectateOnly(); + boolean getSpectateOnly(); } public static final class JoinExistingGameMessage extends com.google.protobuf.GeneratedMessageLite @@ -12077,10 +12793,21 @@ public final class ProtoBuf { return autoLeave_; } + // optional bool spectateOnly = 4; + public static final int SPECTATEONLY_FIELD_NUMBER = 4; + private boolean spectateOnly_; + public boolean hasSpectateOnly() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public boolean getSpectateOnly() { + return spectateOnly_; + } + private void initFields() { gameId_ = 0; password_ = ""; autoLeave_ = false; + spectateOnly_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -12107,6 +12834,9 @@ public final class ProtoBuf { if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBool(3, autoLeave_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBool(4, spectateOnly_); + } } private int memoizedSerializedSize = -1; @@ -12127,6 +12857,10 @@ public final class ProtoBuf { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, autoLeave_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, spectateOnly_); + } memoizedSerializedSize = size; return size; } @@ -12235,6 +12969,8 @@ public final class ProtoBuf { bitField0_ = (bitField0_ & ~0x00000002); autoLeave_ = false; bitField0_ = (bitField0_ & ~0x00000004); + spectateOnly_ = false; + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -12280,6 +13016,10 @@ public final class ProtoBuf { to_bitField0_ |= 0x00000004; } result.autoLeave_ = autoLeave_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.spectateOnly_ = spectateOnly_; result.bitField0_ = to_bitField0_; return result; } @@ -12295,6 +13035,9 @@ public final class ProtoBuf { if (other.hasAutoLeave()) { setAutoLeave(other.getAutoLeave()); } + if (other.hasSpectateOnly()) { + setSpectateOnly(other.getSpectateOnly()); + } return this; } @@ -12338,6 +13081,11 @@ public final class ProtoBuf { autoLeave_ = input.readBool(); break; } + case 32: { + bitField0_ |= 0x00000008; + spectateOnly_ = input.readBool(); + break; + } } } } @@ -12422,6 +13170,27 @@ public final class ProtoBuf { return this; } + // optional bool spectateOnly = 4; + private boolean spectateOnly_ ; + public boolean hasSpectateOnly() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public boolean getSpectateOnly() { + return spectateOnly_; + } + public Builder setSpectateOnly(boolean value) { + bitField0_ |= 0x00000008; + spectateOnly_ = value; + + return this; + } + public Builder clearSpectateOnly() { + bitField0_ = (bitField0_ & ~0x00000008); + spectateOnly_ = false; + + return this; + } + // @@protoc_insertion_point(builder_scope:JoinExistingGameMessage) } @@ -15036,6 +15805,790 @@ public final class ProtoBuf { // @@protoc_insertion_point(class_scope:GamePlayerLeftMessage) } + public interface GameSpectatorJoinedMessageOrBuilder + extends com.google.protobuf.MessageLiteOrBuilder { + + // required uint32 gameId = 1; + boolean hasGameId(); + int getGameId(); + + // required uint32 playerId = 2; + boolean hasPlayerId(); + int getPlayerId(); + } + public static final class GameSpectatorJoinedMessage extends + com.google.protobuf.GeneratedMessageLite + implements GameSpectatorJoinedMessageOrBuilder { + // Use GameSpectatorJoinedMessage.newBuilder() to construct. + private GameSpectatorJoinedMessage(Builder builder) { + super(builder); + } + private GameSpectatorJoinedMessage(boolean noInit) {} + + private static final GameSpectatorJoinedMessage defaultInstance; + public static GameSpectatorJoinedMessage getDefaultInstance() { + return defaultInstance; + } + + public GameSpectatorJoinedMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private int bitField0_; + // required uint32 gameId = 1; + public static final int GAMEID_FIELD_NUMBER = 1; + private int gameId_; + public boolean hasGameId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getGameId() { + return gameId_; + } + + // required uint32 playerId = 2; + public static final int PLAYERID_FIELD_NUMBER = 2; + private int playerId_; + public boolean hasPlayerId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getPlayerId() { + return playerId_; + } + + private void initFields() { + gameId_ = 0; + playerId_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasGameId()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasPlayerId()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeUInt32(1, gameId_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(2, playerId_); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, gameId_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, playerId_); + } + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage, Builder> + implements de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessageOrBuilder { + // Construct using de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + gameId_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + playerId_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage getDefaultInstanceForType() { + return de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage.getDefaultInstance(); + } + + public de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage build() { + de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage buildPartial() { + de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage result = new de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.gameId_ = gameId_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.playerId_ = playerId_; + result.bitField0_ = to_bitField0_; + return result; + } + + public Builder mergeFrom(de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage other) { + if (other == de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage.getDefaultInstance()) return this; + if (other.hasGameId()) { + setGameId(other.getGameId()); + } + if (other.hasPlayerId()) { + setPlayerId(other.getPlayerId()); + } + return this; + } + + public final boolean isInitialized() { + if (!hasGameId()) { + + return false; + } + if (!hasPlayerId()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + + return this; + default: { + if (!parseUnknownField(input, extensionRegistry, tag)) { + + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + gameId_ = input.readUInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + playerId_ = input.readUInt32(); + break; + } + } + } + } + + private int bitField0_; + + // required uint32 gameId = 1; + private int gameId_ ; + public boolean hasGameId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getGameId() { + return gameId_; + } + public Builder setGameId(int value) { + bitField0_ |= 0x00000001; + gameId_ = value; + + return this; + } + public Builder clearGameId() { + bitField0_ = (bitField0_ & ~0x00000001); + gameId_ = 0; + + return this; + } + + // required uint32 playerId = 2; + private int playerId_ ; + public boolean hasPlayerId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getPlayerId() { + return playerId_; + } + public Builder setPlayerId(int value) { + bitField0_ |= 0x00000002; + playerId_ = value; + + return this; + } + public Builder clearPlayerId() { + bitField0_ = (bitField0_ & ~0x00000002); + playerId_ = 0; + + return this; + } + + // @@protoc_insertion_point(builder_scope:GameSpectatorJoinedMessage) + } + + static { + defaultInstance = new GameSpectatorJoinedMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:GameSpectatorJoinedMessage) + } + + public interface GameSpectatorLeftMessageOrBuilder + extends com.google.protobuf.MessageLiteOrBuilder { + + // required uint32 gameId = 1; + boolean hasGameId(); + int getGameId(); + + // required uint32 playerId = 2; + boolean hasPlayerId(); + int getPlayerId(); + + // required .GamePlayerLeftMessage.GamePlayerLeftReason gameSpectatorLeftReason = 3; + boolean hasGameSpectatorLeftReason(); + de.pokerth.protocol.ProtoBuf.GamePlayerLeftMessage.GamePlayerLeftReason getGameSpectatorLeftReason(); + } + public static final class GameSpectatorLeftMessage extends + com.google.protobuf.GeneratedMessageLite + implements GameSpectatorLeftMessageOrBuilder { + // Use GameSpectatorLeftMessage.newBuilder() to construct. + private GameSpectatorLeftMessage(Builder builder) { + super(builder); + } + private GameSpectatorLeftMessage(boolean noInit) {} + + private static final GameSpectatorLeftMessage defaultInstance; + public static GameSpectatorLeftMessage getDefaultInstance() { + return defaultInstance; + } + + public GameSpectatorLeftMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private int bitField0_; + // required uint32 gameId = 1; + public static final int GAMEID_FIELD_NUMBER = 1; + private int gameId_; + public boolean hasGameId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getGameId() { + return gameId_; + } + + // required uint32 playerId = 2; + public static final int PLAYERID_FIELD_NUMBER = 2; + private int playerId_; + public boolean hasPlayerId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getPlayerId() { + return playerId_; + } + + // required .GamePlayerLeftMessage.GamePlayerLeftReason gameSpectatorLeftReason = 3; + public static final int GAMESPECTATORLEFTREASON_FIELD_NUMBER = 3; + private de.pokerth.protocol.ProtoBuf.GamePlayerLeftMessage.GamePlayerLeftReason gameSpectatorLeftReason_; + public boolean hasGameSpectatorLeftReason() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public de.pokerth.protocol.ProtoBuf.GamePlayerLeftMessage.GamePlayerLeftReason getGameSpectatorLeftReason() { + return gameSpectatorLeftReason_; + } + + private void initFields() { + gameId_ = 0; + playerId_ = 0; + gameSpectatorLeftReason_ = de.pokerth.protocol.ProtoBuf.GamePlayerLeftMessage.GamePlayerLeftReason.leftOnRequest; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasGameId()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasPlayerId()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasGameSpectatorLeftReason()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeUInt32(1, gameId_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(2, playerId_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeEnum(3, gameSpectatorLeftReason_.getNumber()); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, gameId_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, playerId_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, gameSpectatorLeftReason_.getNumber()); + } + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage, Builder> + implements de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessageOrBuilder { + // Construct using de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + gameId_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + playerId_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + gameSpectatorLeftReason_ = de.pokerth.protocol.ProtoBuf.GamePlayerLeftMessage.GamePlayerLeftReason.leftOnRequest; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage getDefaultInstanceForType() { + return de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage.getDefaultInstance(); + } + + public de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage build() { + de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage buildPartial() { + de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage result = new de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.gameId_ = gameId_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.playerId_ = playerId_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.gameSpectatorLeftReason_ = gameSpectatorLeftReason_; + result.bitField0_ = to_bitField0_; + return result; + } + + public Builder mergeFrom(de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage other) { + if (other == de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage.getDefaultInstance()) return this; + if (other.hasGameId()) { + setGameId(other.getGameId()); + } + if (other.hasPlayerId()) { + setPlayerId(other.getPlayerId()); + } + if (other.hasGameSpectatorLeftReason()) { + setGameSpectatorLeftReason(other.getGameSpectatorLeftReason()); + } + return this; + } + + public final boolean isInitialized() { + if (!hasGameId()) { + + return false; + } + if (!hasPlayerId()) { + + return false; + } + if (!hasGameSpectatorLeftReason()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + + return this; + default: { + if (!parseUnknownField(input, extensionRegistry, tag)) { + + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + gameId_ = input.readUInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + playerId_ = input.readUInt32(); + break; + } + case 24: { + int rawValue = input.readEnum(); + de.pokerth.protocol.ProtoBuf.GamePlayerLeftMessage.GamePlayerLeftReason value = de.pokerth.protocol.ProtoBuf.GamePlayerLeftMessage.GamePlayerLeftReason.valueOf(rawValue); + if (value != null) { + bitField0_ |= 0x00000004; + gameSpectatorLeftReason_ = value; + } + break; + } + } + } + } + + private int bitField0_; + + // required uint32 gameId = 1; + private int gameId_ ; + public boolean hasGameId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getGameId() { + return gameId_; + } + public Builder setGameId(int value) { + bitField0_ |= 0x00000001; + gameId_ = value; + + return this; + } + public Builder clearGameId() { + bitField0_ = (bitField0_ & ~0x00000001); + gameId_ = 0; + + return this; + } + + // required uint32 playerId = 2; + private int playerId_ ; + public boolean hasPlayerId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getPlayerId() { + return playerId_; + } + public Builder setPlayerId(int value) { + bitField0_ |= 0x00000002; + playerId_ = value; + + return this; + } + public Builder clearPlayerId() { + bitField0_ = (bitField0_ & ~0x00000002); + playerId_ = 0; + + return this; + } + + // required .GamePlayerLeftMessage.GamePlayerLeftReason gameSpectatorLeftReason = 3; + private de.pokerth.protocol.ProtoBuf.GamePlayerLeftMessage.GamePlayerLeftReason gameSpectatorLeftReason_ = de.pokerth.protocol.ProtoBuf.GamePlayerLeftMessage.GamePlayerLeftReason.leftOnRequest; + public boolean hasGameSpectatorLeftReason() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public de.pokerth.protocol.ProtoBuf.GamePlayerLeftMessage.GamePlayerLeftReason getGameSpectatorLeftReason() { + return gameSpectatorLeftReason_; + } + public Builder setGameSpectatorLeftReason(de.pokerth.protocol.ProtoBuf.GamePlayerLeftMessage.GamePlayerLeftReason value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + gameSpectatorLeftReason_ = value; + + return this; + } + public Builder clearGameSpectatorLeftReason() { + bitField0_ = (bitField0_ & ~0x00000004); + gameSpectatorLeftReason_ = de.pokerth.protocol.ProtoBuf.GamePlayerLeftMessage.GamePlayerLeftReason.leftOnRequest; + + return this; + } + + // @@protoc_insertion_point(builder_scope:GameSpectatorLeftMessage) + } + + static { + defaultInstance = new GameSpectatorLeftMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:GameSpectatorLeftMessage) + } + public interface GameAdminChangedMessageOrBuilder extends com.google.protobuf.MessageLiteOrBuilder { @@ -38037,6 +39590,22 @@ public final class ProtoBuf { // optional .AdminBanPlayerAckMessage adminBanPlayerAckMessage = 78; boolean hasAdminBanPlayerAckMessage(); de.pokerth.protocol.ProtoBuf.AdminBanPlayerAckMessage getAdminBanPlayerAckMessage(); + + // optional .GameListSpectatorJoinedMessage gameListSpectatorJoinedMessage = 79; + boolean hasGameListSpectatorJoinedMessage(); + de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage getGameListSpectatorJoinedMessage(); + + // optional .GameListSpectatorLeftMessage gameListSpectatorLeftMessage = 80; + boolean hasGameListSpectatorLeftMessage(); + de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage getGameListSpectatorLeftMessage(); + + // optional .GameSpectatorJoinedMessage gameSpectatorJoinedMessage = 81; + boolean hasGameSpectatorJoinedMessage(); + de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage getGameSpectatorJoinedMessage(); + + // optional .GameSpectatorLeftMessage gameSpectatorLeftMessage = 82; + boolean hasGameSpectatorLeftMessage(); + de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage getGameSpectatorLeftMessage(); } public static final class PokerTHMessage extends com.google.protobuf.GeneratedMessageLite @@ -38135,6 +39704,10 @@ public final class ProtoBuf { Type_AdminRemoveGameAckMessage(74, 75), Type_AdminBanPlayerMessage(75, 76), Type_AdminBanPlayerAckMessage(76, 77), + Type_GameListSpectatorJoinedMessage(77, 78), + Type_GameListSpectatorLeftMessage(78, 79), + Type_GameSpectatorJoinedMessage(79, 80), + Type_GameSpectatorLeftMessage(80, 81), ; public static final int Type_AnnounceMessage_VALUE = 1; @@ -38214,6 +39787,10 @@ public final class ProtoBuf { public static final int Type_AdminRemoveGameAckMessage_VALUE = 75; public static final int Type_AdminBanPlayerMessage_VALUE = 76; public static final int Type_AdminBanPlayerAckMessage_VALUE = 77; + public static final int Type_GameListSpectatorJoinedMessage_VALUE = 78; + public static final int Type_GameListSpectatorLeftMessage_VALUE = 79; + public static final int Type_GameSpectatorJoinedMessage_VALUE = 80; + public static final int Type_GameSpectatorLeftMessage_VALUE = 81; public final int getNumber() { return value; } @@ -38297,6 +39874,10 @@ public final class ProtoBuf { case 75: return Type_AdminRemoveGameAckMessage; case 76: return Type_AdminBanPlayerMessage; case 77: return Type_AdminBanPlayerAckMessage; + case 78: return Type_GameListSpectatorJoinedMessage; + case 79: return Type_GameListSpectatorLeftMessage; + case 80: return Type_GameSpectatorJoinedMessage; + case 81: return Type_GameSpectatorLeftMessage; default: return null; } } @@ -39105,6 +40686,46 @@ public final class ProtoBuf { return adminBanPlayerAckMessage_; } + // optional .GameListSpectatorJoinedMessage gameListSpectatorJoinedMessage = 79; + public static final int GAMELISTSPECTATORJOINEDMESSAGE_FIELD_NUMBER = 79; + private de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage gameListSpectatorJoinedMessage_; + public boolean hasGameListSpectatorJoinedMessage() { + return ((bitField2_ & 0x00004000) == 0x00004000); + } + public de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage getGameListSpectatorJoinedMessage() { + return gameListSpectatorJoinedMessage_; + } + + // optional .GameListSpectatorLeftMessage gameListSpectatorLeftMessage = 80; + public static final int GAMELISTSPECTATORLEFTMESSAGE_FIELD_NUMBER = 80; + private de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage gameListSpectatorLeftMessage_; + public boolean hasGameListSpectatorLeftMessage() { + return ((bitField2_ & 0x00008000) == 0x00008000); + } + public de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage getGameListSpectatorLeftMessage() { + return gameListSpectatorLeftMessage_; + } + + // optional .GameSpectatorJoinedMessage gameSpectatorJoinedMessage = 81; + public static final int GAMESPECTATORJOINEDMESSAGE_FIELD_NUMBER = 81; + private de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage gameSpectatorJoinedMessage_; + public boolean hasGameSpectatorJoinedMessage() { + return ((bitField2_ & 0x00010000) == 0x00010000); + } + public de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage getGameSpectatorJoinedMessage() { + return gameSpectatorJoinedMessage_; + } + + // optional .GameSpectatorLeftMessage gameSpectatorLeftMessage = 82; + public static final int GAMESPECTATORLEFTMESSAGE_FIELD_NUMBER = 82; + private de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage gameSpectatorLeftMessage_; + public boolean hasGameSpectatorLeftMessage() { + return ((bitField2_ & 0x00020000) == 0x00020000); + } + public de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage getGameSpectatorLeftMessage() { + return gameSpectatorLeftMessage_; + } + private void initFields() { messageType_ = de.pokerth.protocol.ProtoBuf.PokerTHMessage.PokerTHMessageType.Type_AnnounceMessage; announceMessage_ = de.pokerth.protocol.ProtoBuf.AnnounceMessage.getDefaultInstance(); @@ -39184,6 +40805,10 @@ public final class ProtoBuf { adminRemoveGameAckMessage_ = de.pokerth.protocol.ProtoBuf.AdminRemoveGameAckMessage.getDefaultInstance(); adminBanPlayerMessage_ = de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage.getDefaultInstance(); adminBanPlayerAckMessage_ = de.pokerth.protocol.ProtoBuf.AdminBanPlayerAckMessage.getDefaultInstance(); + gameListSpectatorJoinedMessage_ = de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage.getDefaultInstance(); + gameListSpectatorLeftMessage_ = de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage.getDefaultInstance(); + gameSpectatorJoinedMessage_ = de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage.getDefaultInstance(); + gameSpectatorLeftMessage_ = de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -39638,6 +41263,30 @@ public final class ProtoBuf { return false; } } + if (hasGameListSpectatorJoinedMessage()) { + if (!getGameListSpectatorJoinedMessage().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + if (hasGameListSpectatorLeftMessage()) { + if (!getGameListSpectatorLeftMessage().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + if (hasGameSpectatorJoinedMessage()) { + if (!getGameSpectatorJoinedMessage().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + if (hasGameSpectatorLeftMessage()) { + if (!getGameSpectatorLeftMessage().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } memoizedIsInitialized = 1; return true; } @@ -39879,6 +41528,18 @@ public final class ProtoBuf { if (((bitField2_ & 0x00002000) == 0x00002000)) { output.writeMessage(78, adminBanPlayerAckMessage_); } + if (((bitField2_ & 0x00004000) == 0x00004000)) { + output.writeMessage(79, gameListSpectatorJoinedMessage_); + } + if (((bitField2_ & 0x00008000) == 0x00008000)) { + output.writeMessage(80, gameListSpectatorLeftMessage_); + } + if (((bitField2_ & 0x00010000) == 0x00010000)) { + output.writeMessage(81, gameSpectatorJoinedMessage_); + } + if (((bitField2_ & 0x00020000) == 0x00020000)) { + output.writeMessage(82, gameSpectatorLeftMessage_); + } } private int memoizedSerializedSize = -1; @@ -40199,6 +41860,22 @@ public final class ProtoBuf { size += com.google.protobuf.CodedOutputStream .computeMessageSize(78, adminBanPlayerAckMessage_); } + if (((bitField2_ & 0x00004000) == 0x00004000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(79, gameListSpectatorJoinedMessage_); + } + if (((bitField2_ & 0x00008000) == 0x00008000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(80, gameListSpectatorLeftMessage_); + } + if (((bitField2_ & 0x00010000) == 0x00010000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(81, gameSpectatorJoinedMessage_); + } + if (((bitField2_ & 0x00020000) == 0x00020000)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(82, gameSpectatorLeftMessage_); + } memoizedSerializedSize = size; return size; } @@ -40457,6 +42134,14 @@ public final class ProtoBuf { bitField2_ = (bitField2_ & ~0x00001000); adminBanPlayerAckMessage_ = de.pokerth.protocol.ProtoBuf.AdminBanPlayerAckMessage.getDefaultInstance(); bitField2_ = (bitField2_ & ~0x00002000); + gameListSpectatorJoinedMessage_ = de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage.getDefaultInstance(); + bitField2_ = (bitField2_ & ~0x00004000); + gameListSpectatorLeftMessage_ = de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage.getDefaultInstance(); + bitField2_ = (bitField2_ & ~0x00008000); + gameSpectatorJoinedMessage_ = de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage.getDefaultInstance(); + bitField2_ = (bitField2_ & ~0x00010000); + gameSpectatorLeftMessage_ = de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage.getDefaultInstance(); + bitField2_ = (bitField2_ & ~0x00020000); return this; } @@ -40806,6 +42491,22 @@ public final class ProtoBuf { to_bitField2_ |= 0x00002000; } result.adminBanPlayerAckMessage_ = adminBanPlayerAckMessage_; + if (((from_bitField2_ & 0x00004000) == 0x00004000)) { + to_bitField2_ |= 0x00004000; + } + result.gameListSpectatorJoinedMessage_ = gameListSpectatorJoinedMessage_; + if (((from_bitField2_ & 0x00008000) == 0x00008000)) { + to_bitField2_ |= 0x00008000; + } + result.gameListSpectatorLeftMessage_ = gameListSpectatorLeftMessage_; + if (((from_bitField2_ & 0x00010000) == 0x00010000)) { + to_bitField2_ |= 0x00010000; + } + result.gameSpectatorJoinedMessage_ = gameSpectatorJoinedMessage_; + if (((from_bitField2_ & 0x00020000) == 0x00020000)) { + to_bitField2_ |= 0x00020000; + } + result.gameSpectatorLeftMessage_ = gameSpectatorLeftMessage_; result.bitField0_ = to_bitField0_; result.bitField1_ = to_bitField1_; result.bitField2_ = to_bitField2_; @@ -41048,6 +42749,18 @@ public final class ProtoBuf { if (other.hasAdminBanPlayerAckMessage()) { mergeAdminBanPlayerAckMessage(other.getAdminBanPlayerAckMessage()); } + if (other.hasGameListSpectatorJoinedMessage()) { + mergeGameListSpectatorJoinedMessage(other.getGameListSpectatorJoinedMessage()); + } + if (other.hasGameListSpectatorLeftMessage()) { + mergeGameListSpectatorLeftMessage(other.getGameListSpectatorLeftMessage()); + } + if (other.hasGameSpectatorJoinedMessage()) { + mergeGameSpectatorJoinedMessage(other.getGameSpectatorJoinedMessage()); + } + if (other.hasGameSpectatorLeftMessage()) { + mergeGameSpectatorLeftMessage(other.getGameSpectatorLeftMessage()); + } return this; } @@ -41500,6 +43213,30 @@ public final class ProtoBuf { return false; } } + if (hasGameListSpectatorJoinedMessage()) { + if (!getGameListSpectatorJoinedMessage().isInitialized()) { + + return false; + } + } + if (hasGameListSpectatorLeftMessage()) { + if (!getGameListSpectatorLeftMessage().isInitialized()) { + + return false; + } + } + if (hasGameSpectatorJoinedMessage()) { + if (!getGameSpectatorJoinedMessage().isInitialized()) { + + return false; + } + } + if (hasGameSpectatorLeftMessage()) { + if (!getGameSpectatorLeftMessage().isInitialized()) { + + return false; + } + } return true; } @@ -42222,6 +43959,42 @@ public final class ProtoBuf { setAdminBanPlayerAckMessage(subBuilder.buildPartial()); break; } + case 634: { + de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage.Builder subBuilder = de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage.newBuilder(); + if (hasGameListSpectatorJoinedMessage()) { + subBuilder.mergeFrom(getGameListSpectatorJoinedMessage()); + } + input.readMessage(subBuilder, extensionRegistry); + setGameListSpectatorJoinedMessage(subBuilder.buildPartial()); + break; + } + case 642: { + de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage.Builder subBuilder = de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage.newBuilder(); + if (hasGameListSpectatorLeftMessage()) { + subBuilder.mergeFrom(getGameListSpectatorLeftMessage()); + } + input.readMessage(subBuilder, extensionRegistry); + setGameListSpectatorLeftMessage(subBuilder.buildPartial()); + break; + } + case 650: { + de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage.Builder subBuilder = de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage.newBuilder(); + if (hasGameSpectatorJoinedMessage()) { + subBuilder.mergeFrom(getGameSpectatorJoinedMessage()); + } + input.readMessage(subBuilder, extensionRegistry); + setGameSpectatorJoinedMessage(subBuilder.buildPartial()); + break; + } + case 658: { + de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage.Builder subBuilder = de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage.newBuilder(); + if (hasGameSpectatorLeftMessage()) { + subBuilder.mergeFrom(getGameSpectatorLeftMessage()); + } + input.readMessage(subBuilder, extensionRegistry); + setGameSpectatorLeftMessage(subBuilder.buildPartial()); + break; + } } } } @@ -45565,6 +47338,178 @@ public final class ProtoBuf { return this; } + // optional .GameListSpectatorJoinedMessage gameListSpectatorJoinedMessage = 79; + private de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage gameListSpectatorJoinedMessage_ = de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage.getDefaultInstance(); + public boolean hasGameListSpectatorJoinedMessage() { + return ((bitField2_ & 0x00004000) == 0x00004000); + } + public de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage getGameListSpectatorJoinedMessage() { + return gameListSpectatorJoinedMessage_; + } + public Builder setGameListSpectatorJoinedMessage(de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage value) { + if (value == null) { + throw new NullPointerException(); + } + gameListSpectatorJoinedMessage_ = value; + + bitField2_ |= 0x00004000; + return this; + } + public Builder setGameListSpectatorJoinedMessage( + de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage.Builder builderForValue) { + gameListSpectatorJoinedMessage_ = builderForValue.build(); + + bitField2_ |= 0x00004000; + return this; + } + public Builder mergeGameListSpectatorJoinedMessage(de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage value) { + if (((bitField2_ & 0x00004000) == 0x00004000) && + gameListSpectatorJoinedMessage_ != de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage.getDefaultInstance()) { + gameListSpectatorJoinedMessage_ = + de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage.newBuilder(gameListSpectatorJoinedMessage_).mergeFrom(value).buildPartial(); + } else { + gameListSpectatorJoinedMessage_ = value; + } + + bitField2_ |= 0x00004000; + return this; + } + public Builder clearGameListSpectatorJoinedMessage() { + gameListSpectatorJoinedMessage_ = de.pokerth.protocol.ProtoBuf.GameListSpectatorJoinedMessage.getDefaultInstance(); + + bitField2_ = (bitField2_ & ~0x00004000); + return this; + } + + // optional .GameListSpectatorLeftMessage gameListSpectatorLeftMessage = 80; + private de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage gameListSpectatorLeftMessage_ = de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage.getDefaultInstance(); + public boolean hasGameListSpectatorLeftMessage() { + return ((bitField2_ & 0x00008000) == 0x00008000); + } + public de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage getGameListSpectatorLeftMessage() { + return gameListSpectatorLeftMessage_; + } + public Builder setGameListSpectatorLeftMessage(de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage value) { + if (value == null) { + throw new NullPointerException(); + } + gameListSpectatorLeftMessage_ = value; + + bitField2_ |= 0x00008000; + return this; + } + public Builder setGameListSpectatorLeftMessage( + de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage.Builder builderForValue) { + gameListSpectatorLeftMessage_ = builderForValue.build(); + + bitField2_ |= 0x00008000; + return this; + } + public Builder mergeGameListSpectatorLeftMessage(de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage value) { + if (((bitField2_ & 0x00008000) == 0x00008000) && + gameListSpectatorLeftMessage_ != de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage.getDefaultInstance()) { + gameListSpectatorLeftMessage_ = + de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage.newBuilder(gameListSpectatorLeftMessage_).mergeFrom(value).buildPartial(); + } else { + gameListSpectatorLeftMessage_ = value; + } + + bitField2_ |= 0x00008000; + return this; + } + public Builder clearGameListSpectatorLeftMessage() { + gameListSpectatorLeftMessage_ = de.pokerth.protocol.ProtoBuf.GameListSpectatorLeftMessage.getDefaultInstance(); + + bitField2_ = (bitField2_ & ~0x00008000); + return this; + } + + // optional .GameSpectatorJoinedMessage gameSpectatorJoinedMessage = 81; + private de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage gameSpectatorJoinedMessage_ = de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage.getDefaultInstance(); + public boolean hasGameSpectatorJoinedMessage() { + return ((bitField2_ & 0x00010000) == 0x00010000); + } + public de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage getGameSpectatorJoinedMessage() { + return gameSpectatorJoinedMessage_; + } + public Builder setGameSpectatorJoinedMessage(de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage value) { + if (value == null) { + throw new NullPointerException(); + } + gameSpectatorJoinedMessage_ = value; + + bitField2_ |= 0x00010000; + return this; + } + public Builder setGameSpectatorJoinedMessage( + de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage.Builder builderForValue) { + gameSpectatorJoinedMessage_ = builderForValue.build(); + + bitField2_ |= 0x00010000; + return this; + } + public Builder mergeGameSpectatorJoinedMessage(de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage value) { + if (((bitField2_ & 0x00010000) == 0x00010000) && + gameSpectatorJoinedMessage_ != de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage.getDefaultInstance()) { + gameSpectatorJoinedMessage_ = + de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage.newBuilder(gameSpectatorJoinedMessage_).mergeFrom(value).buildPartial(); + } else { + gameSpectatorJoinedMessage_ = value; + } + + bitField2_ |= 0x00010000; + return this; + } + public Builder clearGameSpectatorJoinedMessage() { + gameSpectatorJoinedMessage_ = de.pokerth.protocol.ProtoBuf.GameSpectatorJoinedMessage.getDefaultInstance(); + + bitField2_ = (bitField2_ & ~0x00010000); + return this; + } + + // optional .GameSpectatorLeftMessage gameSpectatorLeftMessage = 82; + private de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage gameSpectatorLeftMessage_ = de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage.getDefaultInstance(); + public boolean hasGameSpectatorLeftMessage() { + return ((bitField2_ & 0x00020000) == 0x00020000); + } + public de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage getGameSpectatorLeftMessage() { + return gameSpectatorLeftMessage_; + } + public Builder setGameSpectatorLeftMessage(de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage value) { + if (value == null) { + throw new NullPointerException(); + } + gameSpectatorLeftMessage_ = value; + + bitField2_ |= 0x00020000; + return this; + } + public Builder setGameSpectatorLeftMessage( + de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage.Builder builderForValue) { + gameSpectatorLeftMessage_ = builderForValue.build(); + + bitField2_ |= 0x00020000; + return this; + } + public Builder mergeGameSpectatorLeftMessage(de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage value) { + if (((bitField2_ & 0x00020000) == 0x00020000) && + gameSpectatorLeftMessage_ != de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage.getDefaultInstance()) { + gameSpectatorLeftMessage_ = + de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage.newBuilder(gameSpectatorLeftMessage_).mergeFrom(value).buildPartial(); + } else { + gameSpectatorLeftMessage_ = value; + } + + bitField2_ |= 0x00020000; + return this; + } + public Builder clearGameSpectatorLeftMessage() { + gameSpectatorLeftMessage_ = de.pokerth.protocol.ProtoBuf.GameSpectatorLeftMessage.getDefaultInstance(); + + bitField2_ = (bitField2_ & ~0x00020000); + return this; + } + // @@protoc_insertion_point(builder_scope:PokerTHMessage) }