diff options
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 |
