axis2_http_svr_thread.h

Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  *      http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #ifndef AXIS2_HTTP_SVR_THREAD_H
00019 #define AXIS2_HTTP_SVR_THREAD_H
00020 
00032 #include <axis2_const.h>
00033 #include <axis2_defines.h>
00034 #include <axis2_env.h>
00035 #include <axis2_http_worker.h>
00036 
00037 #ifdef __cplusplus
00038 extern "C"
00039 {
00040 #endif
00041 
00043     typedef struct axis2_http_svr_thread_ops axis2_http_svr_thread_ops_t;
00045     typedef struct axis2_http_svr_thread axis2_http_svr_thread_t;
00046 
00047     extern int axis2_http_socket_read_timeout;
00048 
00053     struct axis2_http_svr_thread_ops
00054     {
00059         axis2_status_t (AXIS2_CALL *
00060                 run)(
00061                     axis2_http_svr_thread_t *svr_thread,
00062                     const axis2_env_t *env);
00063 
00068         axis2_status_t (AXIS2_CALL *
00069                 destroy)(
00070                     axis2_http_svr_thread_t *svr_thread,
00071                     const axis2_env_t *env);
00072 
00077         int (AXIS2_CALL *
00078                 get_local_port)(
00079                     const axis2_http_svr_thread_t *svr_thread,
00080                     const axis2_env_t *env);
00081 
00086         axis2_bool_t (AXIS2_CALL *
00087                 is_running)(
00088                     axis2_http_svr_thread_t *svr_thread,
00089                     const axis2_env_t *env);
00090 
00096         axis2_status_t (AXIS2_CALL *
00097                 set_worker)(
00098                     axis2_http_svr_thread_t *svr_thread,
00099                     const axis2_env_t *env,
00100                     axis2_http_worker_t *worker);
00101 
00106         axis2_status_t (AXIS2_CALL *
00107                 free)(
00108                     axis2_http_svr_thread_t *svr_thread,
00109                     const axis2_env_t *env);
00110     };
00111 
00115     struct axis2_http_svr_thread
00116     {
00118         axis2_http_svr_thread_ops_t *ops;
00119     };
00120 
00125     AXIS2_EXTERN axis2_http_svr_thread_t *AXIS2_CALL
00126     axis2_http_svr_thread_create (
00127         const axis2_env_t *env,
00128         int port);
00129 
00130 /************************** Start of function macros **************************/
00131 
00134 #define AXIS2_HTTP_SVR_THREAD_RUN(svr_thread, env) \
00135                   ((svr_thread)->ops->run(svr_thread, env))
00136 
00139 #define AXIS2_HTTP_SVR_THREAD_DESTROY(svr_thread, env) \
00140                         ((svr_thread)->ops->destroy(svr_thread, env))
00141 
00144 #define AXIS2_HTTP_SVR_THREAD_GET_LOCAL_PORT(svr_thread, env) \
00145                         ((svr_thread)->ops->get_local_port(svr_thread,\
00146                   env))
00147 
00150 #define AXIS2_HTTP_SVR_THREAD_IS_RUNNING(svr_thread, env) \
00151                         ((svr_thread)->ops->is_running(svr_thread, env))
00152 
00155 #define AXIS2_HTTP_SVR_THREAD_SET_WORKER(svr_thread, env, worker) \
00156                         ((svr_thread)->ops->set_worker(svr_thread, env,\
00157                   worker))
00158 
00161 #define AXIS2_HTTP_SVR_THREAD_FREE(svr_thread, env) \
00162                 ((svr_thread)->ops->free(svr_thread, env))
00163 
00164 /************************** End of function macros ****************************/
00165 
00167 #ifdef __cplusplus
00168 }
00169 #endif
00170 
00171 #endif                          /* AXIS2_HTTP_SVR_THREAD_H */

Generated on Wed Dec 20 20:14:10 2006 for Axis2/C by  doxygen 1.5.1