[gvfs] [afc] Add x-content types for AFC backend
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gvfs] [afc] Add x-content types for AFC backend
- Date: Mon, 9 Nov 2009 16:10:03 +0000 (UTC)
commit 92c179d6ce2682595e7ce1a77e301ffc49e25526
Author: Bastien Nocera <hadess hadess net>
Date: Fri Nov 6 00:49:17 2009 +0000
[afc] Add x-content types for AFC backend
https://bugzilla.gnome.org/show_bug.cgi?id=597805
daemon/gvfsbackendafc.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gvfsbackendafc.c b/daemon/gvfsbackendafc.c
index aa90a41..0c34e8b 100644
--- a/daemon/gvfsbackendafc.c
+++ b/daemon/gvfsbackendafc.c
@@ -255,6 +255,9 @@ g_vfs_backend_afc_mount (GVfsBackend *backend,
int retries;
iphone_error_t err;
lockdownd_client_t lockdown_cli = NULL;
+ char *camera_x_content_types[] = { "x-content/audio-player", "x-content/image-dcf", NULL};
+ char *media_player_x_content_types[] = {"x-content/audio-player", NULL};
+ char **dcim_afcinfo;
self = G_VFS_BACKEND_AFC(backend);
self->connected = FALSE;
@@ -384,6 +387,14 @@ g_vfs_backend_afc_mount (GVfsBackend *backend,
/* lockdown connection is not needed anymore */
lockdownd_client_free (lockdown_cli);
+ /* Add camera item if necessary */
+ dcim_afcinfo = NULL;
+ if (afc_get_file_info (self->afc_cli, "/DCIM", &dcim_afcinfo) == AFC_E_SUCCESS)
+ g_vfs_backend_set_x_content_types (backend, camera_x_content_types);
+ else
+ g_vfs_backend_set_x_content_types (backend, media_player_x_content_types);
+ g_strfreev (dcim_afcinfo);
+
self->connected = TRUE;
g_vfs_job_succeeded (G_VFS_JOB(job));
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]