axis2_svr_callback.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_SVR_CALLBACK_H
00019 #define AXIS2_SVR_CALLBACK_H
00020 
00031 #ifdef __cplusplus
00032 extern "C"
00033 {
00034 #endif
00035 
00036 #include <axis2_defines.h>
00037 #include <axis2_const.h>
00038 #include <axis2_msg_ctx.h>
00039 
00041     typedef struct axis2_svr_callback_ops axis2_svr_callback_ops_t;
00043     typedef struct axis2_svr_callback axis2_svr_callback_t;
00044 
00049     struct axis2_svr_callback_ops
00050     {
00057         axis2_status_t (AXIS2_CALL *
00058                 free)(
00059                     axis2_svr_callback_t *svr_callback,
00060                     const axis2_env_t *env);
00061 
00069         axis2_status_t (AXIS2_CALL *
00070                 handle_result)(
00071                     axis2_svr_callback_t *svr_callback,
00072                     const axis2_env_t *env,
00073                     axis2_msg_ctx_t *msg_ctx);
00074 
00082         axis2_status_t (AXIS2_CALL *
00083                 handle_fault)(
00084                     axis2_svr_callback_t *svr_callback,
00085                     const axis2_env_t *env,
00086                     axis2_msg_ctx_t *msg_ctx);
00087     };
00088 
00092     struct axis2_svr_callback
00093     {
00095         axis2_svr_callback_ops_t *ops;
00096     };
00097 
00103     AXIS2_EXTERN axis2_svr_callback_t *AXIS2_CALL
00104     axis2_svr_callback_create(
00105         const axis2_env_t *env);
00106 
00107 /************************** Start of function macros **************************/
00108 
00111 #define AXIS2_SVR_CALLBACK_FREE(svr_callback, env) \
00112         ((svr_callback)->ops->free (svr_callback, env))
00113 
00116 #define AXIS2_SVR_CALLBACK_HANDLER_RESULT(svr_callback, env, msg_ctx) \
00117       ((svr_callback)->ops->handle_result (svr_callback, env, msg_ctx))
00118 
00121 #define AXIS2_SVR_CALLBACK_HANDLER_FAULT(svr_callback, env, msg_ctx) \
00122       ((svr_callback)->ops->handle_fault (svr_callback, env, msg_ctx))
00123 
00124 /************************** End of function macros ****************************/
00125 
00127 #ifdef __cplusplus
00128 }
00129 #endif
00130 
00131 #endif                          /* AXIS2_SVR_CALLBACK_H */

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