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

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 
00025 #include <axis2_defines.h>
00026 #include <axis2_qname.h>
00027 #include <axis2_param.h>
00028 
00029 #ifdef __cplusplus
00030 extern "C"
00031 {
00032 #endif
00033 
00034     struct axis2_handler;
00035     struct axis2_handler_ops;
00036     struct axis2_handler_desc;
00037     struct axis2_msg_ctx;
00038 
00039 
00049  AXIS2_DECLARE_DATA   typedef struct axis2_handler_ops
00050     {
00057         axis2_status_t (AXIS2_CALL *
00058       free) (struct axis2_handler * handler, 
00059                const axis2_env_t *env);
00060          
00061 
00067         axis2_status_t (AXIS2_CALL *
00068       init) (struct axis2_handler * handler, 
00069                const axis2_env_t *env, 
00070                struct axis2_handler_desc *handler_desc);
00071 
00081         axis2_status_t (AXIS2_CALL *
00082       invoke) (struct axis2_handler * handler,
00083              const axis2_env_t *env,
00084              struct axis2_msg_ctx *msg_ctx);
00085 
00091         axis2_qname_t* (AXIS2_CALL *
00092       get_name) (struct axis2_handler * handler, 
00093                    const axis2_env_t *env);
00094 
00101          axis2_param_t* (AXIS2_CALL *
00102       get_param) (struct axis2_handler * handler, 
00103                     const axis2_env_t *env, 
00104                     axis2_char_t *name);
00105 
00112         struct axis2_handler_desc* (AXIS2_CALL *
00113       get_handler_desc) (struct axis2_handler * handler, 
00114                            const axis2_env_t *env);
00118         /*void* (AXIS2_CALL *get_derived)(struct axis2_handler * handler, 
00119                                                           const axis2_env_t *env);
00120         */
00124         /*axis2_status_t (AXIS2_CALL *set_derived)(struct axis2_handler * handler, 
00125                                                           const axis2_env_t *env, void* derived);
00126         */
00127     } axis2_handler_ops_t;
00128    
00132     typedef struct axis2_handler
00133     {
00135         axis2_handler_ops_t *ops;
00136     } axis2_handler_t;
00137 
00138     typedef axis2_handler_t *(AXIS2_CALL * 
00139     AXIS2_HANDLER_CREATE_FUNC) (const axis2_env_t *env, 
00140                                 axis2_qname_t *qname);
00141     
00145 AXIS2_EXTERN axis2_handler_t* AXIS2_CALL 
00146 axis2_handler_create(const axis2_env_t *env);
00147 
00148 AXIS2_EXTERN axis2_handler_t* AXIS2_CALL 
00149 axis2_ctx_handler_create(const axis2_env_t *env, axis2_qname_t *qname);
00150     
00151 #define AXIS2_HANDLER_FREE(handler, env) \
00152        ((handler)->ops->free(handler, env))
00153    
00154    
00155 #define AXIS2_HANDLER_INIT(handler, env, handler_desc) \
00156        ((handler)->ops->init(handler, env, handler_desc))
00157    
00158 #define AXIS2_HANDLER_INVOKE(handler, env, msg_ctx) \
00159         ((handler)->ops->invoke(handler, env, msg_ctx))
00160       
00161 #define AXIS2_HANDLER_SET_INVOKE(handler, env, invoke) \
00162         ((handler)->ops->set_invoke(handler, env, invoke))
00163       
00164 #define AXIS2_HANDLER_GET_NAME(handler, env) \
00165         ((handler)->ops->get_name(handler, env))
00166       
00167 #define AXIS2_HANDLER_GET_PARAM(handler, env, name) \
00168       ((handler)->ops->get_param(handler, env, name))
00169       
00170 #define AXIS2_HANDLER_GET_HANDLER_DESC(handler, env) \
00171       ((handler)->ops->get_handler_desc(handler, env))
00172       
00173 /*#define AXIS2_HANDLER_GET_DERIVED(handler, env) ((handler)->ops->get_derived(handler, env))
00174 #define AXIS2_HANDLER_SET_DERIVED(handler, env, derived) ((handler)->ops->set_derived(handler, env, derived))
00175     */
00178 #ifdef __cplusplus
00179 }
00180 #endif
00181 
00182 #endif    /* AXIS2_HANDLER_H */

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