Open SCAP Library
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
src
OVAL
public
oval_results.h
Go to the documentation of this file.
1
19
/*
20
* Copyright 2009-2010 Red Hat Inc., Durham, North Carolina.
21
* All Rights Reserved.
22
*
23
* This library is free software; you can redistribute it and/or
24
* modify it under the terms of the GNU Lesser General Public
25
* License as published by the Free Software Foundation; either
26
* version 2.1 of the License, or (at your option) any later version.
27
*
28
* This library is distributed in the hope that it will be useful,
29
* but WITHOUT ANY WARRANTY; without even the implied warranty of
30
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
31
* Lesser General Public License for more details.
32
*
33
* You should have received a copy of the GNU Lesser General Public
34
* License along with this library; if not, write to the Free Software
35
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
36
*
37
* Authors:
38
* "David Niemoller" <David.Niemoller@g2-inc.com>
39
*/
40
41
42
#ifndef OVAL_RESULTS_H_
43
#define OVAL_RESULTS_H_
44
45
#include "
oval_types.h
"
46
#include "
oval_system_characteristics.h
"
47
#include "
oval_directives.h
"
48
#include <stdbool.h>
49
50
51
const
char
*oval_result_get_text(
oval_result_t
);
52
57
struct
oval_results_model
;
58
62
struct
oval_result_system
;
67
struct
oval_result_system_iterator
;
68
72
struct
oval_result_definition
;
77
struct
oval_result_definition_iterator
;
78
82
struct
oval_result_test
;
87
struct
oval_result_test_iterator
;
88
92
struct
oval_result_item
;
97
struct
oval_result_item_iterator
;
98
99
103
struct
oval_result_criteria_node
;
108
struct
oval_result_criteria_node_iterator
;
109
117
struct
oval_results_model
*
oval_results_model_new
(
struct
oval_definition_model
*definition_model,
118
struct
oval_syschar_model
**);
127
int
oval_results_model_import
(
struct
oval_results_model
*model,
const
char
*file);
133
struct
oval_results_model
*
oval_results_model_clone
(
struct
oval_results_model
*);
139
void
oval_results_model_free
(
struct
oval_results_model
*model);
147
int
oval_results_model_export
(
struct
oval_results_model
*,
struct
oval_directives_model
*,
const
char
*file);
148
153
void
oval_results_model_set_generator(
struct
oval_results_model
*model,
struct
oval_generator
*generator);
160
struct
oval_generator
*oval_results_model_get_generator(
struct
oval_results_model
*model);
166
struct
oval_definition_model
*
oval_results_model_get_definition_model
(
struct
oval_results_model
*model);
167
173
struct
oval_result_system_iterator
*
oval_results_model_get_systems
(
struct
oval_results_model
*);
185
int
oval_results_model_eval
(
struct
oval_results_model
*);
196
struct
oval_result_system
*oval_result_system_new(
struct
oval_results_model
*,
struct
oval_syschar_model
*);
201
struct
oval_result_system
*
oval_result_system_clone
(
struct
oval_results_model
*new_model,
202
struct
oval_result_system
*old_system);
206
void
oval_result_system_free(
struct
oval_result_system
*);
207
215
void
oval_result_system_add_definition(
struct
oval_result_system
*,
struct
oval_result_definition
*);
219
void
oval_result_system_add_test(
struct
oval_result_system
*,
struct
oval_result_test
*);
229
struct
oval_results_model
*oval_result_system_get_results_model(
struct
oval_result_system
*);
233
struct
oval_result_definition
*oval_result_system_get_definition(
struct
oval_result_system
*,
const
char
*);
237
struct
oval_result_definition_iterator
*oval_result_system_get_definitions(
struct
oval_result_system
*);
241
struct
oval_result_test_iterator
*oval_result_system_get_tests(
struct
oval_result_system
*);
245
struct
oval_syschar_model
*oval_result_system_get_syschar_model(
struct
oval_result_system
*);
249
struct
oval_sysinfo
*oval_result_system_get_sysinfo(
struct
oval_result_system
*);
259
bool
oval_result_system_iterator_has_more(
struct
oval_result_system_iterator
*);
263
struct
oval_result_system
*oval_result_system_iterator_next(
struct
oval_result_system_iterator
*);
267
void
oval_result_system_iterator_free(
struct
oval_result_system_iterator
*);
281
int
oval_result_system_eval
(
struct
oval_result_system
*sys);
290
int
oval_result_system_eval_definition
(
struct
oval_result_system
*sys,
const
char
*
id
);
301
struct
oval_result_definition
*oval_result_definition_new(
struct
oval_result_system
*,
char
*);
306
struct
oval_result_definition
*
oval_result_definition_clone
307
(
struct
oval_result_system
*new_system,
struct
oval_result_definition
*old_definition);
311
void
oval_result_definition_free(
struct
oval_result_definition
*);
312
320
void
oval_result_definition_set_result(
struct
oval_result_definition
*,
oval_result_t
);
324
void
oval_result_definition_set_instance(
struct
oval_result_definition
*,
int
);
328
void
oval_result_definition_set_criteria(
struct
oval_result_definition
*,
struct
oval_result_criteria_node
*);
332
void
oval_result_definition_add_message(
struct
oval_result_definition
*,
struct
oval_message
*);
342
struct
oval_definition
*oval_result_definition_get_definition(
struct
oval_result_definition
*);
346
struct
oval_result_system
*oval_result_definition_get_system(
struct
oval_result_definition
*);
350
int
oval_result_definition_get_instance(
struct
oval_result_definition
*);
354
oval_result_t
oval_result_definition_eval(
struct
oval_result_definition
*);
358
oval_result_t
oval_result_definition_get_result(
struct
oval_result_definition
*);
362
struct
oval_message_iterator
*oval_result_definition_get_messages(
struct
oval_result_definition
*);
366
struct
oval_result_criteria_node
*oval_result_definition_get_criteria(
struct
oval_result_definition
*);
376
bool
oval_result_definition_iterator_has_more(
struct
oval_result_definition_iterator
*);
380
struct
oval_result_definition
*oval_result_definition_iterator_next(
struct
oval_result_definition_iterator
*);
384
void
oval_result_definition_iterator_free(
struct
oval_result_definition_iterator
*);
401
struct
oval_result_test
*oval_result_test_new(
struct
oval_result_system
*,
char
*);
406
struct
oval_result_test
*
oval_result_test_clone
407
(
struct
oval_result_system
*new_system,
struct
oval_result_test
*old_test);
411
void
oval_result_test_free(
struct
oval_result_test
*);
412
420
void
oval_result_test_set_result(
struct
oval_result_test
*,
oval_result_t
);
424
void
oval_result_test_set_instance(
struct
oval_result_test
*test,
int
instance);
428
void
oval_result_test_add_message(
struct
oval_result_test
*,
struct
oval_message
*);
432
void
oval_result_test_add_item(
struct
oval_result_test
*,
struct
oval_result_item
*);
436
void
oval_result_test_add_binding(
struct
oval_result_test
*,
struct
oval_variable_binding
*);
446
struct
oval_test
*oval_result_test_get_test(
struct
oval_result_test
*);
450
struct
oval_result_system
*oval_result_test_get_system(
struct
oval_result_test
*);
454
oval_result_t
oval_result_test_eval(
struct
oval_result_test
*);
458
oval_result_t
oval_result_test_get_result(
struct
oval_result_test
*);
462
int
oval_result_test_get_instance(
struct
oval_result_test
*);
466
struct
oval_message_iterator
*oval_result_test_get_messages(
struct
oval_result_test
*);
470
struct
oval_result_item_iterator
*oval_result_test_get_items(
struct
oval_result_test
*);
474
struct
oval_variable_binding_iterator
*oval_result_test_get_bindings(
struct
oval_result_test
*);
484
bool
oval_result_test_iterator_has_more(
struct
oval_result_test_iterator
*);
488
struct
oval_result_test
*oval_result_test_iterator_next(
struct
oval_result_test_iterator
*);
492
void
oval_result_test_iterator_free(
struct
oval_result_test_iterator
*);
509
struct
oval_result_item
*oval_result_item_new(
struct
oval_result_system
*,
char
*);
514
struct
oval_result_item
*
oval_result_item_clone
515
(
struct
oval_result_system
*new_system,
struct
oval_result_item
*old_item);
519
void
oval_result_item_free(
struct
oval_result_item
*);
520
528
void
oval_result_item_set_result(
struct
oval_result_item
*,
oval_result_t
);
532
void
oval_result_item_add_message(
struct
oval_result_item
*,
struct
oval_message
*);
542
struct
oval_sysitem
*oval_result_item_get_sysitem(
struct
oval_result_item
*);
546
oval_result_t
oval_result_item_get_result(
struct
oval_result_item
*);
550
struct
oval_message_iterator
*oval_result_item_get_messages(
struct
oval_result_item
*);
560
bool
oval_result_item_iterator_has_more(
struct
oval_result_item_iterator
*);
564
struct
oval_result_item
*oval_result_item_iterator_next(
struct
oval_result_item_iterator
*);
568
void
oval_result_item_iterator_free(
struct
oval_result_item_iterator
*);
585
struct
oval_result_criteria_node
*oval_result_criteria_node_new(
struct
oval_result_system
*,
oval_criteria_node_type_t
,
586
int
, ...);
591
struct
oval_result_criteria_node
*
oval_result_criteria_node_clone
592
(
struct
oval_result_system
*new_system,
struct
oval_result_criteria_node
*old_node);
596
void
oval_result_criteria_node_free(
struct
oval_result_criteria_node
*);
597
605
void
oval_result_criteria_node_set_result(
struct
oval_result_criteria_node
*,
oval_result_t
);
609
void
oval_result_criteria_node_set_negate(
struct
oval_result_criteria_node
*,
bool
);
613
void
oval_result_criteria_node_set_operator(
struct
oval_result_criteria_node
*,
oval_operator_t
);
//type==NODETYPE_CRITERIA
617
void
oval_result_criteria_node_add_subnode(
struct
oval_result_criteria_node
*,
struct
oval_result_criteria_node
*);
//type==NODETYPE_CRITERIA
621
void
oval_result_criteria_node_set_test(
struct
oval_result_criteria_node
*,
struct
oval_result_test
*);
//type==NODETYPE_CRITERION
625
void
oval_result_criteria_node_set_extends(
struct
oval_result_criteria_node
*,
struct
oval_result_definition
*);
//type==NODETYPE_EXTENDDEF
634
oval_criteria_node_type_t
oval_result_criteria_node_get_type(
struct
oval_result_criteria_node
*);
638
oval_result_t
oval_result_criteria_node_eval(
struct
oval_result_criteria_node
*);
642
oval_result_t
oval_result_criteria_node_get_result(
struct
oval_result_criteria_node
*);
646
bool
oval_result_criteria_node_get_negate(
struct
oval_result_criteria_node
*);
650
oval_operator_t
oval_result_criteria_node_get_operator(
struct
oval_result_criteria_node
*);
//type==NODETYPE_CRITERIA
654
struct
oval_result_criteria_node_iterator
*oval_result_criteria_node_get_subnodes(
struct
oval_result_criteria_node
*);
//type==NODETYPE_CRITERIA
658
struct
oval_result_test
*oval_result_criteria_node_get_test(
struct
oval_result_criteria_node
*);
//type==NODETYPE_CRITERION
662
struct
oval_result_definition
*oval_result_criteria_node_get_extends(
struct
oval_result_criteria_node
*);
//type==NODETYPE_EXTENDDEF
672
bool
oval_result_criteria_node_iterator_has_more(
struct
oval_result_criteria_node_iterator
*);
676
struct
oval_result_criteria_node
*oval_result_criteria_node_iterator_next(
struct
oval_result_criteria_node_iterator
*);
680
void
oval_result_criteria_node_iterator_free(
struct
oval_result_criteria_node_iterator
*);
696
#endif
/* OVAL_RESULTS_H_ */
697
Generated by
1.8.1.1