Add setIsLivePhoto method to FileInfo
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 30 Oct 2024 04:16:44 +0000 (12:16 +0800)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Wed, 20 Nov 2024 13:39:51 +0000 (14:39 +0100)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
test/syncenginetestutils.cpp
test/syncenginetestutils.h

index 263958832b3b26727fe2221bfa93364fee411422..7671518be24d621d360af26bcd76876228ac70ce 100644 (file)
@@ -223,6 +223,13 @@ void FileInfo::setModTimeKeepEtag(const QString &relativePath, const QDateTime &
     file->lastModified = modTime;
 }
 
+void FileInfo::setIsLivePhoto(const QString &relativePath, const bool isLivePhoto)
+{
+    const auto file = find(relativePath);
+    Q_ASSERT(file);
+    file->isLivePhoto = isLivePhoto;
+}
+
 void FileInfo::modifyLockState(const QString &relativePath, LockState lockState, int lockType, const QString &lockOwner, const QString &lockOwnerId, const QString &lockEditorId, quint64 lockTime, quint64 lockTimeout)
 {
     FileInfo *file = findInvalidatingEtags(relativePath);
index 9dd2f6362a1b2ff7e7c57f12b0ea2a00999f6017..dca0eb02b92a4dcc035fc43fbcef0d5fd8fd034c 100644 (file)
@@ -142,6 +142,8 @@ public:
 
     void setModTimeKeepEtag(const QString &relativePath, const QDateTime &modTime);
 
+    void setIsLivePhoto(const QString &relativePath, bool isLivePhoto);
+
     void modifyLockState(const QString &relativePath, LockState lockState, int lockType, const QString &lockOwner, const QString &lockOwnerId, const QString &lockEditorId, quint64 lockTime, quint64 lockTimeout) override;
 
     void setE2EE(const QString &relativepath, const bool enabled) override;