QGIS API Documentation 3.41.0-Master (af5edcb665c)
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 "qgis_core.h"
20#include "qgis_sip.h"
21#include "qgis.h"
22
23#include <QObject>
24#include <QMap>
25#include <QMutex>
26#include <memory>
27
29
30
41class CORE_EXPORT QgsAuthConfigurationStorageRegistry: public QObject
42{
43 Q_OBJECT
44 public:
45
50
52
61 bool addStorage( QgsAuthConfigurationStorage *storage SIP_TRANSFER );
62
69 bool removeStorage( const QString &id );
70
74 QList<QgsAuthConfigurationStorage *> storages() const;
75
79 QList<QgsAuthConfigurationStorage *> readyStorages() const;
80
86 QList<QgsAuthConfigurationStorage *> readyStoragesWithCapability( Qgis::AuthConfigurationStorageCapability capability ) const;
87
92 QgsAuthConfigurationStorage *firstReadyStorageWithCapability( Qgis::AuthConfigurationStorageCapability capability ) const;
93
98 QgsAuthConfigurationStorage *storage( const QString &id ) const;
99
105 void setStorageOrder( const QStringList &orderIds );
106
107
108 signals:
109
114 void storageAdded( const QString &id );
115
120 void storageChanged( const QString &id );
121
126 void storageRemoved( const QString &id );
127
128 private:
129
130 mutable QMutex mMutex;
131
132 std::vector<std::unique_ptr<QgsAuthConfigurationStorage>> mStorages;
133};
134
135#endif // QGSAUTHCONFIGURATIONSTORAGEREGISTRY_H
AuthConfigurationStorageCapability
Authentication configuration storage capabilities.
Definition qgis.h:100
Registry for authentication configuration storages.
void storageChanged(const QString &id)
Emitted after a storage was changed.
void storageRemoved(const QString &id)
Emitted after a storage was removed.
void storageAdded(const QString &id)
Emitted after a storage was added.
Abstract class that defines the interface for all authentication configuration storage implementation...
#define SIP_TRANSFER
Definition qgis_sip.h:36