Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Examples

axis2_http_svr_thread.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_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 /************************** Start of function macros **************************/
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 /************************** End of function macros ****************************/    
00102 
00104 #ifdef __cplusplus
00105 }
00106 #endif
00107 
00108 #endif                          /* AXIS2_HTTP_SVR_THREAD_H */

Generated on Fri Jun 16 18:02:31 2006 for Axis2/C by  doxygen 1.4.2