aboutsummaryrefslogtreecommitdiff
path: root/src/mpris2-watcher.c
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2011-01-27 15:57:39 -0500
committerKen VanDine <ken.vandine@canonical.com>2011-01-27 15:57:39 -0500
commit759793a2dda77abd227921e119bb329271c36a55 (patch)
tree248c4ba64e9464f58a64c22c69f24a294ff16a84 /src/mpris2-watcher.c
parent500000a82b6785e2bf7732ee87f36c6a44d2767c (diff)
parent6b2132fb4e700fe84a26adeac5126e8afbc507b3 (diff)
downloadayatana-indicator-sound-759793a2dda77abd227921e119bb329271c36a55.tar.gz
ayatana-indicator-sound-759793a2dda77abd227921e119bb329271c36a55.tar.bz2
ayatana-indicator-sound-759793a2dda77abd227921e119bb329271c36a55.zip
Import upstream version 0.5.7
Diffstat (limited to 'src/mpris2-watcher.c')
-rw-r--r--src/mpris2-watcher.c58
1 files changed, 28 insertions, 30 deletions
diff --git a/src/mpris2-watcher.c b/src/mpris2-watcher.c
index 0cdefb4..c000e87 100644
--- a/src/mpris2-watcher.c
+++ b/src/mpris2-watcher.c
@@ -1,4 +1,4 @@
-/* mpris2-watcher.c generated by valac 0.11.3, the Vala compiler
+/* mpris2-watcher.c generated by valac 0.11.5, the Vala compiler
* generated from mpris2-watcher.vala, do not modify */
/*
@@ -117,29 +117,28 @@ struct _Mpris2WatcherCheckForActiveClientsData {
GAsyncResult* _res_;
GSimpleAsyncResult* _async_result;
Mpris2Watcher* self;
+ gchar** interfaces;
gint interfaces_length1;
gint _interfaces_size_;
- gchar** interfaces;
gint _tmp0_;
gchar** _tmp1_;
+ gchar** _tmp2_;
gint _tmp2__length1;
gint __tmp2__size_;
gchar** _tmp3_;
- gchar** _tmp2_;
- gchar** _tmp4_;
GError * e;
gchar** address_collection;
int address_collection_length1;
int address_it;
- gchar* _tmp5_;
+ gchar* _tmp4_;
gchar* address;
- gboolean _tmp6_;
- MprisRoot* _tmp7_;
+ gboolean _tmp5_;
+ MprisRoot* _tmp6_;
MprisRoot* mpris2_root;
- gboolean _tmp8_;
+ gboolean _tmp7_;
gboolean use_playlists;
+ gchar* _tmp8_;
gchar* _tmp9_;
- gchar* _tmp10_;
GError * _inner_error_;
};
@@ -253,16 +252,16 @@ static gboolean mpris2_watcher_check_for_active_clients_co (Mpris2WatcherCheckFo
}
_state_0:
data->interfaces_length1 = 0;
+ data->_interfaces_size_ = 0;
data->_state_ = 1;
free_desktop_object_list_names (data->self->priv->fdesktop_obj, mpris2_watcher_check_for_active_clients_ready, data);
return FALSE;
_state_1:
data->_tmp1_ = NULL;
data->_tmp1_ = free_desktop_object_list_names_finish (data->self->priv->fdesktop_obj, data->_res_, &data->_tmp0_, &data->_inner_error_);
- data->_tmp3_ = data->_tmp1_;
+ data->_tmp2_ = data->_tmp1_;
data->_tmp2__length1 = data->_tmp0_;
- data->__tmp2__size_ = data->_tmp2__length1;
- data->_tmp2_ = data->_tmp3_;
+ data->__tmp2__size_ = data->_tmp0_;
if (data->_inner_error_ != NULL) {
if (data->_inner_error_->domain == G_IO_ERROR) {
goto __catch7_g_io_error;
@@ -272,11 +271,11 @@ static gboolean mpris2_watcher_check_for_active_clients_co (Mpris2WatcherCheckFo
g_clear_error (&data->_inner_error_);
return FALSE;
}
- data->_tmp4_ = data->_tmp2_;
+ data->_tmp3_ = data->_tmp2_;
data->interfaces = (_vala_array_free (data->interfaces, data->interfaces_length1, (GDestroyNotify) g_free), NULL);
data->interfaces_length1 = data->_tmp2__length1;
data->_interfaces_size_ = data->interfaces_length1;
- data->interfaces = data->_tmp4_;
+ data->interfaces = data->_tmp3_;
goto __finally7;
__catch7_g_io_error:
{
@@ -305,14 +304,14 @@ static gboolean mpris2_watcher_check_for_active_clients_co (Mpris2WatcherCheckFo
data->address_collection = data->interfaces;
data->address_collection_length1 = data->interfaces_length1;
for (data->address_it = 0; data->address_it < data->interfaces_length1; data->address_it = data->address_it + 1) {
- data->_tmp5_ = g_strdup (data->address_collection[data->address_it]);
- data->address = data->_tmp5_;
+ data->_tmp4_ = g_strdup (data->address_collection[data->address_it]);
+ data->address = data->_tmp4_;
{
- data->_tmp6_ = g_str_has_prefix (data->address, MPRIS_PREFIX);
- if (data->_tmp6_) {
- data->_tmp7_ = NULL;
- data->_tmp7_ = mpris2_watcher_create_mpris_root (data->self, data->address);
- data->mpris2_root = data->_tmp7_;
+ data->_tmp5_ = g_str_has_prefix (data->address, MPRIS_PREFIX);
+ if (data->_tmp5_) {
+ data->_tmp6_ = NULL;
+ data->_tmp6_ = mpris2_watcher_create_mpris_root (data->self, data->address);
+ data->mpris2_root = data->_tmp6_;
if (data->mpris2_root == NULL) {
_g_object_unref0 (data->mpris2_root);
_g_free0 (data->address);
@@ -325,13 +324,13 @@ static gboolean mpris2_watcher_check_for_active_clients_co (Mpris2WatcherCheckFo
g_object_unref (data->_async_result);
return FALSE;
}
- data->_tmp8_ = mpris2_watcher_supports_playlists (data->self, data->address);
- data->use_playlists = data->_tmp8_;
- data->_tmp9_ = NULL;
- data->_tmp9_ = mpris_root_get_DesktopEntry (data->mpris2_root);
- data->_tmp10_ = data->_tmp9_;
- g_signal_emit_by_name (data->self, "client-appeared", data->_tmp10_, data->address, data->use_playlists);
- _g_free0 (data->_tmp10_);
+ data->_tmp7_ = mpris2_watcher_supports_playlists (data->self, data->address);
+ data->use_playlists = data->_tmp7_;
+ data->_tmp8_ = NULL;
+ data->_tmp8_ = mpris_root_get_DesktopEntry (data->mpris2_root);
+ data->_tmp9_ = data->_tmp8_;
+ g_signal_emit_by_name (data->self, "client-appeared", data->_tmp9_, data->address, data->use_playlists);
+ _g_free0 (data->_tmp9_);
_g_object_unref0 (data->mpris2_root);
}
_g_free0 (data->address);
@@ -449,7 +448,7 @@ static MprisRoot* mpris2_watcher_create_mpris_root (Mpris2Watcher* self, const g
static gboolean mpris2_watcher_supports_playlists (Mpris2Watcher* self, const gchar* name) {
gboolean result = FALSE;
- FreeDesktopIntrospectable* introspectable;
+ FreeDesktopIntrospectable* introspectable = NULL;
FreeDesktopIntrospectable* _tmp0_ = NULL;
FreeDesktopIntrospectable* _tmp1_;
FreeDesktopIntrospectable* _tmp2_;
@@ -459,7 +458,6 @@ static gboolean mpris2_watcher_supports_playlists (Mpris2Watcher* self, const gc
GError * _inner_error_ = NULL;
g_return_val_if_fail (self != NULL, FALSE);
g_return_val_if_fail (name != NULL, FALSE);
- introspectable = NULL;
_tmp0_ = g_initable_new (TYPE_FREE_DESKTOP_INTROSPECTABLE_PROXY, NULL, &_inner_error_, "g-flags", G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, "g-name", name, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", MPRIS_MEDIA_PLAYER_PATH, "g-interface-name", "org.freedesktop.DBus.Introspectable", NULL);
_tmp1_ = (FreeDesktopIntrospectable*) _tmp0_;
if (_inner_error_ != NULL) {