|
1 /* |
|
2 * Copyright (c) 2002 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: ImumInSettingsDataArray.h |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CIMUMINDATAKEYARRAY_H |
|
20 #define CIMUMINDATAKEYARRAY_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 // CONSTANTS |
|
26 // MACROS |
|
27 // DATA TYPES |
|
28 // FUNCTION PROTOTYPES |
|
29 // FORWARD DECLARATIONS |
|
30 class CImumInSettingsDataAttribute; |
|
31 class CImumMboxDefaultData; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * Class to store and handle settings data attributes. |
|
37 * |
|
38 * @lib |
|
39 * @since S60 v3.2 |
|
40 * @see ImumInSettingsDataAttribute.h |
|
41 */ |
|
42 class CImumInSettingsDataArray : public CBase |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Creates object from CImumInSettingsDataArray and leaves it to cleanup stack |
|
48 * |
|
49 * @since S60 v3.2 |
|
50 * @return, Constructed object |
|
51 */ |
|
52 static CImumInSettingsDataArray* NewLC(); |
|
53 |
|
54 /** |
|
55 * Create object from CImumInSettingsDataArray |
|
56 * |
|
57 * @since S60 v3.2 |
|
58 * @return, Constructed object |
|
59 */ |
|
60 static CImumInSettingsDataArray* NewL(); |
|
61 |
|
62 /** |
|
63 * Destructor |
|
64 * |
|
65 * @since S60 v3.2 |
|
66 */ |
|
67 virtual ~CImumInSettingsDataArray(); |
|
68 |
|
69 public: // New functions |
|
70 |
|
71 /** |
|
72 * General method to retrieve the key from the settings |
|
73 * |
|
74 * @since S60 v3.2 |
|
75 * @param |
|
76 * @return |
|
77 */ |
|
78 TInt GetAttr( |
|
79 const TUint aAttributeKey, |
|
80 CImumInSettingsDataAttribute*& aAttribute ) const; |
|
81 |
|
82 /** |
|
83 * General method to retrieve the key from the settings |
|
84 * |
|
85 * @since S60 v3.2 |
|
86 * @param |
|
87 * @return |
|
88 */ |
|
89 TInt SetAttr( |
|
90 CImumInSettingsDataAttribute& aAttribute ); |
|
91 |
|
92 /** |
|
93 * |
|
94 * |
|
95 * @since S60 v3.2 |
|
96 * @param |
|
97 */ |
|
98 void ResetAttr( const TUint aAttributeKey ); |
|
99 |
|
100 /** |
|
101 * Sets the default value to all item excluding the id's in the list |
|
102 * |
|
103 * @since S60 v3.2 |
|
104 * @param aExcludeList |
|
105 */ |
|
106 void ResetAll( const RArray<TUint>& aExcludeList ); |
|
107 |
|
108 /** |
|
109 * Creates an identical copy of the object |
|
110 * |
|
111 * @since S60 v3.2 |
|
112 * @return |
|
113 * @leave |
|
114 */ |
|
115 CImumInSettingsDataArray* CloneL() const; |
|
116 |
|
117 /** |
|
118 * |
|
119 * |
|
120 * @since S60 v3.2 |
|
121 * @param |
|
122 * @return |
|
123 * @leave |
|
124 */ |
|
125 TInt Count() const; |
|
126 |
|
127 public: // Functions from base classes |
|
128 |
|
129 protected: // Constructors |
|
130 |
|
131 /** |
|
132 * Default constructor for classCImumInSettingsDataArray |
|
133 * |
|
134 * @since S60 v3.2 |
|
135 * @return, Constructed object |
|
136 */ |
|
137 CImumInSettingsDataArray(); |
|
138 |
|
139 /** |
|
140 * Symbian 2-phase constructor |
|
141 * |
|
142 * @since S60 v3.2 |
|
143 */ |
|
144 void ConstructL(); |
|
145 |
|
146 protected: // New virtual functions |
|
147 protected: // New functions |
|
148 protected: // Functions from base classes |
|
149 |
|
150 private: // New virtual functions |
|
151 private: // New functions |
|
152 |
|
153 /** |
|
154 * Check from the list if the item exists |
|
155 * |
|
156 * @since S60 v3.2 |
|
157 * @param |
|
158 * @param |
|
159 * @return |
|
160 */ |
|
161 TBool HasItem( |
|
162 const TUint aAttributeKey, |
|
163 TInt& aIndex ) const; |
|
164 |
|
165 private: // Functions from base classes |
|
166 |
|
167 public: // Data |
|
168 protected: // Data |
|
169 private: // Data |
|
170 |
|
171 /** */ |
|
172 typedef RPointerArray<CImumInSettingsDataAttribute> RArraySettings; |
|
173 |
|
174 // Owned: Array of settings |
|
175 RArraySettings iSettings; |
|
176 // Owned: Item for searching |
|
177 CImumInSettingsDataAttribute* iSearchItem; |
|
178 }; |
|
179 |
|
180 #endif // CIMUMINDATAKEYARRAY_H |
|
181 |
|
182 // End of File |