summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2019-02-28 00:51:51 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2019-02-28 02:21:21 -0800
commitdc5eea70949891012ddb7d37727955c30a2e74bb (patch)
treee9fd768c7ccad057d40e3a3747b8cb7421864416
parentb6e00b9d70eb3e8eea2ccea97f786410aa1ef064 (diff)
libqtappfw: network: add invalidPassphrase signal
Report invalid passphrases to clients via a signal Bug-AGL: SPEC-2183 Change-Id: I98d34942427bf971663bac23a30be35aa2ae8dea Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
-rw-r--r--network/network.cpp4
-rw-r--r--network/network.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/network/network.cpp b/network/network.cpp
index 0500547..496638f 100644
--- a/network/network.cpp
+++ b/network/network.cpp
@@ -304,6 +304,10 @@ void Network::processReply(ResponseMessage *rmsg)
addServices(rmsg->replyData().value("values").toArray());
} else if (rmsg->requestVerb() == "technologies") {
parseTechnologies(rmsg->replyData().value("values").toArray());
+ } else if (rmsg->requestVerb() == "connect_service") {
+ if (rmsg->replyStatus() == "failed" && rmsg->replyInfo().contains("invalid-key")) {
+ emit invalidPassphrase(rmsg->requestData()["parameter"].toMap()["service"].toString());
+ }
}
}
diff --git a/network/network.h b/network/network.h
index a3fd3fb..0c0418b 100644
--- a/network/network.h
+++ b/network/network.h
@@ -52,6 +52,7 @@ class Network : public QObject
signals:
void inputRequest(int id);
+ void invalidPassphrase(QString service);
void searchResults(QString name);
void statusChanged(bool connected);
void wifiConnectedChanged(bool connected);