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