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/jra1mw/org.glite.lb.client-interface/interface/consumer.h,v 1.9 2005/08/03 09:30:10 akrenek 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 /* starting from bit 10 private flags begins - do not add 1024 and more! */
00245 
00254 int edg_wll_JobStatus(
00255         edg_wll_Context         context,
00256         const edg_wlc_JobId             jobid,
00257         int                     flags,
00258         edg_wll_JobStat         *status
00259 );
00260 
00271 int edg_wll_JobStatusProxy(
00272         edg_wll_Context         context,
00273         const edg_wlc_JobId     jobid,
00274         int                     flags,
00275         edg_wll_JobStat         *status
00276 );
00277 
00286 int edg_wll_JobLog(
00287         edg_wll_Context         context,
00288         const edg_wlc_JobId     jobId,
00289         edg_wll_Event **        events
00290 );
00291 
00292 
00298 int edg_wll_JobLogProxy(
00299         edg_wll_Context         context,
00300         const edg_wlc_JobId     jobId,
00301         edg_wll_Event **        events
00302 );
00303 
00310 int edg_wll_UserJobs(
00311         edg_wll_Context         context,
00312         edg_wlc_JobId **        jobs,
00313         edg_wll_JobStat **      states
00314 );
00315 
00316 
00322 int edg_wll_UserJobsProxy(
00323         edg_wll_Context         context,
00324         edg_wlc_JobId **        jobs,
00325         edg_wll_JobStat **      states
00326 );
00327 
00336 int edg_wll_GetIndexedAttrs(
00337         edg_wll_Context         context,
00338         edg_wll_QueryRec        ***attrs
00339 );
00340 
00348 int edg_wll_GetServerLimit(
00349         edg_wll_Context context,
00350         int             *limit
00351 );
00352 
00361 int edg_wll_QueryListener(
00362         edg_wll_Context context,
00363         edg_wlc_JobId           jobId,
00364         const char *    name,
00365         char **         host,
00366         uint16_t *      port
00367 );
00368 
00369 
00373 int edg_wll_QueryListenerProxy(
00374         edg_wll_Context context,
00375         edg_wlc_JobId           jobId,
00376         const char *    name,
00377         char **         host,
00378         uint16_t *      port
00379 );
00380 
00389 int edg_wll_QuerySequenceCodeProxy(
00390         edg_wll_Context context,
00391         edg_wlc_JobId   jobId,
00392         char **         code
00393 );
00394                 
00395 /*
00396  * edg_wll_QueryRec manipulation
00397  */
00398 
00400 void edg_wll_QueryRecFree(edg_wll_QueryRec *);
00401 
00402 /*
00403  *@} end of group
00404  */
00405 
00406 #ifdef CLIENT_SBIN_PROG
00407 extern int edg_wll_http_send_recv(
00408         edg_wll_Context,
00409         char *, const char * const *, char *,
00410         char **,char ***,char **
00411 );
00412 
00413 extern int http_check_status(
00414         edg_wll_Context,
00415         char *,
00416         char **
00417 );
00418 
00419 extern int set_server_name_and_port(
00420         edg_wll_Context,
00421         const edg_wll_QueryRec **
00422 );
00423 
00424 #endif
00425 
00429 #define EDG_WLL_QUERY_TIMEOUT_DEFAULT   120
00430 
00434 #define EDG_WLL_QUERY_TIMEOUT_MAX       1800
00435 
00436 #ifdef __cplusplus
00437 }
00438 #endif
00439 
00440 #endif /* __EDG_WORKLOAD_LOGGING_CLIENT_CONSUMER_H__ */

Generated on Thu May 11 20:44:15 2006 for Glite LB Client: C - Interface by doxygen 1.3.5