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

#include <NetLobbyClient.h>

Inheritance diagram for NetLobbyClient:
NetLobby

List of all members.

Public Member Functions

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

Protected Member Functions

virtual void SendData (int type, Text msg)
virtual void DoServerInfo (NetPeer *peer, Text msg)
virtual void DoServerMods (NetPeer *peer, Text msg)
virtual void DoAuthUser (NetPeer *peer, Text msg)
virtual void DoChat (NetPeer *peer, Text msg)
virtual void DoUserList (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 DoExit (NetPeer *peer, Text msg)
- Protected Member Functions inherited from NetLobby
virtual void DoPing (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 DoBanUser (NetPeer *peer, Text msg)
virtual void DoGameStop (NetPeer *peer, Text msg)
virtual void ParseMsg (Text msg, List< NetLobbyParam > &params)

Protected Attributes

DWORD server_id
NetAddr addr
bool host
Text gamepass
int exit_code
NetServerInfo server_info
List< MissionInfomissions
bool temporary
DWORD ping_req_time
DWORD chat_req_time
DWORD user_req_time
DWORD camp_req_time
DWORD unit_req_time
DWORD mods_req_time
- 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

Additional Inherited Members

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

Detailed Description

Definition at line 24 of file NetLobbyClient.h.


Constructor & Destructor Documentation

NetLobbyClient::NetLobbyClient ( )

Definition at line 37 of file NetLobbyClient.cpp.

NetLobbyClient::NetLobbyClient ( const NetAddr server_addr)

Definition at line 76 of file NetLobbyClient.cpp.

NetLobbyClient::~NetLobbyClient ( )
virtual

Definition at line 93 of file NetLobbyClient.cpp.


Member Function Documentation

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

Reimplemented from NetLobby.

Definition at line 292 of file NetLobbyClient.cpp.

void NetLobbyClient::BanUser ( NetUser user)
virtual

Reimplemented from NetLobby.

Definition at line 370 of file NetLobbyClient.cpp.

void NetLobbyClient::DoAuthUser ( NetPeer peer,
Text  msg 
)
protectedvirtual

Reimplemented from NetLobby.

Definition at line 420 of file NetLobbyClient.cpp.

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

Reimplemented from NetLobby.

Definition at line 489 of file NetLobbyClient.cpp.

void NetLobbyClient::DoExit ( NetPeer peer,
Text  msg 
)
protectedvirtual

Reimplemented from NetLobby.

Definition at line 807 of file NetLobbyClient.cpp.

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

Reimplemented from NetLobby.

Definition at line 802 of file NetLobbyClient.cpp.

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

Reimplemented from NetLobby.

Definition at line 797 of file NetLobbyClient.cpp.

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

Reimplemented from NetLobby.

Definition at line 713 of file NetLobbyClient.cpp.

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

Reimplemented from NetLobby.

Definition at line 631 of file NetLobbyClient.cpp.

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

Reimplemented from NetLobby.

Definition at line 690 of file NetLobbyClient.cpp.

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

Reimplemented from NetLobby.

Definition at line 449 of file NetLobbyClient.cpp.

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

Reimplemented from NetLobby.

Definition at line 528 of file NetLobbyClient.cpp.

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

Reimplemented from NetLobby.

Definition at line 733 of file NetLobbyClient.cpp.

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

Reimplemented from NetLobby.

Definition at line 563 of file NetLobbyClient.cpp.

void NetLobbyClient::ExecFrame ( )
virtual

Reimplemented from NetLobby.

Definition at line 114 of file NetLobbyClient.cpp.

void NetLobbyClient::GameStart ( )
virtual

Reimplemented from NetLobby.

Definition at line 217 of file NetLobbyClient.cpp.

void NetLobbyClient::GameStop ( )
virtual

Reimplemented from NetLobby.

Definition at line 233 of file NetLobbyClient.cpp.

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

Reimplemented from NetLobby.

Definition at line 357 of file NetLobbyClient.cpp.

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

Reimplemented from NetLobby.

Definition at line 304 of file NetLobbyClient.cpp.

WORD NetLobbyClient::GetGamePort ( )
virtual

Reimplemented from NetLobby.

Definition at line 281 of file NetLobbyClient.cpp.

virtual int NetLobbyClient::GetLastError ( ) const
inlinevirtual

Reimplemented from NetLobby.

Definition at line 36 of file NetLobbyClient.h.

const Text & NetLobbyClient::GetMachineInfo ( )
virtual

Reimplemented from NetLobby.

Definition at line 245 of file NetLobbyClient.cpp.

Mission * NetLobbyClient::GetSelectedMission ( )
virtual

Reimplemented from NetLobby.

Definition at line 400 of file NetLobbyClient.cpp.

NetAddr NetLobbyClient::GetServerAddr ( ) const
inline

Definition at line 49 of file NetLobbyClient.h.

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

Reimplemented from NetLobby.

Definition at line 326 of file NetLobbyClient.cpp.

int NetLobbyClient::GetStatus ( ) const
virtual

Reimplemented from NetLobby.

Definition at line 254 of file NetLobbyClient.cpp.

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

Reimplemented from NetLobby.

Definition at line 337 of file NetLobbyClient.cpp.

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

Reimplemented from NetLobby.

Definition at line 315 of file NetLobbyClient.cpp.

bool NetLobbyClient::HasHost ( )
virtual

Reimplemented from NetLobby.

Definition at line 272 of file NetLobbyClient.cpp.

virtual bool NetLobbyClient::IsClient ( ) const
inlinevirtual

Reimplemented from NetLobby.

Definition at line 51 of file NetLobbyClient.h.

virtual bool NetLobbyClient::IsHost ( ) const
inlinevirtual

Reimplemented from NetLobby.

Definition at line 50 of file NetLobbyClient.h.

bool NetLobbyClient::Login ( bool  host = false)
virtual

Definition at line 136 of file NetLobbyClient.cpp.

bool NetLobbyClient::Logout ( )
virtual

Definition at line 182 of file NetLobbyClient.cpp.

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

Reimplemented from NetLobby.

Definition at line 388 of file NetLobbyClient.cpp.

int NetLobbyClient::NumUsers ( )
virtual

Reimplemented from NetLobby.

Definition at line 263 of file NetLobbyClient.cpp.

int NetLobbyClient::operator== ( const NetLobbyClient c) const
inline

Definition at line 31 of file NetLobbyClient.h.

bool NetLobbyClient::Ping ( )
virtual

Reimplemented from NetLobby.

Definition at line 196 of file NetLobbyClient.cpp.

void NetLobbyClient::SelectMission ( DWORD  id)
virtual

Reimplemented from NetLobby.

Definition at line 380 of file NetLobbyClient.cpp.

void NetLobbyClient::SendData ( int  type,
Text  msg 
)
protectedvirtual

Definition at line 101 of file NetLobbyClient.cpp.


Member Data Documentation

NetAddr NetLobbyClient::addr
protected

Definition at line 85 of file NetLobbyClient.h.

DWORD NetLobbyClient::camp_req_time
protected

Definition at line 97 of file NetLobbyClient.h.

DWORD NetLobbyClient::chat_req_time
protected

Definition at line 95 of file NetLobbyClient.h.

int NetLobbyClient::exit_code
protected

Definition at line 88 of file NetLobbyClient.h.

Text NetLobbyClient::gamepass
protected

Definition at line 87 of file NetLobbyClient.h.

bool NetLobbyClient::host
protected

Definition at line 86 of file NetLobbyClient.h.

List<MissionInfo> NetLobbyClient::missions
protected

Definition at line 91 of file NetLobbyClient.h.

DWORD NetLobbyClient::mods_req_time
protected

Definition at line 99 of file NetLobbyClient.h.

DWORD NetLobbyClient::ping_req_time
protected

Definition at line 94 of file NetLobbyClient.h.

DWORD NetLobbyClient::server_id
protected

Definition at line 84 of file NetLobbyClient.h.

NetServerInfo NetLobbyClient::server_info
protected

Definition at line 90 of file NetLobbyClient.h.

bool NetLobbyClient::temporary
protected

Definition at line 93 of file NetLobbyClient.h.

DWORD NetLobbyClient::unit_req_time
protected

Definition at line 98 of file NetLobbyClient.h.

DWORD NetLobbyClient::user_req_time
protected

Definition at line 96 of file NetLobbyClient.h.


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