[Tizen] Add DALi Autofill implementation
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / autofill-manager.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-manager.h>
20
21 // INTERNAL INCLUDES
22 #include <dali/internal/input/common/autofill-manager-impl.h>
23
24 namespace Dali
25 {
26
27 AutofillManager::AutofillManager()
28 {
29 }
30
31 AutofillManager::~AutofillManager()
32 {
33 }
34
35 AutofillManager AutofillManager::Get()
36 {
37   return Internal::Adaptor::AutofillManager::Get();
38 }
39
40 AutofillManager::AutofillManager(Internal::Adaptor::AutofillManager *impl)
41 : BaseHandle(impl)
42 {
43 }
44
45 /////////////////////////////////////////////// Autofill Item and Group ///////////////////////////////////////////////
46
47 Dali::AutofillItem AutofillManager::CreateAutofillItem( const std::string& id, const std::string& label, Dali::AutofillItem::Hint hint, bool isSensitive )
48 {
49   return Internal::Adaptor::GetImplementation(*this).CreateAutofillItem( id, label, hint, isSensitive );
50 }
51
52 Dali::AutofillGroup AutofillManager::CreateAutofillGroup( const std::string& groupId )
53 {
54   return Internal::Adaptor::GetImplementation(*this).CreateAutofillGroup( groupId );
55 }
56
57
58 /////////////////////////////////////////////// Autofill Authentication Information ///////////////////////////////////////////////
59
60 bool AutofillManager::IsAutofillDataPresent() const
61 {
62   return Internal::Adaptor::GetImplementation(*this).IsAutofillDataPresent();
63 }
64
65 bool AutofillManager::IsAuthenticationNeeded() const
66 {
67   return Internal::Adaptor::GetImplementation(*this).IsAuthenticationNeeded();
68 }
69
70 const std::string& AutofillManager::GetAuthenticationServiceName() const
71 {
72   return Internal::Adaptor::GetImplementation(*this).GetAuthenticationServiceName();
73 }
74
75 const std::string& AutofillManager::GetAuthenticationServiceMessage() const
76 {
77   return Internal::Adaptor::GetImplementation(*this).GetAuthenticationServiceMessage();
78 }
79
80 const std::string& AutofillManager::GetAuthenticationServiceImagePath() const
81 {
82   return Internal::Adaptor::GetImplementation(*this).GetAuthenticationServiceImagePath();
83 }
84
85 /////////////////////////////////////////////// Autofill Fill Response ///////////////////////////////////////////////
86
87 const std::string& AutofillManager::GetFillItemId() const
88 {
89   return Internal::Adaptor::GetImplementation(*this).GetFillItemId();
90 }
91
92 const std::string& AutofillManager::GetFillItemPresentationText() const
93 {
94   return Internal::Adaptor::GetImplementation(*this).GetFillItemPresentationText();
95 }
96
97 const std::string& AutofillManager::GetFillItemValue() const
98 {
99   return Internal::Adaptor::GetImplementation(*this).GetFillItemValue();
100 }
101
102 void AutofillManager::SaveAutofillData( Dali::AutofillGroup group )
103 {
104   Internal::Adaptor::GetImplementation(*this).SaveAutofillData( group );
105 }
106
107
108 // Signals
109
110 AutofillManager::AuthSignalType& AutofillManager::AuthenticationReceivedSignal()
111 {
112   return Internal::Adaptor::GetImplementation(*this).AuthenticationReceivedSignal();
113 }
114
115 AutofillManager::FillSignalType& AutofillManager::FillResponseReceivedSignal()
116 {
117   return Internal::Adaptor::GetImplementation(*this).FillResponseReceivedSignal();
118 }
119
120 AutofillManager::ListSignalType& AutofillManager::ListEventSignal()
121 {
122   return Internal::Adaptor::GetImplementation(*this).ListEventSignal();
123 }
124
125
126 } // namespace Dali