diff --git a/pokerth.proto b/pokerth.proto index a4ae0a77..d39b446e 100644 --- a/pokerth.proto +++ b/pokerth.proto @@ -692,6 +692,14 @@ message ErrorMessage { required ErrorReason errorReason = 1; } +message AdminRemoveGameMessage { + required uint32 removeGameId = 1; +} + +message AdminBanPlayerMessage { + required uint32 banPlayerId = 1; +} + // The main message type (it is prefixed by 4 bytes length of the message). message PokerTHMessage { @@ -769,6 +777,8 @@ message PokerTHMessage { Type_ReportGameMessage = 71; Type_ReportGameAckMessage = 72; Type_ErrorMessage = 73; + Type_AdminRemoveGameMessage = 74; + Type_AdminBanPlayerMessage = 75; } required PokerTHMessageType messageType = 1; @@ -845,4 +855,6 @@ message PokerTHMessage { optional ReportGameMessage reportGameMessage = 72; optional ReportGameAckMessage reportGameAckMessage = 73; optional ErrorMessage errorMessage = 74; + optional AdminRemoveGameMessage adminRemoveGameMessage = 75; + optional AdminBanPlayerMessage adminBanPlayerMessage = 76; } diff --git a/src/db/common/serverdbgeneric.cpp b/src/db/common/serverdbgeneric.cpp index ecc53d8e..c2dccd7e 100644 --- a/src/db/common/serverdbgeneric.cpp +++ b/src/db/common/serverdbgeneric.cpp @@ -109,3 +109,14 @@ ServerDBGeneric::AsyncReportGame(unsigned requestId, unsigned replyId, DB_id * / { m_ioService->post(boost::bind(&ServerDBCallback::ReportGameFailed, &m_callback, requestId, replyId)); } + +void +ServerDBGeneric::AsyncQueryAdminPlayers(unsigned /*requestId*/) +{ +} + +void +ServerDBGeneric::AsyncBlockPlayer(unsigned /*requestId*/, DB_id /*playerId*/, int /*valid*/, int /*active*/) +{ +} + diff --git a/src/db/serverdbcallback.h b/src/db/serverdbcallback.h index 954ba4c5..a8484234 100644 --- a/src/db/serverdbcallback.h +++ b/src/db/serverdbcallback.h @@ -35,6 +35,8 @@ #include #include +#include +#include // Callback operations are posted using the io service, // and will therefore be executed in the io service thread. @@ -44,11 +46,11 @@ public: virtual ~ServerDBCallback(); virtual void ConnectSuccess() = 0; - virtual void ConnectFailed(const std::string &error) = 0; + virtual void ConnectFailed(std::string error) = 0; - virtual void QueryError(const std::string &error) = 0; + virtual void QueryError(std::string error) = 0; - virtual void PlayerLoginSuccess(unsigned requestId, const DBPlayerData &dbPlayerData) = 0; + virtual void PlayerLoginSuccess(unsigned requestId, boost::shared_ptr dbPlayerData) = 0; virtual void PlayerLoginFailed(unsigned requestId) = 0; virtual void PlayerLoginBlocked(unsigned requestId) = 0; @@ -63,6 +65,8 @@ public: virtual void ReportGameSuccess(unsigned requestId, unsigned replyId) = 0; virtual void ReportGameFailed(unsigned requestId, unsigned replyId) = 0; + + virtual void PlayerAdminList(unsigned requestId, std::list adminList) = 0; }; #endif diff --git a/src/db/serverdbgeneric.h b/src/db/serverdbgeneric.h index 3365ac58..15547dd8 100644 --- a/src/db/serverdbgeneric.h +++ b/src/db/serverdbgeneric.h @@ -62,6 +62,9 @@ public: virtual void AsyncReportAvatar(unsigned requestId, unsigned replyId, DB_id reportedPlayerId, const std::string &avatarHash, const std::string &avatarType, DB_id *byPlayerId); virtual void AsyncReportGame(unsigned requestId, unsigned replyId, DB_id *creatorPlayerId, unsigned gameId, const std::string &gameName, DB_id *byPlayerId); + virtual void AsyncQueryAdminPlayers(unsigned requestId); + virtual void AsyncBlockPlayer(unsigned requestId, DB_id playerId, int valid, int active); + private: boost::shared_ptr m_ioService; ServerDBCallback &m_callback; diff --git a/src/db/serverdbinterface.h b/src/db/serverdbinterface.h index baceec0e..00d0237f 100644 --- a/src/db/serverdbinterface.h +++ b/src/db/serverdbinterface.h @@ -61,6 +61,9 @@ public: virtual void AsyncReportAvatar(unsigned requestId, unsigned replyId, DB_id reportedPlayerId, const std::string &avatarHash, const std::string &avatarType, DB_id *byPlayerId) = 0; virtual void AsyncReportGame(unsigned requestId, unsigned replyId, DB_id *creatorPlayerId, unsigned gameId, const std::string &gameName, DB_id *byPlayerId) = 0; + + virtual void AsyncQueryAdminPlayers(unsigned requestId) = 0; + virtual void AsyncBlockPlayer(unsigned requestId, DB_id playerId, int valid, int active) = 0; }; #endif diff --git a/src/db/serverdbnoaction.h b/src/db/serverdbnoaction.h index 0563132f..59392f64 100644 --- a/src/db/serverdbnoaction.h +++ b/src/db/serverdbnoaction.h @@ -59,6 +59,9 @@ public: virtual void AsyncReportAvatar(unsigned /*requestId*/, unsigned /*replyId*/, DB_id /*reportedPlayerId*/, const std::string &/*avatarHash*/, const std::string &/*avatarType*/, DB_id * /*byPlayerId*/) {} virtual void AsyncReportGame(unsigned /*requestId*/, unsigned /*replyId*/, DB_id * /*creatorPlayerId*/, unsigned /*gameId*/, const std::string &/*gameName*/, DB_id * /*byPlayerId*/) {} + + virtual void AsyncQueryAdminPlayers(unsigned /*requestId*/) {} + virtual void AsyncBlockPlayer(unsigned /*requestId*/, DB_id /*playerId*/, int /*valid*/, int /*active*/) {} }; #endif // _SERVERDBNOACTION_H_ diff --git a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp index ac662461..a5fcd5e9 100644 --- a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp +++ b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp @@ -2185,7 +2185,7 @@ void gameLobbyDialogImpl::reportBadGameName() { assert(mySession); if (myGameListSelectionModel->hasSelection()) { - unsigned gameId = selection->selectedRows().first().data(Qt::UserRole).toUInt(); + unsigned gameId = myGameListSelectionModel->selectedRows().first().data(Qt::UserRole).toUInt(); GameInfo info(mySession->getClientGameInfo(gameId)); int ret = MyMessageBox::question(this, tr("PokerTH - Question"), @@ -2202,14 +2202,14 @@ void gameLobbyDialogImpl::adminActionCloseGame() { assert(mySession); if (myGameListSelectionModel->hasSelection()) { - unsigned gameId = selection->selectedRows().first().data(Qt::UserRole).toUInt(); + unsigned gameId = myGameListSelectionModel->selectedRows().first().data(Qt::UserRole).toUInt(); GameInfo info(mySession->getClientGameInfo(gameId)); int ret = MyMessageBox::question(this, tr("PokerTH - Question"), tr("Are you sure you want to close the game:\n\"%1\"?").arg(QString::fromUtf8(info.name.c_str())), QMessageBox::Yes | QMessageBox::No); if(ret == QMessageBox::Yes) { - mySession->adminActionCloseGame(gameId); + //TODO mySession->adminActionCloseGame(gameId); } } } @@ -2218,14 +2218,14 @@ void gameLobbyDialogImpl::adminActionTotalKickBan() { assert(mySession); if (myNickListSelectionModel->hasSelection()) { - unsigned playerId = selection->selectedRows().first().data(Qt::UserRole).toUInt(); + unsigned playerId = myGameListSelectionModel->selectedRows().first().data(Qt::UserRole).toUInt(); PlayerInfo info(mySession->getClientPlayerInfo(playerId)); int ret = MyMessageBox::question(this, tr("PokerTH - Question"), tr("Are you sure you want to total kickban the player: \"%1\"?").arg(QString::fromUtf8(info.playerName.c_str())), QMessageBox::Yes | QMessageBox::No); if(ret == QMessageBox::Yes) { - mySession->adminActionTotalKickBan(playerId); + // TODO mySession->adminActionTotalKickBan(playerId); } } } diff --git a/src/net/common/clientstate.cpp b/src/net/common/clientstate.cpp index e18f7900..46cbd49b 100644 --- a/src/net/common/clientstate.cpp +++ b/src/net/common/clientstate.cpp @@ -549,6 +549,7 @@ AbstractClientStateReceiving::HandlePacket(boost::shared_ptr clien tmpInfo.playerName = netInfo.playername(); tmpInfo.ptype = netInfo.ishuman() ? PLAYER_TYPE_HUMAN : PLAYER_TYPE_COMPUTER; tmpInfo.isGuest = netInfo.playerrights() == netPlayerRightsGuest; + tmpInfo.isAdmin = netInfo.playerrights() == netPlayerRightsAdmin; if (netInfo.has_countrycode()) { tmpInfo.countryCode = netInfo.countrycode(); } diff --git a/src/net/common/netpacket.cpp b/src/net/common/netpacket.cpp index 43333cc3..1385724e 100644 --- a/src/net/common/netpacket.cpp +++ b/src/net/common/netpacket.cpp @@ -52,7 +52,7 @@ NetPacket::~NetPacket() } boost::shared_ptr -NetPacket::Create(char *data, size_t dataSize) +NetPacket::Create(const char *data, size_t dataSize) { boost::shared_ptr tmpPacket; diff --git a/src/net/common/serverbanmanager.cpp b/src/net/common/serverbanmanager.cpp index 8e511b2c..c3890317 100644 --- a/src/net/common/serverbanmanager.cpp +++ b/src/net/common/serverbanmanager.cpp @@ -30,6 +30,7 @@ *****************************************************************************/ #include +#include using namespace std; @@ -43,6 +44,15 @@ ServerBanManager::~ServerBanManager() { } +void +ServerBanManager::SetAdminPlayerIds(const std::list adminList) +{ + boost::mutex::scoped_lock lock(m_banMutex); + m_adminPlayers.resize(adminList.size()); + copy(adminList.begin(), adminList.end(), m_adminPlayers.begin()); + sort(m_adminPlayers.begin(), m_adminPlayers.end()); +} + void ServerBanManager::BanPlayerName(const std::string &playerName, unsigned durationHours) { @@ -140,6 +150,20 @@ ServerBanManager::ClearBanList() m_banIPAddressMap.clear(); } +bool +ServerBanManager::IsAdminPlayer(DB_id playerId) const +{ + bool retVal = false; + if (playerId != DB_ID_INVALID) { + boost::mutex::scoped_lock lock(m_banMutex); + + if (binary_search(m_adminPlayers.begin(), m_adminPlayers.end(), playerId)) { + retVal = true; + } + } + return retVal; +} + bool ServerBanManager::IsPlayerBanned(const std::string &name) const { diff --git a/src/net/common/serverlobbythread.cpp b/src/net/common/serverlobbythread.cpp index cb65adf8..a13ef8c1 100644 --- a/src/net/common/serverlobbythread.cpp +++ b/src/net/common/serverlobbythread.cpp @@ -146,16 +146,16 @@ public: LOG_MSG("Successfully connected to database."); } - virtual void ConnectFailed(const string &error) { + virtual void ConnectFailed(string error) { LOG_ERROR("DB connect error: " << error); } - virtual void QueryError(const std::string &error) { + virtual void QueryError(string error) { LOG_ERROR("DB query error: " << error); } - virtual void PlayerLoginSuccess(unsigned requestId, const DBPlayerData &dbPlayerData) { - m_server.UserValid(requestId, dbPlayerData); + virtual void PlayerLoginSuccess(unsigned requestId, boost::shared_ptr dbPlayerData) { + m_server.UserValid(requestId, *dbPlayerData); } virtual void PlayerLoginFailed(unsigned requestId) { @@ -199,6 +199,10 @@ public: m_server.SendReportGameResult(requestId, replyId, false); } + virtual void PlayerAdminList(unsigned requestId, std::list adminList) { + m_server.GetBanManager().SetAdminPlayerIds(adminList); + } + private: ServerLobbyThread &m_server; }; @@ -242,6 +246,7 @@ ServerLobbyThread::Init(const string &logDir) m_serverConfig.readConfigString("DBServerPassword"), m_serverConfig.readConfigString("DBServerDatabaseName"), m_serverConfig.readConfigString("DBServerEncryptionKey")); + m_database->AsyncQueryAdminPlayers(0); GetBanManager().InitGameNameBadWordList(m_serverConfig.readConfigStringList("GameNameBadWordList")); } @@ -926,6 +931,10 @@ ServerLobbyThread::HandlePacket(boost::shared_ptr session, boost::s HandleNetPacketReportGame(session, packet->GetMsg()->reportgamemessage()); } else if (packet->GetMsg()->messagetype() == PokerTHMessage::Type_LeaveGameRequestMessage) { // Ignore "leave game" in this state. + } else if (packet->GetMsg()->messagetype() == PokerTHMessage::Type_AdminRemoveGameMessage) { + HandleNetPacketAdminRemoveGame(session, packet->GetMsg()->adminremovegamemessage()); + } else if (packet->GetMsg()->messagetype() == PokerTHMessage::Type_AdminBanPlayerMessage) { + HandleNetPacketAdminBanPlayer(session, packet->GetMsg()->adminbanplayermessage()); } else { SessionError(session, ERR_SOCK_INVALID_STATE); } @@ -1074,6 +1083,10 @@ ServerLobbyThread::HandleNetPacketAuthClientResponse(boost::shared_ptr tmpPlayerData = session->GetPlayerData(); + if (GetBanManager().IsAdminPlayer(tmpPlayerData->GetDBId())) { + session->GetPlayerData()->SetRights(PLAYER_RIGHTS_ADMIN); + } CheckAvatarBlacklist(session); } else SessionError(session, ERR_NET_INVALID_PASSWORD); @@ -1460,6 +1473,21 @@ ServerLobbyThread::HandleNetPacketReportGame(boost::shared_ptr sess } } +void +ServerLobbyThread::HandleNetPacketAdminRemoveGame(boost::shared_ptr session, const AdminRemoveGameMessage &removeGame) +{ + GameMap::iterator pos = m_gameMap.find(removeGame.removegameid()); + + if (pos != m_gameMap.end() && session->GetPlayerData() && GetBanManager().IsAdminPlayer(session->GetPlayerData()->GetDBId())) { + InternalRemoveGame(pos->second); + } +} + +void +ServerLobbyThread::HandleNetPacketAdminBanPlayer(boost::shared_ptr session, const AdminBanPlayerMessage &banPlayer) +{ +} + void ServerLobbyThread::AuthChallenge(boost::shared_ptr session, const string &secret) { diff --git a/src/net/netpacket.h b/src/net/netpacket.h index 5095cab1..3a3ea994 100644 --- a/src/net/netpacket.h +++ b/src/net/netpacket.h @@ -63,7 +63,7 @@ public: NetPacket(PokerTHMessage *msg); ~NetPacket(); - static boost::shared_ptr Create(char *data, size_t dataSize); + static boost::shared_ptr Create(const char *data, size_t dataSize); const PokerTHMessage *GetMsg() const { return m_msg; diff --git a/src/net/serverbanmanager.h b/src/net/serverbanmanager.h index a733774e..5a9d7fce 100644 --- a/src/net/serverbanmanager.h +++ b/src/net/serverbanmanager.h @@ -33,6 +33,7 @@ #ifndef _SERVERBANMANAGER_H_ #define _SERVERBANMANAGER_H_ +#include #include #include #include @@ -47,6 +48,8 @@ public: ServerBanManager(boost::shared_ptr ioService); virtual ~ServerBanManager(); + void SetAdminPlayerIds(const std::list adminList); + void BanPlayerName(const std::string &playerName, unsigned durationHours = 0); void BanPlayerRegex(const std::string &playerRegex, unsigned durationHours = 0); void BanIPAddress(const std::string &ipAddress, unsigned durationHours); @@ -54,6 +57,7 @@ public: void GetBanList(std::list &list) const; void ClearBanList(); + bool IsAdminPlayer(DB_id playerId) const; bool IsPlayerBanned(const std::string &name) const; bool IsIPAddressBanned(const std::string &ipAddress) const; @@ -75,6 +79,7 @@ protected: typedef std::map RegexMap; typedef std::map IPAddressMap; typedef std::list RegexList; + typedef std::vector DBPlayerIdList; boost::shared_ptr InternalRegisterTimedBan(unsigned timerId, unsigned durationHours); void TimerRemoveBan(const boost::system::error_code &ec, unsigned banId, boost::shared_ptr timer); @@ -87,6 +92,7 @@ private: RegexMap m_banPlayerNameMap; RegexList m_gameNameBadWordFilter; IPAddressMap m_banIPAddressMap; + DBPlayerIdList m_adminPlayers; unsigned m_curBanId; mutable boost::mutex m_banMutex; }; diff --git a/src/net/serverlobbythread.h b/src/net/serverlobbythread.h index e292b568..0e60f3d9 100644 --- a/src/net/serverlobbythread.h +++ b/src/net/serverlobbythread.h @@ -156,6 +156,8 @@ protected: void HandleNetPacketChatRequest(boost::shared_ptr session, const ChatRequestMessage &chatRequest); void HandleNetPacketRejectGameInvitation(boost::shared_ptr session, const RejectGameInvitationMessage &reject); void HandleNetPacketReportGame(boost::shared_ptr session, const ReportGameMessage &report); + void HandleNetPacketAdminRemoveGame(boost::shared_ptr session, const AdminRemoveGameMessage &removeGame); + void HandleNetPacketAdminBanPlayer(boost::shared_ptr session, const AdminBanPlayerMessage &banPlayer); // TODO would be better to use state pattern here. void AuthChallenge(boost::shared_ptr session, const std::string &secret); void CheckAvatarBlacklist(boost::shared_ptr session); diff --git a/src/playerdata.cpp b/src/playerdata.cpp index 7a6a9e4a..8cd5cedf 100644 --- a/src/playerdata.cpp +++ b/src/playerdata.cpp @@ -137,6 +137,13 @@ PlayerData::GetRights() const return m_rights; } +void +PlayerData::SetRights(PlayerRights rights) +{ + boost::mutex::scoped_lock lock(m_dataMutex); + m_rights = rights; +} + bool PlayerData::IsGameAdmin() const { diff --git a/src/playerdata.h b/src/playerdata.h index 0a8b4273..6a0ed8d3 100644 --- a/src/playerdata.h +++ b/src/playerdata.h @@ -70,10 +70,11 @@ struct AvatarFile { }; struct PlayerInfo { - PlayerInfo() : ptype(PLAYER_TYPE_HUMAN), isGuest(false), hasAvatar(false), avatarType(AVATAR_FILE_TYPE_UNKNOWN) {} + PlayerInfo() : ptype(PLAYER_TYPE_HUMAN), isGuest(false), isAdmin(false), hasAvatar(false), avatarType(AVATAR_FILE_TYPE_UNKNOWN) {} std::string playerName; PlayerType ptype; bool isGuest; + bool isAdmin; std::string countryCode; bool hasAvatar; MD5Buf avatar; @@ -100,6 +101,7 @@ public: PlayerType GetType() const; void SetType(PlayerType type); PlayerRights GetRights() const; + void SetRights(PlayerRights rights); bool IsGameAdmin() const; void SetGameAdmin(bool isAdmin); unsigned GetUniqueId() const; diff --git a/src/third_party/protobuf/pokerth.pb.cc b/src/third_party/protobuf/pokerth.pb.cc index 40c36824..bdfd5d7b 100644 --- a/src/third_party/protobuf/pokerth.pb.cc +++ b/src/third_party/protobuf/pokerth.pb.cc @@ -93,6 +93,8 @@ void protobuf_ShutdownFile_pokerth_2eproto() { delete ReportGameMessage::default_instance_; delete ReportGameAckMessage::default_instance_; delete ErrorMessage::default_instance_; + delete AdminRemoveGameMessage::default_instance_; + delete AdminBanPlayerMessage::default_instance_; delete PokerTHMessage::default_instance_; } @@ -184,6 +186,8 @@ void protobuf_AddDesc_pokerth_2eproto() { ReportGameMessage::default_instance_ = new ReportGameMessage(); ReportGameAckMessage::default_instance_ = new ReportGameAckMessage(); ErrorMessage::default_instance_ = new ErrorMessage(); + AdminRemoveGameMessage::default_instance_ = new AdminRemoveGameMessage(); + AdminBanPlayerMessage::default_instance_ = new AdminBanPlayerMessage(); PokerTHMessage::default_instance_ = new PokerTHMessage(); NetGameInfo::default_instance_->InitAsDefaultInstance(); PlayerResult::default_instance_->InitAsDefaultInstance(); @@ -267,6 +271,8 @@ void protobuf_AddDesc_pokerth_2eproto() { ReportGameMessage::default_instance_->InitAsDefaultInstance(); ReportGameAckMessage::default_instance_->InitAsDefaultInstance(); ErrorMessage::default_instance_->InitAsDefaultInstance(); + AdminRemoveGameMessage::default_instance_->InitAsDefaultInstance(); + AdminBanPlayerMessage::default_instance_->InitAsDefaultInstance(); PokerTHMessage::default_instance_->InitAsDefaultInstance(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_pokerth_2eproto); } @@ -19381,6 +19387,324 @@ void ErrorMessage::Swap(ErrorMessage* other) { } +// =================================================================== + +#ifndef _MSC_VER +const int AdminRemoveGameMessage::kRemoveGameIdFieldNumber; +#endif // !_MSC_VER + +AdminRemoveGameMessage::AdminRemoveGameMessage() + : ::google::protobuf::MessageLite() { + SharedCtor(); +} + +void AdminRemoveGameMessage::InitAsDefaultInstance() { +} + +AdminRemoveGameMessage::AdminRemoveGameMessage(const AdminRemoveGameMessage& from) + : ::google::protobuf::MessageLite() { + SharedCtor(); + MergeFrom(from); +} + +void AdminRemoveGameMessage::SharedCtor() { + _cached_size_ = 0; + removegameid_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +AdminRemoveGameMessage::~AdminRemoveGameMessage() { + SharedDtor(); +} + +void AdminRemoveGameMessage::SharedDtor() { + if (this != default_instance_) { + } +} + +void AdminRemoveGameMessage::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const AdminRemoveGameMessage& AdminRemoveGameMessage::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_pokerth_2eproto(); return *default_instance_; +} + +AdminRemoveGameMessage* AdminRemoveGameMessage::default_instance_ = NULL; + +AdminRemoveGameMessage* AdminRemoveGameMessage::New() const { + return new AdminRemoveGameMessage; +} + +void AdminRemoveGameMessage::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + removegameid_ = 0u; + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +bool AdminRemoveGameMessage::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 removeGameId = 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, &removegameid_))); + set_has_removegameid(); + } 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 AdminRemoveGameMessage::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required uint32 removeGameId = 1; + if (has_removegameid()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->removegameid(), output); + } + +} + +int AdminRemoveGameMessage::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required uint32 removeGameId = 1; + if (has_removegameid()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->removegameid()); + } + + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void AdminRemoveGameMessage::CheckTypeAndMergeFrom( + const ::google::protobuf::MessageLite& from) { + MergeFrom(*::google::protobuf::down_cast(&from)); +} + +void AdminRemoveGameMessage::MergeFrom(const AdminRemoveGameMessage& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_removegameid()) { + set_removegameid(from.removegameid()); + } + } +} + +void AdminRemoveGameMessage::CopyFrom(const AdminRemoveGameMessage& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AdminRemoveGameMessage::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + return true; +} + +void AdminRemoveGameMessage::Swap(AdminRemoveGameMessage* other) { + if (other != this) { + std::swap(removegameid_, other->removegameid_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::std::string AdminRemoveGameMessage::GetTypeName() const { + return "AdminRemoveGameMessage"; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int AdminBanPlayerMessage::kBanPlayerIdFieldNumber; +#endif // !_MSC_VER + +AdminBanPlayerMessage::AdminBanPlayerMessage() + : ::google::protobuf::MessageLite() { + SharedCtor(); +} + +void AdminBanPlayerMessage::InitAsDefaultInstance() { +} + +AdminBanPlayerMessage::AdminBanPlayerMessage(const AdminBanPlayerMessage& from) + : ::google::protobuf::MessageLite() { + SharedCtor(); + MergeFrom(from); +} + +void AdminBanPlayerMessage::SharedCtor() { + _cached_size_ = 0; + banplayerid_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +AdminBanPlayerMessage::~AdminBanPlayerMessage() { + SharedDtor(); +} + +void AdminBanPlayerMessage::SharedDtor() { + if (this != default_instance_) { + } +} + +void AdminBanPlayerMessage::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const AdminBanPlayerMessage& AdminBanPlayerMessage::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_pokerth_2eproto(); return *default_instance_; +} + +AdminBanPlayerMessage* AdminBanPlayerMessage::default_instance_ = NULL; + +AdminBanPlayerMessage* AdminBanPlayerMessage::New() const { + return new AdminBanPlayerMessage; +} + +void AdminBanPlayerMessage::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + banplayerid_ = 0u; + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +bool AdminBanPlayerMessage::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 banPlayerId = 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, &banplayerid_))); + set_has_banplayerid(); + } 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 AdminBanPlayerMessage::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required uint32 banPlayerId = 1; + if (has_banplayerid()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->banplayerid(), output); + } + +} + +int AdminBanPlayerMessage::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required uint32 banPlayerId = 1; + if (has_banplayerid()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->banplayerid()); + } + + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void AdminBanPlayerMessage::CheckTypeAndMergeFrom( + const ::google::protobuf::MessageLite& from) { + MergeFrom(*::google::protobuf::down_cast(&from)); +} + +void AdminBanPlayerMessage::MergeFrom(const AdminBanPlayerMessage& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_banplayerid()) { + set_banplayerid(from.banplayerid()); + } + } +} + +void AdminBanPlayerMessage::CopyFrom(const AdminBanPlayerMessage& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AdminBanPlayerMessage::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + return true; +} + +void AdminBanPlayerMessage::Swap(AdminBanPlayerMessage* other) { + if (other != this) { + std::swap(banplayerid_, other->banplayerid_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::std::string AdminBanPlayerMessage::GetTypeName() const { + return "AdminBanPlayerMessage"; +} + + // =================================================================== bool PokerTHMessage_PokerTHMessageType_IsValid(int value) { @@ -19458,6 +19782,8 @@ bool PokerTHMessage_PokerTHMessageType_IsValid(int value) { case 71: case 72: case 73: + case 74: + case 75: return true; default: return false; @@ -19538,6 +19864,8 @@ const PokerTHMessage_PokerTHMessageType PokerTHMessage::Type_ReportAvatarAckMess const PokerTHMessage_PokerTHMessageType PokerTHMessage::Type_ReportGameMessage; const PokerTHMessage_PokerTHMessageType PokerTHMessage::Type_ReportGameAckMessage; const PokerTHMessage_PokerTHMessageType PokerTHMessage::Type_ErrorMessage; +const PokerTHMessage_PokerTHMessageType PokerTHMessage::Type_AdminRemoveGameMessage; +const PokerTHMessage_PokerTHMessageType PokerTHMessage::Type_AdminBanPlayerMessage; const PokerTHMessage_PokerTHMessageType PokerTHMessage::PokerTHMessageType_MIN; const PokerTHMessage_PokerTHMessageType PokerTHMessage::PokerTHMessageType_MAX; const int PokerTHMessage::PokerTHMessageType_ARRAYSIZE; @@ -19617,6 +19945,8 @@ const int PokerTHMessage::kReportAvatarAckMessageFieldNumber; const int PokerTHMessage::kReportGameMessageFieldNumber; const int PokerTHMessage::kReportGameAckMessageFieldNumber; const int PokerTHMessage::kErrorMessageFieldNumber; +const int PokerTHMessage::kAdminRemoveGameMessageFieldNumber; +const int PokerTHMessage::kAdminBanPlayerMessageFieldNumber; #endif // !_MSC_VER PokerTHMessage::PokerTHMessage() @@ -19698,6 +20028,8 @@ void PokerTHMessage::InitAsDefaultInstance() { reportgamemessage_ = const_cast< ::ReportGameMessage*>(&::ReportGameMessage::default_instance()); reportgameackmessage_ = const_cast< ::ReportGameAckMessage*>(&::ReportGameAckMessage::default_instance()); errormessage_ = const_cast< ::ErrorMessage*>(&::ErrorMessage::default_instance()); + adminremovegamemessage_ = const_cast< ::AdminRemoveGameMessage*>(&::AdminRemoveGameMessage::default_instance()); + adminbanplayermessage_ = const_cast< ::AdminBanPlayerMessage*>(&::AdminBanPlayerMessage::default_instance()); } PokerTHMessage::PokerTHMessage(const PokerTHMessage& from) @@ -19782,6 +20114,8 @@ void PokerTHMessage::SharedCtor() { reportgamemessage_ = NULL; reportgameackmessage_ = NULL; errormessage_ = NULL; + adminremovegamemessage_ = NULL; + adminbanplayermessage_ = NULL; ::memset(_has_bits_, 0, sizeof(_has_bits_)); } @@ -19864,6 +20198,8 @@ void PokerTHMessage::SharedDtor() { delete reportgamemessage_; delete reportgameackmessage_; delete errormessage_; + delete adminremovegamemessage_; + delete adminbanplayermessage_; } } @@ -20122,6 +20458,12 @@ void PokerTHMessage::Clear() { if (has_errormessage()) { if (errormessage_ != NULL) errormessage_->::ErrorMessage::Clear(); } + if (has_adminremovegamemessage()) { + if (adminremovegamemessage_ != NULL) adminremovegamemessage_->::AdminRemoveGameMessage::Clear(); + } + if (has_adminbanplayermessage()) { + if (adminbanplayermessage_ != NULL) adminbanplayermessage_->::AdminBanPlayerMessage::Clear(); + } } ::memset(_has_bits_, 0, sizeof(_has_bits_)); } @@ -21168,6 +21510,34 @@ bool PokerTHMessage::MergePartialFromCodedStream( } else { goto handle_uninterpreted; } + if (input->ExpectTag(602)) goto parse_adminRemoveGameMessage; + break; + } + + // optional .AdminRemoveGameMessage adminRemoveGameMessage = 75; + case 75: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_adminRemoveGameMessage: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_adminremovegamemessage())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(610)) goto parse_adminBanPlayerMessage; + break; + } + + // optional .AdminBanPlayerMessage adminBanPlayerMessage = 76; + case 76: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_adminBanPlayerMessage: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_adminbanplayermessage())); + } else { + goto handle_uninterpreted; + } if (input->ExpectAtEnd()) return true; break; } @@ -21633,6 +22003,18 @@ void PokerTHMessage::SerializeWithCachedSizes( 74, this->errormessage(), output); } + // optional .AdminRemoveGameMessage adminRemoveGameMessage = 75; + if (has_adminremovegamemessage()) { + ::google::protobuf::internal::WireFormatLite::WriteMessage( + 75, this->adminremovegamemessage(), output); + } + + // optional .AdminBanPlayerMessage adminBanPlayerMessage = 76; + if (has_adminbanplayermessage()) { + ::google::protobuf::internal::WireFormatLite::WriteMessage( + 76, this->adminbanplayermessage(), output); + } + } int PokerTHMessage::ByteSize() const { @@ -22174,6 +22556,20 @@ int PokerTHMessage::ByteSize() const { this->errormessage()); } + // optional .AdminRemoveGameMessage adminRemoveGameMessage = 75; + if (has_adminremovegamemessage()) { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->adminremovegamemessage()); + } + + // optional .AdminBanPlayerMessage adminBanPlayerMessage = 76; + if (has_adminbanplayermessage()) { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->adminbanplayermessage()); + } + } GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = total_size; @@ -22429,6 +22825,12 @@ void PokerTHMessage::MergeFrom(const PokerTHMessage& from) { if (from.has_errormessage()) { mutable_errormessage()->::ErrorMessage::MergeFrom(from.errormessage()); } + if (from.has_adminremovegamemessage()) { + mutable_adminremovegamemessage()->::AdminRemoveGameMessage::MergeFrom(from.adminremovegamemessage()); + } + if (from.has_adminbanplayermessage()) { + mutable_adminbanplayermessage()->::AdminBanPlayerMessage::MergeFrom(from.adminbanplayermessage()); + } } } @@ -22651,6 +23053,12 @@ bool PokerTHMessage::IsInitialized() const { if (has_errormessage()) { if (!this->errormessage().IsInitialized()) return false; } + if (has_adminremovegamemessage()) { + if (!this->adminremovegamemessage().IsInitialized()) return false; + } + if (has_adminbanplayermessage()) { + if (!this->adminbanplayermessage().IsInitialized()) return false; + } return true; } @@ -22730,6 +23138,8 @@ void PokerTHMessage::Swap(PokerTHMessage* other) { std::swap(reportgamemessage_, other->reportgamemessage_); std::swap(reportgameackmessage_, other->reportgameackmessage_); std::swap(errormessage_, other->errormessage_); + std::swap(adminremovegamemessage_, other->adminremovegamemessage_); + std::swap(adminbanplayermessage_, other->adminbanplayermessage_); 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 84bf25bd..f6112a64 100644 --- a/src/third_party/protobuf/pokerth.pb.h +++ b/src/third_party/protobuf/pokerth.pb.h @@ -111,6 +111,8 @@ class ReportAvatarAckMessage; class ReportGameMessage; class ReportGameAckMessage; class ErrorMessage; +class AdminRemoveGameMessage; +class AdminBanPlayerMessage; class PokerTHMessage; enum NetGameInfo_NetGameType { @@ -428,11 +430,13 @@ enum PokerTHMessage_PokerTHMessageType { PokerTHMessage_PokerTHMessageType_Type_ReportAvatarAckMessage = 70, PokerTHMessage_PokerTHMessageType_Type_ReportGameMessage = 71, PokerTHMessage_PokerTHMessageType_Type_ReportGameAckMessage = 72, - PokerTHMessage_PokerTHMessageType_Type_ErrorMessage = 73 + PokerTHMessage_PokerTHMessageType_Type_ErrorMessage = 73, + PokerTHMessage_PokerTHMessageType_Type_AdminRemoveGameMessage = 74, + PokerTHMessage_PokerTHMessageType_Type_AdminBanPlayerMessage = 75 }; 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_ErrorMessage; +const PokerTHMessage_PokerTHMessageType PokerTHMessage_PokerTHMessageType_PokerTHMessageType_MAX = PokerTHMessage_PokerTHMessageType_Type_AdminBanPlayerMessage; const int PokerTHMessage_PokerTHMessageType_PokerTHMessageType_ARRAYSIZE = PokerTHMessage_PokerTHMessageType_PokerTHMessageType_MAX + 1; enum NetGameMode { @@ -8125,6 +8129,144 @@ class ErrorMessage : public ::google::protobuf::MessageLite { }; // ------------------------------------------------------------------- +class AdminRemoveGameMessage : public ::google::protobuf::MessageLite { + public: + AdminRemoveGameMessage(); + virtual ~AdminRemoveGameMessage(); + + AdminRemoveGameMessage(const AdminRemoveGameMessage& from); + + inline AdminRemoveGameMessage& operator=(const AdminRemoveGameMessage& from) { + CopyFrom(from); + return *this; + } + + static const AdminRemoveGameMessage& default_instance(); + + void Swap(AdminRemoveGameMessage* other); + + // implements Message ---------------------------------------------- + + AdminRemoveGameMessage* New() const; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); + void CopyFrom(const AdminRemoveGameMessage& from); + void MergeFrom(const AdminRemoveGameMessage& 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 removeGameId = 1; + inline bool has_removegameid() const; + inline void clear_removegameid(); + static const int kRemoveGameIdFieldNumber = 1; + inline ::google::protobuf::uint32 removegameid() const; + inline void set_removegameid(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:AdminRemoveGameMessage) + private: + inline void set_has_removegameid(); + inline void clear_has_removegameid(); + + ::google::protobuf::uint32 removegameid_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; + + friend void protobuf_AddDesc_pokerth_2eproto(); + friend void protobuf_AssignDesc_pokerth_2eproto(); + friend void protobuf_ShutdownFile_pokerth_2eproto(); + + void InitAsDefaultInstance(); + static AdminRemoveGameMessage* default_instance_; +}; +// ------------------------------------------------------------------- + +class AdminBanPlayerMessage : public ::google::protobuf::MessageLite { + public: + AdminBanPlayerMessage(); + virtual ~AdminBanPlayerMessage(); + + AdminBanPlayerMessage(const AdminBanPlayerMessage& from); + + inline AdminBanPlayerMessage& operator=(const AdminBanPlayerMessage& from) { + CopyFrom(from); + return *this; + } + + static const AdminBanPlayerMessage& default_instance(); + + void Swap(AdminBanPlayerMessage* other); + + // implements Message ---------------------------------------------- + + AdminBanPlayerMessage* New() const; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); + void CopyFrom(const AdminBanPlayerMessage& from); + void MergeFrom(const AdminBanPlayerMessage& 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 banPlayerId = 1; + inline bool has_banplayerid() const; + inline void clear_banplayerid(); + static const int kBanPlayerIdFieldNumber = 1; + inline ::google::protobuf::uint32 banplayerid() const; + inline void set_banplayerid(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:AdminBanPlayerMessage) + private: + inline void set_has_banplayerid(); + inline void clear_has_banplayerid(); + + ::google::protobuf::uint32 banplayerid_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; + + friend void protobuf_AddDesc_pokerth_2eproto(); + friend void protobuf_AssignDesc_pokerth_2eproto(); + friend void protobuf_ShutdownFile_pokerth_2eproto(); + + void InitAsDefaultInstance(); + static AdminBanPlayerMessage* default_instance_; +}; +// ------------------------------------------------------------------- + class PokerTHMessage : public ::google::protobuf::MessageLite { public: PokerTHMessage(); @@ -8240,6 +8382,8 @@ class PokerTHMessage : public ::google::protobuf::MessageLite { static const PokerTHMessageType Type_ReportGameMessage = PokerTHMessage_PokerTHMessageType_Type_ReportGameMessage; static const PokerTHMessageType Type_ReportGameAckMessage = PokerTHMessage_PokerTHMessageType_Type_ReportGameAckMessage; static const PokerTHMessageType Type_ErrorMessage = PokerTHMessage_PokerTHMessageType_Type_ErrorMessage; + static const PokerTHMessageType Type_AdminRemoveGameMessage = PokerTHMessage_PokerTHMessageType_Type_AdminRemoveGameMessage; + static const PokerTHMessageType Type_AdminBanPlayerMessage = PokerTHMessage_PokerTHMessageType_Type_AdminBanPlayerMessage; static inline bool PokerTHMessageType_IsValid(int value) { return PokerTHMessage_PokerTHMessageType_IsValid(value); } @@ -8843,6 +8987,22 @@ class PokerTHMessage : public ::google::protobuf::MessageLite { inline ::ErrorMessage* mutable_errormessage(); inline ::ErrorMessage* release_errormessage(); + // optional .AdminRemoveGameMessage adminRemoveGameMessage = 75; + inline bool has_adminremovegamemessage() const; + inline void clear_adminremovegamemessage(); + static const int kAdminRemoveGameMessageFieldNumber = 75; + inline const ::AdminRemoveGameMessage& adminremovegamemessage() const; + inline ::AdminRemoveGameMessage* mutable_adminremovegamemessage(); + inline ::AdminRemoveGameMessage* release_adminremovegamemessage(); + + // optional .AdminBanPlayerMessage adminBanPlayerMessage = 76; + inline bool has_adminbanplayermessage() const; + inline void clear_adminbanplayermessage(); + static const int kAdminBanPlayerMessageFieldNumber = 76; + inline const ::AdminBanPlayerMessage& adminbanplayermessage() const; + inline ::AdminBanPlayerMessage* mutable_adminbanplayermessage(); + inline ::AdminBanPlayerMessage* release_adminbanplayermessage(); + // @@protoc_insertion_point(class_scope:PokerTHMessage) private: inline void set_has_messagetype(); @@ -8993,6 +9153,10 @@ class PokerTHMessage : public ::google::protobuf::MessageLite { inline void clear_has_reportgameackmessage(); inline void set_has_errormessage(); inline void clear_has_errormessage(); + inline void set_has_adminremovegamemessage(); + inline void clear_has_adminremovegamemessage(); + inline void set_has_adminbanplayermessage(); + inline void clear_has_adminbanplayermessage(); ::AnnounceMessage* announcemessage_; ::InitMessage* initmessage_; @@ -9067,10 +9231,12 @@ class PokerTHMessage : public ::google::protobuf::MessageLite { ::ReportGameMessage* reportgamemessage_; ::ReportGameAckMessage* reportgameackmessage_; ::ErrorMessage* errormessage_; + ::AdminRemoveGameMessage* adminremovegamemessage_; + ::AdminBanPlayerMessage* adminbanplayermessage_; int messagetype_; mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(74 + 31) / 32]; + ::google::protobuf::uint32 _has_bits_[(76 + 31) / 32]; friend void protobuf_AddDesc_pokerth_2eproto(); friend void protobuf_AssignDesc_pokerth_2eproto(); @@ -15473,6 +15639,58 @@ inline void ErrorMessage::set_errorreason(::ErrorMessage_ErrorReason value) { // ------------------------------------------------------------------- +// AdminRemoveGameMessage + +// required uint32 removeGameId = 1; +inline bool AdminRemoveGameMessage::has_removegameid() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void AdminRemoveGameMessage::set_has_removegameid() { + _has_bits_[0] |= 0x00000001u; +} +inline void AdminRemoveGameMessage::clear_has_removegameid() { + _has_bits_[0] &= ~0x00000001u; +} +inline void AdminRemoveGameMessage::clear_removegameid() { + removegameid_ = 0u; + clear_has_removegameid(); +} +inline ::google::protobuf::uint32 AdminRemoveGameMessage::removegameid() const { + return removegameid_; +} +inline void AdminRemoveGameMessage::set_removegameid(::google::protobuf::uint32 value) { + set_has_removegameid(); + removegameid_ = value; +} + +// ------------------------------------------------------------------- + +// AdminBanPlayerMessage + +// required uint32 banPlayerId = 1; +inline bool AdminBanPlayerMessage::has_banplayerid() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void AdminBanPlayerMessage::set_has_banplayerid() { + _has_bits_[0] |= 0x00000001u; +} +inline void AdminBanPlayerMessage::clear_has_banplayerid() { + _has_bits_[0] &= ~0x00000001u; +} +inline void AdminBanPlayerMessage::clear_banplayerid() { + banplayerid_ = 0u; + clear_has_banplayerid(); +} +inline ::google::protobuf::uint32 AdminBanPlayerMessage::banplayerid() const { + return banplayerid_; +} +inline void AdminBanPlayerMessage::set_banplayerid(::google::protobuf::uint32 value) { + set_has_banplayerid(); + banplayerid_ = value; +} + +// ------------------------------------------------------------------- + // PokerTHMessage // required .PokerTHMessage.PokerTHMessageType messageType = 1; @@ -17615,6 +17833,64 @@ inline ::ErrorMessage* PokerTHMessage::release_errormessage() { return temp; } +// optional .AdminRemoveGameMessage adminRemoveGameMessage = 75; +inline bool PokerTHMessage::has_adminremovegamemessage() const { + return (_has_bits_[2] & 0x00000400u) != 0; +} +inline void PokerTHMessage::set_has_adminremovegamemessage() { + _has_bits_[2] |= 0x00000400u; +} +inline void PokerTHMessage::clear_has_adminremovegamemessage() { + _has_bits_[2] &= ~0x00000400u; +} +inline void PokerTHMessage::clear_adminremovegamemessage() { + if (adminremovegamemessage_ != NULL) adminremovegamemessage_->::AdminRemoveGameMessage::Clear(); + clear_has_adminremovegamemessage(); +} +inline const ::AdminRemoveGameMessage& PokerTHMessage::adminremovegamemessage() const { + return adminremovegamemessage_ != NULL ? *adminremovegamemessage_ : *default_instance_->adminremovegamemessage_; +} +inline ::AdminRemoveGameMessage* PokerTHMessage::mutable_adminremovegamemessage() { + set_has_adminremovegamemessage(); + if (adminremovegamemessage_ == NULL) adminremovegamemessage_ = new ::AdminRemoveGameMessage; + return adminremovegamemessage_; +} +inline ::AdminRemoveGameMessage* PokerTHMessage::release_adminremovegamemessage() { + clear_has_adminremovegamemessage(); + ::AdminRemoveGameMessage* temp = adminremovegamemessage_; + adminremovegamemessage_ = NULL; + return temp; +} + +// optional .AdminBanPlayerMessage adminBanPlayerMessage = 76; +inline bool PokerTHMessage::has_adminbanplayermessage() const { + return (_has_bits_[2] & 0x00000800u) != 0; +} +inline void PokerTHMessage::set_has_adminbanplayermessage() { + _has_bits_[2] |= 0x00000800u; +} +inline void PokerTHMessage::clear_has_adminbanplayermessage() { + _has_bits_[2] &= ~0x00000800u; +} +inline void PokerTHMessage::clear_adminbanplayermessage() { + if (adminbanplayermessage_ != NULL) adminbanplayermessage_->::AdminBanPlayerMessage::Clear(); + clear_has_adminbanplayermessage(); +} +inline const ::AdminBanPlayerMessage& PokerTHMessage::adminbanplayermessage() const { + return adminbanplayermessage_ != NULL ? *adminbanplayermessage_ : *default_instance_->adminbanplayermessage_; +} +inline ::AdminBanPlayerMessage* PokerTHMessage::mutable_adminbanplayermessage() { + set_has_adminbanplayermessage(); + if (adminbanplayermessage_ == NULL) adminbanplayermessage_ = new ::AdminBanPlayerMessage; + return adminbanplayermessage_; +} +inline ::AdminBanPlayerMessage* PokerTHMessage::release_adminbanplayermessage() { + clear_has_adminbanplayermessage(); + ::AdminBanPlayerMessage* temp = adminbanplayermessage_; + adminbanplayermessage_ = 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 4176699e..ba1f3915 100644 --- a/tests/src/de/pokerth/protocol/ProtoBuf.java +++ b/tests/src/de/pokerth/protocol/ProtoBuf.java @@ -36324,6 +36324,588 @@ public final class ProtoBuf { // @@protoc_insertion_point(class_scope:ErrorMessage) } + public interface AdminRemoveGameMessageOrBuilder + extends com.google.protobuf.MessageLiteOrBuilder { + + // required uint32 removeGameId = 1; + boolean hasRemoveGameId(); + int getRemoveGameId(); + } + public static final class AdminRemoveGameMessage extends + com.google.protobuf.GeneratedMessageLite + implements AdminRemoveGameMessageOrBuilder { + // Use AdminRemoveGameMessage.newBuilder() to construct. + private AdminRemoveGameMessage(Builder builder) { + super(builder); + } + private AdminRemoveGameMessage(boolean noInit) {} + + private static final AdminRemoveGameMessage defaultInstance; + public static AdminRemoveGameMessage getDefaultInstance() { + return defaultInstance; + } + + public AdminRemoveGameMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private int bitField0_; + // required uint32 removeGameId = 1; + public static final int REMOVEGAMEID_FIELD_NUMBER = 1; + private int removeGameId_; + public boolean hasRemoveGameId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getRemoveGameId() { + return removeGameId_; + } + + private void initFields() { + removeGameId_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasRemoveGameId()) { + 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, removeGameId_); + } + } + + 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, removeGameId_); + } + 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.AdminRemoveGameMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage 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.AdminRemoveGameMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage 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.AdminRemoveGameMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage 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.AdminRemoveGameMessage 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.AdminRemoveGameMessage 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.AdminRemoveGameMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage 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.AdminRemoveGameMessage 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.AdminRemoveGameMessage, Builder> + implements de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessageOrBuilder { + // Construct using de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + removeGameId_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage getDefaultInstanceForType() { + return de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage.getDefaultInstance(); + } + + public de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage build() { + de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage buildPartial() { + de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage result = new de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.removeGameId_ = removeGameId_; + result.bitField0_ = to_bitField0_; + return result; + } + + public Builder mergeFrom(de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage other) { + if (other == de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage.getDefaultInstance()) return this; + if (other.hasRemoveGameId()) { + setRemoveGameId(other.getRemoveGameId()); + } + return this; + } + + public final boolean isInitialized() { + if (!hasRemoveGameId()) { + + 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; + removeGameId_ = input.readUInt32(); + break; + } + } + } + } + + private int bitField0_; + + // required uint32 removeGameId = 1; + private int removeGameId_ ; + public boolean hasRemoveGameId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getRemoveGameId() { + return removeGameId_; + } + public Builder setRemoveGameId(int value) { + bitField0_ |= 0x00000001; + removeGameId_ = value; + + return this; + } + public Builder clearRemoveGameId() { + bitField0_ = (bitField0_ & ~0x00000001); + removeGameId_ = 0; + + return this; + } + + // @@protoc_insertion_point(builder_scope:AdminRemoveGameMessage) + } + + static { + defaultInstance = new AdminRemoveGameMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:AdminRemoveGameMessage) + } + + public interface AdminBanPlayerMessageOrBuilder + extends com.google.protobuf.MessageLiteOrBuilder { + + // required uint32 banPlayerId = 1; + boolean hasBanPlayerId(); + int getBanPlayerId(); + } + public static final class AdminBanPlayerMessage extends + com.google.protobuf.GeneratedMessageLite + implements AdminBanPlayerMessageOrBuilder { + // Use AdminBanPlayerMessage.newBuilder() to construct. + private AdminBanPlayerMessage(Builder builder) { + super(builder); + } + private AdminBanPlayerMessage(boolean noInit) {} + + private static final AdminBanPlayerMessage defaultInstance; + public static AdminBanPlayerMessage getDefaultInstance() { + return defaultInstance; + } + + public AdminBanPlayerMessage getDefaultInstanceForType() { + return defaultInstance; + } + + private int bitField0_; + // required uint32 banPlayerId = 1; + public static final int BANPLAYERID_FIELD_NUMBER = 1; + private int banPlayerId_; + public boolean hasBanPlayerId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getBanPlayerId() { + return banPlayerId_; + } + + private void initFields() { + banPlayerId_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasBanPlayerId()) { + 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, banPlayerId_); + } + } + + 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, banPlayerId_); + } + 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.AdminBanPlayerMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage 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.AdminBanPlayerMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage 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.AdminBanPlayerMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage 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.AdminBanPlayerMessage 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.AdminBanPlayerMessage 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.AdminBanPlayerMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage 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.AdminBanPlayerMessage 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.AdminBanPlayerMessage, Builder> + implements de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessageOrBuilder { + // Construct using de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + banPlayerId_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage getDefaultInstanceForType() { + return de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage.getDefaultInstance(); + } + + public de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage build() { + de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage buildPartial() { + de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage result = new de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.banPlayerId_ = banPlayerId_; + result.bitField0_ = to_bitField0_; + return result; + } + + public Builder mergeFrom(de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage other) { + if (other == de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage.getDefaultInstance()) return this; + if (other.hasBanPlayerId()) { + setBanPlayerId(other.getBanPlayerId()); + } + return this; + } + + public final boolean isInitialized() { + if (!hasBanPlayerId()) { + + 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; + banPlayerId_ = input.readUInt32(); + break; + } + } + } + } + + private int bitField0_; + + // required uint32 banPlayerId = 1; + private int banPlayerId_ ; + public boolean hasBanPlayerId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getBanPlayerId() { + return banPlayerId_; + } + public Builder setBanPlayerId(int value) { + bitField0_ |= 0x00000001; + banPlayerId_ = value; + + return this; + } + public Builder clearBanPlayerId() { + bitField0_ = (bitField0_ & ~0x00000001); + banPlayerId_ = 0; + + return this; + } + + // @@protoc_insertion_point(builder_scope:AdminBanPlayerMessage) + } + + static { + defaultInstance = new AdminBanPlayerMessage(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:AdminBanPlayerMessage) + } + public interface PokerTHMessageOrBuilder extends com.google.protobuf.MessageLiteOrBuilder { @@ -36622,6 +37204,14 @@ public final class ProtoBuf { // optional .ErrorMessage errorMessage = 74; boolean hasErrorMessage(); de.pokerth.protocol.ProtoBuf.ErrorMessage getErrorMessage(); + + // optional .AdminRemoveGameMessage adminRemoveGameMessage = 75; + boolean hasAdminRemoveGameMessage(); + de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage getAdminRemoveGameMessage(); + + // optional .AdminBanPlayerMessage adminBanPlayerMessage = 76; + boolean hasAdminBanPlayerMessage(); + de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage getAdminBanPlayerMessage(); } public static final class PokerTHMessage extends com.google.protobuf.GeneratedMessageLite @@ -36716,6 +37306,8 @@ public final class ProtoBuf { Type_ReportGameMessage(70, 71), Type_ReportGameAckMessage(71, 72), Type_ErrorMessage(72, 73), + Type_AdminRemoveGameMessage(73, 74), + Type_AdminBanPlayerMessage(74, 75), ; public static final int Type_AnnounceMessage_VALUE = 1; @@ -36791,6 +37383,8 @@ public final class ProtoBuf { public static final int Type_ReportGameMessage_VALUE = 71; public static final int Type_ReportGameAckMessage_VALUE = 72; public static final int Type_ErrorMessage_VALUE = 73; + public static final int Type_AdminRemoveGameMessage_VALUE = 74; + public static final int Type_AdminBanPlayerMessage_VALUE = 75; public final int getNumber() { return value; } @@ -36870,6 +37464,8 @@ public final class ProtoBuf { case 71: return Type_ReportGameMessage; case 72: return Type_ReportGameAckMessage; case 73: return Type_ErrorMessage; + case 74: return Type_AdminRemoveGameMessage; + case 75: return Type_AdminBanPlayerMessage; default: return null; } } @@ -37638,6 +38234,26 @@ public final class ProtoBuf { return errorMessage_; } + // optional .AdminRemoveGameMessage adminRemoveGameMessage = 75; + public static final int ADMINREMOVEGAMEMESSAGE_FIELD_NUMBER = 75; + private de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage adminRemoveGameMessage_; + public boolean hasAdminRemoveGameMessage() { + return ((bitField2_ & 0x00000400) == 0x00000400); + } + public de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage getAdminRemoveGameMessage() { + return adminRemoveGameMessage_; + } + + // optional .AdminBanPlayerMessage adminBanPlayerMessage = 76; + public static final int ADMINBANPLAYERMESSAGE_FIELD_NUMBER = 76; + private de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage adminBanPlayerMessage_; + public boolean hasAdminBanPlayerMessage() { + return ((bitField2_ & 0x00000800) == 0x00000800); + } + public de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage getAdminBanPlayerMessage() { + return adminBanPlayerMessage_; + } + private void initFields() { messageType_ = de.pokerth.protocol.ProtoBuf.PokerTHMessage.PokerTHMessageType.Type_AnnounceMessage; announceMessage_ = de.pokerth.protocol.ProtoBuf.AnnounceMessage.getDefaultInstance(); @@ -37713,6 +38329,8 @@ public final class ProtoBuf { reportGameMessage_ = de.pokerth.protocol.ProtoBuf.ReportGameMessage.getDefaultInstance(); reportGameAckMessage_ = de.pokerth.protocol.ProtoBuf.ReportGameAckMessage.getDefaultInstance(); errorMessage_ = de.pokerth.protocol.ProtoBuf.ErrorMessage.getDefaultInstance(); + adminRemoveGameMessage_ = de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage.getDefaultInstance(); + adminBanPlayerMessage_ = de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -38143,6 +38761,18 @@ public final class ProtoBuf { return false; } } + if (hasAdminRemoveGameMessage()) { + if (!getAdminRemoveGameMessage().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + if (hasAdminBanPlayerMessage()) { + if (!getAdminBanPlayerMessage().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } memoizedIsInitialized = 1; return true; } @@ -38372,6 +39002,12 @@ public final class ProtoBuf { if (((bitField2_ & 0x00000200) == 0x00000200)) { output.writeMessage(74, errorMessage_); } + if (((bitField2_ & 0x00000400) == 0x00000400)) { + output.writeMessage(75, adminRemoveGameMessage_); + } + if (((bitField2_ & 0x00000800) == 0x00000800)) { + output.writeMessage(76, adminBanPlayerMessage_); + } } private int memoizedSerializedSize = -1; @@ -38676,6 +39312,14 @@ public final class ProtoBuf { size += com.google.protobuf.CodedOutputStream .computeMessageSize(74, errorMessage_); } + if (((bitField2_ & 0x00000400) == 0x00000400)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(75, adminRemoveGameMessage_); + } + if (((bitField2_ & 0x00000800) == 0x00000800)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(76, adminBanPlayerMessage_); + } memoizedSerializedSize = size; return size; } @@ -38926,6 +39570,10 @@ public final class ProtoBuf { bitField2_ = (bitField2_ & ~0x00000100); errorMessage_ = de.pokerth.protocol.ProtoBuf.ErrorMessage.getDefaultInstance(); bitField2_ = (bitField2_ & ~0x00000200); + adminRemoveGameMessage_ = de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage.getDefaultInstance(); + bitField2_ = (bitField2_ & ~0x00000400); + adminBanPlayerMessage_ = de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage.getDefaultInstance(); + bitField2_ = (bitField2_ & ~0x00000800); return this; } @@ -39259,6 +39907,14 @@ public final class ProtoBuf { to_bitField2_ |= 0x00000200; } result.errorMessage_ = errorMessage_; + if (((from_bitField2_ & 0x00000400) == 0x00000400)) { + to_bitField2_ |= 0x00000400; + } + result.adminRemoveGameMessage_ = adminRemoveGameMessage_; + if (((from_bitField2_ & 0x00000800) == 0x00000800)) { + to_bitField2_ |= 0x00000800; + } + result.adminBanPlayerMessage_ = adminBanPlayerMessage_; result.bitField0_ = to_bitField0_; result.bitField1_ = to_bitField1_; result.bitField2_ = to_bitField2_; @@ -39489,6 +40145,12 @@ public final class ProtoBuf { if (other.hasErrorMessage()) { mergeErrorMessage(other.getErrorMessage()); } + if (other.hasAdminRemoveGameMessage()) { + mergeAdminRemoveGameMessage(other.getAdminRemoveGameMessage()); + } + if (other.hasAdminBanPlayerMessage()) { + mergeAdminBanPlayerMessage(other.getAdminBanPlayerMessage()); + } return this; } @@ -39917,6 +40579,18 @@ public final class ProtoBuf { return false; } } + if (hasAdminRemoveGameMessage()) { + if (!getAdminRemoveGameMessage().isInitialized()) { + + return false; + } + } + if (hasAdminBanPlayerMessage()) { + if (!getAdminBanPlayerMessage().isInitialized()) { + + return false; + } + } return true; } @@ -40603,6 +41277,24 @@ public final class ProtoBuf { setErrorMessage(subBuilder.buildPartial()); break; } + case 602: { + de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage.Builder subBuilder = de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage.newBuilder(); + if (hasAdminRemoveGameMessage()) { + subBuilder.mergeFrom(getAdminRemoveGameMessage()); + } + input.readMessage(subBuilder, extensionRegistry); + setAdminRemoveGameMessage(subBuilder.buildPartial()); + break; + } + case 610: { + de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage.Builder subBuilder = de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage.newBuilder(); + if (hasAdminBanPlayerMessage()) { + subBuilder.mergeFrom(getAdminBanPlayerMessage()); + } + input.readMessage(subBuilder, extensionRegistry); + setAdminBanPlayerMessage(subBuilder.buildPartial()); + break; + } } } } @@ -43774,6 +44466,92 @@ public final class ProtoBuf { return this; } + // optional .AdminRemoveGameMessage adminRemoveGameMessage = 75; + private de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage adminRemoveGameMessage_ = de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage.getDefaultInstance(); + public boolean hasAdminRemoveGameMessage() { + return ((bitField2_ & 0x00000400) == 0x00000400); + } + public de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage getAdminRemoveGameMessage() { + return adminRemoveGameMessage_; + } + public Builder setAdminRemoveGameMessage(de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage value) { + if (value == null) { + throw new NullPointerException(); + } + adminRemoveGameMessage_ = value; + + bitField2_ |= 0x00000400; + return this; + } + public Builder setAdminRemoveGameMessage( + de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage.Builder builderForValue) { + adminRemoveGameMessage_ = builderForValue.build(); + + bitField2_ |= 0x00000400; + return this; + } + public Builder mergeAdminRemoveGameMessage(de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage value) { + if (((bitField2_ & 0x00000400) == 0x00000400) && + adminRemoveGameMessage_ != de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage.getDefaultInstance()) { + adminRemoveGameMessage_ = + de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage.newBuilder(adminRemoveGameMessage_).mergeFrom(value).buildPartial(); + } else { + adminRemoveGameMessage_ = value; + } + + bitField2_ |= 0x00000400; + return this; + } + public Builder clearAdminRemoveGameMessage() { + adminRemoveGameMessage_ = de.pokerth.protocol.ProtoBuf.AdminRemoveGameMessage.getDefaultInstance(); + + bitField2_ = (bitField2_ & ~0x00000400); + return this; + } + + // optional .AdminBanPlayerMessage adminBanPlayerMessage = 76; + private de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage adminBanPlayerMessage_ = de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage.getDefaultInstance(); + public boolean hasAdminBanPlayerMessage() { + return ((bitField2_ & 0x00000800) == 0x00000800); + } + public de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage getAdminBanPlayerMessage() { + return adminBanPlayerMessage_; + } + public Builder setAdminBanPlayerMessage(de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage value) { + if (value == null) { + throw new NullPointerException(); + } + adminBanPlayerMessage_ = value; + + bitField2_ |= 0x00000800; + return this; + } + public Builder setAdminBanPlayerMessage( + de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage.Builder builderForValue) { + adminBanPlayerMessage_ = builderForValue.build(); + + bitField2_ |= 0x00000800; + return this; + } + public Builder mergeAdminBanPlayerMessage(de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage value) { + if (((bitField2_ & 0x00000800) == 0x00000800) && + adminBanPlayerMessage_ != de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage.getDefaultInstance()) { + adminBanPlayerMessage_ = + de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage.newBuilder(adminBanPlayerMessage_).mergeFrom(value).buildPartial(); + } else { + adminBanPlayerMessage_ = value; + } + + bitField2_ |= 0x00000800; + return this; + } + public Builder clearAdminBanPlayerMessage() { + adminBanPlayerMessage_ = de.pokerth.protocol.ProtoBuf.AdminBanPlayerMessage.getDefaultInstance(); + + bitField2_ = (bitField2_ & ~0x00000800); + return this; + } + // @@protoc_insertion_point(builder_scope:PokerTHMessage) }