taskswitcher/contextengine/hgfswserver/utils/inc/hgfswentry.h
changeset 4 4d54b72983ae
parent 3 fb3763350a08
child 5 c743ef5928ba
equal deleted inserted replaced
3:fb3763350a08 4:4d54b72983ae
     1 /*
       
     2  * ===========================================================================
       
     3  *  Name        : hgfswentry.h
       
     4  *  Part of     : Huriganes / Fast Swap Server
       
     5  *  Description : Task list entry
       
     6  *  Version     : %version: 7 %
       
     7  *
       
     8  *  Copyright © 2008 Nokia Corporation.
       
     9  *  This material, including documentation and any related 
       
    10  *  computer programs, is protected by copyright controlled by 
       
    11  *  Nokia Corporation. All rights are reserved. Copying, 
       
    12  *  including reproducing, storing, adapting or translating, any 
       
    13  *  or all of this material requires the prior written consent of 
       
    14  *  Nokia Corporation. This material also contains confidential 
       
    15  *  information which may not be disclosed to others without the 
       
    16  *  prior written consent of Nokia Corporation.
       
    17  * ===========================================================================
       
    18  */
       
    19 
       
    20 #ifndef __HGFSWENTRY_H
       
    21 #define __HGFSWENTRY_H
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <e32cmn.h>
       
    25 
       
    26 class CHgFswEntry;
       
    27 class RReadStream;
       
    28 class RWriteStream;
       
    29 
       
    30 typedef RPointerArray<CHgFswEntry> RHgFswArray;
       
    31 
       
    32 /**
       
    33  * An entry in the task list.
       
    34  */
       
    35 NONSHARABLE_CLASS( CHgFswEntry ) : public CBase
       
    36     {
       
    37 public:
       
    38     IMPORT_C static CHgFswEntry* NewL();
       
    39     IMPORT_C static CHgFswEntry* NewLC();
       
    40     ~CHgFswEntry();
       
    41 
       
    42     /**
       
    43      * Window group id.
       
    44      * In case of wrt widgets this is negative and is not a valid window group id.
       
    45      * Use this when calling CloseApp or SwitchToApp. (these work with widgets too)
       
    46      */
       
    47     IMPORT_C TInt WgId() const;
       
    48     
       
    49     /**
       
    50      * Application uid.
       
    51      */
       
    52     IMPORT_C TUid AppUid() const;
       
    53     
       
    54     /**
       
    55      * Application name.
       
    56      */
       
    57     IMPORT_C const TDesC& AppName() const;
       
    58     
       
    59     /**
       
    60      * Bitmap handle to the screenshot or 0 if not available.
       
    61      */
       
    62     IMPORT_C TInt ScreenshotHandle() const;
       
    63     
       
    64     /**
       
    65      * ETrue if the application is always shown in the fast swapper.
       
    66      * (no use to call CloseApp for such an application)
       
    67      */
       
    68     IMPORT_C TBool AlwaysShown() const;
       
    69 
       
    70     /**
       
    71      * ETrue if the application is a system application.
       
    72      * (no use to call CloseApp for such an application)
       
    73      */
       
    74     IMPORT_C TBool SystemApp() const;
       
    75 
       
    76     /**
       
    77      * ETrue if this is a wrt widget.
       
    78      */
       
    79     IMPORT_C TBool Widget() const;
       
    80     
       
    81     /**
       
    82      * Application icon bitmap handle or 0.
       
    83      * If may not be set if the screenshot is available, i.e. it is
       
    84      * only guaranteed to be non-zero when ScreenshotHandle() returns 0.
       
    85      */
       
    86     IMPORT_C TInt AppIconBitmapHandle() const;
       
    87     
       
    88     /**
       
    89      * Application icon mask handle.
       
    90      * @see AppIconBitmapHandle
       
    91      * The mask handle may be 0 even when the bitmap handle is non-zero.
       
    92      */
       
    93     IMPORT_C TInt AppIconMaskHandle() const;
       
    94 
       
    95 
       
    96     IMPORT_C void SetWgId( TInt aWgId );
       
    97     IMPORT_C void SetAppUid( const TUid& aUid );
       
    98     IMPORT_C void SetAppNameL( const TDesC& aAppName );
       
    99     IMPORT_C void SetScreenshotHandle( TInt aHandle );
       
   100     IMPORT_C void SetAlwaysShown( TBool aValue );
       
   101     IMPORT_C void SetSystemApp( TBool aValue );
       
   102     IMPORT_C void SetWidget( TBool aValue );
       
   103     IMPORT_C void SetAppIconHandles( TInt aBitmapHandle, TInt aMaskHandle );
       
   104 
       
   105     IMPORT_C void ExternalizeL( RWriteStream& aStream );
       
   106     IMPORT_C void InternalizeL( RReadStream& aStream );
       
   107 
       
   108     IMPORT_C static void ExternalizeArrayL( RWriteStream& aStream,
       
   109         const RHgFswArray& aArray );
       
   110     IMPORT_C static void InternalizeArrayL( RReadStream& aStream,
       
   111         RHgFswArray& aArray );
       
   112 
       
   113 private:
       
   114     TInt iWgId;
       
   115     TUid iAppUid;
       
   116     HBufC* iAppName;
       
   117     TInt iScreenshotHandle;
       
   118     TBool iAlwaysShown;
       
   119     TBool iSystemApp;
       
   120     TBool iWidget;
       
   121     TInt iAppIconBitmapHandle;
       
   122     TInt iAppIconMaskHandle;
       
   123     
       
   124     TInt iReserved0;
       
   125     TInt iReserved1;
       
   126     TInt iReserved2;
       
   127     TInt iReserved3;
       
   128     };
       
   129 
       
   130 #endif