[Tizen] Add DALi Autofill implementation
[platform/core/uifw/dali-adaptor.git] / dali / internal / input / ubuntu-x11 / autofill-group-impl-x.h
1 #ifndef DALI_INTERNAL_AUTOFILL_GROUP_IMPL_X_H
2 #define DALI_INTERNAL_AUTOFILL_GROUP_IMPL_X_H
3
4 /*
5  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/object/base-object.h>
23 #include <vector>
24
25 // INTERNAL INCLUDES
26 #include <dali/internal/input/common/autofill-group-impl.h>
27 #include <dali/internal/input/ubuntu-x11/autofill-item-impl-x.h>
28
29 namespace Dali
30 {
31
32 namespace Internal
33 {
34
35 namespace Adaptor
36 {
37
38
39 /**
40  * @brief This class is used to group AutofillItems.
41  */
42 class AutofillGroupX : public Dali::Internal::Adaptor::AutofillGroup
43 {
44
45 public:
46
47   /**
48    * @brief Constructor.
49    *
50    * @param[in] groupId A unique ID value of each AutofillGroup
51    * @return A public handle to the newly allocated AutofillGroup.
52    */
53   static Dali::AutofillGroup New( const std::string& groupId );
54
55   /**
56    * @brief Initialize AutofillGroup constructor.
57    */
58   void Initialize() override;
59
60   /**
61    * @copydoc Dali::AutofillGroup::GetId()
62    */
63   const std::string& GetId() const override;
64
65   /**
66    * @copydoc Dali::AutofillGroup::AddAutofillItem()
67    */
68   void AddAutofillItem( Dali::AutofillItem item ) override;
69
70   /**
71    * @copydoc Dali::AutofillGroup::GetAutofillItem()
72    */
73   Dali::AutofillItem GetAutofillItem( const std::string& id ) override;
74
75   /**
76    * @brief Clears all lists of AutofillItem added in AutofillGroup.
77    */
78   void ClearAutofillItemList() override;
79
80   /**
81    * @copydoc Dali::AutofillGroup::SaveAutofillData()
82    */
83   void SaveAutofillData() override;
84
85   /**
86    * @copydoc Dali::AutofillGroup::RequestAuthentication()
87    */
88   void RequestAuthentication() override;
89
90   /**
91    * @copydoc Dali::AutofillGroup::SendFillRequest()
92    */
93   void SendFillRequest() override;
94
95 private:
96   /**
97    * Constructor.
98    */
99   explicit AutofillGroupX( const std::string groupId );
100
101 protected:
102   /**
103    * Destructor.
104    */
105   ~AutofillGroupX();
106
107 private:
108   // Undefined copy constructor
109   explicit AutofillGroupX( const AutofillGroupX& autofillGroup ) = delete;
110
111   // Undefined assignment operator
112   AutofillGroupX& operator=( AutofillGroupX& autofillGroup ) = delete;
113
114 private:
115   std::vector<Dali::AutofillItem> mAutofillItemList; ///< The List to add AutofillItem
116   std::string mGroupId;  ///< The AutofillGroup ID
117
118 };
119
120
121 } // namespace Adaptor
122
123 } // namespace Internal
124
125 } // namespace Dali
126
127 #endif // DALI_INTERNAL_AUTOFILL_GROUP_IMPL_X_H