From 01e363a7080702b8dd0d9397fd083bb11599350b Mon Sep 17 00:00:00 2001 From: Oliver Ruiz Dorantes Date: Wed, 16 Apr 2008 22:17:55 +0000 Subject: [PATCH] - Reflect the APi change in the RemoteDevice - Implement function to compare Bluetooth Addresses git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24992 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/os/bluetooth/RemoteDevice.h | 2 +- headers/os/bluetooth/bdaddrUtils.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/headers/os/bluetooth/RemoteDevice.h b/headers/os/bluetooth/RemoteDevice.h index 23a0d97ae4..8220dc3d02 100644 --- a/headers/os/bluetooth/RemoteDevice.h +++ b/headers/os/bluetooth/RemoteDevice.h @@ -30,7 +30,7 @@ class RemoteDevice { bool IsTrustedDevice(); BString GetFriendlyName(bool alwaysAsk); /* Throwing */ - BString GetBluetoothAddress(); + bdaddr_t GetBluetoothAddress(); bool Equals(RemoteDevice* obj); /*static RemoteDevice* GetRemoteDevice(Connection conn); Throwing */ diff --git a/headers/os/bluetooth/bdaddrUtils.h b/headers/os/bluetooth/bdaddrUtils.h index 80f657f0a0..710c99458b 100644 --- a/headers/os/bluetooth/bdaddrUtils.h +++ b/headers/os/bluetooth/bdaddrUtils.h @@ -38,6 +38,12 @@ class bdaddrUtils { } + static bool Compare(bdaddr_t* ba1, bdaddr_t* ba2) + { + return (memcmp(ba1, ba2, sizeof(bdaddr_t)) == 0); + } + + static char* ToString(const bdaddr_t bdaddr) { // TODO: not safe