|
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: Drive item definitions |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CGFLMDRIVEITEM_H |
|
21 #define CGFLMDRIVEITEM_H |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <f32file.h> |
|
27 #include "CGflmGroupItem.h" |
|
28 |
|
29 |
|
30 // CLASS DECLARATION |
|
31 /** |
|
32 * A class representing drive items. |
|
33 * |
|
34 * @lib GFLM.lib |
|
35 * @since 3.1 |
|
36 */ |
|
37 class CGflmDriveItem : public CGflmGroupItem |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Two-phased constructor. |
|
43 */ |
|
44 static CGflmDriveItem* NewLC( |
|
45 const TInt aDrive, |
|
46 const TVolumeInfo& aFSVolume, |
|
47 const TInt aVolumeStatus, |
|
48 const TUint aDriveStatus ); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 virtual ~CGflmDriveItem( ); |
|
54 |
|
55 public: // New functions |
|
56 |
|
57 /** |
|
58 * Sets the localized name of the item. |
|
59 * @since 3.1 |
|
60 * @param aName A descriptor containing the localized name for the |
|
61 entry. A copy of the name is created. |
|
62 */ |
|
63 IMPORT_C void SetLocalizedNameL( const TDesC& aName ); |
|
64 |
|
65 /** |
|
66 * Sets the root directory of the item. |
|
67 * @since 3.1 |
|
68 * @param aName A descriptor containing the path for the |
|
69 entry. A copy of the path is created. |
|
70 */ |
|
71 IMPORT_C void SetRootDirectoryL( const TDesC& aPath ); |
|
72 |
|
73 /** |
|
74 * Gets the root directory of the item. |
|
75 * @since 3.1 |
|
76 * @return A pointer descriptor to root directory |
|
77 */ |
|
78 IMPORT_C TPtrC RootDirectory() const; |
|
79 |
|
80 /** |
|
81 * Gets the volume info of the item. |
|
82 * @since 3.1 |
|
83 * @return A reference to volume info |
|
84 */ |
|
85 IMPORT_C const TVolumeInfo& VolumeInfo() const; |
|
86 |
|
87 /** |
|
88 * Get the drive id |
|
89 * @since 3.1 |
|
90 * @return Drive id. |
|
91 */ |
|
92 IMPORT_C TInt Drive() const; |
|
93 |
|
94 /** |
|
95 * Get the volume status |
|
96 * @since 3.1 |
|
97 * @return volume status |
|
98 */ |
|
99 IMPORT_C TInt VolumeStatus() const; |
|
100 |
|
101 /** |
|
102 * Get the drive status |
|
103 * @since 3.2 |
|
104 * @return drive status |
|
105 */ |
|
106 IMPORT_C TUint DriveStatus() const; |
|
107 |
|
108 public: // From CGflmGroupItem |
|
109 |
|
110 TGflmItemType Type() const; |
|
111 |
|
112 TPtrC Name() const; |
|
113 |
|
114 TTime Date() const; |
|
115 |
|
116 TInt64 Size() const; |
|
117 |
|
118 TPtrC Ext() const; |
|
119 |
|
120 private: |
|
121 |
|
122 /** |
|
123 * C++ default constructor. |
|
124 */ |
|
125 CGflmDriveItem( |
|
126 const TInt aDrive, |
|
127 const TVolumeInfo& aFSVolume, |
|
128 const TInt aVolumeStatus, |
|
129 const TUint aDriveStatus ); |
|
130 |
|
131 /** |
|
132 * By default Symbian 2nd phase constructor is private. |
|
133 */ |
|
134 void ConstructL(); |
|
135 |
|
136 private: // Data |
|
137 // A TVolumeInfo object that is the actual entry |
|
138 TVolumeInfo iVolume; |
|
139 |
|
140 // The drive numeric id. |
|
141 TInt iDrive; |
|
142 |
|
143 // The root directory of the entry. |
|
144 HBufC* iRootDir; |
|
145 |
|
146 // The localised name of the entry. |
|
147 HBufC* iLocalizedName; |
|
148 |
|
149 // Holds volume status i.e return value of drive or volume info |
|
150 TInt iVolumeStatus; |
|
151 |
|
152 // Holds drive status i.e the value from DriveInfo::GetDriveStatus |
|
153 TUint iDriveStatus; |
|
154 |
|
155 }; |
|
156 |
|
157 #endif // CGFLMDRIVEITEM_H |
|
158 |
|
159 // End of File |