/* * Copyright (C) by Christian Kamm * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. */ #pragma once #include #include #include "common/vfs.h" namespace OCC { class VfsSuffix : public Vfs { Q_OBJECT public: explicit VfsSuffix(QObject *parent = nullptr); ~VfsSuffix(); Mode mode() const override; QString fileSuffix() const override; void stop() override; void unregisterFolder() override; bool socketApiPinStateActionsShown() const override { return true; } bool isHydrating() const override; Result updateMetadata(const QString &filePath, time_t modtime, qint64 size, const QByteArray &fileId) override; Result createPlaceholder(const SyncFileItem &item) override; Result dehydratePlaceholder(const SyncFileItem &item) override; Result convertToPlaceholder(const QString &filename, const SyncFileItem &item, const QString &) override; bool needsMetadataUpdate(const SyncFileItem &) override { return false; } bool isDehydratedPlaceholder(const QString &filePath) override; bool statTypeVirtualFile(csync_file_stat_t *stat, void *stat_data) override; bool setPinState(const QString &folderPath, PinState state) override { return setPinStateInDb(folderPath, state); } Optional pinState(const QString &folderPath) override { return pinStateInDb(folderPath); } AvailabilityResult availability(const QString &folderPath) override; public slots: void fileStatusChanged(const QString &, SyncFileStatus) override {} protected: void startImpl(const VfsSetupParams ¶ms) override; }; } // namespace OCC