diff options
author | David Zeuthen <davidz@redhat.com> | 2008-07-29 18:27:21 +0000 |
---|---|---|
committer | David Zeuthen <davidz@src.gnome.org> | 2008-07-29 18:27:21 +0000 |
commit | 9510e8d3d62df724d1a223a97cb4fd256fbcb735 (patch) | |
tree | cbc514ade6498048698b27b9ca4dc0b627990e67 /daemon/mount.c | |
parent | 55c35a750f678ed7f3f413d5c1058cf76f2881bb (diff) | |
download | gvfs-9510e8d3d62df724d1a223a97cb4fd256fbcb735.tar.gz |
Add x-content/* support to daemon mounts. Right now a backend can only set
2008-07-29 David Zeuthen <davidz@redhat.com>
* client/gdaemonmount.c:
* common/gmounttracker.c:
* common/gmounttracker.h:
* daemon/gvfsbackend.c:
* daemon/gvfsbackend.h:
* daemon/gvfsbackendcdda.c:
* daemon/gvfsbackendgphoto2.c:
* daemon/mount.c:
Add x-content/* support to daemon mounts. Right now a backend
can only set the x-content/* type ahead of time. We might want
to add support dynamically obtaining it too (e.g. support
force_rescan).
* monitor/hal/ghalmount.c:
* monitor/hal/ghalvolume.c:
* monitor/hal/ghalvolumemonitor.c:
* monitor/hal/hal-utils.c:
* monitor/hal/hal-utils.h:
Add x-content/* support to the HAL volume monitor.
* monitor/proxy/gproxymount.c:
* monitor/proxy/gproxymount.h:
* monitor/proxy/gproxyvolumemonitor.c:
* monitor/proxy/gproxyvolumemonitor.h:
* monitor/proxy/gvfsproxyvolumemonitordaemon.c:
Add x-content/* support to proxy volume monitor. Also fix
a number of bugs the initial implementation had.
* programs/gvfs-mount.c:
Print out x-content-types.
svn path=/trunk/; revision=1845
Diffstat (limited to 'daemon/mount.c')
-rw-r--r-- | daemon/mount.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/daemon/mount.c b/daemon/mount.c index 28842431..519d8a66 100644 --- a/daemon/mount.c +++ b/daemon/mount.c @@ -39,6 +39,7 @@ typedef struct { char *display_name; char *stable_name; + char *x_content_types; char *icon; char *prefered_filename_encoding; gboolean user_visible; @@ -157,6 +158,7 @@ vfs_mount_free (VfsMount *mount) { g_free (mount->display_name); g_free (mount->stable_name); + g_free (mount->x_content_types); g_free (mount->icon); g_free (mount->prefered_filename_encoding); g_free (mount->dbus_id); @@ -199,6 +201,11 @@ vfs_mount_to_dbus (VfsMount *mount, DBUS_TYPE_STRING, &mount->stable_name)) _g_dbus_oom (); + + if (!dbus_message_iter_append_basic (&struct_iter, + DBUS_TYPE_STRING, + &mount->x_content_types)) + _g_dbus_oom (); if (!dbus_message_iter_append_basic (&struct_iter, DBUS_TYPE_STRING, @@ -647,7 +654,7 @@ register_mount (DBusConnection *connection, VfsMount *mount; DBusMessage *reply; DBusError error; - const char *display_name, *stable_name, *icon, *obj_path, *id, *prefered_filename_encoding; + const char *display_name, *stable_name, *x_content_types, *icon, *obj_path, *id, *prefered_filename_encoding; dbus_bool_t user_visible; DBusMessageIter iter; GMountSpec *mount_spec; @@ -662,6 +669,7 @@ register_mount (DBusConnection *connection, DBUS_TYPE_OBJECT_PATH, &obj_path, DBUS_TYPE_STRING, &display_name, DBUS_TYPE_STRING, &stable_name, + DBUS_TYPE_STRING, &x_content_types, DBUS_TYPE_STRING, &icon, DBUS_TYPE_STRING, &prefered_filename_encoding, DBUS_TYPE_BOOLEAN, &user_visible, @@ -684,6 +692,7 @@ register_mount (DBusConnection *connection, mount = g_new0 (VfsMount, 1); mount->display_name = g_strdup (display_name); mount->stable_name = g_strdup (stable_name); + mount->x_content_types = g_strdup (x_content_types); mount->icon = g_strdup (icon); mount->prefered_filename_encoding = g_strdup (prefered_filename_encoding); mount->user_visible = user_visible; @@ -850,6 +859,7 @@ list_mounts (DBusConnection *connection, DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_STRING_AS_STRING + DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_BOOLEAN_AS_STRING DBUS_TYPE_ARRAY_AS_STRING DBUS_TYPE_BYTE_AS_STRING G_MOUNT_SPEC_TYPE_AS_STRING |