modify license, permission and remove ^M char
[platform/framework/native/uifw.git] / src / ui / FUi_DataBinding.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0/
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  * @file    FUi_DataBinding.h
19  * @brief   This is the header file for the _DataBinding class.
20  *
21  * This header file contains the declarations of the _DataBinding class.
22  */
23 #ifndef _FUI_INTERNAL_DATA_BINDING_H_
24 #define _FUI_INTERNAL_DATA_BINDING_H_
25
26 #include <FBaseString.h>
27 #include <FUiDataBindingTypes.h>
28 #include "FUi_ControlManager.h"
29
30 namespace Tizen { namespace Ui
31 {
32
33 class Variant;
34 class IDataBindingListener;
35 class IDataBindingDataValidator;
36 class IDataBindingDataTransformer;
37 class _Control;
38 class _IPropertyChangeEventListener;
39
40 class _DataBinding
41 {
42 public:
43 // Lifecycle
44         ~_DataBinding(void);
45         result Construct(const _Control& control, const Tizen::Base::String& bindingId, const Tizen::Base::String& propertyName
46                                         , Tizen::Base::Object& dataSource, DataBindingDataType sourceType, DataBindingFlow flow, DataBindingTrigger trigger
47                                         , const IDataBindingListener* pListener, const IDataBindingDataValidator* pValidator, const IDataBindingDataTransformer* pTransformer);
48
49 // Operations
50         result Update(DataBindingDestinationType destType);
51         result SetDataBindingListener(const IDataBindingListener* pListener);
52
53 // Accessor
54         _ControlHandle Get_ControlHandle(void) const;
55         Tizen::Base::String GetPropertyName(void) const;
56         DataBindingDataType GetSourceDataType(void) const;
57         DataBindingDataType GetTargetDataType(void) const;
58         DataBindingFlow GetDataFlow(void) const;
59         DataBindingTrigger GetTrigger(void) const;
60
61 // Lifecycle
62 private:
63         _DataBinding(void);
64         _DataBinding(const _DataBinding& rhs);
65         _DataBinding& operator =(const _DataBinding& rhs);
66
67 // Attributes
68 private:
69         _ControlHandle __controlHandle;
70         Tizen::Base::String __bindingId;
71         Tizen::Base::String __propertyName;
72         Tizen::Base::Object* __pDataSource;
73         DataBindingDataType __sourceType;
74         DataBindingDataType __targetType;
75         DataBindingFlow __flow;
76         DataBindingTrigger __trigger;
77         IDataBindingListener* __pListener;
78         IDataBindingDataValidator* __pValidator;
79         IDataBindingDataTransformer* __pTransformer;
80         _IPropertyChangeEventListener* __pPropertyChangeEventListener;
81
82 // Friend Class Declaration
83         friend class _DataBindingContext;
84 }; //class _DataBinding
85
86 }} //Tizen::Ui
87
88 #endif // _FUI_INTERNAL_DATA_BINDING_H_