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

axis2_simple_http_svr_conn.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_SIMPLE_HTTP_SVR_CONN_H
00018 #define AXIS2_SIMPLE_HTTP_SVR_CONN_H
00019 
00025 #include <axis2_const.h>
00026 #include <axis2_defines.h>
00027 #include <axis2_env.h>
00028 #include <axis2_http_simple_request.h>
00029 #include <axis2_http_simple_response.h>
00030 #include <axis2_http_response_writer.h>
00031 
00032 #ifdef __cplusplus
00033 extern "C"
00034 {
00035 #endif
00036 
00037     typedef struct axis2_simple_http_svr_conn_ops 
00038                     axis2_simple_http_svr_conn_ops_t;
00039     typedef struct axis2_simple_http_svr_conn axis2_simple_http_svr_conn_t;
00040      
00049 AXIS2_DECLARE_DATA struct axis2_simple_http_svr_conn_ops
00050 {        
00051         axis2_status_t (AXIS2_CALL *
00052       close) (axis2_simple_http_svr_conn_t *svr_conn, 
00053                 const axis2_env_t *env);
00054    
00055         axis2_bool_t (AXIS2_CALL *
00056       is_open) (axis2_simple_http_svr_conn_t *svr_conn, 
00057                   const axis2_env_t *env);
00058    
00059         axis2_status_t (AXIS2_CALL *
00060       set_keep_alive) (axis2_simple_http_svr_conn_t *svr_conn, 
00061                         const axis2_env_t *env, 
00062                   axis2_bool_t keep_alive);
00063    
00064         axis2_bool_t (AXIS2_CALL *
00065       is_keep_alive) (axis2_simple_http_svr_conn_t *svr_conn, 
00066                         const axis2_env_t *env);
00067    
00068         axis2_stream_t* (AXIS2_CALL *
00069       get_stream) (axis2_simple_http_svr_conn_t *svr_conn, 
00070                      const axis2_env_t *env);
00071    
00072    
00073         axis2_http_response_writer_t* (AXIS2_CALL *
00074       get_writer)(axis2_simple_http_svr_conn_t *svr_conn, 
00075                     const axis2_env_t *env);
00076                
00077         axis2_http_simple_request_t* (AXIS2_CALL *
00078       read_request)(axis2_simple_http_svr_conn_t *svr_conn, 
00079                       const axis2_env_t *env);
00080                  
00081         axis2_status_t (AXIS2_CALL *
00082       write_response)(axis2_simple_http_svr_conn_t *svr_conn, 
00083                         const axis2_env_t *env, 
00084                         axis2_http_simple_response_t *response);
00085                   
00086         axis2_status_t (AXIS2_CALL *
00087       set_rcv_timeout)(axis2_simple_http_svr_conn_t *svr_conn, 
00088                          const axis2_env_t *env, 
00089                    int timeout);
00090                    
00091         axis2_status_t (AXIS2_CALL *
00092       set_snd_timeout)(axis2_simple_http_svr_conn_t *svr_conn, 
00093                          const axis2_env_t *env, 
00094                    int timeout);
00095                    
00096         axis2_char_t* (AXIS2_CALL *
00097       get_svr_ip) (axis2_simple_http_svr_conn_t *svr_conn, 
00098                      const axis2_env_t *env);
00099                 
00100         axis2_status_t (AXIS2_CALL *
00101       free)(axis2_simple_http_svr_conn_t *svr_conn, 
00102               const axis2_env_t *env);
00103  };
00104     
00108 AXIS2_DECLARE_DATA struct axis2_simple_http_svr_conn
00109 {
00111     axis2_simple_http_svr_conn_ops_t *ops;
00112 };
00113 
00114 
00118 AXIS2_EXTERN axis2_simple_http_svr_conn_t* AXIS2_CALL 
00119 axis2_simple_http_svr_conn_create(const axis2_env_t *env, int sockfd);
00120   
00121 #define AXIS2_SIMPLE_HTTP_SVR_CONN_CLOSE(svr_conn, env) \
00122                     ((svr_conn)->ops->close(svr_conn, env))
00123 #define AXIS2_SIMPLE_HTTP_SVR_CONN_IS_OPEN(svr_conn, env) \
00124                     ((svr_conn)->ops->is_open(svr_conn, env))
00125 #define AXIS2_SIMPLE_HTTP_SVR_CONN_SET_KEEP_ALIVE(svr_conn, env, keep_alive)\
00126                     ((svr_conn)->ops->set_keep_alive(svr_conn, env, keep_alive))
00127 #define AXIS2_SIMPLE_HTTP_SVR_CONN_IS_KEEP_ALIVE(svr_conn, env) \
00128                     ((svr_conn)->ops->is_keep_alive(svr_conn, env))
00129 #define AXIS2_SIMPLE_HTTP_SVR_CONN_GET_STREAM(svr_conn, env) \
00130                     ((svr_conn)->ops->get_stream(svr_conn, env))
00131 #define AXIS2_SIMPLE_HTTP_SVR_CONN_SET_WRITER(svr_conn, env, writer) \
00132                     ((svr_conn)->ops->set_writer(svr_conn, env, writer))
00133 #define AXIS2_SIMPLE_HTTP_SVR_CONN_READ_REQUEST(svr_conn, env) \
00134                     ((svr_conn)->ops->read_request(svr_conn, env))
00135 #define AXIS2_SIMPLE_HTTP_SVR_CONN_WRITE_RESPONSE(svr_conn, env, response) \
00136                     ((svr_conn)->ops->write_response(svr_conn, env, response))
00137 #define AXIS2_SIMPLE_HTTP_SVR_CONN_SET_SND_TIMEOUT(svr_conn, env, timeout) \
00138                     ((svr_conn)->ops->set_snd_timeout(svr_conn, env, timeout))
00139 #define AXIS2_SIMPLE_HTTP_SVR_CONN_SET_RCV_TIMEOUT(svr_conn, env, timeout) \
00140                     ((svr_conn)->ops->set_rcv_timeout(svr_conn, env, timeout))
00141 #define AXIS2_SIMPLE_HTTP_SVR_CONN_GET_SVR_IP(svr_conn, env) \
00142                     ((svr_conn)->ops->get_svr_ip(svr_conn, env))
00143 #define AXIS2_SIMPLE_HTTP_SVR_CONN_FREE(svr_conn, env) \
00144                     ((svr_conn)->ops->free(svr_conn, env))
00145     
00148 #ifdef __cplusplus
00149 }
00150 #endif
00151 
00152 #endif    /* AXIS2_SIMPLE_HTTP_SVR_CONN_H */

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