Main Page   File List   File Members   Related Pages  

frdi_dummy_host.h File Reference

function headers and defines for the host package More...

#include "../shared/frdi.h"

Go to the source code of this file.

Compounds

struct  frdi__host_server
struct  frdi__host_app
struct  frdi__host_game

Functions

frdi_host_app * frdiHostAppNew (frdi_app *app)
int frdiHostAppRun (frdi_host_app *self)
void frdiHostAppFree (frdi_host_app *self)
char * frdiHostAppDisplay (frdi_host_app *self)
void frdiHostPV (frdi_host_app *self, char *str)
void frdiHostPVF (frdi_host_app *self, char *format, void *arg)
frdi_connection * frdiHostServerConnectionNew (frdi_host_app *self, frdi_application *remote)
void * frdiHostServerConnectionRecieve (void *arg)
void frdiHostConnectionClose (frdi_connection *connection)
frdi_host_server * frdiHostServerInitialise (frdi_host_app *self, frdi_connection *connection)
void frdiHostServerFinalise (frdi_host_app *self, frdi_host_server *server)
void frdiHostServerRecieve (frdi_host_app *self, frdi_connection *connection, frdi_message *message)
void frdiHostServerMessageSend (frdi_host_app *self, frdi_host_server *server, frdi_message *message)
char * frdiHostServerDisplay (frdi_host_app *self, frdi_host_server *server)
void frdiHostDoStuff (frdi_host_app *self)
void * frdiHostServerMessageRecieve (frdi_host_app *self, frdi_host_server *server, frdi_message *message)
void frdiHostServerMsU (frdi_host_app *self, frdi_host_server *server, frdi_message *old_message)
void frdiHostGameSendServer (frdi_host_app *self, frdi_host_game *game, char *str)
void frdiHostServerMrD (frdi_host_app *self, frdi_host_server *server, frdi_message *message)
void frdiHostServerMrF (frdi_host_app *self, frdi_host_server *server, frdi_message *message)
void frdiHostServerMrG (frdi_host_app *self, frdi_host_server *server, frdi_message *message)
void frdiHostServerMrK (frdi_host_app *self, frdi_host_server *server, frdi_message *message)
void frdiHostServerMrL (frdi_host_app *self, frdi_host_server *server, frdi_message *message)
void frdiHostServerMrR (frdi_host_app *self, frdi_host_server *server, frdi_message *message)
void frdiHostServerMrU (frdi_host_app *self, frdi_host_server *server, frdi_message *message)
void frdiHostServerMrE (frdi_host_app *self, frdi_host_server *server, frdi_message *message, char c)
void frdiHostGameReceiveServer (frdi_host_app *self, frdi_host_game *game, char *str)
frdi_host_game * frdiHostGameNew (frdi_host_app *self, char *game_id)
void frdiHostGameLog (frdi_host_app *self, frdi_host_game *game, char *str)
void frdiHostGameFinish (frdi_host_app *self, frdi_host_game *game)
char * frdiHostGameDescribe (frdi_host_app *self, frdi_host_game *game)
char * frdiHostGameReport (frdi_host_app *self, frdi_host_game *game)


Detailed Description

function headers and defines for the host package

Author:
Douglas Reay <douglas-legal@reay.org>
Warning:

Function Documentation

frdi_host_app* frdiHostAppNew (  frdi_app *    app ) 
 

create the object

int frdiHostAppRun (  frdi_host_app *    self ) 
 

doesn't exist until app ready to close the main loop. returns EXIT_FAILURE or EXIT_SUCCESS

void frdiHostAppFree (  frdi_host_app *    self ) 
 

release the object

char* frdiHostAppDisplay (  frdi_host_app *    self ) 
 

return information about this application as a string

void frdiHostPV (  frdi_host_app *    self,
char *    str
) 
 

print if verbose

void frdiHostPVF (  frdi_host_app *    self,
char *    format,
void *    arg
) 
 

print if verbose using format

frdi_connection* frdiHostServerConnectionNew (  frdi_host_app *    self,
frdi_application *    remote
) 
 

connect to a named fairdice server app

void* frdiHostServerConnectionRecieve (  void *    arg ) 
 

recieve a message from a client-server connection

void frdiHostConnectionClose (  frdi_connection *    connection ) 
 

on closing the connection, free the stuff we created

frdi_host_server* frdiHostServerInitialise (  frdi_host_app *    self,
frdi_connection *    connection
) 
 

register a host-server connection

void frdiHostServerFinalise (  frdi_host_app *    self,
frdi_host_server *    server
) 
 

de-register a host-server connection

void frdiHostServerRecieve (  frdi_host_app *    self,
frdi_connection *    connection,
frdi_message *    message
) 
 

recieve a message from a host-server connection

void frdiHostServerMessageSend (  frdi_host_app *    self,
frdi_host_server *    server,
frdi_message *    message
) 
 

send a message along a host-server connection

char* frdiHostServerDisplay (  frdi_host_app *    self,
frdi_host_server *    server
) 
 

return a description of this host-server connection

void frdiHostDoStuff (  frdi_host_app *    self ) 
 

do stuff

void* frdiHostServerMessageRecieve (  frdi_host_app *    self,
frdi_host_server *    server,
frdi_message *    message
) 
 

recieve a message from a host-server connection D Description F Find G Game K Keepalive L Link R Remote U Unknown

void frdiHostServerMsU (  frdi_host_app *    self,
frdi_host_server *    server,
frdi_message *    old_message
) 
 

send a U type message along a host-server connection

void frdiHostGameSendServer (  frdi_host_app *    self,
frdi_host_game *    game,
char *    str
) 
 

Send str back to the server as a game message

void frdiHostServerMrD (  frdi_host_app *    self,
frdi_host_server *    server,
frdi_message *    message
) 
 

Fairdice Host-Server connection message receive : Description CHALLENGE : D is <description> RESPONSE : none ACTION : set description of server

CHALLENGE : D request RESPONSE : D is <description> or RESPONSE : D null ACTION : none

void frdiHostServerMrF (  frdi_host_app *    self,
frdi_host_server *    server,
frdi_message *    message
) 
 

Fairdice Host-Server connection message receive : Find CHALLENGE : F varies RESPONSE : varies ACTION : varies

void frdiHostServerMrG (  frdi_host_app *    self,
frdi_host_server *    server,
frdi_message *    message
) 
 

Fairdice Host-Server connection message receive : Game

CHALLENGE : G <gamestr> <seperator> <data> RESPONSE : varies ACTION : parse <gamestr> into a frdi_host_game object. pass on to further method

void frdiHostServerMrK (  frdi_host_app *    self,
frdi_host_server *    server,
frdi_message *    message
) 
 

Fairdice Host-Server connection message receive : Keepalive

CHALLENGE : K null RESPONSE : none ACTION : none

CHALLENGE : K ping request <integer> RESPONSE : K ping response <integer> ACTION : none

CHALLENGE : K ping response <integer> RESPONSE : none ACTION : record ping delay

CHALLENGE : K time request RESPONSE : K time response <timestamp> ACTION : none

CHALLENGE : K time response <timestamp> RESPONSE : none ACTION : synch time

void frdiHostServerMrL (  frdi_host_app *    self,
frdi_host_server *    server,
frdi_message *    message
) 
 

Fairdice Host-Server connection message receive : Link

CHALLENGE : L opening RESPONSE : L opened ACTION : none

CHALLENGE : L opened RESPONSE : none ACTION : none

CHALLENGE : L closing RESPONSE : L closed ACTION : close this end of link

CHALLENGE : L closed RESPONSE : none ACTION : close this end of link

void frdiHostServerMrR (  frdi_host_app *    self,
frdi_host_server *    server,
frdi_message *    message
) 
 

Fairdice Host-Server connection message receive : Remote

CHALLENGE : R <data> RESPONSE : none ACTION : this is a message sent to us by a host

void frdiHostServerMrU (  frdi_host_app *    self,
frdi_host_server *    server,
frdi_message *    message
) 
 

Fairdice Host-Server connection message receive : Unknown

CHALLENGE : U null RESPONSE : none ACTION : report the error

CHALLENGE : U <verbatim copy of message server got from us> RESPONSE : none ACTION : report the error

void frdiHostServerMrE (  frdi_host_app *    self,
frdi_host_server *    server,
frdi_message *    message,
char    c
) 
 

Fairdice Host-Server connection message receive : A Mystery

CHALLENGE : <unparsable> RESPONSE : U <unparsable> ACTION : report the error

void frdiHostGameReceiveServer (  frdi_host_app *    self,
frdi_host_game *    game,
char *    str
) 
 

deal with a game str from the server

frdi_host_game* frdiHostGameNew (  frdi_host_app *    self,
char *    game_id
) 
 

create a game object (values get filled in by the create object)

void frdiHostGameLog (  frdi_host_app *    self,
frdi_host_game *    game,
char *    str
) 
 

log it

void frdiHostGameFinish (  frdi_host_app *    self,
frdi_host_game *    game
) 
 

de-register and destroy a game object

char* frdiHostGameDescribe (  frdi_host_app *    self,
frdi_host_game *    game
) 
 

describe it

char* frdiHostGameReport (  frdi_host_app *    self,
frdi_host_game *    game
) 
 

report the outcome of a game to the host in complete terms


Generated on Wed Aug 18 13:23:53 2004 for Project Fairdice by doxygen1.2.18