axis2_http_worker.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_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 /************************** Start of function macros **************************/
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 /************************** End of function macros ****************************/
00130 
00132 #ifdef __cplusplus
00133 }
00134 #endif
00135 
00136 #endif                          /* AXIS2_HTTP_WORKER_H */

Generated on Thu Aug 31 17:32:36 2006 for Axis2/C by  doxygen 1.4.6