phonebookui/Phonebook2/ccapplication/ccapp/ccapputil/inc/ccafactoryextensionnotifier.h
author andy simpson <andrews@symbian.org>
Thu, 02 Sep 2010 15:35:50 +0100
branchRCL_3
changeset 64 c1e8ba0c2b16
parent 3 04ab22b956c2
parent 63 f4a778e096c2
permissions -rw-r--r--
Merge after bad RCL_3 drop reverted

/*
* Copyright (c) 2009-2009 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: CCCaFactoryExtensionNotifier
*
*/

#ifndef CCAFACTORYEXTENSIONOBSERVER_H
#define CCAFACTORYEXTENSIONOBSERVER_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>
#include <ecom.h>

// CLASS DECLARATION
class CCCAExtensionFactory;

NONSHARABLE_CLASS(CCCaFactoryExtensionNotifier) : public CActive
    {
public:
    // Constructors and destructor

    /**
     * Destructor.
     */
    ~CCCaFactoryExtensionNotifier();

    /**
     * Two-phased constructor.
     */
    IMPORT_C static CCCaFactoryExtensionNotifier* NewL();
    
    /**
     * Sets the callback
     * 
     * @since TB 9.2
     */
    IMPORT_C void ObserveExtensionFactoryL( TCallBack& aCallBack );
    
    /**
     * Returns CCCAExtensionFactory pointer
     *
     * @return CCCAExtensionFactory
     * @since TB 9.2
     */
    IMPORT_C CCCAExtensionFactory* ExtensionFactory();
    
protected:  // From CActive
    void DoCancel();
    void RunL();
    
private:

    /**
     * Constructor for performing 1st stage construction
     */
    inline CCCaFactoryExtensionNotifier();

    /**
     * EPOC default constructor for performing 2nd stage construction
     */
    inline void ConstructL();
    
    /**
    * Checks if implementation plugins are available, creates/deletes 
    * extension factory accordingly and notifies clients.
    *
    * @since TB 9.2
    */
    void CreateExtensionFactoryL();
    
private:
    TCallBack iCallBack;
    CCCAExtensionFactory* iExtensionFactory;
    REComSession* iEComSession;
    
    };

#endif // CCAFACTORYEXTENSIONOBSERVER_H