Hi all, I had posted another query in this mailing list, but couldn't get any reply. I had implemented an agenda observer and used it the following way. iModel->SetMode(CAgnEntryModel::EClient); TRAPD(error1,iModel->OpenL(_L("c:\\Documents\\AGENDA\\AGENDA"))) if(error1 != KErrNone) { delete iModel; iServer->CloseAgenda(); User::Leave(error);
My Observer class implementation is like this. EXPORT_C CAgnTestObserver*CAgnTestObserver::NewL() { CAgnTestObserver* self = new(ELeave) CAgnTestObserver(); CleanupStack::PushL(self); self->ConstructL(); CleanupStack::Pop(); return (self);
The start observing stop observing functions are getting called. The agenda application also is working fine. But i am not getting any events for agenda modifications/delete and additon through the send function of my observer. what could be the reason.
A sppedy reply is hightly appreciated. thanks for the time arun
The observer can be used to get events about changes made by the owner application of the observer (application which installed the observer). This observer cannot be used to get changes made by the default application.
If you want to get notified of events in the agenda database maybe you should try an agenda notifier.
I use like this: <...snip...> TCallBack serverNotifier(CheckNotifier,this); iAgnServ->StartNotifierL(serverNotifier); //RAgendaServ* iAgnServ <...snip...>
the callback function: TInt CXXX::CheckNotifier(TAny* aPtr) { // Refresh model. Model()->AgnModel()->CheckNotifier(); //do something return EFalse; //works fine with EFalse, but it should be ETrue }
you check notifier will be called anytime there is a change in the agenda model ... unfortunately it doesn't tell you what type of change. But that's better than nothing
Forum posts: 52
Please help me in this. I am yet to get a solutions.
thanks
arun
Forum posts: 26
Thanks
Niimidan
Forum posts: 59
Check this one:
http://developer.sonyericsson.com/site/global/techsupport/tipstrickscode/symbian/p_myagenda_agenda_example.jsp
Forum posts: 52
At least this is the answer we got from symbian.
Forum posts: 53
I use like this:
<...snip...>
TCallBack serverNotifier(CheckNotifier,this);
iAgnServ->StartNotifierL(serverNotifier);
//RAgendaServ* iAgnServ
<...snip...>
the callback function:
TInt CXXX::CheckNotifier(TAny* aPtr)
{
// Refresh model.
Model()->AgnModel()->CheckNotifier();
//do something
return EFalse;
//works fine with EFalse, but it should be ETrue
}
you check notifier will be called anytime there is a change in the agenda model ... unfortunately it doesn't tell you what type of change.
But that's better than nothing