/system/core/trusty/coverage/ |
D | uuid.cpp | 31 bool str_to_uuid(const char* str, struct uuid* uuid) { in str_to_uuid() argument 33 static_assert(sizeof(uu) == sizeof(*uuid)); in str_to_uuid() 39 memcpy(uuid, uu, sizeof(*uuid)); in str_to_uuid() 40 uuid->time_low = reverse_u32(uuid->time_low); in str_to_uuid() 41 uuid->time_mid = reverse_u16(uuid->time_mid); in str_to_uuid() 42 uuid->time_hi_and_version = reverse_u16(uuid->time_hi_and_version); in str_to_uuid()
|
/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/gd/hci/ |
D | uuid_unittest.cc | 65 auto uuid = Uuid::FromString("1ae8"); in TEST() local 66 ASSERT_TRUE(uuid); in TEST() 67 ASSERT_TRUE(uuid->Is16Bit()); in TEST() 74 Uuid uuid = Uuid::From16Bit(0x0001); in TEST() local 75 ASSERT_TRUE(memcmp(uuid.data(), u2, sizeof(u2)) == 0); in TEST() 78 uuid = Uuid::From16Bit(0x553e); in TEST() 79 ASSERT_TRUE(memcmp(uuid.data(), u3, sizeof(u3)) == 0); in TEST() 82 uuid = Uuid::From16Bit(0xffff); in TEST() 83 ASSERT_TRUE(memcmp(uuid.data(), u4, sizeof(u4)) == 0); in TEST() 90 Uuid uuid = Uuid::From32Bit(0x00000001); in TEST() local [all …]
|
D | uuid.cc | 62 std::optional<Uuid> Uuid::FromString(const std::string& uuid) { in FromString() argument 63 if (uuid.empty()) { in FromString() 69 if (uuid.size() == kString128BitLen) { in FromString() 70 if (uuid[8] != '-' || uuid[13] != '-' || uuid[18] != '-' || uuid[23] != '-') { in FromString() 76 uuid.c_str(), in FromString() 103 } else if (uuid.size() == 8) { in FromString() 105 int rc = sscanf(uuid.c_str(), "%02hhx%02hhx%02hhx%02hhx%n", &p[0], &p[1], &p[2], &p[3], &c); in FromString() 113 } else if (uuid.size() == 4) { in FromString() 115 int rc = sscanf(uuid.c_str(), "%02hhx%02hhx%n", &p[2], &p[3], &c); in FromString() 129 std::optional<Uuid> Uuid::FromLegacyConfigString(const std::string& uuid) { in FromLegacyConfigString() argument [all …]
|
D | uuid.h | 64 static std::optional<Uuid> FromString(const std::string& uuid); 65 static std::optional<Uuid> FromLegacyConfigString(const std::string& uuid); 96 static Uuid From128BitBE(const UUID128Bit& uuid) { in From128BitBE() argument 97 Uuid u(uuid); in From128BitBE() 103 static Uuid From128BitBE(const uint8_t* uuid); 106 static Uuid From128BitLE(const UUID128Bit& uuid); 110 static Uuid From128BitLE(const uint8_t* uuid);
|
/system/bt/stack/gatt/ |
D | gatt_sr_hash.cc | 34 if (attr_it->uuid == Uuid::From16Bit(GATT_UUID_PRI_SERVICE) || in calculate_database_info_size() 35 attr_it->uuid == Uuid::From16Bit(GATT_UUID_SEC_SERVICE)) { in calculate_database_info_size() 37 len += 4 + gatt_build_uuid_to_stream_len(attr_it->p_value->uuid); in calculate_database_info_size() 38 } else if (attr_it->uuid == Uuid::From16Bit(GATT_UUID_INCLUDE_SERVICE)){ in calculate_database_info_size() 41 } else if (attr_it->uuid == Uuid::From16Bit(GATT_UUID_CHAR_DECLARE)) { in calculate_database_info_size() 43 len += 7 + gatt_build_uuid_to_stream_len((++attr_it)->uuid); in calculate_database_info_size() 44 } else if (attr_it->uuid == Uuid::From16Bit(GATT_UUID_CHAR_DESCRIPTION) || in calculate_database_info_size() 45 attr_it->uuid == Uuid::From16Bit(GATT_UUID_CHAR_CLIENT_CONFIG) || in calculate_database_info_size() 46 attr_it->uuid == Uuid::From16Bit(GATT_UUID_CHAR_SRVR_CONFIG) || in calculate_database_info_size() 47 attr_it->uuid == Uuid::From16Bit(GATT_UUID_CHAR_PRESENT_FORMAT) || in calculate_database_info_size() [all …]
|
D | gatt_db.cc | 45 static tGATT_ATTR& allocate_attr_in_db(tGATT_SVC_DB& db, const Uuid& uuid, 66 Uuid uuid = in gatts_init_service_db() local 68 tGATT_ATTR& attr = allocate_attr_in_db(db, uuid, GATT_PERM_READ); in gatts_init_service_db() 70 attr.p_value->uuid = service_uuid; in gatts_init_service_db() 78 return &p_db->attr_list[0].p_value->uuid; in gatts_get_service_uuid() 126 if (read_long && attr.uuid.Is16Bit()) { in gatts_check_attr_readability() 127 switch (attr.uuid.As16Bit()) { in gatts_check_attr_readability() 171 VLOG(1) << __func__ << " uuid=" << attr16.uuid in read_attr_value() 179 if (!attr16.uuid.Is16Bit()) { in read_attr_value() 184 uint16_t uuid16 = attr16.uuid.As16Bit(); in read_attr_value() [all …]
|
/system/bt/bta/gatt/ |
D | database.cc | 46 static size_t UuidSize(const Uuid& uuid) { in UuidSize() argument 47 size_t len = uuid.GetShortestRepresentationSize(); in UuidSize() 66 << ", uuid=" << service.uuid << "\n"; in ToString() 71 << ", end_handle=" << loghex(is.end_handle) << ", uuid=" << is.uuid in ToString() 78 << ", value_handle=" << loghex(c.value_handle) << ", uuid=" << c.uuid in ToString() 83 << ", uuid=" << d.uuid << "\n"; in ToString() 99 {.service = {.uuid = service.uuid, in Serialize() 109 .uuid = p_isvc.uuid}}}); in Serialize() 118 .uuid = charac.uuid}}}); in Serialize() 121 if (desc.uuid == CHARACTERISTIC_EXTENDED_PROPERTIES) { in Serialize() [all …]
|
D | database_builder.cc | 38 const Uuid& uuid, bool is_primary) { in AddService() argument 44 .uuid = uuid, in AddService() 59 .uuid = uuid, in AddService() 68 void DatabaseBuilder::AddIncludedService(uint16_t handle, const Uuid& uuid, in AddIncludedService() argument 80 AddService(start_handle, end_handle, uuid, false /* not primary */); in AddIncludedService() 85 .uuid = uuid, in AddIncludedService() 92 const Uuid& uuid, uint8_t properties) { in AddCharacteristic() argument 106 .uuid = uuid, in AddCharacteristic() 113 void DatabaseBuilder::AddDescriptor(uint16_t handle, const Uuid& uuid) { in AddDescriptor() argument 134 gatt::Descriptor{.handle = handle, .uuid = uuid}); in AddDescriptor() [all …]
|
D | database.h | 42 bluetooth::Uuid uuid; member 50 bluetooth::Uuid uuid; member 57 bluetooth::Uuid uuid; member 72 bluetooth::Uuid uuid; member 81 bluetooth::Uuid uuid; member 88 bluetooth::Uuid uuid; member 96 bluetooth::Uuid uuid; member
|
/system/bt/types/bluetooth/ |
D | uuid.cc | 62 Uuid Uuid::FromString(const std::string& uuid, bool* is_valid) { in FromString() argument 66 if (uuid.empty()) return ret; in FromString() 69 if (uuid.size() == kString128BitLen) { in FromString() 70 if (uuid[8] != '-' || uuid[13] != '-' || uuid[18] != '-' || in FromString() 71 uuid[23] != '-') { in FromString() 77 sscanf(uuid.c_str(), in FromString() 86 } else if (uuid.size() == 8) { in FromString() 88 int rc = sscanf(uuid.c_str(), "%02hhx%02hhx%02hhx%02hhx%n", &p[0], &p[1], in FromString() 94 } else if (uuid.size() == 4) { in FromString() 96 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); 110 void UpdateUuid(const Uuid& 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, false) != BT_STATUS_SUCCESS) in RegisterInstance() 73 pending_calls_[uuid] = callback; in RegisterInstance() 81 Uuid uuid(app_uuid); in RegisterClientCallback() local 83 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() 191 base::Unretained(this), callback, uuid)); in RegisterInstance() 193 pending_calls_.insert(uuid); in RegisterInstance() 201 Uuid uuid(app_uuid); in RegisterScannerCallback() local 203 VLOG(1) << __func__ << " - Uuid: " << uuid.ToString(); in RegisterScannerCallback() [all …]
|
D | low_energy_client.cc | 37 LowEnergyClient::LowEnergyClient(Adapter& adapter, const Uuid& uuid, in LowEnergyClient() argument 40 app_identifier_(uuid), in LowEnergyClient() 211 const Uuid& uuid, const RegisterCallback& callback) { in RegisterInstance() argument 212 VLOG(1) << __func__ << " - Uuid: " << uuid.ToString(); in RegisterInstance() 215 if (pending_calls_.find(uuid) != pending_calls_.end()) { in RegisterInstance() 217 << "Uuid: " << uuid.ToString(); in RegisterInstance() 224 if (hal_iface->register_client(uuid, false) != BT_STATUS_SUCCESS) in RegisterInstance() 227 pending_calls_[uuid] = callback; in RegisterInstance() 235 Uuid uuid(app_uuid); in RegisterClientCallback() local 237 VLOG(1) << __func__ << " - Uuid: " << uuid.ToString(); in RegisterClientCallback() [all …]
|
/system/bt/service/common/android/bluetooth/ |
D | scan_filter.cc | 44 std::optional<UUID> uuid; in writeToParcel() local 47 uuid = *service_uuid_; in writeToParcel() 49 status = parcel->writeNullableParcelable(uuid); in writeToParcel() 52 uuid.reset(); in writeToParcel() 54 uuid = *service_uuid_mask_; in writeToParcel() 56 status = parcel->writeNullableParcelable(uuid); in writeToParcel() 71 UUID uuid; in readFromParcel() local 72 status = parcel->readParcelable(&uuid); in readFromParcel() 74 service_uuid_.reset(new ::bluetooth::Uuid(uuid.uuid)); in readFromParcel() 76 status = parcel->readParcelable(&uuid); in readFromParcel() [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;
|
/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 …]
|
/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 …]
|
/system/bt/btif/src/ |
D | btif_profile_queue.cc | 50 ConnectNode(const RawAddress& address, uint16_t uuid, in ConnectNode() argument 52 : address_(address), uuid_(uuid), busy_(false), connect_cb_(connect_cb) {} in ConnectNode() 61 uint16_t uuid() const { return uuid_; } in uuid() function in ConnectNode 95 static void queue_int_add(uint16_t uuid, const RawAddress& bda, in queue_int_add() argument 100 ConnectNode param(bda, uuid, connect_cb); in queue_int_add() 102 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("%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 | 145 static int add_sdp_by_uuid(const char* name, const Uuid& uuid, in add_sdp_by_uuid() argument 148 uuid.ToString().c_str(), channel, name); in add_sdp_by_uuid() 177 { ARRAY_TO_BE_STREAM(tmp, uuid.To128BitBE().data(), UUID_MAX_LENGTH); } in add_sdp_by_uuid() 190 tBTA_CUSTOM_UUID curr = {uuid, handle}; in add_sdp_by_uuid() 380 static int add_rfc_sdp_by_uuid(const char* name, const Uuid& uuid, in add_rfc_sdp_by_uuid() argument 383 uuid.ToString().c_str(), name, channel); in add_rfc_sdp_by_uuid() 397 int final_channel = get_reserved_rfc_channel(uuid); in add_rfc_sdp_by_uuid() 405 if (uuid == UUID_OBEX_OBJECT_PUSH) { in add_rfc_sdp_by_uuid() 407 } else if (uuid == UUID_PBAP_PSE) { in add_rfc_sdp_by_uuid() 410 } else if (uuid == UUID_SPP) { in add_rfc_sdp_by_uuid() [all …]
|
/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 | 37 uint16_t uuid; member 52 uint16_t uuid; member 131 if (db_attr.uuid != GATT_UUID_GAP_DEVICE_NAME && is_long) in read_attr_value() 134 switch (db_attr.uuid) { in read_attr_value() 249 uint16_t uuid = req.uuid; in send_cl_read_request() local 255 param.service.uuid = Uuid::From16Bit(uuid); in send_cl_read_request() 261 clcb.cl_op_uuid = uuid; in send_cl_read_request() 367 bool accept_client_operation(const RawAddress& peer_bda, uint16_t uuid, in accept_client_operation() argument 369 if (p_cback == NULL && uuid != GATT_UUID_GAP_PREF_CONN_PARAM) return false; in accept_client_operation() 377 << StringPrintf(" cl_op_uuid: 0x%04x", uuid); in accept_client_operation() [all …]
|
/system/core/trusty/coverage/include/trusty/coverage/ |
D | coverage.h | 40 CoverageRecord(std::string tipc_dev, struct uuid* uuid); 46 CoverageRecord(std::string tipc_dev, struct uuid* uuid, std::string module_name); 73 struct uuid uuid_;
|