Grid Community Toolkit  6.2.1607800521 (tag: v6.2.20201212)
globus_gsi_authz_callout_error.h
Go to the documentation of this file.
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 GLOBUS_GSI_AUTHZ_CALLOUT_ERROR_H
18 #define GLOBUS_GSI_AUTHZ_CALLOUT_ERROR_H
19 
25 #include "globus_common.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 #ifndef GLOBUS_GLOBAL_DOCUMENT_SET
32 
37 #endif
38 
56 typedef enum
57 {
70  GLOBUS_GSI_AUTHZ_CALLOUT_ERROR_LAST = 6
71 }
73 
74 extern globus_module_descriptor_t globus_gsi_authz_callout_error_module;
75 
80 #define GLOBUS_GSI_AUTHZ_CALLOUT_ERROR_MODULE (&globus_gsi_authz_callout_error_module)
81 
82 extern char * globus_gsi_authz_callout_error_strings[];
83 
101 #define GLOBUS_GSI_AUTHZ_CALLOUT_ERROR(__RESULT, __TYPE, __ERRSTR) \
102 { \
103  char * _tmp_str_ = \
104  globus_common_create_string __ERRSTR; \
105  (__RESULT) = globus_error_put( \
106  globus_error_construct_error( \
107  GLOBUS_GSI_AUTHZ_CALLOUT_ERROR_MODULE, \
108  (__RESULT) ? globus_error_get(__RESULT) : NULL, \
109  __TYPE, \
110  __FILE__, \
111  "Authz Callout", \
112  __LINE__, \
113  "%s%s%s", \
114  globus_gsi_authz_callout_error_strings[__TYPE], \
115  _tmp_str_ ? ": " : "", \
116  _tmp_str_ ? _tmp_str_ : "")); \
117  if(_tmp_str_) free(_tmp_str_); \
118 }
119 
133 #define GLOBUS_GSI_AUTHZ_CALLOUT_ERRNO_ERROR(__RESULT, __ERRNO) \
134 { \
135  (__RESULT) = globus_error_put( \
136  globus_error_construct_errno_error( \
137  GLOBUS_GSI_AUTHZ_CALLOUT_ERROR_MODULE, \
138  (__RESULT) ? globus_error_get(__RESULT) : NULL, \
139  __ERRNO)); \
140 }
141 
142 
143 #ifdef __cplusplus
144 }
145 #endif
146 
147 #endif
Definition: globus_gsi_authz_callout_error.h:65
Definition: globus_gsi_authz_callout_error.h:61
Definition: globus_gsi_authz_callout_error.h:59
Definition: globus_gsi_authz_callout_error.h:69
Definition: globus_gsi_authz_callout_error.h:63
globus_gsi_authz_callout_error_t
Error codes.
Definition: globus_gsi_authz_callout_error.h:56
Headers common to all of Globus.
Definition: globus_gsi_authz_callout_error.h:67
Module Descriptor.
Definition: globus_module.h:71