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

context.h

Go to the documentation of this file.
00001 #ifndef _EDG_WORKLOAD_LOGGING_CLIENT_CONTEXT_H
00002 #define _EDG_WORKLOAD_LOGGING_CLIENT_CONTEXT_H
00003 
00009 #ifndef LB_STANDALONE
00010 #include "glite/wmsutils/exception/exception_codes.h"
00011 #endif
00012 #include "glite/wmsutils/jobid/cjobid.h"
00013 
00014 #ident "$Header: /cvs/glite/org.glite.lb.client-interface/interface/Attic/context.h,v 1.21.2.6 2010/03/16 09:12:22 zsustr Exp $"
00015 /*
00016 Copyright (c) Members of the EGEE Collaboration. 2004-2010.
00017 See http://www.eu-egee.org/partners for details on the copyright holders.
00018 
00019 Licensed under the Apache License, Version 2.0 (the "License");
00020 you may not use this file except in compliance with the License.
00021 You may obtain a copy of the License at
00022 
00023     http://www.apache.org/licenses/LICENSE-2.0
00024 
00025 Unless required by applicable law or agreed to in writing, software
00026 distributed under the License is distributed on an "AS IS" BASIS,
00027 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00028 See the License for the specific language governing permissions and
00029 limitations under the License.
00030 */
00031 
00032 
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036 
00044 typedef struct _edg_wll_Context *edg_wll_Context;
00045 
00047 typedef enum _edg_wll_ContextParam {
00048         EDG_WLL_PARAM_HOST,             
00049         EDG_WLL_PARAM_SOURCE,           
00050         EDG_WLL_PARAM_INSTANCE,         
00051         EDG_WLL_PARAM_LEVEL,            
00052         EDG_WLL_PARAM_DESTINATION,      
00053         EDG_WLL_PARAM_DESTINATION_PORT, 
00054         EDG_WLL_PARAM_LOG_TIMEOUT,      
00055         EDG_WLL_PARAM_LOG_SYNC_TIMEOUT, 
00056         EDG_WLL_PARAM_QUERY_SERVER,     
00057         EDG_WLL_PARAM_QUERY_SERVER_PORT,
00058         EDG_WLL_PARAM_QUERY_SERVER_OVERRIDE,
00059         EDG_WLL_PARAM_QUERY_TIMEOUT,    
00060         EDG_WLL_PARAM_QUERY_JOBS_LIMIT, 
00061         EDG_WLL_PARAM_QUERY_EVENTS_LIMIT,
00062         EDG_WLL_PARAM_QUERY_RESULTS,    
00063         EDG_WLL_PARAM_CONNPOOL_SIZE,    
00064         EDG_WLL_PARAM_NOTIF_SERVER,     
00065         EDG_WLL_PARAM_NOTIF_SERVER_PORT,
00066         EDG_WLL_PARAM_NOTIF_TIMEOUT,    
00067         EDG_WLL_PARAM_X509_PROXY,       
00068         EDG_WLL_PARAM_X509_KEY,         
00069         EDG_WLL_PARAM_X509_CERT,        
00070         EDG_WLL_PARAM_LBPROXY_STORE_SOCK,
00071         EDG_WLL_PARAM_LBPROXY_SERVE_SOCK,
00072         EDG_WLL_PARAM_LBPROXY_USER,     
00073         EDG_WLL_PARAM_JPREG_TMPDIR,             
00074         EDG_WLL_PARAM__LAST,            
00075 } edg_wll_ContextParam;
00076 
00078 typedef enum _edg_wll_QueryResults {
00079         EDG_WLL_QUERYRES_UNDEF,         /* uninitialized value */
00080         EDG_WLL_QUERYRES_NONE,
00081         EDG_WLL_QUERYRES_ALL,
00082         EDG_WLL_QUERYRES_LIMITED,
00083         EDG_WLL_QUERYRES__LAST          /* marker, for internal use only */
00084 } edg_wll_QueryResults;
00085 
00087 typedef enum _edg_wll_Source {
00088         EDG_WLL_SOURCE_NONE,            /* uninitialized value */
00089         EDG_WLL_SOURCE_USER_INTERFACE,
00090         EDG_WLL_SOURCE_NETWORK_SERVER,
00091         EDG_WLL_SOURCE_WORKLOAD_MANAGER,
00092         EDG_WLL_SOURCE_BIG_HELPER,
00093         EDG_WLL_SOURCE_JOB_SUBMISSION,
00094         EDG_WLL_SOURCE_LOG_MONITOR,
00095         EDG_WLL_SOURCE_LRMS,
00096         EDG_WLL_SOURCE_APPLICATION,
00097         EDG_WLL_SOURCE_LB_SERVER,
00098         EDG_WLL_SOURCE__LAST            /* marker, for internal use only */
00099 } edg_wll_Source;
00100 
00103 #define EDG_WLL_SOURCE_WM_PROXY EDG_WLL_SOURCE_NETWORK_SERVER
00104 
00105 
00110 int edg_wll_InitContext(edg_wll_Context *context);
00111 
00116 void edg_wll_FreeContext(edg_wll_Context context);
00117 
00125 int edg_wll_SetParam(
00126         edg_wll_Context context,
00127         edg_wll_ContextParam param,
00128         ...
00129 );
00130 
00131 struct timeval; /* XXX: gcc, shut up! */
00132 
00140 int edg_wll_SetParamInt(edg_wll_Context ctx,edg_wll_ContextParam param,int val);
00141 
00149 int edg_wll_SetParamString(edg_wll_Context ctx,edg_wll_ContextParam param,const char *val);
00150 
00158 int edg_wll_SetParamTime(edg_wll_Context ctx,edg_wll_ContextParam param,const struct timeval *val);
00159 
00167 int edg_wll_GetParam(
00168         edg_wll_Context context,
00169         edg_wll_ContextParam param,
00170         ...
00171 );
00172 
00173 
00180 /* XXX: cleanup required */
00181 
00182 #ifndef GLITE_WMS_LOGGING_ERROR_BASE
00183 #define GLITE_WMS_LOGGING_ERROR_BASE 1400
00184 #endif
00185 
00186 typedef enum _edg_wll_ErrorCode {
00188         EDG_WLL_ERROR_BASE = GLITE_WMS_LOGGING_ERROR_BASE,
00189         EDG_WLL_ERROR_PARSE_BROKEN_ULM, 
00190         EDG_WLL_ERROR_PARSE_EVENT_UNDEF, 
00191         EDG_WLL_ERROR_PARSE_MSG_INCOMPLETE, 
00192         EDG_WLL_ERROR_PARSE_KEY_DUPLICITY, 
00193         EDG_WLL_ERROR_PARSE_KEY_MISUSE, 
00194         EDG_WLL_ERROR_PARSE_OK_WITH_EXTRA_FIELDS, 
00196         EDG_WLL_ERROR_XML_PARSE, 
00197         EDG_WLL_ERROR_SERVER_RESPONSE, 
00198         EDG_WLL_ERROR_JOBID_FORMAT, 
00199         EDG_WLL_ERROR_DB_CALL, 
00201         EDG_WLL_ERROR_MD5_CLASH, 
00202         EDG_WLL_ERROR_GSS, 
00203         EDG_WLL_ERROR_DNS, 
00204         EDG_WLL_ERROR_NOJOBID,  
00205         EDG_WLL_ERROR_NOINDEX,  
00206         EDG_WLL_IL_PROTO,       
00207         EDG_WLL_IL_SYS,         
00208         EDG_WLL_IL_EVENTS_WAITING, 
00209         EDG_WLL_ERROR_COMPARE_EVENTS, 
00210 } edg_wll_ErrorCode;
00211 
00222 int edg_wll_Error(
00223         edg_wll_Context context,
00224         char            **errText,
00225         char            **errDesc
00226 );
00227 
00230 char * edg_wll_SourceToString(edg_wll_Source src);
00231 
00235 edg_wll_Source edg_wll_StringToSource(const char *name);
00236 
00239 char * edg_wll_QResultToString(edg_wll_QueryResults res);
00240 
00244 edg_wll_QueryResults edg_wll_StringToQResult(const char *name);
00245 
00249 #define EDG_WLL_SEQ_NORMAL      1
00250 #define EDG_WLL_SEQ_DUPLICATE   11
00251 #define EDG_WLL_SEQ_PBS         2
00252 #define EDG_WLL_SEQ_CONDOR      3
00253 
00257 #define EDG_WLL_SEQ_BIGHELPER_INITIAL   "UI=000002:NS=0000000000:WM=000000:BH=0000000001:JSS=000000:LM=000000:LRMS=000000:APP=000000:LBS=000000"
00258 
00263 #define EDG_WLL_SEQ_CLEAR       "UI=000009:NS=0000096669:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000:LBS=000000"
00264 
00269 #define EDG_WLL_SEQ_ABORT       "UI=000000:NS=0000096660:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000:LBS=000000"
00270 
00271 
00273 char * edg_wll_GetSequenceCode(
00274         const edg_wll_Context   context
00275 );
00276 
00280 int edg_wll_GetLoggingJob(
00281         const edg_wll_Context   context,
00282         edg_wlc_JobId   *jobid_out
00283 );
00284 
00285 /*
00286  *@} end of group
00287  */
00288 
00289 #ifdef __cplusplus
00290 }
00291 #endif
00292 
00293 #endif 

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