idlehomescreen/widgetmanager/inc/wmresourceloader.h
branchRCL_3
changeset 83 5456b4e8b3a8
equal deleted inserted replaced
82:5f0182e07bfb 83:5456b4e8b3a8
       
     1 /*
       
     2 * Copyright (c) 2009 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 * loads widget manager resources and icons
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef WMRESOURCELOADER_H_
       
    21 #define WMRESOURCELOADER_H_
       
    22 
       
    23 // INCLUDE FILES
       
    24 #include <e32base.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CEikonEnv;
       
    28 class CAknInformationNote;
       
    29 
       
    30 /**
       
    31  * CWmResourceLoader
       
    32  */
       
    33 NONSHARABLE_CLASS( CWmResourceLoader ) : public CBase
       
    34     {
       
    35 
       
    36 public: // construction/destruction
       
    37 	/** 
       
    38 	 * static constructor 
       
    39 	 * 
       
    40 	 * @param aCoeEnv Control environment.
       
    41 	 */
       
    42 	static CWmResourceLoader* NewL(
       
    43 	        CEikonEnv& aEnv );
       
    44 	
       
    45 	/** destructor */
       
    46 	~CWmResourceLoader();
       
    47 
       
    48 public: // services
       
    49 
       
    50     /**
       
    51      * shows a simple info popup with OK button
       
    52      * @param aResourceId the resource id of string to be shown
       
    53      * @param aString additional string to be replaced into %U
       
    54      */
       
    55     void InfoPopupL( TInt aResourceId, const TDesC& aString );
       
    56 
       
    57     /**
       
    58      * shows a standard error popup
       
    59      * @param aErrorCode a system-wide standard error code 
       
    60      */
       
    61     void ErrorPopup( TInt aErrorCode );
       
    62 
       
    63     /** icon file path */
       
    64     const TDesC& IconFilePath();
       
    65 
       
    66     /** default no description text */
       
    67     const TDesC& NoDescription();
       
    68 
       
    69     /** wrt specific description text */
       
    70     const TDesC& WrtDescription();
       
    71     
       
    72     /** uninstalling text to replace widget name */
       
    73     const TDesC& Uninstalling();
       
    74     
       
    75     /** query popup*/
       
    76     TBool QueryPopupL( TInt aResourceId, const TDesC& aString );
       
    77 	
       
    78 private: // internal methods
       
    79 
       
    80     /** constructor */
       
    81     CWmResourceLoader(
       
    82             CEikonEnv& aEnv );
       
    83     
       
    84     /** 2nd phase constructor */
       
    85     void ConstructL();
       
    86 
       
    87     /** load the resource */
       
    88     void LoadResourcesL();
       
    89 
       
    90     /** free resources */
       
    91     void UnloadResources();
       
    92 
       
    93     /** find icon file path */
       
    94     void DetermineIconFilePath();
       
    95 
       
    96 private: // members
       
    97     
       
    98     /**
       
    99      * the environment
       
   100      */
       
   101     CEikonEnv&    iEnv;
       
   102 
       
   103     /**
       
   104      * name of this DLL
       
   105      */
       
   106     TFileName   iDllName;
       
   107 
       
   108     /**
       
   109      * resource file offset
       
   110      */
       
   111     TInt        iResourceFileOffset;
       
   112 
       
   113     /**
       
   114      * ICON file
       
   115      */
       
   116     TFileName   iMifFile;
       
   117     
       
   118     /**
       
   119      * info note dialog
       
   120      */
       
   121     CAknInformationNote *iNote;
       
   122 
       
   123     /**
       
   124      * Default no description text
       
   125      */    
       
   126     HBufC*      iNoDescription;
       
   127 
       
   128     /**
       
   129      * Wrt specific description text
       
   130      */    
       
   131     HBufC*      iWrtDescription;
       
   132     
       
   133     /**
       
   134      * text to replace title
       
   135      */    
       
   136     HBufC*      iUninstalling;
       
   137     };
       
   138 
       
   139 #endif // WMRESOURCELOADER_H_