QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgsauthconfigurationstorageregistry.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsauthconfigurationstorageregistry.h - QgsAuthConfigurationStorageRegistry
3
4 ---------------------
5 begin : 20.6.2024
6 copyright : (C) 2024 by Alessandro Pasotti
7 email : elpaso at itopen dot it
8 ***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16#ifndef QGSAUTHCONFIGURATIONSTORAGEREGISTRY_H
17#define QGSAUTHCONFIGURATIONSTORAGEREGISTRY_H
18
19#include <memory>
20
21#include "qgis.h"
22#include "qgis_core.h"
23#include "qgis_sip.h"
24
25#include <QMap>
26#include <QMutex>
27#include <QObject>
28
30
31
42class CORE_EXPORT QgsAuthConfigurationStorageRegistry: public QObject
43{
44 Q_OBJECT
45 public:
46
51
53
63
70 bool removeStorage( const QString &id );
71
75 QList<QgsAuthConfigurationStorage *> storages() const;
76
80 QList<QgsAuthConfigurationStorage *> readyStorages() const;
81
87 QList<QgsAuthConfigurationStorage *> readyStoragesWithCapability( Qgis::AuthConfigurationStorageCapability capability ) const;
88
94
99 QgsAuthConfigurationStorage *storage( const QString &id ) const;
100
106 void setStorageOrder( const QStringList &orderIds );
107
108
109 signals:
110
115 void storageAdded( const QString &id );
116
121 void storageChanged( const QString &id );
122
127 void storageRemoved( const QString &id );
128
129 private:
130
131 mutable QMutex mMutex;
132
133 std::vector<std::unique_ptr<QgsAuthConfigurationStorage>> mStorages;
134};
135
136#endif // QGSAUTHCONFIGURATIONSTORAGEREGISTRY_H
AuthConfigurationStorageCapability
Authentication configuration storage capabilities.
Definition qgis.h:102
void storageChanged(const QString &id)
Emitted after a storage was changed.
void setStorageOrder(const QStringList &orderIds)
Order the storages by the specified orderIds.
QgsAuthConfigurationStorage * firstReadyStorageWithCapability(Qgis::AuthConfigurationStorageCapability capability) const
Returns the first ready (and enabled) authentication configuration storage which has the required cap...
bool removeStorage(const QString &id)
Remove the authentication configuration storage identified by id from the registry.
QgsAuthConfigurationStorage * storage(const QString &id) const
Returns the storage with the specified id or nullptr if not found in the registry.
QList< QgsAuthConfigurationStorage * > storages() const
Returns the list of all registered authentication configuration storages.
QgsAuthConfigurationStorageRegistry()
Creates a new QgsAuthConfigurationStorageRegistry instance.
void storageRemoved(const QString &id)
Emitted after a storage was removed.
QList< QgsAuthConfigurationStorage * > readyStoragesWithCapability(Qgis::AuthConfigurationStorageCapability capability) const
Returns the list of all ready (and enabled) authentication configuration storage with the required ca...
void storageAdded(const QString &id)
Emitted after a storage was added.
QList< QgsAuthConfigurationStorage * > readyStorages() const
Returns the list of all ready (and enabled) authentication configuration storage.
bool addStorage(QgsAuthConfigurationStorage *storage)
Add an authentication configuration storage to the registry.
Abstract class that defines the interface for all authentication configuration storage implementation...
#define SIP_TRANSFER
Definition qgis_sip.h:36