2011-07-02 14:38:06 +00:00
|
|
|
/*****************************************************************************
|
|
|
|
|
* PokerTH - The open source texas holdem engine *
|
2012-12-25 15:06:23 +01:00
|
|
|
* Copyright (C) 2006-2012 Felix Hammer, Florian Thauer, Lothar May *
|
2011-07-02 14:38:06 +00:00
|
|
|
* *
|
|
|
|
|
* This program is free software: you can redistribute it and/or modify *
|
|
|
|
|
* it under the terms of the GNU Affero General Public License as *
|
|
|
|
|
* published by the Free Software Foundation, either version 3 of the *
|
|
|
|
|
* License, or (at your option) any later version. *
|
|
|
|
|
* *
|
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
|
* GNU Affero General Public License for more details. *
|
|
|
|
|
* *
|
|
|
|
|
* You should have received a copy of the GNU Affero General Public License *
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
2012-12-25 15:06:23 +01:00
|
|
|
* *
|
|
|
|
|
* *
|
|
|
|
|
* Additional permission under GNU AGPL version 3 section 7 *
|
|
|
|
|
* *
|
|
|
|
|
* If you modify this program, or any covered work, by linking or *
|
|
|
|
|
* combining it with the OpenSSL project's OpenSSL library (or a *
|
|
|
|
|
* modified version of that library), containing parts covered by the *
|
|
|
|
|
* terms of the OpenSSL or SSLeay licenses, the authors of PokerTH *
|
|
|
|
|
* (Felix Hammer, Florian Thauer, Lothar May) grant you additional *
|
|
|
|
|
* permission to convey the resulting work. *
|
|
|
|
|
* Corresponding Source for a non-source form of such a combination *
|
|
|
|
|
* shall include the source code for the parts of OpenSSL used as well *
|
|
|
|
|
* as that of the covered work. *
|
2011-07-02 14:38:06 +00:00
|
|
|
*****************************************************************************/
|
2007-11-16 15:24:25 +00:00
|
|
|
/* Callback interface for network client gui. */
|
|
|
|
|
|
|
|
|
|
#ifndef _CLIENTCALLBACK_H_
|
|
|
|
|
#define _CLIENTCALLBACK_H_
|
|
|
|
|
|
|
|
|
|
#include <boost/shared_ptr.hpp>
|
2009-05-07 22:36:51 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
2007-11-16 15:24:25 +00:00
|
|
|
#include <game_defs.h>
|
|
|
|
|
#include <gamedata.h>
|
|
|
|
|
|
|
|
|
|
class Game;
|
|
|
|
|
|
|
|
|
|
class ClientCallback
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
virtual ~ClientCallback();
|
|
|
|
|
|
|
|
|
|
virtual void SignalNetClientConnect(int actionID) = 0;
|
|
|
|
|
virtual void SignalNetClientGameInfo(int actionID) = 0;
|
|
|
|
|
virtual void SignalNetClientError(int errorID, int osErrorID) = 0;
|
|
|
|
|
virtual void SignalNetClientNotification(int notificationId) = 0;
|
|
|
|
|
virtual void SignalNetClientStatsUpdate(const ServerStats &stats) = 0;
|
2008-03-04 23:47:45 +00:00
|
|
|
virtual void SignalNetClientShowTimeoutDialog(NetTimeoutReason reason, unsigned remainingSec) = 0;
|
2007-11-16 15:24:25 +00:00
|
|
|
virtual void SignalNetClientRemovedFromGame(int notificationId) = 0;
|
|
|
|
|
|
|
|
|
|
virtual void SignalNetClientGameListNew(unsigned gameId) = 0;
|
|
|
|
|
virtual void SignalNetClientGameListRemove(unsigned gameId) = 0;
|
|
|
|
|
virtual void SignalNetClientGameListUpdateMode(unsigned gameId, GameMode mode) = 0;
|
|
|
|
|
virtual void SignalNetClientGameListUpdateAdmin(unsigned gameId, unsigned adminPlayerId) = 0;
|
|
|
|
|
virtual void SignalNetClientGameListPlayerJoined(unsigned gameId, unsigned playerId) = 0;
|
|
|
|
|
virtual void SignalNetClientGameListPlayerLeft(unsigned gameId, unsigned playerId) = 0;
|
2013-08-19 22:50:56 +02:00
|
|
|
virtual void SignalNetClientGameListSpectatorJoined(unsigned gameId, unsigned playerId) = 0;
|
|
|
|
|
virtual void SignalNetClientGameListSpectatorLeft(unsigned gameId, unsigned playerId) = 0;
|
2007-11-16 15:24:25 +00:00
|
|
|
|
|
|
|
|
virtual void SignalNetClientGameStart(boost::shared_ptr<Game> game) = 0;
|
2010-03-27 12:50:05 +00:00
|
|
|
virtual void SignalNetClientSelfJoined(unsigned playerId, const std::string &playerName, bool isGameAdmin) = 0;
|
|
|
|
|
virtual void SignalNetClientPlayerJoined(unsigned playerId, const std::string &playerName, bool isGameAdmin) = 0;
|
2007-11-16 15:24:25 +00:00
|
|
|
virtual void SignalNetClientPlayerChanged(unsigned playerId, const std::string &newPlayerName) = 0;
|
2008-11-25 23:19:34 +00:00
|
|
|
virtual void SignalNetClientPlayerLeft(unsigned playerId, const std::string &playerName, int removeReason) = 0;
|
2013-08-19 22:50:56 +02:00
|
|
|
virtual void SignalNetClientSpectatorJoined(unsigned playerId, const std::string &playerName) = 0;
|
|
|
|
|
virtual void SignalNetClientSpectatorLeft(unsigned playerId, const std::string &playerName, int removeReason) = 0;
|
2007-11-16 15:24:25 +00:00
|
|
|
virtual void SignalNetClientNewGameAdmin(unsigned playerId, const std::string &playerName) = 0;
|
|
|
|
|
|
2009-08-15 10:25:13 +00:00
|
|
|
virtual void SignalNetClientGameChatMsg(const std::string &playerName, const std::string &msg) = 0;
|
|
|
|
|
virtual void SignalNetClientLobbyChatMsg(const std::string &playerName, const std::string &msg) = 0;
|
2011-02-11 23:02:29 +00:00
|
|
|
virtual void SignalNetClientPrivateChatMsg(const std::string &playerName, const std::string &msg) = 0;
|
2008-12-26 16:47:14 +00:00
|
|
|
virtual void SignalNetClientMsgBox(const std::string &msg) = 0;
|
2011-01-30 16:20:47 +00:00
|
|
|
virtual void SignalNetClientMsgBox(unsigned msgId) = 0;
|
2007-11-16 15:24:25 +00:00
|
|
|
virtual void SignalNetClientWaitDialog() = 0;
|
2010-07-17 21:11:12 +00:00
|
|
|
|
2009-11-14 12:39:25 +00:00
|
|
|
virtual void SignalNetClientServerListAdd(unsigned serverId) = 0;
|
|
|
|
|
virtual void SignalNetClientServerListClear() = 0;
|
|
|
|
|
virtual void SignalNetClientServerListShow() = 0;
|
|
|
|
|
|
|
|
|
|
virtual void SignalNetClientLoginShow() = 0;
|
2011-08-08 19:50:28 +00:00
|
|
|
virtual void SignalNetClientRejoinPossible(unsigned gameId) = 0;
|
2010-07-17 21:11:12 +00:00
|
|
|
virtual void SignalNetClientPostRiverShowCards(unsigned playerId) = 0;
|
2009-04-05 13:02:25 +00:00
|
|
|
|
2009-08-15 22:20:19 +00:00
|
|
|
virtual void SignalLobbyPlayerJoined(unsigned playerId, const std::string &nickName) = 0;
|
|
|
|
|
virtual void SignalLobbyPlayerKicked(const std::string &nickName, const std::string &byWhom, const std::string &reason) = 0;
|
|
|
|
|
virtual void SignalLobbyPlayerLeft(unsigned playerId) = 0;
|
|
|
|
|
|
2010-03-29 12:22:41 +00:00
|
|
|
virtual void SignalSelfGameInvitation(unsigned gameId, unsigned playerIdFrom) = 0;
|
|
|
|
|
virtual void SignalPlayerGameInvitation(unsigned gameId, unsigned playerIdWho, unsigned playerIdFrom) = 0;
|
|
|
|
|
virtual void SignalRejectedGameInvitation(unsigned gameId, unsigned playerIdWho, DenyGameInvitationReason reason) = 0;
|
2009-04-05 13:02:25 +00:00
|
|
|
};
|
2007-11-16 15:24:25 +00:00
|
|
|
|
|
|
|
|
#endif
|