Main Page | Modules | Class List | Directories | File List | Class Members | File Members

axis2.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 2004,2005 The Apache Software Foundation.
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 
00017 #ifndef AXIS2_H
00018 #define AXIS2_H
00019 
00025 #include <stdlib.h>
00026 #include <stdio.h>
00027 #include <axis2_env.h>
00028 
00039 #define AXIS2_FUNC_PARAM_CHECK(object, env, error_return) \
00040     AXIS2_ENV_CHECK(env, error_return);\
00041     if (!object) \
00042     { \
00043         AXIS2_ERROR_SET_ERROR_NUMBER((*env)->error, AXIS2_ERROR_INVALID_NULL_PARAM); \
00044         AXIS2_ERROR_SET_STATUS_CODE((*env)->error, AXIS2_FAILURE); \
00045         return error_return; \
00046     } \
00047     else \
00048     { \
00049         AXIS2_ERROR_SET_STATUS_CODE((*env)->error, AXIS2_SUCCESS); \
00050     }
00051  
00061 #define AXIS2_PARAM_CHECK(error, object, error_return) \
00062     if (!object) \
00063     { \
00064         AXIS2_ERROR_SET_ERROR_NUMBER(error, AXIS2_ERROR_INVALID_NULL_PARAM); \
00065         AXIS2_ERROR_SET_STATUS_CODE(error, AXIS2_FAILURE); \
00066         return error_return; \
00067     } \
00068     else \
00069     { \
00070         AXIS2_ERROR_SET_STATUS_CODE(error, AXIS2_SUCCESS); \
00071     } 
00072 
00081 #define AXIS2_ERROR_SET(error, error_number, error_return) \
00082     { \
00083         AXIS2_ERROR_SET_ERROR_NUMBER(error, error_number); \
00084         AXIS2_ERROR_SET_STATUS_CODE(error, AXIS2_FAILURE); \
00085         return error_return; \
00086     }      
00087 
00088 #ifdef __cplusplus
00089 extern "C"
00090 {
00091 #endif
00092 
00093 
00101 #ifdef __cplusplus
00102 }
00103 #endif
00104 
00105 #endif /* AXIS2_H */

Generated on Thu Nov 24 13:58:29 2005 for Axis2/C by  doxygen 1.4.2