summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Keller <Rainer.Keller@qt.io>2019-04-18 10:38:48 +0200
committerRainer Keller <Rainer.Keller@qt.io>2019-04-25 14:07:21 +0000
commitb786ad0bec178a230aad6dcf18f7a92cf6f59dbd (patch)
tree6cb933c1203ec6c68b15243c071db6323e9dfdb7
parente460c1b7c39c2b4e3ed7def4e8aacb66a0a75c71 (diff)
qml: Register user token policy with QML
Change-Id: I9ff7ef863d919849a19705a54d74de38b103741b Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
-rw-r--r--src/imports/opcua/opcua_plugin.cpp1
-rw-r--r--src/opcua/client/qopcuausertokenpolicy.cpp18
2 files changed, 19 insertions, 0 deletions
diff --git a/src/imports/opcua/opcua_plugin.cpp b/src/imports/opcua/opcua_plugin.cpp
index d4aaa63..3fc8ac6 100644
--- a/src/imports/opcua/opcua_plugin.cpp
+++ b/src/imports/opcua/opcua_plugin.cpp
@@ -144,6 +144,7 @@ void OpcUaPlugin::registerTypes(const char *uri)
qRegisterMetaType<OpcUaWriteResult>();
qmlRegisterType<OpcUaEndpointDiscovery>(uri, major, minor, "EndpointDiscovery");
qmlRegisterType<OpcUaServerDiscovery>(uri, major, minor, "ServerDiscovery");
+ qmlRegisterUncreatableType<QOpcUaUserTokenPolicy>(uri, major, minor, "UserTokenPolicy", "This type can not be created.");
// insert new versions here
diff --git a/src/opcua/client/qopcuausertokenpolicy.cpp b/src/opcua/client/qopcuausertokenpolicy.cpp
index df51756..4f36c90 100644
--- a/src/opcua/client/qopcuausertokenpolicy.cpp
+++ b/src/opcua/client/qopcuausertokenpolicy.cpp
@@ -47,6 +47,15 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \qmltype UserTokenPolicy
+ \inqmlmodule QtOpcUa
+ \brief The OPC UA ApplicationDescription.
+ \since QtOpcUa 5.13
+
+ The user token policy contains information about an user token accepted by the server.
+*/
+
+/*!
\enum QOpcUaUserTokenPolicy::TokenType
\value Anonymous No token required.
@@ -55,6 +64,15 @@ QT_BEGIN_NAMESPACE
\value IssuedToken Any Web Services Security (WS-Security) defined token.
*/
+/*!
+ \qmlproperty enumeration UserTokenPolicy::TokenType
+
+ \value Anonymous No token required.
+ \value Username Username and password are required.
+ \value Certificate A client certificate is required.
+ \value IssuedToken Any Web Services Security (WS-Security) defined token.
+*/
+
class QOpcUaUserTokenPolicyData : public QSharedData
{
public: