doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
idServerScan Class Reference

#include <ServerScan.h>

Inheritance diagram for idServerScan:
idList< networkServer_t >

Public Types

enum  scan_state_t { IDLE = 0, WAIT_ON_INIT, LAN_SCAN, NET_SCAN }
 
- Public Types inherited from idList< networkServer_t >
typedef int cmp_t (const networkServer_t *, const networkServer_t *)
 
typedef networkServer_t new_t (void)
 

Public Member Functions

 idServerScan ()
 
int InfoResponse (networkServer_t &server)
 
void AddServer (int id, const char *srv)
 
void StartServers (bool timeout)
 
void EndServers ()
 
void NetScan ()
 
void Clear ()
 
void RunFrame ()
 
scan_state_t GetState ()
 
void SetState (scan_state_t)
 
bool GetBestPing (networkServer_t &serv)
 
void SetupLANScan ()
 
void GUIConfig (idUserInterface *pGUI, const char *name)
 
void GUIUpdateSelected (void)
 
void Shutdown ()
 
void ApplyFilter ()
 
void SetSorting (serverSort_t sort)
 
int GetChallenge ()
 
- Public Member Functions inherited from idList< networkServer_t >
 idList (int newgranularity=16)
 
 idList (const idList< networkServer_t > &other)
 
 ~idList (void)
 
void Clear (void)
 
int Num (void) const
 
int NumAllocated (void) const
 
void SetGranularity (int newgranularity)
 
int GetGranularity (void) const
 
size_t Allocated (void) const
 
size_t Size (void) const
 
size_t MemoryUsed (void) const
 
idList< networkServer_t > & operator= (const idList< networkServer_t > &other)
 
const networkServer_toperator[] (int index) const
 
networkServer_toperator[] (int index)
 
void Condense (void)
 
void Resize (int newsize)
 
void Resize (int newsize, int newgranularity)
 
void SetNum (int newnum, bool resize=true)
 
void AssureSize (int newSize)
 
void AssureSize (int newSize, const networkServer_t &initValue)
 
void AssureSizeAlloc (int newSize, new_t *allocator)
 
networkServer_tPtr (void)
 
const networkServer_tPtr (void) const
 
networkServer_tAlloc (void)
 
int Append (const networkServer_t &obj)
 
int Append (const idList< networkServer_t > &other)
 
int AddUnique (const networkServer_t &obj)
 
int Insert (const networkServer_t &obj, int index=0)
 
int FindIndex (const networkServer_t &obj) const
 
networkServer_tFind (networkServer_tconst &obj) const
 
int FindNull (void) const
 
int IndexOf (const networkServer_t *obj) const
 
bool RemoveIndex (int index)
 
bool Remove (const networkServer_t &obj)
 
void Sort (cmp_t *compare=(cmp_t *)&idListSortCompare< networkServer_t >)
 
void SortSubSection (int startIndex, int endIndex, cmp_t *compare=(cmp_t *)&idListSortCompare< networkServer_t >)
 
void Swap (idList< networkServer_t > &other)
 
void DeleteContents (bool clear)
 

Private Member Functions

void LocalClear ()
 
void EmitGetInfo (netadr_t &serv)
 
void GUIAdd (int id, const networkServer_t server)
 
bool IsFiltered (const networkServer_t server)
 

Static Private Member Functions

static int Cmp (const int *a, const int *b)
 

Private Attributes

scan_state_t scan_state
 
bool incoming_net
 
bool incoming_useTimeout
 
int incoming_lastTime
 
int lan_pingtime
 
idDict net_info
 
idList< inServer_tnet_servers
 
int cur_info
 
idUserInterfacem_pGUI
 
idListGUIlistGUI
 
serverSort_t m_sort
 
bool m_sortAscending
 
idList< intm_sortedServers
 
idStr screenshot
 
int challenge
 
int endWaitTime
 

Static Private Attributes

static const int MAX_PINGREQUESTS = 32
 
static const int REPLY_TIMEOUT = 999
 
static const int INCOMING_TIMEOUT = 1500
 
static const int REFRESH_START = 10000
 

Detailed Description

Definition at line 72 of file ServerScan.h.

Member Enumeration Documentation

Enumerator
IDLE 
WAIT_ON_INIT 
LAN_SCAN 
NET_SCAN 

Definition at line 96 of file ServerScan.h.

Constructor & Destructor Documentation

idServerScan::idServerScan ( )

Definition at line 54 of file ServerScan.cpp.

Member Function Documentation

void idServerScan::AddServer ( int  id,
const char *  srv 
)

Definition at line 189 of file ServerScan.cpp.

void idServerScan::ApplyFilter ( )

Definition at line 477 of file ServerScan.cpp.

void idServerScan::Clear ( void  )

Definition at line 86 of file ServerScan.cpp.

int idServerScan::Cmp ( const int a,
const int b 
)
staticprivate

Definition at line 588 of file ServerScan.cpp.

void idServerScan::EmitGetInfo ( netadr_t serv)
private

Definition at line 236 of file ServerScan.cpp.

void idServerScan::EndServers ( )

Definition at line 213 of file ServerScan.cpp.

bool idServerScan::GetBestPing ( networkServer_t serv)

Definition at line 352 of file ServerScan.cpp.

int idServerScan::GetChallenge ( )

Definition at line 245 of file ServerScan.cpp.

scan_state_t idServerScan::GetState ( )
inline

Definition at line 103 of file ServerScan.h.

void idServerScan::GUIAdd ( int  id,
const networkServer_t  server 
)
private

Definition at line 434 of file ServerScan.cpp.

void idServerScan::GUIConfig ( idUserInterface pGUI,
const char *  name 
)

Definition at line 372 of file ServerScan.cpp.

void idServerScan::GUIUpdateSelected ( void  )

Definition at line 385 of file ServerScan.cpp.

int idServerScan::InfoResponse ( networkServer_t server)

Definition at line 125 of file ServerScan.cpp.

bool idServerScan::IsFiltered ( const networkServer_t  server)
private

Definition at line 501 of file ServerScan.cpp.

void idServerScan::LocalClear ( )
private

Definition at line 67 of file ServerScan.cpp.

void idServerScan::NetScan ( )

Definition at line 254 of file ServerScan.cpp.

void idServerScan::RunFrame ( void  )

Definition at line 293 of file ServerScan.cpp.

void idServerScan::SetSorting ( serverSort_t  sort)

Definition at line 627 of file ServerScan.cpp.

void idServerScan::SetState ( scan_state_t  )
void idServerScan::SetupLANScan ( )

Definition at line 111 of file ServerScan.cpp.

void idServerScan::Shutdown ( void  )

Definition at line 96 of file ServerScan.cpp.

void idServerScan::StartServers ( bool  timeout)

Definition at line 225 of file ServerScan.cpp.

Member Data Documentation

int idServerScan::challenge
private

Definition at line 156 of file ServerScan.h.

int idServerScan::cur_info
private

Definition at line 146 of file ServerScan.h.

int idServerScan::endWaitTime
private

Definition at line 158 of file ServerScan.h.

int idServerScan::incoming_lastTime
private

Definition at line 134 of file ServerScan.h.

bool idServerScan::incoming_net
private

Definition at line 132 of file ServerScan.h.

const int idServerScan::INCOMING_TIMEOUT = 1500
staticprivate

Definition at line 127 of file ServerScan.h.

bool idServerScan::incoming_useTimeout
private

Definition at line 133 of file ServerScan.h.

int idServerScan::lan_pingtime
private

Definition at line 136 of file ServerScan.h.

idListGUI* idServerScan::listGUI
private

Definition at line 149 of file ServerScan.h.

idUserInterface* idServerScan::m_pGUI
private

Definition at line 148 of file ServerScan.h.

serverSort_t idServerScan::m_sort
private

Definition at line 151 of file ServerScan.h.

bool idServerScan::m_sortAscending
private

Definition at line 152 of file ServerScan.h.

idList<int> idServerScan::m_sortedServers
private

Definition at line 153 of file ServerScan.h.

const int idServerScan::MAX_PINGREQUESTS = 32
staticprivate

Definition at line 125 of file ServerScan.h.

idDict idServerScan::net_info
private

Definition at line 141 of file ServerScan.h.

idList<inServer_t> idServerScan::net_servers
private

Definition at line 143 of file ServerScan.h.

const int idServerScan::REFRESH_START = 10000
staticprivate

Definition at line 128 of file ServerScan.h.

const int idServerScan::REPLY_TIMEOUT = 999
staticprivate

Definition at line 126 of file ServerScan.h.

scan_state_t idServerScan::scan_state
private

Definition at line 130 of file ServerScan.h.

idStr idServerScan::screenshot
private

Definition at line 155 of file ServerScan.h.


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