Back to index

libunity  5.92.0
test-mpris-backend-prop-updates-client.c
Go to the documentation of this file.
00001 /* test-mpris-backend-prop-updates-client.c generated by valac 0.17.2, the Vala compiler
00002  * generated from test-mpris-backend-prop-updates-client.vala, do not modify */
00003 
00004 
00005 #include <glib.h>
00006 #include <glib-object.h>
00007 #include <stdlib.h>
00008 #include <string.h>
00009 #include <gio/gio.h>
00010 #include <gee.h>
00011 #include <config.h>
00012 
00013 
00014 #define TYPE_FREE_DESKTOP_OBJECT (free_desktop_object_get_type ())
00015 #define FREE_DESKTOP_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FREE_DESKTOP_OBJECT, FreeDesktopObject))
00016 #define IS_FREE_DESKTOP_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FREE_DESKTOP_OBJECT))
00017 #define FREE_DESKTOP_OBJECT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_FREE_DESKTOP_OBJECT, FreeDesktopObjectIface))
00018 
00019 typedef struct _FreeDesktopObject FreeDesktopObject;
00020 typedef struct _FreeDesktopObjectIface FreeDesktopObjectIface;
00021 
00022 #define TYPE_FREE_DESKTOP_OBJECT_PROXY (free_desktop_object_proxy_get_type ())
00023 typedef GDBusProxy FreeDesktopObjectProxy;
00024 typedef GDBusProxyClass FreeDesktopObjectProxyClass;
00025 #define _g_free0(var) (var = (g_free (var), NULL))
00026 
00027 #define TYPE_MPRIS_ROOT (mpris_root_get_type ())
00028 #define MPRIS_ROOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MPRIS_ROOT, MprisRoot))
00029 #define IS_MPRIS_ROOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MPRIS_ROOT))
00030 #define MPRIS_ROOT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MPRIS_ROOT, MprisRootIface))
00031 
00032 typedef struct _MprisRoot MprisRoot;
00033 typedef struct _MprisRootIface MprisRootIface;
00034 
00035 #define TYPE_MPRIS_ROOT_PROXY (mpris_root_proxy_get_type ())
00036 typedef GDBusProxy MprisRootProxy;
00037 typedef GDBusProxyClass MprisRootProxyClass;
00038 
00039 #define TYPE_MPRIS_PLAYER (mpris_player_get_type ())
00040 #define MPRIS_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MPRIS_PLAYER, MprisPlayer))
00041 #define IS_MPRIS_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MPRIS_PLAYER))
00042 #define MPRIS_PLAYER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MPRIS_PLAYER, MprisPlayerIface))
00043 
00044 typedef struct _MprisPlayer MprisPlayer;
00045 typedef struct _MprisPlayerIface MprisPlayerIface;
00046 
00047 #define TYPE_MPRIS_PLAYER_PROXY (mpris_player_proxy_get_type ())
00048 typedef GDBusProxy MprisPlayerProxy;
00049 typedef GDBusProxyClass MprisPlayerProxyClass;
00050 #define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
00051 
00052 #define TYPE_PLAYLIST_DETAILS (playlist_details_get_type ())
00053 typedef struct _PlaylistDetails PlaylistDetails;
00054 
00055 #define TYPE_ACTIVE_PLAYLIST_CONTAINER (active_playlist_container_get_type ())
00056 typedef struct _ActivePlaylistContainer ActivePlaylistContainer;
00057 
00058 #define TYPE_MPRIS_PLAYLISTS (mpris_playlists_get_type ())
00059 #define MPRIS_PLAYLISTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MPRIS_PLAYLISTS, MprisPlaylists))
00060 #define IS_MPRIS_PLAYLISTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MPRIS_PLAYLISTS))
00061 #define MPRIS_PLAYLISTS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MPRIS_PLAYLISTS, MprisPlaylistsIface))
00062 
00063 typedef struct _MprisPlaylists MprisPlaylists;
00064 typedef struct _MprisPlaylistsIface MprisPlaylistsIface;
00065 
00066 #define TYPE_MPRIS_PLAYLISTS_PROXY (mpris_playlists_proxy_get_type ())
00067 typedef GDBusProxy MprisPlaylistsProxy;
00068 typedef GDBusProxyClass MprisPlaylistsProxyClass;
00069 
00070 #define TYPE_FREE_DESKTOP_PROPERTIES (free_desktop_properties_get_type ())
00071 #define FREE_DESKTOP_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FREE_DESKTOP_PROPERTIES, FreeDesktopProperties))
00072 #define IS_FREE_DESKTOP_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FREE_DESKTOP_PROPERTIES))
00073 #define FREE_DESKTOP_PROPERTIES_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_FREE_DESKTOP_PROPERTIES, FreeDesktopPropertiesIface))
00074 
00075 typedef struct _FreeDesktopProperties FreeDesktopProperties;
00076 typedef struct _FreeDesktopPropertiesIface FreeDesktopPropertiesIface;
00077 
00078 #define TYPE_FREE_DESKTOP_PROPERTIES_PROXY (free_desktop_properties_proxy_get_type ())
00079 typedef GDBusProxy FreeDesktopPropertiesProxy;
00080 typedef GDBusProxyClass FreeDesktopPropertiesProxyClass;
00081 
00082 #define TYPE_MPRIS2_WATCHER (mpris2_watcher_get_type ())
00083 #define MPRIS2_WATCHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MPRIS2_WATCHER, Mpris2Watcher))
00084 #define MPRIS2_WATCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MPRIS2_WATCHER, Mpris2WatcherClass))
00085 #define IS_MPRIS2_WATCHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MPRIS2_WATCHER))
00086 #define IS_MPRIS2_WATCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MPRIS2_WATCHER))
00087 #define MPRIS2_WATCHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MPRIS2_WATCHER, Mpris2WatcherClass))
00088 
00089 typedef struct _Mpris2Watcher Mpris2Watcher;
00090 typedef struct _Mpris2WatcherClass Mpris2WatcherClass;
00091 typedef struct _Mpris2WatcherPrivate Mpris2WatcherPrivate;
00092 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
00093 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
00094 typedef struct _Mpris2WatcherCheckForActiveClientsData Mpris2WatcherCheckForActiveClientsData;
00095 
00096 #define TYPE_MPRIS2_CONTROLLER (mpris2_controller_get_type ())
00097 #define MPRIS2_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MPRIS2_CONTROLLER, Mpris2Controller))
00098 #define MPRIS2_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MPRIS2_CONTROLLER, Mpris2ControllerClass))
00099 #define IS_MPRIS2_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MPRIS2_CONTROLLER))
00100 #define IS_MPRIS2_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MPRIS2_CONTROLLER))
00101 #define MPRIS2_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MPRIS2_CONTROLLER, Mpris2ControllerClass))
00102 
00103 typedef struct _Mpris2Controller Mpris2Controller;
00104 typedef struct _Mpris2ControllerClass Mpris2ControllerClass;
00105 typedef struct _Mpris2ControllerPrivate Mpris2ControllerPrivate;
00106 
00107 #define TYPE_MPRIS_CLIENT (mpris_client_get_type ())
00108 #define MPRIS_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MPRIS_CLIENT, MprisClient))
00109 #define MPRIS_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MPRIS_CLIENT, MprisClientClass))
00110 #define IS_MPRIS_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MPRIS_CLIENT))
00111 #define IS_MPRIS_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MPRIS_CLIENT))
00112 #define MPRIS_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MPRIS_CLIENT, MprisClientClass))
00113 
00114 typedef struct _MprisClient MprisClient;
00115 typedef struct _MprisClientClass MprisClientClass;
00116 typedef struct _MprisClientPrivate MprisClientPrivate;
00117 #define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
00118 typedef struct _Block1Data Block1Data;
00119 typedef struct _Block2Data Block2Data;
00120 #define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
00121 typedef struct _Block3Data Block3Data;
00122 #define _active_playlist_container_free0(var) ((var == NULL) ? NULL : (var = (active_playlist_container_free (var), NULL)))
00123 typedef struct _MprisClientDoTestAsyncPropertyUpdateActivatePlaylistData MprisClientDoTestAsyncPropertyUpdateActivatePlaylistData;
00124 #define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
00125 
00126 struct _FreeDesktopObjectIface {
00127        GTypeInterface parent_iface;
00128        void (*list_names) (FreeDesktopObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
00129        gchar** (*list_names_finish) (FreeDesktopObject* self, GAsyncResult* _res_, int* result_length1, GError** error);
00130 };
00131 
00132 struct _MprisRootIface {
00133        GTypeInterface parent_iface;
00134        void (*Quit) (MprisRoot* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
00135        void (*Quit_finish) (MprisRoot* self, GAsyncResult* _res_, GError** error);
00136        void (*Raise) (MprisRoot* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
00137        void (*Raise_finish) (MprisRoot* self, GAsyncResult* _res_, GError** error);
00138        gboolean (*get_HasTracklist) (MprisRoot* self);
00139        void (*set_HasTracklist) (MprisRoot* self, gboolean value);
00140        gboolean (*get_CanQuit) (MprisRoot* self);
00141        void (*set_CanQuit) (MprisRoot* self, gboolean value);
00142        gboolean (*get_CanRaise) (MprisRoot* self);
00143        void (*set_CanRaise) (MprisRoot* self, gboolean value);
00144        gchar* (*get_Identity) (MprisRoot* self);
00145        void (*set_Identity) (MprisRoot* self, const gchar* value);
00146        gchar* (*get_DesktopEntry) (MprisRoot* self);
00147        void (*set_DesktopEntry) (MprisRoot* self, const gchar* value);
00148 };
00149 
00150 struct _MprisPlayerIface {
00151        GTypeInterface parent_iface;
00152        void (*PlayPause) (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
00153        void (*PlayPause_finish) (MprisPlayer* self, GAsyncResult* _res_, GError** error);
00154        void (*Next) (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
00155        void (*Next_finish) (MprisPlayer* self, GAsyncResult* _res_, GError** error);
00156        void (*Previous) (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
00157        void (*Previous_finish) (MprisPlayer* self, GAsyncResult* _res_, GError** error);
00158        void (*Seek) (MprisPlayer* self, gint64 offset, GAsyncReadyCallback _callback_, gpointer _user_data_);
00159        void (*Seek_finish) (MprisPlayer* self, GAsyncResult* _res_, GError** error);
00160        GHashTable* (*get_Metadata) (MprisPlayer* self);
00161        void (*set_Metadata) (MprisPlayer* self, GHashTable* value);
00162        gint32 (*get_Position) (MprisPlayer* self);
00163        void (*set_Position) (MprisPlayer* self, gint32 value);
00164        gchar* (*get_PlaybackStatus) (MprisPlayer* self);
00165        void (*set_PlaybackStatus) (MprisPlayer* self, const gchar* value);
00166 };
00167 
00168 struct _PlaylistDetails {
00169        char* path;
00170        gchar* name;
00171        gchar* icon_name;
00172 };
00173 
00174 struct _ActivePlaylistContainer {
00175        gboolean valid;
00176        PlaylistDetails details;
00177 };
00178 
00179 struct _MprisPlaylistsIface {
00180        GTypeInterface parent_iface;
00181        void (*ActivatePlaylist) (MprisPlaylists* self, const char* playlist_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
00182        void (*ActivatePlaylist_finish) (MprisPlaylists* self, GAsyncResult* _res_, GError** error);
00183        void (*GetPlaylists) (MprisPlaylists* self, guint32 index, guint32 max_count, const gchar* order, gboolean reverse_order, GAsyncReadyCallback _callback_, gpointer _user_data_);
00184        PlaylistDetails* (*GetPlaylists_finish) (MprisPlaylists* self, GAsyncResult* _res_, int* result_length1, GError** error);
00185        gchar** (*get_Orderings) (MprisPlaylists* self, int* result_length1);
00186        void (*set_Orderings) (MprisPlaylists* self, gchar** value, int value_length1);
00187        guint32 (*get_PlaylistCount) (MprisPlaylists* self);
00188        void (*set_PlaylistCount) (MprisPlaylists* self, guint32 value);
00189        void (*get_ActivePlaylist) (MprisPlaylists* self, ActivePlaylistContainer* value);
00190        void (*set_ActivePlaylist) (MprisPlaylists* self, ActivePlaylistContainer* value);
00191 };
00192 
00193 struct _FreeDesktopPropertiesIface {
00194        GTypeInterface parent_iface;
00195 };
00196 
00197 typedef enum  {
00198        XML_ERROR_FILE_NOT_FOUND,
00199        XML_ERROR_XML_DOCUMENT_EMPTY
00200 } XmlError;
00201 #define XML_ERROR xml_error_quark ()
00202 struct _Mpris2Watcher {
00203        GObject parent_instance;
00204        Mpris2WatcherPrivate * priv;
00205 };
00206 
00207 struct _Mpris2WatcherClass {
00208        GObjectClass parent_class;
00209 };
00210 
00211 struct _Mpris2WatcherPrivate {
00212        FreeDesktopObject* fdesktop_obj;
00213 };
00214 
00215 struct _Mpris2WatcherCheckForActiveClientsData {
00216        int _state_;
00217        GObject* _source_object_;
00218        GAsyncResult* _res_;
00219        GSimpleAsyncResult* _async_result;
00220        Mpris2Watcher* self;
00221        gchar** interfaces;
00222        gint interfaces_length1;
00223        gint _interfaces_size_;
00224        FreeDesktopObject* _tmp0_;
00225        gint _tmp1_;
00226        gchar** _tmp2_;
00227        gchar** _tmp3_;
00228        gint _tmp3__length1;
00229        gint __tmp3__size_;
00230        GError* e;
00231        GError* _tmp4_;
00232        const gchar* _tmp5_;
00233        gchar** _tmp6_;
00234        gint _tmp6__length1;
00235        gchar** address_collection;
00236        gint address_collection_length1;
00237        gint _address_collection_size_;
00238        gint address_it;
00239        gchar* _tmp7_;
00240        gchar* address;
00241        const gchar* _tmp8_;
00242        gboolean _tmp9_;
00243        const gchar* _tmp10_;
00244        MprisRoot* _tmp11_;
00245        MprisRoot* mpris2_root;
00246        MprisRoot* _tmp12_;
00247        GError * _inner_error_;
00248 };
00249 
00250 struct _Mpris2Controller {
00251        GObject parent_instance;
00252        Mpris2ControllerPrivate * priv;
00253        MprisRoot* mpris2_root;
00254        MprisPlayer* player;
00255        MprisPlaylists* playlists;
00256        FreeDesktopProperties* properties_interface;
00257        GeeArrayList* received_prop_updates_for_playback_status;
00258        GeeArrayList* received_prop_updates_for_metadata_change;
00259        GeeArrayList* received_prop_updates_for_active_playlists;
00260 };
00261 
00262 struct _Mpris2ControllerClass {
00263        GObjectClass parent_class;
00264 };
00265 
00266 struct _Mpris2ControllerPrivate {
00267        gchar* _dbus_name;
00268 };
00269 
00270 struct _MprisClient {
00271        GObject parent_instance;
00272        MprisClientPrivate * priv;
00273        Mpris2Watcher* watcher;
00274 };
00275 
00276 struct _MprisClientClass {
00277        GObjectClass parent_class;
00278 };
00279 
00280 struct _MprisClientPrivate {
00281        GMainLoop* _mainloop;
00282 };
00283 
00284 struct _Block1Data {
00285        int _ref_count_;
00286        Mpris2Controller* controller;
00287 };
00288 
00289 struct _Block2Data {
00290        int _ref_count_;
00291        Mpris2Controller* controller;
00292 };
00293 
00294 struct _Block3Data {
00295        int _ref_count_;
00296        Mpris2Controller* contr;
00297        gpointer _async_data_;
00298 };
00299 
00300 struct _MprisClientDoTestAsyncPropertyUpdateActivatePlaylistData {
00301        int _state_;
00302        GObject* _source_object_;
00303        GAsyncResult* _res_;
00304        GSimpleAsyncResult* _async_result;
00305        GMainLoop* loop;
00306        Block3Data* _data3_;
00307        Mpris2Controller* _tmp0_;
00308        MprisPlaylists* _tmp1_;
00309        gint _tmp2_;
00310        PlaylistDetails* _tmp3_;
00311        PlaylistDetails* pls;
00312        gint pls_length1;
00313        gint _pls_size_;
00314        MprisPlaylists* _tmp4_;
00315        PlaylistDetails _tmp5_;
00316        const char* _tmp6_;
00317        GError* e;
00318        GMainLoop* _tmp7_;
00319        GError * _inner_error_;
00320 };
00321 
00322 
00323 static gpointer mpris2_watcher_parent_class = NULL;
00324 static gpointer mpris2_controller_parent_class = NULL;
00325 static gpointer mpris_client_parent_class = NULL;
00326 
00327 #define MPRIS_PREFIX "org.mpris.MediaPlayer2."
00328 #define MPRIS_MEDIA_PLAYER_PATH "/org/mpris/MediaPlayer2"
00329 #define FREEDESKTOP_SERVICE "org.freedesktop.DBus"
00330 #define FREEDESKTOP_OBJECT "/org/freedesktop/DBus"
00331 GType free_desktop_object_proxy_get_type (void) G_GNUC_CONST;
00332 guint free_desktop_object_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
00333 GType free_desktop_object_get_type (void) G_GNUC_CONST;
00334 void free_desktop_object_list_names (FreeDesktopObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
00335 gchar** free_desktop_object_list_names_finish (FreeDesktopObject* self, GAsyncResult* _res_, int* result_length1, GError** error);
00336 static void g_cclosure_user_marshal_VOID__STRING_STRING_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
00337 static void free_desktop_object_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters);
00338 static void _dbus_handle_free_desktop_object_name_owner_changed (FreeDesktopObject* self, GVariant* parameters);
00339 static void _vala_g_async_ready_callback (GObject *source_object, GAsyncResult *res, void *user_data);
00340 static void free_desktop_object_proxy_list_names_async (FreeDesktopObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
00341 static gchar** free_desktop_object_proxy_list_names_finish (FreeDesktopObject* self, GAsyncResult* _res_, int* result_length1, GError** error);
00342 static void free_desktop_object_proxy_free_desktop_object_interface_init (FreeDesktopObjectIface* iface);
00343 static void _dbus_free_desktop_object_list_names (FreeDesktopObject* self, GVariant* parameters, GDBusMethodInvocation* invocation);
00344 static void _dbus_free_desktop_object_list_names_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
00345 static void free_desktop_object_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);
00346 static GVariant* free_desktop_object_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);
00347 static gboolean free_desktop_object_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);
00348 static void _dbus_free_desktop_object_name_owner_changed (GObject* _sender, const gchar* name, const gchar* old_owner, const gchar* new_owner, gpointer* _data);
00349 static void _free_desktop_object_unregister_object (gpointer user_data);
00350 GType mpris_root_proxy_get_type (void) G_GNUC_CONST;
00351 guint mpris_root_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
00352 GType mpris_root_get_type (void) G_GNUC_CONST;
00353 void mpris_root_Quit (MprisRoot* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
00354 void mpris_root_Quit_finish (MprisRoot* self, GAsyncResult* _res_, GError** error);
00355 void mpris_root_Raise (MprisRoot* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
00356 void mpris_root_Raise_finish (MprisRoot* self, GAsyncResult* _res_, GError** error);
00357 gboolean mpris_root_get_HasTracklist (MprisRoot* self);
00358 void mpris_root_set_HasTracklist (MprisRoot* self, gboolean value);
00359 gboolean mpris_root_get_CanQuit (MprisRoot* self);
00360 void mpris_root_set_CanQuit (MprisRoot* self, gboolean value);
00361 gboolean mpris_root_get_CanRaise (MprisRoot* self);
00362 void mpris_root_set_CanRaise (MprisRoot* self, gboolean value);
00363 gchar* mpris_root_get_Identity (MprisRoot* self);
00364 void mpris_root_set_Identity (MprisRoot* self, const gchar* value);
00365 gchar* mpris_root_get_DesktopEntry (MprisRoot* self);
00366 void mpris_root_set_DesktopEntry (MprisRoot* self, const gchar* value);
00367 static void mpris_root_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters);
00368 static void mpris_root_proxy_Quit_async (MprisRoot* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
00369 static void mpris_root_proxy_Quit_finish (MprisRoot* self, GAsyncResult* _res_, GError** error);
00370 static void mpris_root_proxy_Raise_async (MprisRoot* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
00371 static void mpris_root_proxy_Raise_finish (MprisRoot* self, GAsyncResult* _res_, GError** error);
00372 static gboolean mpris_root_dbus_proxy_get_HasTracklist (MprisRoot* self);
00373 static void mpris_root_dbus_proxy_set_HasTracklist (MprisRoot* self, gboolean value);
00374 static gboolean mpris_root_dbus_proxy_get_CanQuit (MprisRoot* self);
00375 static void mpris_root_dbus_proxy_set_CanQuit (MprisRoot* self, gboolean value);
00376 static gboolean mpris_root_dbus_proxy_get_CanRaise (MprisRoot* self);
00377 static void mpris_root_dbus_proxy_set_CanRaise (MprisRoot* self, gboolean value);
00378 static gchar* mpris_root_dbus_proxy_get_Identity (MprisRoot* self);
00379 static void mpris_root_dbus_proxy_set_Identity (MprisRoot* self, const gchar* value);
00380 static gchar* mpris_root_dbus_proxy_get_DesktopEntry (MprisRoot* self);
00381 static void mpris_root_dbus_proxy_set_DesktopEntry (MprisRoot* self, const gchar* value);
00382 static void mpris_root_proxy_mpris_root_interface_init (MprisRootIface* iface);
00383 static void _dbus_mpris_root_Quit (MprisRoot* self, GVariant* parameters, GDBusMethodInvocation* invocation);
00384 static void _dbus_mpris_root_Quit_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
00385 static void _dbus_mpris_root_Raise (MprisRoot* self, GVariant* parameters, GDBusMethodInvocation* invocation);
00386 static void _dbus_mpris_root_Raise_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
00387 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);
00388 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);
00389 static GVariant* _dbus_mpris_root_get_HasTracklist (MprisRoot* self);
00390 static GVariant* _dbus_mpris_root_get_CanQuit (MprisRoot* self);
00391 static GVariant* _dbus_mpris_root_get_CanRaise (MprisRoot* self);
00392 static GVariant* _dbus_mpris_root_get_Identity (MprisRoot* self);
00393 static GVariant* _dbus_mpris_root_get_DesktopEntry (MprisRoot* self);
00394 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);
00395 static void _dbus_mpris_root_set_HasTracklist (MprisRoot* self, GVariant* _value);
00396 static void _dbus_mpris_root_set_CanQuit (MprisRoot* self, GVariant* _value);
00397 static void _dbus_mpris_root_set_CanRaise (MprisRoot* self, GVariant* _value);
00398 static void _dbus_mpris_root_set_Identity (MprisRoot* self, GVariant* _value);
00399 static void _dbus_mpris_root_set_DesktopEntry (MprisRoot* self, GVariant* _value);
00400 static void _mpris_root_unregister_object (gpointer user_data);
00401 GType mpris_player_proxy_get_type (void) G_GNUC_CONST;
00402 guint mpris_player_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
00403 GType mpris_player_get_type (void) G_GNUC_CONST;
00404 void mpris_player_PlayPause (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
00405 void mpris_player_PlayPause_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error);
00406 void mpris_player_Next (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
00407 void mpris_player_Next_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error);
00408 void mpris_player_Previous (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
00409 void mpris_player_Previous_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error);
00410 void mpris_player_Seek (MprisPlayer* self, gint64 offset, GAsyncReadyCallback _callback_, gpointer _user_data_);
00411 void mpris_player_Seek_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error);
00412 GHashTable* mpris_player_get_Metadata (MprisPlayer* self);
00413 void mpris_player_set_Metadata (MprisPlayer* self, GHashTable* value);
00414 gint32 mpris_player_get_Position (MprisPlayer* self);
00415 void mpris_player_set_Position (MprisPlayer* self, gint32 value);
00416 gchar* mpris_player_get_PlaybackStatus (MprisPlayer* self);
00417 void mpris_player_set_PlaybackStatus (MprisPlayer* self, const gchar* value);
00418 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);
00419 static void mpris_player_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters);
00420 static void _dbus_handle_mpris_player_seeked (MprisPlayer* self, GVariant* parameters);
00421 static void mpris_player_proxy_PlayPause_async (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
00422 static void mpris_player_proxy_PlayPause_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error);
00423 static void mpris_player_proxy_Next_async (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
00424 static void mpris_player_proxy_Next_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error);
00425 static void mpris_player_proxy_Previous_async (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
00426 static void mpris_player_proxy_Previous_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error);
00427 static void mpris_player_proxy_Seek_async (MprisPlayer* self, gint64 offset, GAsyncReadyCallback _callback_, gpointer _user_data_);
00428 static void mpris_player_proxy_Seek_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error);
00429 static GHashTable* mpris_player_dbus_proxy_get_Metadata (MprisPlayer* self);
00430 static void mpris_player_dbus_proxy_set_Metadata (MprisPlayer* self, GHashTable* value);
00431 static gint32 mpris_player_dbus_proxy_get_Position (MprisPlayer* self);
00432 static void mpris_player_dbus_proxy_set_Position (MprisPlayer* self, gint32 value);
00433 static gchar* mpris_player_dbus_proxy_get_PlaybackStatus (MprisPlayer* self);
00434 static void mpris_player_dbus_proxy_set_PlaybackStatus (MprisPlayer* self, const gchar* value);
00435 static void mpris_player_proxy_mpris_player_interface_init (MprisPlayerIface* iface);
00436 static void _dbus_mpris_player_PlayPause (MprisPlayer* self, GVariant* parameters, GDBusMethodInvocation* invocation);
00437 static void _dbus_mpris_player_PlayPause_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
00438 static void _dbus_mpris_player_Next (MprisPlayer* self, GVariant* parameters, GDBusMethodInvocation* invocation);
00439 static void _dbus_mpris_player_Next_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
00440 static void _dbus_mpris_player_Previous (MprisPlayer* self, GVariant* parameters, GDBusMethodInvocation* invocation);
00441 static void _dbus_mpris_player_Previous_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
00442 static void _dbus_mpris_player_Seek (MprisPlayer* self, GVariant* parameters, GDBusMethodInvocation* invocation);
00443 static void _dbus_mpris_player_Seek_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
00444 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);
00445 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);
00446 static GVariant* _dbus_mpris_player_get_Metadata (MprisPlayer* self);
00447 static GVariant* _dbus_mpris_player_get_Position (MprisPlayer* self);
00448 static GVariant* _dbus_mpris_player_get_PlaybackStatus (MprisPlayer* self);
00449 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);
00450 static void _dbus_mpris_player_set_Metadata (MprisPlayer* self, GVariant* _value);
00451 static void _dbus_mpris_player_set_Position (MprisPlayer* self, GVariant* _value);
00452 static void _dbus_mpris_player_set_PlaybackStatus (MprisPlayer* self, GVariant* _value);
00453 static void _dbus_mpris_player_seeked (GObject* _sender, gint64 new_position, gpointer* _data);
00454 static void _mpris_player_unregister_object (gpointer user_data);
00455 GType playlist_details_get_type (void) G_GNUC_CONST;
00456 PlaylistDetails* playlist_details_dup (const PlaylistDetails* self);
00457 void playlist_details_free (PlaylistDetails* self);
00458 void playlist_details_copy (const PlaylistDetails* self, PlaylistDetails* dest);
00459 void playlist_details_destroy (PlaylistDetails* self);
00460 GType active_playlist_container_get_type (void) G_GNUC_CONST;
00461 ActivePlaylistContainer* active_playlist_container_dup (const ActivePlaylistContainer* self);
00462 void active_playlist_container_free (ActivePlaylistContainer* self);
00463 void active_playlist_container_copy (const ActivePlaylistContainer* self, ActivePlaylistContainer* dest);
00464 void active_playlist_container_destroy (ActivePlaylistContainer* self);
00465 GType mpris_playlists_proxy_get_type (void) G_GNUC_CONST;
00466 guint mpris_playlists_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
00467 GType mpris_playlists_get_type (void) G_GNUC_CONST;
00468 void mpris_playlists_ActivatePlaylist (MprisPlaylists* self, const char* playlist_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
00469 void mpris_playlists_ActivatePlaylist_finish (MprisPlaylists* self, GAsyncResult* _res_, GError** error);
00470 void mpris_playlists_GetPlaylists (MprisPlaylists* self, guint32 index, guint32 max_count, const gchar* order, gboolean reverse_order, GAsyncReadyCallback _callback_, gpointer _user_data_);
00471 PlaylistDetails* mpris_playlists_GetPlaylists_finish (MprisPlaylists* self, GAsyncResult* _res_, int* result_length1, GError** error);
00472 gchar** mpris_playlists_get_Orderings (MprisPlaylists* self, int* result_length1);
00473 void mpris_playlists_set_Orderings (MprisPlaylists* self, gchar** value, int value_length1);
00474 guint32 mpris_playlists_get_PlaylistCount (MprisPlaylists* self);
00475 void mpris_playlists_set_PlaylistCount (MprisPlaylists* self, guint32 value);
00476 void mpris_playlists_get_ActivePlaylist (MprisPlaylists* self, ActivePlaylistContainer* result);
00477 void mpris_playlists_set_ActivePlaylist (MprisPlaylists* self, ActivePlaylistContainer* value);
00478 static void g_cclosure_user_marshal_VOID__BOXED (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
00479 static void mpris_playlists_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters);
00480 static void _dbus_handle_mpris_playlists_playlist_changed (MprisPlaylists* self, GVariant* parameters);
00481 static void mpris_playlists_proxy_ActivatePlaylist_async (MprisPlaylists* self, const char* playlist_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
00482 static void mpris_playlists_proxy_ActivatePlaylist_finish (MprisPlaylists* self, GAsyncResult* _res_, GError** error);
00483 static void mpris_playlists_proxy_GetPlaylists_async (MprisPlaylists* self, guint32 index, guint32 max_count, const gchar* order, gboolean reverse_order, GAsyncReadyCallback _callback_, gpointer _user_data_);
00484 static PlaylistDetails* mpris_playlists_proxy_GetPlaylists_finish (MprisPlaylists* self, GAsyncResult* _res_, int* result_length1, GError** error);
00485 static gchar** mpris_playlists_dbus_proxy_get_Orderings (MprisPlaylists* self, int* result_length1);
00486 static void mpris_playlists_dbus_proxy_set_Orderings (MprisPlaylists* self, gchar** value, int value_length1);
00487 static guint32 mpris_playlists_dbus_proxy_get_PlaylistCount (MprisPlaylists* self);
00488 static void mpris_playlists_dbus_proxy_set_PlaylistCount (MprisPlaylists* self, guint32 value);
00489 static void mpris_playlists_dbus_proxy_get_ActivePlaylist (MprisPlaylists* self, ActivePlaylistContainer* result);
00490 static void mpris_playlists_dbus_proxy_set_ActivePlaylist (MprisPlaylists* self, ActivePlaylistContainer* value);
00491 static void mpris_playlists_proxy_mpris_playlists_interface_init (MprisPlaylistsIface* iface);
00492 static void _dbus_mpris_playlists_ActivatePlaylist (MprisPlaylists* self, GVariant* parameters, GDBusMethodInvocation* invocation);
00493 static void _dbus_mpris_playlists_ActivatePlaylist_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
00494 static void _dbus_mpris_playlists_GetPlaylists (MprisPlaylists* self, GVariant* parameters, GDBusMethodInvocation* invocation);
00495 static void _vala_PlaylistDetails_array_free (PlaylistDetails* array, gint array_length);
00496 static void _dbus_mpris_playlists_GetPlaylists_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
00497 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);
00498 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);
00499 static GVariant* _dbus_mpris_playlists_get_Orderings (MprisPlaylists* self);
00500 static GVariant* _dbus_mpris_playlists_get_PlaylistCount (MprisPlaylists* self);
00501 static GVariant* _dbus_mpris_playlists_get_ActivePlaylist (MprisPlaylists* self);
00502 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);
00503 static void _dbus_mpris_playlists_set_Orderings (MprisPlaylists* self, GVariant* _value);
00504 static void _dbus_mpris_playlists_set_PlaylistCount (MprisPlaylists* self, GVariant* _value);
00505 static void _dbus_mpris_playlists_set_ActivePlaylist (MprisPlaylists* self, GVariant* _value);
00506 static void _dbus_mpris_playlists_playlist_changed (GObject* _sender, PlaylistDetails* details, gpointer* _data);
00507 static void _mpris_playlists_unregister_object (gpointer user_data);
00508 GType free_desktop_properties_get_type (void) G_GNUC_CONST;
00509 GType free_desktop_properties_proxy_get_type (void) G_GNUC_CONST;
00510 guint free_desktop_properties_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
00511 static void g_cclosure_user_marshal_VOID__STRING_BOXED_BOXED_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
00512 static void free_desktop_properties_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters);
00513 static void _dbus_handle_free_desktop_properties_properties_changed (FreeDesktopProperties* self, GVariant* parameters);
00514 static void free_desktop_properties_proxy_free_desktop_properties_interface_init (FreeDesktopPropertiesIface* iface);
00515 static void free_desktop_properties_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);
00516 static GVariant* free_desktop_properties_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);
00517 static gboolean free_desktop_properties_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);
00518 static void _dbus_free_desktop_properties_properties_changed (GObject* _sender, const gchar* source, GHashTable* changed_properties, gchar** invalid, int invalid_length1, gpointer* _data);
00519 static void _free_desktop_properties_unregister_object (gpointer user_data);
00520 GQuark xml_error_quark (void);
00521 GType mpris2_watcher_get_type (void) G_GNUC_CONST;
00522 #define MPRIS2_WATCHER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_MPRIS2_WATCHER, Mpris2WatcherPrivate))
00523 enum  {
00524        MPRIS2_WATCHER_DUMMY_PROPERTY
00525 };
00526 Mpris2Watcher* mpris2_watcher_new (void);
00527 Mpris2Watcher* mpris2_watcher_construct (GType object_type);
00528 static void mpris2_watcher_check_for_active_clients_data_free (gpointer _data);
00529 void mpris2_watcher_check_for_active_clients (Mpris2Watcher* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
00530 void mpris2_watcher_check_for_active_clients_finish (Mpris2Watcher* self, GAsyncResult* _res_);
00531 static gboolean mpris2_watcher_check_for_active_clients_co (Mpris2WatcherCheckForActiveClientsData* _data_);
00532 static void mpris2_watcher_check_for_active_clients_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00533 static MprisRoot* mpris2_watcher_create_mpris_root (Mpris2Watcher* self, const gchar* name);
00534 static void mpris2_watcher_name_changes_detected (Mpris2Watcher* self, FreeDesktopObject* dbus_obj, const gchar* name, const gchar* previous_owner, const gchar* current_owner);
00535 static GObject * mpris2_watcher_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
00536 static void _mpris2_watcher_name_changes_detected_free_desktop_object_name_owner_changed (FreeDesktopObject* _sender, const gchar* name, const gchar* old_owner, const gchar* new_owner, gpointer self);
00537 static void mpris2_watcher_finalize (GObject* obj);
00538 GType mpris2_controller_get_type (void) G_GNUC_CONST;
00539 #define MPRIS2_CONTROLLER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_MPRIS2_CONTROLLER, Mpris2ControllerPrivate))
00540 enum  {
00541        MPRIS2_CONTROLLER_DUMMY_PROPERTY,
00542        MPRIS2_CONTROLLER_DBUS_NAME
00543 };
00544 Mpris2Controller* mpris2_controller_new (const gchar* name);
00545 Mpris2Controller* mpris2_controller_construct (GType object_type, const gchar* name);
00546 void mpris2_controller_property_changed_cb (Mpris2Controller* self, const gchar* interface_source, GHashTable* changed_properties, gchar** invalid, int invalid_length1);
00547 static GHashTable* _variant_get1 (GVariant* value);
00548 static gboolean mpris2_controller_update_active_playlist_array (Mpris2Controller* self);
00549 static gboolean _mpris2_controller_update_active_playlist_array_gsource_func (gpointer self);
00550 const gchar* mpris2_controller_get_dbus_name (Mpris2Controller* self);
00551 static void mpris2_controller_set_dbus_name (Mpris2Controller* self, const gchar* value);
00552 static GObject * mpris2_controller_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
00553 static void _mpris2_controller_property_changed_cb_free_desktop_properties_properties_changed (FreeDesktopProperties* _sender, const gchar* source, GHashTable* changed_properties, gchar** invalid, int invalid_length1, gpointer self);
00554 static void mpris2_controller_finalize (GObject* obj);
00555 static void _vala_mpris2_controller_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00556 static void _vala_mpris2_controller_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
00557 GType mpris_client_get_type (void) G_GNUC_CONST;
00558 #define MPRIS_CLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_MPRIS_CLIENT, MprisClientPrivate))
00559 enum  {
00560        MPRIS_CLIENT_DUMMY_PROPERTY,
00561        MPRIS_CLIENT_MAINLOOP
00562 };
00563 MprisClient* mpris_client_new (GMainLoop* loop);
00564 MprisClient* mpris_client_construct (GType object_type, GMainLoop* loop);
00565 void mpris_client_on_client_appeared (MprisClient* self);
00566 static gboolean __lambda2_ (MprisClient* self);
00567 gboolean mpris_client_run_tests (void);
00568 gboolean mpris_client_escape (MprisClient* self);
00569 static gboolean ___lambda2__gsource_func (gpointer self);
00570 GMainLoop* mpris_client_get_mainloop (MprisClient* self);
00571 gint mpris_client_main (gchar** args, int args_length1);
00572 void mpris_client_player_property_updates_playback_status (void);
00573 static void _mpris_client_player_property_updates_playback_status_gtest_data_func (gpointer self);
00574 void mpris_client_player_property_updates_metadata (void);
00575 static void _mpris_client_player_property_updates_metadata_gtest_data_func (gpointer self);
00576 void mpris_client_playlists_property_update_test_activate_playlist (void);
00577 static void _mpris_client_playlists_property_update_test_activate_playlist_gtest_data_func (gpointer self);
00578 static gboolean _mpris_client_run_tests_gsource_func (gpointer self);
00579 static Block1Data* block1_data_ref (Block1Data* _data1_);
00580 static void block1_data_unref (void * _userdata_);
00581 static gboolean __lambda3_ (Block1Data* _data1_);
00582 static gboolean ___lambda3__gsource_func (gpointer self);
00583 static Block2Data* block2_data_ref (Block2Data* _data2_);
00584 static void block2_data_unref (void * _userdata_);
00585 static gboolean __lambda4_ (Block2Data* _data2_);
00586 static gboolean ___lambda4__gsource_func (gpointer self);
00587 void mpris_client_do_test_async_property_update_activate_playlist (GMainLoop* loop, GAsyncReadyCallback _callback_, gpointer _user_data_);
00588 void mpris_client_do_test_async_property_update_activate_playlist_finish (GAsyncResult* _res_);
00589 static void mpris_client_do_test_async_property_update_activate_playlist_data_free (gpointer _data);
00590 static gboolean mpris_client_do_test_async_property_update_activate_playlist_co (MprisClientDoTestAsyncPropertyUpdateActivatePlaylistData* _data_);
00591 static Block3Data* block3_data_ref (Block3Data* _data3_);
00592 static void block3_data_unref (void * _userdata_);
00593 static void mpris_client_do_test_async_property_update_activate_playlist_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
00594 static gboolean ___lambda5_ (Block3Data* _data3_);
00595 static gboolean ____lambda5__gsource_func (gpointer self);
00596 static void mpris_client_set_mainloop (MprisClient* self, GMainLoop* value);
00597 static GObject * mpris_client_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
00598 static void _mpris_client_on_client_appeared_mpris2_watcher_client_appeared (Mpris2Watcher* _sender, gpointer self);
00599 static void mpris_client_finalize (GObject* obj);
00600 static void _vala_mpris_client_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
00601 static void _vala_mpris_client_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
00602 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
00603 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
00604 
00605 static const GDBusArgInfo _free_desktop_object_dbus_arg_info_list_names_result = {-1, "result", "as"};
00606 static const GDBusArgInfo * const _free_desktop_object_dbus_arg_info_list_names_in[] = {NULL};
00607 static const GDBusArgInfo * const _free_desktop_object_dbus_arg_info_list_names_out[] = {&_free_desktop_object_dbus_arg_info_list_names_result, NULL};
00608 static const GDBusMethodInfo _free_desktop_object_dbus_method_info_list_names = {-1, "ListNames", (GDBusArgInfo **) (&_free_desktop_object_dbus_arg_info_list_names_in), (GDBusArgInfo **) (&_free_desktop_object_dbus_arg_info_list_names_out)};
00609 static const GDBusMethodInfo * const _free_desktop_object_dbus_method_info[] = {&_free_desktop_object_dbus_method_info_list_names, NULL};
00610 static const GDBusArgInfo _free_desktop_object_dbus_arg_info_name_owner_changed_name = {-1, "name", "s"};
00611 static const GDBusArgInfo _free_desktop_object_dbus_arg_info_name_owner_changed_old_owner = {-1, "old_owner", "s"};
00612 static const GDBusArgInfo _free_desktop_object_dbus_arg_info_name_owner_changed_new_owner = {-1, "new_owner", "s"};
00613 static const GDBusArgInfo * const _free_desktop_object_dbus_arg_info_name_owner_changed[] = {&_free_desktop_object_dbus_arg_info_name_owner_changed_name, &_free_desktop_object_dbus_arg_info_name_owner_changed_old_owner, &_free_desktop_object_dbus_arg_info_name_owner_changed_new_owner, NULL};
00614 static const GDBusSignalInfo _free_desktop_object_dbus_signal_info_name_owner_changed = {-1, "NameOwnerChanged", (GDBusArgInfo **) (&_free_desktop_object_dbus_arg_info_name_owner_changed)};
00615 static const GDBusSignalInfo * const _free_desktop_object_dbus_signal_info[] = {&_free_desktop_object_dbus_signal_info_name_owner_changed, NULL};
00616 static const GDBusPropertyInfo * const _free_desktop_object_dbus_property_info[] = {NULL};
00617 static const GDBusInterfaceInfo _free_desktop_object_dbus_interface_info = {-1, "org.freedesktop.DBus", (GDBusMethodInfo **) (&_free_desktop_object_dbus_method_info), (GDBusSignalInfo **) (&_free_desktop_object_dbus_signal_info), (GDBusPropertyInfo **) (&_free_desktop_object_dbus_property_info)};
00618 static const GDBusInterfaceVTable _free_desktop_object_dbus_interface_vtable = {free_desktop_object_dbus_interface_method_call, free_desktop_object_dbus_interface_get_property, free_desktop_object_dbus_interface_set_property};
00619 static const GDBusArgInfo * const _mpris_root_dbus_arg_info_Quit_in[] = {NULL};
00620 static const GDBusArgInfo * const _mpris_root_dbus_arg_info_Quit_out[] = {NULL};
00621 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)};
00622 static const GDBusArgInfo * const _mpris_root_dbus_arg_info_Raise_in[] = {NULL};
00623 static const GDBusArgInfo * const _mpris_root_dbus_arg_info_Raise_out[] = {NULL};
00624 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)};
00625 static const GDBusMethodInfo * const _mpris_root_dbus_method_info[] = {&_mpris_root_dbus_method_info_Quit, &_mpris_root_dbus_method_info_Raise, NULL};
00626 static const GDBusSignalInfo * const _mpris_root_dbus_signal_info[] = {NULL};
00627 static const GDBusPropertyInfo _mpris_root_dbus_property_info_HasTracklist = {-1, "HasTracklist", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE};
00628 static const GDBusPropertyInfo _mpris_root_dbus_property_info_CanQuit = {-1, "CanQuit", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE};
00629 static const GDBusPropertyInfo _mpris_root_dbus_property_info_CanRaise = {-1, "CanRaise", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE};
00630 static const GDBusPropertyInfo _mpris_root_dbus_property_info_Identity = {-1, "Identity", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE};
00631 static const GDBusPropertyInfo _mpris_root_dbus_property_info_DesktopEntry = {-1, "DesktopEntry", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE};
00632 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};
00633 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)};
00634 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};
00635 static const GDBusArgInfo * const _mpris_player_dbus_arg_info_PlayPause_in[] = {NULL};
00636 static const GDBusArgInfo * const _mpris_player_dbus_arg_info_PlayPause_out[] = {NULL};
00637 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)};
00638 static const GDBusArgInfo * const _mpris_player_dbus_arg_info_Next_in[] = {NULL};
00639 static const GDBusArgInfo * const _mpris_player_dbus_arg_info_Next_out[] = {NULL};
00640 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)};
00641 static const GDBusArgInfo * const _mpris_player_dbus_arg_info_Previous_in[] = {NULL};
00642 static const GDBusArgInfo * const _mpris_player_dbus_arg_info_Previous_out[] = {NULL};
00643 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)};
00644 static const GDBusArgInfo _mpris_player_dbus_arg_info_Seek_offset = {-1, "offset", "x"};
00645 static const GDBusArgInfo * const _mpris_player_dbus_arg_info_Seek_in[] = {&_mpris_player_dbus_arg_info_Seek_offset, NULL};
00646 static const GDBusArgInfo * const _mpris_player_dbus_arg_info_Seek_out[] = {NULL};
00647 static const GDBusMethodInfo _mpris_player_dbus_method_info_Seek = {-1, "Seek", (GDBusArgInfo **) (&_mpris_player_dbus_arg_info_Seek_in), (GDBusArgInfo **) (&_mpris_player_dbus_arg_info_Seek_out)};
00648 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, &_mpris_player_dbus_method_info_Seek, NULL};
00649 static const GDBusArgInfo _mpris_player_dbus_arg_info_seeked_new_position = {-1, "new_position", "x"};
00650 static const GDBusArgInfo * const _mpris_player_dbus_arg_info_seeked[] = {&_mpris_player_dbus_arg_info_seeked_new_position, NULL};
00651 static const GDBusSignalInfo _mpris_player_dbus_signal_info_seeked = {-1, "Seeked", (GDBusArgInfo **) (&_mpris_player_dbus_arg_info_seeked)};
00652 static const GDBusSignalInfo * const _mpris_player_dbus_signal_info[] = {&_mpris_player_dbus_signal_info_seeked, NULL};
00653 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};
00654 static const GDBusPropertyInfo _mpris_player_dbus_property_info_Position = {-1, "Position", "i", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE};
00655 static const GDBusPropertyInfo _mpris_player_dbus_property_info_PlaybackStatus = {-1, "PlaybackStatus", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE};
00656 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};
00657 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)};
00658 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};
00659 static const GDBusArgInfo _mpris_playlists_dbus_arg_info_ActivatePlaylist_playlist_id = {-1, "playlist_id", "o"};
00660 static const GDBusArgInfo * const _mpris_playlists_dbus_arg_info_ActivatePlaylist_in[] = {&_mpris_playlists_dbus_arg_info_ActivatePlaylist_playlist_id, NULL};
00661 static const GDBusArgInfo * const _mpris_playlists_dbus_arg_info_ActivatePlaylist_out[] = {NULL};
00662 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)};
00663 static const GDBusArgInfo _mpris_playlists_dbus_arg_info_GetPlaylists_index = {-1, "index", "u"};
00664 static const GDBusArgInfo _mpris_playlists_dbus_arg_info_GetPlaylists_max_count = {-1, "max_count", "u"};
00665 static const GDBusArgInfo _mpris_playlists_dbus_arg_info_GetPlaylists_order = {-1, "order", "s"};
00666 static const GDBusArgInfo _mpris_playlists_dbus_arg_info_GetPlaylists_reverse_order = {-1, "reverse_order", "b"};
00667 static const GDBusArgInfo _mpris_playlists_dbus_arg_info_GetPlaylists_result = {-1, "result", "a(oss)"};
00668 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};
00669 static const GDBusArgInfo * const _mpris_playlists_dbus_arg_info_GetPlaylists_out[] = {&_mpris_playlists_dbus_arg_info_GetPlaylists_result, NULL};
00670 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)};
00671 static const GDBusMethodInfo * const _mpris_playlists_dbus_method_info[] = {&_mpris_playlists_dbus_method_info_ActivatePlaylist, &_mpris_playlists_dbus_method_info_GetPlaylists, NULL};
00672 static const GDBusArgInfo _mpris_playlists_dbus_arg_info_playlist_changed_details = {-1, "details", "(oss)"};
00673 static const GDBusArgInfo * const _mpris_playlists_dbus_arg_info_playlist_changed[] = {&_mpris_playlists_dbus_arg_info_playlist_changed_details, NULL};
00674 static const GDBusSignalInfo _mpris_playlists_dbus_signal_info_playlist_changed = {-1, "PlaylistChanged", (GDBusArgInfo **) (&_mpris_playlists_dbus_arg_info_playlist_changed)};
00675 static const GDBusSignalInfo * const _mpris_playlists_dbus_signal_info[] = {&_mpris_playlists_dbus_signal_info_playlist_changed, NULL};
00676 static const GDBusPropertyInfo _mpris_playlists_dbus_property_info_Orderings = {-1, "Orderings", "as", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE};
00677 static const GDBusPropertyInfo _mpris_playlists_dbus_property_info_PlaylistCount = {-1, "PlaylistCount", "u", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE};
00678 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};
00679 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};
00680 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)};
00681 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};
00682 static const GDBusMethodInfo * const _free_desktop_properties_dbus_method_info[] = {NULL};
00683 static const GDBusArgInfo _free_desktop_properties_dbus_arg_info_properties_changed_source = {-1, "source", "s"};
00684 static const GDBusArgInfo _free_desktop_properties_dbus_arg_info_properties_changed_changed_properties = {-1, "changed_properties", "a{sv}"};
00685 static const GDBusArgInfo _free_desktop_properties_dbus_arg_info_properties_changed_invalid = {-1, "invalid", "as"};
00686 static const GDBusArgInfo * const _free_desktop_properties_dbus_arg_info_properties_changed[] = {&_free_desktop_properties_dbus_arg_info_properties_changed_source, &_free_desktop_properties_dbus_arg_info_properties_changed_changed_properties, &_free_desktop_properties_dbus_arg_info_properties_changed_invalid, NULL};
00687 static const GDBusSignalInfo _free_desktop_properties_dbus_signal_info_properties_changed = {-1, "PropertiesChanged", (GDBusArgInfo **) (&_free_desktop_properties_dbus_arg_info_properties_changed)};
00688 static const GDBusSignalInfo * const _free_desktop_properties_dbus_signal_info[] = {&_free_desktop_properties_dbus_signal_info_properties_changed, NULL};
00689 static const GDBusPropertyInfo * const _free_desktop_properties_dbus_property_info[] = {NULL};
00690 static const GDBusInterfaceInfo _free_desktop_properties_dbus_interface_info = {-1, "org.freedesktop.DBus.Properties", (GDBusMethodInfo **) (&_free_desktop_properties_dbus_method_info), (GDBusSignalInfo **) (&_free_desktop_properties_dbus_signal_info), (GDBusPropertyInfo **) (&_free_desktop_properties_dbus_property_info)};
00691 static const GDBusInterfaceVTable _free_desktop_properties_dbus_interface_vtable = {free_desktop_properties_dbus_interface_method_call, free_desktop_properties_dbus_interface_get_property, free_desktop_properties_dbus_interface_set_property};
00692 
00693 void free_desktop_object_list_names (FreeDesktopObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00694        FREE_DESKTOP_OBJECT_GET_INTERFACE (self)->list_names (self, _callback_, _user_data_);
00695 }
00696 
00697 
00698 gchar** free_desktop_object_list_names_finish (FreeDesktopObject* self, GAsyncResult* _res_, int* result_length1, GError** error) {
00699        return FREE_DESKTOP_OBJECT_GET_INTERFACE (self)->list_names_finish (self, _res_, result_length1, error);
00700 }
00701 
00702 
00703 static void g_cclosure_user_marshal_VOID__STRING_STRING_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
00704        typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING) (gpointer data1, const char* arg_1, const char* arg_2, const char* arg_3, gpointer data2);
00705        register GMarshalFunc_VOID__STRING_STRING_STRING callback;
00706        register GCClosure * cc;
00707        register gpointer data1;
00708        register gpointer data2;
00709        cc = (GCClosure *) closure;
00710        g_return_if_fail (n_param_values == 4);
00711        if (G_CCLOSURE_SWAP_DATA (closure)) {
00712               data1 = closure->data;
00713               data2 = param_values->data[0].v_pointer;
00714        } else {
00715               data1 = param_values->data[0].v_pointer;
00716               data2 = closure->data;
00717        }
00718        callback = (GMarshalFunc_VOID__STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback);
00719        callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), g_value_get_string (param_values + 3), data2);
00720 }
00721 
00722 
00723 static void free_desktop_object_base_init (FreeDesktopObjectIface * iface) {
00724        static gboolean initialized = FALSE;
00725        if (!initialized) {
00726               initialized = TRUE;
00727               g_signal_new ("name_owner_changed", TYPE_FREE_DESKTOP_OBJECT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_STRING, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
00728        }
00729 }
00730 
00731 
00732 GType free_desktop_object_get_type (void) {
00733        static volatile gsize free_desktop_object_type_id__volatile = 0;
00734        if (g_once_init_enter (&free_desktop_object_type_id__volatile)) {
00735               static const GTypeInfo g_define_type_info = { sizeof (FreeDesktopObjectIface), (GBaseInitFunc) free_desktop_object_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
00736               GType free_desktop_object_type_id;
00737               free_desktop_object_type_id = g_type_register_static (G_TYPE_INTERFACE, "FreeDesktopObject", &g_define_type_info, 0);
00738               g_type_interface_add_prerequisite (free_desktop_object_type_id, G_TYPE_OBJECT);
00739               g_type_set_qdata (free_desktop_object_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) free_desktop_object_proxy_get_type);
00740               g_type_set_qdata (free_desktop_object_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.DBus");
00741               g_type_set_qdata (free_desktop_object_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) free_desktop_object_register_object);
00742               g_once_init_leave (&free_desktop_object_type_id__volatile, free_desktop_object_type_id);
00743        }
00744        return free_desktop_object_type_id__volatile;
00745 }
00746 
00747 
00748 G_DEFINE_TYPE_EXTENDED (FreeDesktopObjectProxy, free_desktop_object_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_FREE_DESKTOP_OBJECT, free_desktop_object_proxy_free_desktop_object_interface_init) )
00749 static void free_desktop_object_proxy_class_init (FreeDesktopObjectProxyClass* klass) {
00750        G_DBUS_PROXY_CLASS (klass)->g_signal = free_desktop_object_proxy_g_signal;
00751 }
00752 
00753 
00754 static void _dbus_handle_free_desktop_object_name_owner_changed (FreeDesktopObject* self, GVariant* parameters) {
00755        GVariantIter _arguments_iter;
00756        gchar* name = NULL;
00757        GVariant* _tmp0_;
00758        gchar* old_owner = NULL;
00759        GVariant* _tmp1_;
00760        gchar* new_owner = NULL;
00761        GVariant* _tmp2_;
00762        g_variant_iter_init (&_arguments_iter, parameters);
00763        _tmp0_ = g_variant_iter_next_value (&_arguments_iter);
00764        name = g_variant_dup_string (_tmp0_, NULL);
00765        g_variant_unref (_tmp0_);
00766        _tmp1_ = g_variant_iter_next_value (&_arguments_iter);
00767        old_owner = g_variant_dup_string (_tmp1_, NULL);
00768        g_variant_unref (_tmp1_);
00769        _tmp2_ = g_variant_iter_next_value (&_arguments_iter);
00770        new_owner = g_variant_dup_string (_tmp2_, NULL);
00771        g_variant_unref (_tmp2_);
00772        g_signal_emit_by_name (self, "name-owner-changed", name, old_owner, new_owner);
00773        _g_free0 (name);
00774        _g_free0 (old_owner);
00775        _g_free0 (new_owner);
00776 }
00777 
00778 
00779 static void free_desktop_object_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) {
00780        if (strcmp (signal_name, "NameOwnerChanged") == 0) {
00781               _dbus_handle_free_desktop_object_name_owner_changed ((FreeDesktopObject*) proxy, parameters);
00782        }
00783 }
00784 
00785 
00786 static void free_desktop_object_proxy_init (FreeDesktopObjectProxy* self) {
00787 }
00788 
00789 
00790 static void _vala_g_async_ready_callback (GObject *source_object, GAsyncResult *res, void *user_data) {
00791        g_simple_async_result_set_op_res_gpointer (user_data, g_object_ref (res), g_object_unref);
00792        g_simple_async_result_complete (user_data);
00793        g_object_unref (user_data);
00794 }
00795 
00796 
00797 static void free_desktop_object_proxy_list_names_async (FreeDesktopObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00798        GDBusMessage *_message;
00799        GVariant *_arguments;
00800        GVariantBuilder _arguments_builder;
00801        G_IO_ERROR;
00802        _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.DBus", "ListNames");
00803        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
00804        _arguments = g_variant_builder_end (&_arguments_builder);
00805        g_dbus_message_set_body (_message, _arguments);
00806        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));
00807        g_object_unref (_message);
00808 }
00809 
00810 
00811 static gchar** free_desktop_object_proxy_list_names_finish (FreeDesktopObject* self, GAsyncResult* _res_, int* result_length1, GError** error) {
00812        GDBusMessage *_reply_message;
00813        GVariant *_reply;
00814        GVariantIter _reply_iter;
00815        gchar** _result;
00816        int _result_length1;
00817        GVariant* _tmp3_;
00818        gchar** _tmp4_;
00819        int _tmp4__length;
00820        int _tmp4__size;
00821        int _tmp4__length1;
00822        GVariantIter _tmp5_;
00823        GVariant* _tmp6_;
00824        _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);
00825        if (!_reply_message) {
00826               return NULL;
00827        }
00828        if (g_dbus_message_to_gerror (_reply_message, error)) {
00829               g_object_unref (_reply_message);
00830               return NULL;
00831        }
00832        _reply = g_dbus_message_get_body (_reply_message);
00833        g_variant_iter_init (&_reply_iter, _reply);
00834        _result_length1 = 0;
00835        _tmp3_ = g_variant_iter_next_value (&_reply_iter);
00836        _tmp4_ = g_new (gchar*, 5);
00837        _tmp4__length = 0;
00838        _tmp4__size = 4;
00839        _tmp4__length1 = 0;
00840        g_variant_iter_init (&_tmp5_, _tmp3_);
00841        for (; (_tmp6_ = g_variant_iter_next_value (&_tmp5_)) != NULL; _tmp4__length1++) {
00842               if (_tmp4__size == _tmp4__length) {
00843                      _tmp4__size = 2 * _tmp4__size;
00844                      _tmp4_ = g_renew (gchar*, _tmp4_, _tmp4__size + 1);
00845               }
00846               _tmp4_[_tmp4__length++] = g_variant_dup_string (_tmp6_, NULL);
00847               g_variant_unref (_tmp6_);
00848        }
00849        _result_length1 = _tmp4__length1;
00850        _tmp4_[_tmp4__length] = NULL;
00851        _result = _tmp4_;
00852        g_variant_unref (_tmp3_);
00853        *result_length1 = _result_length1;
00854        g_object_unref (_reply_message);
00855        return _result;
00856 }
00857 
00858 
00859 static void free_desktop_object_proxy_free_desktop_object_interface_init (FreeDesktopObjectIface* iface) {
00860        iface->list_names = free_desktop_object_proxy_list_names_async;
00861        iface->list_names_finish = free_desktop_object_proxy_list_names_finish;
00862 }
00863 
00864 
00865 static void _dbus_free_desktop_object_list_names (FreeDesktopObject* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
00866        GVariantIter _arguments_iter;
00867        g_variant_iter_init (&_arguments_iter, parameters);
00868        free_desktop_object_list_names (self, (GAsyncReadyCallback) _dbus_free_desktop_object_list_names_ready, invocation);
00869 }
00870 
00871 
00872 static void _dbus_free_desktop_object_list_names_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
00873        GDBusMethodInvocation * invocation;
00874        GError* error = NULL;
00875        GDBusMessage* _reply_message;
00876        GVariant* _reply;
00877        GVariantBuilder _reply_builder;
00878        gchar** result;
00879        int result_length1 = 0;
00880        gchar** _tmp7_;
00881        GVariantBuilder _tmp8_;
00882        int _tmp9_;
00883        invocation = _user_data_;
00884        result = free_desktop_object_list_names_finish ((FreeDesktopObject*) source_object, _res_, &result_length1, &error);
00885        if (error) {
00886               g_dbus_method_invocation_return_gerror (invocation, error);
00887               return;
00888        }
00889        _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
00890        g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
00891        _tmp7_ = result;
00892        g_variant_builder_init (&_tmp8_, G_VARIANT_TYPE ("as"));
00893        for (_tmp9_ = 0; _tmp9_ < result_length1; _tmp9_++) {
00894               g_variant_builder_add_value (&_tmp8_, g_variant_new_string (*_tmp7_));
00895               _tmp7_++;
00896        }
00897        g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp8_));
00898        result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL);
00899        _reply = g_variant_builder_end (&_reply_builder);
00900        g_dbus_message_set_body (_reply_message, _reply);
00901        g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
00902        g_object_unref (invocation);
00903        g_object_unref (_reply_message);
00904 }
00905 
00906 
00907 static void free_desktop_object_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) {
00908        gpointer* data;
00909        gpointer object;
00910        data = user_data;
00911        object = data[0];
00912        if (strcmp (method_name, "ListNames") == 0) {
00913               _dbus_free_desktop_object_list_names (object, parameters, invocation);
00914        } else {
00915               g_object_unref (invocation);
00916        }
00917 }
00918 
00919 
00920 static GVariant* free_desktop_object_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) {
00921        gpointer* data;
00922        gpointer object;
00923        data = user_data;
00924        object = data[0];
00925        return NULL;
00926 }
00927 
00928 
00929 static gboolean free_desktop_object_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) {
00930        gpointer* data;
00931        gpointer object;
00932        data = user_data;
00933        object = data[0];
00934        return FALSE;
00935 }
00936 
00937 
00938 static void _dbus_free_desktop_object_name_owner_changed (GObject* _sender, const gchar* name, const gchar* old_owner, const gchar* new_owner, gpointer* _data) {
00939        GDBusConnection * _connection;
00940        const gchar * _path;
00941        GVariant *_arguments;
00942        GVariantBuilder _arguments_builder;
00943        _connection = _data[1];
00944        _path = _data[2];
00945        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
00946        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (name));
00947        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (old_owner));
00948        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (new_owner));
00949        _arguments = g_variant_builder_end (&_arguments_builder);
00950        g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.DBus", "NameOwnerChanged", _arguments, NULL);
00951 }
00952 
00953 
00954 guint free_desktop_object_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) {
00955        guint result;
00956        gpointer *data;
00957        data = g_new (gpointer, 3);
00958        data[0] = g_object_ref (object);
00959        data[1] = g_object_ref (connection);
00960        data[2] = g_strdup (path);
00961        result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_free_desktop_object_dbus_interface_info), &_free_desktop_object_dbus_interface_vtable, data, _free_desktop_object_unregister_object, error);
00962        if (!result) {
00963               return 0;
00964        }
00965        g_signal_connect (object, "name-owner-changed", (GCallback) _dbus_free_desktop_object_name_owner_changed, data);
00966        return result;
00967 }
00968 
00969 
00970 static void _free_desktop_object_unregister_object (gpointer user_data) {
00971        gpointer* data;
00972        data = user_data;
00973        g_signal_handlers_disconnect_by_func (data[0], _dbus_free_desktop_object_name_owner_changed, data);
00974        g_object_unref (data[0]);
00975        g_object_unref (data[1]);
00976        g_free (data[2]);
00977        g_free (data);
00978 }
00979 
00980 
00981 void mpris_root_Quit (MprisRoot* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00982        MPRIS_ROOT_GET_INTERFACE (self)->Quit (self, _callback_, _user_data_);
00983 }
00984 
00985 
00986 void mpris_root_Quit_finish (MprisRoot* self, GAsyncResult* _res_, GError** error) {
00987        MPRIS_ROOT_GET_INTERFACE (self)->Quit_finish (self, _res_, error);
00988 }
00989 
00990 
00991 void mpris_root_Raise (MprisRoot* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
00992        MPRIS_ROOT_GET_INTERFACE (self)->Raise (self, _callback_, _user_data_);
00993 }
00994 
00995 
00996 void mpris_root_Raise_finish (MprisRoot* self, GAsyncResult* _res_, GError** error) {
00997        MPRIS_ROOT_GET_INTERFACE (self)->Raise_finish (self, _res_, error);
00998 }
00999 
01000 
01001 gboolean mpris_root_get_HasTracklist (MprisRoot* self) {
01002        g_return_val_if_fail (self != NULL, FALSE);
01003        return MPRIS_ROOT_GET_INTERFACE (self)->get_HasTracklist (self);
01004 }
01005 
01006 
01007 void mpris_root_set_HasTracklist (MprisRoot* self, gboolean value) {
01008        g_return_if_fail (self != NULL);
01009        MPRIS_ROOT_GET_INTERFACE (self)->set_HasTracklist (self, value);
01010 }
01011 
01012 
01013 gboolean mpris_root_get_CanQuit (MprisRoot* self) {
01014        g_return_val_if_fail (self != NULL, FALSE);
01015        return MPRIS_ROOT_GET_INTERFACE (self)->get_CanQuit (self);
01016 }
01017 
01018 
01019 void mpris_root_set_CanQuit (MprisRoot* self, gboolean value) {
01020        g_return_if_fail (self != NULL);
01021        MPRIS_ROOT_GET_INTERFACE (self)->set_CanQuit (self, value);
01022 }
01023 
01024 
01025 gboolean mpris_root_get_CanRaise (MprisRoot* self) {
01026        g_return_val_if_fail (self != NULL, FALSE);
01027        return MPRIS_ROOT_GET_INTERFACE (self)->get_CanRaise (self);
01028 }
01029 
01030 
01031 void mpris_root_set_CanRaise (MprisRoot* self, gboolean value) {
01032        g_return_if_fail (self != NULL);
01033        MPRIS_ROOT_GET_INTERFACE (self)->set_CanRaise (self, value);
01034 }
01035 
01036 
01037 gchar* mpris_root_get_Identity (MprisRoot* self) {
01038        g_return_val_if_fail (self != NULL, NULL);
01039        return MPRIS_ROOT_GET_INTERFACE (self)->get_Identity (self);
01040 }
01041 
01042 
01043 void mpris_root_set_Identity (MprisRoot* self, const gchar* value) {
01044        g_return_if_fail (self != NULL);
01045        MPRIS_ROOT_GET_INTERFACE (self)->set_Identity (self, value);
01046 }
01047 
01048 
01049 gchar* mpris_root_get_DesktopEntry (MprisRoot* self) {
01050        g_return_val_if_fail (self != NULL, NULL);
01051        return MPRIS_ROOT_GET_INTERFACE (self)->get_DesktopEntry (self);
01052 }
01053 
01054 
01055 void mpris_root_set_DesktopEntry (MprisRoot* self, const gchar* value) {
01056        g_return_if_fail (self != NULL);
01057        MPRIS_ROOT_GET_INTERFACE (self)->set_DesktopEntry (self, value);
01058 }
01059 
01060 
01061 static void mpris_root_base_init (MprisRootIface * iface) {
01062        static gboolean initialized = FALSE;
01063        if (!initialized) {
01064               initialized = TRUE;
01065        }
01066 }
01067 
01068 
01069 GType mpris_root_get_type (void) {
01070        static volatile gsize mpris_root_type_id__volatile = 0;
01071        if (g_once_init_enter (&mpris_root_type_id__volatile)) {
01072               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 };
01073               GType mpris_root_type_id;
01074               mpris_root_type_id = g_type_register_static (G_TYPE_INTERFACE, "MprisRoot", &g_define_type_info, 0);
01075               g_type_interface_add_prerequisite (mpris_root_type_id, G_TYPE_OBJECT);
01076               g_type_set_qdata (mpris_root_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) mpris_root_proxy_get_type);
01077               g_type_set_qdata (mpris_root_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.mpris.MediaPlayer2");
01078               g_type_set_qdata (mpris_root_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) mpris_root_register_object);
01079               g_once_init_leave (&mpris_root_type_id__volatile, mpris_root_type_id);
01080        }
01081        return mpris_root_type_id__volatile;
01082 }
01083 
01084 
01085 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) )
01086 static void mpris_root_proxy_class_init (MprisRootProxyClass* klass) {
01087        G_DBUS_PROXY_CLASS (klass)->g_signal = mpris_root_proxy_g_signal;
01088 }
01089 
01090 
01091 static void mpris_root_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) {
01092 }
01093 
01094 
01095 static void mpris_root_proxy_init (MprisRootProxy* self) {
01096 }
01097 
01098 
01099 static void mpris_root_proxy_Quit_async (MprisRoot* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
01100        GDBusMessage *_message;
01101        GVariant *_arguments;
01102        GVariantBuilder _arguments_builder;
01103        G_IO_ERROR;
01104        _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");
01105        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
01106        _arguments = g_variant_builder_end (&_arguments_builder);
01107        g_dbus_message_set_body (_message, _arguments);
01108        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));
01109        g_object_unref (_message);
01110 }
01111 
01112 
01113 static void mpris_root_proxy_Quit_finish (MprisRoot* self, GAsyncResult* _res_, GError** error) {
01114        GDBusMessage *_reply_message;
01115        _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);
01116        if (!_reply_message) {
01117               return;
01118        }
01119        if (g_dbus_message_to_gerror (_reply_message, error)) {
01120               g_object_unref (_reply_message);
01121               return;
01122        }
01123        g_object_unref (_reply_message);
01124 }
01125 
01126 
01127 static void mpris_root_proxy_Raise_async (MprisRoot* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
01128        GDBusMessage *_message;
01129        GVariant *_arguments;
01130        GVariantBuilder _arguments_builder;
01131        G_IO_ERROR;
01132        _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");
01133        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
01134        _arguments = g_variant_builder_end (&_arguments_builder);
01135        g_dbus_message_set_body (_message, _arguments);
01136        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));
01137        g_object_unref (_message);
01138 }
01139 
01140 
01141 static void mpris_root_proxy_Raise_finish (MprisRoot* self, GAsyncResult* _res_, GError** error) {
01142        GDBusMessage *_reply_message;
01143        _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);
01144        if (!_reply_message) {
01145               return;
01146        }
01147        if (g_dbus_message_to_gerror (_reply_message, error)) {
01148               g_object_unref (_reply_message);
01149               return;
01150        }
01151        g_object_unref (_reply_message);
01152 }
01153 
01154 
01155 static gboolean mpris_root_dbus_proxy_get_HasTracklist (MprisRoot* self) {
01156        GVariant *_inner_reply;
01157        gboolean _result;
01158        _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "HasTracklist");
01159        if (!_inner_reply) {
01160               GVariant *_arguments;
01161               GVariant *_reply;
01162               GVariantBuilder _arguments_builder;
01163               g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
01164               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2"));
01165               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("HasTracklist"));
01166               _arguments = g_variant_builder_end (&_arguments_builder);
01167               _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
01168               if (!_reply) {
01169                      return FALSE;
01170               }
01171               g_variant_get (_reply, "(v)", &_inner_reply);
01172               g_variant_unref (_reply);
01173        }
01174        _result = g_variant_get_boolean (_inner_reply);
01175        g_variant_unref (_inner_reply);
01176        return _result;
01177 }
01178 
01179 
01180 static void mpris_root_dbus_proxy_set_HasTracklist (MprisRoot* self, gboolean value) {
01181        GVariant *_arguments;
01182        GVariant *_reply;
01183        GVariantBuilder _arguments_builder;
01184        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
01185        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2"));
01186        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("HasTracklist"));
01187        g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
01188        g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (value));
01189        g_variant_builder_close (&_arguments_builder);
01190        _arguments = g_variant_builder_end (&_arguments_builder);
01191        _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
01192        if (!_reply) {
01193               return;
01194        }
01195        g_variant_unref (_reply);
01196 }
01197 
01198 
01199 static gboolean mpris_root_dbus_proxy_get_CanQuit (MprisRoot* self) {
01200        GVariant *_inner_reply;
01201        gboolean _result;
01202        _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "CanQuit");
01203        if (!_inner_reply) {
01204               GVariant *_arguments;
01205               GVariant *_reply;
01206               GVariantBuilder _arguments_builder;
01207               g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
01208               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2"));
01209               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("CanQuit"));
01210               _arguments = g_variant_builder_end (&_arguments_builder);
01211               _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
01212               if (!_reply) {
01213                      return FALSE;
01214               }
01215               g_variant_get (_reply, "(v)", &_inner_reply);
01216               g_variant_unref (_reply);
01217        }
01218        _result = g_variant_get_boolean (_inner_reply);
01219        g_variant_unref (_inner_reply);
01220        return _result;
01221 }
01222 
01223 
01224 static void mpris_root_dbus_proxy_set_CanQuit (MprisRoot* self, gboolean value) {
01225        GVariant *_arguments;
01226        GVariant *_reply;
01227        GVariantBuilder _arguments_builder;
01228        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
01229        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2"));
01230        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("CanQuit"));
01231        g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
01232        g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (value));
01233        g_variant_builder_close (&_arguments_builder);
01234        _arguments = g_variant_builder_end (&_arguments_builder);
01235        _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
01236        if (!_reply) {
01237               return;
01238        }
01239        g_variant_unref (_reply);
01240 }
01241 
01242 
01243 static gboolean mpris_root_dbus_proxy_get_CanRaise (MprisRoot* self) {
01244        GVariant *_inner_reply;
01245        gboolean _result;
01246        _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "CanRaise");
01247        if (!_inner_reply) {
01248               GVariant *_arguments;
01249               GVariant *_reply;
01250               GVariantBuilder _arguments_builder;
01251               g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
01252               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2"));
01253               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("CanRaise"));
01254               _arguments = g_variant_builder_end (&_arguments_builder);
01255               _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
01256               if (!_reply) {
01257                      return FALSE;
01258               }
01259               g_variant_get (_reply, "(v)", &_inner_reply);
01260               g_variant_unref (_reply);
01261        }
01262        _result = g_variant_get_boolean (_inner_reply);
01263        g_variant_unref (_inner_reply);
01264        return _result;
01265 }
01266 
01267 
01268 static void mpris_root_dbus_proxy_set_CanRaise (MprisRoot* self, gboolean value) {
01269        GVariant *_arguments;
01270        GVariant *_reply;
01271        GVariantBuilder _arguments_builder;
01272        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
01273        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2"));
01274        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("CanRaise"));
01275        g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
01276        g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (value));
01277        g_variant_builder_close (&_arguments_builder);
01278        _arguments = g_variant_builder_end (&_arguments_builder);
01279        _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
01280        if (!_reply) {
01281               return;
01282        }
01283        g_variant_unref (_reply);
01284 }
01285 
01286 
01287 static gchar* mpris_root_dbus_proxy_get_Identity (MprisRoot* self) {
01288        GVariant *_inner_reply;
01289        gchar* _result;
01290        _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Identity");
01291        if (!_inner_reply) {
01292               GVariant *_arguments;
01293               GVariant *_reply;
01294               GVariantBuilder _arguments_builder;
01295               g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
01296               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2"));
01297               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Identity"));
01298               _arguments = g_variant_builder_end (&_arguments_builder);
01299               _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
01300               if (!_reply) {
01301                      return NULL;
01302               }
01303               g_variant_get (_reply, "(v)", &_inner_reply);
01304               g_variant_unref (_reply);
01305        }
01306        _result = g_variant_dup_string (_inner_reply, NULL);
01307        g_variant_unref (_inner_reply);
01308        return _result;
01309 }
01310 
01311 
01312 static void mpris_root_dbus_proxy_set_Identity (MprisRoot* self, const gchar* value) {
01313        GVariant *_arguments;
01314        GVariant *_reply;
01315        GVariantBuilder _arguments_builder;
01316        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
01317        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2"));
01318        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Identity"));
01319        g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
01320        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (value));
01321        g_variant_builder_close (&_arguments_builder);
01322        _arguments = g_variant_builder_end (&_arguments_builder);
01323        _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
01324        if (!_reply) {
01325               return;
01326        }
01327        g_variant_unref (_reply);
01328 }
01329 
01330 
01331 static gchar* mpris_root_dbus_proxy_get_DesktopEntry (MprisRoot* self) {
01332        GVariant *_inner_reply;
01333        gchar* _result;
01334        _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "DesktopEntry");
01335        if (!_inner_reply) {
01336               GVariant *_arguments;
01337               GVariant *_reply;
01338               GVariantBuilder _arguments_builder;
01339               g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
01340               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2"));
01341               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("DesktopEntry"));
01342               _arguments = g_variant_builder_end (&_arguments_builder);
01343               _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
01344               if (!_reply) {
01345                      return NULL;
01346               }
01347               g_variant_get (_reply, "(v)", &_inner_reply);
01348               g_variant_unref (_reply);
01349        }
01350        _result = g_variant_dup_string (_inner_reply, NULL);
01351        g_variant_unref (_inner_reply);
01352        return _result;
01353 }
01354 
01355 
01356 static void mpris_root_dbus_proxy_set_DesktopEntry (MprisRoot* self, const gchar* value) {
01357        GVariant *_arguments;
01358        GVariant *_reply;
01359        GVariantBuilder _arguments_builder;
01360        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
01361        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2"));
01362        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("DesktopEntry"));
01363        g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
01364        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (value));
01365        g_variant_builder_close (&_arguments_builder);
01366        _arguments = g_variant_builder_end (&_arguments_builder);
01367        _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
01368        if (!_reply) {
01369               return;
01370        }
01371        g_variant_unref (_reply);
01372 }
01373 
01374 
01375 static void mpris_root_proxy_mpris_root_interface_init (MprisRootIface* iface) {
01376        iface->Quit = mpris_root_proxy_Quit_async;
01377        iface->Quit_finish = mpris_root_proxy_Quit_finish;
01378        iface->Raise = mpris_root_proxy_Raise_async;
01379        iface->Raise_finish = mpris_root_proxy_Raise_finish;
01380        iface->get_HasTracklist = mpris_root_dbus_proxy_get_HasTracklist;
01381        iface->set_HasTracklist = mpris_root_dbus_proxy_set_HasTracklist;
01382        iface->get_CanQuit = mpris_root_dbus_proxy_get_CanQuit;
01383        iface->set_CanQuit = mpris_root_dbus_proxy_set_CanQuit;
01384        iface->get_CanRaise = mpris_root_dbus_proxy_get_CanRaise;
01385        iface->set_CanRaise = mpris_root_dbus_proxy_set_CanRaise;
01386        iface->get_Identity = mpris_root_dbus_proxy_get_Identity;
01387        iface->set_Identity = mpris_root_dbus_proxy_set_Identity;
01388        iface->get_DesktopEntry = mpris_root_dbus_proxy_get_DesktopEntry;
01389        iface->set_DesktopEntry = mpris_root_dbus_proxy_set_DesktopEntry;
01390 }
01391 
01392 
01393 static void _dbus_mpris_root_Quit (MprisRoot* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
01394        GVariantIter _arguments_iter;
01395        g_variant_iter_init (&_arguments_iter, parameters);
01396        mpris_root_Quit (self, (GAsyncReadyCallback) _dbus_mpris_root_Quit_ready, invocation);
01397 }
01398 
01399 
01400 static void _dbus_mpris_root_Quit_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
01401        GDBusMethodInvocation * invocation;
01402        GError* error = NULL;
01403        GDBusMessage* _reply_message;
01404        GVariant* _reply;
01405        GVariantBuilder _reply_builder;
01406        invocation = _user_data_;
01407        mpris_root_Quit_finish ((MprisRoot*) source_object, _res_, &error);
01408        if (error) {
01409               g_dbus_method_invocation_return_gerror (invocation, error);
01410               return;
01411        }
01412        _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
01413        g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
01414        _reply = g_variant_builder_end (&_reply_builder);
01415        g_dbus_message_set_body (_reply_message, _reply);
01416        g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
01417        g_object_unref (invocation);
01418        g_object_unref (_reply_message);
01419 }
01420 
01421 
01422 static void _dbus_mpris_root_Raise (MprisRoot* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
01423        GVariantIter _arguments_iter;
01424        g_variant_iter_init (&_arguments_iter, parameters);
01425        mpris_root_Raise (self, (GAsyncReadyCallback) _dbus_mpris_root_Raise_ready, invocation);
01426 }
01427 
01428 
01429 static void _dbus_mpris_root_Raise_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
01430        GDBusMethodInvocation * invocation;
01431        GError* error = NULL;
01432        GDBusMessage* _reply_message;
01433        GVariant* _reply;
01434        GVariantBuilder _reply_builder;
01435        invocation = _user_data_;
01436        mpris_root_Raise_finish ((MprisRoot*) source_object, _res_, &error);
01437        if (error) {
01438               g_dbus_method_invocation_return_gerror (invocation, error);
01439               return;
01440        }
01441        _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
01442        g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
01443        _reply = g_variant_builder_end (&_reply_builder);
01444        g_dbus_message_set_body (_reply_message, _reply);
01445        g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
01446        g_object_unref (invocation);
01447        g_object_unref (_reply_message);
01448 }
01449 
01450 
01451 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) {
01452        gpointer* data;
01453        gpointer object;
01454        data = user_data;
01455        object = data[0];
01456        if (strcmp (method_name, "Quit") == 0) {
01457               _dbus_mpris_root_Quit (object, parameters, invocation);
01458        } else if (strcmp (method_name, "Raise") == 0) {
01459               _dbus_mpris_root_Raise (object, parameters, invocation);
01460        } else {
01461               g_object_unref (invocation);
01462        }
01463 }
01464 
01465 
01466 static GVariant* _dbus_mpris_root_get_HasTracklist (MprisRoot* self) {
01467        gboolean result;
01468        GVariant* _reply;
01469        result = mpris_root_get_HasTracklist (self);
01470        _reply = g_variant_new_boolean (result);
01471        return _reply;
01472 }
01473 
01474 
01475 static GVariant* _dbus_mpris_root_get_CanQuit (MprisRoot* self) {
01476        gboolean result;
01477        GVariant* _reply;
01478        result = mpris_root_get_CanQuit (self);
01479        _reply = g_variant_new_boolean (result);
01480        return _reply;
01481 }
01482 
01483 
01484 static GVariant* _dbus_mpris_root_get_CanRaise (MprisRoot* self) {
01485        gboolean result;
01486        GVariant* _reply;
01487        result = mpris_root_get_CanRaise (self);
01488        _reply = g_variant_new_boolean (result);
01489        return _reply;
01490 }
01491 
01492 
01493 static GVariant* _dbus_mpris_root_get_Identity (MprisRoot* self) {
01494        gchar* result;
01495        GVariant* _reply;
01496        result = mpris_root_get_Identity (self);
01497        _reply = g_variant_new_string (result);
01498        _g_free0 (result);
01499        return _reply;
01500 }
01501 
01502 
01503 static GVariant* _dbus_mpris_root_get_DesktopEntry (MprisRoot* self) {
01504        gchar* result;
01505        GVariant* _reply;
01506        result = mpris_root_get_DesktopEntry (self);
01507        _reply = g_variant_new_string (result);
01508        _g_free0 (result);
01509        return _reply;
01510 }
01511 
01512 
01513 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) {
01514        gpointer* data;
01515        gpointer object;
01516        data = user_data;
01517        object = data[0];
01518        if (strcmp (property_name, "HasTracklist") == 0) {
01519               return _dbus_mpris_root_get_HasTracklist (object);
01520        } else if (strcmp (property_name, "CanQuit") == 0) {
01521               return _dbus_mpris_root_get_CanQuit (object);
01522        } else if (strcmp (property_name, "CanRaise") == 0) {
01523               return _dbus_mpris_root_get_CanRaise (object);
01524        } else if (strcmp (property_name, "Identity") == 0) {
01525               return _dbus_mpris_root_get_Identity (object);
01526        } else if (strcmp (property_name, "DesktopEntry") == 0) {
01527               return _dbus_mpris_root_get_DesktopEntry (object);
01528        }
01529        return NULL;
01530 }
01531 
01532 
01533 static void _dbus_mpris_root_set_HasTracklist (MprisRoot* self, GVariant* _value) {
01534        gboolean value = FALSE;
01535        value = g_variant_get_boolean (_value);
01536        mpris_root_set_HasTracklist (self, value);
01537 }
01538 
01539 
01540 static void _dbus_mpris_root_set_CanQuit (MprisRoot* self, GVariant* _value) {
01541        gboolean value = FALSE;
01542        value = g_variant_get_boolean (_value);
01543        mpris_root_set_CanQuit (self, value);
01544 }
01545 
01546 
01547 static void _dbus_mpris_root_set_CanRaise (MprisRoot* self, GVariant* _value) {
01548        gboolean value = FALSE;
01549        value = g_variant_get_boolean (_value);
01550        mpris_root_set_CanRaise (self, value);
01551 }
01552 
01553 
01554 static void _dbus_mpris_root_set_Identity (MprisRoot* self, GVariant* _value) {
01555        gchar* value = NULL;
01556        value = g_variant_dup_string (_value, NULL);
01557        mpris_root_set_Identity (self, value);
01558        _g_free0 (value);
01559 }
01560 
01561 
01562 static void _dbus_mpris_root_set_DesktopEntry (MprisRoot* self, GVariant* _value) {
01563        gchar* value = NULL;
01564        value = g_variant_dup_string (_value, NULL);
01565        mpris_root_set_DesktopEntry (self, value);
01566        _g_free0 (value);
01567 }
01568 
01569 
01570 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) {
01571        gpointer* data;
01572        gpointer object;
01573        data = user_data;
01574        object = data[0];
01575        if (strcmp (property_name, "HasTracklist") == 0) {
01576               _dbus_mpris_root_set_HasTracklist (object, value);
01577               return TRUE;
01578        } else if (strcmp (property_name, "CanQuit") == 0) {
01579               _dbus_mpris_root_set_CanQuit (object, value);
01580               return TRUE;
01581        } else if (strcmp (property_name, "CanRaise") == 0) {
01582               _dbus_mpris_root_set_CanRaise (object, value);
01583               return TRUE;
01584        } else if (strcmp (property_name, "Identity") == 0) {
01585               _dbus_mpris_root_set_Identity (object, value);
01586               return TRUE;
01587        } else if (strcmp (property_name, "DesktopEntry") == 0) {
01588               _dbus_mpris_root_set_DesktopEntry (object, value);
01589               return TRUE;
01590        }
01591        return FALSE;
01592 }
01593 
01594 
01595 guint mpris_root_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) {
01596        guint result;
01597        gpointer *data;
01598        data = g_new (gpointer, 3);
01599        data[0] = g_object_ref (object);
01600        data[1] = g_object_ref (connection);
01601        data[2] = g_strdup (path);
01602        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);
01603        if (!result) {
01604               return 0;
01605        }
01606        return result;
01607 }
01608 
01609 
01610 static void _mpris_root_unregister_object (gpointer user_data) {
01611        gpointer* data;
01612        data = user_data;
01613        g_object_unref (data[0]);
01614        g_object_unref (data[1]);
01615        g_free (data[2]);
01616        g_free (data);
01617 }
01618 
01619 
01620 void mpris_player_PlayPause (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
01621        MPRIS_PLAYER_GET_INTERFACE (self)->PlayPause (self, _callback_, _user_data_);
01622 }
01623 
01624 
01625 void mpris_player_PlayPause_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error) {
01626        MPRIS_PLAYER_GET_INTERFACE (self)->PlayPause_finish (self, _res_, error);
01627 }
01628 
01629 
01630 void mpris_player_Next (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
01631        MPRIS_PLAYER_GET_INTERFACE (self)->Next (self, _callback_, _user_data_);
01632 }
01633 
01634 
01635 void mpris_player_Next_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error) {
01636        MPRIS_PLAYER_GET_INTERFACE (self)->Next_finish (self, _res_, error);
01637 }
01638 
01639 
01640 void mpris_player_Previous (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
01641        MPRIS_PLAYER_GET_INTERFACE (self)->Previous (self, _callback_, _user_data_);
01642 }
01643 
01644 
01645 void mpris_player_Previous_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error) {
01646        MPRIS_PLAYER_GET_INTERFACE (self)->Previous_finish (self, _res_, error);
01647 }
01648 
01649 
01650 void mpris_player_Seek (MprisPlayer* self, gint64 offset, GAsyncReadyCallback _callback_, gpointer _user_data_) {
01651        MPRIS_PLAYER_GET_INTERFACE (self)->Seek (self, offset, _callback_, _user_data_);
01652 }
01653 
01654 
01655 void mpris_player_Seek_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error) {
01656        MPRIS_PLAYER_GET_INTERFACE (self)->Seek_finish (self, _res_, error);
01657 }
01658 
01659 
01660 GHashTable* mpris_player_get_Metadata (MprisPlayer* self) {
01661        g_return_val_if_fail (self != NULL, NULL);
01662        return MPRIS_PLAYER_GET_INTERFACE (self)->get_Metadata (self);
01663 }
01664 
01665 
01666 void mpris_player_set_Metadata (MprisPlayer* self, GHashTable* value) {
01667        g_return_if_fail (self != NULL);
01668        MPRIS_PLAYER_GET_INTERFACE (self)->set_Metadata (self, value);
01669 }
01670 
01671 
01672 gint32 mpris_player_get_Position (MprisPlayer* self) {
01673        g_return_val_if_fail (self != NULL, 0);
01674        return MPRIS_PLAYER_GET_INTERFACE (self)->get_Position (self);
01675 }
01676 
01677 
01678 void mpris_player_set_Position (MprisPlayer* self, gint32 value) {
01679        g_return_if_fail (self != NULL);
01680        MPRIS_PLAYER_GET_INTERFACE (self)->set_Position (self, value);
01681 }
01682 
01683 
01684 gchar* mpris_player_get_PlaybackStatus (MprisPlayer* self) {
01685        g_return_val_if_fail (self != NULL, NULL);
01686        return MPRIS_PLAYER_GET_INTERFACE (self)->get_PlaybackStatus (self);
01687 }
01688 
01689 
01690 void mpris_player_set_PlaybackStatus (MprisPlayer* self, const gchar* value) {
01691        g_return_if_fail (self != NULL);
01692        MPRIS_PLAYER_GET_INTERFACE (self)->set_PlaybackStatus (self, value);
01693 }
01694 
01695 
01696 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) {
01697        typedef void (*GMarshalFunc_VOID__INT64) (gpointer data1, gint64 arg_1, gpointer data2);
01698        register GMarshalFunc_VOID__INT64 callback;
01699        register GCClosure * cc;
01700        register gpointer data1;
01701        register gpointer data2;
01702        cc = (GCClosure *) closure;
01703        g_return_if_fail (n_param_values == 2);
01704        if (G_CCLOSURE_SWAP_DATA (closure)) {
01705               data1 = closure->data;
01706               data2 = param_values->data[0].v_pointer;
01707        } else {
01708               data1 = param_values->data[0].v_pointer;
01709               data2 = closure->data;
01710        }
01711        callback = (GMarshalFunc_VOID__INT64) (marshal_data ? marshal_data : cc->callback);
01712        callback (data1, g_value_get_int64 (param_values + 1), data2);
01713 }
01714 
01715 
01716 static void mpris_player_base_init (MprisPlayerIface * iface) {
01717        static gboolean initialized = FALSE;
01718        if (!initialized) {
01719               initialized = TRUE;
01720               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);
01721        }
01722 }
01723 
01724 
01725 GType mpris_player_get_type (void) {
01726        static volatile gsize mpris_player_type_id__volatile = 0;
01727        if (g_once_init_enter (&mpris_player_type_id__volatile)) {
01728               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 };
01729               GType mpris_player_type_id;
01730               mpris_player_type_id = g_type_register_static (G_TYPE_INTERFACE, "MprisPlayer", &g_define_type_info, 0);
01731               g_type_interface_add_prerequisite (mpris_player_type_id, G_TYPE_OBJECT);
01732               g_type_set_qdata (mpris_player_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) mpris_player_proxy_get_type);
01733               g_type_set_qdata (mpris_player_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.mpris.MediaPlayer2.Player");
01734               g_type_set_qdata (mpris_player_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) mpris_player_register_object);
01735               g_once_init_leave (&mpris_player_type_id__volatile, mpris_player_type_id);
01736        }
01737        return mpris_player_type_id__volatile;
01738 }
01739 
01740 
01741 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) )
01742 static void mpris_player_proxy_class_init (MprisPlayerProxyClass* klass) {
01743        G_DBUS_PROXY_CLASS (klass)->g_signal = mpris_player_proxy_g_signal;
01744 }
01745 
01746 
01747 static void _dbus_handle_mpris_player_seeked (MprisPlayer* self, GVariant* parameters) {
01748        GVariantIter _arguments_iter;
01749        gint64 new_position = 0LL;
01750        GVariant* _tmp10_;
01751        g_variant_iter_init (&_arguments_iter, parameters);
01752        _tmp10_ = g_variant_iter_next_value (&_arguments_iter);
01753        new_position = g_variant_get_int64 (_tmp10_);
01754        g_variant_unref (_tmp10_);
01755        g_signal_emit_by_name (self, "seeked", new_position);
01756 }
01757 
01758 
01759 static void mpris_player_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) {
01760        if (strcmp (signal_name, "Seeked") == 0) {
01761               _dbus_handle_mpris_player_seeked ((MprisPlayer*) proxy, parameters);
01762        }
01763 }
01764 
01765 
01766 static void mpris_player_proxy_init (MprisPlayerProxy* self) {
01767 }
01768 
01769 
01770 static void mpris_player_proxy_PlayPause_async (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
01771        GDBusMessage *_message;
01772        GVariant *_arguments;
01773        GVariantBuilder _arguments_builder;
01774        G_IO_ERROR;
01775        _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");
01776        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
01777        _arguments = g_variant_builder_end (&_arguments_builder);
01778        g_dbus_message_set_body (_message, _arguments);
01779        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));
01780        g_object_unref (_message);
01781 }
01782 
01783 
01784 static void mpris_player_proxy_PlayPause_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error) {
01785        GDBusMessage *_reply_message;
01786        _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);
01787        if (!_reply_message) {
01788               return;
01789        }
01790        if (g_dbus_message_to_gerror (_reply_message, error)) {
01791               g_object_unref (_reply_message);
01792               return;
01793        }
01794        g_object_unref (_reply_message);
01795 }
01796 
01797 
01798 static void mpris_player_proxy_Next_async (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
01799        GDBusMessage *_message;
01800        GVariant *_arguments;
01801        GVariantBuilder _arguments_builder;
01802        G_IO_ERROR;
01803        _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");
01804        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
01805        _arguments = g_variant_builder_end (&_arguments_builder);
01806        g_dbus_message_set_body (_message, _arguments);
01807        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));
01808        g_object_unref (_message);
01809 }
01810 
01811 
01812 static void mpris_player_proxy_Next_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error) {
01813        GDBusMessage *_reply_message;
01814        _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);
01815        if (!_reply_message) {
01816               return;
01817        }
01818        if (g_dbus_message_to_gerror (_reply_message, error)) {
01819               g_object_unref (_reply_message);
01820               return;
01821        }
01822        g_object_unref (_reply_message);
01823 }
01824 
01825 
01826 static void mpris_player_proxy_Previous_async (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
01827        GDBusMessage *_message;
01828        GVariant *_arguments;
01829        GVariantBuilder _arguments_builder;
01830        G_IO_ERROR;
01831        _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");
01832        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
01833        _arguments = g_variant_builder_end (&_arguments_builder);
01834        g_dbus_message_set_body (_message, _arguments);
01835        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));
01836        g_object_unref (_message);
01837 }
01838 
01839 
01840 static void mpris_player_proxy_Previous_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error) {
01841        GDBusMessage *_reply_message;
01842        _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);
01843        if (!_reply_message) {
01844               return;
01845        }
01846        if (g_dbus_message_to_gerror (_reply_message, error)) {
01847               g_object_unref (_reply_message);
01848               return;
01849        }
01850        g_object_unref (_reply_message);
01851 }
01852 
01853 
01854 static void mpris_player_proxy_Seek_async (MprisPlayer* self, gint64 offset, GAsyncReadyCallback _callback_, gpointer _user_data_) {
01855        GDBusMessage *_message;
01856        GVariant *_arguments;
01857        GVariantBuilder _arguments_builder;
01858        G_IO_ERROR;
01859        _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", "Seek");
01860        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
01861        g_variant_builder_add_value (&_arguments_builder, g_variant_new_int64 (offset));
01862        _arguments = g_variant_builder_end (&_arguments_builder);
01863        g_dbus_message_set_body (_message, _arguments);
01864        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));
01865        g_object_unref (_message);
01866 }
01867 
01868 
01869 static void mpris_player_proxy_Seek_finish (MprisPlayer* self, GAsyncResult* _res_, GError** error) {
01870        GDBusMessage *_reply_message;
01871        _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);
01872        if (!_reply_message) {
01873               return;
01874        }
01875        if (g_dbus_message_to_gerror (_reply_message, error)) {
01876               g_object_unref (_reply_message);
01877               return;
01878        }
01879        g_object_unref (_reply_message);
01880 }
01881 
01882 
01883 static GHashTable* mpris_player_dbus_proxy_get_Metadata (MprisPlayer* self) {
01884        GVariant *_inner_reply;
01885        GHashTable* _result;
01886        GHashTable* _tmp11_;
01887        GVariantIter _tmp12_;
01888        GVariant* _tmp13_;
01889        GVariant* _tmp14_;
01890        _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Metadata");
01891        if (!_inner_reply) {
01892               GVariant *_arguments;
01893               GVariant *_reply;
01894               GVariantBuilder _arguments_builder;
01895               g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
01896               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2.Player"));
01897               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Metadata"));
01898               _arguments = g_variant_builder_end (&_arguments_builder);
01899               _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
01900               if (!_reply) {
01901                      return NULL;
01902               }
01903               g_variant_get (_reply, "(v)", &_inner_reply);
01904               g_variant_unref (_reply);
01905        }
01906        _tmp11_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
01907        g_variant_iter_init (&_tmp12_, _inner_reply);
01908        while (g_variant_iter_loop (&_tmp12_, "{?*}", &_tmp13_, &_tmp14_)) {
01909               g_hash_table_insert (_tmp11_, g_variant_dup_string (_tmp13_, NULL), g_variant_get_variant (_tmp14_));
01910        }
01911        _result = _tmp11_;
01912        g_variant_unref (_inner_reply);
01913        return _result;
01914 }
01915 
01916 
01917 static void mpris_player_dbus_proxy_set_Metadata (MprisPlayer* self, GHashTable* value) {
01918        GVariant *_arguments;
01919        GVariant *_reply;
01920        GVariantBuilder _arguments_builder;
01921        GVariantBuilder _tmp15_;
01922        GHashTableIter _tmp16_;
01923        gpointer _tmp17_;
01924        gpointer _tmp18_;
01925        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
01926        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2.Player"));
01927        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Metadata"));
01928        g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
01929        g_hash_table_iter_init (&_tmp16_, value);
01930        g_variant_builder_init (&_tmp15_, G_VARIANT_TYPE ("a{sv}"));
01931        while (g_hash_table_iter_next (&_tmp16_, &_tmp17_, &_tmp18_)) {
01932               gchar* _key;
01933               GVariant* _value;
01934               _key = (gchar*) _tmp17_;
01935               _value = (GVariant*) _tmp18_;
01936               g_variant_builder_add (&_tmp15_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
01937        }
01938        g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp15_));
01939        g_variant_builder_close (&_arguments_builder);
01940        _arguments = g_variant_builder_end (&_arguments_builder);
01941        _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
01942        if (!_reply) {
01943               return;
01944        }
01945        g_variant_unref (_reply);
01946 }
01947 
01948 
01949 static gint32 mpris_player_dbus_proxy_get_Position (MprisPlayer* self) {
01950        GVariant *_inner_reply;
01951        gint32 _result;
01952        _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Position");
01953        if (!_inner_reply) {
01954               GVariant *_arguments;
01955               GVariant *_reply;
01956               GVariantBuilder _arguments_builder;
01957               g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
01958               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2.Player"));
01959               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Position"));
01960               _arguments = g_variant_builder_end (&_arguments_builder);
01961               _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
01962               if (!_reply) {
01963                      return 0;
01964               }
01965               g_variant_get (_reply, "(v)", &_inner_reply);
01966               g_variant_unref (_reply);
01967        }
01968        _result = g_variant_get_int32 (_inner_reply);
01969        g_variant_unref (_inner_reply);
01970        return _result;
01971 }
01972 
01973 
01974 static void mpris_player_dbus_proxy_set_Position (MprisPlayer* self, gint32 value) {
01975        GVariant *_arguments;
01976        GVariant *_reply;
01977        GVariantBuilder _arguments_builder;
01978        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
01979        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2.Player"));
01980        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Position"));
01981        g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
01982        g_variant_builder_add_value (&_arguments_builder, g_variant_new_int32 (value));
01983        g_variant_builder_close (&_arguments_builder);
01984        _arguments = g_variant_builder_end (&_arguments_builder);
01985        _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
01986        if (!_reply) {
01987               return;
01988        }
01989        g_variant_unref (_reply);
01990 }
01991 
01992 
01993 static gchar* mpris_player_dbus_proxy_get_PlaybackStatus (MprisPlayer* self) {
01994        GVariant *_inner_reply;
01995        gchar* _result;
01996        _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "PlaybackStatus");
01997        if (!_inner_reply) {
01998               GVariant *_arguments;
01999               GVariant *_reply;
02000               GVariantBuilder _arguments_builder;
02001               g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
02002               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2.Player"));
02003               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("PlaybackStatus"));
02004               _arguments = g_variant_builder_end (&_arguments_builder);
02005               _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
02006               if (!_reply) {
02007                      return NULL;
02008               }
02009               g_variant_get (_reply, "(v)", &_inner_reply);
02010               g_variant_unref (_reply);
02011        }
02012        _result = g_variant_dup_string (_inner_reply, NULL);
02013        g_variant_unref (_inner_reply);
02014        return _result;
02015 }
02016 
02017 
02018 static void mpris_player_dbus_proxy_set_PlaybackStatus (MprisPlayer* self, const gchar* value) {
02019        GVariant *_arguments;
02020        GVariant *_reply;
02021        GVariantBuilder _arguments_builder;
02022        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
02023        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2.Player"));
02024        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("PlaybackStatus"));
02025        g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
02026        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (value));
02027        g_variant_builder_close (&_arguments_builder);
02028        _arguments = g_variant_builder_end (&_arguments_builder);
02029        _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
02030        if (!_reply) {
02031               return;
02032        }
02033        g_variant_unref (_reply);
02034 }
02035 
02036 
02037 static void mpris_player_proxy_mpris_player_interface_init (MprisPlayerIface* iface) {
02038        iface->PlayPause = mpris_player_proxy_PlayPause_async;
02039        iface->PlayPause_finish = mpris_player_proxy_PlayPause_finish;
02040        iface->Next = mpris_player_proxy_Next_async;
02041        iface->Next_finish = mpris_player_proxy_Next_finish;
02042        iface->Previous = mpris_player_proxy_Previous_async;
02043        iface->Previous_finish = mpris_player_proxy_Previous_finish;
02044        iface->Seek = mpris_player_proxy_Seek_async;
02045        iface->Seek_finish = mpris_player_proxy_Seek_finish;
02046        iface->get_Metadata = mpris_player_dbus_proxy_get_Metadata;
02047        iface->set_Metadata = mpris_player_dbus_proxy_set_Metadata;
02048        iface->get_Position = mpris_player_dbus_proxy_get_Position;
02049        iface->set_Position = mpris_player_dbus_proxy_set_Position;
02050        iface->get_PlaybackStatus = mpris_player_dbus_proxy_get_PlaybackStatus;
02051        iface->set_PlaybackStatus = mpris_player_dbus_proxy_set_PlaybackStatus;
02052 }
02053 
02054 
02055 static void _dbus_mpris_player_PlayPause (MprisPlayer* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
02056        GVariantIter _arguments_iter;
02057        g_variant_iter_init (&_arguments_iter, parameters);
02058        mpris_player_PlayPause (self, (GAsyncReadyCallback) _dbus_mpris_player_PlayPause_ready, invocation);
02059 }
02060 
02061 
02062 static void _dbus_mpris_player_PlayPause_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
02063        GDBusMethodInvocation * invocation;
02064        GError* error = NULL;
02065        GDBusMessage* _reply_message;
02066        GVariant* _reply;
02067        GVariantBuilder _reply_builder;
02068        invocation = _user_data_;
02069        mpris_player_PlayPause_finish ((MprisPlayer*) source_object, _res_, &error);
02070        if (error) {
02071               g_dbus_method_invocation_return_gerror (invocation, error);
02072               return;
02073        }
02074        _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
02075        g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
02076        _reply = g_variant_builder_end (&_reply_builder);
02077        g_dbus_message_set_body (_reply_message, _reply);
02078        g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
02079        g_object_unref (invocation);
02080        g_object_unref (_reply_message);
02081 }
02082 
02083 
02084 static void _dbus_mpris_player_Next (MprisPlayer* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
02085        GVariantIter _arguments_iter;
02086        g_variant_iter_init (&_arguments_iter, parameters);
02087        mpris_player_Next (self, (GAsyncReadyCallback) _dbus_mpris_player_Next_ready, invocation);
02088 }
02089 
02090 
02091 static void _dbus_mpris_player_Next_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
02092        GDBusMethodInvocation * invocation;
02093        GError* error = NULL;
02094        GDBusMessage* _reply_message;
02095        GVariant* _reply;
02096        GVariantBuilder _reply_builder;
02097        invocation = _user_data_;
02098        mpris_player_Next_finish ((MprisPlayer*) source_object, _res_, &error);
02099        if (error) {
02100               g_dbus_method_invocation_return_gerror (invocation, error);
02101               return;
02102        }
02103        _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
02104        g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
02105        _reply = g_variant_builder_end (&_reply_builder);
02106        g_dbus_message_set_body (_reply_message, _reply);
02107        g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
02108        g_object_unref (invocation);
02109        g_object_unref (_reply_message);
02110 }
02111 
02112 
02113 static void _dbus_mpris_player_Previous (MprisPlayer* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
02114        GVariantIter _arguments_iter;
02115        g_variant_iter_init (&_arguments_iter, parameters);
02116        mpris_player_Previous (self, (GAsyncReadyCallback) _dbus_mpris_player_Previous_ready, invocation);
02117 }
02118 
02119 
02120 static void _dbus_mpris_player_Previous_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
02121        GDBusMethodInvocation * invocation;
02122        GError* error = NULL;
02123        GDBusMessage* _reply_message;
02124        GVariant* _reply;
02125        GVariantBuilder _reply_builder;
02126        invocation = _user_data_;
02127        mpris_player_Previous_finish ((MprisPlayer*) source_object, _res_, &error);
02128        if (error) {
02129               g_dbus_method_invocation_return_gerror (invocation, error);
02130               return;
02131        }
02132        _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
02133        g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
02134        _reply = g_variant_builder_end (&_reply_builder);
02135        g_dbus_message_set_body (_reply_message, _reply);
02136        g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
02137        g_object_unref (invocation);
02138        g_object_unref (_reply_message);
02139 }
02140 
02141 
02142 static void _dbus_mpris_player_Seek (MprisPlayer* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
02143        GVariantIter _arguments_iter;
02144        gint64 offset = 0LL;
02145        GVariant* _tmp19_;
02146        g_variant_iter_init (&_arguments_iter, parameters);
02147        _tmp19_ = g_variant_iter_next_value (&_arguments_iter);
02148        offset = g_variant_get_int64 (_tmp19_);
02149        g_variant_unref (_tmp19_);
02150        mpris_player_Seek (self, offset, (GAsyncReadyCallback) _dbus_mpris_player_Seek_ready, invocation);
02151 }
02152 
02153 
02154 static void _dbus_mpris_player_Seek_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
02155        GDBusMethodInvocation * invocation;
02156        GError* error = NULL;
02157        GDBusMessage* _reply_message;
02158        GVariant* _reply;
02159        GVariantBuilder _reply_builder;
02160        invocation = _user_data_;
02161        mpris_player_Seek_finish ((MprisPlayer*) source_object, _res_, &error);
02162        if (error) {
02163               g_dbus_method_invocation_return_gerror (invocation, error);
02164               return;
02165        }
02166        _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
02167        g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
02168        _reply = g_variant_builder_end (&_reply_builder);
02169        g_dbus_message_set_body (_reply_message, _reply);
02170        g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
02171        g_object_unref (invocation);
02172        g_object_unref (_reply_message);
02173 }
02174 
02175 
02176 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) {
02177        gpointer* data;
02178        gpointer object;
02179        data = user_data;
02180        object = data[0];
02181        if (strcmp (method_name, "PlayPause") == 0) {
02182               _dbus_mpris_player_PlayPause (object, parameters, invocation);
02183        } else if (strcmp (method_name, "Next") == 0) {
02184               _dbus_mpris_player_Next (object, parameters, invocation);
02185        } else if (strcmp (method_name, "Previous") == 0) {
02186               _dbus_mpris_player_Previous (object, parameters, invocation);
02187        } else if (strcmp (method_name, "Seek") == 0) {
02188               _dbus_mpris_player_Seek (object, parameters, invocation);
02189        } else {
02190               g_object_unref (invocation);
02191        }
02192 }
02193 
02194 
02195 static GVariant* _dbus_mpris_player_get_Metadata (MprisPlayer* self) {
02196        GHashTable* result;
02197        GVariantBuilder _tmp20_;
02198        GHashTableIter _tmp21_;
02199        gpointer _tmp22_;
02200        gpointer _tmp23_;
02201        GVariant* _reply;
02202        result = mpris_player_get_Metadata (self);
02203        g_hash_table_iter_init (&_tmp21_, result);
02204        g_variant_builder_init (&_tmp20_, G_VARIANT_TYPE ("a{sv}"));
02205        while (g_hash_table_iter_next (&_tmp21_, &_tmp22_, &_tmp23_)) {
02206               gchar* _key;
02207               GVariant* _value;
02208               _key = (gchar*) _tmp22_;
02209               _value = (GVariant*) _tmp23_;
02210               g_variant_builder_add (&_tmp20_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
02211        }
02212        _reply = g_variant_builder_end (&_tmp20_);
02213        _g_hash_table_unref0 (result);
02214        return _reply;
02215 }
02216 
02217 
02218 static GVariant* _dbus_mpris_player_get_Position (MprisPlayer* self) {
02219        gint32 result;
02220        GVariant* _reply;
02221        result = mpris_player_get_Position (self);
02222        _reply = g_variant_new_int32 (result);
02223        return _reply;
02224 }
02225 
02226 
02227 static GVariant* _dbus_mpris_player_get_PlaybackStatus (MprisPlayer* self) {
02228        gchar* result;
02229        GVariant* _reply;
02230        result = mpris_player_get_PlaybackStatus (self);
02231        _reply = g_variant_new_string (result);
02232        _g_free0 (result);
02233        return _reply;
02234 }
02235 
02236 
02237 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) {
02238        gpointer* data;
02239        gpointer object;
02240        data = user_data;
02241        object = data[0];
02242        if (strcmp (property_name, "Metadata") == 0) {
02243               return _dbus_mpris_player_get_Metadata (object);
02244        } else if (strcmp (property_name, "Position") == 0) {
02245               return _dbus_mpris_player_get_Position (object);
02246        } else if (strcmp (property_name, "PlaybackStatus") == 0) {
02247               return _dbus_mpris_player_get_PlaybackStatus (object);
02248        }
02249        return NULL;
02250 }
02251 
02252 
02253 static void _dbus_mpris_player_set_Metadata (MprisPlayer* self, GVariant* _value) {
02254        GHashTable* value = NULL;
02255        GHashTable* _tmp24_;
02256        GVariantIter _tmp25_;
02257        GVariant* _tmp26_;
02258        GVariant* _tmp27_;
02259        _tmp24_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
02260        g_variant_iter_init (&_tmp25_, _value);
02261        while (g_variant_iter_loop (&_tmp25_, "{?*}", &_tmp26_, &_tmp27_)) {
02262               g_hash_table_insert (_tmp24_, g_variant_dup_string (_tmp26_, NULL), g_variant_get_variant (_tmp27_));
02263        }
02264        value = _tmp24_;
02265        mpris_player_set_Metadata (self, value);
02266        _g_hash_table_unref0 (value);
02267 }
02268 
02269 
02270 static void _dbus_mpris_player_set_Position (MprisPlayer* self, GVariant* _value) {
02271        gint32 value = 0;
02272        value = g_variant_get_int32 (_value);
02273        mpris_player_set_Position (self, value);
02274 }
02275 
02276 
02277 static void _dbus_mpris_player_set_PlaybackStatus (MprisPlayer* self, GVariant* _value) {
02278        gchar* value = NULL;
02279        value = g_variant_dup_string (_value, NULL);
02280        mpris_player_set_PlaybackStatus (self, value);
02281        _g_free0 (value);
02282 }
02283 
02284 
02285 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) {
02286        gpointer* data;
02287        gpointer object;
02288        data = user_data;
02289        object = data[0];
02290        if (strcmp (property_name, "Metadata") == 0) {
02291               _dbus_mpris_player_set_Metadata (object, value);
02292               return TRUE;
02293        } else if (strcmp (property_name, "Position") == 0) {
02294               _dbus_mpris_player_set_Position (object, value);
02295               return TRUE;
02296        } else if (strcmp (property_name, "PlaybackStatus") == 0) {
02297               _dbus_mpris_player_set_PlaybackStatus (object, value);
02298               return TRUE;
02299        }
02300        return FALSE;
02301 }
02302 
02303 
02304 static void _dbus_mpris_player_seeked (GObject* _sender, gint64 new_position, gpointer* _data) {
02305        GDBusConnection * _connection;
02306        const gchar * _path;
02307        GVariant *_arguments;
02308        GVariantBuilder _arguments_builder;
02309        _connection = _data[1];
02310        _path = _data[2];
02311        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
02312        g_variant_builder_add_value (&_arguments_builder, g_variant_new_int64 (new_position));
02313        _arguments = g_variant_builder_end (&_arguments_builder);
02314        g_dbus_connection_emit_signal (_connection, NULL, _path, "org.mpris.MediaPlayer2.Player", "Seeked", _arguments, NULL);
02315 }
02316 
02317 
02318 guint mpris_player_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) {
02319        guint result;
02320        gpointer *data;
02321        data = g_new (gpointer, 3);
02322        data[0] = g_object_ref (object);
02323        data[1] = g_object_ref (connection);
02324        data[2] = g_strdup (path);
02325        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);
02326        if (!result) {
02327               return 0;
02328        }
02329        g_signal_connect (object, "seeked", (GCallback) _dbus_mpris_player_seeked, data);
02330        return result;
02331 }
02332 
02333 
02334 static void _mpris_player_unregister_object (gpointer user_data) {
02335        gpointer* data;
02336        data = user_data;
02337        g_signal_handlers_disconnect_by_func (data[0], _dbus_mpris_player_seeked, data);
02338        g_object_unref (data[0]);
02339        g_object_unref (data[1]);
02340        g_free (data[2]);
02341        g_free (data);
02342 }
02343 
02344 
02345 void playlist_details_copy (const PlaylistDetails* self, PlaylistDetails* dest) {
02346        const char* _tmp0_;
02347        char* _tmp1_;
02348        const gchar* _tmp2_;
02349        gchar* _tmp3_;
02350        const gchar* _tmp4_;
02351        gchar* _tmp5_;
02352        _tmp0_ = (*self).path;
02353        _tmp1_ = g_strdup (_tmp0_);
02354        _g_free0 ((*dest).path);
02355        (*dest).path = _tmp1_;
02356        _tmp2_ = (*self).name;
02357        _tmp3_ = g_strdup (_tmp2_);
02358        _g_free0 ((*dest).name);
02359        (*dest).name = _tmp3_;
02360        _tmp4_ = (*self).icon_name;
02361        _tmp5_ = g_strdup (_tmp4_);
02362        _g_free0 ((*dest).icon_name);
02363        (*dest).icon_name = _tmp5_;
02364 }
02365 
02366 
02367 void playlist_details_destroy (PlaylistDetails* self) {
02368        _g_free0 ((*self).path);
02369        _g_free0 ((*self).name);
02370        _g_free0 ((*self).icon_name);
02371 }
02372 
02373 
02374 PlaylistDetails* playlist_details_dup (const PlaylistDetails* self) {
02375        PlaylistDetails* dup;
02376        dup = g_new0 (PlaylistDetails, 1);
02377        playlist_details_copy (self, dup);
02378        return dup;
02379 }
02380 
02381 
02382 void playlist_details_free (PlaylistDetails* self) {
02383        playlist_details_destroy (self);
02384        g_free (self);
02385 }
02386 
02387 
02388 GType playlist_details_get_type (void) {
02389        static volatile gsize playlist_details_type_id__volatile = 0;
02390        if (g_once_init_enter (&playlist_details_type_id__volatile)) {
02391               GType playlist_details_type_id;
02392               playlist_details_type_id = g_boxed_type_register_static ("PlaylistDetails", (GBoxedCopyFunc) playlist_details_dup, (GBoxedFreeFunc) playlist_details_free);
02393               g_once_init_leave (&playlist_details_type_id__volatile, playlist_details_type_id);
02394        }
02395        return playlist_details_type_id__volatile;
02396 }
02397 
02398 
02399 void active_playlist_container_copy (const ActivePlaylistContainer* self, ActivePlaylistContainer* dest) {
02400        gboolean _tmp0_;
02401        PlaylistDetails _tmp1_;
02402        PlaylistDetails _tmp2_ = {0};
02403        _tmp0_ = (*self).valid;
02404        (*dest).valid = _tmp0_;
02405        _tmp1_ = (*self).details;
02406        playlist_details_copy (&_tmp1_, &_tmp2_);
02407        playlist_details_destroy (&(*dest).details);
02408        (*dest).details = _tmp2_;
02409 }
02410 
02411 
02412 void active_playlist_container_destroy (ActivePlaylistContainer* self) {
02413        playlist_details_destroy (&(*self).details);
02414 }
02415 
02416 
02417 ActivePlaylistContainer* active_playlist_container_dup (const ActivePlaylistContainer* self) {
02418        ActivePlaylistContainer* dup;
02419        dup = g_new0 (ActivePlaylistContainer, 1);
02420        active_playlist_container_copy (self, dup);
02421        return dup;
02422 }
02423 
02424 
02425 void active_playlist_container_free (ActivePlaylistContainer* self) {
02426        active_playlist_container_destroy (self);
02427        g_free (self);
02428 }
02429 
02430 
02431 GType active_playlist_container_get_type (void) {
02432        static volatile gsize active_playlist_container_type_id__volatile = 0;
02433        if (g_once_init_enter (&active_playlist_container_type_id__volatile)) {
02434               GType active_playlist_container_type_id;
02435               active_playlist_container_type_id = g_boxed_type_register_static ("ActivePlaylistContainer", (GBoxedCopyFunc) active_playlist_container_dup, (GBoxedFreeFunc) active_playlist_container_free);
02436               g_once_init_leave (&active_playlist_container_type_id__volatile, active_playlist_container_type_id);
02437        }
02438        return active_playlist_container_type_id__volatile;
02439 }
02440 
02441 
02442 void mpris_playlists_ActivatePlaylist (MprisPlaylists* self, const char* playlist_id, GAsyncReadyCallback _callback_, gpointer _user_data_) {
02443        MPRIS_PLAYLISTS_GET_INTERFACE (self)->ActivatePlaylist (self, playlist_id, _callback_, _user_data_);
02444 }
02445 
02446 
02447 void mpris_playlists_ActivatePlaylist_finish (MprisPlaylists* self, GAsyncResult* _res_, GError** error) {
02448        MPRIS_PLAYLISTS_GET_INTERFACE (self)->ActivatePlaylist_finish (self, _res_, error);
02449 }
02450 
02451 
02452 void mpris_playlists_GetPlaylists (MprisPlaylists* self, guint32 index, guint32 max_count, const gchar* order, gboolean reverse_order, GAsyncReadyCallback _callback_, gpointer _user_data_) {
02453        MPRIS_PLAYLISTS_GET_INTERFACE (self)->GetPlaylists (self, index, max_count, order, reverse_order, _callback_, _user_data_);
02454 }
02455 
02456 
02457 PlaylistDetails* mpris_playlists_GetPlaylists_finish (MprisPlaylists* self, GAsyncResult* _res_, int* result_length1, GError** error) {
02458        return MPRIS_PLAYLISTS_GET_INTERFACE (self)->GetPlaylists_finish (self, _res_, result_length1, error);
02459 }
02460 
02461 
02462 gchar** mpris_playlists_get_Orderings (MprisPlaylists* self, int* result_length1) {
02463        g_return_val_if_fail (self != NULL, NULL);
02464        return MPRIS_PLAYLISTS_GET_INTERFACE (self)->get_Orderings (self, result_length1);
02465 }
02466 
02467 
02468 void mpris_playlists_set_Orderings (MprisPlaylists* self, gchar** value, int value_length1) {
02469        g_return_if_fail (self != NULL);
02470        MPRIS_PLAYLISTS_GET_INTERFACE (self)->set_Orderings (self, value, value_length1);
02471 }
02472 
02473 
02474 guint32 mpris_playlists_get_PlaylistCount (MprisPlaylists* self) {
02475        g_return_val_if_fail (self != NULL, 0U);
02476        return MPRIS_PLAYLISTS_GET_INTERFACE (self)->get_PlaylistCount (self);
02477 }
02478 
02479 
02480 void mpris_playlists_set_PlaylistCount (MprisPlaylists* self, guint32 value) {
02481        g_return_if_fail (self != NULL);
02482        MPRIS_PLAYLISTS_GET_INTERFACE (self)->set_PlaylistCount (self, value);
02483 }
02484 
02485 
02486 void mpris_playlists_get_ActivePlaylist (MprisPlaylists* self, ActivePlaylistContainer* result) {
02487        g_return_if_fail (self != NULL);
02488        MPRIS_PLAYLISTS_GET_INTERFACE (self)->get_ActivePlaylist (self, result);
02489 }
02490 
02491 
02492 void mpris_playlists_set_ActivePlaylist (MprisPlaylists* self, ActivePlaylistContainer* value) {
02493        g_return_if_fail (self != NULL);
02494        MPRIS_PLAYLISTS_GET_INTERFACE (self)->set_ActivePlaylist (self, value);
02495 }
02496 
02497 
02498 static void g_cclosure_user_marshal_VOID__BOXED (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
02499        typedef void (*GMarshalFunc_VOID__BOXED) (gpointer data1, gpointer arg_1, gpointer data2);
02500        register GMarshalFunc_VOID__BOXED callback;
02501        register GCClosure * cc;
02502        register gpointer data1;
02503        register gpointer data2;
02504        cc = (GCClosure *) closure;
02505        g_return_if_fail (n_param_values == 2);
02506        if (G_CCLOSURE_SWAP_DATA (closure)) {
02507               data1 = closure->data;
02508               data2 = param_values->data[0].v_pointer;
02509        } else {
02510               data1 = param_values->data[0].v_pointer;
02511               data2 = closure->data;
02512        }
02513        callback = (GMarshalFunc_VOID__BOXED) (marshal_data ? marshal_data : cc->callback);
02514        callback (data1, g_value_get_boxed (param_values + 1), data2);
02515 }
02516 
02517 
02518 static void mpris_playlists_base_init (MprisPlaylistsIface * iface) {
02519        static gboolean initialized = FALSE;
02520        if (!initialized) {
02521               initialized = TRUE;
02522               g_signal_new ("playlist_changed", TYPE_MPRIS_PLAYLISTS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__BOXED, G_TYPE_NONE, 1, TYPE_PLAYLIST_DETAILS);
02523        }
02524 }
02525 
02526 
02527 GType mpris_playlists_get_type (void) {
02528        static volatile gsize mpris_playlists_type_id__volatile = 0;
02529        if (g_once_init_enter (&mpris_playlists_type_id__volatile)) {
02530               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 };
02531               GType mpris_playlists_type_id;
02532               mpris_playlists_type_id = g_type_register_static (G_TYPE_INTERFACE, "MprisPlaylists", &g_define_type_info, 0);
02533               g_type_interface_add_prerequisite (mpris_playlists_type_id, G_TYPE_OBJECT);
02534               g_type_set_qdata (mpris_playlists_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) mpris_playlists_proxy_get_type);
02535               g_type_set_qdata (mpris_playlists_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.mpris.MediaPlayer2.Playlists");
02536               g_type_set_qdata (mpris_playlists_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) mpris_playlists_register_object);
02537               g_once_init_leave (&mpris_playlists_type_id__volatile, mpris_playlists_type_id);
02538        }
02539        return mpris_playlists_type_id__volatile;
02540 }
02541 
02542 
02543 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) )
02544 static void mpris_playlists_proxy_class_init (MprisPlaylistsProxyClass* klass) {
02545        G_DBUS_PROXY_CLASS (klass)->g_signal = mpris_playlists_proxy_g_signal;
02546 }
02547 
02548 
02549 static void _dbus_handle_mpris_playlists_playlist_changed (MprisPlaylists* self, GVariant* parameters) {
02550        GVariantIter _arguments_iter;
02551        PlaylistDetails details = {0};
02552        GVariant* _tmp28_;
02553        PlaylistDetails _tmp29_;
02554        GVariantIter _tmp30_;
02555        GVariant* _tmp31_;
02556        GVariant* _tmp32_;
02557        GVariant* _tmp33_;
02558        g_variant_iter_init (&_arguments_iter, parameters);
02559        _tmp28_ = g_variant_iter_next_value (&_arguments_iter);
02560        g_variant_iter_init (&_tmp30_, _tmp28_);
02561        _tmp31_ = g_variant_iter_next_value (&_tmp30_);
02562        _tmp29_.path = g_variant_dup_string (_tmp31_, NULL);
02563        g_variant_unref (_tmp31_);
02564        _tmp32_ = g_variant_iter_next_value (&_tmp30_);
02565        _tmp29_.name = g_variant_dup_string (_tmp32_, NULL);
02566        g_variant_unref (_tmp32_);
02567        _tmp33_ = g_variant_iter_next_value (&_tmp30_);
02568        _tmp29_.icon_name = g_variant_dup_string (_tmp33_, NULL);
02569        g_variant_unref (_tmp33_);
02570        details = _tmp29_;
02571        g_variant_unref (_tmp28_);
02572        g_signal_emit_by_name (self, "playlist-changed", &details);
02573        playlist_details_destroy (&details);
02574 }
02575 
02576 
02577 static void mpris_playlists_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) {
02578        if (strcmp (signal_name, "PlaylistChanged") == 0) {
02579               _dbus_handle_mpris_playlists_playlist_changed ((MprisPlaylists*) proxy, parameters);
02580        }
02581 }
02582 
02583 
02584 static void mpris_playlists_proxy_init (MprisPlaylistsProxy* self) {
02585 }
02586 
02587 
02588 static void mpris_playlists_proxy_ActivatePlaylist_async (MprisPlaylists* self, const char* playlist_id, GAsyncReadyCallback _callback_, gpointer _user_data_) {
02589        GDBusMessage *_message;
02590        GVariant *_arguments;
02591        GVariantBuilder _arguments_builder;
02592        G_IO_ERROR;
02593        _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");
02594        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
02595        g_variant_builder_add_value (&_arguments_builder, g_variant_new_object_path (playlist_id));
02596        _arguments = g_variant_builder_end (&_arguments_builder);
02597        g_dbus_message_set_body (_message, _arguments);
02598        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));
02599        g_object_unref (_message);
02600 }
02601 
02602 
02603 static void mpris_playlists_proxy_ActivatePlaylist_finish (MprisPlaylists* self, GAsyncResult* _res_, GError** error) {
02604        GDBusMessage *_reply_message;
02605        _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);
02606        if (!_reply_message) {
02607               return;
02608        }
02609        if (g_dbus_message_to_gerror (_reply_message, error)) {
02610               g_object_unref (_reply_message);
02611               return;
02612        }
02613        g_object_unref (_reply_message);
02614 }
02615 
02616 
02617 static void mpris_playlists_proxy_GetPlaylists_async (MprisPlaylists* self, guint32 index, guint32 max_count, const gchar* order, gboolean reverse_order, GAsyncReadyCallback _callback_, gpointer _user_data_) {
02618        GDBusMessage *_message;
02619        GVariant *_arguments;
02620        GVariantBuilder _arguments_builder;
02621        G_IO_ERROR;
02622        _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");
02623        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
02624        g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (index));
02625        g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (max_count));
02626        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (order));
02627        g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (reverse_order));
02628        _arguments = g_variant_builder_end (&_arguments_builder);
02629        g_dbus_message_set_body (_message, _arguments);
02630        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));
02631        g_object_unref (_message);
02632 }
02633 
02634 
02635 static PlaylistDetails* mpris_playlists_proxy_GetPlaylists_finish (MprisPlaylists* self, GAsyncResult* _res_, int* result_length1, GError** error) {
02636        GDBusMessage *_reply_message;
02637        GVariant *_reply;
02638        GVariantIter _reply_iter;
02639        PlaylistDetails* _result;
02640        int _result_length1;
02641        GVariant* _tmp34_;
02642        PlaylistDetails* _tmp35_;
02643        int _tmp35__length;
02644        int _tmp35__size;
02645        int _tmp35__length1;
02646        GVariantIter _tmp36_;
02647        GVariant* _tmp37_;
02648        _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);
02649        if (!_reply_message) {
02650               return NULL;
02651        }
02652        if (g_dbus_message_to_gerror (_reply_message, error)) {
02653               g_object_unref (_reply_message);
02654               return NULL;
02655        }
02656        _reply = g_dbus_message_get_body (_reply_message);
02657        g_variant_iter_init (&_reply_iter, _reply);
02658        _result_length1 = 0;
02659        _tmp34_ = g_variant_iter_next_value (&_reply_iter);
02660        _tmp35_ = g_new (PlaylistDetails, 5);
02661        _tmp35__length = 0;
02662        _tmp35__size = 4;
02663        _tmp35__length1 = 0;
02664        g_variant_iter_init (&_tmp36_, _tmp34_);
02665        for (; (_tmp37_ = g_variant_iter_next_value (&_tmp36_)) != NULL; _tmp35__length1++) {
02666               PlaylistDetails _tmp38_;
02667               GVariantIter _tmp39_;
02668               GVariant* _tmp40_;
02669               GVariant* _tmp41_;
02670               GVariant* _tmp42_;
02671               if (_tmp35__size == _tmp35__length) {
02672                      _tmp35__size = 2 * _tmp35__size;
02673                      _tmp35_ = g_renew (PlaylistDetails, _tmp35_, _tmp35__size + 1);
02674               }
02675               g_variant_iter_init (&_tmp39_, _tmp37_);
02676               _tmp40_ = g_variant_iter_next_value (&_tmp39_);
02677               _tmp38_.path = g_variant_dup_string (_tmp40_, NULL);
02678               g_variant_unref (_tmp40_);
02679               _tmp41_ = g_variant_iter_next_value (&_tmp39_);
02680               _tmp38_.name = g_variant_dup_string (_tmp41_, NULL);
02681               g_variant_unref (_tmp41_);
02682               _tmp42_ = g_variant_iter_next_value (&_tmp39_);
02683               _tmp38_.icon_name = g_variant_dup_string (_tmp42_, NULL);
02684               g_variant_unref (_tmp42_);
02685               _tmp35_[_tmp35__length++] = _tmp38_;
02686               g_variant_unref (_tmp37_);
02687        }
02688        _result_length1 = _tmp35__length1;
02689        _result = _tmp35_;
02690        g_variant_unref (_tmp34_);
02691        *result_length1 = _result_length1;
02692        g_object_unref (_reply_message);
02693        return _result;
02694 }
02695 
02696 
02697 static gchar** mpris_playlists_dbus_proxy_get_Orderings (MprisPlaylists* self, int* result_length1) {
02698        GVariant *_inner_reply;
02699        gchar** _result;
02700        int _result_length1;
02701        gchar** _tmp43_;
02702        int _tmp43__length;
02703        int _tmp43__size;
02704        int _tmp43__length1;
02705        GVariantIter _tmp44_;
02706        GVariant* _tmp45_;
02707        _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Orderings");
02708        if (!_inner_reply) {
02709               GVariant *_arguments;
02710               GVariant *_reply;
02711               GVariantBuilder _arguments_builder;
02712               g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
02713               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2.Playlists"));
02714               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Orderings"));
02715               _arguments = g_variant_builder_end (&_arguments_builder);
02716               _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
02717               if (!_reply) {
02718                      return NULL;
02719               }
02720               g_variant_get (_reply, "(v)", &_inner_reply);
02721               g_variant_unref (_reply);
02722        }
02723        _result_length1 = 0;
02724        _tmp43_ = g_new (gchar*, 5);
02725        _tmp43__length = 0;
02726        _tmp43__size = 4;
02727        _tmp43__length1 = 0;
02728        g_variant_iter_init (&_tmp44_, _inner_reply);
02729        for (; (_tmp45_ = g_variant_iter_next_value (&_tmp44_)) != NULL; _tmp43__length1++) {
02730               if (_tmp43__size == _tmp43__length) {
02731                      _tmp43__size = 2 * _tmp43__size;
02732                      _tmp43_ = g_renew (gchar*, _tmp43_, _tmp43__size + 1);
02733               }
02734               _tmp43_[_tmp43__length++] = g_variant_dup_string (_tmp45_, NULL);
02735               g_variant_unref (_tmp45_);
02736        }
02737        _result_length1 = _tmp43__length1;
02738        _tmp43_[_tmp43__length] = NULL;
02739        _result = _tmp43_;
02740        *result_length1 = _result_length1;
02741        g_variant_unref (_inner_reply);
02742        return _result;
02743 }
02744 
02745 
02746 static void mpris_playlists_dbus_proxy_set_Orderings (MprisPlaylists* self, gchar** value, int value_length1) {
02747        GVariant *_arguments;
02748        GVariant *_reply;
02749        GVariantBuilder _arguments_builder;
02750        gchar** _tmp46_;
02751        GVariantBuilder _tmp47_;
02752        int _tmp48_;
02753        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
02754        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2.Playlists"));
02755        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Orderings"));
02756        g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
02757        _tmp46_ = value;
02758        g_variant_builder_init (&_tmp47_, G_VARIANT_TYPE ("as"));
02759        for (_tmp48_ = 0; _tmp48_ < value_length1; _tmp48_++) {
02760               g_variant_builder_add_value (&_tmp47_, g_variant_new_string (*_tmp46_));
02761               _tmp46_++;
02762        }
02763        g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp47_));
02764        g_variant_builder_close (&_arguments_builder);
02765        _arguments = g_variant_builder_end (&_arguments_builder);
02766        _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
02767        if (!_reply) {
02768               return;
02769        }
02770        g_variant_unref (_reply);
02771 }
02772 
02773 
02774 static guint32 mpris_playlists_dbus_proxy_get_PlaylistCount (MprisPlaylists* self) {
02775        GVariant *_inner_reply;
02776        guint32 _result;
02777        _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "PlaylistCount");
02778        if (!_inner_reply) {
02779               GVariant *_arguments;
02780               GVariant *_reply;
02781               GVariantBuilder _arguments_builder;
02782               g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
02783               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2.Playlists"));
02784               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("PlaylistCount"));
02785               _arguments = g_variant_builder_end (&_arguments_builder);
02786               _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
02787               if (!_reply) {
02788                      return 0U;
02789               }
02790               g_variant_get (_reply, "(v)", &_inner_reply);
02791               g_variant_unref (_reply);
02792        }
02793        _result = g_variant_get_uint32 (_inner_reply);
02794        g_variant_unref (_inner_reply);
02795        return _result;
02796 }
02797 
02798 
02799 static void mpris_playlists_dbus_proxy_set_PlaylistCount (MprisPlaylists* self, guint32 value) {
02800        GVariant *_arguments;
02801        GVariant *_reply;
02802        GVariantBuilder _arguments_builder;
02803        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
02804        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2.Playlists"));
02805        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("PlaylistCount"));
02806        g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
02807        g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (value));
02808        g_variant_builder_close (&_arguments_builder);
02809        _arguments = g_variant_builder_end (&_arguments_builder);
02810        _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
02811        if (!_reply) {
02812               return;
02813        }
02814        g_variant_unref (_reply);
02815 }
02816 
02817 
02818 static void mpris_playlists_dbus_proxy_get_ActivePlaylist (MprisPlaylists* self, ActivePlaylistContainer* result) {
02819        GVariant *_inner_reply;
02820        ActivePlaylistContainer _tmp49_;
02821        GVariantIter _tmp50_;
02822        GVariant* _tmp51_;
02823        GVariant* _tmp52_;
02824        PlaylistDetails _tmp53_;
02825        GVariantIter _tmp54_;
02826        GVariant* _tmp55_;
02827        GVariant* _tmp56_;
02828        GVariant* _tmp57_;
02829        _inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "ActivePlaylist");
02830        if (!_inner_reply) {
02831               GVariant *_arguments;
02832               GVariant *_reply;
02833               GVariantBuilder _arguments_builder;
02834               g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
02835               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2.Playlists"));
02836               g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("ActivePlaylist"));
02837               _arguments = g_variant_builder_end (&_arguments_builder);
02838               _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
02839               if (!_reply) {
02840                      return;
02841               }
02842               g_variant_get (_reply, "(v)", &_inner_reply);
02843               g_variant_unref (_reply);
02844        }
02845        g_variant_iter_init (&_tmp50_, _inner_reply);
02846        _tmp51_ = g_variant_iter_next_value (&_tmp50_);
02847        _tmp49_.valid = g_variant_get_boolean (_tmp51_);
02848        g_variant_unref (_tmp51_);
02849        _tmp52_ = g_variant_iter_next_value (&_tmp50_);
02850        g_variant_iter_init (&_tmp54_, _tmp52_);
02851        _tmp55_ = g_variant_iter_next_value (&_tmp54_);
02852        _tmp53_.path = g_variant_dup_string (_tmp55_, NULL);
02853        g_variant_unref (_tmp55_);
02854        _tmp56_ = g_variant_iter_next_value (&_tmp54_);
02855        _tmp53_.name = g_variant_dup_string (_tmp56_, NULL);
02856        g_variant_unref (_tmp56_);
02857        _tmp57_ = g_variant_iter_next_value (&_tmp54_);
02858        _tmp53_.icon_name = g_variant_dup_string (_tmp57_, NULL);
02859        g_variant_unref (_tmp57_);
02860        _tmp49_.details = _tmp53_;
02861        g_variant_unref (_tmp52_);
02862        *result = _tmp49_;
02863        g_variant_unref (_inner_reply);
02864        return;
02865 }
02866 
02867 
02868 static void mpris_playlists_dbus_proxy_set_ActivePlaylist (MprisPlaylists* self, ActivePlaylistContainer* value) {
02869        GVariant *_arguments;
02870        GVariant *_reply;
02871        GVariantBuilder _arguments_builder;
02872        GVariantBuilder _tmp58_;
02873        GVariantBuilder _tmp59_;
02874        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
02875        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.mpris.MediaPlayer2.Playlists"));
02876        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("ActivePlaylist"));
02877        g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
02878        g_variant_builder_init (&_tmp58_, G_VARIANT_TYPE_TUPLE);
02879        g_variant_builder_add_value (&_tmp58_, g_variant_new_boolean ((*value).valid));
02880        g_variant_builder_init (&_tmp59_, G_VARIANT_TYPE_TUPLE);
02881        g_variant_builder_add_value (&_tmp59_, g_variant_new_object_path ((*value).details.path));
02882        g_variant_builder_add_value (&_tmp59_, g_variant_new_string ((*value).details.name));
02883        g_variant_builder_add_value (&_tmp59_, g_variant_new_string ((*value).details.icon_name));
02884        g_variant_builder_add_value (&_tmp58_, g_variant_builder_end (&_tmp59_));
02885        g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp58_));
02886        g_variant_builder_close (&_arguments_builder);
02887        _arguments = g_variant_builder_end (&_arguments_builder);
02888        _reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
02889        if (!_reply) {
02890               return;
02891        }
02892        g_variant_unref (_reply);
02893 }
02894 
02895 
02896 static void mpris_playlists_proxy_mpris_playlists_interface_init (MprisPlaylistsIface* iface) {
02897        iface->ActivatePlaylist = mpris_playlists_proxy_ActivatePlaylist_async;
02898        iface->ActivatePlaylist_finish = mpris_playlists_proxy_ActivatePlaylist_finish;
02899        iface->GetPlaylists = mpris_playlists_proxy_GetPlaylists_async;
02900        iface->GetPlaylists_finish = mpris_playlists_proxy_GetPlaylists_finish;
02901        iface->get_Orderings = mpris_playlists_dbus_proxy_get_Orderings;
02902        iface->set_Orderings = mpris_playlists_dbus_proxy_set_Orderings;
02903        iface->get_PlaylistCount = mpris_playlists_dbus_proxy_get_PlaylistCount;
02904        iface->set_PlaylistCount = mpris_playlists_dbus_proxy_set_PlaylistCount;
02905        iface->get_ActivePlaylist = mpris_playlists_dbus_proxy_get_ActivePlaylist;
02906        iface->set_ActivePlaylist = mpris_playlists_dbus_proxy_set_ActivePlaylist;
02907 }
02908 
02909 
02910 static void _dbus_mpris_playlists_ActivatePlaylist (MprisPlaylists* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
02911        GVariantIter _arguments_iter;
02912        char* playlist_id = NULL;
02913        GVariant* _tmp60_;
02914        g_variant_iter_init (&_arguments_iter, parameters);
02915        _tmp60_ = g_variant_iter_next_value (&_arguments_iter);
02916        playlist_id = g_variant_dup_string (_tmp60_, NULL);
02917        g_variant_unref (_tmp60_);
02918        mpris_playlists_ActivatePlaylist (self, playlist_id, (GAsyncReadyCallback) _dbus_mpris_playlists_ActivatePlaylist_ready, invocation);
02919        _g_free0 (playlist_id);
02920 }
02921 
02922 
02923 static void _dbus_mpris_playlists_ActivatePlaylist_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
02924        GDBusMethodInvocation * invocation;
02925        GError* error = NULL;
02926        GDBusMessage* _reply_message;
02927        GVariant* _reply;
02928        GVariantBuilder _reply_builder;
02929        invocation = _user_data_;
02930        mpris_playlists_ActivatePlaylist_finish ((MprisPlaylists*) source_object, _res_, &error);
02931        if (error) {
02932               g_dbus_method_invocation_return_gerror (invocation, error);
02933               return;
02934        }
02935        _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
02936        g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
02937        _reply = g_variant_builder_end (&_reply_builder);
02938        g_dbus_message_set_body (_reply_message, _reply);
02939        g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
02940        g_object_unref (invocation);
02941        g_object_unref (_reply_message);
02942 }
02943 
02944 
02945 static void _dbus_mpris_playlists_GetPlaylists (MprisPlaylists* self, GVariant* parameters, GDBusMethodInvocation* invocation) {
02946        GVariantIter _arguments_iter;
02947        guint32 index = 0U;
02948        GVariant* _tmp61_;
02949        guint32 max_count = 0U;
02950        GVariant* _tmp62_;
02951        gchar* order = NULL;
02952        GVariant* _tmp63_;
02953        gboolean reverse_order = FALSE;
02954        GVariant* _tmp64_;
02955        g_variant_iter_init (&_arguments_iter, parameters);
02956        _tmp61_ = g_variant_iter_next_value (&_arguments_iter);
02957        index = g_variant_get_uint32 (_tmp61_);
02958        g_variant_unref (_tmp61_);
02959        _tmp62_ = g_variant_iter_next_value (&_arguments_iter);
02960        max_count = g_variant_get_uint32 (_tmp62_);
02961        g_variant_unref (_tmp62_);
02962        _tmp63_ = g_variant_iter_next_value (&_arguments_iter);
02963        order = g_variant_dup_string (_tmp63_, NULL);
02964        g_variant_unref (_tmp63_);
02965        _tmp64_ = g_variant_iter_next_value (&_arguments_iter);
02966        reverse_order = g_variant_get_boolean (_tmp64_);
02967        g_variant_unref (_tmp64_);
02968        mpris_playlists_GetPlaylists (self, index, max_count, order, reverse_order, (GAsyncReadyCallback) _dbus_mpris_playlists_GetPlaylists_ready, invocation);
02969        _g_free0 (order);
02970 }
02971 
02972 
02973 static void _vala_PlaylistDetails_array_free (PlaylistDetails* array, gint array_length) {
02974        if (array != NULL) {
02975               int i;
02976               for (i = 0; i < array_length; i = i + 1) {
02977                      playlist_details_destroy (&array[i]);
02978               }
02979        }
02980        g_free (array);
02981 }
02982 
02983 
02984 static void _dbus_mpris_playlists_GetPlaylists_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
02985        GDBusMethodInvocation * invocation;
02986        GError* error = NULL;
02987        GDBusMessage* _reply_message;
02988        GVariant* _reply;
02989        GVariantBuilder _reply_builder;
02990        PlaylistDetails* result;
02991        int result_length1 = 0;
02992        PlaylistDetails* _tmp65_;
02993        GVariantBuilder _tmp66_;
02994        int _tmp67_;
02995        invocation = _user_data_;
02996        result = mpris_playlists_GetPlaylists_finish ((MprisPlaylists*) source_object, _res_, &result_length1, &error);
02997        if (error) {
02998               g_dbus_method_invocation_return_gerror (invocation, error);
02999               return;
03000        }
03001        _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
03002        g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
03003        _tmp65_ = result;
03004        g_variant_builder_init (&_tmp66_, G_VARIANT_TYPE ("a(oss)"));
03005        for (_tmp67_ = 0; _tmp67_ < result_length1; _tmp67_++) {
03006               GVariantBuilder _tmp68_;
03007               g_variant_builder_init (&_tmp68_, G_VARIANT_TYPE_TUPLE);
03008               g_variant_builder_add_value (&_tmp68_, g_variant_new_object_path ((*_tmp65_).path));
03009               g_variant_builder_add_value (&_tmp68_, g_variant_new_string ((*_tmp65_).name));
03010               g_variant_builder_add_value (&_tmp68_, g_variant_new_string ((*_tmp65_).icon_name));
03011               g_variant_builder_add_value (&_tmp66_, g_variant_builder_end (&_tmp68_));
03012               _tmp65_++;
03013        }
03014        g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp66_));
03015        result = (_vala_PlaylistDetails_array_free (result, result_length1), NULL);
03016        _reply = g_variant_builder_end (&_reply_builder);
03017        g_dbus_message_set_body (_reply_message, _reply);
03018        g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
03019        g_object_unref (invocation);
03020        g_object_unref (_reply_message);
03021 }
03022 
03023 
03024 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) {
03025        gpointer* data;
03026        gpointer object;
03027        data = user_data;
03028        object = data[0];
03029        if (strcmp (method_name, "ActivatePlaylist") == 0) {
03030               _dbus_mpris_playlists_ActivatePlaylist (object, parameters, invocation);
03031        } else if (strcmp (method_name, "GetPlaylists") == 0) {
03032               _dbus_mpris_playlists_GetPlaylists (object, parameters, invocation);
03033        } else {
03034               g_object_unref (invocation);
03035        }
03036 }
03037 
03038 
03039 static GVariant* _dbus_mpris_playlists_get_Orderings (MprisPlaylists* self) {
03040        gchar** result;
03041        int result_length1;
03042        gchar** _tmp69_;
03043        GVariantBuilder _tmp70_;
03044        int _tmp71_;
03045        GVariant* _reply;
03046        result = mpris_playlists_get_Orderings (self, &result_length1);
03047        _tmp69_ = result;
03048        g_variant_builder_init (&_tmp70_, G_VARIANT_TYPE ("as"));
03049        for (_tmp71_ = 0; _tmp71_ < result_length1; _tmp71_++) {
03050               g_variant_builder_add_value (&_tmp70_, g_variant_new_string (*_tmp69_));
03051               _tmp69_++;
03052        }
03053        _reply = g_variant_builder_end (&_tmp70_);
03054        result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL);
03055        return _reply;
03056 }
03057 
03058 
03059 static GVariant* _dbus_mpris_playlists_get_PlaylistCount (MprisPlaylists* self) {
03060        guint32 result;
03061        GVariant* _reply;
03062        result = mpris_playlists_get_PlaylistCount (self);
03063        _reply = g_variant_new_uint32 (result);
03064        return _reply;
03065 }
03066 
03067 
03068 static GVariant* _dbus_mpris_playlists_get_ActivePlaylist (MprisPlaylists* self) {
03069        ActivePlaylistContainer result = {0};
03070        GVariantBuilder _tmp72_;
03071        GVariantBuilder _tmp73_;
03072        GVariant* _reply;
03073        mpris_playlists_get_ActivePlaylist (self, &result);
03074        g_variant_builder_init (&_tmp72_, G_VARIANT_TYPE_TUPLE);
03075        g_variant_builder_add_value (&_tmp72_, g_variant_new_boolean (result.valid));
03076        g_variant_builder_init (&_tmp73_, G_VARIANT_TYPE_TUPLE);
03077        g_variant_builder_add_value (&_tmp73_, g_variant_new_object_path (result.details.path));
03078        g_variant_builder_add_value (&_tmp73_, g_variant_new_string (result.details.name));
03079        g_variant_builder_add_value (&_tmp73_, g_variant_new_string (result.details.icon_name));
03080        g_variant_builder_add_value (&_tmp72_, g_variant_builder_end (&_tmp73_));
03081        _reply = g_variant_builder_end (&_tmp72_);
03082        active_playlist_container_destroy (&result);
03083        return _reply;
03084 }
03085 
03086 
03087 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) {
03088        gpointer* data;
03089        gpointer object;
03090        data = user_data;
03091        object = data[0];
03092        if (strcmp (property_name, "Orderings") == 0) {
03093               return _dbus_mpris_playlists_get_Orderings (object);
03094        } else if (strcmp (property_name, "PlaylistCount") == 0) {
03095               return _dbus_mpris_playlists_get_PlaylistCount (object);
03096        } else if (strcmp (property_name, "ActivePlaylist") == 0) {
03097               return _dbus_mpris_playlists_get_ActivePlaylist (object);
03098        }
03099        return NULL;
03100 }
03101 
03102 
03103 static void _dbus_mpris_playlists_set_Orderings (MprisPlaylists* self, GVariant* _value) {
03104        gchar** value = NULL;
03105        int value_length1;
03106        gchar** _tmp74_;
03107        int _tmp74__length;
03108        int _tmp74__size;
03109        int _tmp74__length1;
03110        GVariantIter _tmp75_;
03111        GVariant* _tmp76_;
03112        _tmp74_ = g_new (gchar*, 5);
03113        _tmp74__length = 0;
03114        _tmp74__size = 4;
03115        _tmp74__length1 = 0;
03116        g_variant_iter_init (&_tmp75_, _value);
03117        for (; (_tmp76_ = g_variant_iter_next_value (&_tmp75_)) != NULL; _tmp74__length1++) {
03118               if (_tmp74__size == _tmp74__length) {
03119                      _tmp74__size = 2 * _tmp74__size;
03120                      _tmp74_ = g_renew (gchar*, _tmp74_, _tmp74__size + 1);
03121               }
03122               _tmp74_[_tmp74__length++] = g_variant_dup_string (_tmp76_, NULL);
03123               g_variant_unref (_tmp76_);
03124        }
03125        value_length1 = _tmp74__length1;
03126        _tmp74_[_tmp74__length] = NULL;
03127        value = _tmp74_;
03128        mpris_playlists_set_Orderings (self, value, value_length1);
03129        value = (_vala_array_free (value, value_length1, (GDestroyNotify) g_free), NULL);
03130 }
03131 
03132 
03133 static void _dbus_mpris_playlists_set_PlaylistCount (MprisPlaylists* self, GVariant* _value) {
03134        guint32 value = 0U;
03135        value = g_variant_get_uint32 (_value);
03136        mpris_playlists_set_PlaylistCount (self, value);
03137 }
03138 
03139 
03140 static void _dbus_mpris_playlists_set_ActivePlaylist (MprisPlaylists* self, GVariant* _value) {
03141        ActivePlaylistContainer value = {0};
03142        ActivePlaylistContainer _tmp77_;
03143        GVariantIter _tmp78_;
03144        GVariant* _tmp79_;
03145        GVariant* _tmp80_;
03146        PlaylistDetails _tmp81_;
03147        GVariantIter _tmp82_;
03148        GVariant* _tmp83_;
03149        GVariant* _tmp84_;
03150        GVariant* _tmp85_;
03151        g_variant_iter_init (&_tmp78_, _value);
03152        _tmp79_ = g_variant_iter_next_value (&_tmp78_);
03153        _tmp77_.valid = g_variant_get_boolean (_tmp79_);
03154        g_variant_unref (_tmp79_);
03155        _tmp80_ = g_variant_iter_next_value (&_tmp78_);
03156        g_variant_iter_init (&_tmp82_, _tmp80_);
03157        _tmp83_ = g_variant_iter_next_value (&_tmp82_);
03158        _tmp81_.path = g_variant_dup_string (_tmp83_, NULL);
03159        g_variant_unref (_tmp83_);
03160        _tmp84_ = g_variant_iter_next_value (&_tmp82_);
03161        _tmp81_.name = g_variant_dup_string (_tmp84_, NULL);
03162        g_variant_unref (_tmp84_);
03163        _tmp85_ = g_variant_iter_next_value (&_tmp82_);
03164        _tmp81_.icon_name = g_variant_dup_string (_tmp85_, NULL);
03165        g_variant_unref (_tmp85_);
03166        _tmp77_.details = _tmp81_;
03167        g_variant_unref (_tmp80_);
03168        value = _tmp77_;
03169        mpris_playlists_set_ActivePlaylist (self, &value);
03170        active_playlist_container_destroy (&value);
03171 }
03172 
03173 
03174 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) {
03175        gpointer* data;
03176        gpointer object;
03177        data = user_data;
03178        object = data[0];
03179        if (strcmp (property_name, "Orderings") == 0) {
03180               _dbus_mpris_playlists_set_Orderings (object, value);
03181               return TRUE;
03182        } else if (strcmp (property_name, "PlaylistCount") == 0) {
03183               _dbus_mpris_playlists_set_PlaylistCount (object, value);
03184               return TRUE;
03185        } else if (strcmp (property_name, "ActivePlaylist") == 0) {
03186               _dbus_mpris_playlists_set_ActivePlaylist (object, value);
03187               return TRUE;
03188        }
03189        return FALSE;
03190 }
03191 
03192 
03193 static void _dbus_mpris_playlists_playlist_changed (GObject* _sender, PlaylistDetails* details, gpointer* _data) {
03194        GDBusConnection * _connection;
03195        const gchar * _path;
03196        GVariant *_arguments;
03197        GVariantBuilder _arguments_builder;
03198        GVariantBuilder _tmp86_;
03199        _connection = _data[1];
03200        _path = _data[2];
03201        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
03202        g_variant_builder_init (&_tmp86_, G_VARIANT_TYPE_TUPLE);
03203        g_variant_builder_add_value (&_tmp86_, g_variant_new_object_path ((*details).path));
03204        g_variant_builder_add_value (&_tmp86_, g_variant_new_string ((*details).name));
03205        g_variant_builder_add_value (&_tmp86_, g_variant_new_string ((*details).icon_name));
03206        g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp86_));
03207        _arguments = g_variant_builder_end (&_arguments_builder);
03208        g_dbus_connection_emit_signal (_connection, NULL, _path, "org.mpris.MediaPlayer2.Playlists", "PlaylistChanged", _arguments, NULL);
03209 }
03210 
03211 
03212 guint mpris_playlists_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) {
03213        guint result;
03214        gpointer *data;
03215        data = g_new (gpointer, 3);
03216        data[0] = g_object_ref (object);
03217        data[1] = g_object_ref (connection);
03218        data[2] = g_strdup (path);
03219        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);
03220        if (!result) {
03221               return 0;
03222        }
03223        g_signal_connect (object, "playlist-changed", (GCallback) _dbus_mpris_playlists_playlist_changed, data);
03224        return result;
03225 }
03226 
03227 
03228 static void _mpris_playlists_unregister_object (gpointer user_data) {
03229        gpointer* data;
03230        data = user_data;
03231        g_signal_handlers_disconnect_by_func (data[0], _dbus_mpris_playlists_playlist_changed, data);
03232        g_object_unref (data[0]);
03233        g_object_unref (data[1]);
03234        g_free (data[2]);
03235        g_free (data);
03236 }
03237 
03238 
03239 static void g_cclosure_user_marshal_VOID__STRING_BOXED_BOXED_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
03240        typedef void (*GMarshalFunc_VOID__STRING_BOXED_BOXED_INT) (gpointer data1, const char* arg_1, gpointer arg_2, gpointer arg_3, gint arg_4, gpointer data2);
03241        register GMarshalFunc_VOID__STRING_BOXED_BOXED_INT callback;
03242        register GCClosure * cc;
03243        register gpointer data1;
03244        register gpointer data2;
03245        cc = (GCClosure *) closure;
03246        g_return_if_fail (n_param_values == 5);
03247        if (G_CCLOSURE_SWAP_DATA (closure)) {
03248               data1 = closure->data;
03249               data2 = param_values->data[0].v_pointer;
03250        } else {
03251               data1 = param_values->data[0].v_pointer;
03252               data2 = closure->data;
03253        }
03254        callback = (GMarshalFunc_VOID__STRING_BOXED_BOXED_INT) (marshal_data ? marshal_data : cc->callback);
03255        callback (data1, g_value_get_string (param_values + 1), g_value_get_boxed (param_values + 2), g_value_get_boxed (param_values + 3), g_value_get_int (param_values + 4), data2);
03256 }
03257 
03258 
03259 static void free_desktop_properties_base_init (FreeDesktopPropertiesIface * iface) {
03260        static gboolean initialized = FALSE;
03261        if (!initialized) {
03262               initialized = TRUE;
03263               g_signal_new ("properties_changed", TYPE_FREE_DESKTOP_PROPERTIES, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_BOXED_BOXED_INT, G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_HASH_TABLE, G_TYPE_STRV, G_TYPE_INT);
03264        }
03265 }
03266 
03267 
03268 GType free_desktop_properties_get_type (void) {
03269        static volatile gsize free_desktop_properties_type_id__volatile = 0;
03270        if (g_once_init_enter (&free_desktop_properties_type_id__volatile)) {
03271               static const GTypeInfo g_define_type_info = { sizeof (FreeDesktopPropertiesIface), (GBaseInitFunc) free_desktop_properties_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
03272               GType free_desktop_properties_type_id;
03273               free_desktop_properties_type_id = g_type_register_static (G_TYPE_INTERFACE, "FreeDesktopProperties", &g_define_type_info, 0);
03274               g_type_interface_add_prerequisite (free_desktop_properties_type_id, G_TYPE_OBJECT);
03275               g_type_set_qdata (free_desktop_properties_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) free_desktop_properties_proxy_get_type);
03276               g_type_set_qdata (free_desktop_properties_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.DBus.Properties");
03277               g_type_set_qdata (free_desktop_properties_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) free_desktop_properties_register_object);
03278               g_once_init_leave (&free_desktop_properties_type_id__volatile, free_desktop_properties_type_id);
03279        }
03280        return free_desktop_properties_type_id__volatile;
03281 }
03282 
03283 
03284 G_DEFINE_TYPE_EXTENDED (FreeDesktopPropertiesProxy, free_desktop_properties_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_FREE_DESKTOP_PROPERTIES, free_desktop_properties_proxy_free_desktop_properties_interface_init) )
03285 static void free_desktop_properties_proxy_class_init (FreeDesktopPropertiesProxyClass* klass) {
03286        G_DBUS_PROXY_CLASS (klass)->g_signal = free_desktop_properties_proxy_g_signal;
03287 }
03288 
03289 
03290 static void _dbus_handle_free_desktop_properties_properties_changed (FreeDesktopProperties* self, GVariant* parameters) {
03291        GVariantIter _arguments_iter;
03292        gchar* source = NULL;
03293        GVariant* _tmp87_;
03294        GHashTable* changed_properties = NULL;
03295        GVariant* _tmp88_;
03296        GHashTable* _tmp89_;
03297        GVariantIter _tmp90_;
03298        GVariant* _tmp91_;
03299        GVariant* _tmp92_;
03300        gchar** invalid = NULL;
03301        int invalid_length1;
03302        GVariant* _tmp93_;
03303        gchar** _tmp94_;
03304        int _tmp94__length;
03305        int _tmp94__size;
03306        int _tmp94__length1;
03307        GVariantIter _tmp95_;
03308        GVariant* _tmp96_;
03309        g_variant_iter_init (&_arguments_iter, parameters);
03310        _tmp87_ = g_variant_iter_next_value (&_arguments_iter);
03311        source = g_variant_dup_string (_tmp87_, NULL);
03312        g_variant_unref (_tmp87_);
03313        _tmp88_ = g_variant_iter_next_value (&_arguments_iter);
03314        _tmp89_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
03315        g_variant_iter_init (&_tmp90_, _tmp88_);
03316        while (g_variant_iter_loop (&_tmp90_, "{?*}", &_tmp91_, &_tmp92_)) {
03317               g_hash_table_insert (_tmp89_, g_variant_dup_string (_tmp91_, NULL), g_variant_get_variant (_tmp92_));
03318        }
03319        changed_properties = _tmp89_;
03320        g_variant_unref (_tmp88_);
03321        invalid_length1 = 0;
03322        _tmp93_ = g_variant_iter_next_value (&_arguments_iter);
03323        _tmp94_ = g_new (gchar*, 5);
03324        _tmp94__length = 0;
03325        _tmp94__size = 4;
03326        _tmp94__length1 = 0;
03327        g_variant_iter_init (&_tmp95_, _tmp93_);
03328        for (; (_tmp96_ = g_variant_iter_next_value (&_tmp95_)) != NULL; _tmp94__length1++) {
03329               if (_tmp94__size == _tmp94__length) {
03330                      _tmp94__size = 2 * _tmp94__size;
03331                      _tmp94_ = g_renew (gchar*, _tmp94_, _tmp94__size + 1);
03332               }
03333               _tmp94_[_tmp94__length++] = g_variant_dup_string (_tmp96_, NULL);
03334               g_variant_unref (_tmp96_);
03335        }
03336        invalid_length1 = _tmp94__length1;
03337        _tmp94_[_tmp94__length] = NULL;
03338        invalid = _tmp94_;
03339        g_variant_unref (_tmp93_);
03340        g_signal_emit_by_name (self, "properties-changed", source, changed_properties, invalid, invalid_length1);
03341        _g_free0 (source);
03342        _g_hash_table_unref0 (changed_properties);
03343        invalid = (_vala_array_free (invalid, invalid_length1, (GDestroyNotify) g_free), NULL);
03344 }
03345 
03346 
03347 static void free_desktop_properties_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) {
03348        if (strcmp (signal_name, "PropertiesChanged") == 0) {
03349               _dbus_handle_free_desktop_properties_properties_changed ((FreeDesktopProperties*) proxy, parameters);
03350        }
03351 }
03352 
03353 
03354 static void free_desktop_properties_proxy_init (FreeDesktopPropertiesProxy* self) {
03355 }
03356 
03357 
03358 static void free_desktop_properties_proxy_free_desktop_properties_interface_init (FreeDesktopPropertiesIface* iface) {
03359 }
03360 
03361 
03362 static void free_desktop_properties_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) {
03363        gpointer* data;
03364        gpointer object;
03365        data = user_data;
03366        object = data[0];
03367        g_object_unref (invocation);
03368 }
03369 
03370 
03371 static GVariant* free_desktop_properties_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) {
03372        gpointer* data;
03373        gpointer object;
03374        data = user_data;
03375        object = data[0];
03376        return NULL;
03377 }
03378 
03379 
03380 static gboolean free_desktop_properties_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) {
03381        gpointer* data;
03382        gpointer object;
03383        data = user_data;
03384        object = data[0];
03385        return FALSE;
03386 }
03387 
03388 
03389 static void _dbus_free_desktop_properties_properties_changed (GObject* _sender, const gchar* source, GHashTable* changed_properties, gchar** invalid, int invalid_length1, gpointer* _data) {
03390        GDBusConnection * _connection;
03391        const gchar * _path;
03392        GVariant *_arguments;
03393        GVariantBuilder _arguments_builder;
03394        GVariantBuilder _tmp97_;
03395        GHashTableIter _tmp98_;
03396        gpointer _tmp99_;
03397        gpointer _tmp100_;
03398        gchar** _tmp101_;
03399        GVariantBuilder _tmp102_;
03400        int _tmp103_;
03401        _connection = _data[1];
03402        _path = _data[2];
03403        g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
03404        g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (source));
03405        g_hash_table_iter_init (&_tmp98_, changed_properties);
03406        g_variant_builder_init (&_tmp97_, G_VARIANT_TYPE ("a{sv}"));
03407        while (g_hash_table_iter_next (&_tmp98_, &_tmp99_, &_tmp100_)) {
03408               gchar* _key;
03409               GVariant* _value;
03410               _key = (gchar*) _tmp99_;
03411               _value = (GVariant*) _tmp100_;
03412               g_variant_builder_add (&_tmp97_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
03413        }
03414        g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp97_));
03415        _tmp101_ = invalid;
03416        g_variant_builder_init (&_tmp102_, G_VARIANT_TYPE ("as"));
03417        for (_tmp103_ = 0; _tmp103_ < invalid_length1; _tmp103_++) {
03418               g_variant_builder_add_value (&_tmp102_, g_variant_new_string (*_tmp101_));
03419               _tmp101_++;
03420        }
03421        g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp102_));
03422        _arguments = g_variant_builder_end (&_arguments_builder);
03423        g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.DBus.Properties", "PropertiesChanged", _arguments, NULL);
03424 }
03425 
03426 
03427 guint free_desktop_properties_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) {
03428        guint result;
03429        gpointer *data;
03430        data = g_new (gpointer, 3);
03431        data[0] = g_object_ref (object);
03432        data[1] = g_object_ref (connection);
03433        data[2] = g_strdup (path);
03434        result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_free_desktop_properties_dbus_interface_info), &_free_desktop_properties_dbus_interface_vtable, data, _free_desktop_properties_unregister_object, error);
03435        if (!result) {
03436               return 0;
03437        }
03438        g_signal_connect (object, "properties-changed", (GCallback) _dbus_free_desktop_properties_properties_changed, data);
03439        return result;
03440 }
03441 
03442 
03443 static void _free_desktop_properties_unregister_object (gpointer user_data) {
03444        gpointer* data;
03445        data = user_data;
03446        g_signal_handlers_disconnect_by_func (data[0], _dbus_free_desktop_properties_properties_changed, data);
03447        g_object_unref (data[0]);
03448        g_object_unref (data[1]);
03449        g_free (data[2]);
03450        g_free (data);
03451 }
03452 
03453 
03454 GQuark xml_error_quark (void) {
03455        return g_quark_from_static_string ("xml_error-quark");
03456 }
03457 
03458 
03459 Mpris2Watcher* mpris2_watcher_construct (GType object_type) {
03460        Mpris2Watcher * self = NULL;
03461        self = (Mpris2Watcher*) g_object_new (object_type, NULL);
03462        return self;
03463 }
03464 
03465 
03466 Mpris2Watcher* mpris2_watcher_new (void) {
03467        return mpris2_watcher_construct (TYPE_MPRIS2_WATCHER);
03468 }
03469 
03470 
03471 static void mpris2_watcher_check_for_active_clients_data_free (gpointer _data) {
03472        Mpris2WatcherCheckForActiveClientsData* _data_;
03473        _data_ = _data;
03474        _g_object_unref0 (_data_->self);
03475        g_slice_free (Mpris2WatcherCheckForActiveClientsData, _data_);
03476 }
03477 
03478 
03479 static gpointer _g_object_ref0 (gpointer self) {
03480        return self ? g_object_ref (self) : NULL;
03481 }
03482 
03483 
03484 void mpris2_watcher_check_for_active_clients (Mpris2Watcher* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
03485        Mpris2WatcherCheckForActiveClientsData* _data_;
03486        Mpris2Watcher* _tmp0_;
03487        _data_ = g_slice_new0 (Mpris2WatcherCheckForActiveClientsData);
03488        _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, mpris2_watcher_check_for_active_clients);
03489        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, mpris2_watcher_check_for_active_clients_data_free);
03490        _tmp0_ = _g_object_ref0 (self);
03491        _data_->self = _tmp0_;
03492        mpris2_watcher_check_for_active_clients_co (_data_);
03493 }
03494 
03495 
03496 void mpris2_watcher_check_for_active_clients_finish (Mpris2Watcher* self, GAsyncResult* _res_) {
03497        Mpris2WatcherCheckForActiveClientsData* _data_;
03498        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
03499 }
03500 
03501 
03502 static void mpris2_watcher_check_for_active_clients_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
03503        Mpris2WatcherCheckForActiveClientsData* _data_;
03504        _data_ = _user_data_;
03505        _data_->_source_object_ = source_object;
03506        _data_->_res_ = _res_;
03507        mpris2_watcher_check_for_active_clients_co (_data_);
03508 }
03509 
03510 
03511 static gboolean mpris2_watcher_check_for_active_clients_co (Mpris2WatcherCheckForActiveClientsData* _data_) {
03512        switch (_data_->_state_) {
03513               case 0:
03514               goto _state_0;
03515               case 1:
03516               goto _state_1;
03517               default:
03518               g_assert_not_reached ();
03519        }
03520        _state_0:
03521        _data_->interfaces_length1 = 0;
03522        _data_->_interfaces_size_ = 0;
03523        {
03524               _data_->_tmp0_ = _data_->self->priv->fdesktop_obj;
03525               _data_->_tmp1_ = 0;
03526               _data_->_state_ = 1;
03527               free_desktop_object_list_names (_data_->_tmp0_, mpris2_watcher_check_for_active_clients_ready, _data_);
03528               return FALSE;
03529               _state_1:
03530               _data_->_tmp2_ = NULL;
03531               _data_->_tmp2_ = free_desktop_object_list_names_finish (_data_->_tmp0_, _data_->_res_, &_data_->_tmp1_, &_data_->_inner_error_);
03532               _data_->_tmp3_ = _data_->_tmp2_;
03533               _data_->_tmp3__length1 = _data_->_tmp1_;
03534               _data_->__tmp3__size_ = _data_->_tmp3__length1;
03535               if (_data_->_inner_error_ != NULL) {
03536                      if (_data_->_inner_error_->domain == G_IO_ERROR) {
03537                             goto __catch0_g_io_error;
03538                      }
03539                      _data_->interfaces = (_vala_array_free (_data_->interfaces, _data_->interfaces_length1, (GDestroyNotify) g_free), NULL);
03540                      g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
03541                      g_clear_error (&_data_->_inner_error_);
03542                      return FALSE;
03543               }
03544               _data_->interfaces = (_vala_array_free (_data_->interfaces, _data_->interfaces_length1, (GDestroyNotify) g_free), NULL);
03545               _data_->interfaces = _data_->_tmp3_;
03546               _data_->interfaces_length1 = _data_->_tmp3__length1;
03547               _data_->_interfaces_size_ = _data_->interfaces_length1;
03548        }
03549        goto __finally0;
03550        __catch0_g_io_error:
03551        {
03552               _data_->e = _data_->_inner_error_;
03553               _data_->_inner_error_ = NULL;
03554               _data_->_tmp4_ = _data_->e;
03555               _data_->_tmp5_ = _data_->_tmp4_->message;
03556               g_warning ("test-mpris-backend-prop-updates-client.vala:122: Mpris2watcher could f" \
03557 "etch active interfaces at startup: %s", _data_->_tmp5_);
03558               _g_error_free0 (_data_->e);
03559               _data_->interfaces = (_vala_array_free (_data_->interfaces, _data_->interfaces_length1, (GDestroyNotify) g_free), NULL);
03560               if (_data_->_state_ == 0) {
03561                      g_simple_async_result_complete_in_idle (_data_->_async_result);
03562               } else {
03563                      g_simple_async_result_complete (_data_->_async_result);
03564               }
03565               g_object_unref (_data_->_async_result);
03566               return FALSE;
03567        }
03568        __finally0:
03569        if (_data_->_inner_error_ != NULL) {
03570               _data_->interfaces = (_vala_array_free (_data_->interfaces, _data_->interfaces_length1, (GDestroyNotify) g_free), NULL);
03571               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
03572               g_clear_error (&_data_->_inner_error_);
03573               return FALSE;
03574        }
03575        _data_->_tmp6_ = _data_->interfaces;
03576        _data_->_tmp6__length1 = _data_->interfaces_length1;
03577        {
03578               _data_->address_collection_length1 = 0;
03579               _data_->_address_collection_size_ = 0;
03580               _data_->address_collection = _data_->_tmp6_;
03581               _data_->address_collection_length1 = _data_->_tmp6__length1;
03582               for (_data_->address_it = 0; _data_->address_it < _data_->_tmp6__length1; _data_->address_it = _data_->address_it + 1) {
03583                      _data_->_tmp7_ = g_strdup (_data_->address_collection[_data_->address_it]);
03584                      _data_->address = _data_->_tmp7_;
03585                      {
03586                             _data_->_tmp8_ = _data_->address;
03587                             _data_->_tmp9_ = FALSE;
03588                             _data_->_tmp9_ = g_str_has_prefix (_data_->_tmp8_, MPRIS_PREFIX);
03589                             if (_data_->_tmp9_) {
03590                                    _data_->_tmp10_ = _data_->address;
03591                                    _data_->_tmp11_ = NULL;
03592                                    _data_->_tmp11_ = mpris2_watcher_create_mpris_root (_data_->self, _data_->_tmp10_);
03593                                    _data_->mpris2_root = _data_->_tmp11_;
03594                                    _data_->_tmp12_ = _data_->mpris2_root;
03595                                    if (_data_->_tmp12_ == NULL) {
03596                                           _g_object_unref0 (_data_->mpris2_root);
03597                                           _g_free0 (_data_->address);
03598                                           _data_->interfaces = (_vala_array_free (_data_->interfaces, _data_->interfaces_length1, (GDestroyNotify) g_free), NULL);
03599                                           if (_data_->_state_ == 0) {
03600                                                  g_simple_async_result_complete_in_idle (_data_->_async_result);
03601                                           } else {
03602                                                  g_simple_async_result_complete (_data_->_async_result);
03603                                           }
03604                                           g_object_unref (_data_->_async_result);
03605                                           return FALSE;
03606                                    }
03607                                    g_signal_emit_by_name (_data_->self, "client-appeared");
03608                                    _g_object_unref0 (_data_->mpris2_root);
03609                             }
03610                             _g_free0 (_data_->address);
03611                      }
03612               }
03613        }
03614        _data_->interfaces = (_vala_array_free (_data_->interfaces, _data_->interfaces_length1, (GDestroyNotify) g_free), NULL);
03615        if (_data_->_state_ == 0) {
03616               g_simple_async_result_complete_in_idle (_data_->_async_result);
03617        } else {
03618               g_simple_async_result_complete (_data_->_async_result);
03619        }
03620        g_object_unref (_data_->_async_result);
03621        return FALSE;
03622 }
03623 
03624 
03625 static void mpris2_watcher_name_changes_detected (Mpris2Watcher* self, FreeDesktopObject* dbus_obj, const gchar* name, const gchar* previous_owner, const gchar* current_owner) {
03626        const gchar* _tmp0_;
03627        MprisRoot* _tmp1_ = NULL;
03628        MprisRoot* mpris2_root;
03629        MprisRoot* _tmp2_;
03630        gboolean _tmp3_ = FALSE;
03631        const gchar* _tmp4_;
03632        gboolean _tmp6_;
03633        g_return_if_fail (self != NULL);
03634        g_return_if_fail (dbus_obj != NULL);
03635        g_return_if_fail (name != NULL);
03636        g_return_if_fail (previous_owner != NULL);
03637        g_return_if_fail (current_owner != NULL);
03638        _tmp0_ = name;
03639        _tmp1_ = mpris2_watcher_create_mpris_root (self, _tmp0_);
03640        mpris2_root = _tmp1_;
03641        _tmp2_ = mpris2_root;
03642        if (_tmp2_ == NULL) {
03643               _g_object_unref0 (mpris2_root);
03644               return;
03645        }
03646        _tmp4_ = previous_owner;
03647        if (g_strcmp0 (_tmp4_, "") == 0) {
03648               const gchar* _tmp5_;
03649               _tmp5_ = current_owner;
03650               _tmp3_ = g_strcmp0 (_tmp5_, "") != 0;
03651        } else {
03652               _tmp3_ = FALSE;
03653        }
03654        _tmp6_ = _tmp3_;
03655        if (_tmp6_) {
03656               const gchar* _tmp7_;
03657               _tmp7_ = name;
03658               g_debug ("test-mpris-backend-prop-updates-client.vala:146: Client '%s' has appea" \
03659 "red", _tmp7_);
03660               g_signal_emit_by_name (self, "client-appeared");
03661        }
03662        _g_object_unref0 (mpris2_root);
03663 }
03664 
03665 
03666 static MprisRoot* mpris2_watcher_create_mpris_root (Mpris2Watcher* self, const gchar* name) {
03667        MprisRoot* result = NULL;
03668        MprisRoot* mpris2_root;
03669        const gchar* _tmp0_;
03670        gboolean _tmp1_ = FALSE;
03671        GError * _inner_error_ = NULL;
03672        g_return_val_if_fail (self != NULL, NULL);
03673        g_return_val_if_fail (name != NULL, NULL);
03674        mpris2_root = NULL;
03675        _tmp0_ = name;
03676        _tmp1_ = g_str_has_prefix (_tmp0_, MPRIS_PREFIX);
03677        if (_tmp1_) {
03678               {
03679                      const gchar* _tmp2_;
03680                      MprisRoot* _tmp3_ = NULL;
03681                      MprisRoot* _tmp4_;
03682                      _tmp2_ = name;
03683                      _tmp3_ = g_initable_new (TYPE_MPRIS_ROOT_PROXY, NULL, &_inner_error_, "g-flags", 0, "g-name", _tmp2_, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", MPRIS_MEDIA_PLAYER_PATH, "g-interface-name", "org.mpris.MediaPlayer2", NULL);
03684                      _tmp4_ = (MprisRoot*) _tmp3_;
03685                      if (_inner_error_ != NULL) {
03686                             if (_inner_error_->domain == G_IO_ERROR) {
03687                                    goto __catch1_g_io_error;
03688                             }
03689                             _g_object_unref0 (mpris2_root);
03690                             g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
03691                             g_clear_error (&_inner_error_);
03692                             return NULL;
03693                      }
03694                      _g_object_unref0 (mpris2_root);
03695                      mpris2_root = _tmp4_;
03696               }
03697               goto __finally1;
03698               __catch1_g_io_error:
03699               {
03700                      GError* e = NULL;
03701                      GError* _tmp5_;
03702                      const gchar* _tmp6_;
03703                      e = _inner_error_;
03704                      _inner_error_ = NULL;
03705                      _tmp5_ = e;
03706                      _tmp6_ = _tmp5_->message;
03707                      g_warning ("test-mpris-backend-prop-updates-client.vala:160: Mpris2watcher could n" \
03708 "ot create a root interface: %s", _tmp6_);
03709                      _g_error_free0 (e);
03710               }
03711               __finally1:
03712               if (_inner_error_ != NULL) {
03713                      _g_object_unref0 (mpris2_root);
03714                      g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
03715                      g_clear_error (&_inner_error_);
03716                      return NULL;
03717               }
03718        }
03719        result = mpris2_root;
03720        return result;
03721 }
03722 
03723 
03724 static void _mpris2_watcher_name_changes_detected_free_desktop_object_name_owner_changed (FreeDesktopObject* _sender, const gchar* name, const gchar* old_owner, const gchar* new_owner, gpointer self) {
03725        mpris2_watcher_name_changes_detected (self, _sender, name, old_owner, new_owner);
03726 }
03727 
03728 
03729 static GObject * mpris2_watcher_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
03730        GObject * obj;
03731        GObjectClass * parent_class;
03732        Mpris2Watcher * self;
03733        GError * _inner_error_ = NULL;
03734        parent_class = G_OBJECT_CLASS (mpris2_watcher_parent_class);
03735        obj = parent_class->constructor (type, n_construct_properties, construct_properties);
03736        self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MPRIS2_WATCHER, Mpris2Watcher);
03737        {
03738               FreeDesktopObject* _tmp0_ = NULL;
03739               FreeDesktopObject* _tmp1_;
03740               FreeDesktopObject* _tmp2_;
03741               _tmp0_ = g_initable_new (TYPE_FREE_DESKTOP_OBJECT_PROXY, NULL, &_inner_error_, "g-flags", G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, "g-name", FREEDESKTOP_SERVICE, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", FREEDESKTOP_OBJECT, "g-interface-name", "org.freedesktop.DBus", NULL);
03742               _tmp1_ = (FreeDesktopObject*) _tmp0_;
03743               if (_inner_error_ != NULL) {
03744                      if (_inner_error_->domain == G_IO_ERROR) {
03745                             goto __catch2_g_io_error;
03746                      }
03747                      g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
03748                      g_clear_error (&_inner_error_);
03749               }
03750               _g_object_unref0 (self->priv->fdesktop_obj);
03751               self->priv->fdesktop_obj = _tmp1_;
03752               _tmp2_ = self->priv->fdesktop_obj;
03753               g_signal_connect_object (_tmp2_, "name-owner-changed", (GCallback) _mpris2_watcher_name_changes_detected_free_desktop_object_name_owner_changed, self, 0);
03754        }
03755        goto __finally2;
03756        __catch2_g_io_error:
03757        {
03758               GError* e = NULL;
03759               GError* _tmp3_;
03760               const gchar* _tmp4_;
03761               e = _inner_error_;
03762               _inner_error_ = NULL;
03763               _tmp3_ = e;
03764               _tmp4_ = _tmp3_->message;
03765               g_warning ("test-mpris-backend-prop-updates-client.vala:109: Mpris2watcher could n" \
03766 "ot set up a watch for mpris clients appearing on the bus: %s", _tmp4_);
03767               _g_error_free0 (e);
03768        }
03769        __finally2:
03770        if (_inner_error_ != NULL) {
03771               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
03772               g_clear_error (&_inner_error_);
03773        }
03774        return obj;
03775 }
03776 
03777 
03778 static void mpris2_watcher_class_init (Mpris2WatcherClass * klass) {
03779        mpris2_watcher_parent_class = g_type_class_peek_parent (klass);
03780        g_type_class_add_private (klass, sizeof (Mpris2WatcherPrivate));
03781        G_OBJECT_CLASS (klass)->constructor = mpris2_watcher_constructor;
03782        G_OBJECT_CLASS (klass)->finalize = mpris2_watcher_finalize;
03783        g_signal_new ("client_appeared", TYPE_MPRIS2_WATCHER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
03784        g_signal_new ("client_disappeared", TYPE_MPRIS2_WATCHER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
03785 }
03786 
03787 
03788 static void mpris2_watcher_instance_init (Mpris2Watcher * self) {
03789        self->priv = MPRIS2_WATCHER_GET_PRIVATE (self);
03790 }
03791 
03792 
03793 static void mpris2_watcher_finalize (GObject* obj) {
03794        Mpris2Watcher * self;
03795        self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MPRIS2_WATCHER, Mpris2Watcher);
03796        _g_object_unref0 (self->priv->fdesktop_obj);
03797        G_OBJECT_CLASS (mpris2_watcher_parent_class)->finalize (obj);
03798 }
03799 
03800 
03801 GType mpris2_watcher_get_type (void) {
03802        static volatile gsize mpris2_watcher_type_id__volatile = 0;
03803        if (g_once_init_enter (&mpris2_watcher_type_id__volatile)) {
03804               static const GTypeInfo g_define_type_info = { sizeof (Mpris2WatcherClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) mpris2_watcher_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Mpris2Watcher), 0, (GInstanceInitFunc) mpris2_watcher_instance_init, NULL };
03805               GType mpris2_watcher_type_id;
03806               mpris2_watcher_type_id = g_type_register_static (G_TYPE_OBJECT, "Mpris2Watcher", &g_define_type_info, 0);
03807               g_once_init_leave (&mpris2_watcher_type_id__volatile, mpris2_watcher_type_id);
03808        }
03809        return mpris2_watcher_type_id__volatile;
03810 }
03811 
03812 
03813 Mpris2Controller* mpris2_controller_construct (GType object_type, const gchar* name) {
03814        Mpris2Controller * self = NULL;
03815        const gchar* _tmp0_;
03816        g_return_val_if_fail (name != NULL, NULL);
03817        _tmp0_ = name;
03818        self = (Mpris2Controller*) g_object_new (object_type, "dbus-name", _tmp0_, NULL);
03819        return self;
03820 }
03821 
03822 
03823 Mpris2Controller* mpris2_controller_new (const gchar* name) {
03824        return mpris2_controller_construct (TYPE_MPRIS2_CONTROLLER, name);
03825 }
03826 
03827 
03828 static GHashTable* _variant_get1 (GVariant* value) {
03829        GHashTable* _tmp12_;
03830        GVariantIter _tmp13_;
03831        GVariant* _tmp14_;
03832        GVariant* _tmp15_;
03833        _tmp12_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
03834        g_variant_iter_init (&_tmp13_, value);
03835        while (g_variant_iter_loop (&_tmp13_, "{?*}", &_tmp14_, &_tmp15_)) {
03836               g_hash_table_insert (_tmp12_, g_variant_dup_string (_tmp14_, NULL), g_variant_get_variant (_tmp15_));
03837        }
03838        return _tmp12_;
03839 }
03840 
03841 
03842 static gboolean _mpris2_controller_update_active_playlist_array_gsource_func (gpointer self) {
03843        gboolean result;
03844        result = mpris2_controller_update_active_playlist_array (self);
03845        return result;
03846 }
03847 
03848 
03849 void mpris2_controller_property_changed_cb (Mpris2Controller* self, const gchar* interface_source, GHashTable* changed_properties, gchar** invalid, int invalid_length1) {
03850        GHashTable* _tmp0_;
03851        gconstpointer _tmp1_ = NULL;
03852        g_return_if_fail (self != NULL);
03853        g_return_if_fail (interface_source != NULL);
03854        g_return_if_fail (changed_properties != NULL);
03855        _tmp0_ = changed_properties;
03856        _tmp1_ = g_hash_table_lookup (_tmp0_, "PlaybackStatus");
03857        if (((GVariant*) _tmp1_) != NULL) {
03858               GeeArrayList* _tmp2_;
03859               GHashTable* _tmp3_;
03860               gconstpointer _tmp4_ = NULL;
03861               const gchar* _tmp5_ = NULL;
03862               _tmp2_ = self->received_prop_updates_for_playback_status;
03863               _tmp3_ = changed_properties;
03864               _tmp4_ = g_hash_table_lookup (_tmp3_, "PlaybackStatus");
03865               _tmp5_ = g_variant_get_string ((GVariant*) _tmp4_, NULL);
03866               gee_abstract_collection_add ((GeeAbstractCollection*) _tmp2_, _tmp5_);
03867        } else {
03868               GHashTable* _tmp6_;
03869               gconstpointer _tmp7_ = NULL;
03870               _tmp6_ = changed_properties;
03871               _tmp7_ = g_hash_table_lookup (_tmp6_, "Metadata");
03872               if (((GVariant*) _tmp7_) != NULL) {
03873                      GeeArrayList* _tmp8_;
03874                      GHashTable* _tmp9_;
03875                      gconstpointer _tmp10_ = NULL;
03876                      GHashTable* _tmp11_;
03877                      GHashTable* _tmp16_;
03878                      _tmp8_ = self->received_prop_updates_for_metadata_change;
03879                      _tmp9_ = changed_properties;
03880                      _tmp10_ = g_hash_table_lookup (_tmp9_, "Metadata");
03881                      _tmp11_ = _variant_get1 ((GVariant*) _tmp10_);
03882                      _tmp16_ = _tmp11_;
03883                      gee_abstract_collection_add ((GeeAbstractCollection*) _tmp8_, _tmp16_);
03884                      _g_hash_table_unref0 (_tmp16_);
03885               } else {
03886                      GHashTable* _tmp17_;
03887                      gconstpointer _tmp18_ = NULL;
03888                      _tmp17_ = changed_properties;
03889                      _tmp18_ = g_hash_table_lookup (_tmp17_, "ActivePlaylist");
03890                      if (((GVariant*) _tmp18_) != NULL) {
03891                             g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 500, _mpris2_controller_update_active_playlist_array_gsource_func, g_object_ref (self), g_object_unref);
03892                      }
03893               }
03894        }
03895 }
03896 
03897 
03898 static gboolean mpris2_controller_update_active_playlist_array (Mpris2Controller* self) {
03899        gboolean result = FALSE;
03900        GeeArrayList* _tmp0_;
03901        MprisPlaylists* _tmp1_;
03902        ActivePlaylistContainer _tmp2_;
03903        ActivePlaylistContainer _tmp3_;
03904        ActivePlaylistContainer _tmp4_;
03905        ActivePlaylistContainer _tmp5_;
03906        g_return_val_if_fail (self != NULL, FALSE);
03907        _tmp0_ = self->received_prop_updates_for_active_playlists;
03908        _tmp1_ = self->playlists;
03909        mpris_playlists_get_ActivePlaylist (_tmp1_, &_tmp2_);
03910        _tmp3_ = _tmp2_;
03911        _tmp4_ = _tmp3_;
03912        _tmp5_ = _tmp4_;
03913        gee_abstract_collection_add ((GeeAbstractCollection*) _tmp0_, &_tmp5_);
03914        active_playlist_container_destroy (&_tmp4_);
03915        result = FALSE;
03916        return result;
03917 }
03918 
03919 
03920 const gchar* mpris2_controller_get_dbus_name (Mpris2Controller* self) {
03921        const gchar* result;
03922        const gchar* _tmp0_;
03923        g_return_val_if_fail (self != NULL, NULL);
03924        _tmp0_ = self->priv->_dbus_name;
03925        result = _tmp0_;
03926        return result;
03927 }
03928 
03929 
03930 static void mpris2_controller_set_dbus_name (Mpris2Controller* self, const gchar* value) {
03931        const gchar* _tmp0_;
03932        gchar* _tmp1_;
03933        g_return_if_fail (self != NULL);
03934        _tmp0_ = value;
03935        _tmp1_ = g_strdup (_tmp0_);
03936        _g_free0 (self->priv->_dbus_name);
03937        self->priv->_dbus_name = _tmp1_;
03938        g_object_notify ((GObject *) self, "dbus-name");
03939 }
03940 
03941 
03942 static void _mpris2_controller_property_changed_cb_free_desktop_properties_properties_changed (FreeDesktopProperties* _sender, const gchar* source, GHashTable* changed_properties, gchar** invalid, int invalid_length1, gpointer self) {
03943        mpris2_controller_property_changed_cb (self, source, changed_properties, invalid, invalid_length1);
03944 }
03945 
03946 
03947 static GObject * mpris2_controller_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
03948        GObject * obj;
03949        GObjectClass * parent_class;
03950        Mpris2Controller * self;
03951        GError * _inner_error_ = NULL;
03952        parent_class = G_OBJECT_CLASS (mpris2_controller_parent_class);
03953        obj = parent_class->constructor (type, n_construct_properties, construct_properties);
03954        self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MPRIS2_CONTROLLER, Mpris2Controller);
03955        {
03956               GeeArrayList* _tmp0_;
03957               GeeArrayList* _tmp1_;
03958               GeeArrayList* _tmp2_;
03959               const gchar* _tmp3_;
03960               MprisRoot* _tmp4_ = NULL;
03961               MprisRoot* _tmp5_;
03962               const gchar* _tmp6_;
03963               MprisPlayer* _tmp7_ = NULL;
03964               MprisPlayer* _tmp8_;
03965               FreeDesktopProperties* _tmp9_ = NULL;
03966               FreeDesktopProperties* _tmp10_;
03967               FreeDesktopProperties* _tmp11_;
03968               const gchar* _tmp12_;
03969               MprisPlaylists* _tmp13_ = NULL;
03970               MprisPlaylists* _tmp14_;
03971               _tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL);
03972               _g_object_unref0 (self->received_prop_updates_for_playback_status);
03973               self->received_prop_updates_for_playback_status = _tmp0_;
03974               _tmp1_ = gee_array_list_new (G_TYPE_HASH_TABLE, (GBoxedCopyFunc) g_hash_table_ref, g_hash_table_unref, NULL);
03975               _g_object_unref0 (self->received_prop_updates_for_metadata_change);
03976               self->received_prop_updates_for_metadata_change = _tmp1_;
03977               _tmp2_ = gee_array_list_new (TYPE_ACTIVE_PLAYLIST_CONTAINER, (GBoxedCopyFunc) active_playlist_container_dup, active_playlist_container_free, NULL);
03978               _g_object_unref0 (self->received_prop_updates_for_active_playlists);
03979               self->received_prop_updates_for_active_playlists = _tmp2_;
03980               _tmp3_ = self->priv->_dbus_name;
03981               _tmp4_ = g_initable_new (TYPE_MPRIS_ROOT_PROXY, NULL, &_inner_error_, "g-flags", 0, "g-name", _tmp3_, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/mpris/MediaPlayer2", "g-interface-name", "org.mpris.MediaPlayer2", NULL);
03982               _tmp5_ = (MprisRoot*) _tmp4_;
03983               if (_inner_error_ != NULL) {
03984                      if (_inner_error_->domain == G_IO_ERROR) {
03985                             goto __catch3_g_io_error;
03986                      }
03987                      g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
03988                      g_clear_error (&_inner_error_);
03989               }
03990               _g_object_unref0 (self->mpris2_root);
03991               self->mpris2_root = _tmp5_;
03992               _tmp6_ = self->priv->_dbus_name;
03993               _tmp7_ = g_initable_new (TYPE_MPRIS_PLAYER_PROXY, NULL, &_inner_error_, "g-flags", 0, "g-name", _tmp6_, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/mpris/MediaPlayer2", "g-interface-name", "org.mpris.MediaPlayer2.Player", NULL);
03994               _tmp8_ = (MprisPlayer*) _tmp7_;
03995               if (_inner_error_ != NULL) {
03996                      if (_inner_error_->domain == G_IO_ERROR) {
03997                             goto __catch3_g_io_error;
03998                      }
03999                      g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
04000                      g_clear_error (&_inner_error_);
04001               }
04002               _g_object_unref0 (self->player);
04003               self->player = _tmp8_;
04004               _tmp9_ = g_initable_new (TYPE_FREE_DESKTOP_PROPERTIES_PROXY, NULL, &_inner_error_, "g-flags", 0, "g-name", "org.freedesktop.Properties.PropertiesChanged", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/mpris/MediaPlayer2", "g-interface-name", "org.freedesktop.DBus.Properties", NULL);
04005               _tmp10_ = (FreeDesktopProperties*) _tmp9_;
04006               if (_inner_error_ != NULL) {
04007                      if (_inner_error_->domain == G_IO_ERROR) {
04008                             goto __catch3_g_io_error;
04009                      }
04010                      g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
04011                      g_clear_error (&_inner_error_);
04012               }
04013               _g_object_unref0 (self->properties_interface);
04014               self->properties_interface = _tmp10_;
04015               _tmp11_ = self->properties_interface;
04016               g_signal_connect_object (_tmp11_, "properties-changed", (GCallback) _mpris2_controller_property_changed_cb_free_desktop_properties_properties_changed, self, 0);
04017               _tmp12_ = self->priv->_dbus_name;
04018               _tmp13_ = g_initable_new (TYPE_MPRIS_PLAYLISTS_PROXY, NULL, &_inner_error_, "g-flags", 0, "g-name", _tmp12_, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/mpris/MediaPlayer2", "g-interface-name", "org.mpris.MediaPlayer2.Playlists", NULL);
04019               _tmp14_ = (MprisPlaylists*) _tmp13_;
04020               if (_inner_error_ != NULL) {
04021                      if (_inner_error_->domain == G_IO_ERROR) {
04022                             goto __catch3_g_io_error;
04023                      }
04024                      g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
04025                      g_clear_error (&_inner_error_);
04026               }
04027               _g_object_unref0 (self->playlists);
04028               self->playlists = _tmp14_;
04029        }
04030        goto __finally3;
04031        __catch3_g_io_error:
04032        {
04033               GError* e = NULL;
04034               GError* _tmp15_;
04035               const gchar* _tmp16_;
04036               e = _inner_error_;
04037               _inner_error_ = NULL;
04038               _tmp15_ = e;
04039               _tmp16_ = _tmp15_->message;
04040               g_critical ("test-mpris-backend-prop-updates-client.vala:210: Can't create our DBus" \
04041 " interfaces - %s", _tmp16_);
04042               _g_error_free0 (e);
04043        }
04044        __finally3:
04045        if (_inner_error_ != NULL) {
04046               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
04047               g_clear_error (&_inner_error_);
04048        }
04049        return obj;
04050 }
04051 
04052 
04053 static void mpris2_controller_class_init (Mpris2ControllerClass * klass) {
04054        mpris2_controller_parent_class = g_type_class_peek_parent (klass);
04055        g_type_class_add_private (klass, sizeof (Mpris2ControllerPrivate));
04056        G_OBJECT_CLASS (klass)->get_property = _vala_mpris2_controller_get_property;
04057        G_OBJECT_CLASS (klass)->set_property = _vala_mpris2_controller_set_property;
04058        G_OBJECT_CLASS (klass)->constructor = mpris2_controller_constructor;
04059        G_OBJECT_CLASS (klass)->finalize = mpris2_controller_finalize;
04060        g_object_class_install_property (G_OBJECT_CLASS (klass), MPRIS2_CONTROLLER_DBUS_NAME, g_param_spec_string ("dbus-name", "dbus-name", "dbus-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
04061 }
04062 
04063 
04064 static void mpris2_controller_instance_init (Mpris2Controller * self) {
04065        self->priv = MPRIS2_CONTROLLER_GET_PRIVATE (self);
04066 }
04067 
04068 
04069 static void mpris2_controller_finalize (GObject* obj) {
04070        Mpris2Controller * self;
04071        self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MPRIS2_CONTROLLER, Mpris2Controller);
04072        _g_free0 (self->priv->_dbus_name);
04073        _g_object_unref0 (self->mpris2_root);
04074        _g_object_unref0 (self->player);
04075        _g_object_unref0 (self->playlists);
04076        _g_object_unref0 (self->properties_interface);
04077        _g_object_unref0 (self->received_prop_updates_for_playback_status);
04078        _g_object_unref0 (self->received_prop_updates_for_metadata_change);
04079        _g_object_unref0 (self->received_prop_updates_for_active_playlists);
04080        G_OBJECT_CLASS (mpris2_controller_parent_class)->finalize (obj);
04081 }
04082 
04083 
04084 GType mpris2_controller_get_type (void) {
04085        static volatile gsize mpris2_controller_type_id__volatile = 0;
04086        if (g_once_init_enter (&mpris2_controller_type_id__volatile)) {
04087               static const GTypeInfo g_define_type_info = { sizeof (Mpris2ControllerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) mpris2_controller_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Mpris2Controller), 0, (GInstanceInitFunc) mpris2_controller_instance_init, NULL };
04088               GType mpris2_controller_type_id;
04089               mpris2_controller_type_id = g_type_register_static (G_TYPE_OBJECT, "Mpris2Controller", &g_define_type_info, 0);
04090               g_once_init_leave (&mpris2_controller_type_id__volatile, mpris2_controller_type_id);
04091        }
04092        return mpris2_controller_type_id__volatile;
04093 }
04094 
04095 
04096 static void _vala_mpris2_controller_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
04097        Mpris2Controller * self;
04098        self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_MPRIS2_CONTROLLER, Mpris2Controller);
04099        switch (property_id) {
04100               case MPRIS2_CONTROLLER_DBUS_NAME:
04101               g_value_set_string (value, mpris2_controller_get_dbus_name (self));
04102               break;
04103               default:
04104               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
04105               break;
04106        }
04107 }
04108 
04109 
04110 static void _vala_mpris2_controller_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
04111        Mpris2Controller * self;
04112        self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_MPRIS2_CONTROLLER, Mpris2Controller);
04113        switch (property_id) {
04114               case MPRIS2_CONTROLLER_DBUS_NAME:
04115               mpris2_controller_set_dbus_name (self, g_value_get_string (value));
04116               break;
04117               default:
04118               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
04119               break;
04120        }
04121 }
04122 
04123 
04124 MprisClient* mpris_client_construct (GType object_type, GMainLoop* loop) {
04125        MprisClient * self = NULL;
04126        GMainLoop* _tmp0_;
04127        g_return_val_if_fail (loop != NULL, NULL);
04128        _tmp0_ = loop;
04129        self = (MprisClient*) g_object_new (object_type, "mainloop", _tmp0_, NULL);
04130        return self;
04131 }
04132 
04133 
04134 MprisClient* mpris_client_new (GMainLoop* loop) {
04135        return mpris_client_construct (TYPE_MPRIS_CLIENT, loop);
04136 }
04137 
04138 
04139 static gboolean __lambda2_ (MprisClient* self) {
04140        gboolean result = FALSE;
04141        gboolean _tmp0_ = FALSE;
04142        mpris_client_run_tests ();
04143        _tmp0_ = mpris_client_escape (self);
04144        result = _tmp0_;
04145        return result;
04146 }
04147 
04148 
04149 static gboolean ___lambda2__gsource_func (gpointer self) {
04150        gboolean result;
04151        result = __lambda2_ (self);
04152        return result;
04153 }
04154 
04155 
04156 void mpris_client_on_client_appeared (MprisClient* self) {
04157        g_return_if_fail (self != NULL);
04158        g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 5, ___lambda2__gsource_func, g_object_ref (self), g_object_unref);
04159 }
04160 
04161 
04162 gboolean mpris_client_escape (MprisClient* self) {
04163        gboolean result = FALSE;
04164        GMainLoop* _tmp0_;
04165        g_return_val_if_fail (self != NULL, FALSE);
04166        _tmp0_ = self->priv->_mainloop;
04167        g_main_loop_quit (_tmp0_);
04168        result = FALSE;
04169        return result;
04170 }
04171 
04172 
04173 static void _mpris_client_player_property_updates_playback_status_gtest_data_func (gpointer self) {
04174        mpris_client_player_property_updates_playback_status ();
04175 }
04176 
04177 
04178 static void _mpris_client_player_property_updates_metadata_gtest_data_func (gpointer self) {
04179        mpris_client_player_property_updates_metadata ();
04180 }
04181 
04182 
04183 static void _mpris_client_playlists_property_update_test_activate_playlist_gtest_data_func (gpointer self) {
04184        mpris_client_playlists_property_update_test_activate_playlist ();
04185 }
04186 
04187 
04188 static gboolean _mpris_client_run_tests_gsource_func (gpointer self) {
04189        gboolean result;
04190        result = mpris_client_run_tests ();
04191        return result;
04192 }
04193 
04194 
04195 gint mpris_client_main (gchar** args, int args_length1) {
04196        gint result = 0;
04197        GMainContext* _tmp0_ = NULL;
04198        GMainLoop* _tmp1_;
04199        GMainLoop* mainloop;
04200        GMainLoop* _tmp2_;
04201        MprisClient* _tmp3_;
04202        MprisClient* client;
04203        GMainLoop* _tmp9_;
04204        g_setenv ("XDG_DATA_HOME", TESTDIR "/data", TRUE);
04205        _tmp0_ = g_main_context_default ();
04206        _tmp1_ = g_main_loop_new (_tmp0_, FALSE);
04207        mainloop = _tmp1_;
04208        g_test_init (&args_length1, &args, NULL);
04209        g_test_add_data_func ("/Integration/SoundMenu/Mpris/Backend/Player/PlaybackStatusPropertyUpda" \
04210 "tes", NULL, _mpris_client_player_property_updates_playback_status_gtest_data_func);
04211        g_test_add_data_func ("/Integration/SoundMenu/Mpris/Backend/Player/MetadataPropertyUpdates", NULL, _mpris_client_player_property_updates_metadata_gtest_data_func);
04212        g_test_add_data_func ("/Integration/SoundMenu/Mpris/Backend/Playlists/ActivePlaylistPropertyU" \
04213 "pdates", NULL, _mpris_client_playlists_property_update_test_activate_playlist_gtest_data_func);
04214        _tmp2_ = mainloop;
04215        _tmp3_ = mpris_client_new (_tmp2_);
04216        client = _tmp3_;
04217        while (TRUE) {
04218               GMainLoop* _tmp4_;
04219               GMainContext* _tmp5_ = NULL;
04220               gboolean _tmp6_ = FALSE;
04221               GMainLoop* _tmp7_;
04222               GMainContext* _tmp8_ = NULL;
04223               _tmp4_ = mainloop;
04224               _tmp5_ = g_main_loop_get_context (_tmp4_);
04225               _tmp6_ = g_main_context_pending (_tmp5_);
04226               if (!(_tmp6_ == TRUE)) {
04227                      break;
04228               }
04229               _tmp7_ = mainloop;
04230               _tmp8_ = g_main_loop_get_context (_tmp7_);
04231               g_main_context_iteration (_tmp8_, TRUE);
04232        }
04233        g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _mpris_client_run_tests_gsource_func, NULL, NULL);
04234        _tmp9_ = mainloop;
04235        g_main_loop_run (_tmp9_);
04236        result = 0;
04237        _g_object_unref0 (client);
04238        _g_main_loop_unref0 (mainloop);
04239        return result;
04240 }
04241 
04242 
04243 int main (int argc, char ** argv) {
04244        g_type_init ();
04245        return mpris_client_main (argv, argc);
04246 }
04247 
04248 
04249 gboolean mpris_client_run_tests (void) {
04250        gboolean result = FALSE;
04251        g_test_run ();
04252        result = FALSE;
04253        return result;
04254 }
04255 
04256 
04257 static Block1Data* block1_data_ref (Block1Data* _data1_) {
04258        g_atomic_int_inc (&_data1_->_ref_count_);
04259        return _data1_;
04260 }
04261 
04262 
04263 static void block1_data_unref (void * _userdata_) {
04264        Block1Data* _data1_;
04265        _data1_ = (Block1Data*) _userdata_;
04266        if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
04267               _g_object_unref0 (_data1_->controller);
04268               g_slice_free (Block1Data, _data1_);
04269        }
04270 }
04271 
04272 
04273 static gboolean __lambda3_ (Block1Data* _data1_) {
04274        gboolean result = FALSE;
04275        GeeArrayList* _tmp0_;
04276        gpointer _tmp1_ = NULL;
04277        gchar* _tmp2_;
04278        _tmp0_ = _data1_->controller->received_prop_updates_for_playback_status;
04279        _tmp1_ = gee_abstract_list_get ((GeeAbstractList*) _tmp0_, 0);
04280        _tmp2_ = (gchar*) _tmp1_;
04281        _vala_assert (g_strcmp0 (_tmp2_, "Playing") == 0, "controller.received_prop_updates_for_playback_status[0] == \"Playing\"");
04282        _g_free0 (_tmp2_);
04283        result = FALSE;
04284        return result;
04285 }
04286 
04287 
04288 static gboolean ___lambda3__gsource_func (gpointer self) {
04289        gboolean result;
04290        result = __lambda3_ (self);
04291        return result;
04292 }
04293 
04294 
04295 void mpris_client_player_property_updates_playback_status (void) {
04296        Block1Data* _data1_;
04297        Mpris2Controller* _tmp0_;
04298        MprisPlayer* _tmp1_;
04299        _data1_ = g_slice_new0 (Block1Data);
04300        _data1_->_ref_count_ = 1;
04301        _tmp0_ = mpris2_controller_new ("org.mpris.MediaPlayer2.rhythmbox");
04302        _data1_->controller = _tmp0_;
04303        _tmp1_ = _data1_->controller->player;
04304        mpris_player_PlayPause (_tmp1_, NULL, NULL);
04305        g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 2, ___lambda3__gsource_func, block1_data_ref (_data1_), block1_data_unref);
04306        block1_data_unref (_data1_);
04307        _data1_ = NULL;
04308 }
04309 
04310 
04311 static Block2Data* block2_data_ref (Block2Data* _data2_) {
04312        g_atomic_int_inc (&_data2_->_ref_count_);
04313        return _data2_;
04314 }
04315 
04316 
04317 static void block2_data_unref (void * _userdata_) {
04318        Block2Data* _data2_;
04319        _data2_ = (Block2Data*) _userdata_;
04320        if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
04321               _g_object_unref0 (_data2_->controller);
04322               g_slice_free (Block2Data, _data2_);
04323        }
04324 }
04325 
04326 
04327 static gpointer _g_variant_ref0 (gpointer self) {
04328        return self ? g_variant_ref (self) : NULL;
04329 }
04330 
04331 
04332 static gboolean __lambda4_ (Block2Data* _data2_) {
04333        gboolean result = FALSE;
04334        GeeArrayList* _tmp0_;
04335        gint _tmp1_;
04336        gint _tmp2_;
04337        GeeArrayList* _tmp3_;
04338        gpointer _tmp4_ = NULL;
04339        GHashTable* _tmp5_;
04340        gconstpointer _tmp6_ = NULL;
04341        GVariant* _tmp7_;
04342        GVariant* _tmp8_;
04343        GVariant* artist_v;
04344        const gchar* _tmp9_ = NULL;
04345        GeeArrayList* _tmp10_;
04346        gpointer _tmp11_ = NULL;
04347        GHashTable* _tmp12_;
04348        gconstpointer _tmp13_ = NULL;
04349        GVariant* _tmp14_;
04350        GVariant* _tmp15_;
04351        GVariant* album_v;
04352        const gchar* _tmp16_ = NULL;
04353        GeeArrayList* _tmp17_;
04354        gpointer _tmp18_ = NULL;
04355        GHashTable* _tmp19_;
04356        gconstpointer _tmp20_ = NULL;
04357        GVariant* _tmp21_;
04358        GVariant* _tmp22_;
04359        GVariant* title_v;
04360        const gchar* _tmp23_ = NULL;
04361        GeeArrayList* _tmp24_;
04362        gpointer _tmp25_ = NULL;
04363        GHashTable* _tmp26_;
04364        gconstpointer _tmp27_ = NULL;
04365        GVariant* _tmp28_;
04366        GVariant* _tmp29_;
04367        GVariant* art_v;
04368        const gchar* _tmp30_ = NULL;
04369        _tmp0_ = _data2_->controller->received_prop_updates_for_metadata_change;
04370        _tmp1_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp0_);
04371        _tmp2_ = _tmp1_;
04372        _vala_assert (_tmp2_ == 1, "controller.received_prop_updates_for_metadata_change.size == 1");
04373        _tmp3_ = _data2_->controller->received_prop_updates_for_metadata_change;
04374        _tmp4_ = gee_abstract_list_get ((GeeAbstractList*) _tmp3_, 0);
04375        _tmp5_ = (GHashTable*) _tmp4_;
04376        _tmp6_ = g_hash_table_lookup (_tmp5_, "xesam:artist");
04377        _tmp7_ = _g_variant_ref0 ((GVariant*) _tmp6_);
04378        _tmp8_ = _tmp7_;
04379        _g_hash_table_unref0 (_tmp5_);
04380        artist_v = _tmp8_;
04381        _tmp9_ = g_variant_get_string (artist_v, NULL);
04382        _vala_assert (g_strcmp0 (_tmp9_, "Sonnamble") == 0, "artist_v.get_string() == \"Sonnamble\"");
04383        _tmp10_ = _data2_->controller->received_prop_updates_for_metadata_change;
04384        _tmp11_ = gee_abstract_list_get ((GeeAbstractList*) _tmp10_, 0);
04385        _tmp12_ = (GHashTable*) _tmp11_;
04386        _tmp13_ = g_hash_table_lookup (_tmp12_, "xesam:album");
04387        _tmp14_ = _g_variant_ref0 ((GVariant*) _tmp13_);
04388        _tmp15_ = _tmp14_;
04389        _g_hash_table_unref0 (_tmp12_);
04390        album_v = _tmp15_;
04391        _tmp16_ = g_variant_get_string (album_v, NULL);
04392        _vala_assert (g_strcmp0 (_tmp16_, "Seven months in E minor") == 0, "album_v.get_string() == \"Seven months in E minor\"");
04393        _tmp17_ = _data2_->controller->received_prop_updates_for_metadata_change;
04394        _tmp18_ = gee_abstract_list_get ((GeeAbstractList*) _tmp17_, 0);
04395        _tmp19_ = (GHashTable*) _tmp18_;
04396        _tmp20_ = g_hash_table_lookup (_tmp19_, "xesam:title");
04397        _tmp21_ = _g_variant_ref0 ((GVariant*) _tmp20_);
04398        _tmp22_ = _tmp21_;
04399        _g_hash_table_unref0 (_tmp19_);
04400        title_v = _tmp22_;
04401        _tmp23_ = g_variant_get_string (title_v, NULL);
04402        _vala_assert (g_strcmp0 (_tmp23_, "Sehnsucht") == 0, "title_v.get_string() == \"Sehnsucht\"");
04403        _tmp24_ = _data2_->controller->received_prop_updates_for_metadata_change;
04404        _tmp25_ = gee_abstract_list_get ((GeeAbstractList*) _tmp24_, 0);
04405        _tmp26_ = (GHashTable*) _tmp25_;
04406        _tmp27_ = g_hash_table_lookup (_tmp26_, "mpris:artUrl");
04407        _tmp28_ = _g_variant_ref0 ((GVariant*) _tmp27_);
04408        _tmp29_ = _tmp28_;
04409        _g_hash_table_unref0 (_tmp26_);
04410        art_v = _tmp29_;
04411        _tmp30_ = g_variant_get_string (art_v, NULL);
04412        _vala_assert (g_strcmp0 (_tmp30_, "file:///home/user/download/sonnamble.jpg") == 0, "art_v.get_string() == \"file:///home/user/download/sonnamble.jpg\"");
04413        result = FALSE;
04414        _g_variant_unref0 (art_v);
04415        _g_variant_unref0 (title_v);
04416        _g_variant_unref0 (album_v);
04417        _g_variant_unref0 (artist_v);
04418        return result;
04419 }
04420 
04421 
04422 static gboolean ___lambda4__gsource_func (gpointer self) {
04423        gboolean result;
04424        result = __lambda4_ (self);
04425        return result;
04426 }
04427 
04428 
04429 void mpris_client_player_property_updates_metadata (void) {
04430        Block2Data* _data2_;
04431        Mpris2Controller* _tmp0_;
04432        MprisPlayer* _tmp1_;
04433        _data2_ = g_slice_new0 (Block2Data);
04434        _data2_->_ref_count_ = 1;
04435        _tmp0_ = mpris2_controller_new ("org.mpris.MediaPlayer2.rhythmbox");
04436        _data2_->controller = _tmp0_;
04437        _tmp1_ = _data2_->controller->player;
04438        mpris_player_Next (_tmp1_, NULL, NULL);
04439        g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 2, ___lambda4__gsource_func, block2_data_ref (_data2_), block2_data_unref);
04440        block2_data_unref (_data2_);
04441        _data2_ = NULL;
04442 }
04443 
04444 
04445 void mpris_client_playlists_property_update_test_activate_playlist (void) {
04446        GMainLoop* _tmp0_;
04447        GMainLoop* loop;
04448        _tmp0_ = g_main_loop_new (NULL, FALSE);
04449        loop = _tmp0_;
04450        mpris_client_do_test_async_property_update_activate_playlist (loop, NULL, NULL);
04451        g_main_loop_run (loop);
04452        _g_main_loop_unref0 (loop);
04453 }
04454 
04455 
04456 static void mpris_client_do_test_async_property_update_activate_playlist_data_free (gpointer _data) {
04457        MprisClientDoTestAsyncPropertyUpdateActivatePlaylistData* _data_;
04458        _data_ = _data;
04459        _g_main_loop_unref0 (_data_->loop);
04460        g_slice_free (MprisClientDoTestAsyncPropertyUpdateActivatePlaylistData, _data_);
04461 }
04462 
04463 
04464 static gpointer _g_main_loop_ref0 (gpointer self) {
04465        return self ? g_main_loop_ref (self) : NULL;
04466 }
04467 
04468 
04469 void mpris_client_do_test_async_property_update_activate_playlist (GMainLoop* loop, GAsyncReadyCallback _callback_, gpointer _user_data_) {
04470        MprisClientDoTestAsyncPropertyUpdateActivatePlaylistData* _data_;
04471        GMainLoop* _tmp0_;
04472        GMainLoop* _tmp1_;
04473        _data_ = g_slice_new0 (MprisClientDoTestAsyncPropertyUpdateActivatePlaylistData);
04474        _data_->_async_result = g_simple_async_result_new (g_object_newv (G_TYPE_OBJECT, 0, NULL), _callback_, _user_data_, mpris_client_do_test_async_property_update_activate_playlist);
04475        g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, mpris_client_do_test_async_property_update_activate_playlist_data_free);
04476        _tmp0_ = loop;
04477        _tmp1_ = _g_main_loop_ref0 (_tmp0_);
04478        _data_->loop = _tmp1_;
04479        mpris_client_do_test_async_property_update_activate_playlist_co (_data_);
04480 }
04481 
04482 
04483 void mpris_client_do_test_async_property_update_activate_playlist_finish (GAsyncResult* _res_) {
04484        MprisClientDoTestAsyncPropertyUpdateActivatePlaylistData* _data_;
04485        _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
04486 }
04487 
04488 
04489 static Block3Data* block3_data_ref (Block3Data* _data3_) {
04490        g_atomic_int_inc (&_data3_->_ref_count_);
04491        return _data3_;
04492 }
04493 
04494 
04495 static void block3_data_unref (void * _userdata_) {
04496        Block3Data* _data3_;
04497        _data3_ = (Block3Data*) _userdata_;
04498        if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
04499               _g_object_unref0 (_data3_->contr);
04500               g_slice_free (Block3Data, _data3_);
04501        }
04502 }
04503 
04504 
04505 static void mpris_client_do_test_async_property_update_activate_playlist_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
04506        MprisClientDoTestAsyncPropertyUpdateActivatePlaylistData* _data_;
04507        _data_ = _user_data_;
04508        _data_->_source_object_ = source_object;
04509        _data_->_res_ = _res_;
04510        mpris_client_do_test_async_property_update_activate_playlist_co (_data_);
04511 }
04512 
04513 
04514 static gboolean ___lambda5_ (Block3Data* _data3_) {
04515        gboolean result = FALSE;
04516        GeeArrayList* _tmp0_;
04517        gint _tmp1_;
04518        gint _tmp2_;
04519        GeeArrayList* _tmp3_;
04520        gpointer _tmp4_ = NULL;
04521        ActivePlaylistContainer* _tmp5_;
04522        gboolean _tmp6_;
04523        GeeArrayList* _tmp7_;
04524        gpointer _tmp8_ = NULL;
04525        ActivePlaylistContainer* _tmp9_;
04526        PlaylistDetails _tmp10_;
04527        const char* _tmp11_;
04528        GeeArrayList* _tmp12_;
04529        gpointer _tmp13_ = NULL;
04530        ActivePlaylistContainer* _tmp14_;
04531        PlaylistDetails _tmp15_;
04532        const gchar* _tmp16_;
04533        GeeArrayList* _tmp17_;
04534        gpointer _tmp18_ = NULL;
04535        ActivePlaylistContainer* _tmp19_;
04536        PlaylistDetails _tmp20_;
04537        const gchar* _tmp21_;
04538        _tmp0_ = _data3_->contr->received_prop_updates_for_active_playlists;
04539        _tmp1_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp0_);
04540        _tmp2_ = _tmp1_;
04541        _vala_assert (_tmp2_ == 1, "contr.received_prop_updates_for_active_playlists.size == 1");
04542        _tmp3_ = _data3_->contr->received_prop_updates_for_active_playlists;
04543        _tmp4_ = gee_abstract_list_get ((GeeAbstractList*) _tmp3_, 0);
04544        _tmp5_ = (ActivePlaylistContainer*) _tmp4_;
04545        _tmp6_ = (*_tmp5_).valid;
04546        _vala_assert (_tmp6_ == TRUE, "contr.received_prop_updates_for_active_playlists[0].valid == true");
04547        _active_playlist_container_free0 (_tmp5_);
04548        _tmp7_ = _data3_->contr->received_prop_updates_for_active_playlists;
04549        _tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, 0);
04550        _tmp9_ = (ActivePlaylistContainer*) _tmp8_;
04551        _tmp10_ = (*_tmp9_).details;
04552        _tmp11_ = _tmp10_.path;
04553        _vala_assert (g_strcmp0 (_tmp11_, "/fake/pl2/id") == 0, "contr.received_prop_updates_for_active_playlists[0].details.path == \"/fake/pl2/id\"");
04554        _active_playlist_container_free0 (_tmp9_);
04555        _tmp12_ = _data3_->contr->received_prop_updates_for_active_playlists;
04556        _tmp13_ = gee_abstract_list_get ((GeeAbstractList*) _tmp12_, 0);
04557        _tmp14_ = (ActivePlaylistContainer*) _tmp13_;
04558        _tmp15_ = (*_tmp14_).details;
04559        _tmp16_ = _tmp15_.name;
04560        _vala_assert (g_strcmp0 (_tmp16_, "another playlist") == 0, "contr.received_prop_updates_for_active_playlists[0].details.name == \"another playlist\"");
04561        _active_playlist_container_free0 (_tmp14_);
04562        _tmp17_ = _data3_->contr->received_prop_updates_for_active_playlists;
04563        _tmp18_ = gee_abstract_list_get ((GeeAbstractList*) _tmp17_, 0);
04564        _tmp19_ = (ActivePlaylistContainer*) _tmp18_;
04565        _tmp20_ = (*_tmp19_).details;
04566        _tmp21_ = _tmp20_.icon_name;
04567        _vala_assert (g_strcmp0 (_tmp21_, "audio-volume-high") == 0, "contr.received_prop_updates_for_active_playlists[0].details.icon_name == \"audio-volume-high\"");
04568        _active_playlist_container_free0 (_tmp19_);
04569        result = FALSE;
04570        return result;
04571 }
04572 
04573 
04574 static gboolean ____lambda5__gsource_func (gpointer self) {
04575        gboolean result;
04576        result = ___lambda5_ (self);
04577        return result;
04578 }
04579 
04580 
04581 static gboolean mpris_client_do_test_async_property_update_activate_playlist_co (MprisClientDoTestAsyncPropertyUpdateActivatePlaylistData* _data_) {
04582        switch (_data_->_state_) {
04583               case 0:
04584               goto _state_0;
04585               case 1:
04586               goto _state_1;
04587               default:
04588               g_assert_not_reached ();
04589        }
04590        _state_0:
04591        _data_->_data3_ = g_slice_new0 (Block3Data);
04592        _data_->_data3_->_ref_count_ = 1;
04593        _data_->_data3_->_async_data_ = _data_;
04594        _data_->_tmp0_ = mpris2_controller_new ("org.mpris.MediaPlayer2.rhythmbox");
04595        _data_->_data3_->contr = _data_->_tmp0_;
04596        {
04597               _data_->_tmp1_ = _data_->_data3_->contr->playlists;
04598               _data_->_tmp2_ = 0;
04599               _data_->_state_ = 1;
04600               mpris_playlists_GetPlaylists (_data_->_tmp1_, (guint32) 0, (guint32) 10, "alphabetical", FALSE, mpris_client_do_test_async_property_update_activate_playlist_ready, _data_);
04601               return FALSE;
04602               _state_1:
04603               _data_->_tmp3_ = NULL;
04604               _data_->_tmp3_ = mpris_playlists_GetPlaylists_finish (_data_->_tmp1_, _data_->_res_, &_data_->_tmp2_, &_data_->_inner_error_);
04605               _data_->pls = _data_->_tmp3_;
04606               _data_->pls_length1 = _data_->_tmp2_;
04607               _data_->_pls_size_ = _data_->pls_length1;
04608               if (_data_->_inner_error_ != NULL) {
04609                      if (_data_->_inner_error_->domain == G_IO_ERROR) {
04610                             goto __catch4_g_io_error;
04611                      }
04612                      block3_data_unref (_data_->_data3_);
04613                      _data_->_data3_ = NULL;
04614                      g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
04615                      g_clear_error (&_data_->_inner_error_);
04616                      return FALSE;
04617               }
04618               _data_->_tmp4_ = _data_->_data3_->contr->playlists;
04619               _data_->_tmp5_ = _data_->pls[1];
04620               _data_->_tmp6_ = _data_->_tmp5_.path;
04621               mpris_playlists_ActivatePlaylist (_data_->_tmp4_, _data_->_tmp6_, NULL, NULL);
04622               g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 3, ____lambda5__gsource_func, block3_data_ref (_data_->_data3_), block3_data_unref);
04623               _data_->pls = (_vala_PlaylistDetails_array_free (_data_->pls, _data_->pls_length1), NULL);
04624        }
04625        goto __finally4;
04626        __catch4_g_io_error:
04627        {
04628               _data_->e = _data_->_inner_error_;
04629               _data_->_inner_error_ = NULL;
04630               g_warning ("test-mpris-backend-prop-updates-client.vala:368: do_test_async_propert" \
04631 "y_update_activate_playlist: Failed to activate playlist asynchronously");
04632               _g_error_free0 (_data_->e);
04633        }
04634        __finally4:
04635        if (_data_->_inner_error_ != NULL) {
04636               block3_data_unref (_data_->_data3_);
04637               _data_->_data3_ = NULL;
04638               g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
04639               g_clear_error (&_data_->_inner_error_);
04640               return FALSE;
04641        }
04642        _data_->_tmp7_ = _data_->loop;
04643        g_main_loop_quit (_data_->_tmp7_);
04644        block3_data_unref (_data_->_data3_);
04645        _data_->_data3_ = NULL;
04646        if (_data_->_state_ == 0) {
04647               g_simple_async_result_complete_in_idle (_data_->_async_result);
04648        } else {
04649               g_simple_async_result_complete (_data_->_async_result);
04650        }
04651        g_object_unref (_data_->_async_result);
04652        return FALSE;
04653 }
04654 
04655 
04656 GMainLoop* mpris_client_get_mainloop (MprisClient* self) {
04657        GMainLoop* result;
04658        GMainLoop* _tmp0_;
04659        g_return_val_if_fail (self != NULL, NULL);
04660        _tmp0_ = self->priv->_mainloop;
04661        result = _tmp0_;
04662        return result;
04663 }
04664 
04665 
04666 static void mpris_client_set_mainloop (MprisClient* self, GMainLoop* value) {
04667        GMainLoop* _tmp0_;
04668        GMainLoop* _tmp1_;
04669        g_return_if_fail (self != NULL);
04670        _tmp0_ = value;
04671        _tmp1_ = _g_main_loop_ref0 (_tmp0_);
04672        _g_main_loop_unref0 (self->priv->_mainloop);
04673        self->priv->_mainloop = _tmp1_;
04674        g_object_notify ((GObject *) self, "mainloop");
04675 }
04676 
04677 
04678 static void _mpris_client_on_client_appeared_mpris2_watcher_client_appeared (Mpris2Watcher* _sender, gpointer self) {
04679        mpris_client_on_client_appeared (self);
04680 }
04681 
04682 
04683 static GObject * mpris_client_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
04684        GObject * obj;
04685        GObjectClass * parent_class;
04686        MprisClient * self;
04687        Mpris2Watcher* _tmp0_;
04688        Mpris2Watcher* _tmp1_;
04689        Mpris2Watcher* _tmp2_;
04690        parent_class = G_OBJECT_CLASS (mpris_client_parent_class);
04691        obj = parent_class->constructor (type, n_construct_properties, construct_properties);
04692        self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MPRIS_CLIENT, MprisClient);
04693        _tmp0_ = mpris2_watcher_new ();
04694        _g_object_unref0 (self->watcher);
04695        self->watcher = _tmp0_;
04696        _tmp1_ = self->watcher;
04697        g_signal_connect_object (_tmp1_, "client-appeared", (GCallback) _mpris_client_on_client_appeared_mpris2_watcher_client_appeared, self, 0);
04698        _tmp2_ = self->watcher;
04699        mpris2_watcher_check_for_active_clients (_tmp2_, NULL, NULL);
04700        return obj;
04701 }
04702 
04703 
04704 static void mpris_client_class_init (MprisClientClass * klass) {
04705        mpris_client_parent_class = g_type_class_peek_parent (klass);
04706        g_type_class_add_private (klass, sizeof (MprisClientPrivate));
04707        G_OBJECT_CLASS (klass)->get_property = _vala_mpris_client_get_property;
04708        G_OBJECT_CLASS (klass)->set_property = _vala_mpris_client_set_property;
04709        G_OBJECT_CLASS (klass)->constructor = mpris_client_constructor;
04710        G_OBJECT_CLASS (klass)->finalize = mpris_client_finalize;
04711        g_object_class_install_property (G_OBJECT_CLASS (klass), MPRIS_CLIENT_MAINLOOP, g_param_spec_pointer ("mainloop", "mainloop", "mainloop", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
04712 }
04713 
04714 
04715 static void mpris_client_instance_init (MprisClient * self) {
04716        self->priv = MPRIS_CLIENT_GET_PRIVATE (self);
04717 }
04718 
04719 
04720 static void mpris_client_finalize (GObject* obj) {
04721        MprisClient * self;
04722        self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MPRIS_CLIENT, MprisClient);
04723        _g_main_loop_unref0 (self->priv->_mainloop);
04724        _g_object_unref0 (self->watcher);
04725        G_OBJECT_CLASS (mpris_client_parent_class)->finalize (obj);
04726 }
04727 
04728 
04729 GType mpris_client_get_type (void) {
04730        static volatile gsize mpris_client_type_id__volatile = 0;
04731        if (g_once_init_enter (&mpris_client_type_id__volatile)) {
04732               static const GTypeInfo g_define_type_info = { sizeof (MprisClientClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) mpris_client_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MprisClient), 0, (GInstanceInitFunc) mpris_client_instance_init, NULL };
04733               GType mpris_client_type_id;
04734               mpris_client_type_id = g_type_register_static (G_TYPE_OBJECT, "MprisClient", &g_define_type_info, 0);
04735               g_once_init_leave (&mpris_client_type_id__volatile, mpris_client_type_id);
04736        }
04737        return mpris_client_type_id__volatile;
04738 }
04739 
04740 
04741 static void _vala_mpris_client_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
04742        MprisClient * self;
04743        self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_MPRIS_CLIENT, MprisClient);
04744        switch (property_id) {
04745               case MPRIS_CLIENT_MAINLOOP:
04746               g_value_set_pointer (value, mpris_client_get_mainloop (self));
04747               break;
04748               default:
04749               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
04750               break;
04751        }
04752 }
04753 
04754 
04755 static void _vala_mpris_client_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
04756        MprisClient * self;
04757        self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_MPRIS_CLIENT, MprisClient);
04758        switch (property_id) {
04759               case MPRIS_CLIENT_MAINLOOP:
04760               mpris_client_set_mainloop (self, g_value_get_pointer (value));
04761               break;
04762               default:
04763               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
04764               break;
04765        }
04766 }
04767 
04768 
04769 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
04770        if ((array != NULL) && (destroy_func != NULL)) {
04771               int i;
04772               for (i = 0; i < array_length; i = i + 1) {
04773                      if (((gpointer*) array)[i] != NULL) {
04774                             destroy_func (((gpointer*) array)[i]);
04775                      }
04776               }
04777        }
04778 }
04779 
04780 
04781 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
04782        _vala_array_destroy (array, array_length, destroy_func);
04783        g_free (array);
04784 }
04785 
04786 
04787