/packages/modules/Bluetooth/system/bta/csis/ |
D | csis_types.h | 333 devices_.clear(); in CsisGroup() 342 auto it = find_if(devices_.begin(), devices_.end(), in AddDevice() 344 if (it != devices_.end()) return; in AddDevice() 346 devices_.push_back(std::move(csis_device)); in AddDevice() 350 auto it = find_if(devices_.begin(), devices_.end(), in RemoveDevice() 352 if (it != devices_.end()) devices_.erase(it); in RemoveDevice() 355 int GetCurrentSize(void) const { return devices_.size(); } in GetCurrentSize() 361 bool IsGroupComplete(void) const { return size_ == (int)devices_.size(); } in IsGroupComplete() 362 bool IsEmpty(void) const { return devices_.empty(); } in IsEmpty() 365 auto it = find_if(devices_.begin(), devices_.end(), in IsDeviceInTheGroup() [all …]
|
D | csis_client.cc | 181 devices_.push_back(dev); in AssignCsisGroup() 256 devices_.emplace_back(std::make_shared<CsisDevice>(address, true)); in Connect() 684 devices_.push_back(device); in AddFromStorage() 711 for (auto& device : devices_) { in CleanUp() 716 devices_.clear(); in CleanUp() 739 for (auto& device : devices_) { in Dump() 776 auto it = find_if(devices_.begin(), devices_.end(), in FindDeviceByConnId() 778 if (it != devices_.end()) return (*it); in FindDeviceByConnId() 784 auto it = find_if(devices_.begin(), devices_.end(), in RemoveCsisDevice() 786 devices_.erase(it); in RemoveCsisDevice() [all …]
|
/packages/modules/Bluetooth/system/bta/vc/ |
D | devices.h | 171 devices_.emplace_back(address, connecting_actively); in Add() 175 for (auto it = devices_.begin(); it != devices_.end(); it++) { in Remove() 177 it = devices_.erase(it); in Remove() 184 auto iter = std::find_if(devices_.begin(), devices_.end(), in FindByAddress() 189 return (iter == devices_.end()) ? nullptr : &(*iter); in FindByAddress() 194 std::find_if(devices_.begin(), devices_.end(), in FindByConnId() 199 return (iter == devices_.end()) ? nullptr : &(*iter); in FindByConnId() 202 size_t Size() { return (devices_.size()); } in Size() 204 void Clear() { devices_.clear(); } in Clear() 207 if (devices_.empty()) { in DebugDump() [all …]
|
D | devices_test.cc | 55 devices_ = new VolumeControlDevices(); in SetUp() 63 delete devices_; in TearDown() 66 VolumeControlDevices* devices_ = nullptr; member in bluetooth::vc::internal::VolumeControlDevicesTest 73 ASSERT_EQ((size_t)0, devices_->Size()); in TEST_F() 74 devices_->Add(test_address_0, true); in TEST_F() 75 ASSERT_EQ((size_t)1, devices_->Size()); in TEST_F() 80 ASSERT_EQ((size_t)0, devices_->Size()); in TEST_F() 81 devices_->Add(test_address_0, true); in TEST_F() 82 devices_->Add(test_address_0, true); in TEST_F() 83 ASSERT_EQ((size_t)1, devices_->Size()); in TEST_F() [all …]
|
D | vc.cc | 469 auto it = find(operation.devices_.begin(), in OnVolumeControlStateReadOrNotified() 470 operation.devices_.end(), addr); in OnVolumeControlStateReadOrNotified() 471 return it != operation.devices_.end(); in OnVolumeControlStateReadOrNotified() 481 auto it = find(op->devices_.begin(), op->devices_.end(), device->address); in OnVolumeControlStateReadOrNotified() 482 op->devices_.erase(it); in OnVolumeControlStateReadOrNotified() 483 if (!op->devices_.empty()) { in OnVolumeControlStateReadOrNotified() 699 auto it = find(op.devices_.begin(), op.devices_.end(), addr); in RemoveDeviceFromOperationList() 700 if (it == op.devices_.end()) { in RemoveDeviceFromOperationList() 703 op.devices_.erase(it); in RemoveDeviceFromOperationList() 709 [](auto& op) { return op.devices_.empty(); }), in RemoveDeviceFromOperationList() [all …]
|
D | types.h | 74 std::vector<RawAddress> devices_; member 85 devices_(devices) { in VolumeOperation() 94 operation_id_, devices_.size()); in ~VolumeOperation()
|
/packages/modules/Bluetooth/system/bta/has/ |
D | has_client.cc | 174 auto device = std::find_if(devices_.begin(), devices_.end(), in Connect() 176 if (device == devices_.end()) { in Connect() 177 devices_.emplace_back(addr, true); in Connect() 196 auto device = std::find_if(devices_.begin(), devices_.end(), in AddFromStorage() 198 if (device == devices_.end()) in AddFromStorage() 199 devices_.push_back(HasDevice(address, features)); in AddFromStorage() 224 auto device = std::find_if(devices_.begin(), devices_.end(), in Disconnect() 226 if (device == devices_.end()) { in Disconnect() 233 devices_.erase(device); in Disconnect() 459 devices_.begin(), devices_.end(), in CpReadAllPresetsOperation() [all …]
|
/packages/modules/Bluetooth/system/bta/le_audio/ |
D | devices_test.cc | 106 devices_ = new LeAudioDevices(); in SetUp() 114 delete devices_; in TearDown() 117 LeAudioDevices* devices_ = nullptr; member in bluetooth::le_audio::internal::__anon1b30b59b0111::LeAudioDevicesTest 124 ASSERT_EQ((size_t)0, devices_->Size()); in TEST_F() 125 devices_->Add(test_address_0, DeviceConnectState::CONNECTING_BY_USER); in TEST_F() 126 ASSERT_EQ((size_t)1, devices_->Size()); in TEST_F() 127 devices_->Add(GetTestAddress(1), DeviceConnectState::CONNECTING_BY_USER, 1); in TEST_F() 128 ASSERT_EQ((size_t)2, devices_->Size()); in TEST_F() 129 devices_->Add(test_address_0, DeviceConnectState::CONNECTING_BY_USER); in TEST_F() 130 ASSERT_EQ((size_t)2, devices_->Size()); in TEST_F() [all …]
|
/packages/modules/Bluetooth/system/bta/groups/ |
D | groups.cc | 47 void Add(const RawAddress& addr) { devices_.insert(addr); } in Add() 48 void Remove(const RawAddress& addr) { devices_.erase(addr); } in Remove() 50 return (devices_.count(addr) != 0); in Contains() 54 for (auto const& addr : devices_) { in ForEachDevice() 59 int Size(void) const { return devices_.size(); } in Size() 68 std::unordered_set<RawAddress> devices_; member in bluetooth::groups::DeviceGroup 378 for (auto const& addr : group.devices_) { in operator <<()
|
/packages/modules/Bluetooth/system/stack/eatt/ |
D | eatt_impl.h | 61 std::vector<eatt_device> devices_; member 80 auto iter = find_if(devices_.begin(), devices_.end(), in find_device_by_cid() 86 return (iter == devices_.end()) ? nullptr : &(*iter); in find_device_by_cid() 544 devices_.begin(), devices_.end(), in find_device_by_address() 547 return iter == devices_.end() ? nullptr : &(*iter); in find_device_by_address() 551 devices_.push_back(eatt_device(bd_addr, default_mtu_, max_mps_)); in add_eatt_device() 552 eatt_device* eatt_dev = &devices_.back(); in add_eatt_device()
|