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_tr_dtype_t;
00044 
00045 
00046     /*Function interface for any transform*/
00047     typedef oxs_tr_dtype_t (AXIS2_CALL*
00048                             oxs_transform_tr_func)(const axutil_env_t *env,
00049                                                    void *input,
00050                                                    oxs_tr_dtype_t input_dtype,
00051                                                    void **output);
00052 
00053     typedef struct oxs_transform_t oxs_transform_t;
00054 
00055 
00056     /*Create function*/
00057     AXIS2_EXTERN oxs_transform_t *AXIS2_CALL
00058     oxs_transform_create(const axutil_env_t *env);
00059 
00060     /*Free*/
00061     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00062     oxs_transform_free(oxs_transform_t *ctx,
00063                        const axutil_env_t *env);
00064 
00065 
00066     /**********************Getter functions******************************************/
00067     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
00068     oxs_transform_get_id(
00069         const oxs_transform_t *transform,
00070         const axutil_env_t *env);
00071 
00072     AXIS2_EXTERN oxs_tr_dtype_t AXIS2_CALL
00073     oxs_transform_get_input_data_type(
00074         const oxs_transform_t *transform,
00075         const axutil_env_t *env);
00076 
00077     AXIS2_EXTERN oxs_tr_dtype_t AXIS2_CALL
00078     oxs_transform_get_output_data_type(
00079         const oxs_transform_t *transform,
00080         const axutil_env_t *env);
00081 
00082     AXIS2_EXTERN oxs_transform_tr_func AXIS2_CALL
00083     oxs_transform_get_transform_function(
00084         const oxs_transform_t *transform,
00085         const axutil_env_t *env);
00086 
00087     /**********************Setter functions******************************************/
00088     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00089     oxs_transform_set_id(
00090         oxs_transform_t *transform,
00091         const axutil_env_t *env,
00092         axis2_char_t *id);
00093 
00094     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00095     oxs_transform_set_input_data_type(
00096         oxs_transform_t *transform,
00097         const axutil_env_t *env,
00098         oxs_tr_dtype_t input_data_type);
00099 
00100     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00101     oxs_transform_set_output_data_type(
00102         oxs_transform_t *transform,
00103         const axutil_env_t *env,
00104         oxs_tr_dtype_t output_data_type);
00105 
00106     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00107     oxs_transform_set_transform_func(
00108         oxs_transform_t *transform,
00109         const axutil_env_t *env,
00110         oxs_transform_tr_func transform_func);
00111 
00113 #ifdef __cplusplus
00114 }
00115 #endif
00116 
00117 #endif                          /* OXS_TRANSFORM_H */

Generated on Thu Oct 4 17:37:07 2007 for Rampart/C by  doxygen 1.4.7