Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
NetLobbyServer Class Reference

#include <NetLobbyServer.h>

Inheritance diagram for NetLobbyServer:
NetLobby

List of all members.

Public Member Functions

 NetLobbyServer ()
virtual ~NetLobbyServer ()
int operator== (const NetLobbyServer &s) const
virtual void ExecFrame ()
virtual bool IsHost () const
virtual bool IsServer () const
virtual void BanUser (NetUser *user)
virtual void AddUser (NetUser *user)
virtual void DelUser (NetUser *user)
virtual void SendUsers ()
virtual void RequestAuth (NetUser *user)
virtual void AddChat (NetUser *user, const char *msg, bool route=true)
virtual void ClearChat ()
virtual void SaveChat ()
virtual List< NetUnitEntry > & GetUnitMap ()
virtual void MapUnit (int n, const char *user, bool lock=false)
virtual void UnmapUnit (const char *user)
virtual void SendUnits ()
virtual void SelectMission (DWORD id)
virtual Text Serialize (Mission *m, NetUser *u=0)
virtual MissionGetSelectedMission ()
virtual Text GetServerName () const
virtual void SetServerName (const char *s)
virtual Text GetServerMission () const
virtual void SetServerMission (const char *script)
virtual void GameStart ()
virtual void GameStop ()
virtual void GameOn ()
virtual void GameOff ()
- Public Member Functions inherited from NetLobby
 NetLobby (bool temporary=false)
virtual ~NetLobby ()
virtual bool IsClient () const
virtual bool IsActive () const
virtual void Recv ()
virtual void Send ()
virtual int GetLastError () const
virtual NetUserFindUserByAddr (const NetAddr &addr)
virtual NetUserFindUserByName (const char *name)
virtual NetUserFindUserByNetID (DWORD id)
virtual bool SetUserHost (NetUser *user, bool host)
virtual int NumUsers ()
virtual NetUserGetHost ()
virtual bool HasHost ()
virtual List< NetUser > & GetUsers ()
virtual List< ModInfo > & GetServerMods ()
virtual NetUserGetLocalUser ()
virtual void SetLocalUser (NetUser *user)
virtual int GetStatus () const
virtual void SetStatus (int s)
virtual List< NetChatEntry > & GetChat ()
virtual DWORD GetStartTime () const
virtual List< NetCampaignInfo > & GetCampaigns ()
virtual void AddUnitMap (MissionElement *elem, int index=0)
virtual void ClearUnitMap ()
virtual bool IsMapped (const char *user)
virtual DWORD GetSelectedMissionID () const
virtual const TextGetMachineInfo ()
virtual WORD GetGamePort ()
virtual bool Ping ()
virtual DWORD GetLag ()

Static Public Member Functions

static NetLobbyServerGetInstance ()
- Static Public Member Functions inherited from NetLobby
static const char * TYPENAME ()
static bool IsNetLobbyClient ()
static bool IsNetLobbyServer ()

Protected Member Functions

virtual void CheckSessions ()
virtual void SendData (NetUser *dst, int type, Text msg)
virtual void DoPing (NetPeer *peer, Text msg)
virtual void DoServerInfo (NetPeer *peer, Text msg)
virtual void DoServerMods (NetPeer *peer, Text msg)
virtual void DoLogin (NetPeer *peer, Text msg)
virtual void DoLogout (NetPeer *peer, Text msg)
virtual void DoUserAuth (NetPeer *peer, Text msg)
virtual void DoChat (NetPeer *peer, Text msg)
virtual void DoUserList (NetPeer *peer, Text msg)
virtual void DoBanUser (NetPeer *peer, Text msg)
virtual void DoMissionList (NetPeer *peer, Text msg)
virtual void DoMissionSelect (NetPeer *peer, Text msg)
virtual void DoMissionData (NetPeer *peer, Text msg)
virtual void DoUnitList (NetPeer *peer, Text msg)
virtual void DoMapUnit (NetPeer *peer, Text msg)
virtual void DoGameStart (NetPeer *peer, Text msg)
virtual void DoGameStop (NetPeer *peer, Text msg)
virtual void LoadMOTD ()
virtual void SendMOTD (NetUser *user)
virtual void SendMods (NetUser *user)
- Protected Member Functions inherited from NetLobby
virtual void DoAuthUser (NetPeer *peer, Text msg)
virtual void DoExit (NetPeer *peer, Text msg)
virtual void ParseMsg (Text msg, List< NetLobbyParam > &params)

Protected Attributes

Text server_name
NetAddr server_addr
DWORD announce_time
NetServerConfigserver_config
Text server_mission
int motd_index
List< Textmotd
- Protected Attributes inherited from NetLobby
NetLinklink
NetUserlocal_user
List< NetUserusers
List< NetChatEntrychat_log
List< NetCampaignInfocampaigns
List< NetUnitEntryunit_map
Text machine_info
List< ModInfoserver_mods
bool active
DWORD last_send_time
DWORD start_time
DWORD selected_mission
Missionmission
int status

Detailed Description

Definition at line 35 of file NetLobbyServer.h.


Constructor & Destructor Documentation

NetLobbyServer::NetLobbyServer ( )

Definition at line 53 of file NetLobbyServer.cpp.

NetLobbyServer::~NetLobbyServer ( )
virtual

Definition at line 144 of file NetLobbyServer.cpp.


Member Function Documentation

void NetLobbyServer::AddChat ( NetUser user,
const char *  msg,
bool  route = true 
)
virtual

Reimplemented from NetLobby.

Definition at line 511 of file NetLobbyServer.cpp.

void NetLobbyServer::AddUser ( NetUser user)
virtual

Reimplemented from NetLobby.

Definition at line 458 of file NetLobbyServer.cpp.

void NetLobbyServer::BanUser ( NetUser user)
virtual

Reimplemented from NetLobby.

Definition at line 438 of file NetLobbyServer.cpp.

void NetLobbyServer::CheckSessions ( )
protectedvirtual

Definition at line 340 of file NetLobbyServer.cpp.

void NetLobbyServer::ClearChat ( )
virtual

Reimplemented from NetLobby.

Definition at line 562 of file NetLobbyServer.cpp.

void NetLobbyServer::DelUser ( NetUser user)
virtual

Reimplemented from NetLobby.

Definition at line 470 of file NetLobbyServer.cpp.

void NetLobbyServer::DoBanUser ( NetPeer peer,
Text  msg 
)
protectedvirtual

Reimplemented from NetLobby.

Definition at line 1144 of file NetLobbyServer.cpp.

void NetLobbyServer::DoChat ( NetPeer peer,
Text  msg 
)
protectedvirtual

Reimplemented from NetLobby.

Definition at line 1067 of file NetLobbyServer.cpp.

void NetLobbyServer::DoGameStart ( NetPeer peer,
Text  msg 
)
protectedvirtual

Reimplemented from NetLobby.

Definition at line 1349 of file NetLobbyServer.cpp.

void NetLobbyServer::DoGameStop ( NetPeer peer,
Text  msg 
)
protectedvirtual

Reimplemented from NetLobby.

Definition at line 1355 of file NetLobbyServer.cpp.

void NetLobbyServer::DoLogin ( NetPeer peer,
Text  msg 
)
protectedvirtual

Reimplemented from NetLobby.

Definition at line 891 of file NetLobbyServer.cpp.

void NetLobbyServer::DoLogout ( NetPeer peer,
Text  msg 
)
protectedvirtual

Reimplemented from NetLobby.

Definition at line 1007 of file NetLobbyServer.cpp.

void NetLobbyServer::DoMapUnit ( NetPeer peer,
Text  msg 
)
protectedvirtual

Reimplemented from NetLobby.

Definition at line 1314 of file NetLobbyServer.cpp.

void NetLobbyServer::DoMissionData ( NetPeer peer,
Text  msg 
)
protectedvirtual

Reimplemented from NetLobby.

Definition at line 1279 of file NetLobbyServer.cpp.

void NetLobbyServer::DoMissionList ( NetPeer peer,
Text  msg 
)
protectedvirtual

Reimplemented from NetLobby.

Definition at line 1169 of file NetLobbyServer.cpp.

void NetLobbyServer::DoMissionSelect ( NetPeer peer,
Text  msg 
)
protectedvirtual

Reimplemented from NetLobby.

Definition at line 1252 of file NetLobbyServer.cpp.

void NetLobbyServer::DoPing ( NetPeer peer,
Text  msg 
)
protectedvirtual

Reimplemented from NetLobby.

Definition at line 834 of file NetLobbyServer.cpp.

void NetLobbyServer::DoServerInfo ( NetPeer peer,
Text  msg 
)
protectedvirtual

Reimplemented from NetLobby.

Definition at line 838 of file NetLobbyServer.cpp.

void NetLobbyServer::DoServerMods ( NetPeer peer,
Text  msg 
)
protectedvirtual

Reimplemented from NetLobby.

Definition at line 860 of file NetLobbyServer.cpp.

void NetLobbyServer::DoUnitList ( NetPeer peer,
Text  msg 
)
protectedvirtual

Reimplemented from NetLobby.

Definition at line 1296 of file NetLobbyServer.cpp.

void NetLobbyServer::DoUserAuth ( NetPeer peer,
Text  msg 
)
protectedvirtual

Reimplemented from NetLobby.

Definition at line 1020 of file NetLobbyServer.cpp.

void NetLobbyServer::DoUserList ( NetPeer peer,
Text  msg 
)
protectedvirtual

Reimplemented from NetLobby.

Definition at line 1123 of file NetLobbyServer.cpp.

void NetLobbyServer::ExecFrame ( )
virtual

Reimplemented from NetLobby.

Definition at line 254 of file NetLobbyServer.cpp.

void NetLobbyServer::GameOff ( )
virtual

Definition at line 827 of file NetLobbyServer.cpp.

void NetLobbyServer::GameOn ( )
virtual

Definition at line 789 of file NetLobbyServer.cpp.

void NetLobbyServer::GameStart ( )
virtual

Reimplemented from NetLobby.

Definition at line 405 of file NetLobbyServer.cpp.

void NetLobbyServer::GameStop ( )
virtual

Reimplemented from NetLobby.

Definition at line 423 of file NetLobbyServer.cpp.

NetLobbyServer * NetLobbyServer::GetInstance ( )
static

Reimplemented from NetLobby.

Definition at line 165 of file NetLobbyServer.cpp.

Mission * NetLobbyServer::GetSelectedMission ( )
virtual

Reimplemented from NetLobby.

Definition at line 771 of file NetLobbyServer.cpp.

virtual Text NetLobbyServer::GetServerMission ( ) const
inlinevirtual

Definition at line 69 of file NetLobbyServer.h.

virtual Text NetLobbyServer::GetServerName ( ) const
inlinevirtual

Definition at line 67 of file NetLobbyServer.h.

List< NetUnitEntry > & NetLobbyServer::GetUnitMap ( )
virtual

Reimplemented from NetLobby.

Definition at line 609 of file NetLobbyServer.cpp.

virtual bool NetLobbyServer::IsHost ( ) const
inlinevirtual

Reimplemented from NetLobby.

Definition at line 44 of file NetLobbyServer.h.

virtual bool NetLobbyServer::IsServer ( ) const
inlinevirtual

Reimplemented from NetLobby.

Definition at line 45 of file NetLobbyServer.h.

void NetLobbyServer::LoadMOTD ( )
protectedvirtual

Definition at line 173 of file NetLobbyServer.cpp.

void NetLobbyServer::MapUnit ( int  n,
const char *  user,
bool  lock = false 
)
virtual

Reimplemented from NetLobby.

Definition at line 688 of file NetLobbyServer.cpp.

int NetLobbyServer::operator== ( const NetLobbyServer s) const
inline

Definition at line 41 of file NetLobbyServer.h.

void NetLobbyServer::RequestAuth ( NetUser user)
virtual

Definition at line 498 of file NetLobbyServer.cpp.

void NetLobbyServer::SaveChat ( )
virtual

Reimplemented from NetLobby.

Definition at line 568 of file NetLobbyServer.cpp.

void NetLobbyServer::SelectMission ( DWORD  id)
virtual

Reimplemented from NetLobby.

Definition at line 588 of file NetLobbyServer.cpp.

void NetLobbyServer::SendData ( NetUser dst,
int  type,
Text  msg 
)
protectedvirtual

Definition at line 327 of file NetLobbyServer.cpp.

void NetLobbyServer::SendMods ( NetUser user)
protectedvirtual

Definition at line 215 of file NetLobbyServer.cpp.

void NetLobbyServer::SendMOTD ( NetUser user)
protectedvirtual

Definition at line 195 of file NetLobbyServer.cpp.

void NetLobbyServer::SendUnits ( )
virtual

Definition at line 728 of file NetLobbyServer.cpp.

void NetLobbyServer::SendUsers ( )
virtual

Definition at line 477 of file NetLobbyServer.cpp.

Text NetLobbyServer::Serialize ( Mission m,
NetUser u = 0 
)
virtual

Definition at line 748 of file NetLobbyServer.cpp.

virtual void NetLobbyServer::SetServerMission ( const char *  script)
inlinevirtual

Definition at line 70 of file NetLobbyServer.h.

virtual void NetLobbyServer::SetServerName ( const char *  s)
inlinevirtual

Definition at line 68 of file NetLobbyServer.h.

void NetLobbyServer::UnmapUnit ( const char *  user)
virtual

Reimplemented from NetLobby.

Definition at line 708 of file NetLobbyServer.cpp.


Member Data Documentation

DWORD NetLobbyServer::announce_time
protected

Definition at line 109 of file NetLobbyServer.h.

List<Text> NetLobbyServer::motd
protected

Definition at line 114 of file NetLobbyServer.h.

int NetLobbyServer::motd_index
protected

Definition at line 112 of file NetLobbyServer.h.

NetAddr NetLobbyServer::server_addr
protected

Definition at line 108 of file NetLobbyServer.h.

NetServerConfig* NetLobbyServer::server_config
protected

Definition at line 110 of file NetLobbyServer.h.

Text NetLobbyServer::server_mission
protected

Definition at line 111 of file NetLobbyServer.h.

Text NetLobbyServer::server_name
protected

Definition at line 107 of file NetLobbyServer.h.


The documentation for this class was generated from the following files: