|
1 // Copyright (c) 2008-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 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalComponent |
|
19 */ |
|
20 |
|
21 #include <comms-infras/ss_log.h> |
|
22 #include <comms-infras/ss_corepractivities.h> // TODO is this needed? |
|
23 #include <comms-infras/coretiermanagerstates.h> // TODO is this needed? |
|
24 #include <comms-infras/coretiermanageractivities.h> // TODO is this needed? |
|
25 #include "pdpservices.h" |
|
26 #include "pdptiermanager.h" |
|
27 #include <pcktcs.h> |
|
28 #include <comms-infras/es_connectionserv.h> |
|
29 |
|
30 #ifdef __CFLOG_ACTIVE |
|
31 #define KPDPTierMgrTag KESockMetaConnectionTag |
|
32 _LIT8(KMBMSObjectTag, "MBMSObject"); |
|
33 #endif |
|
34 |
|
35 using namespace Messages; |
|
36 using namespace MeshMachine; // TODO is this needed? |
|
37 using namespace ESock; |
|
38 using namespace NetStateMachine; // TODO is this needed? |
|
39 using namespace ConnectionServ; |
|
40 |
|
41 |
|
42 //Constructor for CMBMSServiceRequest |
|
43 CMBMSServiceRequest::CMBMSServiceRequest( |
|
44 CMBMSEngine& aMBMSEngine, |
|
45 const TNodeId& aMBMSTMCommsId, |
|
46 const Messages::TNodeSignal::TMessageId& aRequestType, |
|
47 CRefCountOwnedParameterBundle* aRequestBundleOwner, |
|
48 const XMBMSServiceQuerySet::TQueryType aQueryType |
|
49 ) |
|
50 :CActive(EPriorityStandard), |
|
51 iMBMSEngine(aMBMSEngine), |
|
52 iMBMSTMCommsId(aMBMSTMCommsId), |
|
53 iRequestType(aRequestType), |
|
54 iObjectBundleOwner(aRequestBundleOwner), |
|
55 iQueryType(aQueryType) |
|
56 { |
|
57 CActiveScheduler::Add(this); |
|
58 } |
|
59 |
|
60 /** |
|
61 The NewL factory function for CMBMSServiceRequest. |
|
62 @param aMBMSTMCommsId comms Id. |
|
63 @param aClientId Node Channel Id. |
|
64 @param aRequestType Message Id |
|
65 @param aRequestBundleOwner Parameter Bundle. |
|
66 @return CMBMSServiceRequest* |
|
67 */ |
|
68 CMBMSServiceRequest* CMBMSServiceRequest::NewL( |
|
69 CMBMSEngine& aMBMSEngine, |
|
70 const TNodeId& aMBMSTMCommsId, |
|
71 RNodeInterface* aOriginatorInterface, |
|
72 const TRuntimeCtxId& aOriginator, |
|
73 const Messages::TNodeSignal::TMessageId& aRequestType, |
|
74 CRefCountOwnedParameterBundle* aRequestBundleOwner, |
|
75 const XMBMSServiceQuerySet::TQueryType aQueryType |
|
76 ) |
|
77 { |
|
78 CMBMSServiceRequest* self = new(ELeave) CMBMSServiceRequest( |
|
79 aMBMSEngine, |
|
80 aMBMSTMCommsId, |
|
81 aRequestType, |
|
82 aRequestBundleOwner, |
|
83 aQueryType |
|
84 ); |
|
85 |
|
86 CleanupStack::PushL(self); |
|
87 self->ConstructL(aOriginatorInterface, aOriginator); |
|
88 CleanupStack::Pop(self); |
|
89 |
|
90 return self; |
|
91 } |
|
92 /** |
|
93 ConstructL for CMBMSEngine. |
|
94 */ |
|
95 void CMBMSServiceRequest::ConstructL(RNodeInterface* aOriginatorInterface, const TRuntimeCtxId& aOriginator) |
|
96 { |
|
97 |
|
98 if (iRequestOriginator.Open(*aOriginatorInterface, aOriginator) != KErrNone) |
|
99 { |
|
100 // Fix the code - looks like this originator already has an outstanding request |
|
101 User::Leave(KErrArgument); |
|
102 } |
|
103 } |
|
104 |
|
105 /** |
|
106 Destructor for CMBMSServiceRequest. |
|
107 */ |
|
108 CMBMSServiceRequest::~CMBMSServiceRequest() |
|
109 { |
|
110 Cancel(); |
|
111 iObjectBundleOwner->Close(); |
|
112 delete iRetrievePcktMbms; |
|
113 } |
|
114 |
|
115 /** |
|
116 This function is used to cancel the notification message sent by the client |
|
117 @param aError const TInt |
|
118 @return void |
|
119 */ |
|
120 void CMBMSServiceRequest::CancelMessage(const TInt aError) |
|
121 { |
|
122 __CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::CancelMessage(%d)"), this, aError)); |
|
123 if (iRequestType == TCFTierStatusProvider::TTierNotificationRegistration::Id()) |
|
124 { |
|
125 iRequestOriginator.PostMessage( |
|
126 iMBMSTMCommsId, |
|
127 TEBase::TError(TCFTierStatusProvider::TTierNotificationRegistration::Id(), aError).CRef() |
|
128 ); |
|
129 } |
|
130 } |
|
131 |
|
132 /** |
|
133 This function is used to process the MBMS requests.The RunL() function of CMBMSServiceRequest is called |
|
134 based on the state machines. |
|
135 @param aError const TInt |
|
136 @return void |
|
137 */ |
|
138 void CMBMSServiceRequest::StartRequest() |
|
139 { |
|
140 iScanEngineState = EChecking; |
|
141 |
|
142 SetActive(); |
|
143 TRequestStatus* status = &iStatus; |
|
144 User::RequestComplete(status, KErrNone); |
|
145 } |
|
146 |
|
147 /** |
|
148 This function is used to return the client id. |
|
149 @param None |
|
150 @return TCFNodeChannelId |
|
151 */ |
|
152 const TNodeId& CMBMSServiceRequest::GetClientId() |
|
153 { |
|
154 return iRequestOriginator.Node().RecipientId(); |
|
155 } |
|
156 |
|
157 /** |
|
158 This is CActive overloaded function.Cancel all outstanding requests. |
|
159 @param None |
|
160 @return Void |
|
161 */ |
|
162 void CMBMSServiceRequest::DoCancel() |
|
163 { |
|
164 switch (iScanEngineState) |
|
165 { |
|
166 case ENotifyService: |
|
167 case ERemoveAllComplete: |
|
168 iMBMSEngine.GetRPacketService().CancelAsyncRequest(EPacketUpdateMbmsMonitorServiceList); |
|
169 break; |
|
170 case ERetrieveBearerAvailability: |
|
171 iMBMSEngine.GetRPacketService().CancelAsyncRequest(EPacketGetMbmsNetworkServiceStatus); |
|
172 break; |
|
173 case EStartMonitor: |
|
174 iMBMSEngine.GetRPacketService().CancelAsyncRequest(EPacketNotifyMbmsServiceAvailabilityChange); |
|
175 break; |
|
176 case EResultCount: |
|
177 if(iQueryType == XMBMSServiceQuerySet::ECountMonitorList) |
|
178 { |
|
179 iMBMSEngine.GetRPacketService().CancelAsyncRequest(EPacketEnumerateMbmsMonitorServiceList); |
|
180 } |
|
181 else if(iQueryType == XMBMSServiceQuerySet::ECountActiveServiceList) |
|
182 { |
|
183 iMBMSEngine.GetRPacketService().CancelAsyncRequest(EPacketEnumerateMbmsActiveServiceList); |
|
184 } |
|
185 break; |
|
186 case EGetMonitorList: |
|
187 if(iRetrievePcktMbms != NULL) |
|
188 iRetrievePcktMbms->Cancel(); |
|
189 break; |
|
190 } |
|
191 } |
|
192 |
|
193 /** |
|
194 This is CActive overloaded function. |
|
195 @param None |
|
196 @return TInt |
|
197 */ |
|
198 TInt CMBMSServiceRequest::RunError(TInt aError) |
|
199 { |
|
200 __CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::RunError(%d)"), this, aError)); |
|
201 |
|
202 // Stop the ScanEngine components |
|
203 Cancel(); |
|
204 |
|
205 if (iRequestType == TCFTierStatusProvider::TTierNotificationRegistration::Id()) |
|
206 { |
|
207 iRequestOriginator.PostMessage( |
|
208 iMBMSTMCommsId, |
|
209 TEBase::TError(TCFTierStatusProvider::TTierNotificationRegistration::Id(), aError).CRef() |
|
210 ); |
|
211 } |
|
212 return KErrNone; |
|
213 } |
|
214 |
|
215 /** |
|
216 This is CActive overloaded function. |
|
217 @param None |
|
218 @return Void |
|
219 */ |
|
220 void CMBMSServiceRequest::RunL() |
|
221 { |
|
222 TRequestStatus* status = &iStatus; |
|
223 if (iStatus == KErrNone) |
|
224 { |
|
225 switch(iScanEngineState) |
|
226 { |
|
227 case EChecking: |
|
228 __CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In EChecking State"), this)); |
|
229 User::LeaveIfError(iMBMSEngine.GetRPacketService().GetStatus(iPsdStatus)); // get initial status |
|
230 |
|
231 //check the query type |
|
232 if(iQueryType == XMBMSServiceQuerySet::EBearerAvailability) |
|
233 iScanEngineState = EBearerAvailable; |
|
234 else if (iQueryType == XMBMSServiceQuerySet::EAddService) |
|
235 iScanEngineState = EServiceAdd; |
|
236 else if (iQueryType == XMBMSServiceQuerySet::ERemoveService) |
|
237 iScanEngineState = EServiceRemove; |
|
238 else if (iQueryType == XMBMSServiceQuerySet::ERemoveAllService) |
|
239 iScanEngineState = EServiceRemoveAll; |
|
240 else if (iQueryType == XMBMSServiceQuerySet::ECountMonitorList) |
|
241 iScanEngineState = EGetCountMonitorList; |
|
242 else if (iQueryType == XMBMSServiceQuerySet::ECountActiveServiceList) |
|
243 iScanEngineState = EGetCountServiceList; |
|
244 |
|
245 SetActive(); |
|
246 User::RequestComplete(status, KErrNone); |
|
247 break; |
|
248 |
|
249 case EBearerAvailable: |
|
250 //get MBMS bearer availability. |
|
251 __CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In EBearerAvailable State"), this)); |
|
252 iMBMSEngine.GetRPacketService().GetMbmsNetworkServiceStatus(iStatus,ETrue,iNetworkServiceStatus); |
|
253 iScanEngineState = ERetrieveBearerAvailability; |
|
254 SetActive(); |
|
255 break; |
|
256 |
|
257 case ERetrieveBearerAvailability: |
|
258 __CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In ERetrieveBearerAvailability State"), this)); |
|
259 //create a parameter bundle and send the results to the client. |
|
260 SendResultBundleL(); |
|
261 |
|
262 iScanEngineState = EBearerAvailable; |
|
263 SetActive(); |
|
264 User::RequestComplete(status, KErrNone); |
|
265 break; |
|
266 |
|
267 case EServiceAdd: |
|
268 { |
|
269 CPcktMbmsMonitoredServiceList* mbmsServiceList = UpdateMonitorServiceListL(); |
|
270 CleanupStack::PushL(mbmsServiceList); |
|
271 iMBMSEngine.GetRPacketService().UpdateMbmsMonitorServiceListL(iStatus,EAddEntries,mbmsServiceList); |
|
272 CleanupStack::PopAndDestroy(mbmsServiceList); |
|
273 |
|
274 SetActive(); |
|
275 iScanEngineState = ENotifyService; |
|
276 } |
|
277 break; |
|
278 |
|
279 case EServiceRemoveAll: |
|
280 { |
|
281 iMBMSEngine.GetRPacketService().UpdateMbmsMonitorServiceListL (iStatus,ERemoveAllEntries); |
|
282 |
|
283 SetActive(); |
|
284 iScanEngineState = ERemoveAllComplete; |
|
285 } |
|
286 break; |
|
287 |
|
288 case ERemoveAllComplete: |
|
289 SendResultBundleL(); |
|
290 break; |
|
291 |
|
292 case EServiceRemove: |
|
293 { |
|
294 CPcktMbmsMonitoredServiceList* mbmsSeriveList = UpdateMonitorServiceListL(); |
|
295 CleanupStack::PushL(mbmsSeriveList); |
|
296 iMBMSEngine.GetRPacketService().UpdateMbmsMonitorServiceListL (iStatus,ERemoveEntries,mbmsSeriveList); |
|
297 CleanupStack::PopAndDestroy(mbmsSeriveList); |
|
298 |
|
299 SetActive(); |
|
300 iScanEngineState = ENotifyService; |
|
301 } |
|
302 break; |
|
303 |
|
304 case EGetCountMonitorList: |
|
305 { |
|
306 __CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In ECountActiveServiceList State"), this)); |
|
307 iMBMSEngine.GetRPacketService().EnumerateMbmsMonitorServiceList(iStatus,iCount,iMaxCount); |
|
308 |
|
309 SetActive(); |
|
310 iScanEngineState = EResultCount; |
|
311 } |
|
312 break; |
|
313 |
|
314 case EGetCountServiceList: |
|
315 { |
|
316 __CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In ECountActiveServiceList State"), this)); |
|
317 iMBMSEngine.GetRPacketService().EnumerateMbmsActiveServiceList(iStatus,iCount,iMaxCount); |
|
318 |
|
319 SetActive(); |
|
320 iScanEngineState = EResultCount; |
|
321 } |
|
322 break; |
|
323 |
|
324 case EResultCount: |
|
325 SendResultBundleL(); |
|
326 break; |
|
327 |
|
328 case ENotifyService: |
|
329 //notify for MBMS Services. |
|
330 __CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In ENotifyService State"), this)); |
|
331 iMBMSEngine.GetRPacketService().NotifyMbmsServiceAvailabilityChange(iStatus); |
|
332 SetActive(); |
|
333 iScanEngineState = EStartMonitor; |
|
334 break; |
|
335 |
|
336 case EStartMonitor: |
|
337 __CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In EStartMonitor State"), this)); |
|
338 iRetrievePcktMbms = CRetrievePcktMbmsMonitoredServices::NewL(iMBMSEngine.GetRPacketService()); |
|
339 iRetrievePcktMbms->Start(iStatus); |
|
340 |
|
341 SetActive(); |
|
342 iScanEngineState = EGetMonitorList; |
|
343 break; |
|
344 |
|
345 case EGetMonitorList: |
|
346 SendResultBundleL(); |
|
347 |
|
348 SetActive(); |
|
349 User::RequestComplete(status, KErrNone); |
|
350 iScanEngineState = ENotifyService; |
|
351 break; |
|
352 |
|
353 } |
|
354 } |
|
355 else if(((iStatus.Int() == KErrMbmsImpreciseServiceEntries))||((iStatus.Int() == KErrNotFound))) |
|
356 { |
|
357 __CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::RunL() KErrMbmsImpreciseServiceEntries || KErrNotFound"), this)); |
|
358 CancelMessage(iStatus.Int()); |
|
359 iMBMSEngine.RemoveFromRequestListL(GetClientId()); |
|
360 } |
|
361 else |
|
362 { |
|
363 __CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::RunL() ERROR: Incorrect status, Aborting"), this)); |
|
364 User::Leave(iStatus.Int()); |
|
365 } |
|
366 |
|
367 } |
|
368 |
|
369 /** |
|
370 This function is used to update Mbms Monitored Service List |
|
371 @param None |
|
372 @return Void |
|
373 */ |
|
374 CPcktMbmsMonitoredServiceList* CMBMSServiceRequest::UpdateMonitorServiceListL() |
|
375 { |
|
376 __CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In UpdateMonitorServiceListL()"), this)); |
|
377 |
|
378 //Read the entries in the parameter bundle and pass them to Etel. |
|
379 CPcktMbmsMonitoredServiceList* serviceList= CPcktMbmsMonitoredServiceList::NewL(); |
|
380 CleanupStack::PushL(serviceList); |
|
381 |
|
382 if((iScanEngineState == EServiceAdd) || (iScanEngineState == EServiceRemove)) |
|
383 { |
|
384 const ConnectionServ::CConnectionServParameterBundle* objectBundle1 = static_cast<const CConnectionServParameterBundle*>(iObjectBundleOwner->Ptr()); |
|
385 ConnectionServ::CConnectionServParameterBundle* objectBundle = const_cast<CConnectionServParameterBundle *>(objectBundle1); |
|
386 |
|
387 TUint numObjectPSCs = objectBundle->CountParamSetContainers(); |
|
388 |
|
389 for(TUint i = 0; i < numObjectPSCs; i++) |
|
390 { |
|
391 CParameterSetContainer* objectPSC = objectBundle->GetParamSetContainer(i); |
|
392 XMBMSServiceParameterSet* objectMPS = XMBMSServiceParameterSet::FindInParamSetContainer(*objectPSC); |
|
393 RPacketService::TMbmsServiceAvailabilityV1 mbmsService; |
|
394 mbmsService.iTmgi.SetServiceId(objectMPS->GetChannelInfo()->GetTmgi().GetServiceId()); |
|
395 mbmsService.iTmgi.SetMCC(objectMPS->GetChannelInfo()->GetTmgi().GetMCC()); |
|
396 |
|
397 mbmsService.iTmgi.SetMNC(objectMPS->GetChannelInfo()->GetTmgi().GetMNC()); |
|
398 mbmsService.iMbmsServiceMode = objectMPS->GetServiceMode(); |
|
399 mbmsService.iMbmsAccessBearer = objectMPS->GetChannelInfo()->GetScope(); |
|
400 serviceList->AddEntryL(mbmsService); |
|
401 } |
|
402 } |
|
403 CleanupStack::Pop(serviceList); |
|
404 return serviceList; |
|
405 } |
|
406 |
|
407 /** |
|
408 This function is used to send result parameter bundle to the client |
|
409 @param None |
|
410 @return Void |
|
411 */ |
|
412 void CMBMSServiceRequest::SendResultBundleL() |
|
413 { |
|
414 CConnectionServParameterBundle* returnBundle = NULL; |
|
415 if(iScanEngineState == EGetMonitorList) |
|
416 returnBundle = PrepareMonitorResultBundleL(); |
|
417 else if(iScanEngineState == ERetrieveBearerAvailability) |
|
418 returnBundle = PrepareBearerResultBundleL(); |
|
419 else if (iScanEngineState == ERemoveAllComplete) |
|
420 returnBundle = PrepareRemoveAllBundleL(); |
|
421 else if (iScanEngineState == EResultCount) |
|
422 returnBundle = PrepareCountBundleL(); |
|
423 |
|
424 CleanupStack::PushL(returnBundle);// Ownership of the bundle passes to the Server |
|
425 CRefCountOwnedParameterBundle* returnBundleOwner = new (ELeave) CRefCountOwnedParameterBundle(returnBundle); |
|
426 returnBundleOwner->Open(); // Open the initial reference |
|
427 CleanupClosePushL(*returnBundleOwner); |
|
428 |
|
429 if (iRequestType == TCFTierStatusProvider::TTierNotificationRegistration::Id()) |
|
430 { |
|
431 iRequestOriginator.PostMessage( |
|
432 iMBMSTMCommsId, |
|
433 TCFTierStatusProvider::TTierNotification(returnBundleOwner).CRef() |
|
434 ); |
|
435 } |
|
436 CleanupStack::Pop(returnBundleOwner); |
|
437 CleanupStack::Pop(returnBundle); |
|
438 } |
|
439 |
|
440 /** |
|
441 This function is used to prepare result bundle. |
|
442 @param None |
|
443 @return CConnectionServParameterBundle* |
|
444 */ |
|
445 CConnectionServParameterBundle* CMBMSServiceRequest::PrepareMonitorResultBundleL() const |
|
446 { |
|
447 CConnectionServParameterBundle* returnBundle = CConnectionServParameterBundle::NewL(); |
|
448 CleanupStack::PushL(returnBundle); |
|
449 |
|
450 __CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In PrepareMonitorResultBundleL function"), this)); |
|
451 //read the MBMS Service list from Etel after receiving the MBMS Service Availability Notification. |
|
452 |
|
453 CPcktMbmsMonitoredServiceList* serviceList = iRetrievePcktMbms->RetrieveListL(); |
|
454 TInt count = serviceList->Enumerate(); |
|
455 CleanupStack::PushL(serviceList); |
|
456 |
|
457 //Read the monitor list from Etel and send the list to client as parameter bundle. |
|
458 for(TUint i = 0; i < count; i++) |
|
459 { |
|
460 RPacketService::TMbmsServiceAvailabilityV1 serviceAvailability; |
|
461 CParameterSetContainer* returnPSC = CParameterSetContainer::NewL(*returnBundle); |
|
462 CleanupStack::PushL(returnPSC); |
|
463 serviceAvailability = serviceList->GetEntryL(i); |
|
464 |
|
465 TTmgi tmgi; |
|
466 tmgi.SetMCC(serviceAvailability.iTmgi.GetMCC()); |
|
467 tmgi.SetMNC(serviceAvailability.iTmgi.GetMNC()); |
|
468 tmgi.SetServiceId(serviceAvailability.iTmgi.GetServiceId()); |
|
469 |
|
470 XMBMSServiceParameterSet* returnPS = XMBMSServiceParameterSet::NewL(*returnPSC); |
|
471 TMBMSChannelInfoV1* serviceInfo = returnPS->GetChannelInfo(); |
|
472 |
|
473 serviceInfo->SetTmgi(tmgi); |
|
474 serviceInfo->SetScope(serviceAvailability.iMbmsAccessBearer); |
|
475 |
|
476 returnPS->SetServiceMode(serviceAvailability.iMbmsServiceMode); |
|
477 returnPS->SetMBMSServiceAvailability(serviceAvailability.iMbmsAvailabilityStatus); |
|
478 |
|
479 CleanupStack::Pop(returnPSC); |
|
480 } |
|
481 |
|
482 CleanupStack::PopAndDestroy(serviceList); |
|
483 CleanupStack::Pop(returnBundle); |
|
484 |
|
485 return returnBundle; |
|
486 } |
|
487 |
|
488 /** |
|
489 This function is used to prepare result bundle containing bearer availability. |
|
490 @param None |
|
491 @return CConnectionServParameterBundle* |
|
492 */ |
|
493 CConnectionServParameterBundle* CMBMSServiceRequest::PrepareBearerResultBundleL() const |
|
494 { |
|
495 __CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In PrepareBearerResultBundleL function"), this)); |
|
496 |
|
497 CConnectionServParameterBundle* returnBundle = CConnectionServParameterBundle::NewL(); |
|
498 CleanupStack::PushL(returnBundle); |
|
499 |
|
500 CParameterSetContainer* returnPSC = CParameterSetContainer::NewL(*returnBundle); |
|
501 CleanupStack::PushL(returnPSC); |
|
502 |
|
503 XMBMSServiceQuerySet* returnQuery = XMBMSServiceQuerySet::NewL(*returnPSC); |
|
504 returnQuery->SetMBMSBearerAvailability(iNetworkServiceStatus); |
|
505 |
|
506 CleanupStack::Pop(returnPSC); |
|
507 CleanupStack::Pop(returnBundle); |
|
508 |
|
509 return returnBundle; |
|
510 } |
|
511 |
|
512 /** |
|
513 This function is used to prepare result bundle containing current and max count of entries |
|
514 in Monitor/Serice list table. |
|
515 @param None |
|
516 @return CConnectionServParameterBundle* |
|
517 */ |
|
518 CConnectionServParameterBundle* CMBMSServiceRequest::PrepareCountBundleL() const |
|
519 { |
|
520 __CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In PrepareCountBundleL function"), this)); |
|
521 |
|
522 CConnectionServParameterBundle* returnBundle = CConnectionServParameterBundle::NewL(); |
|
523 CleanupStack::PushL(returnBundle); |
|
524 |
|
525 CParameterSetContainer* returnPSC = CParameterSetContainer::NewL(*returnBundle); |
|
526 CleanupStack::PushL(returnPSC); |
|
527 |
|
528 XMBMSServiceQuerySet* returnQuery = XMBMSServiceQuerySet::NewL(*returnPSC); |
|
529 returnQuery->SetListCount(iCount); |
|
530 returnQuery->SetListMaxCount(iMaxCount); |
|
531 |
|
532 CleanupStack::Pop(returnPSC); |
|
533 CleanupStack::Pop(returnBundle); |
|
534 |
|
535 return returnBundle; |
|
536 } |
|
537 |
|
538 /** |
|
539 This function creates an empty bundle. |
|
540 @param None |
|
541 @return CConnectionServParameterBundle* |
|
542 */ |
|
543 CConnectionServParameterBundle* CMBMSServiceRequest::PrepareRemoveAllBundleL() const |
|
544 { |
|
545 //pass empty bundle |
|
546 __CFLOG_VAR((KPDPTierMgrTag, KMBMSObjectTag, _L8("CMBMSServiceRequest[%08x]::In PrepareRemoveAllBundleL function"), this)); |
|
547 |
|
548 CConnectionServParameterBundle* returnBundle = CConnectionServParameterBundle::NewL(); |
|
549 return returnBundle; |
|
550 } |