Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#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

Members

Defined in CCalCategoryManager:

Inherited from CBase:


Construction and destruction


NewL(CCalSession &)

Capability: Illegal

IMPORT_C static CCalCategoryManager* NewL(CCalSession &aSession);

Description

Parameters

CCalSession &aSession

Return value

CCalCategoryManager *


~CCalCategoryManager()

Capability: Illegal

IMPORT_C ~CCalCategoryManager();

Description


NewL(CCalSession &)

Capability: Illegal

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

CCalCategoryManager *

CCalCategoryManager pointer


~CCalCategoryManager()

Capability: Illegal

IMPORT_C ~CCalCategoryManager();

Description

The destructor frees all resources owned by the entry, prior to its destruction.

[Top]


Member functions


CategoryCountL()const

Capability: Illegal

IMPORT_C TInt CategoryCountL() const;

Description

Return value

TInt


CategoryCountL()const

Capability: Illegal

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.


CategoryL(TInt)const

Capability: Illegal

IMPORT_C CCalCategory* CategoryL(TInt aIndex) const;

Description

Parameters

TInt aIndex

Return value

CCalCategory *


CategoryL(TInt)const

Capability: Illegal

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

const CCalCategory &aCategory


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 &)

Capability: ReadUserData

IMPORT_C void FilterCategoryL(const CCalCategory &aCategory, RPointerArray< CCalEntry > &aEntries, MCalProgressCallBack &aProgressCallBack);

Description

Parameters

const CCalCategory &aCategory

RPointerArray< CCalEntry > &aEntries

MCalProgressCallBack &aProgressCallBack


FilterCategoryL(const CCalCategory &,RPointerArray< CCalEntry > &,MCalProgressCallBack &)

Capability: ReadUserData

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

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.


FilterCategoryL(const CCalCategory &,RPointerArray< CCalEntry > &)

Capability: ReadUserData

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

const CCalCategory &aCategory

The category to filter on.

RPointerArray< CCalEntry > &aEntries

On return, contains all entries that belong to the specified category.


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

const CCalCategory &aCategory

The category to delete from the list.

MCalProgressCallBack &aProgressCallBack

The progress callback class.

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

const CCalCategory &aCategory

MCalProgressCallBack &aProgressCallBack