16 #ifndef QGSWEBDAVEXTERNALSTORAGE_H
17 #define QGSWEBDAVEXTERNALSTORAGE_H
19 #include "qgis_core.h"
29 class QgsWebDAVExternalStorageStoreTask;
45 QString
type()
const override;
68 QgsWebDAVExternalStorageStoredContent(
const QString &filePath,
const QString &url,
const QString &authcfg = QString() );
72 QString
url()
const override;
74 void store()
override;
78 QPointer<QgsWebDAVExternalStorageStoreTask> mUploadTask;
100 void fetch()
override;
108 QPointer<QgsFetchedContent> mFetchedContent;
118 class QgsWebDAVExternalStorageStoreTask :
public QgsTask
124 QgsWebDAVExternalStorageStoreTask(
const QUrl &url,
const QString &filePath,
const QString &authCfg );
130 QString errorString()
const;
135 const QString mFilePath;
136 const QString mAuthCfg;
137 std::unique_ptr<QgsFeedback> mFeedback;
138 QString mErrorString;
virtual void cancel()
Cancels content fetching/storing.
Class for QgsExternalStorage fetched content.
virtual QString filePath() const =0
Returns fetched resource file path.
virtual void fetch()=0
Starts fetching.
Class for QgsExternalStorage stored content.
virtual QString url() const =0
Returns stored resource URL.
virtual void store()=0
Starts storing.
Abstract interface for external storage - to be implemented by various backends and registered in Qgs...
virtual QString type() const =0
Unique identifier of the external storage type.
virtual QgsExternalStorageStoredContent * doStore(const QString &filePath, const QString &url, const QString &authCfg=QString()) const =0
Stores file filePath to the url using authCfg authentication for this project external storage.
virtual QString displayName() const =0
Returns the translated external storage name, which should be used for any user-visible display of th...
virtual QgsExternalStorageFetchedContent * doFetch(const QString &url, const QString &authCfg=QString()) const =0
Fetches file from url using authCfg for this project external storage.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
FetchedContent holds useful information about a network content being fetched.
Abstract base class for long running background tasks.
virtual bool run()=0
Performs the task's operation.
virtual void cancel()
Notifies the task that it should terminate.