iaupdate/IAD/ui/inc/iaupdateengine.h
changeset 77 d1838696558c
parent 44 329d304c1aa1
child 80 9dcba1ee99f7
equal deleted inserted replaced
75:2d2d25361590 77:d1838696558c
    22 #include <QObject>
    22 #include <QObject>
    23 
    23 
    24 #include "iaupdateuidefines.h"
    24 #include "iaupdateuidefines.h"
    25 #include "iaupdateuicontrollerobserver.h"
    25 #include "iaupdateuicontrollerobserver.h"
    26 #include "iaupdatenode.h"
    26 #include "iaupdatenode.h"
       
    27 #include "iaupdatefwupdateobserver.h"
    27 
    28 
    28 class IAUpdateServiceProvider;
    29 class IAUpdateServiceProvider;
    29 class CIAUpdateUiController;
    30 class CIAUpdateUiController;
    30 class CIAUpdateFWUpdateHandler;
    31 class CIAUpdateFWUpdateHandler;
    31 class CIAUpdateParameters;
    32 class CIAUpdateParameters;
    38 class CIdle;
    39 class CIdle;
    39 class HbAction;
    40 class HbAction;
    40 class IAUpdateResultsDialog;
    41 class IAUpdateResultsDialog;
    41 
    42 
    42 class IAUpdateEngine : public QObject,
    43 class IAUpdateEngine : public QObject,
    43                        public MIAUpdateUiControllerObserver
    44                        public MIAUpdateUiControllerObserver,
       
    45                        public MIAUpdateFWUpdateObserver
    44     {
    46     {
    45     Q_OBJECT
    47     Q_OBJECT
    46 
    48 
    47 public:
    49 public:
    48     IAUpdateEngine(QObject *parent = 0);
    50     IAUpdateEngine(QObject *parent = 0);
   102       * Is client application in background
   104       * Is client application in background
   103       *
   105       *
   104       * @param True value if client application is in background
   106       * @param True value if client application is in background
   105       */
   107       */
   106       bool ClientInBackgroundL() const;
   108       bool ClientInBackgroundL() const;
   107     
   109   
       
   110      CIAUpdateUiController* Controller() const;
       
   111  
   108 signals:
   112 signals:
   109     void toMainView();
   113     void toMainView();
   110     
   114     
   111     /**
   115     /**
   112     * Refreshes main view 
   116     * Refreshes main view 
   114     */              
   118     */              
   115     void refresh(const RPointerArray<MIAUpdateNode>& nodes,
   119     void refresh(const RPointerArray<MIAUpdateNode>& nodes,
   116                  const RPointerArray<MIAUpdateFwNode>& fwNodes,
   120                  const RPointerArray<MIAUpdateFwNode>& fwNodes,
   117                  int error);
   121                  int error);
   118     
   122     
       
   123     void refreshProgress();
       
   124     
       
   125     void setUpdatesRefreshing(bool refreshingUpdates);
       
   126     
       
   127     void updateCompleted();
       
   128     
   119 
   129 
   120 public slots:    
   130 public slots:    
   121     void handleAllClientsClosed();    
   131     void handleAllClientsClosed();    
   122 
   132 
   123     void dialogFinished(HbAction* action);
   133     void dialogFinished(HbAction* action);
   155     Called when UI to be redrawn during update process
   165     Called when UI to be redrawn during update process
   156     *
   166     *
   157     * @param aError Error code
   167     * @param aError Error code
   158     */
   168     */
   159     void RefreshUI();
   169     void RefreshUI();
       
   170     
       
   171     /**
       
   172     Called when UI to be redrawn during update process
       
   173     *
       
   174     * @param aError Error code
       
   175     */
       
   176     void RefreshUIProgress();
       
   177     
       
   178     void SetUpdatesRefreshing( TBool aRefreshing );
   160             
   179             
   161     /**
   180     /**
   162     * Called when async update list refresh is completed
   181     * Called when async update list refresh is completed
   163     *
   182     *
   164     * @param aError Error code
   183     * @param aError Error code
   169     * Called when async updating is completed
   188     * Called when async updating is completed
   170     *
   189     *
   171     * @param aError Error code
   190     * @param aError Error code
   172     */     
   191     */     
   173     void UpdateCompleteL( TInt aError );
   192     void UpdateCompleteL( TInt aError );
       
   193     
       
   194 private: // From MIAUpdateFWUpdateObserver     
       
   195     
       
   196     void PreparingStarted();
       
   197     
       
   198     void Prepared();
   174     
   199     
   175 private:  //new methods
   200 private:  //new methods
   176 
   201 
   177     /**
   202     /**
   178     * Show results dialog of update
   203     * Show results dialog of update