|
1 /* |
|
2 * Copyright (c) 2010 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: Declaration of connection timer class. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef POSREVGEOCODECONNECTIONTIMER_H |
|
19 #define POSREVGEOCODECONNECTIONTIMER_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32std.h> |
|
23 #include <e32base.h> |
|
24 |
|
25 class MPosRevGeoCodeTimeoutObserver |
|
26 { |
|
27 public: |
|
28 virtual void HandleTimedoutEvent( TInt aErrorCode ) = 0; |
|
29 }; |
|
30 |
|
31 |
|
32 /** |
|
33 * This is the timer class responsible for notifying client's on |
|
34 * time out specified by the client. |
|
35 */ |
|
36 class CPosRevGeoCodeConnectionTimer : public CTimer |
|
37 { |
|
38 public: |
|
39 /** |
|
40 * Factory function to create the instance of CPosRevGeoCodeConnectionTimer object. |
|
41 */ |
|
42 static CPosRevGeoCodeConnectionTimer* NewL( MPosRevGeoCodeTimeoutObserver& |
|
43 aConnectionTimeoutHandlerInterface); |
|
44 |
|
45 /** |
|
46 * Destructor |
|
47 */ |
|
48 ~CPosRevGeoCodeConnectionTimer(); |
|
49 |
|
50 /** |
|
51 * Starts the timer with specified time out. |
|
52 * @return KErrInUse If timer is already running. |
|
53 */ |
|
54 TInt StartTimer( const TInt aTimeoutVal ); |
|
55 |
|
56 |
|
57 protected: // From CTimer |
|
58 void RunL(); |
|
59 |
|
60 private: |
|
61 /** |
|
62 * Symbian 2nd phase constructor |
|
63 */ |
|
64 void ConstructL(); |
|
65 |
|
66 /** |
|
67 * Constructor |
|
68 */ |
|
69 CPosRevGeoCodeConnectionTimer( MPosRevGeoCodeTimeoutObserver& aConnectionTimeoutHandler ); |
|
70 |
|
71 private: // Data member |
|
72 /** |
|
73 * Reference to connection time out observer |
|
74 */ |
|
75 MPosRevGeoCodeTimeoutObserver& iConnectionTimeoutObserver; |
|
76 }; |
|
77 |
|
78 |
|
79 #endif /* POSREVGEOCODECONNECTIONTIMER_H */ |