class CCalCategoryManager : public CBase |
A category manager used to manipulate the categories held by the Calendar store.
There are 12 built-in category types which are specified by CCalCategory::TCalCategoryType. In addition, clients can create as many of their own categories as they like by giving a name to the category. This class is used along with the class CCalCategory to manipulate the categories in the file, for instance to add, delete and get a list of entries filtered by their category.
Public Member Functions | |
---|---|
~CCalCategoryManager() | |
IMPORT_C void | AddCategoryL(const CCalCategory &) |
IMPORT_C TInt | CategoryCountL() |
IMPORT_C CCalCategory * | CategoryL(TInt) |
IMPORT_C void | DeleteCategoryL(const CCalCategory &, MCalProgressCallBack &) |
IMPORT_C void | FilterCategoryL(const CCalCategory &, RPointerArray< CCalEntry > &, MCalProgressCallBack &) |
IMPORT_C void | FilterCategoryL(const CCalCategory &, RPointerArray< CCalEntry > &) |
IMPORT_C CCalCategoryManager * | NewL(CCalSession &) |
Private Member Functions | |
---|---|
CCalCategoryManager() | |
void | ConstructL(CCalSession &) |
Private Attributes | |
---|---|
CCalCategoryManagerImpl * | iCCalCategoryManagerImpl |
IMPORT_C | ~CCalCategoryManager | ( | ) |
The destructor frees all resources owned by the entry, prior to its destruction. capability
None
IMPORT_C void | AddCategoryL | ( | const CCalCategory & | aCategory | ) |
Adds a new user-defined category to the server's category list.
The category list is held in the calendar file. There are 12 standard categories defined in CAgnCategory::TAgnCategoryType, and any user-defined categories that have been added. capability
WriteUserData
leave
KErrAlreadyExists The category is already in the list.
leave
KErrNotReady If the calendar file is on a drive where the media has been removed.
const CCalCategory & aCategory | The name of the new user-defined category to add to the server's category list. |
IMPORT_C TInt | CategoryCountL | ( | ) | const |
Gets the number of categories used in the calendar file.
These are the 12 built-in categories defined in CCalCategory::TCalCategoryType, and any user-defined categories (of type CCalCategory::ECalExtended) that have been added. capability
None
The number of categories used in the agenda file.
IMPORT_C CCalCategory * | CategoryL | ( | TInt | aIndex | ) | const |
Allocates and returns a new category based on the one stored at the specified index in the server's category list. capability
None
A pointer to the indexed category. The caller takes ownership.
TInt aIndex | The index of the category in the server's category list. |
void | ConstructL | ( | CCalSession & | aSession | ) | [private] |
CCalSession & aSession |
IMPORT_C void | DeleteCategoryL | ( | const CCalCategory & | aCategory, |
MCalProgressCallBack & | aProgressCallBack | |||
) |
Deletes a user-defined category from the server's category list and updates all entries that belong to it, asynchronously.
Note that the operation is asynchronous. The callback parameter is used to observe the progress and completion. After each step, the callback object's Progress() function is called. MCalProgressCallBack::Completed() is get called when the process is finished. If the function leaves, neither callback will be called. This method will lock the calendar file. Any request made, by any client, before this has completed will leave with KErrLocked. capability
WriteUserData
leave
KErrLocked If a previous asynchronous request has been made which is not complete yet.
const CCalCategory & aCategory | The category to delete from the list. |
MCalProgressCallBack & aProgressCallBack | The progress callback class. |
IMPORT_C void | FilterCategoryL | ( | const CCalCategory & | aCategory, |
RPointerArray< CCalEntry > & | aEntries, | |||
MCalProgressCallBack & | aProgressCallBack | |||
) |
Gets a list of all entries that belong to the specified category, asynchronously.
Note that the operation is asynchronous. The callback parameter is used to observe the progress and completion. After each step, the callback object's Progress() function is called. The aEntries will be filled in with entries when MCalProgressCallBack::Progress() or MCalProgressCallBack::Completed() is called. If the function leaves, neither callback will be called. This method will lock the calendar file. Any request made, by any client, before this has completed will leave with KErrLocked. capability
ReadUserData
const CCalCategory & aCategory | The category to filter on. |
RPointerArray< CCalEntry > & aEntries | On return, contains all entries that belong to the specified category. |
MCalProgressCallBack & aProgressCallBack | The progress callback class. |
IMPORT_C void | FilterCategoryL | ( | const CCalCategory & | aCategory, |
RPointerArray< CCalEntry > & | aEntries | |||
) |
Gets a list of all entries that belong to the specified category, asynchronously.
capability
ReadUserData
const CCalCategory & aCategory | The category to filter on. |
RPointerArray< CCalEntry > & aEntries | On return, contains all entries that belong to the specified category. |
IMPORT_C CCalCategoryManager * | NewL | ( | CCalSession & | aSession | ) | [static] |
CCalSession & aSession | A file handle to the calendar file. |
CCalCategoryManagerImpl * | iCCalCategoryManagerImpl | [private] |