2014-01-07 10:26:09 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
// Created by [Dennis Andersen] [2013]
|
|
|
|
/////////////////////////////////////////////////////////////////////
|
2013-12-13 23:47:16 +01:00
|
|
|
#ifndef DANBIASSERVER_MAINLOBBY_H
|
|
|
|
#define DANBIASSERVER_MAINLOBBY_H
|
2013-12-12 09:33:59 +01:00
|
|
|
|
2014-01-07 10:26:09 +01:00
|
|
|
#include "NetworkSession.h"
|
2013-12-19 12:32:23 +01:00
|
|
|
#include "GameLobby.h"
|
|
|
|
#include <GameProtocols.h>
|
2013-12-18 13:07:10 +01:00
|
|
|
#include <PostBox\IPostBox.h>
|
2013-12-12 09:33:59 +01:00
|
|
|
|
|
|
|
namespace DanBias
|
|
|
|
{
|
|
|
|
class MainLobby :public NetworkSession
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MainLobby();
|
2013-12-18 13:07:10 +01:00
|
|
|
virtual~MainLobby();
|
2013-12-12 09:33:59 +01:00
|
|
|
void Release();
|
|
|
|
|
2013-12-13 23:47:16 +01:00
|
|
|
void Frame();
|
|
|
|
|
2013-12-19 12:32:23 +01:00
|
|
|
Oyster::IPostBox<NetworkSession::NetEvent>* GetPostbox();
|
|
|
|
|
2013-12-12 09:33:59 +01:00
|
|
|
private:
|
2013-12-16 09:50:23 +01:00
|
|
|
void ParseEvents();
|
2014-01-07 10:26:09 +01:00
|
|
|
void ParseProtocol(Oyster::Network::CustomNetProtocol& p, DanBias::LobbyClient* c);
|
2013-12-19 12:32:23 +01:00
|
|
|
|
2014-01-07 10:26:09 +01:00
|
|
|
void CreateGame(GameLogic::Protocol_LobbyCreateGame& p, DanBias::LobbyClient* c);
|
|
|
|
void JoinLobby(GameLogic::Protocol_LobbyJoinLobby& p, DanBias::LobbyClient* c);
|
2013-12-19 12:32:23 +01:00
|
|
|
|
2014-01-07 10:26:09 +01:00
|
|
|
void SendUpdate();
|
2013-12-12 09:33:59 +01:00
|
|
|
|
2013-12-18 08:44:10 +01:00
|
|
|
private:
|
2013-12-19 12:32:23 +01:00
|
|
|
Oyster::IPostBox<NetworkSession::NetEvent> *box;
|
|
|
|
Utility::DynamicMemory::DynamicArray<Utility::DynamicMemory::SmartPointer<GameLobby>> gameLobby;
|
2014-01-07 10:26:09 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
friend class AdminInterface;
|
2013-12-12 09:33:59 +01:00
|
|
|
};
|
|
|
|
}//End namespace DanBias
|
|
|
|
#endif // !DANBIASGAME_GAMELOBBY_H
|