globus_gram_jobmanager_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 
00023 #ifndef GLOBUS_GRAM_JOBMANAGER_CALLOUT_ERROR_H
00024 #define GLOBUS_GRAM_JOBMANAGER_CALLOUT_ERROR_H
00025 
00026 
00027 #include "globus_common.h"
00028 
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032 
00073 #define GLOBUS_GRAM_JOBMANAGER_CALLOUT_ERROR_MODULE    (&globus_i_gram_jobmanager_callout_error_module)
00074 
00075 extern 
00076 globus_module_descriptor_t              globus_i_gram_jobmanager_callout_error_module;
00077 
00087 typedef enum
00088 {
00090     GLOBUS_GRAM_JOBMANAGER_CALLOUT_BAD_CREDS = 0,
00092     GLOBUS_GRAM_JOBMANAGER_CALLOUT_AUTHZ_SYSTEM_ERROR = 1,
00094     GLOBUS_GRAM_JOBMANAGER_CALLOUT_AUTHZ_DENIED = 2,
00096     GLOBUS_GRAM_JOBMANAGER_CALLOUT_AUTHZ_DENIED_INVALID_JOB = 3,
00098     GLOBUS_GRAM_JOBMANAGER_CALLOUT_AUTHZ_DENIED_BAD_EXECUTABLE = 4,
00100     GLOBUS_GRAM_JOBMANAGER_CALLOUT_ERROR_LAST = 5
00101 }
00102 globus_gram_jobmanager_callout_error_t;
00103 
00104 extern char * globus_i_gram_jobmanager_callout_error_strings[];
00105 
00106 #define GLOBUS_GRAM_JOBMANAGER_CALLOUT_ERROR(__RESULT, __TYPE, __ERRSTR) \
00107 {                                                                        \
00108     char *                          _tmp_str_ =                          \
00109         globus_common_create_string __ERRSTR;                            \
00110     (__RESULT) = globus_error_put(                                       \
00111         globus_error_construct_error(                                    \
00112             GLOBUS_GRAM_JOBMANAGER_CALLOUT_ERROR_MODULE,                 \
00113             (__RESULT) ? globus_error_get(__RESULT) : NULL,              \
00114             __TYPE,                                                      \
00115             __FILE__,                                                    \
00116             "GRAM Authorization Callout",                                \
00117             __LINE__,                                                    \
00118             "%s%s%s",                                                    \
00119             globus_i_gram_jobmanager_callout_error_strings[__TYPE],      \
00120             _tmp_str_ ? ": " : "",                                       \
00121             _tmp_str_ ? _tmp_str_ : ""));                                \
00122     if(_tmp_str_) free(_tmp_str_);                                       \
00123 }
00124 
00125 
00126 #ifdef __cplusplus
00127 }
00128 #endif
00129 
00130 #endif

Generated on 5 Sep 2016 for globus_gram_job_manager_callout_error by  doxygen 1.4.7