Modify the privilege for battry RX / TX function
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / bt-common.c
index d329b6c..2161643 100644 (file)
@@ -133,11 +133,11 @@ bt_user_info_t *_bt_get_user_data(int type)
        return &user_info[type];
 }
 
-int _bt_common_send_rfcomm_rx_details(bluetooth_rfcomm_received_data_t *data)
+int _bt_common_send_rfcomm_rx_details(int len)
 {
        uid_t uid = getuid();
        pid_t pid = getpid();
-       int size = data->buffer_size;
+       int size = len;
        int ret = BLUETOOTH_ERROR_NONE;
 
        BT_INFO("+");
@@ -175,14 +175,13 @@ int _bt_common_send_rfcomm_tx_details(int len)
                in_param1, in_param2, in_param3, in_param4, &out_param);
 
        BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
-       BT_DBG("-");
+       BT_INFO("-");
        return ret;
 }
 
 void _bt_common_event_cb(int event, int result, void *param,
                                        void *callback, void *user_data)
 {
-       BT_DBG("+");
        bluetooth_event_param_t bt_event = { 0, };
        bt_event.event = event;
        bt_event.result = result;
@@ -590,6 +589,9 @@ const char *_bt_convert_service_function_to_string(int function)
                {BT_SET_SPEAKER_GAIN, "BT_SET_SPEAKER_GAIN"},
                {BT_SET_CONTENT_PROTECT, "BT_SET_CONTENT_PROTECT"},
                {BT_AUDIO_SELECT_ROLE, "BT_AUDIO_SELECT_ROLE"},
+               {BT_AUDIO_SET_ABSOLUTE_VOLUME, "BT_AUDIO_SET_ABSOLUTE_VOLUME"},
+               {BT_AUDIO_GET_ABSOLUTE_VOLUME, "BT_AUDIO_GET_ABSOLUTE_VOLUME"},
+               {BT_AUDIO_IS_AVC_ACTIVATED, "BT_AUDIO_IS_AVC_ACTIVATED"},
                {BT_OOB_READ_LOCAL_DATA, "BT_OOB_READ_LOCAL_DATA"},
                {BT_OOB_ADD_REMOTE_DATA, "BT_OOB_ADD_REMOTE_DATA"},
                {BT_OOB_REMOVE_REMOTE_DATA, "BT_OOB_REMOVE_REMOTE_DATA"},
@@ -1403,7 +1405,7 @@ void _bt_print_api_caller_name(void)
 
        if (fgets(buf, 256, fp) != NULL) {
                str_list = g_strsplit(buf, " ", -1);
-               if (str_list[0] != '\0')
+               if (str_list[0] != NULL)
                        BT_INFO("Caller : %s", str_list[0]);
                g_strfreev(str_list);
        }
@@ -2493,6 +2495,8 @@ BT_EXPORT_API int bluetooth_unregister_callback(void)
 
        _bt_set_obex_server_id(BT_NO_SERVER);
 
+       _bt_reset_battery_monitor_info();
+
        _bt_gdbus_deinit_proxys();
 
        if (profile_gproxy) {
@@ -2507,4 +2511,3 @@ BT_EXPORT_API int bluetooth_unregister_callback(void)
 
        return BLUETOOTH_ERROR_NONE;
 }
-