engines/vmbxengine/src/vmsettingsuiiconfileprovider.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 02 Feb 2010 01:11:09 +0200
changeset 0 ff3b6d0fd310
permissions -rw-r--r--
Revision: 201003 Kit: 201005

/*
* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: Implementation of CVmSettingsUiIconFileProvider class.
*
*/

#include "vmsettingsuiiconfileprovider.h"

// ================= MEMBER FUNCTIONS ==========================================

// -----------------------------------------------------------------------------
// CVmSettingsUiIconFileProvider::CVmSettingsUiIconFileProvider
//
// -----------------------------------------------------------------------------
//
CVmSettingsUiIconFileProvider::CVmSettingsUiIconFileProvider()
    {
    }

// -----------------------------------------------------------------------------
// CVmSettingsUiIconFileProvider::~CVmSettingsUiIconFileProvider
//
// -----------------------------------------------------------------------------
//
CVmSettingsUiIconFileProvider::~CVmSettingsUiIconFileProvider()
    {
    iFile.Close();
    }

// -----------------------------------------------------------------------------
// CVmSettingsUiIconFileProvider::ConstructL
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CVmSettingsUiIconFileProvider::ConstructL( RFile& aFile )
    {
    User::LeaveIfError( iFile.Duplicate( aFile ) );
    }

// ----------------------------------------------------------------------------
// CVmSettingsUiIconFileProvider::NewL
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
CVmSettingsUiIconFileProvider* CVmSettingsUiIconFileProvider::NewL(
    RFile& aFile )
    {
    CVmSettingsUiIconFileProvider* self =
        new ( ELeave ) CVmSettingsUiIconFileProvider();
    CleanupStack::PushL( self );
    self->ConstructL( aFile );
    CleanupStack::Pop( self );
    return self;
    }

// ---------------------------------------------------------------------------
// From MAknIconFileProvider
//
// ---------------------------------------------------------------------------
//
void CVmSettingsUiIconFileProvider::RetrieveIconFileHandleL(
    RFile& aFile, const TIconFileType /*aType*/ )
    {
    // duplicate the file's handle
    User::LeaveIfError( aFile.Duplicate( iFile ) );
    }

// ---------------------------------------------------------------------------
// From MAknIconFileProvider
//
// ---------------------------------------------------------------------------
//
void CVmSettingsUiIconFileProvider::Finished()
    {
    delete this;
    }

//  End of File