tests for rejoin

This commit is contained in:
Albert Medela
2020-05-22 13:41:22 +02:00
parent 9b36c9863c
commit 2827f7d36c
22 changed files with 6258 additions and 11086 deletions
+5 -4
View File
@@ -35,10 +35,11 @@
#include <core/loghelper.h>
#include <iostream>
#include <boost/date_time.hpp>
using namespace std;
using namespace boost::posix_time;
static int g_logLevel = 1;
@@ -52,20 +53,20 @@ loghelper_init(const std::string & /*logDir*/, int logLevel)
void
internal_log_err(const string &msg)
{
cerr << msg;
cerr << second_clock::local_time() << " " << msg;
}
void
internal_log_msg(const std::string &msg)
{
if (g_logLevel)
cout << msg;
cout << second_clock::local_time() << " " << msg;
}
void
internal_log_level(const std::string &msg, int logLevel)
{
if (g_logLevel >= logLevel)
cout << msg;
cout << second_clock::local_time() << " " << msg;
}
+12
View File
@@ -33,6 +33,7 @@
#include <enginefactory.h>
#include <guiinterface.h>
#include <core/loghelper.h>
#include "log.h"
#include "localexception.h"
@@ -87,6 +88,9 @@ Game::Game(GuiInterface* gui, boost::shared_ptr<EngineFactory> factory,
// create player
player_i = playerDataList.begin();
player_end = playerDataList.end();
LOG_MSG("Starting game... PLAYERS:");
for(i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
string myName;
@@ -121,6 +125,14 @@ Game::Game(GuiInterface* gui, boost::shared_ptr<EngineFactory> factory,
}
(*runningPlayerList) = (*activePlayerList);
LOG_MSG("\tPlayerID " << i << ":{UID, name, GUID, seat} -> {" <<
(*player_i)->GetUniqueId() << ", " <<
(*player_i)->GetName() << ", " <<
(*player_i)->GetGuid() << ", " <<
(*player_i)->GetNumber()
);
}
currentBoard->setPlayerLists(seatsList, activePlayerList, runningPlayerList);
+6
View File
@@ -93,6 +93,12 @@ struct GameData {
int guiSpeed;
int delayBetweenHandsSec;
int playerActionTimeoutSec;
// new data
bool allowLateReg;
bool allowReentries;
int numReentries;
int maxTimeLateReg;
};
struct GameInfo {
+419 -300
View File
@@ -6,246 +6,256 @@
<rect>
<x>0</x>
<y>0</y>
<width>293</width>
<height>410</height>
<width>395</width>
<height>573</height>
</rect>
</property>
<property name="windowTitle">
<string>Create Internet Game</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Internet Game Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QLabel" name="label_23">
<property name="text">
<string>Default game name:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_gameName">
<property name="maxLength">
<number>48</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Game type:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_gameType">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Standard</string>
</property>
<property name="icon">
<iconset resource="resources/pokerth.qrc">
<normaloff>:/gfx/player_play.png</normaloff>:/gfx/player_play.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Registered players only</string>
</property>
<property name="icon">
<iconset resource="resources/pokerth.qrc">
<normaloff>:/gfx/registered.png</normaloff>:/gfx/registered.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Invited players only</string>
</property>
<property name="icon">
<iconset resource="resources/pokerth.qrc">
<normaloff>:/gfx/list_add_user.png</normaloff>:/gfx/list_add_user.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Ranking game</string>
</property>
<property name="icon">
<iconset resource="resources/pokerth.qrc">
<normaloff>:/gfx/cup.png</normaloff>:/gfx/cup.png</iconset>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="2" column="0" colspan="2">
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="checkBox_Password">
<property name="text">
<string>Password:</string>
</property>
<property name="icon">
<iconset resource="resources/pokerth.qrc">
<normaloff>:/gfx/lock.png</normaloff>:/gfx/lock.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_Password">
<property name="enabled">
<bool>false</bool>
</property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0" colspan="2">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<widget class="QGroupBox" name="groupBox">
<property name="geometry">
<rect>
<x>9</x>
<y>9</y>
<width>388</width>
<height>500</height>
</rect>
</property>
<property name="title">
<string>Internet Game Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QLabel" name="label_23">
<property name="text">
<string>Default game name:</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label">
<item>
<widget class="QLineEdit" name="lineEdit_gameName">
<property name="maxLength">
<number>48</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Maximum number of players:</string>
<string>Game type:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_gameType">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Standard</string>
</property>
<property name="icon">
<iconset resource="resources/pokerth.qrc">
<normaloff>:/gfx/player_play.png</normaloff>:/gfx/player_play.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Registered players only</string>
</property>
<property name="icon">
<iconset resource="resources/pokerth.qrc">
<normaloff>:/gfx/registered.png</normaloff>:/gfx/registered.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Invited players only</string>
</property>
<property name="icon">
<iconset resource="resources/pokerth.qrc">
<normaloff>:/gfx/list_add_user.png</normaloff>:/gfx/list_add_user.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Ranking game</string>
</property>
<property name="icon">
<iconset resource="resources/pokerth.qrc">
<normaloff>:/gfx/cup.png</normaloff>:/gfx/cup.png</iconset>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="2" column="0" colspan="2">
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="checkBox_Password">
<property name="text">
<string>Password:</string>
</property>
<property name="icon">
<iconset resource="resources/pokerth.qrc">
<normaloff>:/gfx/lock.png</normaloff>:/gfx/lock.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_Password">
<property name="enabled">
<bool>false</bool>
</property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="checkBox_allowSpectators">
<property name="text">
<string>Allow spectators to watch the game</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="checkBox_allowLateReg">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Allow late registration</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="checkBox_reentries">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Allow re-entries</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_numReentries">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Maximum number of re-entries:</string>
</property>
<property name="buddy">
<cstring>spinBox_quantityPlayers</cstring>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="spinBox_quantityPlayers">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QSpinBox" name="spinBox_numReentries">
<property name="enabled">
<bool>true</bool>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>10</number>
</property>
<property name="value">
<number>2</number>
</property>
<property name="maximum">
<number>10</number>
</property>
<property name="value">
<number>10</number>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Start Cash:</string>
</property>
<property name="buddy">
<cstring>spinBox_startCash</cstring>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QSpinBox" name="spinBox_startCash">
<property name="suffix">
<string/>
</property>
<property name="prefix">
<string>$</string>
</property>
<property name="minimum">
<number>1000</number>
</property>
<property name="maximum">
<number>1000000</number>
</property>
<property name="singleStep">
<number>50</number>
</property>
<property name="value">
<number>2000</number>
</property>
</widget>
</item>
<item row="7" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox_blinds">
<property name="title">
<string>Blinds</string>
</property>
<layout class="QGridLayout">
<property name="topMargin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QRadioButton" name="radioButton_useSavedBlindsSettings">
<property name="text">
<string>Use saved blinds settings</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="radioButton_changeBlindsSettings">
<property name="text">
<string>Change blinds settings ...</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_6">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</layout>
</item>
<item row="8" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="label_timeLateReg">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Timeout for player action:</string>
<string>Maximum time for late registration/re-entry:</string>
</property>
<property name="buddy">
<cstring>spinBox_netTimeOutPlayerAction</cstring>
<cstring>spinBox_quantityPlayers</cstring>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QSpinBox" name="spinBox_netTimeOutPlayerAction">
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>13</width>
<height>21</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QSpinBox" name="spinBox_timeLateReg">
<property name="enabled">
<bool>true</bool>
</property>
<property name="suffix">
<string> s</string>
<string>min</string>
</property>
<property name="minimum">
<number>5</number>
@@ -254,99 +264,208 @@
<number>60</number>
</property>
<property name="value">
<number>20</number>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Delay between hands:</string>
</property>
<property name="buddy">
<cstring>spinBox_netDelayBetweenHands</cstring>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QSpinBox" name="spinBox_netDelayBetweenHands">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="suffix">
<string> s</string>
</property>
<property name="minimum">
<number>5</number>
</property>
<property name="maximum">
<number>20</number>
</property>
<property name="value">
<number>7</number>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="checkBox_allowSpectators">
<property name="text">
<string>Allow spectators to watch the game</string>
<number>15</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</item>
<item row="9" column="0" colspan="2">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Maximum number of players:</string>
</property>
<property name="buddy">
<cstring>spinBox_quantityPlayers</cstring>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QSpinBox" name="spinBox_quantityPlayers">
<property name="minimum">
<number>2</number>
</property>
<property name="maximum">
<number>10</number>
</property>
<property name="value">
<number>10</number>
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Start Cash:</string>
</property>
<property name="buddy">
<cstring>spinBox_startCash</cstring>
</property>
</widget>
</item>
<item row="11" column="1">
<widget class="QSpinBox" name="spinBox_startCash">
<property name="suffix">
<string/>
</property>
<property name="prefix">
<string>$</string>
</property>
<property name="minimum">
<number>1000</number>
</property>
<property name="maximum">
<number>1000000</number>
</property>
<property name="singleStep">
<number>50</number>
</property>
<property name="value">
<number>2000</number>
</property>
</widget>
</item>
<item row="12" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox_blinds">
<property name="title">
<string>Blinds</string>
</property>
<layout class="QGridLayout">
<property name="topMargin">
<number>0</number>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>181</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_createGame">
<property name="text">
<string>Create Game</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_cancel">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
<item row="0" column="0">
<widget class="QRadioButton" name="radioButton_useSavedBlindsSettings">
<property name="text">
<string>Use saved blinds settings</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="radioButton_changeBlindsSettings">
<property name="text">
<string>Change blinds settings ...</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="13" column="0">
<widget class="QLabel" name="label_6">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Timeout for player action:</string>
</property>
<property name="buddy">
<cstring>spinBox_netTimeOutPlayerAction</cstring>
</property>
</widget>
</item>
<item row="13" column="1">
<widget class="QSpinBox" name="spinBox_netTimeOutPlayerAction">
<property name="suffix">
<string> s</string>
</property>
<property name="minimum">
<number>5</number>
</property>
<property name="maximum">
<number>60</number>
</property>
<property name="value">
<number>20</number>
</property>
</widget>
</item>
<item row="14" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Delay between hands:</string>
</property>
<property name="buddy">
<cstring>spinBox_netDelayBetweenHands</cstring>
</property>
</widget>
</item>
<item row="14" column="1">
<widget class="QSpinBox" name="spinBox_netDelayBetweenHands">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="suffix">
<string> s</string>
</property>
<property name="minimum">
<number>5</number>
</property>
<property name="maximum">
<number>20</number>
</property>
<property name="value">
<number>7</number>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>10</x>
<y>540</y>
<width>381</width>
<height>25</height>
</rect>
</property>
<layout class="QHBoxLayout" name="_2">
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>115</width>
<height>17</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_createGame">
<property name="text">
<string>Create Game</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_cancel">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<tabstops>
<tabstop>lineEdit_gameName</tabstop>
@@ -68,6 +68,11 @@ createInternetGameDialogImpl::createInternetGameDialogImpl(QWidget *parent, Conf
connect( pushButton_createGame, SIGNAL( clicked() ), this, SLOT( createGame() ) );
connect( checkBox_Password, SIGNAL( toggled(bool) ), this, SLOT( clearGamePassword(bool)) );
connect( comboBox_gameType, SIGNAL(currentIndexChanged(int)), this, SLOT( gameTypeChanged() ) );
// new connections
connect(checkBox_allowLateReg, SIGNAL(toggled(bool)), this, SLOT(switchAllowReg(bool)));
connect(checkBox_reentries, SIGNAL(toggled(bool)), this, SLOT(switchReentries(bool)));
}
@@ -165,6 +170,7 @@ void createInternetGameDialogImpl::gameTypeChanged()
raiseMode->hide();
checkBox_allowSpectators->setEnabled(true);
checkBox_allowSpectators->setChecked(myConfig->readConfigInt("InternetGameAllowSpectators"));
switchLateReg(true); // allow late reg & reentries
}
break;
@@ -180,6 +186,7 @@ void createInternetGameDialogImpl::gameTypeChanged()
raiseMode->hide();
checkBox_allowSpectators->setEnabled(true);
checkBox_allowSpectators->setChecked(myConfig->readConfigInt("InternetGameAllowSpectators"));
switchLateReg(true); // allow late reg & reentries
}
break;
case GAME_TYPE_INVITE_ONLY-1: {
@@ -195,6 +202,7 @@ void createInternetGameDialogImpl::gameTypeChanged()
raiseMode->hide();
checkBox_allowSpectators->setEnabled(true);
checkBox_allowSpectators->setChecked(myConfig->readConfigInt("InternetGameAllowSpectators"));
switchLateReg(false); // don't allow late reg & reentries
}
break;
case GAME_TYPE_RANKING-1: {
@@ -211,6 +219,7 @@ void createInternetGameDialogImpl::gameTypeChanged()
raiseMode->show();
checkBox_allowSpectators->setDisabled(true);
checkBox_allowSpectators->setChecked(true);
switchLateReg(false); // don't allow late reg & reentries
}
break;
}
@@ -252,6 +261,51 @@ void createInternetGameDialogImpl::gameTypeChanged()
}
}
void createInternetGameDialogImpl::switchLateReg(bool enable) {
if (enable) {
checkBox_allowLateReg->setDisabled(false);
checkBox_allowLateReg->setChecked(true);
checkBox_reentries->setDisabled(false);
checkBox_reentries->setChecked(true);
}
else {
checkBox_allowLateReg->setDisabled(true);
checkBox_allowLateReg->setChecked(false);
checkBox_reentries->setDisabled(true);
checkBox_reentries->setChecked(false);
}
}
void createInternetGameDialogImpl::switchReentries(bool enable) {
if (enable) {
label_numReentries->setDisabled(false);
spinBox_numReentries->setDisabled(false);
label_timeLateReg->setDisabled(false);
spinBox_timeLateReg->setDisabled(false);
}
else {
label_numReentries->setDisabled(true);
spinBox_numReentries->setDisabled(true);
if (!(checkBox_allowLateReg->isEnabled() && checkBox_allowLateReg->isChecked())) {
label_timeLateReg->setDisabled(true);
spinBox_timeLateReg->setDisabled(true);
}
}
}
void createInternetGameDialogImpl::switchAllowReg(bool enable) {
if (enable) {
label_timeLateReg->setDisabled(false);
spinBox_timeLateReg->setDisabled(false);
}
else {
if (!(checkBox_reentries->isEnabled() && checkBox_reentries->isChecked())) {
label_timeLateReg->setDisabled(true);
spinBox_timeLateReg->setDisabled(true);
}
}
}
bool createInternetGameDialogImpl::eventFilter(QObject *obj, QEvent *event)
{
#ifdef ANDROID
@@ -67,8 +67,13 @@ public slots:
void gameTypeChanged();
void callChangeBlindsDialog(bool);
void switchAllowReg(bool);
void switchReentries(bool);
private:
void switchLateReg(bool);
ConfigFile *myConfig;
changeCompleteBlindsDialogImpl *myChangeCompleteBlindsDialog;
bool currentGuestMode;
@@ -352,6 +352,17 @@ void gameLobbyDialogImpl::createGame()
}
}
if (myCreateInternetGameDialog->checkBox_allowLateReg->isEnabled() && myCreateInternetGameDialog->checkBox_allowLateReg->isChecked()) {
gameData.allowLateReg = true;
gameData.maxTimeLateReg = myCreateInternetGameDialog->spinBox_timeLateReg->value();
}
if (myCreateInternetGameDialog->checkBox_reentries->isEnabled() && myCreateInternetGameDialog->checkBox_reentries->isChecked()) {
gameData.allowReentries = true;
gameData.numReentries = myCreateInternetGameDialog->spinBox_numReentries->value();
gameData.maxTimeLateReg = myCreateInternetGameDialog->spinBox_timeLateReg->value();
}
gameData.guiSpeed = myConfig->readConfigInt("GameSpeed");
gameData.delayBetweenHandsSec = myCreateInternetGameDialog->spinBox_netDelayBetweenHands->value();
gameData.playerActionTimeoutSec = myCreateInternetGameDialog->spinBox_netTimeOutPlayerAction->value();
+6 -1
View File
@@ -59,7 +59,7 @@
#include "carddeckstylereader.h"
#include <gamedata.h>
#include <generic/serverguiwrapper.h>
#include <core/loghelper.h>
#include <net/socket_msg.h>
#include <cmath>
@@ -81,6 +81,8 @@ gameTableImpl::gameTableImpl(ConfigFile *c, QMainWindow *parent)
{
int i;
LOG_MSG("starting gameTableImpl");
// this->setStyle(new QPlastiqueStyle);
//for statistic development
@@ -870,6 +872,8 @@ void gameTableImpl::initGui(int speed)
//kill running Singleshots!!!
stopTimer();
LOG_MSG("starting gameTableImpl::initGui");
label_handNumber->setText(HandString+":");
label_gameNumber->setText(GameString+":");
@@ -934,6 +938,7 @@ void gameTableImpl::initGui(int speed)
#endif
LOG_MSG("ending gameTableImpl::initGui");
}
boost::shared_ptr<Session> gameTableImpl::getSession()
+3
View File
@@ -39,6 +39,7 @@
#include "configfile.h"
#include "soundevents.h"
#include <net/socket_msg.h>
#include <core/loghelper.h>
using namespace std;
@@ -46,6 +47,7 @@ using namespace std;
GuiWrapper::GuiWrapper(ConfigFile *c, startWindowImpl *s) : myGuiLog(NULL), myW(NULL), myConfig(c), myStartWindow(s)
{
LOG_MSG("starting GuiWrapper");
myW = new gameTableImpl(myConfig);
myGuiLog = new guiLog(myW, myConfig);
@@ -63,6 +65,7 @@ GuiWrapper::~GuiWrapper()
void GuiWrapper::initGui(int speed)
{
LOG_MSG("starting GuiWrapper::initGui");
myW->signalInitGui(speed);
}
@@ -33,6 +33,7 @@
#include <gamedata.h>
#include <generic/serverguiwrapper.h>
#include <net/socket_msg.h>
#include <core/loghelper.h>
#include "tools.h"
#include "session.h"
#include "game.h"
@@ -72,6 +73,8 @@ startWindowImpl::startWindowImpl(ConfigFile *c, Log *l)
: myConfig(c), myLog(l), msgBoxOutdatedVersionActive(false)
{
LOG_MSG("starting startWindowImpl");
myGuiInterface.reset(new GuiWrapper(myConfig, this));
{
mySession.reset(new Session(myGuiInterface.get(), myConfig, myLog));
+63
View File
@@ -42,6 +42,8 @@
#include <core/crypthelper.h>
#include <qttoolsinterface.h>
#include <core/loghelper.h>
#include <game.h>
#include <playerinterface.h>
@@ -1518,6 +1520,14 @@ ClientStateWaitStart::InternalHandlePacket(boost::shared_ptr<ClientThread> clien
if (!tmpPlayer)
throw ClientException(__FILE__, __LINE__, ERR_NET_UNKNOWN_PLAYER_ID, 0);
tmpPlayer->SetNumber(i);
LOG_MSG("PlayerData: {playerId, name, GUID, seat, number} -> {" <<
playerId << "," <<
tmpPlayer->GetName() << "," <<
tmpPlayer->GetGuid() << "," <<
i << "," <<
tmpPlayer->GetNumber()
);
}
} else {
throw ClientException(__FILE__, __LINE__, ERR_NET_INVALID_PLAYER_COUNT, 0);
@@ -1552,6 +1562,54 @@ ClientStateWaitStart::InternalHandlePacket(boost::shared_ptr<ClientThread> clien
throw ClientException(__FILE__, __LINE__, ERR_NET_INVALID_PLAYER_COUNT, 0);
}
client->InitGame();
LOG_MSG("Game created. Let's LOG:");
// LOG seats
{
boost::shared_ptr<Game> tmpGame = client->GetGame();
PlayerListConstIterator it_c;
boost::shared_ptr<PlayerInterface> tmpPlayer;
PlayerList seatsList = tmpGame->getSeatsList();
PlayerList activePlayerList = tmpGame->getActivePlayerList();
PlayerList runningPlayerList = tmpGame->getRunningPlayerList();
LOG_MSG("\t === Player seats === ");
for (it_c=seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
tmpPlayer = *it_c;
LOG_MSG("\t\t {ID, name, GUID; UID} => " <<
tmpPlayer->getMyID() << ", " <<
tmpPlayer->getMyName() << ", " <<
tmpPlayer->getMyUniqueID() << ", " <<
tmpPlayer->getMyGuid());
}
LOG_MSG("\t === Player active List === ");
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
tmpPlayer = *it_c;
LOG_MSG("\t\t {ID, name, GUID; UID} => " <<
tmpPlayer->getMyID() << ", " <<
tmpPlayer->getMyName() << ", " <<
tmpPlayer->getMyUniqueID() << ", " <<
tmpPlayer->getMyGuid());
}
LOG_MSG("\t === Player running List === ");
for (it_c=runningPlayerList->begin(); it_c!=runningPlayerList->end(); ++it_c) {
tmpPlayer = *it_c;
LOG_MSG("\t\t {ID, name, GUID; UID} => " <<
tmpPlayer->getMyID() << ", " <<
tmpPlayer->getMyName() << ", " <<
tmpPlayer->getMyUniqueID() << ", " <<
tmpPlayer->getMyGuid());
}
}
client->GetGame()->setCurrentHandID(tmpHandId);
// We need to remove the temporary player data objects after creating the game.
BOOST_FOREACH(unsigned tmpPlayerId, tmpPlayerList) {
@@ -1705,6 +1763,8 @@ ClientStateWaitHand::InternalHandlePacket(boost::shared_ptr<ClientThread> client
client->GetCallback().SignalNetClientPostRiverShowCards(r.playerid());
client->GetClientLog()->logHoleCardsHandName(client->GetGame()->getActivePlayerList(), tmpPlayer, true);
} else if (tmpPacket->GetMsg()->messagetype() == PokerTHMessage::Type_PlayerIdChangedMessage) {
LOG_MSG("performing rejoin");
boost::shared_ptr<Game> curGame = client->GetGame();
if (curGame) {
// Perform Id change.
@@ -1712,6 +1772,9 @@ ClientStateWaitHand::InternalHandlePacket(boost::shared_ptr<ClientThread> client
boost::shared_ptr<PlayerInterface> tmpPlayer = curGame->getPlayerByUniqueId(idChanged.oldplayerid());
if (!tmpPlayer)
throw ClientException(__FILE__, __LINE__, ERR_NET_UNKNOWN_PLAYER_ID, 0);
LOG_MSG("Player rejoins with " << tmpPlayer->getMyCash());
tmpPlayer->setMyUniqueID(idChanged.newplayerid());
// This player is now active again.
tmpPlayer->setMyStayOnTableStatus(true);
+8
View File
@@ -113,6 +113,10 @@ NetPacket::SetGameData(const GameData &inData, NetGameInfo &outData)
outData.set_endraisesmallblindvalue(inData.afterMBAlwaysRaiseValue);
outData.set_firstsmallblind(inData.firstSmallBlind);
outData.set_startmoney(inData.startMoney);
outData.set_allowlatereg(inData.allowLateReg);
outData.set_allowreentries(inData.allowReentries);
outData.set_maxtimelatereg(inData.maxTimeLateReg);
outData.set_numreentries(inData.numReentries);
BOOST_FOREACH(int manualBlind, inData.manualBlindsList) {
outData.add_manualblinds(manualBlind);
@@ -141,6 +145,10 @@ NetPacket::GetGameData(const NetGameInfo &inData, GameData &outData)
outData.firstSmallBlind = inData.firstsmallblind();
outData.afterMBAlwaysRaiseValue = inData.endraisesmallblindvalue();
outData.startMoney = inData.startmoney();
outData.allowLateReg = inData.allowlatereg();
outData.allowReentries = inData.allowreentries();
outData.numReentries = inData.numreentries();
outData.maxTimeLateReg = inData.maxtimelatereg();
for (int i = 0; i < numManualBlinds; i++) {
outData.manualBlindsList.push_back(static_cast<int>(inData.manualblinds(i)));
+11
View File
@@ -1184,6 +1184,17 @@ ServerGame::CheckSettings(const GameData &data, const string &password, ServerMo
retVal = false;
}
}
if (data.gameType == GAME_TYPE_NORMAL || data.gameType == GAME_TYPE_REGISTERED_ONLY) { // allow late reg and reentries
if (data.allowLateReg || data.allowReentries) {
if (data.maxTimeLateReg < 1 || data.maxTimeLateReg > 60) retVal = false;
if (data.allowReentries && (data.numReentries < 0 || data.numReentries > 10)) retVal = false;
}
}
else { // does not allow
if (data.allowLateReg || data.allowReentries) retVal = false;
}
return retVal;
}
+119 -3
View File
@@ -852,6 +852,26 @@ ServerGameStateStartGame::DoStart(boost::shared_ptr<ServerGame> server)
++player_i;
}
{
LOG_MSG(" === SENDING DO START ====");
LOG_MSG("\tPlayers: ");
player_i = tmpPlayerList.begin();
player_end = tmpPlayerList.end();
while (player_i != player_end) {
boost::shared_ptr<PlayerData> tmpPlayer = (*player_i);
LOG_MSG("\t\t {UID, name, GUID, seat}" <<
tmpPlayer->GetUniqueId() << ", " <<
tmpPlayer->GetName() << ", " <<
tmpPlayer->GetGuid() << ", " <<
tmpPlayer->GetNumber()
);
++player_i;
}
}
server->SendToAllPlayers(packet, SessionData::Game | SessionData::Spectating);
// Start the first hand.
@@ -888,7 +908,30 @@ AbstractServerGameStateRunning::HandleNewPlayer(boost::shared_ptr<ServerGame> se
// Wait for rejoining player to confirm start of game.
server->GetLobbyThread().GetSender().Send(session, packet);
} else {
}
else if (session && session->GetPlayerData() && server->GetGameData().gameType == GAME_TYPE_NORMAL) { // only normal games
const GameData tmpGameData = server->GetGameData();
if (server->GetCurNumberOfPlayers() < tmpGameData.maxNumberOfPlayers) { // there is a seat available
AcceptNewSession(server, session, false); // player wants to join
// TODO:
// - locate seat
// - notify players and users
// - move session to server
// - set cash
// - wait for button to pass (if necessary)
// - let player play
}
else {
server->MoveSessionToLobby(session, NTF_NET_REMOVED_GAME_FULL);
}
}
else {
// Do not accept "new" sessions in this state, only rejoin is allowed.
server->MoveSessionToLobby(session, NTF_NET_REMOVED_ALREADY_RUNNING);
}
@@ -1251,8 +1294,81 @@ ServerGameStateHand::StartNewHand(boost::shared_ptr<ServerGame> server)
curGame.getCurrentHand()->getRiver()->skipFirstRunGui();
// Consider all players, even inactive.
PlayerListIterator i = curGame.getSeatsList()->begin();
PlayerListIterator end = curGame.getSeatsList()->end();
PlayerListIterator i;
PlayerListIterator end;
{
LOG_MSG("Starting new hand. Lets LOG: ");
LOG_MSG("\tPlayer seats");
i = curGame.getSeatsList()->begin();
end = curGame.getSeatsList()->end();
while (i != end) {
boost::shared_ptr<PlayerInterface> tmpPlayer = (*i);
LOG_MSG("\t\t {ID, name, GUID; UID} => " <<
tmpPlayer->getMyID() << ", " <<
tmpPlayer->getMyName() << ", " <<
tmpPlayer->getMyUniqueID() << ", " <<
tmpPlayer->getMyGuid());
++i;
}
i = curGame.getActivePlayerList()->begin();
end = curGame.getActivePlayerList()->end();
LOG_MSG("\tActive players");
while (i != end) {
boost::shared_ptr<PlayerInterface> tmpPlayer = (*i);
LOG_MSG("\t\t {ID, name, GUID; UID} => " <<
tmpPlayer->getMyID() << ", " <<
tmpPlayer->getMyName() << ", " <<
tmpPlayer->getMyUniqueID() << ", " <<
tmpPlayer->getMyGuid());
++i;
}
i = curGame.getRunningPlayerList()->begin();
end = curGame.getRunningPlayerList()->end();
LOG_MSG("\tRunning players");
while (i != end) {
boost::shared_ptr<PlayerInterface> tmpPlayer = (*i);
LOG_MSG("\t\t {ID, name, GUID; UID} => " <<
tmpPlayer->getMyID() << ", " <<
tmpPlayer->getMyName() << ", " <<
tmpPlayer->getMyUniqueID() << ", " <<
tmpPlayer->getMyGuid());
++i;
}
PlayerDataList tmpPlayerList(server->GetFullPlayerDataList());
LOG_MSG("\tAll Data players");
PlayerDataList::iterator player_i = tmpPlayerList.begin();
PlayerDataList::iterator player_end = tmpPlayerList.end();
while (player_i != player_end) {
boost::shared_ptr<PlayerData> tmpPlayer = (*player_i);
LOG_MSG("PlayerData: {playerId, name, GUID, number} -> {" <<
tmpPlayer->GetUniqueId() << "," <<
tmpPlayer->GetName() << "," <<
tmpPlayer->GetGuid() << "," <<
tmpPlayer->GetNumber()
);
++player_i;
}
}
// Consider all players, even inactive.
i = curGame.getSeatsList()->begin();
end = curGame.getSeatsList()->end();
// Send cards to all players.
while (i != end) {
+7
View File
@@ -1368,6 +1368,13 @@ ServerLobbyThread::HandleNetPacketCreateGame(boost::shared_ptr<SessionData> sess
boost::replace_all(gameName, "\f", " ");
unsigned gameId = GetNextGameId();
LOG_MSG ("Creating game with new params: {allowLate, allowReentries, numReentries, maxTimeLateReg} -> {" <<
std::boolalpha <<
tmpData.allowLateReg << ", " <<
tmpData.allowReentries << ", " <<
tmpData.numReentries << ", " <<
tmpData.maxTimeLateReg << "}");
if (gameName.empty() || !isprint(gameName[0])) {
SendJoinGameFailed(session, gameId, NTF_NET_JOIN_GAME_BAD_NAME);
} else if (IsGameNameInUse(gameName)) {
+9
View File
@@ -41,6 +41,7 @@
#include <net/clientthread.h>
#include <core/avatarmanager.h>
#include <net/servermanagerfactory.h>
#include <core/loghelper.h>
#include <sstream>
@@ -281,6 +282,14 @@ void Session::clientCreateGame(const GameData &gameData, const string &name, con
{
if (!myNetClient)
return; // only act if client is running.
std::cout << "Creating game with new params: {allowLate, allowReentries, numReentries, maxTimeLateReg} -> {" <<
std::boolalpha <<
gameData.allowLateReg << ", " <<
gameData.allowReentries << "," <<
gameData.numReentries << ", " <<
gameData.maxTimeLateReg << "}" << std::endl;
myNetClient->SendCreateGame(
gameData,
name,
File diff suppressed because it is too large Load Diff
+72 -178
View File
@@ -8,12 +8,12 @@
#include <google/protobuf/stubs/common.h>
#if GOOGLE_PROTOBUF_VERSION < 2006000
#if GOOGLE_PROTOBUF_VERSION < 2005000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 2006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
@@ -82,14 +82,6 @@ class CleanerInitMessage : public ::google::protobuf::MessageLite {
return *this;
}
inline const ::std::string& unknown_fields() const {
return _unknown_fields_;
}
inline ::std::string* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const CleanerInitMessage& default_instance();
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
@@ -118,13 +110,13 @@ class CleanerInitMessage : public ::google::protobuf::MessageLite {
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
void DiscardUnknownFields();
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::std::string GetTypeName() const;
// nested types ----------------------------------------------------
@@ -157,12 +149,12 @@ class CleanerInitMessage : public ::google::protobuf::MessageLite {
inline void set_has_clientsecret();
inline void clear_has_clientsecret();
::std::string _unknown_fields_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
::std::string* clientsecret_;
::google::protobuf::uint32 requestedversion_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
friend void protobuf_AddDesc_chatcleaner_2eproto_impl();
#else
@@ -188,14 +180,6 @@ class CleanerInitAckMessage : public ::google::protobuf::MessageLite {
return *this;
}
inline const ::std::string& unknown_fields() const {
return _unknown_fields_;
}
inline ::std::string* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const CleanerInitAckMessage& default_instance();
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
@@ -224,13 +208,13 @@ class CleanerInitAckMessage : public ::google::protobuf::MessageLite {
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
void DiscardUnknownFields();
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::std::string GetTypeName() const;
// nested types ----------------------------------------------------
@@ -263,12 +247,12 @@ class CleanerInitAckMessage : public ::google::protobuf::MessageLite {
inline void set_has_serversecret();
inline void clear_has_serversecret();
::std::string _unknown_fields_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
::std::string* serversecret_;
::google::protobuf::uint32 serverversion_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
friend void protobuf_AddDesc_chatcleaner_2eproto_impl();
#else
@@ -294,14 +278,6 @@ class CleanerChatRequestMessage : public ::google::protobuf::MessageLite {
return *this;
}
inline const ::std::string& unknown_fields() const {
return _unknown_fields_;
}
inline ::std::string* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const CleanerChatRequestMessage& default_instance();
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
@@ -330,13 +306,13 @@ class CleanerChatRequestMessage : public ::google::protobuf::MessageLite {
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
void DiscardUnknownFields();
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::std::string GetTypeName() const;
// nested types ----------------------------------------------------
@@ -410,16 +386,16 @@ class CleanerChatRequestMessage : public ::google::protobuf::MessageLite {
inline void set_has_chatmessage();
inline void clear_has_chatmessage();
::std::string _unknown_fields_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
::google::protobuf::uint32 requestid_;
int cleanerchattype_;
::google::protobuf::uint32 gameid_;
::google::protobuf::uint32 playerid_;
::std::string* playername_;
::std::string* chatmessage_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(6 + 31) / 32];
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
friend void protobuf_AddDesc_chatcleaner_2eproto_impl();
#else
@@ -445,14 +421,6 @@ class CleanerChatReplyMessage : public ::google::protobuf::MessageLite {
return *this;
}
inline const ::std::string& unknown_fields() const {
return _unknown_fields_;
}
inline ::std::string* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const CleanerChatReplyMessage& default_instance();
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
@@ -481,13 +449,13 @@ class CleanerChatReplyMessage : public ::google::protobuf::MessageLite {
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
void DiscardUnknownFields();
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::std::string GetTypeName() const;
// nested types ----------------------------------------------------
@@ -572,16 +540,16 @@ class CleanerChatReplyMessage : public ::google::protobuf::MessageLite {
inline void set_has_cleanertext();
inline void clear_has_cleanertext();
::std::string _unknown_fields_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
::google::protobuf::uint32 requestid_;
int cleanerchattype_;
::google::protobuf::uint32 gameid_;
::google::protobuf::uint32 playerid_;
::std::string* cleanertext_;
int cleaneractiontype_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(6 + 31) / 32];
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
friend void protobuf_AddDesc_chatcleaner_2eproto_impl();
#else
@@ -607,14 +575,6 @@ class ChatCleanerMessage : public ::google::protobuf::MessageLite {
return *this;
}
inline const ::std::string& unknown_fields() const {
return _unknown_fields_;
}
inline ::std::string* mutable_unknown_fields() {
return &_unknown_fields_;
}
static const ChatCleanerMessage& default_instance();
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
@@ -643,13 +603,13 @@ class ChatCleanerMessage : public ::google::protobuf::MessageLite {
::google::protobuf::io::CodedInputStream* input);
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const;
void DiscardUnknownFields();
int GetCachedSize() const { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const;
public:
::std::string GetTypeName() const;
// nested types ----------------------------------------------------
@@ -727,15 +687,15 @@ class ChatCleanerMessage : public ::google::protobuf::MessageLite {
inline void set_has_cleanerchatreplymessage();
inline void clear_has_cleanerchatreplymessage();
::std::string _unknown_fields_;
::google::protobuf::uint32 _has_bits_[1];
mutable int _cached_size_;
::CleanerInitMessage* cleanerinitmessage_;
::CleanerInitAckMessage* cleanerinitackmessage_;
::CleanerChatRequestMessage* cleanerchatrequestmessage_;
::CleanerChatReplyMessage* cleanerchatreplymessage_;
int messagetype_;
mutable int _cached_size_;
::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
friend void protobuf_AddDesc_chatcleaner_2eproto_impl();
#else
@@ -769,13 +729,11 @@ inline void CleanerInitMessage::clear_requestedversion() {
clear_has_requestedversion();
}
inline ::google::protobuf::uint32 CleanerInitMessage::requestedversion() const {
// @@protoc_insertion_point(field_get:CleanerInitMessage.requestedVersion)
return requestedversion_;
}
inline void CleanerInitMessage::set_requestedversion(::google::protobuf::uint32 value) {
set_has_requestedversion();
requestedversion_ = value;
// @@protoc_insertion_point(field_set:CleanerInitMessage.requestedVersion)
}
// required string clientSecret = 2;
@@ -789,59 +747,54 @@ inline void CleanerInitMessage::clear_has_clientsecret() {
_has_bits_[0] &= ~0x00000002u;
}
inline void CleanerInitMessage::clear_clientsecret() {
if (clientsecret_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (clientsecret_ != &::google::protobuf::internal::kEmptyString) {
clientsecret_->clear();
}
clear_has_clientsecret();
}
inline const ::std::string& CleanerInitMessage::clientsecret() const {
// @@protoc_insertion_point(field_get:CleanerInitMessage.clientSecret)
return *clientsecret_;
}
inline void CleanerInitMessage::set_clientsecret(const ::std::string& value) {
set_has_clientsecret();
if (clientsecret_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (clientsecret_ == &::google::protobuf::internal::kEmptyString) {
clientsecret_ = new ::std::string;
}
clientsecret_->assign(value);
// @@protoc_insertion_point(field_set:CleanerInitMessage.clientSecret)
}
inline void CleanerInitMessage::set_clientsecret(const char* value) {
set_has_clientsecret();
if (clientsecret_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (clientsecret_ == &::google::protobuf::internal::kEmptyString) {
clientsecret_ = new ::std::string;
}
clientsecret_->assign(value);
// @@protoc_insertion_point(field_set_char:CleanerInitMessage.clientSecret)
}
inline void CleanerInitMessage::set_clientsecret(const char* value, size_t size) {
set_has_clientsecret();
if (clientsecret_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (clientsecret_ == &::google::protobuf::internal::kEmptyString) {
clientsecret_ = new ::std::string;
}
clientsecret_->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:CleanerInitMessage.clientSecret)
}
inline ::std::string* CleanerInitMessage::mutable_clientsecret() {
set_has_clientsecret();
if (clientsecret_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (clientsecret_ == &::google::protobuf::internal::kEmptyString) {
clientsecret_ = new ::std::string;
}
// @@protoc_insertion_point(field_mutable:CleanerInitMessage.clientSecret)
return clientsecret_;
}
inline ::std::string* CleanerInitMessage::release_clientsecret() {
clear_has_clientsecret();
if (clientsecret_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (clientsecret_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = clientsecret_;
clientsecret_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clientsecret_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void CleanerInitMessage::set_allocated_clientsecret(::std::string* clientsecret) {
if (clientsecret_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (clientsecret_ != &::google::protobuf::internal::kEmptyString) {
delete clientsecret_;
}
if (clientsecret) {
@@ -849,9 +802,8 @@ inline void CleanerInitMessage::set_allocated_clientsecret(::std::string* client
clientsecret_ = clientsecret;
} else {
clear_has_clientsecret();
clientsecret_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clientsecret_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
// @@protoc_insertion_point(field_set_allocated:CleanerInitMessage.clientSecret)
}
// -------------------------------------------------------------------
@@ -873,13 +825,11 @@ inline void CleanerInitAckMessage::clear_serverversion() {
clear_has_serverversion();
}
inline ::google::protobuf::uint32 CleanerInitAckMessage::serverversion() const {
// @@protoc_insertion_point(field_get:CleanerInitAckMessage.serverVersion)
return serverversion_;
}
inline void CleanerInitAckMessage::set_serverversion(::google::protobuf::uint32 value) {
set_has_serverversion();
serverversion_ = value;
// @@protoc_insertion_point(field_set:CleanerInitAckMessage.serverVersion)
}
// required string serverSecret = 2;
@@ -893,59 +843,54 @@ inline void CleanerInitAckMessage::clear_has_serversecret() {
_has_bits_[0] &= ~0x00000002u;
}
inline void CleanerInitAckMessage::clear_serversecret() {
if (serversecret_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (serversecret_ != &::google::protobuf::internal::kEmptyString) {
serversecret_->clear();
}
clear_has_serversecret();
}
inline const ::std::string& CleanerInitAckMessage::serversecret() const {
// @@protoc_insertion_point(field_get:CleanerInitAckMessage.serverSecret)
return *serversecret_;
}
inline void CleanerInitAckMessage::set_serversecret(const ::std::string& value) {
set_has_serversecret();
if (serversecret_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (serversecret_ == &::google::protobuf::internal::kEmptyString) {
serversecret_ = new ::std::string;
}
serversecret_->assign(value);
// @@protoc_insertion_point(field_set:CleanerInitAckMessage.serverSecret)
}
inline void CleanerInitAckMessage::set_serversecret(const char* value) {
set_has_serversecret();
if (serversecret_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (serversecret_ == &::google::protobuf::internal::kEmptyString) {
serversecret_ = new ::std::string;
}
serversecret_->assign(value);
// @@protoc_insertion_point(field_set_char:CleanerInitAckMessage.serverSecret)
}
inline void CleanerInitAckMessage::set_serversecret(const char* value, size_t size) {
set_has_serversecret();
if (serversecret_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (serversecret_ == &::google::protobuf::internal::kEmptyString) {
serversecret_ = new ::std::string;
}
serversecret_->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:CleanerInitAckMessage.serverSecret)
}
inline ::std::string* CleanerInitAckMessage::mutable_serversecret() {
set_has_serversecret();
if (serversecret_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (serversecret_ == &::google::protobuf::internal::kEmptyString) {
serversecret_ = new ::std::string;
}
// @@protoc_insertion_point(field_mutable:CleanerInitAckMessage.serverSecret)
return serversecret_;
}
inline ::std::string* CleanerInitAckMessage::release_serversecret() {
clear_has_serversecret();
if (serversecret_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (serversecret_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = serversecret_;
serversecret_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
serversecret_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void CleanerInitAckMessage::set_allocated_serversecret(::std::string* serversecret) {
if (serversecret_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (serversecret_ != &::google::protobuf::internal::kEmptyString) {
delete serversecret_;
}
if (serversecret) {
@@ -953,9 +898,8 @@ inline void CleanerInitAckMessage::set_allocated_serversecret(::std::string* ser
serversecret_ = serversecret;
} else {
clear_has_serversecret();
serversecret_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
serversecret_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
// @@protoc_insertion_point(field_set_allocated:CleanerInitAckMessage.serverSecret)
}
// -------------------------------------------------------------------
@@ -977,13 +921,11 @@ inline void CleanerChatRequestMessage::clear_requestid() {
clear_has_requestid();
}
inline ::google::protobuf::uint32 CleanerChatRequestMessage::requestid() const {
// @@protoc_insertion_point(field_get:CleanerChatRequestMessage.requestId)
return requestid_;
}
inline void CleanerChatRequestMessage::set_requestid(::google::protobuf::uint32 value) {
set_has_requestid();
requestid_ = value;
// @@protoc_insertion_point(field_set:CleanerChatRequestMessage.requestId)
}
// required .CleanerChatType cleanerChatType = 2;
@@ -1001,14 +943,12 @@ inline void CleanerChatRequestMessage::clear_cleanerchattype() {
clear_has_cleanerchattype();
}
inline ::CleanerChatType CleanerChatRequestMessage::cleanerchattype() const {
// @@protoc_insertion_point(field_get:CleanerChatRequestMessage.cleanerChatType)
return static_cast< ::CleanerChatType >(cleanerchattype_);
}
inline void CleanerChatRequestMessage::set_cleanerchattype(::CleanerChatType value) {
assert(::CleanerChatType_IsValid(value));
set_has_cleanerchattype();
cleanerchattype_ = value;
// @@protoc_insertion_point(field_set:CleanerChatRequestMessage.cleanerChatType)
}
// optional uint32 gameId = 3 [default = 0];
@@ -1026,13 +966,11 @@ inline void CleanerChatRequestMessage::clear_gameid() {
clear_has_gameid();
}
inline ::google::protobuf::uint32 CleanerChatRequestMessage::gameid() const {
// @@protoc_insertion_point(field_get:CleanerChatRequestMessage.gameId)
return gameid_;
}
inline void CleanerChatRequestMessage::set_gameid(::google::protobuf::uint32 value) {
set_has_gameid();
gameid_ = value;
// @@protoc_insertion_point(field_set:CleanerChatRequestMessage.gameId)
}
// required uint32 playerId = 4;
@@ -1050,13 +988,11 @@ inline void CleanerChatRequestMessage::clear_playerid() {
clear_has_playerid();
}
inline ::google::protobuf::uint32 CleanerChatRequestMessage::playerid() const {
// @@protoc_insertion_point(field_get:CleanerChatRequestMessage.playerId)
return playerid_;
}
inline void CleanerChatRequestMessage::set_playerid(::google::protobuf::uint32 value) {
set_has_playerid();
playerid_ = value;
// @@protoc_insertion_point(field_set:CleanerChatRequestMessage.playerId)
}
// required string playerName = 5;
@@ -1070,59 +1006,54 @@ inline void CleanerChatRequestMessage::clear_has_playername() {
_has_bits_[0] &= ~0x00000010u;
}
inline void CleanerChatRequestMessage::clear_playername() {
if (playername_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (playername_ != &::google::protobuf::internal::kEmptyString) {
playername_->clear();
}
clear_has_playername();
}
inline const ::std::string& CleanerChatRequestMessage::playername() const {
// @@protoc_insertion_point(field_get:CleanerChatRequestMessage.playerName)
return *playername_;
}
inline void CleanerChatRequestMessage::set_playername(const ::std::string& value) {
set_has_playername();
if (playername_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (playername_ == &::google::protobuf::internal::kEmptyString) {
playername_ = new ::std::string;
}
playername_->assign(value);
// @@protoc_insertion_point(field_set:CleanerChatRequestMessage.playerName)
}
inline void CleanerChatRequestMessage::set_playername(const char* value) {
set_has_playername();
if (playername_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (playername_ == &::google::protobuf::internal::kEmptyString) {
playername_ = new ::std::string;
}
playername_->assign(value);
// @@protoc_insertion_point(field_set_char:CleanerChatRequestMessage.playerName)
}
inline void CleanerChatRequestMessage::set_playername(const char* value, size_t size) {
set_has_playername();
if (playername_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (playername_ == &::google::protobuf::internal::kEmptyString) {
playername_ = new ::std::string;
}
playername_->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:CleanerChatRequestMessage.playerName)
}
inline ::std::string* CleanerChatRequestMessage::mutable_playername() {
set_has_playername();
if (playername_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (playername_ == &::google::protobuf::internal::kEmptyString) {
playername_ = new ::std::string;
}
// @@protoc_insertion_point(field_mutable:CleanerChatRequestMessage.playerName)
return playername_;
}
inline ::std::string* CleanerChatRequestMessage::release_playername() {
clear_has_playername();
if (playername_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (playername_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = playername_;
playername_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
playername_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void CleanerChatRequestMessage::set_allocated_playername(::std::string* playername) {
if (playername_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (playername_ != &::google::protobuf::internal::kEmptyString) {
delete playername_;
}
if (playername) {
@@ -1130,9 +1061,8 @@ inline void CleanerChatRequestMessage::set_allocated_playername(::std::string* p
playername_ = playername;
} else {
clear_has_playername();
playername_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
playername_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
// @@protoc_insertion_point(field_set_allocated:CleanerChatRequestMessage.playerName)
}
// required string chatMessage = 6;
@@ -1146,59 +1076,54 @@ inline void CleanerChatRequestMessage::clear_has_chatmessage() {
_has_bits_[0] &= ~0x00000020u;
}
inline void CleanerChatRequestMessage::clear_chatmessage() {
if (chatmessage_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (chatmessage_ != &::google::protobuf::internal::kEmptyString) {
chatmessage_->clear();
}
clear_has_chatmessage();
}
inline const ::std::string& CleanerChatRequestMessage::chatmessage() const {
// @@protoc_insertion_point(field_get:CleanerChatRequestMessage.chatMessage)
return *chatmessage_;
}
inline void CleanerChatRequestMessage::set_chatmessage(const ::std::string& value) {
set_has_chatmessage();
if (chatmessage_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (chatmessage_ == &::google::protobuf::internal::kEmptyString) {
chatmessage_ = new ::std::string;
}
chatmessage_->assign(value);
// @@protoc_insertion_point(field_set:CleanerChatRequestMessage.chatMessage)
}
inline void CleanerChatRequestMessage::set_chatmessage(const char* value) {
set_has_chatmessage();
if (chatmessage_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (chatmessage_ == &::google::protobuf::internal::kEmptyString) {
chatmessage_ = new ::std::string;
}
chatmessage_->assign(value);
// @@protoc_insertion_point(field_set_char:CleanerChatRequestMessage.chatMessage)
}
inline void CleanerChatRequestMessage::set_chatmessage(const char* value, size_t size) {
set_has_chatmessage();
if (chatmessage_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (chatmessage_ == &::google::protobuf::internal::kEmptyString) {
chatmessage_ = new ::std::string;
}
chatmessage_->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:CleanerChatRequestMessage.chatMessage)
}
inline ::std::string* CleanerChatRequestMessage::mutable_chatmessage() {
set_has_chatmessage();
if (chatmessage_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (chatmessage_ == &::google::protobuf::internal::kEmptyString) {
chatmessage_ = new ::std::string;
}
// @@protoc_insertion_point(field_mutable:CleanerChatRequestMessage.chatMessage)
return chatmessage_;
}
inline ::std::string* CleanerChatRequestMessage::release_chatmessage() {
clear_has_chatmessage();
if (chatmessage_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (chatmessage_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = chatmessage_;
chatmessage_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
chatmessage_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void CleanerChatRequestMessage::set_allocated_chatmessage(::std::string* chatmessage) {
if (chatmessage_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (chatmessage_ != &::google::protobuf::internal::kEmptyString) {
delete chatmessage_;
}
if (chatmessage) {
@@ -1206,9 +1131,8 @@ inline void CleanerChatRequestMessage::set_allocated_chatmessage(::std::string*
chatmessage_ = chatmessage;
} else {
clear_has_chatmessage();
chatmessage_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
chatmessage_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
// @@protoc_insertion_point(field_set_allocated:CleanerChatRequestMessage.chatMessage)
}
// -------------------------------------------------------------------
@@ -1230,13 +1154,11 @@ inline void CleanerChatReplyMessage::clear_requestid() {
clear_has_requestid();
}
inline ::google::protobuf::uint32 CleanerChatReplyMessage::requestid() const {
// @@protoc_insertion_point(field_get:CleanerChatReplyMessage.requestId)
return requestid_;
}
inline void CleanerChatReplyMessage::set_requestid(::google::protobuf::uint32 value) {
set_has_requestid();
requestid_ = value;
// @@protoc_insertion_point(field_set:CleanerChatReplyMessage.requestId)
}
// required .CleanerChatType cleanerChatType = 2;
@@ -1254,14 +1176,12 @@ inline void CleanerChatReplyMessage::clear_cleanerchattype() {
clear_has_cleanerchattype();
}
inline ::CleanerChatType CleanerChatReplyMessage::cleanerchattype() const {
// @@protoc_insertion_point(field_get:CleanerChatReplyMessage.cleanerChatType)
return static_cast< ::CleanerChatType >(cleanerchattype_);
}
inline void CleanerChatReplyMessage::set_cleanerchattype(::CleanerChatType value) {
assert(::CleanerChatType_IsValid(value));
set_has_cleanerchattype();
cleanerchattype_ = value;
// @@protoc_insertion_point(field_set:CleanerChatReplyMessage.cleanerChatType)
}
// optional uint32 gameId = 3 [default = 0];
@@ -1279,13 +1199,11 @@ inline void CleanerChatReplyMessage::clear_gameid() {
clear_has_gameid();
}
inline ::google::protobuf::uint32 CleanerChatReplyMessage::gameid() const {
// @@protoc_insertion_point(field_get:CleanerChatReplyMessage.gameId)
return gameid_;
}
inline void CleanerChatReplyMessage::set_gameid(::google::protobuf::uint32 value) {
set_has_gameid();
gameid_ = value;
// @@protoc_insertion_point(field_set:CleanerChatReplyMessage.gameId)
}
// required uint32 playerId = 4;
@@ -1303,13 +1221,11 @@ inline void CleanerChatReplyMessage::clear_playerid() {
clear_has_playerid();
}
inline ::google::protobuf::uint32 CleanerChatReplyMessage::playerid() const {
// @@protoc_insertion_point(field_get:CleanerChatReplyMessage.playerId)
return playerid_;
}
inline void CleanerChatReplyMessage::set_playerid(::google::protobuf::uint32 value) {
set_has_playerid();
playerid_ = value;
// @@protoc_insertion_point(field_set:CleanerChatReplyMessage.playerId)
}
// required .CleanerChatReplyMessage.CleanerActionType cleanerActionType = 5;
@@ -1327,14 +1243,12 @@ inline void CleanerChatReplyMessage::clear_cleaneractiontype() {
clear_has_cleaneractiontype();
}
inline ::CleanerChatReplyMessage_CleanerActionType CleanerChatReplyMessage::cleaneractiontype() const {
// @@protoc_insertion_point(field_get:CleanerChatReplyMessage.cleanerActionType)
return static_cast< ::CleanerChatReplyMessage_CleanerActionType >(cleaneractiontype_);
}
inline void CleanerChatReplyMessage::set_cleaneractiontype(::CleanerChatReplyMessage_CleanerActionType value) {
assert(::CleanerChatReplyMessage_CleanerActionType_IsValid(value));
set_has_cleaneractiontype();
cleaneractiontype_ = value;
// @@protoc_insertion_point(field_set:CleanerChatReplyMessage.cleanerActionType)
}
// optional string cleanerText = 6 [default = ""];
@@ -1348,59 +1262,54 @@ inline void CleanerChatReplyMessage::clear_has_cleanertext() {
_has_bits_[0] &= ~0x00000020u;
}
inline void CleanerChatReplyMessage::clear_cleanertext() {
if (cleanertext_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (cleanertext_ != &::google::protobuf::internal::kEmptyString) {
cleanertext_->clear();
}
clear_has_cleanertext();
}
inline const ::std::string& CleanerChatReplyMessage::cleanertext() const {
// @@protoc_insertion_point(field_get:CleanerChatReplyMessage.cleanerText)
return *cleanertext_;
}
inline void CleanerChatReplyMessage::set_cleanertext(const ::std::string& value) {
set_has_cleanertext();
if (cleanertext_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (cleanertext_ == &::google::protobuf::internal::kEmptyString) {
cleanertext_ = new ::std::string;
}
cleanertext_->assign(value);
// @@protoc_insertion_point(field_set:CleanerChatReplyMessage.cleanerText)
}
inline void CleanerChatReplyMessage::set_cleanertext(const char* value) {
set_has_cleanertext();
if (cleanertext_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (cleanertext_ == &::google::protobuf::internal::kEmptyString) {
cleanertext_ = new ::std::string;
}
cleanertext_->assign(value);
// @@protoc_insertion_point(field_set_char:CleanerChatReplyMessage.cleanerText)
}
inline void CleanerChatReplyMessage::set_cleanertext(const char* value, size_t size) {
set_has_cleanertext();
if (cleanertext_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (cleanertext_ == &::google::protobuf::internal::kEmptyString) {
cleanertext_ = new ::std::string;
}
cleanertext_->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:CleanerChatReplyMessage.cleanerText)
}
inline ::std::string* CleanerChatReplyMessage::mutable_cleanertext() {
set_has_cleanertext();
if (cleanertext_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (cleanertext_ == &::google::protobuf::internal::kEmptyString) {
cleanertext_ = new ::std::string;
}
// @@protoc_insertion_point(field_mutable:CleanerChatReplyMessage.cleanerText)
return cleanertext_;
}
inline ::std::string* CleanerChatReplyMessage::release_cleanertext() {
clear_has_cleanertext();
if (cleanertext_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (cleanertext_ == &::google::protobuf::internal::kEmptyString) {
return NULL;
} else {
::std::string* temp = cleanertext_;
cleanertext_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
cleanertext_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
return temp;
}
}
inline void CleanerChatReplyMessage::set_allocated_cleanertext(::std::string* cleanertext) {
if (cleanertext_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
if (cleanertext_ != &::google::protobuf::internal::kEmptyString) {
delete cleanertext_;
}
if (cleanertext) {
@@ -1408,9 +1317,8 @@ inline void CleanerChatReplyMessage::set_allocated_cleanertext(::std::string* cl
cleanertext_ = cleanertext;
} else {
clear_has_cleanertext();
cleanertext_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
cleanertext_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
}
// @@protoc_insertion_point(field_set_allocated:CleanerChatReplyMessage.cleanerText)
}
// -------------------------------------------------------------------
@@ -1432,14 +1340,12 @@ inline void ChatCleanerMessage::clear_messagetype() {
clear_has_messagetype();
}
inline ::ChatCleanerMessage_ChatCleanerMessageType ChatCleanerMessage::messagetype() const {
// @@protoc_insertion_point(field_get:ChatCleanerMessage.messageType)
return static_cast< ::ChatCleanerMessage_ChatCleanerMessageType >(messagetype_);
}
inline void ChatCleanerMessage::set_messagetype(::ChatCleanerMessage_ChatCleanerMessageType value) {
assert(::ChatCleanerMessage_ChatCleanerMessageType_IsValid(value));
set_has_messagetype();
messagetype_ = value;
// @@protoc_insertion_point(field_set:ChatCleanerMessage.messageType)
}
// optional .CleanerInitMessage cleanerInitMessage = 2;
@@ -1457,7 +1363,6 @@ inline void ChatCleanerMessage::clear_cleanerinitmessage() {
clear_has_cleanerinitmessage();
}
inline const ::CleanerInitMessage& ChatCleanerMessage::cleanerinitmessage() const {
// @@protoc_insertion_point(field_get:ChatCleanerMessage.cleanerInitMessage)
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
return cleanerinitmessage_ != NULL ? *cleanerinitmessage_ : *default_instance().cleanerinitmessage_;
#else
@@ -1467,7 +1372,6 @@ inline const ::CleanerInitMessage& ChatCleanerMessage::cleanerinitmessage() cons
inline ::CleanerInitMessage* ChatCleanerMessage::mutable_cleanerinitmessage() {
set_has_cleanerinitmessage();
if (cleanerinitmessage_ == NULL) cleanerinitmessage_ = new ::CleanerInitMessage;
// @@protoc_insertion_point(field_mutable:ChatCleanerMessage.cleanerInitMessage)
return cleanerinitmessage_;
}
inline ::CleanerInitMessage* ChatCleanerMessage::release_cleanerinitmessage() {
@@ -1484,7 +1388,6 @@ inline void ChatCleanerMessage::set_allocated_cleanerinitmessage(::CleanerInitMe
} else {
clear_has_cleanerinitmessage();
}
// @@protoc_insertion_point(field_set_allocated:ChatCleanerMessage.cleanerInitMessage)
}
// optional .CleanerInitAckMessage cleanerInitAckMessage = 3;
@@ -1502,7 +1405,6 @@ inline void ChatCleanerMessage::clear_cleanerinitackmessage() {
clear_has_cleanerinitackmessage();
}
inline const ::CleanerInitAckMessage& ChatCleanerMessage::cleanerinitackmessage() const {
// @@protoc_insertion_point(field_get:ChatCleanerMessage.cleanerInitAckMessage)
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
return cleanerinitackmessage_ != NULL ? *cleanerinitackmessage_ : *default_instance().cleanerinitackmessage_;
#else
@@ -1512,7 +1414,6 @@ inline const ::CleanerInitAckMessage& ChatCleanerMessage::cleanerinitackmessage(
inline ::CleanerInitAckMessage* ChatCleanerMessage::mutable_cleanerinitackmessage() {
set_has_cleanerinitackmessage();
if (cleanerinitackmessage_ == NULL) cleanerinitackmessage_ = new ::CleanerInitAckMessage;
// @@protoc_insertion_point(field_mutable:ChatCleanerMessage.cleanerInitAckMessage)
return cleanerinitackmessage_;
}
inline ::CleanerInitAckMessage* ChatCleanerMessage::release_cleanerinitackmessage() {
@@ -1529,7 +1430,6 @@ inline void ChatCleanerMessage::set_allocated_cleanerinitackmessage(::CleanerIni
} else {
clear_has_cleanerinitackmessage();
}
// @@protoc_insertion_point(field_set_allocated:ChatCleanerMessage.cleanerInitAckMessage)
}
// optional .CleanerChatRequestMessage cleanerChatRequestMessage = 4;
@@ -1547,7 +1447,6 @@ inline void ChatCleanerMessage::clear_cleanerchatrequestmessage() {
clear_has_cleanerchatrequestmessage();
}
inline const ::CleanerChatRequestMessage& ChatCleanerMessage::cleanerchatrequestmessage() const {
// @@protoc_insertion_point(field_get:ChatCleanerMessage.cleanerChatRequestMessage)
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
return cleanerchatrequestmessage_ != NULL ? *cleanerchatrequestmessage_ : *default_instance().cleanerchatrequestmessage_;
#else
@@ -1557,7 +1456,6 @@ inline const ::CleanerChatRequestMessage& ChatCleanerMessage::cleanerchatrequest
inline ::CleanerChatRequestMessage* ChatCleanerMessage::mutable_cleanerchatrequestmessage() {
set_has_cleanerchatrequestmessage();
if (cleanerchatrequestmessage_ == NULL) cleanerchatrequestmessage_ = new ::CleanerChatRequestMessage;
// @@protoc_insertion_point(field_mutable:ChatCleanerMessage.cleanerChatRequestMessage)
return cleanerchatrequestmessage_;
}
inline ::CleanerChatRequestMessage* ChatCleanerMessage::release_cleanerchatrequestmessage() {
@@ -1574,7 +1472,6 @@ inline void ChatCleanerMessage::set_allocated_cleanerchatrequestmessage(::Cleane
} else {
clear_has_cleanerchatrequestmessage();
}
// @@protoc_insertion_point(field_set_allocated:ChatCleanerMessage.cleanerChatRequestMessage)
}
// optional .CleanerChatReplyMessage cleanerChatReplyMessage = 5;
@@ -1592,7 +1489,6 @@ inline void ChatCleanerMessage::clear_cleanerchatreplymessage() {
clear_has_cleanerchatreplymessage();
}
inline const ::CleanerChatReplyMessage& ChatCleanerMessage::cleanerchatreplymessage() const {
// @@protoc_insertion_point(field_get:ChatCleanerMessage.cleanerChatReplyMessage)
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
return cleanerchatreplymessage_ != NULL ? *cleanerchatreplymessage_ : *default_instance().cleanerchatreplymessage_;
#else
@@ -1602,7 +1498,6 @@ inline const ::CleanerChatReplyMessage& ChatCleanerMessage::cleanerchatreplymess
inline ::CleanerChatReplyMessage* ChatCleanerMessage::mutable_cleanerchatreplymessage() {
set_has_cleanerchatreplymessage();
if (cleanerchatreplymessage_ == NULL) cleanerchatreplymessage_ = new ::CleanerChatReplyMessage;
// @@protoc_insertion_point(field_mutable:ChatCleanerMessage.cleanerChatReplyMessage)
return cleanerchatreplymessage_;
}
inline ::CleanerChatReplyMessage* ChatCleanerMessage::release_cleanerchatreplymessage() {
@@ -1619,7 +1514,6 @@ inline void ChatCleanerMessage::set_allocated_cleanerchatreplymessage(::CleanerC
} else {
clear_has_cleanerchatreplymessage();
}
// @@protoc_insertion_point(field_set_allocated:ChatCleanerMessage.cleanerChatReplyMessage)
}
+2244 -4939
View File
File diff suppressed because it is too large Load Diff
+797 -2281
View File
File diff suppressed because it is too large Load Diff