central Class Reference

#include <central.h>

List of all members.

Public Member Functions

 central ()
 General communication handler with the moros client.
void config_handler (channel *ch)
void save_all (std::string config_file)
 Save all the data to files for backup.
void tls_handler (channel *ch)
void change_game (channel *ch)
 Create a new game record.
void client_handler (channel *ch)
 Receive data from the moros client program.
std::string rand_session ()
 Communicate with the client by a TLS secure connection.
void do_fork (std::string file)
void chat_session (std::string session)
void config ()
 Read the data from the config files.
void log_level (std::string level)
 Set the log level.
void log_file (std::string logfile)
 Set the log file.
void game_directory (std::string dir)
 Set the game data directory.
void main_loop ()

Public Attributes

time_t current_time


Constructor & Destructor Documentation

central::central (  ) 

General communication handler with the moros client.


Member Function Documentation

void central::config_handler ( channel ch  ) 

void central::save_all ( std::string  config_file  ) 

Save all the data to files for backup.

void central::tls_handler ( channel ch  ) 

void central::change_game ( channel ch  ) 

Create a new game record.

Communication:
game Create or change a game record
  • follow up
    • name: <name>
    • descr: <description>
    • join: <join method number>
    • goal: <game goal number>
    • map: <map name>
    • url: <game server url>
    • party: <party name>
      • desc: <party description>
  • responses
    • gameid: <id>
      the reference number of this game on a new game

void central::client_handler ( channel ch  ) 

Receive data from the moros client program.

Todo:
limit 1 person to download more than 3 games each day

client read data from game

client write data from game, must be owner

std::string central::rand_session (  ) 

Communicate with the client by a TLS secure connection.

Communication:
new_user <username> Create a new user record
  • follow up
    • password: <password>
      needed password
  • responses
    • error: existing user name
      when another user with this name already exists
    • error: expecting password
      when a password was not provided
    • session: <session-id>
      on succesfull login
Communication:
user <username> Login with a current user
  • follow up
    • password: <password>
      needed password
  • responses
    • error: expecting user name
      no user or new_user command was found
    • error: expecting password
      no password was found
    • error: unauthorized entry
      no user record with this password was found
    • session: <session-id>
      on succesfull login

void central::do_fork ( std::string  file  ) 

void central::chat_session ( std::string  session  ) 

void central::config (  ) 

Read the data from the config files.

void central::log_level ( std::string  level  ) 

Set the log level.

void central::log_file ( std::string  logfile  ) 

Set the log file.

void central::game_directory ( std::string  dir  ) 

Set the game data directory.

void central::main_loop (  ) 


Member Data Documentation

time_t central::current_time


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

Generated on Tue Jan 1 17:30:01 2008 for central Class Reference by  doxygen   Visit the project page on SourceForge.net Logo