Home
last modified time | relevance | path

Searched refs:cod (Results 1 – 25 of 34) sorted by relevance

12

/system/bt/gd/hci/
Dclass_of_device_unittest.cc30 ClassOfDevice cod(test_bytes); in TEST() local
32 ASSERT_EQ(test_bytes[0], cod.cod[0]); in TEST()
33 ASSERT_EQ(test_bytes[1], cod.cod[1]); in TEST()
34 ASSERT_EQ(test_bytes[2], cod.cod[2]); in TEST()
36 std::string ret = cod.ToString(); in TEST()
42 ClassOfDevice cod; in TEST() local
43 ClassOfDevice::FromString(test_class, cod); in TEST()
45 ASSERT_EQ(test_bytes[0], cod.cod[0]); in TEST()
46 ASSERT_EQ(test_bytes[1], cod.cod[1]); in TEST()
47 ASSERT_EQ(test_bytes[2], cod.cod[2]); in TEST()
[all …]
Dclass_of_device.cc38 std::copy(class_of_device, class_of_device + kLength, cod.data()); in ClassOfDevice()
43 …f(&buffer[0], sizeof(buffer), "%03x-%01x-%02x", (static_cast<uint16_t>(cod[2]) << 4) | cod[1] >> 4, in ToString()
44 cod[1] & 0x0f, cod[0]); in ToString()
89 new_cod.cod[0] = values[2]; in FromString()
90 new_cod.cod[1] = values[1] | ((values[0] & 0xf) << 4); in FromString()
91 new_cod.cod[2] = values[0] >> 4; in FromString()
111 result.cod[2] = static_cast<uint8_t>(cod_int); in FromUint32Legacy()
112 result.cod[1] = static_cast<uint8_t>(cod_int >> 8); in FromUint32Legacy()
113 result.cod[0] = static_cast<uint8_t>(cod_int >> 16); in FromUint32Legacy()
129 return (cod[2]) | (cod[1] << 8) | (cod[0] << 16); in ToUint32Legacy()
[all …]
Dclass_of_device.h36 std::array<uint8_t, kLength> cod = {}; variable
43 return cod.data(); in data()
46 return cod.data(); in data()
56 return cod < rhs.cod;
59 return cod == rhs.cod;
/system/bt/types/test/
Dclass_of_device_unittest.cc27 ClassOfDevice cod(test_bytes); in TEST() local
29 ASSERT_EQ(test_bytes[0], cod.cod[0]); in TEST()
30 ASSERT_EQ(test_bytes[1], cod.cod[1]); in TEST()
31 ASSERT_EQ(test_bytes[2], cod.cod[2]); in TEST()
33 std::string ret = cod.ToString(); in TEST()
39 ClassOfDevice cod; in TEST() local
40 ClassOfDevice::FromString(test_class, cod); in TEST()
42 ASSERT_EQ(test_bytes[0], cod.cod[0]); in TEST()
43 ASSERT_EQ(test_bytes[1], cod.cod[1]); in TEST()
44 ASSERT_EQ(test_bytes[2], cod.cod[2]); in TEST()
[all …]
/system/bt/types/
Dclass_of_device.cc31 std::copy(class_of_device, class_of_device + kLength, cod); in ClassOfDevice()
36 (static_cast<uint16_t>(cod[2]) << 4) | cod[1] >> 4, in ToString()
37 cod[1] & 0x0f, cod[0]); in ToString()
62 new_cod.cod[0] = values[2]; in FromString()
63 new_cod.cod[1] = values[1] | ((values[0] & 0xf) << 4); in FromString()
64 new_cod.cod[2] = values[0] >> 4; in FromString()
71 std::copy(from, from + kLength, cod); in FromOctets()
75 bool ClassOfDevice::IsValid(const std::string& cod) { in IsValid() argument
77 return ClassOfDevice::FromString(cod, tmp); in IsValid()
Dclass_of_device.h31 uint8_t cod[kLength]; variable
37 return (std::memcmp(cod, rhs.cod, sizeof(cod)) == 0);
/system/bt/service/hal/
Dbluetooth_interface.cc116 uint32_t cod, bool min_16_digit) { in PinRequestCallback() argument
120 << " - bd_name: " << bd_name << " - cod: " << cod in PinRequestCallback()
123 PinRequestCallback(remote_bd_addr, bd_name, cod, min_16_digit)); in PinRequestCallback()
127 uint32_t cod, bt_ssp_variant_t pairing_variant, in SSPRequestCallback() argument
132 << " - bd_name: " << bd_name << " - cod: " << cod in SSPRequestCallback()
134 FOR_EACH_BLUETOOTH_OBSERVER(SSPRequestCallback(remote_bd_addr, bd_name, cod, in SSPRequestCallback()
330 RawAddress* remote_bd_addr, bt_bdname_t* bd_name, uint32_t cod, in PinRequestCallback() argument
336 RawAddress* remote_bd_addr, bt_bdname_t* bd_name, uint32_t cod, in SSPRequestCallback() argument
Dbluetooth_interface.h64 bt_bdname_t* bd_name, uint32_t cod,
67 bt_bdname_t* bd_name, uint32_t cod,
/system/bt/vendor_libs/test_vendor_lib/model/devices/
Ddevice_properties.h137 class_of_device_.cod[0] = b0; in SetClassOfDevice()
138 class_of_device_.cod[1] = b1; in SetClassOfDevice()
139 class_of_device_.cod[2] = b2; in SetClassOfDevice()
143 class_of_device_.cod[0] = class_of_device & 0xff; in SetClassOfDevice()
144 class_of_device_.cod[1] = (class_of_device >> 8) & 0xff; in SetClassOfDevice()
145 class_of_device_.cod[2] = (class_of_device >> 16) & 0xff; in SetClassOfDevice()
/system/bt/btif/src/
Dbtif_util.cc65 uint32_t cod = 0; in devclass2uint() local
70 cod = (dev_class[2]) | (dev_class[1] << 8) | (dev_class[0] << 16); in devclass2uint()
72 return cod; in devclass2uint()
74 void uint2devclass(uint32_t cod, DEV_CLASS dev_class) { in uint2devclass() argument
75 dev_class[2] = (uint8_t)cod; in uint2devclass()
76 dev_class[1] = (uint8_t)(cod >> 8); in uint2devclass()
77 dev_class[0] = (uint8_t)(cod >> 16); in uint2devclass()
Dbtif_dm.cc315 …bluetooth::shim::BTIF_DM_SetUiCallback([](RawAddress address, bt_bdname_t bd_name, uint32_t cod, b… in btif_dm_init() argument
316 …_HERE, base::BindOnce([](RawAddress address, bt_bdname_t bd_name, uint32_t cod, bt_ssp_variant_t p… in btif_dm_init() argument
324 HAL_CBACK(bt_hal_cbacks, pin_request_cb, &address, &bd_name, cod, false); in btif_dm_init()
328 … HAL_CBACK(bt_hal_cbacks, ssp_request_cb, &address, &bd_name, cod, pairing_variant, pass_key); in btif_dm_init()
329 }, address, bd_name, cod, pairing_variant, pass_key)); in btif_dm_init()
478 bool check_cod(const RawAddress* remote_bdaddr, uint32_t cod) { in check_cod() argument
479 return get_cod(remote_bdaddr) == cod; in check_cod()
623 uint32_t cod; in btif_update_remote_properties() local
640 cod = devclass2uint(dev_class); in btif_update_remote_properties()
641 BTIF_TRACE_DEBUG("%s cod is 0x%06x", __func__, cod); in btif_update_remote_properties()
[all …]
Dbtif_sock_sdp.cc284 tBTA_UTL_COD cod; in add_ops_sdp() local
315 cod.service = BTM_COD_SERVICE_OBJ_TRANSFER; in add_ops_sdp()
317 if (!utl_set_device_class(&cod, BTA_UTL_SET_COD_SERVICE_CLASS)) goto error; in add_ops_sdp()
Dbtif_storage.cc463 int cod; in btif_in_fetch_bonded_devices() local
465 if (btif_config_get_int(name, "DevClass", &cod)) in btif_in_fetch_bonded_devices()
466 uint2devclass((uint32_t)cod, dev_class); in btif_in_fetch_bonded_devices()
997 uint32_t cod = 0; in btif_storage_load_bonded_devices() local
1013 &cod, sizeof(cod), in btif_storage_load_bonded_devices()
Dbtif_core.cc630 uint32_t cod, devtype; in btif_in_get_remote_device_properties() local
648 BT_PROPERTY_CLASS_OF_DEVICE, sizeof(cod), &cod); in btif_in_get_remote_device_properties()
Dbtif_sdp_server.cc676 tBTA_UTL_COD cod; in add_opps_sdp() local
747 cod.service = BTM_COD_SERVICE_OBJ_TRANSFER; in add_opps_sdp()
748 utl_set_device_class(&cod, BTA_UTL_SET_COD_SERVICE_CLASS); in add_opps_sdp()
/system/bt/service/common/android/bluetooth/
DIBluetoothCallback.aidl30 int cod, in OnSspRequest() argument
/system/bt/test/headless/
Dheadless.cc60 void pin_request(RawAddress* remote_bd_addr, bt_bdname_t* bd_name, uint32_t cod, in pin_request() argument
65 void ssp_request(RawAddress* remote_bd_addr, bt_bdname_t* bd_name, uint32_t cod, in ssp_request() argument
/system/bt/tools/bdtool/
Dadapter.c152 void ssp_request(RawAddress* remote_bd_addr, bt_bdname_t* bd_name, uint32_t cod, in ssp_request() argument
175 cod, pass_key, pairing_variant_name); in ssp_request()
/system/bt/service/ipc/binder/
Dbluetooth_binder_server.cc417 int cod, int pairing_variant, in OnSspRequest() argument
421 << ", device_name: " << device_name << ", cod: " << cod in OnSspRequest()
427 callbacks_.ForEach([&addr_s16, &name_s16, cod, pairing_variant, in OnSspRequest()
429 callback->OnSspRequest(addr_s16, name_s16, cod, pairing_variant, pass_key); in OnSspRequest()
Dbluetooth_binder_server.h136 const std::string& device_name, int cod,
/system/bt/include/hardware/
Dbluetooth.h349 bt_bdname_t* bd_name, uint32_t cod,
358 bt_bdname_t* bd_name, uint32_t cod,
/system/bt/service/
Dadapter.h78 const std::string& device_name, int cod,
Dadapter.cc166 const std::string& device_name, int cod, in OnSspRequest() argument
661 uint32_t cod, bt_ssp_variant_t pairing_variant, in SSPRequestCallback() argument
668 observer.OnSspRequest(this, device_address, name, cod, pairing_variant, in SSPRequestCallback()
/system/bt/bta/hh/
Dbta_hh_utils.cc214 uint8_t cod = (sub_class >> 2); /* lower two bits are reserved */ in bta_hh_tod_spt() local
217 if (cod == (uint8_t)p_bta_hh_cfg->p_devt_list[xx].tod) { in bta_hh_tod_spt()
/system/bt/bta/hf_client/
Dbta_hf_client_main.cc439 tBTA_UTL_COD cod; in bta_hf_client_api_enable() local
440 cod.service = BTM_COD_SERVICE_AUDIO; in bta_hf_client_api_enable()
441 utl_set_device_class(&cod, BTA_UTL_SET_COD_SERVICE_CLASS); in bta_hf_client_api_enable()

12