24
|
1 |
// Copyright (c) 2006-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 |
|
|
18 |
// INCLUDE FILES
|
|
19 |
#include "Cmmpacketservicetsy.h"
|
|
20 |
#include "Cmmpacketqostsy.h"
|
|
21 |
#include "Cmmpacketcontexttsy.h"
|
|
22 |
#include "cmmpacketqosgsmwcdmaext.h"
|
|
23 |
#include "MmTsy_timeoutdefs.h"
|
|
24 |
#include "MmTsy_numberOfSlots.h"
|
|
25 |
#include <ctsy/serviceapi/mmtsy_ipcdefs.h>
|
|
26 |
#include <ctsy/pluginapi/cmmdatapackage.h>
|
|
27 |
|
|
28 |
// ======== MEMBER FUNCTIONS ========
|
|
29 |
|
|
30 |
CMmPacketQoSTsy::CMmPacketQoSTsy():
|
|
31 |
iReqHandleType(EMultimodePacketQoSReqHandleUnknown)
|
|
32 |
{
|
|
33 |
}
|
|
34 |
|
|
35 |
CMmPacketQoSTsy* CMmPacketQoSTsy::NewL(
|
|
36 |
CMmPacketServiceTsy* aMmPacketService,
|
|
37 |
CMmPacketContextTsy* aMmPacketContext )
|
|
38 |
{
|
|
39 |
TFLOGSTRING("TSY: CMmPacketQoSTsy::NewL." );
|
|
40 |
|
|
41 |
CMmPacketQoSTsy* mmPacketQoS = new ( ELeave ) CMmPacketQoSTsy();
|
|
42 |
CleanupClosePushL( *mmPacketQoS );
|
|
43 |
mmPacketQoS->iMmPacketService = aMmPacketService;
|
|
44 |
mmPacketQoS->iMmPacketContext = aMmPacketContext;
|
|
45 |
mmPacketQoS->ConstructL();
|
|
46 |
CleanupStack::Pop( mmPacketQoS );
|
|
47 |
|
|
48 |
return mmPacketQoS;
|
|
49 |
}
|
|
50 |
|
|
51 |
|
|
52 |
void CMmPacketQoSTsy::ConstructL()
|
|
53 |
{
|
|
54 |
|
|
55 |
InitExtensionModulesL();
|
|
56 |
|
|
57 |
#ifdef REQHANDLE_TIMER
|
|
58 |
// Create req handle store
|
|
59 |
iTsyReqHandleStore = CMmTsyReqHandleStore::NewL( this,
|
|
60 |
iMmPacketService->PhoneTsy(), EMaxNumOfPacketQoSRequests,
|
|
61 |
iPacketQoSReqHandles );
|
|
62 |
#else
|
|
63 |
// Create req handle store
|
|
64 |
iTsyReqHandleStore = CMmTsyReqHandleStore::NewL(
|
|
65 |
EMaxNumOfPacketQoSRequests, iPacketQoSReqHandles );
|
|
66 |
|
|
67 |
#endif // REQHANDLE_TIMER
|
|
68 |
|
|
69 |
}
|
|
70 |
|
|
71 |
CMmPacketQoSTsy::~CMmPacketQoSTsy()
|
|
72 |
{
|
|
73 |
TFLOGSTRING("TSY: CMmPacketQoSTsy::~CMmPacketQoSTsy." );
|
|
74 |
if( iMmPacketContext )
|
|
75 |
{
|
|
76 |
iMmPacketContext->RemoveQoS();
|
|
77 |
}
|
|
78 |
|
|
79 |
delete iMmPacketQoSGsmWcdmaExt;
|
|
80 |
delete iTsyReqHandleStore;
|
|
81 |
}
|
|
82 |
|
|
83 |
|
|
84 |
|
|
85 |
//----------------------------------------------------------------------------
|
|
86 |
// CMmPacketQoSTsy::InitExtensionModulesL
|
|
87 |
// Initialises extension module for CMmPacketQoSTsy
|
|
88 |
// create and allocate memory for iMmPacketQoSGsmWcdmaExt
|
|
89 |
//----------------------------------------------------------------------------
|
|
90 |
|
|
91 |
void CMmPacketQoSTsy::InitExtensionModulesL()
|
|
92 |
{
|
|
93 |
|
|
94 |
// Create Packet QoS GSM/WCDMA extension
|
|
95 |
iMmPacketQoSGsmWcdmaExt =
|
|
96 |
CMmPacketQoSGsmWcdmaExt::NewL( this, iMmPacketService );
|
|
97 |
|
|
98 |
}
|
|
99 |
|
|
100 |
|
|
101 |
//---------------------------------------------------------------------------
|
|
102 |
// CMmPacketQoSTsy::Init
|
|
103 |
// Initialisation method that is called from ETel Server.
|
|
104 |
//---------------------------------------------------------------------------
|
|
105 |
|
|
106 |
void CMmPacketQoSTsy::Init()
|
|
107 |
{
|
|
108 |
}
|
|
109 |
|
|
110 |
|
|
111 |
//----------------------------------------------------------------------------
|
|
112 |
// CMmPacketQoSTsy::ExtFunc
|
|
113 |
// Handles the ETel server requests.
|
|
114 |
//----------------------------------------------------------------------------
|
|
115 |
|
|
116 |
TInt CMmPacketQoSTsy::ExtFunc(
|
|
117 |
const TTsyReqHandle aTsyReqHandle,
|
|
118 |
const TInt aIpc,
|
|
119 |
const TDataPackage& aPackage )
|
|
120 |
{
|
|
121 |
TFLOGSTRING2("TSY: CMmPacketQoSTsy::ExtFunc. aIpc: %d", aIpc );
|
|
122 |
TInt ret( KErrNone );
|
|
123 |
TInt trapError( KErrNone );
|
|
124 |
|
|
125 |
// Ensure the ReqHandleType is unset.
|
|
126 |
// This will detect cases where this method indirectly calls itself
|
|
127 |
// (e.g. servicing a client call that causes a self-reposting notification to complete and thus repost).
|
|
128 |
// Such cases are not supported because iReqHandleType is in the context of this class instance,
|
|
129 |
// not this request, and we don't want the values set by the inner request and the outer request
|
|
130 |
// interfering with each other.
|
|
131 |
__ASSERT_DEBUG(iReqHandleType==EMultimodePacketQoSReqHandleUnknown, User::Invariant());
|
|
132 |
|
|
133 |
TRAP( trapError, ret = DoExtFuncL( aTsyReqHandle, aIpc, aPackage ); );
|
|
134 |
|
|
135 |
if ( KErrNone != trapError )
|
|
136 |
{
|
|
137 |
CMmPacketQoSTsy::ReqCompleted( aTsyReqHandle, trapError );
|
|
138 |
}
|
|
139 |
else if ( KErrNone != ret )
|
|
140 |
{
|
|
141 |
CMmPacketQoSTsy::ReqCompleted( aTsyReqHandle, ret );
|
|
142 |
}
|
|
143 |
|
|
144 |
// Save request handle
|
|
145 |
if ( EMultimodePacketQoSReqHandleUnknown != iReqHandleType )
|
|
146 |
{
|
|
147 |
#ifdef REQHANDLE_TIMER
|
|
148 |
SetTypeOfResponse( iReqHandleType, aTsyReqHandle );
|
|
149 |
#else
|
|
150 |
iTsyReqHandleStore->SetTsyReqHandle( iReqHandleType, aTsyReqHandle );
|
|
151 |
#endif //REQHANDLE_TIMER
|
|
152 |
// We've finished with this value now. Clear it so it doesn't leak
|
|
153 |
// up to any other instances of this method down the call stack
|
|
154 |
iReqHandleType = EMultimodePacketQoSReqHandleUnknown;
|
|
155 |
}
|
|
156 |
|
|
157 |
return KErrNone;
|
|
158 |
|
|
159 |
}
|
|
160 |
|
|
161 |
//----------------------------------------------------------------------------
|
|
162 |
// CMmPacketQoSTsy::DoExtFuncL
|
|
163 |
// DoExtFuncL calls Packet QoS related methods
|
|
164 |
//----------------------------------------------------------------------------
|
|
165 |
|
|
166 |
TInt CMmPacketQoSTsy::DoExtFuncL(
|
|
167 |
const TTsyReqHandle aTsyReqHandle,
|
|
168 |
const TInt aIpc,
|
|
169 |
const TDataPackage& aPackage )
|
|
170 |
{
|
|
171 |
TFLOGSTRING3("TSY: CMmPacketQoSTsy::DoExtFuncL. IPC: %d Handle:%d", aIpc, aTsyReqHandle);
|
|
172 |
TInt ret( KErrNotSupported );
|
|
173 |
|
|
174 |
switch ( aIpc )
|
|
175 |
{
|
|
176 |
case EPacketQoSSetProfileParams:
|
|
177 |
ret = SetProfileParametersL( aTsyReqHandle, aPackage.Des1n() );
|
|
178 |
break;
|
|
179 |
case EPacketQoSGetProfileParams:
|
|
180 |
ret = GetProfileParameters( aTsyReqHandle, aPackage.Des1n() );
|
|
181 |
break;
|
|
182 |
case EPacketQoSGetProfileCaps:
|
|
183 |
ret = GetProfileCapabilities( aTsyReqHandle, aPackage.Des1n() );
|
|
184 |
break;
|
|
185 |
case EPacketQoSNotifyProfileChanged:
|
|
186 |
ret = NotifyProfileChanged( aPackage.Des1n() );
|
|
187 |
break;
|
|
188 |
default:
|
|
189 |
break;
|
|
190 |
}
|
|
191 |
return ret;
|
|
192 |
|
|
193 |
}
|
|
194 |
|
|
195 |
|
|
196 |
//----------------------------------------------------------------------------
|
|
197 |
// CMmPacketQoSTsy::ReqModeL
|
|
198 |
// Returns request mode for given IPC.
|
|
199 |
//----------------------------------------------------------------------------
|
|
200 |
|
|
201 |
CTelObject::TReqMode CMmPacketQoSTsy::ReqModeL(
|
|
202 |
const TInt aIpc )
|
|
203 |
{
|
|
204 |
TFLOGSTRING2("TSY: CMmPacketQoSTsy::ReqModeL. IPC: %d", aIpc );
|
|
205 |
CTelObject::TReqMode reqMode( 0 );
|
|
206 |
|
|
207 |
switch ( aIpc )
|
|
208 |
{
|
|
209 |
case EPacketQoSSetProfileParams:
|
|
210 |
case EPacketQoSGetProfileParams:
|
|
211 |
case EPacketQoSGetProfileCaps:
|
|
212 |
reqMode = KReqModeFlowControlObeyed;
|
|
213 |
break;
|
|
214 |
|
|
215 |
case EPacketQoSNotifyProfileChanged:
|
|
216 |
reqMode = KReqModeMultipleCompletionEnabled |
|
|
217 |
KReqModeRePostImmediately;
|
|
218 |
break;
|
|
219 |
|
|
220 |
// Leave with KErrNotSupported
|
|
221 |
default:
|
|
222 |
User::Leave( KErrNotSupported );
|
|
223 |
break;
|
|
224 |
}
|
|
225 |
return reqMode;
|
|
226 |
}
|
|
227 |
|
|
228 |
|
|
229 |
//----------------------------------------------------------------------------
|
|
230 |
//CMmPacketQoSTsy::NumberOfSlotsL
|
|
231 |
// Returns number of slots to be used for given IPC.
|
|
232 |
//----------------------------------------------------------------------------
|
|
233 |
|
|
234 |
TInt CMmPacketQoSTsy::NumberOfSlotsL(
|
|
235 |
const TInt aIpc )
|
|
236 |
{
|
|
237 |
|
|
238 |
TFLOGSTRING2("TSY: CMmPacketQoSTsy::NumberOfSlotsL. IPC: %d", aIpc );
|
|
239 |
|
|
240 |
TInt numberOfSlots( 0 );
|
|
241 |
|
|
242 |
if ( EPacketQoSNotifyProfileChanged == aIpc )
|
|
243 |
{
|
|
244 |
numberOfSlots = KMmPacketQoSNotifyParameterChangedSlots;
|
|
245 |
}
|
|
246 |
else
|
|
247 |
{
|
|
248 |
// Unknown or invalid IPC
|
|
249 |
User::Leave( KErrNotSupported );
|
|
250 |
}
|
|
251 |
|
|
252 |
return numberOfSlots;
|
|
253 |
|
|
254 |
}
|
|
255 |
|
|
256 |
|
|
257 |
//----------------------------------------------------------------------------
|
|
258 |
// CMmPacketQoSTsy::CancelService
|
|
259 |
// Cancels request defined by aIpc.
|
|
260 |
//----------------------------------------------------------------------------
|
|
261 |
|
|
262 |
TInt CMmPacketQoSTsy::CancelService(
|
|
263 |
const TInt aIpc,
|
|
264 |
const TTsyReqHandle aTsyReqHandle )
|
|
265 |
{
|
|
266 |
TFLOGSTRING3("TSY: CMmPacketQoSTsy::CancelService. IPC: %d Handle:%d", aIpc, aTsyReqHandle);
|
|
267 |
TInt ret( KErrNone );
|
|
268 |
|
|
269 |
switch ( aIpc )
|
|
270 |
{
|
|
271 |
case EPacketQoSSetProfileParams:
|
|
272 |
case EPacketQoSGetProfileParams:
|
|
273 |
case EPacketQoSGetProfileCaps:
|
|
274 |
break;
|
|
275 |
|
|
276 |
// Notification cancels
|
|
277 |
case EPacketQoSNotifyProfileChanged:
|
|
278 |
// Reset tsy request handle
|
|
279 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
280 |
EMultimodePacketQoSNotifyParameterChanged );
|
|
281 |
|
|
282 |
// Complete request with KErrCancel
|
|
283 |
CMmPacketQoSTsy::ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
284 |
|
|
285 |
break;
|
|
286 |
// Default case
|
|
287 |
default:
|
|
288 |
ret = KErrNotSupported;
|
|
289 |
break;
|
|
290 |
}
|
|
291 |
|
|
292 |
return ret;
|
|
293 |
}
|
|
294 |
|
|
295 |
|
|
296 |
//----------------------------------------------------------------------------
|
|
297 |
// CMmPacketQoSTsy::RegisterNotification
|
|
298 |
// Registers Notification
|
|
299 |
//----------------------------------------------------------------------------
|
|
300 |
|
|
301 |
TInt CMmPacketQoSTsy::RegisterNotification(
|
|
302 |
const TInt aIpc )
|
|
303 |
{
|
|
304 |
TFLOGSTRING2("TSY: CMmPacketQoSTsy::RegisterNotification. IPC: %d", aIpc );
|
|
305 |
|
|
306 |
if ( EPacketQoSNotifyProfileChanged == aIpc )
|
|
307 |
{
|
|
308 |
return KErrNone;
|
|
309 |
}
|
|
310 |
return KErrNotSupported;
|
|
311 |
}
|
|
312 |
|
|
313 |
|
|
314 |
//----------------------------------------------------------------------------
|
|
315 |
// CMmPacketQoSTsy::DeregisterNotification
|
|
316 |
// This function unsubscribe given notification from Manufacturer specific
|
|
317 |
// part.Currently does not really do anything but returns KErrNone to
|
|
318 |
// ETel server in case of known notification request type.
|
|
319 |
//----------------------------------------------------------------------------
|
|
320 |
|
|
321 |
TInt CMmPacketQoSTsy::DeregisterNotification(
|
|
322 |
const TInt aIpc )
|
|
323 |
{
|
|
324 |
TFLOGSTRING2("TSY: CMmPacketQoSTsy::DeregisterNotification. IPC: %d", aIpc );
|
|
325 |
|
|
326 |
if ( EPacketQoSNotifyProfileChanged == aIpc )
|
|
327 |
{
|
|
328 |
return KErrNone;
|
|
329 |
}
|
|
330 |
return KErrNotSupported;
|
|
331 |
}
|
|
332 |
|
|
333 |
|
|
334 |
//----------------------------------------------------------------------------
|
|
335 |
// CMmPacketQoSTsy::OpenNewObjectL
|
|
336 |
// Creates new object and returns a pointer to it.
|
|
337 |
// leave with KErrNotSupported
|
|
338 |
// return NULL and control to calling object
|
|
339 |
//----------------------------------------------------------------------------
|
|
340 |
|
|
341 |
CTelObject* CMmPacketQoSTsy::OpenNewObjectL(
|
|
342 |
TDes& /* aNewName*/ )
|
|
343 |
{
|
|
344 |
TFLOGSTRING("TSY: CMmPacketQoSTsy::OpenNewObjectL. Leaves with:KErrNotSupported" );
|
|
345 |
User::Leave( KErrNotSupported );
|
|
346 |
return NULL;
|
|
347 |
}
|
|
348 |
|
|
349 |
|
|
350 |
//----------------------------------------------------------------------------
|
|
351 |
// CMmPacketQoSTsy::OpenNewObjectByNameL
|
|
352 |
// Creates new object and returns a pointer to it.
|
|
353 |
// The ETel Server calls this method. TSY classes must not use this method.
|
|
354 |
// leave with KErrNotSupported
|
|
355 |
// return NULL and control to calling object
|
|
356 |
//----------------------------------------------------------------------------
|
|
357 |
|
|
358 |
CTelObject* CMmPacketQoSTsy::OpenNewObjectByNameL(
|
|
359 |
const TDesC& /* aName */ )
|
|
360 |
{
|
|
361 |
TFLOGSTRING("TSY: CMmPacketQoSTsy::OpenNewObjectByNameL. Leaves with:KErrNotSupported" );
|
|
362 |
// Otherwise we can leave...
|
|
363 |
User::Leave( KErrNotSupported );
|
|
364 |
return NULL;
|
|
365 |
}
|
|
366 |
|
|
367 |
//----------------------------------------------------------------------------
|
|
368 |
// CMmPacketQoSTsy::PacketQoSGsmWcdmaExt
|
|
369 |
// Return pointer to the PacketQoSGsmWcdmaExt.
|
|
370 |
//----------------------------------------------------------------------------
|
|
371 |
|
|
372 |
CMmPacketQoSGsmWcdmaExt* CMmPacketQoSTsy::PacketQoSGsmWcdmaExt()
|
|
373 |
{
|
|
374 |
return iMmPacketQoSGsmWcdmaExt;
|
|
375 |
}
|
|
376 |
|
|
377 |
//----------------------------------------------------------------------------
|
|
378 |
// CMmPacketQoSTsy::GetProfileCapabilities
|
|
379 |
// Returns the QoS capabilities for the current packet service.
|
|
380 |
// The TSY will assign a bitmask for each parameter in the relevant TQoSCaps
|
|
381 |
// class. This bitmask contains all values which can be assigned to the
|
|
382 |
// particular parameter for the current packet service & phone. The bitmask
|
|
383 |
// values will conform to values stated in the QoS-related enum data types
|
|
384 |
// defined in ETelQoS.h
|
|
385 |
//----------------------------------------------------------------------------
|
|
386 |
|
|
387 |
TInt CMmPacketQoSTsy::GetProfileCapabilities(
|
|
388 |
const TTsyReqHandle aTsyReqHandle,
|
|
389 |
TDes8* aProfileCaps )
|
|
390 |
{
|
|
391 |
TFLOGSTRING3("TSY: CMmPacketQoSTsy::GetProfileCapabilities. TsyReqHandle: %d aProfileCaps: %d", aTsyReqHandle, aProfileCaps );
|
|
392 |
|
|
393 |
// Call GetProfileCapabilities from GSM/WCDMA extension
|
|
394 |
TInt ret = iMmPacketQoSGsmWcdmaExt->GetProfileCapabilities(
|
|
395 |
aProfileCaps );
|
|
396 |
|
|
397 |
// Complete the request
|
|
398 |
CMmPacketQoSTsy::ReqCompleted( aTsyReqHandle, ret );
|
|
399 |
return KErrNone;
|
|
400 |
}
|
|
401 |
|
|
402 |
|
|
403 |
//----------------------------------------------------------------------------
|
|
404 |
//CMmPacketQoSTsy::GetProfileParameters
|
|
405 |
// Retrieves all parameters associated with a negotiated profile.
|
|
406 |
//----------------------------------------------------------------------------
|
|
407 |
|
|
408 |
TInt CMmPacketQoSTsy::GetProfileParameters(
|
|
409 |
const TTsyReqHandle aTsyReqHandle,
|
|
410 |
TDes8* aProfile )
|
|
411 |
{
|
|
412 |
TFLOGSTRING3("TSY: CMmPacketQoSTsy::GetProfileParameters. TsyReqHandle: %d aProfile: %d", aTsyReqHandle, aProfile );
|
|
413 |
|
|
414 |
// Call GetProfileParameters method from GSM/WCDMA extension
|
|
415 |
TInt ret = iMmPacketQoSGsmWcdmaExt->GetProfileParameters( aProfile );
|
|
416 |
|
|
417 |
// Complete the request
|
|
418 |
CMmPacketQoSTsy::ReqCompleted( aTsyReqHandle, ret );
|
|
419 |
|
|
420 |
return KErrNone;
|
|
421 |
|
|
422 |
}
|
|
423 |
|
|
424 |
|
|
425 |
//----------------------------------------------------------------------------
|
|
426 |
// CMmPacketQoSTsy::NotifyProfileChanged
|
|
427 |
// Notifies of the change in the negotiated QoS profile.
|
|
428 |
//----------------------------------------------------------------------------
|
|
429 |
|
|
430 |
TInt CMmPacketQoSTsy::NotifyProfileChanged(
|
|
431 |
TDes8* aProfile )
|
|
432 |
{
|
|
433 |
TFLOGSTRING2("TSY: CMmPacketQoSTsy::NotifyProfileChanged. aProfile: %d", aProfile );
|
|
434 |
|
|
435 |
// Set Req Handle
|
|
436 |
iReqHandleType = EMultimodePacketQoSNotifyParameterChanged;
|
|
437 |
|
|
438 |
// Call NotifyProfileChanged-method from GSM/WCDMA extension
|
|
439 |
return iMmPacketQoSGsmWcdmaExt->NotifyProfileChanged( aProfile );
|
|
440 |
|
|
441 |
}
|
|
442 |
|
|
443 |
|
|
444 |
//----------------------------------------------------------------------------
|
|
445 |
// CMmPacketQoSTsy::CompleteNotifyProfileChanged
|
|
446 |
// Completes the notification to client.
|
|
447 |
//----------------------------------------------------------------------------
|
|
448 |
|
|
449 |
void CMmPacketQoSTsy::CompleteNotifyProfileChanged()
|
|
450 |
{
|
|
451 |
TFLOGSTRING("TSY: CMmPacketQoSTsy::CompleteNotifyProfileChanged." );
|
|
452 |
|
|
453 |
// Reset tsy request handle.
|
|
454 |
TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle(
|
|
455 |
EMultimodePacketQoSNotifyParameterChanged ) );
|
|
456 |
|
|
457 |
if ( EMultimodePacketQoSReqHandleUnknown != reqHandle )
|
|
458 |
{
|
|
459 |
|
|
460 |
// Complete the client request
|
|
461 |
CMmPacketQoSTsy::ReqCompleted( reqHandle, KErrNone );
|
|
462 |
|
|
463 |
}
|
|
464 |
}
|
|
465 |
|
|
466 |
//----------------------------------------------------------------------------
|
|
467 |
// CMmPacketQoSTsy::SetProfileParametersL
|
|
468 |
// Allows client pass to the TSY required parameters
|
|
469 |
//----------------------------------------------------------------------------
|
|
470 |
|
|
471 |
TInt CMmPacketQoSTsy::SetProfileParametersL(
|
|
472 |
const TTsyReqHandle aTsyReqHandle,
|
|
473 |
TDes8* aProfile )
|
|
474 |
{
|
|
475 |
TFLOGSTRING3("TSY: CMmPacketQoSTsy::SetProfileParametersL. TsyReqHandle: %d aProfile: %d", aTsyReqHandle, &aProfile );
|
|
476 |
|
|
477 |
// Call SetProfileParametersL from GSM/WCDMA extension
|
|
478 |
TInt ret = iMmPacketQoSGsmWcdmaExt->SetProfileParametersL( aProfile );
|
|
479 |
|
|
480 |
RPacketContext::TContextStatus contextStatus =
|
|
481 |
CMmPacketQoSTsy::PacketContextTsy()->ContextStatus();
|
|
482 |
|
|
483 |
if ( KErrNone == ret )
|
|
484 |
{
|
|
485 |
|
|
486 |
if ( RPacketContext::EStatusActivating != contextStatus &&
|
|
487 |
RPacketContext::EStatusActive != contextStatus)
|
|
488 |
{
|
|
489 |
|
|
490 |
// Store the request handle type
|
|
491 |
iReqHandleType = EMultimodePacketQoSSetProfileParameters;
|
|
492 |
|
|
493 |
}
|
|
494 |
|
|
495 |
else
|
|
496 |
{
|
|
497 |
|
|
498 |
CMmPacketQoSTsy::ReqCompleted( aTsyReqHandle, KErrNone );
|
|
499 |
|
|
500 |
}
|
|
501 |
}
|
|
502 |
|
|
503 |
return ret;
|
|
504 |
|
|
505 |
}
|
|
506 |
|
|
507 |
//----------------------------------------------------------------------------
|
|
508 |
// CMmPacketQoSTsy::CompleteSetProfileParameters
|
|
509 |
// Complete Set Profile Parameters
|
|
510 |
//----------------------------------------------------------------------------
|
|
511 |
|
|
512 |
void CMmPacketQoSTsy::CompleteSetProfileParameters(
|
|
513 |
const TInt aError )
|
|
514 |
{
|
|
515 |
TFLOGSTRING2("TSY: CMmPacketQoSTsy::CompleteSetProfileParameters. Error: %d", aError );
|
|
516 |
|
|
517 |
// Reset the request handle.
|
|
518 |
TTsyReqHandle reqHandle( iTsyReqHandleStore->ResetTsyReqHandle(
|
|
519 |
EMultimodePacketQoSSetProfileParameters ) );
|
|
520 |
|
|
521 |
if ( EMultimodePacketQoSReqHandleUnknown != reqHandle )
|
|
522 |
{
|
|
523 |
|
|
524 |
// Complete the client request
|
|
525 |
CMmPacketQoSTsy::ReqCompleted( reqHandle, aError );
|
|
526 |
|
|
527 |
}
|
|
528 |
|
|
529 |
}
|
|
530 |
|
|
531 |
|
|
532 |
//----------------------------------------------------------------------------
|
|
533 |
// CMmPacketQoSTsy::PacketContextTsy
|
|
534 |
// Return pointer to the CMmPacketContextTsy.
|
|
535 |
//----------------------------------------------------------------------------
|
|
536 |
|
|
537 |
CMmPacketContextTsy* CMmPacketQoSTsy::PacketContextTsy()
|
|
538 |
{
|
|
539 |
return iMmPacketContext;
|
|
540 |
}
|
|
541 |
|
|
542 |
#ifdef REQHANDLE_TIMER
|
|
543 |
|
|
544 |
//----------------------------------------------------------------------------
|
|
545 |
// CMmPacketQoSTsy::SetTypeOfResponse
|
|
546 |
// Sets the type of response for a given Handle.
|
|
547 |
// Automatic mode includes an automatic response in case of non response from
|
|
548 |
// the manufacturer specific layer in a specified time.
|
|
549 |
//----------------------------------------------------------------------------
|
|
550 |
|
|
551 |
void CMmPacketQoSTsy::SetTypeOfResponse(
|
|
552 |
const TInt aReqHandleType,
|
|
553 |
const TTsyReqHandle aTsyReqHandle )
|
|
554 |
{
|
|
555 |
|
|
556 |
if ( EMultimodePacketQoSSetProfileParameters == aReqHandleType )
|
|
557 |
{
|
|
558 |
// The timeout parameter is given in seconds.
|
|
559 |
iTsyReqHandleStore->SetTsyReqHandle( aReqHandleType, aTsyReqHandle,
|
|
560 |
KMmPacketQoSSetProfileParametersTimeOut );
|
|
561 |
}
|
|
562 |
else
|
|
563 |
{
|
|
564 |
// Does not use timer
|
|
565 |
iTsyReqHandleStore->SetTsyReqHandle( aReqHandleType, aTsyReqHandle );
|
|
566 |
}
|
|
567 |
|
|
568 |
}
|
|
569 |
|
|
570 |
//----------------------------------------------------------------------------
|
|
571 |
// CMmPacketQoSTsy::Complete
|
|
572 |
// Completes the request due timer expiration.
|
|
573 |
//----------------------------------------------------------------------------
|
|
574 |
|
|
575 |
void CMmPacketQoSTsy::Complete(
|
|
576 |
const TInt aReqHandleType,
|
|
577 |
const TInt aError )
|
|
578 |
{
|
|
579 |
|
|
580 |
if ( EMultimodePacketQoSSetProfileParameters == aReqHandleType )
|
|
581 |
{
|
|
582 |
CMmPacketQoSTsy::CompleteSetProfileParameters( aError );
|
|
583 |
}
|
|
584 |
else
|
|
585 |
{
|
|
586 |
CMmPacketQoSTsy::ReqCompleted( iTsyReqHandleStore->ResetTsyReqHandle(
|
|
587 |
aReqHandleType ), aError );
|
|
588 |
}
|
|
589 |
|
|
590 |
}
|
|
591 |
#endif //REQHANDLE_TIMER
|
|
592 |
|
|
593 |
#ifdef TF_LOGGING_ENABLED
|
|
594 |
|
|
595 |
//----------------------------------------------------------------------------
|
|
596 |
// CMmPacketQoSTsy::ReqCompleted
|
|
597 |
// Description: Overloads CTelObject::ReqCompleted for logging purposes.
|
|
598 |
// calls CTelObject::ReqCompleted.
|
|
599 |
//----------------------------------------------------------------------------
|
|
600 |
|
|
601 |
void CMmPacketQoSTsy::ReqCompleted(
|
|
602 |
const TTsyReqHandle aTsyReqHandle,
|
|
603 |
const TInt aError )
|
|
604 |
|
|
605 |
{
|
|
606 |
TFLOGSTRING3("TSY: CMmPacketQoSTsy::Request Completed. Handle: %d Error:%d", aTsyReqHandle, aError );
|
|
607 |
|
|
608 |
CTelObject::ReqCompleted( aTsyReqHandle, aError );
|
|
609 |
}
|
|
610 |
|
|
611 |
#endif //TF_LOGGING_ENABLED
|
|
612 |
|
|
613 |
|
|
614 |
// End of File
|