phonebookui/Phonebook/View/src/RPbkViewResourceFile.cpp
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002 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 *       Provides methods for Helper class for loading PbkView resources..
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include "RPbkViewResourceFile.h"
       
    22 #include "PbkDataCaging.hrh"
       
    23 
       
    24 /// Unnamed namespace for local definitons
       
    25 namespace 
       
    26 {
       
    27 
       
    28 // LOCAL CONSTANTS AND MACROS
       
    29 _LIT(KDllResFileName, "PbkView.rsc");
       
    30 
       
    31 }
       
    32 
       
    33 // ================= MEMBER FUNCTIONS =======================
       
    34 
       
    35 EXPORT_C RPbkViewResourceFile::RPbkViewResourceFile(CCoeEnv& aEnv)
       
    36     : iLoader(aEnv), iOpen(EFalse)
       
    37     {
       
    38     }
       
    39 
       
    40 EXPORT_C void RPbkViewResourceFile::OpenL()
       
    41     {
       
    42     _LIT(KSeparator, "\\");
       
    43     TFileName fileName;
       
    44     fileName.Copy(KPbkRomFileDrive);
       
    45     fileName.Append(KDC_RESOURCE_FILES_DIR);
       
    46     fileName.Append(KSeparator);
       
    47     fileName.Append(KDllResFileName);
       
    48     iLoader.OpenL(fileName);
       
    49     iOpen = ETrue;
       
    50     }
       
    51 
       
    52 EXPORT_C TBool RPbkViewResourceFile::IsOpen() const
       
    53     {
       
    54     return iOpen;
       
    55     }
       
    56 
       
    57 EXPORT_C void RPbkViewResourceFile::Close()
       
    58     {
       
    59     iLoader.Close();
       
    60     iOpen = EFalse;
       
    61     }
       
    62 
       
    63 
       
    64 //  End of File