Main Page | Data Structures | File List | Data Fields | Globals

engine.h File Reference

#include <openssl/BIO.h>
#include <engine_xmpp.h>
#include <engine_gps.h>

Go to the source code of this file.

Data Structures

struct  engine_t

Enumerations

enum  cmd_state_t { CMD_STATE_UNKNOWN, CMD_STATE_OFF, CMD_STATE_ON, CMD_STATE_ONE }
enum  engine_error_t {
  ENGINE_ERROR_NONE, ENGINE_ERROR_AGAIN, ENGINE_ERROR_RECONNECT, ENGINE_ERROR_INVAL,
  ENGINE_ERROR_UNKNOWN
}
enum  engine_subsystem_t { ENGINE_GPS, ENGINE_XMPP }
 Subsystems in the engine. More...


Functions

engine_tengine_new ()
 Allocates a new engine and initializes default values.

void engine_set_logger (engine_t *engine, engine_subsystem_t subsystem, BIO *logger)
 Sets a logger for a given subsystem.

void engine_set_xmpp_server (engine_t *engine, char *server)
 Set the XMPP server the engine will use to receive and send data.

void engine_set_xmpp_account (engine_t *engine, char *account, char *password)
 Set the XMPP account the engine will use to receive and send data.

void engine_set_gps_device (engine_t *engine, char *device)
 Set the GPS device used to retrieve GPS-data.

engine_error_t engine_run (engine_t *engine)
 Run the engine The engine runs until some error occur.

void engine_stop (engine_t *engine)
 Stop all subsystems and deallocate all memory used by the engine.


Enumeration Type Documentation

enum cmd_state_t
 

Enumeration values:
CMD_STATE_UNKNOWN 
CMD_STATE_OFF 
CMD_STATE_ON 
CMD_STATE_ONE 

enum engine_error_t
 

Enumeration values:
ENGINE_ERROR_NONE  No error.
ENGINE_ERROR_AGAIN  Signalizes a retry to a file or socket descriptor.
ENGINE_ERROR_RECONNECT  Error may be solved by reconnecting.
ENGINE_ERROR_INVAL  A invalid argument is passed.
ENGINE_ERROR_UNKNOWN  An unknown error.

enum engine_subsystem_t
 

Subsystems in the engine.

Enumeration values:
ENGINE_GPS  The GPS Subsystem.
ENGINE_XMPP  The XMPP Subsystem.


Function Documentation

engine_t* engine_new  ) 
 

Allocates a new engine and initializes default values.

Returns:
Newly allocated and initialized engine

engine_error_t engine_run engine_t engine  ) 
 

Run the engine The engine runs until some error occur.

void engine_set_gps_device engine_t engine,
char *  device
 

Set the GPS device used to retrieve GPS-data.

Parameters:
engine 
device Path to device

void engine_set_logger engine_t engine,
engine_subsystem_t  subsystem,
BIO *  logger
 

Sets a logger for a given subsystem.

Parameters:
engine 
subsystem 
logger Recipient of logging messages

void engine_set_xmpp_account engine_t engine,
char *  account,
char *  password
 

Set the XMPP account the engine will use to receive and send data.

Parameters:
engine 
account The account in jabber ID format (x.x)
password Password associated with the account

void engine_set_xmpp_server engine_t engine,
char *  server
 

Set the XMPP server the engine will use to receive and send data.

Parameters:
engine 
server Server name. IP-adress in "x.x.x.x" notation or DNS name.

void engine_stop engine_t engine  ) 
 

Stop all subsystems and deallocate all memory used by the engine.


Generated on Wed Mar 14 20:32:17 2007 for GloPosCom by doxygen 1.3.4