1 #ifndef DALI_INTERNAL_AUTOFILL_GROUP_IMPL_H
2 #define DALI_INTERNAL_AUTOFILL_GROUP_IMPL_H
5 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/object/base-object.h>
25 #include <dali/devel-api/adaptor-framework/autofill-group.h>
37 * @brief This class is used to group AutofillItems.
39 class AutofillGroup : public Dali::BaseObject
47 * @param[in] groupId A unique ID value of each AutofillGroup
48 * @return A public handle to the newly allocated AutofillGroup.
50 static Dali::AutofillGroup New( const std::string& groupId );
53 * @brief Initialize AutofillGroup constructor.
55 virtual void Initialize() = 0;
58 * @copydoc Dali::AutofillGroup::GetId()
60 virtual const std::string& GetId() const = 0;
63 * @copydoc Dali::AutofillGroup::AddAutofillItem()
65 virtual void AddAutofillItem( Dali::AutofillItem item ) = 0;
68 * @copydoc Dali::AutofillGroup::GetAutofillItem()
70 virtual Dali::AutofillItem GetAutofillItem( const std::string& id ) = 0;
73 * @brief Clears all lists of AutofillItem added in AutofillGroup.
75 virtual void ClearAutofillItemList() = 0;
78 * @copydoc Dali::AutofillGroup::SaveAutofillData()
80 virtual void SaveAutofillData() = 0;
83 * @copydoc Dali::AutofillGroup::RequestAuthentication()
85 virtual void RequestAuthentication() = 0;
88 * @copydoc Dali::AutofillGroup::SendFillRequest()
90 virtual void SendFillRequest() = 0;
96 AutofillGroup() = default;
102 ~AutofillGroup() = default;
105 // Undefined copy constructor
106 AutofillGroup( const AutofillGroup& autofillGroup ) = delete;
108 // Undefined assignment operator
109 AutofillGroup& operator=( AutofillGroup& autofillGroup ) = delete;
113 inline static Internal::Adaptor::AutofillGroup& GetImplementation(Dali::AutofillGroup& autofillGroup)
115 DALI_ASSERT_ALWAYS( autofillGroup && "AutofillGroup handle is empty" );
117 BaseObject& handle = autofillGroup.GetBaseObject();
119 return static_cast<Internal::Adaptor::AutofillGroup&>(handle);
122 inline static const Internal::Adaptor::AutofillGroup& GetImplementation(const Dali::AutofillGroup& autofillGroup)
124 DALI_ASSERT_ALWAYS( autofillGroup && "AutofillGroup handle is empty" );
126 const BaseObject& handle = autofillGroup.GetBaseObject();
128 return static_cast<const Internal::Adaptor::AutofillGroup&>(handle);
131 } // namespace Adaptor
133 } // namespace Internal
137 #endif // DALI_INTERNAL_AUTOFILL_GROUP_IMPL_H