1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // CLtsyPacketServicesHandler |
|
15 |
|
16 #include <ctsy/ltsy/cctsydispatchercallback.h> |
|
17 #include <mmtsy_ipcdefs.h> |
|
18 #include <pcktcs.h> |
|
19 #include <ctsy/ltsy/ltsylogger.h> |
|
20 |
|
21 #include "commengine.h" |
|
22 #include "tsyconfg.h" |
|
23 #include "cltsypacketserviceshandler.h" |
|
24 #include "ltsymacros.h" |
|
25 #include "tsyconfg.h" |
|
26 #include "mslogger.h" |
|
27 #include "atgprsattach.h" |
|
28 #include "atgprsdetach.h" |
|
29 #include "atgprsntwkregstatus.h" |
|
30 #include "atgprsconfig.h" |
|
31 #include "initialisepdpcontext.h" |
|
32 #include "atgprscontextactivate.h" |
|
33 #include "activatecontextandgetaddr.h" |
|
34 #include "atgprscontextdeactivate.h" |
|
35 #include "atgprscontextdelete.h" |
|
36 #include "atgprsqosprofile.h" |
|
37 #include "asynchelperrequest.h" |
|
38 #include "atgprsntwkregstatuschange.h" |
|
39 |
|
40 CLtsyPacketServicesHandler::CLtsyPacketServicesHandler( |
|
41 CCtsyDispatcherCallback& aCtsyDispatcherCallback, |
|
42 CGlobalPhonemanager* aGloblePhone) |
|
43 : iCtsyDispatcherCallback(aCtsyDispatcherCallback), |
|
44 iGloblePhone(aGloblePhone) |
|
45 { |
|
46 } |
|
47 |
|
48 CLtsyPacketServicesHandler::~CLtsyPacketServicesHandler() |
|
49 { |
|
50 if(iAsyncHelperRequest) |
|
51 { |
|
52 delete iAsyncHelperRequest; |
|
53 iAsyncHelperRequest = NULL; |
|
54 } |
|
55 if(iNtwkRegStatusChange) |
|
56 { |
|
57 delete iNtwkRegStatusChange; |
|
58 iNtwkRegStatusChange = NULL; |
|
59 } |
|
60 } |
|
61 |
|
62 CLtsyPacketServicesHandler* CLtsyPacketServicesHandler::NewLC( |
|
63 CCtsyDispatcherCallback& aCtsyDispatcherCallback, |
|
64 CGlobalPhonemanager* aGloblePhone) |
|
65 { |
|
66 TSYLOGENTRYEXIT; |
|
67 CLtsyPacketServicesHandler* self = new (ELeave) CLtsyPacketServicesHandler(aCtsyDispatcherCallback,aGloblePhone); |
|
68 CleanupStack::PushL(self); |
|
69 self->ConstructL(); |
|
70 return self; |
|
71 } |
|
72 |
|
73 CLtsyPacketServicesHandler* CLtsyPacketServicesHandler::NewL(CCtsyDispatcherCallback& aCtsyDispatcherCallback, |
|
74 CGlobalPhonemanager* aGloblePhone) |
|
75 { |
|
76 TSYLOGENTRYEXIT; |
|
77 CLtsyPacketServicesHandler* self= |
|
78 CLtsyPacketServicesHandler::NewLC(aCtsyDispatcherCallback,aGloblePhone); |
|
79 CleanupStack::Pop(self); |
|
80 return self; |
|
81 } |
|
82 |
|
83 void CLtsyPacketServicesHandler::ConstructL() |
|
84 /** |
|
85 * Second phase constructor. |
|
86 */ |
|
87 { |
|
88 TSYLOGENTRYEXIT; |
|
89 iAsyncHelperRequest = CAsyncHelperRequest::NewL((*iGloblePhone), iCtsyDispatcherCallback); |
|
90 iInitialisePdpContext = CInitialisePdpContext::NewL(*iGloblePhone, iCtsyDispatcherCallback); |
|
91 iNtwkRegStatusChange = CATGprsNtwkRegStatusChange::NewL((*iGloblePhone), iCtsyDispatcherCallback); |
|
92 } // CLtsyPacketServicesHandler::ConstructL |
|
93 |
|
94 TBool CLtsyPacketServicesHandler::IsInterfaceSupported(TLtsyDispatchInterfaceApiId aDispatchApiId) |
|
95 /** |
|
96 * Returns whether a Dispatch Interface APi is supported or not. |
|
97 * |
|
98 * @param aDispatchApiId Id of Dispatch interface being queried |
|
99 * @return indication whether interface is supported or not |
|
100 */ |
|
101 { |
|
102 switch(aDispatchApiId) |
|
103 { |
|
104 // Insert ApiIds when support is provided in LTSY e.g. |
|
105 case KLtsyDispatchPacketServicesPacketAttachApiId: |
|
106 return ETrue; |
|
107 case KLtsyDispatchPacketServicesGetPacketAttachModeApiId: |
|
108 return ETrue; |
|
109 case KLtsyDispatchPacketServicesGetPacketNetworkRegistrationStatusApiId: |
|
110 return ETrue; |
|
111 case KLtsyDispatchPacketServicesPacketDetachApiId: |
|
112 return ETrue; |
|
113 case KLtsyDispatchPacketServicesSetPdpContextConfigApiId: |
|
114 return ETrue; |
|
115 case KLtsyDispatchPacketServicesModifyActivePdpContextApiId: |
|
116 return EFalse; |
|
117 case KLtsyDispatchPacketServicesInitialisePdpContextApiId: |
|
118 return ETrue; |
|
119 case KLtsyDispatchPacketServicesDeletePdpContextApiId: |
|
120 return ETrue; |
|
121 case KLtsyDispatchPacketServicesSetPacketAttachModeApiId: |
|
122 return EFalse; |
|
123 case KLtsyDispatchPacketServicesNotifyPacketStatusChangeApiId: |
|
124 return ETrue; |
|
125 case KLtsyDispatchPacketServicesSetDefaultPdpContextGprsParamsApiId: |
|
126 return ETrue; |
|
127 case KLtsyDispatchPacketServicesSetDefaultPdpContextR99R4ParamsApiId: |
|
128 return ETrue; |
|
129 case KLtsyDispatchPacketServicesActivatePdpContextApiId: |
|
130 return ETrue; |
|
131 case KLtsyDispatchPacketServicesSetPdpContextQosGprsApiId: |
|
132 return ETrue; |
|
133 case KLtsyDispatchPacketServicesSetPdpContextQosR99R4ApiId: |
|
134 return ETrue; |
|
135 case KLtsyDispatchPacketServicesSetPdpContextQosR5ApiId: |
|
136 return ETrue; |
|
137 case KLtsyDispatchPacketServicesRejectNetworkInitiatedContextActivationRequestApiId: |
|
138 return ETrue; |
|
139 case KLtsyDispatchPacketServicesDeactivatePdpContextApiId: |
|
140 return ETrue; |
|
141 case KLtsyDispatchPacketServicesAddPacketFilterApiId: |
|
142 return EFalse; |
|
143 case KLtsyDispatchPacketServicesGetStatusApiId: |
|
144 return ETrue; |
|
145 case KLtsyDispatchPacketServicesGetStaticCapabilitiesApiId: |
|
146 return EFalse; |
|
147 case KLtsyDispatchPacketServicesGetMaxNoMonitoredServiceListsApiId: |
|
148 return EFalse; |
|
149 case KLtsyDispatchPacketServicesGetMaxNoActiveServicesApiId: |
|
150 return EFalse; |
|
151 case KLtsyDispatchPacketServicesInitialiseMbmsContextApiId: |
|
152 return EFalse; |
|
153 case KLtsyDispatchPacketServicesGetMbmsNetworkServiceStatusApiId: |
|
154 return EFalse; |
|
155 case KLtsyDispatchPacketServicesUpdateMbmsMonitorServiceListApiId: |
|
156 return EFalse; |
|
157 case KLtsyDispatchPacketServicesUpdateMbmsSessionListApiId: |
|
158 return EFalse; |
|
159 case KLtsyDispatchPacketServicesRemovePacketFilterApiId: |
|
160 return EFalse; |
|
161 default: |
|
162 return EFalse; |
|
163 } |
|
164 } |
|
165 |
|
166 void CLtsyPacketServicesHandler::IsCallbackIndicatorSupported(TLtsyDispatchIndIdGroup aIdGroup, TUint32& aIndIdBitMask) |
|
167 /** |
|
168 * Returns the set of callback indicators that are supported. |
|
169 * |
|
170 * @param aIdGroup ID of group that is being queried e.g. aIdGroup=EIndIdGroup1 |
|
171 * @param aIndIdBitMask [out] argument that should return a bitmask indicating which indicator callbacks are supported. |
|
172 */ |
|
173 { |
|
174 //Create bitmask with bitset for each indicator ID that is supported. E.g. |
|
175 if(aIdGroup == EIndIdGroup1) |
|
176 aIndIdBitMask = KLtsyDispatchPacketServicesNotifyQosProfileChangedIndId | |
|
177 KLtsyDispatchPacketServicesNotifyRatTransferCapsChangeIndId | |
|
178 KLtsyDispatchPacketServicesNotifyPacketDynamicCapsChangeIndId | |
|
179 KLtsyDispatchPacketServicesNotifyPdpContextAddedIndId | |
|
180 KLtsyDispatchPacketServicesNotifyNetworkInitiatedContextActivationRequestIndId | |
|
181 KLtsyDispatchPacketServicesNotifyPdpContextConfigChangedIndId | |
|
182 KLtsyDispatchPacketServicesNotifyPdpContextStatusChangeIndId | |
|
183 KLtsyDispatchPacketServicesNotifyPacketNetworkRegistrationStatusIndId; |
|
184 else |
|
185 aIndIdBitMask = 0; //no indicators from other groups supported |
|
186 } |
|
187 |
|
188 |
|
189 TInt CLtsyPacketServicesHandler::HandlePacketAttachReqL() |
|
190 /** |
|
191 * This request is completed by invoking |
|
192 * CCtsyDispatcherCallback::CallbackPacketServicesPacketAttachComp() |
|
193 * |
|
194 * |
|
195 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
196 * or another error code to indicate the failure otherwise. |
|
197 */ |
|
198 { |
|
199 TSYLOGENTRYEXIT; |
|
200 LOGTEXTREL(_L8("pkt:attach")); |
|
201 |
|
202 TInt ret = KErrNotSupported; |
|
203 ret = iGloblePhone->CheckGlobalPhoneStatus(); |
|
204 if(KErrNone == ret) |
|
205 { |
|
206 CATGprsAttach* ATGprsAttach = CATGprsAttach::NewL(*iGloblePhone, iCtsyDispatcherCallback); |
|
207 iGloblePhone->iEventSignalActive = ETrue; |
|
208 iGloblePhone->SetActiveRequest(ATGprsAttach); |
|
209 ATGprsAttach->StartRequest(); |
|
210 } |
|
211 else |
|
212 { |
|
213 LOGTEXTREL2(_L8("pkt:err(%d) in attach"), ret); |
|
214 } |
|
215 |
|
216 return TSYLOGSETEXITERR(ret); |
|
217 } // CLtsyPacketServicesHandler::HandlePacketAttachReqL |
|
218 |
|
219 |
|
220 TInt CLtsyPacketServicesHandler::HandleGetPacketAttachModeReqL() |
|
221 /** |
|
222 * This request is completed by invoking |
|
223 * CCtsyDispatcherCallback::CallbackPacketServicesGetPacketAttachModeComp() |
|
224 * |
|
225 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
226 * or another error code to indicate the failure otherwise. |
|
227 */ |
|
228 { |
|
229 TSYLOGENTRYEXIT; |
|
230 TInt ret = KErrNone; |
|
231 iAsyncHelperRequest->SetRequestId(MLtsyDispatchPacketServicesGetPacketAttachMode::KLtsyDispatchPacketServicesGetPacketAttachModeApiId); |
|
232 |
|
233 return TSYLOGSETEXITERR(ret); |
|
234 } // CLtsyPacketServicesHandler::HandleGetPacketAttachModeReqL |
|
235 |
|
236 |
|
237 TInt CLtsyPacketServicesHandler::HandleGetPacketNetworkRegistrationStatusReqL() |
|
238 /** |
|
239 * This request is completed by invoking |
|
240 * CCtsyDispatcherCallback::CallbackPacketServicesGetPacketNetworkRegistrationStatusComp() |
|
241 * |
|
242 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
243 * or another error code to indicate the failure otherwise. |
|
244 */ |
|
245 { |
|
246 TSYLOGENTRYEXIT; |
|
247 |
|
248 TInt ret = KErrNotSupported; |
|
249 ret = iGloblePhone->CheckGlobalPhoneStatus(); |
|
250 if(KErrNone == ret) |
|
251 { |
|
252 CATGprsNtwkRegStatus* ATGprsNtwkRegStatus = CATGprsNtwkRegStatus::NewL(*iGloblePhone, |
|
253 iCtsyDispatcherCallback, |
|
254 *iNtwkRegStatusChange); |
|
255 iGloblePhone->iEventSignalActive = ETrue; |
|
256 iGloblePhone->SetActiveRequest(ATGprsNtwkRegStatus); |
|
257 ATGprsNtwkRegStatus->StartRequest(); |
|
258 } |
|
259 else |
|
260 { |
|
261 LOGTEXTREL2(_L8("pkt:err(%d) in GetPacketNetworkRegistrationStatus"), ret); |
|
262 } |
|
263 |
|
264 return TSYLOGSETEXITERR(ret); |
|
265 } // CLtsyPacketServicesHandler::HandleGetPacketNetworkRegistrationStatusReqL |
|
266 |
|
267 |
|
268 TInt CLtsyPacketServicesHandler::HandlePacketDetachReqL() |
|
269 /** |
|
270 * This request is completed by invoking |
|
271 * CCtsyDispatcherCallback::CallbackPacketServicesPacketDetachComp() |
|
272 * |
|
273 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
274 * or another error code to indicate the failure otherwise. |
|
275 */ |
|
276 { |
|
277 TSYLOGENTRYEXIT; |
|
278 LOGTEXTREL(_L8("pkt:detach")); |
|
279 |
|
280 TInt ret = KErrNotSupported; |
|
281 ret = iGloblePhone->CheckGlobalPhoneStatus(); |
|
282 if(KErrNone == ret) |
|
283 { |
|
284 CATGprsDetach* ATGprsDetach = CATGprsDetach::NewL(*iGloblePhone, iCtsyDispatcherCallback); |
|
285 iGloblePhone->iEventSignalActive = ETrue; |
|
286 iGloblePhone->SetActiveRequest(ATGprsDetach); |
|
287 ATGprsDetach->StartRequest(); |
|
288 } |
|
289 else |
|
290 { |
|
291 LOGTEXTREL2(_L8("pkt:err(%d) in detach"), ret); |
|
292 } |
|
293 |
|
294 return TSYLOGSETEXITERR(ret); |
|
295 } // CLtsyPacketServicesHandler::HandlePacketDetachReqL |
|
296 |
|
297 |
|
298 TInt CLtsyPacketServicesHandler::HandleSetPdpContextConfigReqL(const TDesC& aContextId, |
|
299 const TDesC8& aAccessPointName, |
|
300 const RPacketContext::TProtocolType aPdpType, |
|
301 const TDesC8& aPdpAddress, |
|
302 const TDesC8& aPcoBuffer) |
|
303 /** |
|
304 * This request is completed by invoking |
|
305 * CCtsyDispatcherCallback::CallbackPacketServicesSetPdpContextConfigComp() |
|
306 * |
|
307 * @param contextId The context name, the descriptor should be TBuf<10> |
|
308 * @param iAccessPointName The access name which identifies the GGSN to be used |
|
309 * @param iPdpType The protocol type |
|
310 * @param iPdpAddress The PDP address for this context |
|
311 * @param aPcoBuffer The pco buffer |
|
312 * |
|
313 * The purpose of the protocol configuration options (PCO) is to transfer external network protocol options |
|
314 * associated with a PDP context activation, and transfer additional (protocol) data |
|
315 * (e.g. configuration parameters, error codes or messages/events) associated with an external protocol |
|
316 * or an application. |
|
317 * The protocol configuration options (PCO) is a type 4 information element with a minimum length of 3 |
|
318 * octets and a maximum length of 253 octets |
|
319 * In order to generate the PCO buffer a TTlvStruct object is being used. The TTlvStruct wraps the buffers |
|
320 * inserted to the PCO and identifies the buffers with given IDs. |
|
321 * |
|
322 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
323 * or another error code to indicate the failure otherwise. |
|
324 */ |
|
325 { |
|
326 TSYLOGENTRYEXIT; |
|
327 |
|
328 LOGTEXTREL2(_L8("pkt:setconfig,APN>%S<"), &aAccessPointName); |
|
329 TInt ret = KErrNotSupported; |
|
330 ret = iGloblePhone->CheckGlobalPhoneStatus(); |
|
331 if(KErrNone == ret) |
|
332 { |
|
333 TInt tmp = GetContext(aContextId); |
|
334 if(tmp >= 0) |
|
335 { |
|
336 iGloblePhone->iContextList[tmp]->iDefContextConfigGPRS.iAccessPointName = aAccessPointName; |
|
337 iGloblePhone->iContextList[tmp]->iDefContextConfigGPRS.iPdpType = aPdpType; |
|
338 iGloblePhone->iContextList[tmp]->iDefContextConfigGPRS.iPdpAddress = aPdpAddress; |
|
339 iGloblePhone->iContextList[tmp]->iDefContextConfigGPRS.iProtocolConfigOption.iMiscBuffer = aPcoBuffer; |
|
340 |
|
341 |
|
342 CATGPRSSetConfig* ATGPRSSetConfig = CATGPRSSetConfig::NewL(*iGloblePhone, iCtsyDispatcherCallback); |
|
343 iGloblePhone->iEventSignalActive = ETrue; |
|
344 ATGPRSSetConfig->SetContext(iGloblePhone->iContextList[tmp]->iContextID); |
|
345 iGloblePhone->SetActiveRequest(ATGPRSSetConfig); |
|
346 ATGPRSSetConfig->StartRequest(); |
|
347 } |
|
348 else |
|
349 { |
|
350 LOGTEXTREL2(_L8("pkt:err(%d) in setconfig, not found"), tmp); |
|
351 } |
|
352 } |
|
353 else |
|
354 { |
|
355 LOGTEXTREL2(_L8("pkt:err(%d) in setconfig"), ret); |
|
356 } |
|
357 |
|
358 return TSYLOGSETEXITERR(ret); |
|
359 } // CLtsyPacketServicesHandler::HandleSetPdpContextConfigReqL |
|
360 |
|
361 |
|
362 TInt CLtsyPacketServicesHandler::HandleModifyActivePdpContextReqL(const TDesC& /*aContextName*/) |
|
363 /** |
|
364 * This request is completed by invoking |
|
365 * CCtsyDispatcherCallback::CallbackPacketServicesModifyActivePdpContextComp() |
|
366 * |
|
367 * @param aContextName Context name for which the modification is intended |
|
368 * |
|
369 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
370 * or another error code to indicate the failure otherwise. |
|
371 */ |
|
372 { |
|
373 TSYLOGENTRYEXIT; |
|
374 |
|
375 TInt ret = KErrNotSupported; |
|
376 |
|
377 return TSYLOGSETEXITERR(ret); |
|
378 } // CLtsyPacketServicesHandler::HandleModifyActivePdpContextReqL |
|
379 |
|
380 |
|
381 TInt CLtsyPacketServicesHandler::HandleInitialisePdpContextReqL(const TDesC& aPrimaryContextName, const TDesC& /*aSecondaryContextName*/) |
|
382 /** |
|
383 * This request is completed by invoking |
|
384 * CCtsyDispatcherCallback::CallbackPacketServicesInitialisePdpContextComp() |
|
385 * |
|
386 * @param aPrimaryContextName Primary context name in the form of a character string, the descriptor should be TBuf<10> |
|
387 * @param aSecondaryContextName Optional secondary context name in the form of a character string, the descriptor should be TBuf<10> |
|
388 * |
|
389 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
390 * or another error code to indicate the failure otherwise. |
|
391 */ |
|
392 { |
|
393 TSYLOGENTRYEXIT; |
|
394 LOGTEXT2(_L8("aPrimaryContextName >%S<"), &aPrimaryContextName); |
|
395 LOGTEXTREL2(_L8("pkt:initctxt>%S<"), &aPrimaryContextName); |
|
396 TInt ret = KErrNone; |
|
397 TInt cid = 0; |
|
398 TInt contextCount = iGloblePhone->iContextList.Count(); |
|
399 if(contextCount > 0) |
|
400 { |
|
401 for(TInt i = 0;i < contextCount;i++) |
|
402 { |
|
403 if(iGloblePhone->iContextList[i]->iInfo.iName == aPrimaryContextName) |
|
404 { |
|
405 LOGTEXTREL2(_L8("pkt:err(%d) in initctxt, already existed"), ret); |
|
406 return KErrNotSupported; |
|
407 } |
|
408 } |
|
409 } |
|
410 |
|
411 cid = GenerateNewContextCid(aPrimaryContextName); |
|
412 LOGTEXT2(_L8("newcid=%d"),cid); |
|
413 if(cid > MaxNumberOfContexts()) |
|
414 { |
|
415 LOGTEXTREL2(_L8("pkt:err(%d) in initctxt, context number overflow"), ret); |
|
416 return KErrNotSupported; |
|
417 } |
|
418 |
|
419 TContextInfomation *tmpContext = new TContextInfomation; |
|
420 tmpContext->iInfo.iName = aPrimaryContextName; |
|
421 tmpContext->iContextID = cid; |
|
422 iGloblePhone->iContextList.Append(tmpContext); |
|
423 LOGTEXT2(_L8("iGloblePhone->iContextList[0]->iContextID=%d"),iGloblePhone->iContextList[0]->iContextID); |
|
424 |
|
425 iInitialisePdpContext->SetContext(cid); |
|
426 iInitialisePdpContext->StartRequest(); |
|
427 |
|
428 return TSYLOGSETEXITERR(ret); |
|
429 } // CLtsyPacketServicesHandler::HandleInitialisePdpContextReqL |
|
430 |
|
431 |
|
432 TInt CLtsyPacketServicesHandler::HandleDeletePdpContextReqL(const TDesC& aContextName) |
|
433 /** |
|
434 * This request is completed by invoking |
|
435 * CCtsyDispatcherCallback::CallbackPacketServicesDeletePdpContextComp() |
|
436 * |
|
437 * @param aContextName the context name to be deleted, , the descriptor should be TBuf<10> |
|
438 * |
|
439 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
440 * or another error code to indicate the failure otherwise. |
|
441 */ |
|
442 { |
|
443 TSYLOGENTRYEXIT; |
|
444 LOGTEXTREL2(_L8("pkt:delete aContextName:\t%S"),&aContextName); |
|
445 |
|
446 TInt ret = KErrNotSupported; |
|
447 ret = iGloblePhone->CheckGlobalPhoneStatus(); |
|
448 if(KErrNone == ret) |
|
449 { |
|
450 TInt tmp = -1; |
|
451 tmp = GetContext(aContextName); |
|
452 if(tmp >= 0) |
|
453 { |
|
454 CATGprsContextDelete* ATGprsContextDelete = CATGprsContextDelete::NewL(*iGloblePhone, iCtsyDispatcherCallback); |
|
455 iGloblePhone->iEventSignalActive = ETrue; |
|
456 ATGprsContextDelete->SetContext(iGloblePhone->iContextList[tmp]->iContextID); |
|
457 iGloblePhone->SetActiveRequest(ATGprsContextDelete); |
|
458 ATGprsContextDelete->StartRequest(); |
|
459 } |
|
460 else |
|
461 { |
|
462 LOGTEXTREL2(_L8("pkt:err(%d) in deletectxt, not found"), tmp); |
|
463 ret = KErrNotFound; |
|
464 } |
|
465 } |
|
466 else |
|
467 { |
|
468 LOGTEXTREL2(_L8("pkt:err(%d) in deletectxt"), ret); |
|
469 } |
|
470 |
|
471 return TSYLOGSETEXITERR(ret); |
|
472 } // CLtsyPacketServicesHandler::HandleDeletePdpContextReqL |
|
473 |
|
474 |
|
475 TInt CLtsyPacketServicesHandler::HandleSetPacketAttachModeReqL(RPacketService::TAttachMode /*aAttachMode*/) |
|
476 /** |
|
477 * This request is completed by invoking |
|
478 * CCtsyDispatcherCallback::CallbackPacketServicesSetPacketAttachModeComp() |
|
479 * |
|
480 * @param aAttachMode the attach mode due to be set. |
|
481 * |
|
482 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
483 * or another error code to indicate the failure otherwise. |
|
484 */ |
|
485 { |
|
486 TSYLOGENTRYEXIT; |
|
487 TInt ret = KErrNotSupported; |
|
488 return TSYLOGSETEXITERR(ret); |
|
489 } // CLtsyPacketServicesHandler::HandleSetPacketAttachModeReqL |
|
490 |
|
491 |
|
492 TInt CLtsyPacketServicesHandler::HandleNotifyPacketStatusChangeReqL() |
|
493 /** |
|
494 * This request is completed by invoking |
|
495 * CCtsyDispatcherCallback::CallbackPacketServicesNotifyPacketStatusChangeComp() |
|
496 * |
|
497 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
498 * or another error code to indicate the failure otherwise. |
|
499 */ |
|
500 { |
|
501 TSYLOGENTRYEXIT; |
|
502 |
|
503 TInt ret = KErrNotSupported; |
|
504 return TSYLOGSETEXITERR(ret); |
|
505 } // CLtsyPacketServicesHandler::HandleNotifyPacketStatusChangeReqL |
|
506 |
|
507 |
|
508 TInt CLtsyPacketServicesHandler::HandleSetDefaultPdpContextGprsParamsReqL(const RPacketContext::TContextConfigGPRS& aContextConfigGprs) |
|
509 /** |
|
510 * This request is completed by invoking |
|
511 * CCtsyDispatcherCallback::CallbackPacketServicesSetDefaultPdpContextParamsComp() |
|
512 * |
|
513 * @param aContextConfigGprs Default GPRS parameters |
|
514 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
515 * or another error code to indicate the failure otherwise. |
|
516 */ |
|
517 { |
|
518 TSYLOGENTRYEXIT; |
|
519 TInt ret = 0; |
|
520 SetDefaultContextConfigGPRS(&aContextConfigGprs); |
|
521 iAsyncHelperRequest->SetRequestId(KLtsyDispatchPacketServicesSetDefaultPdpContextGprsParamsApiId); |
|
522 return TSYLOGSETEXITERR(ret); |
|
523 } // CLtsyPacketServicesHandler::HandleSetDefaultPdpContextGprsParamsReqL |
|
524 |
|
525 TInt CLtsyPacketServicesHandler::HandleSetDefaultPdpContextR99R4ParamsReqL(const RPacketContext::TContextConfigR99_R4& /*aContextConfigR99R4*/) |
|
526 /** |
|
527 * This request is completed by invoking |
|
528 * CCtsyDispatcherCallback::CallbackPacketServicesSetDefaultPdpContextParamsComp() |
|
529 * |
|
530 * @param aContextConfigR99R4 Default R99/R4 parameters |
|
531 * |
|
532 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
533 * or another error code to indicate the failure otherwise. |
|
534 */ |
|
535 { |
|
536 TSYLOGENTRYEXIT; |
|
537 TInt ret = KErrNotSupported; |
|
538 return TSYLOGSETEXITERR(ret); |
|
539 } // CLtsyPacketServicesHandler::HandleSetDefaultPdpContextR99R4ParamsReqL |
|
540 |
|
541 |
|
542 |
|
543 TInt CLtsyPacketServicesHandler::HandleActivatePdpContextReqL(const TDesC& aContextName) |
|
544 /** |
|
545 * This request is completed by invoking |
|
546 * CCtsyDispatcherCallback::CallbackPacketServicesActivatePdpContextComp() |
|
547 * |
|
548 * @param aContextName The context name. |
|
549 * |
|
550 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
551 * or another error code to indicate the failure otherwise. |
|
552 */ |
|
553 { |
|
554 TSYLOGENTRYEXIT; |
|
555 |
|
556 LOGTEXTREL(_L8("pkt:activatectxt")); |
|
557 TInt ret = KErrNotSupported; |
|
558 ret = iGloblePhone->CheckGlobalPhoneStatus(); |
|
559 if(KErrNone == ret) |
|
560 { |
|
561 TInt tmp = GetContext(aContextName); |
|
562 if(tmp >= 0) |
|
563 { |
|
564 CActivatContextAndGetAddr* ActivatContextAndGetAddr = CActivatContextAndGetAddr::NewL(*iGloblePhone, iCtsyDispatcherCallback); |
|
565 iGloblePhone->iEventSignalActive = ETrue; |
|
566 ActivatContextAndGetAddr->SetContext(iGloblePhone->iContextList[tmp]->iContextID); |
|
567 iGloblePhone->SetActiveRequest(ActivatContextAndGetAddr); |
|
568 ActivatContextAndGetAddr->StartRequest(); |
|
569 } |
|
570 } |
|
571 else |
|
572 { |
|
573 LOGTEXTREL2(_L8("pkt:err(%d) in activatectxt"), ret); |
|
574 } |
|
575 |
|
576 return TSYLOGSETEXITERR(ret); |
|
577 } // CLtsyPacketServicesHandler::HandleActivatePdpContextReqL |
|
578 |
|
579 |
|
580 TInt CLtsyPacketServicesHandler::HandleSetPdpContextQosGprsReqL(const TDesC& aContextName, const RPacketQoS::TQoSGPRSRequested& aQoSConfig) |
|
581 /** |
|
582 * This request is completed by invoking |
|
583 * CCtsyDispatcherCallback::CallbackPacketServicesSetPdpContextQosComp() |
|
584 * |
|
585 * @param aContextName the name of the context. |
|
586 * @param aQoSConfig the QoS configuration parameters. |
|
587 * |
|
588 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
589 * or another error code to indicate the failure otherwise. |
|
590 */ |
|
591 { |
|
592 TSYLOGENTRYEXIT; |
|
593 |
|
594 LOGTEXTREL(_L8("pkt:setctxtQos")); |
|
595 TInt ret = KErrNotSupported; |
|
596 ret = iGloblePhone->CheckGlobalPhoneStatus(); |
|
597 if(KErrNone == ret) |
|
598 { |
|
599 TInt tmp = GetContext(aContextName); |
|
600 if(tmp >= 0) |
|
601 { |
|
602 CATGprsSetProfileReq* ATGprsSetProfileReq = CATGprsSetProfileReq::NewL(*iGloblePhone, iCtsyDispatcherCallback); |
|
603 iGloblePhone->iEventSignalActive = ETrue; |
|
604 iGloblePhone->iContextList[tmp]->iQoSConfig = aQoSConfig; |
|
605 ATGprsSetProfileReq->SetContext(iGloblePhone->iContextList[tmp]->iContextID); |
|
606 iGloblePhone->SetActiveRequest(ATGprsSetProfileReq); |
|
607 ATGprsSetProfileReq->StartRequest(); |
|
608 } |
|
609 } |
|
610 else |
|
611 { |
|
612 LOGTEXTREL2(_L8("pkt:err(%d) in setctxtQos"), ret); |
|
613 } |
|
614 |
|
615 return TSYLOGSETEXITERR(ret); |
|
616 } // CLtsyPacketServicesHandler::HandleSetPdpContextQosGprsReqL |
|
617 |
|
618 TInt CLtsyPacketServicesHandler::HandleSetPdpContextQosR99R4ReqL(const TDesC& aContextName, const RPacketQoS::TQoSR99_R4Requested& /*aQoSConfig*/) |
|
619 /** |
|
620 * This request is completed by invoking |
|
621 * CCtsyDispatcherCallback::CallbackPacketServicesSetPdpContextQosComp() |
|
622 * |
|
623 * @param aContextName The name of the context. |
|
624 * @param aQoSConfig The QoS configuration parameters. |
|
625 * |
|
626 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
627 * or another error code to indicate the failure otherwise. |
|
628 */ |
|
629 { |
|
630 TSYLOGENTRYEXIT; |
|
631 |
|
632 RPacketQoS::TQoSGPRSRequested qosGprsReq; |
|
633 qosGprsReq.iReqPrecedence = RPacketQoS::EPriorityMediumPrecedence; |
|
634 qosGprsReq.iMinPrecedence = RPacketQoS::EPriorityMediumPrecedence; |
|
635 qosGprsReq.iReqDelay = RPacketQoS::EUnspecifiedDelayClass; |
|
636 qosGprsReq.iMinDelay = RPacketQoS::EUnspecifiedDelayClass; |
|
637 qosGprsReq.iReqReliability = RPacketQoS::EUnspecifiedReliabilityClass; |
|
638 qosGprsReq.iMinReliability = RPacketQoS::EUnspecifiedReliabilityClass; |
|
639 qosGprsReq.iReqPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput; |
|
640 qosGprsReq.iMinPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput; |
|
641 qosGprsReq.iReqMeanThroughput = RPacketQoS::EMeanThroughputBestEffort; |
|
642 qosGprsReq.iMinMeanThroughput = RPacketQoS::EMeanThroughputBestEffort; |
|
643 |
|
644 return HandleSetPdpContextQosGprsReqL(aContextName, qosGprsReq); |
|
645 } // CLtsyPacketServicesHandler::HandleSetPdpContextQosR99R4ReqL |
|
646 |
|
647 TInt CLtsyPacketServicesHandler::HandleSetPdpContextQosR5ReqL(const TDesC& aContextName, const RPacketQoS::TQoSR5Requested& /*aQoSConfig*/) |
|
648 /** |
|
649 * This request is completed by invoking |
|
650 * CCtsyDispatcherCallback::CallbackPacketServicesSetPdpContextQosComp() |
|
651 * |
|
652 * @param aContextName The name of the context. |
|
653 * @param aQoSConfig The QoS configuration parameters. |
|
654 * |
|
655 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
656 * or another error code to indicate the failure otherwise. |
|
657 */ |
|
658 { |
|
659 TSYLOGENTRYEXIT; |
|
660 |
|
661 RPacketQoS::TQoSGPRSRequested qosGprsReq; |
|
662 qosGprsReq.iReqPrecedence = RPacketQoS::EPriorityMediumPrecedence; |
|
663 qosGprsReq.iMinPrecedence = RPacketQoS::EPriorityMediumPrecedence; |
|
664 qosGprsReq.iReqDelay = RPacketQoS::EUnspecifiedDelayClass; |
|
665 qosGprsReq.iMinDelay = RPacketQoS::EUnspecifiedDelayClass; |
|
666 qosGprsReq.iReqReliability = RPacketQoS::EUnspecifiedReliabilityClass; |
|
667 qosGprsReq.iMinReliability = RPacketQoS::EUnspecifiedReliabilityClass; |
|
668 qosGprsReq.iReqPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput; |
|
669 qosGprsReq.iMinPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput; |
|
670 qosGprsReq.iReqMeanThroughput = RPacketQoS::EMeanThroughputBestEffort; |
|
671 qosGprsReq.iMinMeanThroughput = RPacketQoS::EMeanThroughputBestEffort; |
|
672 |
|
673 return HandleSetPdpContextQosGprsReqL(aContextName, qosGprsReq); |
|
674 } // CLtsyPacketServicesHandler::HandleSetPdpContextQosR5ReqL |
|
675 |
|
676 |
|
677 |
|
678 TInt CLtsyPacketServicesHandler::HandleRejectNetworkInitiatedContextActivationRequestReqL() |
|
679 /** |
|
680 * This request is completed by invoking |
|
681 * CCtsyDispatcherCallback::CallbackPacketServicesRejectNetworkInitiatedContextActivationRequestComp() |
|
682 * |
|
683 * |
|
684 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
685 * or another error code to indicate the failure otherwise. |
|
686 */ |
|
687 { |
|
688 TSYLOGENTRYEXIT; |
|
689 |
|
690 TInt ret = KErrNotSupported; |
|
691 |
|
692 |
|
693 return TSYLOGSETEXITERR(ret); |
|
694 } // CLtsyPacketServicesHandler::HandleRejectNetworkInitiatedContextActivationRequestReqL |
|
695 |
|
696 |
|
697 TInt CLtsyPacketServicesHandler::HandleDeactivatePdpContextReqL(const TDesC& aContextName) |
|
698 /** |
|
699 * This request is completed by invoking |
|
700 * CCtsyDispatcherCallback::CallbackPacketServicesDeactivatePdpContextComp() |
|
701 * |
|
702 * @param aContextName The context name that is to be deactivated. |
|
703 * |
|
704 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
705 * or another error code to indicate the failure otherwise. |
|
706 */ |
|
707 { |
|
708 TSYLOGENTRYEXIT; |
|
709 LOGTEXTREL2(_L8("pkt:deact ctxt>%S<"),&aContextName); |
|
710 TInt ret = KErrNotSupported; |
|
711 |
|
712 ret = iGloblePhone->CheckGlobalPhoneStatus(); |
|
713 if(KErrNone == ret) |
|
714 { |
|
715 TInt tmp = GetContext(aContextName); |
|
716 if(tmp >= 0) |
|
717 { |
|
718 CATGprsContextDeactivate* ATGprsContextDeactivate = CATGprsContextDeactivate::NewL(*iGloblePhone, iCtsyDispatcherCallback); |
|
719 iGloblePhone->iEventSignalActive = ETrue; |
|
720 ATGprsContextDeactivate->SetContext(iGloblePhone->iContextList[tmp]->iContextID); |
|
721 iGloblePhone->SetActiveRequest(ATGprsContextDeactivate); |
|
722 ATGprsContextDeactivate->StartRequest(); |
|
723 ret = KErrNone; |
|
724 } |
|
725 else |
|
726 { |
|
727 LOGTEXTREL2(_L8("pkt:err(%d) in deact ctxt, not found"), tmp); |
|
728 ret = KErrNotFound; |
|
729 } |
|
730 } |
|
731 else |
|
732 { |
|
733 LOGTEXTREL2(_L8("pkt:err(%d) in deact ctxt"), ret); |
|
734 } |
|
735 |
|
736 return TSYLOGSETEXITERR(ret); |
|
737 } // CLtsyPacketServicesHandler::HandleDeactivatePdpContextReqL |
|
738 |
|
739 TInt CLtsyPacketServicesHandler::HandleAddPacketFilterSyncL(const TDesC& /*aContextName*/, CArrayFixFlat<RPacketContext::TPacketFilterV2>& /*aContextFilter*/) |
|
740 /** |
|
741 * This request is completed by invoking |
|
742 * CCtsyDispatcherCallback::CallbackPacketServicesSetPdpContextConfigComp |
|
743 * |
|
744 * @param aContextName The name of the context. |
|
745 * @param aContextFilter An array contains up to eight filters to be used |
|
746 * for configuring the secondary context. |
|
747 * |
|
748 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
749 * or another error code to indicate the failure otherwise. |
|
750 */ |
|
751 { |
|
752 TSYLOGENTRYEXIT; |
|
753 |
|
754 TInt ret = KErrNotSupported; |
|
755 |
|
756 return TSYLOGSETEXITERR(ret); |
|
757 } // CLtsyPacketServicesHandler::HandleAddPacketFilterSyncL |
|
758 |
|
759 |
|
760 TInt CLtsyPacketServicesHandler::HandleGetStatusReqL() |
|
761 /** |
|
762 * This request is completed by invoking |
|
763 * CCtsyDispatcherCallback::CallbackPacketServicesGetStatus() |
|
764 * |
|
765 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
766 * or another error code to indicate the failure otherwise. |
|
767 */ |
|
768 { |
|
769 TSYLOGENTRYEXIT; |
|
770 TInt ret = 0; |
|
771 iAsyncHelperRequest->SetRequestId(KLtsyDispatchPacketServicesGetStatusApiId); |
|
772 |
|
773 return TSYLOGSETEXITERR(ret); |
|
774 } // CLtsyPacketServicesHandler::HandleGetStatusReqL |
|
775 |
|
776 TInt CLtsyPacketServicesHandler::HandleGetStaticCapabilitiesReqL() |
|
777 /** |
|
778 * This request is completed by invoking |
|
779 * CCtsyDispatcherCallback::CallbackPacketServicesGetStaticCapabilitiesComp() |
|
780 * |
|
781 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
782 * or another error code to indicate the failure otherwise. |
|
783 */ |
|
784 { |
|
785 TSYLOGENTRYEXIT; |
|
786 TInt ret = 0; |
|
787 iAsyncHelperRequest->SetRequestId(KLtsyDispatchPacketServicesGetStaticCapabilitiesApiId); |
|
788 return TSYLOGSETEXITERR(ret); |
|
789 } // CLtsyPacketServicesHandler::HandleGetStaticCapabilitiesReqL |
|
790 |
|
791 TInt CLtsyPacketServicesHandler::HandleGetMaxNoMonitoredServiceListsReqL() |
|
792 /** |
|
793 * This request is completed by invoking |
|
794 * CCtsyDispatcherCallback::CallbackPacketServicesGetMaxNoMonitoredServiceListsComp() |
|
795 * |
|
796 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
797 * or another error code to indicate the failure otherwise. |
|
798 */ |
|
799 { |
|
800 TSYLOGENTRYEXIT; |
|
801 |
|
802 TInt ret = 0; |
|
803 iAsyncHelperRequest->SetRequestId(KLtsyDispatchPacketServicesGetMaxNoMonitoredServiceListsApiId); |
|
804 return TSYLOGSETEXITERR(ret); |
|
805 } // CLtsyPacketServicesHandler::HandleGetMaxNoMonitoredServiceListsReqL |
|
806 |
|
807 TInt CLtsyPacketServicesHandler::HandleGetMaxNoActiveServicesReqL() |
|
808 /** |
|
809 * This request is completed by invoking |
|
810 * CCtsyDispatcherCallback::CallbackPacketServicesGetMaxNoActiveServicesComp() |
|
811 * |
|
812 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
813 * or another error code to indicate the failure otherwise. |
|
814 */ |
|
815 { |
|
816 TSYLOGENTRYEXIT; |
|
817 TInt ret = 0; |
|
818 iAsyncHelperRequest->SetRequestId(KLtsyDispatchPacketServicesGetMaxNoActiveServicesApiId); |
|
819 |
|
820 return TSYLOGSETEXITERR(ret); |
|
821 } // CLtsyPacketServicesHandler::HandleGetMaxNoActiveServicesReqL |
|
822 |
|
823 TInt CLtsyPacketServicesHandler::HandleInitialiseMbmsContextReqL(const TDesC& /*aContextName*/) |
|
824 /** |
|
825 * This request is completed by invoking |
|
826 * CCtsyDispatcherCallback::CallbackPacketServicesInitialiseMbmsContextComp() |
|
827 * |
|
828 * @param aContextName The context name in the form of a character string |
|
829 * the maximum length of the descriptor should not exceed KMaxInfoName. |
|
830 * |
|
831 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
832 * or another error code to indicate the failure otherwise. |
|
833 */ |
|
834 { |
|
835 TSYLOGENTRYEXIT; |
|
836 |
|
837 TInt ret = KErrNotSupported; |
|
838 |
|
839 return TSYLOGSETEXITERR(ret); |
|
840 } // CLtsyPacketServicesHandler::HandleInitialiseMbmsContextReqL |
|
841 |
|
842 TInt CLtsyPacketServicesHandler::HandleGetMbmsNetworkServiceStatusReqL(TBool /*aAttemptAttach*/) |
|
843 /** |
|
844 * This request is completed by invoking |
|
845 * CCtsyDispatcherCallback::CallbackPacketServicesGetMbmsNetworkServiceStatusComp() |
|
846 * |
|
847 * @param aAttemptAttach If a GMM attached is to be perfomed. |
|
848 * |
|
849 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
850 * or another error code to indicate the failure otherwise. |
|
851 */ |
|
852 { |
|
853 TSYLOGENTRYEXIT; |
|
854 |
|
855 TInt ret = KErrNotSupported; |
|
856 |
|
857 return TSYLOGSETEXITERR(ret); |
|
858 } // CLtsyPacketServicesHandler::HandleGetMbmsNetworkServiceStatusReqL |
|
859 |
|
860 TInt CLtsyPacketServicesHandler::HandleUpdateMbmsMonitorServiceListsReqL(TMbmsAction /*aAction*/, const CPcktMbmsMonitoredServiceList& /*aServiceList*/, const CPcktMbmsMonitoredServiceList& /*aChangeList*/) |
|
861 /** |
|
862 * It is a request call that is completed by invoking |
|
863 * CCtsyDispatcherCallback::CallbackPacketServicesUpdateMbmsMonitorServiceListComp() |
|
864 * |
|
865 * @param aAction The MBMS action (add, remove or remove all). |
|
866 * @param aServiceList The current MBMS monitor service availability list as held by the CTSY. |
|
867 * @param aChangeList The list of entries to be changed as per the action. (e.g. the action = Add, |
|
868 * the change list will contain entries to be added to the MBMS monitor service availability list) |
|
869 * |
|
870 * @return KErrNone on success, otherwise another error code indicating the |
|
871 * failure. |
|
872 */ |
|
873 { |
|
874 TSYLOGENTRYEXIT; |
|
875 |
|
876 TInt ret = KErrNotSupported; |
|
877 |
|
878 return TSYLOGSETEXITERR(ret); |
|
879 } // CLtsyPacketServicesHandler::HandleUpdateMbmsMonitorServiceListsReqL |
|
880 |
|
881 |
|
882 TInt CLtsyPacketServicesHandler::HandleUpdateMbmsSessionListReqL(const TDesC& /*aContextName*/, TMbmsAction /*aAction*/, TMbmsSessionId /*aSessionId*/, const TMbmsSessionIdList& /*aServiceList*/) |
|
883 /** |
|
884 * It is a request call that is completed by invoking |
|
885 * CCtsyDispatcherCallback::CallbackPacketServicesUpdateMbmsSessionListComp() |
|
886 * |
|
887 * @param aContextName The MBMS context name in the form of a character string. |
|
888 * @param aAction The action to be performed (add, remove or remove all). |
|
889 * @param aSessionId The MBMS session identifier which needs to be received or removed. |
|
890 * @param aServiceList The MBMS services table as held by the CTSY. |
|
891 * |
|
892 * @return KErrNone on success, otherwise another error code indicating the |
|
893 * failure. |
|
894 */ |
|
895 { |
|
896 TSYLOGENTRYEXIT; |
|
897 |
|
898 TInt ret = KErrNotSupported; |
|
899 |
|
900 return TSYLOGSETEXITERR(ret); |
|
901 } // CLtsyPacketServicesHandler::HandleUpdateMbmsSessionListReqL |
|
902 |
|
903 |
|
904 TInt CLtsyPacketServicesHandler::HandleRemovePacketFilterSyncL(const TDesC& /*aContextName*/, TInt /*aFilterId*/) |
|
905 /** |
|
906 * This request is completed by invoking |
|
907 * CCtsyDispatcherCallback::CallbackPacketServicesSetPdpContextConfigComp |
|
908 * |
|
909 * @param aContextName The name of the context. |
|
910 * @param aFilterId The filter Id to be removed. |
|
911 * |
|
912 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
913 * or another error code to indicate the failure otherwise. |
|
914 */ |
|
915 { |
|
916 TSYLOGENTRYEXIT; |
|
917 |
|
918 TInt ret = KErrNotSupported; |
|
919 |
|
920 return TSYLOGSETEXITERR(ret); |
|
921 } // CLtsyPacketServicesHandler::HandleRemovePacketFilterSyncL |
|
922 |
|
923 TInt CLtsyPacketServicesHandler::MaxNumberOfContexts() |
|
924 /** |
|
925 * This function returns the maximum number of contexts that the phone supports. |
|
926 */ |
|
927 { |
|
928 return iGloblePhone->iPhoneStatus.iGprsMaxNumContexts; |
|
929 } |
|
930 TInt CLtsyPacketServicesHandler::GetContext(const TDesC& aName) |
|
931 /** |
|
932 * This function returns a specific context |
|
933 * @param aCount context to Retrieve in linked list. |
|
934 */ |
|
935 { |
|
936 TInt index = -1; |
|
937 TInt count = iGloblePhone->iContextList.Count(); |
|
938 for(TInt i = 0; i < count; i++) |
|
939 { |
|
940 if(0 ==(iGloblePhone->iContextList[i]->iInfo.iName.Compare(aName))) |
|
941 { |
|
942 index = i; |
|
943 } |
|
944 } |
|
945 |
|
946 LOGTEXT3(_L8("[Ltsy Pkt] iContext->ContextName() >%S<, index=%d"), &aName, index); |
|
947 return index; |
|
948 } |
|
949 |
|
950 TInt CLtsyPacketServicesHandler::GenerateNewContextCid(const TDesC& /*aName*/) |
|
951 /** |
|
952 * This function generates a unique context name and the first not taken cid number. |
|
953 * There is a 1 to 1 mapping between this Cid and the one in the phone. |
|
954 * In order to do this we need to check all existing Cids, since they may not |
|
955 * be in conical order and there can be holes in the list(3,1,4,6,5) we need |
|
956 * to loop around and find the lowest that we can use to create a name and a new |
|
957 * Cid. |
|
958 * @param aName New name that is generated. |
|
959 * @param aCid New context id. |
|
960 */ |
|
961 { |
|
962 TInt lowestAvailableCid = 1; |
|
963 TInt count = iGloblePhone->iContextList.Count(); |
|
964 if(count != 0 ) |
|
965 { |
|
966 // There can be gaps between the Cids that the tsy has, so get the |
|
967 // Cid number between them, if any. This nested for loop will find |
|
968 // the lowest available cid there is. |
|
969 for(TInt k = 0; k < count;k++) |
|
970 { |
|
971 for(TInt i = 0; i < count;i++) |
|
972 { |
|
973 if(iGloblePhone->iContextList[i]->iContextID == lowestAvailableCid) |
|
974 ++lowestAvailableCid; |
|
975 } |
|
976 } |
|
977 } |
|
978 return lowestAvailableCid; |
|
979 } |
|
980 |
|
981 void CLtsyPacketServicesHandler::SetDefaultContextConfigGPRS(const RPacketContext::TContextConfigGPRS* aContextConfig) |
|
982 /** |
|
983 * This function sets the default context configuration. |
|
984 * |
|
985 * @param aContextConfigV01 Set default context configuration. |
|
986 */ |
|
987 { |
|
988 iDefContextConfigGPRS.iPdpType = aContextConfig->iPdpType; |
|
989 iDefContextConfigGPRS.iAccessPointName.Copy(aContextConfig->iAccessPointName); |
|
990 iDefContextConfigGPRS.iPdpAddress.Copy(aContextConfig->iPdpAddress); |
|
991 iDefContextConfigGPRS.iPdpCompression = aContextConfig->iPdpCompression; |
|
992 iDefContextConfigGPRS.iAnonymousAccessReqd = aContextConfig->iAnonymousAccessReqd; |
|
993 } |
|
994 // |
|
995 // End of file |
|