if (BT_ERROR_NONE != ret) {
plarform_res = util::GetBluetoothError(ret, "Error while getting value");
} else {
- for (size_t i = 0 ; i < length; i++) {
+ for (int i = 0 ; i < length; i++) {
byte_array_obj.push_back(picojson::value(std::to_string(value[i])));
}
}
int value_size = value_array.size();
std::unique_ptr<char[]> value_data(new char[value_size]);
- for (size_t i = 0; i < value_size; ++i) {
+ for (int i = 0; i < value_size; ++i) {
value_data[i] = static_cast<char>(value_array[i].get<double>());
}
picojson::value byte_array = picojson::value(picojson::array());
picojson::array& byte_array_obj = byte_array.get<picojson::array>();
- for (size_t i = 0 ; i < length; ++i) {
+ for (int i = 0 ; i < length; ++i) {
byte_array_obj.push_back(picojson::value(std::to_string(value[i])));
}
BluetoothInstance::BluetoothInstance() :
bluetooth_adapter_(*this),
bluetooth_device_(bluetooth_adapter_),
- bluetooth_health_profile_handler_(*this),
bluetooth_health_application_(bluetooth_health_profile_handler_),
+ bluetooth_health_profile_handler_(*this),
bluetooth_service_handler_(bluetooth_adapter_),
bluetooth_socket_(bluetooth_adapter_),
bluetooth_le_adapter_(*this),
namespace {
const char* JSON_CALLBACK_ID = "callbackId";
const char* JSON_LISTENER_ID = "listenerId";
-const char* JSON_STATUS = "status";
-const char* JSON_RESULT = "result";
-const char* JSON_CALLBACK_SUCCCESS = "success";
-const char* JSON_CALLBACK_ERROR = "error";
-const char* JSON_DATA = "args";
} // namespace
void BluetoothInstance::AsyncResponse(double callback_handle, const std::shared_ptr<picojson::value>& response) {