axis2_simple_http_svr_conn.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_SIMPLE_HTTP_SVR_CONN_H
00019 #define AXIS2_SIMPLE_HTTP_SVR_CONN_H
00020 
00032 #include <axis2_const.h>
00033 #include <axis2_defines.h>
00034 #include <axis2_env.h>
00035 #include <axis2_http_simple_request.h>
00036 #include <axis2_http_simple_response.h>
00037 #include <axis2_http_response_writer.h>
00038 
00039 #ifdef __cplusplus
00040 extern "C"
00041 {
00042 #endif
00043 
00045     typedef struct axis2_simple_http_svr_conn_ops
00046                 axis2_simple_http_svr_conn_ops_t;
00048     typedef struct axis2_simple_http_svr_conn axis2_simple_http_svr_conn_t;
00049 
00053     struct axis2_simple_http_svr_conn_ops
00054     {
00060         axis2_status_t (AXIS2_CALL *
00061                 close)(
00062                     axis2_simple_http_svr_conn_t *svr_conn,
00063                     const axis2_env_t *env);
00064 
00069         axis2_bool_t (AXIS2_CALL *
00070                 is_open)(
00071                     axis2_simple_http_svr_conn_t *svr_conn,
00072                     const axis2_env_t *env);
00073 
00080         axis2_status_t (AXIS2_CALL *
00081                 set_keep_alive)(
00082                     axis2_simple_http_svr_conn_t *svr_conn,
00083                     const axis2_env_t *env,
00084                     axis2_bool_t keep_alive);
00085 
00090         axis2_bool_t (AXIS2_CALL *
00091                 is_keep_alive)(
00092                     axis2_simple_http_svr_conn_t *svr_conn,
00093                     const axis2_env_t *env);
00094 
00099         axis2_stream_t* (AXIS2_CALL *
00100                 get_stream)(
00101                     const axis2_simple_http_svr_conn_t *svr_conn,
00102                     const axis2_env_t *env);
00103 
00108         axis2_http_response_writer_t *(AXIS2_CALL *
00109                 get_writer)(
00110                     const axis2_simple_http_svr_conn_t *svr_conn,
00111                     const axis2_env_t *env);
00112 
00117         axis2_http_simple_request_t *(AXIS2_CALL *
00118                 read_request)(
00119                     axis2_simple_http_svr_conn_t *svr_conn,
00120                     const axis2_env_t *env);
00121 
00128         axis2_status_t (AXIS2_CALL *
00129                 write_response)(
00130                     axis2_simple_http_svr_conn_t *svr_conn,
00131                     const axis2_env_t *env,
00132                     axis2_http_simple_response_t *response);
00133 
00140         axis2_status_t (AXIS2_CALL *
00141                 set_rcv_timeout)(
00142                     axis2_simple_http_svr_conn_t *svr_conn,
00143                     const axis2_env_t *env,
00144                     int timeout);
00145 
00152         axis2_status_t (AXIS2_CALL *
00153                 set_snd_timeout)(
00154                     axis2_simple_http_svr_conn_t *svr_conn,
00155                     const axis2_env_t *env,
00156                     int timeout);
00157 
00162         axis2_char_t *(AXIS2_CALL *
00163                 get_svr_ip)(
00164                     const axis2_simple_http_svr_conn_t *svr_conn,
00165                     const axis2_env_t *env);
00166 
00172         axis2_status_t (AXIS2_CALL *
00173                 free)(
00174                     axis2_simple_http_svr_conn_t *svr_conn,
00175                     const axis2_env_t *env);
00176     };
00177 
00181     struct axis2_simple_http_svr_conn
00182     {
00184         axis2_simple_http_svr_conn_ops_t *ops;
00185     };
00186 
00187 
00193     AXIS2_EXTERN axis2_simple_http_svr_conn_t *AXIS2_CALL
00194     axis2_simple_http_svr_conn_create(
00195         const axis2_env_t *env, 
00196         int sockfd);
00197 
00200 #define AXIS2_SIMPLE_HTTP_SVR_CONN_CLOSE(svr_conn, env) \
00201                     ((svr_conn)->ops->close(svr_conn, env))
00202 
00205 #define AXIS2_SIMPLE_HTTP_SVR_CONN_IS_OPEN(svr_conn, env) \
00206                     ((svr_conn)->ops->is_open(svr_conn, env))
00207 
00210 #define AXIS2_SIMPLE_HTTP_SVR_CONN_SET_KEEP_ALIVE(svr_conn, env, keep_alive)\
00211                     ((svr_conn)->ops->set_keep_alive(svr_conn, env, keep_alive))
00212 
00215 #define AXIS2_SIMPLE_HTTP_SVR_CONN_IS_KEEP_ALIVE(svr_conn, env) \
00216                     ((svr_conn)->ops->is_keep_alive(svr_conn, env))
00217 
00220 #define AXIS2_SIMPLE_HTTP_SVR_CONN_GET_STREAM(svr_conn, env) \
00221                     ((svr_conn)->ops->get_stream(svr_conn, env))
00222 
00225 #define AXIS2_SIMPLE_HTTP_SVR_CONN_SET_WRITER(svr_conn, env, writer) \
00226                     ((svr_conn)->ops->set_writer(svr_conn, env, writer))
00227 
00230 #define AXIS2_SIMPLE_HTTP_SVR_CONN_READ_REQUEST(svr_conn, env) \
00231                     ((svr_conn)->ops->read_request(svr_conn, env))
00232 
00235 #define AXIS2_SIMPLE_HTTP_SVR_CONN_WRITE_RESPONSE(svr_conn, env, response) \
00236                     ((svr_conn)->ops->write_response(svr_conn, env, response))
00237 
00240 #define AXIS2_SIMPLE_HTTP_SVR_CONN_SET_SND_TIMEOUT(svr_conn, env, timeout) \
00241                     ((svr_conn)->ops->set_snd_timeout(svr_conn, env, timeout))
00242 
00245 #define AXIS2_SIMPLE_HTTP_SVR_CONN_SET_RCV_TIMEOUT(svr_conn, env, timeout) \
00246                     ((svr_conn)->ops->set_rcv_timeout(svr_conn, env, timeout))
00247 
00250 #define AXIS2_SIMPLE_HTTP_SVR_CONN_GET_SVR_IP(svr_conn, env) \
00251                     ((svr_conn)->ops->get_svr_ip(svr_conn, env))
00252 
00255 #define AXIS2_SIMPLE_HTTP_SVR_CONN_FREE(svr_conn, env) \
00256                     ((svr_conn)->ops->free(svr_conn, env))
00257 
00260 #ifdef __cplusplus
00261 }
00262 #endif
00263 
00264 #endif    /* AXIS2_SIMPLE_HTTP_SVR_CONN_H */

Generated on Wed Dec 20 20:14:10 2006 for Axis2/C by  doxygen 1.5.1