localconnectivityservice/lcstylustap/inc/forcedismounttimer.h
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:20:40 +0100
branchRCL_3
changeset 40 52a167391590
parent 0 c3e98f10fcf4
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035

/*
* Copyright (c) 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:  Header file for Stylus Tap indicator
*
*/

#ifndef C_FORCEDISMOUNTTIMER_H
#define C_FORCEDISMOUNTTIMER_H

#include <e32base.h>

/**
 * Timer callback interface for force mount
 *
 * This class specifies the function to be called when a timeout occurs.
 * Used in conjunction with CTimeOutTimer class
 *  
 */    
class MTimerNotifier
    {
public:
    /**     
     * The function to be called when a timeout occurs.
     *     
     */
    virtual void TimerExpired() = 0;
    };

/**
 * Timer interface for force mount
 *
 * This class will notify an object after a specified timeout.
 * 
 */        
class CForceDismountTimer : public CTimer
    {
public:
    /**
     * Two-phased constructor.     
     * @param aTimeOutNotify object to notify of timeout event
     */
    static CForceDismountTimer* NewL( MTimerNotifier* aTimeOutNotify );

    /**
     * Two-phased constructor.     
     * @param aTimeOutNotify object to notify of timeout event
     */    
    static CForceDismountTimer* NewLC( MTimerNotifier* aTimeOutNotify);

    /**
    * Destructor
    */
    virtual ~CForceDismountTimer();

protected: 

    /**
     * From CTimer
     * Invoked when a timeout occurs
     *      
     */
    virtual void RunL();

private:
    /**
     * Constructor.     
     * @param aTimeOutNotify object to notify of timeout event
     */    
    CForceDismountTimer( MTimerNotifier* aTimeOutNotify );
    
    /**
     *  Default constructor.          
     */   
    void ConstructL();

private: // Member variables

    /**
     *  The observer for this objects events 
     *  Not own.
     */
    MTimerNotifier* iNotify;
    

    };
#endif // C_FORCEMOUNTTIMER_H