axis2_rest_sender.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_REST_SENDER_H
00018 #define AXIS2_REST_SENDER_H
00019 
00030 #include <axis2_const.h>
00031 #include <axis2_utils_defines.h>
00032 #include <axis2_env.h>
00033 #include <axis2_msg_ctx.h>
00034 #include <axiom_output.h>
00035 #include <axis2_http_simple_response.h>
00036 #include <axiom_soap_envelope.h>
00037 
00038 
00039 #ifdef __cplusplus
00040 extern "C"
00041 {
00042 #endif
00043 
00045     typedef struct axis2_rest_sender_ops axis2_rest_sender_ops_t;
00047     typedef struct axis2_rest_sender axis2_rest_sender_t;
00048 
00049 
00054     struct axis2_rest_sender_ops
00055     {
00063         axis2_status_t (AXIS2_CALL *
00064                 send)(
00065                     axis2_rest_sender_t *sender,
00066                     const axis2_env_t *env, 
00067                     axis2_msg_ctx_t *msg_ctx,
00068                     axiom_node_t *out,
00069                     const axis2_char_t *str_url);
00070 
00076         axis2_status_t (AXIS2_CALL *
00077                 set_chunked)(
00078                     axis2_rest_sender_t *sender,
00079                     const axis2_env_t *env, 
00080                     axis2_bool_t chunked);
00081 
00087         axis2_status_t (AXIS2_CALL *
00088                 set_om_output)(
00089                     axis2_rest_sender_t *sender,
00090                     const axis2_env_t *env, 
00091                     axiom_output_t *om_output);
00092 
00098         axis2_status_t (AXIS2_CALL *
00099                 set_http_version)(
00100                     axis2_rest_sender_t *sender,
00101                     const axis2_env_t *env, 
00102                     axis2_char_t *version);
00103 
00108         axis2_status_t (AXIS2_CALL *
00109                 free)(
00110                     axis2_rest_sender_t *sender,
00111                     const axis2_env_t *env);
00112     };
00113 
00114 
00121     axis2_status_t AXIS2_CALL
00122     axis2_rest_sender_get_header_info(
00123         axis2_rest_sender_t *sender,
00124         const axis2_env_t *env, 
00125         axis2_msg_ctx_t *msg_ctx,
00126         axis2_http_simple_response_t *response);
00127 
00134     axis2_status_t AXIS2_CALL
00135     axis2_rest_sender_process_response(
00136         axis2_rest_sender_t *sender,
00137         const axis2_env_t *env, 
00138         axis2_msg_ctx_t *msg_ctx,
00139         axis2_http_simple_response_t *response);
00140 
00146     axis2_status_t AXIS2_CALL
00147     axis2_rest_sender_get_timeout_values(
00148         axis2_rest_sender_t *sender,
00149         const axis2_env_t *env, 
00150         axis2_msg_ctx_t *msg_ctx);
00151 
00155     struct axis2_rest_sender
00156     {
00158         axis2_rest_sender_ops_t *ops;
00159     };
00160 
00161 
00165     AXIS2_EXTERN axis2_rest_sender_t *AXIS2_CALL
00166     axis2_rest_sender_create(
00167         const axis2_env_t *env);
00168 
00169 /********************* Start of function macros   ***************************/
00170 
00173 #define AXIS2_REST_SENDER_SEND(sender, env, msg_ctx, output, url)\
00174                         ((sender)->ops->send (sender, env, msg_ctx,output, url))
00175 
00178 #define AXIS2_REST_SENDER_SET_CHUNKED(sender, env, chunked) \
00179                         ((sender)->ops->set_chunked(sender, env, chunked))
00180 
00183 #define AXIS2_REST_SENDER_SET_OM_OUTPUT(sender, env, om_output) \
00184                         ((sender)->ops->set_om_output (sender, env, om_output))
00185 
00188 #define AXIS2_REST_SENDER_SET_HTTP_VERSION(sender, env, version)\
00189                         ((sender)->ops->set_http_version (sender, env, version))
00190 
00193 #define AXIS2_REST_SENDER_FREE(sender, env) \
00194                         ((sender)->ops->free(sender, env))
00195 
00196 /************************* End of function macros *****************************/
00197 
00199 #ifdef __cplusplus
00200 }
00201 #endif
00202 #endif /* AXIS2_REST_SENDER_H */

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