aboutsummaryrefslogtreecommitdiff
path: root/src/mpris2-interfaces.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mpris2-interfaces.c')
-rw-r--r--src/mpris2-interfaces.c2420
1 files changed, 2420 insertions, 0 deletions
diff --git a/src/mpris2-interfaces.c b/src/mpris2-interfaces.c
new file mode 100644
index 0000000..6f18596
--- /dev/null
+++ b/src/mpris2-interfaces.c
@@ -0,0 +1,2420 @@
+/* mpris2-interfaces.c generated by valac 0.11.3, the Vala compiler
+ * generated from mpris2-interfaces.vala, do not modify */
+
+/*
+Copyright 2010 Canonical Ltd.
+Authors:
+ Conor Curran <conor.curran@canonical.com>
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License version 3, as published
+by the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranties of
+MERCHANTABILITY, SATISFACTORY QUALITY, 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 <glib.h>
+#include <glib-object.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gio/gio.h>
+
+
+#define TYPE_MPRIS_ROOT (mpris_root_get_type ())
+#define MPRIS_ROOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MPRIS_ROOT, MprisRoot))
+#define IS_MPRIS_ROOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MPRIS_ROOT))
+#define MPRIS_ROOT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MPRIS_ROOT, MprisRootIface))
+
+typedef struct _MprisRoot MprisRoot;
+typedef struct _MprisRootIface MprisRootIface;
+
+#define TYPE_MPRIS_ROOT_PROXY (mpris_root_proxy_get_type ())
+typedef GDBusProxy MprisRootProxy;
+typedef GDBusProxyClass MprisRootProxyClass;
+#define _g_free0(var) (var = (g_free (var), NULL))
+
+#define TYPE_MPRIS_PLAYER (mpris_player_get_type ())
+#define MPRIS_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MPRIS_PLAYER, MprisPlayer))
+#define IS_MPRIS_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MPRIS_PLAYER))
+#define MPRIS_PLAYER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MPRIS_PLAYER, MprisPlayerIface))
+
+typedef struct _MprisPlayer MprisPlayer;
+typedef struct _MprisPlayerIface MprisPlayerIface;
+
+#define TYPE_MPRIS_PLAYER_PROXY (mpris_player_proxy_get_type ())
+typedef GDBusProxy MprisPlayerProxy;
+typedef GDBusProxyClass MprisPlayerProxyClass;
+#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
+
+#define TYPE_PLAYLIST_DETAILS (playlist_details_get_type ())
+typedef struct _PlaylistDetails PlaylistDetails;
+
+#define TYPE_ACTIVE_PLAYLIST_CONTAINER (active_playlist_container_get_type ())
+typedef struct _ActivePlaylistContainer ActivePlaylistContainer;
+
+#define TYPE_MPRIS_PLAYLISTS (mpris_playlists_get_type ())
+#define MPRIS_PLAYLISTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MPRIS_PLAYLISTS, MprisPlaylists))
+#define IS_MPRIS_PLAYLISTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MPRIS_PLAYLISTS))
+#define MPRIS_PLAYLISTS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MPRIS_PLAYLISTS, MprisPlaylistsIface))
+
+typedef struct _MprisPlaylists MprisPlaylists;
+typedef struct _MprisPlaylistsIface MprisPlaylistsIface;
+
+#define TYPE_MPRIS_PLAYLISTS_PROXY (mpris_playlists_proxy_get_type ())
+typedef GDBusProxy MprisPlaylistsProxy;
+typedef GDBusProxyClass MprisPlaylistsProxyClass;
+
+struct _MprisRootIface {
+ GTypeInterface parent_iface;
+ void (*Quit) (MprisRoot* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
+ void (*Quit_finish) (MprisRoot* self, GAsyncResult* _res_, GError** error);
+ void (*Raise) (MprisRoot* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
+ void (*Raise_finish) (MprisRoot* self, GAsyncResult* _res_, GError** error);
+ gboolean (*get_HasTracklist) (MprisRoot* self);
+ void (*set_HasTracklist) (MprisRoot* self, gboolean value);
+ gboolean (*get_CanQuit) (MprisRoot* self);
+ void (*set_CanQuit) (MprisRoot* self, gboolean value);
+ gboolean (*get_CanRaise) (MprisRoot* self);
+ void (*set_CanRaise) (MprisRoot* self, gboolean value);
+ gchar* (*get_Identity) (MprisRoot* self);
+ void (*set_Identity) (MprisRoot* self, const gchar* value);
+ gchar* (*get_DesktopEntry) (MprisRoot* self);
+ void (*set_DesktopEntry) (MprisRoot* self, const gchar* value);
+};
+
+struct _MprisPlayerIface {
+ GTypeInterface parent_iface;
+ void (*PlayPause) (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
+ void (*PlayPause_finish) (MprisPlayer* self, GAsyncResult* _res_, GError** error);
+ void (*Next) (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
+ void (*Next_finish) (MprisPlayer* self, GAsyncResult* _res_, GError** error);
+ void (*Previous) (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
+ void (*Previous_finish) (MprisPlayer* self, GAsyncResult* _res_, GError** error);
+ GHashTable* (*get_Metadata) (MprisPlayer* self);
+ void (*set_Metadata) (MprisPlayer* self, GHashTable* value);
+ gint32 (*get_Position) (MprisPlayer* self);
+ void (*set_Position) (MprisPlayer* self, gint32 value);
+ gchar* (*get_PlaybackStatus) (MprisPlayer* self);
+ void (*set_PlaybackStatus) (MprisPlayer* self, const gchar* value);
+};
+
+struct _PlaylistDetails {
+ char* path;
+ gchar* name;
+ gchar* icon_path;
+};
+
+struct _ActivePlaylistContainer {
+ gboolean valid;
+ PlaylistDetails details;
+};
+
+struct _MprisPlaylistsIface {
+ GTypeInterface parent_iface;
+ void (*ActivatePlaylist) (MprisPlaylists* self, const char* playlist_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
+ void (*ActivatePlaylist_finish) (MprisPlaylists* self, GAsyncResult* _res_, GError** error);
+ PlaylistDetails* (*GetPlaylists) (MprisPlaylists* self, guint32 index, guint32 max_count, const gchar* order, gboolean reverse_order, int* result_length1, GError** error);
+ gchar** (*get_Orderings) (MprisPlaylists* self, int* result_length1);
+ void (*set_Orderings) (MprisPlaylists* self, gchar** value, int value_length1);
+ guint32 (*get_PlaylistCount) (MprisPlaylists* self);
+ void (*set_PlaylistCount) (MprisPlaylists* self, guint32 value);
+ void (*get_ActivePlaylist) (MprisPlaylists* self, ActivePlaylistContainer* value);
+ void (*set_ActivePlaylist) (MprisPlaylists* self, ActivePlaylistContainer* value);
+};
+
+
+
+#define MPRIS_PREFIX "org.mpris.MediaPlayer2."
+#define MPRIS_MEDIA_PLAYER_PATH "/org/mpris/MediaPlayer2"
+GType mpris_root_proxy_get_type (void) G_GNUC_CONST;
+guint mpris_root_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
+GType mpris_root_get_type (void) G_GNUC_CONST;
+void mpris_root_Quit (MprisRoot* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
+void mpris_root_Quit_finish (MprisRoot* self, GAsyncResult* _res_, GError** error);
+void mpris_root_Raise (MprisRoot* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
+void mpris_root_Raise_finish (MprisRoot* self, GAsyncResult* _res_, GError** error);
+gboolean mpris_root_get_HasTracklist (MprisRoot* self);
+void mpris_root_set_HasTracklist (MprisRoot* self, gboolean value);
+gboolean mpris_root_get_CanQuit (MprisRoot* self);
+void mpris_root_set_CanQuit (MprisRoot* self, gboolean value);
+gboolean mpris_root_get_CanRaise (MprisRoot* self);
+void mpris_root_set_CanRaise (MprisRoot* self, gboolean value);
+gchar* mpris_root_get_Identity (MprisRoot* self);
+void mpris_root_set_Identity (MprisRoot* self, const gchar* value);
+gchar* mpris_root_get_DesktopEntry (MprisRoot* self);
+void mpris_root_set_DesktopEntry (MprisRoot* self, const gchar* value);
+static void mpris_root_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters);
+static void _vala_g_async_ready_callback (GObject *source_object, GAsyncResult *res, void *user_data);
+static void mpris_root_proxy_Quit_async (MprisRoot* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
+static void mpris_root_proxy_Quit_finish (MprisRoot* self, GAsyncResult* _res_, GError** error);
+static void mpris_root_proxy_Raise_async (MprisRoot* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
+static void mpris_root_proxy_Raise_finish (MprisRoot* self, GAsyncResult* _res_, GError** error);
+static gboolean mpris_root_dbus_proxy_get_HasTracklist (MprisRoot* self);
+static void mpris_root_dbus_proxy_set_HasTracklist (MprisRoot* self, gboolean value);
+static gboolean mpris_root_dbus_proxy_get_CanQuit (MprisRoot* self);
+static void mpris_root_dbus_proxy_set_CanQuit (MprisRoot* self, gboolean value);
+static gboolean mpris_root_dbus_proxy_get_CanRaise (MprisRoot* self);
+static void mpris_root_dbus_proxy_set_CanRaise (MprisRoot* self, gboolean value);
+static gchar* mpris_root_dbus_proxy_get_Identity (MprisRoot* self);
+static void mpris_root_dbus_proxy_set_Identity (MprisRoot* self, const gchar* value);
+static gchar* mpris_root_dbus_proxy_get_DesktopEntry (MprisRoot* self);
+static void mpris_root_dbus_proxy_set_DesktopEntry (MprisRoot* self, const gchar* value);
+static void mpris_root_proxy_mpris_root_interface_init (MprisRootIface* iface);
+static void _dbus_mpris_root_Quit (MprisRoot* self, GVariant* parameters, GDBusMethodInvocation* invocation);
+static void _dbus_mpris_root_Quit_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
+static void _dbus_mpris_root_Raise (MprisRoot* self, GVariant* parameters, GDBusMethodInvocation* invocation);
+static void _dbus_mpris_root_Raise_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
+static void mpris_root_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* mpris_root_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_mpris_root_get_HasTracklist (MprisRoot* self);
+static GVariant* _dbus_mpris_root_get_CanQuit (MprisRoot* self);
+static GVariant* _dbus_mpris_root_get_CanRaise (MprisRoot* self);
+static GVariant* _dbus_mpris_root_get_Identity (MprisRoot* self);
+static GVariant* _dbus_mpris_root_get_DesktopEntry (MprisRoot* self);
+static gboolean mpris_root_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_mpris_root_set_HasTracklist (MprisRoot* self, GVariant* _value);
+static void _dbus_mpris_root_set_CanQuit (MprisRoot* self, GVariant* _value);
+static void _dbus_mpris_root_set_CanRaise (MprisRoot* self, GVariant* _value);
+static void _dbus_mpris_root_set_Identity (MprisRoot* self, GVariant* _value);
+static void _dbus_mpris_root_set_DesktopEntry (MprisRoot* self, GVariant* _value);
+static void _mpris_root_unregister_object (gpointer user_data);
+GType mpris_player_proxy_get_type (void) G_GNUC_CONST;
+guint mpris_player_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
+GType mpris_player_get_type (void) G_GNUC_CONST;
+void mpris_player_PlayPause (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
+void mpris_player_PlayPause_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error);
+void mpris_player_Next (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
+void mpris_player_Next_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error);
+void mpris_player_Previous (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
+void mpris_player_Previous_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error);
+GHashTable* mpris_player_get_Metadata (MprisPlayer* self);
+void mpris_player_set_Metadata (MprisPlayer* self, GHashTable* value);
+gint32 mpris_player_get_Position (MprisPlayer* self);
+void mpris_player_set_Position (MprisPlayer* self, gint32 value);
+gchar* mpris_player_get_PlaybackStatus (MprisPlayer* self);
+void mpris_player_set_PlaybackStatus (MprisPlayer* self, const gchar* value);
+static void g_cclosure_user_marshal_VOID__INT64 (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
+static void mpris_player_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters);
+static void _dbus_handle_mpris_player_seeked (MprisPlayer* self, GVariant* parameters);
+static void mpris_player_proxy_PlayPause_async (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
+static void mpris_player_proxy_PlayPause_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error);
+static void mpris_player_proxy_Next_async (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
+static void mpris_player_proxy_Next_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error);
+static void mpris_player_proxy_Previous_async (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
+static void mpris_player_proxy_Previous_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error);
+static GHashTable* mpris_player_dbus_proxy_get_Metadata (MprisPlayer* self);
+static void mpris_player_dbus_proxy_set_Metadata (MprisPlayer* self, GHashTable* value);
+static gint32 mpris_player_dbus_proxy_get_Position (MprisPlayer* self);
+static void mpris_player_dbus_proxy_set_Position (MprisPlayer* self, gint32 value);
+static gchar* mpris_player_dbus_proxy_get_PlaybackStatus (MprisPlayer* self);
+static void mpris_player_dbus_proxy_set_PlaybackStatus (MprisPlayer* self, const gchar* value);
+static void mpris_player_proxy_mpris_player_interface_init (MprisPlayerIface* iface);
+static void _dbus_mpris_player_PlayPause (MprisPlayer* self, GVariant* parameters, GDBusMethodInvocation* invocation);
+static void _dbus_mpris_player_PlayPause_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
+static void _dbus_mpris_player_Next (MprisPlayer* self, GVariant* parameters, GDBusMethodInvocation* invocation);
+static void _dbus_mpris_player_Next_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
+static void _dbus_mpris_player_Previous (MprisPlayer* self, GVariant* parameters, GDBusMethodInvocation* invocation);
+static void _dbus_mpris_player_Previous_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
+static void mpris_player_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* mpris_player_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_mpris_player_get_Metadata (MprisPlayer* self);
+static GVariant* _dbus_mpris_player_get_Position (MprisPlayer* self);
+static GVariant* _dbus_mpris_player_get_PlaybackStatus (MprisPlayer* self);
+static gboolean mpris_player_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_mpris_player_set_Metadata (MprisPlayer* self, GVariant* _value);
+static void _dbus_mpris_player_set_Position (MprisPlayer* self, GVariant* _value);
+static void _dbus_mpris_player_set_PlaybackStatus (MprisPlayer* self, GVariant* _value);
+static void _dbus_mpris_player_seeked (GObject* _sender, gint64 new_position, gpointer* _data);
+static void _mpris_player_unregister_object (gpointer user_data);
+GType playlist_details_get_type (void) G_GNUC_CONST;
+PlaylistDetails* playlist_details_dup (const PlaylistDetails* self);
+void playlist_details_free (PlaylistDetails* self);
+void playlist_details_copy (const PlaylistDetails* self, PlaylistDetails* dest);
+void playlist_details_destroy (PlaylistDetails* self);
+GType active_playlist_container_get_type (void) G_GNUC_CONST;
+ActivePlaylistContainer* active_playlist_container_dup (const ActivePlaylistContainer* self);
+void active_playlist_container_free (ActivePlaylistContainer* self);
+void active_playlist_container_copy (const ActivePlaylistContainer* self, ActivePlaylistContainer* dest);
+void active_playlist_container_destroy (ActivePlaylistContainer* self);
+GType mpris_playlists_proxy_get_type (void) G_GNUC_CONST;
+guint mpris_playlists_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
+GType mpris_playlists_get_type (void) G_GNUC_CONST;
+void mpris_playlists_ActivatePlaylist (MprisPlaylists* self, const char* playlist_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
+void mpris_playlists_ActivatePlaylist_finish (MprisPlaylists* self, GAsyncResult* _res_, GError** error);
+PlaylistDetails* mpris_playlists_GetPlaylists (MprisPlaylists* self, guint32 index, guint32 max_count, const gchar* order, gboolean reverse_order, int* result_length1, GError** error);
+gchar** mpris_playlists_get_Orderings (MprisPlaylists* self, int* result_length1);
+void mpris_playlists_set_Orderings (MprisPlaylists* self, gchar** value, int value_length1);
+guint32 mpris_playlists_get_PlaylistCount (MprisPlaylists* self);
+void mpris_playlists_set_PlaylistCount (MprisPlaylists* self, guint32 value);
+void mpris_playlists_get_ActivePlaylist (MprisPlaylists* self, ActivePlaylistContainer* result);
+void mpris_playlists_set_ActivePlaylist (MprisPlaylists* self, ActivePlaylistContainer* value);
+static void mpris_playlists_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters);
+static void mpris_playlists_proxy_ActivatePlaylist_async (MprisPlaylists* self, const char* playlist_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
+static void mpris_playlists_proxy_ActivatePlaylist_finish (MprisPlaylists* self, GAsyncResult* _res_, GError** error);
+static PlaylistDetails* mpris_playlists_proxy_GetPlaylists (MprisPlaylists* self, guint32 index, guint32 max_count, const gchar* order, gboolean reverse_order, int* result_length1, GError** error);
+static gchar** mpris_playlists_dbus_proxy_get_Orderings (MprisPlaylists* self, int* result_length1);
+static void mpris_playlists_dbus_proxy_set_Orderings (MprisPlaylists* self, gchar** value, int value_length1);
+static guint32 mpris_playlists_dbus_proxy_get_PlaylistCount (MprisPlaylists* self);
+static void mpris_playlists_dbus_proxy_set_PlaylistCount (MprisPlaylists* self, guint32 value);
+static void mpris_playlists_dbus_proxy_get_ActivePlaylist (MprisPlaylists* self, ActivePlaylistContainer* result);
+static void mpris_playlists_dbus_proxy_set_ActivePlaylist (MprisPlaylists* self, ActivePlaylistContainer* value);
+static void mpris_playlists_proxy_mpris_playlists_interface_init (MprisPlaylistsIface* iface);
+static void _dbus_mpris_playlists_ActivatePlaylist (MprisPlaylists* self, GVariant* parameters, GDBusMethodInvocation* invocation);
+static void _dbus_mpris_playlists_ActivatePlaylist_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
+static void _vala_PlaylistDetails_array_free (PlaylistDetails* array, gint array_length);
+static void _dbus_mpris_playlists_GetPlaylists (MprisPlaylists* self, GVariant* parameters, GDBusMethodInvocation* invocation);
+static void mpris_playlists_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* mpris_playlists_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_mpris_playlists_get_Orderings (MprisPlaylists* self);
+static GVariant* _dbus_mpris_playlists_get_PlaylistCount (MprisPlaylists* self);
+static GVariant* _dbus_mpris_playlists_get_ActivePlaylist (MprisPlaylists* self);
+static gboolean mpris_playlists_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_mpris_playlists_set_Orderings (MprisPlaylists* self, GVariant* _value);
+static void _dbus_mpris_playlists_set_PlaylistCount (MprisPlaylists* self, GVariant* _value);
+static void _dbus_mpris_playlists_set_ActivePlaylist (MprisPlaylists* self, GVariant* _value);
+static void _mpris_playlists_unregister_object (gpointer user_data);
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
+
+static const GDBusArgInfo * const _mpris_root_dbus_arg_info_Quit_in[] = {NULL};
+static const GDBusArgInfo * const _mpris_root_dbus_arg_info_Quit_out[] = {NULL};
+static const GDBusMethodInfo _mpris_root_dbus_method_info_Quit = {-1, "Quit", (GDBusArgInfo **) (&_mpris_root_dbus_arg_info_Quit_in), (GDBusArgInfo **) (&_mpris_root_dbus_arg_info_Quit_out)};
+static const GDBusArgInfo * const _mpris_root_dbus_arg_info_Raise_in[] = {NULL};
+static const GDBusArgInfo * const _mpris_root_dbus_arg_info_Raise_out[] = {NULL};
+static const GDBusMethodInfo _mpris_root_dbus_method_info_Raise = {-1, "Raise", (GDBusArgInfo **) (&_mpris_root_dbus_arg_info_Raise_in), (GDBusArgInfo **) (&_mpris_root_dbus_arg_info_Raise_out)};
+static const GDBusMethodInfo * const _mpris_root_dbus_method_info[] = {&_mpris_root_dbus_method_info_Quit, &_mpris_root_dbus_method_info_Raise, NULL};
+static const GDBusSignalInfo * const _mpris_root_dbus_signal_info[] = {NULL};
+static const GDBusPropertyInfo _mpris_root_dbus_property_info_HasTracklist = {-1, "HasTracklist", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE};
+static const GDBusPropertyInfo _mpris_root_dbus_property_info_CanQuit = {-1, "CanQuit", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE};
+static const GDBusPropertyInfo _mpris_root_dbus_property_info_CanRaise = {-1, "CanRaise", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE};
+static const GDBusPropertyInfo _mpris_root_dbus_property_info_Identity = {-1, "Identity", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE};
+static const GDBusPropertyInfo _mpris_root_dbus_property_info_DesktopEntry = {-1, "DesktopEntry", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE};
+static const GDBusPropertyInfo * const _mpris_root_dbus_property_info[] = {&_mpris_root_dbus_property_info_HasTracklist, &_mpris_root_dbus_property_info_CanQuit, &_mpris_root_dbus_property_info_CanRaise, &_mpris_root_dbus_property_info_Identity, &_mpris_root_dbus_property_info_DesktopEntry, NULL};
+static const GDBusInterfaceInfo _mpris_root_dbus_interface_info = {-1, "org.mpris.MediaPlayer2", (GDBusMethodInfo **) (&_mpris_root_dbus_method_info), (GDBusSignalInfo **) (&_mpris_root_dbus_signal_info), (GDBusPropertyInfo **) (&_mpris_root_dbus_property_info)};
+static const GDBusInterfaceVTable _mpris_root_dbus_interface_vtable = {mpris_root_dbus_interface_method_call, mpris_root_dbus_interface_get_property, mpris_root_dbus_interface_set_property};
+static const GDBusArgInfo * const _mpris_player_dbus_arg_info_PlayPause_in[] = {NULL};
+static const GDBusArgInfo * const _mpris_player_dbus_arg_info_PlayPause_out[] = {NULL};
+static const GDBusMethodInfo _mpris_player_dbus_method_info_PlayPause = {-1, "PlayPause", (GDBusArgInfo **) (&_mpris_player_dbus_arg_info_PlayPause_in), (GDBusArgInfo **) (&_mpris_player_dbus_arg_info_PlayPause_out)};
+static const GDBusArgInfo * const _mpris_player_dbus_arg_info_Next_in[] = {NULL};
+static const GDBusArgInfo * const _mpris_player_dbus_arg_info_Next_out[] = {NULL};
+static const GDBusMethodInfo _mpris_player_dbus_method_info_Next = {-1, "Next", (GDBusArgInfo **) (&_mpris_player_dbus_arg_info_Next_in), (GDBusArgInfo **) (&_mpris_player_dbus_arg_info_Next_out)};
+static const GDBusArgInfo * const _mpris_player_dbus_arg_info_Previous_in[] = {NULL};
+static const GDBusArgInfo * const _mpris_player_dbus_arg_info_Previous_out[] = {NULL};
+static const GDBusMethodInfo _mpris_player_dbus_method_info_Previous = {-1, "Previous", (GDBusArgInfo **) (&_mpris_player_dbus_arg_info_Previous_in), (GDBusArgInfo **) (&_mpris_player_dbus_arg_info_Previous_out)};
+static const GDBusMethodInfo * const _mpris_player_dbus_method_info[] = {&_mpris_player_dbus_method_info_PlayPause, &_mpris_player_dbus_method_info_Next, &_mpris_player_dbus_method_info_Previous, NULL};
+static const GDBusArgInfo _mpris_player_dbus_arg_info_seeked_new_position = {-1, "new_position", "x"};
+static const GDBusArgInfo * const _mpris_player_dbus_arg_info_seeked[] = {&_mpris_player_dbus_arg_info_seeked_new_position, NULL};
+static const GDBusSignalInfo _mpris_player_dbus_signal_info_seeked = {-1, "Seeked", (GDBusArgInfo **) (&_mpris_player_dbus_arg_info_seeked)};
+static const GDBusSignalInfo * const _mpris_player_dbus_signal_info[] = {&_mpris_player_dbus_signal_info_seeked, NULL};
+static const GDBusPropertyInfo _mpris_player_dbus_property_info_Metadata = {-1, "Metadata", "a{sv}", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE};
+static const GDBusPropertyInfo _mpris_player_dbus_property_info_Position = {-1, "Position", "i", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE};
+static const GDBusPropertyInfo _mpris_player_dbus_property_info_PlaybackStatus = {-1, "PlaybackStatus", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE};
+static const GDBusPropertyInfo * const _mpris_player_dbus_property_info[] = {&_mpris_player_dbus_property_info_Metadata, &_mpris_player_dbus_property_info_Position, &_mpris_player_dbus_property_info_PlaybackStatus, NULL};
+static const GDBusInterfaceInfo _mpris_player_dbus_interface_info = {-1, "org.mpris.MediaPlayer2.Player", (GDBusMethodInfo **) (&_mpris_player_dbus_method_info), (GDBusSignalInfo **) (&_mpris_player_dbus_signal_info), (GDBusPropertyInfo **) (&_mpris_player_dbus_property_info)};
+static const GDBusInterfaceVTable _mpris_player_dbus_interface_vtable = {mpris_player_dbus_interface_method_call, mpris_player_dbus_interface_get_property, mpris_player_dbus_interface_set_property};
+static const GDBusArgInfo _mpris_playlists_dbus_arg_info_ActivatePlaylist_playlist_id = {-1, "playlist_id", "o"};
+static const GDBusArgInfo * const _mpris_playlists_dbus_arg_info_ActivatePlaylist_in[] = {&_mpris_playlists_dbus_arg_info_ActivatePlaylist_playlist_id, NULL};
+static const GDBusArgInfo * const _mpris_playlists_dbus_arg_info_ActivatePlaylist_out[] = {NULL};
+static const GDBusMethodInfo _mpris_playlists_dbus_method_info_ActivatePlaylist = {-1, "ActivatePlaylist", (GDBusArgInfo **) (&_mpris_playlists_dbus_arg_info_ActivatePlaylist_in), (GDBusArgInfo **) (&_mpris_playlists_dbus_arg_info_ActivatePlaylist_out)};
+static const GDBusArgInfo _mpris_playlists_dbus_arg_info_GetPlaylists_index = {-1, "index", "u"};
+static const GDBusArgInfo _mpris_playlists_dbus_arg_info_GetPlaylists_max_count = {-1, "max_count", "u"};
+static const GDBusArgInfo _mpris_playlists_dbus_arg_info_GetPlaylists_order = {-1, "order", "s"};
+static const GDBusArgInfo _mpris_playlists_dbus_arg_info_GetPlaylists_reverse_order = {-1, "reverse_order", "b"};
+static const GDBusArgInfo _mpris_playlists_dbus_arg_info_GetPlaylists_result = {-1, "result", "a(oss)"};
+static const GDBusArgInfo * const _mpris_playlists_dbus_arg_info_GetPlaylists_in[] = {&_mpris_playlists_dbus_arg_info_GetPlaylists_index, &_mpris_playlists_dbus_arg_info_GetPlaylists_max_count, &_mpris_playlists_dbus_arg_info_GetPlaylists_order, &_mpris_playlists_dbus_arg_info_GetPlaylists_reverse_order, NULL};
+static const GDBusArgInfo * const _mpris_playlists_dbus_arg_info_GetPlaylists_out[] = {&_mpris_playlists_dbus_arg_info_GetPlaylists_result, NULL};
+static const GDBusMethodInfo _mpris_playlists_dbus_method_info_GetPlaylists = {-1, "GetPlaylists", (GDBusArgInfo **) (&_mpris_playlists_dbus_arg_info_GetPlaylists_in), (GDBusArgInfo **) (&_mpris_playlists_dbus_arg_info_GetPlaylists_out)};
+static const GDBusMethodInfo * const _mpris_playlists_dbus_method_info[] = {&_mpris_playlists_dbus_method_info_ActivatePlaylist, &_mpris_playlists_dbus_method_info_GetPlaylists, NULL};
+static const GDBusSignalInfo * const _mpris_playlists_dbus_signal_info[] = {NULL};
+static const GDBusPropertyInfo _mpris_playlists_dbus_property_info_Orderings = {-1, "Orderings", "as", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE};
+static const GDBusPropertyInfo _mpris_playlists_dbus_property_info_PlaylistCount = {-1, "PlaylistCount", "u", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE};
+static const GDBusPropertyInfo _mpris_playlists_dbus_property_info_ActivePlaylist = {-1, "ActivePlaylist", "(b(oss))", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE};
+static const GDBusPropertyInfo * const _mpris_playlists_dbus_property_info[] = {&_mpris_playlists_dbus_property_info_Orderings, &_mpris_playlists_dbus_property_info_PlaylistCount, &_mpris_playlists_dbus_property_info_ActivePlaylist, NULL};
+static const GDBusInterfaceInfo _mpris_playlists_dbus_interface_info = {-1, "org.mpris.MediaPlayer2.Playlists", (GDBusMethodInfo **) (&_mpris_playlists_dbus_method_info), (GDBusSignalInfo **) (&_mpris_playlists_dbus_signal_info), (GDBusPropertyInfo **) (&_mpris_playlists_dbus_property_info)};
+static const GDBusInterfaceVTable _mpris_playlists_dbus_interface_vtable = {mpris_playlists_dbus_interface_method_call, mpris_playlists_dbus_interface_get_property, mpris_playlists_dbus_interface_set_property};
+
+void mpris_root_Quit (MprisRoot* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
+ MPRIS_ROOT_GET_INTERFACE (self)->Quit (self, _callback_, _user_data_);
+}
+
+
+void mpris_root_Quit_finish (MprisRoot* self, GAsyncResult* _res_, GError** error) {
+ MPRIS_ROOT_GET_INTERFACE (self)->Quit_finish (self, _res_, error);
+}
+
+
+void mpris_root_Raise (MprisRoot* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
+ MPRIS_ROOT_GET_INTERFACE (self)->Raise (self, _callback_, _user_data_);
+}
+
+
+void mpris_root_Raise_finish (MprisRoot* self, GAsyncResult* _res_, GError** error) {
+ MPRIS_ROOT_GET_INTERFACE (self)->Raise_finish (self, _res_, error);
+}
+
+
+gboolean mpris_root_get_HasTracklist (MprisRoot* self) {
+ return MPRIS_ROOT_GET_INTERFACE (self)->get_HasTracklist (self);
+}
+
+
+void mpris_root_set_HasTracklist (MprisRoot* self, gboolean value) {
+ MPRIS_ROOT_GET_INTERFACE (self)->set_HasTracklist (self, value);
+}
+
+
+gboolean mpris_root_get_CanQuit (MprisRoot* self) {
+ return MPRIS_ROOT_GET_INTERFACE (self)->get_CanQuit (self);
+}
+
+
+void mpris_root_set_CanQuit (MprisRoot* self, gboolean value) {
+ MPRIS_ROOT_GET_INTERFACE (self)->set_CanQuit (self, value);
+}
+
+
+gboolean mpris_root_get_CanRaise (MprisRoot* self) {
+ return MPRIS_ROOT_GET_INTERFACE (self)->get_CanRaise (self);
+}
+
+
+void mpris_root_set_CanRaise (MprisRoot* self, gboolean value) {
+ MPRIS_ROOT_GET_INTERFACE (self)->set_CanRaise (self, value);
+}
+
+
+gchar* mpris_root_get_Identity (MprisRoot* self) {
+ return MPRIS_ROOT_GET_INTERFACE (self)->get_Identity (self);
+}
+
+
+void mpris_root_set_Identity (MprisRoot* self, const gchar* value) {
+ MPRIS_ROOT_GET_INTERFACE (self)->set_Identity (self, value);
+}
+
+
+gchar* mpris_root_get_DesktopEntry (MprisRoot* self) {
+ return MPRIS_ROOT_GET_INTERFACE (self)->get_DesktopEntry (self);
+}
+
+
+void mpris_root_set_DesktopEntry (MprisRoot* self, const gchar* value) {
+ MPRIS_ROOT_GET_INTERFACE (self)->set_DesktopEntry (self, value);
+}
+
+
+static void mpris_root_base_init (MprisRootIface * iface) {
+ static gboolean initialized = FALSE;
+ if (!initialized) {
+ initialized = TRUE;
+ g_object_interface_install_property (iface, g_param_spec_boolean ("HasTracklist", "HasTracklist", "HasTracklist", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+ g_object_interface_install_property (iface, g_param_spec_boolean ("CanQuit", "CanQuit", "CanQuit", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+ g_object_interface_install_property (iface, g_param_spec_boolean ("CanRaise", "CanRaise", "CanRaise", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+ g_object_interface_install_property (iface, g_param_spec_string ("Identity", "Identity", "Identity", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+ g_object_interface_install_property (iface, g_param_spec_string ("DesktopEntry", "DesktopEntry", "DesktopEntry", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+ g_type_set_qdata (TYPE_MPRIS_ROOT, g_quark_from_static_string ("vala-dbus-register-object"), (void*) mpris_root_register_object);
+ }
+}
+
+
+GType mpris_root_get_type (void) {
+ static volatile gsize mpris_root_type_id__volatile = 0;
+ if (g_once_init_enter (&mpris_root_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (MprisRootIface), (GBaseInitFunc) mpris_root_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
+ GType mpris_root_type_id;
+ mpris_root_type_id = g_type_register_static (G_TYPE_INTERFACE, "MprisRoot", &g_define_type_info, 0);
+ g_type_interface_add_prerequisite (mpris_root_type_id, G_TYPE_OBJECT);
+ g_once_init_leave (&mpris_root_type_id__volatile, mpris_root_type_id);
+ }
+ return mpris_root_type_id__volatile;
+}
+
+
+G_DEFINE_TYPE_EXTENDED (MprisRootProxy, mpris_root_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_MPRIS_ROOT, mpris_root_proxy_mpris_root_interface_init) );
+static void mpris_root_proxy_class_init (MprisRootProxyClass* klass) {
+ G_DBUS_PROXY_CLASS (klass)->g_signal = mpris_root_proxy_g_signal;
+}
+
+
+static void mpris_root_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) {
+}
+
+
+static void mpris_root_proxy_init (MprisRootProxy* self) {
+}
+
+
+static void _vala_g_async_ready_callback (GObject *source_object, GAsyncResult *res, void *user_data) {
+ g_simple_async_result_set_op_res_gpointer (user_data, g_object_ref (res), g_object_unref);
+ g_simple_async_result_complete (user_data);
+ g_object_unref (user_data);
+}
+
+
+static void mpris_root_proxy_Quit_async (MprisRoot* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
+ GDBusMessage *_message;
+ GVariant *_arguments;
+ GVariantBuilder _arguments_builder;
+ G_IO_ERROR;
+ _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", "Quit");
+ g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
+ _arguments = g_variant_builder_end (&_arguments_builder);
+ g_dbus_message_set_body (_message, _arguments);
+ g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_simple_async_result_new ((GObject *) self, _callback_, _user_data_, NULL));
+ g_object_unref (_message);
+}
+
+
+static void mpris_root_proxy_Quit_finish (MprisRoot* self, GAsyncResult* _res_, GError** error) {
+ GDBusMessage *_reply_message;
+ _reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), g_simple_async_result_get_op_res_gpointer ((GSimpleAsyncResult *) _res_), error);
+ 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 mpris_root_proxy_Raise_async (MprisRoot* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
+ GDBusMessage *_message;
+ GVariant *_arguments;
+ GVariantBuilder _arguments_builder;
+ G_IO_ERROR;
+ _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);
+ g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_simple_async_result_new ((GObject *) self, _callback_, _user_data_, NULL));
+ g_object_unref (_message);
+}
+
+
+static void mpris_root_proxy_Raise_finish (MprisRoot* self, GAsyncResult* _res_, GError** error) {
+ GDBusMessage *_reply_message;
+ _reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), g_simple_async_result_get_op_res_gpointer ((GSimpleAsyncResult *) _res_), error);
+ 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 mpris_root_dbus_proxy_get_HasTracklist (MprisRoot* self) {
+ GVariant *_inner_reply;
+ gboolean _result;
+ _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "HasTracklist");
+ 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 ("HasTracklist"));
+ _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 FALSE;
+ }
+ 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 mpris_root_dbus_proxy_set_HasTracklist (MprisRoot* self, gboolean value) {
+ 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 ("HasTracklist"));
+ g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (value));
+ g_variant_builder_close (&_arguments_builder);
+ _arguments = g_variant_builder_end (&_arguments_builder);
+ _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
+ if (!_reply) {
+ return;
+ }
+ g_variant_unref (_reply);
+}
+
+
+static gboolean mpris_root_dbus_proxy_get_CanQuit (MprisRoot* self) {
+ GVariant *_inner_reply;
+ gboolean _result;
+ _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "CanQuit");
+ 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 ("CanQuit"));
+ _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 FALSE;
+ }
+ 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 mpris_root_dbus_proxy_set_CanQuit (MprisRoot* self, gboolean value) {
+ 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 ("CanQuit"));
+ g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (value));
+ g_variant_builder_close (&_arguments_builder);
+ _arguments = g_variant_builder_end (&_arguments_builder);
+ _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
+ if (!_reply) {
+ return;
+ }
+ g_variant_unref (_reply);
+}
+
+
+static gboolean mpris_root_dbus_proxy_get_CanRaise (MprisRoot* 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) {
+ return FALSE;
+ }
+ 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 mpris_root_dbus_proxy_set_CanRaise (MprisRoot* self, gboolean value) {
+ 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"));
+ g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (value));
+ g_variant_builder_close (&_arguments_builder);
+ _arguments = g_variant_builder_end (&_arguments_builder);
+ _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
+ if (!_reply) {
+ return;
+ }
+ g_variant_unref (_reply);
+}
+
+
+static gchar* mpris_root_dbus_proxy_get_Identity (MprisRoot* self) {
+ GVariant *_inner_reply;
+ gchar* _result;
+ _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Identity");
+ 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 ("Identity"));
+ _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 mpris_root_dbus_proxy_set_Identity (MprisRoot* self, const gchar* value) {
+ 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 ("Identity"));
+ g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (value));
+ g_variant_builder_close (&_arguments_builder);
+ _arguments = g_variant_builder_end (&_arguments_builder);
+ _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
+ if (!_reply) {
+ return;
+ }
+ g_variant_unref (_reply);
+}
+
+
+static gchar* mpris_root_dbus_proxy_get_DesktopEntry (MprisRoot* 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 mpris_root_dbus_proxy_set_DesktopEntry (MprisRoot* self, const gchar* value) {
+ 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"));
+ g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (value));
+ g_variant_builder_close (&_arguments_builder);
+ _arguments = g_variant_builder_end (&_arguments_builder);
+ _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
+ if (!_reply) {
+ return;
+ }
+ g_variant_unref (_reply);
+}
+
+
+static void mpris_root_proxy_mpris_root_interface_init (MprisRootIface* iface) {
+ iface->Quit = mpris_root_proxy_Quit_async;
+ iface->Quit_finish = mpris_root_proxy_Quit_finish;
+ iface->Raise = mpris_root_proxy_Raise_async;
+ iface->Raise_finish = mpris_root_proxy_Raise_finish;
+ iface->get_HasTracklist = mpris_root_dbus_proxy_get_HasTracklist;
+ iface->set_HasTracklist = mpris_root_dbus_proxy_set_HasTracklist;
+ iface->get_CanQuit = mpris_root_dbus_proxy_get_CanQuit;
+ iface->set_CanQuit = mpris_root_dbus_proxy_set_CanQuit;
+ iface->get_CanRaise = mpris_root_dbus_proxy_get_CanRaise;
+ iface->set_CanRaise = mpris_root_dbus_proxy_set_CanRaise;
+ iface->get_Identity = mpris_root_dbus_proxy_get_Identity;
+ iface->set_Identity = mpris_root_dbus_proxy_set_Identity;
+ iface->get_DesktopEntry = mpris_root_dbus_proxy_get_DesktopEntry;
+ iface->set_DesktopEntry = mpris_root_dbus_proxy_set_DesktopEntry;
+}
+
+
+static void _dbus_mpris_root_Quit (MprisRoot* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
+ GVariantIter _arguments_iter;
+ g_variant_iter_init (&_arguments_iter, parameters);
+ mpris_root_Quit (self, (GAsyncReadyCallback) _dbus_mpris_root_Quit_ready, g_object_ref (invocation));
+}
+
+
+static void _dbus_mpris_root_Quit_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
+ GDBusMethodInvocation * invocation;
+ GError* error;
+ GDBusMessage* _reply_message;
+ GVariant* _reply;
+ GVariantBuilder _reply_builder;
+ invocation = _user_data_;
+ error = NULL;
+ mpris_root_Quit_finish ((MprisRoot*) source_object, _res_, &error);
+ if (error) {
+ g_dbus_method_invocation_return_gerror (g_object_ref (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_mpris_root_Raise (MprisRoot* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
+ GVariantIter _arguments_iter;
+ g_variant_iter_init (&_arguments_iter, parameters);
+ mpris_root_Raise (self, (GAsyncReadyCallback) _dbus_mpris_root_Raise_ready, g_object_ref (invocation));
+}
+
+
+static void _dbus_mpris_root_Raise_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
+ GDBusMethodInvocation * invocation;
+ GError* error;
+ GDBusMessage* _reply_message;
+ GVariant* _reply;
+ GVariantBuilder _reply_builder;
+ invocation = _user_data_;
+ error = NULL;
+ mpris_root_Raise_finish ((MprisRoot*) source_object, _res_, &error);
+ if (error) {
+ g_dbus_method_invocation_return_gerror (g_object_ref (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 mpris_root_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, "Quit") == 0) {
+ _dbus_mpris_root_Quit (object, parameters, invocation);
+ } else if (strcmp (method_name, "Raise") == 0) {
+ _dbus_mpris_root_Raise (object, parameters, invocation);
+ }
+ g_object_unref (invocation);
+}
+
+
+static GVariant* _dbus_mpris_root_get_HasTracklist (MprisRoot* self) {
+ gboolean result;
+ GVariant* _reply;
+ result = mpris_root_get_HasTracklist (self);
+ _reply = g_variant_new_boolean (result);
+ return _reply;
+}
+
+
+static GVariant* _dbus_mpris_root_get_CanQuit (MprisRoot* self) {
+ gboolean result;
+ GVariant* _reply;
+ result = mpris_root_get_CanQuit (self);
+ _reply = g_variant_new_boolean (result);
+ return _reply;
+}
+
+
+static GVariant* _dbus_mpris_root_get_CanRaise (MprisRoot* self) {
+ gboolean result;
+ GVariant* _reply;
+ result = mpris_root_get_CanRaise (self);
+ _reply = g_variant_new_boolean (result);
+ return _reply;
+}
+
+
+static GVariant* _dbus_mpris_root_get_Identity (MprisRoot* self) {
+ gchar* result;
+ GVariant* _reply;
+ result = mpris_root_get_Identity (self);
+ _reply = g_variant_new_string (result);
+ _g_free0 (result);
+ return _reply;
+}
+
+
+static GVariant* _dbus_mpris_root_get_DesktopEntry (MprisRoot* self) {
+ gchar* result;
+ GVariant* _reply;
+ result = mpris_root_get_DesktopEntry (self);
+ _reply = g_variant_new_string (result);
+ _g_free0 (result);
+ return _reply;
+}
+
+
+static GVariant* mpris_root_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, "HasTracklist") == 0) {
+ return _dbus_mpris_root_get_HasTracklist (object);
+ } else if (strcmp (property_name, "CanQuit") == 0) {
+ return _dbus_mpris_root_get_CanQuit (object);
+ } else if (strcmp (property_name, "CanRaise") == 0) {
+ return _dbus_mpris_root_get_CanRaise (object);
+ } else if (strcmp (property_name, "Identity") == 0) {
+ return _dbus_mpris_root_get_Identity (object);
+ } else if (strcmp (property_name, "DesktopEntry") == 0) {
+ return _dbus_mpris_root_get_DesktopEntry (object);
+ }
+ return NULL;
+}
+
+
+static void _dbus_mpris_root_set_HasTracklist (MprisRoot* self, GVariant* _value) {
+ gboolean value = FALSE;
+ value = g_variant_get_boolean (_value);
+ mpris_root_set_HasTracklist (self, value);
+}
+
+
+static void _dbus_mpris_root_set_CanQuit (MprisRoot* self, GVariant* _value) {
+ gboolean value = FALSE;
+ value = g_variant_get_boolean (_value);
+ mpris_root_set_CanQuit (self, value);
+}
+
+
+static void _dbus_mpris_root_set_CanRaise (MprisRoot* self, GVariant* _value) {
+ gboolean value = FALSE;
+ value = g_variant_get_boolean (_value);
+ mpris_root_set_CanRaise (self, value);
+}
+
+
+static void _dbus_mpris_root_set_Identity (MprisRoot* self, GVariant* _value) {
+ gchar* value = NULL;
+ value = g_variant_dup_string (_value, NULL);
+ mpris_root_set_Identity (self, value);
+ _g_free0 (value);
+}
+
+
+static void _dbus_mpris_root_set_DesktopEntry (MprisRoot* self, GVariant* _value) {
+ gchar* value = NULL;
+ value = g_variant_dup_string (_value, NULL);
+ mpris_root_set_DesktopEntry (self, value);
+ _g_free0 (value);
+}
+
+
+static gboolean mpris_root_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) {
+ gpointer* data;
+ gpointer object;
+ data = user_data;
+ object = data[0];
+ if (strcmp (property_name, "HasTracklist") == 0) {
+ _dbus_mpris_root_set_HasTracklist (object, value);
+ return TRUE;
+ } else if (strcmp (property_name, "CanQuit") == 0) {
+ _dbus_mpris_root_set_CanQuit (object, value);
+ return TRUE;
+ } else if (strcmp (property_name, "CanRaise") == 0) {
+ _dbus_mpris_root_set_CanRaise (object, value);
+ return TRUE;
+ } else if (strcmp (property_name, "Identity") == 0) {
+ _dbus_mpris_root_set_Identity (object, value);
+ return TRUE;
+ } else if (strcmp (property_name, "DesktopEntry") == 0) {
+ _dbus_mpris_root_set_DesktopEntry (object, value);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+guint mpris_root_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 *) (&_mpris_root_dbus_interface_info), &_mpris_root_dbus_interface_vtable, data, _mpris_root_unregister_object, error);
+ if (!result) {
+ return 0;
+ }
+ return result;
+}
+
+
+static void _mpris_root_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 mpris_player_PlayPause (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
+ MPRIS_PLAYER_GET_INTERFACE (self)->PlayPause (self, _callback_, _user_data_);
+}
+
+
+void mpris_player_PlayPause_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error) {
+ MPRIS_PLAYER_GET_INTERFACE (self)->PlayPause_finish (self, _res_, error);
+}
+
+
+void mpris_player_Next (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
+ MPRIS_PLAYER_GET_INTERFACE (self)->Next (self, _callback_, _user_data_);
+}
+
+
+void mpris_player_Next_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error) {
+ MPRIS_PLAYER_GET_INTERFACE (self)->Next_finish (self, _res_, error);
+}
+
+
+void mpris_player_Previous (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
+ MPRIS_PLAYER_GET_INTERFACE (self)->Previous (self, _callback_, _user_data_);
+}
+
+
+void mpris_player_Previous_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error) {
+ MPRIS_PLAYER_GET_INTERFACE (self)->Previous_finish (self, _res_, error);
+}
+
+
+GHashTable* mpris_player_get_Metadata (MprisPlayer* self) {
+ return MPRIS_PLAYER_GET_INTERFACE (self)->get_Metadata (self);
+}
+
+
+void mpris_player_set_Metadata (MprisPlayer* self, GHashTable* value) {
+ MPRIS_PLAYER_GET_INTERFACE (self)->set_Metadata (self, value);
+}
+
+
+gint32 mpris_player_get_Position (MprisPlayer* self) {
+ return MPRIS_PLAYER_GET_INTERFACE (self)->get_Position (self);
+}
+
+
+void mpris_player_set_Position (MprisPlayer* self, gint32 value) {
+ MPRIS_PLAYER_GET_INTERFACE (self)->set_Position (self, value);
+}
+
+
+gchar* mpris_player_get_PlaybackStatus (MprisPlayer* self) {
+ return MPRIS_PLAYER_GET_INTERFACE (self)->get_PlaybackStatus (self);
+}
+
+
+void mpris_player_set_PlaybackStatus (MprisPlayer* self, const gchar* value) {
+ MPRIS_PLAYER_GET_INTERFACE (self)->set_PlaybackStatus (self, value);
+}
+
+
+static void g_cclosure_user_marshal_VOID__INT64 (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
+ typedef void (*GMarshalFunc_VOID__INT64) (gpointer data1, gint64 arg_1, gpointer data2);
+ register GMarshalFunc_VOID__INT64 callback;
+ register GCClosure * cc;
+ register gpointer data1, data2;
+ cc = (GCClosure *) closure;
+ g_return_if_fail (n_param_values == 2);
+ 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__INT64) (marshal_data ? marshal_data : cc->callback);
+ callback (data1, g_value_get_int64 (param_values + 1), data2);
+}
+
+
+static void mpris_player_base_init (MprisPlayerIface * iface) {
+ static gboolean initialized = FALSE;
+ if (!initialized) {
+ initialized = TRUE;
+ g_object_interface_install_property (iface, g_param_spec_boxed ("Metadata", "Metadata", "Metadata", G_TYPE_HASH_TABLE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+ g_object_interface_install_property (iface, g_param_spec_int ("Position", "Position", "Position", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+ g_object_interface_install_property (iface, g_param_spec_string ("PlaybackStatus", "PlaybackStatus", "PlaybackStatus", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+ g_signal_new ("seeked", TYPE_MPRIS_PLAYER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__INT64, G_TYPE_NONE, 1, G_TYPE_INT64);
+ g_type_set_qdata (TYPE_MPRIS_PLAYER, g_quark_from_static_string ("vala-dbus-register-object"), (void*) mpris_player_register_object);
+ }
+}
+
+
+GType mpris_player_get_type (void) {
+ static volatile gsize mpris_player_type_id__volatile = 0;
+ if (g_once_init_enter (&mpris_player_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (MprisPlayerIface), (GBaseInitFunc) mpris_player_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
+ GType mpris_player_type_id;
+ mpris_player_type_id = g_type_register_static (G_TYPE_INTERFACE, "MprisPlayer", &g_define_type_info, 0);
+ g_type_interface_add_prerequisite (mpris_player_type_id, G_TYPE_OBJECT);
+ g_once_init_leave (&mpris_player_type_id__volatile, mpris_player_type_id);
+ }
+ return mpris_player_type_id__volatile;
+}
+
+
+G_DEFINE_TYPE_EXTENDED (MprisPlayerProxy, mpris_player_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_MPRIS_PLAYER, mpris_player_proxy_mpris_player_interface_init) );
+static void mpris_player_proxy_class_init (MprisPlayerProxyClass* klass) {
+ G_DBUS_PROXY_CLASS (klass)->g_signal = mpris_player_proxy_g_signal;
+}
+
+
+static void _dbus_handle_mpris_player_seeked (MprisPlayer* self, GVariant* parameters) {
+ GVariantIter _arguments_iter;
+ gint64 new_position = 0LL;
+ GVariant* _tmp0_;
+ g_variant_iter_init (&_arguments_iter, parameters);
+ _tmp0_ = g_variant_iter_next_value (&_arguments_iter);
+ new_position = g_variant_get_int64 (_tmp0_);
+ g_variant_unref (_tmp0_);
+ g_signal_emit_by_name (self, "seeked", new_position);
+}
+
+
+static void mpris_player_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) {
+ if (strcmp (signal_name, "Seeked") == 0) {
+ _dbus_handle_mpris_player_seeked (proxy, parameters);
+ }
+}
+
+
+static void mpris_player_proxy_init (MprisPlayerProxy* self) {
+}
+
+
+static void mpris_player_proxy_PlayPause_async (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
+ GDBusMessage *_message;
+ GVariant *_arguments;
+ GVariantBuilder _arguments_builder;
+ G_IO_ERROR;
+ _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);
+ g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_simple_async_result_new ((GObject *) self, _callback_, _user_data_, NULL));
+ g_object_unref (_message);
+}
+
+
+static void mpris_player_proxy_PlayPause_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error) {
+ GDBusMessage *_reply_message;
+ _reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), g_simple_async_result_get_op_res_gpointer ((GSimpleAsyncResult *) _res_), error);
+ 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 mpris_player_proxy_Next_async (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
+ GDBusMessage *_message;
+ GVariant *_arguments;
+ GVariantBuilder _arguments_builder;
+ G_IO_ERROR;
+ _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);
+ g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_simple_async_result_new ((GObject *) self, _callback_, _user_data_, NULL));
+ g_object_unref (_message);
+}
+
+
+static void mpris_player_proxy_Next_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error) {
+ GDBusMessage *_reply_message;
+ _reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), g_simple_async_result_get_op_res_gpointer ((GSimpleAsyncResult *) _res_), error);
+ 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 mpris_player_proxy_Previous_async (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
+ GDBusMessage *_message;
+ GVariant *_arguments;
+ GVariantBuilder _arguments_builder;
+ G_IO_ERROR;
+ _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);
+ g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_simple_async_result_new ((GObject *) self, _callback_, _user_data_, NULL));
+ g_object_unref (_message);
+}
+
+
+static void mpris_player_proxy_Previous_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error) {
+ GDBusMessage *_reply_message;
+ _reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), g_simple_async_result_get_op_res_gpointer ((GSimpleAsyncResult *) _res_), error);
+ 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 GHashTable* mpris_player_dbus_proxy_get_Metadata (MprisPlayer* self) {
+ GVariant *_inner_reply;
+ GHashTable* _result;
+ GHashTable* _tmp1_;
+ GVariantIter _tmp2_;
+ GVariant* _tmp3_;
+ GVariant* _tmp4_;
+ _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);
+ }
+ _tmp1_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+ g_variant_iter_init (&_tmp2_, _inner_reply);
+ while (g_variant_iter_loop (&_tmp2_, "{?*}", &_tmp3_, &_tmp4_)) {
+ g_hash_table_insert (_tmp1_, g_variant_dup_string (_tmp3_, NULL), g_variant_get_variant (_tmp4_));
+ }
+ _result = _tmp1_;
+ g_variant_unref (_inner_reply);
+ return _result;
+}
+
+
+static void mpris_player_dbus_proxy_set_Metadata (MprisPlayer* self, GHashTable* value) {
+ GVariant *_arguments;
+ GVariant *_reply;
+ GVariantBuilder _arguments_builder;
+ GVariantBuilder _tmp5_;
+ GHashTableIter _tmp6_;
+ gpointer _tmp7_;
+ gpointer _tmp8_;
+ 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"));
+ g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
+ g_hash_table_iter_init (&_tmp6_, value);
+ g_variant_builder_init (&_tmp5_, G_VARIANT_TYPE ("a{sv}"));
+ while (g_hash_table_iter_next (&_tmp6_, &_tmp7_, &_tmp8_)) {
+ gchar* _key;
+ GVariant* _value;
+ _key = (gchar*) _tmp7_;
+ _value = (GVariant*) _tmp8_;
+ g_variant_builder_add (&_tmp5_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
+ }
+ g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp5_));
+ g_variant_builder_close (&_arguments_builder);
+ _arguments = g_variant_builder_end (&_arguments_builder);
+ _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
+ if (!_reply) {
+ return;
+ }
+ g_variant_unref (_reply);
+}
+
+
+static gint32 mpris_player_dbus_proxy_get_Position (MprisPlayer* self) {
+ GVariant *_inner_reply;
+ gint32 _result;
+ _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Position");
+ 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 ("Position"));
+ _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 0;
+ }
+ g_variant_get (_reply, "(v)", &_inner_reply);
+ g_variant_unref (_reply);
+ }
+ _result = g_variant_get_int32 (_inner_reply);
+ g_variant_unref (_inner_reply);
+ return _result;
+}
+
+
+static void mpris_player_dbus_proxy_set_Position (MprisPlayer* self, gint32 value) {
+ 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 ("Position"));
+ g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (value));
+ g_variant_builder_close (&_arguments_builder);
+ _arguments = g_variant_builder_end (&_arguments_builder);
+ _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
+ if (!_reply) {
+ return;
+ }
+ g_variant_unref (_reply);
+}
+
+
+static gchar* mpris_player_dbus_proxy_get_PlaybackStatus (MprisPlayer* 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 void mpris_player_dbus_proxy_set_PlaybackStatus (MprisPlayer* self, const gchar* value) {
+ 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"));
+ g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (value));
+ g_variant_builder_close (&_arguments_builder);
+ _arguments = g_variant_builder_end (&_arguments_builder);
+ _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
+ if (!_reply) {
+ return;
+ }
+ g_variant_unref (_reply);
+}
+
+
+static void mpris_player_proxy_mpris_player_interface_init (MprisPlayerIface* iface) {
+ iface->PlayPause = mpris_player_proxy_PlayPause_async;
+ iface->PlayPause_finish = mpris_player_proxy_PlayPause_finish;
+ iface->Next = mpris_player_proxy_Next_async;
+ iface->Next_finish = mpris_player_proxy_Next_finish;
+ iface->Previous = mpris_player_proxy_Previous_async;
+ iface->Previous_finish = mpris_player_proxy_Previous_finish;
+ iface->get_Metadata = mpris_player_dbus_proxy_get_Metadata;
+ iface->set_Metadata = mpris_player_dbus_proxy_set_Metadata;
+ iface->get_Position = mpris_player_dbus_proxy_get_Position;
+ iface->set_Position = mpris_player_dbus_proxy_set_Position;
+ iface->get_PlaybackStatus = mpris_player_dbus_proxy_get_PlaybackStatus;
+ iface->set_PlaybackStatus = mpris_player_dbus_proxy_set_PlaybackStatus;
+}
+
+
+static void _dbus_mpris_player_PlayPause (MprisPlayer* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
+ GVariantIter _arguments_iter;
+ g_variant_iter_init (&_arguments_iter, parameters);
+ mpris_player_PlayPause (self, (GAsyncReadyCallback) _dbus_mpris_player_PlayPause_ready, g_object_ref (invocation));
+}
+
+
+static void _dbus_mpris_player_PlayPause_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
+ GDBusMethodInvocation * invocation;
+ GError* error;
+ GDBusMessage* _reply_message;
+ GVariant* _reply;
+ GVariantBuilder _reply_builder;
+ invocation = _user_data_;
+ error = NULL;
+ mpris_player_PlayPause_finish ((MprisPlayer*) source_object, _res_, &error);
+ if (error) {
+ g_dbus_method_invocation_return_gerror (g_object_ref (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_mpris_player_Next (MprisPlayer* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
+ GVariantIter _arguments_iter;
+ g_variant_iter_init (&_arguments_iter, parameters);
+ mpris_player_Next (self, (GAsyncReadyCallback) _dbus_mpris_player_Next_ready, g_object_ref (invocation));
+}
+
+
+static void _dbus_mpris_player_Next_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
+ GDBusMethodInvocation * invocation;
+ GError* error;
+ GDBusMessage* _reply_message;
+ GVariant* _reply;
+ GVariantBuilder _reply_builder;
+ invocation = _user_data_;
+ error = NULL;
+ mpris_player_Next_finish ((MprisPlayer*) source_object, _res_, &error);
+ if (error) {
+ g_dbus_method_invocation_return_gerror (g_object_ref (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_mpris_player_Previous (MprisPlayer* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
+ GVariantIter _arguments_iter;
+ g_variant_iter_init (&_arguments_iter, parameters);
+ mpris_player_Previous (self, (GAsyncReadyCallback) _dbus_mpris_player_Previous_ready, g_object_ref (invocation));
+}
+
+
+static void _dbus_mpris_player_Previous_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
+ GDBusMethodInvocation * invocation;
+ GError* error;
+ GDBusMessage* _reply_message;
+ GVariant* _reply;
+ GVariantBuilder _reply_builder;
+ invocation = _user_data_;
+ error = NULL;
+ mpris_player_Previous_finish ((MprisPlayer*) source_object, _res_, &error);
+ if (error) {
+ g_dbus_method_invocation_return_gerror (g_object_ref (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 mpris_player_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, "PlayPause") == 0) {
+ _dbus_mpris_player_PlayPause (object, parameters, invocation);
+ } else if (strcmp (method_name, "Next") == 0) {
+ _dbus_mpris_player_Next (object, parameters, invocation);
+ } else if (strcmp (method_name, "Previous") == 0) {
+ _dbus_mpris_player_Previous (object, parameters, invocation);
+ }
+ g_object_unref (invocation);
+}
+
+
+static GVariant* _dbus_mpris_player_get_Metadata (MprisPlayer* self) {
+ GHashTable* result;
+ GVariantBuilder _tmp9_;
+ GHashTableIter _tmp10_;
+ gpointer _tmp11_;
+ gpointer _tmp12_;
+ GVariant* _reply;
+ result = mpris_player_get_Metadata (self);
+ g_hash_table_iter_init (&_tmp10_, result);
+ g_variant_builder_init (&_tmp9_, G_VARIANT_TYPE ("a{sv}"));
+ while (g_hash_table_iter_next (&_tmp10_, &_tmp11_, &_tmp12_)) {
+ gchar* _key;
+ GVariant* _value;
+ _key = (gchar*) _tmp11_;
+ _value = (GVariant*) _tmp12_;
+ g_variant_builder_add (&_tmp9_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
+ }
+ _reply = g_variant_builder_end (&_tmp9_);
+ _g_hash_table_unref0 (result);
+ return _reply;
+}
+
+
+static GVariant* _dbus_mpris_player_get_Position (MprisPlayer* self) {
+ gint32 result;
+ GVariant* _reply;
+ result = mpris_player_get_Position (self);
+ _reply = g_variant_new_int32 (result);
+ return _reply;
+}
+
+
+static GVariant* _dbus_mpris_player_get_PlaybackStatus (MprisPlayer* self) {
+ gchar* result;
+ GVariant* _reply;
+ result = mpris_player_get_PlaybackStatus (self);
+ _reply = g_variant_new_string (result);
+ _g_free0 (result);
+ return _reply;
+}
+
+
+static GVariant* mpris_player_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, "Metadata") == 0) {
+ return _dbus_mpris_player_get_Metadata (object);
+ } else if (strcmp (property_name, "Position") == 0) {
+ return _dbus_mpris_player_get_Position (object);
+ } else if (strcmp (property_name, "PlaybackStatus") == 0) {
+ return _dbus_mpris_player_get_PlaybackStatus (object);
+ }
+ return NULL;
+}
+
+
+static void _dbus_mpris_player_set_Metadata (MprisPlayer* self, GVariant* _value) {
+ GHashTable* value = NULL;
+ GHashTable* _tmp13_;
+ GVariantIter _tmp14_;
+ GVariant* _tmp15_;
+ GVariant* _tmp16_;
+ _tmp13_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+ g_variant_iter_init (&_tmp14_, _value);
+ while (g_variant_iter_loop (&_tmp14_, "{?*}", &_tmp15_, &_tmp16_)) {
+ g_hash_table_insert (_tmp13_, g_variant_dup_string (_tmp15_, NULL), g_variant_get_variant (_tmp16_));
+ }
+ value = _tmp13_;
+ mpris_player_set_Metadata (self, value);
+ _g_hash_table_unref0 (value);
+}
+
+
+static void _dbus_mpris_player_set_Position (MprisPlayer* self, GVariant* _value) {
+ gint32 value = 0;
+ value = g_variant_get_int32 (_value);
+ mpris_player_set_Position (self, value);
+}
+
+
+static void _dbus_mpris_player_set_PlaybackStatus (MprisPlayer* self, GVariant* _value) {
+ gchar* value = NULL;
+ value = g_variant_dup_string (_value, NULL);
+ mpris_player_set_PlaybackStatus (self, value);
+ _g_free0 (value);
+}
+
+
+static gboolean mpris_player_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) {
+ gpointer* data;
+ gpointer object;
+ data = user_data;
+ object = data[0];
+ if (strcmp (property_name, "Metadata") == 0) {
+ _dbus_mpris_player_set_Metadata (object, value);
+ return TRUE;
+ } else if (strcmp (property_name, "Position") == 0) {
+ _dbus_mpris_player_set_Position (object, value);
+ return TRUE;
+ } else if (strcmp (property_name, "PlaybackStatus") == 0) {
+ _dbus_mpris_player_set_PlaybackStatus (object, value);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+static void _dbus_mpris_player_seeked (GObject* _sender, gint64 new_position, 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_int64 (new_position));
+ _arguments = g_variant_builder_end (&_arguments_builder);
+ g_dbus_connection_emit_signal (_connection, NULL, _path, "org.mpris.MediaPlayer2.Player", "Seeked", _arguments, NULL);
+}
+
+
+guint mpris_player_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 *) (&_mpris_player_dbus_interface_info), &_mpris_player_dbus_interface_vtable, data, _mpris_player_unregister_object, error);
+ if (!result) {
+ return 0;
+ }
+ g_signal_connect (object, "seeked", (GCallback) _dbus_mpris_player_seeked, data);
+ return result;
+}
+
+
+static void _mpris_player_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 playlist_details_copy (const PlaylistDetails* self, PlaylistDetails* dest) {
+ dest->path = g_strdup (self->path);
+ dest->name = g_strdup (self->name);
+ dest->icon_path = g_strdup (self->icon_path);
+}
+
+
+void playlist_details_destroy (PlaylistDetails* self) {
+ _g_free0 (self->path);
+ _g_free0 (self->name);
+ _g_free0 (self->icon_path);
+}
+
+
+PlaylistDetails* playlist_details_dup (const PlaylistDetails* self) {
+ PlaylistDetails* dup;
+ dup = g_new0 (PlaylistDetails, 1);
+ playlist_details_copy (self, dup);
+ return dup;
+}
+
+
+void playlist_details_free (PlaylistDetails* self) {
+ playlist_details_destroy (self);
+ g_free (self);
+}
+
+
+GType playlist_details_get_type (void) {
+ static volatile gsize playlist_details_type_id__volatile = 0;
+ if (g_once_init_enter (&playlist_details_type_id__volatile)) {
+ GType playlist_details_type_id;
+ playlist_details_type_id = g_boxed_type_register_static ("PlaylistDetails", (GBoxedCopyFunc) playlist_details_dup, (GBoxedFreeFunc) playlist_details_free);
+ g_once_init_leave (&playlist_details_type_id__volatile, playlist_details_type_id);
+ }
+ return playlist_details_type_id__volatile;
+}
+
+
+void active_playlist_container_copy (const ActivePlaylistContainer* self, ActivePlaylistContainer* dest) {
+ PlaylistDetails _tmp0_ = {0};
+ dest->valid = self->valid;
+ dest->details = (playlist_details_copy (&self->details, &_tmp0_), _tmp0_);
+}
+
+
+void active_playlist_container_destroy (ActivePlaylistContainer* self) {
+ playlist_details_destroy (&self->details);
+}
+
+
+ActivePlaylistContainer* active_playlist_container_dup (const ActivePlaylistContainer* self) {
+ ActivePlaylistContainer* dup;
+ dup = g_new0 (ActivePlaylistContainer, 1);
+ active_playlist_container_copy (self, dup);
+ return dup;
+}
+
+
+void active_playlist_container_free (ActivePlaylistContainer* self) {
+ active_playlist_container_destroy (self);
+ g_free (self);
+}
+
+
+GType active_playlist_container_get_type (void) {
+ static volatile gsize active_playlist_container_type_id__volatile = 0;
+ if (g_once_init_enter (&active_playlist_container_type_id__volatile)) {
+ GType active_playlist_container_type_id;
+ active_playlist_container_type_id = g_boxed_type_register_static ("ActivePlaylistContainer", (GBoxedCopyFunc) active_playlist_container_dup, (GBoxedFreeFunc) active_playlist_container_free);
+ g_once_init_leave (&active_playlist_container_type_id__volatile, active_playlist_container_type_id);
+ }
+ return active_playlist_container_type_id__volatile;
+}
+
+
+void mpris_playlists_ActivatePlaylist (MprisPlaylists* self, const char* playlist_id, GAsyncReadyCallback _callback_, gpointer _user_data_) {
+ MPRIS_PLAYLISTS_GET_INTERFACE (self)->ActivatePlaylist (self, playlist_id, _callback_, _user_data_);
+}
+
+
+void mpris_playlists_ActivatePlaylist_finish (MprisPlaylists* self, GAsyncResult* _res_, GError** error) {
+ MPRIS_PLAYLISTS_GET_INTERFACE (self)->ActivatePlaylist_finish (self, _res_, error);
+}
+
+
+PlaylistDetails* mpris_playlists_GetPlaylists (MprisPlaylists* self, guint32 index, guint32 max_count, const gchar* order, gboolean reverse_order, int* result_length1, GError** error) {
+ return MPRIS_PLAYLISTS_GET_INTERFACE (self)->GetPlaylists (self, index, max_count, order, reverse_order, result_length1, error);
+}
+
+
+gchar** mpris_playlists_get_Orderings (MprisPlaylists* self, int* result_length1) {
+ return MPRIS_PLAYLISTS_GET_INTERFACE (self)->get_Orderings (self, result_length1);
+}
+
+
+void mpris_playlists_set_Orderings (MprisPlaylists* self, gchar** value, int value_length1) {
+ MPRIS_PLAYLISTS_GET_INTERFACE (self)->set_Orderings (self, value, value_length1);
+}
+
+
+guint32 mpris_playlists_get_PlaylistCount (MprisPlaylists* self) {
+ return MPRIS_PLAYLISTS_GET_INTERFACE (self)->get_PlaylistCount (self);
+}
+
+
+void mpris_playlists_set_PlaylistCount (MprisPlaylists* self, guint32 value) {
+ MPRIS_PLAYLISTS_GET_INTERFACE (self)->set_PlaylistCount (self, value);
+}
+
+
+void mpris_playlists_get_ActivePlaylist (MprisPlaylists* self, ActivePlaylistContainer* result) {
+ MPRIS_PLAYLISTS_GET_INTERFACE (self)->get_ActivePlaylist (self, result);
+}
+
+
+void mpris_playlists_set_ActivePlaylist (MprisPlaylists* self, ActivePlaylistContainer* value) {
+ MPRIS_PLAYLISTS_GET_INTERFACE (self)->set_ActivePlaylist (self, value);
+}
+
+
+static void mpris_playlists_base_init (MprisPlaylistsIface * iface) {
+ static gboolean initialized = FALSE;
+ if (!initialized) {
+ initialized = TRUE;
+ g_object_interface_install_property (iface, g_param_spec_boxed ("Orderings", "Orderings", "Orderings", G_TYPE_STRV, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+ g_object_interface_install_property (iface, g_param_spec_uint ("PlaylistCount", "PlaylistCount", "PlaylistCount", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+ g_object_interface_install_property (iface, g_param_spec_boxed ("ActivePlaylist", "ActivePlaylist", "ActivePlaylist", TYPE_ACTIVE_PLAYLIST_CONTAINER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+ g_type_set_qdata (TYPE_MPRIS_PLAYLISTS, g_quark_from_static_string ("vala-dbus-register-object"), (void*) mpris_playlists_register_object);
+ }
+}
+
+
+GType mpris_playlists_get_type (void) {
+ static volatile gsize mpris_playlists_type_id__volatile = 0;
+ if (g_once_init_enter (&mpris_playlists_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (MprisPlaylistsIface), (GBaseInitFunc) mpris_playlists_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
+ GType mpris_playlists_type_id;
+ mpris_playlists_type_id = g_type_register_static (G_TYPE_INTERFACE, "MprisPlaylists", &g_define_type_info, 0);
+ g_type_interface_add_prerequisite (mpris_playlists_type_id, G_TYPE_OBJECT);
+ g_once_init_leave (&mpris_playlists_type_id__volatile, mpris_playlists_type_id);
+ }
+ return mpris_playlists_type_id__volatile;
+}
+
+
+G_DEFINE_TYPE_EXTENDED (MprisPlaylistsProxy, mpris_playlists_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_MPRIS_PLAYLISTS, mpris_playlists_proxy_mpris_playlists_interface_init) );
+static void mpris_playlists_proxy_class_init (MprisPlaylistsProxyClass* klass) {
+ G_DBUS_PROXY_CLASS (klass)->g_signal = mpris_playlists_proxy_g_signal;
+}
+
+
+static void mpris_playlists_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) {
+}
+
+
+static void mpris_playlists_proxy_init (MprisPlaylistsProxy* self) {
+}
+
+
+static void mpris_playlists_proxy_ActivatePlaylist_async (MprisPlaylists* self, const char* playlist_id, GAsyncReadyCallback _callback_, gpointer _user_data_) {
+ GDBusMessage *_message;
+ GVariant *_arguments;
+ GVariantBuilder _arguments_builder;
+ G_IO_ERROR;
+ _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.Playlists", "ActivatePlaylist");
+ g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_object_path (playlist_id));
+ _arguments = g_variant_builder_end (&_arguments_builder);
+ g_dbus_message_set_body (_message, _arguments);
+ g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_simple_async_result_new ((GObject *) self, _callback_, _user_data_, NULL));
+ g_object_unref (_message);
+}
+
+
+static void mpris_playlists_proxy_ActivatePlaylist_finish (MprisPlaylists* self, GAsyncResult* _res_, GError** error) {
+ GDBusMessage *_reply_message;
+ _reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), g_simple_async_result_get_op_res_gpointer ((GSimpleAsyncResult *) _res_), error);
+ 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 PlaylistDetails* mpris_playlists_proxy_GetPlaylists (MprisPlaylists* self, guint32 index, guint32 max_count, const gchar* order, gboolean reverse_order, int* result_length1, GError** error) {
+ GDBusMessage *_message;
+ GVariant *_arguments;
+ GVariantBuilder _arguments_builder;
+ GDBusMessage *_reply_message;
+ GVariant *_reply;
+ GVariantIter _reply_iter;
+ PlaylistDetails* _result;
+ int _result_length1;
+ GVariant* _tmp17_;
+ PlaylistDetails* _tmp18_;
+ int _tmp18__length;
+ int _tmp18__size;
+ int _tmp18__length1;
+ GVariantIter _tmp19_;
+ GVariant* _tmp20_;
+ G_IO_ERROR;
+ _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.Playlists", "GetPlaylists");
+ g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (index));
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (max_count));
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (order));
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (reverse_order));
+ _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;
+ _tmp17_ = g_variant_iter_next_value (&_reply_iter);
+ _tmp18_ = g_new (PlaylistDetails, 5);
+ _tmp18__length = 0;
+ _tmp18__size = 4;
+ _tmp18__length1 = 0;
+ g_variant_iter_init (&_tmp19_, _tmp17_);
+ for (; (_tmp20_ = g_variant_iter_next_value (&_tmp19_)) != NULL; _tmp18__length1++) {
+ PlaylistDetails _tmp21_;
+ GVariantIter _tmp22_;
+ GVariant* _tmp23_;
+ GVariant* _tmp24_;
+ GVariant* _tmp25_;
+ if (_tmp18__size == _tmp18__length) {
+ _tmp18__size = 2 * _tmp18__size;
+ _tmp18_ = g_renew (PlaylistDetails, _tmp18_, _tmp18__size + 1);
+ }
+ g_variant_iter_init (&_tmp22_, _tmp20_);
+ _tmp23_ = g_variant_iter_next_value (&_tmp22_);
+ _tmp21_.path = g_variant_dup_string (_tmp23_, NULL);
+ g_variant_unref (_tmp23_);
+ _tmp24_ = g_variant_iter_next_value (&_tmp22_);
+ _tmp21_.name = g_variant_dup_string (_tmp24_, NULL);
+ g_variant_unref (_tmp24_);
+ _tmp25_ = g_variant_iter_next_value (&_tmp22_);
+ _tmp21_.icon_path = g_variant_dup_string (_tmp25_, NULL);
+ g_variant_unref (_tmp25_);
+ _tmp18_[_tmp18__length++] = _tmp21_;
+ g_variant_unref (_tmp20_);
+ }
+ _result_length1 = _tmp18__length1;
+ _result = _tmp18_;
+ g_variant_unref (_tmp17_);
+ *result_length1 = _result_length1;
+ g_object_unref (_reply_message);
+ return _result;
+}
+
+
+static gchar** mpris_playlists_dbus_proxy_get_Orderings (MprisPlaylists* self, int* result_length1) {
+ GVariant *_inner_reply;
+ gchar** _result;
+ int _result_length1;
+ gchar** _tmp26_;
+ int _tmp26__length;
+ int _tmp26__size;
+ int _tmp26__length1;
+ GVariantIter _tmp27_;
+ GVariant* _tmp28_;
+ _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Orderings");
+ 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.Playlists"));
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Orderings"));
+ _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_length1 = 0;
+ _tmp26_ = g_new (gchar*, 5);
+ _tmp26__length = 0;
+ _tmp26__size = 4;
+ _tmp26__length1 = 0;
+ g_variant_iter_init (&_tmp27_, _inner_reply);
+ for (; (_tmp28_ = g_variant_iter_next_value (&_tmp27_)) != NULL; _tmp26__length1++) {
+ if (_tmp26__size == _tmp26__length) {
+ _tmp26__size = 2 * _tmp26__size;
+ _tmp26_ = g_renew (gchar*, _tmp26_, _tmp26__size + 1);
+ }
+ _tmp26_[_tmp26__length++] = g_variant_dup_string (_tmp28_, NULL);
+ g_variant_unref (_tmp28_);
+ }
+ _result_length1 = _tmp26__length1;
+ _tmp26_[_tmp26__length] = NULL;
+ _result = _tmp26_;
+ *result_length1 = _result_length1;
+ g_variant_unref (_inner_reply);
+ return _result;
+}
+
+
+static void mpris_playlists_dbus_proxy_set_Orderings (MprisPlaylists* self, gchar** value, int value_length1) {
+ GVariant *_arguments;
+ GVariant *_reply;
+ GVariantBuilder _arguments_builder;
+ gchar** _tmp29_;
+ GVariantBuilder _tmp30_;
+ int _tmp31_;
+ g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2.Playlists"));
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Orderings"));
+ g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
+ _tmp29_ = value;
+ g_variant_builder_init (&_tmp30_, G_VARIANT_TYPE ("as"));
+ for (_tmp31_ = 0; _tmp31_ < value_length1; _tmp31_++) {
+ g_variant_builder_add_value (&_tmp30_, g_variant_new_string (*_tmp29_));
+ _tmp29_++;
+ }
+ g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp30_));
+ g_variant_builder_close (&_arguments_builder);
+ _arguments = g_variant_builder_end (&_arguments_builder);
+ _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
+ if (!_reply) {
+ return;
+ }
+ g_variant_unref (_reply);
+}
+
+
+static guint32 mpris_playlists_dbus_proxy_get_PlaylistCount (MprisPlaylists* self) {
+ GVariant *_inner_reply;
+ guint32 _result;
+ _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "PlaylistCount");
+ 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.Playlists"));
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("PlaylistCount"));
+ _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 0U;
+ }
+ g_variant_get (_reply, "(v)", &_inner_reply);
+ g_variant_unref (_reply);
+ }
+ _result = g_variant_get_uint32 (_inner_reply);
+ g_variant_unref (_inner_reply);
+ return _result;
+}
+
+
+static void mpris_playlists_dbus_proxy_set_PlaylistCount (MprisPlaylists* self, guint32 value) {
+ 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.Playlists"));
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("PlaylistCount"));
+ g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (value));
+ g_variant_builder_close (&_arguments_builder);
+ _arguments = g_variant_builder_end (&_arguments_builder);
+ _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
+ if (!_reply) {
+ return;
+ }
+ g_variant_unref (_reply);
+}
+
+
+static void mpris_playlists_dbus_proxy_get_ActivePlaylist (MprisPlaylists* self, ActivePlaylistContainer* result) {
+ GVariant *_inner_reply;
+ ActivePlaylistContainer _tmp32_;
+ GVariantIter _tmp33_;
+ GVariant* _tmp34_;
+ GVariant* _tmp35_;
+ PlaylistDetails _tmp36_;
+ GVariantIter _tmp37_;
+ GVariant* _tmp38_;
+ GVariant* _tmp39_;
+ GVariant* _tmp40_;
+ _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "ActivePlaylist");
+ 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.Playlists"));
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("ActivePlaylist"));
+ _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;
+ }
+ g_variant_get (_reply, "(v)", &_inner_reply);
+ g_variant_unref (_reply);
+ }
+ g_variant_iter_init (&_tmp33_, _inner_reply);
+ _tmp34_ = g_variant_iter_next_value (&_tmp33_);
+ _tmp32_.valid = g_variant_get_boolean (_tmp34_);
+ g_variant_unref (_tmp34_);
+ _tmp35_ = g_variant_iter_next_value (&_tmp33_);
+ g_variant_iter_init (&_tmp37_, _tmp35_);
+ _tmp38_ = g_variant_iter_next_value (&_tmp37_);
+ _tmp36_.path = g_variant_dup_string (_tmp38_, NULL);
+ g_variant_unref (_tmp38_);
+ _tmp39_ = g_variant_iter_next_value (&_tmp37_);
+ _tmp36_.name = g_variant_dup_string (_tmp39_, NULL);
+ g_variant_unref (_tmp39_);
+ _tmp40_ = g_variant_iter_next_value (&_tmp37_);
+ _tmp36_.icon_path = g_variant_dup_string (_tmp40_, NULL);
+ g_variant_unref (_tmp40_);
+ _tmp32_.details = _tmp36_;
+ g_variant_unref (_tmp35_);
+ *result = _tmp32_;
+ g_variant_unref (_inner_reply);
+ return;
+}
+
+
+static void mpris_playlists_dbus_proxy_set_ActivePlaylist (MprisPlaylists* self, ActivePlaylistContainer* value) {
+ GVariant *_arguments;
+ GVariant *_reply;
+ GVariantBuilder _arguments_builder;
+ GVariantBuilder _tmp41_;
+ GVariantBuilder _tmp42_;
+ g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2.Playlists"));
+ g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("ActivePlaylist"));
+ g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
+ g_variant_builder_init (&_tmp41_, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_tmp41_, g_variant_new_boolean ((*value).valid));
+ g_variant_builder_init (&_tmp42_, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_tmp42_, g_variant_new_object_path ((*value).details.path));
+ g_variant_builder_add_value (&_tmp42_, g_variant_new_string ((*value).details.name));
+ g_variant_builder_add_value (&_tmp42_, g_variant_new_string ((*value).details.icon_path));
+ g_variant_builder_add_value (&_tmp41_, g_variant_builder_end (&_tmp42_));
+ g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp41_));
+ g_variant_builder_close (&_arguments_builder);
+ _arguments = g_variant_builder_end (&_arguments_builder);
+ _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
+ if (!_reply) {
+ return;
+ }
+ g_variant_unref (_reply);
+}
+
+
+static void mpris_playlists_proxy_mpris_playlists_interface_init (MprisPlaylistsIface* iface) {
+ iface->ActivatePlaylist = mpris_playlists_proxy_ActivatePlaylist_async;
+ iface->ActivatePlaylist_finish = mpris_playlists_proxy_ActivatePlaylist_finish;
+ iface->GetPlaylists = mpris_playlists_proxy_GetPlaylists;
+ iface->get_Orderings = mpris_playlists_dbus_proxy_get_Orderings;
+ iface->set_Orderings = mpris_playlists_dbus_proxy_set_Orderings;
+ iface->get_PlaylistCount = mpris_playlists_dbus_proxy_get_PlaylistCount;
+ iface->set_PlaylistCount = mpris_playlists_dbus_proxy_set_PlaylistCount;
+ iface->get_ActivePlaylist = mpris_playlists_dbus_proxy_get_ActivePlaylist;
+ iface->set_ActivePlaylist = mpris_playlists_dbus_proxy_set_ActivePlaylist;
+}
+
+
+static void _dbus_mpris_playlists_ActivatePlaylist (MprisPlaylists* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
+ GVariantIter _arguments_iter;
+ char* playlist_id = NULL;
+ GVariant* _tmp43_;
+ g_variant_iter_init (&_arguments_iter, parameters);
+ _tmp43_ = g_variant_iter_next_value (&_arguments_iter);
+ playlist_id = g_variant_dup_string (_tmp43_, NULL);
+ g_variant_unref (_tmp43_);
+ mpris_playlists_ActivatePlaylist (self, playlist_id, (GAsyncReadyCallback) _dbus_mpris_playlists_ActivatePlaylist_ready, g_object_ref (invocation));
+ _g_free0 (playlist_id);
+}
+
+
+static void _dbus_mpris_playlists_ActivatePlaylist_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
+ GDBusMethodInvocation * invocation;
+ GError* error;
+ GDBusMessage* _reply_message;
+ GVariant* _reply;
+ GVariantBuilder _reply_builder;
+ invocation = _user_data_;
+ error = NULL;
+ mpris_playlists_ActivatePlaylist_finish ((MprisPlaylists*) source_object, _res_, &error);
+ if (error) {
+ g_dbus_method_invocation_return_gerror (g_object_ref (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 _vala_PlaylistDetails_array_free (PlaylistDetails* array, gint array_length) {
+ if (array != NULL) {
+ int i;
+ for (i = 0; i < array_length; i = i + 1) {
+ playlist_details_destroy (&array[i]);
+ }
+ }
+ g_free (array);
+}
+
+
+static void _dbus_mpris_playlists_GetPlaylists (MprisPlaylists* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
+ GError* error;
+ GVariantIter _arguments_iter;
+ guint32 index = 0U;
+ GVariant* _tmp44_;
+ guint32 max_count = 0U;
+ GVariant* _tmp45_;
+ gchar* order = NULL;
+ GVariant* _tmp46_;
+ gboolean reverse_order = FALSE;
+ GVariant* _tmp47_;
+ GDBusMessage* _reply_message;
+ GVariant* _reply;
+ GVariantBuilder _reply_builder;
+ PlaylistDetails* result;
+ int result_length1 = 0;
+ PlaylistDetails* _tmp48_;
+ GVariantBuilder _tmp49_;
+ int _tmp50_;
+ error = NULL;
+ g_variant_iter_init (&_arguments_iter, parameters);
+ _tmp44_ = g_variant_iter_next_value (&_arguments_iter);
+ index = g_variant_get_uint32 (_tmp44_);
+ g_variant_unref (_tmp44_);
+ _tmp45_ = g_variant_iter_next_value (&_arguments_iter);
+ max_count = g_variant_get_uint32 (_tmp45_);
+ g_variant_unref (_tmp45_);
+ _tmp46_ = g_variant_iter_next_value (&_arguments_iter);
+ order = g_variant_dup_string (_tmp46_, NULL);
+ g_variant_unref (_tmp46_);
+ _tmp47_ = g_variant_iter_next_value (&_arguments_iter);
+ reverse_order = g_variant_get_boolean (_tmp47_);
+ g_variant_unref (_tmp47_);
+ result = mpris_playlists_GetPlaylists (self, index, max_count, order, reverse_order, &result_length1, &error);
+ if (error) {
+ g_dbus_method_invocation_return_gerror (g_object_ref (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);
+ _tmp48_ = result;
+ g_variant_builder_init (&_tmp49_, G_VARIANT_TYPE ("a(oss)"));
+ for (_tmp50_ = 0; _tmp50_ < result_length1; _tmp50_++) {
+ GVariantBuilder _tmp51_;
+ g_variant_builder_init (&_tmp51_, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_tmp51_, g_variant_new_object_path ((*_tmp48_).path));
+ g_variant_builder_add_value (&_tmp51_, g_variant_new_string ((*_tmp48_).name));
+ g_variant_builder_add_value (&_tmp51_, g_variant_new_string ((*_tmp48_).icon_path));
+ g_variant_builder_add_value (&_tmp49_, g_variant_builder_end (&_tmp51_));
+ _tmp48_++;
+ }
+ g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp49_));
+ result = (_vala_PlaylistDetails_array_free (result, result_length1), NULL);
+ _reply = g_variant_builder_end (&_reply_builder);
+ g_dbus_message_set_body (_reply_message, _reply);
+ _g_free0 (order);
+ 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 (_reply_message);
+}
+
+
+static void mpris_playlists_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, "ActivatePlaylist") == 0) {
+ _dbus_mpris_playlists_ActivatePlaylist (object, parameters, invocation);
+ } else if (strcmp (method_name, "GetPlaylists") == 0) {
+ _dbus_mpris_playlists_GetPlaylists (object, parameters, invocation);
+ }
+ g_object_unref (invocation);
+}
+
+
+static GVariant* _dbus_mpris_playlists_get_Orderings (MprisPlaylists* self) {
+ gchar** result;
+ int result_length1;
+ gchar** _tmp52_;
+ GVariantBuilder _tmp53_;
+ int _tmp54_;
+ GVariant* _reply;
+ result = mpris_playlists_get_Orderings (self, &result_length1);
+ _tmp52_ = result;
+ g_variant_builder_init (&_tmp53_, G_VARIANT_TYPE ("as"));
+ for (_tmp54_ = 0; _tmp54_ < result_length1; _tmp54_++) {
+ g_variant_builder_add_value (&_tmp53_, g_variant_new_string (*_tmp52_));
+ _tmp52_++;
+ }
+ _reply = g_variant_builder_end (&_tmp53_);
+ result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL);
+ return _reply;
+}
+
+
+static GVariant* _dbus_mpris_playlists_get_PlaylistCount (MprisPlaylists* self) {
+ guint32 result;
+ GVariant* _reply;
+ result = mpris_playlists_get_PlaylistCount (self);
+ _reply = g_variant_new_uint32 (result);
+ return _reply;
+}
+
+
+static GVariant* _dbus_mpris_playlists_get_ActivePlaylist (MprisPlaylists* self) {
+ ActivePlaylistContainer result = {0};
+ GVariantBuilder _tmp55_;
+ GVariantBuilder _tmp56_;
+ GVariant* _reply;
+ mpris_playlists_get_ActivePlaylist (self, &result);
+ g_variant_builder_init (&_tmp55_, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_tmp55_, g_variant_new_boolean (result.valid));
+ g_variant_builder_init (&_tmp56_, G_VARIANT_TYPE_TUPLE);
+ g_variant_builder_add_value (&_tmp56_, g_variant_new_object_path (result.details.path));
+ g_variant_builder_add_value (&_tmp56_, g_variant_new_string (result.details.name));
+ g_variant_builder_add_value (&_tmp56_, g_variant_new_string (result.details.icon_path));
+ g_variant_builder_add_value (&_tmp55_, g_variant_builder_end (&_tmp56_));
+ _reply = g_variant_builder_end (&_tmp55_);
+ active_playlist_container_destroy (&result);
+ return _reply;
+}
+
+
+static GVariant* mpris_playlists_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, "Orderings") == 0) {
+ return _dbus_mpris_playlists_get_Orderings (object);
+ } else if (strcmp (property_name, "PlaylistCount") == 0) {
+ return _dbus_mpris_playlists_get_PlaylistCount (object);
+ } else if (strcmp (property_name, "ActivePlaylist") == 0) {
+ return _dbus_mpris_playlists_get_ActivePlaylist (object);
+ }
+ return NULL;
+}
+
+
+static void _dbus_mpris_playlists_set_Orderings (MprisPlaylists* self, GVariant* _value) {
+ gchar** value = NULL;
+ int value_length1;
+ gchar** _tmp57_;
+ int _tmp57__length;
+ int _tmp57__size;
+ int _tmp57__length1;
+ GVariantIter _tmp58_;
+ GVariant* _tmp59_;
+ _tmp57_ = g_new (gchar*, 5);
+ _tmp57__length = 0;
+ _tmp57__size = 4;
+ _tmp57__length1 = 0;
+ g_variant_iter_init (&_tmp58_, _value);
+ for (; (_tmp59_ = g_variant_iter_next_value (&_tmp58_)) != NULL; _tmp57__length1++) {
+ if (_tmp57__size == _tmp57__length) {
+ _tmp57__size = 2 * _tmp57__size;
+ _tmp57_ = g_renew (gchar*, _tmp57_, _tmp57__size + 1);
+ }
+ _tmp57_[_tmp57__length++] = g_variant_dup_string (_tmp59_, NULL);
+ g_variant_unref (_tmp59_);
+ }
+ value_length1 = _tmp57__length1;
+ _tmp57_[_tmp57__length] = NULL;
+ value = _tmp57_;
+ mpris_playlists_set_Orderings (self, value, value_length1);
+ value = (_vala_array_free (value, value_length1, (GDestroyNotify) g_free), NULL);
+}
+
+
+static void _dbus_mpris_playlists_set_PlaylistCount (MprisPlaylists* self, GVariant* _value) {
+ guint32 value = 0U;
+ value = g_variant_get_uint32 (_value);
+ mpris_playlists_set_PlaylistCount (self, value);
+}
+
+
+static void _dbus_mpris_playlists_set_ActivePlaylist (MprisPlaylists* self, GVariant* _value) {
+ ActivePlaylistContainer value = {0};
+ ActivePlaylistContainer _tmp60_;
+ GVariantIter _tmp61_;
+ GVariant* _tmp62_;
+ GVariant* _tmp63_;
+ PlaylistDetails _tmp64_;
+ GVariantIter _tmp65_;
+ GVariant* _tmp66_;
+ GVariant* _tmp67_;
+ GVariant* _tmp68_;
+ g_variant_iter_init (&_tmp61_, _value);
+ _tmp62_ = g_variant_iter_next_value (&_tmp61_);
+ _tmp60_.valid = g_variant_get_boolean (_tmp62_);
+ g_variant_unref (_tmp62_);
+ _tmp63_ = g_variant_iter_next_value (&_tmp61_);
+ g_variant_iter_init (&_tmp65_, _tmp63_);
+ _tmp66_ = g_variant_iter_next_value (&_tmp65_);
+ _tmp64_.path = g_variant_dup_string (_tmp66_, NULL);
+ g_variant_unref (_tmp66_);
+ _tmp67_ = g_variant_iter_next_value (&_tmp65_);
+ _tmp64_.name = g_variant_dup_string (_tmp67_, NULL);
+ g_variant_unref (_tmp67_);
+ _tmp68_ = g_variant_iter_next_value (&_tmp65_);
+ _tmp64_.icon_path = g_variant_dup_string (_tmp68_, NULL);
+ g_variant_unref (_tmp68_);
+ _tmp60_.details = _tmp64_;
+ g_variant_unref (_tmp63_);
+ value = _tmp60_;
+ mpris_playlists_set_ActivePlaylist (self, &value);
+ active_playlist_container_destroy (&value);
+}
+
+
+static gboolean mpris_playlists_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) {
+ gpointer* data;
+ gpointer object;
+ data = user_data;
+ object = data[0];
+ if (strcmp (property_name, "Orderings") == 0) {
+ _dbus_mpris_playlists_set_Orderings (object, value);
+ return TRUE;
+ } else if (strcmp (property_name, "PlaylistCount") == 0) {
+ _dbus_mpris_playlists_set_PlaylistCount (object, value);
+ return TRUE;
+ } else if (strcmp (property_name, "ActivePlaylist") == 0) {
+ _dbus_mpris_playlists_set_ActivePlaylist (object, value);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+guint mpris_playlists_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 *) (&_mpris_playlists_dbus_interface_info), &_mpris_playlists_dbus_interface_vtable, data, _mpris_playlists_unregister_object, error);
+ if (!result) {
+ return 0;
+ }
+ return result;
+}
+
+
+static void _mpris_playlists_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, gint array_length, GDestroyNotify destroy_func) {
+ if ((array != NULL) && (destroy_func != NULL)) {
+ int 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, gint array_length, GDestroyNotify destroy_func) {
+ _vala_array_destroy (array, array_length, destroy_func);
+ g_free (array);
+}
+
+
+