2 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <dali/internal/input/ubuntu-x11/autofill-group-impl-x.h>
22 #include <dali/public-api/object/type-registry.h>
23 #include <dali/integration-api/debug.h>
37 #if defined(DEBUG_ENABLED)
38 Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_AUTOFILL");
44 return Dali::Internal::Adaptor::AutofillGroup::New( "" );
47 Dali::TypeRegistration type( typeid(Dali::AutofillGroup), typeid(Dali::BaseHandle), Create );
49 } // unnamed namespace
52 AutofillGroupX::AutofillGroupX( const std::string groupId )
53 : mAutofillItemList(),
58 AutofillGroupX::~AutofillGroupX()
62 Dali::AutofillGroup AutofillGroupX::New( const std::string& groupId )
64 Dali::Internal::Adaptor::AutofillGroup* group = new Dali::Internal::Adaptor::AutofillGroupX( groupId );
65 Dali::AutofillGroup handle = Dali::AutofillGroup( group );
72 void AutofillGroupX::Initialize()
76 const std::string& AutofillGroupX::GetId() const
78 DALI_LOG_INFO( gLogFilter, Debug::General, "AutofillGroupX::GetId \n" );
82 void AutofillGroupX::AddAutofillItem( Dali::AutofillItem item )
84 // Pushes back an AutofillItem to the ItemList of AutofillGroupX.
85 mAutofillItemList.push_back( item );
88 Dali::AutofillItem AutofillGroupX::GetAutofillItem( const std::string& id )
90 Dali::AutofillItem item = Dali::AutofillItem();
91 for( std::vector<Dali::AutofillItem>::iterator iter = mAutofillItemList.begin(), endIter = mAutofillItemList.end(); iter != endIter; ++iter )
93 const std::string& itemId = ( *iter ).GetId();
95 if( itemId.compare( id ) == 0 )
103 void AutofillGroupX::ClearAutofillItemList()
105 for( std::vector<Dali::AutofillItem>::iterator iter = mAutofillItemList.begin(), endIter = mAutofillItemList.end(); iter != endIter; ++iter )
107 ( *iter ).ClearPresentationTextList();
108 ( *iter ).ClearFillValueList();
112 void AutofillGroupX::SaveAutofillData()
114 DALI_LOG_INFO( gLogFilter, Debug::General, "AutofillGroupX::SaveAutofillData\n" );
118 void AutofillGroupX::RequestAuthentication()
120 DALI_LOG_INFO( gLogFilter, Debug::General, "AutofillGroupX::RequestAuthentication\n" );
124 void AutofillGroupX::SendFillRequest()
126 DALI_LOG_INFO( gLogFilter, Debug::General, "AutofillGroupX::SendFillRequest\n" );