summaryrefslogtreecommitdiffstats
path: root/bluetooth/bluetoothmessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bluetooth/bluetoothmessage.cpp')
-rw-r--r--bluetooth/bluetoothmessage.cpp12
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);
}