appinstall_plat/appmngr2runtimeapi/inc/appmngr2driveutils.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     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:   Utility definitions for drive and file handling
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_APPMNGR2DRIVEUTILS_H
       
    20 #define C_APPMNGR2DRIVEUTILS_H
       
    21 
       
    22 #include <appmngr2infobase.h>           // TAppMngr2Location
       
    23 
       
    24 /**
       
    25  * Utility functions to get TAppMngr2Location values and to
       
    26  * construct resource and bitmap file names. 
       
    27  * 
       
    28  * @lib appmngr2pluginapi.lib
       
    29  * @since S60 v5.1
       
    30  */
       
    31 class TAppMngr2DriveUtils
       
    32 	{
       
    33 public:     // new functions
       
    34     /**
       
    35      * Returns location info (TAppMngr2Location) based on given file name (aFileName).
       
    36      * 
       
    37      * @param aFileName  File which location is needed
       
    38      * @param aFs  File server session
       
    39      * @return TAppMngr2Location  Location of the file
       
    40      */ 
       
    41     IMPORT_C static TAppMngr2Location LocationFromFileNameL( const TDesC& aFileName, RFs& aFs );
       
    42     
       
    43     /**
       
    44      * Returns location info (TAppMngr2Location) based on given drive (aDrive).
       
    45      * 
       
    46      * @param aDrive  Drive which location is needed
       
    47      * @param aFs  File server session
       
    48      * @return TAppMngr2Location  Location of the drive
       
    49      */ 
       
    50     IMPORT_C static TAppMngr2Location LocationFromDriveL( TInt aDrive, RFs& aFs );
       
    51     
       
    52     /**
       
    53      * Returns the nearest resource file using for given file (aFileName) using
       
    54      * EDefaultRom drive, KDC_RESOURCE_FILES_DIR, and BaflUtils::NearestLanguageFile().
       
    55      * 
       
    56      * TFileName object is allocated on heap and it is left in the cleanup stack.
       
    57      * The caller of this method is responsible to delete the allocated TFileName object.
       
    58      * 
       
    59      * @param aFileName  Resource file name
       
    60      * @param aFs  File server session
       
    61      * @return TFileName*  Full name of the nearest resource file to load
       
    62      */
       
    63     IMPORT_C static TFileName* NearestResourceFileLC( const TDesC& aFileName, RFs& aFs );
       
    64     
       
    65     /**
       
    66      * Returns full bitmap file name. Constructs file name using EDefaultRom
       
    67      * drive, KDC_APP_BITMAP_DIR directory, and given MBM/MIF file name.
       
    68      * 
       
    69      * Full file name is allocated on heap and it is left in the cleanup stack.
       
    70      * The caller of this method is responsible to delete the allocated HBufC object.
       
    71      *  
       
    72      * @param aBitmapFile  MBM or MIF file name
       
    73      * @return HBufC*  Full file name for aBitmapFile
       
    74      */
       
    75     IMPORT_C static HBufC* FullBitmapFileNameLC( const TDesC& aBitmapFile, RFs& aFs );
       
    76 
       
    77 	};
       
    78 
       
    79 #endif  // C_APPMNGR2DRIVEUTILS_H
       
    80