|
1 /* |
|
2 * Copyright (c) 2005-2007 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: Phonebook 2 settings list state. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPBK2SETTINGSLISTSTATE_H |
|
20 #define CPBK2SETTINGSLISTSTATE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <aknsettingitemlist.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CVPbkContactStoreUriArray; |
|
27 class CSelectionItemList; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Phonebook 2 settings list state. |
|
33 */ |
|
34 NONSHARABLE_CLASS(CPbk2SettingsListState) : public CBase |
|
35 { |
|
36 public: // Constructor and destructor |
|
37 |
|
38 /** |
|
39 * Creates a new instance of this class. |
|
40 * |
|
41 * @return A new instance of this class. |
|
42 */ |
|
43 static CPbk2SettingsListState* NewL(); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 ~CPbk2SettingsListState(); |
|
49 |
|
50 public: // Interface |
|
51 |
|
52 /** |
|
53 * Returns the selection item list. |
|
54 * |
|
55 * @return Selection item list. |
|
56 */ |
|
57 CSelectionItemList& SelectionItemList(); |
|
58 |
|
59 /** |
|
60 * Returns a copy of selection item list. |
|
61 * |
|
62 * @return old item list state. |
|
63 */ |
|
64 CSelectionItemList& ItemListState(); |
|
65 |
|
66 /** |
|
67 * Returns supported store configuration. |
|
68 * |
|
69 * @return Array of supported contact store URIs. |
|
70 */ |
|
71 CVPbkContactStoreUriArray& SupportedStores(); |
|
72 |
|
73 /** |
|
74 * Stores selection item list state. |
|
75 */ |
|
76 void StoreItemStateL(); |
|
77 |
|
78 /** |
|
79 * Restores selection item list state. |
|
80 */ |
|
81 void RestoreItemStateL(); |
|
82 |
|
83 /** |
|
84 * Checks is selection item list changed. |
|
85 * |
|
86 * @return ETrue if it is changed, EFalse otherwise. |
|
87 */ |
|
88 TBool IsChanged(); |
|
89 |
|
90 private: // Implementation |
|
91 CPbk2SettingsListState(); |
|
92 void ConstructL(); |
|
93 void PopulateSelectionItemListL(); |
|
94 |
|
95 private: // Data |
|
96 /// All the following lists must be of same size |
|
97 /// Own: Array of supported contact store URIs |
|
98 CVPbkContactStoreUriArray* iSupportedStores; |
|
99 /// Own: Selection item list |
|
100 CSelectionItemList* iSelectionItemList; |
|
101 /// Own: Selection item list. A copy of iSelectionItemList, |
|
102 /// which is used to restore old state |
|
103 CSelectionItemList* iItemListState; |
|
104 }; |
|
105 |
|
106 #endif // CPBK2SETTINGSLISTSTATE_H |
|
107 |
|
108 // End of File |