| 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 | #ifdef LATENCY |
| 24 | #include <sys/time.h> |
| 25 | #endif //LATENCY |
| 26 | #include "defines.h"cxx . . $ `<file>/src/defines.h`/ |
| 27 | #include "networkconnection.h"cxx . . $ `<file>/src/network/networkconnection.h`/ |
| 28 | #include "consoledispatch.h"cxx . . $ `<file>/src/network/consoledispatch.h`/ |
| 29 | #include "boarddispatch.h"cxx . . $ `<file>/src/network/boarddispatch.h`/ |
| 30 | #include "talk.h"cxx . . $ `<file>/src/network/talk.h`/ |
| 31 | #include "gamedialog.h"cxx . . $ `<file>/src/network/gamedialog.h`/ |
| 32 | #include "room.h"cxx . . $ `<file>/src/network/room.h`/ |
| 33 | #include "playergamelistings.h"cxx . . $ `<file>/src/network/playergamelistings.h`/ |
| 34 | #include "connectionwidget.h"cxx . . $ `<file>/src/connectionwidget.h`/ //don't like so much |
| 35 | #include "matchnegotiationstate.h"cxx . . $ `<file>/src/network/matchnegotiationstate.h`/ |
| 36 | |
| 37 | #define FRIENDWATCH_NOTIFY_DEFAULTcxx . . $ `src/network/networkconnection.cpp:37:9`! 1 |
| 38 | |
| 39 | NetworkConnectioncxx . . $ NetworkConnection#::NetworkConnectioncxx . . $ NetworkConnection#NetworkConnection(231cf4fc7da7cd6f).(ConnectionCredentialscxx . . $ ConnectionCredentials# credentials) : |
| 40 | default_roomcxx . . $ NetworkConnection#default_room.(0), console_dispatchcxx . . $ NetworkConnection#console_dispatch.(0), qsocketcxx . . $ NetworkConnection#qsocket.(0) |
| 41 | { |
| 42 | firstonReadyCallcxx . . $ NetworkConnection#firstonReadyCall. = 1; |
| 43 | mainwindowroomcxx . . $ NetworkConnection#mainwindowroom. = 0; |
| 44 | friendwatch_notify_defaultcxx . . $ NetworkConnection#friendwatch_notify_default. = FRIENDWATCH_NOTIFY_DEFAULTcxx . . $ `src/network/networkconnection.cpp:37:9`!; |
| 45 | |
| 46 | connectingDialogcxx . . $ NetworkConnection#connectingDialog. = 0; |
| 47 | match_negotiation_statecxx . . $ NetworkConnection#match_negotiation_state. = new MatchNegotiationStatecxx . . $ MatchNegotiationState#MatchNegotiationState(49f6e7a06ebc5aa8).(); |
| 48 | |
| 49 | connectionTypecxx . . $ NetworkConnection#connectionType. = credentials.typecxx . . $ ConnectionCredentials#type.; |
| 50 | hostnamecxx . . $ NetworkConnection#hostname. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). credentials.hostNamecxx . . $ ConnectionCredentials#hostName.; |
| 51 | portcxx . . $ NetworkConnection#port. = credentials.portcxx . . $ ConnectionCredentials#port.; |
| 52 | usernamecxx . . $ NetworkConnection#username. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). credentials.userNamecxx . . $ ConnectionCredentials#userName.; |
| 53 | passwordcxx . . $ NetworkConnection#password. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). credentials.passwordcxx . . $ ConnectionCredentials#password.; |
| 54 | |
| 55 | ourListingcxx . . $ NetworkConnection#ourListing. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 56 | } |
| 57 | |
| 58 | bool NetworkConnectioncxx . . $ NetworkConnection#::openConnectioncxx . . $ NetworkConnection#openConnection(6f40ee5c4c30d87e).(const QStringcxx . . $ QString# & host, const unsigned short port, bool not_main_connection) |
| 59 | { |
| 60 | qsocketcxx . . $ NetworkConnection#qsocket. = new QTcpSocketcxx . . $ QTcpSocket#(); //try with no parent passed for now |
| 61 | if(!qsocketcxx . . $ NetworkConnection#qsocket.) |
| 62 | return 0; |
| 63 | //connect signals |
| 64 | |
| 65 | //connect(qsocket, hostFound()), OnHostFound())); |
| 66 | connectcxx . . $ QObject#connect(835f87066c895669).(qsocketcxx . . $ NetworkConnection#qsocket., &QTcpSocketcxx . . $ QTcpSocket#::connectedcxx . . $ QAbstractSocket#connected(49f6e7a06ebc5aa8)., this, &NetworkConnectioncxx . . $ NetworkConnection#::OnConnectedcxx . . $ NetworkConnection#OnConnected(49f6e7a06ebc5aa8).); |
| 67 | connectcxx . . $ QObject#connect(835f87066c895669).(qsocketcxx . . $ NetworkConnection#qsocket., &QTcpSocketcxx . . $ QTcpSocket#::readyReadcxx . . $ QIODevice#readyRead(49f6e7a06ebc5aa8)., this, &NetworkConnectioncxx . . $ NetworkConnection#::OnReadyReadcxx . . $ NetworkConnection#OnReadyRead(49f6e7a06ebc5aa8).); |
| 68 | connectcxx . . $ QObject#connect(835f87066c895669).(qsocketcxx . . $ NetworkConnection#qsocket., &QTcpSocketcxx . . $ QTcpSocket#::disconnectedcxx . . $ QAbstractSocket#disconnected(49f6e7a06ebc5aa8)., this, &NetworkConnectioncxx . . $ NetworkConnection#::OnConnectionClosedcxx . . $ NetworkConnection#OnConnectionClosed(49f6e7a06ebc5aa8).); |
| 69 | connectcxx . . $ QObject#connect(835f87066c895669).(qsocketcxx . . $ NetworkConnection#qsocket., QOverloadcxx . . $ QOverload#<QAbstractSocket::SocketError>::ofcxx . . $ QOverload#of(b333341f9aaad300).(&QTcpSocketcxx . . $ QTcpSocket#::errorcxx . . $ QAbstractSocket#error(c866838463bd22b).), this, &NetworkConnectioncxx . . $ NetworkConnection#::OnErrorcxx . . $ NetworkConnection#OnError(c866838463bd22b).); |
| 70 | |
| 71 | if(qsocketcxx . . $ NetworkConnection#qsocket.->statecxx . . $ QAbstractSocket#state(626498656f2ff1ae).() != QTcpSocketcxx . . $ QTcpSocket#::UnconnectedStatecxx . . $ QAbstractSocket#UnconnectedState.) |
| 72 | { |
| 73 | qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!("Called openConnection while in state %d", qsocketcxx . . $ NetworkConnection#qsocket.->isValidcxx . . $ QAbstractSocket#isValid(50ce9a9e25b4a850).()); |
| 74 | return 0; |
| 75 | } |
| 76 | //remove asserts later |
| 77 | Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!(host != 0); |
| 78 | Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!(port != 0); |
| 79 | |
| 80 | if(!not_main_connection) |
| 81 | drawPleaseWaitcxx . . $ NetworkConnection#drawPleaseWait(49f6e7a06ebc5aa8).(); |
| 82 | |
| 83 | qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!("Connecting to %s %d...\n", host.toLatin1cxx . . $ QString#toLatin1(ef52b713090bc85a).().constDatacxx . . $ QByteArray#constData(a9f41ea0e82d88cf).(), port); |
| 84 | // assume info.host is clean |
| 85 | qsocketcxx . . $ NetworkConnection#qsocket.->connectToHostcxx . . $ QAbstractSocket#connectToHost(778a8a9f30152020).(host, (quint16cxx . . $ quint16#) port); |
| 86 | |
| 87 | /* If dispatch does not have a UI, the thing that sets the UI |
| 88 | * will setupRoomAndConsole */ |
| 89 | /* Tricky now without dispatches... who sets up the UI? |
| 90 | * there's always a mainwindow... but maybe things aren't setup? */ |
| 91 | |
| 92 | /* connectionInfo as a message with those pointers is probably a bad idea */ |
| 93 | return (qsocketcxx . . $ NetworkConnection#qsocket.->statecxx . . $ QAbstractSocket#state(626498656f2ff1ae).() != QTcpSocketcxx . . $ QTcpSocket#::UnconnectedStatecxx . . $ QAbstractSocket#UnconnectedState.); |
| 94 | } |
| 95 | |
| 96 | int NetworkConnectioncxx . . $ NetworkConnection#::writecxx . . $ NetworkConnection#write(1df18506ef0a631b).(const char * packet, unsigned int size) |
| 97 | { |
| 98 | return qsocketcxx . . $ NetworkConnection#qsocket.->writecxx . . $ QIODevice#write(93d4069f65218ea4).(packet, size); |
| 99 | } |
| 100 | |
| 101 | void NetworkConnectioncxx . . $ NetworkConnection#::writeZeroPaddedStringcxx . . $ NetworkConnection#writeZeroPaddedString(13ac1ff599cf8ed8).(char * dst, const QStringcxx . . $ QString# & src, int size) |
| 102 | { |
| 103 | int i; |
| 104 | Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!(src.length() <= size); |
| 105 | for(i = 0; i < src.lengthcxx . . $ QString#length(455f465bc33b4cdf).(); i++) |
| 106 | dst[i] = src.toLatin1cxx . . $ QString#toLatin1(ef52b713090bc85a).().constDatacxx . . $ QByteArray#constData(a9f41ea0e82d88cf).()[i]; |
| 107 | for(i = src.lengthcxx . . $ QString#length(455f465bc33b4cdf).(); i < size; i++) |
| 108 | dst[i] = 0x00; |
| 109 | } |
| 110 | |
| 111 | int NetworkConnectioncxx . . $ NetworkConnection#::checkForOpenBoardscxx . . $ NetworkConnection#checkForOpenBoards(b126dc7c1de90089).(void) |
| 112 | { |
| 113 | BoardDispatchcxx . . $ BoardDispatch# * boarddispatch; |
| 114 | QMapcxx . . $ QMap#<unsigned int, class BoardDispatch *>::iteratorcxx . . $ QMap#iterator# icxx . . $ QMap#iterator#iterator(49f6e7a06ebc5aa8).; |
| 115 | for(i =cxx . . $ QMap#iterator#`operator=`(b24d7bfed80a1c47). boardDispatchMapcxx . . $ NetworkConnection#boardDispatchMap..begincxx . . $ QMap#begin(2d49d7eeb2586d1c).(); i !=cxx . . $ QMap#iterator#`operator!=`(8a5a4c9a0d42c534). boardDispatchMapcxx . . $ NetworkConnection#boardDispatchMap..endcxx . . $ QMap#end(2d49d7eeb2586d1c).(); i++cxx . . $ QMap#iterator#operator++(7cc628820cfd2204).) |
| 116 | { |
| 117 | boarddispatch = i.valuecxx . . $ QMap#iterator#value(51f62fb05f27f6a2).(); |
| 118 | if(!boarddispatch->canClosecxx . . $ BoardDispatch#canClose(c9857a73d68e59ba).()) |
| 119 | return -1; |
| 120 | } |
| 121 | return 0; |
| 122 | } |
| 123 | |
| 124 | void NetworkConnectioncxx . . $ NetworkConnection#::closeConnectioncxx . . $ NetworkConnection#closeConnection(b45ddcbc8423892c).(bool send_disconnect) |
| 125 | { |
| 126 | if(!qsocketcxx . . $ NetworkConnection#qsocket.) //when can this happen? this function shouldn't be |
| 127 | //called if we get here!!! |
| 128 | return; |
| 129 | |
| 130 | /* FIXME We also need to close any open dispatches, |
| 131 | * boards etc., for instance if there was an error. |
| 132 | * Clearing lists and such would be good to. |
| 133 | * there's a MainWindow::connexionClosed that does |
| 134 | * good stuff we should move into somewhere |
| 135 | * nearby., also what about onError?*/ |
| 136 | if(connectingDialogcxx . . $ NetworkConnection#connectingDialog.) |
| 137 | { |
| 138 | connectingDialogcxx . . $ NetworkConnection#connectingDialog.->deleteLatercxx . . $ QObject#deleteLater(49f6e7a06ebc5aa8).(); |
| 139 | connectingDialogcxx . . $ NetworkConnection#connectingDialog. = 0; |
| 140 | } |
| 141 | if(qsocketcxx . . $ NetworkConnection#qsocket.->statecxx . . $ QAbstractSocket#state(626498656f2ff1ae).() != QTcpSocketcxx . . $ QTcpSocket#::UnconnectedStatecxx . . $ QAbstractSocket#UnconnectedState.) |
| 142 | { |
| 143 | if(send_disconnect) |
| 144 | { |
| 145 | if(console_dispatchcxx . . $ NetworkConnection#console_dispatch.) |
| 146 | console_dispatchcxx . . $ NetworkConnection#console_dispatch.->recvTextcxx . . $ ConsoleDispatch#recvText(85c52e162fed56f9).("Disconnecting...\n"); |
| 147 | qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!("Disconnecting..."); |
| 148 | sendDisconnectcxx . . $ NetworkConnection#sendDisconnect(49f6e7a06ebc5aa8).(); //legit? |
| 149 | } |
| 150 | // Close it. |
| 151 | qsocketcxx . . $ NetworkConnection#qsocket.->closecxx . . $ QAbstractSocket#close(49f6e7a06ebc5aa8).(); |
| 152 | |
| 153 | // Closing succeeded, return message |
| 154 | if (qsocketcxx . . $ NetworkConnection#qsocket.->statecxx . . $ QAbstractSocket#state(626498656f2ff1ae).() == QTcpSocketcxx . . $ QTcpSocket#::UnconnectedStatecxx . . $ QAbstractSocket#UnconnectedState.) |
| 155 | { |
| 156 | //authState = LOGIN; |
| 157 | //sendTextToApp("Connection closed.\n"); |
| 158 | } |
| 159 | } |
| 160 | // Not yet closed? Data will be written and then slot OnDelayClosedFinish() called |
| 161 | |
| 162 | //delete qsocket; |
| 163 | qsocketcxx . . $ NetworkConnection#qsocket.->deleteLatercxx . . $ QObject#deleteLater(49f6e7a06ebc5aa8).(); //for safety |
| 164 | qsocketcxx . . $ NetworkConnection#qsocket. = 0; |
| 165 | onClosecxx . . $ NetworkConnection#onClose(49f6e7a06ebc5aa8).(); |
| 166 | |
| 167 | return; |
| 168 | } |
| 169 | |
| 170 | void NetworkConnectioncxx . . $ NetworkConnection#::onClosecxx . . $ NetworkConnection#onClose(49f6e7a06ebc5aa8).(void) |
| 171 | { |
| 172 | /* This is from old netdispatch, fix me */ |
| 173 | //RoomDispatch * room; |
| 174 | /* This needs to close all open dispatches */ |
| 175 | /*room = connection->getDefaultRoomDispatch(); |
| 176 | if(room) |
| 177 | { |
| 178 | connection->setDefaultRoomDispatch(0); |
| 179 | delete room; |
| 180 | //FIXME mainwindowroom = 0; |
| 181 | }*/ |
| 182 | tearDownRoomAndConsolecxx . . $ NetworkConnection#tearDownRoomAndConsole(49f6e7a06ebc5aa8).(); |
| 183 | } |
| 184 | |
| 185 | NetworkConnectioncxx . . $ NetworkConnection#::~cxx . . $ NetworkConnection#`~NetworkConnection`(ced63f7c635d850d).NetworkConnectioncxx . . $ NetworkConnection#() |
| 186 | { |
| 187 | //feels a little sparse so far... this should probably be super close FIXME |
| 188 | //qDebug("Destroying connection\n"); |
| 189 | //closeConnection(); //specific impl already calls this |
| 190 | /* Not sure where to delete qsocket. Possible OnDelayClosedFinish() thing. */ |
| 191 | //delete qsocket; |
| 192 | //In case these still exist |
| 193 | //probably unnecessary? |
| 194 | delete match_negotiation_statecxx . . $ NetworkConnection#match_negotiation_state.; |
| 195 | } |
| 196 | |
| 197 | void NetworkConnectioncxx . . $ NetworkConnection#::setConsoleDispatchcxx . . $ NetworkConnection#setConsoleDispatch(79ae725d44840fe3).(class ConsoleDispatchcxx . . $ ConsoleDispatch# * c) |
| 198 | { |
| 199 | console_dispatchcxx . . $ NetworkConnection#console_dispatch. = c; |
| 200 | } |
| 201 | |
| 202 | QTimecxx . . $ QTime# NetworkConnectioncxx . . $ NetworkConnection#::gd_checkMainTimecxx . . $ NetworkConnection#gd_checkMainTime(71240b9f3410da6b).(TimeSystemcxx . . $ TimeSystem# s, const QTimecxx . . $ QTime# & t) |
| 203 | { |
| 204 | if(s == canadiancxx . . $ canadian.) |
| 205 | { |
| 206 | // int seconds = (t.minute() * 60) + t.second(); |
| 207 | if(t.secondcxx . . $ QTime#second(455f465bc33b4cdf).()) |
| 208 | { |
| 209 | // seconds = (t.minute() * 60); |
| 210 | return QTimecxx . . $ QTime#QTime(748afa4755bc9595).(0, t.minutecxx . . $ QTime#minute(455f465bc33b4cdf).(), 0); |
| 211 | } |
| 212 | } |
| 213 | return t; |
| 214 | } |
| 215 | |
| 216 | PlayerListingcxx . . $ PlayerListing# * NetworkConnectioncxx . . $ NetworkConnection#::getPlayerListingFromFriendWatchListingcxx . . $ NetworkConnection#getPlayerListingFromFriendWatchListing(6605e28ac02b1c72).(FriendWatchListingcxx . . $ FriendWatchListing# & f) |
| 217 | { |
| 218 | if(!default_roomcxx . . $ NetworkConnection#default_room.) |
| 219 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 220 | else |
| 221 | { |
| 222 | if(playerTrackingByIDcxx . . $ NetworkConnection#playerTrackingByID(c9857a73d68e59ba).()) |
| 223 | { |
| 224 | if(f.idcxx . . $ FriendWatchListing#id. == 0) |
| 225 | { |
| 226 | PlayerListingcxx . . $ PlayerListing# * p = default_roomcxx . . $ NetworkConnection#default_room.->getPlayerListingcxx . . $ Room#getPlayerListing(d3f53ac2de9f0b45).(f.namecxx . . $ FriendWatchListing#name.); |
| 227 | f.idcxx . . $ FriendWatchListing#id. = p->idcxx . . $ PlayerListing#id.; |
| 228 | return p; |
| 229 | } |
| 230 | else |
| 231 | return default_roomcxx . . $ NetworkConnection#default_room.->getPlayerListingcxx . . $ Room#getPlayerListing(ad2afa9294843726).(f.idcxx . . $ FriendWatchListing#id.); |
| 232 | } |
| 233 | else |
| 234 | return default_roomcxx . . $ NetworkConnection#default_room.->getPlayerListingcxx . . $ Room#getPlayerListing(d3f53ac2de9f0b45).(f.namecxx . . $ FriendWatchListing#name.); |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | /* This will often be overridden by the specific connection but |
| 239 | * otherwise this will handle local lists. There's also the |
| 240 | * possibility of a sync option? But that's almost useless */ |
| 241 | /* As far as I can tell IGS has no support for on server lists, |
| 242 | * so that will be the first add */ |
| 243 | /* Note that these can't be called if the listing already has |
| 244 | * the bit set and server side friends lists will have a |
| 245 | * separate interface */ |
| 246 | void NetworkConnectioncxx . . $ NetworkConnection#::addFriendcxx . . $ NetworkConnection#addFriend(122195e397f39e1b).(PlayerListingcxx . . $ PlayerListing# * player) |
| 247 | { |
| 248 | if(player->friendWatchTypecxx . . $ PlayerListing#friendWatchType. == PlayerListingcxx . . $ PlayerListing#::blockedcxx . . $ PlayerListing#blocked.) |
| 249 | removeBlockcxx . . $ NetworkConnection#removeBlock(122195e397f39e1b).(player); |
| 250 | else if(player->friendWatchTypecxx . . $ PlayerListing#friendWatchType. == PlayerListingcxx . . $ PlayerListing#::watchedcxx . . $ PlayerListing#watched.) |
| 251 | removeWatchcxx . . $ NetworkConnection#removeWatch(122195e397f39e1b).(player); |
| 252 | player->friendWatchTypecxx . . $ PlayerListing#friendWatchType. = PlayerListingcxx . . $ PlayerListing#::friendedcxx . . $ PlayerListing#friended.; |
| 253 | //FIXME presumably they're not already on the list because |
| 254 | //the popup checked that in constructing the popup menu but... |
| 255 | friendedListcxx . . $ NetworkConnection#friendedList..push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(new FriendWatchListingcxx . . $ FriendWatchListing#FriendWatchListing(4e51b35ce1bea96b).(playercxx . . $ QString#QString(132dd6869045752b).->namecxx . . $ PlayerListing#name., friendwatch_notify_defaultcxx . . $ NetworkConnection#friendwatch_notify_default.)); |
| 256 | emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! playerListingReceivedcxx . . $ NetworkConnection#playerListingReceived(122195e397f39e1b).(player); |
| 257 | } |
| 258 | |
| 259 | void NetworkConnectioncxx . . $ NetworkConnection#::removeFriendcxx . . $ NetworkConnection#removeFriend(122195e397f39e1b).(PlayerListingcxx . . $ PlayerListing# * player) |
| 260 | { |
| 261 | player->friendWatchTypecxx . . $ PlayerListing#friendWatchType. = PlayerListingcxx . . $ PlayerListing#::nonecxx . . $ PlayerListing#none.; |
| 262 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<FriendWatchListing * >::iteratorcxx . . $ std/vector#iterator# icxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(ced63f7c635d850d).; |
| 263 | for(i =cxx . . $ __gnu_cxx/__normal_iterator#`operator=`(23bb58531c03b779). friendedListcxx . . $ NetworkConnection#friendedList..begincxx . . $ std/vector#begin(55a6de06420d4903).(); i !=cxx . . $ __gnu_cxx/`operator!=`(30ee64f2df4eef8b). friendedListcxx . . $ NetworkConnection#friendedList..endcxx . . $ std/vector#end(55a6de06420d4903).(); i++cxx . . $ __gnu_cxx/__normal_iterator#operator++(6cefca3db4774be2).) |
| 264 | { |
| 265 | if((*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i)->namecxx . . $ FriendWatchListing#name. ==cxx . . $ `operator==`(5bc2975d2d751687). player->namecxx . . $ PlayerListing#name.) |
| 266 | { |
| 267 | delete *cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i; |
| 268 | friendedListcxx . . $ NetworkConnection#friendedList..erasecxx . . $ std/vector#erase(351407f384f345bc).(icxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(459a7e7b9fbe7640).); |
| 269 | break; |
| 270 | } |
| 271 | } |
| 272 | emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! playerListingReceivedcxx . . $ NetworkConnection#playerListingReceived(122195e397f39e1b).(player); |
| 273 | } |
| 274 | |
| 275 | void NetworkConnectioncxx . . $ NetworkConnection#::addWatchcxx . . $ NetworkConnection#addWatch(122195e397f39e1b).(PlayerListingcxx . . $ PlayerListing# * player) |
| 276 | { |
| 277 | if(player->friendWatchTypecxx . . $ PlayerListing#friendWatchType. == PlayerListingcxx . . $ PlayerListing#::friendedcxx . . $ PlayerListing#friended.) |
| 278 | removeFriendcxx . . $ NetworkConnection#removeFriend(122195e397f39e1b).(player); |
| 279 | else if(player->friendWatchTypecxx . . $ PlayerListing#friendWatchType. == PlayerListingcxx . . $ PlayerListing#::blockedcxx . . $ PlayerListing#blocked.) |
| 280 | removeBlockcxx . . $ NetworkConnection#removeBlock(122195e397f39e1b).(player); |
| 281 | player->friendWatchTypecxx . . $ PlayerListing#friendWatchType. = PlayerListingcxx . . $ PlayerListing#::watchedcxx . . $ PlayerListing#watched.; |
| 282 | watchedListcxx . . $ NetworkConnection#watchedList..push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(new FriendWatchListingcxx . . $ FriendWatchListing#FriendWatchListing(4e51b35ce1bea96b).(playercxx . . $ QString#QString(132dd6869045752b).->namecxx . . $ PlayerListing#name., friendwatch_notify_defaultcxx . . $ NetworkConnection#friendwatch_notify_default.)); |
| 283 | emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! playerListingReceivedcxx . . $ NetworkConnection#playerListingReceived(122195e397f39e1b).(player); |
| 284 | } |
| 285 | |
| 286 | void NetworkConnectioncxx . . $ NetworkConnection#::removeWatchcxx . . $ NetworkConnection#removeWatch(122195e397f39e1b).(PlayerListingcxx . . $ PlayerListing# * player) |
| 287 | { |
| 288 | player->friendWatchTypecxx . . $ PlayerListing#friendWatchType. = PlayerListingcxx . . $ PlayerListing#::nonecxx . . $ PlayerListing#none.; |
| 289 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<FriendWatchListing * >::iteratorcxx . . $ std/vector#iterator# icxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(ced63f7c635d850d).; |
| 290 | for(i =cxx . . $ __gnu_cxx/__normal_iterator#`operator=`(23bb58531c03b779). watchedListcxx . . $ NetworkConnection#watchedList..begincxx . . $ std/vector#begin(55a6de06420d4903).(); i !=cxx . . $ __gnu_cxx/`operator!=`(30ee64f2df4eef8b). watchedListcxx . . $ NetworkConnection#watchedList..endcxx . . $ std/vector#end(55a6de06420d4903).(); i++cxx . . $ __gnu_cxx/__normal_iterator#operator++(6cefca3db4774be2).) |
| 291 | { |
| 292 | if((*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i)->namecxx . . $ FriendWatchListing#name. ==cxx . . $ `operator==`(5bc2975d2d751687). player->namecxx . . $ PlayerListing#name.) |
| 293 | { |
| 294 | delete *cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i; |
| 295 | watchedListcxx . . $ NetworkConnection#watchedList..erasecxx . . $ std/vector#erase(351407f384f345bc).(icxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(459a7e7b9fbe7640).); |
| 296 | break; |
| 297 | } |
| 298 | } |
| 299 | emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! playerListingReceivedcxx . . $ NetworkConnection#playerListingReceived(122195e397f39e1b).(player); |
| 300 | } |
| 301 | |
| 302 | void NetworkConnectioncxx . . $ NetworkConnection#::addBlockcxx . . $ NetworkConnection#addBlock(122195e397f39e1b).(PlayerListingcxx . . $ PlayerListing# * player) |
| 303 | { |
| 304 | if(player->friendWatchTypecxx . . $ PlayerListing#friendWatchType. == PlayerListingcxx . . $ PlayerListing#::friendedcxx . . $ PlayerListing#friended.) |
| 305 | removeFriendcxx . . $ NetworkConnection#removeFriend(122195e397f39e1b).(player); |
| 306 | else if(player->friendWatchTypecxx . . $ PlayerListing#friendWatchType. == PlayerListingcxx . . $ PlayerListing#::watchedcxx . . $ PlayerListing#watched.) |
| 307 | removeWatchcxx . . $ NetworkConnection#removeWatch(122195e397f39e1b).(player); |
| 308 | player->friendWatchTypecxx . . $ PlayerListing#friendWatchType. = PlayerListingcxx . . $ PlayerListing#::blockedcxx . . $ PlayerListing#blocked.; |
| 309 | blockedListcxx . . $ NetworkConnection#blockedList..push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(new FriendWatchListingcxx . . $ FriendWatchListing#FriendWatchListing(4e51b35ce1bea96b).(playercxx . . $ QString#QString(132dd6869045752b).->namecxx . . $ PlayerListing#name.)); |
| 310 | } |
| 311 | |
| 312 | void NetworkConnectioncxx . . $ NetworkConnection#::removeBlockcxx . . $ NetworkConnection#removeBlock(122195e397f39e1b).(PlayerListingcxx . . $ PlayerListing# * player) |
| 313 | { |
| 314 | player->friendWatchTypecxx . . $ PlayerListing#friendWatchType. = PlayerListingcxx . . $ PlayerListing#::nonecxx . . $ PlayerListing#none.; |
| 315 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<FriendWatchListing * >::iteratorcxx . . $ std/vector#iterator# icxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(ced63f7c635d850d).; |
| 316 | for(i =cxx . . $ __gnu_cxx/__normal_iterator#`operator=`(23bb58531c03b779). blockedListcxx . . $ NetworkConnection#blockedList..begincxx . . $ std/vector#begin(55a6de06420d4903).(); i !=cxx . . $ __gnu_cxx/`operator!=`(30ee64f2df4eef8b). blockedListcxx . . $ NetworkConnection#blockedList..endcxx . . $ std/vector#end(55a6de06420d4903).(); i++cxx . . $ __gnu_cxx/__normal_iterator#operator++(6cefca3db4774be2).) |
| 317 | { |
| 318 | if((*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i)->namecxx . . $ FriendWatchListing#name. ==cxx . . $ `operator==`(5bc2975d2d751687). player->namecxx . . $ PlayerListing#name.) |
| 319 | { |
| 320 | delete *cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i; |
| 321 | blockedListcxx . . $ NetworkConnection#blockedList..erasecxx . . $ std/vector#erase(351407f384f345bc).(icxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(459a7e7b9fbe7640).); |
| 322 | break; |
| 323 | } |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | /* This function checks the local lists for a name and sets |
| 328 | * appropriate flags. We may also have it do notifications. |
| 329 | * Other protocol types can override it to, for instance |
| 330 | * do nothing or just notify, assuming the flags are |
| 331 | * set when the player is received, rather than looking them |
| 332 | * up */ |
| 333 | /* Another issue: recvPlayerListing is used to change |
| 334 | * the status of a player, as in which room they're in |
| 335 | * we don't want it to say "signed on" every time with |
| 336 | * that. So we probably need to have an online flag |
| 337 | * on the friends listing to see if we've already flagged |
| 338 | * them FIXME */ |
| 339 | void NetworkConnectioncxx . . $ NetworkConnection#::getAndSetFriendWatchTypecxx . . $ NetworkConnection#getAndSetFriendWatchType(122195e397f39e1b).(PlayerListingcxx . . $ PlayerListing# * player) |
| 340 | { |
| 341 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<FriendWatchListing * >::iteratorcxx . . $ std/vector#iterator# icxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(ced63f7c635d850d).; |
| 342 | |
| 343 | for(i =cxx . . $ __gnu_cxx/__normal_iterator#`operator=`(23bb58531c03b779). friendedListcxx . . $ NetworkConnection#friendedList..begincxx . . $ std/vector#begin(55a6de06420d4903).(); i !=cxx . . $ __gnu_cxx/`operator!=`(30ee64f2df4eef8b). friendedListcxx . . $ NetworkConnection#friendedList..endcxx . . $ std/vector#end(55a6de06420d4903).(); i++cxx . . $ __gnu_cxx/__normal_iterator#operator++(6cefca3db4774be2).) |
| 344 | { |
| 345 | if((*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i)->namecxx . . $ FriendWatchListing#name. ==cxx . . $ `operator==`(5bc2975d2d751687). player->namecxx . . $ PlayerListing#name.) |
| 346 | { |
| 347 | if(!(*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i)->onlinecxx . . $ FriendWatchListing#online.) |
| 348 | { |
| 349 | (*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i)->onlinecxx . . $ FriendWatchListing#online. = true; |
| 350 | player->friendWatchTypecxx . . $ PlayerListing#friendWatchType. = PlayerListingcxx . . $ PlayerListing#::friendedcxx . . $ PlayerListing#friended.; |
| 351 | /* We may want to put this somewhere else or have it be dialog |
| 352 | * with options, like talk or match. We might also want |
| 353 | * to block all notifies while one is in a game FIXME |
| 354 | * Also, these messages should be nonblocking !?!?!!!!! FIXME*/ |
| 355 | /* And actually, its a big enough deal, i.e., we might want console |
| 356 | * messages, game blocks, etc., that it makes sense to have some separate |
| 357 | * class for it that handles the notifications... a notification class... */ |
| 358 | #ifdef FIXME |
| 359 | if((*i)->notify) |
| 360 | QMessageBox::information(0, tr("Signed on"), tr("%1 has signed on").arg(player.name)); |
| 361 | #endif //FIXME |
| 362 | } |
| 363 | else if(!player->onlinecxx . . $ PlayerListing#online.) |
| 364 | { |
| 365 | (*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i)->onlinecxx . . $ FriendWatchListing#online. = false; |
| 366 | //they are disconnecting |
| 367 | } |
| 368 | return; |
| 369 | } |
| 370 | } |
| 371 | for(i =cxx . . $ __gnu_cxx/__normal_iterator#`operator=`(23bb58531c03b779). watchedListcxx . . $ NetworkConnection#watchedList..begincxx . . $ std/vector#begin(55a6de06420d4903).(); i !=cxx . . $ __gnu_cxx/`operator!=`(30ee64f2df4eef8b). watchedListcxx . . $ NetworkConnection#watchedList..endcxx . . $ std/vector#end(55a6de06420d4903).(); i++cxx . . $ __gnu_cxx/__normal_iterator#operator++(6cefca3db4774be2).) |
| 372 | { |
| 373 | if((*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i)->namecxx . . $ FriendWatchListing#name. ==cxx . . $ `operator==`(5bc2975d2d751687). player->namecxx . . $ PlayerListing#name.) |
| 374 | { |
| 375 | player->friendWatchTypecxx . . $ PlayerListing#friendWatchType. = PlayerListingcxx . . $ PlayerListing#::watchedcxx . . $ PlayerListing#watched.; |
| 376 | return; |
| 377 | } |
| 378 | } |
| 379 | for(i =cxx . . $ __gnu_cxx/__normal_iterator#`operator=`(23bb58531c03b779). blockedListcxx . . $ NetworkConnection#blockedList..begincxx . . $ std/vector#begin(55a6de06420d4903).(); i !=cxx . . $ __gnu_cxx/`operator!=`(30ee64f2df4eef8b). blockedListcxx . . $ NetworkConnection#blockedList..endcxx . . $ std/vector#end(55a6de06420d4903).(); i++cxx . . $ __gnu_cxx/__normal_iterator#operator++(6cefca3db4774be2).) |
| 380 | { |
| 381 | if((*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i)->namecxx . . $ FriendWatchListing#name. ==cxx . . $ `operator==`(5bc2975d2d751687). player->namecxx . . $ PlayerListing#name.) |
| 382 | { |
| 383 | player->friendWatchTypecxx . . $ PlayerListing#friendWatchType. = PlayerListingcxx . . $ PlayerListing#::blockedcxx . . $ PlayerListing#blocked.; |
| 384 | return; |
| 385 | } |
| 386 | } |
| 387 | player->friendWatchTypecxx . . $ PlayerListing#friendWatchType. = PlayerListingcxx . . $ PlayerListing#::nonecxx . . $ PlayerListing#none.; |
| 388 | return; |
| 389 | } |
| 390 | |
| 391 | void NetworkConnectioncxx . . $ NetworkConnection#::checkGameWatchedcxx . . $ NetworkConnection#checkGameWatched(963dc8955d49573e).(const GameListingcxx . . $ GameListing# *game) |
| 392 | { |
| 393 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<FriendWatchListing * >::iteratorcxx . . $ std/vector#iterator# icxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(ced63f7c635d850d).; |
| 394 | for(i =cxx . . $ __gnu_cxx/__normal_iterator#`operator=`(23bb58531c03b779). watchedListcxx . . $ NetworkConnection#watchedList..begincxx . . $ std/vector#begin(55a6de06420d4903).(); i !=cxx . . $ __gnu_cxx/`operator!=`(30ee64f2df4eef8b). watchedListcxx . . $ NetworkConnection#watchedList..endcxx . . $ std/vector#end(55a6de06420d4903).(); i++cxx . . $ __gnu_cxx/__normal_iterator#operator++(6cefca3db4774be2).) |
| 395 | { |
| 396 | if((*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i)->namecxx . . $ FriendWatchListing#name. ==cxx . . $ `operator==`(5bc2975d2d751687). game->white_namecxx . . $ GameListing#white_name(a2fb7a6ce195d51).() || (*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i)->namecxx . . $ FriendWatchListing#name. ==cxx . . $ `operator==`(5bc2975d2d751687). game->black_namecxx . . $ GameListing#black_name(a2fb7a6ce195d51).()) |
| 397 | { |
| 398 | //notifies too often!!! FIXME |
| 399 | if((*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i)->notifycxx . . $ FriendWatchListing#notify.) |
| 400 | QMessageBoxcxx . . $ QMessageBox#::informationcxx . . $ QMessageBox#information(a9e3742e6f7b4147).(0, trcxx . . $ NetworkConnection#tr(75d9f1c324b4579d).("Match Started!"), trcxx . . $ NetworkConnection#tr(75d9f1c324b4579d).("Match has started between %1 and %2").argcxx . . $ QString#arg(bc823072288cbbb5).(game->white_namecxx . . $ GameListing#white_name(a2fb7a6ce195d51).()).argcxx . . $ QString#arg(bc823072288cbbb5).(game->black_namecxx . . $ GameListing#black_name(a2fb7a6ce195d51).())); |
| 401 | return; |
| 402 | } |
| 403 | } |
| 404 | } |
| 405 | |
| 406 | void NetworkConnectioncxx . . $ NetworkConnection#::drawPleaseWaitcxx . . $ NetworkConnection#drawPleaseWait(49f6e7a06ebc5aa8).(void) |
| 407 | { |
| 408 | QPushButtoncxx . . $ QPushButton# * cancelConnecting; |
| 409 | |
| 410 | connectingDialogcxx . . $ NetworkConnection#connectingDialog. = new QMessageBoxcxx . . $ QMessageBox#QMessageBox(c35ff04b6b0c50a0).(QMessageBoxcxx . . $ QMessageBox#::NoIconcxx . . $ QMessageBox#NoIcon., trcxx . . $ NetworkConnection#tr(75d9f1c324b4579d).("Please wait"), trcxx . . $ NetworkConnection#tr(75d9f1c324b4579d).("Connecting...")); |
| 411 | //connectingDialog->setWindowTitle(); |
| 412 | //connectingDialog->setText(); |
| 413 | cancelConnecting = connectingDialogcxx . . $ NetworkConnection#connectingDialog.->addButtoncxx . . $ QMessageBox#addButton(fc8ff152f58c686).(QMessageBoxcxx . . $ QMessageBox#::Cancelcxx . . $ QMessageBox#Cancel.); |
| 414 | connectcxx . . $ QObject#connect(835f87066c895669).(cancelConnecting, &QPushButtoncxx . . $ QPushButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &NetworkConnectioncxx . . $ NetworkConnection#::slot_cancelConnectingcxx . . $ NetworkConnection#slot_cancelConnecting(49f6e7a06ebc5aa8).); |
| 415 | connectingDialogcxx . . $ NetworkConnection#connectingDialog.->showcxx . . $ QWidget#show(49f6e7a06ebc5aa8).(); |
| 416 | connectingDialogcxx . . $ NetworkConnection#connectingDialog.->setMinimumSizecxx . . $ QWidget#setMinimumSize(3e454b8ccf442868).(180, 100); |
| 417 | } |
| 418 | |
| 419 | void NetworkConnectioncxx . . $ NetworkConnection#::slot_cancelConnectingcxx . . $ NetworkConnection#slot_cancelConnecting(49f6e7a06ebc5aa8).(void) |
| 420 | { |
| 421 | userCanceledcxx . . $ NetworkConnection#userCanceled(49f6e7a06ebc5aa8).(); |
| 422 | connectingDialogcxx . . $ NetworkConnection#connectingDialog.->deleteLatercxx . . $ QObject#deleteLater(49f6e7a06ebc5aa8).(); |
| 423 | connectingDialogcxx . . $ NetworkConnection#connectingDialog. = 0; |
| 424 | } |
| 425 | |
| 426 | void NetworkConnectioncxx . . $ NetworkConnection#::OnConnectedcxx . . $ NetworkConnection#OnConnected(49f6e7a06ebc5aa8).() |
| 427 | { |
| 428 | } |
| 429 | |
| 430 | void NetworkConnectioncxx . . $ NetworkConnection#::onAuthenticationNegotiatedcxx . . $ NetworkConnection#onAuthenticationNegotiated(49f6e7a06ebc5aa8).(void) |
| 431 | { |
| 432 | setupRoomAndConsolecxx . . $ NetworkConnection#setupRoomAndConsole(49f6e7a06ebc5aa8).(); |
| 433 | console_dispatchcxx . . $ NetworkConnection#console_dispatch.->recvTextcxx . . $ ConsoleDispatch#recvText(7df51288a9ebd664).(QStringcxx . . $ QString#QString(85c52e162fed56f9).("Connected")); //peerAddress returns 0 for some reason FIXME |
| 434 | //console_dispatch->recvText(QString("Connected to ") + qsocket->peerAddress().toString() + " " + QString::number(qsocket->peerPort())); |
| 435 | } |
| 436 | |
| 437 | void NetworkConnectioncxx . . $ NetworkConnection#::onReadycxx . . $ NetworkConnection#onReady(49f6e7a06ebc5aa8).(void) |
| 438 | { |
| 439 | emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! readycxx . . $ NetworkConnection#ready(49f6e7a06ebc5aa8).(); |
| 440 | } |
| 441 | |
| 442 | void NetworkConnectioncxx . . $ NetworkConnection#::OnReadyReadcxx . . $ NetworkConnection#OnReadyRead(49f6e7a06ebc5aa8).() |
| 443 | { |
| 444 | handlePendingDatacxx . . $ NetworkConnection#handlePendingData(49f6e7a06ebc5aa8).(); |
| 445 | } |
| 446 | |
| 447 | void NetworkConnectioncxx . . $ NetworkConnection#::OnConnectionClosedcxx . . $ NetworkConnection#OnConnectionClosed(49f6e7a06ebc5aa8).() |
| 448 | { |
| 449 | /* Without networkdispatch, this now needs to do something |
| 450 | * except FIXME only if there's actually been an error. like |
| 451 | * if we change servers and get disconnected, versus if we |
| 452 | * disconnect ourself.*/ |
| 453 | |
| 454 | // read last data that could be in the buffer WHY?? |
| 455 | //OnReadyRead(); |
| 456 | //authState = LOGIN; |
| 457 | //sendTextToApp("Connection closed by foreign host.\n"); |
| 458 | /* I'm not yet sure what the best procedure is, but |
| 459 | * presumably this handler occurs when we disconnect |
| 460 | * or when there's an error. So we'll have it delete |
| 461 | * the main room which can then, upon deletion, notify |
| 462 | * the mainwindow_server code to delete the netdispatch |
| 463 | * which we'll delete the network connection... if |
| 464 | * there is one */ |
| 465 | //if(default_room_dispatch) |
| 466 | // delete default_room_dispatch; |
| 467 | } |
| 468 | |
| 469 | /* |
| 470 | // Connection was closed from application, but delayed |
| 471 | void IGSConnection::OnDelayedCloseFinish() |
| 472 | { |
| 473 | qDebug("DELAY CLOSED FINISHED"); |
| 474 | |
| 475 | authState = LOGIN; |
| 476 | sendTextToApp("Connection closed.\n"); |
| 477 | } |
| 478 | */ |
| 479 | |
| 480 | void NetworkConnectioncxx . . $ NetworkConnection#::setStatecxx . . $ NetworkConnection#setState(41e728cff2b23034).(ConnectionStatecxx . . $ ConnectionState# newState) |
| 481 | { |
| 482 | connectionStatecxx . . $ NetworkConnection#connectionState. = newState; |
| 483 | if((newState == Connectedcxx . . $ Connected.) && connectingDialogcxx . . $ NetworkConnection#connectingDialog.) |
| 484 | { |
| 485 | connectingDialogcxx . . $ NetworkConnection#connectingDialog.->deleteLatercxx . . $ QObject#deleteLater(49f6e7a06ebc5aa8).(); |
| 486 | connectingDialogcxx . . $ NetworkConnection#connectingDialog. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 487 | } |
| 488 | emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! stateChangedcxx . . $ NetworkConnection#stateChanged(41e728cff2b23034).(newState); |
| 489 | } |
| 490 | |
| 491 | void NetworkConnectioncxx . . $ NetworkConnection#::OnErrorcxx . . $ NetworkConnection#OnError(c866838463bd22b).(QAbstractSocketcxx . . $ QAbstractSocket#::SocketErrorcxx . . $ QAbstractSocket#SocketError# i) |
| 492 | { |
| 493 | /* FIXME These should pop up information boxes as |
| 494 | * well as somehow prevent the even attempted sending |
| 495 | * of other msgs? perhaps? like disconnect msgs?*/ |
| 496 | qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!() <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "NetworkConnection::OnError() : TCP socket error: " <<cxx . . $ QDebug#`operator<<`(4cf17434affdd8). qsocketcxx . . $ NetworkConnection#qsocket.->errorStringcxx . . $ QIODevice#errorString(6ef7b6c27b00b43d).(); |
| 497 | if(console_dispatchcxx . . $ NetworkConnection#console_dispatch.) |
| 498 | console_dispatchcxx . . $ NetworkConnection#console_dispatch.->recvTextcxx . . $ ConsoleDispatch#recvText(7df51288a9ebd664).("TCP socket error: " +cxx . . $ operator+(c75c3ae4eb9af1a8). qsocketcxx . . $ NetworkConnection#qsocket.->errorStringcxx . . $ QIODevice#errorString(6ef7b6c27b00b43d).()); |
| 499 | switch (i) |
| 500 | { |
| 501 | case QTcpSocketcxx . . $ QTcpSocket#::ConnectionRefusedErrorcxx . . $ QAbstractSocket#ConnectionRefusedError.: |
| 502 | setStatecxx . . $ NetworkConnection#setState(41e728cff2b23034).(ConnectionRefusedcxx . . $ ConnectionRefused.); |
| 503 | break; |
| 504 | case QTcpSocketcxx . . $ QTcpSocket#::HostNotFoundErrorcxx . . $ QAbstractSocket#HostNotFoundError.: |
| 505 | setStatecxx . . $ NetworkConnection#setState(41e728cff2b23034).(HostNotFoundcxx . . $ HostNotFound.); |
| 506 | break; |
| 507 | case QTcpSocketcxx . . $ QTcpSocket#::SocketTimeoutErrorcxx . . $ QAbstractSocket#SocketTimeoutError.: |
| 508 | setStatecxx . . $ NetworkConnection#setState(41e728cff2b23034).(SockTimeoutcxx . . $ SockTimeout.); |
| 509 | break; |
| 510 | case QTcpSocketcxx . . $ QTcpSocket#::RemoteHostClosedErrorcxx . . $ QAbstractSocket#RemoteHostClosedError.: |
| 511 | setStatecxx . . $ NetworkConnection#setState(41e728cff2b23034).(ProtocolErrorcxx . . $ ProtocolError.); |
| 512 | break; |
| 513 | default: |
| 514 | setStatecxx . . $ NetworkConnection#setState(41e728cff2b23034).(UnknownErrorcxx . . $ UnknownError.); |
| 515 | break; |
| 516 | } |
| 517 | |
| 518 | if(connectingDialogcxx . . $ NetworkConnection#connectingDialog.) |
| 519 | { |
| 520 | connectingDialogcxx . . $ NetworkConnection#connectingDialog.->deleteLatercxx . . $ QObject#deleteLater(49f6e7a06ebc5aa8).(); |
| 521 | connectingDialogcxx . . $ NetworkConnection#connectingDialog. = 0; |
| 522 | } |
| 523 | //sendTextToApp("ERROR - Connection closed.\n"+ qsocket->errorString() ); |
| 524 | //OnReadyRead(); |
| 525 | /* We need to toggle the connection flag, close things up, etc.. */ |
| 526 | |
| 527 | /* FIXME, we need to also notify the board dispatches, etc., not just ignore it, it should close everything and prevent |
| 528 | * those board window, do you want to resign messages */ |
| 529 | if(connectionWidgetcxx . . $ connectionWidget.) //mainwindow can ignore if loginDialog is open |
| 530 | connectionWidgetcxx . . $ connectionWidget.->onConnectionErrorcxx . . $ ConnectionWidget#onConnectionError(49f6e7a06ebc5aa8).(); |
| 531 | } |
| 532 | |
| 533 | void NetworkConnectioncxx . . $ NetworkConnection#::setupRoomAndConsolecxx . . $ NetworkConnection#setupRoomAndConsole(49f6e7a06ebc5aa8).(void) |
| 534 | { |
| 535 | mainwindowroomcxx . . $ NetworkConnection#mainwindowroom. = new Roomcxx . . $ Room#Room(bdf7e61fb2b15626).(this); |
| 536 | mainwindowroomcxx . . $ NetworkConnection#mainwindowroom.->setConnectioncxx . . $ Room#setConnection(bdf7e61fb2b15626).(this); |
| 537 | /* Two calls are needed beacause Room has a two step |
| 538 | * initialization process that should be merged |
| 539 | * in the constructor FIXME */ |
| 540 | setDefaultRoomcxx . . $ NetworkConnection#setDefaultRoom(ccfe55e9aba40de).(mainwindowroomcxx . . $ NetworkConnection#mainwindowroom.); |
| 541 | |
| 542 | console_dispatchcxx . . $ NetworkConnection#console_dispatch. = new ConsoleDispatchcxx . . $ ConsoleDispatch#ConsoleDispatch(bdf7e61fb2b15626).(this); |
| 543 | setConsoleDispatchcxx . . $ NetworkConnection#setConsoleDispatch(79ae725d44840fe3).(console_dispatchcxx . . $ NetworkConnection#console_dispatch.); |
| 544 | |
| 545 | loadfriendswatchescxx . . $ NetworkConnection#loadfriendswatches(49f6e7a06ebc5aa8).(); |
| 546 | } |
| 547 | |
| 548 | void NetworkConnectioncxx . . $ NetworkConnection#::tearDownRoomAndConsolecxx . . $ NetworkConnection#tearDownRoomAndConsole(49f6e7a06ebc5aa8).(void) |
| 549 | { |
| 550 | savefriendswatchescxx . . $ NetworkConnection#savefriendswatches(49f6e7a06ebc5aa8).(); |
| 551 | QMapcxx . . $ QMap#<unsigned int, class BoardDispatch *>::iteratorcxx . . $ QMap#iterator# icxx . . $ QMap#iterator#iterator(49f6e7a06ebc5aa8).; |
| 552 | for(i =cxx . . $ QMap#iterator#`operator=`(b24d7bfed80a1c47). boardDispatchMapcxx . . $ NetworkConnection#boardDispatchMap..begincxx . . $ QMap#begin(2d49d7eeb2586d1c).(); i !=cxx . . $ QMap#iterator#`operator!=`(8a5a4c9a0d42c534). boardDispatchMapcxx . . $ NetworkConnection#boardDispatchMap..endcxx . . $ QMap#end(2d49d7eeb2586d1c).(); i++cxx . . $ QMap#iterator#operator++(7cc628820cfd2204).) |
| 553 | { |
| 554 | (i.valuecxx . . $ QMap#iterator#value(51f62fb05f27f6a2).())->setConnectioncxx . . $ BoardDispatch#setConnection(bdf7e61fb2b15626).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 555 | } |
| 556 | boardDispatchMapcxx . . $ NetworkConnection#boardDispatchMap..clearcxx . . $ QMap#clear(49f6e7a06ebc5aa8).(); |
| 557 | gameDialogMapcxx . . $ NetworkConnection#gameDialogMap..clearcxx . . $ QMap#clear(49f6e7a06ebc5aa8).(); // FIXME probably unnecessary |
| 558 | |
| 559 | if(mainwindowroomcxx . . $ NetworkConnection#mainwindowroom.) |
| 560 | { |
| 561 | delete mainwindowroomcxx . . $ NetworkConnection#mainwindowroom.; |
| 562 | mainwindowroomcxx . . $ NetworkConnection#mainwindowroom. = 0; |
| 563 | } |
| 564 | if(console_dispatchcxx . . $ NetworkConnection#console_dispatch.) |
| 565 | { |
| 566 | delete console_dispatchcxx . . $ NetworkConnection#console_dispatch.; |
| 567 | console_dispatchcxx . . $ NetworkConnection#console_dispatch. = 0; |
| 568 | } |
| 569 | } |
| 570 | |
| 571 | /* Edit friends/watches list window is created when needed. |
| 572 | * but we might consider having it always existing and then |
| 573 | * show hide it? That's ugly though. But like these functions |
| 574 | * should probably be part of a friendsfan class instead of |
| 575 | * the network connection awkward but perhaps minor FIXME */ |
| 576 | void NetworkConnectioncxx . . $ NetworkConnection#::loadfriendswatchescxx . . $ NetworkConnection#loadfriendswatches(49f6e7a06ebc5aa8).(void) |
| 577 | { |
| 578 | QSettingscxx . . $ QSettings# settingscxx . . $ QSettings#QSettings(749de1b6ae65bddd).; |
| 579 | int size, i; |
| 580 | if(!supportsFriendListcxx . . $ NetworkConnection#supportsFriendList(c9857a73d68e59ba).()) |
| 581 | { |
| 582 | size = settings.beginReadArraycxx . . $ QSettings#beginReadArray(645d6210e0be3a78).("FRIENDEDLIST"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 583 | for (i = 0; i < size; ++i) |
| 584 | { |
| 585 | settings.setArrayIndexcxx . . $ QSettings#setArrayIndex(d4f767463ce0a6b3).(i); |
| 586 | friendedListcxx . . $ NetworkConnection#friendedList..push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(new FriendWatchListingcxx . . $ FriendWatchListing#FriendWatchListing(4e51b35ce1bea96b).( |
| 587 | settings.valuecxx . . $ QSettings#value(12a1b1749da49362).("name"cxx . . $ QString#QString(85c52e162fed56f9).).toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).(), |
| 588 | settings.valuecxx . . $ QSettings#value(12a1b1749da49362).("notify"cxx . . $ QString#QString(85c52e162fed56f9).).toBoolcxx . . $ QVariant#toBool(50ce9a9e25b4a850).())); |
| 589 | } |
| 590 | settings.endArraycxx . . $ QSettings#endArray(49f6e7a06ebc5aa8).(); |
| 591 | } |
| 592 | if(!supportsWatchListcxx . . $ NetworkConnection#supportsWatchList(c9857a73d68e59ba).()) |
| 593 | { |
| 594 | size = settings.beginReadArraycxx . . $ QSettings#beginReadArray(645d6210e0be3a78).("WATCHEDLIST"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 595 | for (i = 0; i < size; ++i) |
| 596 | { |
| 597 | settings.setArrayIndexcxx . . $ QSettings#setArrayIndex(d4f767463ce0a6b3).(i); |
| 598 | watchedListcxx . . $ NetworkConnection#watchedList..push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(new FriendWatchListingcxx . . $ FriendWatchListing#FriendWatchListing(4e51b35ce1bea96b).( |
| 599 | settings.valuecxx . . $ QSettings#value(12a1b1749da49362).("name"cxx . . $ QString#QString(85c52e162fed56f9).).toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).(), |
| 600 | settings.valuecxx . . $ QSettings#value(12a1b1749da49362).("notify"cxx . . $ QString#QString(85c52e162fed56f9).).toBoolcxx . . $ QVariant#toBool(50ce9a9e25b4a850).())); |
| 601 | } |
| 602 | settings.endArraycxx . . $ QSettings#endArray(49f6e7a06ebc5aa8).(); |
| 603 | } |
| 604 | if(!supportsBlockListcxx . . $ NetworkConnection#supportsBlockList(c9857a73d68e59ba).()) |
| 605 | { |
| 606 | size = settings.beginReadArraycxx . . $ QSettings#beginReadArray(645d6210e0be3a78).("BLOCKEDLIST"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 607 | for (i = 0; i < size; ++i) |
| 608 | { |
| 609 | settings.setArrayIndexcxx . . $ QSettings#setArrayIndex(d4f767463ce0a6b3).(i); |
| 610 | blockedListcxx . . $ NetworkConnection#blockedList..push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(new FriendWatchListingcxx . . $ FriendWatchListing#FriendWatchListing(4e51b35ce1bea96b).( |
| 611 | settings.valuecxx . . $ QSettings#value(12a1b1749da49362).("name"cxx . . $ QString#QString(85c52e162fed56f9).).toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).())); |
| 612 | } |
| 613 | settings.endArraycxx . . $ QSettings#endArray(49f6e7a06ebc5aa8).(); |
| 614 | } |
| 615 | } |
| 616 | |
| 617 | void NetworkConnectioncxx . . $ NetworkConnection#::savefriendswatchescxx . . $ NetworkConnection#savefriendswatches(49f6e7a06ebc5aa8).(void) |
| 618 | { |
| 619 | QSettingscxx . . $ QSettings# settingscxx . . $ QSettings#QSettings(749de1b6ae65bddd).; |
| 620 | int index; |
| 621 | if(!supportsFriendListcxx . . $ NetworkConnection#supportsFriendList(c9857a73d68e59ba).()) |
| 622 | { |
| 623 | settings.beginWriteArraycxx . . $ QSettings#beginWriteArray(29ed8fcd127906b1).("FRIENDEDLIST"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 624 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<FriendWatchListing * >::iteratorcxx . . $ std/vector#iterator# icxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(ced63f7c635d850d).; |
| 625 | index = 0; |
| 626 | for (i =cxx . . $ __gnu_cxx/__normal_iterator#`operator=`(23bb58531c03b779). friendedListcxx . . $ NetworkConnection#friendedList..begincxx . . $ std/vector#begin(55a6de06420d4903).(); i !=cxx . . $ __gnu_cxx/`operator!=`(30ee64f2df4eef8b). friendedListcxx . . $ NetworkConnection#friendedList..endcxx . . $ std/vector#end(55a6de06420d4903).(); i++cxx . . $ __gnu_cxx/__normal_iterator#operator++(6cefca3db4774be2).) |
| 627 | { |
| 628 | settings.setArrayIndexcxx . . $ QSettings#setArrayIndex(d4f767463ce0a6b3).(index); |
| 629 | settings.setValuecxx . . $ QSettings#setValue(1c60a90c724e6bfb).("name"cxx . . $ QString#QString(85c52e162fed56f9)., (cxx . . $ QVariant#QVariant(3520e46b33348bf6).*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i)->namecxx . . $ FriendWatchListing#name.); |
| 630 | settings.setValuecxx . . $ QSettings#setValue(1c60a90c724e6bfb).("notify"cxx . . $ QString#QString(85c52e162fed56f9)., (cxx . . $ QVariant#QVariant(b45ddcbc8423892c).*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i)->notifycxx . . $ FriendWatchListing#notify.); |
| 631 | delete (*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i); |
| 632 | index++; |
| 633 | } |
| 634 | settings.endArraycxx . . $ QSettings#endArray(49f6e7a06ebc5aa8).(); |
| 635 | } |
| 636 | if(!supportsWatchListcxx . . $ NetworkConnection#supportsWatchList(c9857a73d68e59ba).()) |
| 637 | { |
| 638 | settings.beginWriteArraycxx . . $ QSettings#beginWriteArray(29ed8fcd127906b1).("WATCHEDLIST"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 639 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<FriendWatchListing * >::iteratorcxx . . $ std/vector#iterator# icxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(ced63f7c635d850d).; |
| 640 | index = 0; |
| 641 | for (i =cxx . . $ __gnu_cxx/__normal_iterator#`operator=`(23bb58531c03b779). watchedListcxx . . $ NetworkConnection#watchedList..begincxx . . $ std/vector#begin(55a6de06420d4903).(); i !=cxx . . $ __gnu_cxx/`operator!=`(30ee64f2df4eef8b). watchedListcxx . . $ NetworkConnection#watchedList..endcxx . . $ std/vector#end(55a6de06420d4903).(); i++cxx . . $ __gnu_cxx/__normal_iterator#operator++(6cefca3db4774be2).) |
| 642 | { |
| 643 | settings.setArrayIndexcxx . . $ QSettings#setArrayIndex(d4f767463ce0a6b3).(index); |
| 644 | settings.setValuecxx . . $ QSettings#setValue(1c60a90c724e6bfb).("name"cxx . . $ QString#QString(85c52e162fed56f9)., (cxx . . $ QVariant#QVariant(3520e46b33348bf6).*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i)->namecxx . . $ FriendWatchListing#name.); |
| 645 | settings.setValuecxx . . $ QSettings#setValue(1c60a90c724e6bfb).("notify"cxx . . $ QString#QString(85c52e162fed56f9)., (cxx . . $ QVariant#QVariant(b45ddcbc8423892c).*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i)->notifycxx . . $ FriendWatchListing#notify.); |
| 646 | delete (*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i); |
| 647 | index++; |
| 648 | } |
| 649 | settings.endArraycxx . . $ QSettings#endArray(49f6e7a06ebc5aa8).(); |
| 650 | } |
| 651 | if(!supportsBlockListcxx . . $ NetworkConnection#supportsBlockList(c9857a73d68e59ba).()) |
| 652 | { |
| 653 | settings.beginWriteArraycxx . . $ QSettings#beginWriteArray(29ed8fcd127906b1).("BLOCKEDLIST"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 654 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<FriendWatchListing * >::iteratorcxx . . $ std/vector#iterator# icxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(ced63f7c635d850d).; |
| 655 | index = 0; |
| 656 | for (i =cxx . . $ __gnu_cxx/__normal_iterator#`operator=`(23bb58531c03b779). blockedListcxx . . $ NetworkConnection#blockedList..begincxx . . $ std/vector#begin(55a6de06420d4903).(); i !=cxx . . $ __gnu_cxx/`operator!=`(30ee64f2df4eef8b). blockedListcxx . . $ NetworkConnection#blockedList..endcxx . . $ std/vector#end(55a6de06420d4903).(); i++cxx . . $ __gnu_cxx/__normal_iterator#operator++(6cefca3db4774be2).) |
| 657 | { |
| 658 | settings.setArrayIndexcxx . . $ QSettings#setArrayIndex(d4f767463ce0a6b3).(index); |
| 659 | settings.setValuecxx . . $ QSettings#setValue(1c60a90c724e6bfb).("name"cxx . . $ QString#QString(85c52e162fed56f9)., (cxx . . $ QVariant#QVariant(3520e46b33348bf6).*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i)->namecxx . . $ FriendWatchListing#name.); |
| 660 | delete (*cxx . . $ __gnu_cxx/__normal_iterator#`operator*`(f9c37c6e427d43d6).i); |
| 661 | index++; |
| 662 | } |
| 663 | settings.endArraycxx . . $ QSettings#endArray(49f6e7a06ebc5aa8).(); |
| 664 | } |
| 665 | } |
| 666 | |
| 667 | /* Problem if messages come out of order */ |
| 668 | void NetworkConnectioncxx . . $ NetworkConnection#::latencyOnSendcxx . . $ NetworkConnection#latencyOnSend(49f6e7a06ebc5aa8).(void) |
| 669 | { |
| 670 | #ifdef LATENCY |
| 671 | gettimeofday(&latencyLast, NULL); |
| 672 | #endif //LATENCY |
| 673 | } |
| 674 | |
| 675 | void NetworkConnectioncxx . . $ NetworkConnection#::latencyOnRecvcxx . . $ NetworkConnection#latencyOnRecv(49f6e7a06ebc5aa8).(void) |
| 676 | { |
| 677 | #ifdef LATENCY |
| 678 | unsigned long ms; |
| 679 | struct timeval tv; |
| 680 | gettimeofday(&tv, NULL); |
| 681 | ms = (tv.tv_sec - latencyLast.tv_sec) * 1000; |
| 682 | ms += (tv.tv_usec - latencyLast.tv_usec); |
| 683 | latencyAverage += ms; |
| 684 | latencyAverage /= 2; |
| 685 | #endif //LATENCY |
| 686 | } |
| 687 | |
| 688 | void NetworkConnectioncxx . . $ NetworkConnection#::sendConsoleTextcxx . . $ NetworkConnection#sendConsoleText(85c52e162fed56f9).(const char * text) |
| 689 | { |
| 690 | //FIXME issue |
| 691 | if(console_dispatchcxx . . $ NetworkConnection#console_dispatch.) |
| 692 | console_dispatchcxx . . $ NetworkConnection#console_dispatch.->sendTextcxx . . $ ConsoleDispatch#sendText(85c52e162fed56f9).(text); |
| 693 | } |
| 694 | |
| 695 | /* I was thinking about breakng up the seeks and rooms by room dispatch, etc. |
| 696 | * originally, but if we're getting rid of the dispatches and we haven't |
| 697 | * yet seen anymore interesting use for a room dispatch then, we'll just |
| 698 | * let the network connection handle it for now. */ |
| 699 | /* Also, I'm not in a hurry to have the sub connections calling mainwindow |
| 700 | * functions, but it is global and it is awkward to call recvRoomListing within |
| 701 | * the subconnection FIXME */ |
| 702 | void NetworkConnectioncxx . . $ NetworkConnection#::recvRoomListingcxx . . $ NetworkConnection#recvRoomListing(cd0728ed85364d48).(class RoomListingcxx . . $ RoomListing# * r) |
| 703 | { |
| 704 | if(connectionWidgetcxx . . $ connectionWidget.) |
| 705 | connectionWidgetcxx . . $ connectionWidget.->recvRoomListingcxx . . $ ConnectionWidget#recvRoomListing(186c8f1f477699).(*r, true); |
| 706 | else |
| 707 | delete r; |
| 708 | } |
| 709 | |
| 710 | void NetworkConnectioncxx . . $ NetworkConnection#::recvChannelListingcxx . . $ NetworkConnection#recvChannelListing(1317f7c0eb828e93).(class ChannelListingcxx . . $ ChannelListing# * r) |
| 711 | { |
| 712 | if(connectionWidgetcxx . . $ connectionWidget.) |
| 713 | connectionWidgetcxx . . $ connectionWidget.->recvChannelListingcxx . . $ ConnectionWidget#recvChannelListing(c6c8d512b76a2c4).(*r, true); |
| 714 | else |
| 715 | delete r; |
| 716 | } |
| 717 | |
| 718 | void NetworkConnectioncxx . . $ NetworkConnection#::changeChannelcxx . . $ NetworkConnection#changeChannel(3520e46b33348bf6).(const QStringcxx . . $ QString# & s) |
| 719 | { |
| 720 | if(connectionWidgetcxx . . $ connectionWidget.) |
| 721 | connectionWidgetcxx . . $ connectionWidget.->changeChannelcxx . . $ ConnectionWidget#changeChannel(3520e46b33348bf6).(s); |
| 722 | } |
| 723 | |
| 724 | void NetworkConnectioncxx . . $ NetworkConnection#::recvSeekConditioncxx . . $ NetworkConnection#recvSeekCondition(c6d377b4419439f6).(class SeekConditioncxx . . $ SeekCondition# * s) |
| 725 | { |
| 726 | if(connectionWidgetcxx . . $ connectionWidget.) |
| 727 | connectionWidgetcxx . . $ connectionWidget.->recvSeekConditioncxx . . $ ConnectionWidget#recvSeekCondition(c6d377b4419439f6).(s); |
| 728 | else |
| 729 | delete s; |
| 730 | } |
| 731 | |
| 732 | void NetworkConnectioncxx . . $ NetworkConnection#::recvSeekCancelcxx . . $ NetworkConnection#recvSeekCancel(49f6e7a06ebc5aa8).(void) |
| 733 | { |
| 734 | if(connectionWidgetcxx . . $ connectionWidget.) |
| 735 | connectionWidgetcxx . . $ connectionWidget.->recvSeekCancelcxx . . $ ConnectionWidget#recvSeekCancel(49f6e7a06ebc5aa8).(); |
| 736 | } |
| 737 | |
| 738 | void NetworkConnectioncxx . . $ NetworkConnection#::recvSeekPlayercxx . . $ NetworkConnection#recvSeekPlayer(3458fe3960d5051).(QStringcxx . . $ QString# player, QStringcxx . . $ QString# condition) |
| 739 | { |
| 740 | if(connectionWidgetcxx . . $ connectionWidget.) |
| 741 | connectionWidgetcxx . . $ connectionWidget.->recvSeekPlayercxx . . $ ConnectionWidget#recvSeekPlayer(3458fe3960d5051).(playercxx . . $ QString#QString(132dd6869045752b)., conditioncxx . . $ QString#QString(132dd6869045752b).); |
| 742 | } |
| 743 | |
| 744 | const PlayerListingcxx . . $ PlayerListing# * NetworkConnectioncxx . . $ NetworkConnection#::getOurListingcxx . . $ NetworkConnection#getOurListing(c84291d55c8466c6).(void) |
| 745 | { |
| 746 | if (ourListingcxx . . $ NetworkConnection#ourListing. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 747 | ourListingcxx . . $ NetworkConnection#ourListing. = getDefaultRoomcxx . . $ NetworkConnection#getDefaultRoom(93e93f117be81b18).()->getPlayerListingcxx . . $ Room#getPlayerListing(d3f53ac2de9f0b45).(getUsernamecxx . . $ NetworkConnection#getUsername(a2fb7a6ce195d51).()); |
| 748 | return ourListingcxx . . $ NetworkConnection#ourListing.; |
| 749 | } |
| 750 | |
| 751 | /* FIXME These are really more like netdispatch type functions, but the registries |
| 752 | * are on the connection right now. We might want to move them though at |
| 753 | * some point if that does seem to make more sense in terms of the namespace. */ |
| 754 | BoardDispatchcxx . . $ BoardDispatch# * NetworkConnectioncxx . . $ NetworkConnection#::getBoardDispatchcxx . . $ NetworkConnection#getBoardDispatch(f34f0704202202).(unsigned int game_id) |
| 755 | { |
| 756 | BoardDispatchcxx . . $ BoardDispatch# * result = getIfBoardDispatchcxx . . $ NetworkConnection#getIfBoardDispatch(f34f0704202202).(game_id); |
| 757 | if (result == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 758 | { |
| 759 | result = this->getDefaultRoomcxx . . $ NetworkConnection#getDefaultRoom(93e93f117be81b18).()->getNewBoardDispatchcxx . . $ Room#getNewBoardDispatch(f34f0704202202).(game_id); |
| 760 | boardDispatchMapcxx . . $ NetworkConnection#boardDispatchMap..insertcxx . . $ QMap#insert(929a1ed410fe8423).(game_id, result); |
| 761 | } |
| 762 | return result; |
| 763 | } |
| 764 | |
| 765 | BoardDispatchcxx . . $ BoardDispatch# * NetworkConnectioncxx . . $ NetworkConnection#::getIfBoardDispatchcxx . . $ NetworkConnection#getIfBoardDispatch(f34f0704202202).(unsigned int game_id) |
| 766 | { |
| 767 | QMapcxx . . $ QMap# <unsigned int, BoardDispatch *>::const_iteratorcxx . . $ QMap#const_iterator# i = boardDispatchMapcxx . . $ QMap#const_iterator#const_iterator(fad78f9efe814c03)..findcxx . . $ QMap#find(9e2276816f28e801).(game_id); |
| 768 | if(i ==cxx . . $ QMap#const_iterator#`operator==`(afb29c289d8ce2db). boardDispatchMapcxx . . $ QMap#const_iterator#const_iterator(fad78f9efe814c03)..endcxx . . $ QMap#end(2d49d7eeb2586d1c).()) |
| 769 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 770 | else |
| 771 | return i.valuecxx . . $ QMap#const_iterator#value(bdbd05d619d62250).(); |
| 772 | } |
| 773 | |
| 774 | void NetworkConnectioncxx . . $ NetworkConnection#::closeBoardDispatchcxx . . $ NetworkConnection#closeBoardDispatch(cb2f890c2fdad230).(unsigned int game_id) |
| 775 | { |
| 776 | QMapcxx . . $ QMap# <unsigned int, BoardDispatch *>::iteratorcxx . . $ QMap#iterator# i = boardDispatchMapcxx . . $ NetworkConnection#boardDispatchMap..findcxx . . $ QMap#find(9e2276816f28e801).(game_id); |
| 777 | if(i ==cxx . . $ QMap#iterator#`operator==`(8a5a4c9a0d42c534). boardDispatchMapcxx . . $ NetworkConnection#boardDispatchMap..endcxx . . $ QMap#end(2d49d7eeb2586d1c).()) |
| 778 | return; |
| 779 | |
| 780 | delete i.valuecxx . . $ QMap#iterator#value(51f62fb05f27f6a2).(); |
| 781 | boardDispatchMapcxx . . $ NetworkConnection#boardDispatchMap..erasecxx . . $ QMap#erase(bbdfa0de74344179).(i); |
| 782 | } |
| 783 | |
| 784 | int NetworkConnectioncxx . . $ NetworkConnection#::getBoardDispatchescxx . . $ NetworkConnection#getBoardDispatches(b126dc7c1de90089).(void) |
| 785 | { |
| 786 | return boardDispatchMapcxx . . $ NetworkConnection#boardDispatchMap..countcxx . . $ QMap#count(455f465bc33b4cdf).(); |
| 787 | } |
| 788 | |
| 789 | GameDialogcxx . . $ GameDialog# * NetworkConnectioncxx . . $ NetworkConnection#::getGameDialogcxx . . $ NetworkConnection#getGameDialog(3dcc94127826259).(const PlayerListingcxx . . $ PlayerListing# * opponent) |
| 790 | { |
| 791 | QMapcxx . . $ QMap# <const PlayerListing *, GameDialog *>::const_iteratorcxx . . $ QMap#const_iterator# i = gameDialogMapcxx . . $ QMap#const_iterator#const_iterator(fad78f9efe814c03)..findcxx . . $ QMap#find(9e2276816f28e801).(opponent); |
| 792 | if(i ==cxx . . $ QMap#const_iterator#`operator==`(afb29c289d8ce2db). gameDialogMapcxx . . $ QMap#const_iterator#const_iterator(fad78f9efe814c03)..endcxx . . $ QMap#end(2d49d7eeb2586d1c).()) |
| 793 | { |
| 794 | // Create if it does not exist |
| 795 | GameDialogcxx . . $ GameDialog# * newDialog = new GameDialogcxx . . $ GameDialog#GameDialog(7882215976d6ada).(this, opponent); |
| 796 | gameDialogMapcxx . . $ NetworkConnection#gameDialogMap..insertcxx . . $ QMap#insert(929a1ed410fe8423).(opponent, newDialog); |
| 797 | return newDialog; |
| 798 | } |
| 799 | else |
| 800 | return i.valuecxx . . $ QMap#const_iterator#value(bdbd05d619d62250).(); |
| 801 | } |
| 802 | |
| 803 | GameDialogcxx . . $ GameDialog# * NetworkConnectioncxx . . $ NetworkConnection#::getIfGameDialogcxx . . $ NetworkConnection#getIfGameDialog(3dcc94127826259).(const PlayerListingcxx . . $ PlayerListing# * opponent) |
| 804 | { |
| 805 | QMapcxx . . $ QMap# <const PlayerListing *, GameDialog *>::const_iteratorcxx . . $ QMap#const_iterator# i = gameDialogMapcxx . . $ QMap#const_iterator#const_iterator(fad78f9efe814c03)..findcxx . . $ QMap#find(9e2276816f28e801).(opponent); |
| 806 | if(i ==cxx . . $ QMap#const_iterator#`operator==`(afb29c289d8ce2db). gameDialogMapcxx . . $ QMap#const_iterator#const_iterator(fad78f9efe814c03)..endcxx . . $ QMap#end(2d49d7eeb2586d1c).()) |
| 807 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 808 | else |
| 809 | return i.valuecxx . . $ QMap#const_iterator#value(bdbd05d619d62250).(); |
| 810 | } |
| 811 | |
| 812 | void NetworkConnectioncxx . . $ NetworkConnection#::closeGameDialogcxx . . $ NetworkConnection#closeGameDialog(cac334474c82cf3a).(const PlayerListingcxx . . $ PlayerListing# * opponent) |
| 813 | { |
| 814 | QMapcxx . . $ QMap# <const PlayerListing *, GameDialog *>::iteratorcxx . . $ QMap#iterator# i = gameDialogMapcxx . . $ NetworkConnection#gameDialogMap..findcxx . . $ QMap#find(9e2276816f28e801).(opponent); |
| 815 | if(i ==cxx . . $ QMap#iterator#`operator==`(8a5a4c9a0d42c534). gameDialogMapcxx . . $ NetworkConnection#gameDialogMap..endcxx . . $ QMap#end(2d49d7eeb2586d1c).()) |
| 816 | return; |
| 817 | |
| 818 | i.valuecxx . . $ QMap#iterator#value(51f62fb05f27f6a2).()->deleteLatercxx . . $ QObject#deleteLater(49f6e7a06ebc5aa8).(); |
| 819 | gameDialogMapcxx . . $ NetworkConnection#gameDialogMap..erasecxx . . $ QMap#erase(bbdfa0de74344179).(i); |
| 820 | } |
| 821 | |
| 822 | MatchRequestcxx . . $ MatchRequest# * NetworkConnectioncxx . . $ NetworkConnection#::getAndCloseGameDialogcxx . . $ NetworkConnection#getAndCloseGameDialog(847f6df3a908f59b).(const PlayerListingcxx . . $ PlayerListing# * opponent) |
| 823 | { |
| 824 | GameDialogcxx . . $ GameDialog# * gd = getIfGameDialogcxx . . $ NetworkConnection#getIfGameDialog(3dcc94127826259).(opponent); |
| 825 | MatchRequestcxx . . $ MatchRequest# * new_mr = 0; |
| 826 | if(gd) |
| 827 | { |
| 828 | MatchRequestcxx . . $ MatchRequest# * mr = gd->getMatchRequestcxx . . $ GameDialog#getMatchRequest(bd616a0a6add31e0).(); |
| 829 | new_mr = new MatchRequestcxx . . $ MatchRequest#(*mr); |
| 830 | closeGameDialogcxx . . $ NetworkConnection#closeGameDialog(cac334474c82cf3a).(opponent); |
| 831 | } |
| 832 | else |
| 833 | qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!("Couldn't find gamedialog for opponent: %s", opponent->namecxx . . $ PlayerListing#name..toLatin1cxx . . $ QString#toLatin1(ef52b713090bc85a).().constDatacxx . . $ QByteArray#constData(a9f41ea0e82d88cf).()); |
| 834 | return new_mr; |
| 835 | } |