contacts_plat/virtual_phonebook_engine_api/inc/MVPbkContactSelector.h
branchRCL_3
changeset 63 f4a778e096c2
child 64 c1e8ba0c2b16
equal deleted inserted replaced
62:5b6f26637ad3 63:f4a778e096c2
       
     1 /*
       
     2 * Copyright (c) 2002-2007 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:  Virtual Phonebook contact selector interface for a 
       
    15 *                filtered view, CVPbkFilteredContactView .
       
    16 *
       
    17 */
       
    18 
       
    19  
       
    20 #ifndef MVPBKCONTACTSELECTOR_H
       
    21 #define MVPBKCONTACTSELECTOR_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32cmn.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class MVPbkBaseContact;
       
    28 
       
    29 // CLASS DECLARATIONS
       
    30 
       
    31 /**
       
    32  * Virtual Phonebook contact selector interface.
       
    33  * This inteface is used to create a contact selector object,
       
    34  */
       
    35 class MVPbkContactSelector
       
    36     {
       
    37     public: // Interface
       
    38         /**
       
    39          * Returns true if aContact belongs to the set defined
       
    40          * by this contact selector.
       
    41          *
       
    42          * @param aContact  The contact to check.
       
    43          * @return  ETrue if contact is included.
       
    44          */
       
    45         virtual TBool IsContactIncluded(
       
    46                 const MVPbkBaseContact& aContact ) = 0;
       
    47     
       
    48         /**
       
    49          * Returns an extension point for this interface or NULL.
       
    50          * @param aExtensionUid Uid of extension.
       
    51          * @return Extension point or NULL.
       
    52          */
       
    53         virtual TAny* ContactSelectorExtension(
       
    54                 TUid /*aExtensionUid*/) { return NULL; }
       
    55 
       
    56     protected:
       
    57         virtual ~MVPbkContactSelector() { }
       
    58 
       
    59     };
       
    60 
       
    61 // Use this UID to access MVPbkOptimizedSelector extension of the MVPbkContactSelector.
       
    62 // Used as a parameter to ContactSelectorExtension() method.
       
    63 const TUid KVPbkOptimizedSelectorExtensionUid = { 2 };
       
    64 
       
    65 /**
       
    66  * This class is an extension to MVPbkContactSelector.
       
    67  * See documentation of MVPbkContactSelector from header MVPbkContactSelector.h
       
    68  *
       
    69  * @see MVPbkContactSelector
       
    70  *
       
    71  */
       
    72 class MVPbkOptimizedSelector
       
    73     {
       
    74     protected:  // Destructor
       
    75         virtual ~MVPbkOptimizedSelector() { }
       
    76 
       
    77     public:
       
    78 
       
    79         /**
       
    80          * Vpbk stop calling MVPbkContactSelector::IsContactIncluded if this function returns false.
       
    81          * With this function client can optimize selector use in VPbk.
       
    82          */
       
    83          virtual TBool Continue() const = 0;
       
    84 
       
    85     };
       
    86 
       
    87 	
       
    88 #endif  // MVPBKCONTACTSELECTOR_H
       
    89 
       
    90 //End of file