oxs_transform.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 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     /*The input or output data type*/
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     /*Function interface for any transform*/
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     /*Create function*/
00058     AXIS2_EXTERN oxs_transform_t *AXIS2_CALL
00059     oxs_transform_create(const axutil_env_t *env);
00060 
00061     /*Free*/
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     /**********************Getter functions******************************************/
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     /**********************Setter functions******************************************/
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                          /* OXS_TRANSFORM_H */

Generated on Wed May 13 10:52:52 2009 for Rampart/C by  doxygen 1.5.5