phonebookengines/CntFindPlugin/src/CntFindPlugin.cpp
changeset 0 e686773b3f54
child 24 0ba2181d7c28
child 62 5b6f26637ad3
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *     Contact model ECOM plugin for chinese find.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include "CntFindPlugin.h"
       
    22 #include <FindUtil.h>
       
    23 
       
    24 // ========================== MEMBER FUNCTIONS ===============================
       
    25 
       
    26 // ---------------------------------------------------------------------------
       
    27 // CAknFindUtilBase::NewL
       
    28 // ---------------------------------------------------------------------------
       
    29 //
       
    30 CAknFindUtilBase* CAknFindUtilBase::NewL()
       
    31 	{
       
    32 	CAknFindUtilBase* self=new(ELeave) CAknFindUtilBase;
       
    33     CleanupStack::PushL( self );
       
    34     self->OpenL();
       
    35     CleanupStack::Pop();
       
    36 	return self;
       
    37 	}
       
    38 
       
    39 // ---------------------------------------------------------------------------
       
    40 // CAknFindUtilBase::~CAknFindUtilBase
       
    41 // ---------------------------------------------------------------------------
       
    42 //
       
    43 CAknFindUtilBase::~CAknFindUtilBase()
       
    44 	{
       
    45 	delete iFindUtil;
       
    46 	}
       
    47 
       
    48 // ---------------------------------------------------------------------------
       
    49 // CAknFindUtilBase::CAknFindUtilBase
       
    50 // ---------------------------------------------------------------------------
       
    51 //
       
    52 CAknFindUtilBase::CAknFindUtilBase()
       
    53 	{
       
    54 	}
       
    55 
       
    56 // ---------------------------------------------------------------------------
       
    57 // CAknFindUtilBase::OpenL
       
    58 // ---------------------------------------------------------------------------
       
    59 //
       
    60 void CAknFindUtilBase::OpenL()
       
    61 	{
       
    62     if (!iFindUtil)
       
    63         {
       
    64         iFindUtil = CFindUtil::NewL();
       
    65         }
       
    66 	}
       
    67 
       
    68 // ---------------------------------------------------------------------------
       
    69 // CAknFindUtilBase::Close
       
    70 // ---------------------------------------------------------------------------
       
    71 //
       
    72 void CAknFindUtilBase::Close()
       
    73 	{
       
    74     delete iFindUtil;
       
    75     iFindUtil = NULL;
       
    76 	}
       
    77 
       
    78 // ---------------------------------------------------------------------------
       
    79 // CAknFindUtilBase::Match
       
    80 // ---------------------------------------------------------------------------
       
    81 //
       
    82 TBool CAknFindUtilBase::Match(const TDesC& aContactsField, const TDesC& aWord)
       
    83 	{
       
    84 	return iFindUtil->Interface()->Match(aContactsField, aWord);
       
    85 	}
       
    86 
       
    87 // ---------------------------------------------------------------------------
       
    88 // CAknFindUtilBase::IsWordValidForMatching
       
    89 // ---------------------------------------------------------------------------
       
    90 //
       
    91 TBool CAknFindUtilBase::IsWordValidForMatching(const TDesC& aWord)
       
    92 	{
       
    93     return iFindUtil->Interface()->IsWordValidForMatching(aWord);
       
    94 	}
       
    95 
       
    96 // ---------------------------------------------------------------------------
       
    97 // CAknFindUtilBase::MatchRefineL
       
    98 // ---------------------------------------------------------------------------
       
    99 //
       
   100 TBool CAknFindUtilBase::MatchRefineL
       
   101         (const TDesC& aItemString, const TDesC &aSearchText)
       
   102 	{
       
   103 	return iFindUtil->Interface()->MatchRefineL(aItemString, aSearchText);
       
   104 	}
       
   105 
       
   106 // End of File