locationcentre/lcutils/inc/lciconloader.h
branchRCL_3
changeset 9 4721bd00d3da
parent 8 3a25f69541ff
child 11 e15b7f06eba6
equal deleted inserted replaced
8:3a25f69541ff 9:4721bd00d3da
     1 /*
       
     2 * Copyright (c) 2007 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 class for loading Application Icons
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef LCICONLOADER_H
       
    20 #define LCICONLOADER_H
       
    21 
       
    22 // SYSTEM INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class CGulIcon;
       
    27 
       
    28 /**
       
    29  *  Utility class for loading icons.
       
    30  *  
       
    31  *  This class encapsulated the icon loading functionality for Location Centre
       
    32  *  Application. Incase, there is no icon corresponding to the Location
       
    33  *  based Application or Content/Service a default icon wil be loaded.
       
    34  *
       
    35  *  @lib lcservice.lib
       
    36  *  @since S60 v5.0
       
    37  */
       
    38 class LcIconLoader
       
    39     {
       
    40 public:
       
    41 	/**
       
    42 	 * Loads an Icon for a Location based Application. If there is no icon
       
    43 	 * corresponding to the Application, then a default Icon is loaded.
       
    44 	 *
       
    45 	 * @param[in] aAppUid UID for the application whose Icon is loaded.
       
    46 	 */
       
    47 	IMPORT_C static CGulIcon* LoadApplicationIconL( const TUid	aAppUid );
       
    48 		
       
    49 	/**
       
    50      * Loads the Icon for a Location based Application from an MIF Icon file.
       
    51      *
       
    52 	 * If there is no icon loadable fron the requested file then a default
       
    53 	 * icon is loaded.
       
    54 	 *     
       
    55      * @param[in] aAppIconFile	Icon file name.
       
    56      * @param[in] aFrameNo		The Icon id of the icon when the Icon file
       
    57      *                          is a MIF File.
       
    58      * @return The new instance of Location Centre listbox object.
       
    59      * @leave System wide error code if the object creation fails.         
       
    60      */
       
    61     IMPORT_C static CGulIcon* LoadMifFileIconL(
       
    62                           const TDesC&			aAppIconFile,
       
    63                                 TInt			aFrameNo );
       
    64     
       
    65     /**
       
    66      * Loads the default icon for a Location based Application or Content/
       
    67      * Service.
       
    68 		 *
       
    69      * @return The new instance of Location Centre listbox object.
       
    70      * @leave System wide error code if the object creation fails.         
       
    71      */
       
    72     IMPORT_C static CGulIcon* LoadDefaultIconL();
       
    73     
       
    74 private:	
       
    75 	/**
       
    76 	 * Loads an Icon for a Location based Application based on its UID. 
       
    77 	 * If there is no icon corresponding to the Application UID,
       
    78 	 * then a default Icon is loaded.
       
    79 	 *
       
    80 	 * @param[in] aAppUid UID for the application whose Icon is loaded.
       
    81 	 */
       
    82 	static CGulIcon*	LoadIconfromUIDL( const TUid	aAppUid );		    
       
    83 		
       
    84     /**
       
    85      * Loads the Icon for a Location based Application from an Icon file.
       
    86      *
       
    87 	 * If there is no icon loadable fron the requested file then a default
       
    88 	 * icon is loaded.
       
    89 	 *
       
    90      * @param[in] aAppIconFile	Icon file name.
       
    91      * @param[in] aFrameNo		The Icon id of the icon when the Icon file
       
    92      *                          is a MIF File.
       
    93      * @return The new instance of Location Centre listbox object.
       
    94      * @leave System wide error code if the object creation fails.         
       
    95      */
       
    96     static CGulIcon* LoadIconFromMifFileL( 		  
       
    97                           const TDesC&				aAppIconFile,
       
    98                                 TInt				aFrameNo );              
       
    99     };
       
   100  
       
   101 #endif // LCICONLOADER_H