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

#include <NetLobby.h>

Inheritance diagram for NetLobby:
NetLobbyClient NetLobbyServer

List of all members.

Public Member Functions

 NetLobby (bool temporary=false)
virtual ~NetLobby ()
virtual bool IsClient () const
virtual bool IsServer () const
virtual bool IsActive () const
virtual void ExecFrame ()
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 void BanUser (NetUser *user)
virtual void AddUser (NetUser *user)
virtual void DelUser (NetUser *user)
virtual bool SetUserHost (NetUser *user, bool host)
virtual int NumUsers ()
virtual NetUserGetHost ()
virtual bool HasHost ()
virtual bool IsHost () const
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 void AddChat (NetUser *user, const char *msg, bool route=true)
virtual List< NetChatEntry > & GetChat ()
virtual void ClearChat ()
virtual void SaveChat ()
virtual DWORD GetStartTime () const
virtual List< NetCampaignInfo > & GetCampaigns ()
virtual void AddUnitMap (MissionElement *elem, int index=0)
virtual List< NetUnitEntry > & GetUnitMap ()
virtual void ClearUnitMap ()
virtual void MapUnit (int n, const char *user, bool lock=false)
virtual void UnmapUnit (const char *user)
virtual bool IsMapped (const char *user)
virtual MissionGetSelectedMission ()
virtual DWORD GetSelectedMissionID () const
virtual void SelectMission (DWORD id)
virtual const TextGetMachineInfo ()
virtual WORD GetGamePort ()
virtual bool Ping ()
virtual void GameStart ()
virtual void GameStop ()
virtual DWORD GetLag ()

Static Public Member Functions

static const char * TYPENAME ()
static NetLobbyGetInstance ()
static bool IsNetLobbyClient ()
static bool IsNetLobbyServer ()

Protected Member Functions

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 DoAuthUser (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 DoExit (NetPeer *peer, Text msg)
virtual void ParseMsg (Text msg, List< NetLobbyParam > &params)

Protected Attributes

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 41 of file NetLobby.h.


Constructor & Destructor Documentation

NetLobby::NetLobby ( bool  temporary = false)

Definition at line 55 of file NetLobby.cpp.

NetLobby::~NetLobby ( )
virtual

Definition at line 63 of file NetLobby.cpp.


Member Function Documentation

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

Reimplemented in NetLobbyServer, and NetLobbyClient.

Definition at line 403 of file NetLobby.cpp.

void NetLobby::AddUnitMap ( MissionElement elem,
int  index = 0 
)
virtual

Definition at line 432 of file NetLobby.cpp.

void NetLobby::AddUser ( NetUser user)
virtual

Reimplemented in NetLobbyServer.

Definition at line 202 of file NetLobby.cpp.

void NetLobby::BanUser ( NetUser user)
virtual

Reimplemented in NetLobbyServer, and NetLobbyClient.

Definition at line 197 of file NetLobby.cpp.

void NetLobby::ClearChat ( )
virtual

Reimplemented in NetLobbyServer.

Definition at line 416 of file NetLobby.cpp.

void NetLobby::ClearUnitMap ( )
virtual

Definition at line 445 of file NetLobby.cpp.

void NetLobby::DelUser ( NetUser user)
virtual

Reimplemented in NetLobbyServer.

Definition at line 216 of file NetLobby.cpp.

virtual void NetLobby::DoAuthUser ( NetPeer peer,
Text  msg 
)
inlineprotectedvirtual

Reimplemented in NetLobbyClient.

Definition at line 122 of file NetLobby.h.

virtual void NetLobby::DoBanUser ( NetPeer peer,
Text  msg 
)
inlineprotectedvirtual

Reimplemented in NetLobbyServer.

Definition at line 126 of file NetLobby.h.

virtual void NetLobby::DoChat ( NetPeer peer,
Text  msg 
)
inlineprotectedvirtual

Reimplemented in NetLobbyServer, and NetLobbyClient.

Definition at line 124 of file NetLobby.h.

virtual void NetLobby::DoExit ( NetPeer peer,
Text  msg 
)
inlineprotectedvirtual

Reimplemented in NetLobbyClient.

Definition at line 134 of file NetLobby.h.

virtual void NetLobby::DoGameStart ( NetPeer peer,
Text  msg 
)
inlineprotectedvirtual

Reimplemented in NetLobbyServer, and NetLobbyClient.

Definition at line 132 of file NetLobby.h.

virtual void NetLobby::DoGameStop ( NetPeer peer,
Text  msg 
)
inlineprotectedvirtual

Reimplemented in NetLobbyServer.

Definition at line 133 of file NetLobby.h.

virtual void NetLobby::DoLogin ( NetPeer peer,
Text  msg 
)
inlineprotectedvirtual

Reimplemented in NetLobbyServer.

Definition at line 120 of file NetLobby.h.

virtual void NetLobby::DoLogout ( NetPeer peer,
Text  msg 
)
inlineprotectedvirtual

Reimplemented in NetLobbyServer.

Definition at line 121 of file NetLobby.h.

virtual void NetLobby::DoMapUnit ( NetPeer peer,
Text  msg 
)
inlineprotectedvirtual

Reimplemented in NetLobbyServer, and NetLobbyClient.

Definition at line 131 of file NetLobby.h.

virtual void NetLobby::DoMissionData ( NetPeer peer,
Text  msg 
)
inlineprotectedvirtual

Reimplemented in NetLobbyServer, and NetLobbyClient.

Definition at line 129 of file NetLobby.h.

virtual void NetLobby::DoMissionList ( NetPeer peer,
Text  msg 
)
inlineprotectedvirtual

Reimplemented in NetLobbyServer, and NetLobbyClient.

Definition at line 127 of file NetLobby.h.

virtual void NetLobby::DoMissionSelect ( NetPeer peer,
Text  msg 
)
inlineprotectedvirtual

Reimplemented in NetLobbyServer, and NetLobbyClient.

Definition at line 128 of file NetLobby.h.

virtual void NetLobby::DoPing ( NetPeer peer,
Text  msg 
)
inlineprotectedvirtual

Reimplemented in NetLobbyServer.

Definition at line 117 of file NetLobby.h.

virtual void NetLobby::DoServerInfo ( NetPeer peer,
Text  msg 
)
inlineprotectedvirtual

Reimplemented in NetLobbyServer, and NetLobbyClient.

Definition at line 118 of file NetLobby.h.

virtual void NetLobby::DoServerMods ( NetPeer peer,
Text  msg 
)
inlineprotectedvirtual

Reimplemented in NetLobbyServer, and NetLobbyClient.

Definition at line 119 of file NetLobby.h.

virtual void NetLobby::DoUnitList ( NetPeer peer,
Text  msg 
)
inlineprotectedvirtual

Reimplemented in NetLobbyServer, and NetLobbyClient.

Definition at line 130 of file NetLobby.h.

virtual void NetLobby::DoUserAuth ( NetPeer peer,
Text  msg 
)
inlineprotectedvirtual

Reimplemented in NetLobbyServer.

Definition at line 123 of file NetLobby.h.

virtual void NetLobby::DoUserList ( NetPeer peer,
Text  msg 
)
inlineprotectedvirtual

Reimplemented in NetLobbyServer, and NetLobbyClient.

Definition at line 125 of file NetLobby.h.

void NetLobby::ExecFrame ( )
virtual

Reimplemented in NetLobbyServer, and NetLobbyClient.

Definition at line 97 of file NetLobby.cpp.

NetUser * NetLobby::FindUserByAddr ( const NetAddr addr)
virtual

Definition at line 320 of file NetLobby.cpp.

NetUser * NetLobby::FindUserByName ( const char *  name)
virtual

Definition at line 332 of file NetLobby.cpp.

NetUser * NetLobby::FindUserByNetID ( DWORD  id)
virtual

Definition at line 347 of file NetLobby.cpp.

virtual void NetLobby::GameStart ( )
inlinevirtual

Reimplemented in NetLobbyServer, and NetLobbyClient.

Definition at line 107 of file NetLobby.h.

virtual void NetLobby::GameStop ( )
inlinevirtual

Reimplemented in NetLobbyServer, and NetLobbyClient.

Definition at line 108 of file NetLobby.h.

List< NetCampaignInfo > & NetLobby::GetCampaigns ( )
virtual

Reimplemented in NetLobbyClient.

Definition at line 424 of file NetLobby.cpp.

List< NetChatEntry > & NetLobby::GetChat ( )
virtual

Reimplemented in NetLobbyClient.

Definition at line 410 of file NetLobby.cpp.

virtual WORD NetLobby::GetGamePort ( )
inlinevirtual

Reimplemented in NetLobbyClient.

Definition at line 103 of file NetLobby.h.

NetUser * NetLobby::GetHost ( )
virtual

Definition at line 251 of file NetLobby.cpp.

NetLobby * NetLobby::GetInstance ( )
static

Reimplemented in NetLobbyServer.

Definition at line 89 of file NetLobby.cpp.

DWORD NetLobby::GetLag ( )
virtual

Definition at line 170 of file NetLobby.cpp.

virtual int NetLobby::GetLastError ( ) const
inlinevirtual

Reimplemented in NetLobbyClient.

Definition at line 56 of file NetLobby.h.

NetUser * NetLobby::GetLocalUser ( )
virtual

Definition at line 302 of file NetLobby.cpp.

virtual const Text& NetLobby::GetMachineInfo ( )
inlinevirtual

Reimplemented in NetLobbyClient.

Definition at line 102 of file NetLobby.h.

virtual Mission* NetLobby::GetSelectedMission ( )
inlinevirtual

Reimplemented in NetLobbyServer, and NetLobbyClient.

Definition at line 98 of file NetLobby.h.

virtual DWORD NetLobby::GetSelectedMissionID ( ) const
inlinevirtual

Definition at line 99 of file NetLobby.h.

List< ModInfo > & NetLobby::GetServerMods ( )
virtual

Reimplemented in NetLobbyClient.

Definition at line 314 of file NetLobby.cpp.

virtual DWORD NetLobby::GetStartTime ( ) const
inlinevirtual

Definition at line 85 of file NetLobby.h.

virtual int NetLobby::GetStatus ( ) const
inlinevirtual

Reimplemented in NetLobbyClient.

Definition at line 77 of file NetLobby.h.

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

Reimplemented in NetLobbyServer, and NetLobbyClient.

Definition at line 439 of file NetLobby.cpp.

List< NetUser > & NetLobby::GetUsers ( )
virtual

Reimplemented in NetLobbyClient.

Definition at line 308 of file NetLobby.cpp.

bool NetLobby::HasHost ( )
virtual

Reimplemented in NetLobbyClient.

Definition at line 264 of file NetLobby.cpp.

virtual bool NetLobby::IsActive ( ) const
inlinevirtual

Definition at line 51 of file NetLobby.h.

virtual bool NetLobby::IsClient ( ) const
inlinevirtual

Reimplemented in NetLobbyClient.

Definition at line 49 of file NetLobby.h.

virtual bool NetLobby::IsHost ( ) const
inlinevirtual

Reimplemented in NetLobbyClient, and NetLobbyServer.

Definition at line 69 of file NetLobby.h.

bool NetLobby::IsMapped ( const char *  user)
virtual

Definition at line 490 of file NetLobby.cpp.

bool NetLobby::IsNetLobbyClient ( )
static

Definition at line 561 of file NetLobby.cpp.

bool NetLobby::IsNetLobbyServer ( )
static

Definition at line 569 of file NetLobby.cpp.

virtual bool NetLobby::IsServer ( ) const
inlinevirtual

Reimplemented in NetLobbyServer.

Definition at line 50 of file NetLobby.h.

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

Reimplemented in NetLobbyServer, and NetLobbyClient.

Definition at line 451 of file NetLobby.cpp.

int NetLobby::NumUsers ( )
virtual

Reimplemented in NetLobbyClient.

Definition at line 238 of file NetLobby.cpp.

void NetLobby::ParseMsg ( Text  msg,
List< NetLobbyParam > &  params 
)
protectedvirtual

Definition at line 361 of file NetLobby.cpp.

bool NetLobby::Ping ( )
virtual

Reimplemented in NetLobbyClient.

Definition at line 394 of file NetLobby.cpp.

void NetLobby::Recv ( )
virtual

Definition at line 104 of file NetLobby.cpp.

virtual void NetLobby::SaveChat ( )
inlinevirtual

Reimplemented in NetLobbyServer.

Definition at line 84 of file NetLobby.h.

void NetLobby::SelectMission ( DWORD  id)
virtual

Reimplemented in NetLobbyServer, and NetLobbyClient.

Definition at line 507 of file NetLobby.cpp.

void NetLobby::Send ( )
virtual

Definition at line 163 of file NetLobby.cpp.

void NetLobby::SetLocalUser ( NetUser user)
virtual

Definition at line 181 of file NetLobby.cpp.

virtual void NetLobby::SetStatus ( int  s)
inlinevirtual

Definition at line 78 of file NetLobby.h.

bool NetLobby::SetUserHost ( NetUser user,
bool  host 
)
virtual

Definition at line 283 of file NetLobby.cpp.

static const char* NetLobby::TYPENAME ( )
inlinestatic

Definition at line 44 of file NetLobby.h.

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

Reimplemented in NetLobbyServer.

Definition at line 475 of file NetLobby.cpp.


Member Data Documentation

bool NetLobby::active
protected

Definition at line 147 of file NetLobby.h.

List<NetCampaignInfo> NetLobby::campaigns
protected

Definition at line 142 of file NetLobby.h.

List<NetChatEntry> NetLobby::chat_log
protected

Definition at line 141 of file NetLobby.h.

DWORD NetLobby::last_send_time
protected

Definition at line 148 of file NetLobby.h.

NetLink* NetLobby::link
protected

Definition at line 138 of file NetLobby.h.

NetUser* NetLobby::local_user
protected

Definition at line 139 of file NetLobby.h.

Text NetLobby::machine_info
protected

Definition at line 144 of file NetLobby.h.

Mission* NetLobby::mission
protected

Definition at line 151 of file NetLobby.h.

DWORD NetLobby::selected_mission
protected

Definition at line 150 of file NetLobby.h.

List<ModInfo> NetLobby::server_mods
protected

Definition at line 145 of file NetLobby.h.

DWORD NetLobby::start_time
protected

Definition at line 149 of file NetLobby.h.

int NetLobby::status
protected

Definition at line 152 of file NetLobby.h.

List<NetUnitEntry> NetLobby::unit_map
protected

Definition at line 143 of file NetLobby.h.

List<NetUser> NetLobby::users
protected

Definition at line 140 of file NetLobby.h.


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