diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2018-10-05 22:51:54 +0800 |
---|---|---|
committer | Matt Ranostay <matt.ranostay@konsulko.com> | 2018-10-08 08:59:47 +0800 |
commit | 4508f46e8b3b42f2d062566ecbc741daf5cf1338 (patch) | |
tree | 0c9b862d5e91c753aea36c61e7246e9bf62e9602 /bluetooth/bluetoothmessage.cpp | |
parent | daadd6ca0e572fe55d307ff034d8cd3342c1c7c1 (diff) |
libqtappfw: bluetooth: add binding version 2.0 verbs
Add initial set of Bluetooth binding version 2.0 (rewrite) verbs for
the BluetoothMessage
Bug-AGL: SPEC-1736
Change-Id: Ie0ee68b0ba652e9163746b397c14dd925c85a9fb
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'bluetooth/bluetoothmessage.cpp')
-rw-r--r-- | bluetooth/bluetoothmessage.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bluetooth/bluetoothmessage.cpp b/bluetooth/bluetoothmessage.cpp index d31705c..9eef02f 100644 --- a/bluetooth/bluetoothmessage.cpp +++ b/bluetooth/bluetoothmessage.cpp @@ -23,11 +23,15 @@ bool BluetoothMessage::createRequest(QString verb, QJsonObject parameter) { - if (m_api_version != "1.0") - return false; + if (m_api_version == "1.0") { + if (!verbs_v1.contains(verb)) + return false; + } - if (!verbs_v1.contains(verb)) - return false; + if (m_api_version == "2.0") { + if (!verbs_v2.contains(verb)) + return false; + } return Message::createRequest("Bluetooth-Manager", verb, parameter); } |