diff -r c739008478cc -r 5d243a69bdda tstaskmonitor/server/inc/tsfswengine.h --- a/tstaskmonitor/server/inc/tsfswengine.h Mon May 24 20:50:46 2010 +0300 +++ b/tstaskmonitor/server/inc/tsfswengine.h Fri May 28 16:17:03 2010 +0300 @@ -19,35 +19,12 @@ #ifndef TSFSWENGINE_H #define TSFSWENGINE_H -#define __E32SVR_H__ - -#include - #include -#include -#include -#include -#include -#include -#include -#include -#include #include "tsfswentry.h" -#include "tsfswobservers.h" -#include "hsdataprovider.h" -#include "hsdataobserver.h" - -class MTsFswEngineObserver; -class CTsFastSwapPreviewProvider; -class CApaWindowGroupName; -class CBitmapRotator; -class CTsRotationTask; -class CTSCpsNotifier; +#include "tsdataobserver.h" class CTsFswDataList; -// descriptor big enough to store hex repr of 32-bit integer plus 0x prefix -typedef TBuf<10> TAppUidHexString; /** * Engine for fast swap server. @@ -55,35 +32,21 @@ * received from the appui. */ NONSHARABLE_CLASS( CTsFswEngine ) : public CBase, - public MTsFswTaskListObserver + public MHsDataObserver { - enum TTsFswFgAppType - { - /** - * Means that even when the foreground app has another app embedded - * into it the uid of the container application will be returned. - */ - EUseStandaloneUid, - /** - * Means that if the foreground app has another app embedded - * into it then the returned uid will be the uid of the embedded - * app. - */ - EUseEmbeddedUid - }; public: /** * Creates a new instance. - * @param aObserver ref to observer + * @param observer ref to observer */ - static CTsFswEngine* NewL( MHsDataObserver& aObserver ); + static CTsFswEngine* NewL( MHsDataObserver& observer ); /** * @copydoc NewL */ - static CTsFswEngine* NewLC( MHsDataObserver& aObserver ); + static CTsFswEngine* NewLC( MHsDataObserver& observer ); /** * Destructor. @@ -92,19 +55,25 @@ /** * Returns a reference to the current content. - * Also performs sanity checks, e.g. associates application icons - * when no screenshot has been received. * @return ref to content array */ const RTsFswArray& FswDataL(); - + /** + * Set screenshot + */ + void SetScreenshotL(const CFbsBitmap* bitmap, UpdatePriority priority, TInt wgId); + + /** + * Removes screenshot + */ + void RemoveScreenshotL(TInt wgId); private: // from MTsFswTaskListObserver - void UpdateTaskList(); + void DataChanged(); @@ -112,7 +81,7 @@ /** * Constructor. */ - CTsFswEngine( MHsDataObserver& aObserver ); + CTsFswEngine( MHsDataObserver& observer ); /** * Performs 2nd phase construction. @@ -125,53 +94,9 @@ */ TBool CollectTasksL(); - - /** - * Callback for the iUpdateStarter timer. - * Calls CollectTasksL and notifies the observer if the task list - * has really been modified. - */ - static TInt UpdateStarterCallback( TAny* aParam ); - - /** - * Returns the uid of the foreground app or KNullUid. - * Will never return hidden apps, only those which can - * also be seen in the array returned by FswDataL. - * - * In case of embedded apps the behaviour is controlled - * by aType: it will return either the uid of the embedded - * application or the container app. - * - * @param aType @see CTsFswClient::TTsFswFgAppType - */ - TUid ForegroundAppUidL( TInt aType ); - - /** - * Gets and publishes the foreground app uid to CFW. - */ - void PublishFgAppUidL(); - private: - // data - MHsDataObserver& iObserver; - - // window server session - RWsSession iWsSession; - - // apparc session - RApaLsSession iAppArcSession; - - // timer to defer content refresh - CPeriodic* iUpdateStarter; - - - // window group ids returned by last WindowGroupList call - RArray iWgIds; - - TUid iFgAppUid; - - - CTsFswDataList* iDataList;//own + MHsDataObserver& mObserver; + CTsFswDataList* mDataList; //own };