diff --git a/src/db/common/serverdbgeneric.cpp b/src/db/common/serverdbgeneric.cpp index 2123d181..713436ad 100644 --- a/src/db/common/serverdbgeneric.cpp +++ b/src/db/common/serverdbgeneric.cpp @@ -54,26 +54,23 @@ ServerDBGeneric::AsyncPlayerLogin(unsigned requestId, const string &/*playerName m_ioService->post(boost::bind(&ServerDBCallback::PlayerLoginFailed, &m_callback, requestId)); } -bool +void ServerDBGeneric::PlayerLogout(db_id /*playerId*/) { - return false; } void -ServerDBGeneric::AsyncCreateGame(unsigned requestId, const db_list &/*players*/) +ServerDBGeneric::AsyncCreateGame(unsigned requestId, const string &/*gameName*/) { m_ioService->post(boost::bind(&ServerDBCallback::CreateGameFailed, &m_callback, requestId)); } -bool +void ServerDBGeneric::SetGamePlayerPlace(db_id /*gameId*/, db_id /*playerId*/, unsigned /*place*/) { - return false; } -bool +void ServerDBGeneric::EndGame(db_id /*gameId*/) { - return false; } diff --git a/src/db/serverdbcallback.h b/src/db/serverdbcallback.h index b80f0176..4f312576 100644 --- a/src/db/serverdbcallback.h +++ b/src/db/serverdbcallback.h @@ -36,6 +36,8 @@ public: virtual void ConnectSuccess() = 0; virtual void ConnectFailed(const std::string &error) = 0; + virtual void QueryError(const std::string &error) = 0; + virtual void PlayerLoginSuccess(unsigned requestId, db_id playerId) = 0; virtual void PlayerLoginFailed(unsigned requestId) = 0; diff --git a/src/db/serverdbgeneric.h b/src/db/serverdbgeneric.h index 11209c6c..2fb20186 100644 --- a/src/db/serverdbgeneric.h +++ b/src/db/serverdbgeneric.h @@ -39,11 +39,11 @@ public: virtual void Stop(); virtual void AsyncPlayerLogin(unsigned requestId, const std::string &playerName, const std::string &secretString); - virtual bool PlayerLogout(db_id playerId); + virtual void PlayerLogout(db_id playerId); - virtual void AsyncCreateGame(unsigned requestId, const db_list &players); - virtual bool SetGamePlayerPlace(db_id gameId, db_id playerId, unsigned place); - virtual bool EndGame(db_id gameId); + virtual void AsyncCreateGame(unsigned requestId, const std::string &gameName); + virtual void SetGamePlayerPlace(db_id gameId, db_id playerId, unsigned place); + virtual void EndGame(db_id gameId); private: boost::shared_ptr m_ioService; diff --git a/src/db/serverdbinterface.h b/src/db/serverdbinterface.h index 8fbe96e3..5ad1dd83 100644 --- a/src/db/serverdbinterface.h +++ b/src/db/serverdbinterface.h @@ -39,11 +39,11 @@ public: virtual void Stop() = 0; virtual void AsyncPlayerLogin(unsigned requestId, const std::string &playerName, const std::string &secretString) = 0; - virtual bool PlayerLogout(db_id playerId) = 0; + virtual void PlayerLogout(db_id playerId) = 0; - virtual void AsyncCreateGame(unsigned requestId, const db_list &players) = 0; - virtual bool SetGamePlayerPlace(db_id gameId, db_id playerId, unsigned place) = 0; - virtual bool EndGame(db_id gameId) = 0; + virtual void AsyncCreateGame(unsigned requestId, const std::string &gameName) = 0; + virtual void SetGamePlayerPlace(db_id gameId, db_id playerId, unsigned place) = 0; + virtual void EndGame(db_id gameId) = 0; }; #endif diff --git a/src/net/common/serverlobbythread.cpp b/src/net/common/serverlobbythread.cpp index 37b73c4d..97c37b46 100644 --- a/src/net/common/serverlobbythread.cpp +++ b/src/net/common/serverlobbythread.cpp @@ -102,6 +102,12 @@ public: virtual void ConnectFailed(const string &error) { + // TODO + } + + virtual void QueryError(const std::string &error) + { + // TODO } virtual void PlayerLoginSuccess(unsigned requestId, db_id dbPlayerId)