landmarks/locationlandmarks/internalservices/inc/EPos_PosLmFileFinder.h
changeset 0 667063e416a2
equal deleted inserted replaced
-1:000000000000 0:667063e416a2
       
     1 /*
       
     2 * Copyright (c) 2005 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:Provides functions for finding resource files.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef POSLMFILEFINDER_H
       
    20 #define POSLMFILEFINDER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <f32file.h>
       
    24 
       
    25 // CONSTANTS
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 * Provides functions for finding resource files.
       
    33 */
       
    34 class PosLmFileFinder
       
    35     {
       
    36     public:  // New functions
       
    37 
       
    38         /* Searches all installed drives for a localized
       
    39         * resource file. The filename is set to the resource file.
       
    40         * Drive C: is searched first, then A: to Z: if they are available.
       
    41         * @param aFilename Path to the localized resource file.
       
    42         * @param aFileSession A file session.
       
    43         * @param aResourceFieName Name of resource file.
       
    44         * @return Returns KErrNotFound if the resource cannot be found on any
       
    45         *   drive, KErrNone otherwise.
       
    46         */
       
    47         IMPORT_C static TInt ResourceFileL(
       
    48         /* IN/OUT */       TFileName* aFilename,
       
    49         /* IN  */       RFs& aFileSession,
       
    50         /* IN  */       const TDesC& aResourceFileName
       
    51         );
       
    52 
       
    53     private:
       
    54 
       
    55         /**
       
    56         * Checks if the resource file can be found on the specified drive.
       
    57         * @param aDrive A drive to search.
       
    58         * @param aFilename File name (and path) to the resource file if found.
       
    59         * @param aFileSession A file session.
       
    60         * @param aResourceFieName Name of resource file.
       
    61         * @return ETrue if resource file is found on specified drive,
       
    62         *   EFalse otherwise.
       
    63         */
       
    64         static TBool IsResourceOnDriveL(
       
    65         /* IN */        TInt aDrive,
       
    66         /* IN/OUT */       TFileName* aFilename,
       
    67         /* IN  */       RFs& aFileSession,
       
    68         /* IN  */       const TDesC& aResourceFileName
       
    69         );
       
    70 
       
    71     };
       
    72 
       
    73 #endif      // POSLMFILEFINDER_H
       
    74 
       
    75 // End of File