| 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 IGSCONNECTION_H |
| 24 | #define IGSCONNECTION_Hcxx . . $ `src/network/igsconnection.h:24:9`! |
| 25 | #include <QtNetwork> |
| 26 | #include "networkconnection.h"cxx . . $ `<file>/src/network/networkconnection.h`/ |
| 27 | #include "messages.h"cxx . . $ `<file>/src/network/messages.h`/ |
| 28 | #include "gamedata.h"cxx . . $ `<file>/src/gamedata.h`/ |
| 29 | |
| 30 | class BoardDispatchcxx . . $ BoardDispatch#; |
| 31 | class GameDialogcxx . . $ GameDialog#; |
| 32 | class Talkcxx . . $ Talk#; |
| 33 | |
| 34 | class IGSConnectioncxx . . $ IGSConnection# : public NetworkConnectioncxx . . $ NetworkConnection# |
| 35 | { |
| 36 | public: |
| 37 | IGSConnectioncxx . . $ IGSConnection#IGSConnection(231cf4fc7da7cd6f).(const ConnectionCredentialscxx . . $ ConnectionCredentials# credentials); |
| 38 | ~cxx . . $ IGSConnection#`~IGSConnection`(ced63f7c635d850d).IGSConnectioncxx . . $ IGSConnection#(); |
| 39 | virtual QStringcxx . . $ QString# getPlaceStringcxx . . $ IGSConnection#getPlaceString(4365c3963150523e).(); |
| 40 | virtual void sendTextcxx . . $ IGSConnection#sendText(7df51288a9ebd664).(QStringcxx . . $ QString# text); |
| 41 | virtual void sendTextcxx . . $ IGSConnection#sendText(85c52e162fed56f9).(const char * text); |
| 42 | virtual void sendDisconnectcxx . . $ IGSConnection#sendDisconnect(49f6e7a06ebc5aa8).(void); |
| 43 | virtual void sendMsgcxx . . $ IGSConnection#sendMsg(679a3afc1f0f3212).(unsigned int game_id, QStringcxx . . $ QString# text); |
| 44 | virtual void sendMsgcxx . . $ IGSConnection#sendMsg(c3abbc2f7b873519).(PlayerListingcxx . . $ PlayerListing# * player, QStringcxx . . $ QString# text); |
| 45 | virtual void sendTogglecxx . . $ IGSConnection#sendToggle(37c160c81b6367f7).(const QStringcxx . . $ QString# & param, bool val); |
| 46 | virtual void sendObservecxx . . $ IGSConnection#sendObserve(963dc8955d49573e).(const GameListingcxx . . $ GameListing# * game); |
| 47 | virtual void stopObservingcxx . . $ IGSConnection#stopObserving(963dc8955d49573e).(const GameListingcxx . . $ GameListing# * game); |
| 48 | virtual void stopReviewingcxx . . $ IGSConnection#stopReviewing(963dc8955d49573e).(const GameListingcxx . . $ GameListing# * game); |
| 49 | virtual void sendStatsRequestcxx . . $ IGSConnection#sendStatsRequest(cac334474c82cf3a).(const PlayerListingcxx . . $ PlayerListing# * opponent); |
| 50 | virtual void sendPlayersRequestcxx . . $ IGSConnection#sendPlayersRequest(49f6e7a06ebc5aa8).(void); |
| 51 | virtual void sendGamesRequestcxx . . $ IGSConnection#sendGamesRequest(49f6e7a06ebc5aa8).(void); |
| 52 | void sendRoomListRequestcxx . . $ IGSConnection#sendRoomListRequest(49f6e7a06ebc5aa8).(void); |
| 53 | virtual void sendMatchInvitecxx . . $ IGSConnection#sendMatchInvite(cac334474c82cf3a).(const PlayerListingcxx . . $ PlayerListing# * player); |
| 54 | virtual void sendAddTimecxx . . $ IGSConnection#sendAddTime(d4f767463ce0a6b3).(int); |
| 55 | virtual void adjournGamecxx . . $ IGSConnection#adjournGame(963dc8955d49573e).(const GameListingcxx . . $ GameListing# * game); |
| 56 | virtual void sendMovecxx . . $ IGSConnection#sendMove(74f2a753311a2adf).(unsigned int game_id, class MoveRecordcxx . . $ MoveRecord# * move); |
| 57 | virtual void sendMatchRequestcxx . . $ IGSConnection#sendMatchRequest(969a5d62d7a1bd6e).(class MatchRequestcxx . . $ MatchRequest# * mr); |
| 58 | virtual void declineMatchOffercxx . . $ IGSConnection#declineMatchOffer(cac334474c82cf3a).(const PlayerListingcxx . . $ PlayerListing# * opponent); |
| 59 | virtual void acceptMatchOffercxx . . $ IGSConnection#acceptMatchOffer(27875a747def42ce).(const PlayerListingcxx . . $ PlayerListing# * opponent, class MatchRequestcxx . . $ MatchRequest# * mr); |
| 60 | virtual QTimecxx . . $ QTime# gd_checkMainTimecxx . . $ IGSConnection#gd_checkMainTime(71240b9f3410da6b).(TimeSystemcxx . . $ TimeSystem# s, const QTimecxx . . $ QTime# & t); |
| 61 | virtual QTimecxx . . $ QTime# gd_checkPeriodTimecxx . . $ IGSConnection#gd_checkPeriodTime(71240b9f3410da6b).(TimeSystemcxx . . $ TimeSystem# s, const QTimecxx . . $ QTime# & t); |
| 62 | virtual unsigned int gd_checkPeriodscxx . . $ IGSConnection#gd_checkPeriods(c827b1ce4ef0d032).(TimeSystemcxx . . $ TimeSystem# s, unsigned int p); |
| 63 | virtual void sendAdjournRequestcxx . . $ IGSConnection#sendAdjournRequest(49f6e7a06ebc5aa8).(void); |
| 64 | virtual void sendAdjourncxx . . $ IGSConnection#sendAdjourn(49f6e7a06ebc5aa8).(void); |
| 65 | virtual void sendRefuseAdjourncxx . . $ IGSConnection#sendRefuseAdjourn(49f6e7a06ebc5aa8).(void); |
| 66 | virtual void handlePendingDatacxx . . $ IGSConnection#handlePendingData(49f6e7a06ebc5aa8).(); |
| 67 | virtual void onReadycxx . . $ IGSConnection#onReady(49f6e7a06ebc5aa8).(void); |
| 68 | |
| 69 | virtual void sendJoinRoomcxx . . $ IGSConnection#sendJoinRoom(27567cc4e87be946).(const RoomListingcxx . . $ RoomListing# & room, const char * password = 0); |
| 70 | virtual void sendJoinChannelcxx . . $ IGSConnection#sendJoinChannel(17c16455472eee56).(const ChannelListingcxx . . $ ChannelListing# & channel); |
| 71 | virtual void sendSeekcxx . . $ IGSConnection#sendSeek(c6d377b4419439f6).(class SeekConditioncxx . . $ SeekCondition# *); |
| 72 | virtual void sendSeekCancelcxx . . $ IGSConnection#sendSeekCancel(49f6e7a06ebc5aa8).(void); |
| 73 | |
| 74 | BoardDispatchcxx . . $ BoardDispatch# * getBoardFromAttribcxx . . $ IGSConnection#getBoardFromAttrib(ffaef1ed9058626d).(QStringcxx . . $ QString# black_player, unsigned int black_captures, float black_komi, QStringcxx . . $ QString# white_player, unsigned int white_captures, float white_komi); |
| 75 | BoardDispatchcxx . . $ BoardDispatch# * getBoardFromOurOpponentcxx . . $ IGSConnection#getBoardFromOurOpponent(e34a72c20d4e159d).(QStringcxx . . $ QString# opponent); |
| 76 | |
| 77 | virtual void requestGameInfocxx . . $ IGSConnection#requestGameInfo(cb2f890c2fdad230).(unsigned int game_id); |
| 78 | virtual void requestGameStatscxx . . $ IGSConnection#requestGameStats(cb2f890c2fdad230).(unsigned int game_id); |
| 79 | |
| 80 | virtual unsigned int rankToScorecxx . . $ IGSConnection#rankToScore(9d92bb507a34628c).(QStringcxx . . $ QString# rank); |
| 81 | /* I thought we didn't start time until after first move |
| 82 | * but I check today and we do, so I'll change it... doublecheck */ |
| 83 | virtual bool startTimerOnOpencxx . . $ IGSConnection#startTimerOnOpen(c9857a73d68e59ba).(void) { return true; } |
| 84 | virtual bool flipCoordscxx . . $ IGSConnection#flipCoords(c9857a73d68e59ba).(void) { return false; } |
| 85 | virtual bool supportsRequestAdjourncxx . . $ IGSConnection#supportsRequestAdjourn(c9857a73d68e59ba).(void) { return true; } |
| 86 | virtual bool supportsAddTimecxx . . $ IGSConnection#supportsAddTime(c9857a73d68e59ba).(void) { return true; } |
| 87 | virtual bool undoResetsScorecxx . . $ IGSConnection#undoResetsScore(c9857a73d68e59ba).(void) { return true; } |
| 88 | virtual bool supportsSeekcxx . . $ IGSConnection#supportsSeek(c9857a73d68e59ba).(void) { return true; } |
| 89 | virtual unsigned long getPlayerListColumnscxx . . $ IGSConnection#getPlayerListColumns(f708dce9a8856c70).(void) { return PL_NOWINSLOSSEScxx . . $ `src/network/networkconnection.h:229:11`!; } |
| 90 | virtual bool supportsChannelscxx . . $ IGSConnection#supportsChannels(c9857a73d68e59ba).(void) { return true; } |
| 91 | virtual bool supportsRefreshListsButtonscxx . . $ IGSConnection#supportsRefreshListsButtons(c9857a73d68e59ba).(void) { return true; } |
| 92 | virtual bool consoleIsChatcxx . . $ IGSConnection#consoleIsChat(c9857a73d68e59ba).(void) { return false; } |
| 93 | virtual unsigned long getGameDialogFlagscxx . . $ IGSConnection#getGameDialogFlags(f708dce9a8856c70).(void); |
| 94 | virtual unsigned long getRoomStructureFlagscxx . . $ IGSConnection#getRoomStructureFlags(f708dce9a8856c70).(void) { return (RS_SHORTROOMLISTcxx . . $ `src/network/networkconnection.h:235:11`! | RS_ONEROOMATATIMEcxx . . $ `src/network/networkconnection.h:237:11`!); } |
| 95 | |
| 96 | protected: |
| 97 | virtual void onAuthenticationNegotiatedcxx . . $ IGSConnection#onAuthenticationNegotiated(49f6e7a06ebc5aa8).(void); |
| 98 | virtual void setKeepAlivecxx . . $ IGSConnection#setKeepAlive(d4f767463ce0a6b3).(int); |
| 99 | void handleLogincxx . . $ IGSConnection#handleLogin(7df51288a9ebd664).(QStringcxx . . $ QString# msg); |
| 100 | void handlePasswordcxx . . $ IGSConnection#handlePassword(7df51288a9ebd664).(QStringcxx . . $ QString# msg); |
| 101 | void handleMessagecxx . . $ IGSConnection#handleMessage(7df51288a9ebd664).(QStringcxx . . $ QString# msg); |
| 102 | |
| 103 | void handle_loginmsgcxx . . $ IGSConnection#handle_loginmsg(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 104 | void handle_promptcxx . . $ IGSConnection#handle_prompt(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 105 | void handle_beepcxx . . $ IGSConnection#handle_beep(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 106 | void handle_downcxx . . $ IGSConnection#handle_down(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 107 | void handle_errorcxx . . $ IGSConnection#handle_error(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 108 | void handle_gamescxx . . $ IGSConnection#handle_games(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 109 | void handle_filecxx . . $ IGSConnection#handle_file(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 110 | virtual void handle_infocxx . . $ IGSConnection#handle_info(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 111 | virtual void handle_kibitzcxx . . $ IGSConnection#handle_kibitz(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 112 | void handle_messagescxx . . $ IGSConnection#handle_messages(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 113 | void handle_movecxx . . $ IGSConnection#handle_move(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 114 | void handle_saycxx . . $ IGSConnection#handle_say(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 115 | void handle_score_mcxx . . $ IGSConnection#handle_score_m(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 116 | void handle_shoutcxx . . $ IGSConnection#handle_shout(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 117 | void handle_statuscxx . . $ IGSConnection#handle_status(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 118 | void handle_storedcxx . . $ IGSConnection#handle_stored(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 119 | void handle_tellcxx . . $ IGSConnection#handle_tell(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 120 | void handle_thistcxx . . $ IGSConnection#handle_thist(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 121 | void handle_whocxx . . $ IGSConnection#handle_who(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 122 | void handle_undocxx . . $ IGSConnection#handle_undo(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 123 | void handle_yellcxx . . $ IGSConnection#handle_yell(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 124 | void handle_automatchcxx . . $ IGSConnection#handle_automatch(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 125 | void handle_serverinfocxx . . $ IGSConnection#handle_serverinfo(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 126 | void handle_dotcxx . . $ IGSConnection#handle_dot(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 127 | void handle_userlistcxx . . $ IGSConnection#handle_userlist(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 128 | void handle_removedcxx . . $ IGSConnection#handle_removed(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 129 | void handle_ingamesaycxx . . $ IGSConnection#handle_ingamesay(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 130 | void handle_adjourndeclinedcxx . . $ IGSConnection#handle_adjourndeclined(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 131 | void handle_seekcxx . . $ IGSConnection#handle_seek(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 132 | void handle_reviewcxx . . $ IGSConnection#handle_review(7df51288a9ebd664).(QStringcxx . . $ QString# line); |
| 133 | |
| 134 | void handleRemovingAtcxx . . $ IGSConnection#handleRemovingAt(679a3afc1f0f3212).(unsigned int game, QStringcxx . . $ QString# pt); |
| 135 | void sendToggleClientOncxx . . $ IGSConnection#sendToggleClientOn(49f6e7a06ebc5aa8).(void); |
| 136 | void sendListChannelscxx . . $ IGSConnection#sendListChannels(49f6e7a06ebc5aa8).(void); |
| 137 | |
| 138 | QStringcxx . . $ QString# elementcxx . . $ IGSConnection#element(b18f0c69f8da8728).(const QStringcxx . . $ QString# &line, int index, const QStringcxx . . $ QString# &del1, const QStringcxx . . $ QString# &del2=""cxx . . $ QString#QString(85c52e162fed56f9)., bool killblanks=false); |
| 139 | unsigned int idleTimeToSecondscxx . . $ IGSConnection#idleTimeToSeconds(9d92bb507a34628c).(QStringcxx . . $ QString# time); |
| 140 | void fixRankStringcxx . . $ IGSConnection#fixRankString(ee39f32778c92bb9).(QStringcxx . . $ QString# * rank); |
| 141 | PlayerListingcxx . . $ PlayerListing# * getPlayerListingNeverFailcxx . . $ IGSConnection#getPlayerListingNeverFail(38be696f4c5aa948).(QStringcxx . . $ QString# & name); |
| 142 | |
| 143 | int keepAliveTimercxx . . $ IGSConnection#keepAliveTimer.; |
| 144 | int playersListRefreshTimercxx . . $ IGSConnection#playersListRefreshTimer.; |
| 145 | int gamesListRefreshTimercxx . . $ IGSConnection#gamesListRefreshTimer.; |
| 146 | |
| 147 | QStringcxx . . $ QString# protocol_save_stringcxx . . $ IGSConnection#protocol_save_string.; |
| 148 | int protocol_save_intcxx . . $ IGSConnection#protocol_save_int.; |
| 149 | ChannelListingcxx . . $ ChannelListing# * channelcxx . . $ IGSConnection#channel.; |
| 150 | int game_were_playingcxx . . $ IGSConnection#game_were_playing.; |
| 151 | QStringcxx . . $ QString# match_playerNamecxx . . $ IGSConnection#match_playerName.; |
| 152 | TimeRecordcxx . . $ TimeRecord# * btimecxx . . $ IGSConnection#btime., * wtimecxx . . $ IGSConnection#wtime.; |
| 153 | |
| 154 | //private: |
| 155 | int time_to_secondscxx . . $ IGSConnection#time_to_seconds(645d6210e0be3a78).(const QStringcxx . . $ QString# & time); |
| 156 | |
| 157 | QTextCodeccxx . . $ QTextCodec# * textCodeccxx . . $ IGSConnection#textCodec.; |
| 158 | |
| 159 | virtual void timerEventcxx . . $ IGSConnection#timerEvent(b9e57d1150f23bf5).(QTimerEventcxx . . $ QTimerEvent#*); |
| 160 | private: |
| 161 | void initcxx . . $ IGSConnection#init(49f6e7a06ebc5aa8).(void); |
| 162 | void sendNmatchParameterscxx . . $ IGSConnection#sendNmatchParameters(49f6e7a06ebc5aa8).(void); |
| 163 | void setCurrentRoomcxx . . $ IGSConnection#setCurrentRoom(824521e80a967d76).(const RoomListingcxx . . $ RoomListing# & room) { currentRoomcxx . . $ IGSConnection#currentRoom. = &room; } |
| 164 | const RoomListingcxx . . $ RoomListing# * getCurrentRoomcxx . . $ IGSConnection#getCurrentRoom(cde9ef8adcea6063).(void) { return currentRoomcxx . . $ IGSConnection#currentRoom.; } |
| 165 | |
| 166 | bool guestAccountcxx . . $ IGSConnection#guestAccount.; |
| 167 | bool needToSendClientTogglecxx . . $ IGSConnection#needToSendClientToggle.; |
| 168 | const RoomListingcxx . . $ RoomListing# * currentRoomcxx . . $ IGSConnection#currentRoom.; |
| 169 | }; |
| 170 | |
| 171 | #endif //IGSCONNECTION_H |