16#ifndef QGSEXTERNALSTORAGE_H
17#define QGSEXTERNALSTORAGE_H
45 virtual QString
type()
const = 0;
215 virtual QString
url()
const = 0;
ContentStatus
Status for fetched or stored content.
@ NotStarted
Content fetching/storing has not started yet.
ActionStart
Enum to determine when an operation would begin.
@ Deferred
Do not start immediately the action.
Base class for QgsExternalStorage stored and fetched content.
void canceled()
The signal is emitted when content fetching/storing has been canceled.
void progressChanged(double progress)
The signal is emitted whenever content fetching/storing estimated progression value progress has chan...
void reportError(const QString &errorMsg)
Update content according to given errorMsg error message Inherited classes should call this method wh...
void setStatus(Qgis::ContentStatus status)
Sets the external storage status.
void errorOccurred(const QString &errorString)
The signal is emitted when an error occurred.
Qgis::ContentStatus status() const
Returns content status.
virtual void cancel()
Cancels content fetching/storing.
const QString & errorString() const
Returns error textual description if an error occurred and status() returns Failed.
Abstract base class for QgsExternalStorage fetched content.
virtual QString filePath() const =0
Returns fetched resource file path.
void fetched()
The signal is emitted when the resource has successfully been fetched.
virtual void fetch()=0
Starts fetching.
Abstract base class for QgsExternalStorage stored content.
void stored()
The signal is emitted when the resource has successfully been stored.
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 ~QgsExternalStorage()=default
virtual QString type() const =0
Unique identifier of the external storage type.
virtual QgsExternalStorageFetchedContent * doFetch(const QString &url, const QString &authCfg=QString()) const =0
Fetches file from url using authCfg for this project external storage.
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.
QgsExternalStorageStoredContent * store(const QString &filePath, const QString &url, const QString &authCfg=QString(), Qgis::ActionStart storingMode=Qgis::ActionStart::Deferred) const
Stores file filePath to the url for this project external storage.
QgsExternalStorageFetchedContent * fetch(const QString &url, const QString &authCfg=QString(), Qgis::ActionStart fetchingMode=Qgis::ActionStart::Deferred) const
Fetches file from url 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...