From a91d0ccb4f6a64dc63d13926765fc8d2c1c58c63 Mon Sep 17 00:00:00 2001 From: Injun Yang Date: Tue, 10 Jan 2017 14:51:21 +0900 Subject: [PATCH] Fix the typo and add service information Change-Id: I4fc7675ac83cf421b687e2b52bf1792f4812849e Signed-off-by: Injun Yang --- bt-service/bt-service-common.c | 18 +++++++++++++----- bt-service/include/bt-service-common.h | 8 ++++---- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/bt-service/bt-service-common.c b/bt-service/bt-service-common.c index 0a272ab..54e3e39 100644 --- a/bt-service/bt-service-common.c +++ b/bt-service/bt-service-common.c @@ -674,7 +674,7 @@ char *_bt_get_profile_uuid128(bt_profile_type_t profile_type) }; } -char * _bt_convert_uuid_to_string(const char *uuid) +const char *_bt_convert_uuid_to_string(const char *uuid) { if (!uuid) return NULL; @@ -689,7 +689,7 @@ char * _bt_convert_uuid_to_string(const char *uuid) /* BT Classic Services */ {"1101", "Serial Port Service"}, {"1102", "LAN Access Using PPP Service"}, - {"1103", "Dialup Netwworking Service"}, + {"1103", "Dialup Networking Service"}, {"1104", "IrMCSync Service"}, {"1105", "OBEX Object Push Service"}, {"1106", "OBEX File Transfer Service"}, @@ -729,7 +729,7 @@ char * _bt_convert_uuid_to_string(const char *uuid) {"112D", "SIM Access Service"}, {"112E", "Phonebook Access PCE Service"}, {"112F", "Phonebook Access PSE Service"}, - {"1130", "Phonebook Access Profile"}, + {"1130", "Phonebook Access Profile"}, {"1132", "Message Access Server Service"}, {"1133", "Message Notification Server Service"}, {"1134", "Message Access Profile"}, @@ -740,7 +740,12 @@ char * _bt_convert_uuid_to_string(const char *uuid) {"1204", "Generic Telephony Service"}, {"1205", "UPnP Service"}, {"1206", "UPnP Ip Service"}, + {"1303", "Video Source Service"}, + {"1304", "Video Sink Service"}, + {"1305", "Video Distribution Profile"}, {"1400", "Health Device Profile"}, + {"1401", "HDP Source Service"}, + {"1402", "HDP Sink Service"}, /* GATT Services */ {"1800", "Generic Access"}, @@ -820,6 +825,9 @@ char * _bt_convert_uuid_to_string(const char *uuid) {"9A3F68E0-86CE-11E5-A309-0002A5D5C51B", "Samsung Gear Manager Service"}, {"c2f2cc0f-c085-4dd4-be5a-aca3074bbc72", "Control Point"}, {"cece518b-28d7-4171-92d5-76a1e249a3b9", "Notifications Source"}, + {"32D1955A-E5AA-4A96-9A49-08538DA8B8F6", "Samsung Gear Fit Manager Service"}, + {"FE53FF98-B259-4337-B56A-0EC9F82C6BAD", "Control Point"}, + {"C2051EE0-804D-4D50-A12C-15E243852100", "Notifications Source"}, {NULL, NULL} }; @@ -841,7 +849,7 @@ char * _bt_convert_uuid_to_string(const char *uuid) return "Unknown"; } -char *_bt_convert_error_to_string(int error) +const char *_bt_convert_error_to_string(int error) { switch (error) { case BLUETOOTH_ERROR_CANCEL: @@ -924,7 +932,7 @@ char *_bt_convert_error_to_string(int error) } } -char * _bt_convert_disc_reason_to_string(int reason) +const char *_bt_convert_disc_reason_to_string(int reason) { switch (reason) { case (int)BLUETOOTH_ERROR_PAGE_TIMEOUT: diff --git a/bt-service/include/bt-service-common.h b/bt-service/include/bt-service-common.h index f5229a9..0ba90b5 100755 --- a/bt-service/include/bt-service-common.h +++ b/bt-service/include/bt-service-common.h @@ -275,12 +275,12 @@ typedef enum { BT_PROFILE_STATE_DISCONNECTING, } bt_profile_state_t; -/* Profile type matched to bluetooth_service_type_t of bluetooth-api.h */ typedef enum { BT_ADV_IND_INFO = 0x00, BT_SCAN_RSP_INFO = 0x01, } bt_le_device_info_type_t; +/* Profile type matched to bluetooth_service_type_t of bluetooth-api.h */ typedef enum { BT_PROFILE_CONN_RFCOMM = 0x01, BT_PROFILE_CONN_A2DP = 0x02, @@ -355,11 +355,11 @@ char *_bt_get_device_object_path(char *address); char *_bt_get_profile_uuid128(bt_profile_type_t profile_type); -char * _bt_convert_uuid_to_string(const char *uuid); +const char *_bt_convert_uuid_to_string(const char *uuid); -char *_bt_convert_error_to_string(int error); +const char *_bt_convert_error_to_string(int error); -char * _bt_convert_disc_reason_to_string(int reason); +const char *_bt_convert_disc_reason_to_string(int reason); void _bt_logging_connection(gboolean connect, int addr_type); -- 2.7.4