Main Page   Compound List   File List   Compound Members   File Members  

context.h

Go to the documentation of this file.
00001 #ifndef _EDG_WORKLOAD_LOGGING_CLIENT_CONTEXT_H
00002 #define _EDG_WORKLOAD_LOGGING_CLIENT_CONTEXT_H
00003 
00009 #include "edg/workload/common/utilities/exception_codes.h"
00010 #include "edg/workload/common/jobid/jobid.h"
00011 
00012 #ident "$Header: /local/reps/lcgware/workload/logging/client/context.h,v 1.16 2003/11/13 11:27:36 ljocha Exp $"
00013 
00014 #ifdef __cplusplus
00015 extern "C" {
00016 #endif
00017 
00019 typedef struct _edg_wll_Context *edg_wll_Context;
00020 
00022 typedef enum _edg_wll_ContextParam {
00023         EDG_WLL_PARAM_HOST,             
00024         EDG_WLL_PARAM_SOURCE,           
00025         EDG_WLL_PARAM_INSTANCE,         
00026         EDG_WLL_PARAM_LEVEL,            
00027         EDG_WLL_PARAM_DESTINATION,      
00028         EDG_WLL_PARAM_DESTINATION_PORT, 
00029         EDG_WLL_PARAM_LOG_TIMEOUT,      
00030         EDG_WLL_PARAM_LOG_SYNC_TIMEOUT, 
00031         EDG_WLL_PARAM_QUERY_SERVER,     
00032         EDG_WLL_PARAM_QUERY_SERVER_PORT,
00033         EDG_WLL_PARAM_QUERY_TIMEOUT,    
00034         EDG_WLL_PARAM_QUERY_JOBS_LIMIT, 
00035         EDG_WLL_PARAM_QUERY_EVENTS_LIMIT,
00036         EDG_WLL_PARAM_QUERY_RESULTS,    
00037         EDG_WLL_PARAM_X509_PROXY,       
00038         EDG_WLL_PARAM_X509_KEY,         
00039         EDG_WLL_PARAM_X509_CERT,        
00040         EDG_WLL_PARAM__LAST,            
00041 } edg_wll_ContextParam;
00042 
00044 typedef enum _edg_wll_QueryResults {
00045         EDG_WLL_QUERYRES_UNDEF,         /* uninitialized value */
00046         EDG_WLL_QUERYRES_NONE,
00047         EDG_WLL_QUERYRES_ALL,
00048         EDG_WLL_QUERYRES_LIMITED,
00049         EDG_WLL_QUERYRES__LAST          /* marker, for internal use only */
00050 } edg_wll_QueryResults;
00051 
00053 typedef enum _edg_wll_Source {
00054         EDG_WLL_SOURCE_NONE,            /* uninitialized value */
00055         EDG_WLL_SOURCE_USER_INTERFACE,
00056         EDG_WLL_SOURCE_NETWORK_SERVER,
00057         EDG_WLL_SOURCE_WORKLOAD_MANAGER,
00058         EDG_WLL_SOURCE_BIG_HELPER,
00059         EDG_WLL_SOURCE_JOB_SUBMISSION,
00060         EDG_WLL_SOURCE_LOG_MONITOR,
00061         EDG_WLL_SOURCE_LRMS,
00062         EDG_WLL_SOURCE_APPLICATION,
00063         EDG_WLL_SOURCE__LAST            /* marker, for internal use only */
00064 } edg_wll_Source;
00065 
00066 
00071 int edg_wll_InitContext(edg_wll_Context *context);
00072 
00077 void edg_wll_FreeContext(edg_wll_Context context);
00078 
00086 int edg_wll_SetParam(
00087         edg_wll_Context context,
00088         edg_wll_ContextParam param,
00089         ...
00090 );
00091 
00092 struct timeval; /* gcc, shut up! */
00093 
00094 int edg_wll_SetParamInt(edg_wll_Context,edg_wll_ContextParam,int);
00095 int edg_wll_SetParamString(edg_wll_Context,edg_wll_ContextParam,const char *);
00096 int edg_wll_SetParamTime(edg_wll_Context,edg_wll_ContextParam,const struct timeval *);
00097 
00105 int edg_wll_GetParam(
00106         edg_wll_Context context,
00107         edg_wll_ContextParam param,
00108         ...
00109 );
00110 
00111 
00118 /* XXX: cleanup required */
00119 
00120 typedef enum _edg_wll_ErrorCode {
00122         EDG_WLL_ERROR_BASE = EDG_WORKLOAD_LOGGING_ERROR_BASE,
00123         EDG_WLL_ERROR_PARSE_BROKEN_ULM, 
00124         EDG_WLL_ERROR_PARSE_EVENT_UNDEF, 
00125         EDG_WLL_ERROR_PARSE_MSG_INCOMPLETE, 
00126         EDG_WLL_ERROR_PARSE_KEY_DUPLICITY, 
00127         EDG_WLL_ERROR_PARSE_KEY_MISUSE, 
00128         EDG_WLL_ERROR_PARSE_OK_WITH_EXTRA_FIELDS, 
00130         EDG_WLL_ERROR_XML_PARSE, 
00131         EDG_WLL_ERROR_SERVER_RESPONSE, 
00132         EDG_WLL_ERROR_JOBID_FORMAT, 
00133         EDG_WLL_ERROR_DB_CALL, 
00135         EDG_WLL_ERROR_URL_FORMAT, 
00136         EDG_WLL_ERROR_MD5_CLASH, 
00137         EDG_WLL_ERROR_SSL, 
00138         EDG_WLL_ERROR_NOJOBID,  
00139         EDG_WLL_ERROR_NOINDEX,  
00140         EDG_WLL_IL_PROTO,       
00141         EDG_WLL_IL_SYS,         
00142         EDG_WLL_IL_EVENTS_WAITING, 
00143 } edg_wll_ErrorCode;
00144 
00155 int edg_wll_Error(
00156         edg_wll_Context context,
00157         char            **errText,
00158         char            **eddDesc
00159 );
00160 
00163 char * edg_wll_SourceToString(edg_wll_Source src);
00164 
00168 edg_wll_Source edg_wll_StringToSource(const char *name);
00169 
00173 #define EDG_WLL_SEQ_NORMAL      1
00174 #define EDG_WLL_SEQ_DUPLICATE   11
00175 
00177 char * edg_wll_GetSequenceCode(
00178         const edg_wll_Context   context
00179 );
00180 
00184 int edg_wll_GetLoggingJob(
00185         const edg_wll_Context   context,
00186         edg_wlc_JobId   *jobid_out
00187 );
00188 
00189 #ifdef __cplusplus
00190 }
00191 #endif
00192 
00193 #endif 

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