The CCalSession class provides the following views for accessing the calendar:
You can access and manipulate calendar entries with CCalEntryView .
With CCalInstanceView you can access and delete multiple calendar instances generated from an entry.
You can use the entry view object to perform the following functions on a calendar entry:
Fetch by calling CCalEntryView::FetchL() .
Update by calling CCalEntryView::UpdateL() .
Save by calling CCalEntryView::StoreL() .
Delete by calling CCalEntryView::DeleteL() .
To access a calendar entry, you need to create an entry view with the CCalEntryView::NewL() function.
A calendar event can have one or more occurrences. An event occurs more than once if a repeat rule has been set. Each occurrence is known as an instance (also called a schedule).
void FindInstanceL(RPointerArray< CCalInstance > &aMatchedInstanceList, CalCommon::TCalViewFilter aCalViewFilter, const CalCommon::TCalTimeRange &aTimeRange, const TCalSearchParams &aSearchParams) const;
time range within which the entries need to be found
search text along with the search options.
Call CCalInstanceView::DeleteL() to delete any instance returned by CCalInstanceView::FindInstanceL() . If all the instances are deleted, the entry gets deleted automatically. CCalInstanceView::DeleteL() must be used in conjunction with CCalInstanceView::FindInstanceL() .
Multiple Calendar File Searching
The following functions find instances across calendar collections (multiple calendar files).
CCalInstanceIterator* FindInstanceByUidL(TCalCollectionId aCollectionId, const TDesC8& aUid, const TCalTime& aInstanceTime) const;
This function creates an instance iterator containing instances that relate to a UID (unique identifier). The iterator contains a collection ID, a global UID (GUID) and a time. The parameters are used to tell the iterator which instance to start iterating from. The aCollectionId parameter identifies the file from which the starting instance comes. The aInstanceTime parameter identifies the time of the starting instance.
In the function above TCalInstanceId is a datatype that contains TCalCollectionId , CCalLocalUid and CCalTime .
This function only returns a single instance.
The functions above are based on the following deprecated functions:
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License v1.0.