Commit Graph

31 Commits

Author SHA1 Message Date
Matthias Clasen
d819c8e486 Typo fixes 2010-01-24 20:50:51 -05:00
Matthias Clasen
a91514ba19 Document that various functions ref GSimpleAsyncResult
Patch by Will Thompson, see bug 602417.
2010-01-02 19:53:02 -05:00
Alexander Larsson
90e1308809 Avoid critical error in thread check if source is destroyed
The source can be destroyed by the time we complete the result, and
then the g_source_get_context(current_source) call will cause
a critical error. We check for the source being destroyed and avoid
the check in that case.

This means we miss the right-thread check in this case, but thats
merely a helper, so this is not critical.
2009-09-29 11:27:15 +02:00
Richard Hughes
cdd04f36ca Make the error const for g_simple_async_result_set_from_error 2009-09-11 15:20:34 +01:00
Alexander Larsson
06de24f430 Remove warning in g_simple_async_result_complete
This warning hits code that uses GSimpleAsyncResult outside of a
mainloop as a helper object. For instance EggDBus does this.
Since the bugs this warning would fix are pretty easy to spot
and since EggDBus is deployed already we just remove the
"called from outside main loop" warning.

However, we need to keep the "called from wrong context" warning
as that is very helpful when debugging misuse of the new multiple
main context code.
2009-09-07 10:25:14 +02:00
Dan Winship
65cc5d895a Support g_main_context_push_thread_default() in gio
GFile allows for the possibility that external implementations may not
support thread-default contexts yet, via
g_file_supports_thread_contexts(). GVolumeMonitor is not yet
thread-default-context aware.

Add a test program to verify that basic gio async ops work correctly
in non-default contexts.

http://bugzilla.gnome.org/show_bug.cgi?id=579984
2009-07-01 09:02:46 -04:00
Christian Persch
54b43229f4 Use g_error_new_valist instead of a private copy of it 2009-05-23 17:53:01 +02:00
Matthias Clasen
2e4b51aeb3 Plug a memory leak in g_simple_async_result_set_op_res_gpointer
Fixes bug 579272.
2009-05-02 22:59:02 -04:00
Ryan Lortie
2bd1d5d737 Bug 571598 – GAsyncResult with NULL gobject
2009-02-16  Ryan Lortie  <desrt@desrt.ca>

        Bug 571598 – GAsyncResult with NULL gobject

        * gsimpleasyncresult.c: remove various assertions and add some checks
        to allow for a NULL source_object in GSimpleAsyncResult.


svn path=/trunk/; revision=7864
2009-02-16 09:33:39 +00:00
Ryan Lortie
876f03f807 Add g_simple_async_result_is_valid(). Implementation by Dan Winship.
2009-01-05  Ryan Lortie  <desrt@desrt.ca>

        * gio.symbols:
        * ../docs/reference/gio/gio-sections.txt:
        * gsimpleasyncresult.h:
        * gsimpleasyncresult.c: Add g_simple_async_result_is_valid().
        Implementation by Dan Winship.  Closes #566170.


svn path=/trunk/; revision=7766
2009-01-05 06:57:16 +00:00
Alexander Larsson
3b4ad625b9 Bug 562452 - Ensure we return G_IO_ERROR_CANCELLED if cancelling
2008-12-10  Alexander Larsson  <alexl@redhat.com>

	Bug 562452 - Ensure we return G_IO_ERROR_CANCELLED if cancelling
	g_simple_async_result_run_in_thread
	
        * gsimpleasyncresult.c:
	Make g_simple_async_result_run_in_thread check cancellation before
	calling out to the user in the callback. This means we guarantee
	reporting cancels of async operations from the main threads, which
	is probably more in line with what users expect.
	
	Note that there are still no such guarantees for cancelling sync
	operations or cancelling async operation from outside the main
	thread. Furthermore, the exact behaviour of async implementations
	not using run_in_thread may differ.



svn path=/trunk/; revision=7740
2008-12-10 13:25:59 +00:00
Christian Persch
630f89fb1a Bug 555311 – format not a string literal and no format arguments
svn path=/trunk/; revision=7597
2008-10-13 12:43:37 +00:00
Matthias Clasen
6310f898b8 Fix gcc warnings
svn path=/trunk/; revision=7585
2008-10-10 04:54:51 +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
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
Matthias Clasen
f3144c7efe Doc fixes
svn path=/trunk/; revision=6554
2008-02-21 18:20:17 +00:00
Matthias Clasen
8228f7f94b Make GIOSchedulerJobFunc return boolean Keep calling io jobs until they
2008-01-25  Matthias Clasen  <mclasen@redhat.com>

        * gioscheduler.h: Make GIOSchedulerJobFunc return boolean
        * gioscheduler.c: Keep calling io jobs until they return FALSE;
        this allows big jobs to be executed in chunks, instead of blocking
        the main loop for a long time.

        * gsimpleasyncresult.c:
        * giofile.c: Adapt callers.

svn path=/trunk/; revision=6375
2008-01-25 14:40:54 +00:00
Matthias Clasen
0debd52858 Fix up includes in section docs
svn path=/trunk/; revision=6149
2007-12-18 02:52:11 +00:00
Alexander Larsson
3db93c01b7 Rename gioscheduler calls so they all use the g_io_schedule_ prefix. Split
2007-12-14  Alexander Larsson  <alexl@redhat.com>

        * gioscheduler.[ch]:
        * gsimpleasyncresult.c:
	Rename gioscheduler calls so they all use the g_io_schedule_ prefix.
	Split out the send_to_mainloop call into two versions instead
	of having the block argument.


svn path=/trunk/; revision=6116
2007-12-14 09:42:59 +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
Dan Winship
117de38f04 Make this take a GError and return a gboolean, and do the "outstanding
2007-11-30  Dan Winship  <danw@gnome.org>

	* ginputstream.c (g_input_stream_set_pending): Make this take a
	GError and return a gboolean, and do the "outstanding operation"
	check (and the "stream is already closed" check) itself.
	(g_input_stream_clear_pending): Formerly set_pending(FALSE).

	* goutputstream.c (g_output_stream_set_pending)
	(g_output_stream_clear_pending): Likewise

	* gbufferedinputstream.c: 
	* gfileinputstream.c: 
	* gfileoutputstream.c: Update for that

	* gsimpleasyncresult.c (g_simple_async_report_gerror_in_idle):
	Like g_simple_async_report_error_in_idle, but takes a GError
	rather than building one.


svn path=/trunk/; revision=6039
2007-12-04 08:57:04 +00:00
Hans Breuer
43ae389211 [start of port to win32/msvc] HAVE_UNIST_H and _pipe() only include
2007-12-03  Hans Breuer  <hans@breuer.org>

	[start of port to win32/msvc]
	* gcancellable.c : HAVE_UNIST_H and _pipe()
	* gcontenttype.c : only include <dirent.h> in the UNIX branch
	* gdatainputstream.c : pointer arithmetic on void* is a gcc extension
	* gdummyfile.c glocalfileinputstream.c gsimpleasyncresult.c : use 
	HAVE_UNIST_H
	* glocalfileoutputstream.c : use HAVE_UNIST_H and s/ssize_t/gssize/
	* glocalvfs.c : use HAVE_PWD_H
	* gio.symbols : ifdef unix specific functions with G_OS_UNIX
	* makefile.msc : new file (maybe later converted to makefile.msc.in)
	* Makefile.am : added to EXTRA_DIST

svn path=/trunk/; revision=6027
2007-12-03 22:37:44 +00:00
Matthias Clasen
650c65e892 Doc improvements
svn path=/trunk/; revision=6005
2007-12-01 04:38:29 +00:00
Matthias Clasen
a2ca589703 More coding style fixes
svn path=/trunk/; revision=5999
2007-11-30 05:11:25 +00:00
Andrew Walton
0c867d3444 Fixes unknown meaning in GAppLaunchContext docs. Clarify asynchronous ops.
* gappinfo.c:
	  Fixes unknown meaning in GAppLaunchContext docs.
	* gfile.c:
	  Clarify asynchronous ops.
	* gfileattribute.c:
	  Fix entity tag docs.
	* gicon.c:
	* gthemedicon.c:
	  Provides missing gtk-doc section, fixes API docs slighly.
	* gsimpleasyncresult.c:
	  Fill in missing info in docs.
	* gunixinputstream.c:
	* gunixoutputstream.c:
	  Be more expressive in short description.
	* gunixvolume.c:
	  Remove gtk-doc stubs for non-public API.


svn path=/trunk/; revision=5994
2007-11-29 10:18:55 +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
61582bd91c Another round of trivial doc fixes
svn path=/trunk/; revision=5970
2007-11-28 06:43:33 +00:00
Matthias Clasen
54e52e099e More trivial doc fixes
svn path=/trunk/; revision=5968
2007-11-28 06:01:13 +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