Grid Community Toolkit  6.2.1541705016
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 
55 typedef enum
56 {
69  GLOBUS_GSI_AUTHZ_CALLOUT_ERROR_LAST = 6
70 }
72 
73 extern globus_module_descriptor_t globus_gsi_authz_callout_error_module;
74 
79 #define GLOBUS_GSI_AUTHZ_CALLOUT_ERROR_MODULE (&globus_gsi_authz_callout_error_module)
80 
81 extern char * globus_gsi_authz_callout_error_strings[];
82 
100 #define GLOBUS_GSI_AUTHZ_CALLOUT_ERROR(__RESULT, __TYPE, __ERRSTR) \
101 { \
102  char * _tmp_str_ = \
103  globus_common_create_string __ERRSTR; \
104  (__RESULT) = globus_error_put( \
105  globus_error_construct_error( \
106  GLOBUS_GSI_AUTHZ_CALLOUT_ERROR_MODULE, \
107  (__RESULT) ? globus_error_get(__RESULT) : NULL, \
108  __TYPE, \
109  __FILE__, \
110  "Authz Callout", \
111  __LINE__, \
112  "%s%s%s", \
113  globus_gsi_authz_callout_error_strings[__TYPE], \
114  _tmp_str_ ? ": " : "", \
115  _tmp_str_ ? _tmp_str_ : "")); \
116  if(_tmp_str_) free(_tmp_str_); \
117 }
118 
132 #define GLOBUS_GSI_AUTHZ_CALLOUT_ERRNO_ERROR(__RESULT, __ERRNO) \
133 { \
134  (__RESULT) = globus_error_put( \
135  globus_error_construct_errno_error( \
136  GLOBUS_GSI_AUTHZ_CALLOUT_ERROR_MODULE, \
137  (__RESULT) ? globus_error_get(__RESULT) : NULL, \
138  __ERRNO)); \
139 }
140 
141 
142 #ifdef __cplusplus
143 }
144 #endif
145 
146 #endif
Definition: globus_gsi_authz_callout_error.h:64
Definition: globus_gsi_authz_callout_error.h:60
Definition: globus_gsi_authz_callout_error.h:58
Definition: globus_gsi_authz_callout_error.h:68
Definition: globus_gsi_authz_callout_error.h:62
globus_gsi_authz_callout_error_t
Error codes.
Definition: globus_gsi_authz_callout_error.h:55
Headers common to all of Globus.
Definition: globus_gsi_authz_callout_error.h:66
Module Descriptor.
Definition: globus_module.h:69