summaryrefslogtreecommitdiff
path: root/daemon/gvfsbackendgphoto2.c
Commit message (Collapse)AuthorAgeFilesLines
* Bug 610259 – Handle readonly+delete devicesMarcus Meissner2010-02-191-4/+13
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=610259 Signed-off-by: David Zeuthen <davidz@redhat.com>
* Bug 597585 – 2.28 lists mtp devices as being cameras with gudev backendMartin Pitt2009-10-151-1/+12
| | | | | | | Set correct MIME type for MTP music players based on whether it's a camera or a music player. Signed-off-by: David Zeuthen <davidz@redhat.com>
* [gphoto] Add fast mime-type informationMichael Chudobiak2009-10-011-0/+1
| | | | See https://bugzilla.gnome.org/show_bug.cgi?id=594928
* port gphoto2 backend and monitor to gudevMartin Pitt2009-08-091-12/+138
| | | | | | | | | | | | | | | | | | | | This works with the ID_GPHOTO2 attribute, which was recently added to libgphoto2: http://sourceforge.net/tracker/?func=detail&aid=2801117&group_id=8874&atid=308874 That initial libgphoto2 patch does not yet pass the actual name, and just sets ID_GPHOTO2="1". However, in this patch we check if it's not "1", and use that as volume name (since it's the "best" one). Otherwise fall back to usb_id and sysfs vendor/model/product names. This also supports ID_MEDIA_PLAYER* attributes for media players with gphoto support. Please see here for the discussion and development progress: http://lists.freedesktop.org/archives/devkit-devel/2009-June/000226.html http://cgit.freedesktop.org/~teuf/media-player-id/ http://bugzilla.gnome.org/show_bug.cgi?id=586410 Signed-off-by: David Zeuthen <davidz@redhat.com>
* Bug 587484 – Interaction when unmounting mounts and misc fixesDavid Zeuthen2009-07-081-25/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Port everything to use _with_operation() variants of unmount/eject methods - Add support for g_file_poll_mountable() - new job class: GVfsJobPollMountable - Pass mount operation for unmount/eject ops on GDaemonFile and GDaemonMount - receive in the appropriate GVfsJob classes - also pass unmount flags where it was missing - port all backends to use this - Teach GMountSource and GMountOperationDBus about the new GMountOperation::show-processes signal - also provide new API - g_mount_source_is_dummy() - e.g. when the client didn't passed NULL for the GMountOperation - g_mount_source_abort() - to send the ::abort signal to the client-side GMountOperation - make the client-side of GMountSource return ::reply with NOT_HANDLED when we do an abort - Refactor the mount operation handling in GProxyVolumeMonitor - Pass mount operation for unmount/ejects in GProxyVolumeMonitor - Pass the process id of the actual reader/writer in OpenForRead and OpenForWrite daemon methods - add some private API for making the FUSE client set the pid of the POSIX client (otherwise it looks like the FUSE client is blocking) and pass the right pid. This is because the FUSE client is basically impersonating the POSIX processes. - Make the process id mentioned above available in appropriate GVfsJob classes - GVfsJobOpenForRead - GVfsJobOpenForWrite - GVfsChannel - Provide API to get a list of all blocking clients, e.g. an array of GPid - g_vfs_daemon_get_blocking_processes() - Provide convenience API to easily doing the right thing on unmount; e.g. interact with the user about blocking processes - see the gphoto2 backend for example usage - g_vfs_backend_has_blocking_processes() - g_vfs_backend_unmount_with_operation() and g_vfs_backend_unmount_with_operation_finish() - Only the gphoto2 backend supports ::show-processes right now. Support for other backends will be added shortly. - Implement support for ::show-processes in the GDU volume monitor - right now we don't support "Unmount Anyway" since it requires ABI changes in libgdu.so - this will be changed as soon as there's a new gnome-disk-utility release
* Bug 585853 – video file previewsDavid Zeuthen2009-06-151-5/+5
| | | | Also set preview::icon for video files.
* gphoto2: Disable debug spewDavid Zeuthen2009-06-051-1/+1
| | | | This errornously got introduced as part of the last commit.
* gphoto2: Fix gphoto2 backend to work with Canon EOS 5DDavid Zeuthen2009-06-051-4/+8
| | | | | | This bug was introduced during the 2.25 cycle as part of supporting multiple storage heads. Previously we didn't use basedir, now we do. And we failed to check if the basedir is actually set.
* Make sure we ignore broken stores the same way we do in the volumeAlexander Larsson2009-03-121-5/+17
| | | | | | | | | | | | 2009-03-12 Alexander Larsson <alexl@redhat.com> * daemon/gvfsbackendgphoto2.c: (ensure_ignore_prefix): Make sure we ignore broken stores the same way we do in the volume monitor. svn path=/trunk/; revision=2319
* Make the gphoto2 backend work with buggy devices (such as the iPhone)David Zeuthen2009-02-201-45/+136
| | | | | | | | | | | | | | | | | | | | | | | | 2009-02-20 David Zeuthen <davidz@redhat.com> Make the gphoto2 backend work with buggy devices (such as the iPhone) where the basedir of the store changes. * daemon/gvfsbackendgphoto2.c: Revert the patch from #520123 that removed the ignore_prefix handling. Change ensure_ignore_prefix() to only use an ignore prefix if there is exactly one storage head. * monitor/gphoto2/ggphoto2volumemonitor.c: Nuke orphan mount handling since that is superseeded by shadow mounts. Also avoid appending the store name if there is only one storage head. * monitor/gphoto2/ggphoto2volume.[ch]: Rename foreign_mount_root to activation_root since that is really what it is now. Also fix a silly logical bug whereby music players (as reported by HAL) weren't detected. svn path=/trunk/; revision=2239
* For each camera discovered, create shadow mounts for each one of theBastien Nocera2008-12-091-178/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | 2008-12-09 Bastien Nocera <hadess@hadess.net> * monitor/gphoto2/Makefile.am: * monitor/gphoto2/ggphoto2volumemonitor.c (get_stores_for_camera), (update_cameras): For each camera discovered, create shadow mounts for each one of the top-level storage heads, makes each of the device's stores appear separately * daemon/gvfsbackendgphoto2.c (monitors_emit_internal), (release_device), (split_filename), (file_get_info), (do_mount), (do_open_for_read_real), (do_query_info), (try_query_info), (do_enumerate), (try_enumerate), (do_make_directory), (do_set_display_name), (do_delete), (do_create_internal), (do_replace), (do_append_to), (do_move), (do_create_dir_monitor), (do_create_file_monitor): Remove all the hacks to handle a single storage head differently from multiple storage heads, this makes photo directories detection and the likes work for multiple storage-heads (Closes: #520123) svn path=/trunk/; revision=2126
* Patch from David ZeuthenAlexander Larsson2008-10-211-7/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-10-21 Alexander Larsson <alexl@redhat.com> Patch from David Zeuthen * common/Makefile.am: * common/gvfsicon.[ch]: Added GVfsIcon object for GVfs backend specific icons. * common/gmountspec.[ch]: Make sure to/from string works correctly to roundtrip GMountSpec:s Make GMountSpec a boxed type * common/gvfsdaemonprotocol.h: Add OpenIconForRead operation * client/Makefile.am: * client/gvfsiconloadable.[ch]: In gvfs client side, implement GLoadableIcon for GVfsIcon type. * client/gdaemonvfs.c: Make sure that we add the GLoadableIcon interface for GVfsIcon on load * daemon/Makefile.am: * daemon/gvfsbackend.[ch]: * daemon/gvfsjobopeniconforread.[ch]: Add new job type for OpenIconForRead op * daemon/gvfsbackendgphoto2.c: Implement OpenIconForRead for icon previews. svn path=/trunk/; revision=2070
* Remove misleading comment about the license (#554811)David Zeuthen2008-10-031-4/+0
| | | | | | | | | | 2008-10-03 David Zeuthen <davidz@redhat.com> * daemon/gvfsbackendgphoto2.c: Remove misleading comment about the license (#554811) svn path=/trunk/; revision=2041
* Plug some leaks on error pathsMatthias Clasen2008-08-251-2/+25
| | | | svn path=/trunk/; revision=1907
* Improve various user- and translator- unfriendly error messages.Hans Petter Jansson2008-08-211-8/+8
| | | | | | | | | | | | 2008-08-21 Hans Petter Jansson <hpj@novell.com> * daemon/gvfsbackendgphoto2.c (ensure_ignore_prefix) (do_mount) (do_enumerate): Improve various user- and translator- unfriendly error messages. svn path=/trunk/; revision=1896
* Handle plural forms correctly. Fixes bug #548841.Wouter Bolsterlee2008-08-211-1/+4
| | | | | | | | | | 2008-08-21 Wouter Bolsterlee <wbolster@svn.gnome.org> * daemon/gvfsbackendgphoto2.c (do_unmount): Handle plural forms correctly. Fixes bug #548841. svn path=/trunk/; revision=1894
* Use g_set_error_literal where appropriate. Bug #539167.Christian Persch2008-08-021-6/+6
| | | | svn path=/trunk/; revision=1847
* Add x-content/* support to daemon mounts. Right now a backend can only setDavid Zeuthen2008-07-291-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Bug 518284 – need to add i18n on module branchingMatthias Clasen2008-07-291-58/+55
| | | | | | | | | | | | | | 2008-07-28 Matthias Clasen <mclasen@redhat.com> Bug 518284 – need to add i18n on module branching * daemon/gvfsbackendcdda.c: * daemon/gvfsbackendgphoto2.c: * daemon/gvfsbackendobexftp.c: Now is later. Remove the I18N_LATER hack. svn path=/trunk/; revision=1843
* Use 'camera-photo' rather than just 'camera' since gnome-icon-theme inDavid Zeuthen2008-07-211-2/+2
| | | | | | | | | | | | | 2008-07-21 David Zeuthen <davidz@redhat.com> * monitor/gphoto2/ggphoto2volume.c (do_update_from_hal_for_camera): * daemon/gvfsbackendgphoto2.c (compute_icon_name): (find_udi_for_device): Use 'camera-photo' rather than just 'camera' since gnome-icon-theme in 2.23/2.24 no longer ships 'camera'. Now the icons look fine again. svn path=/trunk/; revision=1828
* get rid of modelines The modelines were inconsistent and caused issuesBenjamin Otte2008-04-221-1/+0
| | | | | | | | | * */*.[ch]: get rid of modelines The modelines were inconsistent and caused issues when used in different editors. svn path=/trunk/; revision=1756
* Bug 526793 – unmount hangs with some backendsMatthias Clasen2008-04-171-0/+2
| | | | | | | | | | | | | 2008-04-16 Matthias Clasen <mclasen@redhat.com> Bug 526793 – unmount hangs with some backends * daemon/gvfsbackendgphoto2.c: Set exit-on-disconnect to FALSE on the private dbus connection to prevent unexpected exit before the job is done. svn path=/trunk/; revision=1743
* Add write support to gphoto2 backend. Also performance enhancements forDavid Zeuthen2008-03-031-407/+2367
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-03-03 David Zeuthen <davidz@redhat.com> Add write support to gphoto2 backend. Also performance enhancements for querying, enumerating and reading. Fixes bug #519651 * daemon/gvfsbackendgphoto2.c: (monitor_proxy_free), (DEBUG), (write_handle_free), (ensure_not_dirty), (dup_for_gphoto2), (monitors_emit_internal), (monitors_emit_created), (monitors_emit_deleted), (monitors_emit_changed), (caches_invalidate_all), (caches_invalidate_free_space), (caches_invalidate_dir), (caches_invalidate_file), (get_error_from_gphoto2), (release_device), (g_vfs_backend_gphoto2_finalize), (_gphoto2_logger_func), (g_vfs_backend_gphoto2_init), (find_udi_for_device), (_hal_device_removed), (split_filename_with_ignore_prefix), (add_ignore_prefix), (file_get_info), (is_directory), (is_regular), (is_directory_empty), (ensure_ignore_prefix), (do_mount), (try_mount), (do_unmount), (free_read_handle), (do_open_for_read), (try_read), (try_seek_on_read), (do_close_read), (do_query_info), (try_query_info), (do_enumerate), (try_enumerate), (do_query_fs_info), (try_query_fs_info), (do_make_directory), (do_slow_file_rename_in_same_dir), (do_file_rename_in_same_dir), (do_dir_rename_in_same_dir), (do_set_display_name), (do_delete), (do_create_internal), (do_create), (do_replace), (do_append_to), (do_write), (do_seek_on_write), (commit_write_handle), (do_close_write), (do_move), (vfs_dir_monitor_destroyed), (do_create_dir_monitor), (vfs_file_monitor_destroyed), (do_create_file_monitor), (g_vfs_backend_gphoto2_class_init): svn path=/trunk/; revision=1514
* Prefer to return a GDaemonMount from an existing GDaemonVolumeMonitorDavid Zeuthen2008-02-251-0/+1405
2008-02-24 David Zeuthen <davidz@redhat.com> * client/gdaemonfile.c: * client/gdaemonvolumemonitor.c: * client/gdaemonvolumemonitor.h: Prefer to return a GDaemonMount from an existing GDaemonVolumeMonitor rather than rolling our own for GDaemonFile's g_file_find_enclosing_mount() implementation. This is to ensure that g_mount_get_volume() will work properly with mounts that are adopted by GVolume objects from other volume monitors. * configure.ac: Check for libgphoto2 * daemon/Makefile.am: * daemon/gvfsbackendcdda.c: Use HAL to detect when the disc is removed and then forcibly unmount the mount. Report size of disc. Hint the file manager to preview files. * hal/ghaldrive.c: * hal/ghalmount.c: * hal/ghalvolume.c: * hal/ghalvolumemonitor.c: * hal/ghalvolumemonitor.h: * hal/hal-pool.c: Ensure that audio and blank CD's are displayed (#514139). Read info.desktop.[icon|name] properties from hal and use these if found. Use proper icon for audio players and make the gphoto2 detection support it as well. Also check for subsystem when filtering on hal capabilities. Also revert the commit to ignore NFS mounts as gio will now only report an user visible mount if it's in /media or $HOME. Make LUKS encrypted volumes work. * daemon/Makefile.am: * daemon/gphoto2.mount.in: * daemon/gvfsbackendgphoto2.c: Land the gphoto2 backend. * programs/Makefile.am: * programs/gvfs-ls.c: Make the --hidden option work. Default to short listing and add a --long option. Implement new options --show-completions and --show-mounts that can be used for shell completions. * programs/gvfs-tree.c: New program * programs/gvfs-bash-completion.sh: Bash completion for gvfs; uses the new --show-completions and --show-mounts options in gvfs-ls. svn path=/trunk/; revision=1359