1 | // Copyright (C) 2015 basysKom GmbH, opensource@basyskom.com |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QOPCUAPROVIDER_H |
5 | #define QOPCUAPROVIDER_H |
6 | |
7 | #include <QtOpcUa/qopcuaglobal.h> |
8 | |
9 | #include <QtCore/qhash.h> |
10 | #include <QtCore/qobject.h> |
11 | #include <QtCore/qvariant.h> |
12 | #include <QtCore/qmap.h> // for QVariantMap |
13 | |
14 | QT_BEGIN_NAMESPACE |
15 | |
16 | class QOpcUaPlugin; |
17 | class QOpcUaClient; |
18 | |
19 | class Q_OPCUA_EXPORT QOpcUaProvider : public QObject |
20 | { |
21 | Q_OBJECT |
22 | |
23 | public: |
24 | static QStringList availableBackends(); |
25 | |
26 | explicit QOpcUaProvider(QObject *parent = nullptr); |
27 | ~QOpcUaProvider() override; |
28 | |
29 | Q_INVOKABLE QOpcUaClient *createClient(const QString &backend, const QVariantMap &backendProperties = QVariantMap()); |
30 | |
31 | private: |
32 | QMultiHash<QString, QOpcUaPlugin *> m_plugins; |
33 | }; |
34 | |
35 | QT_END_NAMESPACE |
36 | |
37 | #endif // QOPCUAPROVIDER_H |
38 | |