summaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/main.cc b/src/main.cc
index 5a6f86e..ce20aee 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -280,8 +280,22 @@ class BluetoothManagerDelegate : public bt::Manager::Delegate, public Api {
void agent_authorize_service(bt::Device& device, std::string const& uuid,
std::function<void(bool)> callback) override {
- logger_.dbg(std::format("Device request authorize service: {} {}",
+ if (uuid == "0000110d-0000-1000-8000-00805f9b34fb") {
+ // Advanced Audio Distribution Profile
+ callback(true);
+ return;
+ }
+ if (uuid == "0000111e-0000-1000-8000-00805f9b34fb") {
+ // Hands-Free Service Class and Profile
+ // Not interrested.
+ callback(false);
+ return;
+ }
+
+ logger_.dbg(std::format("Device request authorize unknown service: {} {}",
device.name(), uuid));
+
+ // Do not authorize unknown services.
callback(false);
}