QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
QgsExternalStorage Class Referenceabstract

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.
 
QgsExternalStorageFetchedContentfetch (const QString &url, const QString &authCfg=QString(), Qgis::ActionStart fetchingMode=Qgis::ActionStart::Deferred) const
 Fetches file from url for this project external storage.
 
QgsExternalStorageStoredContentstore (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 QgsExternalStorageFetchedContentdoFetch (const QString &url, const QString &authCfg=QString()) const =0
 Fetches file from url using authCfg for this project external storage.
 
virtual QgsExternalStorageStoredContentdoStore (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.
 

Detailed Description

Abstract interface for external storage - to be implemented by various backends and registered in QgsExternalStorageRegistry.

Since
QGIS 3.22

Definition at line 36 of file qgsexternalstorage.h.

Constructor & Destructor Documentation

◆ ~QgsExternalStorage()

virtual QgsExternalStorage::~QgsExternalStorage ( )
virtualdefault

Member Function Documentation

◆ displayName()

virtual QString QgsExternalStorage::displayName ( ) const
pure virtual

Returns the translated external storage name, which should be used for any user-visible display of the external storage name.

◆ doFetch()

virtual QgsExternalStorageFetchedContent * QgsExternalStorage::doFetch ( const QString &  url,
const QString &  authCfg = QString() 
) const
protectedpure virtual

Fetches file from url using authCfg for this project external storage.

See also
QgsExternalStorage::fetch()

◆ doStore()

virtual QgsExternalStorageStoredContent * QgsExternalStorage::doStore ( const QString &  filePath,
const QString &  url,
const QString &  authCfg = QString() 
) const
protectedpure virtual

Stores file filePath to the url using authCfg authentication for this project external storage.

See also
QgsExternalStorage::store()

◆ fetch()

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 49 of file qgsexternalstorage.cpp.

◆ store()

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 40 of file qgsexternalstorage.cpp.

◆ type()

virtual QString QgsExternalStorage::type ( ) const
pure virtual

Unique identifier of the external storage type.


The documentation for this class was generated from the following files: