|
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Message store folder utilities. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __MSGSTOREFOLDERUTILS_H__ |
|
21 #define __MSGSTOREFOLDERUTILS_H__ |
|
22 |
|
23 //<cmail> |
|
24 #include "MsgStoreMailBox.h" |
|
25 #include "MsgStorePropertyKeys.h" |
|
26 #include "MsgStoreTypes.h" |
|
27 //</cmail> |
|
28 |
|
29 /** |
|
30 * Container for the root folder ids. Use the TMsgStoreFolderType enum to index |
|
31 * into the array. |
|
32 */ |
|
33 struct TMsgStoreRootFolders |
|
34 { |
|
35 TMsgStoreId iFolders[ 1 + EMsgStoreOther ]; |
|
36 }; |
|
37 |
|
38 /** |
|
39 * Collection of folder management methods. |
|
40 */ |
|
41 class MsgStoreFolderUtils |
|
42 { |
|
43 public: |
|
44 |
|
45 /** |
|
46 * Create folders for the types defined in the TMsgStoreFolderType enum and |
|
47 * return the corresponding TMsgStoreIds in aFolderInfo. If a folder of a |
|
48 * particular type already exists its id is returned instead. |
|
49 * |
|
50 * @param aMailBox [in], mail box object. |
|
51 * @param aRootFolders [out], ids of the root folders. |
|
52 */ |
|
53 IMPORT_C static void InitializeRootFoldersL( |
|
54 CMsgStoreMailBox& aMailBox, |
|
55 TMsgStoreRootFolders& aRootFolders ); |
|
56 |
|
57 /** |
|
58 * Retrieve the root folder ids for the specified mailbox. |
|
59 * |
|
60 * @param aMailBox [in], mail box object. |
|
61 * @param aRootFolders [out], ids of the root folders. |
|
62 */ |
|
63 IMPORT_C static void GetRootFoldersL( |
|
64 CMsgStoreMailBox& aMailBox, |
|
65 TMsgStoreRootFolders& aRootFolders ); |
|
66 }; |
|
67 |
|
68 #endif |