00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef SERVICE_DISCOVERY_H
00012 #define SERVICE_DISCOVERY_H
00013
00014
00015
00016
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020
00021
00022
00023 #define SDStatus_SUCCESS 0
00024 #define SDStatus_FAILURE 1
00025
00026
00027 #define SDEnv_VO "GLITE_SD_VO"
00028
00029 #define SDEnv_SITE "GLITE_SD_SITE"
00030
00031 #define SDEnv_PLUGIN "GLITE_SD_PLUGIN"
00032
00033
00034
00035
00041 typedef struct
00042 {
00044 char *key;
00046 char *value;
00047 } SDServiceData;
00048
00049
00055 typedef struct
00056 {
00058 void * const _owner;
00060 int numItems;
00062 SDServiceData *items;
00063 } SDServiceDataList;
00064
00065
00070 typedef struct
00071 {
00073 int numNames;
00075 char **names;
00076 } SDVOList;
00077
00078
00084 typedef struct
00085 {
00087 void * const _owner;
00089 char *name;
00091 char *type;
00093 char *endpoint;
00095 char *version;
00096 } SDService;
00097
00098
00103 typedef struct
00104 {
00106 void * const _owner;
00108 int numServices;
00110 SDService **services;
00111 } SDServiceList;
00112
00113
00119 typedef struct
00120 {
00122 void * const _owner;
00124 char *name;
00126 char *type;
00128 char *endpoint;
00130 char *version;
00132 char *site;
00135 char *wsdl;
00137 char *administration;
00139 SDVOList *vos;
00141 SDServiceList *associatedServices;
00143 SDServiceDataList *data;
00144 } SDServiceDetails;
00145
00146
00151 typedef struct
00152 {
00154 void * const _owner;
00156 int numServiceDetails;
00158 SDServiceDetails **servicedetails;
00159 } SDServiceDetailsList;
00160
00161
00167 typedef struct
00168 {
00171 int status;
00174 char *reason;
00175 } SDException;
00176
00177
00178
00179
00194 extern SDService *SD_getService(const char *serviceName, SDException *exception);
00195
00196
00211 extern SDServiceDetails *SD_getServiceDetails(const char *serviceName, SDException *exception);
00212
00213
00229 extern SDServiceDataList *SD_getServiceData(const char *serviceName, SDException *exception);
00230
00231
00247 extern char *SD_getServiceDataItem(const char *serviceName, const char *key, SDException *exception);
00248
00249
00264 extern char *SD_getServiceSite(const char *serviceName, SDException *exception);
00265
00266
00280 extern char *SD_getServiceWSDL(const char *serviceName, SDException *exception);
00281
00282
00303 extern SDServiceList *SD_listAssociatedServices(const char *serviceName, const char *type, const char *site, const SDVOList *vos, SDException *exception);
00304
00305
00324 extern SDServiceList *SD_listServices(const char *type, const char *site, const SDVOList *vos, SDException *exception);
00325
00326
00346 extern SDServiceList *SD_listServicesByData(const SDServiceDataList *data, const char *type, const char *site, const SDVOList *vos, SDException *exception);
00347
00348
00349
00372 extern SDServiceList *SD_listServicesByHost(const char *type, const char *host, const SDVOList *vos, SDException *exception);
00373
00382 extern void SD_freeServiceDataList(SDServiceDataList *serviceDataList);
00383
00384
00393 extern void SD_freeService(SDService *service);
00394
00395
00404 extern void SD_freeServiceList(SDServiceList *serviceList);
00405
00406
00415 extern void SD_freeServiceDetails(SDServiceDetails *serviceDetails);
00416
00417
00426 extern void SD_freeException(SDException *exception);
00427
00428
00429 #ifdef __cplusplus
00430 }
00431 #endif
00432
00433 #endif