00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef AXIS2_HTTP_WORKER_H
00018 #define AXIS2_HTTP_WORKER_H
00019
00020
00026 #include <axis2_const.h>
00027 #include <axis2_defines.h>
00028 #include <axis2_env.h>
00029 #include <axis2_simple_http_svr_conn.h>
00030 #include <axis2_http_simple_response.h>
00031 #include <axis2_http_simple_request.h>
00032 #include <axis2_conf_ctx.h>
00033
00034
00035 #ifdef __cplusplus
00036 extern "C"
00037 {
00038 #endif
00039
00045 typedef struct axis2_http_worker_ops axis2_http_worker_ops_t;
00046 typedef struct axis2_http_worker axis2_http_worker_t;
00047
00052 AXIS2_DECLARE_DATA struct axis2_http_worker_ops
00053 {
00054 axis2_bool_t (AXIS2_CALL *process_request)
00055 (axis2_http_worker_t *http_worker,
00056 const axis2_env_t *env,
00057 axis2_simple_http_svr_conn_t *svr_conn,
00058 axis2_http_simple_request_t *simple_request);
00059
00060 axis2_status_t (AXIS2_CALL *set_svr_port)
00061 (axis2_http_worker_t *http_worker,
00062 const axis2_env_t *env,
00063 int port);
00064 axis2_status_t (AXIS2_CALL *free)
00065 (axis2_http_worker_t *http_worker,
00066 const axis2_env_t *env);
00067 };
00068
00073 AXIS2_DECLARE_DATA struct axis2_http_worker
00074 {
00075 axis2_http_worker_ops_t *ops;
00076 };
00077
00078
00079 AXIS2_EXTERN axis2_http_worker_t * AXIS2_CALL
00080 axis2_http_worker_create (const axis2_env_t *env, axis2_conf_ctx_t *conf_ctx);
00081
00082
00083
00084
00085 #define AXIS2_HTTP_WORKER_PROCESS_REQUEST(http_worker, env, svr_conn,\
00086 simple_request) ((http_worker)->ops->process_request(\
00087 http_worker, env, svr_conn, simple_request))
00088 #define AXIS2_HTTP_WORKER_SET_SVR_PORT(http_worker, env, port) \
00089 ((http_worker)->ops->set_svr_port(http_worker, env, port))
00090 #define AXIS2_HTTP_WORKER_FREE(http_worker, env) \
00091 ((http_worker)->ops->free(http_worker, env))
00092
00093
00094
00096 #ifdef __cplusplus
00097 }
00098 #endif
00099
00100 #endif