Debian Codegraph @

src/network/playergamelistings.h

raw symbols SCIP
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 PLAYERGAMELISTING_H
24 #define PLAYERGAMELISTING_Hcxx . . $ `src/network/playergamelistings.h:24:9`!
25
26 #include <QString>
27
28 class GameDatacxx . . $ GameData#;
29
30 /* Private constructors and destructors ensure that only the
31 * friend class Room
32 * can create or destroy instances of these classes */
33
34 class PlayerListingcxx . . $ PlayerListing#
35 {
36 private:
37 PlayerListingcxx . . $ PlayerListing#PlayerListing(49f6e7a06ebc5aa8).() : idcxx . . $ PlayerListing#id.(0),
38 onlinecxx . . $ PlayerListing#online.(false),
39 namecxx . . $ PlayerListing#name.(""),
40 notnicknamecxx . . $ PlayerListing#notnickname.(""),
41 infocxx . . $ PlayerListing#info.(""),
42 idletimecxx . . $ PlayerListing#idletime.(""),
43 seconds_idlecxx . . $ PlayerListing#seconds_idle.(0),
44 rankcxx . . $ PlayerListing#rank.(""),
45 rank_scorecxx . . $ PlayerListing#rank_score.(0),
46 countrycxx . . $ PlayerListing#country.(""),
47 winscxx . . $ PlayerListing#wins.(0),
48 lossescxx . . $ PlayerListing#losses.(0),
49 rated_gamescxx . . $ PlayerListing#rated_games.(0),
50 observingcxx . . $ PlayerListing#observing.(0),
51 playingcxx . . $ PlayerListing#playing.(0),
52 extInfocxx . . $ PlayerListing#extInfo.(""),
53 email_addresscxx . . $ PlayerListing#email_address.(""),
54 nmatchcxx . . $ PlayerListing#nmatch.(0),
55 nmatch_handicapMincxx . . $ PlayerListing#nmatch_handicapMin.(0),
56 specialbytecxx . . $ PlayerListing#specialbyte.(0),
57 procxx . . $ PlayerListing#pro.(false),
58 dialog_openedcxx . . $ PlayerListing#dialog_opened.(false),
59 game_dialog_openedcxx . . $ PlayerListing#game_dialog_opened.(false),
60 friendWatchTypecxx . . $ PlayerListing#friendWatchType.(nonecxx . . $ PlayerListing#none.),
61 notifycxx . . $ PlayerListing#notify.(false),
62 hiddencxx . . $ PlayerListing#hidden.(false) {}
63 ~cxx . . $ PlayerListing#`~PlayerListing`(ced63f7c635d850d).PlayerListingcxx . . $ PlayerListing#() {}
64 friend class Roomcxx . . $ Room#;
65 public:
66 unsigned short idcxx . . $ PlayerListing#id.;
67 bool onlinecxx . . $ PlayerListing#online.;
68 QStringcxx . . $ QString# namecxx . . $ PlayerListing#name.;
69 QStringcxx . . $ QString# notnicknamecxx . . $ PlayerListing#notnickname.;
70 QStringcxx . . $ QString# infocxx . . $ PlayerListing#info.;
71 QStringcxx . . $ QString# idletimecxx . . $ PlayerListing#idletime.;
72 unsigned int seconds_idlecxx . . $ PlayerListing#seconds_idle.; //for sorting
73 //maybe should be in int form, but we just display, no calculations
74 QStringcxx . . $ QString# rankcxx . . $ PlayerListing#rank.;
75 unsigned int rank_scorecxx . . $ PlayerListing#rank_score.; //for sorting, rating points
76 QStringcxx . . $ QString# countrycxx . . $ PlayerListing#country.;
77 unsigned char country_idcxx . . $ PlayerListing#country_id.;
78 unsigned int winscxx . . $ PlayerListing#wins.;
79 unsigned int lossescxx . . $ PlayerListing#losses.;
80 unsigned int rated_gamescxx . . $ PlayerListing#rated_games.;
81 unsigned int observingcxx . . $ PlayerListing#observing.; //used by IGS and ORO, so not ready to get rid of it
82 stdcxx . . $ std/::vectorcxx . . $ std/vector# <unsigned short> room_listcxx . . $ PlayerListing#room_list.; //used by Tygem et al.
83 unsigned int playingcxx . . $ PlayerListing#playing.;
84 QStringcxx . . $ QString# extInfocxx . . $ PlayerListing#extInfo.;
85 QStringcxx . . $ QString# email_addresscxx . . $ PlayerListing#email_address.;
86
87 /* I should really use MatchRequest structure somehow for this: FIXME */
88 bool nmatchcxx . . $ PlayerListing#nmatch.;
89 TimeSystemcxx . . $ TimeSystem# nmatch_timeSystemcxx . . $ PlayerListing#nmatch_timeSystem.;
90 bool nmatch_whitecxx . . $ PlayerListing#nmatch_white., nmatch_blackcxx . . $ PlayerListing#nmatch_black., nmatch_nigiricxx . . $ PlayerListing#nmatch_nigiri.;
91 int nmatch_timeMincxx . . $ PlayerListing#nmatch_timeMin., nmatch_timeMaxcxx . . $ PlayerListing#nmatch_timeMax.;
92 int nmatch_BYMincxx . . $ PlayerListing#nmatch_BYMin., nmatch_BYMaxcxx . . $ PlayerListing#nmatch_BYMax.;
93 int nmatch_stonesMincxx . . $ PlayerListing#nmatch_stonesMin., nmatch_stonesMaxcxx . . $ PlayerListing#nmatch_stonesMax.;
94 QStringcxx . . $ QString# nmatch_settingscxx . . $ PlayerListing#nmatch_settings.;
95 int nmatch_handicapMincxx . . $ PlayerListing#nmatch_handicapMin., nmatch_handicapMaxcxx . . $ PlayerListing#nmatch_handicapMax.;
96 unsigned char specialbytecxx . . $ PlayerListing#specialbyte.; //ORO weirdness personalchat
97 bool procxx . . $ PlayerListing#pro.;
98 bool dialog_openedcxx . . $ PlayerListing#dialog_opened.;
99 bool game_dialog_openedcxx . . $ PlayerListing#game_dialog_opened.;
100 enum FriendWatchTypecxx . . $ PlayerListing#FriendWatchType# { nonecxx . . $ PlayerListing#none., friendedcxx . . $ PlayerListing#friended., watchedcxx . . $ PlayerListing#watched., blockedcxx . . $ PlayerListing#blocked. } friendWatchTypecxx . . $ PlayerListing#friendWatchType.;
101 bool notifycxx . . $ PlayerListing#notify.;
102 bool hiddencxx . . $ PlayerListing#hidden.;
103 };
104
105 /* We need to alter copy constructor to have and respect a bit field.
106 * this is heavy, but I think its necessary... unless we get the
107 * existing listing before change and update.*/
108 class GameListingcxx . . $ GameListing#
109 {
110 private:
111 GameListingcxx . . $ GameListing#GameListing(49f6e7a06ebc5aa8).() : runningcxx . . $ GameListing#running.(false),
112 movescxx . . $ GameListing#moves.(0),
113 board_sizecxx . . $ GameListing#board_size.(19),
114 handicapcxx . . $ GameListing#handicap.(0),
115 komicxx . . $ GameListing#komi.(6.5),
116 whitecxx . . $ GameListing#white.(0),
117 blackcxx . . $ GameListing#black.(0),
118 _white_namecxx . . $ GameListing#_white_name.("-"),
119 _black_namecxx . . $ GameListing#_black_name.("-"),
120 _white_rankcxx . . $ GameListing#_white_rank.("-"),
121 _black_rankcxx . . $ GameListing#_black_rank.("-"),
122 _white_rank_scorecxx . . $ GameListing#_white_rank_score.(0),
123 _black_rank_scorecxx . . $ GameListing#_black_rank_score.(0),
124 observerscxx . . $ GameListing#observers.(0),
125 resultcxx . . $ GameListing#result.(""),
126 Bycxx . . $ GameListing#By.(""), FRcxx . . $ GameListing#FR.(""), commentcxx . . $ GameListing#comment.(""),
127 flagscxx . . $ GameListing#flags.(IN_PROGRESScxx . . $ GameListing#IN_PROGRESS.),
128 ratedcxx . . $ GameListing#rated.(0),
129 owner_idcxx . . $ GameListing#owner_id.(0),
130 isRoomOnlycxx . . $ GameListing#isRoomOnly.(false),
131 isBroadcastcxx . . $ GameListing#isBroadcast.(false),
132 isBettingcxx . . $ GameListing#isBetting.(false),
133 isLockedcxx . . $ GameListing#isLocked.(false),
134 gameDatacxx . . $ GameListing#gameData.(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) {}
135 ~cxx . . $ GameListing#`~GameListing`(ced63f7c635d850d).GameListingcxx . . $ GameListing#() {}
136 friend class Roomcxx . . $ Room#;
137 public:
138 bool runningcxx . . $ GameListing#running.;
139 unsigned int numbercxx . . $ GameListing#number.;
140 unsigned short game_codecxx . . $ GameListing#game_code.; //ORO join games code FIXME
141 unsigned int movescxx . . $ GameListing#moves.;
142 unsigned int board_sizecxx . . $ GameListing#board_size.;
143 unsigned int handicapcxx . . $ GameListing#handicap.;
144 float komicxx . . $ GameListing#komi.;
145 PlayerListingcxx . . $ PlayerListing# * whitecxx . . $ GameListing#white.;
146 PlayerListingcxx . . $ PlayerListing# * blackcxx . . $ GameListing#black.;
147 QStringcxx . . $ QString# _white_namecxx . . $ GameListing#_white_name.;
148 QStringcxx . . $ QString# _black_namecxx . . $ GameListing#_black_name.;
149 QStringcxx . . $ QString# _white_rankcxx . . $ GameListing#_white_rank.;
150 QStringcxx . . $ QString# _black_rankcxx . . $ GameListing#_black_rank.;
151 unsigned int _white_rank_scorecxx . . $ GameListing#_white_rank_score.;
152 unsigned int _black_rank_scorecxx . . $ GameListing#_black_rank_score.;
153 const QStringcxx . . $ QString# & white_namecxx . . $ GameListing#white_name(a2fb7a6ce195d51).(void) const
154 {
155 if(whitecxx . . $ GameListing#white.)
156 return whitecxx . . $ GameListing#white.->namecxx . . $ PlayerListing#name.;
157 else
158 return _white_namecxx . . $ GameListing#_white_name.;
159 }
160 const QStringcxx . . $ QString# & white_rankcxx . . $ GameListing#white_rank(a2fb7a6ce195d51).(void) const
161 {
162 if(whitecxx . . $ GameListing#white.)
163 return whitecxx . . $ GameListing#white.->rankcxx . . $ PlayerListing#rank.;
164 else
165 return _white_rankcxx . . $ GameListing#_white_rank.;
166 }
167 unsigned int white_rank_scorecxx . . $ GameListing#white_rank_score(ddd8539a2fcdd4ce).(void) const //for sorting
168 {
169 if(whitecxx . . $ GameListing#white.)
170 return whitecxx . . $ GameListing#white.->rank_scorecxx . . $ PlayerListing#rank_score.;
171 else
172 return _white_rank_scorecxx . . $ GameListing#_white_rank_score.;
173 }
174 const QStringcxx . . $ QString# & black_namecxx . . $ GameListing#black_name(a2fb7a6ce195d51).(void) const
175 {
176 if(blackcxx . . $ GameListing#black.)
177 return blackcxx . . $ GameListing#black.->namecxx . . $ PlayerListing#name.;
178 else
179 return _black_namecxx . . $ GameListing#_black_name.;
180 }
181 const QStringcxx . . $ QString# & black_rankcxx . . $ GameListing#black_rank(a2fb7a6ce195d51).(void) const
182 {
183 if(blackcxx . . $ GameListing#black.)
184 return blackcxx . . $ GameListing#black.->rankcxx . . $ PlayerListing#rank.;
185 else
186 return _black_rankcxx . . $ GameListing#_black_rank.;
187 }
188 unsigned int black_rank_scorecxx . . $ GameListing#black_rank_score(ddd8539a2fcdd4ce).(void) const //for sorting
189 {
190 if(blackcxx . . $ GameListing#black.)
191 return blackcxx . . $ GameListing#black.->rank_scorecxx . . $ PlayerListing#rank_score.;
192 else
193 return _black_rank_scorecxx . . $ GameListing#_black_rank_score.;
194 }
195
196 unsigned int observerscxx . . $ GameListing#observers.;
197 QStringcxx . . $ QString# resultcxx . . $ GameListing#result.;
198 GameModecxx . . $ GameMode# gameTypecxx . . $ GameListing#gameType.; //this needs to be consistent
199 QStringcxx . . $ QString# Bycxx . . $ GameListing#By.; //these two need to be changed somehow
200 QStringcxx . . $ QString# FRcxx . . $ GameListing#FR.;
201 QStringcxx . . $ QString# commentcxx . . $ GameListing#comment.;
202 /* Other possibilities for flags:
203 * NO_FLAG, BROADCAST, CHAT_ROOM */
204 enum Flagscxx . . $ GameListing#Flags# { BLACK_WONcxx . . $ GameListing#BLACK_WON., WHITE_WONcxx . . $ GameListing#WHITE_WON., IN_PROGRESScxx . . $ GameListing#IN_PROGRESS., REVIEWcxx . . $ GameListing#REVIEW., LOOKINGcxx . . $ GameListing#LOOKING. } flagscxx . . $ GameListing#flags.;
205 bool ratedcxx . . $ GameListing#rated.;
206 unsigned short owner_idcxx . . $ GameListing#owner_id.; //this is if we're treating them as rooms
207 bool isRoomOnlycxx . . $ GameListing#isRoomOnly.;
208 bool isBroadcastcxx . . $ GameListing#isBroadcast.;
209 bool isBettingcxx . . $ GameListing#isBetting.;
210 bool isLockedcxx . . $ GameListing#isLocked.;
211 bool white_first_flagcxx . . $ GameListing#white_first_flag.;
212 stdcxx . . $ std/::vectorcxx . . $ std/vector# <PlayerListingcxx . . $ PlayerListing# *> observer_listcxx . . $ GameListing#observer_list.;
213 GameDatacxx . . $ GameData# * gameDatacxx . . $ GameListing#gameData.;
214 /* Also need byomi time, one color go, running, private, flags, ranked, etc.*/
215 };
216 #endif //PLAYERGAMELISTINGS_H