* Author: Alexander Larsson <alexl@redhat.com>
*/
+#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
+#error "Only <gio/gio.h> can be included directly."
+#endif
+
#ifndef __G_IO_SCHEDULER_H__
#define __G_IO_SCHEDULER_H__
#include <glib.h>
-#include <gio/gcancellable.h>
+#include <gio/giotypes.h>
G_BEGIN_DECLS
-/**
- * GIOJob:
- *
- * Opaque class for definining and scheduling IO jobs.
- **/
-typedef struct _GIOJob GIOJob;
-
-/**
- * GIOJobFunc:
- * @job: a #GIOJob.
- * @cancellable: optional #GCancellable object, %NULL to ignore.
- * @user_data: the data to pass to callback function
- *
- * I/O Job function.
- *
- **/
-typedef void (*GIOJobFunc) (GIOJob *job,
- GCancellable *cancellable,
- gpointer user_data);
-
-/**
- * GIODataFunc:
- * @user_data: data to pass to the I/O function.
- *
- * I/O Data function.
- *
- **/
-typedef void (*GIODataFunc) (gpointer user_data);
-
-void g_schedule_io_job (GIOJobFunc job_func,
- gpointer user_data,
- GDestroyNotify notify,
- gint io_priority,
- GCancellable *cancellable);
-void g_cancel_all_io_jobs (void);
-
-void g_io_job_send_to_mainloop (GIOJob *job,
- GIODataFunc func,
- gpointer user_data,
- GDestroyNotify notify,
- gboolean block);
+void g_io_scheduler_push_job (GIOSchedulerJobFunc job_func,
+ gpointer user_data,
+ GDestroyNotify notify,
+ gint io_priority,
+ GCancellable *cancellable);
+void g_io_scheduler_cancel_all_jobs (void);
+gboolean g_io_scheduler_job_send_to_mainloop (GIOSchedulerJob *job,
+ GSourceFunc func,
+ gpointer user_data,
+ GDestroyNotify notify);
+void g_io_scheduler_job_send_to_mainloop_async (GIOSchedulerJob *job,
+ GSourceFunc func,
+ gpointer user_data,
+ GDestroyNotify notify);
G_END_DECLS