1 /* |
|
2 * Copyright (c) 2008 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: Header file for the selection storage class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CMSSELECTIONSTORAGE |
|
21 #define CMSSELECTIONSTORAGE |
|
22 |
|
23 // INCLUDES |
|
24 #include <bautils.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CCmStoreRuleContainer; |
|
28 class CCmFillRuleContainer; |
|
29 class CMSEngine; |
|
30 class CCmMediaServerFull; |
|
31 class CCmStoreRule; |
|
32 class CCmFillRule; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 |
|
36 /** |
|
37 * CMSSelectionStorage class |
|
38 * Class implementing the storage for MediaServant wizard |
|
39 * |
|
40 * @since S60 5.1 |
|
41 * |
|
42 */ |
|
43 NONSHARABLE_CLASS( CMSSelectionStorage ) : public CBase |
|
44 { |
|
45 |
|
46 public: |
|
47 |
|
48 /** |
|
49 * Two-phased constructor. |
|
50 * |
|
51 * @since S60 5.1 |
|
52 * @param aMSEngine, application engine |
|
53 * @param aServers, mediaserver list |
|
54 * @param aFs, file server session |
|
55 * @return CMSSelectionStorage pointer |
|
56 */ |
|
57 static CMSSelectionStorage* NewL( |
|
58 CMSEngine& aMSEngine, |
|
59 RPointerArray<CCmMediaServerFull>& aServers, |
|
60 RFs& aFs ); |
|
61 |
|
62 /** |
|
63 * Two-phased constructor. |
|
64 * |
|
65 * @since S60 5.1 |
|
66 * @param aMSEngine, application engine |
|
67 * @param aServers, mediaserver list |
|
68 * @param aFs, file server session |
|
69 * @return CMSSelectionStorage pointer |
|
70 */ |
|
71 static CMSSelectionStorage* NewLC( |
|
72 CMSEngine& aMSEngine, |
|
73 RPointerArray<CCmMediaServerFull>& aServers, |
|
74 RFs& aFs ); |
|
75 /** |
|
76 * Destructor. |
|
77 */ |
|
78 virtual ~CMSSelectionStorage(); |
|
79 |
|
80 public: |
|
81 |
|
82 /** |
|
83 * Stores the media categories, selected devices and store operation |
|
84 * type. |
|
85 * |
|
86 * @since S60 5.1 |
|
87 * @param None |
|
88 * @return None |
|
89 */ |
|
90 void StoreMSSettingsL(); |
|
91 |
|
92 /** |
|
93 * Sets fill list selections. |
|
94 * |
|
95 * @since S60 5.1 |
|
96 * @param aSelections, selection array. |
|
97 * @return None |
|
98 */ |
|
99 void SetFillListSelections( CArrayFix<TInt>& aSelections ); |
|
100 |
|
101 /** |
|
102 * Sets the store list selections. |
|
103 * |
|
104 * @since S60 5.1 |
|
105 * @param aSelections, selection array. |
|
106 * @return None |
|
107 */ |
|
108 void SetStoreListSelections( CArrayFix<TInt>& aSelections ); |
|
109 |
|
110 /** |
|
111 * Resets store list selections |
|
112 * |
|
113 * @since S60 5.1 |
|
114 * @param None |
|
115 * @return None |
|
116 */ |
|
117 void ClearStoreListSelections(); |
|
118 |
|
119 /** |
|
120 * Sets the automatic/manual sync selection. |
|
121 * |
|
122 * @since S60 5.1 |
|
123 * @param aSelection, service state manual/automatic |
|
124 * @return None |
|
125 */ |
|
126 void SetAutoManualSelection( TBool aSelection ); |
|
127 |
|
128 /** |
|
129 * Returns the automatic/manual sync selection. |
|
130 * |
|
131 * @since S60 5.1 |
|
132 * @param None |
|
133 * @return automatic selection on/off. |
|
134 */ |
|
135 TBool AutoManualSelection(); |
|
136 |
|
137 /** |
|
138 * Stores drive information |
|
139 * |
|
140 * @since S60 5.1 |
|
141 * @param None |
|
142 * @return None |
|
143 */ |
|
144 void SetDriveInformationL(); |
|
145 |
|
146 /** |
|
147 * Sets the selected servers for store rules. |
|
148 * |
|
149 * @since S60 5.1 |
|
150 * @param aSelectedIndexes, selected server indexes |
|
151 * @param aServers, mediaserver list |
|
152 * @return None |
|
153 */ |
|
154 void SetServersForStoreRulesL( |
|
155 CArrayFix<TInt>& aSelectedIndexes, |
|
156 RPointerArray<CCmMediaServerFull>& aServers ); |
|
157 |
|
158 /** |
|
159 * Sets the selected servers for fill rules. |
|
160 * |
|
161 * @since S60 5.1 |
|
162 * @param aSelectedIndexes, selected server indexes |
|
163 * @return None |
|
164 */ |
|
165 void SetServersForFillRulesL( CArrayFix<TInt>& aSelectedIndexes ); |
|
166 |
|
167 private: |
|
168 |
|
169 /** |
|
170 * Removes the selected servers for store rule. |
|
171 * |
|
172 * @since S60 5.1 |
|
173 * @param aRule, store rule |
|
174 * @return None |
|
175 */ |
|
176 void RemoveServersFromStoreRuleL( CCmStoreRule* aRule ); |
|
177 |
|
178 /** |
|
179 * Removes the selected servers for fill rule. |
|
180 * |
|
181 * @since S60 5.1 |
|
182 * @param aRule, fill rule |
|
183 * @return None |
|
184 */ |
|
185 void RemoveServersFromFillRuleL( CCmFillRule* aRule ); |
|
186 |
|
187 /** |
|
188 * Set wlan scanning on/off |
|
189 * |
|
190 * @since S60 5.1 |
|
191 * @param None |
|
192 * @return None |
|
193 */ |
|
194 void SetWlanScanL(); |
|
195 |
|
196 /** |
|
197 * Sets the selected servers for store rule. |
|
198 * |
|
199 * @since S60 5.1 |
|
200 * @param aRule, store rule |
|
201 * @param aSelectedIndexes, selected server indexes, |
|
202 * @param aServers, mediaserver list |
|
203 * @return None |
|
204 */ |
|
205 void SetServersForStoreRuleL( |
|
206 CCmStoreRule* aRule, |
|
207 CArrayFix<TInt>& aSelectedIndexes, |
|
208 RPointerArray<CCmMediaServerFull>& aServers ); |
|
209 |
|
210 /** |
|
211 * Sets the selected servers for fill rule. |
|
212 * |
|
213 * @since S60 5.1 |
|
214 * @param aRule, fill rule |
|
215 * @param aSelectedIndexes, selected server indexes |
|
216 * @return None |
|
217 */ |
|
218 void SetServersForFillRuleL( CCmFillRule* aRule, |
|
219 CArrayFix<TInt>& aSelectedIndexes ); |
|
220 |
|
221 /** |
|
222 * Performs the first phase of two phase construction. |
|
223 * |
|
224 * @since S60 5.1 |
|
225 * @param aMSEngine, application engine |
|
226 * @param aServers, mediaserver list |
|
227 * @param aFs, file server session |
|
228 * @return None |
|
229 */ |
|
230 CMSSelectionStorage( CMSEngine& aMSEngine, |
|
231 RPointerArray<CCmMediaServerFull>& aServers, |
|
232 RFs& aFs ); |
|
233 |
|
234 /** |
|
235 * Performs the second phase construction. |
|
236 */ |
|
237 void ConstructL(); |
|
238 |
|
239 private: |
|
240 |
|
241 /** |
|
242 * application engine |
|
243 */ |
|
244 CMSEngine& iMSEngine; |
|
245 /** |
|
246 * Users selected Automatic or Manual synchronization type. |
|
247 * Efalse = Manual, ETrue = Automatic |
|
248 */ |
|
249 TBool iServiceState; |
|
250 /** |
|
251 * Selected store lists |
|
252 */ |
|
253 CArrayFix<TInt>* iSelectedStoreLists; // owned |
|
254 |
|
255 /** |
|
256 * Selected fill lists |
|
257 */ |
|
258 CArrayFix<TInt>* iSelectedFillLists; // owned |
|
259 |
|
260 /** |
|
261 * Store rules |
|
262 */ |
|
263 CCmStoreRuleContainer* iStoreRules; // owned |
|
264 |
|
265 /** |
|
266 * Fill rules |
|
267 */ |
|
268 CCmFillRuleContainer* iFillRules; // owned |
|
269 |
|
270 /** |
|
271 * Mediaserver array |
|
272 */ |
|
273 RPointerArray<CCmMediaServerFull>& iServers; |
|
274 |
|
275 /** |
|
276 * file session |
|
277 */ |
|
278 RFs& iFs; |
|
279 |
|
280 }; |
|
281 |
|
282 #endif // CMSSELECTIONSTORAGE |
|