|
1 /* |
|
2 * Copyright (c) 2006 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: NPP PSY position requester header file |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef NPPPSYREQUESTER_H |
|
21 #define NPPPSYREQUESTER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CNppPsyPositioner; |
|
28 class CPositioner; |
|
29 class CNppPsySingletonHandler; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * This class implements the position requester. |
|
35 * |
|
36 * Position requester is responsible for loading appropriate PSY vi ECom Plug-in |
|
37 * and forward location request to the loaded PSY. |
|
38 * |
|
39 * This class may owns an instance of CPositioner. |
|
40 * |
|
41 * @lib nlanpppsy.dll |
|
42 * @since 3.1 |
|
43 */ |
|
44 class CNppPsyRequester : public CActive |
|
45 { |
|
46 public: // Constructors and destructor |
|
47 |
|
48 /** |
|
49 * Two - phased constructor. |
|
50 * @param aPositioner Reference to CNppPsyPositioner |
|
51 */ |
|
52 static CNppPsyRequester* NewL( CNppPsyPositioner& aPositioner ); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 ~CNppPsyRequester(); |
|
58 |
|
59 public: |
|
60 |
|
61 /** |
|
62 * Notify position update |
|
63 * @param aPosInfo Reference to TPositionerInfoBase, used to store |
|
64 * fix information. |
|
65 * @param aSTatus Reference to TRequestStatus, used to complete location |
|
66 * request. |
|
67 * @since 3.1 |
|
68 */ |
|
69 void NotifyPositionUpdate ( |
|
70 TPositionInfoBase& aPosInfo, |
|
71 TRequestStatus& aStatus ); |
|
72 |
|
73 private: // Functions from base classes |
|
74 |
|
75 /** |
|
76 * From CActive |
|
77 */ |
|
78 void RunL(); |
|
79 |
|
80 /** |
|
81 * From CActive |
|
82 */ |
|
83 void DoCancel(); |
|
84 |
|
85 /** |
|
86 * From CActive |
|
87 */ |
|
88 TInt RunError( TInt aErr ); |
|
89 |
|
90 private: |
|
91 |
|
92 /** |
|
93 * C++default constructor. |
|
94 */ |
|
95 CNppPsyRequester( CNppPsyPositioner& aPositioner ); |
|
96 |
|
97 /** |
|
98 * By default Symbian 2nd phase constructor is private. |
|
99 */ |
|
100 void ConstructL(); |
|
101 |
|
102 /** |
|
103 * Make location request to the first PSY |
|
104 */ |
|
105 void MakeLocationRequest(); |
|
106 |
|
107 /** |
|
108 * Complete location request |
|
109 */ |
|
110 void CompleteRequest( TInt aErr ); |
|
111 |
|
112 private: // Data |
|
113 // Reference to NPP PSY Positioner |
|
114 CNppPsyPositioner& iNppPsyPositioner; |
|
115 |
|
116 // Singleton handler |
|
117 CNppPsySingletonHandler* iSingletonHandler; |
|
118 |
|
119 // Pointer to position info |
|
120 TPositionInfoBase* iPositionInfo; |
|
121 |
|
122 // Request status |
|
123 TRequestStatus* iRequestStatus; |
|
124 |
|
125 //PSY list |
|
126 RArray < TUid > iPsyList; |
|
127 |
|
128 // Current loaded positioner |
|
129 CPositioner* iPositioner; |
|
130 |
|
131 }; |
|
132 |
|
133 #endif // NPPPSYREQUESTER_H |
|
134 |
|
135 // End of File |