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

axis2_http_client.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_HTTP_CLIENT_H
00018 #define AXIS2_HTTP_CLIENT_H
00019 
00020 
00026 #include <axis2_const.h>
00027 #include <axis2_defines.h>
00028 #include <axis2_env.h>
00029 #include <axis2_http_simple_response.h>
00030 #include <axis2_http_simple_request.h>
00031 #include <axis2_url.h>
00032 
00033 #ifdef __cplusplus
00034 extern "C"
00035 {
00036 #endif
00037 
00043 typedef struct axis2_http_client_ops axis2_http_client_ops_t;
00044 typedef struct axis2_http_client axis2_http_client_t;
00045 
00046     
00051 AXIS2_DECLARE_DATA struct axis2_http_client_ops
00052 {
00053     axis2_status_t (AXIS2_CALL *send)
00054                   (axis2_http_client_t *client, const axis2_env_t *env,
00055                   axis2_http_simple_request_t *request);
00056    int (AXIS2_CALL *recieve_header)
00057                   (axis2_http_client_t *client, const axis2_env_t *env);
00058    axis2_http_simple_response_t* (AXIS2_CALL *get_response)
00059                   (axis2_http_client_t *client, const axis2_env_t *env);
00060     
00061    axis2_status_t (AXIS2_CALL *set_url) (axis2_http_client_t *client, 
00062                     const axis2_env_t *env, axis2_url_t *url);
00063    
00064    axis2_url_t* (AXIS2_CALL *get_url) (axis2_http_client_t *client, 
00065                     const axis2_env_t *env);
00066    
00067     axis2_status_t (AXIS2_CALL *set_timeout) (axis2_http_client_t *client, 
00068                     const axis2_env_t *env, int timeout_ms);
00069    
00070     int (AXIS2_CALL *get_timeout) (axis2_http_client_t *client, 
00071                     const axis2_env_t *env);
00072    
00073     axis2_status_t (AXIS2_CALL *set_proxy) (axis2_http_client_t *client, 
00074                     const axis2_env_t *env, axis2_char_t *proxy_host,
00075                     int proxy_port);
00076    
00077     axis2_char_t* (AXIS2_CALL *get_proxy) (axis2_http_client_t *client, 
00078                     const axis2_env_t *env);
00079    
00080     axis2_status_t (AXIS2_CALL *free) (axis2_http_client_t *client, 
00081                     const axis2_env_t *env);
00082 };
00083 
00088 AXIS2_DECLARE_DATA struct axis2_http_client
00089 {
00090     axis2_http_client_ops_t *ops;    
00091 };
00092 
00093 
00094 AXIS2_EXTERN axis2_http_client_t * AXIS2_CALL 
00095 axis2_http_client_create (const axis2_env_t *env, axis2_url_t *url);
00096 
00102 axis2_status_t AXIS2_CALL
00103 axis2_http_client_free_void_arg (void *client, const axis2_env_t *env);
00104 
00105 /************************** Start of function macros **************************/
00106 
00107 #define AXIS2_HTTP_CLIENT_SEND(client, env, request) \
00108                                 ((client)->ops->send(client, env, request))
00109 #define AXIS2_HTTP_CLIENT_RECIEVE_HEADER(client, env) \
00110                                 ((client)->ops->recieve_header(client, env))
00111 #define AXIS2_HTTP_CLIENT_GET_RESPONSE(client, env) \
00112                                 ((client)->ops->get_response(client, env))
00113 #define AXIS2_HTTP_CLIENT_SET_URL(client, env, url) \
00114                                 ((client)->ops->set_url(client, env, url))
00115 #define AXIS2_HTTP_CLIENT_GET_URL(client, env) \
00116                                 ((client)->ops->get_url(client, env))
00117 #define AXIS2_HTTP_CLIENT_SET_TIMEOUT(client, env, timeout) \
00118                                 ((client)->ops->set_timeout(client, env,\
00119                         timeout))
00120 #define AXIS2_HTTP_CLIENT_GET_TIMEOUT(client, env) \
00121                                 ((client)->ops->get_url(client, env))
00122 #define AXIS2_HTTP_CLIENT_SET_PROXY(client, env, proxy_host, proxy_port) \
00123                                 ((client)->ops->set_proxy(client, env,\
00124                         proxy_host, proxy_port))
00125 #define AXIS2_HTTP_CLIENT_GET_PROXY(client, env) \
00126                                 ((client)->ops->get_proxy(client, env))
00127 #define AXIS2_HTTP_CLIENT_FREE(client, env) \
00128                                 ((client)->ops->free(client, env))
00129 /************************** End of function macros ****************************/    
00130 
00132 #ifdef __cplusplus
00133 }
00134 #endif
00135 
00136 #endif                          /* AXIS2_HTTP_CLIENT_H */

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