1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-28 15:17:46 +00:00
sapphire/src/servers/Server_Lobby/ServerLobby.h

56 lines
1 KiB
C
Raw Normal View History

2017-08-08 13:53:47 +02:00
#pragma once
#ifndef _CSERVERLOBBY_H_
#define _CSERVERLOBBY_H_
#include <map>
#include <boost/shared_ptr.hpp>
2017-08-19 00:18:40 +02:00
#include <src/servers/Server_Common/Config/XMLConfig.h>
2017-08-08 13:53:47 +02:00
#include "Forwards.h"
const std::string LOBBY_VERSION = "0.0.5";
namespace Core
{
class LobbySession;
class XMLConfig;
typedef std::map< std::string, LobbySessionPtr > LobbySessionMap;
class ServerLobby
{
friend class LobbyConnection;
private:
LobbySessionMap m_sessionMap;
std::string m_configPath;
uint16_t m_port;
std::string m_ip;
public:
ServerLobby( const std::string& configPath );
~ServerLobby( void );
void run( int32_t argc, char* argv[] );
2017-08-08 13:53:47 +02:00
bool loadSettings( int32_t argc, char* argv[] );
2017-08-08 13:53:47 +02:00
void addSession( char* sessionId, LobbySessionPtr pSession )
{
m_sessionMap[std::string( sessionId )] = pSession;
}
LobbySessionPtr getSession( char* sessionId );
uint32_t m_numConnections;
boost::shared_ptr<XMLConfig> m_pConfig;
};
}
#endif