Well to do this you do not need to add any events yourself, that is taken care for you. If you want to show the user info regarding more than just one event you should probably think of retrieving these calls and storing them in an array or database...
So you need to create a class derived from CActive and in the ConstructL function you would have something like this
Code:
void CLogEngine::ConstructL()
{
// Get the file server session owned by control environment
RFs& fsSession = CCoeEnv::Static()->FsSession();
// create the log engine, a view of the logengine, a filter
iLogClient = CLogClient::NewL(fsSession);
iLogView = CLogViewEvent::NewL(*iLogClient);
iLogFilter = CLogFilter::NewL();
// Add to the active scheduler
CActiveScheduler::Add(this);
FillDataBaseL();
Code:
void CLogEngine::FillDataBaseL()
{
TBool eventsInView = iLogView->SetFilterL(*iLogFilter, iStatus);
if (eventsInView)
{
SetActive();
}
else
...//whatever you want to do here //
}
Then when the request has been dealt with you should do something in your runL() that would add these to an database or somewhere...
Code:
const CLogEvent& event = iLogView->Event();
iEventDataBase.AddEntryL(event);
// Are there any more entries
if (iLogView->NextL(iStatus))
{
// if there is another entry, issue the request
// to move to the next entry.
SetActive();
}
There won't be any events in the view if you are testing this on the emulator so you need to use AddEvent etc