summaryrefslogtreecommitdiff
path: root/daemon/bundle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/bundle.cpp')
-rw-r--r--daemon/bundle.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/daemon/bundle.cpp b/daemon/bundle.cpp
index bfd4b83..63400b5 100644
--- a/daemon/bundle.cpp
+++ b/daemon/bundle.cpp
@@ -127,3 +127,21 @@ bool Bundle::fileExists(enum Bundle::File file) const
delete dev;
return exists;
}
+
+quint32 Bundle::crcFile(enum Bundle::File file) const
+{
+ quint32 ret = 0;
+
+ switch (file) {
+ case Bundle::BINARY:
+ ret = b->manifest.value(type()).toObject().value("crc").toDouble();
+ break;
+ case Bundle::RESOURCES:
+ ret = b->manifest.value("resources").toObject().value("crc").toDouble();
+ break;
+ default:
+ qCWarning(l) << "Unsupported CRC for" << file;
+ }
+
+ return ret;
+}