source: src-qt4/pc-softwaremanager/processManager.h @ c71b68c

9.2-releasereleng/10.0releng/10.0.1
Last change on this file since c71b68c was c71b68c, checked in by Ken Moore <ken@…>, 10 months ago

Add a bunch of error loggin to the backend processes, and also add a new dialog for displaying these error logs. Also fix the detection of an update failure.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1#ifndef _APPCAFE_PROCESS_MANAGER_H
2#define _APPCAFE_PROCESS_MANAGER_H
3
4#include <QProcess>
5#include <QProcessEnvironment>
6#include <QString>
7#include <QStringList>
8#include <QObject>
9#include <QDebug>
10
11#include "extras.h"
12       
13class ProcessManager : public QObject
14{
15        Q_OBJECT
16public:
17        enum ProcessID{ ALL, UPDATE, REMOVE, DOWNLOAD, INSTALL, OTHER };
18       
19        ProcessManager();
20        ~ProcessManager();
21       
22        void goToDirectory(ProcessID, QString);
23       
24        void startProcess(ProcessID, QString);
25        void stopProcess(ProcessID);
26        QStringList getProcessLog(ProcessID);
27       
28signals:
29        void ProcessFinished(int ID);
30        void ProcessMessage(int ID,QString);
31        void ProcessError(int ID,QStringList);
32       
33private:
34        QProcess *upProc, *remProc, *dlProc, *inProc, *otProc;
35        QStringList upLog, remLog, dlLog, inLog;
36       
37private slots:
38        QString parseDlLine(QString);
39        void slotUpProcMessage();
40        void slotUpProcFinished();
41        void slotRemProcMessage();
42        void slotRemProcFinished();
43        void slotDlProcMessage();
44        void slotDlProcFinished();
45        void slotInProcMessage();
46        void slotInProcFinished();
47        void slotOtProcMessage();
48        void slotOtProcFinished();
49
50};
51
52#endif
Note: See TracBrowser for help on using the repository browser.