imstutils/imconversationview/imcvuiapp/src/cimcvuiappiconfileprovider.cpp
changeset 0 5e5d6b214f4f
equal deleted inserted replaced
-1:000000000000 0:5e5d6b214f4f
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Icon file provider.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include    "cimcvuiappiconfileprovider.h"
       
    21 #include	<aknappui.h>
       
    22 #include    <AknIconUtils.h>
       
    23 
       
    24 // ============================ MEMBER FUNCTIONS ===============================
       
    25 
       
    26 // -----------------------------------------------------------------------------
       
    27 // CIMCVUiAppIconFileProvider::CIMCVUiAppIconFileProvider
       
    28 // C++ default constructor can NOT contain any code, that
       
    29 // might leave.
       
    30 // -----------------------------------------------------------------------------
       
    31 //
       
    32 CIMCVUiAppIconFileProvider::CIMCVUiAppIconFileProvider()
       
    33     {
       
    34     }
       
    35 // -----------------------------------------------------------------------------
       
    36 // CIMCVUiAppIconFileProvider::ConstructL
       
    37 // Symbian 2nd phase constructor can leave.
       
    38 // -----------------------------------------------------------------------------
       
    39 //
       
    40 void CIMCVUiAppIconFileProvider::ConstructL(RFile& aFile)
       
    41     {
       
    42     User::LeaveIfError( iFile.Duplicate( aFile ) );
       
    43     }
       
    44 
       
    45 // -----------------------------------------------------------------------------
       
    46 // CIMCVUiAppIconFileProvider::NewL
       
    47 // Two-phased constructor.
       
    48 // -----------------------------------------------------------------------------
       
    49 //
       
    50 CIMCVUiAppIconFileProvider* CIMCVUiAppIconFileProvider::NewL(
       
    51         RFile& aFile )
       
    52     {
       
    53     CIMCVUiAppIconFileProvider* self = new( ELeave ) CIMCVUiAppIconFileProvider();
       
    54 
       
    55     CleanupStack::PushL( self );
       
    56     self->ConstructL(aFile);
       
    57     CleanupStack::Pop( self );
       
    58     return self;
       
    59     }
       
    60 
       
    61 
       
    62 // Destructor
       
    63 CIMCVUiAppIconFileProvider::~CIMCVUiAppIconFileProvider()
       
    64     {
       
    65     iFile.Close();
       
    66     }
       
    67 
       
    68 // -----------------------------------------------------------------------------
       
    69 // CIMCVUiAppIconFileProvider::RetrieveIconFileHandleL
       
    70 // (other items were commented in a header).
       
    71 // -----------------------------------------------------------------------------
       
    72 //
       
    73 void CIMCVUiAppIconFileProvider::RetrieveIconFileHandleL(
       
    74             RFile& aFile, const TIconFileType /*aType*/ )
       
    75     {
       
    76     aFile.Duplicate( iFile );
       
    77     }
       
    78 
       
    79 // -----------------------------------------------------------------------------
       
    80 // CIMCVUiAppIconFileProvider::Finished
       
    81 // (other items were commented in a header).
       
    82 // -----------------------------------------------------------------------------
       
    83 //
       
    84 void CIMCVUiAppIconFileProvider::Finished()
       
    85     {
       
    86     // commit suicide because Avkon Icon Server said so
       
    87     delete this;
       
    88     }
       
    89 
       
    90 
       
    91 //  End of File