Added add_segment() method to IETF attributes
[strongswan.git] / src / libimcv / imv / imv_session_manager.h
1 /*
2 * Copyright (C) 2014 Andreas Steffen
3 * HSR Hochschule fuer Technik Rapperswil
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 */
15
16 /**
17 *
18 * @defgroup imv_session_manager_t imv_session_manager
19 * @{ @ingroup libimcv_imv
20 */
21
22 #ifndef IMV_SESSION_MANAGER_H_
23 #define IMV_SESSION_MANAGER_H_
24
25 #include "imv_session.h"
26
27 #include <tncifimv.h>
28
29 #include <library.h>
30
31 typedef struct imv_session_manager_t imv_session_manager_t;
32
33 /**
34 * IMV session manager interface
35 */
36 struct imv_session_manager_t {
37
38 /**
39 * Create or get a session associated with a TNCCS connection
40 *
41 * @param conn_id TNCCS Connection ID
42 * @param ar_id_type Access Requestor identity type
43 * @param ar_id_value Access Requestor identity value
44 * @return Session associated with TNCCS Connection
45 */
46 imv_session_t* (*add_session)(imv_session_manager_t *this,
47 TNC_ConnectionID conn_id,
48 uint32_t ar_id_type, chunk_t ar_id_value);
49
50 /**
51 * Remove a session
52 *
53 * @param session Session
54 */
55 void (*remove_session)(imv_session_manager_t *this, imv_session_t *session);
56
57
58 /**
59 * Destroys an imv_session_manager_t object
60 */
61 void (*destroy)(imv_session_manager_t *this);
62 };
63
64 /**
65 * Create an imv_session_manager_t instance
66 */
67 imv_session_manager_t* imv_session_manager_create();
68
69 #endif /** IMV_SESSION_MANAGER_H_ @}*/