1 /* |
|
2 * Copyright (c) 2002 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: Helps retrieving request related information |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CLPDPERIODICPROCESSOR_H |
|
20 #define CLPDPERIODICPROCESSOR_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <EPos_CPosPrivacyNotifier.h> |
|
24 #include <lbs/epos_cposrequestor.h> |
|
25 #include "lpdsuplsettingsadapterobserver.h" |
|
26 |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CEikonEnv; |
|
30 class CPosPrivacyNotifier; |
|
31 class CLpdVerifierSettingsLauncher; |
|
32 class CLpdSUPLSettingsAdapter; |
|
33 |
|
34 |
|
35 static TInt LinkClickedL(TAny* aPtr); |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * Observer for the Periodic request. This will notify incase there |
|
41 * is change in periodic request contents |
|
42 * @lib locverifierdlg.lib |
|
43 * @since S60 v9.2tb |
|
44 */ |
|
45 class MLpdPeriodicRequestObserver |
|
46 { |
|
47 public: |
|
48 |
|
49 /** |
|
50 * Called when a change has been detected in the period |
|
51 * request contents. |
|
52 * |
|
53 */ |
|
54 virtual void UpdateCurrentNotifierL( ) = 0; |
|
55 |
|
56 }; |
|
57 |
|
58 /** |
|
59 * This class processes and retreives information related to the request based on id |
|
60 * @lib locverifierdlg.dll |
|
61 * @since 2.1 |
|
62 */ |
|
63 class CLpdPeriodicProcessor : public CBase, |
|
64 public MLpdSUPLSettingsAdapterObserver |
|
65 { |
|
66 public: // Constructors and destructor |
|
67 |
|
68 /** |
|
69 * Two-phased constructor. |
|
70 * @return created object |
|
71 */ |
|
72 static CLpdPeriodicProcessor* NewL( MLpdPeriodicRequestObserver& aObserver ); |
|
73 |
|
74 /** |
|
75 * Two-phased constructor. |
|
76 * @return created object |
|
77 */ |
|
78 static CLpdPeriodicProcessor* NewLC( MLpdPeriodicRequestObserver& aObserver ); |
|
79 |
|
80 /** |
|
81 * Destructor. |
|
82 */ |
|
83 virtual ~CLpdPeriodicProcessor(); |
|
84 |
|
85 public: // New functions |
|
86 |
|
87 /** |
|
88 * Sets the Request Id to process |
|
89 * @param aRequestorId periodic Request Id / Session Id |
|
90 * @return ETrue if all requestor id's were valid, EFalse otherwise. |
|
91 */ |
|
92 void SetSessionIdL( TInt64 aSessionId ); |
|
93 |
|
94 /** |
|
95 * Sets the requestor name parameter |
|
96 * @param aRequestorName Requestor's name |
|
97 */ |
|
98 void SetRequestorNameL( HBufC* aRequestorName); |
|
99 |
|
100 /** |
|
101 * Gets the current Session Id |
|
102 */ |
|
103 |
|
104 TInt64 GetSessionId( ); |
|
105 |
|
106 /** |
|
107 * Sets the Request Type of process |
|
108 * @param aRequestType Notification / Query Type |
|
109 */ |
|
110 |
|
111 void SetRequestTypeL( CPosPrivacyNotifier::TRequestType aRequestType ); |
|
112 |
|
113 /** |
|
114 * Sets the request id of the current request |
|
115 * @param aRequestId Id of request |
|
116 */ |
|
117 |
|
118 |
|
119 void SetRequestorIdL( TInt32 aRequestorId ); |
|
120 |
|
121 |
|
122 /** |
|
123 * Sets the Requestor to process |
|
124 * @param aRequestor periodic Requestor |
|
125 */ |
|
126 void SetRequestorL( CPosRequestor* aRequestor ); |
|
127 |
|
128 /** |
|
129 * Resets member variables |
|
130 */ |
|
131 void ResetParameters(); |
|
132 |
|
133 /** |
|
134 * Prepares to set the message text in notification dialog |
|
135 */ |
|
136 void NotificationMessageTextL( HBufC*& aMessageText); |
|
137 |
|
138 /** |
|
139 * Resets requestor arrays and destroys requestor objects. |
|
140 */ |
|
141 TCallBack LinkCallBack(); |
|
142 |
|
143 /** |
|
144 * Launches the Settings Ui for showing Supl periodic/Session details |
|
145 */ |
|
146 void LaunchSettingsL(); |
|
147 |
|
148 |
|
149 |
|
150 public: // |
|
151 |
|
152 /** |
|
153 * Inherited from MLpdSUPLSettingsAdapterObserver. |
|
154 */ |
|
155 void UpdateSessionL( TInt64 aSessionId ); |
|
156 |
|
157 protected: // Constructors and destructors |
|
158 |
|
159 /** |
|
160 * C++ constructor. |
|
161 */ |
|
162 CLpdPeriodicProcessor( MLpdPeriodicRequestObserver& aObserver ); |
|
163 |
|
164 |
|
165 protected: // New methods |
|
166 |
|
167 /** |
|
168 * Handles assert errors. Panics in debug build and leaves in |
|
169 * release build, as this component runs in EikSrv |
|
170 * and must never panic |
|
171 */ |
|
172 void HandleAssertErrorL() const; |
|
173 |
|
174 private: |
|
175 void ConstructL(); |
|
176 |
|
177 void GetResourceAndPeriodL( TUint aSeconds, |
|
178 TInt& aResourceId, TDes& aPeriodString ); |
|
179 void GetMessageStringL( HBufC*& aMessageString, |
|
180 TInt& aResourceId, TDesC& aNameString, TDesC& aPeriodString ); |
|
181 |
|
182 |
|
183 |
|
184 protected: //Data |
|
185 |
|
186 |
|
187 private: //Data |
|
188 |
|
189 // Observer for the current request |
|
190 MLpdPeriodicRequestObserver& iObserver; |
|
191 |
|
192 // Message Text to be displayed in Message Query control |
|
193 HBufC* iMessageText; //Owns |
|
194 |
|
195 HBufC* iRequestorName; |
|
196 |
|
197 // Current session id |
|
198 TInt64 iSessionId; //Owns |
|
199 |
|
200 // Current Request Id |
|
201 TInt iRequestorId; |
|
202 |
|
203 // Current Request Type |
|
204 CPosPrivacyNotifier::TRequestType iRequestType; |
|
205 |
|
206 CPosRequestor::TRequestType iRequestorType; |
|
207 |
|
208 CLpdSUPLSettingsAdapter* iSUPLSettingsAdapter; |
|
209 |
|
210 // Settings Launcher |
|
211 CLpdVerifierSettingsLauncher* iVerifierSettingsLauncher; //Owns |
|
212 |
|
213 // Current Request's Requestor |
|
214 // :Owns |
|
215 CPosRequestor* iRequestor; |
|
216 |
|
217 CEikonEnv* iEikEnv; |
|
218 |
|
219 }; |
|
220 |
|
221 #endif // CLPDPERIODICPROCESSOR_H |
|
222 |
|
223 // End of File |
|