From: DoHyun Pyun Date: Mon, 2 Jul 2018 04:57:41 +0000 (+0900) Subject: Modify the hid agent for gtest X-Git-Tag: accepted/tizen/unified/20180813.061325~11 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fconnectivity%2Fbluetooth-agent.git;a=commitdiff_plain;h=3f0ba2fb008372f38f1cefaef3852bf057bdfb90 Modify the hid agent for gtest Change-Id: I6e94e957e778a213c59f9f5a5875c11765f04af2 Signed-off-by: DoHyun Pyun --- diff --git a/hid-agent/bluetooth-hid-agent.c b/hid-agent/bluetooth-hid-agent.c index 422a8d0..f1790c1 100644 --- a/hid-agent/bluetooth-hid-agent.c +++ b/hid-agent/bluetooth-hid-agent.c @@ -607,28 +607,6 @@ static void __bt_hid_agent_filter_cb(GDBusConnection *connection, FN_END; } -void _bt_convert_device_path_to_address(const char *device_path, - char *device_address) -{ - char address[BT_ADDRESS_STRING_SIZE] = { 0 }; - char *dev_addr; - - ret_if(device_path == NULL); - ret_if(device_address == NULL); - - dev_addr = strstr(device_path, "dev_"); - if (dev_addr != NULL) { - char *pos = NULL; - dev_addr += 4; - g_strlcpy(address, dev_addr, sizeof(address)); - - while ((pos = strchr(address, '_')) != NULL) - *pos = ':'; - - g_strlcpy(device_address, address, BT_ADDRESS_STRING_SIZE); - } -} - static void __bt_hid_device_filter_cb(GDBusConnection *connection, const gchar *sender_name, const gchar *object_path, diff --git a/hid-agent/bluetooth-hid-agent.h b/hid-agent/bluetooth-hid-agent.h index 3a277a8..d09fdb0 100644 --- a/hid-agent/bluetooth-hid-agent.h +++ b/hid-agent/bluetooth-hid-agent.h @@ -151,17 +151,6 @@ typedef struct { char *path; } bt_hid_agent_info_t; -typedef struct { - unsigned char b[6]; -} __attribute__((packed)) bdaddr_t; - -/* Remote socket address */ -struct sockaddr_remote { - sa_family_t family; - bdaddr_t remote_bdaddr; - uint8_t channel; -}; - bt_hid_agent_error_t _bt_hid_disconnect_profile(void); #ifdef __cplusplus diff --git a/hid-agent/bluetooth-hid-manager.h b/hid-agent/bluetooth-hid-manager.h index e4b09d7..218cd17 100644 --- a/hid-agent/bluetooth-hid-manager.h +++ b/hid-agent/bluetooth-hid-manager.h @@ -24,7 +24,10 @@ extern "C" { #endif +#include "bluetooth-hid-agent.h" + void _bt_hid_set_profile_state(bt_hid_state_t new_state); +bt_hid_state_t _bt_hid_get_profile_state(void); bt_hid_agent_error_t _bt_hid_register_application(gboolean register_flag, const char *sender_name); const GSList* _bt_hid_get_sender_list(void);