Grid Community Toolkit  6.2.1541705016
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 
22 #endif
23 
24 #ifndef GLOBUS_GRIDMAP_CALLOUT_ERROR_H
25 #define GLOBUS_GRIDMAP_CALLOUT_ERROR_H
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 #include "globus_common.h"
32 #include "globus_error_gssapi.h"
33 
69 #define GLOBUS_GRIDMAP_CALLOUT_ERROR_MODULE (&globus_i_gridmap_callout_error_module)
70 
71 extern
72 globus_module_descriptor_t globus_i_gridmap_callout_error_module;
73 
82 typedef enum
83 {
92 }
94 
95 extern char * globus_i_gridmap_callout_error_strings[];
96 
97 #define GLOBUS_GRIDMAP_CALLOUT_ERROR(__RESULT, __TYPE, __ERRSTR) \
98 { \
99  char * _tmp_str_ = \
100  globus_common_create_string __ERRSTR; \
101  (__RESULT) = globus_error_put( \
102  globus_error_construct_error( \
103  GLOBUS_GRIDMAP_CALLOUT_ERROR_MODULE, \
104  (__RESULT) ? globus_error_get(__RESULT) : NULL, \
105  __TYPE, \
106  __FILE__, \
107  "Globus Gridmap Callout", \
108  __LINE__, \
109  "%s%s%s", \
110  globus_i_gridmap_callout_error_strings[__TYPE], \
111  _tmp_str_ ? ": " : "", \
112  _tmp_str_ ? _tmp_str_ : "")); \
113  if(_tmp_str_) free(_tmp_str_); \
114 }
115 
116 #define GLOBUS_GRIDMAP_CALLOUT_GSS_ERROR(__RESULT, __MAJOR_STATUS, __MINOR_STATUS) \
117  __RESULT = globus_error_put( \
118  globus_error_wrap_gssapi_error( \
119  GLOBUS_GRIDMAP_CALLOUT_ERROR_MODULE, \
120  __MAJOR_STATUS, \
121  __MINOR_STATUS, \
122  GLOBUS_GRIDMAP_CALLOUT_GSSAPI_ERROR, \
123  __FILE__, \
124  "Globus Gridmap Callout", \
125  __LINE__, \
126  "%s", \
127  globus_i_gridmap_callout_error_strings[GLOBUS_GRIDMAP_CALLOUT_GSSAPI_ERROR]))
128 
129 #ifdef __cplusplus
130 }
131 #endif
132 
133 #endif
Definition: globus_gridmap_callout_error.h:91
Definition: globus_gridmap_callout_error.h:85
Definition: globus_gridmap_callout_error.h:89
globus_gridmap_callout_error_t
Definition: globus_gridmap_callout_error.h:82
Definition: globus_gridmap_callout_error.h:87
Headers common to all of Globus.
Module Descriptor.
Definition: globus_module.h:69