[gvfs/gdbus-core: 36/49] gdbus: Properly suffix functions doing sync proxy creation
- From: Tomas Bzatek <tbzatek src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs/gdbus-core: 36/49] gdbus: Properly suffix functions doing sync proxy creation
- Date: Tue, 31 Jul 2012 10:15:29 +0000 (UTC)
commit 02f30b8058e61bd3dc6ab70fab1f3b13bd748043
Author: Tomas Bzatek <tbzatek redhat com>
Date: Mon Jul 23 16:00:50 2012 +0200
gdbus: Properly suffix functions doing sync proxy creation
...so that they are recognizable on a first sight.
common/gmountsource.c | 17 +++++++++--------
common/gmounttracker.c | 4 ++--
2 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/common/gmountsource.c b/common/gmountsource.c
index 915f646..5375adb 100644
--- a/common/gmountsource.c
+++ b/common/gmountsource.c
@@ -163,9 +163,9 @@ ask_password_data_free (gpointer _data)
}
static GVfsDBusMountOperation *
-create_mount_operation_proxy (GMountSource *source,
- GAsyncReadyCallback callback,
- gpointer user_data)
+create_mount_operation_proxy_sync (GMountSource *source,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
GVfsDBusMountOperation *proxy;
GError *error;
@@ -183,6 +183,7 @@ create_mount_operation_proxy (GMountSource *source,
}
error = NULL;
+ /* Synchronously creating a proxy using unique/private d-bus name and not loading properties or connecting signals should not block */
proxy = gvfs_dbus_mount_operation_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS | G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
source->dbus_id,
@@ -275,7 +276,7 @@ g_mount_source_ask_password_async (GMountSource *source,
GSimpleAsyncResult *result;
GVfsDBusMountOperation *proxy;
- proxy = create_mount_operation_proxy (source, callback, user_data);
+ proxy = create_mount_operation_proxy_sync (source, callback, user_data);
if (proxy == NULL)
return;
@@ -617,7 +618,7 @@ g_mount_source_ask_question_async (GMountSource *source,
GSimpleAsyncResult *result;
GVfsDBusMountOperation *proxy;
- proxy = create_mount_operation_proxy (source, callback, user_data);
+ proxy = create_mount_operation_proxy_sync (source, callback, user_data);
if (proxy == NULL)
return;
@@ -780,7 +781,7 @@ g_mount_source_show_processes_async (GMountSource *source,
GVariantBuilder builder;
guint i;
- proxy = create_mount_operation_proxy (source, callback, user_data);
+ proxy = create_mount_operation_proxy_sync (source, callback, user_data);
if (proxy == NULL)
return;
@@ -960,7 +961,7 @@ g_mount_source_show_unmount_progress (GMountSource *source,
return;
}
- proxy = create_mount_operation_proxy (source, NULL, NULL);
+ proxy = create_mount_operation_proxy_sync (source, NULL, NULL);
if (proxy == NULL)
return;
@@ -1006,7 +1007,7 @@ g_mount_source_abort (GMountSource *source)
{
GVfsDBusMountOperation *proxy;
- proxy = create_mount_operation_proxy (source, NULL, NULL);
+ proxy = create_mount_operation_proxy_sync (source, NULL, NULL);
if (proxy == NULL)
return FALSE;
diff --git a/common/gmounttracker.c b/common/gmounttracker.c
index 2a435b8..d18aa4e 100644
--- a/common/gmounttracker.c
+++ b/common/gmounttracker.c
@@ -460,7 +460,7 @@ unmounted_cb (GVfsDBusMountTracker *object,
/* Called after construction when the construct properties (like connection) are set */
static void
-init_connection (GMountTracker *tracker)
+init_connection_sync (GMountTracker *tracker)
{
GError *error;
GVariant *iter_mounts;
@@ -517,7 +517,7 @@ g_mount_tracker_constructor (GType type,
tracker = G_MOUNT_TRACKER (object);
- init_connection (tracker);
+ init_connection_sync (tracker);
return object;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]