From 78d1697cd63033244304f7794cf9157029e4fdb5 Mon Sep 17 00:00:00 2001 From: Tomasz Sterna Date: Wed, 8 Apr 2015 11:52:14 +0200 Subject: Implemented firmwareUpgrade in daemon --- daemon/bundle.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 daemon/bundle.h (limited to 'daemon/bundle.h') 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 +#include +#include +#include + +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 b; +}; + +#endif // BUNDLE_H -- cgit v1.2.3