axis2_handler.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_HANDLER_H
00018 #define AXIS2_HANDLER_H
00019 
00039 #include <axis2_defines.h>
00040 #include <axis2_qname.h>
00041 #include <axis2_param.h>
00042 
00043 #ifdef __cplusplus
00044 extern "C"
00045 {
00046 #endif
00047 
00049     typedef struct axis2_handler axis2_handler_t;
00051     typedef struct axis2_handler_ops axis2_handler_ops_t;
00052 
00053     struct axis2_handler_desc;
00054     struct axis2_msg_ctx;
00055 
00056 
00061     struct axis2_handler_ops
00062     {
00069         axis2_status_t (AXIS2_CALL *
00070                 free)(
00071                     axis2_handler_t *handler,
00072                     const axis2_env_t *env);
00073 
00074 
00082         axis2_status_t (AXIS2_CALL *
00083                 init)(
00084                     axis2_handler_t *handler,
00085                     const axis2_env_t *env,
00086                     struct axis2_handler_desc *handler_desc);
00087 
00099         axis2_status_t (AXIS2_CALL *
00100                 invoke)(
00101                     axis2_handler_t *handler,
00102                     const axis2_env_t *env,
00103                     struct axis2_msg_ctx *msg_ctx);
00104 
00111         const axis2_qname_t *(AXIS2_CALL *
00112                 get_qname)(
00113                     const axis2_handler_t *handler,
00114                     const axis2_env_t *env);
00115 
00122         axis2_param_t *(AXIS2_CALL *
00123                 get_param)(
00124                     const axis2_handler_t *handler,
00125                     const axis2_env_t *env,
00126                     const axis2_char_t *name);
00127 
00134         struct axis2_handler_desc *(AXIS2_CALL *
00135                 get_handler_desc)(
00136                     const axis2_handler_t *handler,
00137                     const axis2_env_t *env);
00138         
00139     };
00140 
00144     struct axis2_handler
00145     {
00147         axis2_handler_ops_t *ops;
00148     };
00149 
00156     typedef axis2_handler_t *(AXIS2_CALL *
00157     AXIS2_HANDLER_CREATE_FUNC)(
00158         const axis2_env_t *env,
00159         const axis2_qname_t *qname);
00160 
00166     AXIS2_EXTERN axis2_handler_t *AXIS2_CALL
00167     axis2_handler_create(
00168         const axis2_env_t *env);
00169 
00177     AXIS2_EXTERN axis2_handler_t *AXIS2_CALL
00178     axis2_ctx_handler_create(
00179         const axis2_env_t *env, 
00180         const axis2_qname_t *qname);
00181 
00184 #define AXIS2_HANDLER_FREE(handler, env) \
00185        ((handler)->ops->free(handler, env))
00186 
00189 #define AXIS2_HANDLER_INIT(handler, env, handler_desc) \
00190        ((handler)->ops->init(handler, env, handler_desc))
00191 
00194 #define AXIS2_HANDLER_INVOKE(handler, env, msg_ctx) \
00195         ((handler)->ops->invoke(handler, env, msg_ctx))
00196 
00199 #define AXIS2_HANDLER_GET_QNAME(handler, env) \
00200         ((handler)->ops->get_qname(handler, env))
00201 
00204 #define AXIS2_HANDLER_GET_PARAM(handler, env, name) \
00205       ((handler)->ops->get_param(handler, env, name))
00206 
00209 #define AXIS2_HANDLER_GET_HANDLER_DESC(handler, env) \
00210       ((handler)->ops->get_handler_desc(handler, env))
00211 
00214 #ifdef __cplusplus
00215 }
00216 #endif
00217 
00218 #endif    /* AXIS2_HANDLER_H */

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