Read-only archive of the All About Symbian forum (2001–2013) · About this archive

catching log event

0 replies · 3,020 views · Started 14 February 2006

Hi
On Nokia 6600:
I try to "catch" log event when dialling a voice call.
I use the code below ,
ConstructL works with no errors ,
I get inside RunL once during an outgoing call ,
but the event type does not fit a call event.
Please take a look at the code , I wrote there where I want to get but fail to,
Any ideas of how to actually detect the relevant log event ?
Thanks a lot 😊


// ###### HEADER ######
class CLogHandler : public CActive
{
public:
CLogHandler();
~CLogHandler();
static CLogHandler* NewL();
static CLogHandler* NewLC();
void RunL();
void ConstructL();
void DoCancel();
RFs iFs;
CLogClient* iLogClient;
CLogViewRecent* iRecentLogView;
CLogFilterList* filterList;
CLogFilter* filter;
};

// ###### CPP ######
CLogHandler::CLogHandler(): CActive(EPriorityStandard){}

CLogHandler::~CLogHandler(){CActive::Cancel();}

CLogHandler* CLogHandler::NewL()
{
CLogHandler* self = NewLC();
CleanupStack::Pop();
return(self) ;
}

CLogHandler* CLogHandler::NewLC()
{
CLogHandler* self = new (ELeave) CLogHandler();
CleanupStack::PushL(self);
self->ConstructL();
return self;
}

void CLogHandler::RunL()
{
if( iStatus == KErrNone)
{
// I GET HERE ONCE DURING AN OUTGOING CALL ...
const CLogEvent& event = iRecentLogView->Event();
if (event.EventType() == KLogCallEventTypeUid)
{
// I WANT TO GET HERE !!! - BUT I DON'T ...
}
}
SetActive();
}

void CLogHandler::ConstructL()
{
iFs.Connect();
iLogClient = CLogClient::NewL(iFs);
iRecentLogView = CLogViewRecent::NewL(*iLogClient);
filterList = new ( ELeave ) CLogFilterList();
filter = CLogFilter::NewL();
filter->SetEventType(KLogCallEventTypeUid);
filterList->AppendL(filter);
CActiveScheduler::Add(this);
}

void CLogHandler:😃oCancel()
{
CActive::Cancel();
iRecentLogView->Cancel();
}