aboutsummaryrefslogtreecommitdiff
path: root/src/mpris2-interfaces.c
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2010-12-16 15:03:14 -0500
committerKen VanDine <ken.vandine@canonical.com>2010-12-16 15:03:14 -0500
commit2565fc2f86a1c81780ca8bcdb1f568b56031fa5a (patch)
tree4c2288c30b6cdf187747166c3f9f914b8d454f20 /src/mpris2-interfaces.c
parent13bc64e0a3c144740c30e2469fdb5f605d58ee39 (diff)
parent7ea64f857b5f76cd06e01bfe49eda27c2d2da335 (diff)
downloadayatana-indicator-sound-2565fc2f86a1c81780ca8bcdb1f568b56031fa5a.tar.gz
ayatana-indicator-sound-2565fc2f86a1c81780ca8bcdb1f568b56031fa5a.tar.bz2
ayatana-indicator-sound-2565fc2f86a1c81780ca8bcdb1f568b56031fa5a.zip
Import upstream version 0.5.3
Diffstat (limited to 'src/mpris2-interfaces.c')
-rw-r--r--src/mpris2-interfaces.c1518
1 files changed, 1518 insertions, 0 deletions
diff --git a/src/mpris2-interfaces.c b/src/mpris2-interfaces.c
new file mode 100644
index 0000000..2755782
--- /dev/null
+++ b/src/mpris2-interfaces.c
@@ -0,0 +1,1518 @@
+/* mpris2-interfaces.c generated by valac 0.11.2, 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 <gio/gio.h>
+#include <stdlib.h>
+#include <string.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)))
+
+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);
+};
+
+
+
+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);
+
+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};
+
+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 (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 (_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 (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 (_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;
+ GVariantIter _arguments_iter;
+ 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;
+ GVariantIter _arguments_iter;
+ 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, &_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 (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 (_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 (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 (_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 (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 (_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_DICTIONARY);
+ 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;
+ GVariantIter _arguments_iter;
+ 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;
+ GVariantIter _arguments_iter;
+ 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;
+ GVariantIter _arguments_iter;
+ 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_DICTIONARY);
+ 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, &_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);
+}
+
+
+