Hello community,

here is the log from the commit of package libKF5NetworkManagerQt for 
openSUSE:Factory checked in at 2019-05-21 10:33:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libKF5NetworkManagerQt (Old)
 and      /work/SRC/openSUSE:Factory/.libKF5NetworkManagerQt.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libKF5NetworkManagerQt"

Tue May 21 10:33:28 2019 rev:65 rq:703388 version:5.58.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/libKF5NetworkManagerQt/libKF5NetworkManagerQt.changes
    2019-04-19 21:25:01.995923827 +0200
+++ 
/work/SRC/openSUSE:Factory/.libKF5NetworkManagerQt.new.5148/libKF5NetworkManagerQt.changes
  2019-05-21 10:33:30.259355181 +0200
@@ -1,0 +2,14 @@
+Wed May 15 18:16:18 UTC 2019 - lbeltr...@kde.org
+
+- Update to 5.58.0
+  * New feature release
+  * For more details please see:
+  * https://www.kde.org/announcements/kde-frameworks-5.58.0.php
+- Changes since 5.57.0:
+  * Add WireGuard device support to manager
+  * Add WireGuard device
+  * WireGuard: Do not require 'private-key' to be non-empty for 
'private-key-flags'
+  * WireGuard: workaround wrong secret flag type
+  * WireGuard: private-key and preshared-keys can be requested together
+
+-------------------------------------------------------------------

Old:
----
  networkmanager-qt-5.57.0.tar.xz

New:
----
  networkmanager-qt-5.58.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libKF5NetworkManagerQt.spec ++++++
--- /var/tmp/diff_new_pack.2k824U/_old  2019-05-21 10:33:31.059354662 +0200
+++ /var/tmp/diff_new_pack.2k824U/_new  2019-05-21 10:33:31.059354662 +0200
@@ -17,13 +17,13 @@
 
 
 %define soversion 6
-%define _tar_path 5.57
+%define _tar_path 5.58
 # Full KF5 version (e.g. 5.33.0)
 %{!?_kf5_version: %global _kf5_version %{version}}
 # Last major and minor KF5 version (e.g. 5.33)
 %{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | 
awk -F. '{print $1"."$2}')}
 Name:           libKF5NetworkManagerQt
-Version:        5.57.0
+Version:        5.58.0
 Release:        0
 Summary:        A Qt wrapper for NetworkManager DBus API
 License:        LGPL-2.1-only OR LGPL-3.0-only

++++++ networkmanager-qt-5.57.0.tar.xz -> networkmanager-qt-5.58.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/networkmanager-qt-5.57.0/CMakeLists.txt 
new/networkmanager-qt-5.58.0/CMakeLists.txt
--- old/networkmanager-qt-5.57.0/CMakeLists.txt 2019-04-07 09:21:21.000000000 
+0200
+++ new/networkmanager-qt-5.58.0/CMakeLists.txt 2019-05-08 07:50:39.000000000 
+0200
@@ -1,10 +1,10 @@
 cmake_minimum_required(VERSION 3.5)
 
-set(KF5_VERSION "5.57.0") # handled by release scripts
+set(KF5_VERSION "5.58.0") # handled by release scripts
 project(NetworkManagerQt VERSION ${KF5_VERSION})
 
 include(FeatureSummary)
-find_package(ECM 5.57.0  NO_MODULE)
+find_package(ECM 5.58.0  NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL 
"https://projects.kde.org/projects/kdesupport/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/networkmanager-qt-5.57.0/autotests/settings/wireguardsettingtest.cpp 
new/networkmanager-qt-5.58.0/autotests/settings/wireguardsettingtest.cpp
--- old/networkmanager-qt-5.57.0/autotests/settings/wireguardsettingtest.cpp    
2019-04-07 09:21:21.000000000 +0200
+++ new/networkmanager-qt-5.58.0/autotests/settings/wireguardsettingtest.cpp    
2019-05-08 07:50:39.000000000 +0200
@@ -34,6 +34,10 @@
 #define NM_SETTING_WIREGUARD_PEERS             "peers"
 #define NM_SETTING_WIREGUARD_MTU               "mtu"
 #define NM_SETTING_WIREGUARD_PEER_ROUTES       "peer-routes"
+
+#define NM_WIREGUARD_PEER_ATTR_PRESHARED_KEY        "preshared-key"
+#define NM_WIREGUARD_PEER_ATTR_PRESHARED_KEY_FLAGS  "preshared-key-flags"
+#define NM_WIREGUARD_PEER_ATTR_PUBLIC_KEY           "public-key"
 #endif
 
 void WireGuardSettingTest::testSetting_data()
@@ -48,11 +52,16 @@
 
     NMVariantMapList peers;
     QVariantMap map;
-    map.insert("foo", "bar");
+    map.insert(QLatin1String(NM_WIREGUARD_PEER_ATTR_PRESHARED_KEY), 
"preshared-key");
+    map.insert(QLatin1String(NM_WIREGUARD_PEER_ATTR_PRESHARED_KEY_FLAGS), 
(uint) 2);
+    map.insert(QLatin1String(NM_WIREGUARD_PEER_ATTR_PUBLIC_KEY), "public-key");
+
     peers << map;
 
     QVariantMap map1;
-    map1.insert("foobar", "barfoo");
+    map1.insert(QLatin1String(NM_WIREGUARD_PEER_ATTR_PRESHARED_KEY), 
"preshared-key1");
+    map1.insert(QLatin1String(NM_WIREGUARD_PEER_ATTR_PRESHARED_KEY_FLAGS), 
(uint) 3);
+    map1.insert(QLatin1String(NM_WIREGUARD_PEER_ATTR_PUBLIC_KEY), 
"public-key1");
     peers << map1;
 
     QTest::newRow("setting1")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/networkmanager-qt-5.57.0/src/CMakeLists.txt 
new/networkmanager-qt-5.58.0/src/CMakeLists.txt
--- old/networkmanager-qt-5.57.0/src/CMakeLists.txt     2019-04-07 
09:21:21.000000000 +0200
+++ new/networkmanager-qt-5.58.0/src/CMakeLists.txt     2019-05-08 
07:50:39.000000000 +0200
@@ -48,6 +48,7 @@
     vethdevice.cpp
     wimaxdevice.cpp
     wimaxnsp.cpp
+    wireguarddevice.cpp
 )
 
 set(NetworkManagerQt_SETTINGS_SRCS
@@ -134,6 +135,7 @@
     dbus/wimaxnspinterface.cpp
     dbus/wireddeviceinterface.cpp
     dbus/wirelessdeviceinterface.cpp
+    dbus/wireguarddeviceinterface.cpp
 )
 
 add_library(KF5NetworkManagerQt SHARED ${NetworkManagerQt_PART_SRCS} 
${NetworkManagerQt_SETTINGS_SRCS} ${DBUS_INTERFACE_SRCS})
@@ -205,6 +207,7 @@
   WiredDevice
   WirelessDevice
   WirelessNetwork
+  WireGuardDevice
 
   REQUIRED_HEADERS NetworkManagerQt_HEADERS
   PREFIX NetworkManagerQt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/networkmanager-qt-5.57.0/src/dbus/wireguarddeviceinterface.cpp 
new/networkmanager-qt-5.58.0/src/dbus/wireguarddeviceinterface.cpp
--- old/networkmanager-qt-5.57.0/src/dbus/wireguarddeviceinterface.cpp  
1970-01-01 01:00:00.000000000 +0100
+++ new/networkmanager-qt-5.58.0/src/dbus/wireguarddeviceinterface.cpp  
2019-05-08 07:50:39.000000000 +0200
@@ -0,0 +1,27 @@
+/*
+ * This file was generated by qdbusxml2cpp version 0.8
+ * Command line was:
+ *
+ * qdbusxml2cpp is Copyright (C) 2016 The Qt Company Ltd.
+ *
+ * This is an auto-generated file.
+ * This file may have been hand-edited. Look for HAND-EDIT comments
+ * before re-generating it.
+ */
+
+#include "wireguarddeviceinterface.h"
+
+/*
+ * Implementation of interface class 
OrgFreedesktopNetworkManagerDeviceWireGuardInterface
+ */
+
+OrgFreedesktopNetworkManagerDeviceWireGuardInterface::OrgFreedesktopNetworkManagerDeviceWireGuardInterface(const
 QString &service, const QString &path, const QDBusConnection &connection, 
QObject *parent)
+    : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, 
parent)
+{
+}
+
+OrgFreedesktopNetworkManagerDeviceWireGuardInterface::~OrgFreedesktopNetworkManagerDeviceWireGuardInterface()
+{
+}
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/networkmanager-qt-5.57.0/src/dbus/wireguarddeviceinterface.h 
new/networkmanager-qt-5.58.0/src/dbus/wireguarddeviceinterface.h
--- old/networkmanager-qt-5.57.0/src/dbus/wireguarddeviceinterface.h    
1970-01-01 01:00:00.000000000 +0100
+++ new/networkmanager-qt-5.58.0/src/dbus/wireguarddeviceinterface.h    
2019-05-08 07:50:39.000000000 +0200
@@ -0,0 +1,71 @@
+/*
+ * This file was generated by qdbusxml2cpp version 0.8
+ * Command line was:
+ *
+ * qdbusxml2cpp is Copyright (C) 2016 The Qt Company Ltd.
+ *
+ * This is an auto-generated file.
+ * Do not edit! All changes made to it will be lost.
+ */
+
+#ifndef WIREGUARDDEVICEINTERFACE_H
+#define WIREGUARDDEVICEINTERFACE_H
+
+#include <QObject>
+#include <QByteArray>
+#include <QList>
+#include <QMap>
+#include <QString>
+#include <QStringList>
+#include <QVariant>
+#include <QtDBus>
+#include "generictypes.h"
+
+/*
+ * Proxy class for interface org.freedesktop.NetworkManager.Device.WireGuard
+ */
+class OrgFreedesktopNetworkManagerDeviceWireGuardInterface: public 
QDBusAbstractInterface
+{
+    Q_OBJECT
+public:
+    static inline const char *staticInterfaceName()
+#ifdef NMQT_STATIC
+    {
+        return "org.kde.fakenetwork.Device.WireGuard";
+    }
+#else
+    {
+        return "org.freedesktop.NetworkManager.Device.WireGuard";
+    }
+#endif
+
+public:
+    OrgFreedesktopNetworkManagerDeviceWireGuardInterface(const QString 
&service, const QString &path, const QDBusConnection &connection, QObject 
*parent = nullptr);
+
+    ~OrgFreedesktopNetworkManagerDeviceWireGuardInterface();
+
+    Q_PROPERTY(QByteArray PublicKey READ publicKey)
+    inline QByteArray publicKey() const
+    {
+        return qvariant_cast< QByteArray >(property("PublicKey"));
+    }
+
+    Q_PROPERTY(uint ListenPort READ listenPort)
+    inline uint listenPort() const
+    {
+        return qvariant_cast< uint >(property("ListenPort"));
+    }
+
+    Q_PROPERTY(uint FwMark READ fwMark)
+    inline uint fwMark() const
+    {
+        return qvariant_cast< uint >(property("FwMark"));
+    }
+
+public Q_SLOTS: // METHODS
+Q_SIGNALS: // SIGNALS
+
+};
+
+#endif
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/networkmanager-qt-5.57.0/src/device.cpp 
new/networkmanager-qt-5.58.0/src/device.cpp
--- old/networkmanager-qt-5.57.0/src/device.cpp 2019-04-07 09:21:21.000000000 
+0200
+++ new/networkmanager-qt-5.58.0/src/device.cpp 2019-05-08 07:50:39.000000000 
+0200
@@ -186,6 +186,30 @@
     case 22:
         // NM_DEVICE_TYPE_DUMMY
         return NetworkManager::Device::Dummy;
+    case 23:
+        // NM_DEVICE_TYPE_PPP
+        return NetworkManager::Device::Ppp;
+    case 24:
+        // NM_DEVICE_TYPE_OVS_INTERFACE
+        return NetworkManager::Device::OvsInterface;
+    case 25:
+        // NM_DEVICE_TYPE_OVS_PORT
+        return NetworkManager::Device::OvsPort;
+    case 26:
+        // NM_DEVICE_TYPE_OVS_BRIDGE
+        return NetworkManager::Device::OvsBridge;
+    case 27:
+        // NM_DEVICE_TYPE_WPAN
+        return NetworkManager::Device::Wpan;
+    case 28:
+        // NM_DEVICE_TYPE_6LOWPAN
+        return NetworkManager::Device::Lowpan;
+    case 29:
+        // NM_DEVICE_TYPE_NM_DEVICE_TYPE_WIREGUARD
+        return NetworkManager::Device::WireGuard;
+    case 30:
+        // NM_DEVICE_TYPE_WIFI_P2P
+        return NetworkManager::Device::WifiP2P;
     }
 
     return NetworkManager::Device::UnknownType;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/networkmanager-qt-5.57.0/src/device.h 
new/networkmanager-qt-5.58.0/src/device.h
--- old/networkmanager-qt-5.57.0/src/device.h   2019-04-07 09:21:21.000000000 
+0200
+++ new/networkmanager-qt-5.58.0/src/device.h   2019-05-08 07:50:39.000000000 
+0200
@@ -169,7 +169,15 @@
         IpTunnel,                               /**< IP Tunneling Device 
@since 1.2.0 */
         VxLan,                                  /**< Vxlan Device @since 1.2.0 
*/
         MacSec,                                 /**< MacSec Device @since 
1.6.0 */
-        Dummy                                   /**< Dummy Device @since 1.8.0 
*/
+        Dummy,                                  /**< Dummy Device @since 1.8.0 
*/
+        Ppp,                                    /**< Ppp Device @since 1.10 */
+        OvsInterface,                           /**< OvsInterface Device 
@since 1.10 */
+        OvsPort,                                /**< OvsPort Device @since 
1.10 */
+        OvsBridge,                              /**< OvsBridge Device @since 
1.10 */
+        Wpan,                                   /**< Wpan Device @since 1.14 */
+        Lowpan,                                 /**< Lowpan Device @since 1.14 
*/
+        WireGuard,                              /**< WireGuard Device @since 
1.14 */
+        WifiP2P                                 /**< WifiP2P Device @since 
1.16 */
     };
     Q_ENUM(Type)
     Q_DECLARE_FLAGS(Types, Type)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/networkmanager-qt-5.57.0/src/manager.cpp 
new/networkmanager-qt-5.58.0/src/manager.cpp
--- old/networkmanager-qt-5.57.0/src/manager.cpp        2019-04-07 
09:21:21.000000000 +0200
+++ new/networkmanager-qt-5.58.0/src/manager.cpp        2019-05-08 
07:50:39.000000000 +0200
@@ -51,6 +51,7 @@
 #include "macvlandevice.h"
 #include "tundevice.h"
 #include "vethdevice.h"
+#include "wireguarddevice.h"
 
 #include "nmdebug.h"
 
@@ -165,7 +166,8 @@
                NetworkManager::Device::MacVlan |
                NetworkManager::Device::Tun |
                NetworkManager::Device::Veth |
-               NetworkManager::Device::IpTunnel
+               NetworkManager::Device::IpTunnel |
+               NetworkManager::Device::WireGuard
            );
 
     // Get all Manager's properties async
@@ -364,6 +366,9 @@
     case Device::IpTunnel:
         createdInterface = Device::Ptr(new 
NetworkManager::IpTunnelDevice(uni), &QObject::deleteLater);
         break;
+    case Device::WireGuard:
+        createdInterface = Device::Ptr(new 
NetworkManager::WireGuardDevice(uni), &QObject::deleteLater);
+        break;
     default:
         createdInterface = device;
         if (uni != QLatin1String("any")) { // VPN connections use "any" as uni 
for the network interface.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/networkmanager-qt-5.57.0/src/settings/wireguardsetting.cpp 
new/networkmanager-qt-5.58.0/src/settings/wireguardsetting.cpp
--- old/networkmanager-qt-5.57.0/src/settings/wireguardsetting.cpp      
2019-04-07 09:21:21.000000000 +0200
+++ new/networkmanager-qt-5.58.0/src/settings/wireguardsetting.cpp      
2019-05-08 07:50:39.000000000 +0200
@@ -308,12 +308,10 @@
             continue;
         }
 
-        if (secrets.isEmpty()) {
-            const QString str = 
QStringLiteral("%1.%2.%3").arg(QLatin1String(NM_SETTING_WIREGUARD_PEERS))
-                                                          
.arg(map.value(QLatin1String(NM_WIREGUARD_PEER_ATTR_PUBLIC_KEY)).toString())
-                                                          
.arg(QLatin1String(NM_WIREGUARD_PEER_ATTR_PRESHARED_KEY));
-            secrets << str;
-        }
+        const QString str = 
QStringLiteral("%1.%2.%3").arg(QLatin1String(NM_SETTING_WIREGUARD_PEERS))
+                                                      
.arg(map.value(QLatin1String(NM_WIREGUARD_PEER_ATTR_PUBLIC_KEY)).toString())
+                                                      
.arg(QLatin1String(NM_WIREGUARD_PEER_ATTR_PRESHARED_KEY));
+        secrets << str;
     }
 
     return secrets;
@@ -360,13 +358,23 @@
     setting.insert(QLatin1String(NM_SETTING_WIREGUARD_PEER_ROUTES), 
peerRoutes());
 
     if (!peers().isEmpty()) {
-        setting.insert(QLatin1String(NM_SETTING_WIREGUARD_PEERS), 
QVariant::fromValue(peers()));
+        // FIXME we seem to have SecretFlags as an int, but NM expects an 
uint, while this is not
+        // problem for rest of *-flags properties, it's problem for 
"preshared-key" which NM handless
+        // as GVariant and asks for "u" when getting it's value
+        NMVariantMapList fixedPeers = peers();
+        for (QVariantMap &map : fixedPeers) {
+            if 
(map.contains(QLatin1String(NM_WIREGUARD_PEER_ATTR_PRESHARED_KEY_FLAGS))) {
+                
map.insert(QLatin1String(NM_WIREGUARD_PEER_ATTR_PRESHARED_KEY_FLAGS), 
map.value(QLatin1String(NM_WIREGUARD_PEER_ATTR_PRESHARED_KEY_FLAGS)).toUInt());
+            }
+        }
+
+        setting.insert(QLatin1String(NM_SETTING_WIREGUARD_PEERS), 
QVariant::fromValue(fixedPeers));
     }
 
     if (!privateKey().isEmpty()) {
         setting.insert(QLatin1String(NM_SETTING_WIREGUARD_PRIVATE_KEY), 
privateKey());
-        setting.insert(QLatin1String(NM_SETTING_WIREGUARD_PRIVATE_KEY_FLAGS), 
(int)privateKeyFlags());
     }
+    setting.insert(QLatin1String(NM_SETTING_WIREGUARD_PRIVATE_KEY_FLAGS), 
(int)privateKeyFlags());
 
     return setting;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/networkmanager-qt-5.57.0/src/wireguarddevice.cpp 
new/networkmanager-qt-5.58.0/src/wireguarddevice.cpp
--- old/networkmanager-qt-5.57.0/src/wireguarddevice.cpp        1970-01-01 
01:00:00.000000000 +0100
+++ new/networkmanager-qt-5.58.0/src/wireguarddevice.cpp        2019-05-08 
07:50:39.000000000 +0200
@@ -0,0 +1,101 @@
+/*
+    Copyright 2019 Jan Grulich <jgrul...@redhat.com>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) version 3, or any
+    later version accepted by the membership of KDE e.V. (or its
+    successor approved by the membership of KDE e.V.), which shall
+    act as a proxy defined in Section 6 of version 3 of the license.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library.  If not, see 
<http://www.gnu.org/licenses/>.
+*/
+
+#include "wireguarddevice.h"
+#include "wireguarddevice_p.h"
+#include "manager_p.h"
+
+NetworkManager::WireGuardDevicePrivate::WireGuardDevicePrivate(const QString 
&path, WireGuardDevice *q)
+    : DevicePrivate(path, q)
+#ifdef NMQT_STATIC
+    , iface(NetworkManagerPrivate::DBUS_SERVICE, path, 
QDBusConnection::sessionBus())
+#else
+    , iface(NetworkManagerPrivate::DBUS_SERVICE, path, 
QDBusConnection::systemBus())
+#endif
+    , listenPort(0)
+    , fwMark(0)
+{
+}
+
+NetworkManager::WireGuardDevicePrivate::~WireGuardDevicePrivate()
+{
+}
+
+NetworkManager::WireGuardDevice::WireGuardDevice(const QString &path, QObject 
*parent):
+    Device(*new WireGuardDevicePrivate(path, this), parent)
+{
+    Q_D(WireGuardDevice);
+
+    QVariantMap initialProperties = 
NetworkManagerPrivate::retrieveInitialProperties(d->iface.staticInterfaceName(),
 path);
+    if (!initialProperties.isEmpty()) {
+        d->propertiesChanged(initialProperties);
+    }
+
+    QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, 
d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+                                         QLatin1String("PropertiesChanged"), 
d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+}
+
+NetworkManager::WireGuardDevice::~WireGuardDevice()
+{
+}
+
+NetworkManager::Device::Type NetworkManager::WireGuardDevice::type() const
+{
+    return NetworkManager::Device::WireGuard;
+}
+
+QByteArray NetworkManager::WireGuardDevice::publicKey() const
+{
+    Q_D(const WireGuardDevice);
+
+    return d->publicKey;
+}
+
+uint NetworkManager::WireGuardDevice::listenPort() const
+{
+    Q_D(const WireGuardDevice);
+
+    return d->listenPort;
+}
+
+uint NetworkManager::WireGuardDevice::fwMark() const
+{
+    Q_D(const WireGuardDevice);
+
+    return d->fwMark;
+}
+
+void NetworkManager::WireGuardDevicePrivate::propertyChanged(const QString 
&property, const QVariant &value)
+{
+    Q_Q(WireGuardDevice);
+
+    if (property == QLatin1String("PublicKey")) {
+        publicKey = value.toByteArray();
+        Q_EMIT q->publicKeyChanged(publicKey);
+    } else if (property == QLatin1String("ListenPort")) {
+        listenPort = value.toUInt();
+        Q_EMIT q->listenPortChanged(listenPort);
+    } else if (property == QLatin1String("FwMark")) {
+        fwMark = value.toUInt();
+        Q_EMIT q->fwMarkChanged(fwMark);
+    } else {
+        DevicePrivate::propertyChanged(property, value);
+    }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/networkmanager-qt-5.57.0/src/wireguarddevice.h 
new/networkmanager-qt-5.58.0/src/wireguarddevice.h
--- old/networkmanager-qt-5.57.0/src/wireguarddevice.h  1970-01-01 
01:00:00.000000000 +0100
+++ new/networkmanager-qt-5.58.0/src/wireguarddevice.h  2019-05-08 
07:50:39.000000000 +0200
@@ -0,0 +1,84 @@
+/*
+    Copyright 2019 Jan Grulich <jgrul...@redhat.com>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) version 3, or any
+    later version accepted by the membership of KDE e.V. (or its
+    successor approved by the membership of KDE e.V.), which shall
+    act as a proxy defined in Section 6 of version 3 of the license.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library.  If not, see 
<http://www.gnu.org/licenses/>.
+*/
+
+#ifndef NETWORKMANAGERQT_WIREGUARD_DEVICE_H
+#define NETWORKMANAGERQT_WIREGUARD_DEVICE_H
+
+#include "device.h"
+#include <networkmanagerqt/networkmanagerqt_export.h>
+
+namespace NetworkManager
+{
+
+class WireGuardDevicePrivate;
+
+/**
+ * A WireGuard device interface
+ */
+class NETWORKMANAGERQT_EXPORT WireGuardDevice : public Device
+{
+    Q_OBJECT
+    Q_PROPERTY(QByteArray publicKey READ publicKey NOTIFY publicKeyChanged)
+    Q_PROPERTY(uint listenPort READ listenPort NOTIFY listenPortChanged)
+    Q_PROPERTY(uint fwMark READ fwMark NOTIFY fwMarkChanged)
+
+public:
+    typedef QSharedPointer<WireGuardDevice> Ptr;
+    typedef QList<Ptr> List;
+    explicit WireGuardDevice(const QString &path, QObject *parent = nullptr);
+    ~WireGuardDevice() override;
+
+    Type type() const override;
+
+    /**
+     * 32-byte public WireGuard key.
+     */
+    QByteArray publicKey() const;
+    /**
+     * Local UDP listening port.
+     */
+    uint listenPort() const;
+    /**
+     * Optional 32-bit mark used to set routing policy for outgoing encrypted 
packets. See: ip-rule(8)
+     */
+    uint fwMark() const;
+
+Q_SIGNALS:
+    /**
+     * Emitted when the public key of this device has changed
+     */
+    void publicKeyChanged(const QByteArray &publicKey);
+    /**
+     * Emitted when the listen port of this device has changed
+     */
+    void listenPortChanged(uint listenPort);
+    /**
+     * Emitted when the fwmark of this device have changed
+     */
+    void fwMarkChanged(uint fwMark);
+
+private:
+    Q_DECLARE_PRIVATE(WireGuardDevice)
+};
+
+}
+
+#endif
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/networkmanager-qt-5.57.0/src/wireguarddevice_p.h 
new/networkmanager-qt-5.58.0/src/wireguarddevice_p.h
--- old/networkmanager-qt-5.57.0/src/wireguarddevice_p.h        1970-01-01 
01:00:00.000000000 +0100
+++ new/networkmanager-qt-5.58.0/src/wireguarddevice_p.h        2019-05-08 
07:50:39.000000000 +0200
@@ -0,0 +1,54 @@
+/*
+    Copyright 2019 Jan Grulich <jgrul...@redhat.com>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) version 3, or any
+    later version accepted by the membership of KDE e.V. (or its
+    successor approved by the membership of KDE e.V.), which shall
+    act as a proxy defined in Section 6 of version 3 of the license.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library.  If not, see 
<http://www.gnu.org/licenses/>.
+*/
+
+#ifndef NETWORKMANAGERQT_WIREGUARD_DEVICE_P_H
+#define NETWORKMANAGERQT_WIREGUARD_DEVICE_P_H
+
+#include "wireguarddevice.h"
+#include "device_p.h"
+#include "manager.h"
+
+#include "wireguarddeviceinterface.h"
+
+namespace NetworkManager
+{
+class WireGuardDevicePrivate : public DevicePrivate
+{
+public:
+    WireGuardDevicePrivate(const QString &path, WireGuardDevice *q);
+    virtual ~WireGuardDevicePrivate();
+
+    OrgFreedesktopNetworkManagerDeviceWireGuardInterface iface;
+    QByteArray publicKey;
+    uint listenPort;
+    uint fwMark;
+
+    Q_DECLARE_PUBLIC(WireGuardDevice)
+protected:
+    /**
+     * When subclassing make sure to call the parent class method
+     * if the property was not useful to your new class
+     */
+    void propertyChanged(const QString &property, const QVariant &value) 
override;
+};
+}
+
+#endif
+


Reply via email to