diff options
author | injun.yang <injun.yang@samsung.com> | 2017-08-16 14:19:16 +0900 |
---|---|---|
committer | injun.yang <injun.yang@samsung.com> | 2017-08-16 14:19:41 +0900 |
commit | f0ffcdf4fa62af083d9c8960ee630c5705102cba (patch) | |
tree | 26a6417f02361c2119f0fb04c66b2c569ae7d17f /src/bluetooth-common.c | |
parent | 988d621f1cfb674698c3b3d54ff6e18bb8650e7c (diff) | |
download | bluetooth-f0ffcdf4fa62af083d9c8960ee630c5705102cba.tar.gz bluetooth-f0ffcdf4fa62af083d9c8960ee630c5705102cba.tar.bz2 bluetooth-f0ffcdf4fa62af083d9c8960ee630c5705102cba.zip |
Debug message cleanup
Change-Id: I96efd109ee0bfe45da05f86ec77fdb35d92dd167
Signed-off-by: injun.yang <injun.yang@samsung.com>
Diffstat (limited to 'src/bluetooth-common.c')
-rw-r--r-- | src/bluetooth-common.c | 219 |
1 files changed, 1 insertions, 218 deletions
diff --git a/src/bluetooth-common.c b/src/bluetooth-common.c index f3a06a2..e79e2fc 100644 --- a/src/bluetooth-common.c +++ b/src/bluetooth-common.c @@ -100,222 +100,7 @@ int bt_get_uuid_name(const char *uuid, char **name) BT_CHECK_INPUT_PARAMETER(uuid); BT_CHECK_INPUT_PARAMETER(name); - int i; - int offset = 0; - int uuid_len = 4; - static struct { - const char *uuid; - const char *specification_name; - } bt_uuid_name[] = { - /* BT Classic Services */ - {"1101", "Serial Port Service"}, - {"1102", "LAN Access Using PPP Service"}, - {"1103", "Dialup Networking Service"}, - {"1104", "IrMCSync Service"}, - {"1105", "OBEX Object Push Service"}, - {"1106", "OBEX File Transfer Service"}, - {"1107", "IrMC Sync Command Service"}, - {"1108", "Headset Service"}, - {"1109", "Cordless Telephony Service"}, - {"110A", "Audio Source Service"}, - {"110B", "Audio Sink Service"}, - {"110C", "AV Remote Control Target Service"}, - {"110D", "Advanced Audio Distribution Profile"}, - {"110E", "AV Remote Control Service"}, - {"110F", "Video Conferencing Service"}, - {"1110", "Intercom Service"}, - {"1111", "Fax Service"}, - {"1112", "Headset Audio Gateway Service"}, - {"1113", "WAP Service"}, - {"1114", "WAP Client Service"}, - {"1115", "PANU Service"}, - {"1116", "NAP Service"}, - {"1117", "GN Service"}, - {"1118", "Direct Printing Service"}, - {"1119", "Reference Printing Service"}, - {"111A", "Basic Imaging Profile"}, - {"111B", "Imaging Responder Service"}, - {"111C", "Imaging Automatic Archive Service"}, - {"111D", "Imaging Reference Objects Service"}, - {"111E", "Handsfree Service"}, - {"111F", "Handsfree Audio Gateway Service"}, - {"1120", "Direct Printing Reference Objects Service"}, - {"1121", "Reflected UI Service"}, - {"1122", "Basic Printing Profile"}, - {"1123", "Printing Status Service"}, - {"1124", "Human Interface Device Service"}, - {"1125", "Hardcopy Cable Replacement Profile"}, - {"1126", "HCR Print Service"}, - {"1127", "HCR Scan Service"}, - {"112D", "SIM Access Service"}, - {"112E", "Phonebook Access PCE Service"}, - {"112F", "Phonebook Access PSE Service"}, - {"1130", "Phonebook Access Profile"}, - {"1132", "Message Access Server Service"}, - {"1133", "Message Notification Server Service"}, - {"1134", "Message Access Profile"}, - {"1200", "PnP Information Service"}, - {"1201", "Generic Networking Service"}, - {"1202", "Generic File Transfer Service"}, - {"1203", "Generic Audio Service"}, - {"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"}, - {"1801", "Generic Attribute"}, - {"1802", "Immediate Alert"}, - {"1803", "Link Loss"}, - {"1804", "Tx Power"}, - {"1805", "Current Time Service"}, - {"1806", "Reference Time Update Service"}, - {"1807", "Next DST Change Service"}, - {"1808", "Glucose"}, - {"1809", "Health Thermometer"}, - {"180A", "Device Information"}, - {"180D", "Heart Rate"}, - {"180F", "Battery Service"}, - {"1810", "Blood Pressure"}, - {"1811", "Alert Notification Service"}, - {"1812", "Human Interface Device"}, - {"1813", "Scan Parameters"}, - {"1814", "Running Speed and Cadence"}, - {"1815", "Automation IO"}, - {"1816", "Cycling Speed and Cadence"}, - {"1818", "Cycling Power"}, - {"1819", "Location and Navigation"}, - {"181A", "Environmental Sensing"}, - {"181B", "Body Composition"}, - {"181C", "User Data"}, - {"181D", "Weight Scale"}, - {"181E", "Bond Management"}, - {"181F", "Continuous Glucose Monitoring"}, - - /* GATT Declarations */ - {"2800", "Primary Service Declaration"}, - {"2801", "Secondary Service Declaration"}, - {"2802", "Include Declaration"}, - {"2803", "Characteristic Declaration"}, - - /* GATT Descriptors */ - {"2900", "Characteristic Extended Properties"}, - {"2901", "Characteristic User Description"}, - {"2902", "Client Characteristic Configuration"}, - {"2903", "Server Characteristic Configuration"}, - {"2904", "Characteristic Format"}, - {"2905", "Characteristic Aggregate Formate"}, - {"2906", "Valid Range"}, - {"2907", "External Report Reference"}, - {"2908", "Report Reference"}, - - /* GATT Characteristics */ - {"2A00", "Device Name"}, - {"2A01", "Appearance"}, - {"2A02", "Peripheral Privacy Flag"}, - {"2A03", "Reconnection Address"}, - {"2A04", "Peripheral Preferred Connection Parameters"}, - {"2A05", "Service Changed"}, - {"2A06", "Alert Level"}, - {"2A07", "Tx Power Level"}, - {"2A08", "Date Time"}, - {"2A09", "Day of Week"}, - {"2A0A", "Day Date Time"}, - {"2A11", "Time with DST"}, - {"2A12", "Time Accuracy"}, - {"2A13", "Time Source"}, - {"2A14", "Reference Time Information"}, - {"2A16", "Time Update Control Point"}, - {"2A17", "Time Update State"}, - {"2A18", "Glucose Measurement"}, - {"2A19", "Battery Level"}, - {"2A1C", "Temperature Measurement"}, - {"2A1D", "Temperature Type"}, - {"2A1E", "Intermediate Temperature"}, - {"2A21", "Measurement Interval"}, - {"2A23", "System ID"}, - {"2A24", "Model Number String"}, - {"2A25", "Serial Number String"}, - {"2A26", "Firmware Revision String"}, - {"2A27", "Hardware Revision String"}, - {"2A28", "Software Revision String"}, - {"2A29", "Manufacturer Name String"}, - {"2A2A", "IEEE 11073-20601 Regulatory Certification Data List"}, - {"2A2B", "Current Time"}, - {"2A34", "Glucose Measurement Context"}, - {"2A35", "Blood Pressure Measurement"}, - {"2A37", "Heart Rate Measurement"}, - {"2A38", "Body Sensor Location"}, - {"2A39", "Heart Rate Control Point"}, - {"2A3F", "Alert Status"}, - {"2A46", "New Alert"}, - {"2A49", "Blood Pressure Feature"}, - {"2A4A", "HID Information"}, - {"2A4C", "HID Control Point"}, - {"2A50", "PnP ID"}, - {"2A51", "Glucose Feature"}, - {"2A52", "Record Access Control Point"}, - {"2A53", "RSC Measurement"}, - {"2A54", "RSC Feature"}, - {"2A55", "SC Control Point"}, - {"2A56", "Digital"}, - {"2A58", "Analog"}, - {"2A5A", "Aggregate"}, - {"2A5B", "CSC Measurement"}, - {"2A5C", "CSC Feature"}, - {"2A5D", "Sensor Location"}, - {"2A63", "Cycling Power Measurement"}, - {"2A64", "Cycling Power Vector"}, - {"2A65", "Cycling Power Feature"}, - {"2A66", "Cycling Power Control Point"}, - {"2A67", "Location and Speed"}, - {"2A68", "Navigation"}, - {"2A6D", "Pressure"}, - {"2A6E", "Temperature"}, - - /* Custom uuids */ - {"7905F431-B5CE-4E99-A40F-4B1E122D00D0", "Apple Notification Center Service"}, - {"9FBF120D-6301-42D9-8C58-25E699A21DBD", "Notifications Source"}, - {"69D1D8F3-45E1-49A8-9821-9BBDFDAAD9D9", "Control Point"}, - {"22EAC6E9-24D6-4BB5-BE44-B36ACE7C7BFB", "Data Source"}, - {"89D3502B-0F36-433A-8EF4-C502AD55F8DC", "Apple Media Service"}, - {"9B3C81D8-57B1-4A8A-B8DF-0E56F7CA51C2", "Remote Command"}, - {"2F7CABCE-808D-411F-9A0C-BB92BA96C102", "Entity Update"}, - {"C6B2F38C-23AB-46D8-A6AB-A3A870BBD5D7", "Entity Attribute"}, - {"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} - }; - - if (strlen(uuid) == 36) { - if (!g_ascii_strncasecmp(uuid + 9, "0000-1000-8000-00805F9B34FB", 27)) - offset = 4; - else { - offset = 0; - uuid_len = 36; - } - } else if (strlen(uuid) >= 8) - offset = 4; - - for (i = 0; bt_uuid_name[i].uuid; i++) { - if (!g_ascii_strncasecmp(uuid + offset, bt_uuid_name[i].uuid, uuid_len)) { - *name = g_strdup(bt_uuid_name[i].specification_name); - return BT_ERROR_NONE; - } - } - - *name = g_strdup("Unknown"); - return BT_ERROR_NONE; + return _bt_get_error_code(bluetooth_get_uuid_name(uuid, name)); } /* @@ -2127,7 +1912,6 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us break; /* goto default */ } case BLUETOOTH_EVENT_GATT_CHAR_VAL_CHANGED: - BT_INFO("BLUETOOTH_EVENT_GATT_CHAR_VAL_CHANGED"); char_val = (bt_gatt_char_value_t *)(param->param_data); if (TIZEN_FEATURE_ENABLE_LEGACY_GATT_CLIENT && _bt_gatt_is_legacy_client_mode()) { @@ -3155,7 +2939,6 @@ static int __bt_get_bt_adapter_device_discovery_info_s(bt_adapter_device_discove if ((*discovery_info)->service_uuid[i] != NULL) __bt_convert_lower_to_upper((*discovery_info)->service_uuid[i]); - BT_INFO("UUID: %s", (*discovery_info)->service_uuid[i]); } } } else |