PUBLIC: object configuration

Configuration data of the MqS object. More...


Data Structures

struct  MqFactoryS
 used for factory function pointer management More...
struct  MqCallbackS
 used for callback function pointer management More...
struct  MqLinkSetupS
 used to Create/Delete of object More...
struct  MqIoUdsConfigS
struct  MqIoTcpConfigS
struct  MqIoPipeConfigS
struct  MqIoConfigS
struct  MqConfigS
 end-user configuration data, also available as command-line options More...
struct  MqSetupS
 application-programmer configuration data More...

Defines

#define MqFactoryS_NULL   { {NULL, NULL, NULL, NULL}, {NULL, NULL, NULL, NULL} }

Typedefs

typedef pid_t(* MqForkF )(void)
 prototype for the fork syscall
typedef pid_t(* MqVForkF )(void)
 prototype for the vfork syscall
typedef void(* MqDeleteF )(struct MqS *const context)
 the prototype for a ContextDelete function
typedef void(* MqTokenDataFreeF )(struct MqS const *const context, MQ_PTR *dataP)
 prototype for a free additional token data function
typedef void(* MqHelpF )(MQ_CST)
 application specific help function type
typedef void(* MqFactoryDeleteF )(struct MqS *context, MQ_BOL doFactoryCleanup, MQ_PTR data)
 prototype for a Object-Delete factory function
typedef void(* MqExitF )(int num)
 prototype for exit a process or thread
typedef void(* MqSetupF )(struct MqS *const )
 used to setup (initialize) a new thread/fork/process created by libmsgque using the SysServer? style commands

Enumerations

enum  MqFactoryE {
  MQ_FACTORY_NEW_INIT = 0, MQ_FACTORY_NEW_CHILD = 1, MQ_FACTORY_NEW_SLAVE = 2, MQ_FACTORY_NEW_FORK = 3,
  MQ_FACTORY_NEW_THREAD = 4
}
 the factory is called to create an object for ... More...
enum  MqStatusIsE {
  MQ_STATUS_IS_INITIAL = 0, MQ_STATUS_IS_DUP = 1<<0, MQ_STATUS_IS_THREAD = 1<<1, MQ_STATUS_IS_FORK = 1<<2,
  MQ_STATUS_IS_SPAWN = 1<<3
}
 Information about how the context was created. More...
enum  MqStartE { MQ_START_DEFAULT = 0, MQ_START_FORK = 1, MQ_START_THREAD = 2, MQ_START_SPAWN = 3 }
 User preferences on HOWTO start a new entity. More...
enum  MqIoComE { MQ_IO_UDS, MQ_IO_TCP, MQ_IO_PIPE }
 what kind of socket interface to use? More...

Functions

MQ_EXTERN void MqContextInit (struct MqS *const context, MQ_SIZE size, struct MqS const *const tmpl)
 initialize the MqS object related data but do not create the object self
MQ_EXTERN void MqContextFree (struct MqS *const context)
 free the MqS object related data but do not free the object self
MQ_EXTERN struct MqSMqContextCreate (MQ_SIZE size, struct MqS const *const tmpl)
 create the MqS object
MQ_EXTERN void MqContextDelete (struct MqS **contextP)
 delete the entire MqS object
MQ_EXTERN void MqConfigReset (struct MqS *const context)
 clean the MqS::config data
MQ_EXTERN void MqConfigDup (struct MqS *const to, struct MqS const *const from)
 copy the MqS::config data
MQ_EXTERN enum MqErrorE MqSetupDup (struct MqS *const to, struct MqS const *const from)
 copy the MqS::setup data
MQ_EXTERN void MqConfigSetName (struct MqS *const context, MQ_CST data)
 set the MqConfigS::name value and cleanup old value
MQ_EXTERN void MqConfigSetSrvName (struct MqS *const context, MQ_CST data)
 set the MqConfigS::srvname value and cleanup old value
MQ_EXTERN void MqConfigSetBuffersize (struct MqS *const context, MQ_INT data)
 set the MqIoConfigS::buffersize value
MQ_EXTERN void MqConfigSetDebug (struct MqS *const context, MQ_INT data)
 set the MqConfigS::debug value
MQ_EXTERN void MqConfigSetTimeout (struct MqS *const context, MQ_TIME_T data)
 set the MqIoConfigS::timeout value
MQ_EXTERN void MqConfigSetIsSilent (struct MqS *const context, MQ_BOL data)
 set the MqConfigS::isSilent value
MQ_EXTERN void MqConfigSetIsString (struct MqS *const context, MQ_BOL data)
 set the MqConfigS::isString value
MQ_EXTERN void MqConfigSetParent (struct MqS *const context, struct MqS *const parent)
 set the MqConfigS::parent value
MQ_EXTERN void MqConfigSetMaster (struct MqS *const context, struct MqS *const master, int master_id)
 set the MqConfigS::master and MqConfigS::master_id value
MQ_EXTERN void MqConfigSetFactory (struct MqS *const context, MqFactoryCreateF fCreate, MQ_PTR CreateData, MqTokenDataFreeF fCreateFree, MqTokenDataCopyF fCreateCopy, MqFactoryDeleteF fDelete, MQ_PTR DeleteData, MqTokenDataFreeF fDeleteFree, MqTokenDataCopyF fDeleteCopy)
 setup the factory pattern
MQ_EXTERN void MqConfigSetDefaultFactory (struct MqS *const context)
 setup the factory pattern
MQ_EXTERN void MqConfigSetIgnoreFork (struct MqS *const context, MQ_BOL data)
 set the MqConfigS::ignoreFork value
MQ_EXTERN void MqConfigSetIgnoreThread (struct MqS *const context, MQ_BOL data)
 set the MqConfigS::ignoreThread value
MQ_EXTERN void MqConfigSetStartAs (struct MqS *const context, enum MqStartE data)
 set the MqConfigS::startAs value
MQ_EXTERN void MqConfigSetSetup (struct MqS *const context, MqCreateF fChildCreate, MqDeleteF fChildDelete, MqCreateF fParentCreate, MqDeleteF fParentDelete, MqExitF fProcessExit, MqExitF fThreadExit)
 set various attributes from MqConfigS struct
MQ_EXTERN void MqConfigSetFilterFTR (struct MqS *const context, MqTokenF fFunc, MQ_PTR data, MqTokenDataFreeF fFree, MqTokenDataCopyF fCopy)
 set the MqSetupS::FilterFTR
MQ_EXTERN void MqConfigSetFilterEOF (struct MqS *const context, MqTokenF fFunc, MQ_PTR data, MqTokenDataFreeF fFree, MqTokenDataCopyF fCopy)
 set the MqSetupS::FilterEOF
MQ_EXTERN void MqConfigSetServerSetup (struct MqS *const context, MqTokenF fFunc, MQ_PTR data, MqTokenDataFreeF fFree, MqTokenDataCopyF fCopy)
 set the MqSetupS::ServerSetup
MQ_EXTERN void MqConfigSetServerCleanup (struct MqS *const context, MqTokenF fTok, MQ_PTR data, MqTokenDataFreeF fFree, MqTokenDataCopyF fCopy)
 set the MqSetupS::ServerCleanup
MQ_EXTERN void MqConfigSetBgError (struct MqS *const context, MqTokenF fTok, MQ_PTR data, MqTokenDataFreeF fFree, MqTokenDataCopyF fCopy)
 set the MqSetupS::BgError
MQ_EXTERN enum MqErrorE MqConfigSetIoUds (struct MqS *const context, MQ_CST file)
 set the MqIoUdsConfigS::file
MQ_EXTERN enum MqErrorE MqConfigSetIoTcp (struct MqS *const context, MQ_CST host, MQ_CST port, MQ_CST myhost, MQ_CST myport)
 set the MqIoTcpConfigS data
MQ_EXTERN enum MqErrorE MqConfigSetIoPipe (struct MqS *const context, MQ_SOCK socket)
 set the pipe configuration data
MQ_EXTERN enum MqErrorE MqConfigSetDaemon (struct MqS *const context, MQ_CST pidfile)
 start the server in daemon mode
MQ_EXTERN int MqConfigGetIsServer (struct MqS const *const context)
 does the context object is a server ?
MQ_EXTERN int MqConfigGetIsParent (struct MqS const *const context)
 does the context object is a parent ?
MQ_EXTERN int MqConfigGetIsSlave (struct MqS const *const context)
 does the context object is a slave ?
MQ_EXTERN int MqConfigGetIsString (struct MqS const *const context)
 does the context object is a string ?
MQ_EXTERN int MqConfigGetIsSilent (struct MqS const *const context)
 does the context object is silent ?
MQ_EXTERN int MqConfigGetIsConnected (struct MqS const *const context)
 does the context object is connected ?
MQ_EXTERN int MqConfigGetIsDupAndThread (struct MqS const *const context)
 does the context object is Duplicate and Thread ?
MQ_EXTERN MQ_CST MqConfigGetName (struct MqS const *const context)
 get the name of the context object
MQ_EXTERN MQ_CST MqConfigGetSrvName (struct MqS const *const context)
 get the srvname of the context object
MQ_EXTERN MQ_INT MqConfigGetBuffersize (struct MqS const *const context)
 get the minimum of the read/send buffersize value of the context object
MQ_EXTERN MQ_INT MqConfigGetDebug (struct MqS const *const context)
 get the debug value of the context object
MQ_EXTERN MQ_TIME_T MqConfigGetTimeout (struct MqS const *const context)
 get the timeout value of the context object
MQ_EXTERN struct MqSMqConfigGetParent (struct MqS const *const context)
 get the parent value of the config object
MQ_EXTERN struct MqSMqConfigGetMaster (struct MqS const *const context)
 get the master value of the config object
MQ_EXTERN MQ_SIZE MqConfigGetCtxId (struct MqS const *const context)
 return the context-identification
MQ_EXTERN MQ_CST MqConfigGetToken (struct MqS const *const context)
 return the current transaction token
MQ_EXTERN MQ_CST MqConfigGetIoUdsFile (struct MqS *const context)
 return the MqIoUdsConfigS::file value
MQ_EXTERN MQ_CST MqConfigGetIoTcpHost (struct MqS *const context)
 get the MqIoTcpConfigS::host configuration data
MQ_EXTERN MQ_CST MqConfigGetIoTcpPort (struct MqS *const context)
 get the MqIoTcpConfigS::port configuration data
MQ_EXTERN MQ_CST MqConfigGetIoTcpMyHost (struct MqS *const context)
 get the MqIoTcpConfigS::myhost configuration data
MQ_EXTERN MQ_CST MqConfigGetIoTcpMyPort (struct MqS *const context)
 get the MqIoTcpConfigS::myport configuration data
MQ_EXTERN MQ_SOCK MqConfigGetIoPipeSocket (struct MqS *const context)
 get the pipe configuration data
MQ_EXTERN enum MqStartE MqConfigGetStartAs (struct MqS *const context)
 return the MqConfigS::startAs value
MQ_EXTERN void MqConfigSetSelf (struct MqS *const context, void *self)
 set the MqS::self value
MQ_EXTERN void * MqConfigGetSelf (struct MqS const *const context)
 get the MqS::self value

Variables

enum MqErrorE(* MqCreateF )(struct MqS *, struct MqBufferLS **)
 the prototype for a ContextCreate function
enum MqErrorE(* MqTokenF )(struct MqS *const context, MQ_PTR const data)
 prototype for an object method function
enum MqErrorE(* MqTokenDataCopyF )(struct MqS *const context, MQ_PTR *dataP)
 prototype for a copy additional token data function
enum MqErrorE(* MqFactoryCreateF )(struct MqS *const tmpl, enum MqFactoryE create, MQ_PTR data, struct MqS **contextP)
 prototype for a Object-Creation factory function
struct MqFactoryS(* MqFactorySelectorF )(MQ_CST name)
 Return a main factory function found by name.


Detailed Description

Configuration data of the MqS object.

Define Documentation

#define MqFactoryS_NULL   { {NULL, NULL, NULL, NULL}, {NULL, NULL, NULL, NULL} }

Definition at line 508 of file msgque.h.


Typedef Documentation

typedef void( * MqDeleteF)(struct MqS *const context)

the prototype for a ContextDelete function

This function is the MqS::fDelete and MqS::fThreadDelete parameter and is used to:

  1. delete a child context
  2. delete a parent context as the thread exit point

Definition at line 407 of file msgque.h.

typedef void( * MqExitF)(int num)

prototype for exit a process or thread

Definition at line 513 of file msgque.h.

typedef void( * MqFactoryDeleteF)(struct MqS *context, MQ_BOL doFactoryCleanup, MQ_PTR data)

prototype for a Object-Delete factory function

Definition at line 472 of file msgque.h.

typedef pid_t( * MqForkF)(void)

prototype for the fork syscall

Definition at line 381 of file msgque.h.

typedef void( * MqHelpF)(MQ_CST)

application specific help function type

Definition at line 446 of file msgque.h.

typedef void( * MqSetupF)(struct MqS *const )

used to setup (initialize) a new thread/fork/process created by libmsgque using the SysServer? style commands

Definition at line 519 of file msgque.h.

typedef void( * MqTokenDataFreeF)(struct MqS const *const context, MQ_PTR *dataP)

prototype for a free additional token data function

Definition at line 422 of file msgque.h.

typedef pid_t( * MqVForkF)(void)

prototype for the vfork syscall

Definition at line 384 of file msgque.h.


Enumeration Type Documentation

enum MqFactoryE

the factory is called to create an object for ...

Enumerator:
MQ_FACTORY_NEW_INIT 
MQ_FACTORY_NEW_CHILD 
MQ_FACTORY_NEW_SLAVE 
MQ_FACTORY_NEW_FORK 
MQ_FACTORY_NEW_THREAD 

Definition at line 451 of file msgque.h.

enum MqIoComE

what kind of socket interface to use?

Enumerator:
MQ_IO_UDS 
MQ_IO_TCP 
MQ_IO_PIPE 

Definition at line 553 of file msgque.h.

enum MqStartE

User preferences on HOWTO start a new entity.

Enumerator:
MQ_START_DEFAULT  use application-context default entity creation
MQ_START_FORK  create entity as fork
MQ_START_THREAD  create entity as thread
MQ_START_SPAWN  create entity as spawn process

Definition at line 531 of file msgque.h.

Information about how the context was created.

Enumerator:
MQ_STATUS_IS_INITIAL  context is the first context
MQ_STATUS_IS_DUP  context is created as a duplicate of an other context
MQ_STATUS_IS_THREAD  context is created as a thread
MQ_STATUS_IS_FORK  context is created as a fork
MQ_STATUS_IS_SPAWN  context is created as a spawn

Definition at line 522 of file msgque.h.


Function Documentation

MQ_EXTERN void MqConfigDup ( struct MqS *const   to,
struct MqS const *const   from 
)

copy the MqS::config data

MQ_EXTERN MQ_INT MqConfigGetBuffersize ( struct MqS const *const   context  ) 

get the minimum of the read/send buffersize value of the context object

Parameters:
[in] context the initial MqS object created by MqContextCreate
Returns:
the context.config.buffersize(R/S) value

MQ_EXTERN MQ_SIZE MqConfigGetCtxId ( struct MqS const *const   context  ) 

return the context-identification

Parameters:
[in] context the initial MqS object created by MqContextCreate
Returns:
the context-identification number
The context-identification is a number and is used in the protocol to link a data-package to a context-pointer. This is necessary because the communication interface (msgque->io) of a parent-context is used by the child-context too.

MQ_EXTERN MQ_INT MqConfigGetDebug ( struct MqS const *const   context  ) 

get the debug value of the context object

Parameters:
[in] context the initial MqS object created by MqContextCreate
Returns:
the context.config.debug value

MQ_EXTERN MQ_SOCK MqConfigGetIoPipeSocket ( struct MqS *const   context  ) 

get the pipe configuration data

Parameters:
[in] context the initial MqS object created by MqContextCreate
Returns:
the pipe socket

MQ_EXTERN MQ_CST MqConfigGetIoTcpHost ( struct MqS *const   context  ) 

get the MqIoTcpConfigS::host configuration data

MQ_EXTERN MQ_CST MqConfigGetIoTcpMyHost ( struct MqS *const   context  ) 

get the MqIoTcpConfigS::myhost configuration data

MQ_EXTERN MQ_CST MqConfigGetIoTcpMyPort ( struct MqS *const   context  ) 

get the MqIoTcpConfigS::myport configuration data

MQ_EXTERN MQ_CST MqConfigGetIoTcpPort ( struct MqS *const   context  ) 

get the MqIoTcpConfigS::port configuration data

MQ_EXTERN MQ_CST MqConfigGetIoUdsFile ( struct MqS *const   context  ) 

return the MqIoUdsConfigS::file value

MQ_EXTERN int MqConfigGetIsConnected ( struct MqS const *const   context  ) 

does the context object is connected ?

Parameters:
[in] context the initial MqS object created by MqContextCreate
Returns:
the (context->link != NULL) value

MQ_EXTERN int MqConfigGetIsDupAndThread ( struct MqS const *const   context  ) 

does the context object is Duplicate and Thread ?

Parameters:
[in] context the initial MqS object created by MqContextCreate
Returns:
the ((config->statusIs & MQ_STATUS_IS_DUP) && (config->statusIs & MQ_STATUS_IS_THREAD)) value

MQ_EXTERN int MqConfigGetIsParent ( struct MqS const *const   context  ) 

does the context object is a parent ?

Parameters:
[in] context the initial MqS object created by MqContextCreate
Returns:
the (context->config.parent == NULL) value

MQ_EXTERN int MqConfigGetIsServer ( struct MqS const *const   context  ) 

does the context object is a server ?

Parameters:
[in] context the initial MqS object created by MqContextCreate
Returns:
the (context->setup.isServer == MQ_YES) value

MQ_EXTERN int MqConfigGetIsSilent ( struct MqS const *const   context  ) 

does the context object is silent ?

Parameters:
[in] context the initial MqS object created by MqContextCreate
Returns:
the (context->config.isSilent == MQ_YES) value

MQ_EXTERN int MqConfigGetIsSlave ( struct MqS const *const   context  ) 

does the context object is a slave ?

Parameters:
[in] context the initial MqS object created by MqContextCreate
Returns:
the (context->config.master != NULL) value

MQ_EXTERN int MqConfigGetIsString ( struct MqS const *const   context  ) 

does the context object is a string ?

Parameters:
[in] context the initial MqS object created by MqContextCreate
Returns:
the (context->config.isString == MQ_YES) value

MQ_EXTERN struct MqS* MqConfigGetMaster ( struct MqS const *const   context  )  [read]

get the master value of the config object

Parameters:
[in] context the initial MqS object created by MqContextCreate
Returns:
the MqConfigS::master value

MQ_EXTERN MQ_CST MqConfigGetName ( struct MqS const *const   context  ) 

get the name of the context object

Parameters:
[in] context the initial MqS object created by MqContextCreate
Returns:
the context.config.name value
Attention:
the string is owned by libmsgque -> do not free !!

MQ_EXTERN struct MqS* MqConfigGetParent ( struct MqS const *const   context  )  [read]

get the parent value of the config object

Parameters:
[in] context the initial MqS object created by MqContextCreate
Returns:
the MqConfigS::parent value

MQ_EXTERN void* MqConfigGetSelf ( struct MqS const *const   context  ) 

get the MqS::self value

Parameters:
[in] context the initial MqS object created by MqContextCreate

MQ_EXTERN MQ_CST MqConfigGetSrvName ( struct MqS const *const   context  ) 

get the srvname of the context object

Parameters:
[in] context the initial MqS object created by MqContextCreate
Returns:
the context.config.srvname value
Attention:
the string is owned by libmsgque -> do not free !!

MQ_EXTERN enum MqStartE MqConfigGetStartAs ( struct MqS *const   context  ) 

return the MqConfigS::startAs value

MQ_EXTERN MQ_TIME_T MqConfigGetTimeout ( struct MqS const *const   context  ) 

get the timeout value of the context object

Parameters:
[in] context the initial MqS object created by MqContextCreate
Returns:
the context.config.timeout value

MQ_EXTERN MQ_CST MqConfigGetToken ( struct MqS const *const   context  ) 

return the current transaction token

Parameters:
[in] context the initial MqS object created by MqContextCreate
Returns:
the current transaction token as 4 character string

MQ_EXTERN void MqConfigReset ( struct MqS *const   context  ) 

clean the MqS::config data

MQ_EXTERN void MqConfigSetBgError ( struct MqS *const   context,
MqTokenF  fTok,
MQ_PTR  data,
MqTokenDataFreeF  fFree,
MqTokenDataCopyF  fCopy 
)

MQ_EXTERN void MqConfigSetBuffersize ( struct MqS *const   context,
MQ_INT  data 
)

set the MqIoConfigS::buffersize value

MQ_EXTERN enum MqErrorE MqConfigSetDaemon ( struct MqS *const   context,
MQ_CST  pidfile 
)

start the server in daemon mode

Parameters:
[in] context the initial MqS object created by MqContextCreate
[in] pidfile write the PID of the daemon into this file
Returns:
the MqErrorE return status MQ_OK, MQ_ERROR or MQ_CONTINUE
A daemon is a background process without any link to the starting process and the stdin/stdout/stderr closed.

MQ_EXTERN void MqConfigSetDebug ( struct MqS *const   context,
MQ_INT  data 
)

set the MqConfigS::debug value

MQ_EXTERN void MqConfigSetDefaultFactory ( struct MqS *const   context  ) 

setup the factory pattern

Parameters:
[in] context the initial MqS object created by MqContextCreate
The default factory is just a wrapper for MqContextCreate with additional error management code. A simple application without an application specific factory use this configuration.

MQ_EXTERN void MqConfigSetFactory ( struct MqS *const   context,
MqFactoryCreateF  fCreate,
MQ_PTR  CreateData,
MqTokenDataFreeF  fCreateFree,
MqTokenDataCopyF  fCreateCopy,
MqFactoryDeleteF  fDelete,
MQ_PTR  DeleteData,
MqTokenDataFreeF  fDeleteFree,
MqTokenDataCopyF  fDeleteCopy 
)

setup the factory pattern

Parameters:
[in] context the initial MqS object created by MqContextCreate
[in] fCreate set the MqSetupS::Factory - MqFactoryS::MqFactoryCreateS::fCall value
[in] CreateData set the MqSetupS::Factory - MqFactoryS::MqFactoryCreateS::data value
[in] fCreateFree free the CreateData
[in] fCreateCopy copy the CreateData
[in] fDelete set the MqSetupS::Factory - MqFactoryS::MqFactoryDeleteS::fCall value
[in] DeleteData set the MqSetupS::Factory - MqFactoryS::MqFactoryDeleteS::data value
[in] fDeleteFree delete the DeleteData
[in] fDeleteCopy copy the DeleteData

MQ_EXTERN void MqConfigSetFilterEOF ( struct MqS *const   context,
MqTokenF  fFunc,
MQ_PTR  data,
MqTokenDataFreeF  fFree,
MqTokenDataCopyF  fCopy 
)

MQ_EXTERN void MqConfigSetFilterFTR ( struct MqS *const   context,
MqTokenF  fFunc,
MQ_PTR  data,
MqTokenDataFreeF  fFree,
MqTokenDataCopyF  fCopy 
)

MQ_EXTERN void MqConfigSetIgnoreFork ( struct MqS *const   context,
MQ_BOL  data 
)

set the MqConfigS::ignoreFork value

MQ_EXTERN void MqConfigSetIgnoreThread ( struct MqS *const   context,
MQ_BOL  data 
)

set the MqConfigS::ignoreThread value

MQ_EXTERN enum MqErrorE MqConfigSetIoPipe ( struct MqS *const   context,
MQ_SOCK  socket 
)

set the pipe configuration data

Parameters:
[in] context the initial MqS object created by MqContextCreate
[in] socket the name of the known socket
Returns:
the MqErrorE return status MQ_OK, MQ_ERROR or MQ_CONTINUE
This is configuration option is only usefull for a (x)inetd setup to use the stdin (socket=0) as send/recv communication socket

MQ_EXTERN enum MqErrorE MqConfigSetIoTcp ( struct MqS *const   context,
MQ_CST  host,
MQ_CST  port,
MQ_CST  myhost,
MQ_CST  myport 
)

set the MqIoTcpConfigS data

Parameters:
[in] context the initial MqS object created by MqContextCreate
[in] host client: the remote host name
server: the local interface name
[in] port client: the remote port name
server: the local port name
[in] myhost client: the local host name
[in] myport client: the local port name
Returns:
the MqErrorE return status MQ_OK, MQ_ERROR or MQ_CONTINUE
Attention:
use a string value for a port to support named ports as well

MQ_EXTERN enum MqErrorE MqConfigSetIoUds ( struct MqS *const   context,
MQ_CST  file 
)

MQ_EXTERN void MqConfigSetIsSilent ( struct MqS *const   context,
MQ_BOL  data 
)

set the MqConfigS::isSilent value

MQ_EXTERN void MqConfigSetIsString ( struct MqS *const   context,
MQ_BOL  data 
)

set the MqConfigS::isString value

MQ_EXTERN void MqConfigSetMaster ( struct MqS *const   context,
struct MqS *const   master,
int  master_id 
)

MQ_EXTERN void MqConfigSetName ( struct MqS *const   context,
MQ_CST  data 
)

set the MqConfigS::name value and cleanup old value

MQ_EXTERN void MqConfigSetParent ( struct MqS *const   context,
struct MqS *const   parent 
)

set the MqConfigS::parent value

MQ_EXTERN void MqConfigSetSelf ( struct MqS *const   context,
void *  self 
)

set the MqS::self value

Parameters:
[in] context the initial MqS object created by MqContextCreate
[in] self a pointer to the managed context usually self or this

MQ_EXTERN void MqConfigSetServerCleanup ( struct MqS *const   context,
MqTokenF  fTok,
MQ_PTR  data,
MqTokenDataFreeF  fFree,
MqTokenDataCopyF  fCopy 
)

MQ_EXTERN void MqConfigSetServerSetup ( struct MqS *const   context,
MqTokenF  fFunc,
MQ_PTR  data,
MqTokenDataFreeF  fFree,
MqTokenDataCopyF  fCopy 
)

MQ_EXTERN void MqConfigSetSetup ( struct MqS *const   context,
MqCreateF  fChildCreate,
MqDeleteF  fChildDelete,
MqCreateF  fParentCreate,
MqDeleteF  fParentDelete,
MqExitF  fProcessExit,
MqExitF  fThreadExit 
)

set various attributes from MqConfigS struct

MQ_EXTERN void MqConfigSetSrvName ( struct MqS *const   context,
MQ_CST  data 
)

set the MqConfigS::srvname value and cleanup old value

MQ_EXTERN void MqConfigSetStartAs ( struct MqS *const   context,
enum MqStartE  data 
)

set the MqConfigS::startAs value

MQ_EXTERN void MqConfigSetTimeout ( struct MqS *const   context,
MQ_TIME_T  data 
)

set the MqIoConfigS::timeout value

MQ_EXTERN struct MqS* MqContextCreate ( MQ_SIZE  size,
struct MqS const *const   tmpl 
) [read]

create the MqS object

MQ_EXTERN void MqContextDelete ( struct MqS **  contextP  ) 

delete the entire MqS object

MQ_EXTERN void MqContextFree ( struct MqS *const   context  ) 

free the MqS object related data but do not free the object self

MQ_EXTERN void MqContextInit ( struct MqS *const   context,
MQ_SIZE  size,
struct MqS const *const   tmpl 
)

initialize the MqS object related data but do not create the object self

MQ_EXTERN enum MqErrorE MqSetupDup ( struct MqS *const   to,
struct MqS const *const   from 
)

copy the MqS::setup data


Variable Documentation

enum MqErrorE( * MqCreateF)(struct MqS *,struct MqBufferLS **)

the prototype for a ContextCreate function

This function is the MqS::fCreate and MqS::fThreadCreate parameter and is used to :

  1. create a child context
  2. create a parent context as the thread entry point

enum MqErrorE( * MqFactoryCreateF)(struct MqS *const tmpl, enum MqFactoryE create, MQ_PTR data, struct MqS **contextP)

prototype for a Object-Creation factory function

Return a main factory function found by name.

Parameters:
[in] name the string name of the function to select
This function have to be defined in the target tool (example: atool.c) and have to return the main function of type MqFactoryS, The result is used as Entry-Point for fork and thread startup.

enum MqErrorE( * MqTokenDataCopyF)(struct MqS *const context, MQ_PTR *dataP)

prototype for a copy additional token data function

enum MqErrorE( * MqTokenF)(struct MqS *const context, MQ_PTR const data)

prototype for an object method function


libmsgque project on SF: Get libmsgque at SourceForge.net. Fast, secure and Free Open Source software downloads    Generated on Mon Nov 9 16:57:18 2009 by doxygen 1.5.8