Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | Related Pages

MqS API

the MqS API is used as libFreiburg 2.0 object. More...


Modules

group  MqIoS API
 building, splitting, reading and sending of a Msgque packet.
group  MqReadS API
 reading a Msgque packet and splitting it into several items.
group  MqSendS API
 collecting and sending all items of a Msgque packet
group  MqErrorS API
 the MqErrorS API is used to manage error messages.

Classes

struct  MqS
 the main libFreiburg 2.0 object. More...

Defines

#define MQ_SAVE_ERROR(msgque)   ((msgque)&&(msgque)->error?(msgque)->error:NULL)
 get a MqErrorS object from a MgS in a save manner

Typedefs

typedef MqErrorE(* ContextCreateF )(MqBufferLSP, ContextSP *)
 a prototype for a ContextCreate procedure
typedef void(* ContextDeleteF )(ContextSP *)
 a prototype for a ContextDelete procedure
typedef MqErrorE(* MqTokenF )(MqSP msgque, void *data)
 generic token processing function prototype
typedef MqS MqS
 the main libFreiburg 2.0 object.

Enumerations

enum  MqOpt { MQ_PARENT }
 option used by MqGetOpt More...
enum  MqE { MQ_CLIENT, MQ_SERVER }
 the private MqS type member More...
enum  MqIoSelectE { MQ_SELECT_RECV, MQ_SELECT_SEND }
 'select' type for reading or writing More...

Functions

MQ_EXTERN MqErrorE MqCreate (ContextSP context, MqBufferLSP argv, MqSP *out)
 create a libFreiburg 2.0 object
MQ_EXTERN void MqDelete (MqSP *msgqueP)
 delete a libFreiburg 2.0 object
Attention:
the value of msgqueP will be set to zero

MQ_EXTERN MQ_PTR MqGetOpt (MqSP const msgque, MqOpt opt)
 get option for, MqOpt
MQ_EXTERN MqTransSP const MqGetTransPtr (MqSP const msgque)
 get transaction pointer
MQ_EXTERN void MqDataLog (MqSP msgque, const char *prefix)
 log MqS for debugging
MQ_EXTERN MqErrorE MqServiceCreate (MqSP const msgque, MQ_STR token, MqTokenF proc, MQ_PTR data)
 create a service handle
MQ_EXTERN MqErrorE MqServiceDelete (MqSP const msgque, MQ_STR token)
 delete service handle

Detailed Description

the MqS API is used as libFreiburg 2.0 object.

the MqS object is created just after the ContextS object usually in the procedure ContextCreate. every external ContextS object has only one MqS object and every MqS object has only one ContextS object. the MqS object will be created with the MqCreate and will be deleted with the MqDelete procedure. during creation of a MqS object additional objects will be created too:
object-type member description
MqSendS send used for building and sending a Msgque packet
MqReadS read used for reading and splitting a Msgque packet
MqIoS io used for doing socket communication
MqErrorS error used for collection of error data
MqStatS statistic used for collection of statistical data

Change for 2.0:
DELETE: MqGetReturnToken

Typedef Documentation

typedef struct MqS MqS
 

the main libFreiburg 2.0 object.

the MqS object is created just after the ContextS object usually in the procedure ContextCreate. every external ContextS object has only one MqS object and every MqS object has only one ContextS object. the MqS object will be created with the MqCreate and will be deleted with the MqDelete procedure. during creation of a MqS object additional objects will be created too:
object-type member description
MqSendS send used for building and sending a Msgque packet
MqReadS read used for reading and splitting a Msgque packet
MqIoS io used for doing socket communication
MqErrorS error used for collection of error data
MqStatS statistic used for collection of statistical data

Change for 2.0:
DELETE: retT - new internal return handling
DELETE: srvT - new internal service handling


Enumeration Type Documentation

enum MqE
 

the private MqS type member

every libFreiburg 2.0 application need a type to separate the basic behaviour:

Parameters:
MQ_CLIENT 
  • responsible to start the server in local mode
  • do the connect system call to create a server connection
  • responsible to stop the server in local and remote mode
  • responsible to handle server error-messages
MQ_SEVER 
  • responsible to wait for incoming client connection
  • do the accept system call to accept a server connection
  • check the usability of the client with a periodic MqSendPING call

Definition at line 248 of file types.h.

enum MqIoSelectE
 

'select' type for reading or writing

Enumeration values:
MQ_SELECT_RECV  'select' for reading
MQ_SELECT_SEND  'select' for writing

Definition at line 255 of file types.h.

enum MqOpt
 

option used by MqGetOpt

Enumeration values:
MQ_PARENT  get the parent MqS

Definition at line 227 of file types.h.


Function Documentation

MQ_EXTERN MqErrorE MqCreate ContextSP  context,
MqBufferLSP  argv,
MqSP out
 

create a libFreiburg 2.0 object

Change for 2.0:
child get MqS->name from parent
Parameters:
context  my 'parent' context
argv  the initial arguments (e.g. command-line)
out  OUT: the *new* Mq

MQ_EXTERN void MqDelete MqSP msgqueP  ) 
 

delete a libFreiburg 2.0 object

Attention:
the value of msgqueP will be set to zero

Parameters:
msgqueP  pointer to a MqS object

MQ_EXTERN MqErrorE MqServiceCreate MqSP const   msgque,
MQ_STR  token,
MqTokenF  proc,
MQ_PTR  data
[inline]
 

create a service handle

Change for 2.0:
NEW: MqServiceCreate

MQ_EXTERN MqErrorE MqServiceDelete MqSP const   msgque,
MQ_STR  token
[inline]
 

delete service handle

Change for 2.0:
NEW: MqServiceDelete


Generated on Tue Nov 23 16:13:06 2004 for libFreiburg by  doxygen 1.3.8-20040928