- added new job type delete_ike_sa_job_t
[strongswan.git] / Source / charon / jobs / delete_ike_sa_job.h
1 /**
2 * @file delete_ike_sa_job.h
3 *
4 * @brief Job of type DELETE_IKE_SA
5 *
6 */
7
8 /*
9 * Copyright (C) 2005 Jan Hutter, Martin Willi
10 * Hochschule fuer Technik Rapperswil
11 *
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>.
16 *
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
20 * for more details.
21 */
22
23 #ifndef DELETE_IKE_SA_JOB_H_
24 #define DELETE_IKE_SA_JOB_H_
25
26 #include "../types.h"
27 #include "../ike_sa_id.h"
28 #include "job.h"
29
30
31 /**
32 * Object representing an DELETE_IKE_SA Job
33 *
34 */
35 typedef struct delete_ike_sa_job_s delete_ike_sa_job_t;
36
37 struct delete_ike_sa_job_s {
38 /**
39 * implements job_t interface
40 */
41 job_t job_interface;
42
43 /**
44 * @brief Returns the currently set ike_sa_id
45 *
46 * @warning Returned object is not copied.
47 *
48 * @param this calling delete_ike_sa_job_t object
49 * @return ike_sa_id_t object
50 */
51 ike_sa_id_t * (*get_ike_sa_id) (delete_ike_sa_job_t *this);
52
53 /**
54 * @brief Destroys an delete_ike_sa_job_t object (including assigned data)
55 *
56 * @param this delete_ike_sa_job_t object to destroy
57 * @return
58 * SUCCESS in any case
59 */
60 status_t (*destroy) (delete_ike_sa_job_t *this);
61 };
62
63 /**
64 * Creates a job of type DELETE_IKE_SA
65 *
66 * @param ike_sa_id id of the IKE_SA to delete
67 * @return
68 * - delete_ike_sa_job_t if successfully
69 * - NULL if out of ressources
70 */
71 delete_ike_sa_job_t *delete_ike_sa_job_create(ike_sa_id_t *ike_sa_id);
72
73
74 #endif /*DELETE_IKE_SA_JOB_H_*/