summaryrefslogtreecommitdiff
path: root/gvfs/gioscheduler.h
blob: 3a5cdd1c12e32c6343229e7e399f2e6f9b3cee81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef __G_IO_SCHEDULER_H__
#define __G_IO_SCHEDULER_H__

#include <glib.h>

G_BEGIN_DECLS

typedef struct _GIOJob GIOJob;

typedef void (*GIOJobFunc) (GIOJob *job,
			    gpointer data);

typedef void (*GIODataFunc) (gpointer data);

gint g_schedule_io_job    (GIOJobFunc      job_func,
			   GIODataFunc     cancel_func,
			   gpointer        data,
			   GDestroyNotify  notify,
			   gint            io_priority,
			   GMainContext   *callback_context);
void g_cancel_io_job      (gint            id);
void g_cancel_all_io_jobs (void);

void     g_io_job_send_to_mainloop (GIOJob         *job,
				    GIODataFunc     func,
				    gpointer        data,
				    GDestroyNotify  notify,
				    gboolean        block);
void     g_io_job_mark_done        (GIOJob         *job);
gboolean g_io_job_is_cancelled     (GIOJob         *job);

G_END_DECLS

#endif /* __G_IO_SCHEDULER_H__ */