filemanager/Engine/inc/CFileManagerPropertySubscriber.h
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:31:07 +0100
branchRCL_3
changeset 21 65326cf895ed
parent 0 6a9f87576119
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035

/*
* Copyright (c) 2006 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:  Subscriber (Publish & Subscribe)
*
*/



#ifndef CFILEMANAGERPROPERTYSUBSCRIBER_H
#define CFILEMANAGERPROPERTYSUBSCRIBER_H

// INCLUDES
#include <e32base.h>
#include <e32property.h>
#include "MFileManagerPropertyObserver.h"

// CLASS DECLARATION
/**
*  This class provides P&S event subscriber
*
*  @lib FileManagerEngine.lib
*  @since 3.1
*/
NONSHARABLE_CLASS(CFileManagerPropertySubscriber) : public CActive
{
    public:
        /**
        * Two-phased constructor.
        */
        static CFileManagerPropertySubscriber* NewL(
            MFileManagerPropertyObserver& aObserver,
            const TUid& aCategory,
            const TUint aKey );

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

    private:
         CFileManagerPropertySubscriber(
            MFileManagerPropertyObserver& aObserver,
            const TUid& aCategory,
            const TUint aKey );

        void ConstructL();

        void Subscribe();

    private: // from CActive
        void RunL();
    
        TInt RunError( TInt aError );

        void DoCancel();

    private:
        // Ref: Reference to observer interface
        MFileManagerPropertyObserver& iObserver;
        // Own: PS handle
        RProperty iProperty;
        // Own: PS category Uid
        TUid iCategory;
        // Own: PS key id
        TUint iKey;
};

#endif // CFILEMANAGERPROPERTYSUBSCRIBER_H

// End of File