aboutsummaryrefslogtreecommitdiff
path: root/src/mpris2-controller.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mpris2-controller.c')
-rw-r--r--src/mpris2-controller.c741
1 files changed, 438 insertions, 303 deletions
diff --git a/src/mpris2-controller.c b/src/mpris2-controller.c
index 1ee4ebf..c482dd4 100644
--- a/src/mpris2-controller.c
+++ b/src/mpris2-controller.c
@@ -1,4 +1,4 @@
-/* mpris2-controller.c generated by valac 0.10.0, the Vala compiler
+/* mpris2-controller.c generated by valac 0.11.2, the Vala compiler
* generated from mpris2-controller.vala, do not modify */
/*
@@ -137,10 +137,10 @@ struct _MprisRootIface {
void (*set_CanQuit) (MprisRoot* self, gboolean value);
gboolean (*get_CanRaise) (MprisRoot* self);
void (*set_CanRaise) (MprisRoot* self, gboolean value);
- char* (*get_Identity) (MprisRoot* self);
- void (*set_Identity) (MprisRoot* self, const char* value);
- char* (*get_DesktopEntry) (MprisRoot* self);
- void (*set_DesktopEntry) (MprisRoot* self, const char* value);
+ gchar* (*get_Identity) (MprisRoot* self);
+ void (*set_Identity) (MprisRoot* self, const gchar* value);
+ gchar* (*get_DesktopEntry) (MprisRoot* self);
+ void (*set_DesktopEntry) (MprisRoot* self, const gchar* value);
};
struct _DBusObjectVTable {
@@ -176,8 +176,8 @@ struct _MprisPlayerIface {
void (*set_Metadata) (MprisPlayer* self, GHashTable* value);
gint32 (*get_Position) (MprisPlayer* self);
void (*set_Position) (MprisPlayer* self, gint32 value);
- char* (*get_PlaybackStatus) (MprisPlayer* self);
- void (*set_PlaybackStatus) (MprisPlayer* self, const char* value);
+ gchar* (*get_PlaybackStatus) (MprisPlayer* self);
+ void (*set_PlaybackStatus) (MprisPlayer* self, const gchar* value);
};
struct _MprisPlayerDBusProxy {
@@ -273,10 +273,10 @@ gboolean mpris_root_get_CanQuit (MprisRoot* self);
void mpris_root_set_CanQuit (MprisRoot* self, gboolean value);
gboolean mpris_root_get_CanRaise (MprisRoot* self);
void mpris_root_set_CanRaise (MprisRoot* self, gboolean value);
-char* mpris_root_get_Identity (MprisRoot* self);
-void mpris_root_set_Identity (MprisRoot* self, const char* value);
-char* mpris_root_get_DesktopEntry (MprisRoot* self);
-void mpris_root_set_DesktopEntry (MprisRoot* self, const char* value);
+gchar* mpris_root_get_Identity (MprisRoot* self);
+void mpris_root_set_Identity (MprisRoot* self, const gchar* value);
+gchar* mpris_root_get_DesktopEntry (MprisRoot* self);
+void mpris_root_set_DesktopEntry (MprisRoot* self, const gchar* value);
static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object);
static void _vala_dbus_unregister_object (gpointer connection, GObject* object);
void mpris_root_dbus_register_object (DBusConnection* connection, const char* path, void* object);
@@ -312,13 +312,13 @@ static gboolean mpris_root_dbus_proxy_get_CanQuit (MprisRoot* self);
static void mpris_root_dbus_proxy_set_CanQuit (MprisRoot* self, gboolean value);
static gboolean mpris_root_dbus_proxy_get_CanRaise (MprisRoot* self);
static void mpris_root_dbus_proxy_set_CanRaise (MprisRoot* self, gboolean value);
-static char* mpris_root_dbus_proxy_get_Identity (MprisRoot* self);
-static void mpris_root_dbus_proxy_set_Identity (MprisRoot* self, const char* value);
-static char* mpris_root_dbus_proxy_get_DesktopEntry (MprisRoot* self);
-static void mpris_root_dbus_proxy_set_DesktopEntry (MprisRoot* self, const char* value);
+static gchar* mpris_root_dbus_proxy_get_Identity (MprisRoot* self);
+static void mpris_root_dbus_proxy_set_Identity (MprisRoot* self, const gchar* value);
+static gchar* mpris_root_dbus_proxy_get_DesktopEntry (MprisRoot* self);
+static void mpris_root_dbus_proxy_set_DesktopEntry (MprisRoot* self, const gchar* value);
static void mpris_root_dbus_proxy_mpris_root__interface_init (MprisRootIface* iface);
-static void mpris_root_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
-static void mpris_root_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
+static void _vala_mpris_root_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
+static void _vala_mpris_root_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
MprisPlayer* mpris_player_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path);
GType mpris_player_get_type (void) G_GNUC_CONST;
void mpris_player_PlayPause (MprisPlayer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
@@ -331,8 +331,9 @@ GHashTable* mpris_player_get_Metadata (MprisPlayer* self);
void mpris_player_set_Metadata (MprisPlayer* self, GHashTable* value);
gint32 mpris_player_get_Position (MprisPlayer* self);
void mpris_player_set_Position (MprisPlayer* self, gint32 value);
-char* mpris_player_get_PlaybackStatus (MprisPlayer* self);
-void mpris_player_set_PlaybackStatus (MprisPlayer* self, const char* value);
+gchar* mpris_player_get_PlaybackStatus (MprisPlayer* self);
+void mpris_player_set_PlaybackStatus (MprisPlayer* self, const gchar* value);
+static void g_cclosure_user_marshal_VOID__INT64 (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
void mpris_player_dbus_register_object (DBusConnection* connection, const char* path, void* object);
void _mpris_player_dbus_unregister (DBusConnection* connection, void* _user_data_);
DBusHandlerResult mpris_player_dbus_message (DBusConnection* connection, DBusMessage* message, void* object);
@@ -369,19 +370,20 @@ static GHashTable* mpris_player_dbus_proxy_get_Metadata (MprisPlayer* self);
static void mpris_player_dbus_proxy_set_Metadata (MprisPlayer* self, GHashTable* value);
static gint32 mpris_player_dbus_proxy_get_Position (MprisPlayer* self);
static void mpris_player_dbus_proxy_set_Position (MprisPlayer* self, gint32 value);
-static char* mpris_player_dbus_proxy_get_PlaybackStatus (MprisPlayer* self);
-static void mpris_player_dbus_proxy_set_PlaybackStatus (MprisPlayer* self, const char* value);
+static gchar* mpris_player_dbus_proxy_get_PlaybackStatus (MprisPlayer* self);
+static void mpris_player_dbus_proxy_set_PlaybackStatus (MprisPlayer* self, const gchar* value);
static void mpris_player_dbus_proxy_mpris_player__interface_init (MprisPlayerIface* iface);
-static void mpris_player_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
-static void mpris_player_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
+static void _vala_mpris_player_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
+static void _vala_mpris_player_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType free_desktop_properties_get_type (void) G_GNUC_CONST;
FreeDesktopProperties* free_desktop_properties_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path);
+static void g_cclosure_user_marshal_VOID__STRING_BOXED_BOXED_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
void free_desktop_properties_dbus_register_object (DBusConnection* connection, const char* path, void* object);
void _free_desktop_properties_dbus_unregister (DBusConnection* connection, void* _user_data_);
DBusHandlerResult free_desktop_properties_dbus_message (DBusConnection* connection, DBusMessage* message, void* object);
static DBusHandlerResult _dbus_free_desktop_properties_introspect (FreeDesktopProperties* self, DBusConnection* connection, DBusMessage* message);
static DBusHandlerResult _dbus_free_desktop_properties_property_get_all (FreeDesktopProperties* self, DBusConnection* connection, DBusMessage* message);
-static void _dbus_free_desktop_properties_properties_changed (GObject* _sender, const char* source, GHashTable* changed_properties, char** invalid, int invalid_length1, DBusConnection* _connection);
+static void _dbus_free_desktop_properties_properties_changed (GObject* _sender, const gchar* source, GHashTable* changed_properties, gchar** invalid, int invalid_length1, DBusConnection* _connection);
GType free_desktop_properties_dbus_proxy_get_type (void) G_GNUC_CONST;
static void _dbus_handle_free_desktop_properties_properties_changed (FreeDesktopProperties* self, DBusConnection* connection, DBusMessage* message);
DBusHandlerResult free_desktop_properties_dbus_proxy_filter (DBusConnection* connection, DBusMessage* message, void* user_data);
@@ -389,8 +391,8 @@ enum {
FREE_DESKTOP_PROPERTIES_DBUS_PROXY_DUMMY_PROPERTY
};
static void free_desktop_properties_dbus_proxy_free_desktop_properties__interface_init (FreeDesktopPropertiesIface* iface);
-static void free_desktop_properties_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
-static void free_desktop_properties_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
+static void _vala_free_desktop_properties_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
+static void _vala_free_desktop_properties_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType mpris2_controller_get_type (void) G_GNUC_CONST;
GType player_controller_get_type (void) G_GNUC_CONST;
#define MPRIS2_CONTROLLER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_MPRIS2_CONTROLLER, Mpris2ControllerPrivate))
@@ -404,13 +406,13 @@ enum {
#define MPRIS2_CONTROLLER_root_interface "org.mpris.MediaPlayer2"
Mpris2Controller* mpris2_controller_new (PlayerController* ctrl);
Mpris2Controller* mpris2_controller_construct (GType object_type, PlayerController* ctrl);
-void mpris2_controller_property_changed_cb (Mpris2Controller* self, const char* interface_source, GHashTable* changed_properties, char** invalid, int invalid_length1);
+void mpris2_controller_property_changed_cb (Mpris2Controller* self, const gchar* interface_source, GHashTable* changed_properties, gchar** invalid, int invalid_length1);
PlayerController* mpris2_controller_get_owner (Mpris2Controller* self);
-const char* player_controller_get_mpris_name (PlayerController* self);
+const gchar* player_controller_get_mpris_name (PlayerController* self);
static GValue* _g_value_dup (GValue* self);
MprisPlayer* mpris2_controller_get_player (Mpris2Controller* self);
GType transport_menuitem_state_get_type (void) G_GNUC_CONST;
-static TransportMenuitemstate mpris2_controller_determine_play_state (Mpris2Controller* self, const char* status);
+static TransportMenuitemstate mpris2_controller_determine_play_state (Mpris2Controller* self, const gchar* status);
GType player_item_get_type (void) G_GNUC_CONST;
GType player_controller_widget_order_get_type (void) G_GNUC_CONST;
GType transport_menuitem_get_type (void) G_GNUC_CONST;
@@ -421,7 +423,7 @@ GeeHashSet* metadata_menuitem_attributes_format (void);
void player_item_update (PlayerItem* self, GHashTable* data, GeeHashSet* attributes);
gboolean player_item_populated (PlayerItem* self, GeeHashSet* attrs);
static void _vala_GValue_free (GValue* self);
-static char** _vala_array_dup1 (char** self, int length);
+static gchar** _vala_array_dup1 (gchar** self, int length);
void mpris2_controller_initial_update (Mpris2Controller* self);
GType transport_menuitem_action_get_type (void) G_GNUC_CONST;
void mpris2_controller_transport_update (Mpris2Controller* self, TransportMenuitemaction command);
@@ -434,14 +436,13 @@ static void mpris2_controller_set_player (Mpris2Controller* self, MprisPlayer* v
static void mpris2_controller_set_owner (Mpris2Controller* self, PlayerController* value);
FreeDesktopProperties* mpris2_controller_get_properties_interface (Mpris2Controller* self);
static void mpris2_controller_set_properties_interface (Mpris2Controller* self, FreeDesktopProperties* value);
-static void _mpris2_controller_property_changed_cb_free_desktop_properties_properties_changed (FreeDesktopProperties* _sender, const char* source, GHashTable* changed_properties, char** invalid, int invalid_length1, gpointer self);
static GObject * mpris2_controller_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
+static void _mpris2_controller_property_changed_cb_free_desktop_properties_properties_changed (FreeDesktopProperties* _sender, const gchar* source, GHashTable* changed_properties, gchar** invalid, int invalid_length1, gpointer self);
static void mpris2_controller_finalize (GObject* obj);
-static void mpris2_controller_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
-static void mpris2_controller_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
+static void _vala_mpris2_controller_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
+static void _vala_mpris2_controller_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
-static int _vala_strcmp0 (const char * str1, const char * str2);
static const DBusObjectPathVTable _mpris_root_dbus_path_vtable = {_mpris_root_dbus_unregister, mpris_root_dbus_message};
static const _DBusObjectVTable _mpris_root_dbus_vtable = {mpris_root_dbus_register_object};
@@ -450,9 +451,6 @@ static const _DBusObjectVTable _mpris_player_dbus_vtable = {mpris_player_dbus_re
static const DBusObjectPathVTable _free_desktop_properties_dbus_path_vtable = {_free_desktop_properties_dbus_unregister, free_desktop_properties_dbus_message};
static const _DBusObjectVTable _free_desktop_properties_dbus_vtable = {free_desktop_properties_dbus_register_object};
-static void g_cclosure_user_marshal_VOID__INT64 (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
-static void g_cclosure_user_marshal_VOID__STRING_BOXED_BOXED_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
-
void mpris_root_Quit (MprisRoot* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
MPRIS_ROOT_GET_INTERFACE (self)->Quit (self, _callback_, _user_data_);
}
@@ -503,22 +501,22 @@ void mpris_root_set_CanRaise (MprisRoot* self, gboolean value) {
}
-char* mpris_root_get_Identity (MprisRoot* self) {
+gchar* mpris_root_get_Identity (MprisRoot* self) {
return MPRIS_ROOT_GET_INTERFACE (self)->get_Identity (self);
}
-void mpris_root_set_Identity (MprisRoot* self, const char* value) {
+void mpris_root_set_Identity (MprisRoot* self, const gchar* value) {
MPRIS_ROOT_GET_INTERFACE (self)->set_Identity (self, value);
}
-char* mpris_root_get_DesktopEntry (MprisRoot* self) {
+gchar* mpris_root_get_DesktopEntry (MprisRoot* self) {
return MPRIS_ROOT_GET_INTERFACE (self)->get_DesktopEntry (self);
}
-void mpris_root_set_DesktopEntry (MprisRoot* self, const char* value) {
+void mpris_root_set_DesktopEntry (MprisRoot* self, const gchar* value) {
MPRIS_ROOT_GET_INTERFACE (self)->set_DesktopEntry (self, value);
}
@@ -618,7 +616,7 @@ static DBusHandlerResult _dbus_mpris_root_property_get (MprisRoot* self, DBusCon
dbus_message_iter_append_basic (&subiter, DBUS_TYPE_BOOLEAN, &_tmp4_);
dbus_message_iter_close_container (&reply_iter, &subiter);
} else if ((strcmp (interface_name, "org.mpris.MediaPlayer2") == 0) && (strcmp (property_name, "Identity") == 0)) {
- char* result;
+ gchar* result;
const char* _tmp5_;
dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "s", &subiter);
result = mpris_root_get_Identity (self);
@@ -627,7 +625,7 @@ static DBusHandlerResult _dbus_mpris_root_property_get (MprisRoot* self, DBusCon
_g_free0 (result);
dbus_message_iter_close_container (&reply_iter, &subiter);
} else if ((strcmp (interface_name, "org.mpris.MediaPlayer2") == 0) && (strcmp (property_name, "DesktopEntry") == 0)) {
- char* result;
+ gchar* result;
const char* _tmp6_;
dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "s", &subiter);
result = mpris_root_get_DesktopEntry (self);
@@ -692,7 +690,7 @@ static DBusHandlerResult _dbus_mpris_root_property_set (MprisRoot* self, DBusCon
value = _tmp11_;
mpris_root_set_CanRaise (self, value);
} else if ((strcmp (interface_name, "org.mpris.MediaPlayer2") == 0) && (strcmp (property_name, "Identity") == 0)) {
- char* value;
+ gchar* value;
const char* _tmp12_;
dbus_message_iter_get_basic (&subiter, &_tmp12_);
dbus_message_iter_next (&subiter);
@@ -700,7 +698,7 @@ static DBusHandlerResult _dbus_mpris_root_property_set (MprisRoot* self, DBusCon
mpris_root_set_Identity (self, value);
_g_free0 (value);
} else if ((strcmp (interface_name, "org.mpris.MediaPlayer2") == 0) && (strcmp (property_name, "DesktopEntry") == 0)) {
- char* value;
+ gchar* value;
const char* _tmp13_;
dbus_message_iter_get_basic (&subiter, &_tmp13_);
dbus_message_iter_next (&subiter);
@@ -780,7 +778,7 @@ static DBusHandlerResult _dbus_mpris_root_property_get_all (MprisRoot* self, DBu
dbus_message_iter_close_container (&subiter, &entry_iter);
}
{
- char* result;
+ gchar* result;
const char* _tmp18_;
dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter);
property_name = "Identity";
@@ -794,7 +792,7 @@ static DBusHandlerResult _dbus_mpris_root_property_get_all (MprisRoot* self, DBu
dbus_message_iter_close_container (&subiter, &entry_iter);
}
{
- char* result;
+ gchar* result;
const char* _tmp19_;
dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter);
property_name = "DesktopEntry";
@@ -1218,8 +1216,8 @@ static void mpris_root_dbus_proxy_dispose (GObject* self) {
static void mpris_root_dbus_proxy_class_init (MprisRootDBusProxyClass* klass) {
G_OBJECT_CLASS (klass)->constructor = mpris_root_dbus_proxy_construct;
G_OBJECT_CLASS (klass)->dispose = mpris_root_dbus_proxy_dispose;
- G_OBJECT_CLASS (klass)->get_property = mpris_root_dbus_proxy_get_property;
- G_OBJECT_CLASS (klass)->set_property = mpris_root_dbus_proxy_set_property;
+ G_OBJECT_CLASS (klass)->get_property = _vala_mpris_root_dbus_proxy_get_property;
+ G_OBJECT_CLASS (klass)->set_property = _vala_mpris_root_dbus_proxy_set_property;
g_object_class_override_property (G_OBJECT_CLASS (klass), MPRIS_ROOT_DBUS_PROXY_HAS_TRACKLIST, "HasTracklist");
g_object_class_override_property (G_OBJECT_CLASS (klass), MPRIS_ROOT_DBUS_PROXY_CAN_QUIT, "CanQuit");
g_object_class_override_property (G_OBJECT_CLASS (klass), MPRIS_ROOT_DBUS_PROXY_CAN_RAISE, "CanRaise");
@@ -1277,8 +1275,8 @@ static void mpris_root_dbus_proxy_Quit_finish (MprisRoot* self, GAsyncResult* _r
_reply = dbus_pending_call_steal_reply (_data_->pending);
dbus_set_error_from_message (&_dbus_error, _reply);
if (dbus_error_is_set (&_dbus_error)) {
- GQuark _edomain;
- gint _ecode;
+ GQuark _edomain = 0;
+ gint _ecode = 0;
if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) {
const char* _tmp0_;
_edomain = DBUS_GERROR;
@@ -1410,8 +1408,8 @@ static void mpris_root_dbus_proxy_Raise_finish (MprisRoot* self, GAsyncResult* _
_reply = dbus_pending_call_steal_reply (_data_->pending);
dbus_set_error_from_message (&_dbus_error, _reply);
if (dbus_error_is_set (&_dbus_error)) {
- GQuark _edomain;
- gint _ecode;
+ GQuark _edomain = 0;
+ gint _ecode = 0;
if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) {
const char* _tmp1_;
_edomain = DBUS_GERROR;
@@ -1765,14 +1763,14 @@ static void mpris_root_dbus_proxy_set_CanRaise (MprisRoot* self, gboolean value)
}
-static char* mpris_root_dbus_proxy_get_Identity (MprisRoot* self) {
+static gchar* mpris_root_dbus_proxy_get_Identity (MprisRoot* self) {
DBusError _dbus_error;
DBusGConnection *_connection;
DBusMessage *_message, *_reply;
DBusMessageIter _iter, _subiter;
const char* _tmp20_;
const char* _tmp21_;
- char* _result;
+ gchar* _result;
const char* _tmp22_;
if (((MprisRootDBusProxy*) self)->disposed) {
return NULL;
@@ -1813,7 +1811,7 @@ static char* mpris_root_dbus_proxy_get_Identity (MprisRoot* self) {
}
-static void mpris_root_dbus_proxy_set_Identity (MprisRoot* self, const char* value) {
+static void mpris_root_dbus_proxy_set_Identity (MprisRoot* self, const gchar* value) {
DBusError _dbus_error;
DBusGConnection *_connection;
DBusMessage *_message, *_reply;
@@ -1854,14 +1852,14 @@ static void mpris_root_dbus_proxy_set_Identity (MprisRoot* self, const char* val
}
-static char* mpris_root_dbus_proxy_get_DesktopEntry (MprisRoot* self) {
+static gchar* mpris_root_dbus_proxy_get_DesktopEntry (MprisRoot* self) {
DBusError _dbus_error;
DBusGConnection *_connection;
DBusMessage *_message, *_reply;
DBusMessageIter _iter, _subiter;
const char* _tmp26_;
const char* _tmp27_;
- char* _result;
+ gchar* _result;
const char* _tmp28_;
if (((MprisRootDBusProxy*) self)->disposed) {
return NULL;
@@ -1902,7 +1900,7 @@ static char* mpris_root_dbus_proxy_get_DesktopEntry (MprisRoot* self) {
}
-static void mpris_root_dbus_proxy_set_DesktopEntry (MprisRoot* self, const char* value) {
+static void mpris_root_dbus_proxy_set_DesktopEntry (MprisRoot* self, const gchar* value) {
DBusError _dbus_error;
DBusGConnection *_connection;
DBusMessage *_message, *_reply;
@@ -1961,11 +1959,11 @@ static void mpris_root_dbus_proxy_mpris_root__interface_init (MprisRootIface* if
}
-static void mpris_root_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
+static void _vala_mpris_root_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
}
-static void mpris_root_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
+static void _vala_mpris_root_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
}
@@ -2019,16 +2017,35 @@ void mpris_player_set_Position (MprisPlayer* self, gint32 value) {
}
-char* mpris_player_get_PlaybackStatus (MprisPlayer* self) {
+gchar* mpris_player_get_PlaybackStatus (MprisPlayer* self) {
return MPRIS_PLAYER_GET_INTERFACE (self)->get_PlaybackStatus (self);
}
-void mpris_player_set_PlaybackStatus (MprisPlayer* self, const char* value) {
+void mpris_player_set_PlaybackStatus (MprisPlayer* self, const gchar* value) {
MPRIS_PLAYER_GET_INTERFACE (self)->set_PlaybackStatus (self, value);
}
+static void g_cclosure_user_marshal_VOID__INT64 (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
+ typedef void (*GMarshalFunc_VOID__INT64) (gpointer data1, gint64 arg_1, gpointer data2);
+ register GMarshalFunc_VOID__INT64 callback;
+ register GCClosure * cc;
+ register gpointer data1, data2;
+ cc = (GCClosure *) closure;
+ g_return_if_fail (n_param_values == 2);
+ if (G_CCLOSURE_SWAP_DATA (closure)) {
+ data1 = closure->data;
+ data2 = param_values->data[0].v_pointer;
+ } else {
+ data1 = param_values->data[0].v_pointer;
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__INT64) (marshal_data ? marshal_data : cc->callback);
+ callback (data1, g_value_get_int64 (param_values + 1), data2);
+}
+
+
void _mpris_player_dbus_unregister (DBusConnection* connection, void* _user_data_) {
}
@@ -2090,12 +2107,12 @@ static DBusHandlerResult _dbus_mpris_player_property_get (MprisPlayer* self, DBu
dbus_message_iter_open_container (&subiter, DBUS_TYPE_ARRAY, "{sv}", &_tmp2_);
g_hash_table_iter_init (&_tmp4_, result);
while (g_hash_table_iter_next (&_tmp4_, &_tmp5_, &_tmp6_)) {
- char* _key;
+ gchar* _key;
GValue* _value;
const char* _tmp7_;
DBusMessageIter _tmp8_;
dbus_message_iter_open_container (&_tmp2_, DBUS_TYPE_DICT_ENTRY, NULL, &_tmp3_);
- _key = (char*) _tmp5_;
+ _key = (gchar*) _tmp5_;
_value = (GValue*) _tmp6_;
_tmp7_ = _key;
dbus_message_iter_append_basic (&_tmp3_, DBUS_TYPE_STRING, &_tmp7_);
@@ -2148,7 +2165,7 @@ static DBusHandlerResult _dbus_mpris_player_property_get (MprisPlayer* self, DBu
dbus_message_iter_append_basic (&_tmp8_, DBUS_TYPE_STRING, &_tmp16_);
dbus_message_iter_close_container (&_tmp3_, &_tmp8_);
} else if (G_VALUE_TYPE (_value) == G_TYPE_STRV) {
- const char** _tmp17_;
+ const gchar** _tmp17_;
DBusMessageIter _tmp18_;
int _tmp19_;
dbus_message_iter_open_container (&_tmp3_, DBUS_TYPE_VARIANT, "as", &_tmp8_);
@@ -2177,7 +2194,7 @@ static DBusHandlerResult _dbus_mpris_player_property_get (MprisPlayer* self, DBu
dbus_message_iter_append_basic (&subiter, DBUS_TYPE_INT32, &_tmp21_);
dbus_message_iter_close_container (&reply_iter, &subiter);
} else if ((strcmp (interface_name, "org.mpris.MediaPlayer2.Player") == 0) && (strcmp (property_name, "PlaybackStatus") == 0)) {
- char* result;
+ gchar* result;
const char* _tmp22_;
dbus_message_iter_open_container (&reply_iter, DBUS_TYPE_VARIANT, "s", &subiter);
result = mpris_player_get_PlaybackStatus (self);
@@ -2228,7 +2245,7 @@ static DBusHandlerResult _dbus_mpris_player_property_set (MprisPlayer* self, DBu
_tmp25_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
dbus_message_iter_recurse (&subiter, &_tmp26_);
while (dbus_message_iter_get_arg_type (&_tmp26_)) {
- char* _key;
+ gchar* _key;
GValue* _value;
const char* _tmp28_;
GValue _tmp29_ = {0};
@@ -2299,12 +2316,12 @@ static DBusHandlerResult _dbus_mpris_player_property_set (MprisPlayer* self, DBu
g_value_init (&_tmp29_, G_TYPE_STRING);
g_value_take_string (&_tmp29_, g_strdup (_tmp42_));
} else if ((dbus_message_iter_get_arg_type (&_tmp30_) == DBUS_TYPE_ARRAY) && (dbus_message_iter_get_element_type (&_tmp30_) == DBUS_TYPE_STRING)) {
- const char** _tmp43_;
+ const gchar** _tmp43_;
int _tmp43__length;
int _tmp43__size;
int _tmp43__length1;
DBusMessageIter _tmp44_;
- _tmp43_ = g_new (const char*, 5);
+ _tmp43_ = g_new (const gchar*, 5);
_tmp43__length = 0;
_tmp43__size = 4;
_tmp43__length1 = 0;
@@ -2313,7 +2330,7 @@ static DBusHandlerResult _dbus_mpris_player_property_set (MprisPlayer* self, DBu
const char* _tmp45_;
if (_tmp43__size == _tmp43__length) {
_tmp43__size = 2 * _tmp43__size;
- _tmp43_ = g_renew (const char*, _tmp43_, _tmp43__size + 1);
+ _tmp43_ = g_renew (const gchar*, _tmp43_, _tmp43__size + 1);
}
dbus_message_iter_get_basic (&_tmp44_, &_tmp45_);
dbus_message_iter_next (&_tmp44_);
@@ -2340,7 +2357,7 @@ static DBusHandlerResult _dbus_mpris_player_property_set (MprisPlayer* self, DBu
value = _tmp46_;
mpris_player_set_Position (self, value);
} else if ((strcmp (interface_name, "org.mpris.MediaPlayer2.Player") == 0) && (strcmp (property_name, "PlaybackStatus") == 0)) {
- char* value;
+ gchar* value;
const char* _tmp47_;
dbus_message_iter_get_basic (&subiter, &_tmp47_);
dbus_message_iter_next (&subiter);
@@ -2393,12 +2410,12 @@ static DBusHandlerResult _dbus_mpris_player_property_get_all (MprisPlayer* self,
dbus_message_iter_open_container (&value_iter, DBUS_TYPE_ARRAY, "{sv}", &_tmp49_);
g_hash_table_iter_init (&_tmp51_, result);
while (g_hash_table_iter_next (&_tmp51_, &_tmp52_, &_tmp53_)) {
- char* _key;
+ gchar* _key;
GValue* _value;
const char* _tmp54_;
DBusMessageIter _tmp55_;
dbus_message_iter_open_container (&_tmp49_, DBUS_TYPE_DICT_ENTRY, NULL, &_tmp50_);
- _key = (char*) _tmp52_;
+ _key = (gchar*) _tmp52_;
_value = (GValue*) _tmp53_;
_tmp54_ = _key;
dbus_message_iter_append_basic (&_tmp50_, DBUS_TYPE_STRING, &_tmp54_);
@@ -2451,7 +2468,7 @@ static DBusHandlerResult _dbus_mpris_player_property_get_all (MprisPlayer* self,
dbus_message_iter_append_basic (&_tmp55_, DBUS_TYPE_STRING, &_tmp63_);
dbus_message_iter_close_container (&_tmp50_, &_tmp55_);
} else if (G_VALUE_TYPE (_value) == G_TYPE_STRV) {
- const char** _tmp64_;
+ const gchar** _tmp64_;
DBusMessageIter _tmp65_;
int _tmp66_;
dbus_message_iter_open_container (&_tmp50_, DBUS_TYPE_VARIANT, "as", &_tmp55_);
@@ -2487,7 +2504,7 @@ static DBusHandlerResult _dbus_mpris_player_property_get_all (MprisPlayer* self,
dbus_message_iter_close_container (&subiter, &entry_iter);
}
{
- char* result;
+ gchar* result;
const char* _tmp69_;
dbus_message_iter_open_container (&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &entry_iter);
property_name = "PlaybackStatus";
@@ -3090,8 +3107,8 @@ static void mpris_player_dbus_proxy_dispose (GObject* self) {
static void mpris_player_dbus_proxy_class_init (MprisPlayerDBusProxyClass* klass) {
G_OBJECT_CLASS (klass)->constructor = mpris_player_dbus_proxy_construct;
G_OBJECT_CLASS (klass)->dispose = mpris_player_dbus_proxy_dispose;
- G_OBJECT_CLASS (klass)->get_property = mpris_player_dbus_proxy_get_property;
- G_OBJECT_CLASS (klass)->set_property = mpris_player_dbus_proxy_set_property;
+ G_OBJECT_CLASS (klass)->get_property = _vala_mpris_player_dbus_proxy_get_property;
+ G_OBJECT_CLASS (klass)->set_property = _vala_mpris_player_dbus_proxy_set_property;
g_object_class_override_property (G_OBJECT_CLASS (klass), MPRIS_PLAYER_DBUS_PROXY_METADATA, "Metadata");
g_object_class_override_property (G_OBJECT_CLASS (klass), MPRIS_PLAYER_DBUS_PROXY_POSITION, "Position");
g_object_class_override_property (G_OBJECT_CLASS (klass), MPRIS_PLAYER_DBUS_PROXY_PLAYBACK_STATUS, "PlaybackStatus");
@@ -3147,8 +3164,8 @@ static void mpris_player_dbus_proxy_PlayPause_finish (MprisPlayer* self, GAsyncR
_reply = dbus_pending_call_steal_reply (_data_->pending);
dbus_set_error_from_message (&_dbus_error, _reply);
if (dbus_error_is_set (&_dbus_error)) {
- GQuark _edomain;
- gint _ecode;
+ GQuark _edomain = 0;
+ gint _ecode = 0;
if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) {
const char* _tmp33_;
_edomain = DBUS_GERROR;
@@ -3280,8 +3297,8 @@ static void mpris_player_dbus_proxy_Next_finish (MprisPlayer* self, GAsyncResult
_reply = dbus_pending_call_steal_reply (_data_->pending);
dbus_set_error_from_message (&_dbus_error, _reply);
if (dbus_error_is_set (&_dbus_error)) {
- GQuark _edomain;
- gint _ecode;
+ GQuark _edomain = 0;
+ gint _ecode = 0;
if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) {
const char* _tmp34_;
_edomain = DBUS_GERROR;
@@ -3413,8 +3430,8 @@ static void mpris_player_dbus_proxy_Previous_finish (MprisPlayer* self, GAsyncRe
_reply = dbus_pending_call_steal_reply (_data_->pending);
dbus_set_error_from_message (&_dbus_error, _reply);
if (dbus_error_is_set (&_dbus_error)) {
- GQuark _edomain;
- gint _ecode;
+ GQuark _edomain = 0;
+ gint _ecode = 0;
if (strstr (_dbus_error.name, "org.freedesktop.DBus.Error") == _dbus_error.name) {
const char* _tmp35_;
_edomain = DBUS_GERROR;
@@ -3546,7 +3563,7 @@ static GHashTable* mpris_player_dbus_proxy_get_Metadata (MprisPlayer* self) {
_tmp38_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
dbus_message_iter_recurse (&_subiter, &_tmp39_);
while (dbus_message_iter_get_arg_type (&_tmp39_)) {
- char* _key;
+ gchar* _key;
GValue* _value;
const char* _tmp41_;
GValue _tmp42_ = {0};
@@ -3617,12 +3634,12 @@ static GHashTable* mpris_player_dbus_proxy_get_Metadata (MprisPlayer* self) {
g_value_init (&_tmp42_, G_TYPE_STRING);
g_value_take_string (&_tmp42_, g_strdup (_tmp55_));
} else if ((dbus_message_iter_get_arg_type (&_tmp43_) == DBUS_TYPE_ARRAY) && (dbus_message_iter_get_element_type (&_tmp43_) == DBUS_TYPE_STRING)) {
- const char** _tmp56_;
+ const gchar** _tmp56_;
int _tmp56__length;
int _tmp56__size;
int _tmp56__length1;
DBusMessageIter _tmp57_;
- _tmp56_ = g_new (const char*, 5);
+ _tmp56_ = g_new (const gchar*, 5);
_tmp56__length = 0;
_tmp56__size = 4;
_tmp56__length1 = 0;
@@ -3631,7 +3648,7 @@ static GHashTable* mpris_player_dbus_proxy_get_Metadata (MprisPlayer* self) {
const char* _tmp58_;
if (_tmp56__size == _tmp56__length) {
_tmp56__size = 2 * _tmp56__size;
- _tmp56_ = g_renew (const char*, _tmp56_, _tmp56__size + 1);
+ _tmp56_ = g_renew (const gchar*, _tmp56_, _tmp56__size + 1);
}
dbus_message_iter_get_basic (&_tmp57_, &_tmp58_);
dbus_message_iter_next (&_tmp57_);
@@ -3676,12 +3693,12 @@ static void mpris_player_dbus_proxy_set_Metadata (MprisPlayer* self, GHashTable*
dbus_message_iter_open_container (&_subiter, DBUS_TYPE_ARRAY, "{sv}", &_tmp61_);
g_hash_table_iter_init (&_tmp63_, value);
while (g_hash_table_iter_next (&_tmp63_, &_tmp64_, &_tmp65_)) {
- char* _key;
+ gchar* _key;
GValue* _value;
const char* _tmp66_;
DBusMessageIter _tmp67_;
dbus_message_iter_open_container (&_tmp61_, DBUS_TYPE_DICT_ENTRY, NULL, &_tmp62_);
- _key = (char*) _tmp64_;
+ _key = (gchar*) _tmp64_;
_value = (GValue*) _tmp65_;
_tmp66_ = _key;
dbus_message_iter_append_basic (&_tmp62_, DBUS_TYPE_STRING, &_tmp66_);
@@ -3734,7 +3751,7 @@ static void mpris_player_dbus_proxy_set_Metadata (MprisPlayer* self, GHashTable*
dbus_message_iter_append_basic (&_tmp67_, DBUS_TYPE_STRING, &_tmp75_);
dbus_message_iter_close_container (&_tmp62_, &_tmp67_);
} else if (G_VALUE_TYPE (_value) == G_TYPE_STRV) {
- const char** _tmp76_;
+ const gchar** _tmp76_;
DBusMessageIter _tmp77_;
int _tmp78_;
dbus_message_iter_open_container (&_tmp62_, DBUS_TYPE_VARIANT, "as", &_tmp67_);
@@ -3862,14 +3879,14 @@ static void mpris_player_dbus_proxy_set_Position (MprisPlayer* self, gint32 valu
}
-static char* mpris_player_dbus_proxy_get_PlaybackStatus (MprisPlayer* self) {
+static gchar* mpris_player_dbus_proxy_get_PlaybackStatus (MprisPlayer* self) {
DBusError _dbus_error;
DBusGConnection *_connection;
DBusMessage *_message, *_reply;
DBusMessageIter _iter, _subiter;
const char* _tmp86_;
const char* _tmp87_;
- char* _result;
+ gchar* _result;
const char* _tmp88_;
if (((MprisPlayerDBusProxy*) self)->disposed) {
return NULL;
@@ -3910,7 +3927,7 @@ static char* mpris_player_dbus_proxy_get_PlaybackStatus (MprisPlayer* self) {
}
-static void mpris_player_dbus_proxy_set_PlaybackStatus (MprisPlayer* self, const char* value) {
+static void mpris_player_dbus_proxy_set_PlaybackStatus (MprisPlayer* self, const gchar* value) {
DBusError _dbus_error;
DBusGConnection *_connection;
DBusMessage *_message, *_reply;
@@ -3967,11 +3984,30 @@ static void mpris_player_dbus_proxy_mpris_player__interface_init (MprisPlayerIfa
}
-static void mpris_player_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
+static void _vala_mpris_player_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
}
-static void mpris_player_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
+static void _vala_mpris_player_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
+}
+
+
+static void g_cclosure_user_marshal_VOID__STRING_BOXED_BOXED_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
+ typedef void (*GMarshalFunc_VOID__STRING_BOXED_BOXED_INT) (gpointer data1, const char* arg_1, gpointer arg_2, gpointer arg_3, gint arg_4, gpointer data2);
+ register GMarshalFunc_VOID__STRING_BOXED_BOXED_INT callback;
+ register GCClosure * cc;
+ register gpointer data1, data2;
+ cc = (GCClosure *) closure;
+ g_return_if_fail (n_param_values == 5);
+ if (G_CCLOSURE_SWAP_DATA (closure)) {
+ data1 = closure->data;
+ data2 = param_values->data[0].v_pointer;
+ } else {
+ data1 = param_values->data[0].v_pointer;
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__STRING_BOXED_BOXED_INT) (marshal_data ? marshal_data : cc->callback);
+ callback (data1, g_value_get_string (param_values + 1), g_value_get_boxed (param_values + 2), g_value_get_boxed (param_values + 3), g_value_get_int (param_values + 4), data2);
}
@@ -4055,7 +4091,7 @@ DBusHandlerResult free_desktop_properties_dbus_message (DBusConnection* connecti
}
-static void _dbus_free_desktop_properties_properties_changed (GObject* _sender, const char* source, GHashTable* changed_properties, char** invalid, int invalid_length1, DBusConnection* _connection) {
+static void _dbus_free_desktop_properties_properties_changed (GObject* _sender, const gchar* source, GHashTable* changed_properties, gchar** invalid, int invalid_length1, DBusConnection* _connection) {
const char * _path;
DBusMessage *_message;
DBusMessageIter _iter;
@@ -4063,7 +4099,7 @@ static void _dbus_free_desktop_properties_properties_changed (GObject* _sender,
DBusMessageIter _tmp2_, _tmp3_;
GHashTableIter _tmp4_;
gpointer _tmp5_, _tmp6_;
- char** _tmp21_;
+ gchar** _tmp21_;
DBusMessageIter _tmp22_;
int _tmp23_;
_path = g_object_get_data (_sender, "dbus_object_path");
@@ -4074,12 +4110,12 @@ static void _dbus_free_desktop_properties_properties_changed (GObject* _sender,
dbus_message_iter_open_container (&_iter, DBUS_TYPE_ARRAY, "{sv}", &_tmp2_);
g_hash_table_iter_init (&_tmp4_, changed_properties);
while (g_hash_table_iter_next (&_tmp4_, &_tmp5_, &_tmp6_)) {
- char* _key;
+ gchar* _key;
GValue* _value;
const char* _tmp7_;
DBusMessageIter _tmp8_;
dbus_message_iter_open_container (&_tmp2_, DBUS_TYPE_DICT_ENTRY, NULL, &_tmp3_);
- _key = (char*) _tmp5_;
+ _key = (gchar*) _tmp5_;
_value = (GValue*) _tmp6_;
_tmp7_ = _key;
dbus_message_iter_append_basic (&_tmp3_, DBUS_TYPE_STRING, &_tmp7_);
@@ -4132,7 +4168,7 @@ static void _dbus_free_desktop_properties_properties_changed (GObject* _sender,
dbus_message_iter_append_basic (&_tmp8_, DBUS_TYPE_STRING, &_tmp16_);
dbus_message_iter_close_container (&_tmp3_, &_tmp8_);
} else if (G_VALUE_TYPE (_value) == G_TYPE_STRV) {
- const char** _tmp17_;
+ const gchar** _tmp17_;
DBusMessageIter _tmp18_;
int _tmp19_;
dbus_message_iter_open_container (&_tmp3_, DBUS_TYPE_VARIANT, "as", &_tmp8_);
@@ -4226,15 +4262,15 @@ static GObject* free_desktop_properties_dbus_proxy_construct (GType gtype, guint
static void _dbus_handle_free_desktop_properties_properties_changed (FreeDesktopProperties* self, DBusConnection* connection, DBusMessage* message) {
DBusMessageIter iter;
- char* source = NULL;
+ gchar* source = NULL;
const char* _tmp92_;
GHashTable* changed_properties = NULL;
GHashTable* _tmp93_;
DBusMessageIter _tmp94_;
DBusMessageIter _tmp95_;
- char** invalid = NULL;
+ gchar** invalid = NULL;
int invalid_length1;
- char** _tmp114_;
+ gchar** _tmp114_;
int _tmp114__length;
int _tmp114__size;
int _tmp114__length1;
@@ -4250,7 +4286,7 @@ static void _dbus_handle_free_desktop_properties_properties_changed (FreeDesktop
_tmp93_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
dbus_message_iter_recurse (&iter, &_tmp94_);
while (dbus_message_iter_get_arg_type (&_tmp94_)) {
- char* _key;
+ gchar* _key;
GValue* _value;
const char* _tmp96_;
GValue _tmp97_ = {0};
@@ -4321,12 +4357,12 @@ static void _dbus_handle_free_desktop_properties_properties_changed (FreeDesktop
g_value_init (&_tmp97_, G_TYPE_STRING);
g_value_take_string (&_tmp97_, g_strdup (_tmp110_));
} else if ((dbus_message_iter_get_arg_type (&_tmp98_) == DBUS_TYPE_ARRAY) && (dbus_message_iter_get_element_type (&_tmp98_) == DBUS_TYPE_STRING)) {
- const char** _tmp111_;
+ const gchar** _tmp111_;
int _tmp111__length;
int _tmp111__size;
int _tmp111__length1;
DBusMessageIter _tmp112_;
- _tmp111_ = g_new (const char*, 5);
+ _tmp111_ = g_new (const gchar*, 5);
_tmp111__length = 0;
_tmp111__size = 4;
_tmp111__length1 = 0;
@@ -4335,7 +4371,7 @@ static void _dbus_handle_free_desktop_properties_properties_changed (FreeDesktop
const char* _tmp113_;
if (_tmp111__size == _tmp111__length) {
_tmp111__size = 2 * _tmp111__size;
- _tmp111_ = g_renew (const char*, _tmp111_, _tmp111__size + 1);
+ _tmp111_ = g_renew (const gchar*, _tmp111_, _tmp111__size + 1);
}
dbus_message_iter_get_basic (&_tmp112_, &_tmp113_);
dbus_message_iter_next (&_tmp112_);
@@ -4353,7 +4389,7 @@ static void _dbus_handle_free_desktop_properties_properties_changed (FreeDesktop
dbus_message_iter_next (&iter);
changed_properties = _tmp93_;
invalid_length1 = 0;
- _tmp114_ = g_new (char*, 5);
+ _tmp114_ = g_new (gchar*, 5);
_tmp114__length = 0;
_tmp114__size = 4;
_tmp114__length1 = 0;
@@ -4362,7 +4398,7 @@ static void _dbus_handle_free_desktop_properties_properties_changed (FreeDesktop
const char* _tmp116_;
if (_tmp114__size == _tmp114__length) {
_tmp114__size = 2 * _tmp114__size;
- _tmp114_ = g_renew (char*, _tmp114_, _tmp114__size + 1);
+ _tmp114_ = g_renew (gchar*, _tmp114_, _tmp114__size + 1);
}
dbus_message_iter_get_basic (&_tmp115_, &_tmp116_);
dbus_message_iter_next (&_tmp115_);
@@ -4404,8 +4440,8 @@ static void free_desktop_properties_dbus_proxy_dispose (GObject* self) {
static void free_desktop_properties_dbus_proxy_class_init (FreeDesktopPropertiesDBusProxyClass* klass) {
G_OBJECT_CLASS (klass)->constructor = free_desktop_properties_dbus_proxy_construct;
G_OBJECT_CLASS (klass)->dispose = free_desktop_properties_dbus_proxy_dispose;
- G_OBJECT_CLASS (klass)->get_property = free_desktop_properties_dbus_proxy_get_property;
- G_OBJECT_CLASS (klass)->set_property = free_desktop_properties_dbus_proxy_set_property;
+ G_OBJECT_CLASS (klass)->get_property = _vala_free_desktop_properties_dbus_proxy_get_property;
+ G_OBJECT_CLASS (klass)->set_property = _vala_free_desktop_properties_dbus_proxy_set_property;
}
@@ -4417,16 +4453,16 @@ static void free_desktop_properties_dbus_proxy_free_desktop_properties__interfac
}
-static void free_desktop_properties_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
+static void _vala_free_desktop_properties_dbus_proxy_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
}
-static void free_desktop_properties_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
+static void _vala_free_desktop_properties_dbus_proxy_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
}
Mpris2Controller* mpris2_controller_construct (GType object_type, PlayerController* ctrl) {
- Mpris2Controller * self;
+ Mpris2Controller * self = NULL;
g_return_val_if_fail (ctrl != NULL, NULL);
self = (Mpris2Controller*) g_object_new (object_type, "owner", ctrl, NULL);
return self;
@@ -4454,52 +4490,86 @@ static void _vala_GValue_free (GValue* self) {
}
-void mpris2_controller_property_changed_cb (Mpris2Controller* self, const char* interface_source, GHashTable* changed_properties, char** invalid, int invalid_length1) {
- gboolean _tmp0_ = FALSE;
+void mpris2_controller_property_changed_cb (Mpris2Controller* self, const gchar* interface_source, GHashTable* changed_properties, gchar** invalid, int invalid_length1) {
+ const gchar* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+ gconstpointer _tmp3_ = NULL;
+ GValue* _tmp4_;
GValue* play_v;
+ gconstpointer _tmp10_ = NULL;
+ GValue* _tmp11_;
GValue* meta_v;
g_return_if_fail (self != NULL);
g_return_if_fail (interface_source != NULL);
g_return_if_fail (changed_properties != NULL);
+ _tmp0_ = player_controller_get_mpris_name (self->priv->_owner);
g_debug ("mpris2-controller.vala:95: properties-changed for interface %s and own" \
-"er %s", interface_source, player_controller_get_mpris_name (self->priv->_owner));
+"er %s", interface_source, _tmp0_);
if (changed_properties == NULL) {
- _tmp0_ = TRUE;
+ _tmp1_ = TRUE;
} else {
- _tmp0_ = g_str_has_prefix (interface_source, MPRIS2_CONTROLLER_root_interface) == FALSE;
+ gboolean _tmp2_;
+ _tmp2_ = g_str_has_prefix (interface_source, MPRIS2_CONTROLLER_root_interface);
+ _tmp1_ = _tmp2_ == FALSE;
}
- if (_tmp0_) {
+ if (_tmp1_) {
g_warning ("mpris2-controller.vala:98: Property-changed hash is null or this is an" \
" interface that doesn't concerns us");
return;
}
- play_v = __g_value_dup0 ((GValue*) g_hash_table_lookup (changed_properties, "PlaybackStatus"));
+ _tmp3_ = g_hash_table_lookup (changed_properties, "PlaybackStatus");
+ _tmp4_ = __g_value_dup0 ((GValue*) _tmp3_);
+ play_v = _tmp4_;
if (play_v != NULL) {
- char* state;
+ gchar* _tmp5_ = NULL;
+ gchar* state;
+ TransportMenuitemstate _tmp6_;
TransportMenuitemstate p;
- PlayerItem* _tmp1_;
- TransportMenuitem* _tmp2_;
- state = mpris_player_get_PlaybackStatus (self->priv->_player);
- p = (TransportMenuitemstate) mpris2_controller_determine_play_state (self, state);
- transport_menuitem_change_play_state (_tmp2_ = (_tmp1_ = (PlayerItem*) gee_abstract_list_get ((GeeAbstractList*) self->priv->_owner->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_TRANSPORT), IS_TRANSPORT_MENUITEM (_tmp1_) ? ((TransportMenuitem*) _tmp1_) : NULL), p);
- _g_object_unref0 (_tmp2_);
+ gpointer _tmp7_ = NULL;
+ PlayerItem* _tmp8_;
+ TransportMenuitem* _tmp9_;
+ _tmp5_ = mpris_player_get_PlaybackStatus (self->priv->_player);
+ state = _tmp5_;
+ _tmp6_ = mpris2_controller_determine_play_state (self, state);
+ p = (TransportMenuitemstate) _tmp6_;
+ _tmp7_ = gee_abstract_list_get ((GeeAbstractList*) self->priv->_owner->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_TRANSPORT);
+ _tmp9_ = (_tmp8_ = (PlayerItem*) _tmp7_, IS_TRANSPORT_MENUITEM (_tmp8_) ? ((TransportMenuitem*) _tmp8_) : NULL);
+ transport_menuitem_change_play_state (_tmp9_, p);
+ _g_object_unref0 (_tmp9_);
_g_free0 (state);
}
- meta_v = __g_value_dup0 ((GValue*) g_hash_table_lookup (changed_properties, "Metadata"));
+ _tmp10_ = g_hash_table_lookup (changed_properties, "Metadata");
+ _tmp11_ = __g_value_dup0 ((GValue*) _tmp10_);
+ meta_v = _tmp11_;
if (meta_v != NULL) {
+ GHashTable* _tmp12_ = NULL;
GHashTable* changed_updates;
+ gpointer _tmp13_ = NULL;
PlayerItem* metadata;
- GeeHashSet* _tmp3_;
- GeeHashSet* _tmp4_;
- GeeHashSet* _tmp5_;
- changed_updates = mpris2_controller_clean_metadata (self);
- metadata = (PlayerItem*) gee_abstract_list_get ((GeeAbstractList*) self->priv->_owner->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_METADATA);
- player_item_reset (metadata, _tmp3_ = metadata_menuitem_attributes_format ());
- _g_object_unref0 (_tmp3_);
- player_item_update (metadata, changed_updates, _tmp4_ = metadata_menuitem_attributes_format ());
- _g_object_unref0 (_tmp4_);
- dbusmenu_menuitem_property_set_bool ((DbusmenuMenuitem*) metadata, DBUSMENU_MENUITEM_PROP_VISIBLE, player_item_populated (metadata, _tmp5_ = metadata_menuitem_attributes_format ()));
- _g_object_unref0 (_tmp5_);
+ GeeHashSet* _tmp14_ = NULL;
+ GeeHashSet* _tmp15_;
+ GeeHashSet* _tmp16_ = NULL;
+ GeeHashSet* _tmp17_;
+ GeeHashSet* _tmp18_ = NULL;
+ GeeHashSet* _tmp19_;
+ gboolean _tmp20_;
+ _tmp12_ = mpris2_controller_clean_metadata (self);
+ changed_updates = _tmp12_;
+ _tmp13_ = gee_abstract_list_get ((GeeAbstractList*) self->priv->_owner->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_METADATA);
+ metadata = (PlayerItem*) _tmp13_;
+ _tmp14_ = metadata_menuitem_attributes_format ();
+ _tmp15_ = _tmp14_;
+ player_item_reset (metadata, _tmp15_);
+ _g_object_unref0 (_tmp15_);
+ _tmp16_ = metadata_menuitem_attributes_format ();
+ _tmp17_ = _tmp16_;
+ player_item_update (metadata, changed_updates, _tmp17_);
+ _g_object_unref0 (_tmp17_);
+ _tmp18_ = metadata_menuitem_attributes_format ();
+ _tmp19_ = _tmp18_;
+ _tmp20_ = player_item_populated (metadata, _tmp19_);
+ dbusmenu_menuitem_property_set_bool ((DbusmenuMenuitem*) metadata, DBUSMENU_MENUITEM_PROP_VISIBLE, _tmp20_);
+ _g_object_unref0 (_tmp19_);
_g_object_unref0 (metadata);
_g_hash_table_unref0 (changed_updates);
}
@@ -4508,10 +4578,10 @@ void mpris2_controller_property_changed_cb (Mpris2Controller* self, const char*
}
-static char** _vala_array_dup1 (char** self, int length) {
- char** result;
+static gchar** _vala_array_dup1 (gchar** self, int length) {
+ gchar** result;
int i;
- result = g_new0 (char*, length + 1);
+ result = g_new0 (gchar*, length + 1);
for (i = 0; i < length; i++) {
result[i] = g_strdup (self[i]);
}
@@ -4521,41 +4591,80 @@ static char** _vala_array_dup1 (char** self, int length) {
static GHashTable* mpris2_controller_clean_metadata (Mpris2Controller* self) {
GHashTable* result = NULL;
+ GHashTable* _tmp0_ = NULL;
GHashTable* changed_updates;
- GHashTable* _tmp0_;
- GValue* _tmp1_;
+ GHashTable* _tmp1_ = NULL;
+ GHashTable* _tmp2_;
+ gconstpointer _tmp3_ = NULL;
+ GValue* _tmp4_;
+ GValue* _tmp5_;
GValue* artist_v;
- GHashTable* _tmp7_;
- GValue* _tmp8_;
+ GHashTable* _tmp16_ = NULL;
+ GHashTable* _tmp17_;
+ gconstpointer _tmp18_ = NULL;
+ GValue* _tmp19_;
+ GValue* _tmp20_;
GValue* length_v;
g_return_val_if_fail (self != NULL, NULL);
- changed_updates = mpris_player_get_Metadata (self->priv->_player);
- artist_v = (_tmp1_ = __g_value_dup0 ((GValue*) g_hash_table_lookup (_tmp0_ = mpris_player_get_Metadata (self->priv->_player), "xesam:artist")), _g_hash_table_unref0 (_tmp0_), _tmp1_);
+ _tmp0_ = mpris_player_get_Metadata (self->priv->_player);
+ changed_updates = _tmp0_;
+ _tmp1_ = mpris_player_get_Metadata (self->priv->_player);
+ _tmp2_ = _tmp1_;
+ _tmp3_ = g_hash_table_lookup (_tmp2_, "xesam:artist");
+ _tmp4_ = __g_value_dup0 ((GValue*) _tmp3_);
+ artist_v = (_tmp5_ = _tmp4_, _g_hash_table_unref0 (_tmp2_), _tmp5_);
if (artist_v != NULL) {
+ GHashTable* _tmp6_ = NULL;
+ GHashTable* _tmp7_;
+ gconstpointer _tmp8_ = NULL;
+ gchar** _tmp9_;
+ gchar** _tmp10_;
+ gchar** _tmp11_;
gint artists_length1;
gint _artists_size_;
- char** _tmp5_;
- GHashTable* _tmp2_;
- char** _tmp3_;
- char** _tmp4_;
- char** artists;
- char* display_artists;
- GValue* _tmp6_ = NULL;
- artists = (_tmp5_ = (_tmp4_ = (_tmp3_ = g_value_get_boxed ((GValue*) g_hash_table_lookup (_tmp2_ = mpris_player_get_Metadata (self->priv->_player), "xesam:artist")), (_tmp3_ == NULL) ? ((gpointer) _tmp3_) : _vala_array_dup1 (_tmp3_, g_strv_length (g_value_get_boxed ((GValue*) g_hash_table_lookup (_tmp2_ = mpris_player_get_Metadata (self->priv->_player), "xesam:artist"))))), _g_hash_table_unref0 (_tmp2_), _tmp4_), artists_length1 = g_strv_length (g_value_get_boxed ((GValue*) g_hash_table_lookup (_tmp2_ = mpris_player_get_Metadata (self->priv->_player), "xesam:artist"))), _artists_size_ = artists_length1, _tmp5_);
- display_artists = g_strjoinv (", ", artists);
- g_hash_table_replace (changed_updates, g_strdup ("xesam:artist"), (_tmp6_ = g_new0 (GValue, 1), g_value_init (_tmp6_, G_TYPE_STRING), g_value_set_string (_tmp6_, display_artists), _tmp6_));
+ gchar** _tmp12_;
+ gchar** artists;
+ gchar* _tmp13_ = NULL;
+ gchar* display_artists;
+ gchar* _tmp14_;
+ GValue* _tmp15_ = NULL;
+ _tmp6_ = mpris_player_get_Metadata (self->priv->_player);
+ _tmp7_ = _tmp6_;
+ _tmp8_ = g_hash_table_lookup (_tmp7_, "xesam:artist");
+ _tmp9_ = (_tmp10_ = g_value_get_boxed ((GValue*) _tmp8_), (_tmp10_ == NULL) ? ((gpointer) _tmp10_) : _vala_array_dup1 (_tmp10_, g_strv_length (g_value_get_boxed ((GValue*) _tmp8_))));
+ _tmp12_ = (_tmp11_ = _tmp9_, _g_hash_table_unref0 (_tmp7_), _tmp11_);
+ artists_length1 = g_strv_length (g_value_get_boxed ((GValue*) _tmp8_));
+ _artists_size_ = artists_length1;
+ artists = _tmp12_;
+ _tmp13_ = g_strjoinv (", ", artists);
+ display_artists = _tmp13_;
+ _tmp14_ = g_strdup ("xesam:artist");
+ g_hash_table_replace (changed_updates, _tmp14_, (_tmp15_ = g_new0 (GValue, 1), g_value_init (_tmp15_, G_TYPE_STRING), g_value_set_string (_tmp15_, display_artists), _tmp15_));
g_debug ("mpris2-controller.vala:128: artist : %s", display_artists);
_g_free0 (display_artists);
artists = (_vala_array_free (artists, artists_length1, (GDestroyNotify) g_free), NULL);
}
- length_v = (_tmp8_ = __g_value_dup0 ((GValue*) g_hash_table_lookup (_tmp7_ = mpris_player_get_Metadata (self->priv->_player), "mpris:length")), _g_hash_table_unref0 (_tmp7_), _tmp8_);
+ _tmp16_ = mpris_player_get_Metadata (self->priv->_player);
+ _tmp17_ = _tmp16_;
+ _tmp18_ = g_hash_table_lookup (_tmp17_, "mpris:length");
+ _tmp19_ = __g_value_dup0 ((GValue*) _tmp18_);
+ length_v = (_tmp20_ = _tmp19_, _g_hash_table_unref0 (_tmp17_), _tmp20_);
if (length_v != NULL) {
- GHashTable* _tmp9_;
- gint64 _tmp10_;
+ GHashTable* _tmp21_ = NULL;
+ GHashTable* _tmp22_;
+ gconstpointer _tmp23_ = NULL;
+ gint64 _tmp24_;
+ gint64 _tmp25_;
gint64 duration;
- GValue* _tmp11_ = NULL;
- duration = (_tmp10_ = g_value_get_int64 ((GValue*) g_hash_table_lookup (_tmp9_ = mpris_player_get_Metadata (self->priv->_player), "mpris:length")), _g_hash_table_unref0 (_tmp9_), _tmp10_);
- g_hash_table_replace (changed_updates, g_strdup ("mpris:length"), (_tmp11_ = g_new0 (GValue, 1), g_value_init (_tmp11_, G_TYPE_INT64), g_value_set_int64 (_tmp11_, duration / 1000000), _tmp11_));
+ gchar* _tmp26_;
+ GValue* _tmp27_ = NULL;
+ _tmp21_ = mpris_player_get_Metadata (self->priv->_player);
+ _tmp22_ = _tmp21_;
+ _tmp23_ = g_hash_table_lookup (_tmp22_, "mpris:length");
+ _tmp24_ = g_value_get_int64 ((GValue*) _tmp23_);
+ duration = (_tmp25_ = _tmp24_, _g_hash_table_unref0 (_tmp22_), _tmp25_);
+ _tmp26_ = g_strdup ("mpris:length");
+ g_hash_table_replace (changed_updates, _tmp26_, (_tmp27_ = g_new0 (GValue, 1), g_value_init (_tmp27_, G_TYPE_INT64), g_value_set_int64 (_tmp27_, duration / 1000000), _tmp27_));
}
result = changed_updates;
__vala_GValue_free0 (length_v);
@@ -4564,13 +4673,13 @@ static GHashTable* mpris2_controller_clean_metadata (Mpris2Controller* self) {
}
-static TransportMenuitemstate mpris2_controller_determine_play_state (Mpris2Controller* self, const char* status) {
+static TransportMenuitemstate mpris2_controller_determine_play_state (Mpris2Controller* self, const gchar* status) {
TransportMenuitemstate result = 0;
gboolean _tmp0_ = FALSE;
g_return_val_if_fail (self != NULL, 0);
g_return_val_if_fail (status != NULL, 0);
if (status != NULL) {
- _tmp0_ = _vala_strcmp0 (status, "Playing") == 0;
+ _tmp0_ = g_strcmp0 (status, "Playing") == 0;
} else {
_tmp0_ = FALSE;
}
@@ -4585,27 +4694,46 @@ static TransportMenuitemstate mpris2_controller_determine_play_state (Mpris2Cont
void mpris2_controller_initial_update (Mpris2Controller* self) {
TransportMenuitemstate update = 0;
- char* _tmp0_;
- gboolean _tmp1_;
- PlayerItem* _tmp3_;
- TransportMenuitem* _tmp4_;
+ gchar* _tmp0_ = NULL;
+ gchar* _tmp1_;
+ gboolean _tmp2_;
+ gpointer _tmp6_ = NULL;
+ PlayerItem* _tmp7_;
+ TransportMenuitem* _tmp8_;
+ GHashTable* _tmp9_ = NULL;
GHashTable* cleaned_metadata;
- PlayerItem* _tmp5_;
- GeeHashSet* _tmp6_;
+ gpointer _tmp10_ = NULL;
+ PlayerItem* _tmp11_;
+ GeeHashSet* _tmp12_ = NULL;
+ GeeHashSet* _tmp13_;
g_return_if_fail (self != NULL);
- if ((_tmp1_ = (_tmp0_ = mpris_player_get_PlaybackStatus (self->priv->_player)) == NULL, _g_free0 (_tmp0_), _tmp1_)) {
+ _tmp0_ = mpris_player_get_PlaybackStatus (self->priv->_player);
+ _tmp1_ = _tmp0_;
+ if ((_tmp2_ = _tmp1_ == NULL, _g_free0 (_tmp1_), _tmp2_)) {
update = TRANSPORT_MENUITEM_STATE_PAUSED;
} else {
- char* _tmp2_;
- update = mpris2_controller_determine_play_state (self, _tmp2_ = mpris_player_get_PlaybackStatus (self->priv->_player));
- _g_free0 (_tmp2_);
- }
- transport_menuitem_change_play_state (_tmp4_ = (_tmp3_ = (PlayerItem*) gee_abstract_list_get ((GeeAbstractList*) self->priv->_owner->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_TRANSPORT), IS_TRANSPORT_MENUITEM (_tmp3_) ? ((TransportMenuitem*) _tmp3_) : NULL), update);
- _g_object_unref0 (_tmp4_);
- cleaned_metadata = mpris2_controller_clean_metadata (self);
- player_item_update (_tmp5_ = (PlayerItem*) gee_abstract_list_get ((GeeAbstractList*) self->priv->_owner->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_METADATA), cleaned_metadata, _tmp6_ = metadata_menuitem_attributes_format ());
- _g_object_unref0 (_tmp6_);
- _g_object_unref0 (_tmp5_);
+ gchar* _tmp3_ = NULL;
+ gchar* _tmp4_;
+ TransportMenuitemstate _tmp5_;
+ _tmp3_ = mpris_player_get_PlaybackStatus (self->priv->_player);
+ _tmp4_ = _tmp3_;
+ _tmp5_ = mpris2_controller_determine_play_state (self, _tmp4_);
+ update = _tmp5_;
+ _g_free0 (_tmp4_);
+ }
+ _tmp6_ = gee_abstract_list_get ((GeeAbstractList*) self->priv->_owner->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_TRANSPORT);
+ _tmp8_ = (_tmp7_ = (PlayerItem*) _tmp6_, IS_TRANSPORT_MENUITEM (_tmp7_) ? ((TransportMenuitem*) _tmp7_) : NULL);
+ transport_menuitem_change_play_state (_tmp8_, update);
+ _g_object_unref0 (_tmp8_);
+ _tmp9_ = mpris2_controller_clean_metadata (self);
+ cleaned_metadata = _tmp9_;
+ _tmp10_ = gee_abstract_list_get ((GeeAbstractList*) self->priv->_owner->custom_items, (gint) PLAYER_CONTROLLER_WIDGET_ORDER_METADATA);
+ _tmp11_ = (PlayerItem*) _tmp10_;
+ _tmp12_ = metadata_menuitem_attributes_format ();
+ _tmp13_ = _tmp12_;
+ player_item_update (_tmp11_, cleaned_metadata, _tmp13_);
+ _g_object_unref0 (_tmp13_);
+ _g_object_unref0 (_tmp11_);
_g_hash_table_unref0 (cleaned_metadata);
}
@@ -4660,8 +4788,10 @@ gboolean mpris2_controller_was_successfull (Mpris2Controller* self) {
void mpris2_controller_expose (Mpris2Controller* self) {
+ gboolean _tmp0_;
g_return_if_fail (self != NULL);
- if (mpris2_controller_connected (self) == TRUE) {
+ _tmp0_ = mpris2_controller_connected (self);
+ if (_tmp0_ == TRUE) {
mpris_root_Raise (self->priv->_mpris2_root, NULL, NULL);
}
}
@@ -4682,8 +4812,12 @@ static gpointer _g_object_ref0 (gpointer self) {
static void mpris2_controller_set_mpris2_root (Mpris2Controller* self, MprisRoot* value) {
MprisRoot* _tmp0_;
+ MprisRoot* _tmp1_;
g_return_if_fail (self != NULL);
- self->priv->_mpris2_root = (_tmp0_ = _g_object_ref0 (value), _g_object_unref0 (self->priv->_mpris2_root), _tmp0_);
+ _tmp0_ = _g_object_ref0 (value);
+ _tmp1_ = _tmp0_;
+ _g_object_unref0 (self->priv->_mpris2_root);
+ self->priv->_mpris2_root = _tmp1_;
g_object_notify ((GObject *) self, "mpris2-root");
}
@@ -4698,8 +4832,12 @@ MprisPlayer* mpris2_controller_get_player (Mpris2Controller* self) {
static void mpris2_controller_set_player (Mpris2Controller* self, MprisPlayer* value) {
MprisPlayer* _tmp0_;
+ MprisPlayer* _tmp1_;
g_return_if_fail (self != NULL);
- self->priv->_player = (_tmp0_ = _g_object_ref0 (value), _g_object_unref0 (self->priv->_player), _tmp0_);
+ _tmp0_ = _g_object_ref0 (value);
+ _tmp1_ = _tmp0_;
+ _g_object_unref0 (self->priv->_player);
+ self->priv->_player = _tmp1_;
g_object_notify ((GObject *) self, "player");
}
@@ -4714,8 +4852,12 @@ PlayerController* mpris2_controller_get_owner (Mpris2Controller* self) {
static void mpris2_controller_set_owner (Mpris2Controller* self, PlayerController* value) {
PlayerController* _tmp0_;
+ PlayerController* _tmp1_;
g_return_if_fail (self != NULL);
- self->priv->_owner = (_tmp0_ = _g_object_ref0 (value), _g_object_unref0 (self->priv->_owner), _tmp0_);
+ _tmp0_ = _g_object_ref0 (value);
+ _tmp1_ = _tmp0_;
+ _g_object_unref0 (self->priv->_owner);
+ self->priv->_owner = _tmp1_;
g_object_notify ((GObject *) self, "owner");
}
@@ -4730,13 +4872,17 @@ FreeDesktopProperties* mpris2_controller_get_properties_interface (Mpris2Control
static void mpris2_controller_set_properties_interface (Mpris2Controller* self, FreeDesktopProperties* value) {
FreeDesktopProperties* _tmp0_;
+ FreeDesktopProperties* _tmp1_;
g_return_if_fail (self != NULL);
- self->priv->_properties_interface = (_tmp0_ = _g_object_ref0 (value), _g_object_unref0 (self->priv->_properties_interface), _tmp0_);
+ _tmp0_ = _g_object_ref0 (value);
+ _tmp1_ = _tmp0_;
+ _g_object_unref0 (self->priv->_properties_interface);
+ self->priv->_properties_interface = _tmp1_;
g_object_notify ((GObject *) self, "properties-interface");
}
-static void _mpris2_controller_property_changed_cb_free_desktop_properties_properties_changed (FreeDesktopProperties* _sender, const char* source, GHashTable* changed_properties, char** invalid, int invalid_length1, gpointer self) {
+static void _mpris2_controller_property_changed_cb_free_desktop_properties_properties_changed (FreeDesktopProperties* _sender, const gchar* source, GHashTable* changed_properties, gchar** invalid, int invalid_length1, gpointer self) {
mpris2_controller_property_changed_cb (self, source, changed_properties, invalid, invalid_length1);
}
@@ -4745,68 +4891,107 @@ static GObject * mpris2_controller_constructor (GType type, guint n_construct_pr
GObject * obj;
GObjectClass * parent_class;
Mpris2Controller * self;
- GError * _inner_error_;
+ DBusGConnection* _tmp0_ = NULL;
+ DBusGConnection* connection;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_;
+ const gchar* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ gchar* _tmp5_;
+ DBusGProxy* _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+ gchar* _tmp8_;
+ const gchar* _tmp9_ = NULL;
+ gchar* _tmp10_ = NULL;
+ gchar* _tmp11_;
+ MprisRoot* _tmp12_;
+ gchar* _tmp13_ = NULL;
+ gchar* _tmp14_;
+ const gchar* _tmp15_ = NULL;
+ gchar* _tmp16_ = NULL;
+ gchar* _tmp17_;
+ gchar* _tmp18_ = NULL;
+ gchar* _tmp19_;
+ DBusGProxy* _tmp20_ = NULL;
+ gchar* _tmp21_ = NULL;
+ gchar* _tmp22_;
+ const gchar* _tmp23_ = NULL;
+ gchar* _tmp24_ = NULL;
+ gchar* _tmp25_;
+ MprisPlayer* _tmp26_;
+ DBusGProxy* _tmp27_ = NULL;
+ FreeDesktopProperties* _tmp28_;
+ GError * _inner_error_ = NULL;
parent_class = G_OBJECT_CLASS (mpris2_controller_parent_class);
obj = parent_class->constructor (type, n_construct_properties, construct_properties);
self = MPRIS2_CONTROLLER (obj);
- _inner_error_ = NULL;
- {
- {
- DBusGConnection* connection;
- char* _tmp0_;
- char* _tmp1_;
- char* _tmp2_;
- char* _tmp3_;
- MprisRoot* _tmp4_;
- char* _tmp5_;
- char* _tmp6_;
- char* _tmp7_;
- char* _tmp8_;
- char* _tmp9_;
- MprisPlayer* _tmp10_;
- FreeDesktopProperties* _tmp11_;
- connection = dbus_g_bus_get (DBUS_BUS_SESSION, &_inner_error_);
- if (_inner_error_ != NULL) {
- if (_inner_error_->domain == DBUS_GERROR) {
- goto __catch5_dbus_gerror;
- }
- 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);
- g_clear_error (&_inner_error_);
- }
- mpris2_controller_set_mpris2_root (self, _tmp4_ = mpris_root_dbus_proxy_new (connection, _tmp3_ = g_strconcat (_tmp2_ = g_strconcat (MPRIS2_CONTROLLER_root_interface, ".", NULL), player_controller_get_mpris_name (self->priv->_owner), NULL), "/org/mpris/MediaPlayer2"));
- _g_object_unref0 (_tmp4_);
- _g_free0 (_tmp3_);
- _g_free0 (_tmp2_);
- _g_free0 (_tmp1_);
- _g_free0 (_tmp0_);
- mpris2_controller_set_player (self, _tmp10_ = mpris_player_dbus_proxy_new (connection, _tmp9_ = g_strconcat (_tmp8_ = g_strconcat (MPRIS2_CONTROLLER_root_interface, ".", NULL), player_controller_get_mpris_name (self->priv->_owner), NULL), "/org/mpris/MediaPlayer2"));
- _g_object_unref0 (_tmp10_);
- _g_free0 (_tmp9_);
- _g_free0 (_tmp8_);
- _g_free0 (_tmp7_);
- _g_free0 (_tmp6_);
- _g_free0 (_tmp5_);
- mpris2_controller_set_properties_interface (self, _tmp11_ = free_desktop_properties_dbus_proxy_new (connection, "org.freedesktop.Properties.PropertiesChanged", "/org/mpris/MediaPlayer2"));
- _g_object_unref0 (_tmp11_);
- g_signal_connect_object (self->priv->_properties_interface, "properties-changed", (GCallback) _mpris2_controller_property_changed_cb_free_desktop_properties_properties_changed, self, 0);
- _dbus_g_connection_unref0 (connection);
- }
- goto __finally5;
- __catch5_dbus_gerror:
- {
- GError * e;
- e = _inner_error_;
- _inner_error_ = NULL;
- {
- g_error ("mpris2-controller.vala:89: Problems connecting to the session bus - %s", e->message);
- _g_error_free0 (e);
- }
- }
- __finally5:
- if (_inner_error_ != NULL) {
- 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);
- g_clear_error (&_inner_error_);
+ _tmp0_ = dbus_g_bus_get (DBUS_BUS_SESSION, &_inner_error_);
+ connection = _tmp0_;
+ if (_inner_error_ != NULL) {
+ if (_inner_error_->domain == DBUS_GERROR) {
+ goto __catch5_dbus_gerror;
}
+ 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);
+ g_clear_error (&_inner_error_);
+ }
+ _tmp1_ = g_strconcat (MPRIS2_CONTROLLER_root_interface, ".", NULL);
+ _tmp2_ = _tmp1_;
+ _tmp3_ = player_controller_get_mpris_name (self->priv->_owner);
+ _tmp4_ = g_strconcat (_tmp2_, _tmp3_, NULL);
+ _tmp5_ = _tmp4_;
+ _tmp6_ = dbus_g_proxy_new_for_name (connection, _tmp5_, "/org/mpris/MediaPlayer2", MPRIS2_CONTROLLER_root_interface);
+ _tmp7_ = g_strconcat (MPRIS2_CONTROLLER_root_interface, ".", NULL);
+ _tmp8_ = _tmp7_;
+ _tmp9_ = player_controller_get_mpris_name (self->priv->_owner);
+ _tmp10_ = g_strconcat (_tmp8_, _tmp9_, NULL);
+ _tmp11_ = _tmp10_;
+ _tmp12_ = mpris_root_dbus_proxy_new (connection, _tmp11_, "/org/mpris/MediaPlayer2");
+ mpris2_controller_set_mpris2_root (self, _tmp12_);
+ _g_object_unref0 (_tmp12_);
+ _g_free0 (_tmp11_);
+ _g_free0 (_tmp8_);
+ _g_free0 (_tmp5_);
+ _g_free0 (_tmp2_);
+ _tmp13_ = g_strconcat (MPRIS2_CONTROLLER_root_interface, ".", NULL);
+ _tmp14_ = _tmp13_;
+ _tmp15_ = player_controller_get_mpris_name (self->priv->_owner);
+ _tmp16_ = g_strconcat (_tmp14_, _tmp15_, NULL);
+ _tmp17_ = _tmp16_;
+ _tmp18_ = g_strconcat (MPRIS2_CONTROLLER_root_interface, ".Player", NULL);
+ _tmp19_ = _tmp18_;
+ _tmp20_ = dbus_g_proxy_new_for_name (connection, _tmp17_, "/org/mpris/MediaPlayer2", _tmp19_);
+ _tmp21_ = g_strconcat (MPRIS2_CONTROLLER_root_interface, ".", NULL);
+ _tmp22_ = _tmp21_;
+ _tmp23_ = player_controller_get_mpris_name (self->priv->_owner);
+ _tmp24_ = g_strconcat (_tmp22_, _tmp23_, NULL);
+ _tmp25_ = _tmp24_;
+ _tmp26_ = mpris_player_dbus_proxy_new (connection, _tmp25_, "/org/mpris/MediaPlayer2");
+ mpris2_controller_set_player (self, _tmp26_);
+ _g_object_unref0 (_tmp26_);
+ _g_free0 (_tmp25_);
+ _g_free0 (_tmp22_);
+ _g_free0 (_tmp19_);
+ _g_free0 (_tmp17_);
+ _g_free0 (_tmp14_);
+ _tmp27_ = dbus_g_proxy_new_for_name (connection, "org.freedesktop.Properties.PropertiesChanged", "/org/mpris/MediaPlayer2", NULL);
+ _tmp28_ = free_desktop_properties_dbus_proxy_new (connection, "org.freedesktop.Properties.PropertiesChanged", "/org/mpris/MediaPlayer2");
+ mpris2_controller_set_properties_interface (self, _tmp28_);
+ _g_object_unref0 (_tmp28_);
+ g_signal_connect_object (self->priv->_properties_interface, "properties-changed", (GCallback) _mpris2_controller_property_changed_cb_free_desktop_properties_properties_changed, self, 0);
+ _dbus_g_connection_unref0 (connection);
+ goto __finally5;
+ __catch5_dbus_gerror:
+ {
+ GError * e;
+ e = _inner_error_;
+ _inner_error_ = NULL;
+ g_error ("mpris2-controller.vala:89: Problems connecting to the session bus - %s", e->message);
+ _g_error_free0 (e);
+ }
+ __finally5:
+ if (_inner_error_ != NULL) {
+ 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);
+ g_clear_error (&_inner_error_);
}
return obj;
}
@@ -4815,8 +5000,8 @@ static GObject * mpris2_controller_constructor (GType type, guint n_construct_pr
static void mpris2_controller_class_init (Mpris2ControllerClass * klass) {
mpris2_controller_parent_class = g_type_class_peek_parent (klass);
g_type_class_add_private (klass, sizeof (Mpris2ControllerPrivate));
- G_OBJECT_CLASS (klass)->get_property = mpris2_controller_get_property;
- G_OBJECT_CLASS (klass)->set_property = mpris2_controller_set_property;
+ G_OBJECT_CLASS (klass)->get_property = _vala_mpris2_controller_get_property;
+ G_OBJECT_CLASS (klass)->set_property = _vala_mpris2_controller_set_property;
G_OBJECT_CLASS (klass)->constructor = mpris2_controller_constructor;
G_OBJECT_CLASS (klass)->finalize = mpris2_controller_finalize;
g_object_class_install_property (G_OBJECT_CLASS (klass), MPRIS2_CONTROLLER_MPRIS2_ROOT, g_param_spec_object ("mpris2-root", "mpris2-root", "mpris2-root", TYPE_MPRIS_ROOT, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
@@ -4854,7 +5039,7 @@ GType mpris2_controller_get_type (void) {
}
-static void mpris2_controller_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
+static void _vala_mpris2_controller_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
Mpris2Controller * self;
self = MPRIS2_CONTROLLER (object);
switch (property_id) {
@@ -4877,7 +5062,7 @@ static void mpris2_controller_get_property (GObject * object, guint property_id,
}
-static void mpris2_controller_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
+static void _vala_mpris2_controller_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
Mpris2Controller * self;
self = MPRIS2_CONTROLLER (object);
switch (property_id) {
@@ -4918,54 +5103,4 @@ static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify
}
-static int _vala_strcmp0 (const char * str1, const char * str2) {
- if (str1 == NULL) {
- return -(str1 != str2);
- }
- if (str2 == NULL) {
- return str1 != str2;
- }
- return strcmp (str1, str2);
-}
-
-
-
-static void g_cclosure_user_marshal_VOID__INT64 (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
- typedef void (*GMarshalFunc_VOID__INT64) (gpointer data1, gint64 arg_1, gpointer data2);
- register GMarshalFunc_VOID__INT64 callback;
- register GCClosure * cc;
- register gpointer data1, data2;
- cc = (GCClosure *) closure;
- g_return_if_fail (n_param_values == 2);
- if (G_CCLOSURE_SWAP_DATA (closure)) {
- data1 = closure->data;
- data2 = param_values->data[0].v_pointer;
- } else {
- data1 = param_values->data[0].v_pointer;
- data2 = closure->data;
- }
- callback = (GMarshalFunc_VOID__INT64) (marshal_data ? marshal_data : cc->callback);
- callback (data1, g_value_get_int64 (param_values + 1), data2);
-}
-
-
-static void g_cclosure_user_marshal_VOID__STRING_BOXED_BOXED_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
- typedef void (*GMarshalFunc_VOID__STRING_BOXED_BOXED_INT) (gpointer data1, const char* arg_1, gpointer arg_2, gpointer arg_3, gint arg_4, gpointer data2);
- register GMarshalFunc_VOID__STRING_BOXED_BOXED_INT callback;
- register GCClosure * cc;
- register gpointer data1, data2;
- cc = (GCClosure *) closure;
- g_return_if_fail (n_param_values == 5);
- if (G_CCLOSURE_SWAP_DATA (closure)) {
- data1 = closure->data;
- data2 = param_values->data[0].v_pointer;
- } else {
- data1 = param_values->data[0].v_pointer;
- data2 = closure->data;
- }
- callback = (GMarshalFunc_VOID__STRING_BOXED_BOXED_INT) (marshal_data ? marshal_data : cc->callback);
- callback (data1, g_value_get_string (param_values + 1), g_value_get_boxed (param_values + 2), g_value_get_boxed (param_values + 3), g_value_get_int (param_values + 4), data2);
-}
-
-