utilityapps/filebrowser/ui/src/fbdriveentry.cpp
changeset 55 2d9cac8919d3
equal deleted inserted replaced
53:819e59dfc032 55:2d9cac8919d3
       
     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 "fbdriveentry.h"
       
    19 
       
    20 // ---------------------------------------------------------------------------
       
    21 
       
    22 FbDriveEntry::FbDriveEntry(TDriveEntry &aDriveEntry)
       
    23 : mDriveEntry(aDriveEntry)
       
    24 {
       
    25 }
       
    26 
       
    27 // ---------------------------------------------------------------------------
       
    28 
       
    29 FbDriveEntry::~FbDriveEntry()
       
    30 {
       
    31 }
       
    32 
       
    33 // ---------------------------------------------------------------------------
       
    34 
       
    35 QChar FbDriveEntry::driveLetter()
       
    36 {
       
    37     return QChar(TUint(mDriveEntry.iLetter));
       
    38 }
       
    39 
       
    40 // ---------------------------------------------------------------------------
       
    41 
       
    42 int FbDriveEntry::number()
       
    43 {
       
    44     return mDriveEntry.iNumber;
       
    45 }
       
    46 
       
    47 // ---------------------------------------------------------------------------
       
    48 
       
    49 QString FbDriveEntry::mediaTypeString()
       
    50 {
       
    51     return QString::fromUtf16(mDriveEntry.iMediaTypeDesc.Ptr(), mDriveEntry.iMediaTypeDesc.Length());
       
    52 }
       
    53 
       
    54 // ---------------------------------------------------------------------------
       
    55 
       
    56 QString FbDriveEntry::attributesString()
       
    57 {
       
    58     return QString::fromUtf16(mDriveEntry.iAttributesDesc.Ptr(), mDriveEntry.iAttributesDesc.Length());
       
    59 }
       
    60 
       
    61 // ---------------------------------------------------------------------------
       
    62 
       
    63 int FbDriveEntry::iconId()
       
    64 {
       
    65     return mDriveEntry.iIconId;
       
    66 }
       
    67 
       
    68 // ---------------------------------------------------------------------------
       
    69 
       
    70 qint64 FbDriveEntry::volumeInfoFree()
       
    71 {
       
    72     return mDriveEntry.iVolumeInfo.iFree;
       
    73 }
       
    74 
       
    75 // ---------------------------------------------------------------------------
       
    76 
       
    77 qint64 FbDriveEntry::volumeInfoSize()
       
    78 {
       
    79     return mDriveEntry.iVolumeInfo.iSize;
       
    80 }
       
    81 
       
    82 // ---------------------------------------------------------------------------
       
    83 
       
    84 QString FbDriveEntry::volumeInfoNameString()
       
    85 {
       
    86     return QString::fromUtf16(mDriveEntry.iVolumeInfo.iName.Ptr(), mDriveEntry.iVolumeInfo.iName.Length());
       
    87 }
       
    88 
       
    89 // ---------------------------------------------------------------------------
       
    90 
       
    91 uint FbDriveEntry::volumeInfoUniqueId()
       
    92 {
       
    93     return mDriveEntry.iVolumeInfo.iUniqueID;
       
    94 }
       
    95 // ---------------------------------------------------------------------------