Making the network part compile.

This commit is contained in:
lotodore
2010-03-29 12:33:12 +00:00
parent c761d10684
commit 866e9b9e48
3 changed files with 38 additions and 0 deletions
+2
View File
@@ -78,6 +78,8 @@ public:
void SendResetTimeout();
void SendAskKickPlayer(unsigned playerId);
void SendVoteKick(bool doKick);
void SendInvitePlayerToCurrentGame(unsigned playerId);
void SendRejectGameInvitation(unsigned gameId, DenyGameInvitationReason reason);
void StartAsyncRead();
void HandleRead(const boost::system::error_code& ec, size_t bytesRead);
+12
View File
@@ -310,6 +310,18 @@ ClientThread::SendVoteKick(bool doKick)
m_ioService->post(boost::bind(&ClientThread::SendSessionPacket, shared_from_this(), packet));
}
void
ClientThread::SendInvitePlayerToCurrentGame(unsigned playerId)
{
// TODO
}
void
ClientThread::SendRejectGameInvitation(unsigned gameId, DenyGameInvitationReason reason)
{
// TODO
}
void
ClientThread::StartAsyncRead()
{
+24
View File
@@ -432,6 +432,30 @@ Session::setLogin(const std::string &userName, const std::string &password, bool
myNetClient->SetLogin(userName, password, isGuest);
}
void
Session::invitePlayerToCurrentGame(unsigned playerId)
{
if (!myNetClient)
return; // only act if client is running.
myNetClient->SendInvitePlayerToCurrentGame(playerId);
}
void
Session::acceptGameInvitation(unsigned gameId)
{
if (!myNetClient)
return; // only act if client is running.
myNetClient->SendJoinGame(gameId, "");
}
void
Session::rejectGameInvitation(unsigned gameId, DenyGameInvitationReason reason)
{
if (!myNetClient)
return; // only act if client is running.
myNetClient->SendRejectGameInvitation(gameId, reason);
}
void Session::voteKick(bool doKick)
{
if (!myNetClient)