Symbian 来电拦截的实现
2010-03-07 19:59:00 来源:WEB开发网private:
CTelDial();
void ConstructL();
static CTelDial* NewLC();
private:
//const TUid KUidSound =0x101f8798;
//Etel Api
private:
TBuf <20>iTSYName;
RTelServer iServer;
RPhone iPhone;
RPhone::TLineInfo iphonelineinfo;
RLine iLine;
RLine::TLineInfo ilineinfo;
RCall::TStatus iCallStatus;
//from the etelmm
RMobileCall iMCall;
//the numbers
private:
TBuf <11> iNumberDial;
TBuf <11> iNumberReceive;
TBuf <11> iNumberDialSet;
TBuf <11> iNumberReceiveSet;
TBuf <11> iNumberDetectSet;
//to change the repository
private:
CRepository* irepository;
//for the vibra and ring
private:
TBool ivibratype;
TProfileRingingType iRingingType;
private:
CHWRMLight* ilight;
private:
RWindowGroup iwindowgroup;
//simulate key
private:
RWsSession ws;
TRawEvent ev1;
};
#endif
#include
#include
#include "CTel_3rd.h"
//constructed function
void CTelDial::ConstructL()
{
//add the cteldial to the active scheduler
CActiveScheduler::Add(this);
ilight = CHWRMLight::NewL();
itelephony = CTelephony::NewL();
// iwindowgroup.CaptureKey(EStdKey)
}
//RunL ,if the number received is equel to the setted number
void CTelDial::RunL()
{
if (KErrNone == iStatus.Int())
{
switch (iLineStatus.iStatus)
{
case CTelephony::EStatusDisconnecting:
{
ilight->LightOffL(CHWRMLight::EPrimaryDisplayAndKeyboard);
更多精彩
赞助商链接