WD
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
webdriver::Server Class Reference

#include <webdriver_server.h>

Public Types

enum  State { STATE_UNCONFIGURED = 0, STATE_IDLE = 1, STATE_RUNNING = 2 }
 

Public Member Functions

int Configure (const CommandLine &options)
 
int SetRouteTable (RouteTable *routeTable)
 
int Start ()
 
int Stop (bool force=false)
 
int Reset ()
 
const RouteTableGetRouteTable () const
 
const std::string & url_base () const
 
const CommandLine & GetCommandLine () const
 

Static Public Member Functions

static ServerGetInstance ()
 

Friends

struct DefaultSingletonTraits< Server >
 
class XDRPCCommand
 

Member Enumeration Documentation

Enumerator
STATE_UNCONFIGURED 
STATE_IDLE 
STATE_RUNNING 

Member Function Documentation

int webdriver::Server::Configure ( const CommandLine &  options)

Configure server from command line

Parameters
options- obtained command line
Returns
0 - if init was success, error code otherwise.
const CommandLine& webdriver::Server::GetCommandLine ( ) const
static Server* webdriver::Server::GetInstance ( )
static
const RouteTable& webdriver::Server::GetRouteTable ( ) const
int webdriver::Server::Reset ( )

Reset server to unconfigured state. Can be applied only in idle state.

Returns
0 - if success, error code otherwise.
int webdriver::Server::SetRouteTable ( RouteTable routeTable)

Set route table for this server. Server should be stopped.

Parameters
routeTablerouteTable to set. Server keeps own copy of RouteTable.
Returns
0 - if success, error code otherwise.
int webdriver::Server::Start ( )

Start server

Returns
0 - if success, error code otherwise.
int webdriver::Server::Stop ( bool  force = false)

Stop server.

Parameters
forceforce to close opened sessions. If false and there is any open session stop will fail.
Returns
0 - if success, error code otherwise.
const std::string& webdriver::Server::url_base ( ) const

Friends And Related Function Documentation

friend struct DefaultSingletonTraits< Server >
friend
friend class XDRPCCommand
friend

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