00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef AXIS2_HTTP_SVR_THREAD_H
00018 #define AXIS2_HTTP_SVR_THREAD_H
00019
00020
00026 #include <axis2_const.h>
00027 #include <axis2_defines.h>
00028 #include <axis2_env.h>
00029 #include <axis2_http_worker.h>
00030
00031 #ifdef __cplusplus
00032 extern "C"
00033 {
00034 #endif
00035
00041 typedef struct axis2_http_svr_thread_ops axis2_http_svr_thread_ops_t;
00042 typedef struct axis2_http_svr_thread axis2_http_svr_thread_t;
00043
00044 extern int axis2_http_socket_read_timeout;
00045
00050 AXIS2_DECLARE_DATA struct axis2_http_svr_thread_ops
00051 {
00052 axis2_status_t (AXIS2_CALL *run)
00053 (axis2_http_svr_thread_t *svr_thread,
00054 const axis2_env_t *env);
00055 axis2_status_t (AXIS2_CALL *destroy)
00056 (axis2_http_svr_thread_t *svr_thread,
00057 const axis2_env_t *env);
00058 int (AXIS2_CALL *get_local_port)
00059 (axis2_http_svr_thread_t *svr_thread,
00060 const axis2_env_t *env);
00061 axis2_bool_t (AXIS2_CALL *is_running)
00062 (axis2_http_svr_thread_t *svr_thread,
00063 const axis2_env_t *env);
00064 axis2_status_t (AXIS2_CALL *set_worker)
00065 (axis2_http_svr_thread_t *svr_thread,
00066 const axis2_env_t *env, axis2_http_worker_t *worker);
00067 axis2_status_t (AXIS2_CALL *free)
00068 (axis2_http_svr_thread_t *svr_thread,
00069 const axis2_env_t *env);
00070 };
00071
00076 AXIS2_DECLARE_DATA struct axis2_http_svr_thread
00077 {
00078 axis2_http_svr_thread_ops_t *ops;
00079 };
00080
00081
00082 AXIS2_EXTERN axis2_http_svr_thread_t * AXIS2_CALL
00083 axis2_http_svr_thread_create (const axis2_env_t *env, int port);
00084
00085
00086
00087 #define AXIS2_HTTP_SVR_THREAD_RUN(svr_thread, env) \
00088 ((svr_thread)->ops->run(svr_thread, env))
00089 #define AXIS2_HTTP_SVR_THREAD_DESTROY(svr_thread, env) \
00090 ((svr_thread)->ops->destroy(svr_thread, env))
00091 #define AXIS2_HTTP_SVR_THREAD_GET_LOCAL_PORT(svr_thread, env) \
00092 ((svr_thread)->ops->get_local_port(svr_thread,\
00093 env))
00094 #define AXIS2_HTTP_SVR_THREAD_IS_RUNNING(svr_thread, env) \
00095 ((svr_thread)->ops->is_running(svr_thread, env))
00096 #define AXIS2_HTTP_SVR_THREAD_SET_WORKER(svr_thread, env, worker) \
00097 ((svr_thread)->ops->set_worker(svr_thread, env,\
00098 worker))
00099 #define AXIS2_HTTP_SVR_THREAD_FREE(svr_thread, env) \
00100 ((svr_thread)->ops->free(svr_thread, env))
00101
00102
00104 #ifdef __cplusplus
00105 }
00106 #endif
00107
00108 #endif