diff options
author | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2019-03-20 19:14:22 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@automotivelinux.org> | 2019-03-20 19:14:22 +0000 |
commit | 47903065edab76a0278ab160a7cbbc112180f326 (patch) | |
tree | 65fb0635f594834c0435e2ff6c250955adb10b35 /network | |
parent | b5d07fac4d1f95b4f257404594306f24ce78425a (diff) | |
parent | bd5861deb99d6359ad119555b540a2bc054c7951 (diff) |
Merge "libqtappfw: network: add remove() method for removal of services" into guppy
Diffstat (limited to 'network')
-rw-r--r-- | network/network.cpp | 12 | ||||
-rw-r--r-- | network/network.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/network/network.cpp b/network/network.cpp index ebfa7a9..dc5fa5f 100644 --- a/network/network.cpp +++ b/network/network.cpp @@ -75,6 +75,18 @@ void Network::disconnect(QString service) delete nmsg; } +void Network::remove(QString service) +{ + NetworkMessage *nmsg = new NetworkMessage(); + QJsonObject parameter; + + parameter.insert("service", service); + + nmsg->createRequest("remove_service", parameter); + m_mloop->sendMessage(nmsg); + delete nmsg; +} + void Network::input(int id, QString passphrase) { NetworkMessage *nmsg = new NetworkMessage(); diff --git a/network/network.h b/network/network.h index 7d47ace..0c0418b 100644 --- a/network/network.h +++ b/network/network.h @@ -38,6 +38,7 @@ class Network : public QObject Q_INVOKABLE void connect(QString service); Q_INVOKABLE void disconnect(QString service); + Q_INVOKABLE void remove(QString service); Q_INVOKABLE void power(bool on); Q_INVOKABLE void input(int id, QString passphrase); |