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 
00031 #include <axis2_const.h>
00032 #include <axis2_defines.h>
00033 #include <axis2_env.h>
00034 #include <axis2_http_worker.h>
00035 
00036 #ifdef __cplusplus
00037 extern "C"
00038 {
00039 #endif
00040 
00042     typedef struct axis2_http_svr_thread_ops axis2_http_svr_thread_ops_t;
00044     typedef struct axis2_http_svr_thread axis2_http_svr_thread_t;
00045 
00046     extern int axis2_http_socket_read_timeout;
00047 
00052     struct axis2_http_svr_thread_ops
00053     {
00058         axis2_status_t (AXIS2_CALL *
00059                 run)(
00060                     axis2_http_svr_thread_t *svr_thread,
00061                     const axis2_env_t *env);
00062 
00067         axis2_status_t (AXIS2_CALL *
00068                 destroy)(
00069                     axis2_http_svr_thread_t *svr_thread,
00070                     const axis2_env_t *env);
00071 
00076         int (AXIS2_CALL *
00077                 get_local_port)(
00078                     const axis2_http_svr_thread_t *svr_thread,
00079                     const axis2_env_t *env);
00080 
00085         axis2_bool_t (AXIS2_CALL *
00086                 is_running)(
00087                     axis2_http_svr_thread_t *svr_thread,
00088                     const axis2_env_t *env);
00089 
00095         axis2_status_t (AXIS2_CALL *
00096                 set_worker)(
00097                     axis2_http_svr_thread_t *svr_thread,
00098                     const axis2_env_t *env,
00099                     axis2_http_worker_t *worker);
00100 
00105         axis2_status_t (AXIS2_CALL *
00106                 free)(
00107                     axis2_http_svr_thread_t *svr_thread,
00108                     const axis2_env_t *env);
00109     };
00110 
00114     struct axis2_http_svr_thread
00115     {
00117         axis2_http_svr_thread_ops_t *ops;
00118     };
00119 
00124     AXIS2_EXTERN axis2_http_svr_thread_t *AXIS2_CALL
00125     axis2_http_svr_thread_create (
00126         const axis2_env_t *env,
00127         int port);
00128 
00129 /************************** Start of function macros **************************/
00130 
00133 #define AXIS2_HTTP_SVR_THREAD_RUN(svr_thread, env) \
00134                   ((svr_thread)->ops->run(svr_thread, env))
00135 
00138 #define AXIS2_HTTP_SVR_THREAD_DESTROY(svr_thread, env) \
00139                         ((svr_thread)->ops->destroy(svr_thread, env))
00140 
00143 #define AXIS2_HTTP_SVR_THREAD_GET_LOCAL_PORT(svr_thread, env) \
00144                         ((svr_thread)->ops->get_local_port(svr_thread,\
00145                   env))
00146 
00149 #define AXIS2_HTTP_SVR_THREAD_IS_RUNNING(svr_thread, env) \
00150                         ((svr_thread)->ops->is_running(svr_thread, env))
00151 
00154 #define AXIS2_HTTP_SVR_THREAD_SET_WORKER(svr_thread, env, worker) \
00155                         ((svr_thread)->ops->set_worker(svr_thread, env,\
00156                   worker))
00157 
00160 #define AXIS2_HTTP_SVR_THREAD_FREE(svr_thread, env) \
00161                 ((svr_thread)->ops->free(svr_thread, env))
00162 
00163 /************************** End of function macros ****************************/
00164 
00166 #ifdef __cplusplus
00167 }
00168 #endif
00169 
00170 #endif                          /* AXIS2_HTTP_SVR_THREAD_H */

Generated on Thu Oct 26 21:11:23 2006 for Axis2/C by  doxygen 1.4.7