×
Namespaces

Variants
Actions

PS Keys for Call Status & Indicators API

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Code ExampleArticle
Created: ltomuta (16 Jun 2007)
Last edited: hamishwillee (30 May 2013)

Note.pngNote: :This API is not part of the public SDK. It can be found in the SDK API Plug-in.

PS Keys for Call Status & Indicators API provide keys to check the Telephony Call Status like Dialling, Answering, Ringing, Hold state etc, and Telephony Call Type like Data call, Voice Call, Fax etc.

Use cases

They can be used to know the call type and status of ongoing call.

Example code

The following are the Uid & UInt values provided:

//Telephony call handling PS Uid. 
const TUid KPSUidTelephonyCallHandling = {0x101F8787};
//State of ongoing call(s).
const TUint32 KTelephonyCallState = 0x00000004;
//Type of ongoing call.
const TUint32 KTelephonyCallType = 0x00000005;

The above said can be achieved by passing KPSUidTelephonyCallHandling(Telephony call handling PS Uid) and KTelephonyCallState or KTelephonyCallType to Get() method of RProperty which is the User side interface to Publish & Subscribe, as shown in the example below.

The RProperty type of KTelephonyCallState & KTelephonyCallType property is EInt.

void CCallStatusAppUi::GetTelephonyStateAndType()
{
TBuf<25> printInfo;
TInt aVal;
RProperty iRP;
// Call Status
iRP.Get(KPSUidTelephonyCallHandling,KTelephonyCallState,aVal);
printInfo.AppendNum(aVal);
CEikonEnv::InfoWinL(_L("Phone Status:"),printInfo);
 
printInfo.Zero();
 
// Call Type
iRP.Get(KPSUidTelephonyCallHandling,KTelephonyCallType,aVal);
printInfo.AppendNum(aVal);
CEikonEnv::InfoWinL(_L("Phone Type:"),printInfo);
}

The enumerations are as follows :

enum TPSTelephonyCallState : EPSTelephonyCallStateUninitialized, EPSTelephonyCallStateNone, EPSTelephonyCallStateAlerting, EPSTelephonyCallStateRinging, EPSTelephonyCallStateDialling, EPSTelephonyCallStateAnswering, EPSTelephonyCallStateDisconnecting, EPSTelephonyCallStateConnected, EPSTelephonyCallStateHold

enum TPSTelephonyCallType : EPSTelephonyCallTypeUninitialized, EPSTelephonyCallTypeNone, EPSTelephonyCallTypeCSVoice, EPSTelephonyCallTypeFax, EPSTelephonyCallTypeData, EPSTelephonyCallTypeHSCSD, EPSTelephonyCallTypeH324Multimedia, EPSTelephonyCallTypeVoIP

Example project

File:CallStatus.zip

This page was last modified on 30 May 2013, at 07:39.
77 page views in the last 30 days.