summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2013-09-26 12:35:27 +0200
committerAlexander Larsson <alexl@redhat.com>2013-09-26 12:38:30 +0200
commit8d08c558cda63e864ffd1c960435ea5332c884bd (patch)
tree8b8ac5d6558a7b4a30133e9edc7313a9c9440e78
parenta302823af930e1b09f44908b02d1f4b6a44b5cc9 (diff)
downloadgvfs-8d08c558cda63e864ffd1c960435ea5332c884bd.tar.gz
client: Remove unused code for dbus vfs filters
This code is not used anymore https://bugzilla.gnome.org/show_bug.cgi?id=708744
-rw-r--r--client/gdaemonfile.c3
-rw-r--r--client/gdaemonfilemonitor.c1
-rw-r--r--client/gdaemonmount.c1
-rw-r--r--client/gvfsdaemondbus.c104
-rw-r--r--client/gvfsdaemondbus.h5
-rw-r--r--client/gvfsiconloadable.c3
6 files changed, 0 insertions, 117 deletions
diff --git a/client/gdaemonfile.c b/client/gdaemonfile.c
index a396211e..75e9053f 100644
--- a/client/gdaemonfile.c
+++ b/client/gdaemonfile.c
@@ -487,8 +487,6 @@ create_proxy_for_file2 (GFile *file1,
/* Set infinite timeout, see bug 687534 */
g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (proxy), G_MAXINT);
-
- _g_dbus_connect_vfs_filters (connection);
if (mount_info1_out)
*mount_info1_out = g_mount_info_ref (mount_info1);
@@ -594,7 +592,6 @@ async_proxy_new_cb (GObject *source_object,
/* Set infinite timeout, see bug 687534 */
g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (data->proxy), G_MAXINT);
- _g_dbus_connect_vfs_filters (data->connection);
path = g_mount_info_resolve_path (data->mount_info, daemon_file->path);
/* Complete the create_proxy_for_file_async() call */
diff --git a/client/gdaemonfilemonitor.c b/client/gdaemonfilemonitor.c
index e58bbb7a..4de3b24d 100644
--- a/client/gdaemonfilemonitor.c
+++ b/client/gdaemonfilemonitor.c
@@ -162,7 +162,6 @@ subscribe_cb (GVfsDBusMonitor *proxy,
return;
}
- _g_dbus_connect_vfs_filters (monitor->connection);
monitor->proxy = g_object_ref (proxy);
g_object_unref (monitor);
diff --git a/client/gdaemonmount.c b/client/gdaemonmount.c
index ca77648f..e4acef0a 100644
--- a/client/gdaemonmount.c
+++ b/client/gdaemonmount.c
@@ -243,7 +243,6 @@ async_proxy_new_cb (GObject *source_object,
}
data->proxy = proxy;
- _g_dbus_connect_vfs_filters (data->connection);
mount_source = g_mount_operation_dbus_wrap (data->mount_operation, _g_daemon_vfs_get_async_bus ());
diff --git a/client/gvfsdaemondbus.c b/client/gvfsdaemondbus.c
index a31e9d38..bcf96d08 100644
--- a/client/gvfsdaemondbus.c
+++ b/client/gvfsdaemondbus.c
@@ -63,110 +63,6 @@ _g_vfs_error_quark (void)
return g_quark_from_static_string ("g-vfs-error-quark");
}
-/**************************************************************************
- * message filters for vfs dbus connections *
- *************************************************************************/
-
-typedef struct {
- GVfsRegisterVfsFilterCallback callback;
- GObject *data;
- GHashTable *skeletons;
-} PathMapEntry;
-
-static void
-free_path_map_entry (PathMapEntry *entry)
-{
- g_hash_table_destroy (entry->skeletons);
- g_free (entry);
-}
-
-static void
-unref_skeleton (gpointer object)
-{
- GDBusInterfaceSkeleton *skeleton = object;
-
- g_dbus_interface_skeleton_unexport (skeleton);
- g_object_unref (skeleton);
-}
-
-/* Please note the obj_path has to be unique even for different interfaces */
-void
-_g_dbus_register_vfs_filter (const char *obj_path,
- GVfsRegisterVfsFilterCallback callback,
- GObject *data)
-{
- PathMapEntry *entry;
-
- G_LOCK (obj_path_map);
-
- if (obj_path_map == NULL)
- obj_path_map = g_hash_table_new_full (g_str_hash, g_str_equal,
- g_free, (GDestroyNotify)free_path_map_entry);
-
- entry = g_new (PathMapEntry, 1);
- entry->callback = callback;
- entry->data = data;
- entry->skeletons = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, (GDestroyNotify)unref_skeleton);
-
- g_hash_table_insert (obj_path_map, g_strdup (obj_path), entry);
-
- G_UNLOCK (obj_path_map);
-}
-
-void
-_g_dbus_unregister_vfs_filter (const char *obj_path)
-{
- G_LOCK (obj_path_map);
-
- if (obj_path_map)
- g_hash_table_remove (obj_path_map, obj_path);
-
- G_UNLOCK (obj_path_map);
-}
-
-static void
-register_skeleton (const char *obj_path,
- PathMapEntry *entry,
- GDBusConnection *dbus_conn)
-{
- GDBusInterfaceSkeleton *skeleton;
-
- if (! g_hash_table_contains (entry->skeletons, dbus_conn))
- {
- /* Note that the newly created GDBusInterfaceSkeleton instance refs the connection so it's not needed to watch for connection being destroyed */
- skeleton = entry->callback (dbus_conn, obj_path, entry->data);
- g_hash_table_insert (entry->skeletons, dbus_conn, skeleton);
- }
- else
- {
- /* Interface skeleton has already been registered on the connection, skipping */
- }
-}
-
-/*
- * Export registered interface skeletons on this connection. This should ideally
- * be called only once for every connection, but we often share/reuse existing
- * connections.
- *
- * Already exported interface skeletons should live as long as possible
- * since there might be ongoing data transfer and re-exporting (unreffing + creation)
- * breaks running jobs randomly.
- *
- */
-void
-_g_dbus_connect_vfs_filters (GDBusConnection *connection)
-{
- G_LOCK (obj_path_map);
-
- if (obj_path_map)
- {
- /* Export new interface skeletons */
- g_hash_table_foreach (obj_path_map, (GHFunc) register_skeleton, connection);
- }
-
- G_UNLOCK (obj_path_map);
-}
-
static void
connection_data_free (gpointer p)
{
diff --git a/client/gvfsdaemondbus.h b/client/gvfsdaemondbus.h
index 68ed536d..24f50568 100644
--- a/client/gvfsdaemondbus.h
+++ b/client/gvfsdaemondbus.h
@@ -48,11 +48,6 @@ typedef GDBusInterfaceSkeleton * (*GVfsRegisterVfsFilterCallback) (GDBusConnec
gpointer callback_data);
-void _g_dbus_register_vfs_filter (const char *obj_path,
- GVfsRegisterVfsFilterCallback callback,
- GObject *data);
-void _g_dbus_unregister_vfs_filter (const char *obj_path);
-void _g_dbus_connect_vfs_filters (GDBusConnection *connection);
GDBusConnection *_g_dbus_connection_get_sync (const char *dbus_id,
GCancellable *cancellable,
GError **error);
diff --git a/client/gvfsiconloadable.c b/client/gvfsiconloadable.c
index 9030a486..5822a3cf 100644
--- a/client/gvfsiconloadable.c
+++ b/client/gvfsiconloadable.c
@@ -69,8 +69,6 @@ create_proxy_for_icon (GVfsIcon *vfs_icon,
if (proxy == NULL)
goto out;
- _g_dbus_connect_vfs_filters (connection);
-
out:
if (mount_info)
g_mount_info_unref (mount_info);
@@ -187,7 +185,6 @@ async_proxy_new_cb (GObject *source_object,
}
data->proxy = proxy;
- _g_dbus_connect_vfs_filters (data->connection);
data->callback (proxy,
data->result,