2563390a8d028e6d1e22839e1f8794c4307ef099
4 * @brief Job-Interface representing a job e.g. in job_queue
9 * Copyright (C) 2005 Jan Hutter, Martin Willi
10 * Hochschule fuer Technik Rapperswil
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
27 #include "../definitions.h"
30 * Type of Jobs in Job-Queue
32 typedef enum job_type_e job_type_t
;
36 * Process an incoming IKEv2-Message
38 * Job is implemented in class type incoming_packet_job_t
42 * Retransmit an IKEv2-Message
46 * Establish an ike sa as initiator
48 * Job is implemented in class type initiate_ike_sa_job_t
52 /* more job types have to be inserted here */
55 extern mapping_t job_type_m
[];
58 * @brief Job-Interface as it is stored in the job queue
60 * A job consists of a job-type and one or more assigned values
62 typedef struct job_s job_t
;
67 * @brief get type of job
69 * @param this calling object
70 * @return type of this job
72 job_type_t (*get_type
) (job_t
*this);
75 * @brief Destroys a job_t object and all assigned data!
77 * @param job_t calling object
78 * @returns SUCCESS if succeeded, FAILED otherwise
80 status_t (*destroy_all
) (job_t
*job
);
83 * @brief Destroys a job_t object
85 * @param job_t calling object
86 * @returns SUCCESS if succeeded, FAILED otherwise
88 status_t (*destroy
) (job_t
*job
);
91 #include "initiate_ike_sa_job.h"
92 #include "incoming_packet_job.h"