Protocol changes for admin functions. Fixing generic DB implementation.

This commit is contained in:
lotodore
2013-02-24 18:24:38 +01:00
parent 883ccdcf44
commit d8dcf78ab4
7 changed files with 1511 additions and 3 deletions
+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*/)
{
}
+19
View File
@@ -931,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);
}
@@ -1469,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)
{
+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);
+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)