]> git.sur5r.net Git - minitube/blobdiff - lib/updater/src/impl/installer.h
New upstream version 3.5
[minitube] / lib / updater / src / impl / installer.h
diff --git a/lib/updater/src/impl/installer.h b/lib/updater/src/impl/installer.h
new file mode 100644 (file)
index 0000000..27c9e35
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef UPDATER_IMPL_INSTALLER_H
+#define UPDATER_IMPL_INSTALLER_H
+
+#include <QtCore>
+
+namespace updater {
+
+class DefaultUpdater;
+
+/**
+ * Implement this interface to create your own installer mechanism
+ * E.g. Unzip and copy files, payload integrity checking, validation, etc.
+ */
+class Installer : public QObject {
+    Q_OBJECT
+
+public:
+    Installer(){};
+    void setUpdater(DefaultUpdater *value) { updater = value; }
+
+    virtual void start(const QString &filename) = 0;
+
+signals:
+    void error(const QString &message);
+
+protected:
+    DefaultUpdater *updater = nullptr;
+};
+
+} // namespace updater
+
+#endif // UPDATER_IMPL_INSTALLER_H