summaryrefslogtreecommitdiff
path: root/daemon/bundle.h
diff options
context:
space:
mode:
authorTomasz Sterna <tomek@xiaoka.com>2015-04-08 11:52:14 +0200
committerTomasz Sterna <tomek@xiaoka.com>2015-04-09 08:45:16 +0200
commit78d1697cd63033244304f7794cf9157029e4fdb5 (patch)
tree3a1bdbe3d3706c34a8a7841a1790846599a45c8f /daemon/bundle.h
parentcbb0039fe542c0d8281601d25c04de487c84fa17 (diff)
Implemented firmwareUpgrade in daemon
Diffstat (limited to 'daemon/bundle.h')
-rw-r--r--daemon/bundle.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/daemon/bundle.h b/daemon/bundle.h
new file mode 100644
index 0000000..c2dc86b
--- /dev/null
+++ b/daemon/bundle.h
@@ -0,0 +1,44 @@
+#ifndef BUNDLE_H
+#define BUNDLE_H
+
+#include <QLoggingCategory>
+#include <QSharedDataPointer>
+#include <QString>
+#include <QIODevice>
+
+class BundleData;
+
+class Bundle
+{
+ Q_GADGET
+
+ static QLoggingCategory l;
+
+public:
+ enum File {
+ MANIFEST,
+ INFO,
+ BINARY,
+ RESOURCES,
+ APPJS
+ };
+
+ static Bundle fromPath(const QString &path);
+
+ Bundle();
+ Bundle(const Bundle &);
+ Bundle &operator=(const Bundle &);
+ ~Bundle();
+
+ QString type() const;
+ QString path() const;
+ bool isValid() const;
+
+ QIODevice *openFile(enum File, QIODevice::OpenMode = 0) const;
+ bool fileExists(enum File) const;
+
+private:
+ QSharedDataPointer<BundleData> b;
+};
+
+#endif // BUNDLE_H