|
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 |
|
20 |
|
21 #ifndef BTGPSENVCHANGEHANDLER_H |
|
22 #define BTGPSENVCHANGEHANDLER_H |
|
23 |
|
24 // INCLUDES |
|
25 |
|
26 #include <e32base.h> |
|
27 |
|
28 // CONSTANTS |
|
29 |
|
30 // MACROS |
|
31 |
|
32 // DATA TYPES |
|
33 |
|
34 // FUNCTION PROTOTYPES |
|
35 |
|
36 // FORWARD DECLARATIONS |
|
37 class CBTGPSRequestManager; |
|
38 class CEnvironmentChangeNotifier; |
|
39 |
|
40 // CLASS DECLARATION |
|
41 |
|
42 /** |
|
43 * Handler for getting system time change event. |
|
44 * |
|
45 */ |
|
46 class CBTGPSEnvChangeHandler: public CBase |
|
47 { |
|
48 public: |
|
49 |
|
50 /** |
|
51 * Two-phase construction. |
|
52 * @param aRequestManager Reference to request manager. |
|
53 */ |
|
54 static CBTGPSEnvChangeHandler * NewL( |
|
55 CBTGPSRequestManager& aRequestManager); |
|
56 |
|
57 /** |
|
58 * Destructor |
|
59 */ |
|
60 virtual ~CBTGPSEnvChangeHandler(); |
|
61 |
|
62 private: |
|
63 |
|
64 /** |
|
65 * Second phase of the construction |
|
66 */ |
|
67 void ConstructL(); |
|
68 |
|
69 /** |
|
70 * Private constructor |
|
71 */ |
|
72 CBTGPSEnvChangeHandler( |
|
73 CBTGPSRequestManager& aRequestManager); |
|
74 |
|
75 /** |
|
76 * Callback function for environment change notifier. |
|
77 */ |
|
78 static TInt NotifierCallBack(TAny* aPtr); |
|
79 |
|
80 /** |
|
81 * This function is called whenever environment change notifier |
|
82 * reports that something has changed. The only change we are |
|
83 * interested of is the system time change. |
|
84 */ |
|
85 void HandleEnvironmentChange(); |
|
86 |
|
87 private: |
|
88 //Reference to request manager |
|
89 CBTGPSRequestManager& iRequestManager; |
|
90 |
|
91 //Environment change notifier |
|
92 CEnvironmentChangeNotifier* iEnvChangeNotifier; |
|
93 |
|
94 //Environment change initialized |
|
95 TBool iEnvChangeNotifierInitialized; |
|
96 }; |
|
97 #endif |
|
98 // End of File |
|
99 |