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 
00031 #include <axis2_const.h>
00032 #include <axis2_defines.h>
00033 #include <axis2_env.h>
00034 #include <axis2_http_simple_request.h>
00035 #include <axis2_http_simple_response.h>
00036 #include <axis2_http_response_writer.h>
00037 
00038 #ifdef __cplusplus
00039 extern "C"
00040 {
00041 #endif
00042 
00044     typedef struct axis2_simple_http_svr_conn_ops
00045                 axis2_simple_http_svr_conn_ops_t;
00047     typedef struct axis2_simple_http_svr_conn axis2_simple_http_svr_conn_t;
00048 
00052     struct axis2_simple_http_svr_conn_ops
00053     {
00059         axis2_status_t (AXIS2_CALL *
00060                 close)(
00061                     axis2_simple_http_svr_conn_t *svr_conn,
00062                     const axis2_env_t *env);
00063 
00068         axis2_bool_t (AXIS2_CALL *
00069                 is_open)(
00070                     axis2_simple_http_svr_conn_t *svr_conn,
00071                     const axis2_env_t *env);
00072 
00079         axis2_status_t (AXIS2_CALL *
00080                 set_keep_alive)(
00081                     axis2_simple_http_svr_conn_t *svr_conn,
00082                     const axis2_env_t *env,
00083                     axis2_bool_t keep_alive);
00084 
00089         axis2_bool_t (AXIS2_CALL *
00090                 is_keep_alive)(
00091                     axis2_simple_http_svr_conn_t *svr_conn,
00092                     const axis2_env_t *env);
00093 
00098         axis2_stream_t* (AXIS2_CALL *
00099                 get_stream)(
00100                     const axis2_simple_http_svr_conn_t *svr_conn,
00101                     const axis2_env_t *env);
00102 
00107         axis2_http_response_writer_t *(AXIS2_CALL *
00108                 get_writer)(
00109                     const axis2_simple_http_svr_conn_t *svr_conn,
00110                     const axis2_env_t *env);
00111 
00116         axis2_http_simple_request_t *(AXIS2_CALL *
00117                 read_request)(
00118                     axis2_simple_http_svr_conn_t *svr_conn,
00119                     const axis2_env_t *env);
00120 
00127         axis2_status_t (AXIS2_CALL *
00128                 write_response)(
00129                     axis2_simple_http_svr_conn_t *svr_conn,
00130                     const axis2_env_t *env,
00131                     axis2_http_simple_response_t *response);
00132 
00139         axis2_status_t (AXIS2_CALL *
00140                 set_rcv_timeout)(
00141                     axis2_simple_http_svr_conn_t *svr_conn,
00142                     const axis2_env_t *env,
00143                     int timeout);
00144 
00151         axis2_status_t (AXIS2_CALL *
00152                 set_snd_timeout)(
00153                     axis2_simple_http_svr_conn_t *svr_conn,
00154                     const axis2_env_t *env,
00155                     int timeout);
00156 
00161         axis2_char_t *(AXIS2_CALL *
00162                 get_svr_ip)(
00163                     const axis2_simple_http_svr_conn_t *svr_conn,
00164                     const axis2_env_t *env);
00165 
00171         axis2_status_t (AXIS2_CALL *
00172                 free)(
00173                     axis2_simple_http_svr_conn_t *svr_conn,
00174                     const axis2_env_t *env);
00175     };
00176 
00180     struct axis2_simple_http_svr_conn
00181     {
00183         axis2_simple_http_svr_conn_ops_t *ops;
00184     };
00185 
00186 
00192     AXIS2_EXTERN axis2_simple_http_svr_conn_t *AXIS2_CALL
00193     axis2_simple_http_svr_conn_create(
00194         const axis2_env_t *env, 
00195         int sockfd);
00196 
00199 #define AXIS2_SIMPLE_HTTP_SVR_CONN_CLOSE(svr_conn, env) \
00200                     ((svr_conn)->ops->close(svr_conn, env))
00201 
00204 #define AXIS2_SIMPLE_HTTP_SVR_CONN_IS_OPEN(svr_conn, env) \
00205                     ((svr_conn)->ops->is_open(svr_conn, env))
00206 
00209 #define AXIS2_SIMPLE_HTTP_SVR_CONN_SET_KEEP_ALIVE(svr_conn, env, keep_alive)\
00210                     ((svr_conn)->ops->set_keep_alive(svr_conn, env, keep_alive))
00211 
00214 #define AXIS2_SIMPLE_HTTP_SVR_CONN_IS_KEEP_ALIVE(svr_conn, env) \
00215                     ((svr_conn)->ops->is_keep_alive(svr_conn, env))
00216 
00219 #define AXIS2_SIMPLE_HTTP_SVR_CONN_GET_STREAM(svr_conn, env) \
00220                     ((svr_conn)->ops->get_stream(svr_conn, env))
00221 
00224 #define AXIS2_SIMPLE_HTTP_SVR_CONN_SET_WRITER(svr_conn, env, writer) \
00225                     ((svr_conn)->ops->set_writer(svr_conn, env, writer))
00226 
00229 #define AXIS2_SIMPLE_HTTP_SVR_CONN_READ_REQUEST(svr_conn, env) \
00230                     ((svr_conn)->ops->read_request(svr_conn, env))
00231 
00234 #define AXIS2_SIMPLE_HTTP_SVR_CONN_WRITE_RESPONSE(svr_conn, env, response) \
00235                     ((svr_conn)->ops->write_response(svr_conn, env, response))
00236 
00239 #define AXIS2_SIMPLE_HTTP_SVR_CONN_SET_SND_TIMEOUT(svr_conn, env, timeout) \
00240                     ((svr_conn)->ops->set_snd_timeout(svr_conn, env, timeout))
00241 
00244 #define AXIS2_SIMPLE_HTTP_SVR_CONN_SET_RCV_TIMEOUT(svr_conn, env, timeout) \
00245                     ((svr_conn)->ops->set_rcv_timeout(svr_conn, env, timeout))
00246 
00249 #define AXIS2_SIMPLE_HTTP_SVR_CONN_GET_SVR_IP(svr_conn, env) \
00250                     ((svr_conn)->ops->get_svr_ip(svr_conn, env))
00251 
00254 #define AXIS2_SIMPLE_HTTP_SVR_CONN_FREE(svr_conn, env) \
00255                     ((svr_conn)->ops->free(svr_conn, env))
00256 
00259 #ifdef __cplusplus
00260 }
00261 #endif
00262 
00263 #endif    /* AXIS2_SIMPLE_HTTP_SVR_CONN_H */

Generated on Thu Oct 26 21:11:23 2006 for Axis2/C by  doxygen 1.4.7