+static GVariant* __bt_hid_agent_dbus_send(const char *path,
+ const char *interface, const char *method,
+ GError **err, GVariant *parameters)
+{
+ GVariant *reply = NULL;
+ GDBusProxy *proxy = NULL;
+ GDBusConnection *conn = NULL;
+
+ conn = _bt_gdbus_get_system_gconn();
+ retv_if(conn == NULL, NULL);
+
+ proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_NONE,
+ NULL, BT_HID_SERVICE_NAME, path, interface, NULL, err);
+ if (proxy == NULL) {
+ BT_ERR("Unable to allocate new proxy");
+ return NULL;
+ }
+
+ reply = g_dbus_proxy_call_sync(proxy, method, parameters,
+ G_DBUS_CALL_FLAGS_NONE, -1, NULL, err);
+
+ g_object_unref(proxy);
+ return reply;
+}
+