Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kamm <mail@ckamm.de>2019-04-03 14:32:05 +0300
committerChristian Kamm <mail@ckamm.de>2019-04-09 13:46:35 +0300
commit04268becd16a93e7c346d2b8789d3ee5d504d8ee (patch)
tree92ed38db3cebe752fae310e882c24c8fbd2541f6 /src/gui/folder.h
parent33d079fcd395a1ed8b37ba787b73d406ce236dc9 (diff)
Vfs: Clear up relationship between _type and pin state
The pin state is a per-item attribute that has an effect on _type: AlwaysLocal dehydrated files will be marked for hydration and OnlineOnly hydrated files will be marked for dehydration. Where exactly this effect materializes depends on how the pin states are stored. If they're stored in the db (suffix) the dbEntry._type is changed during the discovery. If the pin state is stored in the filesystem, the localEntry._type must be adjusted by the plugin's stat callback. This patch makes pin states behave more consistently between plugins. Previously with suffix-vfs pin states only had an effect on new remote files. Now the effect of pinning or unpinning files or directories is as documented and similar to other plugins.
Diffstat (limited to 'src/gui/folder.h')
-rw-r--r--src/gui/folder.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/gui/folder.h b/src/gui/folder.h
index 2217e7dfa..f5995ea61 100644
--- a/src/gui/folder.h
+++ b/src/gui/folder.h
@@ -338,21 +338,21 @@ public slots:
void slotWatchedPathChanged(const QString &path);
/**
- * Mark a virtual file as being ready for download, and start a sync.
- * relativepath is the path to the file (including the extension)
- * Passing a folder means that all contained virtual items shall be downloaded.
- * A relative path of "" downloads everything.
- */
- void downloadVirtualFile(const QString &relativepath);
-
- /**
- * Turn a regular file into a dehydrated placeholder.
+ * Mark a virtual file as being requested for download, and start a sync.
+ *
+ * "implicit" here means that this download request comes from the user wanting
+ * to access the file's data. The user did not change the file's pin state.
+ * If the file is currently OnlineOnly its state will change to Unspecified.
+ *
+ * The download request is stored by setting ItemTypeVirtualFileDownload
+ * in the database. This is necessary since the hydration is not driven by
+ * the pin state.
+ *
+ * relativepath is the folder-relative path to the file (including the extension)
*
- * relativepath is the path to the file
- * It's allowed to pass a path to a folder: all contained files will be dehydrated.
- * A relative path of "" dehydrates everything.
+ * Note, passing directories is not supported. Files only.
*/
- void dehydrateFile(const QString &relativepath);
+ void implicitlyHydrateFile(const QString &relativepath);
/** Ensures that the next sync performs a full local discovery. */
void slotNextSyncFullLocalDiscovery();