[Bluetooth] Implement BluetoothGATTServerCharacteristic::setReadValueRequestCallback
[platform/core/api/webapi-plugins.git] / src / bluetooth / bluetooth_gatt_client_service.cc
index 1db6db3..fd7a531 100644 (file)
@@ -59,7 +59,8 @@ bool IsProperty(int propertyBits, bt_gatt_property_e property) {
 }
 }
 
-BluetoothGATTClientService::BluetoothGATTClientService(BluetoothInstance& instance) : instance_(instance) {
+BluetoothGATTClientService::BluetoothGATTClientService(BluetoothInstance& instance)
+    : instance_(instance) {
   ScopeLogger();
 }
 
@@ -118,8 +119,8 @@ void BluetoothGATTClientService::TryDestroyClient(const std::string& address) {
 }
 
 PlatformResult BluetoothGATTClientService::GetSpecifiedGATTClient(const std::string& address,
-                                                             const UUID& uuid,
-                                                             picojson::object* result) {
+                                                                  const UUID& uuid,
+                                                                  picojson::object* result) {
   ScopeLogger();
 
   bt_gatt_client_h client = GetGattClient(address);
@@ -180,8 +181,9 @@ void BluetoothGATTClientService::GetServices(const picojson::value& args, picojs
   }
 }
 
-PlatformResult BluetoothGATTClientService::GetServicesHelper(bt_gatt_h handle, const std::string& address,
-                                                       picojson::array* array) {
+PlatformResult BluetoothGATTClientService::GetServicesHelper(bt_gatt_h handle,
+                                                             const std::string& address,
+                                                             picojson::array* array) {
   ScopeLogger();
 
   if (!IsStillConnected(address)) {
@@ -228,7 +230,8 @@ PlatformResult BluetoothGATTClientService::GetServicesHelper(bt_gatt_h handle, c
   return PlatformResult(ErrorCode::NO_ERROR);
 }
 
-void BluetoothGATTClientService::GetCharacteristics(const picojson::value& args, picojson::object& out) {
+void BluetoothGATTClientService::GetCharacteristics(const picojson::value& args,
+                                                    picojson::object& out) {
   ScopeLogger();
 
   bt_gatt_h handle = (bt_gatt_h) static_cast<long>(args.get("handle").get<double>());
@@ -245,8 +248,8 @@ void BluetoothGATTClientService::GetCharacteristics(const picojson::value& args,
 }
 
 PlatformResult BluetoothGATTClientService::GetCharacteristicsHelper(bt_gatt_h handle,
-                                                              const std::string& address,
-                                                              picojson::array* array) {
+                                                                    const std::string& address,
+                                                                    picojson::array* array) {
   ScopeLogger();
 
   if (!IsStillConnected(address)) {
@@ -518,7 +521,7 @@ void BluetoothGATTClientService::WriteValue(const picojson::value& args, picojso
 }
 
 void BluetoothGATTClientService::AddValueChangeListener(const picojson::value& args,
-                                                  picojson::object& out) {
+                                                        picojson::object& out) {
   ScopeLogger();
   const auto& address = args.get("address").get<std::string>();
   if (!IsStillConnected(address)) {
@@ -542,7 +545,7 @@ void BluetoothGATTClientService::AddValueChangeListener(const picojson::value& a
 }
 
 void BluetoothGATTClientService::RemoveValueChangeListener(const picojson::value& args,
-                                                     picojson::object& out) {
+                                                           picojson::object& out) {
   ScopeLogger();
   const auto& address = args.get("address").get<std::string>();
   if (!IsStillConnected(address)) {
@@ -565,7 +568,7 @@ void BluetoothGATTClientService::RemoveValueChangeListener(const picojson::value
 }
 
 common::PlatformResult BluetoothGATTClientService::GetServiceAllUuids(const std::string& address,
-                                                                picojson::array* array) {
+                                                                      picojson::array* array) {
   ScopeLogger();
 
   bt_gatt_client_h client = GetGattClient(address);
@@ -610,7 +613,7 @@ common::PlatformResult BluetoothGATTClientService::GetServiceAllUuids(const std:
 }
 
 void BluetoothGATTClientService::OnCharacteristicValueChanged(bt_gatt_h characteristic, char* value,
-                                                        int length, void* user_data) {
+                                                              int length, void* user_data) {
   ScopeLogger("characteristic: [%p], len: [%d], user_data: [%p]", characteristic, length,
               user_data);