Commit Graph

138 Commits

Author SHA1 Message Date
Mario Sanchez Prada
2051ee7678 Refactor common code into create_unix_mount_entry ()
https://bugzilla.gnome.org/show_bug.cgi?id=522053
2016-07-26 08:09:27 -06:00
Mario Sanchez Prada
030594777a Implemented _g_get_unix_mounts() based on libmount
https://bugzilla.gnome.org/show_bug.cgi?id=522053
2016-07-26 08:09:27 -06:00
Mario Sanchez Prada
8d5cf2df10 Use libmount to find the path of the fstab file
https://bugzilla.gnome.org/show_bug.cgi?id=522053
2016-07-26 08:09:27 -06:00
Christoph Reiter
f8189ddf98 gio: Add filename type annotations
https://bugzilla.gnome.org/show_bug.cgi?id=767245
2016-06-04 20:38:42 +02:00
Matthias Clasen
9acd0ddbf3 gio: Intern all signal names beforehand
This avoids pointless copying of static strings.
2015-09-12 11:13:45 -04:00
Matthias Clasen
6c43b6a21a Trivial: fix a comment typo 2015-06-04 19:25:42 -04:00
Ryan Lortie
548c165a9f Make GUnixMountMonitor per-context
GUnixMountMonitor was not threadsafe before.  It was a global singleton
which emitted signals in the first thread that happened to construct it.

Move it to a per-context singleton model where each GMainContext gets
its own GUnixMountMonitor.  Monitor for the changes from the GLib worker
thread and dispatch the results to each context with an active monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=742599
2015-03-02 15:10:46 -05:00
Ryan Lortie
ae38d2bfa4 gunixmounts: move GUnixMountMonitor code
Move this code to the correct part of the file.

While we're at it, drop an unused #define MOUNT_POLL_INTERVAL.

https://bugzilla.gnome.org/show_bug.cgi?id=742599
2015-03-02 15:10:46 -05:00
Ryan Lortie
f535218f70 gunixmounts.c: add fold markers
This is a large file with a lot of very complicated code in it.  Add
some fold markers to make things a bit more manageable.

https://bugzilla.gnome.org/show_bug.cgi?id=742599
2015-03-02 15:10:46 -05:00
Ryan Lortie
3167c6124c Deprecate g_unix_mount_monitor_set_rate_limit()
Deprecate g_unix_mount_monitor_set_rate_limit() and turn it into a
no-op.

This function doesn't behave as advertised.  It only controls rate
limiting for filesystem-based monitors.  It has no impact over reporting
mount changes on Linux, for example, because those are based on polling
for changes in /proc (which doesn't use filesystem monitors).  It also
has no impact on Mac OS because a library interface is used there.

This was added in https://bugzilla.gnome.org/show_bug.cgi?id=521946 in
order to be used by HAL, which is effectively dead.  udisks no longer
uses this code at all.

https://bugzilla.gnome.org/show_bug.cgi?id=742599
2015-03-02 15:10:46 -05:00
Ryan Lortie
73d4e6f12f Rename g_unix_mount_monitor_new() to _get()
This is a singleton, but we have a function called _new() to get it.
What's worse is that the documentation makes no mention of this, and
actually specifically says that a new monitor will be created each time.

https://bugzilla.gnome.org/show_bug.cgi?id=742599
2015-03-02 15:10:46 -05:00
Patrick Welche
369c8bd566 GUnixMounts: Improve efficiency in polling case
https://bugzilla.gnome.org/show_bug.cgi?id=583330
2014-08-27 15:08:38 +02:00
Patrick Welche
4f775b7b7f GUnixMounts: Fall back to polling on systems without mtab
This is necessary for many of the BSD family at least.

https://bugzilla.gnome.org/show_bug.cgi?id=583330
2014-08-19 10:48:12 +02:00
Rico Tzschichholz
e0e52b60ea docs: Fix broken gtk-doc formatting 2014-08-18 14:08:41 +02:00
Matthias Clasen
35066ed6c6 Docs: Drop entities, switch away from sgml mode
Since all element markup is now gone from the doc comments,
we can turn off the gtk-doc sgml mode, which means that from
now on, docbook markup is no longer allowed in doc comments.

To make this possible, we have to replace all remaining
entities in doc comments by their replacement text, & -> &
and so on.
2014-02-09 02:07:26 -05:00
Matthias Clasen
cb588d4532 Convert external links to markdown syntax 2014-02-05 21:23:28 -05:00
Matthias Clasen
0cc20b7e0b Don't use <filename> in docs
Switch to simpler markdown, `foo`.
2014-02-05 20:17:46 -05:00
Antoine Jacoutot
7cf221aadb gio: extend the system_internal lists with BSD paths 2014-02-02 10:08:05 +01:00
Daniel Mustieles
078dbda148 Updated FSF's address 2014-01-31 14:31:55 +01:00
Ryan Lortie
3f41e49285 Use POSIX-specified <poll.h> over <sys/poll.h>
POSIX specifies that <poll.h> is the correct header to include for
poll(), so let's do that instead.

https://bugzilla.gnome.org/show_bug.cgi?id=141251
2013-12-22 11:33:07 -05:00
Philip Withnall
73e6b900d4 gunixmounts: Fix a potential strcmp(NULL) call
mntent->mnt_fsname may be NULL at this point; if so, fall to the second
branch and set mount_entry->device_path = NULL.

Found by scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=113075
2013-11-27 10:01:29 +00:00
Lionel Landwerlin
74ed1cf5b0 gunixmounts: remove warning on unused variable
https://bugzilla.gnome.org/show_bug.cgi?id=697367
2013-04-10 11:07:12 +01:00
Lionel Landwerlin
d474309c3f gunixmounts: correctly flag hasmntopt usage
https://bugzilla.gnome.org/show_bug.cgi?id=697365
2013-04-07 07:11:30 +01:00
Alexander Larsson
b0d5ce1678 Ignore fstab entries that are bind mounts
We don't show the bind mounts anyway, so it only leads to
problems when we show the fstab entries, like being unable
to mount them.

https://bugzilla.gnome.org/show_bug.cgi?id=625552
2013-01-24 10:07:03 +01:00
Matthias Clasen
344066e0c1 Fix gio docs 2012-09-23 02:18:56 -04:00
William Jon McCann
a2dca48bf7 Add symbolic icon support to drive, volume, and mount
We need symbolic icon support for display in Nautilus.

https://bugzilla.gnome.org/show_bug.cgi?id=682101
2012-08-30 11:04:43 -04:00
Tomas Bzatek
f3fca56b7e gio: Only show mounts in /run/media/$USER
And reflect the recent changes + sync with gvfs+udisks2 rules.

https://bugzilla.gnome.org/show_bug.cgi?id=669797
2012-03-16 18:54:09 +01:00
David King
8c8657ac34 docs: Correct GUnixMount → GUnixMountEntry 2012-02-21 01:10:54 +01:00
David Zeuthen
3f982cb9ab GUnixMountPoint: expose options
Make the options from an /etc/fstab entry available as public API -
this can be used to support options such as

 comment=gvfs.name=Foo\040Bar

to e.g. set the name of an fstab mount in the UI to "Foo Bar".

https://bugzilla.gnome.org/show_bug.cgi?id=660536

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-10-03 14:06:47 -04:00
David Zeuthen
934e0a7470 GUnixFileMonitor: Clean up /proc/mounts monitoring
Most suggestions from Colin Walters <walters@verbum.org>.

https://bugzilla.gnome.org/show_bug.cgi?id=660511

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-29 15:49:09 -04:00
David Zeuthen
55065461bf GUnixFileMonitor: Use /proc/mounts for monitoring mount changes
On recent Linux distros /etc/mtab is just a symlink to /proc/mounts
and GFileMonitor does not work there because of how the kernel conveys
that the file changes.

https://bugzilla.gnome.org/show_bug.cgi?id=660511

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-29 15:16:51 -04:00
Ryan Lortie
1f5262d2c9 gunixmounts: exempt entries with "none" mountpoint
We ignore entries with mountpoint of "swap" and "ignore".  Add "none" to
that list, since Debian uses it.

Probably we should move to using our already-existing internal list of
things to ignore, but this patch is more minimally intrusive for now.

https://bugzilla.gnome.org/show_bug.cgi?id=654563
2011-09-21 10:20:08 -04:00
Antoine Jacoutot
0db338bdb0 gunixmounts: Fix compilation on BSD
Commit afa82ae805 introduced a compilation
regression on BSD systems that use the sysctl(3) interface; we need to
declare the buffer len in _g_get_unix_mount_points()
BZ #659528
2011-09-20 16:58:00 +02:00
Patrick Welche
afa82ae805 Avoid getmntinfo
- getmntinfo can take struct statfs or statvfs depending on the
  OS. Use getvfsstat and if not found getfsstat instead. Idea from
  Dan Winship.
- g_local_file_query_filesystem_info(): use statvfs.f_fstypename
  if available

https://bugzilla.gnome.org/show_bug.cgi?id=617949
2011-09-04 17:50:41 -04:00
David Zeuthen
428f49b9c8 In addition to /media and $HOME, also show mounts in $XDG_USER_DIR
Prepare for the future where udisks will use $XDG_USER_DIR/Volumes
instead of /media when mounting filesystems on behalf of the user.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-08-12 11:10:22 -04:00
Ryan Lortie
06941419e3 Add some blacklisted mount directories
Another long-carried Debian patch.  No reason that we should not have
these few extra items in the (already long) upstream list.
2011-07-20 10:52:07 +02:00
Patrick Welche
7f289c924b Avoid failing arguments to statfs() test on systems which use statvfs.
- move choice of statfs vs statvfs from gio/glocalfile.c to configure.ac
- if statvfs is the choice, then don't check number of arguments to statfs()
- use choice in gio/gunixmounts.c as well

https://bugzilla.gnome.org/show_bug.cgi?id=617949
2011-07-18 14:17:28 -04:00
Matthias Clasen
01f63b19f9 Fix links in gio docs 2011-06-04 18:48:19 -04:00
Pavel Holejsovsky
f6b52322a2 Fix and update GI annotations for 'Volumes and Drives'
Volumes and Drives GIO category contains: GVolumeMonitor, GVolume,
GMount, GDrive, Unix Mounts.
2011-01-07 15:06:07 +01:00
Tomas Bzatek
2bfcffde9a GIO: Hide mounts having a path element starting with dot
When a mount is mounted to a directory whose path contains an element
starting with dot, let's treat it as hidden, just like the usual Unix
approach.
2010-11-16 14:20:07 +01:00
Johan Dahlin
30132c44c1 Add a lot of missing annotations 2010-09-24 18:24:41 -03:00
Johan Dahlin
835f9cb310 [introspection] Move over annotations
Move all the annotations over from gobject-introspection.

They will not be used directly by the introspection scanner for now,
instead they will be extracted by a script and updated manually
until introspection is properly integrated into the glib build
2010-09-24 15:52:38 -03:00
Matthias Clasen
29850d03e8 Be a bit more picky when deciding if mounts are internal
Complained about in bug 623780.
2010-07-08 15:18:05 -04:00
Ryan Lortie
5b946e0504 gio/: fully remove gioalias hacks 2010-07-07 19:53:22 -04:00
Matthias Clasen
062148ae9a Correct some documentation mistakes in gunixmounts.c
Pointed out by Ross Burton in bug #618904
2010-06-15 21:57:57 -04:00
Matthias Clasen
7ca2e00054 Doc improvements
Make sure all unix-specific apis are marked as such.
2010-05-08 23:28:17 -04:00
Alexander Larsson
8c6e7c103f Bug 570073 – Add support for reading filesystems on Interix
2009-02-25  Alexander Larsson  <alexl@redhat.com>

	Bug 570073 – Add support for reading filesystems on Interix

	* gunixmounts.c (_g_get_unix_mounts):
	Support Interix. Patch from  Fabian Groffen 


svn path=/trunk/; revision=7911
2009-02-25 16:37:35 +00:00
Matthias Clasen
f548330275 Fix "it's" vs "its" confusion throughout the source. Patch by Will
* Fix "it's" vs "its" confusion throughout the source. Patch
        by Will Thompson.


svn path=/trunk/; revision=7897
2009-02-23 04:30:06 +00:00
Matthias Clasen
b77a6eeac9 Some cleanups
svn path=/trunk/; revision=7817
2009-01-19 06:09:11 +00:00
Matthias Clasen
782fe440ef Add notes about being UNIX-specific
svn path=/trunk/; revision=7756
2008-12-31 07:47:19 +00:00
Ryan Lortie
a28d87bfc9 fix leak that occurs when multiple mount entries match the requested path
2008-12-12  Ryan Lortie  <desrt@desrt.ca>

        * gio/gunixmounts.c (g_unix_mount_at): fix leak that occurs when
        multiple mount entries match the requested path


svn path=/trunk/; revision=7742
2008-12-12 20:03:36 +00:00
Matthias Clasen
c7d37fca34 Hide ecryptfs mounts, so that the desktop does not show both the mount and
* gunixmounts.c: (guess_system_internal): Hide ecryptfs mounts,
        so that the desktop does not show both the mount and the target
        directory. Patch by Martin Pitt


svn path=/trunk/; revision=7736
2008-12-08 05:47:26 +00:00
Matthias Clasen
08b1ec389b Use g_access() to check accessibility of local devices. Patch by Martin
* gunixmounts.c: Use g_access() to check accessibility of local devices.
        Patch by Martin Pitt


svn path=/trunk/; revision=7733
2008-12-08 04:33:41 +00:00
Padraig O'Briain
4cafadc955 Add zfs to ignore_fs array in guess_system_internal: Fix for #542156.
2008-08-15  Padraig O'Briain  <padraig.obriain@sun.com>

	* gunixmounts.c: Add zfs to ignore_fs array in guess_system_internal:
	Fix for #542156.


svn path=/trunk/; revision=7357
2008-08-15 08:27:55 +00:00
Sven Neumann
8d37a7964d gfilenamecompleter.c glocaldirectorymonitor.c gmountoperation.c
2008-08-11  Sven Neumann  <sven@gimp.org>

	* gfilenamecompleter.c
	* glocaldirectorymonitor.c
	* gmountoperation.c
	* gunionvolumemonitor.c
	* gunixmount.c
	* gunixmounts.c
	* gunixvolume.c
	* gunixvolumemonitor.c
	* gvolumemonitor.c
	* gwin32mount.c
	* gwin32volumemonitor.c: use canonical signal names.


svn path=/trunk/; revision=7339
2008-08-11 19:45:08 +00:00
Matthias Clasen
c723669198 doc fixes
svn path=/trunk/; revision=7226
2008-07-21 02:53:30 +00:00
Matthias Clasen
20174898b5 Use g_strcmp0 instead of rolling our own
svn path=/trunk/; revision=7183
2008-07-15 05:42:11 +00:00
Matthias Clasen
ee96535cec Fix a doc typo
svn path=/trunk/; revision=7136
2008-07-02 03:41:58 +00:00
Johan Dahlin
761424465a Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch


svn path=/trunk/; revision=7092
2008-06-22 15:10:51 +00:00
Michael Natterer
a4427bfff5 chain up unconditionally in finalize() and dispose(). Also don't
2008-06-16  Michael Natterer  <mitch@imendio.com>

	* *.c: chain up unconditionally in finalize() and dispose(). Also
	don't dereference these function pointers when calling them since
	that has no meaning at all.


svn path=/trunk/; revision=7048
2008-06-16 09:54:04 +00:00
David Zeuthen
27dba4c28b Avoid displaying mounts in a subdirectory not accessible to the user
2008-04-28  David Zeuthen  <davidz@redhat.com>

        * gunixmounts.c (g_unix_mount_guess_should_display): Avoid
        displaying mounts in a subdirectory not accessible to the
        user (#526320).


svn path=/trunk/; revision=6872
2008-04-28 22:38:49 +00:00
Sebastien Bacher
087bf32df3 Don't list the user directory as a mount, fix potential issue when other
2008-04-04  Sebastien Bacher  <seb128@ubuntu.com>

	* gunixmounts.c: (g_unix_mount_guess_should_display):
	Don't list the user directory as a mount, fix potential issue
	when other users have a similar naming and don't special case the
	gvfs mounts there since that's not required (#525866)


svn path=/trunk/; revision=6825
2008-04-04 07:37:34 +00:00
Sebastien Bacher
864b0d690e consider nfs4 mounts as G_UNIX_MOUNT_TYPE_NFS (Closes: #523338)
2008-03-19  Sebastien Bacher  <seb128@ubuntu.com>

	* gunixmounts.c: (guess_mount_type): 
	consider nfs4 mounts as G_UNIX_MOUNT_TYPE_NFS (Closes: #523338)

svn path=/trunk/; revision=6737
2008-03-19 14:07:00 +00:00
David Zeuthen
51d7fc9e96 Add g_unix_mount_monitor_set_rate_limit() function (#521946)
2008-03-12  David Zeuthen  <davidz@redhat.com>

	* gio.symbols:
	* gunixmounts.[ch]:
	Add g_unix_mount_monitor_set_rate_limit() function (#521946)



svn path=/trunk/; revision=6711
2008-03-14 11:18:59 +00:00
Alexander Larsson
240ba02786 Avoid redudant tests (#521851) Patch from Josselin Mouette
2008-03-14  Alexander Larsson  <alexl@redhat.com>

        * gunixmounts.c:
        (guess_mount_type):
	Avoid redudant tests (#521851)
	Patch from Josselin Mouette


svn path=/trunk/; revision=6710
2008-03-14 11:15:49 +00:00
Alexander Larsson
5241d96b21 Fix sparse warnings (#519489)
2008-03-06  Alexander Larsson  <alexl@redhat.com>

        * gdesktopappinfo.c:
        * gfilemonitor.c:
        * gthemedicon.c:
        * gunionvolumemonitor.c:
        * gunixmounts.c:
        * tests/g-file.c:
        * tests/live-g-file.c:
        * xdgmime/xdgmimecache.c:
	Fix sparse warnings (#519489)


svn path=/trunk/; revision=6632
2008-03-06 09:53:35 +00:00
Alexander Larsson
4a1cf45793 Remove type guessing, instead just display mounts in /media and in ~/.
2008-02-25  Alexander Larsson  <alexl@redhat.com>

        * gunixmounts.c:
        (g_unix_mount_guess_should_display):
	Remove type guessing, instead just display
	mounts in /media and in ~/.


svn path=/trunk/; revision=6582
2008-02-25 11:15:06 +00:00
Matthias Clasen
0766a1ec39 Consistently use getmntent_r() and fall back to getmntent(). (#515492)
2008-02-09  Matthias Clasen <mclasen@redhat.com>

        * gunixmounts.c: Consistently use getmntent_r() and fall
        back to getmntent().  (#515492)



svn path=/trunk/; revision=6490
2008-02-10 05:20:00 +00:00
Murray Cumming
f0749cc896 Corrected some typos in the documentation: occured -> occurred. its ->
2008-01-16  Murray Cumming  <murrayc@murrayc.com>

* gappinfo.c:
* gdatainputstream.c:
* gfile.c:
* gfileoutputstream.c:
* ginputstream.c:
* gmount.c:
* goutputstream.c:
* gseekable.c:
* gunixmounts.c: Corrected some typos in the documentation:
occured -> occurred.
its -> it's (where appropriate).

svn path=/trunk/; revision=6322
2008-01-16 20:00:23 +00:00
Alexander Larsson
3690cb75a6 Add GError to file monitor calls
2008-01-14  Alexander Larsson  <alexl@redhat.com>

        * gfile.[ch]:
        (g_file_monitor_directory):
        (g_file_monitor_file):
	Add GError to file monitor calls
	
        * glocaldirectorymonitor.c:
        * glocaldirectorymonitor.h:
        * glocalfile.c:
        * glocalfilemonitor.c:
        * glocalfilemonitor.h:
        * gunixmounts.c:
	Update for above change


svn path=/trunk/; revision=6306
2008-01-14 15:00:31 +00:00
Frederic Crozat
7fe31089ff add rpc_pipefs to systemfs list (#508309).
2008-01-10  Frederic Crozat  <fcrozat@mandriva.com>

        * gunixmounts.c: add rpc_pipefs to systemfs list (#508309).


svn path=/trunk/; revision=6289
2008-01-10 09:55:35 +00:00
Alexander Larsson
896ebed1a5 Add g_unix_mount_guess_should_display and use for unix volume monitor
2008-01-09  Alexander Larsson  <alexl@redhat.com>

        * gio.symbols:
        * gunixmount.c:
        * gunixmounts.[ch]:
	Add g_unix_mount_guess_should_display and use
	for unix volume monitor backend.
	This means we more or less show what the
	gnome-vfs backend did.
	Based on patch from Padraig O'Briain


svn path=/trunk/; revision=6285
2008-01-09 15:45:56 +00:00
Alexander Larsson
47b8809e17 Add g_themed_icon_new_with_default_fallbacks
2008-01-09  Alexander Larsson  <alexl@redhat.com>

        * gio.symbols:
        * gthemedicon.[ch]:
        Add g_themed_icon_new_with_default_fallbacks
	
        * gunixmounts.c:
	Use default fallbacks for icons



svn path=/trunk/; revision=6284
2008-01-09 15:20:49 +00:00
Alexander Larsson
246e2e71a9 Add /usr/local to list of internal mountpoints
2008-01-03  Alexander Larsson  <alexl@redhat.com>

	* gunixmounts.c (g_unix_is_mount_path_system_internal):
	Add /usr/local to list of internal mountpoints


svn path=/trunk/; revision=6237
2008-01-03 10:29:29 +00:00
Matthias Clasen
c014e5f8de More doc updates
svn path=/trunk/; revision=6213
2007-12-30 05:30:42 +00:00
Matthias Clasen
0debd52858 Fix up includes in section docs
svn path=/trunk/; revision=6149
2007-12-18 02:52:11 +00:00
Matthias Clasen
feb5258cf9 Namespace waste reduction, move some g_get_unix_mount functions to the
2007-12-17  Matthias Clasen  <mclasen@redhat.com>

        * gio.symbols:
        * gunixmounts.[hc]: Namespace waste reduction, move some
        g_get_unix_mount functions to the g_unix_mount namespace.

        * gunixmounts.c:
        * gunixvolumemonitor.c:
        * glocalfile.c:
        * glocaldirectorymonitor.c: Update all callers.

        * gunixmounts.h: Remove leftover g_unix_get_canonical_device_path


svn path=/trunk/; revision=6143
2007-12-17 14:59:23 +00:00
Alexander Larsson
6ad96b3677 Add missing #ifdef fixing OSX build. (#503334, patch from Richard Hult)
2007-12-17  Alexander Larsson  <alexl@redhat.com>

        * gunixmounts.c:
	Add missing #ifdef fixing OSX build.
	(#503334, patch from Richard Hult)



svn path=/trunk/; revision=6141
2007-12-17 10:53:53 +00:00
David Zeuthen
f4add8f0fa Provide eject() on both GMount and GVolume and utility functions to guess
2007-12-14  David Zeuthen  <davidz@redhat.com>

	* Makefile.am:
	* gio.symbols:
	* gmount.c: (g_mount_get_uuid), (g_mount_can_eject),
	(g_mount_eject), (g_mount_eject_finish):
	* gmount.h:
	* gunionvolumemonitor.c: (g_union_volume_monitor_finalize),
	(get_volume_for_uuid), (get_mount_for_uuid),
	(g_union_volume_monitor_class_init),
	(get_default_native_type_with_exclude), (get_default_native_type),
	(get_native_type), (update_native_type),
	(g_union_volume_monitor_init), (_g_mount_get_for_mount_path):
	* gunixmount.c: (_g_unix_mount_new), (g_unix_mount_get_uuid),
	(g_unix_mount_can_eject), (eject_unmount_cb),
	(eject_unmount_read_error), (eject_unmount_do),
	(g_unix_mount_unmount), (g_unix_mount_eject),
	(g_unix_mount_eject_finish), (g_unix_mount_mount_iface_init):
	* gunixmounts.c: (g_unix_mount_guess_can_eject),
	(g_unix_mount_point_guess_can_eject):
	* gunixmounts.h:
	* gunixvolume.c: (_g_unix_volume_new), (g_unix_volume_get_uuid),
	(g_unix_volume_can_eject), (g_unix_volume_get_drive),
	(eject_mount_cb), (eject_mount_read_error), (eject_mount_do),
	(g_unix_volume_mount), (g_unix_volume_eject),
	(g_unix_volume_eject_finish), (g_unix_volume_volume_iface_init):
	* gunixvolumemonitor.c: (get_volume_for_uuid),
	(get_mount_for_uuid), (g_unix_volume_monitor_class_init),
	(update_mounts):
	* gvolume.c: (g_volume_get_uuid), (g_volume_can_eject),
	(g_volume_eject), (g_volume_eject_finish):
	* gvolume.h:
	* gvolumemonitor.c: (g_volume_monitor_get_volume_for_uuid),
	(g_volume_monitor_get_mount_for_uuid):
	* gvolumemonitor.h:

	Provide eject() on both GMount and GVolume and utility functions
	to guess whether a GUnixMountPoint or GUnixMountEntry should be
	ejected. Introduce the concept of UUID's and wire it into GVolume
	and GMount and provide API on GVolumeMonitor to find such
	instances. Also handle the case where an external
	GNativeVolumeMonitor fails to initialize. Lock around the
	_g_get_mount_for_mount_path() function such that volume monitor
	implementations won't have to do locking themselves.



svn path=/trunk/; revision=6140
2007-12-17 09:31:08 +00:00
Matthias Clasen
2e3f48993d Documentation updates
svn path=/trunk/; revision=6138
2007-12-17 07:04:51 +00:00
Matthias Clasen
f5d2feddf6 Fix up docs
svn path=/trunk/; revision=6133
2007-12-15 06:03:35 +00:00
Alexander Larsson
f506365079 Move GFileAttributeValue to a private header, as its sort of ugly.
2007-12-14  Alexander Larsson  <alexl@redhat.com>

	* Makefile.am:
        * gfileattribute.[ch]:
        * gfileattribute-priv.h:
	Move GFileAttributeValue to a private header, as
	its sort of ugly.
	
        * gfile.[ch]:
	Make set_attribute take a type + a pointer instead
	of a GFileAttributeValue.
	
        * gfileinfo.[ch]:
	Fix up for above changes.
	Add g_file_info_get_attribute_data to get
	all info in one call, g_file_info_get_attribute_status
	to get the status and g_file_info_get_attribute_as_string.
	
        * gio.symbols:
        * glocalfile.c:
        * glocalfileinfo.[ch]:
	Update for changes
	
        * gunixmounts.c:
	Make _guess_type static.


svn path=/trunk/; revision=6129
2007-12-14 15:56:56 +00:00
David Zeuthen
3ca9fd4dbb Rework how volumes, drives and volume monitoring is done. Previosly the
2007-12-11  David Zeuthen  <davidz@redhat.com>

	Rework how volumes, drives and volume monitoring is
	done. Previosly the model was

	 GDrive <1-1> GVolume

	where a GDrive instance represented a mount point and a GVolume
	instance represented a mounted file system. This patch changes it
	the model to

		GDrive <1-N> GVolume <1-1> GMount

	where GMount now serves the purpose of the old GVolume and the new
	GVolume serves the purpose of the old GDrive. In addition the new
	GDrive interface is used to represent a collection of GVolume
	instances (typically partitions) and also contains utility to query
	the state of the physical drive the GDrive object represents (such
	as checking for media, polling the drive, ejecting the media etc.).

	Also implement mounting and unmounting in the Unix volume monitor
	backend. A subquent patch will introduce GDrive support for ejection
	of media.

	* Makefile.am:
	* gdrive.c: (g_drive_is_media_check_automatic),
	(g_drive_is_media_removable), (g_drive_has_media),
	(g_drive_can_poll_for_media), (g_drive_eject),
	(g_drive_eject_finish), (g_drive_poll_for_media),
	(g_drive_poll_for_media_finish):
	* gdrive.h:
	* gfile.c: (g_file_find_enclosing_mount):
	* gfile.h:
	* gio.symbols:
	* glocaldirectorymonitor.c:
	(g_local_directory_monitor_constructor), (mounts_changed):
	* glocalfile.c: (get_mount_info),
	(g_local_file_find_enclosing_mount),
	(g_local_file_file_iface_init):
	* gnativevolumemonitor.h:
	* gunionvolumemonitor.c: (get_mounts), (get_volumes),
	(get_connected_drives), (g_union_volume_monitor_class_init),
	(child_volume_added), (child_volume_removed),
	(child_volume_changed), (child_mount_added), (child_mount_removed),
	(child_mount_pre_unmount), (child_mount_changed),
	(child_drive_changed), (g_union_volume_monitor_add_monitor),
	(g_union_volume_monitor_remove_monitor),
	(_g_mount_get_for_mount_path):
	* gunixmounts.c: (g_unix_is_mount_path_system_internal),
	(guess_system_internal), (_g_get_unix_mounts),
	(_g_get_unix_mount_points), (g_get_unix_mount_at),
	(g_unix_mount_free), (g_unix_mount_compare),
	(g_unix_mount_get_mount_path), (g_unix_mount_get_device_path),
	(g_unix_mount_get_fs_type), (g_unix_mount_is_readonly),
	(g_unix_mount_is_system_internal), (g_unix_mount_guess_type),
	(type_to_icon), (g_unix_mount_guess_name),
	(g_unix_mount_guess_icon), (g_unix_mount_point_guess_name),
	(g_unix_mount_point_guess_icon), (_canonicalize_filename),
	(_resolve_symlink), (_resolve_dev_root):
	* gunixmounts.h:
	* gunixvolume.c: (g_unix_volume_finalize), (_g_unix_volume_new),
	(_g_unix_volume_disconnected), (_g_unix_volume_set_mount),
	(_g_unix_volume_unset_mount), (g_unix_volume_get_icon),
	(g_unix_volume_get_name), (g_unix_volume_can_mount),
	(g_unix_volume_get_drive), (g_unix_volume_get_mount),
	(_g_unix_volume_has_mount_path), (mount_cb), (mount_read_error),
	(g_unix_volume_mount), (g_unix_volume_mount_finish),
	(g_unix_volume_volume_iface_init):
	* gunixvolume.h:
	* gunixvolumemonitor.c: (g_unix_volume_monitor_finalize),
	(get_mounts), (get_volumes), (get_connected_drives),
	(get_mount_for_mount_path), (g_unix_volume_monitor_class_init),
	(mountpoints_changed), (mounts_changed),
	(g_unix_volume_monitor_init),
	(_g_unix_volume_monitor_lookup_volume_for_mount_path),
	(find_mount_by_mountpath), (update_volumes), (update_mounts):
	* gunixvolumemonitor.h:
	* gvolume.c: (g_volume_get_mount), (g_volume_can_mount),
	(g_volume_mount), (g_volume_mount_finish):
	* gvolume.h:
	* gvolumemonitor.c: (g_volume_monitor_class_init),
	(g_volume_monitor_get_connected_drives),
	(g_volume_monitor_get_volumes), (g_volume_monitor_get_mounts):
	* gvolumemonitor.h:


svn path=/trunk/; revision=6095
2007-12-11 21:23:55 +00:00
Matthias Clasen
a2ca589703 More coding style fixes
svn path=/trunk/; revision=5999
2007-11-30 05:11:25 +00:00
Alexander Larsson
7f3280230b Added. Added. Added. Added.
2007-11-28  Alexander Larsson  <alexl@redhat.com>

        * Makefile.am:
        * abicheck.sh: Added.
        * makegioalias.pl: Added.
        * pltcheck.sh: Added.
        * gio.symbols: Added.
	* *.c:
        * inotify/*.c
	Initial work on adding symbol handling.

	* gvfs.h:
	Correct ifdef guard name

        * fam/Makefile.am:
        * inotify/Makefile.am:
        * xdgmime/Makefile.am:
	Include toplevel Makefile.decl


svn path=/trunk/; revision=5972
2007-11-28 12:39:07 +00:00
Matthias Clasen
442e8df1b8 Clean up some docs
svn path=/trunk/; revision=5966
2007-11-28 04:29:02 +00:00
Andrew Walton
5247f12f36 Bumps documentation to 93% symbol coverage, touching most
of the public files. Fixes broken function documentation prototypes. 
	Fixes GCancellable inaccuracies. Removes unnecessary incomplete 
	gtk-doc headers in private files.

svn path=/trunk/; revision=5953
2007-11-27 14:00:13 +00:00
Alexander Larsson
3781343738 gio/ docs/reference/gio Merged gio-standalone into glib.
2007-11-26  Alexander Larsson  <alexl@redhat.com>

        * Makefile.am:
        * configure.in:
        * gio-2.0-uninstalled.pc.in:
        * gio-2.0.pc.in: 
        * gio-unix-2.0-uninstalled.pc.in:
        * gio-unix-2.0.pc.in:
	* gio/
	* docs/reference/gio
	Merged gio-standalone into glib.
	
        * glib/glibintl.h:
        * glib/gutils.c:
	Export glib_gettext so that gio can use it
	Add P_ (using same domain for now)
	Add I_ as g_intern_static_string


svn path=/trunk/; revision=5941
2007-11-26 16:13:05 +00:00