updated Doxyfile
[strongswan.git] / src / charon / processing / jobs / job.h
1 /*
2 * Copyright (C) 2005-2006 Martin Willi
3 * Copyright (C) 2005 Jan Hutter
4 * Hochschule fuer Technik Rapperswil
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 *
16 * $Id$
17 */
18
19 /**
20 * @defgroup job job
21 * @{ @ingroup jobs
22 */
23
24 #ifndef JOB_H_
25 #define JOB_H_
26
27 typedef struct job_t job_t;
28
29 #include <library.h>
30
31 /**
32 * Job-Interface as it is stored in the job queue.
33 */
34 struct job_t {
35
36 /**
37 * Execute a job.
38 *
39 * The processing facility executes a job using this method. Jobs are
40 * one-shot, they destroy themself after execution, so don't use a job
41 * once it has been executed.
42 */
43 void (*execute) (job_t *this);
44
45 /**
46 * Destroy a job.
47 *
48 * Is only called whenever a job was not executed (e.g. due daemon shutdown).
49 * After execution, jobs destroy themself.
50 */
51 void (*destroy) (job_t *job);
52 };
53
54 #endif /** JOB_H_ @}*/