| 1 | /* | |
| 2 | * Portions of this file Copyright 1999-2005 University of Chicago | |
| 3 | * Portions of this file Copyright 1999-2005 The University of Southern California. | |
| 4 | * | |
| 5 | * This file or a portion of this file is licensed under the | |
| 6 | * terms of the Globus Toolkit Public License, found at | |
| 7 | * http://www.globus.org/toolkit/download/license.html. | |
| 8 | * If you redistribute this file, with or without | |
| 9 | * modifications, you must include this notice in the file. | |
| 10 | */ | |
| 11 | ||
| 12 | #ifndef WSRP_I_FAULTS_H | |
| 13 | #define WSRP_I_FAULTS_H 1 | |
| 14 | ||
| 15 | #if WSRP_GET_RESOURCE_PROPERTY | |
| 16 | # ifndef NEED_RESOURCE_UNKNOWN_FAULT | |
| 17 | # define NEED_RESOURCE_UNKNOWN_FAULT 1 | |
| 18 | # endif /* NEED_RESOURCE_UNKNOWN_FAULT */ | |
| 19 | # ifndef NEED_INVALID_RESOURCE_PROPERTY_QNAME_FAULT | |
| 20 | # define NEED_INVALID_RESOURCE_PROPERTY_QNAME_FAULT 1 | |
| 21 | # endif /* NEED_INVALID_RESOURCE_PROPERTY_QNAME_FAULT */ | |
| 22 | #endif /* WSRP_GET_RESOURCE_PROPERTY */ | |
| 23 | ||
| 24 | #if WSRP_GET_MULTIPLE_RESOURCE_PROPERTIES | |
| 25 | # ifndef NEED_RESOURCE_UNKNOWN_FAULT | |
| 26 | # define NEED_RESOURCE_UNKNOWN_FAULT 1 | |
| 27 | # endif /* NEED_RESOURCE_UNKNOWN_FAULT */ | |
| 28 | # ifndef NEED_INVALID_RESOURCE_PROPERTY_QNAME_FAULT | |
| 29 | # define NEED_INVALID_RESOURCE_PROPERTY_QNAME_FAULT 1 | |
| 30 | # endif /* NEED_INVALID_RESOURCE_PROPERTY_QNAME_FAULT */ | |
| 31 | #endif /* WSRP_GET_MULTIPLE_RESOURCE_PROPERTIES */ | |
| 32 | ||
| 33 | #if WSRP_SET_RESOURCE_PROPERTIES | |
| 34 | # ifndef NEED_RESOURCE_UNKNOWN_FAULT | |
| 35 | # define NEED_RESOURCE_UNKNOWN_FAULT 1 | |
| 36 | # endif /* NEED_RESOURCE_UNKNOWN_FAULT */ | |
| 37 | # ifndef NEED_INVALID_SET_RESOURCE_PROPERTIES_REQUEST_CONTENT_FAULT | |
| 38 | # define NEED_INVALID_SET_RESOURCE_PROPERTIES_REQUEST_CONTENT_FAULT 1 | |
| 39 | # endif /* NEED_INVALID_SET_RESOURCE_PROPERTIES_REQUEST_CONTENT_FAULT */ | |
| 40 | # ifndef NEED_UNABLE_TO_MODIFY_RESOURCE_PROPERTY_FAULT | |
| 41 | # define NEED_UNABLE_TO_MODIFY_RESOURCE_PROPERTY_FAULT 1 | |
| 42 | # endif /* NEED_UNABLE_TO_MODIFY_RESOURCE_PROPERTY_FAULT */ | |
| 43 | # ifndef NEED_INVALID_RESOURCE_PROPERTY_QNAME_FAULT | |
| 44 | # define NEED_INVALID_RESOURCE_PROPERTY_QNAME_FAULT 1 | |
| 45 | # endif /* NEED_INVALID_RESOURCE_PROPERTY_QNAME_FAULT */ | |
| 46 | # ifndef NEED_SET_RESOURCE_PROPERTY_REQUEST_FAILED_FAULT | |
| 47 | # define NEED_SET_RESOURCE_PROPERTY_REQUEST_FAILED_FAULT 1 | |
| 48 | # endif /* NEED_SET_RESOURCE_PROPERTY_REQUEST_FAILED_FAULT */ | |
| 49 | #endif /* WSRP_SET_RESOURCE_PROPERTIES */ | |
| 50 | ||
| 51 | #if WSRP_QUERY_RESOURCE_PROPERTIES | |
| 52 | # ifndef NEED_RESOURCE_UNKNOWN_FAULT | |
| 53 | # define NEED_RESOURCE_UNKNOWN_FAULT 1 | |
| 54 | # endif /* NEED_RESOURCE_UNKNOWN_FAULT */ | |
| 55 | # ifndef NEED_UNKNOWN_QUERY_EXPRESSION_DIALECT_FAULT | |
| 56 | # define NEED_UNKNOWN_QUERY_EXPRESSION_DIALECT_FAULT 1 | |
| 57 | # endif /* NEED_UNKNOWN_QUERY_EXPRESSION_DIALECT_FAULT */ | |
| 58 | # ifndef NEED_INVALID_QUERY_EXPRESSION_FAULT | |
| 59 | # define NEED_INVALID_QUERY_EXPRESSION_FAULT 1 | |
| 60 | # endif /* NEED_INVALID_QUERY_EXPRESSION_FAULT */ | |
| 61 | # ifndef NEED_QUERY_EVALUATION_ERROR_FAULT | |
| 62 | # define NEED_QUERY_EVALUATION_ERROR_FAULT 1 | |
| 63 | # endif /* NEED_QUERY_EVALUATION_ERROR_FAULT */ | |
| 64 | #endif /* WSRP_QUERY_RESOURCE_PROPERTIES */ | |
| 65 | ||
| 66 | ||
| 67 | #if NEED_RESOURCE_UNKNOWN_FAULT | |
| 68 | #include "wsrp_ResourceUnknownFaultType.h" | |
| 69 | ||
| 70 | #define RESOURCE_UNKNOWN(fault_name, fault) \ | |
| 71 | wsrp_l_ResourceUnknownFaultType_create( \ | |
| 72 | fault_name,\ | |
| 73 | (wsrp_ResourceUnknownFaultType **) fault) | |
| 74 | ||
| 75 | static | |
| 76 | globus_result_t | |
| 77 | wsrp_l_ResourceUnknownFaultType_create( | |
| 78 | char ** fault_name, | |
| 79 | wsrp_ResourceUnknownFaultType ** fault) | |
| 80 | 0 | { |
| 81 | 0 | globus_result_t result; |
| 82 | 0 | time_t timestamp = time(NULL); |
| 83 | 0 | struct tm * tp; |
| 84 | ||
| 85 | 0 | result = wsrp_ResourceUnknownFaultType_init(fault); |
| 86 | ||
| 87 | 0 | if (result != GLOBUS_SUCCESS) |
| 88 | { | |
| 89 | 0 | return result; |
| 90 | } | |
| 91 | ||
| 92 | 0 | tp = globus_libc_gmtime_r(×tamp, &(*fault)->Timestamp); |
| 93 | 0 | globus_assert(tp != NULL); |
| 94 | ||
| 95 | 0 | *fault_name = "ResourceUnknownFault"; |
| 96 | ||
| 97 | 0 | return result; |
| 98 | } | |
| 99 | /* wsrp_l_ResourceUnknownFaultType_create() */ | |
| 100 | #endif /* NEED_RESOURCE_UNKNOWN_FAULT */ | |
| 101 | ||
| 102 | #if NEED_INVALID_RESOURCE_PROPERTY_QNAME_FAULT | |
| 103 | #include "wsrp_InvalidResourcePropertyQNameFaultType.h" | |
| 104 | ||
| 105 | #define INVALID_RESOURCE_PROPERTY_QNAME(fault_name, fault) \ | |
| 106 | wsrp_l_InvalidResourcePropertyQNameFaultType_create( \ | |
| 107 | fault_name,\ | |
| 108 | (wsrp_InvalidResourcePropertyQNameFaultType **) fault) | |
| 109 | ||
| 110 | static | |
| 111 | globus_result_t | |
| 112 | wsrp_l_InvalidResourcePropertyQNameFaultType_create( | |
| 113 | char ** fault_name, | |
| 114 | wsrp_InvalidResourcePropertyQNameFaultType ** | |
| 115 | fault) | |
| 116 | { | |
| 117 | globus_result_t result; | |
| 118 | time_t timestamp = time(NULL); | |
| 119 | struct tm * tp; | |
| 120 | ||
| 121 | result = wsrp_InvalidResourcePropertyQNameFaultType_init(fault); | |
| 122 | ||
| 123 | if (result != GLOBUS_SUCCESS) | |
| 124 | { | |
| 125 | return result; | |
| 126 | } | |
| 127 | ||
| 128 | tp = globus_libc_gmtime_r(×tamp, &(*fault)->Timestamp); | |
| 129 | globus_assert(tp != NULL); | |
| 130 | ||
| 131 | *fault_name = "InvalidResourcePropertyQNameFault"; | |
| 132 | ||
| 133 | return result; | |
| 134 | } | |
| 135 | /* wsrp_l_InvalidResourcePropertyQNameFaultType_create() */ | |
| 136 | #endif /* NEED_INVALID_RESOURCE_PROPERTY_QNAME_FAULT */ | |
| 137 | ||
| 138 | #if NEED_INVALID_SET_RESOURCE_PROPERTIES_REQUEST_CONTENT_FAULT | |
| 139 | #include "wsrp_InvalidSetResourcePropertiesRequestContentFaultType.h" | |
| 140 | ||
| 141 | #define INVALID_SET_RESOURCE_PROPERTIES_REQUEST_CONTENT(fault_name, fault) \ | |
| 142 | wsrp_l_InvalidSetResourcePropertiesRequestContentFaultType_create( \ | |
| 143 | fault_name,\ | |
| 144 | (wsrp_InvalidSetResourcePropertiesRequestContentFaultType **) fault) | |
| 145 | static | |
| 146 | globus_result_t | |
| 147 | wsrp_l_InvalidSetResourcePropertiesRequestContentFaultType_create( | |
| 148 | char ** fault_name, | |
| 149 | wsrp_InvalidSetResourcePropertiesRequestContentFaultType ** | |
| 150 | fault) | |
| 151 | { | |
| 152 | globus_result_t result; | |
| 153 | time_t timestamp = time(NULL); | |
| 154 | struct tm * tp; | |
| 155 | ||
| 156 | result = wsrp_InvalidSetResourcePropertiesRequestContentFaultType_init( | |
| 157 | fault); | |
| 158 | ||
| 159 | if (result != GLOBUS_SUCCESS) | |
| 160 | { | |
| 161 | return result; | |
| 162 | } | |
| 163 | ||
| 164 | tp = globus_libc_gmtime_r(×tamp, &(*fault)->Timestamp); | |
| 165 | globus_assert(tp != NULL); | |
| 166 | ||
| 167 | *fault_name = "InvalidSetResourcePropertiesRequestContentFault"; | |
| 168 | ||
| 169 | return result; | |
| 170 | } | |
| 171 | /* wsrp_l_InvalidResourcePropertyFaultType_create() */ | |
| 172 | #endif /* NEED_INVALID_SET_RESOURCE_PROPERTIES_REQUEST_CONTENT_FAULT */ | |
| 173 | ||
| 174 | #if NEED_UNABLE_TO_MODIFY_RESOURCE_PROPERTY_FAULT | |
| 175 | #include "wsrp_UnableToModifyResourcePropertyFaultType.h" | |
| 176 | ||
| 177 | #define UNABLE_TO_MODIFY_RESOURCE_PROPERTY(fault_name, fault) \ | |
| 178 | wsrp_l_UnableToModifyResourcePropertyFaultType_create(\ | |
| 179 | fault_name, \ | |
| 180 | ()wsrp_UnableToModifyResourcePropertyFaultType **) fault) | |
| 181 | static | |
| 182 | globus_result_t | |
| 183 | wsrp_l_UnableToModifyResourcePropertyFaultType_create( | |
| 184 | char ** fault_name, | |
| 185 | wsrp_UnableToModifyResourcePropertyFaultType ** | |
| 186 | fault) | |
| 187 | { | |
| 188 | globus_result_t result; | |
| 189 | time_t timestamp = time(NULL); | |
| 190 | struct tm * tp; | |
| 191 | ||
| 192 | result = wsrp_UnableToModifyResourcePropertyFaultType_init( | |
| 193 | fault); | |
| 194 | ||
| 195 | if (result != GLOBUS_SUCCESS) | |
| 196 | { | |
| 197 | return result; | |
| 198 | } | |
| 199 | ||
| 200 | tp = globus_libc_gmtime_r(×tamp, &(*fault)->Timestamp); | |
| 201 | globus_assert(tp != NULL); | |
| 202 | ||
| 203 | *fault_name = "UnableToModifyResourcePropertyFault"; | |
| 204 | ||
| 205 | return result; | |
| 206 | } | |
| 207 | /* wsrp_l_InvalidResourcePropertyFaultType_create() */ | |
| 208 | #endif /* NEED_UNABLE_TO_MODIFY_RESOURCE_PROPERTY_FAULT */ | |
| 209 | ||
| 210 | #if NEED_SET_RESOURCE_PROPERTY_REQUEST_FAILED_FAULT | |
| 211 | #include "wsrp_SetResourcePropertyRequestFailedFaultType.h" | |
| 212 | ||
| 213 | #define SET_RESOURCE_PROPERTY_REQUEST_FAILED(fault_name, fault_type) \ | |
| 214 | wsrp_l_SetResourcePropertyRequestFailedFaultType_create( \ | |
| 215 | fault_name,\ | |
| 216 | (wsrp_SetResourcePropertyRequestFailedFaultType **) fault) | |
| 217 | ||
| 218 | static | |
| 219 | globus_result_t | |
| 220 | wsrp_l_SetResourcePropertyRequestFailedFaultType_create( | |
| 221 | char ** fault_name, | |
| 222 | wsrp_SetResourcePropertyRequestFailedFaultType ** | |
| 223 | fault) | |
| 224 | { | |
| 225 | globus_result_t result; | |
| 226 | time_t timestamp = time(NULL); | |
| 227 | struct tm * tp; | |
| 228 | ||
| 229 | result = wsrp_SetResourcePropertyRequestFailedFaultType_init( | |
| 230 | fault); | |
| 231 | ||
| 232 | if (result != GLOBUS_SUCCESS) | |
| 233 | { | |
| 234 | return result; | |
| 235 | } | |
| 236 | ||
| 237 | tp = globus_libc_gmtime_r(×tamp, &(*fault)->Timestamp); | |
| 238 | globus_assert(tp != NULL); | |
| 239 | ||
| 240 | *fault_name = "SetResourcePropertyRequestFailedFault"; | |
| 241 | ||
| 242 | return result; | |
| 243 | } | |
| 244 | /* wsrp_l_SetResourcePropertyRequestFailedFaultType_create() */ | |
| 245 | #endif | |
| 246 | ||
| 247 | #if NEED_UNKNOWN_QUERY_EXPRESSION_DIALECT_FAULT | |
| 248 | #include "wsrp_UnknownQueryExpressionDialectFaultType.h" | |
| 249 | ||
| 250 | #define UNKNOWN_QUERY_EXPRESSION_DIALECT(fault_name, fault) \ | |
| 251 | wsrp_l_UnknownQueryExpressionDialectFaultType_create( \ | |
| 252 | fault_name, \ | |
| 253 | (wsrp_UnknownQueryExpressionDialectFaultType **) fault) | |
| 254 | ||
| 255 | static | |
| 256 | globus_result_t | |
| 257 | wsrp_l_UnknownQueryExpressionDialectFaultType_create( | |
| 258 | char ** fault_name, | |
| 259 | wsrp_UnknownQueryExpressionDialectFaultType ** | |
| 260 | fault) | |
| 261 | 1 | { |
| 262 | 1 | globus_result_t result; |
| 263 | 1 | time_t timestamp = time(NULL); |
| 264 | 1 | struct tm * tp; |
| 265 | ||
| 266 | 1 | result = wsrp_UnknownQueryExpressionDialectFaultType_init( |
| 267 | fault); | |
| 268 | ||
| 269 | 1 | if (result != GLOBUS_SUCCESS) |
| 270 | { | |
| 271 | 0 | return result; |
| 272 | } | |
| 273 | ||
| 274 | 1 | tp = globus_libc_gmtime_r(×tamp, &(*fault)->Timestamp); |
| 275 | 1 | globus_assert(tp != NULL); |
| 276 | ||
| 277 | 1 | *fault_name = "UnknownQueryExpressionDialectFault"; |
| 278 | ||
| 279 | 1 | return result; |
| 280 | } | |
| 281 | /* wsrp_l_UnknownQueryExpressionDialectFaultType_create() */ | |
| 282 | #endif /* NEED_UNKNOWN_QUERY_EXPRESSION_DIALECT_FAULT */ | |
| 283 | ||
| 284 | #if NEED_INVALID_QUERY_EXPRESSION_FAULT | |
| 285 | #include "wsrp_InvalidQueryExpressionFaultType.h" | |
| 286 | ||
| 287 | #define INVALID_QUERY_EXPRESSION(fault_name, fault) \ | |
| 288 | wsrp_l_InvalidQueryExpressionFaultType_create( \ | |
| 289 | fault_name, \ | |
| 290 | (wsrp_InvalidQueryExpressionFaultType **) fault) | |
| 291 | static | |
| 292 | globus_result_t | |
| 293 | wsrp_l_InvalidQueryExpressionFaultType_create( | |
| 294 | char ** fault_name, | |
| 295 | wsrp_InvalidQueryExpressionFaultType ** | |
| 296 | fault) | |
| 297 | { | |
| 298 | globus_result_t result; | |
| 299 | time_t timestamp = time(NULL); | |
| 300 | struct tm * tp; | |
| 301 | ||
| 302 | result = wsrp_InvalidQueryExpressionFaultType_init( | |
| 303 | fault); | |
| 304 | ||
| 305 | if (result != GLOBUS_SUCCESS) | |
| 306 | { | |
| 307 | return result; | |
| 308 | } | |
| 309 | ||
| 310 | tp = globus_libc_gmtime_r(×tamp, &(*fault)->Timestamp); | |
| 311 | globus_assert(tp != NULL); | |
| 312 | ||
| 313 | *fault_name = "InvalidQueryExpressionFault"; | |
| 314 | ||
| 315 | return result; | |
| 316 | } | |
| 317 | /* wsrp_l_InvalidQueryExpressionFaultType_create() */ | |
| 318 | #endif /* NEED_INVALID_QUERY_EXPRESSION_FAULT */ | |
| 319 | ||
| 320 | #if NEED_QUERY_EVALUATION_ERROR_FAULT | |
| 321 | #include "wsrp_QueryEvaluationErrorFaultType.h" | |
| 322 | ||
| 323 | #define QUERY_EVAULATION_ERROR(fault_name, fault) \ | |
| 324 | wsrp_l_QueryEvaluationErrorFaultType_create( \ | |
| 325 | fault_name, \ | |
| 326 | (wsrp_QueryEvaluationErrorFaultType **) fault) | |
| 327 | static | |
| 328 | globus_result_t | |
| 329 | wsrp_l_QueryEvaluationErrorFaultType_create( | |
| 330 | char ** fault_name, | |
| 331 | wsrp_QueryEvaluationErrorFaultType ** | |
| 332 | fault) | |
| 333 | { | |
| 334 | globus_result_t result; | |
| 335 | time_t timestamp = time(NULL); | |
| 336 | struct tm * tp; | |
| 337 | ||
| 338 | result = wsrp_QueryEvaluationErrorFaultType_init( | |
| 339 | fault); | |
| 340 | ||
| 341 | if (result != GLOBUS_SUCCESS) | |
| 342 | { | |
| 343 | return result; | |
| 344 | } | |
| 345 | ||
| 346 | tp = globus_libc_gmtime_r(×tamp, &(*fault)->Timestamp); | |
| 347 | globus_assert(tp != NULL); | |
| 348 | ||
| 349 | *fault_name = "QueryEvaluationErrorFault"; | |
| 350 | ||
| 351 | return result; | |
| 352 | } | |
| 353 | /* wsrp_l_QueryEvaluationErrorFaultType_create() */ | |
| 354 | #endif /* NEED_QUERY_EVALUATION_ERROR_FAULT */ | |
| 355 |