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/Attic/consumer.h,v 1.10.2.4 2007/09/12 14:57:28 valtri 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_JDL_ATTR,    
00063         EDG_WLL_QUERY_ATTR_STATEENTERTIME,      
00064         EDG_WLL_QUERY_ATTR_LASTUPDATETIME,      
00065         EDG_WLL_QUERY_ATTR__LAST
00066 /*      if adding new attribute, add conversion string to common/xml_conversions.c too !! */
00067 } edg_wll_QueryAttr;
00068 
00069 
00073 typedef enum _edg_wll_QueryOp{
00074         EDG_WLL_QUERY_OP_EQUAL,         
00075         EDG_WLL_QUERY_OP_LESS,          
00076         EDG_WLL_QUERY_OP_GREATER,       
00077         EDG_WLL_QUERY_OP_WITHIN,        
00078         EDG_WLL_QUERY_OP_UNEQUAL,       
00079 } edg_wll_QueryOp;
00080 
00081 
00087 typedef struct _edg_wll_QueryRec {
00088         edg_wll_QueryAttr       attr;   
00089         edg_wll_QueryOp         op;     
00094         union {
00095                 char *                  tag;    
00096                 edg_wll_JobStatCode     state;  
00097         } attr_id;
00102         union edg_wll_QueryVal {
00103                 int     i;      
00104                 char    *c;     
00105                 struct timeval  t;      
00106                 edg_wlc_JobId   j;      
00107         } value, value2;
00108 } edg_wll_QueryRec;
00109 
00113 #define EDG_WLL_QUERY_TIMEOUT_DEFAULT   120
00114 
00118 #define EDG_WLL_QUERY_TIMEOUT_MAX       1800
00119 
00132 int edg_wll_QueryEvents(
00133         edg_wll_Context                 context,
00134         const edg_wll_QueryRec *        job_conditions,
00135         const edg_wll_QueryRec *        event_conditions,
00136         edg_wll_Event **                events
00137 );
00138 
00147 int edg_wll_QueryEventsExt(
00148         edg_wll_Context                 context,
00149         const edg_wll_QueryRec **       job_conditions,
00150         const edg_wll_QueryRec **       event_conditions,
00151         edg_wll_Event **                events
00152 );
00153 
00154 
00159 int edg_wll_QueryEventsProxy(
00160         edg_wll_Context                 context,
00161         const edg_wll_QueryRec *        job_conditions,
00162         const edg_wll_QueryRec *        event_conditions,
00163         edg_wll_Event **                events
00164 );
00165 
00170 int edg_wll_QueryEventsExtProxy(
00171         edg_wll_Context                 context,
00172         const edg_wll_QueryRec **       job_conditions,
00173         const edg_wll_QueryRec **       event_conditions,
00174         edg_wll_Event **                events
00175 );
00176 
00188 int edg_wll_QueryJobs(
00189         edg_wll_Context                 context,
00190         const edg_wll_QueryRec *        conditions,
00191         int                             flags,
00192         edg_wlc_JobId **                jobs,
00193         edg_wll_JobStat **              states
00194 );
00195 
00205 int edg_wll_QueryJobsExt(
00206         edg_wll_Context                 context,
00207         const edg_wll_QueryRec **       conditions,
00208         int                             flags,
00209         edg_wlc_JobId **                jobs,
00210         edg_wll_JobStat **              states
00211 );
00212 
00213 
00218 int edg_wll_QueryJobsProxy(
00219         edg_wll_Context                 context,
00220         const edg_wll_QueryRec *        conditions,
00221         int                             flags,
00222         edg_wlc_JobId **                jobs,
00223         edg_wll_JobStat **              states
00224 );
00225 
00230 int edg_wll_QueryJobsExtProxy(
00231         edg_wll_Context                 context,
00232         const edg_wll_QueryRec **       conditions,
00233         int                             flags,
00234         edg_wlc_JobId **                jobs,
00235         edg_wll_JobStat **              states
00236 );
00237 
00238 
00244 #define EDG_WLL_STAT_CLASSADS   1       
00245 #define EDG_WLL_STAT_CHILDREN   2       
00246 #define EDG_WLL_STAT_CHILDSTAT  4       
00247 #define EDG_WLL_STAT_CHILDHIST_FAST 8           
00248 #define EDG_WLL_STAT_CHILDHIST_THOROUGH 16      
00249 /* starting from bit 10 private flags begins - do not add 1024 and more! */
00250 
00259 int edg_wll_JobStatus(
00260         edg_wll_Context         context,
00261         const edg_wlc_JobId             jobid,
00262         int                     flags,
00263         edg_wll_JobStat         *status
00264 );
00265 
00276 int edg_wll_JobStatusProxy(
00277         edg_wll_Context         context,
00278         const edg_wlc_JobId     jobid,
00279         int                     flags,
00280         edg_wll_JobStat         *status
00281 );
00282 
00291 int edg_wll_JobLog(
00292         edg_wll_Context         context,
00293         const edg_wlc_JobId     jobId,
00294         edg_wll_Event **        events
00295 );
00296 
00297 
00303 int edg_wll_JobLogProxy(
00304         edg_wll_Context         context,
00305         const edg_wlc_JobId     jobId,
00306         edg_wll_Event **        events
00307 );
00308 
00315 int edg_wll_UserJobs(
00316         edg_wll_Context         context,
00317         edg_wlc_JobId **        jobs,
00318         edg_wll_JobStat **      states
00319 );
00320 
00321 
00327 int edg_wll_UserJobsProxy(
00328         edg_wll_Context         context,
00329         edg_wlc_JobId **        jobs,
00330         edg_wll_JobStat **      states
00331 );
00332 
00341 int edg_wll_GetIndexedAttrs(
00342         edg_wll_Context         context,
00343         edg_wll_QueryRec        ***attrs
00344 );
00345 
00353 int edg_wll_GetServerLimit(
00354         edg_wll_Context context,
00355         int             *limit
00356 );
00357 
00366 int edg_wll_QueryListener(
00367         edg_wll_Context context,
00368         edg_wlc_JobId           jobId,
00369         const char *    name,
00370         char **         host,
00371         uint16_t *      port
00372 );
00373 
00374 
00378 int edg_wll_QueryListenerProxy(
00379         edg_wll_Context context,
00380         edg_wlc_JobId           jobId,
00381         const char *    name,
00382         char **         host,
00383         uint16_t *      port
00384 );
00385 
00394 int edg_wll_QuerySequenceCodeProxy(
00395         edg_wll_Context context,
00396         edg_wlc_JobId   jobId,
00397         char **         code
00398 );
00399                 
00400 /*
00401  * edg_wll_QueryRec manipulation
00402  */
00403 
00405 void edg_wll_QueryRecFree(edg_wll_QueryRec *);
00406 
00407 /*
00408  *@} end of group
00409  */
00410 
00411 #ifdef CLIENT_SBIN_PROG
00412 extern int edg_wll_http_send_recv(
00413         edg_wll_Context,
00414         char *, const char * const *, char *,
00415         char **,char ***,char **
00416 );
00417 
00418 extern int http_check_status(
00419         edg_wll_Context,
00420         char *,
00421         char **
00422 );
00423 
00424 extern int set_server_name_and_port(
00425         edg_wll_Context,
00426         const edg_wll_QueryRec **
00427 );
00428 
00429 #endif
00430 
00434 #define EDG_WLL_QUERY_TIMEOUT_DEFAULT   120
00435 
00439 #define EDG_WLL_QUERY_TIMEOUT_MAX       1800
00440 
00441 #ifdef __cplusplus
00442 }
00443 #endif
00444 
00445 #endif /* __EDG_WORKLOAD_LOGGING_CLIENT_CONSUMER_H__ */

Generated on Mon May 5 15:16:51 2008 for Glite LB Client: C - Interface by  doxygen 1.3.9.1