engines/vmbxengine/src/vmsettingsuiiconfileprovider.cpp
branchRCL_3
changeset 20 987c9837762f
parent 0 ff3b6d0fd310
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
       
     1 /*
       
     2 * Copyright (c) 2007-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: Implementation of CVmSettingsUiIconFileProvider class.
       
    15 *
       
    16 */
       
    17 
       
    18 #include "vmsettingsuiiconfileprovider.h"
       
    19 
       
    20 // ================= MEMBER FUNCTIONS ==========================================
       
    21 
       
    22 // -----------------------------------------------------------------------------
       
    23 // CVmSettingsUiIconFileProvider::CVmSettingsUiIconFileProvider
       
    24 //
       
    25 // -----------------------------------------------------------------------------
       
    26 //
       
    27 CVmSettingsUiIconFileProvider::CVmSettingsUiIconFileProvider()
       
    28     {
       
    29     }
       
    30 
       
    31 // -----------------------------------------------------------------------------
       
    32 // CVmSettingsUiIconFileProvider::~CVmSettingsUiIconFileProvider
       
    33 //
       
    34 // -----------------------------------------------------------------------------
       
    35 //
       
    36 CVmSettingsUiIconFileProvider::~CVmSettingsUiIconFileProvider()
       
    37     {
       
    38     iFile.Close();
       
    39     }
       
    40 
       
    41 // -----------------------------------------------------------------------------
       
    42 // CVmSettingsUiIconFileProvider::ConstructL
       
    43 // Symbian 2nd phase constructor can leave.
       
    44 // -----------------------------------------------------------------------------
       
    45 //
       
    46 void CVmSettingsUiIconFileProvider::ConstructL( RFile& aFile )
       
    47     {
       
    48     User::LeaveIfError( iFile.Duplicate( aFile ) );
       
    49     }
       
    50 
       
    51 // ----------------------------------------------------------------------------
       
    52 // CVmSettingsUiIconFileProvider::NewL
       
    53 // Two-phased constructor.
       
    54 // -----------------------------------------------------------------------------
       
    55 //
       
    56 CVmSettingsUiIconFileProvider* CVmSettingsUiIconFileProvider::NewL(
       
    57     RFile& aFile )
       
    58     {
       
    59     CVmSettingsUiIconFileProvider* self =
       
    60         new ( ELeave ) CVmSettingsUiIconFileProvider();
       
    61     CleanupStack::PushL( self );
       
    62     self->ConstructL( aFile );
       
    63     CleanupStack::Pop( self );
       
    64     return self;
       
    65     }
       
    66 
       
    67 // ---------------------------------------------------------------------------
       
    68 // From MAknIconFileProvider
       
    69 //
       
    70 // ---------------------------------------------------------------------------
       
    71 //
       
    72 void CVmSettingsUiIconFileProvider::RetrieveIconFileHandleL(
       
    73     RFile& aFile, const TIconFileType /*aType*/ )
       
    74     {
       
    75     // duplicate the file's handle
       
    76     User::LeaveIfError( aFile.Duplicate( iFile ) );
       
    77     }
       
    78 
       
    79 // ---------------------------------------------------------------------------
       
    80 // From MAknIconFileProvider
       
    81 //
       
    82 // ---------------------------------------------------------------------------
       
    83 //
       
    84 void CVmSettingsUiIconFileProvider::Finished()
       
    85     {
       
    86     delete this;
       
    87     }
       
    88 
       
    89 //  End of File