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

axis2_utils.h

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 
00047 #define AXIS2_FUNC_PARAM_CHECK(object, env, error_return) \
00048     AXIS2_ENV_CHECK(env, error_return);\
00049     if (!object) \
00050     { \
00051         AXIS2_ERROR_SET_ERROR_NUMBER(env->error, AXIS2_ERROR_INVALID_NULL_PARAM); \
00052         AXIS2_ERROR_SET_STATUS_CODE(env->error, AXIS2_FAILURE); \
00053         return error_return; \
00054     } \
00055     else \
00056     { \
00057         AXIS2_ERROR_SET_STATUS_CODE(env->error, AXIS2_SUCCESS); \
00058     }
00059  
00069 #define AXIS2_PARAM_CHECK(error, object, error_return) \
00070     if (!object) \
00071     { \
00072         AXIS2_ERROR_SET_ERROR_NUMBER(error, AXIS2_ERROR_INVALID_NULL_PARAM); \
00073         AXIS2_ERROR_SET_STATUS_CODE(error, AXIS2_FAILURE); \
00074         return error_return; \
00075     } \
00076     else \
00077     { \
00078         AXIS2_ERROR_SET_STATUS_CODE(error, AXIS2_SUCCESS); \
00079     } 
00080 
00089 #define AXIS2_ERROR_SET(error, error_number, status_code) \
00090     { \
00091         AXIS2_ERROR_SET_ERROR_NUMBER(error, error_number); \
00092         AXIS2_ERROR_SET_STATUS_CODE(error, status_code); \
00093     }      
00094 
00095 
00098 #define AXIS2_CREATE_FUNCTION "axis2_get_instance"
00099 #define AXIS2_DELETE_FUNCTION "axis2_remove_instance"
00100 
00101 typedef int (AXIS2_CALL *AXIS2_FREE_VOID_ARG) (void *obj_to_be_freed, 
00102     const axis2_env_t *env);
00103     
00104 /* Function pointer typedef for read callback */
00105 typedef int (AXIS2_CALL *AXIS2_READ_INPUT_CALLBACK)(char *buffer, int size, 
00106     void* ctx);
00107 /* Function pointer typedef for close callback */    
00108 typedef int (AXIS2_CALL *AXIS2_CLOSE_INPUT_CALLBACK)(void *ctx);
00109     
00115     enum axis2_scopes
00116     {
00118         AXIS2_SCOPE_APPLICATION = 0,
00120         AXIS2_SCOPE_SESSION,
00122         AXIS2_SCOPE_REQUEST
00123     };
00124 
00125 
00126 
00127 
00128     
00129 #define AXIS2_REQUEST_URL_PREFIX "/services"
00130 
00139     AXIS2_EXTERN axis2_char_t** AXIS2_CALL
00140     axis2_parse_request_url_for_svc_and_op(const axis2_env_t *env, const axis2_char_t *request);
00141     
00144 #ifdef __cplusplus
00145 }
00146 #endif
00147 
00148 #endif                          /* AXIS2_UTILS_H */

Generated on Fri Jun 16 18:02:31 2006 for Axis2/C by  doxygen 1.4.2