Make replaygain limiting optional
[cmus.git] / worker.h
blob0379ae8da6101c1963497c75dc4b89619297d18f
1 #ifndef _WORKER_H
2 #define _WORKER_H
4 #define JOB_TYPE_NONE 0
5 #define JOB_TYPE_ANY -1
7 void worker_init(void);
8 void worker_exit(void);
11 * @type: JOB_TYPE_* (>0)
12 * @job_cb: does the job
13 * @free_cb: frees @data
14 * @data: data for the callbacks
16 void worker_add_job(int type, void (*job_cb)(void *data),
17 void (*free_cb)(void *data), void *data);
20 * @type: job type. >0, use JOB_TYPE_ANY to remove all
22 void worker_remove_jobs(int type);
25 * @type: type of this job
27 * returns: 0 or 1
29 * long jobs should call this to see whether it should cancel
30 * call from job function _only_
32 int worker_cancelling(void);
34 #endif