LOGD("\n");
const char *value = afb_req_value (request, "value");
+ const char *uuid = afb_req_value (request, "uuid");
int ret = 0;
if (NULL == value)
return;
}
- ret = device_connect(value, NULL);
+ ret = device_connect(value, uuid);
if (0 == ret)
{
jstring = json_object_new_string(value);
json_object_object_add(jresp, "Address", jstring);
+ if (uuid) {
+ jstring = json_object_new_string(uuid);
+ json_object_object_add(jresp, "UUID", jstring);
+ }
+
event_push(jresp, "connection");
afb_req_success (request, NULL, NULL);
}
LOGD("\n");
const char *value = afb_req_value (request, "value");
+ const char *uuid = afb_req_value (request, "uuid");
int ret = 0;
if (NULL == value)
jstring = json_object_new_string(value);
json_object_object_add(jresp, "Address", jstring);
+ if (uuid) {
+ jstring = json_object_new_string(uuid);
+ json_object_object_add(jresp, "UUID", jstring);
+ }
+
event_push(jresp, "connection");
afb_req_success (request, NULL, NULL);
}