Commit Graph

34 Commits

Author SHA1 Message Date
Michael Natterer
f2a2d6c9ac big header formatting cleanup: indentation, vtable formatting, consistent
2008-09-02  Michael Natterer  <mitch@imendio.com>

	* *.h: big header formatting cleanup: indentation, vtable
	formatting, consistent spacing in (* vfunc), trailing whitespace
	removal. Formatting should be pretty consistent in all GIO headers
	now.


svn path=/trunk/; revision=7433
2008-09-02 19:05:58 +00:00
Matthias Clasen
d19e08a40c Add g_file_monitor
svn path=/trunk/; revision=7145
2008-07-02 17:19:16 +00:00
Cody Russell
3d93bf6968 Moved all relevant typedefs into these files.
2008-07-01  Cody Russell  <bratsche@gnome.org>

        * gio/gioenums.h:
        * gio/giotypes.h:
	Moved all relevant typedefs into these	files.

        * gio/*.[ch]:
	Updated wrt added files.

        Split types into separate file	for easier maintainership. (#538564)


svn path=/trunk/; revision=7127
2008-07-01 06:32:35 +00:00
Ross Burton
3480685d4e Bug 536252 – GFileEnumerator should allow access to the containing GFile
2008-06-16  Ross Burton  <ross@burtonini.com>

	Bug 536252 – GFileEnumerator should allow access to the containing
	GFile
	
	* gio/gfileenumerator.c:
	* gio/gfileenumerator.h:
	* gio/gfile.h:
	Add g_file_enumerator_get_container() and a container writeable
	construct-only property.  Also shuffle around typedefs to make it
	compile.
	
	* gio/glocalfileenumerator.c:
	* gio/glocalfileenumerator.h:
	* gio/glocalfile.c:
	Instead of a string filename take a GFile in the constructor and
	use it to set the container property.
	
	* gio/gio.symbols:
	* docs/reference/gio/gio-sections.txt:
	Update with new API.

svn path=/trunk/; revision=7044
2008-06-16 08:49:08 +00:00
Ross Burton
7653f50019 Bug 511367 - add g_file_make_directory_with_parents.
2008-06-11  Ross Burton  <ross@burtonini.com>

	Bug 511367 - add g_file_make_directory_with_parents.
	
	* gio/gfile.c:
	* gio/gfile.h:
	* gio/gio.symbols: Add g_file_make_directory_with_parents.

svn path=/trunk/; revision=7001
2008-06-11 15:48:06 +00:00
Matthias Clasen
a07b747200 Add g_file_query_file_type convenience function to query the type of a
2008-03-30  Matthias Clasen  <mclasen@redhat.com>

        * gio.symbols:
        * gfile.c:
        * gfile.h: Add g_file_query_file_type convenience function
        to query the type of a file.  (#520715, Mikkel Kamstrup Erlandsen)



svn path=/trunk/; revision=6784
2008-03-31 04:46:22 +00:00
Alexander Larsson
5d1de3eed1 Remove deprecated g_file_contains_file.
2008-02-25  Alexander Larsson  <alexl@redhat.com>

        * gfile.[ch]:
	Remove deprecated g_file_contains_file.


svn path=/trunk/; revision=6585
2008-02-25 13:19:58 +00:00
David Zeuthen
bfda430eff Implement this function by moving bits from glocalfileinfo.c
2008-02-21  David Zeuthen  <davidz@redhat.com>

	* glocalfileinfo.c: (_g_local_file_info_get):
	* gcontenttype.c:
	(g_content_type_get_icon): Implement this function by
	moving bits from glocalfileinfo.c
	(g_content_type_get_description): Unalias before getting
	description (#517687)

	* gfile.c: (g_file_class_init),
	(g_file_query_filesystem_info_async),
	(g_file_query_filesystem_info_finish),
	(query_filesystem_info_data_free),
	(query_filesystem_info_async_thread),
	(g_file_real_query_filesystem_info_async),
	(g_file_real_query_filesystem_info_finish):
	* gfile.h: Implement async version of
	g_file_query_filesystem_info()

	* gfileinfo.h: Add new attributes for filesystem::use-preview

	* gio.symbols: Update

	* gthemedicon.c: (g_themed_icon_append_name):
	* gthemedicon.h: Add new new convenience function.

	* gunionvolumemonitor.c: (g_union_volume_monitor_dispose),
	(get_mounts), (get_volumes), (get_connected_drives),
	(get_volume_for_uuid), (get_mount_for_uuid),
	(g_union_volume_monitor_init), (populate_union_monitor),
	(g_volume_monitor_get), (_g_mount_get_for_mount_path),
	(g_volume_monitor_adopt_orphan_mount):
	* gvolumemonitor.c:
	* gvolumemonitor.h: Use recursive locks so it's safe for volume
	monitor implementations to call into the main volume monitor. Also
	separate object initialization and volume monitor initialization
	such that non-native volume monitors can properly adopt their
	mounts away.


svn path=/trunk/; revision=6550
2008-02-21 12:35:05 +00:00
Alexander Larsson
6dc9b7ee00 Add new g_file_has_prefix that does the same as g_file_contains_file.
2008-02-21  Alexander Larsson  <alexl@redhat.com>

        * gfile.[ch]:
        * gio.symbols:
	Add new g_file_has_prefix that does the same as g_file_contains_file.
	Deprecate g_file_contains_file and add a macro that converts
	it to g_file_has_prefix.
	The reason for this change is that the contains_file() name seems to
	imply that this does more work than what it does, but its really only
	a name match (from #517086)
	
        * gdummyfile.c:
        * glocalfile.c:
        * tests/g-file.c:
	Update to match the above change.


svn path=/trunk/; revision=6546
2008-02-21 09:09:59 +00:00
Sylvain Pasche
add0a2f496 Remove trailing coma in GMountMountFlags struct
2008-02-18  Sylvain Pasche <sylvain.pasche@gmail.com>

        * gfile.h:
	 Remove trailing coma in GMountMountFlags struct


svn path=/trunk/; revision=6536
2008-02-19 08:49:16 +00:00
Alexander Larsson
e3fdcd1fa7 Added GMountMountFlags enum and added a flags argument to all mount calls.
2008-02-11  Alexander Larsson  <alexl@redhat.com>

        * gfile.[ch]:
        * gmount.[ch]:
        * gvolume.[ch]:
	Added GMountMountFlags enum and added a flags
	argument to all mount calls.
	
	This is an API/ABI change for future extensibility,
	as I think we will need at least an
	inhibit-autorun flag (the panel needs this).
	There are no flags defined yet though.


svn path=/trunk/; revision=6497
2008-02-11 11:12:36 +00:00
Alexander Larsson
431fef8617 Add g_file_query_default_handler utility to easily look up the GAppInfo
2008-01-29  Alexander Larsson  <alexl@redhat.com>

        * gfile.[ch]:
        Add g_file_query_default_handler utility to easily look up
	the GAppInfo that handles a file.
	
        * gdesktopappinfo.[ch]:
        * giomodule.c:
	Set up an extension point for g_app_info_get_default_for_uri_scheme()
	
        * gvfs.c:
	Remove unused function



svn path=/trunk/; revision=6409
2008-01-29 12:18:48 +00:00
Alexander Larsson
270df8d3c8 Add g_file_copy_async() (#511580) Based on patch from Carlos Garcia Campos
2008-01-24  Alexander Larsson  <alexl@redhat.com>

        * gfile.[ch]:
        * gfile.h:
        * gio.symbols:
	Add g_file_copy_async() (#511580)
	Based on patch from Carlos Garcia Campos


svn path=/trunk/; revision=6363
2008-01-24 11:04:05 +00:00
Alexander Larsson
359339fe25 Add the async find_enclosing_mount version to the header file too.
2008-01-17  Alexander Larsson  <alexl@redhat.com>

        * gfile.h:
	Add the async find_enclosing_mount version
	to the header file too.



svn path=/trunk/; revision=6326
2008-01-17 14:30:07 +00:00
Alexander Larsson
87cd883e8d Add g_file_query_exists (#508771)
2008-01-16  Alexander Larsson  <alexl@redhat.com>

        * gfile.[ch]:
        * gio.symbols:
        Add g_file_query_exists (#508771)


svn path=/trunk/; revision=6319
2008-01-16 10:11:26 +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
Alexander Larsson
e23140cbb4 Build test subdir after . Remove gdirectorymonitor.[ch]
2008-01-07  Alexander Larsson  <alexl@redhat.com>

        * Makefile.am:
	Build test subdir after .
	Remove gdirectorymonitor.[ch]
	
        * gdirectorymonitor.[ch]:
        * gfilemonitor.c:
        * gfile.[ch]:
        * gio.h:
	Remove GDirectoryMonitor and make
	GFileMonitor the baseclass for both file and
	directory monitors. Lift the more generic
	rate limiting code from GDirectoryMonitor
	into GFileMonitor.
	
        * fam/fam-helper.c:
        * fam/gfamdirectorymonitor.[ch]:
        * inotify/ginotifydirectorymonitor.[ch]:
        * inotify/inotify-helper.c:
        * glocaldirectorymonitor.[ch]:
        * glocalfile.c:
        * gvolumemonitor.c:
	Update for the removed GDirectoryMonitor.
	
        * gmemoryoutputstream.c:
	Remove ununsed variable


svn path=/trunk/; revision=6262
2008-01-07 13:42:08 +00:00
Alexander Larsson
33c055feb1 Add GMountUnmountFlags to all unmount and eject calls. Add
2007-12-20  Alexander Larsson  <alexl@redhat.com>

        * gfile.[ch]:
        * gdrive.[ch]:
        * gmount.[ch]:
        * gvolume.[ch]:
        * gunixmount.c:
        * gunixvolume.c:
        * gio.symbols:
	Add GMountUnmountFlags to all unmount and
	eject calls.
	Add g_mount_remount() call.



svn path=/trunk/; revision=6169
2007-12-20 11:48:14 +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
Alexander Larsson
4cb6eab803 Clean up all flags enums to not have _FLAGS in them Make the names of some
2007-12-14  Alexander Larsson  <alexl@redhat.com>

        * gappinfo.h:
        * gfile.[ch]:
        * gfileattribute.[ch]:
        * gio.symbols:
        * glocalfile.c:
        * glocalfileoutputstream.c:
        * gmountoperation.[ch]:
        * goutputstream.[ch]:
	Clean up all flags enums to not have _FLAGS in them
	Make the names of some of the enums better.

        * glocalfileinfo.c:
	Fix warning


svn path=/trunk/; revision=6119
2007-12-14 11:07:31 +00:00
Alexander Larsson
ced2927726 Only allow including <gio/gio.h> from apps
2007-12-14  Alexander Larsson  <alexl@redhat.com>

        * Makefile.am:
        * fam/Makefile.am:
        * gappinfo.h:
        * gasyncresult.h:
        * gbufferedinputstream.h:
        * gbufferedoutputstream.h:
        * gcancellable.h:
        * gcontenttype.h:
        * gdatainputstream.h:
        * gdataoutputstream.h:
        * gdesktopappinfo.h:
        * gdirectorymonitor.h:
        * gdrive.h:
        * gfile.h:
        * gfileattribute.h:
        * gfileenumerator.h:
        * gfileicon.h:
        * gfileinfo.h:
        * gfileinputstream.h:
        * gfilemonitor.h:
        * gfilenamecompleter.h:
        * gfileoutputstream.h:
        * gfilterinputstream.h:
        * gfilteroutputstream.h:
        * gicon.h:
        * ginputstream.h:
        * gio.h:
        * gioerror.h:
        * giomodule.h:
        * gioscheduler.h:
        * gloadableicon.h:
        * gmemoryinputstream.h:
        * gmemoryoutputstream.h:
        * gmount.h:
        * gmountoperation.h:
        * goutputstream.h:
        * gseekable.h:
        * gsimpleasyncresult.h:
        * gthemedicon.h:
        * gunixinputstream.h:
        * gunixmounts.h:
        * gunixoutputstream.h:
        * gvfs.h:
        * gvolume.h:
        * gvolumemonitor.h:
        * inotify/Makefile.am:
	Only allow including <gio/gio.h> from apps


svn path=/trunk/; revision=6117
2007-12-14 10:35:24 +00:00
Alexander Larsson
f6b9b4f45e Rename g_mount_for_location to g_file_mount_enclosing_volume.
2007-12-13  Alexander Larsson  <alexl@redhat.com>

        * gfile.[ch]:
        * gio.symbols:
	Rename g_mount_for_location to g_file_mount_enclosing_volume.


svn path=/trunk/; revision=6114
2007-12-13 16:22:43 +00:00
Alexander Larsson
41d1650c9b Fix up a bunch of details in the docs.
2007-12-12  Alexander Larsson  <alexl@redhat.com>

        * gappinfo.[ch]:
        * gasyncresult.c:
        * gbufferedinputstream.c:
        * gbufferedoutputstream.c:
        * gcancellable.c:
        * gcontenttype.c:
        * gdatainputstream.[ch]:
        * gdesktopappinfo.c:
        * gdirectorymonitor.c:
        * gfile.[ch]:
        * gfileattribute.[ch]:
        * gfileicon.[ch]:
        * gfileinfo.h:
        * gfileinputstream.h:
        * gfilemonitor.[ch]:
        * gfileoutputstream.[ch]:
        * gfilterinputstream.h:
        * gfilteroutputstream.h:
        * gicon.h:
        * gioscheduler.c:
        * gloadableicon.[ch]:
        * gmemoryinputstream.c:
        * gmountoperation.c:
        * gthemedicon.c:
	Fix up a bunch of details in the docs.

        * glocalfileinfo.c:
	CR/LF -> LF fixups


svn path=/trunk/; revision=6100
2007-12-12 12:19:02 +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
A. Walton
ab69ee2945 More documentation cleanup and filling in missing information, bringing
2007-12-09  A. Walton  <awalton@svn.gnome.org>

	* gdesktopappinfo.c:
	* gdrive.c:
	* gdrive.h:
	* gfile.c:
	* gfile.h:
	* gfileattribute.c:
	* gfileenumerator.c:
	* gioerror.c:
	* gioscheduler.c:
	* gioscheduler.h:
	* gloadableicon.c:
	* gmemoryinputstream.c:
	* gmemoryoutputstream.c:
	* goutputstream.h:
	* gsimpleasyncresult.c:
	More documentation cleanup and filling in missing information, 
bringing
	GIO to 99% symbol coverage.

svn path=/trunk/; revision=6077
2007-12-09 15:51:12 +00:00
Alexander Larsson
2c362b7f9e Rename all struct members named: read, write, close, truncate, or mount to
2007-12-05  Alexander Larsson  <alexl@redhat.com>

        * gbufferedinputstream.c:
        * gbufferedoutputstream.c:
        * gdrive.[ch]:
        * gfile.[ch]:
        * gfileenumerator.[ch]:
        * gfileinputstream.c:
        * gfileoutputstream.[ch]:
        * gfilterinputstream.c:
        * gfilteroutputstream.c:
        * ginputstream.[ch]:
        * glocalfile.c:
        * glocalfileenumerator.c:
        * glocalfileinputstream.c:
        * glocalfileoutputstream.c:
        * gmemoryinputstream.c:
        * gmemoryoutputstream.c:
        * goutputstream.[ch]:
        * gseekable.[ch]:
        * gunixdrive.c:
        * gunixinputstream.c:
        * gunixoutputstream.c:
	Rename all struct members named:
	read, write, close, truncate, or mount
	to foo_fn, as these are reserved names
	and could be defined as macros in libc.
	(#501645)


svn path=/trunk/; revision=6048
2007-12-05 10:38:03 +00:00
Alexander Larsson
6394ae6fdb Add G_FILE_COPY_NO_FALLBACK_FOR_MOVE flag
2007-12-03  Alexander Larsson  <alexl@redhat.com>

        * gfile.[ch]:
        * glocalfile.c:
	Add G_FILE_COPY_NO_FALLBACK_FOR_MOVE flag



svn path=/trunk/; revision=6015
2007-12-03 09:11:48 +00:00
Matthias Clasen
ff0acf0af6 Templates for enum registration
2007-11-30  Matthias Clasen <mclasen@redhat.com>

        * gioenumtypes.[hc].template: Templates for enum registration

        * Makefile.am: Generate gioenumtypes.[hc]

        * gio.h: Include gioenumtypes.h
        * gappinfo.h:
        * gfile.h: Add some explicit nicks.

        * gio.symbols: Add new symbols

        * pltcheck.sh: Adjust



svn path=/trunk/; revision=6002
2007-12-01 01:53:00 +00:00
Matthias Clasen
07526e709a Improve consistency of enumerations
svn path=/trunk/; revision=5979
2007-11-28 18:38:53 +00:00
Matthias Clasen
61582bd91c Another round of trivial doc fixes
svn path=/trunk/; revision=5970
2007-11-28 06:43:33 +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