axis2_svr_callback.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_SVR_CALLBACK_H
00018 #define AXIS2_SVR_CALLBACK_H
00019 
00030 #ifdef __cplusplus
00031 extern "C"
00032 {
00033 #endif
00034 
00035 #include <axis2_defines.h>
00036 #include <axis2_const.h>
00037 #include <axis2_msg_ctx.h>
00038 
00040     typedef struct axis2_svr_callback_ops axis2_svr_callback_ops_t;
00042     typedef struct axis2_svr_callback axis2_svr_callback_t;
00043 
00048     struct axis2_svr_callback_ops
00049     {
00056         axis2_status_t (AXIS2_CALL *
00057                 free)(
00058                     axis2_svr_callback_t *svr_callback,
00059                     const axis2_env_t *env);
00060 
00068         axis2_status_t (AXIS2_CALL *
00069                 handle_result)(
00070                     axis2_svr_callback_t *svr_callback,
00071                     const axis2_env_t *env,
00072                     axis2_msg_ctx_t *msg_ctx);
00073 
00081         axis2_status_t (AXIS2_CALL *
00082                 handle_fault)(
00083                     axis2_svr_callback_t *svr_callback,
00084                     const axis2_env_t *env,
00085                     axis2_msg_ctx_t *msg_ctx);
00086     };
00087 
00091     struct axis2_svr_callback
00092     {
00094         axis2_svr_callback_ops_t *ops;
00095     };
00096 
00102     AXIS2_EXTERN axis2_svr_callback_t *AXIS2_CALL
00103     axis2_svr_callback_create(
00104         const axis2_env_t *env);
00105 
00106 /************************** Start of function macros **************************/
00107 
00110 #define AXIS2_SVR_CALLBACK_FREE(svr_callback, env) \
00111         ((svr_callback)->ops->free (svr_callback, env))
00112 
00115 #define AXIS2_SVR_CALLBACK_HANDLER_RESULT(svr_callback, env, msg_ctx) \
00116       ((svr_callback)->ops->handle_result (svr_callback, env, msg_ctx))
00117 
00120 #define AXIS2_SVR_CALLBACK_HANDLER_FAULT(svr_callback, env, msg_ctx) \
00121       ((svr_callback)->ops->handle_fault (svr_callback, env, msg_ctx))
00122 
00123 /************************** End of function macros ****************************/
00124 
00126 #ifdef __cplusplus
00127 }
00128 #endif
00129 
00130 #endif                          /* AXIS2_SVR_CALLBACK_H */

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