axis2_handler.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_HANDLER_H
00019 #define AXIS2_HANDLER_H
00020 
00040 #include <axis2_defines.h>
00041 #include <axis2_qname.h>
00042 #include <axis2_param.h>
00043 
00044 #ifdef __cplusplus
00045 extern "C"
00046 {
00047 #endif
00048 
00050     typedef struct axis2_handler axis2_handler_t;
00052     typedef struct axis2_handler_ops axis2_handler_ops_t;
00053 
00054     struct axis2_handler_desc;
00055     struct axis2_msg_ctx;
00056 
00057 
00062     struct axis2_handler_ops
00063     {
00070         axis2_status_t (AXIS2_CALL *
00071                 free)(
00072                     axis2_handler_t *handler,
00073                     const axis2_env_t *env);
00074 
00075 
00083         axis2_status_t (AXIS2_CALL *
00084                 init)(
00085                     axis2_handler_t *handler,
00086                     const axis2_env_t *env,
00087                     struct axis2_handler_desc *handler_desc);
00088 
00100         axis2_status_t (AXIS2_CALL *
00101                 invoke)(
00102                     axis2_handler_t *handler,
00103                     const axis2_env_t *env,
00104                     struct axis2_msg_ctx *msg_ctx);
00105 
00112         const axis2_qname_t *(AXIS2_CALL *
00113                 get_qname)(
00114                     const axis2_handler_t *handler,
00115                     const axis2_env_t *env);
00116 
00123         axis2_param_t *(AXIS2_CALL *
00124                 get_param)(
00125                     const axis2_handler_t *handler,
00126                     const axis2_env_t *env,
00127                     const axis2_char_t *name);
00128 
00135         struct axis2_handler_desc *(AXIS2_CALL *
00136                 get_handler_desc)(
00137                     const axis2_handler_t *handler,
00138                     const axis2_env_t *env);
00139         
00140     };
00141 
00145     struct axis2_handler
00146     {
00148         axis2_handler_ops_t *ops;
00149     };
00150 
00157     typedef axis2_handler_t *(AXIS2_CALL *
00158     AXIS2_HANDLER_CREATE_FUNC)(
00159         const axis2_env_t *env,
00160         const axis2_qname_t *qname);
00161 
00167     AXIS2_EXTERN axis2_handler_t *AXIS2_CALL
00168     axis2_handler_create(
00169         const axis2_env_t *env);
00170 
00178     AXIS2_EXTERN axis2_handler_t *AXIS2_CALL
00179     axis2_ctx_handler_create(
00180         const axis2_env_t *env, 
00181         const axis2_qname_t *qname);
00182 
00185 #define AXIS2_HANDLER_FREE(handler, env) \
00186        ((handler)->ops->free(handler, env))
00187 
00190 #define AXIS2_HANDLER_INIT(handler, env, handler_desc) \
00191        ((handler)->ops->init(handler, env, handler_desc))
00192 
00195 #define AXIS2_HANDLER_INVOKE(handler, env, msg_ctx) \
00196         ((handler)->ops->invoke(handler, env, msg_ctx))
00197 
00200 #define AXIS2_HANDLER_GET_QNAME(handler, env) \
00201         ((handler)->ops->get_qname(handler, env))
00202 
00205 #define AXIS2_HANDLER_GET_PARAM(handler, env, name) \
00206       ((handler)->ops->get_param(handler, env, name))
00207 
00210 #define AXIS2_HANDLER_GET_HANDLER_DESC(handler, env) \
00211       ((handler)->ops->get_handler_desc(handler, env))
00212 
00215 #ifdef __cplusplus
00216 }
00217 #endif
00218 
00219 #endif    /* AXIS2_HANDLER_H */

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