axis2_utils.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_UTILS_H
00018 #define AXIS2_UTILS_H
00019 
00020 #include <axis2_utils_defines.h>
00021 #include <axis2_error.h>
00022 #include <axis2_env.h>
00023 #include <axis2_date_time.h>
00024 #include <axis2_base64_binary.h>
00025 
00026 #ifdef __cplusplus
00027 extern "C"
00028 {
00029 #endif
00030 
00052 #define AXIS2_FUNC_PARAM_CHECK(object, env, error_return) \
00053     AXIS2_ENV_CHECK(env, error_return);\
00054     if (!object) \
00055     { \
00056         AXIS2_ERROR_SET_ERROR_NUMBER(env->error, AXIS2_ERROR_INVALID_NULL_PARAM); \
00057         AXIS2_ERROR_SET_STATUS_CODE(env->error, AXIS2_FAILURE); \
00058         return error_return; \
00059     } \
00060     else \
00061     { \
00062         AXIS2_ERROR_SET_STATUS_CODE(env->error, AXIS2_SUCCESS); \
00063     }
00064  
00074 #define AXIS2_PARAM_CHECK(error, object, error_return) \
00075     if (!object) \
00076     { \
00077         AXIS2_ERROR_SET_ERROR_NUMBER(error, AXIS2_ERROR_INVALID_NULL_PARAM); \
00078         AXIS2_ERROR_SET_STATUS_CODE(error, AXIS2_FAILURE); \
00079         return error_return; \
00080     } \
00081     else \
00082     { \
00083         AXIS2_ERROR_SET_STATUS_CODE(error, AXIS2_SUCCESS); \
00084     } 
00085 
00094 #define AXIS2_ERROR_SET(error, error_number, status_code) \
00095     { \
00096         AXIS2_ERROR_SET_ERROR_NUMBER(error, error_number); \
00097         AXIS2_ERROR_SET_STATUS_CODE(error, status_code); \
00098     }      
00099 
00100 
00103 #define AXIS2_CREATE_FUNCTION "axis2_get_instance"
00104 #define AXIS2_DELETE_FUNCTION "axis2_remove_instance"
00105 
00106 typedef int (AXIS2_CALL *AXIS2_FREE_VOID_ARG) (void *obj_to_be_freed, 
00107     const axis2_env_t *env);
00108     
00109 /* Function pointer typedef for read callback */
00110 typedef int (AXIS2_CALL *AXIS2_READ_INPUT_CALLBACK)(char *buffer, int size, 
00111     void* ctx);
00112 /* Function pointer typedef for close callback */    
00113 typedef int (AXIS2_CALL *AXIS2_CLOSE_INPUT_CALLBACK)(void *ctx);
00114     
00120     enum axis2_scopes
00121     {
00123         AXIS2_SCOPE_APPLICATION = 0,
00125         AXIS2_SCOPE_SESSION,
00127         AXIS2_SCOPE_REQUEST
00128     };
00129 
00130 
00131 
00132 
00133     
00134 #define AXIS2_REQUEST_URL_PREFIX "/services"
00135 
00144     AXIS2_EXTERN axis2_char_t** AXIS2_CALL
00145     axis2_parse_request_url_for_svc_and_op(const axis2_env_t *env, const axis2_char_t *request);
00146     
00149 #ifdef __cplusplus
00150 }
00151 #endif
00152 
00153 #endif                          /* AXIS2_UTILS_H */

Generated on Tue Oct 3 20:47:59 2006 for Axis2/C by  doxygen 1.4.7