Main Page   Compound List   File List   Compound Members   File Members  

consumer.h

Go to the documentation of this file.
00001 #ifndef __EDG_WORKLOAD_LOGGING_CLIENT_CONSUMER_H__
00002 #define __EDG_WORKLOAD_LOGGING_CLIENT_CONSUMER_H__
00003 
00018 #ident "$Header: /local/reps/lcgware/workload/logging/client/consumer.h,v 1.41 2003/07/24 09:37:51 ljocha Exp $"
00019 
00020 #include "edg/workload/common/jobid/jobid.h"
00021 #include "edg/workload/logging/client/context.h"
00022 #include "edg/workload/logging/client/events.h"
00023 #include "edg/workload/logging/client/jobstat.h"
00024 
00025 #ifdef __cplusplus
00026 extern "C" {
00027 #endif
00028 
00032 typedef enum _edg_wll_QueryAttr{
00033         EDG_WLL_QUERY_ATTR_UNDEF=0,     
00034         EDG_WLL_QUERY_ATTR_JOBID,       
00035         EDG_WLL_QUERY_ATTR_OWNER,       
00036         EDG_WLL_QUERY_ATTR_STATUS,      
00037         EDG_WLL_QUERY_ATTR_LOCATION,    
00038         EDG_WLL_QUERY_ATTR_DESTINATION, 
00039         EDG_WLL_QUERY_ATTR_DONECODE,    
00040         EDG_WLL_QUERY_ATTR_USERTAG,     
00041         EDG_WLL_QUERY_ATTR_TIME,        
00042         EDG_WLL_QUERY_ATTR_LEVEL,       
00043         EDG_WLL_QUERY_ATTR_HOST,        
00044         EDG_WLL_QUERY_ATTR_SOURCE,      
00045         EDG_WLL_QUERY_ATTR_INSTANCE,    
00046         EDG_WLL_QUERY_ATTR_EVENT_TYPE,  
00047         EDG_WLL_QUERY_ATTR_CHKPT_TAG,   
00048         EDG_WLL_QUERY_ATTR_RESUBMITTED, 
00049         EDG_WLL_QUERY_ATTR_PARENT,      
00050         EDG_WLL_QUERY_ATTR_EXITCODE,    
00051         EDG_WLL_QUERY_ATTR__LAST
00052 } edg_wll_QueryAttr;
00053 
00054 
00058 typedef enum _edg_wll_QueryOp{
00059         EDG_WLL_QUERY_OP_EQUAL,         
00060         EDG_WLL_QUERY_OP_LESS,          
00061         EDG_WLL_QUERY_OP_GREATER,       
00062         EDG_WLL_QUERY_OP_WITHIN,        
00063 } edg_wll_QueryOp;
00064 
00065 
00071 typedef struct _edg_wll_QueryRec {
00072         edg_wll_QueryAttr       attr;   
00073         edg_wll_QueryOp         op;     
00078         union {
00079                 char *                  tag;    
00080                 edg_wll_JobStatCode     state;  
00081         } attr_id;
00086         union {
00087                 int     i;      
00088                 char    *c;     
00089                 struct timeval  t;      
00090                 edg_wlc_JobId   j;      
00091         } value, value2;
00092 } edg_wll_QueryRec;
00093 
00094 /************************************************
00095  * API FUNCTION DECLARATIONS                    *
00096  */
00097 
00098 
00099 #ifdef CLIENT_SBIN_PROG
00100 extern int edg_wll_http_send_recv(
00101         edg_wll_Context,
00102         char *, const char * const *, char *,
00103         char **,char ***,char **
00104 );
00105 
00106 extern int http_check_status(
00107         edg_wll_Context,
00108         char *,
00109         char **
00110 );
00111 
00112 extern int set_server_name_and_port(
00113         edg_wll_Context,
00114         const edg_wll_QueryRec **
00115 );
00116 
00117 #endif
00118 
00137 int edg_wll_QueryEvents(
00138         edg_wll_Context                 context,
00139         const edg_wll_QueryRec *        job_conditions,
00140         const edg_wll_QueryRec *        event_conditions,
00141         edg_wll_Event **                events
00142 );
00143 
00144 int edg_wll_QueryEventsExt(
00145         edg_wll_Context                 context,
00146         const edg_wll_QueryRec **       job_conditions,
00147         const edg_wll_QueryRec **       event_conditions,
00148         edg_wll_Event **                events
00149 );
00150 
00162 int edg_wll_QueryJobs(
00163         edg_wll_Context                 context,
00164         const edg_wll_QueryRec *        conditions,
00165         int                             flags,
00166         edg_wlc_JobId **                jobs,
00167         edg_wll_JobStat **              states
00168 );
00169 
00170 int edg_wll_QueryJobsExt(
00171         edg_wll_Context                 context,
00172         const edg_wll_QueryRec **       conditions,
00173         int                             flags,
00174         edg_wlc_JobId **                jobs,
00175         edg_wll_JobStat **              states
00176 );
00177 
00183 #define EDG_WLL_STAT_CLASSADS   1       
00184 #define EDG_WLL_STAT_CHILDREN   2       
00185 #define EDG_WLL_STAT_CHILDSTAT  4       
00186 /* starting from bit 10 private flags begins - do not add 1024 and more! */
00187 
00195 int edg_wll_JobStatus(
00196         edg_wll_Context         context,
00197         const edg_wlc_JobId             jobid,
00198         int                     flags,
00199         edg_wll_JobStat         *status
00200 );
00201 
00210 int edg_wll_JobLog(
00211         edg_wll_Context         context,
00212         const edg_wlc_JobId     jobId,
00213         edg_wll_Event **        events
00214 );
00215 
00222 int edg_wll_UserJobs(
00223         edg_wll_Context         context,
00224         edg_wlc_JobId **        jobs,
00225         edg_wll_JobStat **      states
00226 );
00227 
00236 int edg_wll_GetIndexedAttrs(
00237         edg_wll_Context         context,
00238         edg_wll_QueryAttr       **attrs,
00239         char                    **userTags
00240 );
00241 
00249 int edg_wll_GetServerLimit(
00250         edg_wll_Context context,
00251         int             *limit
00252 );
00253 
00262 int edg_wll_QueryListener(
00263         edg_wll_Context context,
00264         edg_wlc_JobId           jobId,
00265         const char *    name,
00266         char **         host,
00267         uint16_t *      port
00268 );
00269 
00272 /*
00273  * edg_wll_QueryRec manipulation
00274  */
00275 
00277 void edg_wll_QueryRecFree(edg_wll_QueryRec *);
00278 
00282 #define EDG_WLL_QUERY_TIMEOUT_DEFAULT   120
00283 #define EDG_WLL_QUERY_TIMEOUT_MAX       1800
00284 
00285 #ifdef __cplusplus
00286 }
00287 #endif
00288 
00289 #endif /* __EDG_WORKLOAD_LOGGING_CLIENT_CONSUMER_H__ */

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