1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __CALCATEGORYMANAGER_H__
17 #define __CALCATEGORYMANAGER_H__
21 class MCalProgressCallBack;
24 class CCalCategoryManagerImpl;
27 /** A category manager used to manipulate the categories held by the Calendar store.
29 There are 12 built-in category types which are specified by CCalCategory::TCalCategoryType.
30 In addition, clients can create as many of their own categories as they like by giving a name to the category.
31 This class is used along with the class CCalCategory to manipulate the categories in the file, for instance to
32 add, delete and get a list of entries filtered by their category.
37 NONSHARABLE_CLASS(CCalCategoryManager) : public CBase
41 IMPORT_C static CCalCategoryManager* NewL(CCalSession& aSession);
42 IMPORT_C ~CCalCategoryManager();
44 IMPORT_C TInt CategoryCountL() const;
45 IMPORT_C CCalCategory* CategoryL(TInt aIndex) const;
46 IMPORT_C void AddCategoryL(const CCalCategory& aCategory);
47 IMPORT_C void FilterCategoryL(const CCalCategory& aCategory, RPointerArray<CCalEntry>& aEntries, MCalProgressCallBack& aProgressCallBack);
48 IMPORT_C void FilterCategoryL(const CCalCategory& aCategory, RPointerArray<CCalEntry>& aEntries);
49 IMPORT_C void DeleteCategoryL(const CCalCategory& aCategory, MCalProgressCallBack& aProgressCallBack);
52 CCalCategoryManager();
53 void ConstructL(CCalSession& aSession);
56 CCalCategoryManagerImpl* iCCalCategoryManagerImpl;
59 #endif // __CALCATEGORYMANAGER_H__