#include <calcategorymanager.h>
Link against:
calinterimapi.lib
Class CCalCategoryManager
class CCalCategoryManager : public CBase;
Description
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.
Derivation
CBase
-
Base class for all classes to be instantiated on the heap.
CCalCategoryManager
- A category manager used to manipulate the categories held by the Calendar store.
Members
Defined in CCalCategoryManager
:
AddCategoryL(const CCalCategory &)
AddCategoryL(const CCalCategory &)
Adds a new user-defined category to the server's category list.
CategoryCountL()const
CategoryCountL()const
Gets the number of categories used in the calendar file.
CategoryL(TInt)const
CategoryL(TInt)const
Allocates and returns a new category based on the one stored at the specified in...
DeleteCategoryL(const CCalCategory &,MCalProgressCallBack &)
Deletes a user-defined category from the server's category list and updates all ...
DeleteCategoryL(const CCalCategory &,MCalProgressCallBack &)
FilterCategoryL(const CCalCategory &,RPointerArray< CCalEntry > &)
Gets a list of all entries that belong to the specified category, asynchronously...
FilterCategoryL(const CCalCategory &,RPointerArray< CCalEntry > &,MCalProgressCallBack &)
FilterCategoryL(const CCalCategory &,RPointerArray< CCalEntry > &,MCalProgressCallBack &)
Gets a list of all entries that belong to the specified category, asynchronously...
NewL(CCalSession &)
NewL(CCalSession &)
Allocates and constructs a category manager.
~CCalCategoryManager()
~CCalCategoryManager()
The destructor frees all resources owned by the entry, prior to its destruction....
Inherited from CBase
:
Construction and destruction
IMPORT_C static CCalCategoryManager* NewL(CCalSession &aSession);
Description
Parameters
Return value
IMPORT_C ~CCalCategoryManager();
Description
IMPORT_C static CCalCategoryManager* NewL(CCalSession &aSession);
Description
Allocates and constructs a category manager.
Parameters
CCalSession &aSession |
A file handle to the calendar file.
|
|
Return value
IMPORT_C ~CCalCategoryManager();
Description
The destructor frees all resources owned by the entry, prior to its destruction.
IMPORT_C TInt CategoryCountL() const;
Description
Return value
IMPORT_C TInt CategoryCountL() const;
Description
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.
Return value
TInt
|
The number of categories used in the agenda file.
|
|
IMPORT_C CCalCategory* CategoryL(TInt aIndex) const;
Description
Parameters
Return value
IMPORT_C CCalCategory* CategoryL(TInt aIndex) const;
Description
Allocates and returns a new category based on the one stored at the specified index in the server's category list.
Parameters
TInt aIndex |
The index of the category in the server's category list.
|
|
Return value
CCalCategory *
|
A pointer to the indexed category. The caller takes ownership.
|
|
AddCategoryL(const CCalCategory &)
Capability: |
WriteUserData |
|
IMPORT_C void AddCategoryL(const CCalCategory &aCategory);
Description
Parameters
AddCategoryL(const CCalCategory &)
Capability: |
WriteUserData |
|
IMPORT_C void AddCategoryL(const CCalCategory &aCategory);
Description
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.
Parameters
const CCalCategory &aCategory |
The name of the new user-defined category to add to the server's category list.
|
|
Leave codes
KErrAlreadyExists |
The category is already in the list.
|
|
FilterCategoryL(const CCalCategory &,RPointerArray< CCalEntry > &,MCalProgressCallBack &)
IMPORT_C void FilterCategoryL(const CCalCategory &aCategory, RPointerArray< CCalEntry > &aEntries, MCalProgressCallBack &aProgressCallBack);
Description
Parameters
FilterCategoryL(const CCalCategory &,RPointerArray< CCalEntry > &,MCalProgressCallBack &)
IMPORT_C void FilterCategoryL(const CCalCategory &aCategory, RPointerArray< CCalEntry > &aEntries, MCalProgressCallBack &aProgressCallBack);
Description
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 MAgnProgressCallBack::Progress(TInt)
or MAgnProgressCallBack::Completed(TInt)
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.
Parameters
FilterCategoryL(const CCalCategory &,RPointerArray< CCalEntry > &)
IMPORT_C void FilterCategoryL(const CCalCategory &aCategory, RPointerArray< CCalEntry > &aEntries);
Description
Gets a list of all entries that belong to the specified category, asynchronously.
Parameters
DeleteCategoryL(const CCalCategory &,MCalProgressCallBack &)
Capability: |
WriteUserData |
|
IMPORT_C void DeleteCategoryL(const CCalCategory &aCategory, MCalProgressCallBack &aProgressCallBack);
Description
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. MAgnProgressCallBack::Completed(TInt)
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.
Parameters
Leave codes
KErrInUse |
This can be caused by one of two reasons: either the category is not user-defined (the 12 standard categories are defined
in CAgnCategory::TAgnCategoryType and cannot be deleted), or the category is user-defined but it is in use.
|
|
DeleteCategoryL(const CCalCategory &,MCalProgressCallBack &)
Capability: |
WriteUserData |
|
IMPORT_C void DeleteCategoryL(const CCalCategory &aCategory, MCalProgressCallBack &aProgressCallBack);
Description
Parameters