/* MprisClient.c generated by valac 0.56.19, the Vala compiler
 * generated from MprisClient.vala, do not modify */

/*
* Copyright 2014 Ikey Doherty <ikey.doherty@gmail.com>
*           2018 elementary, Inc. (https://elementary.io)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#include "sound.h"
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	SOUND_SERVICES_MPRIS_CLIENT_0_PROPERTY,
	SOUND_SERVICES_MPRIS_CLIENT_PLAYER_PROPERTY,
	SOUND_SERVICES_MPRIS_CLIENT_PROP_PROPERTY,
	SOUND_SERVICES_MPRIS_CLIENT_NUM_PROPERTIES
};
static GParamSpec* sound_services_mpris_client_properties[SOUND_SERVICES_MPRIS_CLIENT_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
enum  {
	SOUND_SERVICES_DBUS_IMPL_NAME_OWNER_CHANGED_SIGNAL,
	SOUND_SERVICES_DBUS_IMPL_NUM_SIGNALS
};
static guint sound_services_dbus_impl_signals[SOUND_SERVICES_DBUS_IMPL_NUM_SIGNALS] = {0};
typedef GDBusProxy SoundServicesDBusImplProxy;
typedef GDBusProxyClass SoundServicesDBusImplProxyClass;
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	SOUND_SERVICES_DBUS_PROP_IFACE_PROPERTIES_CHANGED_SIGNAL,
	SOUND_SERVICES_DBUS_PROP_IFACE_NUM_SIGNALS
};
static guint sound_services_dbus_prop_iface_signals[SOUND_SERVICES_DBUS_PROP_IFACE_NUM_SIGNALS] = {0};
typedef GDBusProxy SoundServicesDbusPropIfaceProxy;
typedef GDBusProxyClass SoundServicesDbusPropIfaceProxyClass;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
typedef GDBusProxy SoundServicesMprisIfaceProxy;
typedef GDBusProxyClass SoundServicesMprisIfaceProxyClass;
typedef GDBusProxy SoundServicesPlayerIfaceProxy;
typedef GDBusProxyClass SoundServicesPlayerIfaceProxyClass;

struct _SoundServicesMprisClientPrivate {
	SoundServicesPlayerIface* _player;
	SoundServicesDbusPropIface* _prop;
};

static gint SoundServicesMprisClient_private_offset;
static gpointer sound_services_mpris_client_parent_class = NULL;

static void sound_services_mpris_client_finalize (GObject * obj);
static GType sound_services_mpris_client_get_type_once (void);
static void _vala_sound_services_mpris_client_get_property (GObject * object,
                                                     guint property_id,
                                                     GValue * value,
                                                     GParamSpec * pspec);
static void _vala_sound_services_mpris_client_set_property (GObject * object,
                                                     guint property_id,
                                                     const GValue * value,
                                                     GParamSpec * pspec);
static void g_cclosure_user_marshal_VOID__STRING_STRING_STRING (GClosure * closure,
                                                         GValue * return_value,
                                                         guint n_param_values,
                                                         const GValue * param_values,
                                                         gpointer invocation_hint,
                                                         gpointer marshal_data);
static GType sound_services_dbus_impl_get_type_once (void);
static void sound_services_dbus_impl_proxy_g_signal (GDBusProxy* proxy,
                                              const gchar* sender_name,
                                              const gchar* signal_name,
                                              GVariant* parameters);
static void _dbus_handle_sound_services_dbus_impl_name_owner_changed (SoundServicesDBusImpl* self,
                                                               GVariant* parameters);
static gchar** sound_services_dbus_impl_proxy_list_names (SoundServicesDBusImpl* self,
                                                   gint* result_length1,
                                                   GError** error);
static void sound_services_dbus_impl_proxy_sound_services_dbus_impl_interface_init (SoundServicesDBusImplIface* iface);
static void _dbus_sound_services_dbus_impl_list_names (SoundServicesDBusImpl* self,
                                                GVariant* _parameters_,
                                                GDBusMethodInvocation* invocation);
static void sound_services_dbus_impl_dbus_interface_method_call (GDBusConnection* connection,
                                                          const gchar* sender,
                                                          const gchar* object_path,
                                                          const gchar* interface_name,
                                                          const gchar* method_name,
                                                          GVariant* parameters,
                                                          GDBusMethodInvocation* invocation,
                                                          gpointer user_data);
static GVariant* sound_services_dbus_impl_dbus_interface_get_property (GDBusConnection* connection,
                                                                const gchar* sender,
                                                                const gchar* object_path,
                                                                const gchar* interface_name,
                                                                const gchar* property_name,
                                                                GError** error,
                                                                gpointer user_data);
static gboolean sound_services_dbus_impl_dbus_interface_set_property (GDBusConnection* connection,
                                                               const gchar* sender,
                                                               const gchar* object_path,
                                                               const gchar* interface_name,
                                                               const gchar* property_name,
                                                               GVariant* value,
                                                               GError** error,
                                                               gpointer user_data);
static void _dbus_sound_services_dbus_impl_name_owner_changed (GObject* _sender,
                                                        const gchar* name,
                                                        const gchar* old_owner,
                                                        const gchar* new_owner,
                                                        gpointer* _data);
static void _sound_services_dbus_impl_unregister_object (gpointer user_data);
static void g_cclosure_user_marshal_VOID__STRING_BOXED_BOXED_INT (GClosure * closure,
                                                           GValue * return_value,
                                                           guint n_param_values,
                                                           const GValue * param_values,
                                                           gpointer invocation_hint,
                                                           gpointer marshal_data);
static GType sound_services_dbus_prop_iface_get_type_once (void);
static void sound_services_dbus_prop_iface_proxy_g_signal (GDBusProxy* proxy,
                                                    const gchar* sender_name,
                                                    const gchar* signal_name,
                                                    GVariant* parameters);
static void _dbus_handle_sound_services_dbus_prop_iface_properties_changed (SoundServicesDbusPropIface* self,
                                                                     GVariant* parameters);
static void sound_services_dbus_prop_iface_proxy_sound_services_dbus_prop_iface_interface_init (SoundServicesDbusPropIfaceIface* iface);
static void sound_services_dbus_prop_iface_dbus_interface_method_call (GDBusConnection* connection,
                                                                const gchar* sender,
                                                                const gchar* object_path,
                                                                const gchar* interface_name,
                                                                const gchar* method_name,
                                                                GVariant* parameters,
                                                                GDBusMethodInvocation* invocation,
                                                                gpointer user_data);
static GVariant* sound_services_dbus_prop_iface_dbus_interface_get_property (GDBusConnection* connection,
                                                                      const gchar* sender,
                                                                      const gchar* object_path,
                                                                      const gchar* interface_name,
                                                                      const gchar* property_name,
                                                                      GError** error,
                                                                      gpointer user_data);
static gboolean sound_services_dbus_prop_iface_dbus_interface_set_property (GDBusConnection* connection,
                                                                     const gchar* sender,
                                                                     const gchar* object_path,
                                                                     const gchar* interface_name,
                                                                     const gchar* property_name,
                                                                     GVariant* value,
                                                                     GError** error,
                                                                     gpointer user_data);
static void _dbus_sound_services_dbus_prop_iface_properties_changed (GObject* _sender,
                                                              const gchar* iface,
                                                              GHashTable* changed,
                                                              gchar** invalid,
                                                              gint invalid_length1,
                                                              gpointer* _data);
static void _sound_services_dbus_prop_iface_unregister_object (gpointer user_data);
static GType sound_services_mpris_iface_get_type_once (void);
static void sound_services_mpris_iface_proxy_g_signal (GDBusProxy* proxy,
                                                const gchar* sender_name,
                                                const gchar* signal_name,
                                                GVariant* parameters);
static void sound_services_mpris_iface_proxy_raise (SoundServicesMprisIface* self,
                                             GError** error);
static gboolean sound_services_mpris_iface_dbus_proxy_get_can_raise (SoundServicesMprisIface* self);
static gchar* sound_services_mpris_iface_dbus_proxy_get_desktop_entry (SoundServicesMprisIface* self);
static void sound_services_mpris_iface_proxy_sound_services_mpris_iface_interface_init (SoundServicesMprisIfaceIface* iface);
static void _dbus_sound_services_mpris_iface_raise (SoundServicesMprisIface* self,
                                             GVariant* _parameters_,
                                             GDBusMethodInvocation* invocation);
static void sound_services_mpris_iface_dbus_interface_method_call (GDBusConnection* connection,
                                                            const gchar* sender,
                                                            const gchar* object_path,
                                                            const gchar* interface_name,
                                                            const gchar* method_name,
                                                            GVariant* parameters,
                                                            GDBusMethodInvocation* invocation,
                                                            gpointer user_data);
static GVariant* sound_services_mpris_iface_dbus_interface_get_property (GDBusConnection* connection,
                                                                  const gchar* sender,
                                                                  const gchar* object_path,
                                                                  const gchar* interface_name,
                                                                  const gchar* property_name,
                                                                  GError** error,
                                                                  gpointer user_data);
static GVariant* _dbus_sound_services_mpris_iface_get_can_raise (SoundServicesMprisIface* self);
static GVariant* _dbus_sound_services_mpris_iface_get_desktop_entry (SoundServicesMprisIface* self);
static gboolean sound_services_mpris_iface_dbus_interface_set_property (GDBusConnection* connection,
                                                                 const gchar* sender,
                                                                 const gchar* object_path,
                                                                 const gchar* interface_name,
                                                                 const gchar* property_name,
                                                                 GVariant* value,
                                                                 GError** error,
                                                                 gpointer user_data);
static void _sound_services_mpris_iface_unregister_object (gpointer user_data);
static GType sound_services_player_iface_get_type_once (void);
static void sound_services_player_iface_proxy_g_signal (GDBusProxy* proxy,
                                                 const gchar* sender_name,
                                                 const gchar* signal_name,
                                                 GVariant* parameters);
static void sound_services_player_iface_proxy_raise (SoundServicesMprisIface* self,
                                              GError** error);
static gboolean sound_services_player_iface_dbus_proxy_get_can_raise (SoundServicesMprisIface* self);
static gchar* sound_services_player_iface_dbus_proxy_get_desktop_entry (SoundServicesMprisIface* self);
static void sound_services_player_iface_proxy_sound_services_mpris_iface_interface_init (SoundServicesMprisIfaceIface* iface);
static void sound_services_player_iface_proxy_next (SoundServicesPlayerIface* self,
                                             GError** error);
static void sound_services_player_iface_proxy_previous (SoundServicesPlayerIface* self,
                                                 GError** error);
static void sound_services_player_iface_proxy_pause (SoundServicesPlayerIface* self,
                                              GError** error);
static void sound_services_player_iface_proxy_play_pause (SoundServicesPlayerIface* self,
                                                   GError** error);
static void sound_services_player_iface_proxy_stop (SoundServicesPlayerIface* self,
                                             GError** error);
static void sound_services_player_iface_proxy_play (SoundServicesPlayerIface* self,
                                             GError** error);
static gchar* sound_services_player_iface_dbus_proxy_get_playback_status (SoundServicesPlayerIface* self);
static GHashTable* sound_services_player_iface_dbus_proxy_get_metadata (SoundServicesPlayerIface* self);
static gboolean sound_services_player_iface_dbus_proxy_get_can_go_next (SoundServicesPlayerIface* self);
static gboolean sound_services_player_iface_dbus_proxy_get_can_go_previous (SoundServicesPlayerIface* self);
static gboolean sound_services_player_iface_dbus_proxy_get_can_play (SoundServicesPlayerIface* self);
static gboolean sound_services_player_iface_dbus_proxy_get_can_pause (SoundServicesPlayerIface* self);
static void sound_services_player_iface_proxy_sound_services_player_iface_interface_init (SoundServicesPlayerIfaceIface* iface);
static void _dbus_sound_services_player_iface_next (SoundServicesPlayerIface* self,
                                             GVariant* _parameters_,
                                             GDBusMethodInvocation* invocation);
static void _dbus_sound_services_player_iface_previous (SoundServicesPlayerIface* self,
                                                 GVariant* _parameters_,
                                                 GDBusMethodInvocation* invocation);
static void _dbus_sound_services_player_iface_pause (SoundServicesPlayerIface* self,
                                              GVariant* _parameters_,
                                              GDBusMethodInvocation* invocation);
static void _dbus_sound_services_player_iface_play_pause (SoundServicesPlayerIface* self,
                                                   GVariant* _parameters_,
                                                   GDBusMethodInvocation* invocation);
static void _dbus_sound_services_player_iface_stop (SoundServicesPlayerIface* self,
                                             GVariant* _parameters_,
                                             GDBusMethodInvocation* invocation);
static void _dbus_sound_services_player_iface_play (SoundServicesPlayerIface* self,
                                             GVariant* _parameters_,
                                             GDBusMethodInvocation* invocation);
static void sound_services_player_iface_dbus_interface_method_call (GDBusConnection* connection,
                                                             const gchar* sender,
                                                             const gchar* object_path,
                                                             const gchar* interface_name,
                                                             const gchar* method_name,
                                                             GVariant* parameters,
                                                             GDBusMethodInvocation* invocation,
                                                             gpointer user_data);
static GVariant* sound_services_player_iface_dbus_interface_get_property (GDBusConnection* connection,
                                                                   const gchar* sender,
                                                                   const gchar* object_path,
                                                                   const gchar* interface_name,
                                                                   const gchar* property_name,
                                                                   GError** error,
                                                                   gpointer user_data);
static GVariant* _dbus_sound_services_player_iface_get_playback_status (SoundServicesPlayerIface* self);
static GVariant* _dbus_sound_services_player_iface_get_metadata (SoundServicesPlayerIface* self);
static GVariant* _dbus_sound_services_player_iface_get_can_go_next (SoundServicesPlayerIface* self);
static GVariant* _dbus_sound_services_player_iface_get_can_go_previous (SoundServicesPlayerIface* self);
static GVariant* _dbus_sound_services_player_iface_get_can_play (SoundServicesPlayerIface* self);
static GVariant* _dbus_sound_services_player_iface_get_can_pause (SoundServicesPlayerIface* self);
static gboolean sound_services_player_iface_dbus_interface_set_property (GDBusConnection* connection,
                                                                  const gchar* sender,
                                                                  const gchar* object_path,
                                                                  const gchar* interface_name,
                                                                  const gchar* property_name,
                                                                  GVariant* value,
                                                                  GError** error,
                                                                  gpointer user_data);
static void _sound_services_player_iface_unregister_object (gpointer user_data);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static const GDBusArgInfo _sound_services_dbus_impl_dbus_arg_info_list_names_result = {-1, "result", "as", NULL};
static const GDBusArgInfo * const _sound_services_dbus_impl_dbus_arg_info_list_names_in[] = {NULL};
static const GDBusArgInfo * const _sound_services_dbus_impl_dbus_arg_info_list_names_out[] = {&_sound_services_dbus_impl_dbus_arg_info_list_names_result, NULL};
static const GDBusMethodInfo _sound_services_dbus_impl_dbus_method_info_list_names = {-1, "ListNames", (GDBusArgInfo **) (&_sound_services_dbus_impl_dbus_arg_info_list_names_in), (GDBusArgInfo **) (&_sound_services_dbus_impl_dbus_arg_info_list_names_out), NULL};
static const GDBusMethodInfo * const _sound_services_dbus_impl_dbus_method_info[] = {&_sound_services_dbus_impl_dbus_method_info_list_names, NULL};
static const GDBusArgInfo _sound_services_dbus_impl_dbus_arg_info_name_owner_changed_name = {-1, "name", "s", NULL};
static const GDBusArgInfo _sound_services_dbus_impl_dbus_arg_info_name_owner_changed_old_owner = {-1, "old_owner", "s", NULL};
static const GDBusArgInfo _sound_services_dbus_impl_dbus_arg_info_name_owner_changed_new_owner = {-1, "new_owner", "s", NULL};
static const GDBusArgInfo * const _sound_services_dbus_impl_dbus_arg_info_name_owner_changed[] = {&_sound_services_dbus_impl_dbus_arg_info_name_owner_changed_name, &_sound_services_dbus_impl_dbus_arg_info_name_owner_changed_old_owner, &_sound_services_dbus_impl_dbus_arg_info_name_owner_changed_new_owner, NULL};
static const GDBusSignalInfo _sound_services_dbus_impl_dbus_signal_info_name_owner_changed = {-1, "NameOwnerChanged", (GDBusArgInfo **) (&_sound_services_dbus_impl_dbus_arg_info_name_owner_changed), NULL};
static const GDBusSignalInfo * const _sound_services_dbus_impl_dbus_signal_info[] = {&_sound_services_dbus_impl_dbus_signal_info_name_owner_changed, NULL};
static const GDBusPropertyInfo * const _sound_services_dbus_impl_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _sound_services_dbus_impl_dbus_interface_info = {-1, "org.freedesktop.DBus", (GDBusMethodInfo **) (&_sound_services_dbus_impl_dbus_method_info), (GDBusSignalInfo **) (&_sound_services_dbus_impl_dbus_signal_info), (GDBusPropertyInfo **) (&_sound_services_dbus_impl_dbus_property_info), NULL};
static const GDBusInterfaceVTable _sound_services_dbus_impl_dbus_interface_vtable = {sound_services_dbus_impl_dbus_interface_method_call, sound_services_dbus_impl_dbus_interface_get_property, sound_services_dbus_impl_dbus_interface_set_property};
static const GDBusMethodInfo * const _sound_services_dbus_prop_iface_dbus_method_info[] = {NULL};
static const GDBusArgInfo _sound_services_dbus_prop_iface_dbus_arg_info_properties_changed_iface = {-1, "iface", "s", NULL};
static const GDBusArgInfo _sound_services_dbus_prop_iface_dbus_arg_info_properties_changed_changed = {-1, "changed", "a{sv}", NULL};
static const GDBusArgInfo _sound_services_dbus_prop_iface_dbus_arg_info_properties_changed_invalid = {-1, "invalid", "as", NULL};
static const GDBusArgInfo * const _sound_services_dbus_prop_iface_dbus_arg_info_properties_changed[] = {&_sound_services_dbus_prop_iface_dbus_arg_info_properties_changed_iface, &_sound_services_dbus_prop_iface_dbus_arg_info_properties_changed_changed, &_sound_services_dbus_prop_iface_dbus_arg_info_properties_changed_invalid, NULL};
static const GDBusSignalInfo _sound_services_dbus_prop_iface_dbus_signal_info_properties_changed = {-1, "PropertiesChanged", (GDBusArgInfo **) (&_sound_services_dbus_prop_iface_dbus_arg_info_properties_changed), NULL};
static const GDBusSignalInfo * const _sound_services_dbus_prop_iface_dbus_signal_info[] = {&_sound_services_dbus_prop_iface_dbus_signal_info_properties_changed, NULL};
static const GDBusPropertyInfo * const _sound_services_dbus_prop_iface_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _sound_services_dbus_prop_iface_dbus_interface_info = {-1, "org.freedesktop.DBus.Properties", (GDBusMethodInfo **) (&_sound_services_dbus_prop_iface_dbus_method_info), (GDBusSignalInfo **) (&_sound_services_dbus_prop_iface_dbus_signal_info), (GDBusPropertyInfo **) (&_sound_services_dbus_prop_iface_dbus_property_info), NULL};
static const GDBusInterfaceVTable _sound_services_dbus_prop_iface_dbus_interface_vtable = {sound_services_dbus_prop_iface_dbus_interface_method_call, sound_services_dbus_prop_iface_dbus_interface_get_property, sound_services_dbus_prop_iface_dbus_interface_set_property};
static const GDBusArgInfo * const _sound_services_mpris_iface_dbus_arg_info_raise_in[] = {NULL};
static const GDBusArgInfo * const _sound_services_mpris_iface_dbus_arg_info_raise_out[] = {NULL};
static const GDBusMethodInfo _sound_services_mpris_iface_dbus_method_info_raise = {-1, "Raise", (GDBusArgInfo **) (&_sound_services_mpris_iface_dbus_arg_info_raise_in), (GDBusArgInfo **) (&_sound_services_mpris_iface_dbus_arg_info_raise_out), NULL};
static const GDBusMethodInfo * const _sound_services_mpris_iface_dbus_method_info[] = {&_sound_services_mpris_iface_dbus_method_info_raise, NULL};
static const GDBusSignalInfo * const _sound_services_mpris_iface_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo _sound_services_mpris_iface_dbus_property_info_can_raise = {-1, "CanRaise", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _sound_services_mpris_iface_dbus_property_info_desktop_entry = {-1, "DesktopEntry", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _sound_services_mpris_iface_dbus_property_info[] = {&_sound_services_mpris_iface_dbus_property_info_can_raise, &_sound_services_mpris_iface_dbus_property_info_desktop_entry, NULL};
static const GDBusInterfaceInfo _sound_services_mpris_iface_dbus_interface_info = {-1, "org.mpris.MediaPlayer2", (GDBusMethodInfo **) (&_sound_services_mpris_iface_dbus_method_info), (GDBusSignalInfo **) (&_sound_services_mpris_iface_dbus_signal_info), (GDBusPropertyInfo **) (&_sound_services_mpris_iface_dbus_property_info), NULL};
static const GDBusInterfaceVTable _sound_services_mpris_iface_dbus_interface_vtable = {sound_services_mpris_iface_dbus_interface_method_call, sound_services_mpris_iface_dbus_interface_get_property, sound_services_mpris_iface_dbus_interface_set_property};
static const GDBusArgInfo * const _sound_services_player_iface_dbus_arg_info_next_in[] = {NULL};
static const GDBusArgInfo * const _sound_services_player_iface_dbus_arg_info_next_out[] = {NULL};
static const GDBusMethodInfo _sound_services_player_iface_dbus_method_info_next = {-1, "Next", (GDBusArgInfo **) (&_sound_services_player_iface_dbus_arg_info_next_in), (GDBusArgInfo **) (&_sound_services_player_iface_dbus_arg_info_next_out), NULL};
static const GDBusArgInfo * const _sound_services_player_iface_dbus_arg_info_previous_in[] = {NULL};
static const GDBusArgInfo * const _sound_services_player_iface_dbus_arg_info_previous_out[] = {NULL};
static const GDBusMethodInfo _sound_services_player_iface_dbus_method_info_previous = {-1, "Previous", (GDBusArgInfo **) (&_sound_services_player_iface_dbus_arg_info_previous_in), (GDBusArgInfo **) (&_sound_services_player_iface_dbus_arg_info_previous_out), NULL};
static const GDBusArgInfo * const _sound_services_player_iface_dbus_arg_info_pause_in[] = {NULL};
static const GDBusArgInfo * const _sound_services_player_iface_dbus_arg_info_pause_out[] = {NULL};
static const GDBusMethodInfo _sound_services_player_iface_dbus_method_info_pause = {-1, "Pause", (GDBusArgInfo **) (&_sound_services_player_iface_dbus_arg_info_pause_in), (GDBusArgInfo **) (&_sound_services_player_iface_dbus_arg_info_pause_out), NULL};
static const GDBusArgInfo * const _sound_services_player_iface_dbus_arg_info_play_pause_in[] = {NULL};
static const GDBusArgInfo * const _sound_services_player_iface_dbus_arg_info_play_pause_out[] = {NULL};
static const GDBusMethodInfo _sound_services_player_iface_dbus_method_info_play_pause = {-1, "PlayPause", (GDBusArgInfo **) (&_sound_services_player_iface_dbus_arg_info_play_pause_in), (GDBusArgInfo **) (&_sound_services_player_iface_dbus_arg_info_play_pause_out), NULL};
static const GDBusArgInfo * const _sound_services_player_iface_dbus_arg_info_stop_in[] = {NULL};
static const GDBusArgInfo * const _sound_services_player_iface_dbus_arg_info_stop_out[] = {NULL};
static const GDBusMethodInfo _sound_services_player_iface_dbus_method_info_stop = {-1, "Stop", (GDBusArgInfo **) (&_sound_services_player_iface_dbus_arg_info_stop_in), (GDBusArgInfo **) (&_sound_services_player_iface_dbus_arg_info_stop_out), NULL};
static const GDBusArgInfo * const _sound_services_player_iface_dbus_arg_info_play_in[] = {NULL};
static const GDBusArgInfo * const _sound_services_player_iface_dbus_arg_info_play_out[] = {NULL};
static const GDBusMethodInfo _sound_services_player_iface_dbus_method_info_play = {-1, "Play", (GDBusArgInfo **) (&_sound_services_player_iface_dbus_arg_info_play_in), (GDBusArgInfo **) (&_sound_services_player_iface_dbus_arg_info_play_out), NULL};
static const GDBusMethodInfo * const _sound_services_player_iface_dbus_method_info[] = {&_sound_services_player_iface_dbus_method_info_next, &_sound_services_player_iface_dbus_method_info_previous, &_sound_services_player_iface_dbus_method_info_pause, &_sound_services_player_iface_dbus_method_info_play_pause, &_sound_services_player_iface_dbus_method_info_stop, &_sound_services_player_iface_dbus_method_info_play, NULL};
static const GDBusSignalInfo * const _sound_services_player_iface_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo _sound_services_player_iface_dbus_property_info_playback_status = {-1, "PlaybackStatus", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _sound_services_player_iface_dbus_property_info_metadata = {-1, "Metadata", "a{sv}", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _sound_services_player_iface_dbus_property_info_can_go_next = {-1, "CanGoNext", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _sound_services_player_iface_dbus_property_info_can_go_previous = {-1, "CanGoPrevious", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _sound_services_player_iface_dbus_property_info_can_play = {-1, "CanPlay", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _sound_services_player_iface_dbus_property_info_can_pause = {-1, "CanPause", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _sound_services_player_iface_dbus_property_info[] = {&_sound_services_player_iface_dbus_property_info_playback_status, &_sound_services_player_iface_dbus_property_info_metadata, &_sound_services_player_iface_dbus_property_info_can_go_next, &_sound_services_player_iface_dbus_property_info_can_go_previous, &_sound_services_player_iface_dbus_property_info_can_play, &_sound_services_player_iface_dbus_property_info_can_pause, NULL};
static const GDBusInterfaceInfo _sound_services_player_iface_dbus_interface_info = {-1, "org.mpris.MediaPlayer2.Player", (GDBusMethodInfo **) (&_sound_services_player_iface_dbus_method_info), (GDBusSignalInfo **) (&_sound_services_player_iface_dbus_signal_info), (GDBusPropertyInfo **) (&_sound_services_player_iface_dbus_property_info), NULL};
static const GDBusInterfaceVTable _sound_services_player_iface_dbus_interface_vtable = {sound_services_player_iface_dbus_interface_method_call, sound_services_player_iface_dbus_interface_get_property, sound_services_player_iface_dbus_interface_set_property};

static inline gpointer
sound_services_mpris_client_get_instance_private (SoundServicesMprisClient* self)
{
	return G_STRUCT_MEMBER_P (self, SoundServicesMprisClient_private_offset);
}

SoundServicesMprisClient*
sound_services_mpris_client_construct (GType object_type,
                                       SoundServicesPlayerIface* player,
                                       SoundServicesDbusPropIface* prop)
{
	SoundServicesMprisClient * self = NULL;
	g_return_val_if_fail (player != NULL, NULL);
	g_return_val_if_fail (prop != NULL, NULL);
	self = (SoundServicesMprisClient*) g_object_new (object_type, "player", player, "prop", prop, NULL);
	return self;
}

SoundServicesMprisClient*
sound_services_mpris_client_new (SoundServicesPlayerIface* player,
                                 SoundServicesDbusPropIface* prop)
{
	return sound_services_mpris_client_construct (SOUND_SERVICES_TYPE_MPRIS_CLIENT, player, prop);
}

SoundServicesPlayerIface*
sound_services_mpris_client_get_player (SoundServicesMprisClient* self)
{
	SoundServicesPlayerIface* result;
	SoundServicesPlayerIface* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_player;
	result = _tmp0_;
	return result;
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

void
sound_services_mpris_client_set_player (SoundServicesMprisClient* self,
                                        SoundServicesPlayerIface* value)
{
	SoundServicesPlayerIface* old_value;
	g_return_if_fail (self != NULL);
	old_value = sound_services_mpris_client_get_player (self);
	if (old_value != value) {
		SoundServicesPlayerIface* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_player);
		self->priv->_player = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, sound_services_mpris_client_properties[SOUND_SERVICES_MPRIS_CLIENT_PLAYER_PROPERTY]);
	}
}

SoundServicesDbusPropIface*
sound_services_mpris_client_get_prop (SoundServicesMprisClient* self)
{
	SoundServicesDbusPropIface* result;
	SoundServicesDbusPropIface* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_prop;
	result = _tmp0_;
	return result;
}

void
sound_services_mpris_client_set_prop (SoundServicesMprisClient* self,
                                      SoundServicesDbusPropIface* value)
{
	SoundServicesDbusPropIface* old_value;
	g_return_if_fail (self != NULL);
	old_value = sound_services_mpris_client_get_prop (self);
	if (old_value != value) {
		SoundServicesDbusPropIface* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_prop);
		self->priv->_prop = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, sound_services_mpris_client_properties[SOUND_SERVICES_MPRIS_CLIENT_PROP_PROPERTY]);
	}
}

static void
sound_services_mpris_client_class_init (SoundServicesMprisClientClass * klass,
                                        gpointer klass_data)
{
	sound_services_mpris_client_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SoundServicesMprisClient_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_sound_services_mpris_client_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_sound_services_mpris_client_set_property;
	G_OBJECT_CLASS (klass)->finalize = sound_services_mpris_client_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SOUND_SERVICES_MPRIS_CLIENT_PLAYER_PROPERTY, sound_services_mpris_client_properties[SOUND_SERVICES_MPRIS_CLIENT_PLAYER_PROPERTY] = g_param_spec_object ("player", "player", "player", SOUND_SERVICES_TYPE_PLAYER_IFACE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SOUND_SERVICES_MPRIS_CLIENT_PROP_PROPERTY, sound_services_mpris_client_properties[SOUND_SERVICES_MPRIS_CLIENT_PROP_PROPERTY] = g_param_spec_object ("prop", "prop", "prop", SOUND_SERVICES_TYPE_DBUS_PROP_IFACE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
}

static void
sound_services_mpris_client_instance_init (SoundServicesMprisClient * self,
                                           gpointer klass)
{
	self->priv = sound_services_mpris_client_get_instance_private (self);
}

static void
sound_services_mpris_client_finalize (GObject * obj)
{
	SoundServicesMprisClient * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SOUND_SERVICES_TYPE_MPRIS_CLIENT, SoundServicesMprisClient);
	_g_object_unref0 (self->priv->_player);
	_g_object_unref0 (self->priv->_prop);
	G_OBJECT_CLASS (sound_services_mpris_client_parent_class)->finalize (obj);
}

/**
 * Simple wrapper to ensure vala doesn't unref our shit.
 */
static GType
sound_services_mpris_client_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SoundServicesMprisClientClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) sound_services_mpris_client_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SoundServicesMprisClient), 0, (GInstanceInitFunc) sound_services_mpris_client_instance_init, NULL };
	GType sound_services_mpris_client_type_id;
	sound_services_mpris_client_type_id = g_type_register_static (G_TYPE_OBJECT, "SoundServicesMprisClient", &g_define_type_info, 0);
	SoundServicesMprisClient_private_offset = g_type_add_instance_private (sound_services_mpris_client_type_id, sizeof (SoundServicesMprisClientPrivate));
	return sound_services_mpris_client_type_id;
}

GType
sound_services_mpris_client_get_type (void)
{
	static volatile gsize sound_services_mpris_client_type_id__once = 0;
	if (g_once_init_enter (&sound_services_mpris_client_type_id__once)) {
		GType sound_services_mpris_client_type_id;
		sound_services_mpris_client_type_id = sound_services_mpris_client_get_type_once ();
		g_once_init_leave (&sound_services_mpris_client_type_id__once, sound_services_mpris_client_type_id);
	}
	return sound_services_mpris_client_type_id__once;
}

static void
_vala_sound_services_mpris_client_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec)
{
	SoundServicesMprisClient * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SOUND_SERVICES_TYPE_MPRIS_CLIENT, SoundServicesMprisClient);
	switch (property_id) {
		case SOUND_SERVICES_MPRIS_CLIENT_PLAYER_PROPERTY:
		g_value_set_object (value, sound_services_mpris_client_get_player (self));
		break;
		case SOUND_SERVICES_MPRIS_CLIENT_PROP_PROPERTY:
		g_value_set_object (value, sound_services_mpris_client_get_prop (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_sound_services_mpris_client_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec)
{
	SoundServicesMprisClient * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SOUND_SERVICES_TYPE_MPRIS_CLIENT, SoundServicesMprisClient);
	switch (property_id) {
		case SOUND_SERVICES_MPRIS_CLIENT_PLAYER_PROPERTY:
		sound_services_mpris_client_set_player (self, g_value_get_object (value));
		break;
		case SOUND_SERVICES_MPRIS_CLIENT_PROP_PROPERTY:
		sound_services_mpris_client_set_prop (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

gchar**
sound_services_dbus_impl_list_names (SoundServicesDBusImpl* self,
                                     gint* result_length1,
                                     GError** error)
{
	SoundServicesDBusImplIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = SOUND_SERVICES_DBUS_IMPL_GET_INTERFACE (self);
	if (_iface_->list_names) {
		return _iface_->list_names (self, result_length1, error);
	}
	return NULL;
}

static void
g_cclosure_user_marshal_VOID__STRING_STRING_STRING (GClosure * closure,
                                                    GValue * return_value,
                                                    guint n_param_values,
                                                    const GValue * param_values,
                                                    gpointer invocation_hint,
                                                    gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING) (gpointer data1, const char* arg_1, const char* arg_2, const char* arg_3, gpointer data2);
	register GMarshalFunc_VOID__STRING_STRING_STRING callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 4);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), g_value_get_string (param_values + 3), data2);
}

static void
sound_services_dbus_impl_default_init (SoundServicesDBusImplIface * iface,
                                       gpointer iface_data)
{
	sound_services_dbus_impl_signals[SOUND_SERVICES_DBUS_IMPL_NAME_OWNER_CHANGED_SIGNAL] = g_signal_new ("name-owner-changed", SOUND_SERVICES_TYPE_DBUS_IMPL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_STRING, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
}

/**
 * We need to probe the dbus daemon directly, hence this interface
 */
static GType
sound_services_dbus_impl_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SoundServicesDBusImplIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) sound_services_dbus_impl_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType sound_services_dbus_impl_type_id;
	sound_services_dbus_impl_type_id = g_type_register_static (G_TYPE_INTERFACE, "SoundServicesDBusImpl", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (sound_services_dbus_impl_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (sound_services_dbus_impl_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) sound_services_dbus_impl_proxy_get_type);
	g_type_set_qdata (sound_services_dbus_impl_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.DBus");
	g_type_set_qdata (sound_services_dbus_impl_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_sound_services_dbus_impl_dbus_interface_info));
	g_type_set_qdata (sound_services_dbus_impl_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) sound_services_dbus_impl_register_object);
	return sound_services_dbus_impl_type_id;
}

GType
sound_services_dbus_impl_get_type (void)
{
	static volatile gsize sound_services_dbus_impl_type_id__once = 0;
	if (g_once_init_enter (&sound_services_dbus_impl_type_id__once)) {
		GType sound_services_dbus_impl_type_id;
		sound_services_dbus_impl_type_id = sound_services_dbus_impl_get_type_once ();
		g_once_init_leave (&sound_services_dbus_impl_type_id__once, sound_services_dbus_impl_type_id);
	}
	return sound_services_dbus_impl_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (SoundServicesDBusImplProxy, sound_services_dbus_impl_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (SOUND_SERVICES_TYPE_DBUS_IMPL, sound_services_dbus_impl_proxy_sound_services_dbus_impl_interface_init) )
static void
sound_services_dbus_impl_proxy_class_init (SoundServicesDBusImplProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = sound_services_dbus_impl_proxy_g_signal;
}

static void
_dbus_handle_sound_services_dbus_impl_name_owner_changed (SoundServicesDBusImpl* self,
                                                          GVariant* parameters)
{
	GVariantIter _arguments_iter;
	gchar* name = NULL;
	GVariant* _tmp0_;
	gchar* old_owner = NULL;
	GVariant* _tmp1_;
	gchar* new_owner = NULL;
	GVariant* _tmp2_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp0_ = g_variant_iter_next_value (&_arguments_iter);
	name = g_variant_dup_string (_tmp0_, NULL);
	g_variant_unref (_tmp0_);
	_tmp1_ = g_variant_iter_next_value (&_arguments_iter);
	old_owner = g_variant_dup_string (_tmp1_, NULL);
	g_variant_unref (_tmp1_);
	_tmp2_ = g_variant_iter_next_value (&_arguments_iter);
	new_owner = g_variant_dup_string (_tmp2_, NULL);
	g_variant_unref (_tmp2_);
	g_signal_emit_by_name (self, "name-owner-changed", name, old_owner, new_owner);
	_g_free0 (name);
	_g_free0 (old_owner);
	_g_free0 (new_owner);
}

static void
sound_services_dbus_impl_proxy_g_signal (GDBusProxy* proxy,
                                         const gchar* sender_name,
                                         const gchar* signal_name,
                                         GVariant* parameters)
{
	if (strcmp (signal_name, "NameOwnerChanged") == 0) {
		_dbus_handle_sound_services_dbus_impl_name_owner_changed ((SoundServicesDBusImpl*) proxy, parameters);
	}
}

static void
sound_services_dbus_impl_proxy_init (SoundServicesDBusImplProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_sound_services_dbus_impl_dbus_interface_info));
}

static gchar**
sound_services_dbus_impl_proxy_list_names (SoundServicesDBusImpl* self,
                                           gint* result_length1,
                                           GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gchar** _result = NULL;
	gint _result_length1;
	GVariant* _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length;
	gint _tmp4__size;
	gint _tmp4__length1;
	GVariantIter _tmp5_;
	GVariant* _tmp6_;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.DBus", "ListNames");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return NULL;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return NULL;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_result_length1 = 0;
	_tmp3_ = g_variant_iter_next_value (&_reply_iter);
	_tmp4_ = g_new (gchar*, 5);
	_tmp4__length = 0;
	_tmp4__size = 4;
	_tmp4__length1 = 0;
	g_variant_iter_init (&_tmp5_, _tmp3_);
	for (; (_tmp6_ = g_variant_iter_next_value (&_tmp5_)) != NULL; _tmp4__length1++) {
		if (_tmp4__size == _tmp4__length) {
			_tmp4__size = 2 * _tmp4__size;
			_tmp4_ = g_renew (gchar*, _tmp4_, _tmp4__size + 1);
		}
		_tmp4_[_tmp4__length++] = g_variant_dup_string (_tmp6_, NULL);
		g_variant_unref (_tmp6_);
	}
	_result_length1 = _tmp4__length1;
	_tmp4_[_tmp4__length] = NULL;
	_result = _tmp4_;
	g_variant_unref (_tmp3_);
	*result_length1 = _result_length1;
	g_object_unref (_reply_message);
	return _result;
}

static void
sound_services_dbus_impl_proxy_sound_services_dbus_impl_interface_init (SoundServicesDBusImplIface* iface)
{
	iface->list_names = sound_services_dbus_impl_proxy_list_names;
}

static void
_dbus_sound_services_dbus_impl_list_names (SoundServicesDBusImpl* self,
                                           GVariant* _parameters_,
                                           GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gchar** result;
	gint result_length1 = 0;
	gchar** _tmp7_;
	GVariantBuilder _tmp8_;
	gint _tmp9_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	result = sound_services_dbus_impl_list_names (self, &result_length1, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_tmp7_ = result;
	g_variant_builder_init (&_tmp8_, G_VARIANT_TYPE ("as"));
	for (_tmp9_ = 0; _tmp9_ < result_length1; _tmp9_++) {
		g_variant_builder_add_value (&_tmp8_, g_variant_new_string (*_tmp7_));
		_tmp7_++;
	}
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp8_));
	result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
sound_services_dbus_impl_dbus_interface_method_call (GDBusConnection* connection,
                                                     const gchar* sender,
                                                     const gchar* object_path,
                                                     const gchar* interface_name,
                                                     const gchar* method_name,
                                                     GVariant* parameters,
                                                     GDBusMethodInvocation* invocation,
                                                     gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "ListNames") == 0) {
		_dbus_sound_services_dbus_impl_list_names (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
sound_services_dbus_impl_dbus_interface_get_property (GDBusConnection* connection,
                                                      const gchar* sender,
                                                      const gchar* object_path,
                                                      const gchar* interface_name,
                                                      const gchar* property_name,
                                                      GError** error,
                                                      gpointer user_data)
{
	return NULL;
}

static gboolean
sound_services_dbus_impl_dbus_interface_set_property (GDBusConnection* connection,
                                                      const gchar* sender,
                                                      const gchar* object_path,
                                                      const gchar* interface_name,
                                                      const gchar* property_name,
                                                      GVariant* value,
                                                      GError** error,
                                                      gpointer user_data)
{
	return FALSE;
}

static void
_dbus_sound_services_dbus_impl_name_owner_changed (GObject* _sender,
                                                   const gchar* name,
                                                   const gchar* old_owner,
                                                   const gchar* new_owner,
                                                   gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (name));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (old_owner));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (new_owner));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.DBus", "NameOwnerChanged", _arguments, NULL);
}

guint
sound_services_dbus_impl_register_object (gpointer object,
                                          GDBusConnection* connection,
                                          const gchar* path,
                                          GError** error)
{
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_sound_services_dbus_impl_dbus_interface_info), &_sound_services_dbus_impl_dbus_interface_vtable, data, _sound_services_dbus_impl_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "name-owner-changed", (GCallback) _dbus_sound_services_dbus_impl_name_owner_changed, data);
	return result;
}

static void
_sound_services_dbus_impl_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_sound_services_dbus_impl_name_owner_changed, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

static void
g_cclosure_user_marshal_VOID__STRING_BOXED_BOXED_INT (GClosure * closure,
                                                      GValue * return_value,
                                                      guint n_param_values,
                                                      const GValue * param_values,
                                                      gpointer invocation_hint,
                                                      gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__STRING_BOXED_BOXED_INT) (gpointer data1, const char* arg_1, gpointer arg_2, gpointer arg_3, gint arg_4, gpointer data2);
	register GMarshalFunc_VOID__STRING_BOXED_BOXED_INT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 5);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__STRING_BOXED_BOXED_INT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_boxed (param_values + 2), g_value_get_boxed (param_values + 3), g_value_get_int (param_values + 4), data2);
}

static void
sound_services_dbus_prop_iface_default_init (SoundServicesDbusPropIfaceIface * iface,
                                             gpointer iface_data)
{
	sound_services_dbus_prop_iface_signals[SOUND_SERVICES_DBUS_PROP_IFACE_PROPERTIES_CHANGED_SIGNAL] = g_signal_new ("properties-changed", SOUND_SERVICES_TYPE_DBUS_PROP_IFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_BOXED_BOXED_INT, G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_HASH_TABLE, G_TYPE_STRV, G_TYPE_INT);
}

/**
 * Vala dbus property notifications are not working. Manually probe property changes.
 */
static GType
sound_services_dbus_prop_iface_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SoundServicesDbusPropIfaceIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) sound_services_dbus_prop_iface_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType sound_services_dbus_prop_iface_type_id;
	sound_services_dbus_prop_iface_type_id = g_type_register_static (G_TYPE_INTERFACE, "SoundServicesDbusPropIface", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (sound_services_dbus_prop_iface_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (sound_services_dbus_prop_iface_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) sound_services_dbus_prop_iface_proxy_get_type);
	g_type_set_qdata (sound_services_dbus_prop_iface_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.DBus.Properties");
	g_type_set_qdata (sound_services_dbus_prop_iface_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_sound_services_dbus_prop_iface_dbus_interface_info));
	g_type_set_qdata (sound_services_dbus_prop_iface_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) sound_services_dbus_prop_iface_register_object);
	return sound_services_dbus_prop_iface_type_id;
}

GType
sound_services_dbus_prop_iface_get_type (void)
{
	static volatile gsize sound_services_dbus_prop_iface_type_id__once = 0;
	if (g_once_init_enter (&sound_services_dbus_prop_iface_type_id__once)) {
		GType sound_services_dbus_prop_iface_type_id;
		sound_services_dbus_prop_iface_type_id = sound_services_dbus_prop_iface_get_type_once ();
		g_once_init_leave (&sound_services_dbus_prop_iface_type_id__once, sound_services_dbus_prop_iface_type_id);
	}
	return sound_services_dbus_prop_iface_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (SoundServicesDbusPropIfaceProxy, sound_services_dbus_prop_iface_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (SOUND_SERVICES_TYPE_DBUS_PROP_IFACE, sound_services_dbus_prop_iface_proxy_sound_services_dbus_prop_iface_interface_init) )
static void
sound_services_dbus_prop_iface_proxy_class_init (SoundServicesDbusPropIfaceProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = sound_services_dbus_prop_iface_proxy_g_signal;
}

static void
_dbus_handle_sound_services_dbus_prop_iface_properties_changed (SoundServicesDbusPropIface* self,
                                                                GVariant* parameters)
{
	GVariantIter _arguments_iter;
	gchar* iface = NULL;
	GVariant* _tmp10_;
	GHashTable* changed = NULL;
	GVariant* _tmp11_;
	GHashTable* _tmp12_;
	GVariantIter _tmp13_;
	GVariant* _tmp14_;
	GVariant* _tmp15_;
	gchar** invalid = NULL;
	gint invalid_length1;
	GVariant* _tmp16_;
	gchar** _tmp17_;
	gint _tmp17__length;
	gint _tmp17__size;
	gint _tmp17__length1;
	GVariantIter _tmp18_;
	GVariant* _tmp19_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp10_ = g_variant_iter_next_value (&_arguments_iter);
	iface = g_variant_dup_string (_tmp10_, NULL);
	g_variant_unref (_tmp10_);
	_tmp11_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp12_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp13_, _tmp11_);
	while (g_variant_iter_loop (&_tmp13_, "{?*}", &_tmp14_, &_tmp15_)) {
		g_hash_table_insert (_tmp12_, g_variant_dup_string (_tmp14_, NULL), g_variant_get_variant (_tmp15_));
	}
	changed = _tmp12_;
	g_variant_unref (_tmp11_);
	invalid_length1 = 0;
	_tmp16_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp17_ = g_new (gchar*, 5);
	_tmp17__length = 0;
	_tmp17__size = 4;
	_tmp17__length1 = 0;
	g_variant_iter_init (&_tmp18_, _tmp16_);
	for (; (_tmp19_ = g_variant_iter_next_value (&_tmp18_)) != NULL; _tmp17__length1++) {
		if (_tmp17__size == _tmp17__length) {
			_tmp17__size = 2 * _tmp17__size;
			_tmp17_ = g_renew (gchar*, _tmp17_, _tmp17__size + 1);
		}
		_tmp17_[_tmp17__length++] = g_variant_dup_string (_tmp19_, NULL);
		g_variant_unref (_tmp19_);
	}
	invalid_length1 = _tmp17__length1;
	_tmp17_[_tmp17__length] = NULL;
	invalid = _tmp17_;
	g_variant_unref (_tmp16_);
	g_signal_emit_by_name (self, "properties-changed", iface, changed, invalid, invalid_length1);
	_g_free0 (iface);
	_g_hash_table_unref0 (changed);
	invalid = (_vala_array_free (invalid, invalid_length1, (GDestroyNotify) g_free), NULL);
}

static void
sound_services_dbus_prop_iface_proxy_g_signal (GDBusProxy* proxy,
                                               const gchar* sender_name,
                                               const gchar* signal_name,
                                               GVariant* parameters)
{
	if (strcmp (signal_name, "PropertiesChanged") == 0) {
		_dbus_handle_sound_services_dbus_prop_iface_properties_changed ((SoundServicesDbusPropIface*) proxy, parameters);
	}
}

static void
sound_services_dbus_prop_iface_proxy_init (SoundServicesDbusPropIfaceProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_sound_services_dbus_prop_iface_dbus_interface_info));
}

static void
sound_services_dbus_prop_iface_proxy_sound_services_dbus_prop_iface_interface_init (SoundServicesDbusPropIfaceIface* iface)
{
}

static void
sound_services_dbus_prop_iface_dbus_interface_method_call (GDBusConnection* connection,
                                                           const gchar* sender,
                                                           const gchar* object_path,
                                                           const gchar* interface_name,
                                                           const gchar* method_name,
                                                           GVariant* parameters,
                                                           GDBusMethodInvocation* invocation,
                                                           gpointer user_data)
{
	g_object_unref (invocation);
}

static GVariant*
sound_services_dbus_prop_iface_dbus_interface_get_property (GDBusConnection* connection,
                                                            const gchar* sender,
                                                            const gchar* object_path,
                                                            const gchar* interface_name,
                                                            const gchar* property_name,
                                                            GError** error,
                                                            gpointer user_data)
{
	return NULL;
}

static gboolean
sound_services_dbus_prop_iface_dbus_interface_set_property (GDBusConnection* connection,
                                                            const gchar* sender,
                                                            const gchar* object_path,
                                                            const gchar* interface_name,
                                                            const gchar* property_name,
                                                            GVariant* value,
                                                            GError** error,
                                                            gpointer user_data)
{
	return FALSE;
}

static void
_dbus_sound_services_dbus_prop_iface_properties_changed (GObject* _sender,
                                                         const gchar* iface,
                                                         GHashTable* changed,
                                                         gchar** invalid,
                                                         gint invalid_length1,
                                                         gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GVariantBuilder _tmp20_;
	GHashTableIter _tmp21_;
	gpointer _tmp22_;
	gpointer _tmp23_;
	gchar** _tmp24_;
	GVariantBuilder _tmp25_;
	gint _tmp26_;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (iface));
	g_hash_table_iter_init (&_tmp21_, changed);
	g_variant_builder_init (&_tmp20_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp21_, &_tmp22_, &_tmp23_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp22_;
		_value = (GVariant*) _tmp23_;
		g_variant_builder_add (&_tmp20_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp20_));
	_tmp24_ = invalid;
	g_variant_builder_init (&_tmp25_, G_VARIANT_TYPE ("as"));
	for (_tmp26_ = 0; _tmp26_ < invalid_length1; _tmp26_++) {
		g_variant_builder_add_value (&_tmp25_, g_variant_new_string (*_tmp24_));
		_tmp24_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp25_));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.DBus.Properties", "PropertiesChanged", _arguments, NULL);
}

guint
sound_services_dbus_prop_iface_register_object (gpointer object,
                                                GDBusConnection* connection,
                                                const gchar* path,
                                                GError** error)
{
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_sound_services_dbus_prop_iface_dbus_interface_info), &_sound_services_dbus_prop_iface_dbus_interface_vtable, data, _sound_services_dbus_prop_iface_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "properties-changed", (GCallback) _dbus_sound_services_dbus_prop_iface_properties_changed, data);
	return result;
}

static void
_sound_services_dbus_prop_iface_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_sound_services_dbus_prop_iface_properties_changed, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

void
sound_services_mpris_iface_raise (SoundServicesMprisIface* self,
                                  GError** error)
{
	SoundServicesMprisIfaceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SOUND_SERVICES_MPRIS_IFACE_GET_INTERFACE (self);
	if (_iface_->raise) {
		_iface_->raise (self, error);
	}
}

gboolean
sound_services_mpris_iface_get_can_raise (SoundServicesMprisIface* self)
{
	SoundServicesMprisIfaceIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = SOUND_SERVICES_MPRIS_IFACE_GET_INTERFACE (self);
	if (_iface_->get_can_raise) {
		return _iface_->get_can_raise (self);
	}
	return FALSE;
}

gchar*
sound_services_mpris_iface_get_desktop_entry (SoundServicesMprisIface* self)
{
	SoundServicesMprisIfaceIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = SOUND_SERVICES_MPRIS_IFACE_GET_INTERFACE (self);
	if (_iface_->get_desktop_entry) {
		return _iface_->get_desktop_entry (self);
	}
	return NULL;
}

static void
sound_services_mpris_iface_default_init (SoundServicesMprisIfaceIface * iface,
                                         gpointer iface_data)
{
}

/**
 * Represents the base org.mpris.MediaPlayer2 spec
 */
static GType
sound_services_mpris_iface_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SoundServicesMprisIfaceIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) sound_services_mpris_iface_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType sound_services_mpris_iface_type_id;
	sound_services_mpris_iface_type_id = g_type_register_static (G_TYPE_INTERFACE, "SoundServicesMprisIface", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (sound_services_mpris_iface_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (sound_services_mpris_iface_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) sound_services_mpris_iface_proxy_get_type);
	g_type_set_qdata (sound_services_mpris_iface_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.mpris.MediaPlayer2");
	g_type_set_qdata (sound_services_mpris_iface_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_sound_services_mpris_iface_dbus_interface_info));
	g_type_set_qdata (sound_services_mpris_iface_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) sound_services_mpris_iface_register_object);
	return sound_services_mpris_iface_type_id;
}

GType
sound_services_mpris_iface_get_type (void)
{
	static volatile gsize sound_services_mpris_iface_type_id__once = 0;
	if (g_once_init_enter (&sound_services_mpris_iface_type_id__once)) {
		GType sound_services_mpris_iface_type_id;
		sound_services_mpris_iface_type_id = sound_services_mpris_iface_get_type_once ();
		g_once_init_leave (&sound_services_mpris_iface_type_id__once, sound_services_mpris_iface_type_id);
	}
	return sound_services_mpris_iface_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (SoundServicesMprisIfaceProxy, sound_services_mpris_iface_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (SOUND_SERVICES_TYPE_MPRIS_IFACE, sound_services_mpris_iface_proxy_sound_services_mpris_iface_interface_init) )
static void
sound_services_mpris_iface_proxy_class_init (SoundServicesMprisIfaceProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = sound_services_mpris_iface_proxy_g_signal;
}

static void
sound_services_mpris_iface_proxy_g_signal (GDBusProxy* proxy,
                                           const gchar* sender_name,
                                           const gchar* signal_name,
                                           GVariant* parameters)
{
}

static void
sound_services_mpris_iface_proxy_init (SoundServicesMprisIfaceProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_sound_services_mpris_iface_dbus_interface_info));
}

static void
sound_services_mpris_iface_proxy_raise (SoundServicesMprisIface* self,
                                        GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.mpris.MediaPlayer2", "Raise");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static gboolean
sound_services_mpris_iface_dbus_proxy_get_can_raise (SoundServicesMprisIface* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "CanRaise");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("CanRaise"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			gboolean _tmp27_ = FALSE;
			return _tmp27_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_boolean (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static gchar*
sound_services_mpris_iface_dbus_proxy_get_desktop_entry (SoundServicesMprisIface* self)
{
	GVariant *_inner_reply;
	gchar* _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "DesktopEntry");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("DesktopEntry"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			return NULL;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_dup_string (_inner_reply, NULL);
	g_variant_unref (_inner_reply);
	return _result;
}

static void
sound_services_mpris_iface_proxy_sound_services_mpris_iface_interface_init (SoundServicesMprisIfaceIface* iface)
{
	iface->raise = sound_services_mpris_iface_proxy_raise;
	iface->get_can_raise = sound_services_mpris_iface_dbus_proxy_get_can_raise;
	iface->get_desktop_entry = sound_services_mpris_iface_dbus_proxy_get_desktop_entry;
}

static void
_dbus_sound_services_mpris_iface_raise (SoundServicesMprisIface* self,
                                        GVariant* _parameters_,
                                        GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	sound_services_mpris_iface_raise (self, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
sound_services_mpris_iface_dbus_interface_method_call (GDBusConnection* connection,
                                                       const gchar* sender,
                                                       const gchar* object_path,
                                                       const gchar* interface_name,
                                                       const gchar* method_name,
                                                       GVariant* parameters,
                                                       GDBusMethodInvocation* invocation,
                                                       gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "Raise") == 0) {
		_dbus_sound_services_mpris_iface_raise (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
_dbus_sound_services_mpris_iface_get_can_raise (SoundServicesMprisIface* self)
{
	gboolean result;
	GVariant* _reply;
	result = sound_services_mpris_iface_get_can_raise (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
_dbus_sound_services_mpris_iface_get_desktop_entry (SoundServicesMprisIface* self)
{
	gchar* result;
	GVariant* _reply;
	result = sound_services_mpris_iface_get_desktop_entry (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
sound_services_mpris_iface_dbus_interface_get_property (GDBusConnection* connection,
                                                        const gchar* sender,
                                                        const gchar* object_path,
                                                        const gchar* interface_name,
                                                        const gchar* property_name,
                                                        GError** error,
                                                        gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (property_name, "CanRaise") == 0) {
		return _dbus_sound_services_mpris_iface_get_can_raise (object);
	} else if (strcmp (property_name, "DesktopEntry") == 0) {
		return _dbus_sound_services_mpris_iface_get_desktop_entry (object);
	}
	return NULL;
}

static gboolean
sound_services_mpris_iface_dbus_interface_set_property (GDBusConnection* connection,
                                                        const gchar* sender,
                                                        const gchar* object_path,
                                                        const gchar* interface_name,
                                                        const gchar* property_name,
                                                        GVariant* value,
                                                        GError** error,
                                                        gpointer user_data)
{
	return FALSE;
}

guint
sound_services_mpris_iface_register_object (gpointer object,
                                            GDBusConnection* connection,
                                            const gchar* path,
                                            GError** error)
{
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_sound_services_mpris_iface_dbus_interface_info), &_sound_services_mpris_iface_dbus_interface_vtable, data, _sound_services_mpris_iface_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_sound_services_mpris_iface_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

void
sound_services_player_iface_next (SoundServicesPlayerIface* self,
                                  GError** error)
{
	SoundServicesPlayerIfaceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SOUND_SERVICES_PLAYER_IFACE_GET_INTERFACE (self);
	if (_iface_->next) {
		_iface_->next (self, error);
	}
}

void
sound_services_player_iface_previous (SoundServicesPlayerIface* self,
                                      GError** error)
{
	SoundServicesPlayerIfaceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SOUND_SERVICES_PLAYER_IFACE_GET_INTERFACE (self);
	if (_iface_->previous) {
		_iface_->previous (self, error);
	}
}

void
sound_services_player_iface_pause (SoundServicesPlayerIface* self,
                                   GError** error)
{
	SoundServicesPlayerIfaceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SOUND_SERVICES_PLAYER_IFACE_GET_INTERFACE (self);
	if (_iface_->pause) {
		_iface_->pause (self, error);
	}
}

void
sound_services_player_iface_play_pause (SoundServicesPlayerIface* self,
                                        GError** error)
{
	SoundServicesPlayerIfaceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SOUND_SERVICES_PLAYER_IFACE_GET_INTERFACE (self);
	if (_iface_->play_pause) {
		_iface_->play_pause (self, error);
	}
}

void
sound_services_player_iface_stop (SoundServicesPlayerIface* self,
                                  GError** error)
{
	SoundServicesPlayerIfaceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SOUND_SERVICES_PLAYER_IFACE_GET_INTERFACE (self);
	if (_iface_->stop) {
		_iface_->stop (self, error);
	}
}

void
sound_services_player_iface_play (SoundServicesPlayerIface* self,
                                  GError** error)
{
	SoundServicesPlayerIfaceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SOUND_SERVICES_PLAYER_IFACE_GET_INTERFACE (self);
	if (_iface_->play) {
		_iface_->play (self, error);
	}
}

gchar*
sound_services_player_iface_get_playback_status (SoundServicesPlayerIface* self)
{
	SoundServicesPlayerIfaceIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = SOUND_SERVICES_PLAYER_IFACE_GET_INTERFACE (self);
	if (_iface_->get_playback_status) {
		return _iface_->get_playback_status (self);
	}
	return NULL;
}

GHashTable*
sound_services_player_iface_get_metadata (SoundServicesPlayerIface* self)
{
	SoundServicesPlayerIfaceIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = SOUND_SERVICES_PLAYER_IFACE_GET_INTERFACE (self);
	if (_iface_->get_metadata) {
		return _iface_->get_metadata (self);
	}
	return NULL;
}

gboolean
sound_services_player_iface_get_can_go_next (SoundServicesPlayerIface* self)
{
	SoundServicesPlayerIfaceIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = SOUND_SERVICES_PLAYER_IFACE_GET_INTERFACE (self);
	if (_iface_->get_can_go_next) {
		return _iface_->get_can_go_next (self);
	}
	return FALSE;
}

gboolean
sound_services_player_iface_get_can_go_previous (SoundServicesPlayerIface* self)
{
	SoundServicesPlayerIfaceIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = SOUND_SERVICES_PLAYER_IFACE_GET_INTERFACE (self);
	if (_iface_->get_can_go_previous) {
		return _iface_->get_can_go_previous (self);
	}
	return FALSE;
}

gboolean
sound_services_player_iface_get_can_play (SoundServicesPlayerIface* self)
{
	SoundServicesPlayerIfaceIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = SOUND_SERVICES_PLAYER_IFACE_GET_INTERFACE (self);
	if (_iface_->get_can_play) {
		return _iface_->get_can_play (self);
	}
	return FALSE;
}

gboolean
sound_services_player_iface_get_can_pause (SoundServicesPlayerIface* self)
{
	SoundServicesPlayerIfaceIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = SOUND_SERVICES_PLAYER_IFACE_GET_INTERFACE (self);
	if (_iface_->get_can_pause) {
		return _iface_->get_can_pause (self);
	}
	return FALSE;
}

static void
sound_services_player_iface_default_init (SoundServicesPlayerIfaceIface * iface,
                                          gpointer iface_data)
{
}

/**
 * Interface for the org.mpris.MediaPlayer2.Player spec
 *
 * @note We cheat and inherit from MprisIface to save faffing around with two
 * iface initialisations over one
 */
static GType
sound_services_player_iface_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SoundServicesPlayerIfaceIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) sound_services_player_iface_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType sound_services_player_iface_type_id;
	sound_services_player_iface_type_id = g_type_register_static (G_TYPE_INTERFACE, "SoundServicesPlayerIface", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (sound_services_player_iface_type_id, SOUND_SERVICES_TYPE_MPRIS_IFACE);
	g_type_set_qdata (sound_services_player_iface_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) sound_services_player_iface_proxy_get_type);
	g_type_set_qdata (sound_services_player_iface_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.mpris.MediaPlayer2.Player");
	g_type_set_qdata (sound_services_player_iface_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_sound_services_player_iface_dbus_interface_info));
	g_type_set_qdata (sound_services_player_iface_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) sound_services_player_iface_register_object);
	return sound_services_player_iface_type_id;
}

GType
sound_services_player_iface_get_type (void)
{
	static volatile gsize sound_services_player_iface_type_id__once = 0;
	if (g_once_init_enter (&sound_services_player_iface_type_id__once)) {
		GType sound_services_player_iface_type_id;
		sound_services_player_iface_type_id = sound_services_player_iface_get_type_once ();
		g_once_init_leave (&sound_services_player_iface_type_id__once, sound_services_player_iface_type_id);
	}
	return sound_services_player_iface_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (SoundServicesPlayerIfaceProxy, sound_services_player_iface_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (SOUND_SERVICES_TYPE_MPRIS_IFACE, sound_services_player_iface_proxy_sound_services_mpris_iface_interface_init) G_IMPLEMENT_INTERFACE (SOUND_SERVICES_TYPE_PLAYER_IFACE, sound_services_player_iface_proxy_sound_services_player_iface_interface_init) )
static void
sound_services_player_iface_proxy_class_init (SoundServicesPlayerIfaceProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = sound_services_player_iface_proxy_g_signal;
}

static void
sound_services_player_iface_proxy_g_signal (GDBusProxy* proxy,
                                            const gchar* sender_name,
                                            const gchar* signal_name,
                                            GVariant* parameters)
{
}

static void
sound_services_player_iface_proxy_init (SoundServicesPlayerIfaceProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_sound_services_player_iface_dbus_interface_info));
}

static void
sound_services_player_iface_proxy_raise (SoundServicesMprisIface* self,
                                         GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.mpris.MediaPlayer2", "Raise");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static gboolean
sound_services_player_iface_dbus_proxy_get_can_raise (SoundServicesMprisIface* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "CanRaise");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("CanRaise"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			gboolean _tmp28_ = FALSE;
			return _tmp28_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_boolean (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static gchar*
sound_services_player_iface_dbus_proxy_get_desktop_entry (SoundServicesMprisIface* self)
{
	GVariant *_inner_reply;
	gchar* _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "DesktopEntry");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("DesktopEntry"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			return NULL;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_dup_string (_inner_reply, NULL);
	g_variant_unref (_inner_reply);
	return _result;
}

static void
sound_services_player_iface_proxy_sound_services_mpris_iface_interface_init (SoundServicesMprisIfaceIface* iface)
{
	iface->raise = sound_services_player_iface_proxy_raise;
	iface->get_can_raise = sound_services_player_iface_dbus_proxy_get_can_raise;
	iface->get_desktop_entry = sound_services_player_iface_dbus_proxy_get_desktop_entry;
}

static void
sound_services_player_iface_proxy_next (SoundServicesPlayerIface* self,
                                        GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.mpris.MediaPlayer2.Player", "Next");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
sound_services_player_iface_proxy_previous (SoundServicesPlayerIface* self,
                                            GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.mpris.MediaPlayer2.Player", "Previous");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
sound_services_player_iface_proxy_pause (SoundServicesPlayerIface* self,
                                         GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.mpris.MediaPlayer2.Player", "Pause");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
sound_services_player_iface_proxy_play_pause (SoundServicesPlayerIface* self,
                                              GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.mpris.MediaPlayer2.Player", "PlayPause");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
sound_services_player_iface_proxy_stop (SoundServicesPlayerIface* self,
                                        GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.mpris.MediaPlayer2.Player", "Stop");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
sound_services_player_iface_proxy_play (SoundServicesPlayerIface* self,
                                        GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.mpris.MediaPlayer2.Player", "Play");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static gchar*
sound_services_player_iface_dbus_proxy_get_playback_status (SoundServicesPlayerIface* self)
{
	GVariant *_inner_reply;
	gchar* _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "PlaybackStatus");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2.Player"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("PlaybackStatus"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			return NULL;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_dup_string (_inner_reply, NULL);
	g_variant_unref (_inner_reply);
	return _result;
}

static GHashTable*
sound_services_player_iface_dbus_proxy_get_metadata (SoundServicesPlayerIface* self)
{
	GVariant *_inner_reply;
	GHashTable* _result;
	GHashTable* _tmp29_;
	GVariantIter _tmp30_;
	GVariant* _tmp31_;
	GVariant* _tmp32_;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Metadata");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2.Player"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Metadata"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			return NULL;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_tmp29_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp30_, _inner_reply);
	while (g_variant_iter_loop (&_tmp30_, "{?*}", &_tmp31_, &_tmp32_)) {
		g_hash_table_insert (_tmp29_, g_variant_dup_string (_tmp31_, NULL), g_variant_get_variant (_tmp32_));
	}
	_result = _tmp29_;
	g_variant_unref (_inner_reply);
	return _result;
}

static gboolean
sound_services_player_iface_dbus_proxy_get_can_go_next (SoundServicesPlayerIface* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "CanGoNext");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2.Player"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("CanGoNext"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			gboolean _tmp33_ = FALSE;
			return _tmp33_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_boolean (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static gboolean
sound_services_player_iface_dbus_proxy_get_can_go_previous (SoundServicesPlayerIface* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "CanGoPrevious");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2.Player"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("CanGoPrevious"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			gboolean _tmp34_ = FALSE;
			return _tmp34_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_boolean (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static gboolean
sound_services_player_iface_dbus_proxy_get_can_play (SoundServicesPlayerIface* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "CanPlay");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2.Player"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("CanPlay"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			gboolean _tmp35_ = FALSE;
			return _tmp35_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_boolean (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static gboolean
sound_services_player_iface_dbus_proxy_get_can_pause (SoundServicesPlayerIface* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "CanPause");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2.Player"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("CanPause"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			gboolean _tmp36_ = FALSE;
			return _tmp36_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_boolean (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static void
sound_services_player_iface_proxy_sound_services_player_iface_interface_init (SoundServicesPlayerIfaceIface* iface)
{
	iface->next = sound_services_player_iface_proxy_next;
	iface->previous = sound_services_player_iface_proxy_previous;
	iface->pause = sound_services_player_iface_proxy_pause;
	iface->play_pause = sound_services_player_iface_proxy_play_pause;
	iface->stop = sound_services_player_iface_proxy_stop;
	iface->play = sound_services_player_iface_proxy_play;
	iface->get_playback_status = sound_services_player_iface_dbus_proxy_get_playback_status;
	iface->get_metadata = sound_services_player_iface_dbus_proxy_get_metadata;
	iface->get_can_go_next = sound_services_player_iface_dbus_proxy_get_can_go_next;
	iface->get_can_go_previous = sound_services_player_iface_dbus_proxy_get_can_go_previous;
	iface->get_can_play = sound_services_player_iface_dbus_proxy_get_can_play;
	iface->get_can_pause = sound_services_player_iface_dbus_proxy_get_can_pause;
}

static void
_dbus_sound_services_player_iface_next (SoundServicesPlayerIface* self,
                                        GVariant* _parameters_,
                                        GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	sound_services_player_iface_next (self, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_sound_services_player_iface_previous (SoundServicesPlayerIface* self,
                                            GVariant* _parameters_,
                                            GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	sound_services_player_iface_previous (self, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_sound_services_player_iface_pause (SoundServicesPlayerIface* self,
                                         GVariant* _parameters_,
                                         GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	sound_services_player_iface_pause (self, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_sound_services_player_iface_play_pause (SoundServicesPlayerIface* self,
                                              GVariant* _parameters_,
                                              GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	sound_services_player_iface_play_pause (self, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_sound_services_player_iface_stop (SoundServicesPlayerIface* self,
                                        GVariant* _parameters_,
                                        GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	sound_services_player_iface_stop (self, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_sound_services_player_iface_play (SoundServicesPlayerIface* self,
                                        GVariant* _parameters_,
                                        GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	sound_services_player_iface_play (self, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
sound_services_player_iface_dbus_interface_method_call (GDBusConnection* connection,
                                                        const gchar* sender,
                                                        const gchar* object_path,
                                                        const gchar* interface_name,
                                                        const gchar* method_name,
                                                        GVariant* parameters,
                                                        GDBusMethodInvocation* invocation,
                                                        gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "Next") == 0) {
		_dbus_sound_services_player_iface_next (object, parameters, invocation);
	} else if (strcmp (method_name, "Previous") == 0) {
		_dbus_sound_services_player_iface_previous (object, parameters, invocation);
	} else if (strcmp (method_name, "Pause") == 0) {
		_dbus_sound_services_player_iface_pause (object, parameters, invocation);
	} else if (strcmp (method_name, "PlayPause") == 0) {
		_dbus_sound_services_player_iface_play_pause (object, parameters, invocation);
	} else if (strcmp (method_name, "Stop") == 0) {
		_dbus_sound_services_player_iface_stop (object, parameters, invocation);
	} else if (strcmp (method_name, "Play") == 0) {
		_dbus_sound_services_player_iface_play (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
_dbus_sound_services_player_iface_get_playback_status (SoundServicesPlayerIface* self)
{
	gchar* result;
	GVariant* _reply;
	result = sound_services_player_iface_get_playback_status (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_sound_services_player_iface_get_metadata (SoundServicesPlayerIface* self)
{
	GHashTable* result;
	GVariant* _reply;
	GVariantBuilder _tmp37_;
	GHashTableIter _tmp38_;
	gpointer _tmp39_;
	gpointer _tmp40_;
	result = sound_services_player_iface_get_metadata (self);
	g_hash_table_iter_init (&_tmp38_, result);
	g_variant_builder_init (&_tmp37_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp38_, &_tmp39_, &_tmp40_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp39_;
		_value = (GVariant*) _tmp40_;
		g_variant_builder_add (&_tmp37_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	_reply = g_variant_builder_end (&_tmp37_);
	_g_hash_table_unref0 (result);
	return _reply;
}

static GVariant*
_dbus_sound_services_player_iface_get_can_go_next (SoundServicesPlayerIface* self)
{
	gboolean result;
	GVariant* _reply;
	result = sound_services_player_iface_get_can_go_next (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
_dbus_sound_services_player_iface_get_can_go_previous (SoundServicesPlayerIface* self)
{
	gboolean result;
	GVariant* _reply;
	result = sound_services_player_iface_get_can_go_previous (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
_dbus_sound_services_player_iface_get_can_play (SoundServicesPlayerIface* self)
{
	gboolean result;
	GVariant* _reply;
	result = sound_services_player_iface_get_can_play (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
_dbus_sound_services_player_iface_get_can_pause (SoundServicesPlayerIface* self)
{
	gboolean result;
	GVariant* _reply;
	result = sound_services_player_iface_get_can_pause (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
sound_services_player_iface_dbus_interface_get_property (GDBusConnection* connection,
                                                         const gchar* sender,
                                                         const gchar* object_path,
                                                         const gchar* interface_name,
                                                         const gchar* property_name,
                                                         GError** error,
                                                         gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (property_name, "PlaybackStatus") == 0) {
		return _dbus_sound_services_player_iface_get_playback_status (object);
	} else if (strcmp (property_name, "Metadata") == 0) {
		return _dbus_sound_services_player_iface_get_metadata (object);
	} else if (strcmp (property_name, "CanGoNext") == 0) {
		return _dbus_sound_services_player_iface_get_can_go_next (object);
	} else if (strcmp (property_name, "CanGoPrevious") == 0) {
		return _dbus_sound_services_player_iface_get_can_go_previous (object);
	} else if (strcmp (property_name, "CanPlay") == 0) {
		return _dbus_sound_services_player_iface_get_can_play (object);
	} else if (strcmp (property_name, "CanPause") == 0) {
		return _dbus_sound_services_player_iface_get_can_pause (object);
	}
	return NULL;
}

static gboolean
sound_services_player_iface_dbus_interface_set_property (GDBusConnection* connection,
                                                         const gchar* sender,
                                                         const gchar* object_path,
                                                         const gchar* interface_name,
                                                         const gchar* property_name,
                                                         GVariant* value,
                                                         GError** error,
                                                         gpointer user_data)
{
	return FALSE;
}

guint
sound_services_player_iface_register_object (gpointer object,
                                             GDBusConnection* connection,
                                             const gchar* path,
                                             GError** error)
{
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_sound_services_player_iface_dbus_interface_info), &_sound_services_player_iface_dbus_interface_vtable, data, _sound_services_player_iface_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_sound_services_player_iface_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

