tstaskmonitor/utils/inc/tsfswentry.h
changeset 83 156f692b1687
parent 80 397d00875918
child 98 d2f833ab7940
equal deleted inserted replaced
80:397d00875918 83:156f692b1687
    19 #ifndef TSFSWENTRY_H
    19 #ifndef TSFSWENTRY_H
    20 #define TSFSWENTRY_H
    20 #define TSFSWENTRY_H
    21 
    21 
    22 #include <e32base.h>
    22 #include <e32base.h>
    23 #include <e32cmn.h>
    23 #include <e32cmn.h>
       
    24 #include <tsgraphicfilescalinghandler.h>
       
    25 
       
    26 #include "tsentrykey.h"
       
    27 #include "tstaskmonitorglobals.h"
    24 
    28 
    25 class CTsFswEntry;
    29 class CTsFswEntry;
    26 class RReadStream;
    30 class RReadStream;
    27 class RWriteStream;
    31 class RWriteStream;
    28 class CFbsBitmap;
    32 class CFbsBitmap;
       
    33 class MHsDataObserver;
    29 
    34 
    30 typedef RPointerArray<CTsFswEntry> RTsFswArray;
    35 typedef RPointerArray<CTsFswEntry> RTsFswArray;
    31 
    36 
    32 enum TAppType
    37 enum TAppType
    33 {
    38 {
    37 };
    42 };
    38 
    43 
    39 /**
    44 /**
    40  * An entry in the task list.
    45  * An entry in the task list.
    41  */
    46  */
    42 NONSHARABLE_CLASS( CTsFswEntry ) : public CBase
    47 NONSHARABLE_CLASS( CTsFswEntry ) : public CBase,
       
    48                                    private MImageReadyCallBack
    43     {
    49     {
    44 public:
    50 public:
    45     static CTsFswEntry* NewL();
    51     static CTsFswEntry* NewL();
    46     static CTsFswEntry* NewLC();
    52     static CTsFswEntry* NewLC();
       
    53     
       
    54     static CTsFswEntry* NewL(const TTsEntryKey& key, MHsDataObserver* observer =0);
       
    55     static CTsFswEntry* NewLC(const TTsEntryKey& key, MHsDataObserver* observer =0);
       
    56     
    47     ~CTsFswEntry();
    57     ~CTsFswEntry();
    48 
    58 
    49     /**
    59     /**
    50      * Window group id.
    60      * Window group id.
    51      * In case of wrt widgets this is negative and is not a valid window group id.
    61      * In case of wrt widgets this is negative and is not a valid window group id.
    78      */
    88      */
    79     CFbsBitmap* AppIconBitmap() const;
    89     CFbsBitmap* AppIconBitmap() const;
    80     
    90     
    81     /**
    91     /**
    82      * Application icon mask.
    92      * Application icon mask.
    83      * @see AppIconBitmapHandle
       
    84      */
    93      */
    85     CFbsBitmap* AppIconMask() const;
    94     CFbsBitmap* AppIconMask() const;
       
    95     
       
    96     /**
       
    97      * Application screenshot.
       
    98      */
       
    99     CFbsBitmap* Screenshot() const;
       
   100     
       
   101     /**
       
   102      * Priority.
       
   103      */
       
   104     UpdatePriority Priority() const;
       
   105     
       
   106     /**
       
   107      * Entry's key
       
   108      */
       
   109     const TTsEntryKey& Key() const;
    86 
   110 
    87 
   111 
    88     void SetWgId( TInt aWgId );
   112     void SetWgId( TInt wgId );
    89     void SetAppUid( const TUid& aUid );
   113     void SetAppUid( const TUid& uid );
    90     void SetAppNameL( const TDesC& aAppName );
   114     void SetAppNameL( const TDesC& appName );
    91     void SetCloseableApp( TBool aValue );
   115     void SetCloseableApp( TBool value );
       
   116     TBool SetScreenshotL(const CFbsBitmap* bitmap, UpdatePriority priority);
       
   117     TBool RemoveScreenshot();
    92     
   118     
    93     // takes ownership of bitmaps
   119     // takes ownership of bitmaps
    94     void SetAppIcon( CFbsBitmap* aBitmap, CFbsBitmap* aMask );
   120     void SetAppIcon( CFbsBitmap* aBitmap, CFbsBitmap* aMask );
    95     void ExternalizeL( RWriteStream& aStream );
   121     void ExternalizeL( RWriteStream& aStream );
    96     void InternalizeL( RReadStream& aStream );
   122     void InternalizeL( RReadStream& aStream );
    99         const RTsFswArray& aArray );
   125         const RTsFswArray& aArray );
   100     static void InternalizeArrayL( RReadStream& aStream,
   126     static void InternalizeArrayL( RReadStream& aStream,
   101         RTsFswArray& aArray );
   127         RTsFswArray& aArray );
   102 
   128 
   103 private:
   129 private:
   104     TInt iWgId;
   130     //constructors
   105     TUid iAppUid;
   131     CTsFswEntry();
   106     HBufC* iAppName;
   132     CTsFswEntry(const TTsEntryKey& aKey, MHsDataObserver* observer);
   107     TBool iCloseableApp;
   133     void ImageReadyCallBack(TInt error, const CFbsBitmap *bitmap );
   108     CFbsBitmap* iAppIconBitmap;
   134     
   109     CFbsBitmap* iAppIconMask;  
   135 private:
       
   136     TInt mWgId;
       
   137     TUid mAppUid;
       
   138     HBufC* mAppName;
       
   139     TBool mCloseableApp;
       
   140     CFbsBitmap* mAppIconBitmap;
       
   141     CFbsBitmap* mAppIconMask;
       
   142     CFbsBitmap* mScreenshot;
       
   143     TTsEntryKey mKey;
       
   144     UpdatePriority mPriority;
       
   145     MHsDataObserver* mObserver;
       
   146     CTsGraphicFileScalingHandler* mImgTool;
   110     };
   147     };
   111 
   148 
   112 #endif
   149 #endif