[Tizen] Add DALi Autofill implementation
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / autofill-item.cpp
1 /*
2  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali/devel-api/adaptor-framework/autofill-item.h>
20
21 // INTERNAL INCLUDES
22 #include <dali/internal/input/common/autofill-item-impl.h>
23
24 namespace Dali
25 {
26
27 AutofillItem::AutofillItem()
28 {
29 }
30
31 AutofillItem::AutofillItem( Internal::Adaptor::AutofillItem* internal )
32 : BaseHandle( internal )
33 {
34 }
35
36 AutofillItem::~AutofillItem()
37 {
38 }
39
40 AutofillItem::AutofillItem( const AutofillItem& item )
41 : BaseHandle( item )
42 {
43 }
44
45 AutofillItem& AutofillItem::operator=( const AutofillItem& item )
46 {
47   if( *this != item )
48   {
49     BaseHandle::operator=( item );
50   }
51   return *this;
52 }
53
54 AutofillItem AutofillItem::DownCast( BaseHandle handle )
55 {
56   return AutofillItem( dynamic_cast< Internal::Adaptor::AutofillItem* >( handle.GetObjectPtr() ) );
57 }
58
59
60 const std::string& AutofillItem::GetId() const
61 {
62   return Internal::Adaptor::GetImplementation(*this).GetId();
63 }
64
65 const std::string& AutofillItem::GetLabel() const
66 {
67   return Internal::Adaptor::GetImplementation(*this).GetLabel();
68 }
69
70 Dali::AutofillItem::Hint AutofillItem::GetHint() const
71 {
72   return Internal::Adaptor::GetImplementation(*this).GetHint();
73 }
74
75 bool AutofillItem::IsSensitiveData() const
76 {
77   return Internal::Adaptor::GetImplementation(*this).IsSensitiveData();
78 }
79
80 void AutofillItem::SetSaveValue( const std::string& value )
81 {
82   Internal::Adaptor::GetImplementation(*this).SetSaveValue( value );
83 }
84
85 const std::string& AutofillItem::GetSaveValue() const
86 {
87   return Internal::Adaptor::GetImplementation(*this).GetSaveValue();
88 }
89
90 const std::string& AutofillItem::GetPresentationText( int index ) const
91 {
92   return Internal::Adaptor::GetImplementation(*this).GetPresentationText( index );
93 }
94
95 const std::string& AutofillItem::GetFillValue( int index ) const
96 {
97   return Internal::Adaptor::GetImplementation(*this).GetFillValue( index );
98 }
99
100 void AutofillItem::ClearPresentationTextList()
101 {
102   Internal::Adaptor::GetImplementation(*this).ClearPresentationTextList();
103 }
104
105 void AutofillItem::ClearFillValueList()
106 {
107   Internal::Adaptor::GetImplementation(*this).ClearFillValueList();
108 }
109
110 unsigned int AutofillItem::GetFillValueCount()
111 {
112   return Internal::Adaptor::GetImplementation(*this).GetFillValueCount();
113 }
114
115 } // namespace Dali