phonebookengines/CntFindPlugin/src/CntFindPlugin.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 06 Jul 2010 14:05:47 +0300
changeset 47 7cbcb2896f0e
parent 25 76a2435edfd4
permissions -rw-r--r--
Revision: 201025 Kit: 2010127

/*
* 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 <FindUtil.h>

// ========================== 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