/system/bt/types/test/bluetooth/ |
D | uuid_unittest.cc | 76 Uuid uuid = Uuid::From16Bit(0x0001); in TEST() local 77 EXPECT_TRUE(memcmp(&uuid, u2, sizeof(u2)) == 0); in TEST() 81 uuid = Uuid::From16Bit(0x553e); in TEST() 82 EXPECT_TRUE(memcmp(&uuid, u3, sizeof(u3)) == 0); in TEST() 86 uuid = Uuid::From16Bit(0xffff); in TEST() 87 EXPECT_TRUE(memcmp(&uuid, u4, sizeof(u4)) == 0); in TEST() 95 Uuid uuid = Uuid::From32Bit(0x00000001); in TEST() local 96 EXPECT_TRUE(memcmp(&uuid, u2, sizeof(u2)) == 0); in TEST() 100 uuid = Uuid::From32Bit(0x3344553e); in TEST() 101 EXPECT_TRUE(memcmp(&uuid, u3, sizeof(u3)) == 0); in TEST() [all …]
|
/system/bt/vendor_libs/test_vendor_lib/types/test/bluetooth/ |
D | uuid_unittest.cc | 70 Uuid uuid = Uuid::From16Bit(0x0001); in TEST() local 71 EXPECT_TRUE(memcmp(&uuid, u2, sizeof(u2)) == 0); in TEST() 74 uuid = Uuid::From16Bit(0x553e); in TEST() 75 EXPECT_TRUE(memcmp(&uuid, u3, sizeof(u3)) == 0); in TEST() 78 uuid = Uuid::From16Bit(0xffff); in TEST() 79 EXPECT_TRUE(memcmp(&uuid, u4, sizeof(u4)) == 0); in TEST() 86 Uuid uuid = Uuid::From32Bit(0x00000001); in TEST() local 87 EXPECT_TRUE(memcmp(&uuid, u2, sizeof(u2)) == 0); in TEST() 90 uuid = Uuid::From32Bit(0x3344553e); in TEST() 91 EXPECT_TRUE(memcmp(&uuid, u3, sizeof(u3)) == 0); in TEST() [all …]
|
/system/bt/service/common/android/bluetooth/ |
D | scan_filter.cc | 44 std::unique_ptr<UUID> uuid; in writeToParcel() local 49 uuid.reset(&tmp); in writeToParcel() 51 uuid.reset(nullptr); in writeToParcel() 53 status = parcel->writeNullableParcelable(uuid); in writeToParcel() 54 uuid.release(); in writeToParcel() 59 uuid.reset(&tmp); in writeToParcel() 61 uuid.reset(nullptr); in writeToParcel() 63 status = parcel->writeNullableParcelable(uuid); in writeToParcel() 64 uuid.release(); in writeToParcel() 80 UUID uuid; in readFromParcel() local [all …]
|
D | uuid.h | 35 UUID(const ::bluetooth::Uuid& uuid) : uuid(uuid){}; // NOLINT in UUID() argument 52 bool operator==(::bluetooth::Uuid rhs) const { return uuid == rhs; } 54 ::bluetooth::Uuid uuid; 61 return lhs == rhs.uuid;
|
D | bluetooth_gatt_included_service.cc | 43 UUID uuid; in readFromParcel() local 44 status_t status = parcel->readParcelable(&uuid); in readFromParcel() 46 uuid_ = uuid.uuid; in readFromParcel()
|
D | bluetooth_gatt_descriptor.cc | 42 UUID uuid; in readFromParcel() local 43 status_t status = parcel->readParcelable(&uuid); in readFromParcel() 45 uuid_ = uuid.uuid; in readFromParcel()
|
/system/bt/types/bluetooth/ |
D | uuid.cc | 61 Uuid Uuid::FromString(const std::string& uuid, bool* is_valid) { in FromString() argument 65 if (uuid.empty()) return ret; in FromString() 68 if (uuid.size() == kString128BitLen) { in FromString() 69 if (uuid[8] != '-' || uuid[13] != '-' || uuid[18] != '-' || in FromString() 70 uuid[23] != '-') { in FromString() 76 sscanf(uuid.c_str(), in FromString() 85 } else if (uuid.size() == 8) { in FromString() 87 int rc = sscanf(uuid.c_str(), "%02hhx%02hhx%02hhx%02hhx%n", &p[0], &p[1], in FromString() 93 } else if (uuid.size() == 4) { in FromString() 95 int rc = sscanf(uuid.c_str(), "%02hhx%02hhx%n", &p[2], &p[3], &c); in FromString() [all …]
|
D | uuid.h | 71 static Uuid FromString(const std::string& uuid, bool* is_valid = nullptr); 80 static constexpr Uuid From128BitBE(const UUID128Bit& uuid) { in From128BitBE() argument 81 Uuid u(uuid); in From128BitBE() 87 static Uuid From128BitBE(const uint8_t* uuid); 90 static Uuid From128BitLE(const UUID128Bit& uuid); 94 static Uuid From128BitLE(const uint8_t* uuid);
|
/system/bt/vendor_libs/test_vendor_lib/types/bluetooth/ |
D | uuid.cc | 60 Uuid Uuid::FromString(const std::string& uuid, bool* is_valid) { in FromString() argument 64 if (uuid.empty()) return ret; in FromString() 67 if (uuid.size() == kString128BitLen) { in FromString() 68 if (uuid[8] != '-' || uuid[13] != '-' || uuid[18] != '-' || uuid[23] != '-') { in FromString() 73 int rc = sscanf(uuid.c_str(), in FromString() 82 } else if (uuid.size() == 8) { in FromString() 84 int rc = sscanf(uuid.c_str(), "%02hhx%02hhx%02hhx%02hhx%n", &p[0], &p[1], &p[2], &p[3], &c); in FromString() 89 } else if (uuid.size() == 4) { in FromString() 91 int rc = sscanf(uuid.c_str(), "%02hhx%02hhx%n", &p[2], &p[3], &c); in FromString() 119 Uuid Uuid::From128BitBE(const uint8_t* uuid) { in From128BitBE() argument [all …]
|
D | uuid.h | 71 static Uuid FromString(const std::string& uuid, bool* is_valid = nullptr); 80 static constexpr Uuid From128BitBE(const UUID128Bit& uuid) { in From128BitBE() argument 81 Uuid u(uuid); in From128BitBE() 87 static Uuid From128BitBE(const uint8_t* uuid); 90 static Uuid From128BitLE(const UUID128Bit& uuid); 94 static Uuid From128BitLE(const uint8_t* uuid);
|
/system/bt/service/ |
D | gatt_client.cc | 29 GattClient::GattClient(const Uuid& uuid, int client_id) in GattClient() argument 30 : app_identifier_(uuid), client_id_(client_id) {} in GattClient() 56 bool GattClientFactory::RegisterInstance(const Uuid& uuid, in RegisterInstance() argument 58 VLOG(1) << __func__ << " - Uuid: " << uuid.ToString(); in RegisterInstance() 61 if (pending_calls_.find(uuid) != pending_calls_.end()) { in RegisterInstance() 63 << "Uuid: " << uuid.ToString(); in RegisterInstance() 70 if (hal_iface->register_client(uuid) != BT_STATUS_SUCCESS) return false; in RegisterInstance() 72 pending_calls_[uuid] = callback; in RegisterInstance() 80 Uuid uuid(app_uuid); in RegisterClientCallback() local 82 auto iter = pending_calls_.find(uuid); in RegisterClientCallback() [all …]
|
D | low_energy_scanner.cc | 69 LowEnergyScanner::LowEnergyScanner(Adapter& adapter, const Uuid& uuid, in LowEnergyScanner() argument 72 app_identifier_(uuid), in LowEnergyScanner() 174 const Uuid& uuid, const RegisterCallback& callback) { in RegisterInstance() argument 175 VLOG(1) << __func__ << " - Uuid: " << uuid.ToString(); in RegisterInstance() 178 if (pending_calls_.find(uuid) != pending_calls_.end()) { in RegisterInstance() 180 << "Uuid: " << uuid.ToString(); in RegisterInstance() 189 base::Unretained(this), callback, uuid)); in RegisterInstance() 191 pending_calls_.insert(uuid); in RegisterInstance() 199 Uuid uuid(app_uuid); in RegisterScannerCallback() local 201 VLOG(1) << __func__ << " - Uuid: " << uuid.ToString(); in RegisterScannerCallback() [all …]
|
D | low_energy_client.cc | 34 LowEnergyClient::LowEnergyClient(Adapter& adapter, const Uuid& uuid, in LowEnergyClient() argument 37 app_identifier_(uuid), in LowEnergyClient() 208 const Uuid& uuid, const RegisterCallback& callback) { in RegisterInstance() argument 209 VLOG(1) << __func__ << " - Uuid: " << uuid.ToString(); in RegisterInstance() 212 if (pending_calls_.find(uuid) != pending_calls_.end()) { in RegisterInstance() 214 << "Uuid: " << uuid.ToString(); in RegisterInstance() 221 if (hal_iface->register_client(uuid) != BT_STATUS_SUCCESS) return false; in RegisterInstance() 223 pending_calls_[uuid] = callback; in RegisterInstance() 231 Uuid uuid(app_uuid); in RegisterClientCallback() local 233 VLOG(1) << __func__ << " - Uuid: " << uuid.ToString(); in RegisterClientCallback() [all …]
|
D | gatt_server.cc | 33 GattServer::GattServer(const Uuid& uuid, int server_id) in GattServer() argument 34 : app_identifier_(uuid), server_id_(server_id), delegate_(nullptr) {} in GattServer() 74 .uuid = service.uuid()}); in AddService() 78 .uuid = characteristic.uuid(), in AddService() 83 .uuid = descriptor.uuid(), in AddService() 304 << " service Uuid: " << Uuid(svc[0].uuid).ToString() in ServiceAddedCallback() 307 Service service(svc[0].attribute_handle, true, Uuid(svc[0].uuid), {}, {}); in ServiceAddedCallback() 315 Uuid(curr.uuid), in ServiceAddedCallback() 321 {curr.attribute_handle, Uuid(curr.uuid), curr.permissions}); in ServiceAddedCallback() 579 bool GattServerFactory::RegisterInstance(const Uuid& uuid, in RegisterInstance() argument [all …]
|
/system/bt/bta/test/gatt/ |
D | database_builder_sample_device_test.cc | 229 EXPECT_EQ(service->uuid, SERVICE_1_UUID); in TEST() 231 EXPECT_EQ(service->characteristics[0].uuid, SERVICE_1_CHAR_1_UUID); in TEST() 232 EXPECT_EQ(service->characteristics[1].uuid, SERVICE_1_CHAR_2_UUID); in TEST() 233 EXPECT_EQ(service->characteristics[2].uuid, SERVICE_1_CHAR_3_UUID); in TEST() 236 EXPECT_EQ(service->uuid, SERVICE_2_UUID); in TEST() 239 EXPECT_EQ(service->uuid, SERVICE_3_UUID); in TEST() 240 EXPECT_EQ(service->characteristics[0].uuid, SERVICE_3_CHAR_1_UUID); in TEST() 241 EXPECT_EQ(service->characteristics[0].descriptors[0].uuid, in TEST() 245 EXPECT_EQ(service->uuid, SERVICE_4_UUID); in TEST() 246 EXPECT_EQ(service->characteristics[0].uuid, SERVICE_4_CHAR_1_UUID); in TEST() [all …]
|
D | database_builder_test.cc | 67 EXPECT_EQ(service->uuid, SERVICE_1_UUID); in TEST() 88 EXPECT_EQ(service->uuid, SERVICE_1_UUID); in TEST() 90 EXPECT_EQ(service->characteristics[0].uuid, SERVICE_1_CHAR_1_UUID); in TEST() 95 EXPECT_EQ(service->characteristics[0].descriptors[0].uuid, in TEST() 146 EXPECT_EQ(service->uuid, SERVICE_1_UUID); in TEST() 151 EXPECT_EQ(service->uuid, SERVICE_2_UUID); in TEST() 157 EXPECT_EQ(service->uuid, SERVICE_3_UUID); in TEST() 162 EXPECT_EQ(service->uuid, SERVICE_4_UUID); in TEST() 167 EXPECT_EQ(service->uuid, SERVICE_5_UUID); in TEST()
|
/system/bt/btif/src/ |
D | btif_profile_queue.cc | 49 ConnectNode(const RawAddress& address, uint16_t uuid, in ConnectNode() argument 51 : address_(address), uuid_(uuid), busy_(false), connect_cb_(connect_cb) {} in ConnectNode() 60 uint16_t uuid() const { return uuid_; } in uuid() function in ConnectNode 94 static void queue_int_add(uint16_t uuid, const RawAddress& bda, in queue_int_add() argument 99 ConnectNode param(bda, uuid, connect_cb); in queue_int_add() 101 if (node.uuid() == param.uuid() && node.address() == param.address()) { in queue_int_add() 126 static void queue_int_cleanup(uint16_t uuid) { in queue_int_cleanup() argument 127 LOG_INFO(LOG_TAG, "%s: UUID=%04X", __func__, uuid); in queue_int_cleanup() 132 if (node.uuid() == uuid) { in queue_int_cleanup() 152 bt_status_t btif_queue_connect(uint16_t uuid, const RawAddress* bda, in btif_queue_connect() argument [all …]
|
D | btif_sock_sdp.cc | 158 static int add_sdp_by_uuid(const char* name, const Uuid& uuid, in add_sdp_by_uuid() argument 161 uuid.ToString().c_str(), channel, name); in add_sdp_by_uuid() 190 { ARRAY_TO_BE_STREAM(tmp, uuid.To128BitBE().data(), UUID_MAX_LENGTH); } in add_sdp_by_uuid() 386 static int add_rfc_sdp_by_uuid(const char* name, const Uuid& uuid, in add_rfc_sdp_by_uuid() argument 389 uuid.ToString().c_str(), name, channel); in add_rfc_sdp_by_uuid() 403 int final_channel = get_reserved_rfc_channel(uuid); in add_rfc_sdp_by_uuid() 411 if (uuid == UUID_OBEX_OBJECT_PUSH) { in add_rfc_sdp_by_uuid() 413 } else if (uuid == UUID_PBAP_PSE) { in add_rfc_sdp_by_uuid() 416 } else if (uuid == UUID_SPP) { in add_rfc_sdp_by_uuid() 418 } else if (uuid == UUID_MAP_MAS) { in add_rfc_sdp_by_uuid() [all …]
|
/system/bt/bta/gatt/ |
D | database.cc | 58 << ", uuid=" << service.uuid << "\n"; in ToString() 63 << ", end_handle=" << loghex(is.end_handle) << ", uuid=" << is.uuid in ToString() 70 << ", value_handle=" << loghex(c.value_handle) << ", uuid=" << c.uuid in ToString() 75 << ", uuid=" << d.uuid << "\n"; in ToString() 91 {.service = {.uuid = service.uuid, in Serialize() 101 .uuid = p_isvc.uuid}}}); in Serialize() 110 .uuid = charac.uuid}}}); in Serialize() 113 nv_attr.push_back({desc.handle, desc.uuid, {}}); in Serialize() 134 .uuid = attr.value.service.uuid}); in Deserialize() 166 .uuid = attr.value.included_service.uuid, in Deserialize() [all …]
|
D | database_builder.cc | 31 const Uuid& uuid, bool is_primary) { in AddService() argument 38 .uuid = uuid}); in AddService() 51 .uuid = uuid}); in AddService() 57 void DatabaseBuilder::AddIncludedService(uint16_t handle, const Uuid& uuid, in AddIncludedService() argument 69 AddService(start_handle, end_handle, uuid, false /* not primary */); in AddIncludedService() 74 .uuid = uuid, in AddIncludedService() 81 const Uuid& uuid, uint8_t properties) { in AddCharacteristic() argument 97 .uuid = uuid}); in AddCharacteristic() 101 void DatabaseBuilder::AddDescriptor(uint16_t handle, const Uuid& uuid) { in AddDescriptor() argument 122 gatt::Descriptor{.handle = handle, .uuid = uuid}); in AddDescriptor()
|
D | database.h | 41 bluetooth::Uuid uuid; member 49 bluetooth::Uuid uuid; member 56 bluetooth::Uuid uuid; member 69 bluetooth::Uuid uuid; member 78 bluetooth::Uuid uuid; member 85 bluetooth::Uuid uuid; member 93 bluetooth::Uuid uuid; member
|
/system/bt/binder/android/os/ |
D | parcel_uuid.cc | 28 static uint64_t uuid_lsb(const Uuid& uuid) { in uuid_lsb() argument 31 auto uu = uuid.To128BitBE(); in uuid_lsb() 40 static uint64_t uuid_msb(const Uuid& uuid) { in uuid_msb() argument 43 auto uu = uuid.To128BitBE(); in uuid_msb() 54 status_t status = parcel->writeInt64(uuid_msb(uuid)); in writeToParcel() 57 status = parcel->writeInt64(uuid_lsb(uuid)); in writeToParcel() 76 uuid = Uuid::From128BitBE(uu); in readFromParcel()
|
/system/bt/stack/gap/ |
D | gap_ble.cc | 34 uint16_t uuid; member 49 uint16_t uuid; member 126 if (db_attr.uuid != GATT_UUID_GAP_DEVICE_NAME && is_long) in read_attr_value() 129 switch (db_attr.uuid) { in read_attr_value() 244 uint16_t uuid = req.uuid; in send_cl_read_request() local 250 param.service.uuid = Uuid::From16Bit(uuid); in send_cl_read_request() 256 clcb.cl_op_uuid = uuid; in send_cl_read_request() 356 bool accept_client_operation(const RawAddress& peer_bda, uint16_t uuid, in accept_client_operation() argument 358 if (p_cback == NULL && uuid != GATT_UUID_GAP_PREF_CONN_PARAM) return false; in accept_client_operation() 366 << StringPrintf(" cl_op_uuid: 0x%04x", uuid); in accept_client_operation() [all …]
|
/system/bt/stack/gatt/ |
D | gatt_db.cc | 43 static tGATT_ATTR& allocate_attr_in_db(tGATT_SVC_DB& db, const Uuid& uuid, 64 Uuid uuid = in gatts_init_service_db() local 66 tGATT_ATTR& attr = allocate_attr_in_db(db, uuid, GATT_PERM_READ); in gatts_init_service_db() 68 attr.p_value->uuid = service_uuid; in gatts_init_service_db() 76 return &p_db->attr_list[0].p_value->uuid; in gatts_get_service_uuid() 124 if (read_long && attr.uuid.Is16Bit()) { in gatts_check_attr_readability() 125 switch (attr.uuid.As16Bit()) { in gatts_check_attr_readability() 169 VLOG(1) << __func__ << " uuid=" << attr16.uuid in read_attr_value() 177 if (!attr16.uuid.Is16Bit()) { in read_attr_value() 182 uint16_t uuid16 = attr16.uuid.As16Bit(); in read_attr_value() [all …]
|
/system/bt/btif/include/ |
D | btif_profile_queue.h | 32 typedef bt_status_t (*btif_connect_cb_t)(RawAddress* bda, uint16_t uuid); 34 bt_status_t btif_queue_connect(uint16_t uuid, const RawAddress* bda, 36 void btif_queue_cleanup(uint16_t uuid);
|