| 1 | /*************************************************************************** |
| 2 | * Copyright (C) 2009 by The qGo Project * |
| 3 | * * |
| 4 | * This file is part of qGo. * |
| 5 | * * |
| 6 | * qGo is free software: you can redistribute it and/or modify * |
| 7 | * it under the terms of the GNU General Public License as published by * |
| 8 | * the Free Software Foundation; either version 2 of the License, or * |
| 9 | * (at your option) any later version. * |
| 10 | * * |
| 11 | * This program is distributed in the hope that it will be useful, * |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
| 14 | * GNU General Public License for more details. * |
| 15 | * * |
| 16 | * You should have received a copy of the GNU General Public License * |
| 17 | * along with this program; if not, see <http://www.gnu.org/licenses/> * |
| 18 | * or write to the Free Software Foundation, Inc., * |
| 19 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
| 20 | ***************************************************************************/ |
| 21 | |
| 22 | |
| 23 | #ifndef MESSAGES_H |
| 24 | #define MESSAGES_Hcxx . . $ `src/network/messages.h:24:9`! |
| 25 | #include <QtCore> |
| 26 | #include "defines.h"cxx . . $ `<file>/src/defines.h`/ |
| 27 | /* This file is defined as a source file in src.pro because of a |
| 28 | * linker complaint about undefined destructors. Might be a cleaner |
| 29 | * solution though. */ |
| 30 | /* Also, for the most part these are just constructed and deleted immediately |
| 31 | * but there's a few that do odd things, like GameResult so it might be |
| 32 | * worth it to modify constructors/destructors to print out info so |
| 33 | * we could make sure there's no memory leaks FIXME */ |
| 34 | // this messages won't exist very long so no need to store anything |
| 35 | // they shouldn't be used past the one iteration of a socket read |
| 36 | /* FIXME: I think we imagined that we could do the below because each string |
| 37 | * was set only at the creation of the structure... but I'm not sure we can... |
| 38 | * we thought that was how "const" worked then, but maybe its not. It might |
| 39 | * just depend on that data not getting deleted while a connectionInfo struct |
| 40 | * uses it... so far this is a safe bet... but its something to worry about.*/ |
| 41 | |
| 42 | #define tr_macrocxx . . $ `src/network/messages.h:42:9`!(x) QCoreApplication::translate("Game messages", x, "") |
| 43 | |
| 44 | |
| 45 | class PlayerListingcxx . . $ PlayerListing#; |
| 46 | |
| 47 | class MoveRecordcxx . . $ MoveRecord# |
| 48 | { |
| 49 | public: |
| 50 | unsigned int numbercxx . . $ MoveRecord#number.; |
| 51 | #define NOMOVENUMBERcxx . . $ `src/network/messages.h:51:9`! 0xffff |
| 52 | unsigned int xcxx . . $ MoveRecord#x., ycxx . . $ MoveRecord#y.; |
| 53 | StoneColorcxx . . $ StoneColor# colorcxx . . $ MoveRecord#color.; //maybe we update this with mark class or something later |
| 54 | // having accept and refuse undo here is a little weird but its almost a kind |
| 55 | // of move... we'll see how other protocols handle this stuff |
| 56 | enum Flagscxx . . $ MoveRecord#Flags# { NONEcxx . . $ MoveRecord#NONE., HANDICAPcxx . . $ MoveRecord#HANDICAP., PASScxx . . $ MoveRecord#PASS., RESIGNcxx . . $ MoveRecord#RESIGN., REMOVEcxx . . $ MoveRecord#REMOVE., UNREMOVEcxx . . $ MoveRecord#UNREMOVE., UNDOcxx . . $ MoveRecord#UNDO., REQUESTUNDOcxx . . $ MoveRecord#REQUESTUNDO., REFUSEUNDOcxx . . $ MoveRecord#REFUSEUNDO., TERRITORYcxx . . $ MoveRecord#TERRITORY., UNDO_TERRITORYcxx . . $ MoveRecord#UNDO_TERRITORY., REMOVE_AREAcxx . . $ MoveRecord#REMOVE_AREA., UNREMOVE_AREAcxx . . $ MoveRecord#UNREMOVE_AREA., DONE_SCORINGcxx . . $ MoveRecord#DONE_SCORING., |
| 57 | SETMOVEcxx . . $ MoveRecord#SETMOVE., BACKWARDcxx . . $ MoveRecord#BACKWARD., FORWARDcxx . . $ MoveRecord#FORWARD., RESETBRANCHcxx . . $ MoveRecord#RESETBRANCH., DELETEBRANCHcxx . . $ MoveRecord#DELETEBRANCH., RESETGAMEcxx . . $ MoveRecord#RESETGAME., TOENDcxx . . $ MoveRecord#TOEND. } flagscxx . . $ MoveRecord#flags.; |
| 58 | MoveRecordcxx . . $ MoveRecord#MoveRecord(49f6e7a06ebc5aa8).() : numbercxx . . $ MoveRecord#number.(NOMOVENUMBERcxx . . $ `src/network/messages.h:51:9`!), colorcxx . . $ MoveRecord#color.(stoneNonecxx . . $ stoneNone.), flagscxx . . $ MoveRecord#flags.(NONEcxx . . $ MoveRecord#NONE.) {}; |
| 59 | MoveRecordcxx . . $ MoveRecord#MoveRecord(77cfb45eb7fd8341).(Flagscxx . . $ MoveRecord#Flags# f) : numbercxx . . $ MoveRecord#number.(NOMOVENUMBERcxx . . $ `src/network/messages.h:51:9`!), flagscxx . . $ MoveRecord#flags.(f) {}; |
| 60 | MoveRecordcxx . . $ MoveRecord#MoveRecord(fef2be7f4dcde0db).(unsigned int n, Flagscxx . . $ MoveRecord#Flags# f) : numbercxx . . $ MoveRecord#number.(n), flagscxx . . $ MoveRecord#flags.(f) {}; |
| 61 | MoveRecordcxx . . $ MoveRecord#MoveRecord(7031fb2d6587000a).(unsigned int n, unsigned int _x, unsigned int _y, StoneColorcxx . . $ StoneColor# c) : numbercxx . . $ MoveRecord#number.(n), xcxx . . $ MoveRecord#x.(_x), ycxx . . $ MoveRecord#y.(_y), colorcxx . . $ MoveRecord#color.(c), flagscxx . . $ MoveRecord#flags.(NONEcxx . . $ MoveRecord#NONE.) {}; |
| 62 | }; |
| 63 | |
| 64 | /* FIXME Clockdisplay doesn't appear to use the periods, stones just |
| 65 | * makes up for it... perhaps this is okay, boarddispatch::recvTime |
| 66 | * has been altered as well to just ignore the periods... but its |
| 67 | * ugly, unclear, we should change this all around. It is true though |
| 68 | * that since the server updates us, there's almost no need to know |
| 69 | * how much is left... except when do we enter byoyomi/period time??? */ |
| 70 | class TimeRecordcxx . . $ TimeRecord# |
| 71 | { |
| 72 | public: |
| 73 | int timecxx . . $ TimeRecord#time.; |
| 74 | int stones_periodscxx . . $ TimeRecord#stones_periods.; |
| 75 | TimeRecordcxx . . $ TimeRecord#TimeRecord(49f6e7a06ebc5aa8).() : timecxx . . $ TimeRecord#time.(0), stones_periodscxx . . $ TimeRecord#stones_periods.(-1) {}; |
| 76 | TimeRecordcxx . . $ TimeRecord#TimeRecord(3e454b8ccf442868).(int t, int s) : timecxx . . $ TimeRecord#time.(t), stones_periodscxx . . $ TimeRecord#stones_periods.(s) {}; |
| 77 | }; |
| 78 | |
| 79 | class GameResultcxx . . $ GameResult# |
| 80 | { |
| 81 | public: |
| 82 | unsigned int game_numbercxx . . $ GameResult#game_number.; |
| 83 | StoneColorcxx . . $ StoneColor# winner_colorcxx . . $ GameResult#winner_color.; //this needs to be standardized obviously |
| 84 | QStringcxx . . $ QString# winner_namecxx . . $ GameResult#winner_name.; |
| 85 | QStringcxx . . $ QString# loser_namecxx . . $ GameResult#loser_name.; |
| 86 | /* Could be better to do black score, white score, we'll see how this |
| 87 | * is used !!!*/ |
| 88 | float winner_scorecxx . . $ GameResult#winner_score.; |
| 89 | float loser_scorecxx . . $ GameResult#loser_score.; |
| 90 | enum ResultTypecxx . . $ GameResult#ResultType# { SCOREcxx . . $ GameResult#SCORE., RESIGNcxx . . $ GameResult#RESIGN., TIMEcxx . . $ GameResult#TIME., FORFEITcxx . . $ GameResult#FORFEIT., DRAWcxx . . $ GameResult#DRAW., NOGAMEcxx . . $ GameResult#NOGAME., ADJOURNEDcxx . . $ GameResult#ADJOURNED. } resultcxx . . $ GameResult#result.; |
| 91 | GameResultcxx . . $ GameResult#GameResult(49f6e7a06ebc5aa8).() : winner_colorcxx . . $ GameResult#winner_color.(stoneNonecxx . . $ stoneNone.), winner_namecxx . . $ GameResult#winner_name.(QStringcxx . . $ QString#QString(ced63f7c635d850d).()), loser_namecxx . . $ GameResult#loser_name.(QStringcxx . . $ QString#QString(ced63f7c635d850d).()), winner_scorecxx . . $ GameResult#winner_score.(0.0), loser_scorecxx . . $ GameResult#loser_score.(0.0) {}; |
| 92 | GameResultcxx . . $ GameResult#GameResult(8260daab7d234241).(StoneColorcxx . . $ StoneColor# c, ResultTypecxx . . $ GameResult#ResultType# r) : winner_colorcxx . . $ GameResult#winner_color.(c), winner_namecxx . . $ GameResult#winner_name.(QStringcxx . . $ QString#QString(ced63f7c635d850d).()), loser_namecxx . . $ GameResult#loser_name.(QStringcxx . . $ QString#QString(ced63f7c635d850d).()), winner_scorecxx . . $ GameResult#winner_score.(0.0), loser_scorecxx . . $ GameResult#loser_score.(0.0), resultcxx . . $ GameResult#result.(r) {}; |
| 93 | QStringcxx . . $ QString# shortMessagecxx . . $ GameResult#shortMessage(4365c3963150523e).(void) |
| 94 | { |
| 95 | QStringcxx . . $ QString# msgcxx . . $ QString#QString(ced63f7c635d850d).; |
| 96 | if(winner_colorcxx . . $ GameResult#winner_color. == stoneWhitecxx . . $ stoneWhite.) |
| 97 | msg =cxx . . $ QString#`operator=`(4f35bf974e7f8568). tr_macrocxx . . $ `src/network/messages.h:42:9`!("W+"); |
| 98 | else |
| 99 | msg =cxx . . $ QString#`operator=`(4f35bf974e7f8568). tr_macrocxx . . $ `src/network/messages.h:42:9`!("B+"); |
| 100 | |
| 101 | switch(resultcxx . . $ GameResult#result.) |
| 102 | { |
| 103 | case FORFEITcxx . . $ GameResult#FORFEIT.: |
| 104 | msg +=cxx . . $ QString#`operator+=`(6a89d0b7f4d2681c). tr_macrocxx . . $ `src/network/messages.h:42:9`!("F"); |
| 105 | break; |
| 106 | case TIMEcxx . . $ GameResult#TIME.: |
| 107 | msg +=cxx . . $ QString#`operator+=`(6a89d0b7f4d2681c). tr_macrocxx . . $ `src/network/messages.h:42:9`!("T"); |
| 108 | break; |
| 109 | case RESIGNcxx . . $ GameResult#RESIGN.: |
| 110 | msg +=cxx . . $ QString#`operator+=`(6a89d0b7f4d2681c). tr_macrocxx . . $ `src/network/messages.h:42:9`!("R"); |
| 111 | break; |
| 112 | case SCOREcxx . . $ GameResult#SCORE.: |
| 113 | msg +=cxx . . $ QString#`operator+=`(6a89d0b7f4d2681c). QStringcxx . . $ QString#::numbercxx . . $ QString#number(ac5d358e2e30f7ea).(winner_scorecxx . . $ GameResult#winner_score. - loser_scorecxx . . $ GameResult#loser_score.); |
| 114 | break; |
| 115 | case DRAWcxx . . $ GameResult#DRAW.: |
| 116 | msg =cxx . . $ QString#`operator=`(d02845eef0c33901). "="; //FIXME |
| 117 | break; |
| 118 | default: |
| 119 | break; |
| 120 | } |
| 121 | return msgcxx . . $ QString#QString(28715ad661ad3cec).; |
| 122 | } |
| 123 | QStringcxx . . $ QString# longMessagecxx . . $ GameResult#longMessage(4365c3963150523e).(void) |
| 124 | { |
| 125 | QStringcxx . . $ QString# msgcxx . . $ QString#QString(ced63f7c635d850d).; |
| 126 | float margin = winner_scorecxx . . $ GameResult#winner_score. - loser_scorecxx . . $ GameResult#loser_score.; |
| 127 | |
| 128 | switch(resultcxx . . $ GameResult#result.) |
| 129 | { |
| 130 | case FORFEITcxx . . $ GameResult#FORFEIT.: |
| 131 | if(winner_colorcxx . . $ GameResult#winner_color. == stoneWhitecxx . . $ stoneWhite.) |
| 132 | { |
| 133 | if(loser_namecxx . . $ GameResult#loser_name. !=cxx . . $ `operator!=`(5bc2975d2d751687). QStringcxx . . $ QString#QString(ced63f7c635d850d).()) |
| 134 | msg =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). loser_namecxx . . $ GameResult#loser_name. +cxx . . $ operator+(fab9b4f80031f353). tr_macrocxx . . $ `src/network/messages.h:42:9`!("(B) forfeits"); |
| 135 | else |
| 136 | msg =cxx . . $ QString#`operator=`(4f35bf974e7f8568). tr_macrocxx . . $ `src/network/messages.h:42:9`!("Black forfeits"); |
| 137 | } |
| 138 | else |
| 139 | { |
| 140 | if(loser_namecxx . . $ GameResult#loser_name. !=cxx . . $ `operator!=`(5bc2975d2d751687). QStringcxx . . $ QString#QString(ced63f7c635d850d).()) |
| 141 | msg =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). loser_namecxx . . $ GameResult#loser_name. +cxx . . $ operator+(fab9b4f80031f353). tr_macrocxx . . $ `src/network/messages.h:42:9`!("(W) forfeits"); |
| 142 | else |
| 143 | msg =cxx . . $ QString#`operator=`(4f35bf974e7f8568). tr_macrocxx . . $ `src/network/messages.h:42:9`!("White forfeits"); |
| 144 | } |
| 145 | break; |
| 146 | case TIMEcxx . . $ GameResult#TIME.: |
| 147 | if(winner_colorcxx . . $ GameResult#winner_color. == stoneWhitecxx . . $ stoneWhite.) |
| 148 | { |
| 149 | if(loser_namecxx . . $ GameResult#loser_name. !=cxx . . $ `operator!=`(5bc2975d2d751687). QStringcxx . . $ QString#QString(ced63f7c635d850d).()) |
| 150 | msg =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). loser_namecxx . . $ GameResult#loser_name. +cxx . . $ operator+(fab9b4f80031f353). tr_macrocxx . . $ `src/network/messages.h:42:9`!("(B) has lost on time"); |
| 151 | else |
| 152 | msg =cxx . . $ QString#`operator=`(4f35bf974e7f8568). tr_macrocxx . . $ `src/network/messages.h:42:9`!("Black has lost on time"); |
| 153 | } |
| 154 | else |
| 155 | { |
| 156 | if(loser_namecxx . . $ GameResult#loser_name. !=cxx . . $ `operator!=`(5bc2975d2d751687). QStringcxx . . $ QString#QString(ced63f7c635d850d).()) |
| 157 | msg =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). loser_namecxx . . $ GameResult#loser_name. +cxx . . $ operator+(fab9b4f80031f353). tr_macrocxx . . $ `src/network/messages.h:42:9`!("(W) has lost on time"); |
| 158 | else |
| 159 | msg =cxx . . $ QString#`operator=`(4f35bf974e7f8568). tr_macrocxx . . $ `src/network/messages.h:42:9`!("White has lost on time"); |
| 160 | } |
| 161 | break; |
| 162 | case RESIGNcxx . . $ GameResult#RESIGN.: |
| 163 | if(winner_colorcxx . . $ GameResult#winner_color. == stoneWhitecxx . . $ stoneWhite.) |
| 164 | { |
| 165 | if(loser_namecxx . . $ GameResult#loser_name. !=cxx . . $ `operator!=`(5bc2975d2d751687). QStringcxx . . $ QString#QString(ced63f7c635d850d).()) |
| 166 | msg =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). loser_namecxx . . $ GameResult#loser_name. +cxx . . $ operator+(fab9b4f80031f353). tr_macrocxx . . $ `src/network/messages.h:42:9`!("(B) resigns"); |
| 167 | else |
| 168 | msg =cxx . . $ QString#`operator=`(4f35bf974e7f8568). tr_macrocxx . . $ `src/network/messages.h:42:9`!("Black resigns"); |
| 169 | } |
| 170 | else |
| 171 | { |
| 172 | if(loser_namecxx . . $ GameResult#loser_name. !=cxx . . $ `operator!=`(5bc2975d2d751687). QStringcxx . . $ QString#QString(ced63f7c635d850d).()) |
| 173 | msg =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). loser_namecxx . . $ GameResult#loser_name. +cxx . . $ operator+(fab9b4f80031f353). tr_macrocxx . . $ `src/network/messages.h:42:9`!("(W) resigns"); |
| 174 | else |
| 175 | msg =cxx . . $ QString#`operator=`(4f35bf974e7f8568). tr_macrocxx . . $ `src/network/messages.h:42:9`!("White resigns"); |
| 176 | } |
| 177 | break; |
| 178 | /* FIXME score translation is likely inappropriate given |
| 179 | * number and different translation grammars */ |
| 180 | case SCOREcxx . . $ GameResult#SCORE.: |
| 181 | if(winner_colorcxx . . $ GameResult#winner_color. == stoneWhitecxx . . $ stoneWhite.) |
| 182 | { |
| 183 | if(winner_namecxx . . $ GameResult#winner_name. !=cxx . . $ `operator!=`(5bc2975d2d751687). QStringcxx . . $ QString#QString(ced63f7c635d850d).()) |
| 184 | msg =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). winner_namecxx . . $ GameResult#winner_name. +cxx . . $ operator+(fab9b4f80031f353). tr_macrocxx . . $ `src/network/messages.h:42:9`!("(W)"); |
| 185 | else |
| 186 | msg =cxx . . $ QString#`operator=`(4f35bf974e7f8568). tr_macrocxx . . $ `src/network/messages.h:42:9`!("White"); |
| 187 | if(margin) |
| 188 | msg +=cxx . . $ QString#`operator+=`(6a89d0b7f4d2681c). tr_macrocxx . . $ `src/network/messages.h:42:9`!(" wins by ") +cxx . . $ operator+(fab9b4f80031f353). \ |
| 189 | QStringcxx . . $ QString#::numbercxx . . $ QString#number(ac5d358e2e30f7ea).(margin); |
| 190 | else |
| 191 | msg +=cxx . . $ QString#`operator+=`(6a89d0b7f4d2681c). tr_macrocxx . . $ `src/network/messages.h:42:9`!(" wins"); |
| 192 | } |
| 193 | else |
| 194 | { |
| 195 | if(winner_namecxx . . $ GameResult#winner_name. !=cxx . . $ `operator!=`(5bc2975d2d751687). QStringcxx . . $ QString#QString(ced63f7c635d850d).()) |
| 196 | msg =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). winner_namecxx . . $ GameResult#winner_name. +cxx . . $ operator+(fab9b4f80031f353). tr_macrocxx . . $ `src/network/messages.h:42:9`!("(B)"); |
| 197 | else |
| 198 | msg =cxx . . $ QString#`operator=`(4f35bf974e7f8568). tr_macrocxx . . $ `src/network/messages.h:42:9`!("Black"); |
| 199 | if(margin) |
| 200 | msg =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). tr_macrocxx . . $ `src/network/messages.h:42:9`!("Black wins by ") +cxx . . $ operator+(fab9b4f80031f353). \ |
| 201 | QStringcxx . . $ QString#::numbercxx . . $ QString#number(ac5d358e2e30f7ea).(margin); |
| 202 | else |
| 203 | msg +=cxx . . $ QString#`operator+=`(6a89d0b7f4d2681c). tr_macrocxx . . $ `src/network/messages.h:42:9`!(" wins"); |
| 204 | } |
| 205 | break; |
| 206 | case DRAWcxx . . $ GameResult#DRAW.: |
| 207 | msg =cxx . . $ QString#`operator=`(4f35bf974e7f8568). tr_macrocxx . . $ `src/network/messages.h:42:9`!("Draw"); //FIXME |
| 208 | break; |
| 209 | default: |
| 210 | break; |
| 211 | } |
| 212 | return msgcxx . . $ QString#QString(28715ad661ad3cec).; |
| 213 | } |
| 214 | }; |
| 215 | |
| 216 | /* Maybe we need consistent names for these messages!!! FIXME*/ |
| 217 | class MatchRequestcxx . . $ MatchRequest# |
| 218 | { |
| 219 | public: |
| 220 | QStringcxx . . $ QString# opponentcxx . . $ MatchRequest#opponent.; |
| 221 | QStringcxx . . $ QString# our_namecxx . . $ MatchRequest#our_name.; //for convenience (multiple accounts?) |
| 222 | QStringcxx . . $ QString# our_rankcxx . . $ MatchRequest#our_rank.; |
| 223 | QStringcxx . . $ QString# their_rankcxx . . $ MatchRequest#their_rank.; |
| 224 | enum COLORREQUESTcxx . . $ MatchRequest#COLORREQUEST# { WHITEcxx . . $ MatchRequest#WHITE. = 0, BLACKcxx . . $ MatchRequest#BLACK., NIGIRIcxx . . $ MatchRequest#NIGIRI. } color_requestcxx . . $ MatchRequest#color_request.; |
| 225 | //enum TIMERULES { CANADIAN = 0, BYOYOMI } time_rules; |
| 226 | TimeSystemcxx . . $ TimeSystem# timeSystemcxx . . $ MatchRequest#timeSystem.; |
| 227 | unsigned int handicapcxx . . $ MatchRequest#handicap.; |
| 228 | unsigned int board_sizecxx . . $ MatchRequest#board_size.; |
| 229 | float komicxx . . $ MatchRequest#komi.; //what about that french "," FIXME?? |
| 230 | /* I long for some standard time class but I don't know |
| 231 | * enough about go time rules to write one yet ... (and maybe its not necessary) */ |
| 232 | // IGS requires maintime to, I think, be a multiple of 60 FIXME |
| 233 | /* FIXME, shouldn't we move this to stones_periods unified as well ? */ |
| 234 | int maintimecxx . . $ MatchRequest#maintime.; |
| 235 | int periodtimecxx . . $ MatchRequest#periodtime.; |
| 236 | int stones_periodscxx . . $ MatchRequest#stones_periods.; |
| 237 | bool nmatchcxx . . $ MatchRequest#nmatch.; //want to get rid of this!!! but can't... |
| 238 | int nmatch_timeMaxcxx . . $ MatchRequest#nmatch_timeMax.; |
| 239 | int nmatch_BYMaxcxx . . $ MatchRequest#nmatch_BYMax.; |
| 240 | int nmatch_handicapMaxcxx . . $ MatchRequest#nmatch_handicapMax.; |
| 241 | /* There's basically a bunch of stuff that the match request needs |
| 242 | * to carry even though there's currently no way to change it. This |
| 243 | * is because it needs to be the same on the accept/mods */ |
| 244 | unsigned char flagscxx . . $ MatchRequest#flags.; |
| 245 | assessTypecxx . . $ assessType# free_ratedcxx . . $ MatchRequest#free_rated.; |
| 246 | unsigned short numbercxx . . $ MatchRequest#number.; |
| 247 | unsigned short opponent_idcxx . . $ MatchRequest#opponent_id.; |
| 248 | bool opponent_is_challengercxx . . $ MatchRequest#opponent_is_challenger.; //i.e., he initiated the exchange |
| 249 | bool challenger_is_blackcxx . . $ MatchRequest#challenger_is_black.; |
| 250 | unsigned short last_game_codecxx . . $ MatchRequest#last_game_code.; |
| 251 | bool undoAllowedcxx . . $ MatchRequest#undoAllowed.; |
| 252 | bool rematchcxx . . $ MatchRequest#rematch.; |
| 253 | bool first_offercxx . . $ MatchRequest#first_offer.; |
| 254 | MatchRequestcxx . . $ MatchRequest#MatchRequest(49f6e7a06ebc5aa8).() : opponentcxx . . $ MatchRequest#opponent.(""), |
| 255 | color_requestcxx . . $ MatchRequest#color_request.(WHITEcxx . . $ MatchRequest#WHITE.), |
| 256 | timeSystemcxx . . $ MatchRequest#timeSystem.(byoyomicxx . . $ byoyomi.), |
| 257 | handicapcxx . . $ MatchRequest#handicap.(0), |
| 258 | board_sizecxx . . $ MatchRequest#board_size.(19), |
| 259 | komicxx . . $ MatchRequest#komi.(6.5), |
| 260 | maintimecxx . . $ MatchRequest#maintime.(0), |
| 261 | periodtimecxx . . $ MatchRequest#periodtime.(0), |
| 262 | stones_periodscxx . . $ MatchRequest#stones_periods.(0), |
| 263 | nmatchcxx . . $ MatchRequest#nmatch.(0), |
| 264 | nmatch_timeMaxcxx . . $ MatchRequest#nmatch_timeMax.(0), |
| 265 | nmatch_BYMaxcxx . . $ MatchRequest#nmatch_BYMax.(0), |
| 266 | nmatch_handicapMaxcxx . . $ MatchRequest#nmatch_handicapMax.(0), |
| 267 | free_ratedcxx . . $ MatchRequest#free_rated.(noREQcxx . . $ noREQ.), |
| 268 | numbercxx . . $ MatchRequest#number.(0), opponent_idcxx . . $ MatchRequest#opponent_id.(0), |
| 269 | last_game_codecxx . . $ MatchRequest#last_game_code.(0), undoAllowedcxx . . $ MatchRequest#undoAllowed.(false), rematchcxx . . $ MatchRequest#rematch.(false), first_offercxx . . $ MatchRequest#first_offer.(false) {}; |
| 270 | }; |
| 271 | |
| 272 | /* Confusing name since we use games as rooms with ORO, maybe not an issue */ |
| 273 | class RoomListingcxx . . $ RoomListing# |
| 274 | { |
| 275 | public: |
| 276 | int numbercxx . . $ RoomListing#number.; |
| 277 | QStringcxx . . $ QString# namecxx . . $ RoomListing#name.; |
| 278 | bool lockedcxx . . $ RoomListing#locked.; |
| 279 | RoomListingcxx . . $ RoomListing#RoomListing(49f6e7a06ebc5aa8).() : numbercxx . . $ RoomListing#number.(0), namecxx . . $ QString#QString(85c52e162fed56f9).(""), lockedcxx . . $ RoomListing#locked.(false) {}; |
| 280 | RoomListingcxx . . $ RoomListing#RoomListing(d4f767463ce0a6b3).(int n) : numbercxx . . $ RoomListing#number.(n), namecxx . . $ QString#QString(85c52e162fed56f9).("") {}; |
| 281 | RoomListingcxx . . $ RoomListing#RoomListing(7df51288a9ebd664).(QStringcxx . . $ QString# n) : numbercxx . . $ RoomListing#number.(0), namecxx . . $ RoomListing#name.(n) {}; |
| 282 | RoomListingcxx . . $ RoomListing#RoomListing(909c33aa10af95dd).(int n, QStringcxx . . $ QString# t) : numbercxx . . $ RoomListing#number.(n), namecxx . . $ QString#QString(132dd6869045752b).(t) {}; |
| 283 | }; |
| 284 | |
| 285 | class ChannelListingcxx . . $ ChannelListing# |
| 286 | { |
| 287 | public: |
| 288 | int numbercxx . . $ ChannelListing#number.; |
| 289 | QStringcxx . . $ QString# namecxx . . $ ChannelListing#name.; |
| 290 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<PlayerListingcxx . . $ PlayerListing# *> memberscxx . . $ ChannelListing#members.; |
| 291 | ChannelListingcxx . . $ ChannelListing#ChannelListing(49f6e7a06ebc5aa8).() : numbercxx . . $ ChannelListing#number.(0), namecxx . . $ ChannelListing#name.(""){}; |
| 292 | ChannelListingcxx . . $ ChannelListing#ChannelListing(d4f767463ce0a6b3).(int n) : numbercxx . . $ ChannelListing#number.(n), namecxx . . $ ChannelListing#name.("") {}; |
| 293 | ChannelListingcxx . . $ ChannelListing#ChannelListing(7df51288a9ebd664).(QStringcxx . . $ QString# n) : numbercxx . . $ ChannelListing#number.(0), namecxx . . $ ChannelListing#name.(n) {}; |
| 294 | ChannelListingcxx . . $ ChannelListing#ChannelListing(909c33aa10af95dd).(int n, QStringcxx . . $ QString# t) : numbercxx . . $ ChannelListing#number.(n), namecxx . . $ QString#QString(132dd6869045752b).(t) {}; |
| 295 | }; |
| 296 | |
| 297 | class SeekConditioncxx . . $ SeekCondition# |
| 298 | { |
| 299 | public: |
| 300 | int numbercxx . . $ SeekCondition#number.; |
| 301 | int maintimecxx . . $ SeekCondition#maintime.; |
| 302 | int periodtimecxx . . $ SeekCondition#periodtime.; |
| 303 | int periodscxx . . $ SeekCondition#periods.; |
| 304 | QStringcxx . . $ QString# blinecxx . . $ SeekCondition#bline.; |
| 305 | QStringcxx . . $ QString# strength_wishedcxx . . $ SeekCondition#strength_wished.; |
| 306 | }; |
| 307 | |
| 308 | #endif //MESSAGES_H |