00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef AXIS2_FLOW_H
00019 #define AXIS2_FLOW_H
00020
00033 #include <axis2_const.h>
00034 #include <axis2_error.h>
00035 #include <axis2_defines.h>
00036 #include <axis2_env.h>
00037 #include <axis2_allocator.h>
00038 #include <axis2_string.h>
00039 #include <axis2_array_list.h>
00040 #include <axis2_handler_desc.h>
00041
00042
00043 #ifdef __cplusplus
00044 extern "C"
00045 {
00046 #endif
00047
00049 typedef struct axis2_flow_ops axis2_flow_ops_t;
00051 typedef struct axis2_flow axis2_flow_t;
00052
00053
00058 struct axis2_flow_ops
00059 {
00066 axis2_status_t (AXIS2_CALL *
00067 free)(
00068 axis2_flow_t *flow,
00069 const axis2_env_t *env);
00070
00078 axis2_status_t (AXIS2_CALL *
00079 add_handler)(
00080 axis2_flow_t *flow,
00081 const axis2_env_t *env,
00082 axis2_handler_desc_t *handler);
00083
00091 axis2_handler_desc_t *(AXIS2_CALL *
00092 get_handler)(
00093 const axis2_flow_t *flow,
00094 const axis2_env_t *env,
00095 const int index);
00096
00103 int (AXIS2_CALL *
00104 get_handler_count)(
00105 const axis2_flow_t *flow,
00106 const axis2_env_t *env);
00107 };
00108
00112 struct axis2_flow
00113 {
00115 axis2_flow_ops_t *ops;
00116 };
00117
00123 AXIS2_EXTERN axis2_flow_t *AXIS2_CALL
00124 axis2_flow_create (
00125 const axis2_env_t *env);
00126
00134 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00135 axis2_flow_free_void_arg (
00136 void *flow,
00137 const axis2_env_t *env);
00138
00139
00142 #define AXIS2_FLOW_FREE(flow, env) ((flow)->ops->free (flow, env))
00143
00146 #define AXIS2_FLOW_ADD_HANDLER(flow, env, handler) \
00147 ((flow)->ops->add_handler (flow, env, handler))
00148
00151 #define AXIS2_FLOW_GET_HANDLER(flow, env, index) \
00152 ((flow)->ops->get_handler (flow, env, index))
00153
00156 #define AXIS2_FLOW_GET_HANDLER_COUNT(flow, env) \
00157 ((flow)->ops->get_handler_count (flow, env))
00158
00161 #ifdef __cplusplus
00162 }
00163 #endif
00164 #endif