×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    12

    Getting Notification by using CAgnObserver

    Hi Friends,

    I found from the SDK that CAgnObserver is for getting notification for any change in Calendar/Agenda.

    But , I am getting notification when I am changing entries through my AgendaModel.

    But if I change with the Default/device Calendar(or say with third application) then I am not getting any notifiaction.

    Does this mean CAgnObserver is only gives notification for the entries added by the Model with which it is registered.

    I want to get notification if any entry is added by any application in the Calendar file in my application.

    Please help me , how can I do this.

    Thanks
    Birinder

  2. #2
    Registered User
    Join Date
    Apr 2004
    Location
    Finland
    Posts
    10

    Re: Getting Notification by using CAgnObserver

    Hi,

    I read from NewLC, that you can get events from only from changes made by the owner application of the observer, but probably you have already seen this already.

    However, I haven't been able to get even those events. It seems that registering the observer goes fine (CMyCalendarObserver::StartObserving() and MyCalendarObserver::ExternalizeL() are being called), but if I try to add an entry after registering it crashes to OpenL(). If I don't try to register the observer, the adding of an entry goes fine. So I think that there is something wrong in the way I do the registering.

    This is how I do it:

    CAgnModel* model = CAgnModel::NewL( this );
    CleanupStack::PushL( model );
    model->SetServer( iAgnServer );
    model->SetMode( CAgnEntryModel::EClient );
    model->OpenL( KCalendarFile,
    KEventDispTime,
    KAnnivDispTime,
    KDayNoteDispTime ) );
    iAgnServer->WaitUntilLoaded();

    CMyCalendarObserver* obs = CMyCalendarObserver::NewL();
    CleanupStack::PushL( obs );
    model->RegisterObserverL( KCalendarObserverDllName, obs );

    CleanupStack::PopAndDestroy( obs );
    CleanupStack::PopAndDestroy( model );


    There's been many others who have seemed to have the same problem, so if someone have got it working I'd be so glad to know how


    Thanks in advance,
    Janine

  3. #3
    Registered User
    Join Date
    Mar 2006
    Posts
    3

    Re: Getting Notification by using CAgnObserver

    Hi,

    I need example of working Agenda Observer.

    Help me please.
    e-mail: barberry@tut.by

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×