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

58 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>
#include "Forwards.h"
const std::string LOBBY_VERSION = "0.0.5";
namespace Core
{
class LobbySession;
class ConfigMgr;
2017-08-08 13:53:47 +02:00
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;
boost::shared_ptr< ConfigMgr > m_pConfig;
2017-09-10 02:24:29 +02:00
2017-08-08 13:53:47 +02:00
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;
}
2017-09-10 02:24:29 +02:00
boost::shared_ptr< ConfigMgr > getConfig() const;
2017-08-08 13:53:47 +02:00
LobbySessionPtr getSession( char* sessionId );
uint32_t m_numConnections;
};
}
#endif