Fix BluetoothAdapter bug to enable Bluetooth Classic Advertising

PiperOrigin-RevId: 456609115
This commit is contained in:
aaronyujiaze
2022-06-22 14:28:52 -07:00
committed by Copybara-Service
parent 7046d24dfe
commit 75aa59d57e
3 changed files with 90 additions and 77 deletions
@@ -16,6 +16,7 @@
#define PLATFORM_IMPL_WINDOWS_BLUETOOTH_ADAPTER_H_
#include <guiddef.h>
#include <windows.h>
#include <functional>
#include <string>
@@ -77,6 +78,12 @@ class BluetoothAdapter : public api::BluetoothAdapter {
// Returns BT MAC address assigned to this adapter.
std::string GetMacAddress() const override;
// Returns bluetooth device name from registry
std::string GetNameFromRegistry(PHKEY hKey) const;
// Returns computer name
std::string GetNameFromComputerName() const;
void SetOnScanModeChanged(ScanModeCallback callback) {
if (scan_mode_changed_ == nullptr) {
scan_mode_changed_ = callback;