Skip to content
Snippets Groups Projects
appimagehandler.h 593 B
Newer Older
akiraohgaki's avatar
akiraohgaki committed
#pragma once

#include <QObject>

class ConfigHandler;

class AppImageHandler : public QObject
{
    Q_OBJECT

public:
    explicit AppImageHandler(ConfigHandler *configHandler, QObject *parent = nullptr);

akiraohgaki's avatar
akiraohgaki committed
signals:
    void updateStarted(QString path);
    void updateFinished(QString path);
    void updateProgress(QString path, int progress);

akiraohgaki's avatar
akiraohgaki committed
public slots:
akiraohgaki's avatar
akiraohgaki committed
    QString describeAppImage(const QString &path) const;
akiraohgaki's avatar
akiraohgaki committed
    bool isUpdateAvailable(const QString &path) const;

#ifdef QTLIB_UNIX
akiraohgaki's avatar
akiraohgaki committed
    bool updateAppImage(const QString &path);
akiraohgaki's avatar
akiraohgaki committed
#endif

private:
    ConfigHandler *configHandler_;
};