+
+ } else if (ipc_type == IPC_TYPE_DBUS) {
+ GVariant *result = NULL;
+ GDBusConnection *conn = NULL;
+ GError *err = NULL;
+ int idx = 0;
+
+ conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
+ if (!conn && err) {
+ debug_error("g_bus_get_sync() error (%s)", err->message);
+ ret = MM_ERROR_SOUND_INTERNAL;
+ } else {
+ result = g_dbus_connection_call_sync (conn,
+ PA_BUS_NAME,
+ PA_SOUND_PLAYER_OBJECT_PATH,
+ PA_SOUND_PLAYER_INTERFACE,
+ PA_SOUND_PLAYER_METHOD_NAME_SIMPLE_PLAY,
+ g_variant_new ("(sss)", filename, role, vol_gain_type),
+ NULL,
+ G_DBUS_CALL_FLAGS_NONE,
+ 2000,
+ NULL,
+ &err);
+ if (!result && err) {
+ debug_error("g_dbus_connection_call_sync() for SIMPLE_PLAY error (%s)", err->message);
+ ret = MM_ERROR_SOUND_INTERNAL;
+ } else {
+ g_variant_get(result, "(i)", &idx);
+ if (idx == -1) {
+ debug_error("SIMPLE_PLAY failure, filename(%s)/role(%s)/gain(%s)/stream idx(%d)", filename, role, vol_gain_type, idx);
+ ret = MM_ERROR_SOUND_INTERNAL;
+ } else {
+ debug_msg("SIMPLE_PLAY success, filename(%s)/role(%s)/gain(%s)/stream idx(%d)", filename, role, vol_gain_type, idx);
+ }
+ g_variant_unref(result);
+ }
+ g_object_unref(conn);
+ }
+ if (err) {
+ g_error_free(err);
+ }