Modify the hid agent for gtest 54/183054/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 2 Jul 2018 04:57:41 +0000 (13:57 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 2 Jul 2018 04:59:08 +0000 (13:59 +0900)
Change-Id: I6e94e957e778a213c59f9f5a5875c11765f04af2
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
hid-agent/bluetooth-hid-agent.c
hid-agent/bluetooth-hid-agent.h
hid-agent/bluetooth-hid-manager.h

index 422a8d0..f1790c1 100644 (file)
@@ -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,
index 3a277a8..d09fdb0 100644 (file)
@@ -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
index e4b09d7..218cd17 100644 (file)
 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);