finished refactoring functional components
[strongswan.git] / src / libpts / pts / components / pts_component.h
1 /*
2 * Copyright (C) 2011 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 * @defgroup pts_component pts_component
18 * @{ @ingroup pts
19 */
20
21 #ifndef PTS_COMPONENT_H_
22 #define PTS_COMPONENT_H_
23
24 typedef struct pts_component_t pts_component_t;
25
26 #include "pts/components/pts_comp_func_name.h"
27
28 #include <library.h>
29
30 /**
31 * PTS Functional Component Interface
32 */
33 struct pts_component_t {
34
35 /**
36 * Get the PTS Component Functional Name
37 *
38 * @return PTS Component Functional Name
39 */
40 pts_comp_func_name_t* (*get_comp_func_name)(pts_component_t *this);
41
42 /**
43 * Get the PTS Component Evidence Flags
44 *
45 * @return PTS Component Functional Name
46 */
47 u_int8_t (*get_evidence_flags)(pts_component_t *this);
48
49 /**
50 * Do measurements on the PTS Functional Component
51 *
52 * @return TRUE if component measurements are successful
53 */
54 bool (*measure)(pts_component_t *this);
55
56 /**
57 * Verify the measurements of the PTS Functional Component
58 *
59 * @return TRUE if verification is successful
60 */
61 bool (*verify)(pts_component_t *this);
62
63 /**
64 * Destroys a pts_component_t object.
65 */
66 void (*destroy)(pts_component_t *this);
67
68 };
69
70 #endif /** PTS_COMPONENT_H_ @}*/