summaryrefslogtreecommitdiffstats
path: root/cachedfiledata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cachedfiledata.cpp')
-rw-r--r--cachedfiledata.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/cachedfiledata.cpp b/cachedfiledata.cpp
index 6f51edb..773f411 100644
--- a/cachedfiledata.cpp
+++ b/cachedfiledata.cpp
@@ -1,3 +1,13 @@
#include "cachedfiledata.h"
CachedFileData::CachedFileData() : seconds(0), size(0), attr(-1), copied(false) {}
+
+QDataStream &operator<<(QDataStream &out, const CachedFileData &cfd){
+ out << cfd.fullPath << cfd.name << cfd.mimeType << cfd.duration << cfd.md5Sum << cfd.seconds << cfd.size << cfd.attr << cfd.copied;
+ return out;
+}
+
+QDataStream &operator>>(QDataStream &in, CachedFileData &cfd){
+ in >> cfd.fullPath >> cfd.name >> cfd.mimeType >> cfd.duration >> cfd.md5Sum >> cfd.seconds >> cfd.size >> cfd.attr >> cfd.copied;
+ return in;
+}