Preparing admin functions in PokerTH client.
This commit is contained in:
@@ -35,6 +35,8 @@
|
||||
|
||||
#include <db/dbdefs.h>
|
||||
#include <string>
|
||||
#include <list>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
// Callback operations are posted using the io service,
|
||||
// and will therefore be executed in the io service thread.
|
||||
@@ -44,11 +46,11 @@ public:
|
||||
virtual ~ServerDBCallback();
|
||||
|
||||
virtual void ConnectSuccess() = 0;
|
||||
virtual void ConnectFailed(const std::string &error) = 0;
|
||||
virtual void ConnectFailed(std::string error) = 0;
|
||||
|
||||
virtual void QueryError(const std::string &error) = 0;
|
||||
virtual void QueryError(std::string error) = 0;
|
||||
|
||||
virtual void PlayerLoginSuccess(unsigned requestId, const DBPlayerData &dbPlayerData) = 0;
|
||||
virtual void PlayerLoginSuccess(unsigned requestId, boost::shared_ptr<DBPlayerData> dbPlayerData) = 0;
|
||||
virtual void PlayerLoginFailed(unsigned requestId) = 0;
|
||||
virtual void PlayerLoginBlocked(unsigned requestId) = 0;
|
||||
|
||||
@@ -63,6 +65,8 @@ public:
|
||||
|
||||
virtual void ReportGameSuccess(unsigned requestId, unsigned replyId) = 0;
|
||||
virtual void ReportGameFailed(unsigned requestId, unsigned replyId) = 0;
|
||||
|
||||
virtual void PlayerAdminList(unsigned requestId, std::list<DB_id> adminList) = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -62,6 +62,9 @@ public:
|
||||
virtual void AsyncReportAvatar(unsigned requestId, unsigned replyId, DB_id reportedPlayerId, const std::string &avatarHash, const std::string &avatarType, DB_id *byPlayerId);
|
||||
virtual void AsyncReportGame(unsigned requestId, unsigned replyId, DB_id *creatorPlayerId, unsigned gameId, const std::string &gameName, DB_id *byPlayerId);
|
||||
|
||||
virtual void AsyncQueryAdminPlayers(unsigned requestId);
|
||||
virtual void AsyncBlockPlayer(unsigned requestId, DB_id playerId, int valid, int active);
|
||||
|
||||
private:
|
||||
boost::shared_ptr<boost::asio::io_service> m_ioService;
|
||||
ServerDBCallback &m_callback;
|
||||
|
||||
@@ -61,6 +61,9 @@ public:
|
||||
|
||||
virtual void AsyncReportAvatar(unsigned requestId, unsigned replyId, DB_id reportedPlayerId, const std::string &avatarHash, const std::string &avatarType, DB_id *byPlayerId) = 0;
|
||||
virtual void AsyncReportGame(unsigned requestId, unsigned replyId, DB_id *creatorPlayerId, unsigned gameId, const std::string &gameName, DB_id *byPlayerId) = 0;
|
||||
|
||||
virtual void AsyncQueryAdminPlayers(unsigned requestId) = 0;
|
||||
virtual void AsyncBlockPlayer(unsigned requestId, DB_id playerId, int valid, int active) = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -59,6 +59,9 @@ public:
|
||||
|
||||
virtual void AsyncReportAvatar(unsigned /*requestId*/, unsigned /*replyId*/, DB_id /*reportedPlayerId*/, const std::string &/*avatarHash*/, const std::string &/*avatarType*/, DB_id * /*byPlayerId*/) {}
|
||||
virtual void AsyncReportGame(unsigned /*requestId*/, unsigned /*replyId*/, DB_id * /*creatorPlayerId*/, unsigned /*gameId*/, const std::string &/*gameName*/, DB_id * /*byPlayerId*/) {}
|
||||
|
||||
virtual void AsyncQueryAdminPlayers(unsigned /*requestId*/) {}
|
||||
virtual void AsyncBlockPlayer(unsigned /*requestId*/, DB_id /*playerId*/, int /*valid*/, int /*active*/) {}
|
||||
};
|
||||
|
||||
#endif // _SERVERDBNOACTION_H_
|
||||
|
||||
Reference in New Issue
Block a user