You Are Here:

Community: Developer Discussion Boards

#1 Old Unclear Interim Calendar API CalChangeNotification() - 2007-10-25, 10:12

Join Date: Feb 2005
Posts: 68
arunpirku
Offline
Regular Contributor
Hi,

I am trying to implement CalChangeNotification() for changes in calendar api. The migration guide with 9.2 sdk says
section: CallBack Interface
........
class MCalProgressCallBack
virtual void CalChangeNotification(TChangeEntryType aChangeEntryType) = 0;
But the same sdk help for class MCalProgressCallBack does not list any such function.

But CalChangeNotification() is part of MCalChangeCallBack2 class.

So one should implement a class derived from both MCalChangeCallBack2 and MCalChangeCallBack, to access calendar api.

Is there any documentation or sample code for implemetation of CalChangeNotification().

regards
arun
Reply With Quote

#2 Old Re: Unclear Interim Calendar API CalChangeNotification() - 2007-10-25, 10:19

Join Date: Mar 2003
Posts: 18,030
Location: Bangkok
symbianyucca's Avatar
symbianyucca
Offline
Forum Nokia Expert
it is always possible that there is a mistake in the documentation, and if so, then you should check the right implementatio informations directly from the headers.

yucca
Reply With Quote

#3 Old Re: Unclear Interim Calendar API CalChangeNotification() - 2007-10-25, 10:32

Join Date: Feb 2005
Posts: 68
arunpirku
Offline
Regular Contributor
Hi Yucca,

Agreed. More over there are two classes, MCalChangeCallBack2 and MCalChangeCallBack.
I used MCalChangeCallBack2.

I implemented a class by deriving from both the classes.
But i see a very surprising behavior:

I have a AppUi class which creates two active objects, one for todo and another for other calendar data.

For todoactive object i do not have a CalChangeNotification, so derived from only one class.
for other class i have both.

While opening the CCalEntryView, we are suppossed to start a wait loop which will be unblocked by a call to completed(TInt) function of MCalChangeCallBack.

In my case i started the todoactive object first and goes in to the wait loop, then creates the calendar active object. When i open the CCalEntryView from the second active object, the first active objects, completed function is called, but the second active object wait loop is stopped?

It will be nice if some one can give sample code for CalChangeNotification. I am also not sure whether the issue is somewhere else....

regards
arun
Reply With Quote

#4 Old Re: Unclear Interim Calendar API CalChangeNotification() - 2007-11-20, 07:25

Join Date: Feb 2005
Posts: 68
arunpirku
Offline
Regular Contributor
Hi,

This is really funny.
I could finally make the class work.

1) You will have to derivefrom both the interfaces:
for example:
class CCalendarHandler : public CHandler, public CActive, public MCalProgressCallBack,public MCalChangeCallBack2
{

};

2) Implement the Completed() function.
3) CCalEntryView::NewL() should be followed by the wait loop. I could never make it work by using CActiveSchedulerWait, but it works with CActiveScheduler::Start(). Please remember that you use CActiveScheduler::Stop()in completed() function.

4) Implement void <>::CalChangeNotification(RArray<TCalChangeEntry>& aChangeItems) if you need notifications for changes from database.


Hope this helps all.

regards
arun
Reply With Quote

#5 Old Re: Unclear Interim Calendar API CalChangeNotification() - 2008-05-17, 08:06

Join Date: Apr 2008
Posts: 1
roy_weinberg
Offline
Registered User
Hi everyone,
I implemented everything that is needed and can receive notifications when the Calendar is changed from outside my program.

However,
I constantly change and update the calendar from MY own program, but when I do so, the notification function CalChangeNotification()
does not get called.

Does anybody know why?
Is notification only for applications outside my own?
Reply With Quote

#6 Old Re: Unclear Interim Calendar API CalChangeNotification() - 2008-05-19, 22:35

Join Date: Jan 2005
Posts: 83
Location: Italy
pavarang
Offline
Regular Contributor
Hello,
as stated in
Symbian OS v9.3 » Symbian OS reference » C++ component reference » Application Engines CALINTERIMAPI » MCalChangeCallBack

and in
Symbian OS v9.3 » Symbian OS reference » C++ component reference » Application Engines CALINTERIMAPI » MCalChangeCallBack2

"A client will not be notified of a change if it is the source of the change."

regards,
pg
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
PC Suite error: (Code: Init IMediaControl2) HELP?! chunkyspudmonkey General Discussion 29 2008-06-30 12:47
S60 API Partnering Program Nokia Ron News, Announcements and Job Listings 9 2008-04-16 19:28
Calendar API ticktock General Symbian C++ 6 2007-05-02 00:36
Calendar API access for older that 3rd edition? nhammond General Symbian C++ 1 2007-03-13 14:58
Using the Calendar API Problems 3rdEd, FP1 mockba General Symbian C++ 16 2006-12-28 07:12

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2010 Nokia