contacts_plat/virtual_phonebook_store_api/inc/CVPbkContactFindFromStoresOperation.h
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:29:52 +0100
branchRCL_3
changeset 63 f4a778e096c2
child 64 c1e8ba0c2b16
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035

/*
* Copyright (c) 2006-2007 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:  An implementation of find from stores multioperation
*
*/


#ifndef CVPBKCONTACTFINDFROMSTORESOPERATION_H
#define CVPBKCONTACTFINDFROMSTORESOPERATION_H

#include <CVPbkMultiContactOperationBase.h>
#include <MVPbkContactFindFromStoresObserver.h>


/**
 * An implementation of find from stores multioperation
 *
 * @lib VPbkEng.lib
 */
class CVPbkContactFindFromStoresOperation :   
        public CVPbkMultiContactOperationBase,
        public MVPbkContactFindFromStoresObserver
    {
    public:
        /**
         * @param aObserver the observer that is notified after all
         *                  suboperations have completed.
         * @return A new instance of this class
         */
        IMPORT_C static CVPbkContactFindFromStoresOperation* NewLC( 
            MVPbkContactFindFromStoresObserver& aObserver );

        virtual ~CVPbkContactFindFromStoresOperation();

    private: // from CVPbkMultiContactOperationBase
        void HandleZeroSuboperations();
    
    private: // from MVPbkContactFindFromStoresObserver
        void FindFromStoreSucceededL( MVPbkContactStore& aStore, 
                MVPbkContactLinkArray* aResultsFromStore );
        void FindFromStoreFailed( MVPbkContactStore& aStore, TInt aError );
        void FindFromStoresOperationComplete();

    private: // implemenation
        CVPbkContactFindFromStoresOperation( 
                MVPbkContactFindFromStoresObserver& aObserver );
        void ConstructL();
        void HandleFindFromStoreSucceedL( MVPbkContactStore& aStore, 
                const MVPbkContactLinkArray& aResultsFromStore );
        
    private: // data
        /// Ref: An observer for this find operation
        MVPbkContactFindFromStoresObserver& iObserver;
        /// Own: completed operation count
        TInt iNumberOfCompleted;
    };

#endif // CVPBKCONTACTFINDFROMSTORESOPERATION_H

// End of File