appinstaller/AppinstUi/sisxsifplugin/tsrc/testinstaller/testinstaller.h
changeset 29 26b6f0522fd8
parent 25 98b66e4fb0be
child 42 d17dc5398051
equal deleted inserted replaced
25:98b66e4fb0be 29:26b6f0522fd8
    18 #ifndef TESTINSTALLER_H
    18 #ifndef TESTINSTALLER_H
    19 #define TESTINSTALLER_H
    19 #define TESTINSTALLER_H
    20 
    20 
    21 #include <hbapplication.h>
    21 #include <hbapplication.h>
    22 #include <QStringList>
    22 #include <QStringList>
       
    23 #include <usif/usifcommon.h>
    23 
    24 
    24 class HbMainWindow;
    25 class HbMainWindow;
    25 class HbView;
    26 class HbView;
    26 class HbLabel;
    27 class HbLabel;
    27 class HbComboBox;
    28 class HbComboBox;
    35 public:     // constructor and destructor
    36 public:     // constructor and destructor
    36     TestInstaller(int& argc, char* argv[]);
    37     TestInstaller(int& argc, char* argv[]);
    37     ~TestInstaller();
    38     ~TestInstaller();
    38 
    39 
    39 private slots:
    40 private slots:
    40     void selectedFileChanged(int index);
       
    41     void silentCheckChanged(int state);
    41     void silentCheckChanged(int state);
       
    42     void installableDirChanged(int index);
       
    43     void installableFileChanged(int index);
    42     void installUsingNewApi();
    44     void installUsingNewApi();
    43     void installUsingOldApi();
    45     void installUsingOldApi();
       
    46     void installByOpeningFile();
       
    47     void removeUsingNewApi();
       
    48     void removeUsingOldApi();
    44     void handleComplete();
    49     void handleComplete();
    45     void handleError(int error);
    50     void handleError(int error);
    46     void closeApp();
    51     void closeApp();
       
    52     void fileOpenOk(const QVariant &result);
       
    53     void fileOpenFailed(int errorCode, const QString &errorMsg);
    47 
    54 
    48 private:    // functions
    55 private:    // functions
       
    56     void getInstallDirs(QStringList& dirList);
    49     void changeDir(const QString& dirPath);
    57     void changeDir(const QString& dirPath);
    50     void createRunner(bool useSif);
    58     void getRemovableApps();
    51     void installSelected();
    59     void doGetRemovableAppsL();
       
    60     bool isFileSelected();
       
    61     bool createRunner(bool useSif);
    52     void doInstall(const QString &fileName);
    62     void doInstall(const QString &fileName);
       
    63     void doOpenFile(const QString &fileName);
       
    64     void removeSelectedUsingNewApi();
       
    65     void removeSelectedUsingOldApi();
    53 
    66 
    54 private:    // data
    67 private:    // data
    55     HbMainWindow *mMainWindow;
    68     HbMainWindow *mMainWindow;
    56     HbView       *mMainView;
    69     HbView       *mMainView;
    57     QStringList  mFileNames;
       
    58     HbComboBox   *mSelectableFiles;
       
    59     bool         mUseSilentInstall;
    70     bool         mUseSilentInstall;
    60     QString      mDirPath;
    71     HbComboBox   *mInstallDirectories;
       
    72     HbComboBox   *mInstallableFiles;
       
    73     HbComboBox   *mRemovableApps;
       
    74     QList<Usif::TComponentId> mRemovableComponentIds;
       
    75     QList<TUid>  mRemovableUids;
       
    76     enum TSoftwareType {
       
    77         Unknown,
       
    78         Native,
       
    79         Java
       
    80     };
       
    81     QList<TSoftwareType>  mRemovableSoftwareTypes;
       
    82     QString      mCurrentDirPath;
       
    83     QString      mCurrentFile;
    61     ActiveRunner *mRunner;
    84     ActiveRunner *mRunner;
    62 };
    85 };
    63 
    86 
    64 #endif  // TESTINSTALLER_H
    87 #endif  // TESTINSTALLER_H