Main Page   Compound List   File List   Compound Members   File Members  

context.h File Reference

L&B API common context (publicly visible) and related definitions. More...

Go to the source code of this file.

Defines

#define EDG_WLL_SEQ_NORMAL   1
 type of sequence code (used when setting to the context).


Typedefs

typedef _edg_wll_Context * edg_wll_Context
 Opaque context type.

typedef enum _edg_wll_ContextParam edg_wll_ContextParam
 Constants defining the context parameters.

typedef enum _edg_wll_QueryResults edg_wll_QueryResults
 sets returned query results.

typedef enum _edg_wll_Source edg_wll_Source
 identification of logging component.

typedef enum _edg_wll_ErrorCode edg_wll_ErrorCode
 L&B subsystem specific error codes. More...


Enumerations

enum  _edg_wll_ContextParam {
  EDG_WLL_PARAM_HOST, EDG_WLL_PARAM_SOURCE, EDG_WLL_PARAM_INSTANCE, EDG_WLL_PARAM_LEVEL,
  EDG_WLL_PARAM_DESTINATION, EDG_WLL_PARAM_DESTINATION_PORT, EDG_WLL_PARAM_LOG_TIMEOUT, EDG_WLL_PARAM_LOG_SYNC_TIMEOUT,
  EDG_WLL_PARAM_QUERY_SERVER, EDG_WLL_PARAM_QUERY_SERVER_PORT, EDG_WLL_PARAM_QUERY_TIMEOUT, EDG_WLL_PARAM_QUERY_JOBS_LIMIT,
  EDG_WLL_PARAM_QUERY_EVENTS_LIMIT, EDG_WLL_PARAM_QUERY_RESULTS, EDG_WLL_PARAM_X509_PROXY, EDG_WLL_PARAM_X509_KEY,
  EDG_WLL_PARAM_X509_CERT, EDG_WLL_PARAM__LAST
}
 Constants defining the context parameters. More...

enum  _edg_wll_QueryResults
 sets returned query results.

enum  _edg_wll_Source
 identification of logging component.

enum  _edg_wll_ErrorCode {
  EDG_WLL_ERROR_BASE = EDG_WORKLOAD_LOGGING_ERROR_BASE, EDG_WLL_ERROR_PARSE_BROKEN_ULM, EDG_WLL_ERROR_PARSE_EVENT_UNDEF, EDG_WLL_ERROR_PARSE_MSG_INCOMPLETE,
  EDG_WLL_ERROR_PARSE_KEY_DUPLICITY, EDG_WLL_ERROR_PARSE_KEY_MISUSE, EDG_WLL_ERROR_PARSE_OK_WITH_EXTRA_FIELDS, EDG_WLL_ERROR_XML_PARSE,
  EDG_WLL_ERROR_SERVER_RESPONSE, EDG_WLL_ERROR_JOBID_FORMAT, EDG_WLL_ERROR_DB_CALL, EDG_WLL_ERROR_URL_FORMAT,
  EDG_WLL_ERROR_MD5_CLASH, EDG_WLL_ERROR_SSL, EDG_WLL_ERROR_NOJOBID, EDG_WLL_ERROR_NOINDEX,
  EDG_WLL_IL_PROTO, EDG_WLL_IL_SYS, EDG_WLL_IL_EVENTS_WAITING
}
 L&B subsystem specific error codes. More...


Functions

int edg_wll_InitContext (edg_wll_Context *context)
 Allocate an initialize a new context object. More...

void edg_wll_FreeContext (edg_wll_Context context)
 Destroy and free context object. More...

int edg_wll_SetParam (edg_wll_Context context, edg_wll_ContextParam param,...)
 Set a context parameter. More...

int edg_wll_GetParam (edg_wll_Context context, edg_wll_ContextParam param,...)
 Get current parameter value. More...

int edg_wll_Error (edg_wll_Context context, char **errText, char **eddDesc)
 Retrieve error details on recent API call. More...

char * edg_wll_SourceToString (edg_wll_Source src)
 Convert source code to printable string.

edg_wll_Source edg_wll_StringToSource (const char *name)
 Convert name to source code. More...

char * edg_wll_GetSequenceCode (const edg_wll_Context context)
 Retrieve current sequence code from the context.

int edg_wll_GetLoggingJob (const edg_wll_Context context, edg_wlc_JobId *jobid_out)
 retrieve the current logging JobId from the context.


Detailed Description

L&B API common context (publicly visible) and related definitions.


Typedef Documentation

typedef enum _edg_wll_ErrorCode edg_wll_ErrorCode
 

L&B subsystem specific error codes.

Besides them L&B functions return standard errno codes in their usual meaning.


Enumeration Type Documentation

enum _edg_wll_ContextParam
 

Constants defining the context parameters.

Enumeration values:
EDG_WLL_PARAM_HOST  hostname to appear as event orgin.
EDG_WLL_PARAM_SOURCE  event source component.
EDG_WLL_PARAM_INSTANCE  instance of the source component.
EDG_WLL_PARAM_LEVEL  logging level.
EDG_WLL_PARAM_DESTINATION  logging destination host.
EDG_WLL_PARAM_DESTINATION_PORT  logging destination port.
EDG_WLL_PARAM_LOG_TIMEOUT  logging timeout (asynchronous).
EDG_WLL_PARAM_LOG_SYNC_TIMEOUT  logging timeout (synchronous).
EDG_WLL_PARAM_QUERY_SERVER  default server name to query.
EDG_WLL_PARAM_QUERY_SERVER_PORT  default server port to query.
EDG_WLL_PARAM_QUERY_TIMEOUT  query timeout.
EDG_WLL_PARAM_QUERY_JOBS_LIMIT  maximal query jobs result size.
EDG_WLL_PARAM_QUERY_EVENTS_LIMIT  maximal query events result size.
EDG_WLL_PARAM_QUERY_RESULTS  maximal query result size.
EDG_WLL_PARAM_X509_PROXY  proxy file to use for authentication.
EDG_WLL_PARAM_X509_KEY  key file to use for authentication.
EDG_WLL_PARAM_X509_CERT  certificate file to use for authentication.
EDG_WLL_PARAM__LAST  marker, LB internal use only.

enum _edg_wll_ErrorCode
 

L&B subsystem specific error codes.

Besides them L&B functions return standard errno codes in their usual meaning.

Enumeration values:
EDG_WLL_ERROR_BASE  Base for L&B specific code.

Use the constant from common/

EDG_WLL_ERROR_PARSE_BROKEN_ULM  Parsing ULM line into edg_wll_Event structure.
EDG_WLL_ERROR_PARSE_EVENT_UNDEF  Undefined event name.
EDG_WLL_ERROR_PARSE_MSG_INCOMPLETE  Incomplete message (missing fields).
EDG_WLL_ERROR_PARSE_KEY_DUPLICITY  Duplicate entry in message.
EDG_WLL_ERROR_PARSE_KEY_MISUSE  Entry not allowed for this message type.
EDG_WLL_ERROR_PARSE_OK_WITH_EXTRA_FIELDS  Additional, not understood fields found in message.

The rest is OK therefore this is not a true error.

EDG_WLL_ERROR_XML_PARSE  Error in parsing XML protocol.
EDG_WLL_ERROR_SERVER_RESPONSE  Generic failure on server.

See syslog on the server machine for details.

EDG_WLL_ERROR_JOBID_FORMAT  Malformed jobid.
EDG_WLL_ERROR_DB_CALL  Failure of underlying database engine.

See errDesc returned by edg_wll_ErrorCode.

EDG_WLL_ERROR_URL_FORMAT  Malformed URL.
EDG_WLL_ERROR_MD5_CLASH  MD5 hash same for different strings.

Very unlikely :-).

EDG_WLL_ERROR_SSL  Generic SSL error.

See errDesc returned by edg_wll_Error().

EDG_WLL_ERROR_NOJOBID  Attmepted call requires calling edg_wll_SetLoggingJob() first.
EDG_WLL_ERROR_NOINDEX  Query does not contain any conidion on indexed attribute.
EDG_WLL_IL_PROTO  Interlogger to lbserver communication protocol error.
EDG_WLL_IL_SYS  Interlogger internal error.
EDG_WLL_IL_EVENTS_WAITING  Interlogger still has events pending delivery.


Function Documentation

int edg_wll_Error edg_wll_Context    context,
char **    errText,
char **    eddDesc
 

Retrieve error details on recent API call.

Parameters:
context  IN: context to work with
errText  OUT: standard error text (may be NULL - no text returned)
errDesc  OUT: additional error description (may be NULL - no text returned)
Returns:
Error code of the recent error

void edg_wll_FreeContext edg_wll_Context    context
 

Destroy and free context object.

Also performs necessary cleanup (closing connections etc.)

Parameters:
context  IN context to free

int edg_wll_GetParam edg_wll_Context    context,
edg_wll_ContextParam    param,
...   
 

Get current parameter value.

Parameters:
context  INOUT context to work with
param  IN parameter to retrieve
...  OUT pointer to output variable
Return values:
0  success
EINVAL  param is not a valid parameter

int edg_wll_InitContext edg_wll_Context   context
 

Allocate an initialize a new context object.

Parameters:
context  OUT returned context
Returns:
0 on success, ENOMEM if malloc() fails

int edg_wll_SetParam edg_wll_Context    context,
edg_wll_ContextParam    param,
...   
 

Set a context parameter.

Parameters:
context  INOUT context to work with
param  IN parameter to set
...  IN value to set (if NULL or 0, default is used)
Return values:
0  success
EINVAL  param is not a valid parameter, or invalid value

edg_wll_Source edg_wll_StringToSource const char *    name
 

Convert name to source code.

Returns:
Matching code or EDG_WLL_SOURCE_NONE


Generated on Fri May 14 14:18:56 2004 for L&B API C by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002