Debian Codegraph @

src/SCE/public/sce_engine_api.h

raw symbols SCIP
1 /*
2 * Copyright 2012 Red Hat Inc., Durham, North Carolina.
3 * All Rights Reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 *
19 * Authors:
20 * "Martin Preisler" <[email protected]>
21 */
22
23 #pragma once
24
25 #ifndef SCE_ENGINE_API_H_
26 #define SCE_ENGINE_API_H_cxx . . $ `src/SCE/public/sce_engine_api.h:26:9`!
27
28 #include <xccdf_benchmark.h>cxx . . $ `<file>/src/XCCDF/public/xccdf_benchmark.h`/
29 #include <xccdf_policy.h>cxx . . $ `<file>/src/XCCDF_POLICY/public/xccdf_policy.h`/
30 #include "oscap_export.h"cxx . . $ `<file>/src/common/public/oscap_export.h`/
31
32 /**
33 * @memberof sce_check_result
34 */
35 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! struct sce_check_resultcxx . . $ sce_check_result#* sce_check_result_newcxx . . $ sce_check_result_new(322c8399b548b45a).(void);
36
37 /**
38 * @memberof sce_check_result
39 */
40 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void sce_check_result_freecxx . . $ sce_check_result_free(62a0ea64ab464323).(struct sce_check_resultcxx . . $ sce_check_result#* v);
41
42 /**
43 * Sets the href used to execute the check that yielded given check result
44 *
45 * @memberof sce_check_result
46 */
47 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void sce_check_result_set_hrefcxx . . $ sce_check_result_set_href(84ed1ba2de1ba4ee).(struct sce_check_resultcxx . . $ sce_check_result#* v, const char* href);
48
49 /**
50 * @memberof sce_check_result
51 */
52 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! const char* sce_check_result_get_hrefcxx . . $ sce_check_result_get_href(a3aefccd2beab286).(struct sce_check_resultcxx . . $ sce_check_result#* v);
53
54 /**
55 * Sets basename of the script that was used for check evaluation
56 *
57 * @memberof sce_check_result
58 */
59 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void sce_check_result_set_basenamecxx . . $ sce_check_result_set_basename(84ed1ba2de1ba4ee).(struct sce_check_resultcxx . . $ sce_check_result#* v, const char* basename);
60
61 /**
62 * @memberof sce_check_result
63 */
64 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! const char* sce_check_result_get_basenamecxx . . $ sce_check_result_get_basename(a3aefccd2beab286).(struct sce_check_resultcxx . . $ sce_check_result#* v);
65
66 /**
67 * Sets stdout that was captured while script was evaluating
68 *
69 * @param stdout should contain output only from stdout
70 * @memberof sce_check_result
71 */
72 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void sce_check_result_set_stdoutcxx . . $ sce_check_result_set_stdout(84ed1ba2de1ba4ee).(struct sce_check_resultcxx . . $ sce_check_result#* v, const char* details);
73
74 /**
75 * @memberof sce_check_result
76 */
77 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! const char* sce_check_result_get_stdoutcxx . . $ sce_check_result_get_stdout(a3aefccd2beab286).(struct sce_check_resultcxx . . $ sce_check_result#* v);
78
79 /**
80 * Sets stderr that was captured while script was evaluating
81 *
82 * @param stderr should contain output only from stderr
83 * @memberof sce_check_result
84 */
85 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void sce_check_result_set_stderrcxx . . $ sce_check_result_set_stderr(84ed1ba2de1ba4ee).(struct sce_check_resultcxx . . $ sce_check_result#* v, const char* details);
86
87 /**
88 * @memberof sce_check_result
89 */
90 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! const char* sce_check_result_get_stderrcxx . . $ sce_check_result_get_stderr(a3aefccd2beab286).(struct sce_check_resultcxx . . $ sce_check_result#* v);
91
92 /**
93 * Sets exit code with which the script ended execution after evaluation
94 * @memberof sce_check_result
95 */
96 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void sce_check_result_set_exit_codecxx . . $ sce_check_result_set_exit_code(f11ef7399be4a329).(struct sce_check_resultcxx . . $ sce_check_result#* v, int exit_code);
97
98 /**
99 * @memberof sce_check_result
100 */
101 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! int sce_check_result_get_exit_codecxx . . $ sce_check_result_get_exit_code(54f4f742a21f18e1).(struct sce_check_resultcxx . . $ sce_check_result#* v);
102
103 /**
104 * Clears the list of passed environment variables
105 *
106 * @memberof sce_check_result
107 */
108 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void sce_check_result_reset_environment_variablescxx . . $ sce_check_result_reset_environment_variables(62a0ea64ab464323).(struct sce_check_resultcxx . . $ sce_check_result#* v);
109
110 /**
111 * Adds an environment variable entry to list of environment variables that
112 * were passed to the script. These include XCCDF result codes,
113 * bound XCCDF variables and possibly more.
114 *
115 * sce_check_result contains these mostly for debugging purposes.
116 *
117 * @param var entry that will be added, in "VARIABLE_NAME=VARIABLE_VALUE" form
118 * @memberof sce_check_result
119 */
120 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void sce_check_result_add_environment_variablecxx . . $ sce_check_result_add_environment_variable(84ed1ba2de1ba4ee).(struct sce_check_resultcxx . . $ sce_check_result#* v, const char* var);
121
122 /**
123 * Sets the final xccdf result (after exit code to xccdf mapping takes place)
124 *
125 * @memberof sce_check_result
126 */
127 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void sce_check_result_set_xccdf_resultcxx . . $ sce_check_result_set_xccdf_result(c0fb5b9a2a42dcd).(struct sce_check_resultcxx . . $ sce_check_result#* v, xccdf_test_result_type_tcxx . . $ xccdf_test_result_type_t# result);
128
129 /**
130 * @memberof sce_check_result
131 */
132 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! xccdf_test_result_type_tcxx . . $ xccdf_test_result_type_t# sce_check_result_get_xccdf_resultcxx . . $ sce_check_result_get_xccdf_result(dbc7076846e2676c).(struct sce_check_resultcxx . . $ sce_check_result#* v);
133
134 /**
135 * Exports details (in XML form) of given check result to given file
136 *
137 * @memberof sce_check_result
138 */
139 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void sce_check_result_exportcxx . . $ sce_check_result_export(84ed1ba2de1ba4ee).(struct sce_check_resultcxx . . $ sce_check_result#* v, const char* target_file);
140
141 /**
142 * @memberof sce_session
143 */
144 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! struct sce_sessioncxx . . $ sce_session#* sce_session_newcxx . . $ sce_session_new(f6756c21b4c547d7).(void);
145
146 /**
147 * @memberof sce_session
148 */
149 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void sce_session_freecxx . . $ sce_session_free(74296c8485745771).(struct sce_sessioncxx . . $ sce_session#* s);
150
151 /**
152 * Removes all check results from the session
153 *
154 * @memberof sce_session
155 */
156 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void sce_session_resetcxx . . $ sce_session_reset(74296c8485745771).(struct sce_sessioncxx . . $ sce_session#* s);
157
158 /**
159 * Adds a check result to the session
160 *
161 * @param s session to add the check result to
162 * @param result result to be added (the session takes ownership of it, don't deallocate it!)
163 * @memberof sce_session
164 */
165 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void sce_session_add_check_resultcxx . . $ sce_session_add_check_result(c66b63514b8ed67a).(struct sce_sessioncxx . . $ sce_session#* s, struct sce_check_resultcxx . . $ sce_check_result#* result);
166
167 /**
168 * @struct sce_check_result_iterator
169 * Iterator over collections of sce_check_results.
170 * @see sce_check_result_iterator
171 */
172 struct sce_check_result_iteratorcxx . . $ sce_check_result_iterator#;
173 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! struct sce_check_resultcxx . . $ sce_check_result# *sce_check_result_iterator_nextcxx . . $ sce_check_result_iterator_next(635aa288c67a5480).(struct sce_check_result_iteratorcxx . . $ sce_check_result_iterator# *it);
174 /// @memberof sce_check_result_iterator
175 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! sce_check_result_iterator_has_morecxx . . $ sce_check_result_iterator_has_more(8878db1c6e4b4ae3).(struct sce_check_result_iteratorcxx . . $ sce_check_result_iterator# *it);
176 /// @memberof sce_check_result_iterator
177 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void sce_check_result_iterator_freecxx . . $ sce_check_result_iterator_free(80927f24f3dab80a).(struct sce_check_result_iteratorcxx . . $ sce_check_result_iterator# *it);
178 /// @memberof sce_check_result_iterator
179 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void sce_check_result_iterator_resetcxx . . $ sce_check_result_iterator_reset(80927f24f3dab80a).(struct sce_check_result_iteratorcxx . . $ sce_check_result_iterator# *it);
180
181 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! struct sce_check_result_iteratorcxx . . $ sce_check_result_iterator# *sce_session_get_check_resultscxx . . $ sce_session_get_check_results(631e7e3c7918875b).(struct sce_sessioncxx . . $ sce_session#* s);
182
183 /**
184 * Exports all check results to given directory
185 *
186 * @memberof sce_session
187 */
188 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void sce_session_export_to_directorycxx . . $ sce_session_export_to_directory(6a87d3a4f50413cd).(struct sce_sessioncxx . . $ sce_session#* s, const char* directory);
189
190 /**
191 * @memberof sce_parameters
192 */
193 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! struct sce_parameterscxx . . $ sce_parameters#* sce_parameters_newcxx . . $ sce_parameters_new(41e602c2677de0c6).(void);
194
195 /**
196 * @memberof sce_parameters
197 */
198 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void sce_parameters_freecxx . . $ sce_parameters_free(3951596372db9be1).(struct sce_parameterscxx . . $ sce_parameters#* v);
199
200 /**
201 * Sets the directory that contains XCCDF that will reference SCE checks
202 *
203 * @internal This is used to figure out where to look for the scripts
204 * @memberof sce_parameters
205 */
206 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void sce_parameters_set_xccdf_directorycxx . . $ sce_parameters_set_xccdf_directory(3f4426a8c3afb843).(struct sce_parameterscxx . . $ sce_parameters#* v, const char* value);
207
208 /**
209 * @memberof sce_parameters
210 */
211 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! const char* sce_parameters_get_xccdf_directorycxx . . $ sce_parameters_get_xccdf_directory(242b3437fef71b0c).(struct sce_parameterscxx . . $ sce_parameters#* v);
212
213 /**
214 * Sets SCE session to use for check results storage
215 *
216 * @param v
217 * @param value SCE session to use (sce_parameters take ownership of it, don't deallocate it!)
218 * @memberof sce_parameters
219 */
220 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void sce_parameters_set_sessioncxx . . $ sce_parameters_set_session(d48b77f9d6468b6c).(struct sce_parameterscxx . . $ sce_parameters#* v, struct sce_sessioncxx . . $ sce_session#* value);
221
222 /**
223 * @memberof sce_parameters
224 */
225 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! struct sce_sessioncxx . . $ sce_session#* sce_parameters_get_sessioncxx . . $ sce_parameters_get_session(a4b1286c3a37b79d).(struct sce_parameterscxx . . $ sce_parameters#* v);
226
227 /**
228 * Just a convenience shortcut of setting a session to a newly allocated session
229 *
230 * The session gets automatically freed when sce_parameters are freed, don't deallocate it!
231 * @memberof sce_parameters
232 */
233 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! void sce_parameters_allocate_sessioncxx . . $ sce_parameters_allocate_session(3951596372db9be1).(struct sce_parameterscxx . . $ sce_parameters#* v);
234
235 /**
236 * Internal rule evaluation callback, don't use directly
237 *
238 * @see xccdf_policy_model_register_engine_sce
239 */
240 xccdf_test_result_type_tcxx . . $ xccdf_test_result_type_t# sce_engine_eval_rulecxx . . $ sce_engine_eval_rule(55d5550656449b7).(struct xccdf_policycxx . . $ xccdf_policy# *policy, const char *rule_id, const char *id, const char *href,
241 struct xccdf_value_binding_iteratorcxx . . $ xccdf_value_binding_iterator# *value_binding_it,
242 struct xccdf_check_import_iteratorcxx . . $ xccdf_check_import_iterator# *check_import_it,
243 void *usr);
244
245 /**
246 * Registers SCE to given policy model
247 *
248 * @param model model to register SCE to
249 * @param sce_parameters various parameters to be used with SCE (you are responsible to deallocate them!)
250 */
251 OSCAP_APIcxx . . $ `src/common/public/oscap_export.h:42:15`! boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! xccdf_policy_model_register_engine_scecxx . . $ xccdf_policy_model_register_engine_sce(f8237cfb45f8a428).(struct xccdf_policy_modelcxx . . $ xccdf_policy_model# * model, struct sce_parameterscxx . . $ sce_parameters# *sce_parameters);
252
253 #endif