Merge "Fix Ime Rotation" into tizen_2.1
[platform/framework/native/uifw.git] / inc / FUiIDataBindingDataTransformer.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file        FUiIDataBindingDataTransformer.h
20  * @brief       This is the header file for the %IDataBindingDataTransformer interface.
21  *
22  * This header file contains the declarations of the %IDataBindingDataTransformer interface.
23  */
24
25 #ifndef _FUI_IDATA_BINDING_DATA_TRANSFORMER_H_
26 #define _FUI_IDATA_BINDING_DATA_TRANSFORMER_H_
27
28 #include <FUiDataBindingTypes.h>
29
30 namespace Tizen { namespace Base
31 {
32 class String;
33 class Object;
34 }}
35
36 namespace Tizen { namespace Ui
37 {
38
39 /**
40 * @interface    IDataBindingDataTransformer
41 * @brief                This interface defines methods for transforming the value of the data that will be updated to the binding target or source.
42 *
43 * @since 2.0
44 *
45 * The %IDataBindingDataTransformer interface defines methods for transforming the value of source type to the value of destination type.
46 */
47 class _OSP_EXPORT_ IDataBindingDataTransformer
48 {
49 public:
50         /**
51          * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
52          *
53          * @since 2.0
54          */
55         virtual ~IDataBindingDataTransformer(void) {};
56
57         /**
58         * Transforms the value of the data of source type to value of target type.
59         * @since 2.0
60         * @return        @c true if it is successful to convert source to target @n
61         *                 else @c false
62         * @param[in]    bindingId    The specified binding ID
63         * @param[in]    sourceType        The source data type
64         * @param[in]    sourceData       The data source
65         * @param[in]    targetType    The target data type
66         * @param[out]   targetData    The data target
67         */
68         virtual bool TransformSourceToTarget(const Tizen::Base::String& bindingId, DataBindingDataType sourceType, const Tizen::Base::Object& sourceData, DataBindingDataType targetType, Tizen::Base::Object& targetData) = 0;
69
70         /**
71         * Transforms the value of the data of target type to value of source type.
72         * @since 2.0
73         * @return        @c true if it is successful to convert target to source @n
74         *                 else @c false
75         * @param[in]    bindingId    The specified binding ID
76         * @param[in]    targetType    The target data type
77         * @param[in]    targetData    The data target
78         * @param[in]    sourceType        The source data type
79         * @param[out]   sourceData       The data source
80         */
81         virtual bool TransformTargetToSource(const Tizen::Base::String& bindingId, DataBindingDataType targetType, const Tizen::Base::Object& targetData, DataBindingDataType sourceType, Tizen::Base::Object& sourceData) = 0;
82
83         /**
84         * Checks whether the this transformer can convert the source type to target type.
85         *
86         * @since 2.0
87         * @return        @c true if it is possible to transform source type to target type, @n
88         *                 else @c false
89         * @param[in]    bindingId    The specified binding ID
90         * @param[in]    sourceType        The source data type
91         * @param[in]    targetType    The target data type
92         */
93         virtual bool IsSourceToTargetTransformable(const Tizen::Base::String& bindingId, DataBindingDataType sourceType, DataBindingDataType targetType) = 0;
94
95         /**
96         * Checks whether the this transformer can convert the target type to source type.
97         *
98         * @since 2.0
99         * @return        @c true if it is possible to transform target type to source type, @n
100         *                 else @c false
101         * @param[in]    bindingId    The specified binding ID
102         * @param[in]    targetType    The target data type
103         * @param[in]    sourceType        The source data type
104         */
105         virtual bool IsTargetToSourceTransformable(const Tizen::Base::String& bindingId, DataBindingDataType targetType, DataBindingDataType sourceType) = 0;
106
107 protected:
108         //
109         // This method is for internal use only. Using this method can cause behavioral, security-related,
110         // and consistency-related issues in the application.
111         //
112         // This method is reserved and may change its name at any time without
113         // prior notice.
114         //
115         virtual void IDataBingingDataTransformer_Reserved1(void) {}
116
117         //
118         // This method is for internal use only. Using this method can cause behavioral, security-related,
119         // and consistency-related issues in the application.
120         //
121         // This method is reserved and may change its name at any time without
122         // prior notice.
123         //
124         virtual void IDataBingingDataTransformer_Reserved2(void) {}
125
126         //
127         // This method is for internal use only. Using this method can cause behavioral, security-related,
128         // and consistency-related issues in the application.
129         //
130         // This method is reserved and may change its name at any time without
131         // prior notice.
132         //
133         virtual void IDataBingingDataTransformer_Reserved3(void) {}
134
135 }; // IDataBindingDataTransformer
136
137 }} // Tizen::Ui
138 #endif // _FUI_IDATA_BINDING_DATA_TRANSFORMER_H_