taskswitcher/contextengine/tsfswserver/engine/inc/tsfswengine.h
branchRCL_3
changeset 11 ff572dfe6d86
parent 9 f966699dea19
child 17 b8fae6b8a148
equal deleted inserted replaced
9:f966699dea19 11:ff572dfe6d86
    37 class CTsFsWidgetList;
    37 class CTsFsWidgetList;
    38 class MTsFswEngineObserver;
    38 class MTsFswEngineObserver;
    39 class CTsFswIconCache;
    39 class CTsFswIconCache;
    40 class CTsFastSwapPreviewProvider;
    40 class CTsFastSwapPreviewProvider;
    41 class CApaWindowGroupName;
    41 class CApaWindowGroupName;
       
    42 class CBitmapRotator;
       
    43 class CTsRotationTask;
    42 
    44 
    43 // descriptor big enough to store hex repr of 32-bit integer plus 0x prefix
    45 // descriptor big enough to store hex repr of 32-bit integer plus 0x prefix
    44 typedef TBuf<10> TAppUidHexString;
    46 typedef TBuf<10> TAppUidHexString;
    45 
    47 
    46 /**
    48 /**
   102      *
   104      *
   103      * @param   aType   @see CTsFswClient::TTsFswFgAppType
   105      * @param   aType   @see CTsFswClient::TTsFswFgAppType
   104      */
   106      */
   105     IMPORT_C TUid ForegroundAppUidL( TInt aType );
   107     IMPORT_C TUid ForegroundAppUidL( TInt aType );
   106 
   108 
       
   109     /**
       
   110      * Callback for rotation completion. Takes ownership of a given
       
   111      * bitmap.
       
   112      */
       
   113     void RotationComplete( TInt aWgId,
       
   114             CFbsBitmap* aBitmap,
       
   115             CTsRotationTask* aCompletedTask,
       
   116             TInt aError );
       
   117     
   107 private:
   118 private:
   108     // from CActive
   119     // from CActive
   109     void RunL();
   120     void RunL();
   110     TInt RunError( TInt aError );
   121     TInt RunError( TInt aError );
   111     void DoCancel();
   122     void DoCancel();
   120     void HiddenAppListUpdated();
   131     void HiddenAppListUpdated();
   121 
   132 
   122     // from MTsFastSwapPreviewObserver
   133     // from MTsFastSwapPreviewObserver
   123     void HandleFswPpApplicationChange( TInt aWgId, TInt aFbsHandle );
   134     void HandleFswPpApplicationChange( TInt aWgId, TInt aFbsHandle );
   124     void HandleFswPpApplicationUnregistered( TInt aWgId );
   135     void HandleFswPpApplicationUnregistered( TInt aWgId );
       
   136     void HandleFswPpApplicationBitmapRotation( TInt aWgId, TBool aClockwise );
       
   137     
       
   138     void RotateL( CFbsBitmap& aBitmap, TInt aWgId, TBool aClockwise );
   125 
   139 
   126 private:
   140 private:
   127     /**
   141     /**
   128      * Constructor.
   142      * Constructor.
   129      */
   143      */
   269      * Gets and publishes the foreground app uid to CFW.
   283      * Gets and publishes the foreground app uid to CFW.
   270      */
   284      */
   271     void PublishFgAppUidL();
   285     void PublishFgAppUidL();
   272 
   286 
   273     /**
   287     /**
   274      * Helper function to publish something to CFW.
   288      * Close running widget
   275      * @param   aType   context type
   289      * @param aOffset - widget info offset
   276      * @param   aValue  value to publish
   290      */
   277      */
   291     void CloseWidgetL(TInt aOffset);
   278     //void PublishContextL( const TDesC& aType, const TDesC& aValue );
       
   279 
   292 
   280 private: // data    
   293 private: // data    
   281     MTsFswEngineObserver& iObserver;
   294     MTsFswEngineObserver& iObserver;
   282     RTsFswArray iData; // current fsw content, i.e. the task list
   295     RTsFswArray iData; // current fsw content, i.e. the task list
   283     CEikonEnv* iEnv; // not own
   296     CEikonEnv* iEnv; // not own
   314     // app icon provider/container instance, own
   327     // app icon provider/container instance, own
   315     CTsFswIconCache* iAppIcons;
   328     CTsFswIconCache* iAppIcons;
   316     
   329     
   317     // true if web widgets are supported by the system
   330     // true if web widgets are supported by the system
   318     TBool iWidgetsSupported;
   331     TBool iWidgetsSupported;
   319     // wgid of widget appui is saved here
       
   320     TInt iWidgetAppUiWgId;
       
   321 
   332 
   322     // PS property to listen for swi status changes
   333     // PS property to listen for swi status changes
   323     RProperty iSwiProp;
   334     RProperty iSwiProp;
   324     // when true CollectTasksL will call GetAllApps etc.
   335     // when true CollectTasksL will call GetAllApps etc.
   325     // which is slow and need not be done normally, except
   336     // which is slow and need not be done normally, except
   336 
   347 
   337     // For publishing the foreground app uid to Context Framework    
   348     // For publishing the foreground app uid to Context Framework    
   338     TAppUidHexString iFgAppUidStr;
   349     TAppUidHexString iFgAppUidStr;
   339     TUid iFgAppUid;
   350     TUid iFgAppUid;
   340 
   351 
       
   352     // For rotating bitmaps
       
   353     RPointerArray<CTsRotationTask> iRotaTasks;
   341     };
   354     };
   342 
   355 
       
   356 
       
   357 /**
       
   358  * Listener for rotation complete event
       
   359  */
       
   360 NONSHARABLE_CLASS( CTsRotationTask ) : public CActive
       
   361     {
       
   362 public:
       
   363     CTsRotationTask( CTsFswEngine& aEngine );
       
   364     ~CTsRotationTask();
       
   365     void StartLD( TInt aWgId,
       
   366             CFbsBitmap* aBitmapHandle,
       
   367             TBool aClockwise );
       
   368 private:
       
   369     void RunL();
       
   370     void DoCancel();
       
   371 private: // Data
       
   372     CTsFswEngine& iEngine;
       
   373     TInt iWgId;
       
   374     CFbsBitmap* iBitmap; // owned for the duration of transformation
       
   375     CBitmapRotator* iRotator; // owned
       
   376     };
       
   377 
   343 #endif
   378 #endif