|
1 /* |
|
2 * Copyright (c) 2008 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: Class declaration of Psy change handler |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_LBTPSYCHANGELISTNER_H |
|
20 #define C_LBTPSYCHANGELISTNER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <lbs.h> |
|
24 |
|
25 |
|
26 class MLbtPsyChangeObserver; |
|
27 |
|
28 /** |
|
29 * This class listens to PSY change |
|
30 * |
|
31 * CLbtPsyChangeHandler registers for notification change in PSY |
|
32 * |
|
33 * @since S60 v5.1 |
|
34 */ |
|
35 class CLbtPsyChangeListner : public CActive |
|
36 { |
|
37 public: |
|
38 /** |
|
39 * Factory function that instantiates an object of CLbtPsyChangeListner |
|
40 */ |
|
41 static CLbtPsyChangeListner* NewL( MLbtPsyChangeObserver& aObserver ); |
|
42 |
|
43 /** |
|
44 * Destructor. |
|
45 */ |
|
46 virtual ~CLbtPsyChangeListner(); |
|
47 |
|
48 /** |
|
49 * Starts listening to PSY change |
|
50 */ |
|
51 void StartToListen( TPositionModuleId aPosID ); |
|
52 |
|
53 |
|
54 protected: // From CActive |
|
55 void RunL(); |
|
56 void DoCancel(); |
|
57 |
|
58 private: |
|
59 /** |
|
60 * Default constructor |
|
61 */ |
|
62 CLbtPsyChangeListner( MLbtPsyChangeObserver& aObserver ); |
|
63 |
|
64 /** |
|
65 * Symbian 2nd phase constructor |
|
66 */ |
|
67 void ConstructL(); |
|
68 |
|
69 private://Data |
|
70 |
|
71 /** |
|
72 * Session to RPositionServer |
|
73 */ |
|
74 RPositionServer iPosServer; |
|
75 |
|
76 /** |
|
77 * PSY change observer |
|
78 */ |
|
79 MLbtPsyChangeObserver& iObserver; |
|
80 |
|
81 /** |
|
82 * Module Id of the PSY for which change notification |
|
83 * is requested |
|
84 */ |
|
85 TPositionModuleId iPosID; |
|
86 |
|
87 /** |
|
88 * |
|
89 */ |
|
90 TPositionModuleStatusEvent iModuleStatusEvent; |
|
91 }; |
|
92 |
|
93 |
|
94 #endif // C_LBTPSYCHANGELISTNER_H |