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 <ctsy/tflogger.h>
|
|
19 |
|
|
20 |
#include "CMmCustomTsy.h"
|
|
21 |
#include "CMmPacketTsy.h"
|
|
22 |
#include "Cmmpacketcontexttsy.h"
|
|
23 |
#include "Cmmpacketcontextlist.h"
|
|
24 |
|
|
25 |
// ======== MEMBER FUNCTIONS ========
|
|
26 |
|
|
27 |
CMmPacketTsy::CMmPacketTsy()
|
|
28 |
{
|
|
29 |
}
|
|
30 |
|
|
31 |
void CMmPacketTsy::ConstructL()
|
|
32 |
{
|
|
33 |
#ifdef REQHANDLE_TIMER
|
|
34 |
// Create req handle store
|
|
35 |
iTsyReqHandleStore = CMmTsyReqHandleStore::NewL( iMmCustomTsy,
|
|
36 |
iMmPhone, EMultimodePacketMaxNumOfRequests, iPacketReqHandles );
|
|
37 |
#else
|
|
38 |
// Create req handle store
|
|
39 |
iTsyReqHandleStore = CMmTsyReqHandleStore::NewL(
|
|
40 |
EMultimodePacketMaxNumOfRequests, iPacketReqHandles );
|
|
41 |
#endif // REQHANDLE_TIMER
|
|
42 |
|
|
43 |
iGprsInformationPckg = NULL;
|
|
44 |
}
|
|
45 |
|
|
46 |
CMmPacketTsy* CMmPacketTsy::NewL(
|
|
47 |
CMmCustomTsy* aMmCustomTsy,
|
|
48 |
CMmPhoneTsy* aMmPhone )
|
|
49 |
{
|
|
50 |
TFLOGSTRING( "CustomTSY: CMmPacketTsy::NewL" );
|
|
51 |
CMmPacketTsy* mmPacketTsy = new ( ELeave ) CMmPacketTsy();
|
|
52 |
CleanupStack::PushL( mmPacketTsy );
|
|
53 |
mmPacketTsy->iMmCustomTsy = aMmCustomTsy;
|
|
54 |
mmPacketTsy->iMmPhone = aMmPhone;
|
|
55 |
mmPacketTsy->ConstructL();
|
|
56 |
CleanupStack::Pop();
|
|
57 |
|
|
58 |
return mmPacketTsy;
|
|
59 |
}
|
|
60 |
|
|
61 |
CMmPacketTsy::~CMmPacketTsy()
|
|
62 |
{
|
|
63 |
TFLOGSTRING( "CustomTSY: CMmPacketTsy::~CMmPacketTsy" );
|
|
64 |
delete iTsyReqHandleStore;
|
|
65 |
}
|
|
66 |
|
|
67 |
// ---------------------------------------------------------------------------
|
|
68 |
// CMmPacketTsy::Init
|
|
69 |
// Initialisation method that is called from ETel Server.
|
|
70 |
// (other items were commented in a header).
|
|
71 |
// ---------------------------------------------------------------------------
|
|
72 |
//
|
|
73 |
void CMmPacketTsy::Init()
|
|
74 |
{
|
|
75 |
}
|
|
76 |
|
|
77 |
// ---------------------------------------------------------------------------
|
|
78 |
// CMmPacketTsy::RegisterNotification
|
|
79 |
// RegisterNotification is called when the ETel Server recognises that this
|
|
80 |
// notification is being posted for the first time on this subsession object.
|
|
81 |
// It enables the TSY to "turn on" any regular notification messages that it
|
|
82 |
// may receive from DOS.
|
|
83 |
// (other items were commented in a header).
|
|
84 |
// ---------------------------------------------------------------------------
|
|
85 |
//
|
|
86 |
TInt CMmPacketTsy::RegisterNotification(
|
|
87 |
const TInt aIpc )
|
|
88 |
{
|
|
89 |
TInt ret( KErrNotSupported );
|
|
90 |
|
|
91 |
if ( ECustomNotifyEGprsInfoChange == aIpc )
|
|
92 |
{
|
|
93 |
ret = KErrNone;
|
|
94 |
}
|
|
95 |
|
|
96 |
return ret;
|
|
97 |
}
|
|
98 |
|
|
99 |
// ---------------------------------------------------------------------------
|
|
100 |
// CMmPacketTsy::DeregisterNotification
|
|
101 |
// DeregisterNotification is called when the ETel Server recognises that this
|
|
102 |
// notification will not be posted again because the last client to have
|
|
103 |
// a handle on this sub-session object has just closed the handle. It
|
|
104 |
// enables the TSY to "turn off" any regular notification messages that
|
|
105 |
// it may receive from DOS.
|
|
106 |
// (other items were commented in a header).
|
|
107 |
// ---------------------------------------------------------------------------
|
|
108 |
//
|
|
109 |
TInt CMmPacketTsy::DeregisterNotification(
|
|
110 |
const TInt aIpc )
|
|
111 |
{
|
|
112 |
TInt ret( KErrNotSupported );
|
|
113 |
|
|
114 |
if ( ECustomNotifyEGprsInfoChange == aIpc )
|
|
115 |
{
|
|
116 |
ret = KErrNone;
|
|
117 |
}
|
|
118 |
|
|
119 |
return ret;
|
|
120 |
}
|
|
121 |
|
|
122 |
// ---------------------------------------------------------------------------
|
|
123 |
// CMmPacketTsy::SupportingIPC
|
|
124 |
// Use switch to check if given IPC is supported
|
|
125 |
// in case IPC supported
|
|
126 |
// return ETrue
|
|
127 |
// in case IPC not supported
|
|
128 |
// return EFalse
|
|
129 |
// (other items were commented in a header).
|
|
130 |
// ---------------------------------------------------------------------------
|
|
131 |
//
|
|
132 |
TBool CMmPacketTsy::SupportingIPC(
|
|
133 |
TInt aIpc )
|
|
134 |
{
|
|
135 |
TBool ret( EFalse );
|
|
136 |
switch ( aIpc )
|
|
137 |
{
|
|
138 |
// from CustomApi
|
|
139 |
case ECustomNotifyEGprsInfoChange:
|
|
140 |
case ECustomGetEGprsInfo:
|
|
141 |
case ECustomSetAlwaysOnMode:
|
|
142 |
ret = ETrue;
|
|
143 |
break;
|
|
144 |
default:
|
|
145 |
ret = EFalse;
|
|
146 |
break;
|
|
147 |
}
|
|
148 |
|
|
149 |
return ret;
|
|
150 |
}
|
|
151 |
|
|
152 |
// ---------------------------------------------------------------------------
|
|
153 |
// CMmPacketTsy::DoExtFuncL
|
|
154 |
// Dispatches extension function requests.
|
|
155 |
// (other items were commented in a header).
|
|
156 |
// ---------------------------------------------------------------------------
|
|
157 |
//
|
|
158 |
TInt CMmPacketTsy::DoExtFuncL(
|
|
159 |
const TTsyReqHandle aTsyReqHandle,
|
|
160 |
const TInt aIpc,
|
|
161 |
const TDataPackage& aPackage )
|
|
162 |
{
|
|
163 |
TFLOGSTRING3( "CustomTSY: CMmPacketTsy::DoExtFuncL - IPC:%d Handle:%d", aIpc, aTsyReqHandle );
|
|
164 |
TInt ret( KErrNotSupported );
|
|
165 |
|
|
166 |
switch ( aIpc )
|
|
167 |
{
|
|
168 |
case ECustomNotifyEGprsInfoChange:
|
|
169 |
ret = NotifyEGprsInfoChange( aTsyReqHandle, aPackage.Des1n() );
|
|
170 |
break;
|
|
171 |
case ECustomGetEGprsInfo:
|
|
172 |
ret = GetEGprsInfo( aTsyReqHandle, aPackage.Des1n() );
|
|
173 |
break;
|
|
174 |
case ECustomSetAlwaysOnMode:
|
|
175 |
TFLOGSTRING( "TSY:CMmPacketTsy::DoExtFuncL ECustomSetAlwaysOnMode");
|
|
176 |
ret = SetAlwaysOnL( aTsyReqHandle,
|
|
177 |
( REINTERPRET_CAST( RMmCustomAPI::TSetAlwaysOnMode*,
|
|
178 |
aPackage.Ptr1() ) ) );
|
|
179 |
default:
|
|
180 |
break;
|
|
181 |
}
|
|
182 |
|
|
183 |
return ret;
|
|
184 |
}
|
|
185 |
|
|
186 |
// ---------------------------------------------------------------------------
|
|
187 |
// CMmPacketTsy::ReqModeL
|
|
188 |
// Returns request mode for given IPC.
|
|
189 |
// (other items were commented in a header).
|
|
190 |
// ---------------------------------------------------------------------------
|
|
191 |
//
|
|
192 |
CTelObject::TReqMode CMmPacketTsy::ReqModeL(
|
|
193 |
const TInt aIpc )
|
|
194 |
{
|
|
195 |
CTelObject::TReqMode reqMode( 0 );
|
|
196 |
|
|
197 |
switch ( aIpc )
|
|
198 |
{
|
|
199 |
// Etel Server takes care of flow control. Several simultaneous
|
|
200 |
// requests allowed.
|
|
201 |
|
|
202 |
// All disabled
|
|
203 |
// TSYs wishing to implement their own buffering algorithm will place
|
|
204 |
// all requests in this category.
|
|
205 |
|
|
206 |
// Get methods that do not use DOS and return immediately.
|
|
207 |
// Flow control not required.
|
|
208 |
|
|
209 |
// Methods that can probably take a long time and cannot therefore be
|
|
210 |
// flow controlled. Solution: All these methods must check req handle
|
|
211 |
// table before handling the request. If the request table indicates
|
|
212 |
// that same method has been called and has not been completed, the
|
|
213 |
// method should return KErrServerBusy.
|
|
214 |
case ECustomGetEGprsInfo:
|
|
215 |
case ECustomSetAlwaysOnMode:
|
|
216 |
break;
|
|
217 |
|
|
218 |
// KReqModeMultipleCompletionEnabled | ReqModePostImmediately
|
|
219 |
// Requests that notify a client about a change of state.
|
|
220 |
// Since these requests do not require the issuing of any modem
|
|
221 |
// commands, they do not have to obey flow control.
|
|
222 |
// The TSY never gets more than one of these outstanding.
|
|
223 |
case ECustomNotifyEGprsInfoChange:
|
|
224 |
reqMode = KReqModeMultipleCompletionEnabled |
|
|
225 |
KReqModeRePostImmediately;
|
|
226 |
break;
|
|
227 |
// KReqModeFlowControlObeyed
|
|
228 |
// Commands that change the state of the phone, e.g. clearing the AoC
|
|
229 |
// counter, are commands that the TSY should only deal with one at
|
|
230 |
// a time.
|
|
231 |
|
|
232 |
//Other cases
|
|
233 |
//reqMode = KReqModeFlowControlObeyed;
|
|
234 |
//break;
|
|
235 |
|
|
236 |
default:
|
|
237 |
User::Leave( KErrNotSupported );
|
|
238 |
break;
|
|
239 |
}
|
|
240 |
|
|
241 |
return reqMode;
|
|
242 |
}
|
|
243 |
|
|
244 |
// ---------------------------------------------------------------------------
|
|
245 |
// CMmPacketTsy::NumberOfSlotsL
|
|
246 |
// Returns number of slots to be used for given IPC.
|
|
247 |
// (other items were commented in a header).
|
|
248 |
// ---------------------------------------------------------------------------
|
|
249 |
//
|
|
250 |
TInt CMmPacketTsy::NumberOfSlotsL(
|
|
251 |
const TInt aIpc )
|
|
252 |
{
|
|
253 |
TInt numberOfSlots( KMmCustomDefaultSlots );
|
|
254 |
|
|
255 |
switch ( aIpc )
|
|
256 |
{
|
|
257 |
// from CustomApi
|
|
258 |
case ECustomNotifyEGprsInfoChange:
|
|
259 |
case ECustomGetEGprsInfo:
|
|
260 |
case ECustomSetAlwaysOnMode:
|
|
261 |
break;
|
|
262 |
default:
|
|
263 |
// Unknown or invalid IPC
|
|
264 |
User::Leave( KErrNotSupported );
|
|
265 |
break;
|
|
266 |
}
|
|
267 |
|
|
268 |
return numberOfSlots;
|
|
269 |
}
|
|
270 |
|
|
271 |
// ---------------------------------------------------------------------------
|
|
272 |
// CMmPacketTsy::CancelService
|
|
273 |
// This function is called to cancel the outstanding request.
|
|
274 |
// (other items were commented in a header).
|
|
275 |
// ---------------------------------------------------------------------------
|
|
276 |
//
|
|
277 |
TInt CMmPacketTsy::CancelService(
|
|
278 |
const TInt aIpc,
|
|
279 |
const TTsyReqHandle aTsyReqHandle )
|
|
280 |
{
|
|
281 |
TFLOGSTRING2( "CustomTSY: CMmPacketTsy::CancelService IPC:%d", aIpc );
|
|
282 |
TInt ret( KErrNone );
|
|
283 |
|
|
284 |
// Req handle type
|
|
285 |
TPacketRequestType reqHandletype(
|
|
286 |
EMultimodePacketContextReqHandleUnknown );
|
|
287 |
|
|
288 |
switch ( aIpc )
|
|
289 |
{
|
|
290 |
// TSY has started a request and it is not possible to then cancel
|
|
291 |
// this request. The best thing for the TSY to do in this case is to
|
|
292 |
// proceed as though the Cancel never happened. The server's call to
|
|
293 |
// the TSY cancel function will return synchronously. The TSY then
|
|
294 |
// continues to wait for the original acknowledgement and when it
|
|
295 |
// receives it, the TSY will complete the original request.
|
|
296 |
case ECustomGetEGprsInfo:
|
|
297 |
break;
|
|
298 |
|
|
299 |
case ECustomSetAlwaysOnMode:
|
|
300 |
CancelSetAlwaysOn ( aTsyReqHandle );
|
|
301 |
break;
|
|
302 |
|
|
303 |
// Notification Cancels, no special requirements.
|
|
304 |
case ECustomNotifyEGprsInfoChange:
|
|
305 |
iGprsInformationPckg = NULL;
|
|
306 |
reqHandletype = EMultimodePacketContextNotifyEGprsInfoChange;
|
|
307 |
break;
|
|
308 |
// Cancel methods that are not supported
|
|
309 |
// Default case
|
|
310 |
default:
|
|
311 |
ret = KErrNotSupported;
|
|
312 |
break;
|
|
313 |
}
|
|
314 |
|
|
315 |
if ( reqHandletype != EMultimodePacketContextReqHandleUnknown )
|
|
316 |
{
|
|
317 |
// Reset tsy request handle
|
|
318 |
iTsyReqHandleStore->ResetTsyReqHandle( reqHandletype );
|
|
319 |
|
|
320 |
// Complete request to client with KErrCancel
|
|
321 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
322 |
}
|
|
323 |
|
|
324 |
return ret;
|
|
325 |
}
|
|
326 |
|
|
327 |
// ---------------------------------------------------------------------------
|
|
328 |
// CMmPacketTsy::ReqCompleted
|
|
329 |
// Overloads CTelObject::ReqCompleted for logging purposes.
|
|
330 |
// (other items were commented in a header).
|
|
331 |
// ---------------------------------------------------------------------------
|
|
332 |
//
|
|
333 |
void CMmPacketTsy::ReqCompleted(
|
|
334 |
const TTsyReqHandle aTsyReqHandle,
|
|
335 |
const TInt aError )
|
|
336 |
{
|
|
337 |
TFLOGSTRING3( "CustomTSY: CMmPacketTsy::ReqCompleted Handle:%d Error:%d", aTsyReqHandle, aError );
|
|
338 |
iMmCustomTsy->ReqCompleted( aTsyReqHandle, aError );
|
|
339 |
}
|
|
340 |
|
|
341 |
// ---------------------------------------------------------------------------
|
|
342 |
// CMmPacketTsy::NotifyEGprsInfoChange
|
|
343 |
// Request notification when EGPRS support changes.
|
|
344 |
// (other items were commented in a header).
|
|
345 |
// ---------------------------------------------------------------------------
|
|
346 |
//
|
|
347 |
TInt CMmPacketTsy::NotifyEGprsInfoChange(
|
|
348 |
const TTsyReqHandle aTsyReqHandle,
|
|
349 |
TDes8* aGprsInformation )
|
|
350 |
{
|
|
351 |
TFLOGSTRING( "CustomTSY: CMmPacketTsy::NotifyEGprsInfoChange" );
|
|
352 |
|
|
353 |
RMmCustomAPI::TGprsInformation temp;
|
|
354 |
RMmCustomAPI::TGprsInformationPckg tempPckg(temp);
|
|
355 |
|
|
356 |
TInt expectedLength = tempPckg.MaxLength();
|
|
357 |
TInt paramLength = aGprsInformation->MaxLength();
|
|
358 |
|
|
359 |
TInt ret = KErrArgument;
|
|
360 |
if (expectedLength == paramLength)
|
|
361 |
{
|
|
362 |
// Store pointer of Gprs information package
|
|
363 |
iGprsInformationPckg =
|
|
364 |
( RMmCustomAPI::TGprsInformationPckg* ) aGprsInformation;
|
|
365 |
|
|
366 |
// Store request handle
|
|
367 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
368 |
EMultimodePacketContextNotifyEGprsInfoChange, aTsyReqHandle );
|
|
369 |
ret = KErrNone;
|
|
370 |
}
|
|
371 |
|
|
372 |
return ret;
|
|
373 |
}
|
|
374 |
|
|
375 |
// ---------------------------------------------------------------------------
|
|
376 |
// CMmPacketTsy::GetEGprsInfo
|
|
377 |
// Informs client about EGPRS information.
|
|
378 |
// (other items were commented in a header).
|
|
379 |
// ---------------------------------------------------------------------------
|
|
380 |
//
|
|
381 |
TInt CMmPacketTsy::GetEGprsInfo(
|
|
382 |
const TTsyReqHandle aTsyReqHandle,
|
|
383 |
TDes8* aGprsInformation )
|
|
384 |
{
|
|
385 |
TFLOGSTRING( "CustomTSY: CMmPacketTsy::GetEGprsInfo" );
|
|
386 |
|
|
387 |
RMmCustomAPI::TGprsInformation temp;
|
|
388 |
RMmCustomAPI::TGprsInformationPckg tempPckg(temp);
|
|
389 |
|
|
390 |
TInt expectedLength = tempPckg.MaxLength();
|
|
391 |
TInt paramLength = aGprsInformation->MaxLength();
|
|
392 |
|
|
393 |
TInt ret = KErrArgument;
|
|
394 |
if (expectedLength == paramLength && iMmCustomTsy)
|
|
395 |
{
|
|
396 |
RMmCustomAPI::TGprsInformationPckg* gprsInformationPckg =
|
|
397 |
( RMmCustomAPI::TGprsInformationPckg* ) aGprsInformation;
|
|
398 |
|
|
399 |
// Unpack gprsInformationPckg
|
|
400 |
RMmCustomAPI::TGprsInformation& gprsInformation =
|
|
401 |
( *gprsInformationPckg )();
|
|
402 |
TBool edgeGprsSupportInCell;
|
|
403 |
|
|
404 |
if ( !iMmCustomTsy->Phone()
|
|
405 |
|| !iMmCustomTsy->Phone()->PacketDataSession()
|
|
406 |
|| !iMmCustomTsy->Phone()->PacketDataSession()->
|
|
407 |
ActivePacketServiceExtension() )
|
|
408 |
{
|
|
409 |
// returns false if EGPRS support failed
|
|
410 |
edgeGprsSupportInCell = EFalse;
|
|
411 |
}
|
|
412 |
else
|
|
413 |
{
|
|
414 |
// returns information if EGPRS connection supported
|
|
415 |
edgeGprsSupportInCell = iMmCustomTsy->Phone()->PacketDataSession()->
|
|
416 |
ActivePacketServiceExtension()->EGprsSupportInCell();
|
|
417 |
}
|
|
418 |
|
|
419 |
// if gprsSupportInCell is ETrue -> cell is supporting EGPRS connection
|
|
420 |
if ( edgeGprsSupportInCell )
|
|
421 |
{
|
|
422 |
TFLOGSTRING( "CustomTSY: CMmPacketTsy::GetEGprsInfo RMmCustomAPI::EEdgeGprs" );
|
|
423 |
gprsInformation.iGprsInfo = RMmCustomAPI::EEdgeGprs;
|
|
424 |
}
|
|
425 |
|
|
426 |
// else EGPRS connection is not supported
|
|
427 |
else
|
|
428 |
{
|
|
429 |
TFLOGSTRING( "CustomTSY: CMmPacketTsy::GetEGprsInfo RMmCustomAPI::EGprs" );
|
|
430 |
gprsInformation.iGprsInfo = RMmCustomAPI::EGprs;
|
|
431 |
}
|
|
432 |
|
|
433 |
ret = KErrNone;
|
|
434 |
|
|
435 |
// Complete the client request
|
|
436 |
ReqCompleted( aTsyReqHandle, ret );
|
|
437 |
}
|
|
438 |
|
|
439 |
return ret;
|
|
440 |
}
|
|
441 |
|
|
442 |
// ---------------------------------------------------------------------------
|
|
443 |
// CMmPacketTsy::CompleteNotifyEGprsInfoChange
|
|
444 |
// Completes EGPRS notification request to Client.
|
|
445 |
// (other items were commented in a header).
|
|
446 |
// ---------------------------------------------------------------------------
|
|
447 |
//
|
|
448 |
void CMmPacketTsy::CompleteNotifyEGprsInfoChange(
|
|
449 |
const TBool aGprsSupportInCell )
|
|
450 |
{
|
|
451 |
TFLOGSTRING( "CustomTSY: CMmPacketTsy::CompleteNotifyEGprsInfoChange" );
|
|
452 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
453 |
EMultimodePacketContextNotifyEGprsInfoChange );
|
|
454 |
|
|
455 |
if ( EMultimodePacketContextReqHandleUnknown != reqHandle )
|
|
456 |
{
|
|
457 |
// Unpack iGprsInformationPckg
|
|
458 |
RMmCustomAPI::TGprsInformation& gprsInformation =
|
|
459 |
( *iGprsInformationPckg )();
|
|
460 |
|
|
461 |
// if aGprsSupportInCell is ETrue -> cell is supporting edge GPRS
|
|
462 |
if ( aGprsSupportInCell )
|
|
463 |
{
|
|
464 |
TFLOGSTRING( "CustomTSY: CMmPacketTsy::CompleteNotifyEGprsInfoChange RMmCustomAPI::EEdgeGprs" );
|
|
465 |
gprsInformation.iGprsInfo = RMmCustomAPI::EEdgeGprs;
|
|
466 |
}
|
|
467 |
|
|
468 |
// if aGprsSupportInCell is EFalse -> cell is not supporting edge GPRS
|
|
469 |
else
|
|
470 |
{
|
|
471 |
TFLOGSTRING( "CustomTSY: CMmPacketTsy::CompleteNotifyEGprsInfoChange RMmCustomAPI::EGprs" );
|
|
472 |
gprsInformation.iGprsInfo = RMmCustomAPI::EGprs;
|
|
473 |
}
|
|
474 |
|
|
475 |
iGprsInformationPckg = NULL;
|
|
476 |
|
|
477 |
// Complete the client request
|
|
478 |
ReqCompleted( reqHandle, KErrNone );
|
|
479 |
}
|
|
480 |
}
|
|
481 |
|
|
482 |
//-----------------------------------------------------------------------------
|
|
483 |
// CMmPacketTsy::SetAlwaysOnL
|
|
484 |
// Requests Set Always On with mode given as parameter aMode
|
|
485 |
// (other items were commented in a header).
|
|
486 |
//-----------------------------------------------------------------------------
|
|
487 |
//
|
|
488 |
TInt CMmPacketTsy::SetAlwaysOnL(
|
|
489 |
TTsyReqHandle aTsyReqHandle,
|
|
490 |
RMmCustomAPI::TSetAlwaysOnMode* aMode )
|
|
491 |
{
|
|
492 |
TFLOGSTRING2( "CMmPacketTsy::SetAlwaysOn Reg Handle = %d", aTsyReqHandle );
|
|
493 |
|
|
494 |
TInt ret( KErrGeneral );
|
|
495 |
|
|
496 |
|
|
497 |
//Save requested mode
|
|
498 |
iAllwaysOnMode = ( *aMode );
|
|
499 |
//Get packetdata session
|
|
500 |
CMmPacketServiceTsy* packetDataSession = iMmPhone->PacketDataSession();
|
|
501 |
|
|
502 |
if ( NULL != packetDataSession )
|
|
503 |
{
|
|
504 |
//request set allways on
|
|
505 |
ret = packetDataSession->SetAlwaysOnL( aTsyReqHandle, iAllwaysOnMode );
|
|
506 |
}
|
|
507 |
else
|
|
508 |
{
|
|
509 |
TFLOGSTRING( "CMmPacketTsy::SetAlwaysOn packetDataSession is NULL " );
|
|
510 |
}
|
|
511 |
|
|
512 |
return ret;
|
|
513 |
}
|
|
514 |
|
|
515 |
//-----------------------------------------------------------------------------
|
|
516 |
// CMmPacketTsy::CompleteSetAlwaysOn
|
|
517 |
// Completes Set Always On request
|
|
518 |
// (other items were commented in a header).
|
|
519 |
//-----------------------------------------------------------------------------
|
|
520 |
//
|
|
521 |
void CMmPacketTsy::CompleteSetAlwaysOn(
|
|
522 |
TTsyReqHandle aReqHandle,
|
|
523 |
TInt aError )
|
|
524 |
{
|
|
525 |
TFLOGSTRING( "CMmPacketTsy::CompleteSetAlwaysOn" );
|
|
526 |
|
|
527 |
ReqCompleted( aReqHandle, aError );
|
|
528 |
|
|
529 |
}
|
|
530 |
|
|
531 |
//-----------------------------------------------------------------------------
|
|
532 |
// CMmPacketTsy::CancelSetAlwaysOn
|
|
533 |
// Cancels Set Always On request
|
|
534 |
// (other items were commented in a header).
|
|
535 |
//-----------------------------------------------------------------------------
|
|
536 |
//
|
|
537 |
void CMmPacketTsy::CancelSetAlwaysOn( TTsyReqHandle aReqHandle )
|
|
538 |
{
|
|
539 |
TFLOGSTRING( "CMmPacketTsy::CancelSetAlwaysOn" );
|
|
540 |
|
|
541 |
//Direct request to Service Tsy
|
|
542 |
iMmPhone->PacketDataSession()->CancelSetAlwaysOn( aReqHandle );
|
|
543 |
|
|
544 |
}
|
|
545 |
|
|
546 |
#ifdef REQHANDLE_TIMER
|
|
547 |
// ---------------------------------------------------------------------------
|
|
548 |
// CMmPacketTsy::SetTypeOfResponse
|
|
549 |
// Sets the type of response for a given handle.
|
|
550 |
// (other items were commented in a header).
|
|
551 |
// ---------------------------------------------------------------------------
|
|
552 |
//
|
|
553 |
void CMmPacketTsy::SetTypeOfResponse(
|
|
554 |
const TInt /*aReqHandleType*/,
|
|
555 |
const TTsyReqHandle /*aTsyReqHandle*/)
|
|
556 |
{
|
|
557 |
}
|
|
558 |
|
|
559 |
// ---------------------------------------------------------------------------
|
|
560 |
// CMmPacketTsy::Complete
|
|
561 |
// Completes the request due the timer expiration
|
|
562 |
// (other items were commented in a header).
|
|
563 |
// ---------------------------------------------------------------------------
|
|
564 |
//
|
|
565 |
void CMmPacketTsy::Complete(
|
|
566 |
TInt /*aReqHandleType*/,
|
|
567 |
TInt /*aError*/ )
|
|
568 |
{
|
|
569 |
}
|
|
570 |
#endif // REQHANDLE_TIMER
|
|
571 |
|
|
572 |
|
|
573 |
// End of File
|
|
574 |
|