Back to index

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