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
This commit is contained in:
Dan Winship
2007-12-04 08:57:04 +00:00
committed by Alexander Larsson
parent b22aa6dde6
commit 117de38f04
10 changed files with 325 additions and 436 deletions

View File

@@ -682,5 +682,33 @@ g_simple_async_report_error_in_idle (GObject *object,
g_object_unref (simple);
}
/**
* g_simple_async_report_error_in_idle:
* @object: a #GObject.
* @callback: a #GAsyncReadyCallback.
* @user_data: user data passed to @callback.
* @error: the #GError to report
*
* Reports an error in an idle function.
**/
void
g_simple_async_report_gerror_in_idle (GObject *object,
GAsyncReadyCallback callback,
gpointer user_data,
GError *error)
{
GSimpleAsyncResult *simple;
g_return_if_fail (G_IS_OBJECT (object));
g_return_if_fail (error != NULL);
simple = g_simple_async_result_new_from_error (object,
callback,
user_data,
error);
g_simple_async_result_complete_in_idle (simple);
g_object_unref (simple);
}
#define __G_SIMPLE_ASYNC_RESULT_C__
#include "gioaliasdef.c"