Loading system/service/adapter.cc +5 −6 Original line number Diff line number Diff line Loading @@ -330,9 +330,9 @@ class AdapterImpl : public Adapter, public hal::BluetoothInterface::Observer { } lock_guard<mutex> lock(observers_lock_); for (auto& observer : observers_) { observer.OnDeviceConnectionStateChanged(this, device_address, connected); } FOR_EACH_OBSERVER( Adapter::Observer, observers_, OnDeviceConnectionStateChanged(this, device_address, connected)); } // Sends a request to set the given HAL adapter property type and value. Loading Loading @@ -362,9 +362,8 @@ class AdapterImpl : public Adapter, public hal::BluetoothInterface::Observer { if (prev_state == new_state) return; lock_guard<mutex> lock(observers_lock_); for (auto& observer : observers_) { observer.OnAdapterStateChanged(this, prev_state, new_state); } FOR_EACH_OBSERVER(Adapter::Observer, observers_, OnAdapterStateChanged(this, prev_state, new_state)); } private: Loading system/service/daemon.cc +1 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ #include <memory> #include <base/logging.h> #include <base/run_loop.h> #include "service/adapter.h" #include "service/hal/bluetooth_gatt_interface.h" Loading @@ -45,7 +44,7 @@ class DaemonImpl : public Daemon, public ipc::IPCManager::Delegate { CleanUpBluetoothStack(); } void StartMainLoop() override { base::RunLoop().Run(); } void StartMainLoop() override { message_loop_->Run(); } Settings* GetSettings() const override { return settings_.get(); } Loading system/service/example/heart_rate/server_main.cc +1 −1 Original line number Diff line number Diff line Loading @@ -153,7 +153,7 @@ int main(int argc, char* argv[]) { // received in dedicated threads set up by the ProcessState::startThreadPool // call above but we use this main loop for sending out heart rate // notifications. base::RunLoop().Run(); main_loop.Run(); LOG(INFO) << "Exiting"; return EXIT_SUCCESS; Loading system/service/hal/bluetooth_gatt_interface.cc +6 −3 Original line number Diff line number Diff line Loading @@ -59,13 +59,16 @@ base::ObserverList<BluetoothGattInterface::ServerObserver>* GetServerObservers(); #define FOR_EACH_SCANNER_OBSERVER(func) \ for (auto& observer : *GetScannerObservers()) { observer.func; } FOR_EACH_OBSERVER(BluetoothGattInterface::ScannerObserver, \ *GetScannerObservers(), func) #define FOR_EACH_CLIENT_OBSERVER(func) \ for (auto& observer : *GetClientObservers()) { observer.func; } FOR_EACH_OBSERVER(BluetoothGattInterface::ClientObserver, \ *GetClientObservers(), func) #define FOR_EACH_SERVER_OBSERVER(func) \ for (auto& observer : *GetServerObservers()) { observer.func; } FOR_EACH_OBSERVER(BluetoothGattInterface::ServerObserver, \ *GetServerObservers(), func) #define VERIFY_INTERFACE_OR_RETURN() \ do { \ Loading system/service/hal/bluetooth_interface.cc +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ shared_mutex_impl g_instance_lock; base::ObserverList<BluetoothInterface::Observer>* GetObservers(); #define FOR_EACH_BLUETOOTH_OBSERVER(func) \ for (auto& observer : *GetObservers()) { observer.func; } FOR_EACH_OBSERVER(BluetoothInterface::Observer, *GetObservers(), func) #define VERIFY_INTERFACE_OR_RETURN() \ do { \ Loading Loading
system/service/adapter.cc +5 −6 Original line number Diff line number Diff line Loading @@ -330,9 +330,9 @@ class AdapterImpl : public Adapter, public hal::BluetoothInterface::Observer { } lock_guard<mutex> lock(observers_lock_); for (auto& observer : observers_) { observer.OnDeviceConnectionStateChanged(this, device_address, connected); } FOR_EACH_OBSERVER( Adapter::Observer, observers_, OnDeviceConnectionStateChanged(this, device_address, connected)); } // Sends a request to set the given HAL adapter property type and value. Loading Loading @@ -362,9 +362,8 @@ class AdapterImpl : public Adapter, public hal::BluetoothInterface::Observer { if (prev_state == new_state) return; lock_guard<mutex> lock(observers_lock_); for (auto& observer : observers_) { observer.OnAdapterStateChanged(this, prev_state, new_state); } FOR_EACH_OBSERVER(Adapter::Observer, observers_, OnAdapterStateChanged(this, prev_state, new_state)); } private: Loading
system/service/daemon.cc +1 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ #include <memory> #include <base/logging.h> #include <base/run_loop.h> #include "service/adapter.h" #include "service/hal/bluetooth_gatt_interface.h" Loading @@ -45,7 +44,7 @@ class DaemonImpl : public Daemon, public ipc::IPCManager::Delegate { CleanUpBluetoothStack(); } void StartMainLoop() override { base::RunLoop().Run(); } void StartMainLoop() override { message_loop_->Run(); } Settings* GetSettings() const override { return settings_.get(); } Loading
system/service/example/heart_rate/server_main.cc +1 −1 Original line number Diff line number Diff line Loading @@ -153,7 +153,7 @@ int main(int argc, char* argv[]) { // received in dedicated threads set up by the ProcessState::startThreadPool // call above but we use this main loop for sending out heart rate // notifications. base::RunLoop().Run(); main_loop.Run(); LOG(INFO) << "Exiting"; return EXIT_SUCCESS; Loading
system/service/hal/bluetooth_gatt_interface.cc +6 −3 Original line number Diff line number Diff line Loading @@ -59,13 +59,16 @@ base::ObserverList<BluetoothGattInterface::ServerObserver>* GetServerObservers(); #define FOR_EACH_SCANNER_OBSERVER(func) \ for (auto& observer : *GetScannerObservers()) { observer.func; } FOR_EACH_OBSERVER(BluetoothGattInterface::ScannerObserver, \ *GetScannerObservers(), func) #define FOR_EACH_CLIENT_OBSERVER(func) \ for (auto& observer : *GetClientObservers()) { observer.func; } FOR_EACH_OBSERVER(BluetoothGattInterface::ClientObserver, \ *GetClientObservers(), func) #define FOR_EACH_SERVER_OBSERVER(func) \ for (auto& observer : *GetServerObservers()) { observer.func; } FOR_EACH_OBSERVER(BluetoothGattInterface::ServerObserver, \ *GetServerObservers(), func) #define VERIFY_INTERFACE_OR_RETURN() \ do { \ Loading
system/service/hal/bluetooth_interface.cc +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ shared_mutex_impl g_instance_lock; base::ObserverList<BluetoothInterface::Observer>* GetObservers(); #define FOR_EACH_BLUETOOTH_OBSERVER(func) \ for (auto& observer : *GetObservers()) { observer.func; } FOR_EACH_OBSERVER(BluetoothInterface::Observer, *GetObservers(), func) #define VERIFY_INTERFACE_OR_RETURN() \ do { \ Loading