globus_gsi_authz_callout_error.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 1999-2006 University of Chicago
00003  * 
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  * 
00008  * http://www.apache.org/licenses/LICENSE-2.0
00009  * 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef GLOBUS_GSI_AUTHZ_CALLOUT_ERROR_H
00018 #define GLOBUS_GSI_AUTHZ_CALLOUT_ERROR_H
00019 
00025 #include "globus_common.h"
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030 
00031 #ifndef GLOBUS_GLOBAL_DOCUMENT_SET
00032 
00037 #endif
00038 
00055 typedef enum
00056 {
00058     GLOBUS_GSI_AUTHZ_CALLOUT_AUTHZ_CALLOUT_ERROR = 0,
00060     GLOBUS_GSI_AUTHZ_CALLOUT_AUTHZ_DENIED_BY_CALLOUT = 1,
00062     GLOBUS_GSI_AUTHZ_CALLOUT_CONFIGURATION_ERROR = 2,
00064     GLOBUS_GSI_AUTHZ_CALLOUT_SYSTEM_ERROR = 3,
00066     GLOBUS_GSI_AUTHZ_CALLOUT_CREDENTIAL_ERROR = 4,
00068     GLOBUS_GSI_AUTHZ_CALLOUT_BAD_ARGUMENT_ERROR = 5,
00069     GLOBUS_GSI_AUTHZ_CALLOUT_ERROR_LAST = 6
00070 }
00071 globus_gsi_authz_callout_error_t;
00072 
00073 extern globus_module_descriptor_t globus_gsi_authz_callout_error_module;
00074 
00079 #define GLOBUS_GSI_AUTHZ_CALLOUT_ERROR_MODULE (&globus_gsi_authz_callout_error_module)
00080 
00081 extern char * globus_gsi_authz_callout_error_strings[];
00082 
00100 #define GLOBUS_GSI_AUTHZ_CALLOUT_ERROR(__RESULT, __TYPE, __ERRSTR)       \
00101 {                                                                        \
00102     char *                          _tmp_str_ =                          \
00103         globus_common_create_string __ERRSTR;                            \
00104     (__RESULT) = globus_error_put(                                       \
00105         globus_error_construct_error(                                    \
00106             GLOBUS_GSI_AUTHZ_CALLOUT_ERROR_MODULE,                       \
00107             (__RESULT) ? globus_error_get(__RESULT) : NULL,              \
00108             __TYPE,                                                      \
00109             __FILE__, \
00110             "Authz Callout", \
00111             __LINE__, \
00112             "%s%s%s",                                                    \
00113             globus_gsi_authz_callout_error_strings[__TYPE],              \
00114             _tmp_str_ ? ": " : "",                                       \
00115             _tmp_str_ ? _tmp_str_ : ""));                                \
00116     if(_tmp_str_) free(_tmp_str_);                                       \
00117 }
00118 
00132 #define GLOBUS_GSI_AUTHZ_CALLOUT_ERRNO_ERROR(__RESULT, __ERRNO)          \
00133 {                                                                        \
00134     (__RESULT) = globus_error_put(                                       \
00135         globus_error_construct_errno_error(                              \
00136             GLOBUS_GSI_AUTHZ_CALLOUT_ERROR_MODULE,                       \
00137             (__RESULT) ? globus_error_get(__RESULT) : NULL,              \
00138             __ERRNO));                                                   \
00139 }
00140 
00141 
00142 #ifdef __cplusplus
00143 }
00144 #endif
00145 
00146 #endif

Generated on 27 Oct 2014 for globus_authz_callout_error by  doxygen 1.4.7