Main Page | Modules | Data Structures | File List | Data Fields | Globals

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 
00009 #ident "$Header: /cvs/glite/org.glite.lb.client-interface/interface/consumer.h,v 1.10 2006/11/16 14:18:51 zsustr Exp $"
00010 
00011 #include "glite/wmsutils/jobid/cjobid.h"
00012 #include "glite/lb/context.h"
00013 #include "glite/lb/events.h"
00014 #include "glite/lb/jobstat.h"
00015 
00016 #ifdef __cplusplus
00017 extern "C" {
00018 #endif
00019 
00043 typedef enum _edg_wll_QueryAttr{
00044         EDG_WLL_QUERY_ATTR_UNDEF=0,     
00045         EDG_WLL_QUERY_ATTR_JOBID,       
00046         EDG_WLL_QUERY_ATTR_OWNER,       
00047         EDG_WLL_QUERY_ATTR_STATUS,      
00048         EDG_WLL_QUERY_ATTR_LOCATION,    
00049         EDG_WLL_QUERY_ATTR_DESTINATION, 
00050         EDG_WLL_QUERY_ATTR_DONECODE,    
00051         EDG_WLL_QUERY_ATTR_USERTAG,     
00052         EDG_WLL_QUERY_ATTR_TIME,        
00053         EDG_WLL_QUERY_ATTR_LEVEL,       
00054         EDG_WLL_QUERY_ATTR_HOST,        
00055         EDG_WLL_QUERY_ATTR_SOURCE,      
00056         EDG_WLL_QUERY_ATTR_INSTANCE,    
00057         EDG_WLL_QUERY_ATTR_EVENT_TYPE,  
00058         EDG_WLL_QUERY_ATTR_CHKPT_TAG,   
00059         EDG_WLL_QUERY_ATTR_RESUBMITTED, 
00060         EDG_WLL_QUERY_ATTR_PARENT,      
00061         EDG_WLL_QUERY_ATTR_EXITCODE,    
00062         EDG_WLL_QUERY_ATTR__LAST
00063 /*      if adding new attribute, add conversion string to common/xml_conversions.c too !! */
00064 } edg_wll_QueryAttr;
00065 
00066 
00070 typedef enum _edg_wll_QueryOp{
00071         EDG_WLL_QUERY_OP_EQUAL,         
00072         EDG_WLL_QUERY_OP_LESS,          
00073         EDG_WLL_QUERY_OP_GREATER,       
00074         EDG_WLL_QUERY_OP_WITHIN,        
00075         EDG_WLL_QUERY_OP_UNEQUAL,       
00076 } edg_wll_QueryOp;
00077 
00078 
00084 typedef struct _edg_wll_QueryRec {
00085         edg_wll_QueryAttr       attr;   
00086         edg_wll_QueryOp         op;     
00091         union {
00092                 char *                  tag;    
00093                 edg_wll_JobStatCode     state;  
00094         } attr_id;
00099         union edg_wll_QueryVal {
00100                 int     i;      
00101                 char    *c;     
00102                 struct timeval  t;      
00103                 edg_wlc_JobId   j;      
00104         } value, value2;
00105 } edg_wll_QueryRec;
00106 
00110 #define EDG_WLL_QUERY_TIMEOUT_DEFAULT   120
00111 
00115 #define EDG_WLL_QUERY_TIMEOUT_MAX       1800
00116 
00129 int edg_wll_QueryEvents(
00130         edg_wll_Context                 context,
00131         const edg_wll_QueryRec *        job_conditions,
00132         const edg_wll_QueryRec *        event_conditions,
00133         edg_wll_Event **                events
00134 );
00135 
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 
00151 
00156 int edg_wll_QueryEventsProxy(
00157         edg_wll_Context                 context,
00158         const edg_wll_QueryRec *        job_conditions,
00159         const edg_wll_QueryRec *        event_conditions,
00160         edg_wll_Event **                events
00161 );
00162 
00167 int edg_wll_QueryEventsExtProxy(
00168         edg_wll_Context                 context,
00169         const edg_wll_QueryRec **       job_conditions,
00170         const edg_wll_QueryRec **       event_conditions,
00171         edg_wll_Event **                events
00172 );
00173 
00185 int edg_wll_QueryJobs(
00186         edg_wll_Context                 context,
00187         const edg_wll_QueryRec *        conditions,
00188         int                             flags,
00189         edg_wlc_JobId **                jobs,
00190         edg_wll_JobStat **              states
00191 );
00192 
00202 int edg_wll_QueryJobsExt(
00203         edg_wll_Context                 context,
00204         const edg_wll_QueryRec **       conditions,
00205         int                             flags,
00206         edg_wlc_JobId **                jobs,
00207         edg_wll_JobStat **              states
00208 );
00209 
00210 
00215 int edg_wll_QueryJobsProxy(
00216         edg_wll_Context                 context,
00217         const edg_wll_QueryRec *        conditions,
00218         int                             flags,
00219         edg_wlc_JobId **                jobs,
00220         edg_wll_JobStat **              states
00221 );
00222 
00227 int edg_wll_QueryJobsExtProxy(
00228         edg_wll_Context                 context,
00229         const edg_wll_QueryRec **       conditions,
00230         int                             flags,
00231         edg_wlc_JobId **                jobs,
00232         edg_wll_JobStat **              states
00233 );
00234 
00235 
00241 #define EDG_WLL_STAT_CLASSADS   1       
00242 #define EDG_WLL_STAT_CHILDREN   2       
00243 #define EDG_WLL_STAT_CHILDSTAT  4       
00244 #define EDG_WLL_STAT_CHILDHIST_FAST 8           
00245 #define EDG_WLL_STAT_CHILDHIST_THOROUGH 16      
00246 /* starting from bit 10 private flags begins - do not add 1024 and more! */
00247 
00256 int edg_wll_JobStatus(
00257         edg_wll_Context         context,
00258         const edg_wlc_JobId             jobid,
00259         int                     flags,
00260         edg_wll_JobStat         *status
00261 );
00262 
00273 int edg_wll_JobStatusProxy(
00274         edg_wll_Context         context,
00275         const edg_wlc_JobId     jobid,
00276         int                     flags,
00277         edg_wll_JobStat         *status
00278 );
00279 
00288 int edg_wll_JobLog(
00289         edg_wll_Context         context,
00290         const edg_wlc_JobId     jobId,
00291         edg_wll_Event **        events
00292 );
00293 
00294 
00300 int edg_wll_JobLogProxy(
00301         edg_wll_Context         context,
00302         const edg_wlc_JobId     jobId,
00303         edg_wll_Event **        events
00304 );
00305 
00312 int edg_wll_UserJobs(
00313         edg_wll_Context         context,
00314         edg_wlc_JobId **        jobs,
00315         edg_wll_JobStat **      states
00316 );
00317 
00318 
00324 int edg_wll_UserJobsProxy(
00325         edg_wll_Context         context,
00326         edg_wlc_JobId **        jobs,
00327         edg_wll_JobStat **      states
00328 );
00329 
00338 int edg_wll_GetIndexedAttrs(
00339         edg_wll_Context         context,
00340         edg_wll_QueryRec        ***attrs
00341 );
00342 
00350 int edg_wll_GetServerLimit(
00351         edg_wll_Context context,
00352         int             *limit
00353 );
00354 
00363 int edg_wll_QueryListener(
00364         edg_wll_Context context,
00365         edg_wlc_JobId           jobId,
00366         const char *    name,
00367         char **         host,
00368         uint16_t *      port
00369 );
00370 
00371 
00375 int edg_wll_QueryListenerProxy(
00376         edg_wll_Context context,
00377         edg_wlc_JobId           jobId,
00378         const char *    name,
00379         char **         host,
00380         uint16_t *      port
00381 );
00382 
00391 int edg_wll_QuerySequenceCodeProxy(
00392         edg_wll_Context context,
00393         edg_wlc_JobId   jobId,
00394         char **         code
00395 );
00396                 
00397 /*
00398  * edg_wll_QueryRec manipulation
00399  */
00400 
00402 void edg_wll_QueryRecFree(edg_wll_QueryRec *);
00403 
00404 /*
00405  *@} end of group
00406  */
00407 
00408 #ifdef CLIENT_SBIN_PROG
00409 extern int edg_wll_http_send_recv(
00410         edg_wll_Context,
00411         char *, const char * const *, char *,
00412         char **,char ***,char **
00413 );
00414 
00415 extern int http_check_status(
00416         edg_wll_Context,
00417         char *,
00418         char **
00419 );
00420 
00421 extern int set_server_name_and_port(
00422         edg_wll_Context,
00423         const edg_wll_QueryRec **
00424 );
00425 
00426 #endif
00427 
00431 #define EDG_WLL_QUERY_TIMEOUT_DEFAULT   120
00432 
00436 #define EDG_WLL_QUERY_TIMEOUT_MAX       1800
00437 
00438 #ifdef __cplusplus
00439 }
00440 #endif
00441 
00442 #endif /* __EDG_WORKLOAD_LOGGING_CLIENT_CONSUMER_H__ */

Generated on Tue May 8 00:32:29 2007 for Glite LB Client: C - Interface by  doxygen 1.3.9.1