24
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Sony Ericsson Mobile Communications AB
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Sony Ericsson Mobile Communications AB - initial contribution.
|
|
11 |
* Nokia Corporation - additional changes.
|
|
12 |
*
|
|
13 |
* Contributors:
|
|
14 |
*
|
|
15 |
* Description:
|
|
16 |
* Code for CTelephonyFunctions class, used by CTelephony class.
|
|
17 |
*
|
|
18 |
*/
|
|
19 |
|
|
20 |
|
|
21 |
/**
|
|
22 |
@file
|
|
23 |
*/
|
|
24 |
|
|
25 |
#include <e32def.h>
|
|
26 |
#include <etel3rdparty.h>
|
|
27 |
#include "TelephonyFunctions.h"
|
|
28 |
|
|
29 |
|
|
30 |
// Constructors
|
|
31 |
|
|
32 |
EXPORT_C CTelephony* CTelephony::NewLC()
|
|
33 |
/**
|
|
34 |
Constructs a CTelephony object.
|
|
35 |
|
|
36 |
A pointer to this object is left on the CleanupStack.
|
|
37 |
|
|
38 |
The returned pointer is typically assigned to a pointer-variable
|
|
39 |
on the stack.
|
|
40 |
|
|
41 |
@return Pointer to a newly created CTelephony object.
|
|
42 |
*/
|
|
43 |
{
|
|
44 |
CTelephony* self=new (ELeave) CTelephony();
|
|
45 |
CleanupStack::PushL(self);
|
|
46 |
self->ConstructL();
|
|
47 |
return self;
|
|
48 |
}
|
|
49 |
|
|
50 |
EXPORT_C CTelephony* CTelephony::NewL()
|
|
51 |
/**
|
|
52 |
Constructs a CTelephony object.
|
|
53 |
|
|
54 |
No pointer to this object is left on the CleanupStack.
|
|
55 |
|
|
56 |
The returned pointer is typically assigned to a pointer-variable
|
|
57 |
stored in the Heap.
|
|
58 |
|
|
59 |
@return Pointer to a newly created CTelephony object.
|
|
60 |
*/
|
|
61 |
{
|
|
62 |
CTelephony* self=NewLC();
|
|
63 |
CleanupStack::Pop();
|
|
64 |
return self;
|
|
65 |
}
|
|
66 |
|
|
67 |
// Destructors
|
|
68 |
|
|
69 |
CTelephony::~CTelephony() // virtual, so no export
|
|
70 |
/**
|
|
71 |
Destructor
|
|
72 |
|
|
73 |
Deletes the underlying CTelephonyFunctions object.
|
|
74 |
*/
|
|
75 |
{
|
|
76 |
delete iTelephonyFunctions;
|
|
77 |
}
|
|
78 |
|
|
79 |
|
|
80 |
/**
|
|
81 |
This method is no longer supported.
|
|
82 |
|
|
83 |
@return KErrNotSupported
|
|
84 |
@publishedAll
|
|
85 |
@deprecated
|
|
86 |
*/
|
|
87 |
EXPORT_C TInt CTelephony::FindDeviceStatus(TInt& /*aCallStatus*/)
|
|
88 |
{
|
|
89 |
return KErrNotSupported;
|
|
90 |
}
|
|
91 |
|
|
92 |
|
|
93 |
/**
|
|
94 |
This method is no longer supported.
|
|
95 |
|
|
96 |
It was used to establish a circuit-switched data call, but support was removed
|
|
97 |
as functionality was no longer required by licensees. Developers should
|
|
98 |
consider using GPRS via RConnection and RSocket for data functionality instead.
|
|
99 |
|
|
100 |
@return KErrNotSupported
|
|
101 |
@publishedAll
|
|
102 |
@deprecated
|
|
103 |
@see RConnection
|
|
104 |
@see RSocket
|
|
105 |
@see RMobilePhone
|
|
106 |
*/
|
|
107 |
EXPORT_C TInt CTelephony::EstablishDataCall(TInt& /*aDataChannel*/, const TDesC& /*aDialNumber*/)
|
|
108 |
{
|
|
109 |
return KErrNotSupported;
|
|
110 |
}
|
|
111 |
|
|
112 |
|
|
113 |
/**
|
|
114 |
This method is no longer supported.
|
|
115 |
|
|
116 |
It was used to establish a circuit-switched data call, but support was removed
|
|
117 |
as functionality was no longer required by licensees. Developers should
|
|
118 |
consider using GPRS via RConnection and RSocket for data functionality instead.
|
|
119 |
|
|
120 |
@publishedAll
|
|
121 |
@deprecated
|
|
122 |
@see RConnection
|
|
123 |
@see RSocket
|
|
124 |
@see RMobilePhone
|
|
125 |
*/
|
|
126 |
EXPORT_C void CTelephony::EstablishDataCall(TRequestStatus& aRequestStatus, TInt& /*aDataChannel*/,
|
|
127 |
const TDesC& /*aDialNumber*/)
|
|
128 |
{
|
|
129 |
TRequestStatus* reqStatusPtr = &aRequestStatus;
|
|
130 |
|
|
131 |
User::RequestComplete(reqStatusPtr, KErrNotSupported);
|
|
132 |
}
|
|
133 |
|
|
134 |
|
|
135 |
/**
|
|
136 |
This method is no longer supported.
|
|
137 |
|
|
138 |
It was used to terminate a circuit-switched data call, but support was removed
|
|
139 |
as functionality was no longer required by licensees. Developers should
|
|
140 |
consider using GPRS via RConnection and RSocket for data functionality instead.
|
|
141 |
|
|
142 |
@return KErrNotSupported
|
|
143 |
@publishedAll
|
|
144 |
@deprecated
|
|
145 |
@see RConnection
|
|
146 |
@see RSocket
|
|
147 |
@see RMobilePhone
|
|
148 |
*/
|
|
149 |
EXPORT_C TInt CTelephony::TerminateDataCall()
|
|
150 |
{
|
|
151 |
return KErrNotSupported;
|
|
152 |
}
|
|
153 |
|
|
154 |
|
|
155 |
/**
|
|
156 |
This method is no longer supported.
|
|
157 |
|
|
158 |
It was used to receive a circuit-switched data call, but support was removed
|
|
159 |
as functionality was no longer required by licensees. Developers should
|
|
160 |
consider using GPRS via RConnection and RSocket for data functionality instead.
|
|
161 |
|
|
162 |
@return KErrNotSupported
|
|
163 |
@publishedAll
|
|
164 |
@deprecated
|
|
165 |
@see RConnection
|
|
166 |
@see RSocket
|
|
167 |
@see RMobilePhone
|
|
168 |
*/
|
|
169 |
EXPORT_C TInt CTelephony::ReceiveDataCall(TInt& /*aDataChannel*/)
|
|
170 |
{
|
|
171 |
return KErrNotSupported;
|
|
172 |
}
|
|
173 |
|
|
174 |
|
|
175 |
/**
|
|
176 |
This method is no longer supported.
|
|
177 |
|
|
178 |
It was used to receive a circuit-switched data call, but support was removed
|
|
179 |
as functionality was no longer required by licensees. Developers should
|
|
180 |
consider using GPRS via RConnection and RSocket for data functionality instead.
|
|
181 |
|
|
182 |
@publishedAll
|
|
183 |
@deprecated
|
|
184 |
@see RConnection
|
|
185 |
@see RSocket
|
|
186 |
@see RMobilePhone
|
|
187 |
*/
|
|
188 |
EXPORT_C void CTelephony::ReceiveDataCall(TRequestStatus& aRequestStatus, TInt& /*aDataChannel*/)
|
|
189 |
{
|
|
190 |
TRequestStatus* reqStatusPtr = &aRequestStatus;
|
|
191 |
|
|
192 |
User::RequestComplete(reqStatusPtr, KErrNotSupported);
|
|
193 |
}
|
|
194 |
|
|
195 |
|
|
196 |
/**
|
|
197 |
This method is no longer supported.
|
|
198 |
|
|
199 |
It was used to cancel an outstanding request to establish a circuit-switched
|
|
200 |
data call, but support was removed as functionality was no longer required by
|
|
201 |
licensees. Developers should consider using GPRS via RConnection and RSocket
|
|
202 |
for data functionality instead.
|
|
203 |
|
|
204 |
@publishedAll
|
|
205 |
@deprecated
|
|
206 |
@see RConnection
|
|
207 |
@see RSocket
|
|
208 |
@see RMobilePhone
|
|
209 |
*/
|
|
210 |
EXPORT_C void CTelephony::CancelEstablishDataCall()
|
|
211 |
{
|
|
212 |
return;
|
|
213 |
}
|
|
214 |
|
|
215 |
|
|
216 |
/**
|
|
217 |
This method is no longer supported.
|
|
218 |
|
|
219 |
It was used to cancel an outstanding request to receive a circuit-switched data
|
|
220 |
call, but support was removed as functionality was no longer required by
|
|
221 |
licensees. Developers should consider using GPRS via RConnection and RSocket
|
|
222 |
for data functionality instead.
|
|
223 |
|
|
224 |
@publishedAll
|
|
225 |
@deprecated
|
|
226 |
@see RConnection
|
|
227 |
@see RSocket
|
|
228 |
@see RMobilePhone
|
|
229 |
*/
|
|
230 |
EXPORT_C void CTelephony::CancelReceiveDataCall()
|
|
231 |
{
|
|
232 |
return;
|
|
233 |
}
|
|
234 |
|
|
235 |
|
|
236 |
// constructor support
|
|
237 |
// Not exported, as used only by functions inside this DLL, eg NewLC()
|
|
238 |
|
|
239 |
CTelephony::CTelephony()
|
|
240 |
//
|
|
241 |
//First-phase constructor
|
|
242 |
//
|
|
243 |
//Private function which cannot Leave().
|
|
244 |
//
|
|
245 |
{
|
|
246 |
}
|
|
247 |
|
|
248 |
|
|
249 |
// Class member functions
|
|
250 |
|
|
251 |
void CTelephony::ConstructL()
|
|
252 |
//
|
|
253 |
//Second-phase constructor
|
|
254 |
//
|
|
255 |
//Allocates and initialises CTelephony object by constructing a
|
|
256 |
//CTelephonyFunctions object where the real work is done.
|
|
257 |
//
|
|
258 |
{
|
|
259 |
iTelephonyFunctions = CTelephonyFunctions::NewL();
|
|
260 |
}
|
|
261 |
|
|
262 |
|
|
263 |
EXPORT_C TInt CTelephony::CancelAsync(TCancellationRequest aCancel) const
|
|
264 |
/**
|
|
265 |
Cancels an outstanding asynchronous request.
|
|
266 |
|
|
267 |
The result of the cancellation request will be reflected through the
|
|
268 |
request status of the pending request. A status of KErrCancel denotes
|
|
269 |
that the request has been safely cancelled.
|
|
270 |
|
|
271 |
@param aCancel Canncellation code of request to be cancelled.
|
|
272 |
@capability None
|
|
273 |
*/
|
|
274 |
{
|
|
275 |
return iTelephonyFunctions->CancelAsync(aCancel);
|
|
276 |
}
|
|
277 |
|
|
278 |
/////////////////////////////////////////////////
|
|
279 |
//Notifier related exports
|
|
280 |
/////////////////////////////////////////////////
|
|
281 |
|
|
282 |
EXPORT_C void CTelephony::NotifyChange(TRequestStatus& aReqStatus, const TNotificationEvent& aEvent, TDes8& aDes) const
|
|
283 |
/**
|
|
284 |
Registers interest in receiving change notifications for events.
|
|
285 |
|
|
286 |
Specify the event that you are interested with the aEvent parameter.
|
|
287 |
|
|
288 |
Each event is associated with a packaged class. Pass an instance of
|
|
289 |
this class to this method. Then, when the event occurs, information
|
|
290 |
relating to the event is written into it. The description
|
|
291 |
of CTelephony::TNotificationEvent tells you the information class for
|
|
292 |
each event.
|
|
293 |
|
|
294 |
This is an asynchronous method. Notification can be cancelled using the
|
|
295 |
cancellation codes specified in CTelephony::TNotificationEvent. Pass the
|
|
296 |
appropriate code to CTelephony::CancelAsync() to cancel the notification
|
|
297 |
request.
|
|
298 |
|
|
299 |
@param aReqStatus Returns the result code after the asynchronous call completes.
|
|
300 |
@param aEvent Event on which change notification is requested.
|
|
301 |
@param aDes Packaged information class. On completion, information
|
|
302 |
relating to the event is written into this class. Until then, this
|
|
303 |
class's data is not valid.
|
|
304 |
@capability Dependent This function depends on the TNotificationEvent value
|
|
305 |
passed to it.
|
|
306 |
*/
|
|
307 |
{
|
|
308 |
TRequestStatus* reqStatusPtr = &aReqStatus;
|
|
309 |
|
|
310 |
__ASSERT_ALWAYS(aReqStatus != KRequestPending,
|
|
311 |
User::Panic(KTelephonyCategory, KTelephonyPanicIllegalReuse) );
|
|
312 |
|
|
313 |
aReqStatus = KRequestPending;
|
|
314 |
TInt rc=KErrInUse;
|
|
315 |
|
|
316 |
TRAPD(leaveCode, rc=iTelephonyFunctions->NotifyChangeL(aReqStatus, aEvent, aDes););
|
|
317 |
|
|
318 |
if(leaveCode != KErrNone)
|
|
319 |
{
|
|
320 |
iTelephonyFunctions->ResetPendingNotifyRequest(aEvent);
|
|
321 |
User::RequestComplete(reqStatusPtr, leaveCode);
|
|
322 |
}
|
|
323 |
else if (rc != KErrNone)
|
|
324 |
{
|
|
325 |
if(rc != KErrInUse) //this means request already pending, so do not reset
|
|
326 |
{
|
|
327 |
iTelephonyFunctions->ResetPendingNotifyRequest(aEvent);
|
|
328 |
}
|
|
329 |
User::RequestComplete(reqStatusPtr, rc);
|
|
330 |
}
|
|
331 |
}
|
|
332 |
|
|
333 |
/////////////////////////////////////////////////
|
|
334 |
//Call related exports
|
|
335 |
/////////////////////////////////////////////////
|
|
336 |
|
|
337 |
EXPORT_C CTelephony::TCallParamsV1::TCallParamsV1()
|
|
338 |
/**
|
|
339 |
Default constructor.
|
|
340 |
*/
|
|
341 |
{
|
|
342 |
iVersionId=KEtelISVV1;
|
|
343 |
}
|
|
344 |
|
|
345 |
EXPORT_C void CTelephony::DialNewCall(TRequestStatus& aRequestStatus, TDes8& aCallParams,
|
|
346 |
const CTelephony::TTelNumber& aTelNumber, CTelephony::TCallId& aCallId, const CTelephony::TPhoneLine aLine) const
|
|
347 |
/**
|
|
348 |
Initiates a new call.
|
|
349 |
|
|
350 |
The client specifies the telephone number via the aTelNumber argument
|
|
351 |
and the desired call parameters via the aCallParams argument.
|
|
352 |
|
|
353 |
This is an asynchronous method. After successful completion of the dial request
|
|
354 |
a call identifier is returned back to the client via the aCallId argument.
|
|
355 |
The call identifier is needed to hold, resume, swap, and terminate the call.
|
|
356 |
It is also needed to monitor the status of the call.
|
|
357 |
|
|
358 |
This functionality is not available when the phone is in "flight" mode.
|
|
359 |
|
|
360 |
@param aRequestStatus Returns the result code after the asynchronous
|
|
361 |
call completes. Pass CTelephony::CancelAsync() CTelephony::EDialNewCallCancel to cancel.
|
|
362 |
|
|
363 |
@param aCallParams The call parameters used by the TSY. Pass a CTelephony::TCallParamsV1Pckg, a
|
|
364 |
packaged CTelephony::TCallParamsV1.
|
|
365 |
@param aTelNumber Telephone number to dial.
|
|
366 |
@param aCallId Upon completion, contains the call identifier.
|
|
367 |
@param aLine Line on which call can be made. Currently, only voice calls are supported.
|
|
368 |
|
|
369 |
@see AnswerIncomingCall()
|
|
370 |
@see Hold()
|
|
371 |
@see Resume()
|
|
372 |
@see Swap()
|
|
373 |
@see Hangup()
|
|
374 |
@see GetCallStatus()
|
|
375 |
@see GetCallDynamicCaps()
|
|
376 |
@capability NetworkServices
|
|
377 |
*/
|
|
378 |
{
|
|
379 |
TRequestStatus* reqStatusPtr = &aRequestStatus;
|
|
380 |
|
|
381 |
__ASSERT_ALWAYS(aRequestStatus != KRequestPending,
|
|
382 |
User::Panic(KTelephonyCategory, KTelephonyPanicIllegalReuse) );
|
|
383 |
|
|
384 |
aRequestStatus = KRequestPending;
|
|
385 |
TInt rc=KErrInUse;
|
|
386 |
|
|
387 |
TRAPD(leaveCode, rc=iTelephonyFunctions->DialNewCallL(aRequestStatus, aCallParams, aTelNumber,aCallId,aLine));
|
|
388 |
|
|
389 |
if(leaveCode != KErrNone)
|
|
390 |
{
|
|
391 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EDialNewCall, EFalse);
|
|
392 |
User::RequestComplete(reqStatusPtr, leaveCode);
|
|
393 |
}
|
|
394 |
else if (rc != KErrNone)
|
|
395 |
{
|
|
396 |
if(rc != KErrInUse) //this means request already pending, so do not reset
|
|
397 |
{
|
|
398 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EDialNewCall, EFalse);
|
|
399 |
}
|
|
400 |
User::RequestComplete(reqStatusPtr, rc);
|
|
401 |
}
|
|
402 |
}
|
|
403 |
|
|
404 |
EXPORT_C void CTelephony::Hold(TRequestStatus& aRequestStatus, const CTelephony::TCallId& aCallId) const
|
|
405 |
/**
|
|
406 |
Places a call on hold. This is only for calls you dialled or answered with CTelephony.
|
|
407 |
|
|
408 |
The call's dynamic capabilities must allow the Hold operation for
|
|
409 |
this call to have successful completion of this request; see CTelephony::GetCallDynamicCaps().
|
|
410 |
|
|
411 |
This is an asynchronous method. Upon successful completion of Hold, line and call status might be affected by this operation.
|
|
412 |
Hold is only available for the voice line.
|
|
413 |
|
|
414 |
This functionality is not available when the phone is in "flight" mode.
|
|
415 |
|
|
416 |
@param aRequestStatus Returns the result code after the asynchronous
|
|
417 |
call completes. Pass CTelephony::CancelAsync() CTelephony::EHoldCancel to cancel.
|
|
418 |
|
|
419 |
@param aCallId Call ID, as returned by CTelephony::DialNewCall() or CTelephony::AnswerIncomingCall().
|
|
420 |
|
|
421 |
@see AnswerIncomingCall()
|
|
422 |
@see DialNewCall()
|
|
423 |
@see Resume()
|
|
424 |
@see Swap()
|
|
425 |
@see Hangup()
|
|
426 |
@see GetCallStatus()
|
|
427 |
@see GetCallDynamicCaps()
|
|
428 |
@capability NetworkServices
|
|
429 |
*/
|
|
430 |
{
|
|
431 |
TRequestStatus* reqStatusPtr = &aRequestStatus;
|
|
432 |
|
|
433 |
__ASSERT_ALWAYS(aRequestStatus != KRequestPending,
|
|
434 |
User::Panic(KTelephonyCategory, KTelephonyPanicIllegalReuse) );
|
|
435 |
|
|
436 |
aRequestStatus = KRequestPending;
|
|
437 |
TInt rc=KErrInUse;
|
|
438 |
|
|
439 |
TRAPD(leaveCode, rc=iTelephonyFunctions->HoldL(aRequestStatus, aCallId));
|
|
440 |
|
|
441 |
if(leaveCode != KErrNone)
|
|
442 |
{
|
|
443 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EHold, EFalse);
|
|
444 |
User::RequestComplete(reqStatusPtr, leaveCode);
|
|
445 |
}
|
|
446 |
else if (rc != KErrNone)
|
|
447 |
{
|
|
448 |
if(rc != KErrInUse) //this means request already pending, so do not reset
|
|
449 |
{
|
|
450 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EHold, EFalse);
|
|
451 |
}
|
|
452 |
User::RequestComplete(reqStatusPtr, rc);
|
|
453 |
}
|
|
454 |
}
|
|
455 |
|
|
456 |
EXPORT_C void CTelephony::Resume(TRequestStatus& aRequestStatus, const CTelephony::TCallId& aCallId) const
|
|
457 |
/**
|
|
458 |
Resumes a held call. This is only for calls you dialled or answered with CTelephony.
|
|
459 |
The client specifies the call ID via the aCallId argument.
|
|
460 |
|
|
461 |
The call's dynamic capabilities must allow the Resume operation for this
|
|
462 |
call to have successful completion of this request; see CTelephony::GetCallDynamicCaps().
|
|
463 |
|
|
464 |
This is an asynchronous method. Upon successful completion of Resume, line and
|
|
465 |
call status might be affected by this operation.
|
|
466 |
Resume is only available for the voice line.
|
|
467 |
|
|
468 |
This functionality is not available when the phone is in "flight" mode.
|
|
469 |
|
|
470 |
@param aRequestStatus Returns the result code after the asynchronous
|
|
471 |
call completes. Pass CTelephony::CancelAsync() CTelephony::EResumeCancel to cancel.
|
|
472 |
@param aCallId Call ID, as returned by CTelephony::DialNewCall() or CTelephony::AnswerIncomingCall().
|
|
473 |
|
|
474 |
@see AnswerIncomingCall()
|
|
475 |
@see DialNewCall()
|
|
476 |
@see Hold()
|
|
477 |
@see Swap()
|
|
478 |
@see Hangup()
|
|
479 |
@see GetCallStatus()
|
|
480 |
@see GetCallDynamicCaps()
|
|
481 |
@capability NetworkServices
|
|
482 |
*/
|
|
483 |
{
|
|
484 |
TRequestStatus* reqStatusPtr = &aRequestStatus;
|
|
485 |
|
|
486 |
__ASSERT_ALWAYS(aRequestStatus != KRequestPending,
|
|
487 |
User::Panic(KTelephonyCategory, KTelephonyPanicIllegalReuse) );
|
|
488 |
|
|
489 |
aRequestStatus = KRequestPending;
|
|
490 |
TInt rc=KErrInUse;
|
|
491 |
|
|
492 |
TRAPD(leaveCode, rc=iTelephonyFunctions->ResumeL(aRequestStatus, aCallId));
|
|
493 |
|
|
494 |
if(leaveCode != KErrNone)
|
|
495 |
{
|
|
496 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EResume, EFalse);
|
|
497 |
User::RequestComplete(reqStatusPtr, leaveCode);
|
|
498 |
}
|
|
499 |
else if (rc != KErrNone)
|
|
500 |
{
|
|
501 |
if(rc != KErrInUse) //this means request already pending, so do not reset
|
|
502 |
{
|
|
503 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EResume, EFalse);
|
|
504 |
}
|
|
505 |
User::RequestComplete(reqStatusPtr, rc);
|
|
506 |
}
|
|
507 |
}
|
|
508 |
|
|
509 |
EXPORT_C void CTelephony::Swap(TRequestStatus& aRequestStatus, const CTelephony::TCallId& aCallId1, const
|
|
510 |
CTelephony::TCallId& aCallId2) const
|
|
511 |
/**
|
|
512 |
Swaps calls. This is only for calls you dialled or answered with CTelephony.
|
|
513 |
|
|
514 |
Swap is possible only if both calls are owned by this ISV application.
|
|
515 |
The client specifies the call ids via the aCallId1 and aCallId2 arguments.
|
|
516 |
|
|
517 |
This is an asynchronous method.
|
|
518 |
|
|
519 |
The calls' dynamic capabilities must allow the Swap operation for this call to
|
|
520 |
have successful completion of this request; see CTelephony::GetCallDynamicCaps().
|
|
521 |
|
|
522 |
Swap is only available for the voice line.
|
|
523 |
|
|
524 |
This functionality is not available when the phone is in "flight" mode.
|
|
525 |
|
|
526 |
@param aRequestStatus Returns the result code after the asynchronous
|
|
527 |
call completes. Pass CTelephony::CancelAsync() CTelephony::ESwapCancel to cancel.
|
|
528 |
@param aCallId1 ID of a call, as returned by CTelephony::DialNewCall() or CTelephony::AnswerIncomingCall().
|
|
529 |
@param aCallId2 ID of another call, as returned by CTelephony::DialNewCall() or CTelephony::AnswerIncomingCall().
|
|
530 |
|
|
531 |
@see AnswerIncomingCall()
|
|
532 |
@see DialNewCall()
|
|
533 |
@see Hold()
|
|
534 |
@see Resume()
|
|
535 |
@see Hangup()
|
|
536 |
@see GetCallStatus()
|
|
537 |
@see GetCallDynamicCaps()
|
|
538 |
@capability NetworkServices
|
|
539 |
*/
|
|
540 |
{
|
|
541 |
TRequestStatus* reqStatusPtr = &aRequestStatus;
|
|
542 |
|
|
543 |
__ASSERT_ALWAYS(aRequestStatus != KRequestPending,
|
|
544 |
User::Panic(KTelephonyCategory, KTelephonyPanicIllegalReuse) );
|
|
545 |
|
|
546 |
aRequestStatus = KRequestPending;
|
|
547 |
TInt rc=KErrInUse;
|
|
548 |
|
|
549 |
TRAPD(leaveCode, rc=iTelephonyFunctions->SwapL(aRequestStatus, aCallId1, aCallId2));
|
|
550 |
|
|
551 |
if(leaveCode != KErrNone)
|
|
552 |
{
|
|
553 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::ESwap, EFalse);
|
|
554 |
User::RequestComplete(reqStatusPtr, leaveCode);
|
|
555 |
}
|
|
556 |
else if (rc != KErrNone)
|
|
557 |
{
|
|
558 |
if(rc != KErrInUse) //this means request already pending, so do not reset
|
|
559 |
{
|
|
560 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::ESwap, EFalse);
|
|
561 |
}
|
|
562 |
User::RequestComplete(reqStatusPtr, rc);
|
|
563 |
}
|
|
564 |
}
|
|
565 |
|
|
566 |
EXPORT_C void CTelephony::Hangup(TRequestStatus& aRequestStatus, const CTelephony::TCallId& aCallId) const
|
|
567 |
/**
|
|
568 |
Hangs up a call. This is only for calls you dialled or answered with CTelephony.
|
|
569 |
|
|
570 |
The client specifies the call ID via the aCallId argument.
|
|
571 |
|
|
572 |
This is an asynchronous method. Upon successful completion of Hangup, the line
|
|
573 |
and call status might be affected.
|
|
574 |
Hangup is available only for the voice line.
|
|
575 |
|
|
576 |
This functionality is not available when the phone is in "flight" mode.
|
|
577 |
|
|
578 |
@param aRequestStatus Returns the result code after the asynchronous
|
|
579 |
call completes. Pass CTelephony::CancelAsync() CTelephony::EHangupCancel to cancel.
|
|
580 |
@param aCallId Call ID, as returned by CTelephony::DialNewCall() or CTelephony::AnswerIncomingCall().
|
|
581 |
|
|
582 |
@see AnswerIncomingCall()
|
|
583 |
@see DialNewCall()
|
|
584 |
@see Hold()
|
|
585 |
@see Resume()
|
|
586 |
@see Swap()
|
|
587 |
@see GetCallStatus()
|
|
588 |
@see GetCallDynamicCaps()
|
|
589 |
@capability NetworkServices
|
|
590 |
*/
|
|
591 |
{
|
|
592 |
TRequestStatus* reqStatusPtr = &aRequestStatus;
|
|
593 |
|
|
594 |
__ASSERT_ALWAYS(aRequestStatus != KRequestPending,
|
|
595 |
User::Panic(KTelephonyCategory, KTelephonyPanicIllegalReuse) );
|
|
596 |
|
|
597 |
aRequestStatus = KRequestPending;
|
|
598 |
TInt rc=KErrInUse;
|
|
599 |
|
|
600 |
TRAPD(leaveCode, rc=iTelephonyFunctions->HangupL(aRequestStatus, aCallId));
|
|
601 |
|
|
602 |
if(leaveCode != KErrNone)
|
|
603 |
{
|
|
604 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EHangup, EFalse);
|
|
605 |
User::RequestComplete(reqStatusPtr, leaveCode);
|
|
606 |
}
|
|
607 |
else if (rc != KErrNone)
|
|
608 |
{
|
|
609 |
if(rc != KErrInUse) //this means request already pending, so do not reset
|
|
610 |
{
|
|
611 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EHangup, EFalse);
|
|
612 |
}
|
|
613 |
User::RequestComplete(reqStatusPtr, rc);
|
|
614 |
}
|
|
615 |
}
|
|
616 |
|
|
617 |
EXPORT_C void CTelephony::AnswerIncomingCall(TRequestStatus& aRequestStatus, CTelephony::TCallId& aCallId,
|
|
618 |
const CTelephony::TPhoneLine aLine) const
|
|
619 |
/**
|
|
620 |
Answers an incoming new voice call. Fax and data calls cannot be answered.
|
|
621 |
|
|
622 |
Answering an incoming call is possible only when the voice line status
|
|
623 |
is ringing (CTelephony::EStatusRinging) and RLine::NotifyIncomingCall
|
|
624 |
has completed.
|
|
625 |
|
|
626 |
This is an asynchronous method. Upon successful completion of
|
|
627 |
AnswerIncomingCall() a call ID is returned to the client via the aCallId
|
|
628 |
argument. The call identifier is needed to hold, resume, swap, and terminate
|
|
629 |
the call. It is also needed to monitor the status of the call.
|
|
630 |
|
|
631 |
This functionality is not available when the phone is in "flight" mode.
|
|
632 |
|
|
633 |
@param aRequestStatus Returns the result code after the asynchronous
|
|
634 |
call completes. Pass CTelephony::CancelAsync() CTelephony::EAnswerIncomingCallCancel to cancel
|
|
635 |
@param aCallId On completion, contains the call ID.
|
|
636 |
@param aLine Line from which the answer request will attempted. Currently, only the voice line is supported.
|
|
637 |
|
|
638 |
@see DialNewCall()
|
|
639 |
@see Hold()
|
|
640 |
@see Resume()
|
|
641 |
@see Swap()
|
|
642 |
@see Hangup()
|
|
643 |
@see GetCallStatus()
|
|
644 |
@see GetCallDynamicCaps()
|
|
645 |
@capability NetworkServices
|
|
646 |
*/
|
|
647 |
{
|
|
648 |
TRequestStatus* reqStatusPtr = &aRequestStatus;
|
|
649 |
|
|
650 |
__ASSERT_ALWAYS(aRequestStatus != KRequestPending,
|
|
651 |
User::Panic(KTelephonyCategory, KTelephonyPanicIllegalReuse) );
|
|
652 |
|
|
653 |
aRequestStatus = KRequestPending;
|
|
654 |
TInt rc=KErrInUse;
|
|
655 |
|
|
656 |
TRAPD(leaveCode, rc=iTelephonyFunctions->AnswerIncomingCallL(aRequestStatus,aCallId,aLine));
|
|
657 |
|
|
658 |
if(leaveCode != KErrNone)
|
|
659 |
{
|
|
660 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EAnswerIncomingCall, EFalse);
|
|
661 |
User::RequestComplete(reqStatusPtr, leaveCode);
|
|
662 |
}
|
|
663 |
else if (rc != KErrNone)
|
|
664 |
{
|
|
665 |
if(rc != KErrInUse) //this means request already pending, so do not reset
|
|
666 |
{
|
|
667 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EAnswerIncomingCall, EFalse);
|
|
668 |
}
|
|
669 |
User::RequestComplete(reqStatusPtr, rc);
|
|
670 |
}
|
|
671 |
}
|
|
672 |
|
|
673 |
EXPORT_C TInt CTelephony::GetCallStatus(const TCallId& aCallId, TDes8& aStatus) const
|
|
674 |
/**
|
|
675 |
Retrieves the status of the selected call specified by the aCallId argument.
|
|
676 |
|
|
677 |
The current status of the selected call is returned to the client via the
|
|
678 |
aStatus argument.
|
|
679 |
GetCallStatus is available only for the voice line.
|
|
680 |
|
|
681 |
This functionality is not available when the phone is in "flight" mode.
|
|
682 |
|
|
683 |
@param aCallId Call ID, as returned by CTelephony::DialNewCall() or CTelephony::AnswerIncomingCall().
|
|
684 |
@param aStatus On completion contains a CTelephony::TCallStatusV1Pckg,
|
|
685 |
a packaged CTelephony::TCallStatusV1 containing the call status.
|
|
686 |
@return KErrNone if successful, otherwise another of the system-wide error codes.
|
|
687 |
|
|
688 |
@see AnswerIncomingCall()
|
|
689 |
@see DialNewCall()
|
|
690 |
@see Hold()
|
|
691 |
@see Resume()
|
|
692 |
@see Swap()
|
|
693 |
@see Hangup()
|
|
694 |
@see GetCallDynamicCaps()
|
|
695 |
@capability None
|
|
696 |
*/
|
|
697 |
{
|
|
698 |
TInt rc=KErrAccessDenied;
|
|
699 |
|
|
700 |
TRAPD(leaveCode, rc=iTelephonyFunctions->GetCallStatusL(aCallId, aStatus));
|
|
701 |
|
|
702 |
if(leaveCode != KErrNone)
|
|
703 |
{
|
|
704 |
return leaveCode;
|
|
705 |
}
|
|
706 |
else if (rc != KErrNone)
|
|
707 |
{
|
|
708 |
return rc;
|
|
709 |
}
|
|
710 |
return KErrNone;
|
|
711 |
}
|
|
712 |
|
|
713 |
EXPORT_C CTelephony::TCallCapsV1::TCallCapsV1()
|
|
714 |
{
|
|
715 |
iVersionId=KEtelISVV1;
|
|
716 |
}
|
|
717 |
|
|
718 |
EXPORT_C TInt CTelephony::GetCallDynamicCaps(const TCallId& aCallId, TDes8& aCaps) const
|
|
719 |
/**
|
|
720 |
Retrieves the dynamic call capabilities for calls you dialled or answered with CTelephony.
|
|
721 |
|
|
722 |
The client specifies the call ID via the aCallId argument.
|
|
723 |
Upon successful retrieval the call control capabilities (Hold, Resume
|
|
724 |
and Swap) are returned via the aCaps argument.
|
|
725 |
|
|
726 |
This functionality is not available when the phone is in "flight" mode.
|
|
727 |
|
|
728 |
@param aCallId Call ID, as returned by CTelephony::DialNewCall() or CTelephony::AnswerIncomingCall().
|
|
729 |
@param aCaps On completion contains a CTelephony::TCallCapsV1Pckg,
|
|
730 |
a packaged CTelephony::TCallCapsV1 containing the call's dynamic capabilities.
|
|
731 |
@return KErrNone if successful, otherwise another of the system-wide error codes.
|
|
732 |
|
|
733 |
@capability None
|
|
734 |
*/
|
|
735 |
{
|
|
736 |
TInt rc=KErrAccessDenied;
|
|
737 |
|
|
738 |
TRAPD(leaveCode, rc=iTelephonyFunctions->GetCallDynamicCaps(aCallId, aCaps));
|
|
739 |
|
|
740 |
if(leaveCode != KErrNone)
|
|
741 |
{
|
|
742 |
return leaveCode;
|
|
743 |
}
|
|
744 |
else if (rc != KErrNone)
|
|
745 |
{
|
|
746 |
return KErrAccessDenied;
|
|
747 |
}
|
|
748 |
return KErrNone;
|
|
749 |
}
|
|
750 |
|
|
751 |
/////////////////////////////////////////////////
|
|
752 |
//Phone related exports
|
|
753 |
/////////////////////////////////////////////////
|
|
754 |
|
|
755 |
EXPORT_C TInt CTelephony::TEtelISVType::VersionId() const
|
|
756 |
/**
|
|
757 |
Default constructor.
|
|
758 |
*/
|
|
759 |
{
|
|
760 |
return iVersionId;
|
|
761 |
}
|
|
762 |
|
|
763 |
EXPORT_C CTelephony::TPhoneIdV1::TPhoneIdV1()
|
|
764 |
/**
|
|
765 |
Default constructor.
|
|
766 |
*/
|
|
767 |
{
|
|
768 |
iVersionId=KEtelISVV1;
|
|
769 |
}
|
|
770 |
|
|
771 |
EXPORT_C void CTelephony::GetPhoneId(TRequestStatus& aRequestStatus, TDes8& aDes) const
|
|
772 |
/**
|
|
773 |
Retrieves the model information and unique identification of the mobile device.
|
|
774 |
|
|
775 |
This is an asynchronous method. Upon successful completion of the request the
|
|
776 |
manufacturer name, model and serial number (IMEI or ESN) are returned back to
|
|
777 |
the client via the aDes argument.
|
|
778 |
|
|
779 |
@param aRequestStatus Returns the result code after the asynchronous
|
|
780 |
call completes. Pass CTelephony::CancelAsync() CTelephony::EGetPhoneIdCancel to cancel.
|
|
781 |
@param aDes Contains a CTelephony::TPhoneIdV1Pckg, a packaged version of the
|
|
782 |
CTelephony::TPhoneIdV1 class which is filled on completion.
|
|
783 |
@capability None
|
|
784 |
*/
|
|
785 |
{
|
|
786 |
TRequestStatus* reqStatusPtr = &aRequestStatus;
|
|
787 |
|
|
788 |
__ASSERT_ALWAYS(aRequestStatus != KRequestPending,
|
|
789 |
User::Panic(KTelephonyCategory, KTelephonyPanicIllegalReuse) );
|
|
790 |
|
|
791 |
aRequestStatus = KRequestPending;
|
|
792 |
TInt rc=KErrAccessDenied;
|
|
793 |
|
|
794 |
TRAPD(leaveCode, rc=iTelephonyFunctions->GetPhoneIdL(aRequestStatus, aDes));
|
|
795 |
|
|
796 |
if(leaveCode != KErrNone)
|
|
797 |
{
|
|
798 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetPhoneId, EFalse);
|
|
799 |
User::RequestComplete(reqStatusPtr, leaveCode);
|
|
800 |
}
|
|
801 |
else if (rc != KErrNone)
|
|
802 |
{
|
|
803 |
if(rc != KErrInUse) //this means request already pending, so do not reset
|
|
804 |
{
|
|
805 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetPhoneId, EFalse);
|
|
806 |
}
|
|
807 |
User::RequestComplete(reqStatusPtr, rc);
|
|
808 |
}
|
|
809 |
}
|
|
810 |
|
|
811 |
EXPORT_C CTelephony::TSubscriberIdV1::TSubscriberIdV1()
|
|
812 |
{
|
|
813 |
iVersionId=KEtelISVV1;
|
|
814 |
}
|
|
815 |
|
|
816 |
EXPORT_C void CTelephony::GetSubscriberId(TRequestStatus& aRequestStatus, TDes8& aDes) const
|
|
817 |
/**
|
|
818 |
Retrieves information about the mobile device's current subscriber.
|
|
819 |
This will normally identify the SIM card on GSM and WCDMA networks or
|
|
820 |
the R-UIM card on CDMA networks. It is independent of the phone.
|
|
821 |
|
|
822 |
This is an asynchronous method. Upon successful completion of the request
|
|
823 |
the serial number of the SIM or R-UIM card is returned back to the client
|
|
824 |
via the aDes argument.
|
|
825 |
|
|
826 |
@param aRequestStatus Returns the result code after the asynchronous
|
|
827 |
call completes. Pass CTelephony::CancelAsync() CTelephony::EGetSubscriberIdCancel to cancel.
|
|
828 |
@param aDes Contains a CTelephony::TSubscriberIdV1Pckg, a packaged version of the
|
|
829 |
CTelephony::TSubscriberIdV1 class which is filled on completion.
|
|
830 |
@capability ReadDeviceData
|
|
831 |
*/
|
|
832 |
{
|
|
833 |
TRequestStatus* reqStatusPtr = &aRequestStatus;
|
|
834 |
|
|
835 |
__ASSERT_ALWAYS(aRequestStatus != KRequestPending,
|
|
836 |
User::Panic(KTelephonyCategory, KTelephonyPanicIllegalReuse) );
|
|
837 |
|
|
838 |
aRequestStatus = KRequestPending;
|
|
839 |
TInt rc=KErrInUse;
|
|
840 |
|
|
841 |
TRAPD(leaveCode, rc=iTelephonyFunctions->GetSubscriberIdL(aRequestStatus, aDes));
|
|
842 |
|
|
843 |
if(leaveCode != KErrNone)
|
|
844 |
{
|
|
845 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetSubscriberId, EFalse);
|
|
846 |
User::RequestComplete(reqStatusPtr, leaveCode);
|
|
847 |
}
|
|
848 |
else if (rc != KErrNone)
|
|
849 |
{
|
|
850 |
if(rc != KErrInUse) //this means request already pending, so do not reset
|
|
851 |
{
|
|
852 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetSubscriberId, EFalse);
|
|
853 |
}
|
|
854 |
User::RequestComplete(reqStatusPtr, rc);
|
|
855 |
}
|
|
856 |
}
|
|
857 |
|
|
858 |
EXPORT_C CTelephony::TIndicatorV1::TIndicatorV1()
|
|
859 |
/**
|
|
860 |
Default constructor.
|
|
861 |
*/
|
|
862 |
{
|
|
863 |
iVersionId=KEtelISVV1;
|
|
864 |
}
|
|
865 |
|
|
866 |
EXPORT_C void CTelephony::GetIndicator(TRequestStatus& aRequestStatus, TDes8& aDes) const
|
|
867 |
/**
|
|
868 |
Retrieves the battery charging indicator, the network availability
|
|
869 |
indicator and call-in-progress indicator.
|
|
870 |
|
|
871 |
This is an asynchronous method. The method returns two flags for each
|
|
872 |
indicator: the first is a capability flag; it says whether the indicator
|
|
873 |
is valid. The second flag is the indicator itself.
|
|
874 |
|
|
875 |
For instance, two flags are returned for the battery charging
|
|
876 |
indicator. The capability flag is only set if the phone can detect
|
|
877 |
when a charger is connected. The indicator flag is only set when a
|
|
878 |
charger is actually connected. The indicator flag is only valid when
|
|
879 |
the capability flag is set.
|
|
880 |
|
|
881 |
Six flags, two for each indicator, are returned by this method in the
|
|
882 |
packaged aIndicator parameter.
|
|
883 |
|
|
884 |
@param aRequestStatus Returns the result code after the asynchronous
|
|
885 |
call completes. Pass CTelephony::CancelAsync() CTelephony::EGetBatteryInfoCancel to cancel.
|
|
886 |
|
|
887 |
@param aDes Contains a CTelephony::TIndicatorV1Pckg, a packaged version of the
|
|
888 |
CTelephony::TIndicatorV1 class which is filled on completion.
|
|
889 |
|
|
890 |
@see TPhoneIndicators
|
|
891 |
@capability None
|
|
892 |
*/
|
|
893 |
{
|
|
894 |
TRequestStatus* reqStatusPtr = &aRequestStatus;
|
|
895 |
|
|
896 |
__ASSERT_ALWAYS(aRequestStatus != KRequestPending,
|
|
897 |
User::Panic(KTelephonyCategory, KTelephonyPanicIllegalReuse) );
|
|
898 |
|
|
899 |
aRequestStatus = KRequestPending;
|
|
900 |
TInt rc=KErrInUse;
|
|
901 |
|
|
902 |
TRAPD(leaveCode, rc=iTelephonyFunctions->GetIndicatorL(aRequestStatus, aDes));
|
|
903 |
|
|
904 |
if(leaveCode != KErrNone)
|
|
905 |
{
|
|
906 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetIndicator, EFalse);
|
|
907 |
User::RequestComplete(reqStatusPtr, leaveCode);
|
|
908 |
}
|
|
909 |
else if (rc != KErrNone)
|
|
910 |
{
|
|
911 |
if(rc != KErrInUse) //this means request already pending, so do not reset
|
|
912 |
{
|
|
913 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetIndicator, EFalse);
|
|
914 |
}
|
|
915 |
User::RequestComplete(reqStatusPtr, rc);
|
|
916 |
}
|
|
917 |
}
|
|
918 |
|
|
919 |
EXPORT_C void CTelephony::GetBatteryInfo(TRequestStatus& aRequestStatus, TDes8& aDes) const
|
|
920 |
/**
|
|
921 |
Retrieves the status and charge level of the phone battery.
|
|
922 |
|
|
923 |
This is an asynchronous method. Upon successful completion of the request
|
|
924 |
the battery information is returned via the packaged aDes argument.
|
|
925 |
|
|
926 |
@param aRequestStatus Returns the result code after the asynchronous
|
|
927 |
call completes. Pass CTelephony::CancelAsync() CTelephony::EGetBatteryInfoCancel to cancel.
|
|
928 |
@param aDes Contains a CTelephony::TBatteryInfoV1Pckg, a packaged version of the
|
|
929 |
CTelephony::TBatteryInfoV1 class which is filled on completion.
|
|
930 |
@capability None
|
|
931 |
*/
|
|
932 |
{
|
|
933 |
TRequestStatus* reqStatusPtr = &aRequestStatus;
|
|
934 |
|
|
935 |
__ASSERT_ALWAYS(aRequestStatus != KRequestPending,
|
|
936 |
User::Panic(KTelephonyCategory, KTelephonyPanicIllegalReuse) );
|
|
937 |
|
|
938 |
aRequestStatus = KRequestPending;
|
|
939 |
TInt rc=KErrInUse;
|
|
940 |
|
|
941 |
TRAPD(leaveCode, rc=iTelephonyFunctions->GetBatteryInfoL(aRequestStatus, aDes));
|
|
942 |
|
|
943 |
if(leaveCode != KErrNone)
|
|
944 |
{
|
|
945 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetBatteryInfo, EFalse);
|
|
946 |
User::RequestComplete(reqStatusPtr, leaveCode);
|
|
947 |
}
|
|
948 |
else if (rc != KErrNone)
|
|
949 |
{
|
|
950 |
if(rc != KErrInUse) //this means request already pending, so do not reset
|
|
951 |
{
|
|
952 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetBatteryInfo, EFalse);
|
|
953 |
}
|
|
954 |
User::RequestComplete(reqStatusPtr, rc);
|
|
955 |
}
|
|
956 |
}
|
|
957 |
|
|
958 |
EXPORT_C CTelephony::TSignalStrengthV1::TSignalStrengthV1()
|
|
959 |
/**
|
|
960 |
Default constructor.
|
|
961 |
*/
|
|
962 |
{
|
|
963 |
iVersionId=KEtelISVV1;
|
|
964 |
}
|
|
965 |
|
|
966 |
EXPORT_C void CTelephony::GetSignalStrength(TRequestStatus& aRequestStatus, TDes8& aDes) const
|
|
967 |
/**
|
|
968 |
Retrieves the phone's current signal strength via the aDes argument.
|
|
969 |
|
|
970 |
This is an asynchronous method.
|
|
971 |
|
|
972 |
If signal strength information is not supported by the phone the method will
|
|
973 |
return KErrNotSupported. If no signal strength information is currently
|
|
974 |
available the method will return KErrNotFound.
|
|
975 |
|
|
976 |
This functionality is not available when the phone is in "flight" mode.
|
|
977 |
|
|
978 |
@param aRequestStatus Returns the result code after the asynchronous
|
|
979 |
call completes. Pass CTelephony::CancelAsync() CTelephony::EGetSignalStrengthCancel to cancel.
|
|
980 |
|
|
981 |
@param aDes Contains a CTelephony::TSignalStrengthV1Pckg, a packaged version of
|
|
982 |
the CTelephony::TSignalStrengthV1 class which is filled on completion.
|
|
983 |
|
|
984 |
@capability None
|
|
985 |
*/
|
|
986 |
{
|
|
987 |
TRequestStatus* reqStatusPtr = &aRequestStatus;
|
|
988 |
|
|
989 |
__ASSERT_ALWAYS(aRequestStatus != KRequestPending,
|
|
990 |
User::Panic(KTelephonyCategory, KTelephonyPanicIllegalReuse) );
|
|
991 |
|
|
992 |
aRequestStatus = KRequestPending;
|
|
993 |
TInt rc=KErrInUse;
|
|
994 |
|
|
995 |
TRAPD(leaveCode, rc=iTelephonyFunctions->GetSignalStrengthL(aRequestStatus, aDes));
|
|
996 |
|
|
997 |
if(leaveCode != KErrNone)
|
|
998 |
{
|
|
999 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetSignalStrength, EFalse);
|
|
1000 |
User::RequestComplete(reqStatusPtr, leaveCode);
|
|
1001 |
}
|
|
1002 |
else if (rc != KErrNone)
|
|
1003 |
{
|
|
1004 |
if(rc != KErrInUse) //this means request already pending, so do not reset
|
|
1005 |
{
|
|
1006 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetSignalStrength, EFalse);
|
|
1007 |
}
|
|
1008 |
User::RequestComplete(reqStatusPtr, rc);
|
|
1009 |
}
|
|
1010 |
}
|
|
1011 |
|
|
1012 |
EXPORT_C CTelephony::TIccLockInfoV1::TIccLockInfoV1()
|
|
1013 |
/**
|
|
1014 |
Default constructor.
|
|
1015 |
*/
|
|
1016 |
{
|
|
1017 |
iVersionId=KEtelISVV1;
|
|
1018 |
}
|
|
1019 |
|
|
1020 |
EXPORT_C void CTelephony::GetLockInfo(TRequestStatus& aRequestStatus, const TIccLock& aLock, TDes8& aDes) const
|
|
1021 |
/**
|
|
1022 |
Some phones allow users to lock them to prevent unauthorised use.
|
|
1023 |
Typically, a code must be entered to unlock the phone.
|
|
1024 |
|
|
1025 |
This method retrieves the state and status of ICC locks PIN1/2.
|
|
1026 |
The client selects the lock that it wishes to retrieve the status and
|
|
1027 |
state of.
|
|
1028 |
|
|
1029 |
This is an asynchronous method. Upon successful completion of the
|
|
1030 |
request the PIN1/2 information is returned via the aDes argument.
|
|
1031 |
|
|
1032 |
Note that this member function does not concern the keypad locks.
|
|
1033 |
Nor does it concern the lock that the networks use to prevent a phone from
|
|
1034 |
being used on other networks.
|
|
1035 |
|
|
1036 |
@param aRequestStatus Returns the result code after the asynchronous
|
|
1037 |
call completes. Pass CTelephony::CancelAsync() CTelephony::EGetLockInfoCancel to cancel.
|
|
1038 |
|
|
1039 |
@param aLock Lock to interrogate. Either Pin1 or Pin2.
|
|
1040 |
|
|
1041 |
@param aDes Contains a CTelephony::TIccLockInfoV1Pckg, a packaged version of the
|
|
1042 |
CTelephony::TIccLockInfoV1 class which is filled on completion.
|
|
1043 |
|
|
1044 |
@capability ReadDeviceData
|
|
1045 |
*/
|
|
1046 |
{
|
|
1047 |
TRequestStatus* reqStatusPtr = &aRequestStatus;
|
|
1048 |
|
|
1049 |
__ASSERT_ALWAYS(aRequestStatus != KRequestPending,
|
|
1050 |
User::Panic(KTelephonyCategory, KTelephonyPanicIllegalReuse) );
|
|
1051 |
|
|
1052 |
aRequestStatus = KRequestPending;
|
|
1053 |
TInt rc=KErrInUse;
|
|
1054 |
|
|
1055 |
TRAPD(leaveCode, rc=iTelephonyFunctions->GetLockInfoL(aRequestStatus, aLock, aDes));
|
|
1056 |
|
|
1057 |
if(leaveCode != KErrNone)
|
|
1058 |
{
|
|
1059 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetIccLockInfo, EFalse);
|
|
1060 |
User::RequestComplete(reqStatusPtr, leaveCode);
|
|
1061 |
}
|
|
1062 |
else if (rc != KErrNone)
|
|
1063 |
{
|
|
1064 |
if(rc != KErrInUse) //this means request already pending, so do not reset
|
|
1065 |
{
|
|
1066 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetIccLockInfo, EFalse);
|
|
1067 |
}
|
|
1068 |
User::RequestComplete(reqStatusPtr, rc);
|
|
1069 |
}
|
|
1070 |
}
|
|
1071 |
|
|
1072 |
EXPORT_C void CTelephony::SendDTMFTones(TRequestStatus& aRequestStatus, const TDesC& aTones) const
|
|
1073 |
/**
|
|
1074 |
Transmits DTMF tones across all the current active voice calls.
|
|
1075 |
|
|
1076 |
This is an asynchronous method. The request completes when the tones
|
|
1077 |
have been sent.
|
|
1078 |
The string of DTMF characters is passed via the aTones parameter.
|
|
1079 |
The string of DTMF characters can contain one or more DTMF tone(s).
|
|
1080 |
|
|
1081 |
This functionality is not available when the phone is in "flight" mode.
|
|
1082 |
|
|
1083 |
@param aRequestStatus Returns the result code after the asynchronous
|
|
1084 |
call completes. use CTelephony::ESendDTMFTonesCancel to cancel.
|
|
1085 |
|
|
1086 |
@param aTones String containing tones to transmit. It can contain one or more
|
|
1087 |
occurance of the numbers 0 to 9, * and #.
|
|
1088 |
@capability NetworkServices
|
|
1089 |
*/
|
|
1090 |
{
|
|
1091 |
TRequestStatus* reqStatusPtr = &aRequestStatus;
|
|
1092 |
|
|
1093 |
__ASSERT_ALWAYS(aRequestStatus != KRequestPending,
|
|
1094 |
User::Panic(KTelephonyCategory, KTelephonyPanicIllegalReuse) );
|
|
1095 |
|
|
1096 |
aRequestStatus = KRequestPending;
|
|
1097 |
TInt rc=KErrInUse;
|
|
1098 |
|
|
1099 |
TRAPD(leaveCode, rc=iTelephonyFunctions->SendDTMFTonesL(aRequestStatus, aTones));
|
|
1100 |
|
|
1101 |
if(leaveCode != KErrNone)
|
|
1102 |
{
|
|
1103 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::ESendDTMFTones, EFalse);
|
|
1104 |
User::RequestComplete(reqStatusPtr, leaveCode);
|
|
1105 |
}
|
|
1106 |
else if (rc != KErrNone)
|
|
1107 |
{
|
|
1108 |
if(rc != KErrInUse) //this means request already pending, so do not reset
|
|
1109 |
{
|
|
1110 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::ESendDTMFTones, EFalse);
|
|
1111 |
}
|
|
1112 |
User::RequestComplete(reqStatusPtr, rc);
|
|
1113 |
}
|
|
1114 |
}
|
|
1115 |
|
|
1116 |
EXPORT_C CTelephony::TFlightModeV1::TFlightModeV1()
|
|
1117 |
/**
|
|
1118 |
Default constructor.
|
|
1119 |
*/
|
|
1120 |
{
|
|
1121 |
iVersionId=KEtelISVV1;
|
|
1122 |
}
|
|
1123 |
|
|
1124 |
EXPORT_C void CTelephony::GetFlightMode(TRequestStatus& aRequestStatus, TDes8& aDes) const
|
|
1125 |
/**
|
|
1126 |
Retrieves the current flight mode status. The flight mode is returned
|
|
1127 |
via the aMode argument.
|
|
1128 |
|
|
1129 |
This is an asynchronous method.
|
|
1130 |
|
|
1131 |
If the flight mode status is set to "off" then all network-related
|
|
1132 |
requests are disabled.
|
|
1133 |
|
|
1134 |
If the phone’s software does not support this feature then this method
|
|
1135 |
returns KErrNotSupported.
|
|
1136 |
|
|
1137 |
@param aRequestStatus Returns the result code after the asynchronous
|
|
1138 |
call completes. Pass CTelephony::CancelAsync() CTelephony::EGetFlightModeCancel to cancel.
|
|
1139 |
|
|
1140 |
@param aDes Contains a CTelephony::TFlightModeV1Pckg, a packaged version of the
|
|
1141 |
CTelephony::TFlightModeV1 class which is filled on completion.
|
|
1142 |
|
|
1143 |
@capability None
|
|
1144 |
*/
|
|
1145 |
{
|
|
1146 |
TRequestStatus* reqStatusPtr = &aRequestStatus;
|
|
1147 |
|
|
1148 |
__ASSERT_ALWAYS(aRequestStatus != KRequestPending,
|
|
1149 |
User::Panic(KTelephonyCategory, KTelephonyPanicIllegalReuse) );
|
|
1150 |
|
|
1151 |
aRequestStatus = KRequestPending;
|
|
1152 |
TInt rc=KErrInUse;
|
|
1153 |
|
|
1154 |
TRAPD(leaveCode, rc=iTelephonyFunctions->GetFlightMode(aRequestStatus, aDes));
|
|
1155 |
|
|
1156 |
if(leaveCode != KErrNone)
|
|
1157 |
{
|
|
1158 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetFlightMode, EFalse);
|
|
1159 |
User::RequestComplete(reqStatusPtr, leaveCode);
|
|
1160 |
}
|
|
1161 |
else if (rc != KErrNone)
|
|
1162 |
{
|
|
1163 |
if(rc != KErrInUse) //this means request already pending, so do not reset
|
|
1164 |
{
|
|
1165 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetFlightMode, EFalse);
|
|
1166 |
}
|
|
1167 |
User::RequestComplete(reqStatusPtr, rc);
|
|
1168 |
}
|
|
1169 |
}
|
|
1170 |
|
|
1171 |
EXPORT_C CTelephony::TBatteryInfoV1::TBatteryInfoV1()
|
|
1172 |
/**
|
|
1173 |
Default constructor.
|
|
1174 |
*/
|
|
1175 |
{
|
|
1176 |
iVersionId=KEtelISVV1;
|
|
1177 |
}
|
|
1178 |
|
|
1179 |
EXPORT_C CTelephony::TCallStatusV1::TCallStatusV1()
|
|
1180 |
/**
|
|
1181 |
Default constructor.
|
|
1182 |
*/
|
|
1183 |
{
|
|
1184 |
iVersionId=KEtelISVV1;
|
|
1185 |
}
|
|
1186 |
|
|
1187 |
/////////////////////////////////////////////////
|
|
1188 |
//Line related exports
|
|
1189 |
/////////////////////////////////////////////////
|
|
1190 |
|
|
1191 |
EXPORT_C TInt CTelephony::GetLineStatus(const CTelephony::TPhoneLine& aLine, TDes8& aStatus) const
|
|
1192 |
/**
|
|
1193 |
Retrieves the status of the line selected by the aLine argument. The current
|
|
1194 |
status of the selected line is returned to the client via the aStatus argument.
|
|
1195 |
|
|
1196 |
When only one call is in progress, the line status is identical to the
|
|
1197 |
status of the call.
|
|
1198 |
|
|
1199 |
When two calls are in progress (one active and one on hold) then the
|
|
1200 |
status of the most "active" (connected and active or in progress) call
|
|
1201 |
is returned.
|
|
1202 |
|
|
1203 |
This functionality is not available when the phone is in "flight" mode.
|
|
1204 |
|
|
1205 |
@param aLine Identifier to line from which status is to be retrieved.
|
|
1206 |
@param aStatus On completion contains the current line status in a
|
|
1207 |
CTelephony::TCallStatusV1Pckg, a packaged version of CTelephony::TCallStatusV1.
|
|
1208 |
@return KErrNone if successful, otherwise another of the system-wide error codes.
|
|
1209 |
|
|
1210 |
@capability None
|
|
1211 |
*/
|
|
1212 |
{
|
|
1213 |
TInt rc=KErrAccessDenied;
|
|
1214 |
|
|
1215 |
TRAPD(leaveCode, rc=iTelephonyFunctions->GetLineStatus(aLine, aStatus));
|
|
1216 |
|
|
1217 |
if(leaveCode != KErrNone)
|
|
1218 |
{
|
|
1219 |
return leaveCode;
|
|
1220 |
}
|
|
1221 |
else if (rc != KErrNone)
|
|
1222 |
{
|
|
1223 |
return rc;
|
|
1224 |
}
|
|
1225 |
return KErrNone;
|
|
1226 |
}
|
|
1227 |
|
|
1228 |
EXPORT_C CTelephony::TCallInfoV1::TCallInfoV1()
|
|
1229 |
/**
|
|
1230 |
Default constructor.
|
|
1231 |
*/
|
|
1232 |
: iCallId(-1)
|
|
1233 |
{
|
|
1234 |
iVersionId=KEtelISVV1;
|
|
1235 |
}
|
|
1236 |
|
|
1237 |
EXPORT_C CTelephony::TTelAddress::TTelAddress()
|
|
1238 |
/**
|
|
1239 |
Default constructor.
|
|
1240 |
*/
|
|
1241 |
: iTypeOfNumber(EUnknownNumber),
|
|
1242 |
iNumberPlan(EUnknownNumberingPlan),
|
|
1243 |
iTelNumber(0)
|
|
1244 |
{
|
|
1245 |
}
|
|
1246 |
|
|
1247 |
EXPORT_C CTelephony::TRemotePartyInfoV1::TRemotePartyInfoV1()
|
|
1248 |
/**
|
|
1249 |
Default constructor.
|
|
1250 |
*/
|
|
1251 |
{
|
|
1252 |
iVersionId=KEtelISVV1;
|
|
1253 |
}
|
|
1254 |
|
|
1255 |
EXPORT_C CTelephony::TCallSelectionV1::TCallSelectionV1()
|
|
1256 |
/**
|
|
1257 |
Default constructor.
|
|
1258 |
*/
|
|
1259 |
{
|
|
1260 |
iVersionId=KEtelISVV1;
|
|
1261 |
}
|
|
1262 |
|
|
1263 |
EXPORT_C TInt CTelephony::GetCallInfo(TDes8& aCallSelect, TDes8& aCallInfo, TDes8& aRemoteInfo) const
|
|
1264 |
/**
|
|
1265 |
Retrieves information about the call selected by the aCallSelect argument.
|
|
1266 |
|
|
1267 |
If a call with the appropriate status is not available, then
|
|
1268 |
KErrNotFound is returned. Upon successful completion the call
|
|
1269 |
information will be returned via the aCallInfo and aRemoteCallInfo
|
|
1270 |
arguments.
|
|
1271 |
|
|
1272 |
This functionality should be used after a notification of an incoming
|
|
1273 |
call, notification of line status change to dialling, or notification
|
|
1274 |
of remote party info change. Notification is requested with
|
|
1275 |
CTelephony::NotifyChange(). After completion of the notification the
|
|
1276 |
client should immediately request information about the call.
|
|
1277 |
|
|
1278 |
@param aCallSelect Identifies the call for which information is retrieved.
|
|
1279 |
@param aCallInfo Contains CTelephony::TCallInfoV1Pckg, the packaged CTelephony::TCallInfoV1
|
|
1280 |
parameter class which is filled on completion.
|
|
1281 |
@param aRemoteInfo Contains CTelephony::TRemotePartyInfoV1Pckg, the packaged
|
|
1282 |
CTelephony::TRemotePartyInfoV1 parameter class which is filled on completion.
|
|
1283 |
@return KErrNone if successful, otherwise another of the system-wide error codes.
|
|
1284 |
|
|
1285 |
@capability ReadUserData
|
|
1286 |
*/
|
|
1287 |
{
|
|
1288 |
TInt rc=KErrInUse;
|
|
1289 |
|
|
1290 |
TRAPD(leaveCode, rc=iTelephonyFunctions->GetCallInfoL(aCallSelect, aCallInfo, aRemoteInfo));
|
|
1291 |
|
|
1292 |
if(leaveCode != KErrNone)
|
|
1293 |
{
|
|
1294 |
return leaveCode;
|
|
1295 |
}
|
|
1296 |
else if (rc != KErrNone)
|
|
1297 |
{
|
|
1298 |
return rc;
|
|
1299 |
}
|
|
1300 |
return KErrNone;
|
|
1301 |
}
|
|
1302 |
|
|
1303 |
/////////////////////////////////////////////////
|
|
1304 |
//Network related exports
|
|
1305 |
/////////////////////////////////////////////////
|
|
1306 |
|
|
1307 |
EXPORT_C CTelephony::TNetworkRegistrationV1::TNetworkRegistrationV1()
|
|
1308 |
/**
|
|
1309 |
Default constructor.
|
|
1310 |
*/
|
|
1311 |
{
|
|
1312 |
iVersionId=KEtelISVV1;
|
|
1313 |
}
|
|
1314 |
|
|
1315 |
EXPORT_C void CTelephony::GetNetworkRegistrationStatus(TRequestStatus& aRequestStatus, TDes8& aDes) const
|
|
1316 |
/**
|
|
1317 |
Retrieves the current network registration status.
|
|
1318 |
|
|
1319 |
This is an asynchronous method. Upon successful completion of this request
|
|
1320 |
the registration status is returned via the aDes argument.
|
|
1321 |
|
|
1322 |
This functionality is not available when the phone is in "flight" mode.
|
|
1323 |
|
|
1324 |
@param aRequestStatus Returns the result code after the asynchronous
|
|
1325 |
call completes. Pass CTelephony::CancelAsync() CTelephony::EGetNetworkRegistrationStatusCancel
|
|
1326 |
to cancel.
|
|
1327 |
|
|
1328 |
@param aDes Contains a CTelephony::TNetworkRegistrationV1Pckg, a packaged version
|
|
1329 |
of the CTelephony::TNetworkRegistrationV1 class which is filled on completion.
|
|
1330 |
|
|
1331 |
@capability None
|
|
1332 |
*/
|
|
1333 |
{
|
|
1334 |
TRequestStatus* reqStatusPtr = &aRequestStatus;
|
|
1335 |
|
|
1336 |
__ASSERT_ALWAYS(aRequestStatus != KRequestPending,
|
|
1337 |
User::Panic(KTelephonyCategory, KTelephonyPanicIllegalReuse) );
|
|
1338 |
|
|
1339 |
aRequestStatus = KRequestPending;
|
|
1340 |
TInt rc=KErrInUse;
|
|
1341 |
|
|
1342 |
TRAPD(leaveCode, rc=iTelephonyFunctions->GetNetworkRegistrationStatusL(aRequestStatus, aDes));
|
|
1343 |
|
|
1344 |
if(leaveCode != KErrNone)
|
|
1345 |
{
|
|
1346 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetNetworkRegistrationStatus, EFalse);
|
|
1347 |
User::RequestComplete(reqStatusPtr, leaveCode);
|
|
1348 |
}
|
|
1349 |
else if (rc != KErrNone)
|
|
1350 |
{
|
|
1351 |
if(rc != KErrInUse) //this means request already pending, so do not reset
|
|
1352 |
{
|
|
1353 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetNetworkRegistrationStatus, EFalse);
|
|
1354 |
}
|
|
1355 |
User::RequestComplete(reqStatusPtr, rc);
|
|
1356 |
}
|
|
1357 |
}
|
|
1358 |
|
|
1359 |
EXPORT_C CTelephony::TNetworkInfoV1::TNetworkInfoV1()
|
|
1360 |
/**
|
|
1361 |
Default constructor.
|
|
1362 |
*/
|
|
1363 |
{
|
|
1364 |
iVersionId=KEtelISVV1;
|
|
1365 |
}
|
|
1366 |
|
|
1367 |
/**
|
|
1368 |
Default constructor.
|
|
1369 |
*/
|
|
1370 |
EXPORT_C CTelephony::TNetworkInfoV2::TNetworkInfoV2()
|
|
1371 |
{
|
|
1372 |
iVersionId=KEtelISVV2;
|
|
1373 |
}
|
|
1374 |
|
|
1375 |
/**
|
|
1376 |
Retrieves over-the-air network information about the currently
|
|
1377 |
registered mobile network.
|
|
1378 |
|
|
1379 |
This is an asynchronous method. Upon successful completion the network
|
|
1380 |
information is returned via the aDes argument.
|
|
1381 |
|
|
1382 |
This functionality is not available when the phone is in "flight" mode.
|
|
1383 |
|
|
1384 |
@param aRequestStatus Returns the result code after the asynchronous
|
|
1385 |
call completes. Pass CTelephony::CancelAsync() CTelephony::EGetCurrentNetworkInfoCancel to
|
|
1386 |
cancel. KErrAccessDenied is given to this request status if the device
|
|
1387 |
is in flight mode.
|
|
1388 |
|
|
1389 |
@param aDes Contains a CTelephony::TNetworkInfoV1Pckg, a packaged version of the
|
|
1390 |
CTelephony::TNetworkInfoV1 class which is filled on completion.
|
|
1391 |
|
|
1392 |
@capability ReadDeviceData because Cell ID is retrieved from the platform.
|
|
1393 |
*/
|
|
1394 |
EXPORT_C void CTelephony::GetCurrentNetworkInfo(TRequestStatus& aRequestStatus, TDes8& aDes) const
|
|
1395 |
{
|
|
1396 |
TRequestStatus* reqStatusPtr = &aRequestStatus;
|
|
1397 |
|
|
1398 |
__ASSERT_ALWAYS(aRequestStatus != KRequestPending,
|
|
1399 |
User::Panic(KTelephonyCategory, KTelephonyPanicIllegalReuse) );
|
|
1400 |
|
|
1401 |
aRequestStatus = KRequestPending;
|
|
1402 |
TInt rc=KErrInUse;
|
|
1403 |
|
|
1404 |
TRAPD(leaveCode, rc=iTelephonyFunctions->GetCurrentNetworkInfoL(aRequestStatus, aDes));
|
|
1405 |
|
|
1406 |
if(leaveCode != KErrNone)
|
|
1407 |
{
|
|
1408 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetCurrentNetworkInfo, EFalse);
|
|
1409 |
User::RequestComplete(reqStatusPtr, leaveCode);
|
|
1410 |
}
|
|
1411 |
else if (rc != KErrNone)
|
|
1412 |
{
|
|
1413 |
if(rc != KErrInUse) //this means request already pending, so do not reset
|
|
1414 |
{
|
|
1415 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetCurrentNetworkInfo, EFalse);
|
|
1416 |
}
|
|
1417 |
User::RequestComplete(reqStatusPtr, rc);
|
|
1418 |
}
|
|
1419 |
}
|
|
1420 |
|
|
1421 |
EXPORT_C CTelephony::TNetworkNameV1::TNetworkNameV1()
|
|
1422 |
/**
|
|
1423 |
Default constructor.
|
|
1424 |
*/
|
|
1425 |
{
|
|
1426 |
iVersionId=KEtelISVV1;
|
|
1427 |
}
|
|
1428 |
|
|
1429 |
/**
|
|
1430 |
Default constructor.
|
|
1431 |
*/
|
|
1432 |
EXPORT_C CTelephony::TNetworkNameV2::TNetworkNameV2()
|
|
1433 |
{
|
|
1434 |
iVersionId=KEtelISVV2;
|
|
1435 |
}
|
|
1436 |
|
|
1437 |
/**
|
|
1438 |
Retrieves ICC-stored information about the (preferred) name of the
|
|
1439 |
currently registered mobile network.
|
|
1440 |
|
|
1441 |
This is an asynchronous method. Upon successful completion the retrieved
|
|
1442 |
network name(s) is returned via the aDes argument.
|
|
1443 |
|
|
1444 |
This functionality is not available when the phone is in "flight" mode.
|
|
1445 |
|
|
1446 |
Cancellation of the request can be achieved by passing
|
|
1447 |
CTelephony::EGetCurrentNetworkNameCancel to the function CTelephony::CancelAsync().
|
|
1448 |
|
|
1449 |
Note: This information is only available on GSM/WCDMA networks.
|
|
1450 |
|
|
1451 |
@param aRequestStatus Returns the result code after the asynchronous call completes.
|
|
1452 |
KErrAccessDenied will be returned if the phone is in flight mode.
|
|
1453 |
|
|
1454 |
@param aDes Contains a CTelephony::TNetworkNameV1Pckg, a packaged version of the
|
|
1455 |
CTelephony::TNetworkNameV1 class which is filled on completion.
|
|
1456 |
|
|
1457 |
@capability None
|
|
1458 |
*/
|
|
1459 |
EXPORT_C void CTelephony::GetCurrentNetworkName(TRequestStatus& aRequestStatus, TDes8& aDes) const
|
|
1460 |
{
|
|
1461 |
TRequestStatus* reqStatusPtr = &aRequestStatus;
|
|
1462 |
|
|
1463 |
__ASSERT_ALWAYS(aRequestStatus != KRequestPending,
|
|
1464 |
User::Panic(KTelephonyCategory, KTelephonyPanicIllegalReuse) );
|
|
1465 |
|
|
1466 |
aRequestStatus = KRequestPending;
|
|
1467 |
TInt rc=KErrInUse;
|
|
1468 |
|
|
1469 |
TRAPD(leaveCode, rc=iTelephonyFunctions->GetCurrentNetworkNameL(aRequestStatus, aDes));
|
|
1470 |
|
|
1471 |
if(leaveCode != KErrNone)
|
|
1472 |
{
|
|
1473 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetCurrentNetworkName, EFalse);
|
|
1474 |
User::RequestComplete(reqStatusPtr, leaveCode);
|
|
1475 |
}
|
|
1476 |
else if (rc != KErrNone)
|
|
1477 |
{
|
|
1478 |
if(rc != KErrInUse) //this means request already pending, so do not reset
|
|
1479 |
{
|
|
1480 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetCurrentNetworkName, EFalse);
|
|
1481 |
}
|
|
1482 |
User::RequestComplete(reqStatusPtr, rc);
|
|
1483 |
}
|
|
1484 |
}
|
|
1485 |
|
|
1486 |
/////////////////////////////////////////////////
|
|
1487 |
//Supplementary Services related exports
|
|
1488 |
/////////////////////////////////////////////////
|
|
1489 |
|
|
1490 |
EXPORT_C CTelephony::TCallForwardingSupplServicesV1::TCallForwardingSupplServicesV1()
|
|
1491 |
/**
|
|
1492 |
Default constructor.
|
|
1493 |
*/
|
|
1494 |
{
|
|
1495 |
iVersionId=KEtelISVV1;
|
|
1496 |
}
|
|
1497 |
|
|
1498 |
EXPORT_C CTelephony::TCallBarringSupplServicesV1::TCallBarringSupplServicesV1()
|
|
1499 |
/**
|
|
1500 |
Default constructor.
|
|
1501 |
*/
|
|
1502 |
{
|
|
1503 |
iVersionId=KEtelISVV1;
|
|
1504 |
}
|
|
1505 |
|
|
1506 |
EXPORT_C CTelephony::TCallWaitingSupplServicesV1::TCallWaitingSupplServicesV1()
|
|
1507 |
/**
|
|
1508 |
Default constructor.
|
|
1509 |
*/
|
|
1510 |
{
|
|
1511 |
iVersionId=KEtelISVV1;
|
|
1512 |
}
|
|
1513 |
|
|
1514 |
EXPORT_C void CTelephony::GetCallForwardingStatus(TRequestStatus& aRequestStatus, const TCallForwardingCondition aCondition, TDes8& aDes, const TServiceGroup aServiceGroup) const
|
|
1515 |
/**
|
|
1516 |
Interrogates the current status of the call forwarding services.
|
|
1517 |
|
|
1518 |
Specify the condition for enquiry via the aCondition argument.
|
|
1519 |
|
|
1520 |
This is an asynchronous method. Upon successful completion the status
|
|
1521 |
information is returned via the aSSInfo argument. Support is available
|
|
1522 |
only for the voice line.
|
|
1523 |
|
|
1524 |
This functionality is not available when the phone is in "flight" mode.
|
|
1525 |
|
|
1526 |
Note: This information is only available on GSM/WCDMA networks.
|
|
1527 |
|
|
1528 |
@param aRequestStatus Returns the result code after the asynchronous call completes.
|
|
1529 |
Pass CTelephony::CancelAsync() CTelephony::EGetCallForwardingStatusCancel to
|
|
1530 |
cancel.
|
|
1531 |
@param aCondition Call forwarding condition to be interrogated.
|
|
1532 |
|
|
1533 |
@param aDes Contains a CTelephony::TCallForwardingSupplServicesV1Pckg, a packaged
|
|
1534 |
version of the CTelephony::TCallForwardingSupplServicesV1 class which is filled on
|
|
1535 |
completion.
|
|
1536 |
|
|
1537 |
@param aServiceGroup Service group to be interrogated.
|
|
1538 |
|
|
1539 |
@capability ReadDeviceData
|
|
1540 |
@capability NetworkServices
|
|
1541 |
*/
|
|
1542 |
{
|
|
1543 |
TRequestStatus* reqStatusPtr = &aRequestStatus;
|
|
1544 |
|
|
1545 |
__ASSERT_ALWAYS(aRequestStatus != KRequestPending,
|
|
1546 |
User::Panic(KTelephonyCategory, KTelephonyPanicIllegalReuse) );
|
|
1547 |
|
|
1548 |
aRequestStatus = KRequestPending;
|
|
1549 |
TInt rc=KErrInUse;
|
|
1550 |
|
|
1551 |
TRAPD(leaveCode, rc=iTelephonyFunctions->GetCFSupplementaryServiceStatusL(aRequestStatus, aCondition, aDes, aServiceGroup));
|
|
1552 |
|
|
1553 |
if(leaveCode != KErrNone)
|
|
1554 |
{
|
|
1555 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetCFSupplServicesStatus, EFalse);
|
|
1556 |
User::RequestComplete(reqStatusPtr, leaveCode);
|
|
1557 |
}
|
|
1558 |
else if (rc != KErrNone)
|
|
1559 |
{
|
|
1560 |
if(rc != KErrInUse) //this means request already pending, so do not reset
|
|
1561 |
{
|
|
1562 |
iTelephonyFunctions->SetRequestPending(CTelephonyFunctions::EGetCFSupplServicesStatus, EFalse);
|
|
1563 |
}
|
|
1564 |
User::RequestComplete(reqStatusPtr, rc);
|
|
1565 |
}
|
|
1566 |
}
|