|
1 /* |
|
2 * Copyright (c) 2006-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 #ifndef CMMPACKETQOSTSY_H |
|
21 #define CMMPACKETQOSTSY_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <et_phone.h> |
|
26 #include <etelpckt.h> |
|
27 #include <etelqos.h> |
|
28 #include "cmmphonetsy.h" |
|
29 #include "CMmPrivateUtility.h" |
|
30 #include "cmmtsyreqhandlestore.h" |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class CMmTsyReqHandleStore; |
|
34 class CMmPacketContextTsy; |
|
35 class CMmPacketQoSGsmWcdmaExt; |
|
36 |
|
37 |
|
38 // CLASS DECLARATION |
|
39 |
|
40 /** |
|
41 * CMmPacketQoSTsy contains GPRS QoS related functionality. |
|
42 */ |
|
43 NONSHARABLE_CLASS( CMmPacketQoSTsy ) : public CSubSessionExtBase |
|
44 { |
|
45 |
|
46 public: // Constructor and destructor |
|
47 |
|
48 /** |
|
49 * NewL method is used to create a new instance of class |
|
50 * @param aMmPacketService pointer to PacketService |
|
51 * @param aMmPacketContext pointer to PacketContext |
|
52 */ |
|
53 static CMmPacketQoSTsy* NewL(CMmPacketServiceTsy* aMmPacketService, |
|
54 CMmPacketContextTsy* aMmPacketContext ); |
|
55 |
|
56 /** |
|
57 * Destructor |
|
58 */ |
|
59 ~CMmPacketQoSTsy(); |
|
60 |
|
61 /** |
|
62 * Return pointer to the PacketQoSGsmWcdmaExt |
|
63 * |
|
64 * |
|
65 */ |
|
66 virtual CMmPacketQoSGsmWcdmaExt* PacketQoSGsmWcdmaExt(); |
|
67 |
|
68 /** |
|
69 * Complete Notify Profile Changed |
|
70 * |
|
71 * |
|
72 */ |
|
73 virtual void CompleteNotifyProfileChanged(); |
|
74 |
|
75 /** |
|
76 * Complete Set Profile Parameters |
|
77 * |
|
78 * |
|
79 * @param aError Completion value |
|
80 */ |
|
81 virtual void CompleteSetProfileParameters |
|
82 ( |
|
83 const TInt aError |
|
84 ); |
|
85 |
|
86 /** |
|
87 * Return a pointer to CMmPacketContextTsy |
|
88 * |
|
89 * |
|
90 */ |
|
91 virtual CMmPacketContextTsy* PacketContextTsy(); |
|
92 |
|
93 /** |
|
94 * Handles extended client requests |
|
95 * |
|
96 * |
|
97 * @param TTsyReqHandle Request handle |
|
98 * @param aIpc IPC number of request |
|
99 * @param aPackage Data Package contains request related data |
|
100 * @return error value |
|
101 */ |
|
102 virtual TInt ExtFunc( const TTsyReqHandle aTsyReqHandle, |
|
103 const TInt aIpc, const TDataPackage& aPackage ); |
|
104 |
|
105 /** |
|
106 * Returns request mode for given IPC number |
|
107 * |
|
108 * |
|
109 * @param aIpc IPC number of request |
|
110 * @return CTelObject::TReqMode reguest mode |
|
111 */ |
|
112 virtual CTelObject::TReqMode ReqModeL( const TInt aIpc ); |
|
113 |
|
114 /** |
|
115 * Returns number of slots to be used for given IPC |
|
116 * |
|
117 * |
|
118 * @param aIpc IPC number of request |
|
119 * @return number of slots |
|
120 */ |
|
121 virtual TInt NumberOfSlotsL( const TInt aIpc ); |
|
122 |
|
123 /** |
|
124 * Cancels request that's IPC number and request handle are given in |
|
125 * parameters |
|
126 * |
|
127 * |
|
128 * @param aIpc IPC number of request |
|
129 * @param aTsyReqHandle Request handle of given request |
|
130 * @return error value |
|
131 */ |
|
132 virtual TInt CancelService( const TInt aIpc, |
|
133 const TTsyReqHandle aTsyReqHandle ); |
|
134 |
|
135 /** |
|
136 * Register given notification |
|
137 * |
|
138 * |
|
139 * @param aIpc IPC number of request |
|
140 * @return error value |
|
141 */ |
|
142 virtual TInt RegisterNotification( const TInt aIpc ); |
|
143 |
|
144 /** |
|
145 * Deregister given notification |
|
146 * |
|
147 * |
|
148 * @param aIpc IPC number of request |
|
149 * @return error value |
|
150 */ |
|
151 virtual TInt DeregisterNotification( const TInt aIpc ); |
|
152 |
|
153 /** |
|
154 * Creates new object and returns a pointer to it |
|
155 * |
|
156 * |
|
157 * @param aNewName a name of the object to be created |
|
158 * @return CTelObject* allways NULL |
|
159 */ |
|
160 virtual CTelObject* OpenNewObjectL( TDes& aNewName ); |
|
161 |
|
162 /** |
|
163 * Returns a pointer to object if it exists |
|
164 * |
|
165 * |
|
166 * @param aName A name of the object to be created, |
|
167 * not used |
|
168 * @return CTelObject* allways NULL |
|
169 */ |
|
170 virtual CTelObject* OpenNewObjectByNameL( const TDesC& aName ); |
|
171 |
|
172 /** |
|
173 * Initialisation method that is called from ETel Server. |
|
174 * |
|
175 * |
|
176 */ |
|
177 virtual void Init(); |
|
178 |
|
179 |
|
180 #ifdef REQHANDLE_TIMER |
|
181 |
|
182 /** |
|
183 * Calls the needed complete method due timer expiration |
|
184 * |
|
185 * |
|
186 */ |
|
187 void Complete |
|
188 ( |
|
189 const TInt aReqHandleType, |
|
190 const TInt aError |
|
191 ); |
|
192 |
|
193 #endif //REQHANDLE_TIMER |
|
194 |
|
195 #ifdef TF_LOGGING_ENABLED |
|
196 |
|
197 /** |
|
198 * Overloads original ReqCompleted for logging purposes |
|
199 * |
|
200 * |
|
201 * @param aTsyReqHandle Tsy request handle |
|
202 * @param aError error value |
|
203 */ |
|
204 virtual void ReqCompleted |
|
205 ( |
|
206 const TTsyReqHandle aTsyReqHandle, |
|
207 const TInt aError |
|
208 ); |
|
209 |
|
210 #endif //TF_LOGGING_ENABLED |
|
211 |
|
212 |
|
213 private: |
|
214 |
|
215 /** |
|
216 * C++ default constructor |
|
217 */ |
|
218 CMmPacketQoSTsy(); |
|
219 |
|
220 /** |
|
221 * Class attributes are created in ConstructL. |
|
222 */ |
|
223 void ConstructL(); |
|
224 |
|
225 /** |
|
226 * Handles extended client requests. |
|
227 * |
|
228 * |
|
229 * @param aTsyReqHandle Request handle of given request |
|
230 * @param aIpc IPC number of request |
|
231 * @param aPackage datapackage contains request related data |
|
232 * @return error value |
|
233 */ |
|
234 TInt DoExtFuncL(const TTsyReqHandle aTsyReqHandle, const TInt aIpc, |
|
235 const TDataPackage& aPackage); |
|
236 |
|
237 /** |
|
238 * Initialises extension modules |
|
239 * |
|
240 * |
|
241 */ |
|
242 void InitExtensionModulesL(); |
|
243 |
|
244 /** |
|
245 * Get Profile Capabilities |
|
246 * |
|
247 * |
|
248 * @param aTsyReqHandle Request handle of given request |
|
249 * @param aProfileCaps Profile capabilities |
|
250 * @return error value |
|
251 */ |
|
252 TInt GetProfileCapabilities( const TTsyReqHandle aTsyReqHandle, |
|
253 TDes8* aProfileCaps ); |
|
254 |
|
255 /** |
|
256 * Get Profile Parameters |
|
257 * |
|
258 * |
|
259 * @param aTsyReqHandle Tsy request handle |
|
260 * @param aProfile Pointer to data |
|
261 * @return error value |
|
262 */ |
|
263 TInt GetProfileParameters( const TTsyReqHandle aTsyReqHandle, |
|
264 TDes8* aProfile ); |
|
265 |
|
266 /** |
|
267 * Set Profile Parameters |
|
268 * |
|
269 * |
|
270 * @param aTsyReqHandle Tsy request handle |
|
271 * @param aProfile Pointer to data |
|
272 * @return error value |
|
273 */ |
|
274 TInt SetProfileParametersL( const TTsyReqHandle aTsyReqHandle, |
|
275 TDes8* aProfile ); |
|
276 |
|
277 /** |
|
278 * Notify Profile Changed |
|
279 * |
|
280 * |
|
281 * @param aProfile Pointer to data |
|
282 * @return error value |
|
283 */ |
|
284 TInt NotifyProfileChanged( TDes8* aProfile ); |
|
285 |
|
286 #ifdef REQHANDLE_TIMER |
|
287 |
|
288 /** |
|
289 * Chooses the type of response, automatic or common |
|
290 * |
|
291 * |
|
292 */ |
|
293 void SetTypeOfResponse( const TInt aReqHandleType, |
|
294 const TTsyReqHandle aTsyReqHandle ); |
|
295 |
|
296 #endif //REQHANDLE_TIMER |
|
297 |
|
298 public: //Data |
|
299 |
|
300 enum TPacketQoSRequestTypes |
|
301 { |
|
302 EMultimodePacketQoSReqHandleUnknown, |
|
303 EMultimodePacketQoSNotifyParameterChanged, |
|
304 EMultimodePacketQoSSetProfileParameters, |
|
305 |
|
306 // Max number of requests |
|
307 EMaxNumOfPacketQoSRequests |
|
308 }; |
|
309 |
|
310 private: //Data |
|
311 |
|
312 /** |
|
313 * QoS Request Handle Type |
|
314 */ |
|
315 TPacketQoSRequestTypes iReqHandleType; |
|
316 |
|
317 /** |
|
318 * A pointer to the tsy req handle store |
|
319 * Own. |
|
320 */ |
|
321 CMmTsyReqHandleStore* iTsyReqHandleStore; |
|
322 |
|
323 /** |
|
324 * A table for packet context request handles |
|
325 */ |
|
326 TTsyReqHandle iPacketQoSReqHandles[EMaxNumOfPacketQoSRequests]; |
|
327 |
|
328 /** |
|
329 * A pointer to the Packet Service TSY |
|
330 * Not own. |
|
331 */ |
|
332 // |
|
333 CMmPacketServiceTsy* iMmPacketService; |
|
334 |
|
335 /** |
|
336 * A pointer to the Packet Context |
|
337 * Not own. |
|
338 */ |
|
339 CMmPacketContextTsy* iMmPacketContext; |
|
340 |
|
341 /** |
|
342 * A pointer to the PacketQoSGsmWcdmaExt |
|
343 * Own. |
|
344 */ |
|
345 CMmPacketQoSGsmWcdmaExt* iMmPacketQoSGsmWcdmaExt; |
|
346 |
|
347 }; |
|
348 |
|
349 #endif // CMMPACKETQOSTSY_H |
|
350 |
|
351 |
|
352 // End of File |