00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef AXIS2_FLOW_H
00018 #define AXIS2_FLOW_H
00019
00025 #include <axis2_const.h>
00026 #include <axis2_error.h>
00027 #include <axis2_defines.h>
00028 #include <axis2_env.h>
00029 #include <axis2_allocator.h>
00030 #include <axis2_string.h>
00031 #include <axis2_array_list.h>
00032 #include <axis2_handler_desc.h>
00033
00034
00035 #ifdef __cplusplus
00036 extern "C"
00037 {
00038 #endif
00039
00040 typedef struct axis2_flow_ops axis2_flow_ops_t;
00041 typedef struct axis2_flow axis2_flow_t;
00042
00043
00053 struct axis2_flow_ops
00054 {
00058 axis2_status_t (AXIS2_CALL *
00059 free) (axis2_flow_t *flow,
00060 const axis2_env_t *env);
00061
00066 axis2_status_t (AXIS2_CALL *
00067 add_handler) (axis2_flow_t *flow,
00068 const axis2_env_t *env,
00069 axis2_handler_desc_t *handler);
00070
00076 axis2_handler_desc_t * (AXIS2_CALL *
00077 get_handler) (axis2_flow_t *flow,
00078 const axis2_env_t *env,
00079 int index);
00080
00085 int (AXIS2_CALL *
00086 get_handler_count) (axis2_flow_t *flow,
00087 const axis2_env_t *env);
00088 };
00089
00094 struct axis2_flow
00095 {
00096 axis2_flow_ops_t *ops;
00097 };
00098
00103 AXIS2_EXTERN axis2_flow_t * AXIS2_CALL
00104 axis2_flow_create (const axis2_env_t *env);
00105
00111 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00112 axis2_flow_free_void_arg (void *flow,
00113 const axis2_env_t *env);
00114
00115
00116
00117 #define AXIS2_FLOW_FREE(flow, env) ((flow)->ops->free (flow, env))
00118
00119 #define AXIS2_FLOW_ADD_HANDLER(flow, env, handler) \
00120 ((flow)->ops->add_handler (flow, env, handler))
00121
00122 #define AXIS2_FLOW_GET_HANDLER(flow, env, index) \
00123 ((flow)->ops->get_handler (flow, env, index))
00124
00125 #define AXIS2_FLOW_GET_HANDLER_COUNT(flow, env) \
00126 ((flow)->ops->get_handler_count (flow, env))
00127
00128
00129
00132 #ifdef __cplusplus
00133 }
00134 #endif
00135 #endif