summaryrefslogtreecommitdiffstats
path: root/network
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2019-02-27 00:49:15 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2019-03-19 15:47:00 -0700
commitbd5861deb99d6359ad119555b540a2bc054c7951 (patch)
tree6168dc27f80bd69af47630791748763f33964259 /network
parentdab35b40374d4f232b15b67d447639d96e057473 (diff)
libqtappfw: network: add remove() method for removal of services
Bug-AGL: SPEC-2184 Change-Id: Ic9b4513dd7f63f02a6012170225a4993555006c1 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'network')
-rw-r--r--network/network.cpp12
-rw-r--r--network/network.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/network/network.cpp b/network/network.cpp
index db4b2b4..53a4898 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 499f612..a3fd3fb 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);