globus_gridmap_callout_error  2.3
 All Enumerations Enumerator Groups
globus_gridmap_callout_error.h
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_DONT_DOCUMENT_INTERNAL
18 
26 #endif
27 
28 #ifndef GLOBUS_GRIDMAP_CALLOUT_ERROR_H
29 #define GLOBUS_GRIDMAP_CALLOUT_ERROR_H
30 
31 #ifndef EXTERN_C_BEGIN
32 # ifdef __cplusplus
33 # define EXTERN_C_BEGIN extern "C" {
34 # define EXTERN_C_END }
35 # else
36 # define EXTERN_C_BEGIN
37 # define EXTERN_C_END
38 # endif
39 #endif
40 
41 EXTERN_C_BEGIN
42 
43 #include "globus_common.h"
44 #include "globus_error_gssapi.h"
45 
81 #define GLOBUS_GRIDMAP_CALLOUT_ERROR_MODULE (&globus_i_gridmap_callout_error_module)
82 
83 extern
84 globus_module_descriptor_t globus_i_gridmap_callout_error_module;
85 
94 typedef enum
95 {
104 }
106 
107 extern char * globus_i_gridmap_callout_error_strings[];
108 
109 #define GLOBUS_GRIDMAP_CALLOUT_ERROR(__RESULT, __TYPE, __ERRSTR) \
110 { \
111  char * _tmp_str_ = \
112  globus_common_create_string __ERRSTR; \
113  (__RESULT) = globus_error_put( \
114  globus_error_construct_error( \
115  GLOBUS_GRIDMAP_CALLOUT_ERROR_MODULE, \
116  (__RESULT) ? globus_error_get(__RESULT) : NULL, \
117  __TYPE, \
118  __FILE__, \
119  "Globus Gridmap Callout", \
120  __LINE__, \
121  "%s%s%s", \
122  globus_i_gridmap_callout_error_strings[__TYPE], \
123  _tmp_str_ ? ": " : "", \
124  _tmp_str_ ? _tmp_str_ : "")); \
125  if(_tmp_str_) free(_tmp_str_); \
126 }
127 
128 #define GLOBUS_GRIDMAP_CALLOUT_GSS_ERROR(__RESULT, __MAJOR_STATUS, __MINOR_STATUS) \
129  __RESULT = globus_error_put( \
130  globus_error_wrap_gssapi_error( \
131  GLOBUS_GRIDMAP_CALLOUT_ERROR_MODULE, \
132  __MAJOR_STATUS, \
133  __MINOR_STATUS, \
134  GLOBUS_GRIDMAP_CALLOUT_GSSAPI_ERROR, \
135  __FILE__, \
136  "Globus Gridmap Callout", \
137  __LINE__, \
138  "%s", \
139  globus_i_gridmap_callout_error_strings[GLOBUS_GRIDMAP_CALLOUT_GSSAPI_ERROR]))
140 
141 EXTERN_C_END
142 
143 #endif
Definition: globus_gridmap_callout_error.h:103
Definition: globus_gridmap_callout_error.h:97
Definition: globus_gridmap_callout_error.h:101
globus_gridmap_callout_error_t
Definition: globus_gridmap_callout_error.h:94
Definition: globus_gridmap_callout_error.h:99