Merge remote-tracking branch 'origin/master'

This commit is contained in:
doitux committed 2013-02-24 19:28:31 +01:00
commit 261b32e051
19 files changed
+1588 -18

No files matched your search

+11
View File
@@ -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*/)
{
}
+7 -3
View File
@@ -35,6 +35,8 @@
#include <db/dbdefs.h>
#include <string>
#include <list>
#include <boost/shared_ptr.hpp>
// 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> 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<DB_id> adminList) = 0;
};
#endif
+3
View File
@@ -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<boost::asio::io_service> m_ioService;
ServerDBCallback &m_callback;
+3
View File
@@ -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
+3
View File
@@ -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_
@@ -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);
}
}
}
+1
View File
@@ -549,6 +549,7 @@ AbstractClientStateReceiving::HandlePacket(boost::shared_ptr<ClientThread> 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();
}
+1 -1
View File
@@ -52,7 +52,7 @@ NetPacket::~NetPacket()
}
boost::shared_ptr<NetPacket>
NetPacket::Create(char *data, size_t dataSize)
NetPacket::Create(const char *data, size_t dataSize)
{
boost::shared_ptr<NetPacket> tmpPacket;
+24
View File
@@ -30,6 +30,7 @@
*****************************************************************************/
#include <net/serverbanmanager.h>
#include <algorithm>
using namespace std;
@@ -43,6 +44,15 @@ ServerBanManager::~ServerBanManager()
{
}
void
ServerBanManager::SetAdminPlayerIds(const std::list<DB_id> 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
{
+32 -4
View File
@@ -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> 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<DB_id> 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<SessionData> 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<SessionDa
GetSender().Send(session, packet);
// The last message is only for server verification.
// We are done now, the user has logged in.
boost::shared_ptr<PlayerData> 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<SessionData> sess
}
}
void
ServerLobbyThread::HandleNetPacketAdminRemoveGame(boost::shared_ptr<SessionData> 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<SessionData> session, const AdminBanPlayerMessage &banPlayer)
{
}
void
ServerLobbyThread::AuthChallenge(boost::shared_ptr<SessionData> session, const string &secret)
{
+1 -1
View File
@@ -63,7 +63,7 @@ public:
NetPacket(PokerTHMessage *msg);
~NetPacket();
static boost::shared_ptr<NetPacket> Create(char *data, size_t dataSize);
static boost::shared_ptr<NetPacket> Create(const char *data, size_t dataSize);
const PokerTHMessage *GetMsg() const {
return m_msg;
+6
View File
@@ -33,6 +33,7 @@
#ifndef _SERVERBANMANAGER_H_
#define _SERVERBANMANAGER_H_
#include <db/dbdefs.h>
#include <boost/asio.hpp>
#include <boost/regex.hpp>
#include <boost/thread.hpp>
@@ -47,6 +48,8 @@ public:
ServerBanManager(boost::shared_ptr<boost::asio::io_service> ioService);
virtual ~ServerBanManager();
void SetAdminPlayerIds(const std::list<DB_id> 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<std::string> &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<unsigned, TimedPlayerBan> RegexMap;
typedef std::map<unsigned, TimedIPBan> IPAddressMap;
typedef std::list<boost::regex> RegexList;
typedef std::vector<DB_id> DBPlayerIdList;
boost::shared_ptr<boost::asio::deadline_timer> InternalRegisterTimedBan(unsigned timerId, unsigned durationHours);
void TimerRemoveBan(const boost::system::error_code &ec, unsigned banId, boost::shared_ptr<boost::asio::deadline_timer> 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;
};
+2
View File
@@ -156,6 +156,8 @@ protected:
void HandleNetPacketChatRequest(boost::shared_ptr<SessionData> session, const ChatRequestMessage &chatRequest);
void HandleNetPacketRejectGameInvitation(boost::shared_ptr<SessionData> session, const RejectGameInvitationMessage &reject);
void HandleNetPacketReportGame(boost::shared_ptr<SessionData> session, const ReportGameMessage &report);
void HandleNetPacketAdminRemoveGame(boost::shared_ptr<SessionData> session, const AdminRemoveGameMessage &removeGame);
void HandleNetPacketAdminBanPlayer(boost::shared_ptr<SessionData> session, const AdminBanPlayerMessage &banPlayer);
// TODO would be better to use state pattern here.
void AuthChallenge(boost::shared_ptr<SessionData> session, const std::string &secret);
void CheckAvatarBlacklist(boost::shared_ptr<SessionData> session);
+7
View File
@@ -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
{
+3 -1
View File
@@ -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;
+410
View File
@@ -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<const AdminRemoveGameMessage*>(&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<const AdminBanPlayerMessage*>(&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]);
+279 -3
View File
@@ -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)