ConnectDialog Class Reference

#include <ConnectDialog.h>

Inheritance diagram for ConnectDialog:

GLWWindow GLWPanel GLWidget MetaClass

List of all members.

Public Member Functions

void connected ()
virtual void windowInit (const unsigned state)
virtual void simulate (float frameTime)
UniqueIdStoregetIdStore ()
const char * getHost ()
int getPort ()

Static Public Member Functions

static ConnectDialoginstance ()

Protected Types

enum  ConnectState { eWaiting, eTryingConnection, eFinished }

Protected Member Functions

void tryConnection ()
void tryLocalConnection ()
void finishedTryingConnection ()

Static Protected Member Functions

static int tryRemoteConnection (void *)

Protected Attributes

std::string host_
int port_
UniqueIdStoreidStore_
int tryCount_
ConnectState connectionState_
time_t lastTime_

Static Protected Attributes

static ConnectDialoginstance_ = 0

Private Member Functions

 ConnectDialog ()
virtual ~ConnectDialog ()


Detailed Description

Definition at line 28 of file ConnectDialog.h.


Member Enumeration Documentation

enum ConnectDialog::ConnectState [protected]

Enumerator:
eWaiting 
eTryingConnection 
eFinished 

Definition at line 45 of file ConnectDialog.h.


Constructor & Destructor Documentation

ConnectDialog::ConnectDialog (  )  [private]

Definition at line 44 of file ConnectDialog.cpp.

References connectionState_, eWaiting, lastTime_, and tryCount_.

ConnectDialog::~ConnectDialog (  )  [private, virtual]

Definition at line 55 of file ConnectDialog.cpp.


Member Function Documentation

ConnectDialog * ConnectDialog::instance (  )  [static]

Definition at line 35 of file ConnectDialog.cpp.

References instance_.

Referenced by ClientMessageHandler::clientConnected(), ClientConnectionAcceptHandler::processMessage(), ClientConnectionAuthHandler::sendAuth(), and ClientWindowSetup::setupStartWindows().

void ConnectDialog::connected (  ) 

Definition at line 174 of file ConnectDialog.cpp.

References connectionState_, eFinished, ScorchedContext::getGameState(), ScorchedContext::getNetInterface(), host_, MsgBoxDialog::instance(), ScorchedClient::instance(), ProgressDialog::instance(), LANG_RESOURCE, LANG_RESOURCE_2, port_, ProgressDialog::progressChange(), S3D::ScorchedProtocolVersion, S3D::ScorchedVersion, ComsMessageSender::sendToServer(), ComsConnectMessage::setProtocolVersion(), ComsConnectMessage::setVersion(), MsgBoxDialog::show(), NetInterface::started(), ClientState::StimOptions, GameState::stimulate(), and NetInterface::stop().

Referenced by ClientMessageHandler::clientConnected().

void ConnectDialog::windowInit ( const unsigned  state  )  [virtual]

Reimplemented from GLWWindow.

Definition at line 73 of file ConnectDialog.cpp.

void ConnectDialog::simulate ( float  frameTime  )  [virtual]

Reimplemented from GLWPanel.

Definition at line 78 of file ConnectDialog.cpp.

References connectionState_, eFinished, eWaiting, ScorchedContext::getGameState(), ScorchedContext::getNetInterface(), host_, MsgBoxDialog::instance(), ScorchedClient::instance(), LANG_RESOURCE_2, lastTime_, port_, MsgBoxDialog::show(), ClientState::StimOptions, GameState::stimulate(), NetInterface::stop(), tryConnection(), and tryCount_.

UniqueIdStore & ConnectDialog::getIdStore (  ) 

Definition at line 59 of file ConnectDialog.cpp.

References idStore_, UniqueIdStore::loadStore(), and Logger::log().

Referenced by ClientConnectionAuthHandler::sendAuth().

const char* ConnectDialog::getHost (  )  [inline]

Definition at line 41 of file ConnectDialog.h.

References host_.

Referenced by ClientConnectionAuthHandler::sendAuth().

int ConnectDialog::getPort (  )  [inline]

Definition at line 42 of file ConnectDialog.h.

References port_.

Referenced by ClientConnectionAuthHandler::sendAuth().

void ConnectDialog::tryConnection (  )  [protected]

Definition at line 110 of file ConnectDialog.cpp.

References connectionState_, eTryingConnection, S3D::formatStringBuffer(), ClientParams::getConnect(), host_, ProgressDialog::instance(), ClientParams::instance(), LANG_RESOURCE_3, port_, ProgressDialog::progressChange(), S3D::ScorchedPort, tryCount_, tryLocalConnection(), and tryRemoteConnection().

Referenced by simulate().

int ConnectDialog::tryRemoteConnection ( void *   )  [static, protected]

Definition at line 152 of file ConnectDialog.cpp.

References NetInterface::connect(), connectionState_, eWaiting, ScorchedContext::getNetInterface(), host_, ScorchedClient::instance(), instance_, and port_.

Referenced by tryConnection().

void ConnectDialog::tryLocalConnection (  )  [protected]

Definition at line 165 of file ConnectDialog.cpp.

References NetInterface::connect(), connectionState_, eWaiting, ScorchedContext::getNetInterface(), and ScorchedClient::instance().

Referenced by tryConnection().

void ConnectDialog::finishedTryingConnection (  )  [protected]


Member Data Documentation

std::string ConnectDialog::host_ [protected]

Definition at line 52 of file ConnectDialog.h.

Referenced by connected(), getHost(), simulate(), tryConnection(), and tryRemoteConnection().

int ConnectDialog::port_ [protected]

Definition at line 53 of file ConnectDialog.h.

Referenced by connected(), getPort(), simulate(), tryConnection(), and tryRemoteConnection().

ConnectDialog * ConnectDialog::instance_ = 0 [static, protected]

Definition at line 54 of file ConnectDialog.h.

Referenced by instance(), and tryRemoteConnection().

UniqueIdStore* ConnectDialog::idStore_ [protected]

Definition at line 55 of file ConnectDialog.h.

Referenced by getIdStore().

int ConnectDialog::tryCount_ [protected]

Definition at line 56 of file ConnectDialog.h.

Referenced by ConnectDialog(), simulate(), and tryConnection().

ConnectState ConnectDialog::connectionState_ [protected]

Definition at line 57 of file ConnectDialog.h.

Referenced by ConnectDialog(), connected(), simulate(), tryConnection(), tryLocalConnection(), and tryRemoteConnection().

time_t ConnectDialog::lastTime_ [protected]

Definition at line 58 of file ConnectDialog.h.

Referenced by ConnectDialog(), and simulate().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:01 2009 for Scorched3D by  doxygen 1.5.3