usbmgmt/usbmgr/usbman/chargingplugin/public/devicestatetimer.h
changeset 0 c9bc50fca66e
equal deleted inserted replaced
-1:000000000000 0:c9bc50fca66e
       
     1 /*
       
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalComponent
       
    21 */
       
    22 
       
    23 #ifndef DEVICESTATETIMER_H
       
    24 #define DEVICESTATETIMER_H
       
    25 
       
    26 #include <e32base.h>
       
    27 
       
    28 class MUsbChargingDeviceStateTimerObserver
       
    29 	{
       
    30 public:
       
    31 	virtual void DeviceStateTimeout() = 0;
       
    32 	};
       
    33 
       
    34 class CUsbChargingDeviceStateTimer : public CTimer
       
    35 	{
       
    36 public:
       
    37 	static CUsbChargingDeviceStateTimer* NewL(MUsbChargingDeviceStateTimerObserver& aObserver);
       
    38 	~CUsbChargingDeviceStateTimer();
       
    39 	void Start(TTimeIntervalMicroSeconds32 aTime);
       
    40 private:
       
    41 	void ConstructL();
       
    42 	CUsbChargingDeviceStateTimer(MUsbChargingDeviceStateTimerObserver& aObserver);
       
    43 	void RunL();
       
    44 	void DoCancel();
       
    45 
       
    46 private:
       
    47 	MUsbChargingDeviceStateTimerObserver& iObserver;
       
    48 	TTimeIntervalMicroSeconds32 iTime;
       
    49 	};
       
    50 
       
    51 #endif // DEVICESTATETIMER_H