appinstaller/AppinstUi/sifuiinstallindicatorplugin/inc/sifuiinstallindicator.h
changeset 42 d17dc5398051
parent 33 8110bf1194d1
child 55 ac7f90a6ff4c
equal deleted inserted replaced
37:6e7b00453237 42:d17dc5398051
    23 
    23 
    24 QTM_BEGIN_NAMESPACE
    24 QTM_BEGIN_NAMESPACE
    25 class QValueSpacePublisher;
    25 class QValueSpacePublisher;
    26 QTM_END_NAMESPACE
    26 QTM_END_NAMESPACE
    27 
    27 
       
    28 // Variant map keys for parameters
       
    29 const QString KSifUiInstallIndicatorAppNameKey = "name";    // QString
       
    30 const QString KSifUiInstallIndicatorPhaseKey = "phase";     // int (enum Phase)
       
    31 const QString KSifUiInstallIndicatorProgressKey = "prog";   // int (0..100)
       
    32 const QString KSifUiInstallIndicatorCompleteKey = "done";   // int (KErrNone or error code)
       
    33 const QString KSifUiInstallIndicatorIconKey = "icon";       // TBD
       
    34 
    28 
    35 
    29 /**
    36 /**
    30  * Software install progress indicator for the status indicator area
    37  * Software install progress indicator for the status indicator area
    31  * and/or in universal indicator popup.
    38  * and/or in universal indicator popup.
    32  */
    39  */
    43     virtual QVariant indicatorData(int role) const;
    50     virtual QVariant indicatorData(int role) const;
    44 
    51 
    45 protected:  // from HbIndicatorInterface
    52 protected:  // from HbIndicatorInterface
    46     bool handleClientRequest(RequestType type, const QVariant &parameter);
    53     bool handleClientRequest(RequestType type, const QVariant &parameter);
    47 
    54 
       
    55 private:    // new Symbian functions, TODO: move to symbian-specific code
       
    56     void CreateNotifierL();
       
    57     void StartListeningOperationsL();
       
    58     void StopListeningOperationsL();
       
    59 
    48 private:    // new functions
    60 private:    // new functions
    49     void processParameters(const QVariant &parameter);
    61     void processParameters(const QVariant &parameter);
    50     void publishActivityStatus(bool status);
    62     void publishActivityStatus(bool status);
    51 
    63 
    52 private:    // data
    64 private:    // data
    53     QString mAppName;
    65     QString mAppName;
    54     int mProgress;
    66     int mProgress;
    55     QTM_PREPEND_NAMESPACE(QValueSpacePublisher) *mPublisher;
    67     QTM_PREPEND_NAMESPACE(QValueSpacePublisher) *mPublisher;
    56     bool mIsActive;
    68     bool mIsActive;
       
    69     enum Phase {
       
    70         Installing,
       
    71         Downloading,
       
    72         CheckingCerts
       
    73     } mPhase;
       
    74     bool mIsComplete;
       
    75     int mErrorCode;
    57 };
    76 };
    58 
    77 
    59 #endif  // SIFUIINSTALLINDICATOR_H
    78 #endif  // SIFUIINSTALLINDICATOR_H
    60 
    79