equal
deleted
inserted
replaced
1 /* |
|
2 * Copyright (c) 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: CSconTimeOut declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CSCONTIMEOUT_H |
|
20 #define CSCONTIMEOUT_H |
|
21 |
|
22 #include <e32base.h> // For CActive, link against: euser.lib |
|
23 #include <e32std.h> // For RTimer, link against: euser.lib |
|
24 |
|
25 class MTimeOutObserver |
|
26 { |
|
27 public: |
|
28 virtual void TimeOut() = 0; |
|
29 }; |
|
30 |
|
31 NONSHARABLE_CLASS( CSconTimeOut ) : public CActive |
|
32 { |
|
33 public: |
|
34 // Cancel and destroy |
|
35 ~CSconTimeOut(); |
|
36 static CSconTimeOut* NewL( MTimeOutObserver& aTimeOutObserver ); |
|
37 |
|
38 public: |
|
39 // Function for making the timeout request |
|
40 void Start(TTimeIntervalMicroSeconds32 aDelay); |
|
41 |
|
42 private: |
|
43 CSconTimeOut( MTimeOutObserver& aTimeOutObserver ); |
|
44 void ConstructL(); |
|
45 |
|
46 private: // From CActive |
|
47 void RunL(); |
|
48 void DoCancel(); |
|
49 TInt RunError(TInt aError); |
|
50 |
|
51 private: |
|
52 RTimer iTimer; // Provides async timing service |
|
53 MTimeOutObserver& iTimeOutObserver; |
|
54 }; |
|
55 |
|
56 #endif // CSCONTIMEOUT_H |
|