axutil_utils.h

Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  *      http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #ifndef AXUTIL_UTILS_H
00019 #define AXUTIL_UTILS_H
00020 
00021 #include <axutil_utils_defines.h>
00022 #include <axutil_error.h>
00023 #include <axutil_env.h>
00024 #include <axutil_date_time.h>
00025 #include <axutil_base64_binary.h>
00026 
00027 #ifdef __cplusplus
00028 extern "C"
00029 {
00030 #endif
00031 
00053 #define AXIS2_FUNC_PARAM_CHECK(object, env, error_return) \
00054     AXIS2_ENV_CHECK(env, error_return);\
00055     if (!object) \
00056     { \
00057         AXIS2_ERROR_SET_ERROR_NUMBER(env->error, AXIS2_ERROR_INVALID_NULL_PARAM); \
00058         AXIS2_ERROR_SET_STATUS_CODE(env->error, AXIS2_FAILURE); \
00059         return error_return; \
00060     } \
00061     else \
00062     { \
00063         AXIS2_ERROR_SET_STATUS_CODE(env->error, AXIS2_SUCCESS); \
00064     }
00065  
00075 #define AXIS2_PARAM_CHECK(error, object, error_return) \
00076     if (!object) \
00077     { \
00078         AXIS2_ERROR_SET_ERROR_NUMBER(error, AXIS2_ERROR_INVALID_NULL_PARAM); \
00079         AXIS2_ERROR_SET_STATUS_CODE(error, AXIS2_FAILURE); \
00080         return error_return; \
00081     } \
00082     else \
00083     { \
00084         AXIS2_ERROR_SET_STATUS_CODE(error, AXIS2_SUCCESS); \
00085     } 
00086 
00095 #define AXIS2_ERROR_SET(error, error_number, status_code) \
00096     { \
00097         AXIS2_ERROR_SET_ERROR_NUMBER(error, error_number); \
00098         AXIS2_ERROR_SET_STATUS_CODE(error, status_code); \
00099     }      
00100 
00101 
00104 #define AXIS2_CREATE_FUNCTION "axis2_get_instance"
00105 #define AXIS2_DELETE_FUNCTION "axis2_remove_instance"
00106 
00107 typedef void (AXIS2_CALL *AXIS2_FREE_VOID_ARG) (void *obj_to_be_freed, 
00108     const axutil_env_t *env);
00109     
00110 /* Function pointer typedef for read callback */
00111 typedef int (AXIS2_CALL *AXIS2_READ_INPUT_CALLBACK)(char *buffer, int size, 
00112     void* ctx);
00113 /* Function pointer typedef for close callback */    
00114 typedef int (AXIS2_CALL *AXIS2_CLOSE_INPUT_CALLBACK)(void *ctx);
00115     
00121     enum axis2_scopes
00122     {
00124         AXIS2_SCOPE_REQUEST = 0,
00126         AXIS2_SCOPE_SESSION,
00128         AXIS2_SCOPE_APPLICATION
00129     };
00130 
00131 #define AXIS2_REQUEST_URL_PREFIX "/services"
00132 #define AXIS2_TARGET_EPR "target_epr"
00133 #define AXIS2_DUMP_INPUT_MSG_TRUE "dump"
00134 
00144     AXIS2_EXTERN axis2_char_t** AXIS2_CALL
00145     axutil_parse_request_url_for_svc_and_op(const axutil_env_t *env, const axis2_char_t *request);
00146     
00149 #ifdef __cplusplus
00150 }
00151 #endif
00152 
00153 #endif                          /* AXIS2_UTILS_H */
00154 

Generated on Thu May 3 12:31:01 2007 for Axis2/C by  doxygen 1.4.6