Loading system/service/gatt_server_old.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -463,6 +463,7 @@ const btgatt_client_callbacks_t gatt_client_callbacks = { nullptr, /* batchscan_threshold_cb; */ nullptr, /* track_adv_event_cb; */ nullptr, /* scan_parameter_setup_completed_cb; */ nullptr, /* get_gatt_db_cb; */ }; const btgatt_callbacks_t gatt_callbacks = { Loading system/service/hal/bluetooth_gatt_interface.cpp +19 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,7 @@ void ConnectCallback(int conn_id, int status, int client_if, bt_bdaddr_t* bda) { << " client_if: " << client_if << " - BD_ADDR: " << BtAddrString(bda) << " - conn_id: " << conn_id; FOR_EACH_CLIENT_OBSERVER( ConnectCallback(g_interface, conn_id, status, client_if, *bda)); } Loading Loading @@ -247,6 +248,15 @@ void MultiAdvDisableCallback(int client_if, int status) { MultiAdvDisableCallback(g_interface, client_if, status)); } void GetGattDbCallback(int conn_id, btgatt_db_element_t *db, int size) { shared_lock<shared_timed_mutex> lock(g_instance_lock); VLOG(2) << __func__ << " - conn_id: " << conn_id << " size: " << size; VERIFY_INTERFACE_OR_RETURN(); FOR_EACH_CLIENT_OBSERVER( GetGattDbCallback(g_interface, conn_id, db, size)); } void RegisterServerCallback(int status, int server_if, bt_uuid_t* app_uuid) { shared_lock<shared_timed_mutex> lock(g_instance_lock); VLOG(2) << __func__ << " - status: " << status << " server_if: " << server_if; Loading Loading @@ -448,6 +458,7 @@ const btgatt_client_callbacks_t gatt_client_callbacks = { nullptr, // batchscan_threshold_cb nullptr, // track_adv_event_cb nullptr, // scan_parameter_setup_completed_cb GetGattDbCallback, }; const btgatt_server_callbacks_t gatt_server_callbacks = { Loading Loading @@ -694,6 +705,14 @@ void BluetoothGattInterface::ClientObserver::MultiAdvDisableCallback( // Do nothing. } void BluetoothGattInterface::ClientObserver::GetGattDbCallback( BluetoothGattInterface* /* gatt_iface */, int /* conn_id */, btgatt_db_element_t* /* gatt_db */, int /* size */) { // Do nothing. } void BluetoothGattInterface::ServerObserver::RegisterServerCallback( BluetoothGattInterface* /* gatt_iface */, int /* status */, Loading system/service/hal/bluetooth_gatt_interface.h +5 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,11 @@ class BluetoothGattInterface { BluetoothGattInterface* gatt_iface, int client_if, int status); // TODO(armansito): Complete the list of callbacks. virtual void GetGattDbCallback( BluetoothGattInterface* gatt_iface, int conn_id, btgatt_db_element_t* gatt_db, int size); }; // The standard BT-GATT server callback interface. Loading system/service/hal/fake_bluetooth_gatt_interface.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -210,6 +210,7 @@ btgatt_client_interface_t fake_btgattc_iface = { nullptr, // batchscan_dis_batch_scan nullptr, // batchscan_read_reports nullptr, // test_command nullptr, // get_gatt_db }; btgatt_server_interface_t fake_btgatts_iface = { Loading Loading
system/service/gatt_server_old.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -463,6 +463,7 @@ const btgatt_client_callbacks_t gatt_client_callbacks = { nullptr, /* batchscan_threshold_cb; */ nullptr, /* track_adv_event_cb; */ nullptr, /* scan_parameter_setup_completed_cb; */ nullptr, /* get_gatt_db_cb; */ }; const btgatt_callbacks_t gatt_callbacks = { Loading
system/service/hal/bluetooth_gatt_interface.cpp +19 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,7 @@ void ConnectCallback(int conn_id, int status, int client_if, bt_bdaddr_t* bda) { << " client_if: " << client_if << " - BD_ADDR: " << BtAddrString(bda) << " - conn_id: " << conn_id; FOR_EACH_CLIENT_OBSERVER( ConnectCallback(g_interface, conn_id, status, client_if, *bda)); } Loading Loading @@ -247,6 +248,15 @@ void MultiAdvDisableCallback(int client_if, int status) { MultiAdvDisableCallback(g_interface, client_if, status)); } void GetGattDbCallback(int conn_id, btgatt_db_element_t *db, int size) { shared_lock<shared_timed_mutex> lock(g_instance_lock); VLOG(2) << __func__ << " - conn_id: " << conn_id << " size: " << size; VERIFY_INTERFACE_OR_RETURN(); FOR_EACH_CLIENT_OBSERVER( GetGattDbCallback(g_interface, conn_id, db, size)); } void RegisterServerCallback(int status, int server_if, bt_uuid_t* app_uuid) { shared_lock<shared_timed_mutex> lock(g_instance_lock); VLOG(2) << __func__ << " - status: " << status << " server_if: " << server_if; Loading Loading @@ -448,6 +458,7 @@ const btgatt_client_callbacks_t gatt_client_callbacks = { nullptr, // batchscan_threshold_cb nullptr, // track_adv_event_cb nullptr, // scan_parameter_setup_completed_cb GetGattDbCallback, }; const btgatt_server_callbacks_t gatt_server_callbacks = { Loading Loading @@ -694,6 +705,14 @@ void BluetoothGattInterface::ClientObserver::MultiAdvDisableCallback( // Do nothing. } void BluetoothGattInterface::ClientObserver::GetGattDbCallback( BluetoothGattInterface* /* gatt_iface */, int /* conn_id */, btgatt_db_element_t* /* gatt_db */, int /* size */) { // Do nothing. } void BluetoothGattInterface::ServerObserver::RegisterServerCallback( BluetoothGattInterface* /* gatt_iface */, int /* status */, Loading
system/service/hal/bluetooth_gatt_interface.h +5 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,11 @@ class BluetoothGattInterface { BluetoothGattInterface* gatt_iface, int client_if, int status); // TODO(armansito): Complete the list of callbacks. virtual void GetGattDbCallback( BluetoothGattInterface* gatt_iface, int conn_id, btgatt_db_element_t* gatt_db, int size); }; // The standard BT-GATT server callback interface. Loading
system/service/hal/fake_bluetooth_gatt_interface.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -210,6 +210,7 @@ btgatt_client_interface_t fake_btgattc_iface = { nullptr, // batchscan_dis_batch_scan nullptr, // batchscan_read_reports nullptr, // test_command nullptr, // get_gatt_db }; btgatt_server_interface_t fake_btgatts_iface = { Loading