|
1 /* |
|
2 * Copyright (c) 2006-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: Storage handler |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CBSIMPORTSTORAGEMANAGER_H |
|
20 #define CBSIMPORTSTORAGEMANAGER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 class CBSImportStorage; |
|
25 class RWriteStream; |
|
26 class RFs; |
|
27 |
|
28 /** |
|
29 * Storage handler |
|
30 * |
|
31 * @lib brandimporter.exe |
|
32 * @since S60 v3.2 |
|
33 */ |
|
34 class CBSImportStorageManager : public CBase |
|
35 { |
|
36 public: |
|
37 |
|
38 static CBSImportStorageManager* NewL(); |
|
39 |
|
40 static CBSImportStorageManager* NewLC(); |
|
41 |
|
42 ~CBSImportStorageManager(); |
|
43 |
|
44 /** |
|
45 * Create a new storage and set it to current. |
|
46 * |
|
47 * @since S60 3.2 |
|
48 * @return none |
|
49 */ |
|
50 void CreateStorageL(); |
|
51 |
|
52 /** |
|
53 * Return the count of storages |
|
54 * |
|
55 * @since S60 3.2 |
|
56 * @return count of elements |
|
57 */ |
|
58 TInt StorageCount(); |
|
59 |
|
60 /** |
|
61 * Get stored storage at index or current storage. |
|
62 * |
|
63 * @since S60 3.2 |
|
64 * @param aIndex index of storage to fetch. |
|
65 * @return Stored storage |
|
66 */ |
|
67 CBSImportStorage* Storage( TInt aIndex ); |
|
68 CBSImportStorage* Storage(); |
|
69 |
|
70 /** |
|
71 * Write stored data to Branding server |
|
72 * |
|
73 * @since S60 3.2 |
|
74 * @return none |
|
75 */ |
|
76 void WriteDataToServerL(); |
|
77 |
|
78 |
|
79 private: |
|
80 |
|
81 CBSImportStorageManager(); |
|
82 |
|
83 void ConstructL(); |
|
84 |
|
85 /** |
|
86 * Merge storages with same header data |
|
87 * |
|
88 * @since S60 3.2 |
|
89 * @return none |
|
90 */ |
|
91 void MergeStorages(); |
|
92 |
|
93 private: // Data |
|
94 |
|
95 // Own. Array of stored storages. |
|
96 RPointerArray<CBSImportStorage> iStorages; |
|
97 |
|
98 // Index of currently active storage |
|
99 TInt iCurrent; |
|
100 |
|
101 }; |
|
102 |
|
103 #endif //CBSIMPORTSTORAGEMANAGER_H |