* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*/
+#include "common/syncjournaldb.h"
#include "config.h"
#include "account.h"
return false;
}
+void Folder::appendPathToSelectiveSyncList(const QString &path, const SyncJournalDb::SelectiveSyncListType listType)
+{
+ const auto folderPath = trailingSlashPath(path);
+ const auto journal = journalDb();
+ auto ok = false;
+ auto list = journal->getSelectiveSyncList(listType, &ok);
+
+ if (ok) {
+ list.append(folderPath);
+ journal->setSelectiveSyncList(listType, list);
+ }
+}
+
+void Folder::whitelistPath(const QString &path)
+{
+ appendPathToSelectiveSyncList(path, SyncJournalDb::SelectiveSyncWhiteList);
+}
+
+void Folder::blacklistPath(const QString &path)
+{
+ appendPathToSelectiveSyncList(path, SyncJournalDb::SelectiveSyncBlackList);
+}
+
bool Folder::isFileExcludedAbsolute(const QString &fullPath) const
{
return _engine->excludedFiles().isExcluded(fullPath, path(), _definition.ignoreHiddenFiles);
QString fileFromLocalPath(const QString &localPath) const;
+ void whitelistPath(const QString &path);
+ void blacklistPath(const QString &path);
+
signals:
void syncStateChange();
void syncStarted();
void correctPlaceholderFiles();
+ void appendPathToSelectiveSyncList(const QString &path, const SyncJournalDb::SelectiveSyncListType listType);
+
AccountStatePtr _accountState;
FolderDefinition _definition;
QString _canonicalLocalPath; // As returned with QFileInfo:canonicalFilePath. Always ends with "/"