?? callstatusappui.cpp
字號:
/* ====================================================================
* File: CallStatusAppUi.cpp
* Created: 09/06/07
* Author:
* Copyright (c): All rights reserved
* ==================================================================== */
#include <avkon.hrh>
#include <aknnotewrappers.h>
#include "CallStatus.pan"
#include "CallStatusAppUi.h"
#include "CallStatusAppView.h"
#include "CallStatus.hrh"
#include<e32property.h>
//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;
// ConstructL is called by the application framework
void CCallStatusAppUi::ConstructL()
{
BaseConstructL();
iAppView = CCallStatusAppView::NewL(ClientRect());
AddToStackL(iAppView);
}
CCallStatusAppUi::CCallStatusAppUi()
{
// no implementation required
}
CCallStatusAppUi::~CCallStatusAppUi()
{
if (iAppView)
{
RemoveFromStack(iAppView);
delete iAppView;
iAppView = NULL;
}
}
// handle any menu commands
void CCallStatusAppUi::HandleCommandL(TInt aCommand)
{
switch(aCommand)
{
case EEikCmdExit:
case EAknSoftkeyExit:
Exit();
break;
case ECallStatusCommand1:
{
GetTelephonyStateAndType();
}
break;
default:
Panic(ECallStatusBasicUi);
break;
}
}
void CCallStatusAppUi::GetTelephonyStateAndType()
{
TBuf<20> printInfo;
TInt aVal;
RProperty iRP;
iRP.Get(KPSUidTelephonyCallHandling,KTelephonyCallState,aVal);
printInfo.AppendNum(aVal);
CEikonEnv::InfoWinL(_L("Call Status:"),printInfo);
printInfo.Zero();
iRP.Get(KPSUidTelephonyCallHandling,KTelephonyCallType,aVal);
printInfo.AppendNum(aVal);
CEikonEnv::InfoWinL(_L("Call Type:"),printInfo);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -