landmarksui/engine/inc/CLmkAOOperation.h
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:31:27 +0100
branchRCL_3
changeset 18 870918037e16
parent 0 522cd55cc3d7
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035

/*
* Copyright (c) 2004 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:   	LandmarksUi Content File
*				Handle active object operations
*
*/








#ifndef CLMKAOOPERATION_H
#define CLMKAOOPERATION_H

//  INCLUDES
#include "MLmkAOOperationObserver.h"
#include <e32base.h>        // CBase


// FORWARD DECLARATIONS
class CPosLmOperation;
class MLmkAOOperationObserver;
class TOperationTypes;

// CLASS DECLARATION

/**
* CLmkAOOperation class
*/
class CLmkAOOperation : public CActive
    {
    public:  // Constructors and destructor
        /**
        * Constructor
        * @param aLmOperation
        * @param aObserver
        * @param aType
        * @param aProgressNote
        * @return newly instantiated object
        */
        IMPORT_C static CLmkAOOperation* NewL(
                            CPosLmOperation* aLmOperation,
                            MLmkAOOperationObserver& aObserver,
                            MLmkAOOperationObserver::TOperationTypes aType,
                            TBool aProgressNote );

        /**
        * Destructor.
        */
        IMPORT_C ~CLmkAOOperation();

    public: // New methods
        /**
        * Start AO operation
        *
        */
        IMPORT_C void StartOperation();

        /**
        * Stop AO operation
        *
        */
		IMPORT_C void StopOperation();

    private: // From CActive
        void RunL();
        void DoCancel();

    protected:  // Constructors and destructor
        /**
        * C++ constructor.
        * @param aLmOperation
        * @param aObserver
        * @param aType
        * @param aProgressNote
        * @return newly instantiated object
        */
        IMPORT_C CLmkAOOperation( CPosLmOperation* aLmOperation,
                         MLmkAOOperationObserver& aObserver,
                         MLmkAOOperationObserver::TOperationTypes aType,
                         TBool aProgressNote );

        /**
        * By default Symbian 2nd phase constructor is private.
        */
        void ConstructL();

    protected:    // Data
        TReal32 iProgress;

        ///Own:
        CPosLmOperation* iLmOperation;

        MLmkAOOperationObserver& iObserver;

        MLmkAOOperationObserver::TOperationTypes iType;

        TBool iProgressNote;
        RTimer iTimer;
        TBool  iIsTimerSet;
    };

#endif      // CLMKAOOPERATION_H

// End of File