menufw/hierarchynavigator/hnpresentationmodel/inc/hnattrimgprovappimage.h
changeset 0 f72a12da539e
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2007-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:   image provider for application uid
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef HNATTRIMGPROVAPPIMAGE_H_
       
    20 #define HNATTRIMGPROVAPPIMAGE_H_
       
    21 
       
    22 #include <AknUtils.h>
       
    23 #include "hnattrimgprovider.h"
       
    24 #include "hnglobals.h" 
       
    25 
       
    26 /**
       
    27  *  Image provider class for application uid.
       
    28  *
       
    29  *  Image provider specialization that loads the image 
       
    30  *  based on the application uid.
       
    31  *
       
    32  *  @lib hnpresentationmodel
       
    33  *  @since S60 5.0
       
    34  *  @ingroup group_hnpresentationmodel
       
    35  */
       
    36 NONSHARABLE_CLASS( CHnAttrImgProvAppImage ) : public CHnAttrImgProvider
       
    37     {
       
    38 public:
       
    39     
       
    40     /**
       
    41      * Two-phase constructor.
       
    42      *
       
    43      * @since S60 5.0
       
    44      * @param aApplicationUid Application uid.
       
    45      * @return Fully constructed object.
       
    46      */
       
    47     IMPORT_C static CHnAttrImgProvAppImage* NewL( TUid aApplicationUid );
       
    48 
       
    49     /**
       
    50      * Two-phase constructor.
       
    51      *
       
    52      * @since S60 5.0
       
    53      * @param aApplicationUid Application uid.
       
    54      * @return Fully constructed object.
       
    55      */
       
    56     IMPORT_C static CHnAttrImgProvAppImage* NewLC( TUid aApplicationUid );
       
    57 
       
    58     /**
       
    59      * Virtual destructor.
       
    60      * 
       
    61      * @since S60 5.0
       
    62      */
       
    63     virtual ~CHnAttrImgProvAppImage();
       
    64 
       
    65 // from base class CHnAttrImgProvider
       
    66 public:
       
    67     
       
    68     /**
       
    69      * Returns value.
       
    70      *
       
    71      * @since S60 5.0
       
    72      * @return Value.
       
    73      */
       
    74     const TDesC8& Value( );
       
    75 
       
    76     /**
       
    77      * This method should create a bitmap and its mask, 
       
    78      * by retrieving it form the application by a given uid (passed
       
    79      * in the constructor)
       
    80      *
       
    81      * @param aId          Parameter not used.
       
    82      * @param aBitmap      Output pointer to a bitmap.     
       
    83      * @param aMaskBitmap  Output pointer to a mask.
       
    84      * @since S60 5.0
       
    85      */
       
    86      void ProvideBitmapL(TInt aId, CFbsBitmap*& aBitmap, 
       
    87              CFbsBitmap*& aMaskBitmap);
       
    88 
       
    89 private:
       
    90 
       
    91     /**
       
    92      * Default constructor.
       
    93      */
       
    94     CHnAttrImgProvAppImage();
       
    95 
       
    96     /**
       
    97      * Standard symbian 2nd phase constructor.
       
    98      * 
       
    99      * @since S60 5.0
       
   100      * @param aApplicationUid Application uid.
       
   101      */
       
   102     void ConstructL( TUid aApplicationUid );
       
   103 
       
   104 private: // data
       
   105     
       
   106     /**
       
   107      * Value
       
   108      */
       
   109     TBuf8<KMaxLength> iValue;
       
   110 
       
   111     /**
       
   112      * Application UID
       
   113      */
       
   114     TUid iApplicationUid;
       
   115     };
       
   116     
       
   117 #endif // HNATTRIMGPROVAPPIMAGE_H_
       
   118