From 5e84f788695c88afff1eb248e8f0190629d11df7 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Mon, 28 Jan 2013 18:11:02 -0300 Subject: bluez5: Add bt_bacpy() Adds a copy of BlueZ bacpy() function. --- plugins/bluez5.c | 6 ++++++ plugins/bluez5.h | 2 ++ 2 files changed, 8 insertions(+) (limited to 'plugins') diff --git a/plugins/bluez5.c b/plugins/bluez5.c index d471454d..876ad2de 100644 --- a/plugins/bluez5.c +++ b/plugins/bluez5.c @@ -26,6 +26,7 @@ #include #include #include +#include #include @@ -39,6 +40,11 @@ #define BLUEZ_PROFILE_MGMT_INTERFACE BLUEZ_SERVICE ".ProfileManager1" +void bt_bacpy(bdaddr_t *dst, const bdaddr_t *src) +{ + memcpy(dst, src, sizeof(bdaddr_t)); +} + static void profile_register_cb(DBusPendingCall *call, gpointer user_data) { DBusMessage *reply; diff --git a/plugins/bluez5.h b/plugins/bluez5.h index fd0704e5..3921c7b6 100644 --- a/plugins/bluez5.h +++ b/plugins/bluez5.h @@ -56,6 +56,8 @@ struct sockaddr_sco { bdaddr_t sco_bdaddr; }; +void bt_bacpy(bdaddr_t *dst, const bdaddr_t *src); + int bluetooth_register_profile(DBusConnection *conn, const char *uuid, const char *name, const char *object); -- cgit v1.2.3