1 #ifndef DALI_AUTOFILL_GROUP_H
2 #define DALI_AUTOFILL_GROUP_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-handle.h>
25 #include <dali/public-api/dali-adaptor-common.h>
26 #include <dali/devel-api/adaptor-framework/autofill-item.h>
31 namespace Internal DALI_INTERNAL
41 * @brief The AutofillGroup class
43 * is used to group AutofillItems together.
45 class DALI_ADAPTOR_API AutofillGroup : public BaseHandle
50 * @brief Creates an uninitialized AutofillGroup.
52 * To create AutofillGroup instance, please refer to Dali::AutofillManager::CreateAutofillGroup().
57 * @brief AutofillGroup Destructor.
62 * @brief Copy constructor.
64 * @param[in] group AutofillGroup to copy. The copied player will point at the same implementation
66 AutofillGroup( const AutofillGroup& group );
69 * @brief Assignment operator.
71 * @param[in] group The AutofillGroup to assign from.
72 * @return The updated AutofillGroup.
74 AutofillGroup& operator=( const AutofillGroup& group );
77 * @brief Downcast a handle to AutofillGroup handle.
79 * If handle points to a AutofillGroup the downcast produces valid
80 * handle. If not the returned handle is left uninitialized.
82 * @param[in] handle Handle to an object
83 * @return Handle to a AutofillGroup or an uninitialized handle
85 static AutofillGroup DownCast( BaseHandle handle );
88 * @brief Equality operator.
90 * @param[in] rhs The AutofillGroup structure to test against
91 * @return True if AutofillGroups are equal
93 bool operator==( const AutofillGroup& rhs ) const
103 * @brief Gets AutofillGroup unique Id.
105 * @return AutofillGroup ID
107 const std::string& GetId() const;
110 * @brief Adds AutofillItem to AutofillGroup itself in order to group.
112 * @param[in] item AutofillItem instance to be included in AutofillGroup
114 void AddAutofillItem( Dali::AutofillItem item );
117 * @brief Gets AutofillItem instance according to the id.
119 * @param[in] id AutofillItem Id to get from AutofillGroup List
120 * @return AutofillItem instance to match for Id
122 Dali::AutofillItem GetAutofillItem( const std::string& id );
125 * @brief Stores Autofill data in autofill group.
127 void SaveAutofillData();
130 * @brief Requests and receives autofill authentication information.
132 void RequestAuthentication();
135 * @brief Sends fill request to fill out the data.
137 void SendFillRequest();
139 public: // Not intended for application developers
142 * @brief Internal constructor
144 explicit DALI_INTERNAL AutofillGroup( Internal::Adaptor::AutofillGroup* internal );
151 #endif // DALI_AUTOFILL_GROUP_H