[Verification] Code compiles. Unable to test.
Change-Id: I5eae738d4446047e749a60836594b4b90dc6444e
Signed-off-by: Tomasz Marciniak <t.marciniak@samsung.com>
}
};
+BluetoothLEDevice.prototype.getServiceAllUuids = function() {
+ console.log('Entered BluetoothLEDevice.getServiceAllUuids()');
+
+ var callArgs = {
+ address : this.address
+ };
+
+ var result = native.callSync('BluetoothLEDevice_getServiceAllUuids', callArgs);
+ if (native.isFailure(result)) {
+ throw native.getErrorObject(result);
+ } else {
+ var uuids = native.getResultObject(result);
+ return uuids;
+ }
+};
+
BluetoothLEDevice.prototype.addConnectStateChangeListener = function() {
console.log('Entered BluetoothLEDevice.addConnectStateChangeListener()');
var args = AV.validateMethod(arguments, [
}
}
-common::PlatformResult BluetoothGATTService::GetServiceUuids(
+common::PlatformResult BluetoothGATTService::GetServiceAllUuids(
const std::string& address, picojson::array* array) {
LoggerD("Entered");
void RemoveValueChangeListener(const picojson::value& args,
picojson::object& out);
- common::PlatformResult GetServiceUuids(const std::string& address,
- picojson::array* array);
+ common::PlatformResult GetServiceAllUuids(const std::string& address,
+ picojson::array* array);
private:
bool IsStillConnected(const std::string& address);
std::bind(&BluetoothLEDevice::RemoveConnectStateChangeListener,
&bluetooth_le_device_, _1, _2));
REGISTER_SYNC(
- "BluetoothLEDevice_getServiceUuids",
- std::bind(&BluetoothLEDevice::GetServiceUuids,
+ "BluetoothLEDevice_getServiceAllUuids",
+ std::bind(&BluetoothLEDevice::GetServiceAllUuids,
&bluetooth_le_device_, _1, _2));
// BluetoothGATTService
ReportSuccess(out);
}
-void BluetoothLEDevice::GetServiceUuids(const picojson::value& data,
+void BluetoothLEDevice::GetServiceAllUuids(const picojson::value& data,
picojson::object& out) {
LoggerD("Entered");
picojson::value response = picojson::value(picojson::array());
picojson::array *data_obj = &response.get<picojson::array>();
- PlatformResult result = service_.GetServiceUuids(address, data_obj);
+ PlatformResult result = service_.GetServiceAllUuids(address, data_obj);
if (result) {
ReportSuccess(response, out);
void RemoveConnectStateChangeListener(const picojson::value& data,
picojson::object& out);
- void GetServiceUuids(const picojson::value& data, picojson::object& out);
+ void GetServiceAllUuids(const picojson::value& data, picojson::object& out);
static common::PlatformResult ToJson(
bt_adapter_le_device_scan_result_info_s* info,