diff options
| author | Tomasz Sterna <tomek@xiaoka.com> | 2015-04-08 11:52:14 +0200 |
|---|---|---|
| committer | Tomasz Sterna <tomek@xiaoka.com> | 2015-04-09 08:45:16 +0200 |
| commit | 78d1697cd63033244304f7794cf9157029e4fdb5 (patch) | |
| tree | 3a1bdbe3d3706c34a8a7841a1790846599a45c8f /daemon/bundle.h | |
| parent | cbb0039fe542c0d8281601d25c04de487c84fa17 (diff) | |
Implemented firmwareUpgrade in daemon
Diffstat (limited to 'daemon/bundle.h')
| -rw-r--r-- | daemon/bundle.h | 44 |
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 |
