engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxtnfileinfo.inl
changeset 71 27f2d7aec52a
equal deleted inserted replaced
69:45459746d5e8 71:27f2d7aec52a
       
     1 /*
       
     2 * Copyright (c) 2009 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 
       
    19 // -----------------------------------------------------------------------------
       
    20 // Constructor
       
    21 // -----------------------------------------------------------------------------
       
    22 //
       
    23 inline CGlxtnFileInfo::CGlxtnFileInfo()
       
    24     {
       
    25     }
       
    26 
       
    27 // -----------------------------------------------------------------------------
       
    28 // Destructor
       
    29 // -----------------------------------------------------------------------------
       
    30 //
       
    31 inline CGlxtnFileInfo::~CGlxtnFileInfo()
       
    32     {
       
    33     delete iFilePath;
       
    34     }
       
    35 
       
    36 // -----------------------------------------------------------------------------
       
    37 // CopyInfoL
       
    38 // -----------------------------------------------------------------------------
       
    39 //
       
    40 inline void CGlxtnFileInfo::CopyInfoL(CGlxtnFileInfo& aInfo)
       
    41     {
       
    42     SetFilePathL(aInfo.FilePath());
       
    43     iFileSize = aInfo.iFileSize;
       
    44     iFileTime = aInfo.iFileTime;
       
    45     iTemporary = aInfo.iTemporary;
       
    46     iIsVideo = aInfo.iIsVideo;
       
    47     iIsProtected = aInfo.iIsProtected;
       
    48     }
       
    49 
       
    50 // -----------------------------------------------------------------------------
       
    51 // FilePath
       
    52 // Get the full path to the media file.
       
    53 // -----------------------------------------------------------------------------
       
    54 //
       
    55 inline const TDesC& CGlxtnFileInfo::FilePath() const
       
    56     {
       
    57     return *iFilePath;
       
    58     }
       
    59 
       
    60 // -----------------------------------------------------------------------------
       
    61 // SetFilePathL
       
    62 // Set the full path to the media file.
       
    63 // -----------------------------------------------------------------------------
       
    64 //
       
    65 inline void CGlxtnFileInfo::SetFilePath(HBufC* aPath)
       
    66     {
       
    67     delete iFilePath;
       
    68     iFilePath = aPath;
       
    69     }
       
    70 
       
    71 // -----------------------------------------------------------------------------
       
    72 // SetFilePathL
       
    73 // Set the full path to the media file.
       
    74 // -----------------------------------------------------------------------------
       
    75 //
       
    76 inline void CGlxtnFileInfo::SetFilePathL(const TDesC& aPath)
       
    77     {
       
    78     delete iFilePath;
       
    79     iFilePath = NULL;
       
    80     iFilePath = aPath.AllocL();
       
    81     }