#include <ConnectDialog.h>

Public Member Functions | |
| void | connected () |
| virtual void | windowInit (const unsigned state) |
| virtual void | simulate (float frameTime) |
| UniqueIdStore & | getIdStore () |
| const char * | getHost () |
| int | getPort () |
Static Public Member Functions | |
| static ConnectDialog * | instance () |
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_ |
| UniqueIdStore * | idStore_ |
| int | tryCount_ |
| ConnectState | connectionState_ |
| time_t | lastTime_ |
Static Protected Attributes | |
| static ConnectDialog * | instance_ = 0 |
Private Member Functions | |
| ConnectDialog () | |
| virtual | ~ConnectDialog () |
Definition at line 28 of file ConnectDialog.h.
enum ConnectDialog::ConnectState [protected] |
| 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.
| 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] |
| 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] |
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] |
UniqueIdStore* ConnectDialog::idStore_ [protected] |
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] |
1.5.3