You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lubuntu-update/aptmanager.h

48 lines
1.2 KiB

12 months ago
#ifndef APTMANAGER_H
#define APTMANAGER_H
#include <QObject>
#include <QStringList>
class QProcess;
class QProgressBar;
class QPlainTextEdit;
class QSystemTrayIcon;
class AptManager : public QObject
{
Q_OBJECT
public:
AptManager(QObject *parent = nullptr);
static QList<QStringList> getUpdateInfo();
void applyFullUpgrade();
void keepConffile(QString conffile);
void replaceConffile(QString conffile);
void doneWithConffiles();
signals:
void updateComplete();
void progressUpdated(int progress);
void logLineReady(QString logLine);
void conffileListReady(QStringList conffileList);
private slots:
void handleProcessBuffer();
private:
static void parseAptLine(QString line, bool *gettingInstallPackages, bool *gettingUpgradePackages, bool *gettingUninstallPackages, bool *gettingHeldPackages, bool *gettingPackageList);
static QStringList getSecurityUpdateList();
QProcess *aptProcess;
QList<QStringList> internalUpdateInfo;
QStringList instUnpackList;
QStringList instConfigList;
QStringList upgradeUnpackList;
QStringList upgradeConfigList;
QStringList removeList;
quint32 numPackagesToPrep;
quint32 internalUpdateProgress;
};
#endif // APTMANAGER_H