equal
deleted
inserted
replaced
|
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 #include "devicestatetimer.h" |
|
24 |
|
25 CUsbChargingDeviceStateTimer* CUsbChargingDeviceStateTimer::NewL(MUsbChargingDeviceStateTimerObserver& aObserver) |
|
26 { |
|
27 CUsbChargingDeviceStateTimer* self = new(ELeave) CUsbChargingDeviceStateTimer(aObserver); |
|
28 CleanupStack::PushL(self); |
|
29 self->ConstructL(); |
|
30 CleanupStack::Pop(self); |
|
31 return self; |
|
32 } |
|
33 |
|
34 CUsbChargingDeviceStateTimer::~CUsbChargingDeviceStateTimer() |
|
35 { |
|
36 Cancel(); |
|
37 } |
|
38 |
|
39 void CUsbChargingDeviceStateTimer::Start(TTimeIntervalMicroSeconds32 aTime) |
|
40 { |
|
41 After(aTime); |
|
42 } |
|
43 |
|
44 void CUsbChargingDeviceStateTimer::ConstructL() |
|
45 { |
|
46 CTimer::ConstructL(); |
|
47 CActiveScheduler::Add(this); |
|
48 } |
|
49 |
|
50 CUsbChargingDeviceStateTimer::CUsbChargingDeviceStateTimer(MUsbChargingDeviceStateTimerObserver& aObserver) |
|
51 : CTimer(EPriorityStandard), iObserver(aObserver) |
|
52 { |
|
53 } |
|
54 |
|
55 void CUsbChargingDeviceStateTimer::RunL() |
|
56 { |
|
57 iObserver.DeviceStateTimeout(); |
|
58 } |
|
59 |
|
60 void CUsbChargingDeviceStateTimer::DoCancel() |
|
61 { |
|
62 CTimer::DoCancel(); |
|
63 } |