diff options
Diffstat (limited to 'binding/bluetooth-api.c')
-rw-r--r-- | binding/bluetooth-api.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/binding/bluetooth-api.c b/binding/bluetooth-api.c index 633bbd6..762a8c0 100644 --- a/binding/bluetooth-api.c +++ b/binding/bluetooth-api.c @@ -968,6 +968,15 @@ static void bluetooth_remove_device(afb_req_t request) json_object_put(jval); } +static void bluetooth_version(afb_req_t request) +{ + json_object *jresp = json_object_new_object(); + + json_object_object_add(jresp, "version", json_object_new_string("2.0")); + + afb_req_success(request, jresp, "Bluetooth - Binding version"); +} + static const struct afb_verb_v3 bluetooth_verbs[] = { { .verb = "subscribe", @@ -1019,6 +1028,11 @@ static const struct afb_verb_v3 bluetooth_verbs[] = { .session = AFB_SESSION_NONE, .callback = bluetooth_remove_device, .info = "Removed paired device", + }, { + .verb = "version", + .session = AFB_SESSION_NONE, + .callback = bluetooth_version, + .info = "Binding API version", }, { } /* marker for end of the array */ }; |