QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
Abstract interface for external storage - to be implemented by various backends and registered in QgsExternalStorageRegistry. More...
#include <qgsexternalstorage.h>
Public Member Functions | |
virtual | ~QgsExternalStorage ()=default |
virtual QString | displayName () const =0 |
Returns the translated external storage name, which should be used for any user-visible display of the external storage name. | |
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. | |
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. | |
virtual QString | type () const =0 |
Unique identifier of the external storage type. | |
Protected Member Functions | |
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. | |
Abstract interface for external storage - to be implemented by various backends and registered in QgsExternalStorageRegistry.
Definition at line 36 of file qgsexternalstorage.h.
|
virtualdefault |
|
pure virtual |
Returns the translated external storage name, which should be used for any user-visible display of the external storage name.
|
protectedpure virtual |
Fetches file from url using authCfg for this project external storage.
|
protectedpure virtual |
Stores file filePath to the url using authCfg authentication for this project external storage.
QgsExternalStorageFetchedContent * QgsExternalStorage::fetch | ( | const QString & | url, |
const QString & | authCfg = QString() , |
||
Qgis::ActionStart | fetchingMode = Qgis::ActionStart::Deferred |
||
) | const |
Fetches file from url for this project external storage.
Fetching process is run in background. Returns a QgsExternalStorageFetchedContent to follow the status of the fetched resource.
fetchingMode defines if the download will start immediately or shall be manually triggered calling QgsExternalStorageFetchedContent::fetch(). User should use Qgis::ActionStart::Deferred if he needs to connect the fetched() signal.
After using this method, user should wait for QgsExternalStorageStoredContent::fetched(), QgsExternalStorageStoredContent::errorOccurred() or QgsExternalStorageStoredContent::canceled() signals.
It's possible to give authCfg authentication configuration id in case its needed.
Definition at line 50 of file qgsexternalstorage.cpp.
QgsExternalStorageStoredContent * QgsExternalStorage::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.
Storing process is run in background. Returns a QgsExternalStorageStoredContent to follow the status of the stored resource.
storingMode defines if the download will start immediately or shall be manually triggered calling QgsExternalStorageStoredContent::store(). User should use Qgis::ActionStart::Deferred if he needs to connect the stored() signal.
After using this method, user wait for QgsExternalStorageStoredContent::stored(), QgsExternalStorageStoredContent::errorOccurred() or QgsExternalStorageStoredContent::canceled() signals.
It's possible to give authCfg authentication configuration id in case its needed.
Caller takes ownership of the returned symbol.
Definition at line 41 of file qgsexternalstorage.cpp.
|
pure virtual |
Unique identifier of the external storage type.