Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 78286fbd authored by Martin Kacej's avatar Martin Kacej

getConnectionSettings function added to handler

parent 8d82198e
......@@ -29,6 +29,7 @@
#include <NetworkManagerQt/WirelessDevice>
#include <NetworkManagerQt/Settings>
#include <NetworkManagerQt/Setting>
#include <NetworkManagerQt/Connection>
#include <NetworkManagerQt/Utils>
#include <NetworkManagerQt/ConnectionSettings>
#include <NetworkManagerQt/GsmSetting>
......@@ -509,6 +510,17 @@ void Handler::replyFinished(QDBusPendingCallWatcher * watcher)
watcher->deleteLater();
}
QVariantMap Handler::getConnectionSettings(const QString &connection, const QString &type)
{
if (type.length() == 0)
return QVariantMap();
NetworkManager::Connection::Ptr con = NetworkManager::findConnection(connection);
if (!con)
return QVariantMap();
QVariantMap map = con->settings()->toMap().value(type);
qCWarning(PLASMA_NM) << "Map:" <<con->settings()->toMap().value(type);
return map;
}
#if WITH_MODEMMANAGER_SUPPORT
void Handler::unlockRequiredChanged(MMModemLock modemLock)
......@@ -518,3 +530,4 @@ void Handler::unlockRequiredChanged(MMModemLock modemLock)
}
}
#endif
......@@ -24,6 +24,8 @@
#include <QDBusInterface>
#include <NetworkManagerQt/Connection>
#include <NetworkManagerQt/Settings>
#include <NetworkManagerQt/ConnectionSettings>
#if WITH_MODEMMANAGER_SUPPORT
#include <ModemManagerQt/GenericTypes>
#endif
......@@ -86,6 +88,9 @@ public Q_SLOTS:
void enableAirplaneMode(bool enable);
void enableNetworking(bool enable);
void enableWireless(bool enable);
QVariantMap getConnectionSettings(const QString &connection, const QString &type);
void enableWwan(bool enable);
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment