Debian Codegraph @

src/OVAL/public/oval_directives.h

raw symbols SCIP
1 /**
2 * @addtogroup OVAL
3 * @{
4 * @addtogroup OVALDIR
5 * Interface for Directives model
6 * @{
7 *
8 * @file
9 *
10 * @author "Peter Vrabec" <[email protected]>
11 *
12 *
13 */
14
15 /*
16 * Copyright 2011--2014 Red Hat Inc., Durham, North Carolina.
17 * All Rights Reserved.
18 *
19 * This library is free software; you can redistribute it and/or
20 * modify it under the terms of the GNU Lesser General Public
21 * License as published by the Free Software Foundation; either
22 * version 2.1 of the License, or (at your option) any later version.
23 *
24 * This library is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 * Lesser General Public License for more details.
28 *
29 * You should have received a copy of the GNU Lesser General Public
30 * License along with this library; if not, write to the Free Software
31 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
32 *
33 * Authors:
34 * "David Niemoller" <[email protected]>
35 */
36
37 #ifndef OVAL_DIRECTIVES_H_
38 #define OVAL_DIRECTIVES_H_
39
40 #include "oscap.h"
41 #include "oscap_source.h"
42 #include "oval_types.h"
43 #include "oscap_export.h"
44
45 /**
46 * @typedef oval_result_directive_content_t
47 * Values for the directives controlling the expected content of the results file
48 */
49 typedef enum {
50 OVAL_DIRECTIVE_CONTENT_UNKNOWN = 0, /**< Undefined value */
51 OVAL_DIRECTIVE_CONTENT_THIN = 1, /**< Only the minimal amount of information will be provided. */
52 OVAL_DIRECTIVE_CONTENT_FULL = 2 /**< Very detailed information will be provided allowing in-depth reports to be generated from the results. */
53 } oval_result_directive_content_t;
54
55
56 /**
57 * @struct oval_directives_model
58 * This structure holds instance of OVAL Directives.
59 */
60 struct oval_directives_model;
61
62 /**
63 * @memberof oval_directives_model
64 */
65 OSCAP_API struct oval_directives_model *oval_directives_model_new(void);
66 /**
67 * @memberof oval_directives_model
68 */
69 OSCAP_API void oval_directives_model_free(struct oval_directives_model *);
70
71 /**
72 * Import the data from oscap_source to the directives model.
73 * @memberof oval_directives_model
74 */
75 OSCAP_API int oval_directives_model_import_source(struct oval_directives_model *model, struct oscap_source *source);
76
77 /**
78 * @memberof oval_directives_model
79 */
80 OSCAP_API struct oval_generator *oval_directives_model_get_generator(struct oval_directives_model *);
81 /**
82 * @memberof oval_directives_model
83 */
84 OSCAP_API struct oval_result_directives *oval_directives_model_get_defdirs(struct oval_directives_model *);
85 /**
86 * @memberof oval_directives_model
87 */
88 OSCAP_API struct oval_result_directives *oval_directives_model_get_classdir(struct oval_directives_model *, oval_definition_class_t);
89 /**
90 * @memberof oval_directives_model
91 */
92 OSCAP_API struct oval_result_directives *oval_directives_model_get_new_classdir(struct oval_directives_model *, oval_definition_class_t);
93 /**
94 * @memberof oval_directives_model
95 */
96 OSCAP_API int oval_directives_model_export(struct oval_directives_model *, const char *);
97
98
99
100 /**
101 * @struct oval_result_directives
102 * This structure holds instance of either OVAL Default Directives or OVAL Class directives.
103 */
104 struct oval_result_directives;
105 /**
106 * Create new OVAL Results Directives instance. Directives are setup to report FULL result by default.
107 * @memberof oval_result_directives
108 */
109 OSCAP_API struct oval_result_directives *oval_result_directives_new(void);
110 /**
111 * @memberof oval_result_directives
112 */
113 OSCAP_API void oval_result_directives_free(struct oval_result_directives *);
114 /**
115 * Set (or unset) result types that are intended to be reported. Functions does not override previous settings.
116 * @memberof oval_result_directives
117 */
118 OSCAP_API void oval_result_directives_set_reported(struct oval_result_directives *, int flag, bool val);
119 /**
120 * Configure the depth of infomation.
121 * @memberof oval_result_directives
122 */
123 OSCAP_API void oval_result_directives_set_content(struct oval_result_directives *, int flag, oval_result_directive_content_t);
124 /**
125 * @memberof oval_result_directives
126 */
127 OSCAP_API void oval_result_directives_set_included(struct oval_result_directives *, bool);
128 /**
129 * @memberof oval_result_directives
130 */
131 OSCAP_API bool oval_result_directives_get_reported(struct oval_result_directives *, oval_result_t);
132 /**
133 * @memberof oval_result_directives
134 */
135 OSCAP_API bool oval_result_directives_get_included(struct oval_result_directives *);
136 /**
137 * @memberof oval_result_directives
138 */
139 OSCAP_API oval_result_directive_content_t oval_result_directives_get_content(struct oval_result_directives *, oval_result_t);
140
141 #endif /* OVAL_DIRECTIVES_H_ */
142 /// @}
143 /// @}