axis2_rest_sender.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 AXIS2_REST_SENDER_H
00019 #define AXIS2_REST_SENDER_H
00020 
00031 #include <axis2_const.h>
00032 #include <axis2_utils_defines.h>
00033 #include <axis2_env.h>
00034 #include <axis2_msg_ctx.h>
00035 #include <axiom_output.h>
00036 #include <axis2_http_simple_response.h>
00037 #include <axiom_soap_envelope.h>
00038 
00039 
00040 #ifdef __cplusplus
00041 extern "C"
00042 {
00043 #endif
00044 
00046     typedef struct axis2_rest_sender_ops axis2_rest_sender_ops_t;
00048     typedef struct axis2_rest_sender axis2_rest_sender_t;
00049 
00050 
00055     struct axis2_rest_sender_ops
00056     {
00064         axis2_status_t (AXIS2_CALL *
00065                 send)(
00066                     axis2_rest_sender_t *sender,
00067                     const axis2_env_t *env, 
00068                     axis2_msg_ctx_t *msg_ctx,
00069                     axiom_node_t *out,
00070                     const axis2_char_t *str_url);
00071 
00077         axis2_status_t (AXIS2_CALL *
00078                 set_chunked)(
00079                     axis2_rest_sender_t *sender,
00080                     const axis2_env_t *env, 
00081                     axis2_bool_t chunked);
00082 
00088         axis2_status_t (AXIS2_CALL *
00089                 set_om_output)(
00090                     axis2_rest_sender_t *sender,
00091                     const axis2_env_t *env, 
00092                     axiom_output_t *om_output);
00093 
00099         axis2_status_t (AXIS2_CALL *
00100                 set_http_version)(
00101                     axis2_rest_sender_t *sender,
00102                     const axis2_env_t *env, 
00103                     axis2_char_t *version);
00104 
00109         axis2_status_t (AXIS2_CALL *
00110                 free)(
00111                     axis2_rest_sender_t *sender,
00112                     const axis2_env_t *env);
00113     };
00114 
00115 
00122     axis2_status_t AXIS2_CALL
00123     axis2_rest_sender_get_header_info(
00124         axis2_rest_sender_t *sender,
00125         const axis2_env_t *env, 
00126         axis2_msg_ctx_t *msg_ctx,
00127         axis2_http_simple_response_t *response);
00128 
00135     axis2_status_t AXIS2_CALL
00136     axis2_rest_sender_process_response(
00137         axis2_rest_sender_t *sender,
00138         const axis2_env_t *env, 
00139         axis2_msg_ctx_t *msg_ctx,
00140         axis2_http_simple_response_t *response);
00141 
00147     axis2_status_t AXIS2_CALL
00148     axis2_rest_sender_get_timeout_values(
00149         axis2_rest_sender_t *sender,
00150         const axis2_env_t *env, 
00151         axis2_msg_ctx_t *msg_ctx);
00152 
00156     struct axis2_rest_sender
00157     {
00159         axis2_rest_sender_ops_t *ops;
00160     };
00161 
00162 
00166     AXIS2_EXTERN axis2_rest_sender_t *AXIS2_CALL
00167     axis2_rest_sender_create(
00168         const axis2_env_t *env);
00169 
00170 /********************* Start of function macros   ***************************/
00171 
00174 #define AXIS2_REST_SENDER_SEND(sender, env, msg_ctx, output, url)\
00175                         ((sender)->ops->send (sender, env, msg_ctx,output, url))
00176 
00179 #define AXIS2_REST_SENDER_SET_CHUNKED(sender, env, chunked) \
00180                         ((sender)->ops->set_chunked(sender, env, chunked))
00181 
00184 #define AXIS2_REST_SENDER_SET_OM_OUTPUT(sender, env, om_output) \
00185                         ((sender)->ops->set_om_output (sender, env, om_output))
00186 
00189 #define AXIS2_REST_SENDER_SET_HTTP_VERSION(sender, env, version)\
00190                         ((sender)->ops->set_http_version (sender, env, version))
00191 
00194 #define AXIS2_REST_SENDER_FREE(sender, env) \
00195                         ((sender)->ops->free(sender, env))
00196 
00197 /************************* End of function macros *****************************/
00198 
00200 #ifdef __cplusplus
00201 }
00202 #endif
00203 #endif /* AXIS2_REST_SENDER_H */

Generated on Wed Dec 20 20:34:50 2006 for Axis2/C by  doxygen 1.5.1