contacts_plat/virtual_phonebook_policy_api/inc/phonebook/MVPbkContactDuplicatePolicy.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2006-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:  An interface for duplicate contact find policy
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MVPBKCONTACTDUPLICATEPOLICY_H
       
    20 #define MVPBKCONTACTDUPLICATEPOLICY_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32cmn.h>
       
    24 #include <e32def.h>
       
    25 
       
    26 class MVPbkContactOperationBase;
       
    27 class MVPbkBaseContact;
       
    28 class MVPbkContactStore;
       
    29 class MVPbkStoreContact;
       
    30 class MVPbkContactFindObserver;
       
    31 
       
    32 /**
       
    33  * Virtual Phonebook interface for duplicate contact find policy.
       
    34  */
       
    35 class MVPbkContactDuplicatePolicy
       
    36     {
       
    37     public:
       
    38         /**
       
    39          * Destructor
       
    40          */
       
    41         virtual ~MVPbkContactDuplicatePolicy() {};
       
    42 
       
    43         /**
       
    44          * Starts asynchronous duplicate find.
       
    45          *
       
    46          * @param aContact      The contact whose duplicates are searched for.
       
    47          * @param aTargetStore  The target store for duplicate find.
       
    48          * @param aDuplicates   An array that contains the duplicate contacts
       
    49          *                      after operation is ready.
       
    50          * @param aObserver     The observer that is called after find is done.
       
    51          * @param aMaxDuplicatesToFind The limit of the contacts that are in 
       
    52          *                             a worst case returned as a result. 
       
    53          *                             Usually 1 is enough.
       
    54          * @return An operation instance that client owns.
       
    55          */
       
    56         virtual MVPbkContactOperationBase* FindDuplicatesL( 
       
    57             const MVPbkBaseContact& aContact, 
       
    58             MVPbkContactStore& aTargetStore,
       
    59             RPointerArray<MVPbkStoreContact>& aDuplicates,
       
    60             MVPbkContactFindObserver& aObserver,
       
    61             TInt aMaxDuplicatesToFind ) = 0;
       
    62 
       
    63         /**
       
    64          * Returns an extension point for this interface or NULL.
       
    65          * @param aExtensionUid Uid of extension
       
    66          * @return Extension point or NULL
       
    67          */
       
    68         virtual TAny* ContactDuplicatePolicyExtension( 
       
    69                 TUid /*aExtensionUid*/ ) { return NULL; }
       
    70     };
       
    71 
       
    72 #endif // MVPBKCONTACTDUPLICATEPOLICY_H
       
    73 
       
    74 // End of file