summaryrefslogtreecommitdiff
path: root/daemon/gvfsbackendgphoto2.c
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2008-07-29 18:27:21 +0000
committerDavid Zeuthen <davidz@src.gnome.org>2008-07-29 18:27:21 +0000
commit9510e8d3d62df724d1a223a97cb4fd256fbcb735 (patch)
treecbc514ade6498048698b27b9ca4dc0b627990e67 /daemon/gvfsbackendgphoto2.c
parent55c35a750f678ed7f3f413d5c1058cf76f2881bb (diff)
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/gvfsbackendgphoto2.c')
-rw-r--r--daemon/gvfsbackendgphoto2.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/daemon/gvfsbackendgphoto2.c b/daemon/gvfsbackendgphoto2.c
index d8be92f8..6f96ea4b 100644
--- a/daemon/gvfsbackendgphoto2.c
+++ b/daemon/gvfsbackendgphoto2.c
@@ -716,6 +716,8 @@ find_udi_for_device (GVfsBackendGphoto2 *gphoto2_backend)
int usb_device_num;
char **tokens;
char *endp;
+ char *camera_x_content_types[] = {"x-content/image-dcf", NULL};
+ char *music_player_x_content_types[] = {"x-content/audio-player", NULL};
gphoto2_backend->hal_udi = NULL;
@@ -870,6 +872,19 @@ find_udi_for_device (GVfsBackendGphoto2 *gphoto2_backend)
gphoto2_backend->hal_icon_name = g_strdup ("camera-photo");
}
}
+
+ /* TODO: should we sniff the files instead? */
+ if (m == 0)
+ {
+ g_vfs_backend_set_x_content_types (G_VFS_BACKEND (gphoto2_backend),
+ camera_x_content_types);
+ }
+ else
+ {
+ g_vfs_backend_set_x_content_types (G_VFS_BACKEND (gphoto2_backend),
+ music_player_x_content_types);
+ }
+
}
}