Main Page   File List   File Members   Related Pages  

frdi_dummy_user.h File Reference

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

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

Go to the source code of this file.

Compounds

struct  frdi__user_client
struct  frdi__user_app
struct  frdi__user_game

Functions

frdi_user_app * frdiUserAppNew (frdi_app *app)
int frdiUserAppRun (frdi_user_app *self)
void frdiUserAppFree (frdi_user_app *self)
char * frdiUserAppDisplay (frdi_user_app *self)
void frdiUserPV (frdi_user_app *self, char *str)
void frdiUserPVF (frdi_user_app *self, char *format, void *arg)
frdi_connection * frdiUserClientConnectionNew (frdi_user_app *self, frdi_application *remote)
void * frdiUserClientConnectionRecieve (void *arg)
void frdiUserConnectionClose (frdi_connection *connection)
frdi_user_client * frdiUserClientInitialise (frdi_user_app *self, frdi_connection *connection)
void frdiUserClientFinalise (frdi_user_app *self, frdi_user_client *client)
void frdiUserClientRecieve (frdi_user_app *self, frdi_connection *connection, frdi_message *message)
void frdiUserClientMessageSend (frdi_user_app *self, frdi_user_client *client, frdi_message *message)
char * frdiUserClientDisplay (frdi_user_app *self, frdi_user_client *client)
void frdiUserDoStuff (frdi_user_app *self)
void * frdiUserClientMessageRecieve (frdi_user_app *self, frdi_user_client *client, frdi_message *message)
void frdiUserClientMsU (frdi_user_app *self, frdi_user_client *client, frdi_message *old_message)
void frdiUserGameSendClient (frdi_user_app *self, frdi_user_game *game, char *str)
void frdiUserClientMrD (frdi_user_app *self, frdi_user_client *client, frdi_message *message)
void frdiUserClientMrF (frdi_user_app *self, frdi_user_client *client, frdi_message *message)
void frdiUserClientMrG (frdi_user_app *self, frdi_user_client *client, frdi_message *message)
void frdiUserClientMrK (frdi_user_app *self, frdi_user_client *client, frdi_message *message)
void frdiUserClientMrL (frdi_user_app *self, frdi_user_client *client, frdi_message *message)
void frdiUserClientMrR (frdi_user_app *self, frdi_user_client *client, frdi_message *message)
void frdiUserClientMrU (frdi_user_app *self, frdi_user_client *client, frdi_message *message)
void frdiUserClientMrE (frdi_user_app *self, frdi_user_client *client, frdi_message *message, char c)
void frdiUserGameReceiveClient (frdi_user_app *self, frdi_user_game *game, char *str)
frdi_user_game * frdiUserGameNew (frdi_user_app *self, char *game_id)
void frdiUserGameLog (frdi_user_app *self, frdi_user_game *game, char *str)
void frdiUserGameFinish (frdi_user_app *self, frdi_user_game *game)
char * frdiUserGameDescribe (frdi_user_app *self, frdi_user_game *game)
char * frdiUserGameReport (frdi_user_app *self, frdi_user_game *game)


Detailed Description

function headers and defines for the user package

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

Function Documentation

frdi_user_app* frdiUserAppNew frdi_app *    app
 

create the object

int frdiUserAppRun frdi_user_app *    self
 

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

void frdiUserAppFree frdi_user_app *    self
 

release the object

char* frdiUserAppDisplay frdi_user_app *    self
 

return information about this application as a string

void frdiUserPV frdi_user_app *    self,
char *    str
 

print if verbose

void frdiUserPVF frdi_user_app *    self,
char *    format,
void *    arg
 

print if verbose using format

frdi_connection* frdiUserClientConnectionNew frdi_user_app *    self,
frdi_application *    remote
 

connect to a named fairdice client app

void* frdiUserClientConnectionRecieve void *    arg
 

recieve a message from a client-client connection

void frdiUserConnectionClose frdi_connection *    connection
 

on closing the connection, free the stuff we created

frdi_user_client* frdiUserClientInitialise frdi_user_app *    self,
frdi_connection *    connection
 

register a user-client connection

void frdiUserClientFinalise frdi_user_app *    self,
frdi_user_client *    client
 

de-register a user-client connection

void frdiUserClientRecieve frdi_user_app *    self,
frdi_connection *    connection,
frdi_message *    message
 

recieve a message from a user-client connection

void frdiUserClientMessageSend frdi_user_app *    self,
frdi_user_client *    client,
frdi_message *    message
 

send a message along a user-client connection

char* frdiUserClientDisplay frdi_user_app *    self,
frdi_user_client *    client
 

return a description of this user-client connection

void frdiUserDoStuff frdi_user_app *    self
 

do stuff

void* frdiUserClientMessageRecieve frdi_user_app *    self,
frdi_user_client *    client,
frdi_message *    message
 

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

void frdiUserClientMsU frdi_user_app *    self,
frdi_user_client *    client,
frdi_message *    old_message
 

send a U type message along a user-client connection

void frdiUserGameSendClient frdi_user_app *    self,
frdi_user_game *    game,
char *    str
 

Send str back to the client as a game message

void frdiUserClientMrD frdi_user_app *    self,
frdi_user_client *    client,
frdi_message *    message
 

Fairdice User-Client connection message receive : Description CHALLENGE : D is <description> RESPONSE : none ACTION : set description of client

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

void frdiUserClientMrF frdi_user_app *    self,
frdi_user_client *    client,
frdi_message *    message
 

Fairdice User-Client connection message receive : Find CHALLENGE : F yes RESPONSE : none ACTION : we are now connected

CHALLENGE : F no RESPONSE : none ACTION : connection attempt failed

CHALLENGE : F no <message> RESPONSE : none ACTION : connection attempt failed - report error

void frdiUserClientMrG frdi_user_app *    self,
frdi_user_client *    client,
frdi_message *    message
 

Fairdice User-Client connection message receive : Game

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

void frdiUserClientMrK frdi_user_app *    self,
frdi_user_client *    client,
frdi_message *    message
 

Fairdice User-Client 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 frdiUserClientMrL frdi_user_app *    self,
frdi_user_client *    client,
frdi_message *    message
 

Fairdice User-Client 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 frdiUserClientMrR frdi_user_app *    self,
frdi_user_client *    client,
frdi_message *    message
 

Fairdice User-Client connection message receive : Remote

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

void frdiUserClientMrU frdi_user_app *    self,
frdi_user_client *    client,
frdi_message *    message
 

Fairdice User-Client 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 frdiUserClientMrE frdi_user_app *    self,
frdi_user_client *    client,
frdi_message *    message,
char    c
 

Fairdice User-Client connection message receive : A Mystery

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

void frdiUserGameReceiveClient frdi_user_app *    self,
frdi_user_game *    game,
char *    str
 

deal with a game str from the client

frdi_user_game* frdiUserGameNew frdi_user_app *    self,
char *    game_id
 

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

void frdiUserGameLog frdi_user_app *    self,
frdi_user_game *    game,
char *    str
 

log it

void frdiUserGameFinish frdi_user_app *    self,
frdi_user_game *    game
 

de-register and destroy a game object

char* frdiUserGameDescribe frdi_user_app *    self,
frdi_user_game *    game
 

describe it

char* frdiUserGameReport frdi_user_app *    self,
frdi_user_game *    game
 

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


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