×
Namespaces

Variants
Actions
Revision as of 04:18, 14 June 2012 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Archived:Telephony Call Information Symbian API

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.

Article Metadata
Code ExampleTested with
Devices(s): Nokia N78
Compatibility
Platform(s): S60 3rd Edition, FP2
S60 3rd Edition FP2
Article
Created: User:Technical writer 1 (07 Jul 2008)
Last edited: hamishwillee (14 Jun 2012)

Note.pngNote: This API is not part of the public SDK. It can be found in the SDK API Plug-in. The API is only available through Accessing internal platform APIs through the API Partnering Program and it is subject to the corresponsing license agreement.

The Telephony Call Information API provides keys to check the Telephony Call Status, such as Dialling, Answering, Ringing, and Hold state, and the Telephony Call Type, such as Data Call, Voice Call, and Fax.

Use cases

The keys can be used to find out the call type and status of an ongoing call.

Example code

Headers

 #include <ctsydomainpskeys.h> // new header for S60 3rd Edition, FP2
 #include<e32property.h>

Call type and status can be checked by passing KPSUidCtsyCallInformation (Telephony call handling PS UID) and KTelephonyCallState or KTelephonyCallType to the Get() method of RProperty, which is the user-side interface to Publish & Subscribe, as shown in the following example.

The RProperty type of the KCTsyCallState and the KCTsyCallType property is EInt.

 void CCallStatusAppUi::GetTelephonyStateAndType()
{
TBuf<20> printInfo;
TInt aVal;
RProperty iRP;
iRP.Get(KPSUidCtsyCallInformation ,KCTsyCallState ,aVal);
switch(aVal)
{
case EPSCTsyCallStateUninitialized:
{
printInfo.AppendNum(aVal);
CEikonEnv::InfoWinL(_L("Call Status - Uninitialized:"),printInfo);
}
break;
case EPSCTsyCallStateNone:
{
printInfo.AppendNum(aVal);
CEikonEnv::InfoWinL(_L("Call Status - None:"),printInfo);
}
break;
case EPSCTsyCallStateAlerting:
{
printInfo.AppendNum(aVal);
CEikonEnv::InfoWinL(_L("Call Status - Alert:"),printInfo);
}
break;
case EPSCTsyCallStateRinging:
{
printInfo.AppendNum(aVal);
CEikonEnv::InfoWinL(_L("Call Status - Ringing:"),printInfo);
}
break;
case EPSCTsyCallStateDialling:
{
printInfo.AppendNum(aVal);
CEikonEnv::InfoWinL(_L("Call Status - Dialing:"),printInfo);
}
..............
..............
}
 
printInfo.Zero();
 
iRP.Get(KPSUidCtsyCallInformation ,KCTsyCallType ,aVal);
switch (aVal)
{
case EPSCTsyCallTypeUninitialized:
{
printInfo.AppendNum(aVal);
CEikonEnv::InfoWinL(_L("Call Type - Uninitialized:"),printInfo);
}
break;
case EPSCTsyCallTypeNone:
{
printInfo.AppendNum(aVal);
CEikonEnv::InfoWinL(_L("Call Type - None:"),printInfo);
}
break;
case EPSCTsyCallTypeCSVoice:
{
printInfo.AppendNum(aVal);
CEikonEnv::InfoWinL(_L("Call Type - CSVoice:"),printInfo);
}
break;
case EPSCTsyCallTypeFax:
{
printInfo.AppendNum(aVal);
CEikonEnv::InfoWinL(_L("Call Type - Fax:"),printInfo);
}
..............
..............
}
}

The enumerations are as follows:

enum TPSCTsyCallState :

   EPSCTsyCallStateUninitialized,
   EPSCTsyCallStateNone,
   EPSCTsyCallStateAlerting,
   EPSCTsyCallStateRinging,
   EPSCTsyCallStateDialling,
   EPSCTsyCallStateAnswering,
   EPSCTsyCallStateDisconnecting,
   EPSCTsyCallStateConnected,
   EPSCTsyCallStateHold

enum TPSCTsyCallType:

   EPSCTsyCallTypeUninitialized,
   EPSCTsyCallTypeNone,
   EPSCTsyCallTypeCSVoice,
   EPSCTsyCallTypeFax,
   EPSCTsyCallTypeData,
   EPSCTsyCallTypeHSCSD,
   EPSCTsyCallTypeH324Multimedia,
   EPSCTsyCallTypeVoIP

Example project

The following application has been tested on the Nokia N78: File:TelephonyCallInfoAPIFor3rdFP2.zip.

This page was last modified on 14 June 2012, at 04:18.
67 page views in the last 30 days.