00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 #ifndef OXS_TRANSFORM_H
00019 #define OXS_TRANSFORM_H
00020 
00021 
00028 #include <axis2_defines.h>
00029 #include <axutil_env.h>
00030 #include <axiom_node.h>
00031 
00032 #ifdef __cplusplus
00033 extern "C"
00034 {
00035 #endif
00036 
00037 
00038     
00039     typedef enum  {
00040         OXS_TRANSFORM_TYPE_UNKNOWN = 0,
00041         OXS_TRANSFORM_TYPE_CHAR,
00042         OXS_TRANSFORM_TYPE_NODE,
00043         OXS_TRANSFORM_TYPE_NODE_ARRAY_LIST        
00044     } oxs_tr_dtype_t;
00045 
00046 
00047     
00048     typedef oxs_tr_dtype_t (AXIS2_CALL*
00049                             oxs_transform_tr_func)(const axutil_env_t *env,
00050                                                    void *input,
00051                                                    oxs_tr_dtype_t input_dtype,
00052                                                    void **output);
00053 
00054     typedef struct oxs_transform_t oxs_transform_t;
00055 
00056 
00057     
00058     AXIS2_EXTERN oxs_transform_t *AXIS2_CALL
00059     oxs_transform_create(const axutil_env_t *env);
00060 
00061     
00062     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00063     oxs_transform_free(oxs_transform_t *ctx,
00064                        const axutil_env_t *env);
00065 
00066 
00067     
00068     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
00069     oxs_transform_get_id(
00070         const oxs_transform_t *transform,
00071         const axutil_env_t *env);
00072 
00073     AXIS2_EXTERN oxs_tr_dtype_t AXIS2_CALL
00074     oxs_transform_get_input_data_type(
00075         const oxs_transform_t *transform,
00076         const axutil_env_t *env);
00077 
00078     AXIS2_EXTERN oxs_tr_dtype_t AXIS2_CALL
00079     oxs_transform_get_output_data_type(
00080         const oxs_transform_t *transform,
00081         const axutil_env_t *env);
00082 
00083     AXIS2_EXTERN oxs_transform_tr_func AXIS2_CALL
00084     oxs_transform_get_transform_function(
00085         const oxs_transform_t *transform,
00086         const axutil_env_t *env);
00087 
00088     
00089     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00090     oxs_transform_set_id(
00091         oxs_transform_t *transform,
00092         const axutil_env_t *env,
00093         axis2_char_t *id);
00094 
00095     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00096     oxs_transform_set_input_data_type(
00097         oxs_transform_t *transform,
00098         const axutil_env_t *env,
00099         oxs_tr_dtype_t input_data_type);
00100 
00101     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00102     oxs_transform_set_output_data_type(
00103         oxs_transform_t *transform,
00104         const axutil_env_t *env,
00105         oxs_tr_dtype_t output_data_type);
00106 
00107     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00108     oxs_transform_set_transform_func(
00109         oxs_transform_t *transform,
00110         const axutil_env_t *env,
00111         oxs_transform_tr_func transform_func);
00112 
00114 #ifdef __cplusplus
00115 }
00116 #endif
00117 
00118 #endif