+static void __bt_hal_handle_avrcp_transport_events(GVariant *msg, const char *member,
+ const char *path)
+{
+ const char *property = NULL;
+ GVariant *value = NULL;
+ GVariantIter iter;
+ char address[BT_HAL_ADDRESS_STRING_SIZE];
+ DBG("+");
+
+ if (!msg) {
+ ERR("Error returned in method call\n");
+ return;
+ }
+
+ if (!avrcp_tg_event_cb) {
+ ERR("AVRCP target DBUS handler callback not registered");
+ return;
+ }
+
+ g_variant_iter_init(&iter, msg);
+
+ _bt_hal_convert_device_path_to_address(path, address);
+
+ while (g_variant_iter_loop(&iter, "{sv}", &property, &value)) {
+ DBG("Property = %s \n", property);
+ if ((strcasecmp(property, "Delay") == 0)) {
+ struct hal_ev_avrcp_tg_delay_changed ev;
+ uint16_t val;
+
+ memset(&ev, 0, sizeof(ev));
+ _bt_hal_convert_addr_string_to_type(ev.bdaddr, address);
+
+ val = g_variant_get_uint16(value);
+ DBG("Value : %d", val);
+ ev.value = val;
+
+ /* Send event to application */
+ avrcp_tg_event_cb(HAL_EV_AVRCP_TG_DELAY_CHANGE, &ev, sizeof(ev));
+ } else {
+ DBG("Property not handled");
+ }
+ }
+
+ DBG("-");
+ g_free((char *)property);
+ g_variant_unref(value);
+}
+