ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <localwebserver.h>

Inheritance diagram for Networking::LocalWebserver:
Collaboration diagram for Networking::LocalWebserver:

List of all members.

Public Member Functions

 LocalWebserver ()
virtual ~LocalWebserver ()
void start (bool useMinimalMode=false)
void stop ()
void stopOnIdle ()
Common::String getAddress ()
IndexPageHandlerindexPageHandler ()
bool isRunning ()

Static Public Member Functions

static uint32 getPort ()
static void setClientGetHandler (Client &client, Common::String response, long code=200, const char *mimeType=nullptr)
static void setClientGetHandler (Client &client, Common::SeekableReadStream *responseStream, long code=200, const char *mimeType=nullptr)
static void setClientRedirectHandler (Client &client, Common::String response, Common::String location, const char *mimeType=nullptr)
static void setClientRedirectHandler (Client &client, Common::SeekableReadStream *responseStream, Common::String location, const char *mimeType=nullptr)
static Common::String urlDecode (Common::String value)
static Common::String urlEncodeQueryParameterValue (Common::String value)

Static Public Attributes

static const uint32 DEFAULT_SERVER_PORT = 12345

Private Member Functions

void startTimer (int interval=TIMER_INTERVAL)
void stopTimer ()
void handle ()
void handleClient (uint32 i)
void acceptClient ()
void resolveAddress (void *ipAddress)
void addPathHandler (Common::String path, BaseHandler *handler)

Private Attributes

SDLNet_SocketSet _set
TCPsocket _serverSocket
Client _client [MAX_CONNECTIONS]
uint32 _clients
bool _timerStarted
bool _stopOnIdle
bool _minimalMode
Common::HashMap
< Common::String, BaseHandler * > 
_pathHandlers
BaseHandler_defaultHandler
IndexPageHandler _indexPageHandler
FilesPageHandler _filesPageHandler
CreateDirectoryHandler _createDirectoryHandler
DownloadFileHandler _downloadFileHandler
UploadFileHandler _uploadFileHandler
ListAjaxHandler _listAjaxHandler
FilesAjaxPageHandler _filesAjaxPageHandler
ResourceHandler _resourceHandler
uint32 _idlingFrames
Common::Mutex _handleMutex
Common::String _address
uint32 _serverPort

Static Private Attributes

static const uint32 FRAMES_PER_SECOND = 20
static const uint32 TIMER_INTERVAL = 1000000 / FRAMES_PER_SECOND
static const uint32 MAX_CONNECTIONS = 10

Friends

void localWebserverTimer (void *)

Detailed Description

Definition at line 52 of file localwebserver.h.


Constructor & Destructor Documentation

Networking::LocalWebserver::LocalWebserver (  ) 

Definition at line 65 of file localwebserver.cpp.

Networking::LocalWebserver::~LocalWebserver (  )  [virtual]

Definition at line 77 of file localwebserver.cpp.


Member Function Documentation

void Networking::LocalWebserver::acceptClient (  )  [private]

Definition at line 260 of file localwebserver.cpp.

void Networking::LocalWebserver::addPathHandler ( Common::String  path,
BaseHandler handler 
) [private]

Definition at line 165 of file localwebserver.cpp.

Common::String Networking::LocalWebserver::getAddress (  ) 

Definition at line 171 of file localwebserver.cpp.

uint32 Networking::LocalWebserver::getPort (  )  [static]

Definition at line 183 of file localwebserver.cpp.

void Networking::LocalWebserver::handle (  )  [private]

Definition at line 191 of file localwebserver.cpp.

void Networking::LocalWebserver::handleClient ( uint32  i  )  [private]

Definition at line 222 of file localwebserver.cpp.

IndexPageHandler & Networking::LocalWebserver::indexPageHandler (  ) 

Definition at line 173 of file localwebserver.cpp.

bool Networking::LocalWebserver::isRunning (  ) 

Definition at line 175 of file localwebserver.cpp.

void Networking::LocalWebserver::resolveAddress ( void *  ipAddress  )  [private]

Definition at line 281 of file localwebserver.cpp.

void Networking::LocalWebserver::setClientGetHandler ( Client client,
Common::SeekableReadStream responseStream,
long  code = 200,
const char *  mimeType = nullptr 
) [static]

Definition at line 386 of file localwebserver.cpp.

void Networking::LocalWebserver::setClientGetHandler ( Client client,
Common::String  response,
long  code = 200,
const char *  mimeType = nullptr 
) [static]

Definition at line 379 of file localwebserver.cpp.

void Networking::LocalWebserver::setClientRedirectHandler ( Client client,
Common::String  response,
Common::String  location,
const char *  mimeType = nullptr 
) [static]

Definition at line 394 of file localwebserver.cpp.

void Networking::LocalWebserver::setClientRedirectHandler ( Client client,
Common::SeekableReadStream responseStream,
Common::String  location,
const char *  mimeType = nullptr 
) [static]

Definition at line 401 of file localwebserver.cpp.

void Networking::LocalWebserver::start ( bool  useMinimalMode = false  ) 

Definition at line 100 of file localwebserver.cpp.

void Networking::LocalWebserver::startTimer ( int  interval = TIMER_INTERVAL  )  [private]

Definition at line 85 of file localwebserver.cpp.

void Networking::LocalWebserver::stop (  ) 

Definition at line 141 of file localwebserver.cpp.

void Networking::LocalWebserver::stopOnIdle (  ) 

Definition at line 163 of file localwebserver.cpp.

void Networking::LocalWebserver::stopTimer (  )  [private]

Definition at line 94 of file localwebserver.cpp.

Common::String Networking::LocalWebserver::urlDecode ( Common::String  value  )  [static]

Definition at line 419 of file localwebserver.cpp.

Common::String Networking::LocalWebserver::urlEncodeQueryParameterValue ( Common::String  value  )  [static]

Definition at line 455 of file localwebserver.cpp.


Friends And Related Function Documentation

void localWebserverTimer ( void *  ignored  )  [friend]

Definition at line 81 of file localwebserver.cpp.


Member Data Documentation

Definition at line 62 of file localwebserver.h.

Definition at line 63 of file localwebserver.h.

Definition at line 77 of file localwebserver.h.

Definition at line 63 of file localwebserver.h.

Definition at line 63 of file localwebserver.h.

Definition at line 88 of file localwebserver.h.

Definition at line 53 of file localwebserver.h.

Definition at line 55 of file localwebserver.h.

Definition at line 54 of file localwebserver.h.


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


Generated on Sat Sep 21 2019 05:04:22 for ResidualVM by doxygen 1.7.1
curved edge   curved edge