diff -r 7cbcb2896f0e -r 74b30151afd6 phonebookengines/cntfindplugin/src/cntfindplugin.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phonebookengines/cntfindplugin/src/cntfindplugin.cpp Wed Jul 21 11:09:07 2010 +0300 @@ -0,0 +1,106 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Contact model ECOM plugin for chinese find. +* +*/ + + +// INCLUDE FILES +#include "cntfindplugin.h" +#include + +// ========================== MEMBER FUNCTIONS =============================== + +// --------------------------------------------------------------------------- +// CAknFindUtilBase::NewL +// --------------------------------------------------------------------------- +// +CAknFindUtilBase* CAknFindUtilBase::NewL() + { + CAknFindUtilBase* self=new(ELeave) CAknFindUtilBase; + CleanupStack::PushL( self ); + self->OpenL(); + CleanupStack::Pop(); + return self; + } + +// --------------------------------------------------------------------------- +// CAknFindUtilBase::~CAknFindUtilBase +// --------------------------------------------------------------------------- +// +CAknFindUtilBase::~CAknFindUtilBase() + { + delete iFindUtil; + } + +// --------------------------------------------------------------------------- +// CAknFindUtilBase::CAknFindUtilBase +// --------------------------------------------------------------------------- +// +CAknFindUtilBase::CAknFindUtilBase() + { + } + +// --------------------------------------------------------------------------- +// CAknFindUtilBase::OpenL +// --------------------------------------------------------------------------- +// +void CAknFindUtilBase::OpenL() + { + if (!iFindUtil) + { + iFindUtil = CFindUtil::NewL(); + } + } + +// --------------------------------------------------------------------------- +// CAknFindUtilBase::Close +// --------------------------------------------------------------------------- +// +void CAknFindUtilBase::Close() + { + delete iFindUtil; + iFindUtil = NULL; + } + +// --------------------------------------------------------------------------- +// CAknFindUtilBase::Match +// --------------------------------------------------------------------------- +// +TBool CAknFindUtilBase::Match(const TDesC& aContactsField, const TDesC& aWord) + { + return iFindUtil->Interface()->Match(aContactsField, aWord); + } + +// --------------------------------------------------------------------------- +// CAknFindUtilBase::IsWordValidForMatching +// --------------------------------------------------------------------------- +// +TBool CAknFindUtilBase::IsWordValidForMatching(const TDesC& aWord) + { + return iFindUtil->Interface()->IsWordValidForMatching(aWord); + } + +// --------------------------------------------------------------------------- +// CAknFindUtilBase::MatchRefineL +// --------------------------------------------------------------------------- +// +TBool CAknFindUtilBase::MatchRefineL + (const TDesC& aItemString, const TDesC &aSearchText) + { + return iFindUtil->Interface()->MatchRefineL(aItemString, aSearchText); + } + +// End of File