1 /* |
|
2 * Copyright (c) 2006-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: Restore settings |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_FILEMANAGERBACKUPARRAY_H |
|
20 #define C_FILEMANAGERBACKUPARRAY_H |
|
21 |
|
22 |
|
23 // INCLUDE FILES |
|
24 #include <e32base.h> |
|
25 #include <badesca.h> |
|
26 |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CFileManagerEngine; |
|
30 |
|
31 |
|
32 // CLASS DECLARATION |
|
33 /** |
|
34 * This class is used for storing restore settings |
|
35 * |
|
36 * @lib FileManagerEngine.lib |
|
37 * @since S60 3.1 |
|
38 */ |
|
39 NONSHARABLE_CLASS(CFileManagerRestoreSettings) : public CBase, |
|
40 public MDesCArray |
|
41 { |
|
42 |
|
43 public: |
|
44 /** Restore icon type */ |
|
45 enum TIconId |
|
46 { |
|
47 EIconCheckBoxOn = 0, |
|
48 EIconCheckBoxOff, |
|
49 EIconMemoryCard, |
|
50 EIconUsbMemory |
|
51 }; |
|
52 |
|
53 /** Restore info */ |
|
54 NONSHARABLE_CLASS(TInfo) |
|
55 { |
|
56 public: |
|
57 TUint32 iContent; |
|
58 TTime iTime; |
|
59 TInt iDrive; |
|
60 }; |
|
61 |
|
62 /** |
|
63 * Two-phased constructor. |
|
64 */ |
|
65 static CFileManagerRestoreSettings* NewL( |
|
66 CFileManagerEngine& aEngine ); |
|
67 |
|
68 /** |
|
69 * Destructor |
|
70 */ |
|
71 ~CFileManagerRestoreSettings(); |
|
72 |
|
73 /** |
|
74 * Sets restore selection |
|
75 * |
|
76 * @since S60 3.1 |
|
77 */ |
|
78 IMPORT_C void SetSelection( const TUint64& aSelection ); |
|
79 |
|
80 /** |
|
81 * Refreshes restore settings |
|
82 * |
|
83 * @since S60 3.1 |
|
84 */ |
|
85 IMPORT_C void RefreshL(); |
|
86 |
|
87 /** |
|
88 * Gets restore selection |
|
89 * |
|
90 * @since S60 3.1 |
|
91 */ |
|
92 void GetSelectionL( RArray< TInfo >& aInfoArray ) const; |
|
93 |
|
94 public: // From MDesCArray |
|
95 TInt MdcaCount() const; |
|
96 |
|
97 TPtrC MdcaPoint( TInt aIndex ) const; |
|
98 |
|
99 private: |
|
100 /** Restore setting entry */ |
|
101 NONSHARABLE_CLASS(CEntry) : public CBase |
|
102 { |
|
103 public: |
|
104 ~CEntry(); |
|
105 |
|
106 HBufC* iText; |
|
107 TInfo iInfo; |
|
108 }; |
|
109 |
|
110 private: |
|
111 /** |
|
112 * Constructors |
|
113 */ |
|
114 CFileManagerRestoreSettings( CFileManagerEngine& aEngine ); |
|
115 |
|
116 void ConstructL(); |
|
117 |
|
118 /** |
|
119 * Creates a new restore setting entry |
|
120 */ |
|
121 CEntry* CreateEntryLC( const TInfo& aInfo ); |
|
122 |
|
123 static HBufC* DateTimeStringLC( const TTime& aTime ); |
|
124 |
|
125 private: // Data |
|
126 /** |
|
127 * Restore setting entries |
|
128 */ |
|
129 RPointerArray< CEntry > iList; |
|
130 |
|
131 /** |
|
132 * Reference to file manager engine |
|
133 * Not own. |
|
134 */ |
|
135 CFileManagerEngine& iEngine; |
|
136 |
|
137 /** |
|
138 * Restore selection |
|
139 */ |
|
140 TUint64 iSelection; |
|
141 |
|
142 }; |
|
143 |
|
144 #endif // C_FILEMANAGERBACKUPARRAY_H |
|
145 |
|
146 // End of File |
|