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.5 2010/03/16 09:12:22 zsustr Exp $"
00010 /*
00011 Copyright (c) Members of the EGEE Collaboration. 2004-2010.
00012 See http://www.eu-egee.org/partners for details on the copyright holders.
00013 
00014 Licensed under the Apache License, Version 2.0 (the "License");
00015 you may not use this file except in compliance with the License.
00016 You may obtain a copy of the License at
00017 
00018     http://www.apache.org/licenses/LICENSE-2.0
00019 
00020 Unless required by applicable law or agreed to in writing, software
00021 distributed under the License is distributed on an "AS IS" BASIS,
00022 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00023 See the License for the specific language governing permissions and
00024 limitations under the License.
00025 */
00026 
00027 
00028 #include "glite/wmsutils/jobid/cjobid.h"
00029 #include "glite/lb/context.h"
00030 #include "glite/lb/events.h"
00031 #include "glite/lb/jobstat.h"
00032 
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036 
00060 typedef enum _edg_wll_QueryAttr{
00061         EDG_WLL_QUERY_ATTR_UNDEF=0,     
00062         EDG_WLL_QUERY_ATTR_JOBID,       
00063         EDG_WLL_QUERY_ATTR_OWNER,       
00064         EDG_WLL_QUERY_ATTR_STATUS,      
00065         EDG_WLL_QUERY_ATTR_LOCATION,    
00066         EDG_WLL_QUERY_ATTR_DESTINATION, 
00067         EDG_WLL_QUERY_ATTR_DONECODE,    
00068         EDG_WLL_QUERY_ATTR_USERTAG,     
00069         EDG_WLL_QUERY_ATTR_TIME,        
00070         EDG_WLL_QUERY_ATTR_LEVEL,       
00071         EDG_WLL_QUERY_ATTR_HOST,        
00072         EDG_WLL_QUERY_ATTR_SOURCE,      
00073         EDG_WLL_QUERY_ATTR_INSTANCE,    
00074         EDG_WLL_QUERY_ATTR_EVENT_TYPE,  
00075         EDG_WLL_QUERY_ATTR_CHKPT_TAG,   
00076         EDG_WLL_QUERY_ATTR_RESUBMITTED, 
00077         EDG_WLL_QUERY_ATTR_PARENT,      
00078         EDG_WLL_QUERY_ATTR_EXITCODE,    
00079         EDG_WLL_QUERY_ATTR_JDL_ATTR,    
00080         EDG_WLL_QUERY_ATTR_STATEENTERTIME,      
00081         EDG_WLL_QUERY_ATTR_LASTUPDATETIME,      
00082         EDG_WLL_QUERY_ATTR__LAST
00083 /*      if adding new attribute, add conversion string to common/xml_conversions.c too !! */
00084 } edg_wll_QueryAttr;
00085 
00086 
00090 typedef enum _edg_wll_QueryOp{
00091         EDG_WLL_QUERY_OP_EQUAL,         
00092         EDG_WLL_QUERY_OP_LESS,          
00093         EDG_WLL_QUERY_OP_GREATER,       
00094         EDG_WLL_QUERY_OP_WITHIN,        
00095         EDG_WLL_QUERY_OP_UNEQUAL,       
00096 } edg_wll_QueryOp;
00097 
00098 
00104 typedef struct _edg_wll_QueryRec {
00105         edg_wll_QueryAttr       attr;   
00106         edg_wll_QueryOp         op;     
00111         union {
00112                 char *                  tag;    
00113                 edg_wll_JobStatCode     state;  
00114         } attr_id;
00119         union edg_wll_QueryVal {
00120                 int     i;      
00121                 char    *c;     
00122                 struct timeval  t;      
00123                 edg_wlc_JobId   j;      
00124         } value, value2;
00125 } edg_wll_QueryRec;
00126 
00130 #define EDG_WLL_QUERY_TIMEOUT_DEFAULT   120
00131 
00135 #define EDG_WLL_QUERY_TIMEOUT_MAX       1800
00136 
00149 int edg_wll_QueryEvents(
00150         edg_wll_Context                 context,
00151         const edg_wll_QueryRec *        job_conditions,
00152         const edg_wll_QueryRec *        event_conditions,
00153         edg_wll_Event **                events
00154 );
00155 
00164 int edg_wll_QueryEventsExt(
00165         edg_wll_Context                 context,
00166         const edg_wll_QueryRec **       job_conditions,
00167         const edg_wll_QueryRec **       event_conditions,
00168         edg_wll_Event **                events
00169 );
00170 
00171 
00176 int edg_wll_QueryEventsProxy(
00177         edg_wll_Context                 context,
00178         const edg_wll_QueryRec *        job_conditions,
00179         const edg_wll_QueryRec *        event_conditions,
00180         edg_wll_Event **                events
00181 );
00182 
00187 int edg_wll_QueryEventsExtProxy(
00188         edg_wll_Context                 context,
00189         const edg_wll_QueryRec **       job_conditions,
00190         const edg_wll_QueryRec **       event_conditions,
00191         edg_wll_Event **                events
00192 );
00193 
00205 int edg_wll_QueryJobs(
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 
00222 int edg_wll_QueryJobsExt(
00223         edg_wll_Context                 context,
00224         const edg_wll_QueryRec **       conditions,
00225         int                             flags,
00226         edg_wlc_JobId **                jobs,
00227         edg_wll_JobStat **              states
00228 );
00229 
00230 
00235 int edg_wll_QueryJobsProxy(
00236         edg_wll_Context                 context,
00237         const edg_wll_QueryRec *        conditions,
00238         int                             flags,
00239         edg_wlc_JobId **                jobs,
00240         edg_wll_JobStat **              states
00241 );
00242 
00247 int edg_wll_QueryJobsExtProxy(
00248         edg_wll_Context                 context,
00249         const edg_wll_QueryRec **       conditions,
00250         int                             flags,
00251         edg_wlc_JobId **                jobs,
00252         edg_wll_JobStat **              states
00253 );
00254 
00255 
00261 #define EDG_WLL_STAT_CLASSADS   1       
00262 #define EDG_WLL_STAT_CHILDREN   2       
00263 #define EDG_WLL_STAT_CHILDSTAT  4       
00264 #define EDG_WLL_STAT_CHILDHIST_FAST 8           
00265 #define EDG_WLL_STAT_CHILDHIST_THOROUGH 16      
00266 /* starting from bit 10 private flags begins - do not add 1024 and more! */
00267 
00276 int edg_wll_JobStatus(
00277         edg_wll_Context         context,
00278         const edg_wlc_JobId             jobid,
00279         int                     flags,
00280         edg_wll_JobStat         *status
00281 );
00282 
00293 int edg_wll_JobStatusProxy(
00294         edg_wll_Context         context,
00295         const edg_wlc_JobId     jobid,
00296         int                     flags,
00297         edg_wll_JobStat         *status
00298 );
00299 
00308 int edg_wll_JobLog(
00309         edg_wll_Context         context,
00310         const edg_wlc_JobId     jobId,
00311         edg_wll_Event **        events
00312 );
00313 
00314 
00320 int edg_wll_JobLogProxy(
00321         edg_wll_Context         context,
00322         const edg_wlc_JobId     jobId,
00323         edg_wll_Event **        events
00324 );
00325 
00332 int edg_wll_UserJobs(
00333         edg_wll_Context         context,
00334         edg_wlc_JobId **        jobs,
00335         edg_wll_JobStat **      states
00336 );
00337 
00338 
00344 int edg_wll_UserJobsProxy(
00345         edg_wll_Context         context,
00346         edg_wlc_JobId **        jobs,
00347         edg_wll_JobStat **      states
00348 );
00349 
00358 int edg_wll_GetIndexedAttrs(
00359         edg_wll_Context         context,
00360         edg_wll_QueryRec        ***attrs
00361 );
00362 
00370 int edg_wll_GetServerLimit(
00371         edg_wll_Context context,
00372         int             *limit
00373 );
00374 
00383 int edg_wll_QueryListener(
00384         edg_wll_Context context,
00385         edg_wlc_JobId           jobId,
00386         const char *    name,
00387         char **         host,
00388         uint16_t *      port
00389 );
00390 
00391 
00395 int edg_wll_QueryListenerProxy(
00396         edg_wll_Context context,
00397         edg_wlc_JobId           jobId,
00398         const char *    name,
00399         char **         host,
00400         uint16_t *      port
00401 );
00402 
00411 int edg_wll_QuerySequenceCodeProxy(
00412         edg_wll_Context context,
00413         edg_wlc_JobId   jobId,
00414         char **         code
00415 );
00416                 
00417 /*
00418  * edg_wll_QueryRec manipulation
00419  */
00420 
00422 void edg_wll_QueryRecFree(edg_wll_QueryRec *);
00423 
00424 /*
00425  *@} end of group
00426  */
00427 
00428 #ifdef CLIENT_SBIN_PROG
00429 extern int edg_wll_http_send_recv(
00430         edg_wll_Context,
00431         char *, const char * const *, char *,
00432         char **,char ***,char **
00433 );
00434 
00435 extern int http_check_status(
00436         edg_wll_Context,
00437         char *,
00438         char **
00439 );
00440 
00441 extern int set_server_name_and_port(
00442         edg_wll_Context,
00443         const edg_wll_QueryRec **
00444 );
00445 
00446 #endif
00447 
00451 #define EDG_WLL_QUERY_TIMEOUT_DEFAULT   120
00452 
00456 #define EDG_WLL_QUERY_TIMEOUT_MAX       1800
00457 
00458 #ifdef __cplusplus
00459 }
00460 #endif
00461 
00462 #endif /* __EDG_WORKLOAD_LOGGING_CLIENT_CONSUMER_H__ */

Generated on Fri Aug 20 13:06:40 2010 for Glite LB Client: C - Interface by  doxygen 1.3.9.1