QGIS API Documentation 3.39.0-Master (3aed037ce22)
Loading...
Searching...
No Matches
qgsauthmethodregistry.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsauthmethodregistry.h
3 ---------------------
4 begin : September 1, 2015
5 copyright : (C) 2015 by Boundless Spatial, Inc. USA
6 author : Larry Shaffer
7 email : lshaffer at boundlessgeo dot com
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
17#ifndef QGSAUTHMETHODREGISTRY_H
18#define QGSAUTHMETHODREGISTRY_H
19
20#define SIP_NO_FILE
21
22#include <QDir>
23#include <QLibrary>
24#include <QMap>
25#include <QString>
26#include <memory>
27
28#include "qgis_core.h"
29#include "qgis_sip.h"
30
31class QgsAuthMethod;
33
34
47class CORE_EXPORT QgsAuthMethodRegistry
48{
49
50 public:
52 static QgsAuthMethodRegistry *instance( const QString &pluginPath = QString() );
53
54 virtual ~QgsAuthMethodRegistry();
55
60 Q_DECL_DEPRECATED QString library( const QString &authMethodKey ) const SIP_DEPRECATED;
61
63 QString pluginList( bool asHtml = false ) const;
64
66 QDir libraryDirectory() const;
67
69 void setLibraryDirectory( const QDir &path );
70
76 QgsAuthMethod *createAuthMethod( const QString &authMethodKey );
77
78#if 0
79
84 // int authMethodCapabilities( const QString& authMethodKey ) const;
85#endif
86
92 QWidget *editWidget( const QString &authMethodKey, QWidget *parent = nullptr );
93
95 QStringList authMethodList() const;
96
98 const QgsAuthMethodMetadata *authMethodMetadata( const QString &authMethodKey ) const;
99
101 typedef std::map<QString, QgsAuthMethodMetadata *> AuthMethods;
102
103 private:
104
106 QgsAuthMethodRegistry( const QString &pluginPath );
107
108 void init();
109 void clean();
110
112 AuthMethods mAuthMethods;
113
115 QDir mLibraryDirectory;
116};
117
118#endif // QGSAUTHMETHODREGISTRY_H
Holds data auth method key, description, and associated shared library file information.
A registry / canonical manager of authentication methods.
QWidget * editWidget(const QString &authMethodKey, QWidget *parent=nullptr)
Returns the GUI edit widget associated with the auth method.
std::map< QString, QgsAuthMethodMetadata * > AuthMethods
Type for auth method metadata associative container.
Abstract base class for authentication method plugins.
#define SIP_DEPRECATED
Definition qgis_sip.h:106