Add the SetAbsoluteVolume API for AVRCP controller
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / bt-avrcp.c
index 3196a90..02a6cf6 100644 (file)
@@ -456,6 +456,37 @@ BT_EXPORT_API int bluetooth_media_control_get_property(
        return result;
 }
 
+BT_EXPORT_API int bluetooth_media_transport_set_property(
+                                               media_transport_property_type type,
+                                               unsigned int value)
+{
+       int result;
+
+       BT_CHECK_ENABLED(return);
+
+#ifdef TIZEN_FEATURE_BT_DPM
+       if (_bt_check_dpm(BT_DPM_AVRCP, NULL) == BT_DPM_RESTRICTED) {
+               BT_ERR("Not allow to use AVRCP profile");
+               return BLUETOOTH_ERROR_DEVICE_POLICY_RESTRICTION;
+       }
+#endif
+
+       BT_INIT_PARAMS();
+       BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
+
+       g_array_append_vals(in_param1, &type, sizeof(int));
+       g_array_append_vals(in_param2, &value, sizeof(unsigned int));
+
+       result = _bt_send_request(BT_BLUEZ_SERVICE,
+                               BT_AVRCP_TRANSPORT_SET_PROPERTY,
+                               in_param1, in_param2, in_param3,
+                               in_param4, &out_param);
+
+       BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
+
+       return result;
+}
+
 BT_EXPORT_API int bluetooth_media_control_get_track_info(
                media_metadata_attributes_t *metadata)
 {