PS Keys for Call Status & Indicators API
Article Metadata
Code Example
Article
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


(no comments yet)