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
00031 #include <axis2_const.h>
00032 #include <axis2_defines.h>
00033 #include <axis2_env.h>
00034 #include <axis2_simple_http_svr_conn.h>
00035 #include <axis2_http_simple_response.h>
00036 #include <axis2_http_simple_request.h>
00037 #include <axis2_conf_ctx.h>
00038
00039
00040 #ifdef __cplusplus
00041 extern "C"
00042 {
00043 #endif
00044
00046 typedef struct axis2_http_worker_ops axis2_http_worker_ops_t;
00048 typedef struct axis2_http_worker axis2_http_worker_t;
00049
00054 struct axis2_http_worker_ops
00055 {
00062 axis2_bool_t (AXIS2_CALL *
00063 process_request)(
00064 axis2_http_worker_t *http_worker,
00065 const axis2_env_t *env,
00066 axis2_simple_http_svr_conn_t *svr_conn,
00067 axis2_http_simple_request_t *simple_request);
00068
00075 axis2_status_t (AXIS2_CALL *
00076 set_svr_port)(
00077 axis2_http_worker_t *http_worker,
00078 const axis2_env_t *env,
00079 int port);
00080
00086 axis2_status_t (AXIS2_CALL *
00087 free)(
00088 axis2_http_worker_t *http_worker,
00089 const axis2_env_t *env);
00090 };
00091
00095 struct axis2_http_worker
00096 {
00098 axis2_http_worker_ops_t *ops;
00099 };
00100
00101
00106 AXIS2_EXTERN axis2_http_worker_t * AXIS2_CALL
00107 axis2_http_worker_create (
00108 const axis2_env_t *env,
00109 axis2_conf_ctx_t *conf_ctx);
00110
00111
00112
00115 #define AXIS2_HTTP_WORKER_PROCESS_REQUEST(http_worker, env, svr_conn,\
00116 simple_request) ((http_worker)->ops->process_request(\
00117 http_worker, env, svr_conn, simple_request))
00118
00121 #define AXIS2_HTTP_WORKER_SET_SVR_PORT(http_worker, env, port) \
00122 ((http_worker)->ops->set_svr_port(http_worker, env, port))
00123
00126 #define AXIS2_HTTP_WORKER_FREE(http_worker, env) \
00127 ((http_worker)->ops->free(http_worker, env))
00128
00129
00130
00132 #ifdef __cplusplus
00133 }
00134 #endif
00135
00136 #endif