1 /* |
|
2 * Copyright (c) 2010 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "driveentry.h" |
|
19 |
|
20 // --------------------------------------------------------------------------- |
|
21 |
|
22 DriveEntry::DriveEntry(TDriveEntry aDriveEntry) |
|
23 : mDriveEntry(aDriveEntry) |
|
24 { |
|
25 } |
|
26 |
|
27 // --------------------------------------------------------------------------- |
|
28 |
|
29 DriveEntry::~DriveEntry() |
|
30 { |
|
31 } |
|
32 |
|
33 // --------------------------------------------------------------------------- |
|
34 |
|
35 QChar DriveEntry::driveLetter() |
|
36 { |
|
37 return QChar(TUint(mDriveEntry.iLetter)); |
|
38 } |
|
39 |
|
40 // --------------------------------------------------------------------------- |
|
41 |
|
42 int DriveEntry::number() |
|
43 { |
|
44 return mDriveEntry.iNumber; |
|
45 } |
|
46 |
|
47 // --------------------------------------------------------------------------- |
|
48 |
|
49 QString DriveEntry::mediaTypeString() |
|
50 { |
|
51 return QString::fromUtf16(mDriveEntry.iMediaTypeDesc.Ptr(), mDriveEntry.iMediaTypeDesc.Length()); |
|
52 } |
|
53 |
|
54 // --------------------------------------------------------------------------- |
|
55 |
|
56 QString DriveEntry::attributesString() |
|
57 { |
|
58 return QString::fromUtf16(mDriveEntry.iAttributesDesc.Ptr(), mDriveEntry.iAttributesDesc.Length()); |
|
59 } |
|
60 |
|
61 // --------------------------------------------------------------------------- |
|
62 |
|
63 int DriveEntry::iconId() |
|
64 { |
|
65 return mDriveEntry.iIconId; |
|
66 } |
|
67 |
|
68 // --------------------------------------------------------------------------- |
|
69 |
|
70 qint64 DriveEntry::volumeInfoFree() |
|
71 { |
|
72 return mDriveEntry.iVolumeInfo.iFree; |
|
73 } |
|
74 |
|
75 // --------------------------------------------------------------------------- |
|
76 |
|
77 qint64 DriveEntry::volumeInfoSize() |
|
78 { |
|
79 return mDriveEntry.iVolumeInfo.iSize; |
|
80 } |
|
81 |
|
82 // --------------------------------------------------------------------------- |
|