Open SCAP Library: xccdf_benchmark.h Source File

Open SCAP Library

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

xccdf_benchmark.h
Go to the documentation of this file.
1
10 /*
11 * Copyright 2009 Red Hat Inc., Durham, North Carolina.
12 * Copyright (C) 2010 Tresys Technology, LLC
13 * All Rights Reserved.
14 *
15 * This library is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Lesser General Public
17 * License as published by the Free Software Foundation; either
18 * version 2.1 of the License, or (at your option) any later version.
19 *
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Lesser General Public License for more details.
24 *
25 * You should have received a copy of the GNU Lesser General Public
26 * License along with this library; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 *
29 * Authors:
30 * Lukas Kuklinek <lkuklinek@redhat.com>
31 * Josh Adams <jadams@tresys.com>
32 */
33
34 #ifndef XCCDF_H_
35 #define XCCDF_H_
36
37 #include <stdbool.h>
38 #include <time.h>
39 #include <oscap_reference.h>
40 #include <oscap.h>
41 #include "cpe_dict.h"
42
43 /*--------------------*\
44 | Enumerations |
45 \*--------------------*/
46
55 typedef enum {
56 XCCDF_BENCHMARK = 0x0100,
57 XCCDF_PROFILE = 0x0200,
58 XCCDF_RESULT = 0x0400,
59 XCCDF_RULE = 0x1000,
60 XCCDF_GROUP = 0x2000,
61 XCCDF_VALUE = 0x4000,
62
64 XCCDF_CONTENT = XCCDF_RULE | XCCDF_GROUP,
66 XCCDF_ITEM = XCCDF_RULE | XCCDF_GROUP | XCCDF_VALUE,
68 XCCDF_OBJECT = XCCDF_ITEM | XCCDF_PROFILE | XCCDF_BENCHMARK | XCCDF_RESULT,
69 } xccdf_type_t;
70
72 typedef enum {
73 XCCDF_IFACE_HINT_NONE,
74 XCCDF_IFACE_HINT_CHOICE,
75 XCCDF_IFACE_HINT_TEXTLINE,
76 XCCDF_IFACE_HINT_TEXT,
77 XCCDF_IFACE_HINT_DATE,
78 XCCDF_IFACE_HINT_DATETIME,
79 } xccdf_interface_hint_t;
80
82 typedef enum {
83 XCCDF_STATUS_NOT_SPECIFIED,
84 XCCDF_STATUS_ACCEPTED,
85 XCCDF_STATUS_DEPRECATED,
86 XCCDF_STATUS_DRAFT,
87 XCCDF_STATUS_INCOMPLETE,
88 XCCDF_STATUS_INTERIM
89 } xccdf_status_type_t;
90
92 typedef enum {
93 XCCDF_TYPE_NUMBER = 1,
94 XCCDF_TYPE_STRING,
95 XCCDF_TYPE_BOOLEAN,
96 } xccdf_value_type_t;
97
99 typedef enum {
100 XCCDF_OPERATOR_EQUALS = 1,
101 XCCDF_OPERATOR_NOT_EQUAL,
102 XCCDF_OPERATOR_GREATER,
103 XCCDF_OPERATOR_GREATER_EQUAL,
104 XCCDF_OPERATOR_LESS,
105 XCCDF_OPERATOR_LESS_EQUAL,
106 XCCDF_OPERATOR_PATTERN_MATCH
107 } xccdf_operator_t;
108
110 typedef enum {
111 XCCDF_OPERATOR_AND = 0x0002,
112 XCCDF_OPERATOR_OR = 0x0003,
113 } xccdf_bool_operator_t;
114
116 typedef enum {
117 XCCDF_LEVEL_NOT_DEFINED = 0,
118 XCCDF_UNKNOWN = 1,
119 XCCDF_INFO,
120 XCCDF_LOW,
121 XCCDF_MEDIUM,
122 XCCDF_HIGH
123 } xccdf_level_t;
124
126 typedef enum {
127 XCCDF_MSG_INFO = XCCDF_INFO,
128 XCCDF_MSG_WARNING = XCCDF_LOW,
129 XCCDF_MSG_ERROR = XCCDF_HIGH,
130 } xccdf_message_severity_t;
131
133 typedef enum {
134 XCCDF_ROLE_FULL = 1,
135 XCCDF_ROLE_UNSCORED,
136 XCCDF_ROLE_UNCHECKED
137 } xccdf_role_t;
138
140 typedef enum {
141 XCCDF_WARNING_NOT_SPECIFIED,
142 XCCDF_WARNING_GENERAL = 1,
143 XCCDF_WARNING_FUNCTIONALITY,
144 XCCDF_WARNING_PERFORMANCE,
145 XCCDF_WARNING_HARDWARE,
146 XCCDF_WARNING_LEGAL,
147 XCCDF_WARNING_REGULATORY,
148 XCCDF_WARNING_MANAGEMENT,
149 XCCDF_WARNING_AUDIT,
150 XCCDF_WARNING_DEPENDENCY
151 } xccdf_warning_category_t;
152
154 typedef enum {
155 XCCDF_STRATEGY_UNKNOWN = 0,
156 XCCDF_STRATEGY_CONFIGURE,
157 XCCDF_STRATEGY_DISABLE,
158 XCCDF_STRATEGY_ENABLE,
159 XCCDF_STRATEGY_PATCH,
160 XCCDF_STRATEGY_POLICY,
161 XCCDF_STRATEGY_RESTRICT,
162 XCCDF_STRATEGY_UPDATE,
163 XCCDF_STRATEGY_COMBINATION
164 } xccdf_strategy_t;
165
167 typedef enum {
168 XCCDF_RESULT_PASS = 1,
169 XCCDF_RESULT_FAIL,
170 XCCDF_RESULT_ERROR,
171 XCCDF_RESULT_UNKNOWN,
172 XCCDF_RESULT_NOT_APPLICABLE,
173 XCCDF_RESULT_NOT_CHECKED,
174 XCCDF_RESULT_NOT_SELECTED,
175 XCCDF_RESULT_INFORMATIONAL,
176 XCCDF_RESULT_FIXED
177 } xccdf_test_result_type_t;
178
179 /*--------------------*\
180 | Typedefs |
181 \*--------------------*/
182
186 typedef float xccdf_numeric;
187
192 struct xccdf_benchmark;
193
198 struct xccdf_profile;
199
204 struct xccdf_item;
205
210 struct xccdf_rule;
211
216 struct xccdf_group;
217
222 struct xccdf_value;
223
228 struct xccdf_result;
229
235 struct xccdf_tailoring;
236
237 /*--------------------*\
238 | Support structures |
239 \*--------------------*/
240
245 struct xccdf_notice;
246
251 struct xccdf_status;
252
257 struct xccdf_model;
258
263 struct xccdf_warning;
264
269 struct xccdf_select;
270
275 struct xccdf_setvalue;
276
281 struct xccdf_refine_value;
282
287 struct xccdf_refine_rule;
288
293 struct xccdf_ident;
294
299 struct xccdf_check;
304 struct xccdf_check_content_ref;
305
310 struct xccdf_profile_note;
311
317 struct xccdf_check_import;
318
324 struct xccdf_check_export;
325
331 struct xccdf_fix;
332
338 struct xccdf_fixtext;
339
347 struct xccdf_value_instance;
348
354 struct xccdf_identity;
355
361 struct xccdf_instance;
362
368 struct xccdf_message;
369
375 struct xccdf_override;
376
382 struct xccdf_rule_result;
383
389 struct xccdf_score;
390
396 struct xccdf_target_fact;
397
404 struct xccdf_target_identifier;
405
411 struct xccdf_plain_text;
412
418 struct xccdf_item_iterator;
419
425 struct xccdf_notice_iterator;
426
432 struct xccdf_status_iterator;
433
439 struct xccdf_identity_iterator;
440
446 struct xccdf_model_iterator;
447
453 struct xccdf_result_iterator;
454
460 struct xccdf_profile_iterator;
461
467 struct xccdf_select_iterator;
468
474 struct xccdf_value_iterator;
475
481 struct xccdf_setvalue_iterator;
482
487 struct xccdf_refine_value_iterator;
488
494 struct xccdf_refine_rule_iterator;
495
501 struct xccdf_ident_iterator;
502
508 struct xccdf_check_iterator;
509
515 struct xccdf_profile_note_iterator;
516
522 struct xccdf_fixtext_iterator;
523
529 struct xccdf_check_content_ref_iterator;
530
536 struct xccdf_check_import_iterator;
537
543 struct xccdf_fix_iterator;
544
550 struct xccdf_check_export_iterator;
551
557 struct xccdf_warning_iterator;
558
564 struct xccdf_instance_iterator;
565
571 struct xccdf_message_iterator;
572
578 struct xccdf_override_iterator;
579
585 struct xccdf_rule_result_iterator;
586
592 struct xccdf_value_instance_iterator;
593
599 struct xccdf_score_iterator;
600
606 struct xccdf_target_fact_iterator;
607
613 struct xccdf_target_identifier_iterator;
614
620 struct xccdf_plain_text_iterator;
621
625 struct xccdf_version_info;
626
628 const char* xccdf_version_info_get_version(const struct xccdf_version_info* v);
630 const char* xccdf_version_info_get_namespace_uri(const struct xccdf_version_info* v);
632 const char* xccdf_version_info_get_cpe_version(const struct xccdf_version_info* v);
633
640 char * xccdf_detect_version(const char* file);
641
642 /************************************************************/
643
645 void xccdf_item_free(struct xccdf_item *item);
646
648 struct xccdf_item * xccdf_item_clone(const struct xccdf_item * old_item);
649
656 struct xccdf_benchmark* xccdf_item_to_benchmark(struct xccdf_item* item);
657
664 struct xccdf_profile* xccdf_item_to_profile(struct xccdf_item* item);
665
672 struct xccdf_rule* xccdf_item_to_rule(struct xccdf_item* item);
673
680 struct xccdf_group* xccdf_item_to_group(struct xccdf_item* item);
681
688 struct xccdf_value* xccdf_item_to_value(struct xccdf_item* item);
689
696 struct xccdf_result* xccdf_item_to_result(struct xccdf_item* item);
697
705 struct xccdf_benchmark* xccdf_benchmark_import(const char *file);
706
713 int xccdf_benchmark_export(struct xccdf_benchmark *benchmark, const char *file);
714
719 void xccdf_result_fill_sysinfo(struct xccdf_result *result);
720
727 int xccdf_result_export(struct xccdf_result *result, const char *file);
728
735 bool xccdf_benchmark_resolve(struct xccdf_benchmark *benchmark);
736
738 struct xccdf_benchmark *xccdf_benchmark_new(void);
740 void xccdf_benchmark_free(struct xccdf_benchmark *benchmark);
742 struct xccdf_item *xccdf_benchmark_to_item(struct xccdf_benchmark *item);
744 struct xccdf_benchmark * xccdf_benchmark_clone( const struct xccdf_benchmark * benchmark );
745
751 const char * xccdf_benchmark_supported(void);
752
754 struct xccdf_profile *xccdf_profile_new(void);
756 void xccdf_profile_free(struct xccdf_item *prof);
758 struct xccdf_item *xccdf_profile_to_item(struct xccdf_profile *item);
760 struct xccdf_profile * xccdf_profile_clone( const struct xccdf_profile * profile);
761
763 struct xccdf_rule *xccdf_rule_new(void);
765 void xccdf_rule_free(struct xccdf_item *rule);
767 struct xccdf_item *xccdf_rule_to_item(struct xccdf_rule *item);
769 struct xccdf_rule * xccdf_rule_clone(const struct xccdf_rule * rule);
770
772 struct xccdf_group *xccdf_group_new(void);
774 void xccdf_group_free(struct xccdf_item *group);
776 struct xccdf_item *xccdf_group_to_item(struct xccdf_group *item);
778 struct xccdf_group * xccdf_group_clone(const struct xccdf_group * group);
779
781 struct xccdf_value *xccdf_value_new(xccdf_value_type_t type);
783 void xccdf_value_free(struct xccdf_item *val);
785 struct xccdf_item *xccdf_value_to_item(struct xccdf_value *item);
787 struct xccdf_value * xccdf_value_clone(const struct xccdf_value * value);
788
790 struct xccdf_status *xccdf_status_new(void);
792 struct xccdf_status * xccdf_status_clone(const struct xccdf_status * old_status);
794 struct xccdf_status *xccdf_status_new_fill(const char *status, const char *date);
796 void xccdf_status_free(struct xccdf_status *status);
798 struct xccdf_notice *xccdf_notice_new(void);
800 void xccdf_notice_free(struct xccdf_notice *notice);
802 struct xccdf_notice * xccdf_notice_clone(const struct xccdf_notice * notice);
803
805 struct xccdf_model *xccdf_model_new(void);
807 struct xccdf_model * xccdf_model_clone(const struct xccdf_model * old_model);
809 void xccdf_model_free(struct xccdf_model *model);
810
812 struct xccdf_ident *xccdf_ident_new(void);
814 struct xccdf_ident *xccdf_ident_new_fill(const char *id, const char *sys);
816 struct xccdf_ident *xccdf_ident_clone(const struct xccdf_ident * ident);
818 void xccdf_ident_free(struct xccdf_ident *ident);
819
820
822 struct xccdf_check *xccdf_check_new(void);
824 void xccdf_check_free(struct xccdf_check *check);
825
827 struct xccdf_check *xccdf_check_clone(const struct xccdf_check *old_check);
829 struct xccdf_check_import *xccdf_check_import_clone(const struct xccdf_check_import *old_import);
831 struct xccdf_check_export *xccdf_check_export_clone(const struct xccdf_check_export *old_export);
833 struct xccdf_check_content_ref *xccdf_check_content_ref_clone(const struct xccdf_check_content_ref *old_ref);
834
836 struct xccdf_check_content_ref *xccdf_check_content_ref_new(void);
838 void xccdf_check_content_ref_free(struct xccdf_check_content_ref *ref);
839
841 struct xccdf_profile_note *xccdf_profile_note_new(void);
843 void xccdf_profile_note_free(struct xccdf_profile_note *note);
844
846 struct xccdf_check_import *xccdf_check_import_new(void);
848 void xccdf_check_import_free(struct xccdf_check_import *item);
849
851 struct xccdf_check_export *xccdf_check_export_new(void);
853 void xccdf_check_export_free(struct xccdf_check_export *item);
854
856 struct xccdf_fix *xccdf_fix_new(void);
858 struct xccdf_fix *xccdf_fix_clone(const struct xccdf_fix *old_fix);
860 void xccdf_fix_free(struct xccdf_fix *item);
861
863 struct xccdf_fixtext *xccdf_fixtext_new(void);
865 struct xccdf_fixtext * xccdf_fixtext_clone(const struct xccdf_fixtext * fixtext);
867 void xccdf_fixtext_free(struct xccdf_fixtext *item);
868
870 void xccdf_select_free(struct xccdf_select *sel);
872 struct xccdf_select *xccdf_select_clone(const struct xccdf_select * select);
874 struct xccdf_select *xccdf_select_new(void);
875
877 struct xccdf_warning *xccdf_warning_new(void);
879 struct xccdf_warning *xccdf_warning_clone(const struct xccdf_warning *old_warning);
881 void xccdf_warning_free(struct xccdf_warning * warn);
882
884 void xccdf_refine_rule_free(struct xccdf_refine_rule *obj);
885
887 void xccdf_refine_value_free(struct xccdf_refine_value *rv);
888
889 void xccdf_setvalue_free(struct xccdf_setvalue *sv);
890
892 struct xccdf_tailoring *xccdf_tailoring_new(void);
894 void xccdf_tailoring_free(struct xccdf_tailoring *tailoring);
896 int xccdf_tailoring_export(struct xccdf_tailoring *tailoring, const char *file, const struct xccdf_version_info *version_info);
897
902 OSCAP_DEPRECATED(void xccdf_cleanup(void));
903
909 struct xccdf_group *xccdf_benchmark_append_new_group(struct xccdf_benchmark *, const char *id);
910
916 struct xccdf_value *xccdf_benchmark_append_new_value(struct xccdf_benchmark *, const char *id, xccdf_value_type_t type);
917
923 struct xccdf_rule *xccdf_benchmark_append_new_rule(struct xccdf_benchmark *, const char *id);
924
926 struct xccdf_plain_text *xccdf_plain_text_new(void);
928 struct xccdf_plain_text *xccdf_plain_text_new_fill(const char *id, const char *text);
930 void xccdf_plain_text_free(struct xccdf_plain_text *plain);
932 struct xccdf_plain_text *xccdf_plain_text_clone(const struct xccdf_plain_text * pt);
933
935 struct xccdf_result *xccdf_result_new(void);
937 void xccdf_result_free(struct xccdf_result *item);
939 struct xccdf_item *xccdf_result_to_item(struct xccdf_result *item);
941 struct xccdf_result * xccdf_result_clone(const struct xccdf_result * result);
942
944 struct xccdf_rule_result *xccdf_rule_result_new(void);
946 struct xccdf_rule_result * xccdf_rule_result_clone(const struct xccdf_rule_result * result);
948 void xccdf_rule_result_free(struct xccdf_rule_result *rr);
949
951 struct xccdf_identity *xccdf_identity_new(void);
953 struct xccdf_identity * xccdf_identity_clone(const struct xccdf_identity * identity);
955 void xccdf_identity_free(struct xccdf_identity *identity);
956
958 struct xccdf_score *xccdf_score_new(void);
960 struct xccdf_score * xccdf_score_clone(const struct xccdf_score * score);
962 void xccdf_score_free(struct xccdf_score *score);
963
965 struct xccdf_override *xccdf_override_new(void);
967 struct xccdf_override * xccdf_override_clone(const struct xccdf_override * override);
969 void xccdf_override_free(struct xccdf_override *oride);
970
972 struct xccdf_message *xccdf_message_new(void);
974 struct xccdf_message * xccdf_message_clone(const struct xccdf_message * message);
976 void xccdf_message_free(struct xccdf_message *msg);
977
979 struct xccdf_target_fact *xccdf_target_fact_new(void);
981 struct xccdf_target_fact * xccdf_target_fact_clone(const struct xccdf_target_fact * tf);
983 void xccdf_target_fact_free(struct xccdf_target_fact *fact);
984
986 struct xccdf_target_identifier *xccdf_target_identifier_new(void);
988 struct xccdf_target_identifier * xccdf_target_identifier_clone(const struct xccdf_target_identifier * ti);
990 void xccdf_target_identifier_free(struct xccdf_target_identifier *ti);
991
993 struct xccdf_instance *xccdf_instance_new(void);
995 struct xccdf_instance * xccdf_instance_clone(const struct xccdf_instance * instance);
997 void xccdf_instance_free(struct xccdf_instance *inst);
998
1000 struct oscap_string_iterator *xccdf_value_instance_get_choices(const struct xccdf_value_instance *item);
1001
1002 /************************************************************/
1012 struct xccdf_item *xccdf_item_iterator_next(struct xccdf_item_iterator *it);
1017 bool xccdf_item_iterator_has_more(struct xccdf_item_iterator *it);
1022 void xccdf_item_iterator_free(struct xccdf_item_iterator *it);
1027 void xccdf_item_iterator_reset(struct xccdf_item_iterator *it);
1028
1029
1034 struct xccdf_notice *xccdf_notice_iterator_next(struct xccdf_notice_iterator *it);
1039 bool xccdf_notice_iterator_has_more(struct xccdf_notice_iterator *it);
1044 void xccdf_notice_iterator_free(struct xccdf_notice_iterator *it);
1049 void xccdf_notice_iterator_reset(struct xccdf_notice_iterator *it);
1050
1051
1056 struct xccdf_status *xccdf_status_iterator_next(struct xccdf_status_iterator *it);
1061 bool xccdf_status_iterator_has_more(struct xccdf_status_iterator *it);
1066 void xccdf_status_iterator_free(struct xccdf_status_iterator *it);
1071 void xccdf_status_iterator_reset(struct xccdf_status_iterator *it);
1072
1073
1078 struct xccdf_model *xccdf_model_iterator_next(struct xccdf_model_iterator *it);
1083 bool xccdf_model_iterator_has_more(struct xccdf_model_iterator *it);
1088 void xccdf_model_iterator_free(struct xccdf_model_iterator *it);
1093 void xccdf_model_iterator_reset(struct xccdf_model_iterator *it);
1094
1095
1100 struct xccdf_result *xccdf_result_iterator_next(struct xccdf_result_iterator *it);
1105 bool xccdf_result_iterator_has_more(struct xccdf_result_iterator *it);
1110 void xccdf_result_iterator_free(struct xccdf_result_iterator *it);
1115 void xccdf_result_iterator_reset(struct xccdf_result_iterator *it);
1116
1117
1122 struct xccdf_profile *xccdf_profile_iterator_next(struct xccdf_profile_iterator *it);
1127 bool xccdf_profile_iterator_has_more(struct xccdf_profile_iterator *it);
1132 void xccdf_profile_iterator_free(struct xccdf_profile_iterator *it);
1137 void xccdf_profile_iterator_reset(struct xccdf_profile_iterator *it);
1138
1139
1144 struct xccdf_select *xccdf_select_iterator_next(struct xccdf_select_iterator *it);
1149 bool xccdf_select_iterator_has_more(struct xccdf_select_iterator *it);
1154 void xccdf_select_iterator_free(struct xccdf_select_iterator *it);
1159 void xccdf_select_iterator_reset(struct xccdf_select_iterator *it);
1160
1161
1166 struct xccdf_setvalue *xccdf_setvalue_iterator_next(struct xccdf_setvalue_iterator *it);
1171 bool xccdf_setvalue_iterator_has_more(struct xccdf_setvalue_iterator *it);
1176 void xccdf_setvalue_iterator_free(struct xccdf_setvalue_iterator *it);
1181 void xccdf_setvalue_iterator_reset(struct xccdf_setvalue_iterator *it);
1182
1183
1188 struct xccdf_refine_value *xccdf_refine_value_iterator_next(struct xccdf_refine_value_iterator *it);
1193 bool xccdf_refine_value_iterator_has_more(struct xccdf_refine_value_iterator *it);
1198 void xccdf_refine_value_iterator_free(struct xccdf_refine_value_iterator *it);
1203 void xccdf_refine_value_iterator_reset(struct xccdf_refine_value_iterator *it);
1204
1205
1210 struct xccdf_refine_rule *xccdf_refine_rule_iterator_next(struct xccdf_refine_rule_iterator *it);
1215 bool xccdf_refine_rule_iterator_has_more(struct xccdf_refine_rule_iterator *it);
1220 void xccdf_refine_rule_iterator_free(struct xccdf_refine_rule_iterator *it);
1225 void xccdf_refine_rule_iterator_reset(struct xccdf_refine_rule_iterator *it);
1226
1227
1232 struct xccdf_ident *xccdf_ident_iterator_next(struct xccdf_ident_iterator *it);
1237 bool xccdf_ident_iterator_has_more(struct xccdf_ident_iterator *it);
1242 void xccdf_ident_iterator_free(struct xccdf_ident_iterator *it);
1247 void xccdf_ident_iterator_reset(struct xccdf_ident_iterator *it);
1248
1249
1254 struct xccdf_check *xccdf_check_iterator_next(struct xccdf_check_iterator *it);
1259 bool xccdf_check_iterator_has_more(struct xccdf_check_iterator *it);
1264 void xccdf_check_iterator_free(struct xccdf_check_iterator *it);
1269 void xccdf_check_iterator_reset(struct xccdf_check_iterator *it);
1270
1271
1276 struct xccdf_check_content_ref *xccdf_check_content_ref_iterator_next(struct xccdf_check_content_ref_iterator *it);
1281 bool xccdf_check_content_ref_iterator_has_more(struct xccdf_check_content_ref_iterator *it);
1286 void xccdf_check_content_ref_iterator_free(struct xccdf_check_content_ref_iterator *it);
1291 void xccdf_check_content_ref_iterator_reset(struct xccdf_check_content_ref_iterator *it);
1292
1293
1298 struct xccdf_profile_note *xccdf_profile_note_iterator_next(struct xccdf_profile_note_iterator *it);
1303 bool xccdf_profile_note_iterator_has_more(struct xccdf_profile_note_iterator *it);
1308 void xccdf_profile_note_iterator_free(struct xccdf_profile_note_iterator *it);
1313 void xccdf_profile_note_iterator_reset(struct xccdf_profile_note_iterator *it);
1314
1315
1320 struct xccdf_check_import *xccdf_check_import_iterator_next(struct xccdf_check_import_iterator *it);
1325 bool xccdf_check_import_iterator_has_more(struct xccdf_check_import_iterator *it);
1330 void xccdf_check_import_iterator_free(struct xccdf_check_import_iterator *it);
1335 void xccdf_check_import_iterator_reset(struct xccdf_check_import_iterator *it);
1336
1337
1342 struct xccdf_check_export *xccdf_check_export_iterator_next(struct xccdf_check_export_iterator *it);
1347 bool xccdf_check_export_iterator_has_more(struct xccdf_check_export_iterator *it);
1352 void xccdf_check_export_iterator_free(struct xccdf_check_export_iterator *it);
1357 void xccdf_check_export_iterator_reset(struct xccdf_check_export_iterator *it);
1358
1359
1364 struct xccdf_fix *xccdf_fix_iterator_next(struct xccdf_fix_iterator *it);
1369 bool xccdf_fix_iterator_has_more(struct xccdf_fix_iterator *it);
1374 void xccdf_fix_iterator_free(struct xccdf_fix_iterator *it);
1379 void xccdf_fix_iterator_reset(struct xccdf_fix_iterator *it);
1380
1381
1386 struct xccdf_fixtext *xccdf_fixtext_iterator_next(struct xccdf_fixtext_iterator *it);
1391 bool xccdf_fixtext_iterator_has_more(struct xccdf_fixtext_iterator *it);
1396 void xccdf_fixtext_iterator_free(struct xccdf_fixtext_iterator *it);
1401 void xccdf_fixtext_iterator_reset(struct xccdf_fixtext_iterator *it);
1402
1403
1408 struct xccdf_warning *xccdf_warning_iterator_next(struct xccdf_warning_iterator *it);
1413 bool xccdf_warning_iterator_has_more(struct xccdf_warning_iterator *it);
1418 void xccdf_warning_iterator_free(struct xccdf_warning_iterator *it);
1423 void xccdf_warning_iterator_reset(struct xccdf_warning_iterator *it);
1424
1425
1430 struct xccdf_instance *xccdf_instance_iterator_next(struct xccdf_instance_iterator *it);
1435 bool xccdf_instance_iterator_has_more(struct xccdf_instance_iterator *it);
1440 void xccdf_instance_iterator_free(struct xccdf_instance_iterator *it);
1445 void xccdf_instance_iterator_reset(struct xccdf_instance_iterator *it);
1446
1447
1452 struct xccdf_message *xccdf_message_iterator_next(struct xccdf_message_iterator *it);
1457 bool xccdf_message_iterator_has_more(struct xccdf_message_iterator *it);
1462 void xccdf_message_iterator_free(struct xccdf_message_iterator *it);
1467 void xccdf_message_iterator_reset(struct xccdf_message_iterator *it);
1468
1469
1474 struct xccdf_override *xccdf_override_iterator_next(struct xccdf_override_iterator *it);
1479 bool xccdf_override_iterator_has_more(struct xccdf_override_iterator *it);
1484 void xccdf_override_iterator_free(struct xccdf_override_iterator *it);
1489 void xccdf_override_iterator_reset(struct xccdf_override_iterator *it);
1490
1491
1496 struct xccdf_identity *xccdf_identity_iterator_next(struct xccdf_identity_iterator *it);
1501 bool xccdf_identity_iterator_has_more(struct xccdf_identity_iterator *it);
1506 void xccdf_identity_iterator_free(struct xccdf_identity_iterator *it);
1511 void xccdf_identity_iterator_reset(struct xccdf_identity_iterator *it);
1512
1513
1518 struct xccdf_rule_result *xccdf_rule_result_iterator_next(struct xccdf_rule_result_iterator *it);
1523 bool xccdf_rule_result_iterator_has_more(struct xccdf_rule_result_iterator *it);
1528 void xccdf_rule_result_iterator_free(struct xccdf_rule_result_iterator *it);
1533 void xccdf_rule_result_iterator_reset(struct xccdf_rule_result_iterator *it);
1534
1535
1540 struct xccdf_value_instance *xccdf_value_instance_iterator_next(struct xccdf_value_instance_iterator *it);
1545 bool xccdf_value_instance_iterator_has_more(struct xccdf_value_instance_iterator *it);
1550 void xccdf_value_instance_iterator_free(struct xccdf_value_instance_iterator *it);
1555 void xccdf_value_instance_iterator_reset(struct xccdf_value_instance_iterator *it);
1556
1557
1562 struct xccdf_score *xccdf_score_iterator_next(struct xccdf_score_iterator *it);
1567 bool xccdf_score_iterator_has_more(struct xccdf_score_iterator *it);
1572 void xccdf_score_iterator_free(struct xccdf_score_iterator *it);
1577 void xccdf_score_iterator_reset(struct xccdf_score_iterator *it);
1578
1579
1584 struct xccdf_target_fact *xccdf_target_fact_iterator_next(struct xccdf_target_fact_iterator *it);
1589 bool xccdf_target_fact_iterator_has_more(struct xccdf_target_fact_iterator *it);
1594 void xccdf_target_fact_iterator_free(struct xccdf_target_fact_iterator *it);
1599 void xccdf_target_fact_iterator_reset(struct xccdf_target_fact_iterator *it);
1600
1605 struct xccdf_target_identifier *xccdf_target_identifier_iterator_next(struct xccdf_target_identifier_iterator *it);
1610 bool xccdf_target_identifier_iterator_has_more(struct xccdf_target_identifier_iterator *it);
1615 void xccdf_target_identifier_iterator_free(struct xccdf_target_identifier_iterator *it);
1620 void xccdf_target_identifier_iterator_reset(struct xccdf_target_identifier_iterator *it);
1621
1622
1627 struct xccdf_plain_text *xccdf_plain_text_iterator_next(struct xccdf_plain_text_iterator *it);
1632 bool xccdf_plain_text_iterator_has_more(struct xccdf_plain_text_iterator *it);
1637 void xccdf_plain_text_iterator_free(struct xccdf_plain_text_iterator *it);
1642 void xccdf_plain_text_iterator_reset(struct xccdf_plain_text_iterator *it);
1643
1644
1649 struct xccdf_value *xccdf_value_iterator_next(struct xccdf_value_iterator *it);
1654 bool xccdf_value_iterator_has_more(struct xccdf_value_iterator *it);
1659 void xccdf_value_iterator_free(struct xccdf_value_iterator *it);
1664 void xccdf_value_iterator_reset(struct xccdf_value_iterator *it);
1665
1666 /************************************************************
1667 ** @} End of Iterators group */
1668
1669 /************************************************************/
1680 xccdf_type_t xccdf_item_get_type(const struct xccdf_item *item);
1684 const char *xccdf_item_get_id(const struct xccdf_item *item);
1688 struct oscap_text_iterator *xccdf_item_get_title(const struct xccdf_item *item);
1692 struct oscap_text_iterator *xccdf_item_get_description(const struct xccdf_item *item);
1696 const char *xccdf_item_get_version(const struct xccdf_item *item);
1700 const char *xccdf_item_get_extends(const struct xccdf_item *item);
1704 struct xccdf_status_iterator *xccdf_item_get_statuses(const struct xccdf_item *item);
1708 struct oscap_reference_iterator *xccdf_item_get_dc_statuses(const struct xccdf_item *item);
1712 struct oscap_reference_iterator *xccdf_item_get_references(const struct xccdf_item *item);
1716 struct oscap_string_iterator *xccdf_item_get_conflicts(const struct xccdf_item* item);
1720 struct oscap_stringlist_iterator *xccdf_item_get_requires(const struct xccdf_item* item);
1724 struct xccdf_status * xccdf_item_get_current_status(const struct xccdf_item *item);
1728 bool xccdf_item_get_hidden(const struct xccdf_item *item);
1732 bool xccdf_item_get_selected(const struct xccdf_item *item);
1736 bool xccdf_item_get_prohibit_changes(const struct xccdf_item *item);
1740 bool xccdf_item_get_abstract(const struct xccdf_item *item);
1744 struct xccdf_item_iterator *xccdf_item_get_content(const struct xccdf_item *item);
1748 const char * xccdf_test_result_type_get_text(xccdf_test_result_type_t id);
1752 struct xccdf_rule_result * xccdf_result_get_rule_result_by_id(struct xccdf_result * result, const char * id);
1753
1759 struct xccdf_item *xccdf_item_get_parent(const struct xccdf_item *item);
1760
1770 const struct xccdf_version_info* xccdf_item_get_schema_version(struct xccdf_item* item);
1771
1775 struct oscap_string_iterator *xccdf_item_get_metadata(const struct xccdf_item *item);
1776
1780 const char *xccdf_benchmark_get_id(const struct xccdf_benchmark *benchmark);
1784 bool xccdf_benchmark_get_resolved(const struct xccdf_benchmark *benchmark);
1788 struct oscap_text_iterator *xccdf_benchmark_get_title(const struct xccdf_benchmark *benchmark);
1792 struct oscap_text_iterator *xccdf_benchmark_get_description(const struct xccdf_benchmark *benchmark);
1796 const char *xccdf_benchmark_get_version(const struct xccdf_benchmark *benchmark);
1800 const struct xccdf_version_info* xccdf_benchmark_get_schema_version(const struct xccdf_benchmark* item);
1804 const char *xccdf_benchmark_get_style(const struct xccdf_benchmark *benchmark);
1808 const char *xccdf_benchmark_get_style_href(const struct xccdf_benchmark *benchmark);
1812 struct oscap_text_iterator *xccdf_benchmark_get_front_matter(const struct xccdf_benchmark *benchmark);
1816 struct oscap_text_iterator *xccdf_benchmark_get_rear_matter(const struct xccdf_benchmark *benchmark);
1820 struct xccdf_status_iterator *xccdf_benchmark_get_statuses(const struct xccdf_benchmark *benchmark);
1824 struct oscap_reference_iterator *xccdf_benchmark_get_dc_statuses(const struct xccdf_benchmark *benchmark);
1828 struct oscap_reference_iterator *xccdf_benchmark_get_references(const struct xccdf_benchmark *benchmark);
1832 struct oscap_string_iterator *xccdf_benchmark_get_platforms(const struct xccdf_benchmark *benchmark);
1836 struct xccdf_status * xccdf_benchmark_get_status_current(const struct xccdf_benchmark *benchmark);
1840 struct xccdf_plain_text_iterator *xccdf_benchmark_get_plain_texts(const struct xccdf_benchmark *item);
1844 struct xccdf_result_iterator* xccdf_benchmark_get_results(const struct xccdf_benchmark *bench);
1848 struct xccdf_value_iterator *xccdf_benchmark_get_values(const struct xccdf_benchmark *item);
1850 bool xccdf_benchmark_set_lang(struct xccdf_benchmark *item, const char *newval);
1852 const char *xccdf_benchmark_get_lang(const struct xccdf_benchmark *item);
1853
1861 const char *xccdf_benchmark_get_plain_text(const struct xccdf_benchmark *benchmark, const char *id);
1862
1870 struct xccdf_item *xccdf_benchmark_get_item(const struct xccdf_benchmark *benchmark, const char *id);
1871
1879 struct xccdf_item *xccdf_benchmark_get_member(const struct xccdf_benchmark *benchmark, xccdf_type_t type, const char *key);
1880
1886 struct xccdf_notice_iterator *xccdf_benchmark_get_notices(const struct xccdf_benchmark *benchmark);
1887
1893 struct xccdf_model_iterator *xccdf_benchmark_get_models(const struct xccdf_benchmark *benchmark);
1894
1900 struct xccdf_profile_iterator *xccdf_benchmark_get_profiles(const struct xccdf_benchmark *benchmark);
1901
1909 struct xccdf_item_iterator *xccdf_benchmark_get_content(const struct xccdf_benchmark *benchmark);
1910
1914 struct oscap_string_iterator *xccdf_benchmark_get_metadata(const struct xccdf_benchmark *benchmark);
1915
1919 struct cpe_dict_model *xccdf_benchmark_get_cpe_list(const struct xccdf_benchmark *benchmark);
1920
1924 struct cpe_lang_model *xccdf_benchmark_get_cpe_lang_model(const struct xccdf_benchmark *benchmark);
1925
1929 const char *xccdf_profile_get_id(const struct xccdf_profile *profile);
1933 struct oscap_text_iterator *xccdf_profile_get_title(const struct xccdf_profile *profile);
1937 struct oscap_text_iterator *xccdf_profile_get_description(const struct xccdf_profile *profile);
1941 const char *xccdf_profile_get_version(const struct xccdf_profile *profile);
1945 const char *xccdf_profile_get_extends(const struct xccdf_profile *profile);
1949 struct xccdf_benchmark *xccdf_profile_get_benchmark(const struct xccdf_profile *profile);
1953 bool xccdf_profile_get_abstract(const struct xccdf_profile *profile);
1957 bool xccdf_profile_get_prohibit_changes(const struct xccdf_profile *profile);
1961 struct oscap_string_iterator *xccdf_profile_get_platforms(const struct xccdf_profile *profile);
1965 struct xccdf_status_iterator *xccdf_profile_get_statuses(const struct xccdf_profile *profile);
1969 struct oscap_reference_iterator *xccdf_profile_get_dc_statuses(const struct xccdf_profile *profile);
1973 struct oscap_reference_iterator *xccdf_profile_get_references(const struct xccdf_profile *profile);
1977 struct xccdf_status * xccdf_profile_get_status_current(const struct xccdf_profile *profile);
1981 struct xccdf_select_iterator *xccdf_profile_get_selects(const struct xccdf_profile *profile);
1985 struct xccdf_setvalue_iterator *xccdf_profile_get_setvalues(const struct xccdf_profile *profile);
1989 struct xccdf_refine_value_iterator *xccdf_profile_get_refine_values(const struct xccdf_profile *profile);
1993 struct xccdf_refine_rule_iterator *xccdf_profile_get_refine_rules(const struct xccdf_profile *profile);
1997 struct oscap_string_iterator *xccdf_profile_get_metadata(const struct xccdf_profile *profile);
1998
2004 struct xccdf_item *xccdf_rule_get_parent(const struct xccdf_rule *rule);
2005
2009 const char *xccdf_rule_get_id(const struct xccdf_rule *rule);
2013 struct oscap_text_iterator *xccdf_rule_get_title(const struct xccdf_rule *rule);
2017 struct oscap_text_iterator *xccdf_rule_get_description(const struct xccdf_rule *rule);
2021 const char *xccdf_rule_get_version(const struct xccdf_rule *rule);
2025 struct oscap_text_iterator *xccdf_rule_get_question(const struct xccdf_rule *rule);
2029 struct xccdf_warning_iterator *xccdf_rule_get_warnings(const struct xccdf_rule *rule);
2033 struct oscap_text_iterator *xccdf_rule_get_rationale(const struct xccdf_rule *rule);
2037 const char *xccdf_rule_get_cluster_id(const struct xccdf_rule *rule);
2041 float xccdf_rule_get_weight(const struct xccdf_rule *rule);
2045 bool xccdf_rule_set_weight(struct xccdf_rule *item, xccdf_numeric newval);
2049 const char *xccdf_rule_get_extends(const struct xccdf_rule *rule);
2053 bool xccdf_rule_get_abstract(const struct xccdf_rule *rule);
2057 bool xccdf_rule_get_prohibit_changes(const struct xccdf_rule *rule);
2061 bool xccdf_rule_get_hidden(const struct xccdf_rule *rule);
2065 bool xccdf_rule_get_selected(const struct xccdf_rule *rule);
2069 bool xccdf_rule_get_multiple(const struct xccdf_rule *rule);
2073 struct oscap_string_iterator *xccdf_rule_get_platforms(const struct xccdf_rule *rule);
2077 struct xccdf_status_iterator *xccdf_rule_get_statuses(const struct xccdf_rule *rule);
2081 struct oscap_reference_iterator *xccdf_rule_get_dc_statuses(const struct xccdf_rule *rule);
2085 struct oscap_reference_iterator *xccdf_rule_get_references(const struct xccdf_rule *rule);
2089 struct xccdf_status * xccdf_rule_get_status_current(const struct xccdf_rule *rule);
2093 const char *xccdf_rule_get_impact_metric(const struct xccdf_rule *rule);
2097 xccdf_role_t xccdf_rule_get_role(const struct xccdf_rule *rule);
2101 xccdf_level_t xccdf_rule_get_severity(const struct xccdf_rule *rule);
2105 struct xccdf_ident_iterator *xccdf_rule_get_idents(const struct xccdf_rule *rule);
2109 struct xccdf_check_iterator *xccdf_rule_get_checks(const struct xccdf_rule *rule);
2113 struct xccdf_profile_note_iterator *xccdf_rule_get_profile_notes(const struct xccdf_rule *rule);
2117 struct xccdf_fix_iterator *xccdf_rule_get_fixes(const struct xccdf_rule *rule);
2121 struct xccdf_fixtext_iterator *xccdf_rule_get_fixtexts(const struct xccdf_rule *rule);
2125 struct oscap_string_iterator *xccdf_rule_get_conflicts(const struct xccdf_rule* rule);
2129 struct oscap_stringlist_iterator *xccdf_rule_get_requires(const struct xccdf_rule* rule);
2133 struct oscap_string_iterator *xccdf_rule_get_metadata(const struct xccdf_rule *rule);
2134
2135 /*
2136 * Return group's parent in the grouping hierarchy.
2137 * Returned item will be either a group or a benchmark.
2138 * @memberof xccdf_group
2139 */
2140 struct xccdf_item *xccdf_group_get_parent(const struct xccdf_group *group);
2141
2149 struct xccdf_item_iterator *xccdf_group_get_content(const struct xccdf_group *group);
2150
2152 struct xccdf_value_iterator *xccdf_group_get_values(const struct xccdf_group *group);
2153
2155 const char *xccdf_group_get_id(const struct xccdf_group *group);
2157 struct oscap_text_iterator *xccdf_group_get_title(const struct xccdf_group *group);
2159 struct oscap_text_iterator *xccdf_group_get_description(const struct xccdf_group *group);
2161 const char *xccdf_group_get_version(const struct xccdf_group *group);
2163 struct oscap_text_iterator *xccdf_group_get_question(const struct xccdf_group *group);
2165 struct xccdf_warning_iterator *xccdf_group_get_warnings(const struct xccdf_group *group);
2167 struct oscap_text_iterator *xccdf_group_get_rationale(const struct xccdf_group *group);
2169 const char *xccdf_group_get_cluster_id(const struct xccdf_group *group);
2171 float xccdf_group_get_weight(const struct xccdf_group *group);
2173 bool xccdf_group_set_weight(struct xccdf_group *item, xccdf_numeric newval);
2175 const char *xccdf_group_get_extends(const struct xccdf_group *group);
2177 bool xccdf_group_get_abstract(const struct xccdf_group *group);
2179 bool xccdf_group_get_prohibit_changes(const struct xccdf_group *group);
2181 bool xccdf_group_get_hidden(const struct xccdf_group *group);
2183 bool xccdf_group_get_selected(const struct xccdf_group *group);
2185 struct oscap_string_iterator *xccdf_group_get_platforms(const struct xccdf_group *group);
2187 struct xccdf_status_iterator *xccdf_group_get_statuses(const struct xccdf_group *group);
2189 struct oscap_reference_iterator *xccdf_group_get_dc_statuses(const struct xccdf_group *group);
2191 struct oscap_reference_iterator *xccdf_group_get_references(const struct xccdf_group *group);
2193 struct xccdf_status * xccdf_group_get_status_current(const struct xccdf_group *group);
2195 struct oscap_string_iterator *xccdf_group_get_conflicts(const struct xccdf_group* group);
2197 struct oscap_stringlist_iterator *xccdf_group_get_requires(const struct xccdf_group* group);
2199 struct oscap_string_iterator *xccdf_group_get_metadata(const struct xccdf_group *group);
2200
2202 struct oscap_text_iterator *xccdf_value_get_title(const struct xccdf_value *value);
2204 const char *xccdf_value_get_id(const struct xccdf_value *value);
2206 struct oscap_text_iterator *xccdf_value_get_description(const struct xccdf_value *value);
2208 const char *xccdf_value_get_extends(const struct xccdf_value *value);
2210 bool xccdf_value_get_abstract(const struct xccdf_value *value);
2212 bool xccdf_value_get_prohibit_changes(const struct xccdf_value *value);
2214 bool xccdf_value_get_hidden(const struct xccdf_value *value);
2216 bool xccdf_value_get_interactive(const struct xccdf_value *value);
2218 struct xccdf_status_iterator *xccdf_value_get_statuses(const struct xccdf_value *value);
2220 struct oscap_reference_iterator *xccdf_value_get_dc_statuses(const struct xccdf_value *value);
2222 struct oscap_reference_iterator *xccdf_value_get_references(const struct xccdf_value *value);
2224 struct xccdf_status * xccdf_value_get_status_current(const struct xccdf_value *value);
2226 xccdf_value_type_t xccdf_value_get_type(const struct xccdf_value *value);
2228 xccdf_interface_hint_t xccdf_value_get_interface_hint(const struct xccdf_value *value);
2230 xccdf_operator_t xccdf_value_get_oper(const struct xccdf_value *value);
2232 struct xccdf_value_instance *xccdf_value_get_instance_by_selector(const struct xccdf_value *value, const char *selector);
2234 bool xccdf_value_add_instance(struct xccdf_value *value, struct xccdf_value_instance *instance);
2236 struct xccdf_value_instance_iterator *xccdf_value_get_instances(const struct xccdf_value *item);
2238 struct oscap_string_iterator *xccdf_value_get_metadata(const struct xccdf_value *value);
2239
2241 void xccdf_value_instance_free(struct xccdf_value_instance *inst);
2243 struct xccdf_value_instance *xccdf_value_new_instance(struct xccdf_value *val);
2245 const char *xccdf_value_instance_get_selector(const struct xccdf_value_instance *item);
2247 bool xccdf_value_instance_set_selector(struct xccdf_value_instance *obj, const char *newval);
2249 xccdf_value_type_t xccdf_value_instance_get_type(const struct xccdf_value_instance *item);
2251 bool xccdf_value_instance_get_must_match(const struct xccdf_value_instance *item);
2253 bool xccdf_value_instance_set_must_match(struct xccdf_value_instance *obj, bool newval);
2255 bool xccdf_value_instance_get_value_boolean(const struct xccdf_value_instance *inst);
2257 bool xccdf_value_instance_set_value_boolean(struct xccdf_value_instance *inst, bool newval);
2259 xccdf_numeric xccdf_value_instance_get_value_number(const struct xccdf_value_instance *inst);
2261 bool xccdf_value_instance_set_value_number(struct xccdf_value_instance *inst, xccdf_numeric newval);
2263 const char *xccdf_value_instance_get_value_string(const struct xccdf_value_instance *inst);
2265 bool xccdf_value_instance_set_value_string(struct xccdf_value_instance *inst, const char *newval);
2267 bool xccdf_value_instance_get_defval_boolean(const struct xccdf_value_instance *inst);
2269 bool xccdf_value_instance_set_defval_boolean(struct xccdf_value_instance *inst, bool newval);
2271 xccdf_numeric xccdf_value_instance_get_defval_number(const struct xccdf_value_instance *inst);
2273 bool xccdf_value_instance_set_defval_number(struct xccdf_value_instance *inst, xccdf_numeric newval);
2275 const char *xccdf_value_instance_get_defval_string(const struct xccdf_value_instance *inst);
2277 bool xccdf_value_instance_set_defval_string(struct xccdf_value_instance *inst, const char *newval);
2279 xccdf_numeric xccdf_value_instance_get_lower_bound(const struct xccdf_value_instance *inst);
2281 bool xccdf_value_instance_set_lower_bound(struct xccdf_value_instance *inst, xccdf_numeric newval);
2283 xccdf_numeric xccdf_value_instance_get_upper_bound(const struct xccdf_value_instance *inst);
2285 bool xccdf_value_instance_set_upper_bound(struct xccdf_value_instance *inst, xccdf_numeric newval);
2287 const char *xccdf_value_instance_get_match(const struct xccdf_value_instance *inst);
2289 bool xccdf_value_instance_set_match(struct xccdf_value_instance *inst, const char *newval);
2291 const char * xccdf_value_instance_get_value(const struct xccdf_value_instance * val);
2292
2298 struct xccdf_item *xccdf_value_get_parent(const struct xccdf_value *value);
2299
2300
2302 time_t xccdf_status_get_date(const struct xccdf_status *status);
2304 xccdf_status_type_t xccdf_status_get_status(const struct xccdf_status *status);
2306 const char *xccdf_status_type_to_text(xccdf_status_type_t id);
2307
2309 const char *xccdf_notice_get_id(const struct xccdf_notice *notice);
2311 struct oscap_text *xccdf_notice_get_text(const struct xccdf_notice *notice);
2313 const char *xccdf_model_get_system(const struct xccdf_model *model);
2315 const char *xccdf_ident_get_id(const struct xccdf_ident *ident);
2317 const char *xccdf_ident_get_system(const struct xccdf_ident *ident);
2319 const char *xccdf_check_get_id(const struct xccdf_check *check);
2320
2326 bool xccdf_check_get_complex(const struct xccdf_check *check);
2327
2333 xccdf_bool_operator_t xccdf_check_get_oper(const struct xccdf_check *check);
2335 const char *xccdf_check_get_system(const struct xccdf_check *check);
2337 const char *xccdf_check_get_selector(const struct xccdf_check *check);
2339 const char *xccdf_check_get_content(const struct xccdf_check *check);
2341 bool xccdf_check_get_multicheck(const struct xccdf_check *check);
2343 bool xccdf_check_get_negate(const struct xccdf_check *check);
2345 //struct xccdf_rule *xccdf_check_get_parent(const struct xccdf_check *check);
2351 struct xccdf_check_iterator *xccdf_check_get_children(const struct xccdf_check *check);
2352
2354 const char *xccdf_check_content_ref_get_href(const struct xccdf_check_content_ref *ref);
2356 const char *xccdf_check_content_ref_get_name(const struct xccdf_check_content_ref *ref);
2358 const char *xccdf_profile_note_get_reftag(const struct xccdf_profile_note *note);
2360 struct oscap_text *xccdf_profile_note_get_text(const struct xccdf_profile_note *note);
2362 const char *xccdf_check_import_get_name(const struct xccdf_check_import *item);
2364 const char *xccdf_check_import_get_xpath(const struct xccdf_check_import *item);
2366 const char *xccdf_check_import_get_content(const struct xccdf_check_import *item);
2368 const char *xccdf_check_export_get_value(const struct xccdf_check_export *item);
2370 const char *xccdf_check_export_get_name(const struct xccdf_check_export *item);
2371
2373 const char *xccdf_fix_get_content(const struct xccdf_fix *fix);
2375 bool xccdf_fix_get_reboot(const struct xccdf_fix *fix);
2377 xccdf_strategy_t xccdf_fix_get_strategy(const struct xccdf_fix *fix);
2379 xccdf_level_t xccdf_fix_get_complexity(const struct xccdf_fix *fix);
2381 xccdf_level_t xccdf_fix_get_disruption(const struct xccdf_fix *fix);
2383 const char *xccdf_fix_get_id(const struct xccdf_fix *fix);
2385 const char *xccdf_fix_get_system(const struct xccdf_fix *fix);
2387 const char *xccdf_fix_get_platform(const struct xccdf_fix *fix);
2389 bool xccdf_fixtext_get_reboot(const struct xccdf_fixtext *fixtext);
2391 xccdf_strategy_t xccdf_fixtext_get_strategy(const struct xccdf_fixtext *fixtext);
2393 xccdf_level_t xccdf_fixtext_get_complexity(const struct xccdf_fixtext *fixtext);
2395 xccdf_level_t xccdf_fixtext_get_disruption(const struct xccdf_fixtext *fixtext);
2397 const char *xccdf_fixtext_get_fixref(const struct xccdf_fixtext *fixtext);
2399 struct oscap_text *xccdf_fixtext_get_text(const struct xccdf_fixtext *fixtext);
2401 const char *xccdf_value_get_version(const struct xccdf_value *value);
2403 struct oscap_text_iterator *xccdf_value_get_question(const struct xccdf_value *value);
2405 struct xccdf_warning_iterator *xccdf_value_get_warnings(const struct xccdf_value *value);
2407 const char *xccdf_value_get_version_update(const struct xccdf_value *value);
2409 const char *xccdf_value_get_version_time(const struct xccdf_value *value);
2411 struct xccdf_benchmark *xccdf_value_get_benchmark(const struct xccdf_value *value);
2413 struct oscap_string_iterator *xccdf_value_get_sources(const struct xccdf_value *value);
2415 const char *xccdf_value_get_cluster_id(const struct xccdf_value *value);
2416
2418 struct oscap_text_iterator *xccdf_item_get_question(const struct xccdf_item *item);
2420 struct xccdf_warning_iterator *xccdf_item_get_warnings(const struct xccdf_item *item);
2422 struct oscap_text_iterator *xccdf_item_get_rationale(const struct xccdf_item *item);
2424 const char *xccdf_item_get_cluster_id(const struct xccdf_item *item);
2426 const char *xccdf_item_get_version_update(const struct xccdf_item *item);
2428 const char *xccdf_item_get_version_time(const struct xccdf_item *item);
2430 float xccdf_item_get_weight(const struct xccdf_item *item);
2432 struct xccdf_benchmark *xccdf_item_get_benchmark(const struct xccdf_item *item);
2434 struct oscap_string_iterator *xccdf_item_get_platforms(const struct xccdf_item *item);
2435
2437 struct xccdf_warning_iterator *xccdf_benchmark_get_warnings(const struct xccdf_benchmark *benchmark);
2439 const char *xccdf_benchmark_get_version_update(const struct xccdf_benchmark *benchmark);
2441 const char *xccdf_benchmark_get_version_time(const struct xccdf_benchmark *benchmark);
2442
2444 const char *xccdf_profile_get_version_update(const struct xccdf_profile *profile);
2446 const char *xccdf_profile_get_version_time(const struct xccdf_profile *profile);
2448 bool xccdf_profile_get_tailoring(const struct xccdf_profile *profile);
2450 const char *xccdf_profile_get_note_tag(const struct xccdf_profile *profile);
2451
2453 const char *xccdf_rule_get_version_update(const struct xccdf_rule *rule);
2455 const char *xccdf_rule_get_version_time(const struct xccdf_rule *rule);
2457 struct xccdf_benchmark *xccdf_rule_get_benchmark(const struct xccdf_rule *rule);
2458
2460 const char *xccdf_group_get_version_time(const struct xccdf_group *group);
2462 const char *xccdf_group_get_version_update(const struct xccdf_group *group);
2464 struct xccdf_benchmark *xccdf_group_get_benchmark(const struct xccdf_group *group);
2465
2467 struct xccdf_check_import_iterator *xccdf_check_get_imports(const struct xccdf_check *check);
2469 struct xccdf_check_export_iterator *xccdf_check_get_exports(const struct xccdf_check *check);
2471 struct xccdf_check_content_ref_iterator *xccdf_check_get_content_refs(const struct xccdf_check *check);
2472
2474 bool xccdf_select_get_selected(const struct xccdf_select *select);
2476 const char *xccdf_select_get_item(const struct xccdf_select *select);
2478 struct oscap_text_iterator *xccdf_select_get_remarks(const struct xccdf_select *select);
2479
2481 xccdf_warning_category_t xccdf_warning_get_category(const struct xccdf_warning *warning);
2483 struct oscap_text *xccdf_warning_get_text(const struct xccdf_warning *warning);
2485 const char * xccdf_refine_rule_get_item(const struct xccdf_refine_rule* rr);
2487 const char * xccdf_refine_rule_get_selector(const struct xccdf_refine_rule* rr);
2489 xccdf_role_t xccdf_refine_rule_get_role(const struct xccdf_refine_rule* rr);
2491 xccdf_level_t xccdf_refine_rule_get_severity(const struct xccdf_refine_rule* rr);
2493 struct oscap_text_iterator* xccdf_refine_rule_get_remarks(const struct xccdf_refine_rule *rr);
2495 xccdf_numeric xccdf_refine_rule_get_weight(const struct xccdf_refine_rule *item);
2497 bool xccdf_refine_rule_weight_defined(const struct xccdf_refine_rule *item);
2499 const char * xccdf_refine_value_get_item(const struct xccdf_refine_value* rv);
2501 const char * xccdf_refine_value_get_selector(const struct xccdf_refine_value* rv);
2503 xccdf_operator_t xccdf_refine_value_get_oper(const struct xccdf_refine_value* rv);
2505 struct oscap_text_iterator* xccdf_refine_value_get_remarks(const struct xccdf_refine_value *rv);
2507 const char *xccdf_setvalue_get_item(const struct xccdf_setvalue* sv);
2509 const char *xccdf_setvalue_get_value(const struct xccdf_setvalue* sv);
2510
2512 const char *xccdf_plain_text_get_id(const struct xccdf_plain_text *item);
2514 const char *xccdf_plain_text_get_text(const struct xccdf_plain_text *item);
2515
2517 struct xccdf_benchmark *xccdf_result_get_benchmark(const struct xccdf_result *item);
2519 const char *xccdf_result_get_id(const struct xccdf_result *item);
2521 struct oscap_text_iterator *xccdf_result_get_title(const struct xccdf_result *item);
2523 const char *xccdf_result_get_version(const struct xccdf_result *item);
2525 struct oscap_string_iterator *xccdf_result_get_platforms(const struct xccdf_result *item);
2527 struct xccdf_status_iterator *xccdf_result_get_statuses(const struct xccdf_result *item);
2529 const char *xccdf_result_get_test_system(const struct xccdf_result *item);
2531 const char *xccdf_result_get_benchmark_uri(const struct xccdf_result *item);
2533 const char *xccdf_result_get_profile(const struct xccdf_result *item);
2535 struct xccdf_identity_iterator *xccdf_result_get_identities(const struct xccdf_result *item);
2537 struct oscap_string_iterator *xccdf_result_get_targets(const struct xccdf_result *item);
2539 struct oscap_string_iterator *xccdf_result_get_target_addresses(const struct xccdf_result *item);
2541 struct oscap_string_iterator *xccdf_result_get_organizations(const struct xccdf_result *item);
2543 struct oscap_text_iterator *xccdf_result_get_remarks(const struct xccdf_result *item);
2545 struct xccdf_target_fact_iterator *xccdf_result_get_target_facts(const struct xccdf_result *item);
2547 struct xccdf_target_identifier_iterator *xccdf_result_get_target_id_refs(const struct xccdf_result *item);
2549 struct xccdf_setvalue_iterator *xccdf_result_get_setvalues(const struct xccdf_result *item);
2551 struct xccdf_rule_result_iterator *xccdf_result_get_rule_results(const struct xccdf_result *item);
2553 struct xccdf_score_iterator *xccdf_result_get_scores(const struct xccdf_result *item);
2555 const char * xccdf_result_get_start_time(const struct xccdf_result *item);
2557 const char * xccdf_result_get_end_time(const struct xccdf_result *item);
2559 struct oscap_string_iterator *xccdf_result_get_metadata(const struct xccdf_result *result);
2560
2562 const char * xccdf_rule_result_get_time(const struct xccdf_rule_result *item);
2564 xccdf_role_t xccdf_rule_result_get_role(const struct xccdf_rule_result *item);
2566 float xccdf_rule_result_get_weight(const struct xccdf_rule_result *item);
2568 xccdf_level_t xccdf_rule_result_get_severity(const struct xccdf_rule_result *item);
2570 xccdf_test_result_type_t xccdf_rule_result_get_result(const struct xccdf_rule_result *item);
2572 const char *xccdf_rule_result_get_version(const struct xccdf_rule_result *item);
2574 const char *xccdf_rule_result_get_idref(const struct xccdf_rule_result *item);
2576 struct xccdf_ident_iterator *xccdf_rule_result_get_idents(const struct xccdf_rule_result *item);
2578 struct xccdf_fix_iterator *xccdf_rule_result_get_fixes(const struct xccdf_rule_result *item);
2580 struct xccdf_check_iterator *xccdf_rule_result_get_checks(const struct xccdf_rule_result *item);
2582 struct xccdf_override_iterator *xccdf_rule_result_get_overrides(const struct xccdf_rule_result *item);
2584 struct xccdf_message_iterator *xccdf_rule_result_get_messages(const struct xccdf_rule_result *item);
2586 struct xccdf_instance_iterator *xccdf_rule_result_get_instances(const struct xccdf_rule_result *item);
2588 bool xccdf_identity_get_authenticated(const struct xccdf_identity *item);
2590 bool xccdf_identity_get_privileged(const struct xccdf_identity *item);
2592 const char *xccdf_identity_get_name(const struct xccdf_identity *item);
2594 xccdf_numeric xccdf_score_get_maximum(const struct xccdf_score *item);
2596 xccdf_numeric xccdf_score_get_score(const struct xccdf_score *item);
2598 const char *xccdf_score_get_system(const struct xccdf_score *item);
2600 const char *xccdf_override_get_time(const struct xccdf_override *item);
2602 xccdf_test_result_type_t xccdf_override_get_new_result(const struct xccdf_override *item);
2604 xccdf_test_result_type_t xccdf_override_get_old_result(const struct xccdf_override *item);
2606 const char *xccdf_override_get_authority(const struct xccdf_override *item);
2608 struct oscap_text *xccdf_override_get_remark(const struct xccdf_override *item);
2610 xccdf_message_severity_t xccdf_message_get_severity(const struct xccdf_message *item);
2612 const char *xccdf_message_get_content(const struct xccdf_message *item);
2614 xccdf_value_type_t xccdf_target_fact_get_type(const struct xccdf_target_fact *item);
2616 const char *xccdf_target_fact_get_value(const struct xccdf_target_fact *item);
2618 const char *xccdf_target_fact_get_name(const struct xccdf_target_fact *item);
2620 void* xccdf_target_identifier_get_xml_node(const struct xccdf_target_identifier *item);
2622 const char *xccdf_target_identifier_get_system(const struct xccdf_target_identifier *item);
2624 const char *xccdf_target_identifier_get_href(const struct xccdf_target_identifier *item);
2626 const char *xccdf_target_identifier_get_name(const struct xccdf_target_identifier *item);
2628 const char *xccdf_instance_get_context(const struct xccdf_instance *item);
2630 const char *xccdf_instance_get_parent_context(const struct xccdf_instance *item);
2632 const char *xccdf_instance_get_content(const struct xccdf_instance *item);
2634 struct xccdf_tailoring *xccdf_tailoring_import(const char *file, struct xccdf_benchmark *benchmark);
2636 const char *xccdf_tailoring_get_id(const struct xccdf_tailoring *tailoring);
2638 const char *xccdf_tailoring_get_version(const struct xccdf_tailoring *tailoring);
2640 const char *xccdf_tailoring_get_version_update(const struct xccdf_tailoring *tailoring);
2642 const char *xccdf_tailoring_get_version_time(const struct xccdf_tailoring *tailoring);
2644 const char *xccdf_tailoring_get_benchmark_ref(const struct xccdf_tailoring *tailoring);
2646 const char *xccdf_tailoring_get_benchmark_ref_version(const struct xccdf_tailoring *tailoring);
2648 struct oscap_string_iterator *xccdf_tailoring_get_metadata(const struct xccdf_tailoring *tailoring);
2650 struct xccdf_profile_iterator *xccdf_tailoring_get_profiles(const struct xccdf_tailoring *tailoring);
2652 struct xccdf_status_iterator *xccdf_tailoring_get_statuses(const struct xccdf_tailoring *tailoring);
2654 struct oscap_reference_iterator *xccdf_tailoring_get_dc_statuses(const struct xccdf_tailoring *tailoring);
2662 struct xccdf_profile *xccdf_tailoring_get_profile_by_id(const struct xccdf_tailoring *tailoring, const char *profile_id);
2663
2664 /************************************************************
2665 ** @} End of Getters group */
2666
2667 /************************************************************/
2675
2676 bool xccdf_item_set_weight(struct xccdf_item *item, xccdf_numeric newval);
2678 bool xccdf_item_set_id(struct xccdf_item *item, const char *newval);
2680 bool xccdf_item_set_cluster_id(struct xccdf_item *item, const char *newval);
2682 bool xccdf_item_set_extends(struct xccdf_item *item, const char *newval);
2684 bool xccdf_item_set_version(struct xccdf_item *item, const char *newval);
2686 bool xccdf_item_set_version_time(struct xccdf_item *item, const char *newval);
2688 bool xccdf_item_set_version_update(struct xccdf_item *item, const char *newval);
2690 bool xccdf_item_set_abstract(struct xccdf_item *item, bool newval);
2692 bool xccdf_item_set_hidden(struct xccdf_item *item, bool newval);
2694 bool xccdf_item_set_prohibit_changes(struct xccdf_item *item, bool newval);
2696 bool xccdf_item_set_selected(struct xccdf_item *item, bool newval);
2697
2699 bool xccdf_item_add_metadata(struct xccdf_item *item, const char* metadata);
2700
2702 bool xccdf_benchmark_set_resolved(struct xccdf_benchmark *item, bool newval);
2703
2705 bool xccdf_benchmark_set_style_href(struct xccdf_benchmark *item, const char *newval);
2707 bool xccdf_benchmark_set_style(struct xccdf_benchmark *item, const char *newval);
2709 bool xccdf_benchmark_set_id(struct xccdf_benchmark *item, const char *newval);
2711 bool xccdf_benchmark_set_version(struct xccdf_benchmark *item, const char *newval);
2713 bool xccdf_benchmark_set_version_time(struct xccdf_benchmark *item, const char *newval);
2715 bool xccdf_benchmark_set_version_update(struct xccdf_benchmark *item, const char *newval);
2717 bool xccdf_benchmark_set_schema_version(struct xccdf_benchmark* item, const struct xccdf_version_info* newval);
2719 bool xccdf_benchmark_add_metadata(struct xccdf_benchmark* item, const char* metadata);
2721 bool xccdf_benchmark_set_cpe_list(struct xccdf_benchmark* item, struct cpe_dict_model* cpe_list);
2723 bool xccdf_benchmark_set_cpe_lang_model(struct xccdf_benchmark* item, struct cpe_lang_model* cpe_lang_model);
2725 bool xccdf_profile_set_note_tag(struct xccdf_profile *item, const char *newval);
2727 bool xccdf_profile_set_id(struct xccdf_profile *item, const char *newval);
2729 bool xccdf_profile_set_abstract(struct xccdf_profile *item, bool newval);
2731 bool xccdf_profile_set_prohibit_changes(struct xccdf_profile *item, bool newval);
2733 bool xccdf_profile_set_extends(struct xccdf_profile *item, const char *newval);
2735 bool xccdf_profile_set_version(struct xccdf_profile *item, const char *newval);
2737 bool xccdf_profile_set_version_time(struct xccdf_profile *item, const char *newval);
2739 bool xccdf_profile_set_version_update(struct xccdf_profile *item, const char *newval);
2741 bool xccdf_profile_set_tailoring(struct xccdf_profile *item, bool tailoring);
2743 bool xccdf_profile_add_metadata(struct xccdf_profile* item, const char* metadata);
2744
2746 bool xccdf_rule_set_id(struct xccdf_rule *item, const char *newval);
2748 bool xccdf_rule_set_cluster_id(struct xccdf_rule *item, const char *newval);
2750 bool xccdf_rule_set_extends(struct xccdf_rule *item, const char *newval);
2752 bool xccdf_rule_set_version(struct xccdf_rule *item, const char *newval);
2754 bool xccdf_rule_set_version_time(struct xccdf_rule *item, const char *newval);
2756 bool xccdf_rule_set_version_update(struct xccdf_rule *item, const char *newval);
2758 bool xccdf_rule_set_abstract(struct xccdf_rule *item, bool newval);
2760 bool xccdf_rule_set_hidden(struct xccdf_rule *item, bool newval);
2762 bool xccdf_rule_set_prohibit_changes(struct xccdf_rule *item, bool newval);
2764 bool xccdf_rule_set_selected(struct xccdf_rule *item, bool newval);
2766 bool xccdf_rule_set_multiple(struct xccdf_rule *item, bool newval);
2768 //bool xccdf_rule_set_selector(struct xccdf_rule *item, const char * selector);
2770 bool xccdf_rule_set_impact_metric(struct xccdf_rule *item, const char *newval);
2772 bool xccdf_rule_set_role(struct xccdf_rule *item, xccdf_role_t newval);
2774 bool xccdf_rule_set_severity(struct xccdf_rule *item, xccdf_level_t newval);
2776 bool xccdf_rule_add_metadata(struct xccdf_rule* item, const char* metadata);
2777
2779 bool xccdf_group_set_id(struct xccdf_group *item, const char *newval);
2781 bool xccdf_group_set_cluster_id(struct xccdf_group *item, const char *newval);
2783 bool xccdf_group_set_extends(struct xccdf_group *item, const char *newval);
2785 bool xccdf_group_set_version(struct xccdf_group *item, const char *newval);
2787 bool xccdf_group_set_version_time(struct xccdf_group *item, const char *newval);
2789 bool xccdf_group_set_version_update(struct xccdf_group *item, const char *newval);
2791 bool xccdf_group_set_abstract(struct xccdf_group *item, bool newval);
2793 bool xccdf_group_set_hidden(struct xccdf_group *item, bool newval);
2795 bool xccdf_group_set_prohibit_changes(struct xccdf_group *item, bool newval);
2797 bool xccdf_group_set_selected(struct xccdf_group *item, bool newval);
2799 bool xccdf_group_add_metadata(struct xccdf_group* item, const char* metadata);
2800
2802 bool xccdf_value_set_id(struct xccdf_value *item, const char *newval);
2804 bool xccdf_value_set_cluster_id(struct xccdf_value *item, const char *newval);
2806 bool xccdf_value_set_extends(struct xccdf_value *item, const char *newval);
2808 bool xccdf_value_set_version(struct xccdf_value *item, const char *newval);
2810 bool xccdf_value_set_version_time(struct xccdf_value *item, const char *newval);
2812 bool xccdf_value_set_version_update(struct xccdf_value *item, const char *newval);
2814 bool xccdf_value_set_abstract(struct xccdf_value *item, bool newval);
2816 bool xccdf_value_set_hidden(struct xccdf_value *item, bool newval);
2818 bool xccdf_value_set_multiple(struct xccdf_value *item, bool newval);
2820 bool xccdf_value_set_prohibit_changes(struct xccdf_value *item, bool newval);
2822 bool xccdf_value_set_oper(struct xccdf_value * item, xccdf_operator_t oper);
2824 bool xccdf_value_set_interactive(struct xccdf_value *item, bool newval);
2826 bool xccdf_value_add_metadata(struct xccdf_value* item, const char* metadata);
2827
2829 bool xccdf_status_set_date(struct xccdf_status *obj, time_t newval);
2831 bool xccdf_status_set_status(struct xccdf_status *obj, xccdf_status_type_t newval);
2832
2834 bool xccdf_notice_set_id(struct xccdf_notice *obj, const char *newval);
2836 bool xccdf_notice_set_text(struct xccdf_notice *obj, struct oscap_text *newval);
2837
2839 bool xccdf_model_set_system(struct xccdf_model *obj, const char *newval);
2840
2842 bool xccdf_check_set_id(struct xccdf_check *obj, const char *newval);
2844 bool xccdf_check_set_system(struct xccdf_check *obj, const char *newval);
2846 bool xccdf_check_set_selector(struct xccdf_check *obj, const char *newval);
2848 bool xccdf_check_set_content(struct xccdf_check *obj, const char *newval);
2850 bool xccdf_check_set_oper(struct xccdf_check *obj, xccdf_bool_operator_t newval);
2852 bool xccdf_check_set_multicheck(struct xccdf_check *obj, bool newval);
2854 bool xccdf_check_set_negate(struct xccdf_check *obj, bool newval);
2855
2857 bool xccdf_check_content_ref_set_name(struct xccdf_check_content_ref *obj, const char *newval);
2859 bool xccdf_check_content_ref_set_href(struct xccdf_check_content_ref *obj, const char *newval);
2860
2862 bool xccdf_profile_note_set_reftag(struct xccdf_profile_note *obj, const char *newval);
2864 bool xccdf_profile_note_set_text(struct xccdf_profile_note *obj, struct oscap_text *newval);
2865
2867 bool xccdf_check_import_set_name(struct xccdf_check_import *obj, const char *newval);
2869 bool xccdf_check_import_set_xpath(struct xccdf_check_import *obj, const char *newval);
2871 bool xccdf_check_import_set_content(struct xccdf_check_import *obj, const char *newval);
2872
2874 bool xccdf_check_export_set_name(struct xccdf_check_export *obj, const char *newval);
2876 bool xccdf_check_export_set_value(struct xccdf_check_export *obj, const char *newval);
2877
2879 bool xccdf_fix_set_strategy(struct xccdf_fix *obj, xccdf_strategy_t newval);
2881 bool xccdf_fix_set_disruption(struct xccdf_fix *obj, xccdf_level_t newval);
2883 bool xccdf_fix_set_complexity(struct xccdf_fix *obj, xccdf_level_t newval);
2885 bool xccdf_fix_set_reboot(struct xccdf_fix *obj, bool newval);
2887 bool xccdf_fix_set_content(struct xccdf_fix *obj, const char *newval);
2889 bool xccdf_fix_set_system(struct xccdf_fix *obj, const char *newval);
2891 bool xccdf_fix_set_platform(struct xccdf_fix *obj, const char *newval);
2893 bool xccdf_fix_set_id(struct xccdf_fix *obj, const char *newval);
2894
2896 bool xccdf_fixtext_set_strategy(struct xccdf_fixtext *obj, xccdf_strategy_t newval);
2898 bool xccdf_fixtext_set_disruption(struct xccdf_fixtext *obj, xccdf_level_t newval);
2900 bool xccdf_fixtext_set_complexity(struct xccdf_fixtext *obj, xccdf_level_t newval);
2902 bool xccdf_fixtext_set_reboot(struct xccdf_fixtext *obj, bool newval);
2904 bool xccdf_fixtext_set_text(struct xccdf_fixtext *obj, struct oscap_text *newval);
2906 bool xccdf_fixtext_set_fixref(struct xccdf_fixtext *obj, const char *newval);
2907
2909 bool xccdf_select_set_item(struct xccdf_select *obj, const char *newval);
2911 bool xccdf_select_set_selected(struct xccdf_select *obj, bool newval);
2912
2914 bool xccdf_warning_set_category(struct xccdf_warning *obj, xccdf_warning_category_t newval);
2916 bool xccdf_warning_set_text(struct xccdf_warning *obj, struct oscap_text *newval);
2918 struct xccdf_refine_rule *xccdf_refine_rule_new(void);
2919
2921 struct xccdf_refine_rule * xccdf_refine_rule_clone(const struct xccdf_refine_rule * old_rule);
2923 bool xccdf_refine_rule_set_item(struct xccdf_refine_rule *obj, const char *newval);
2925 bool xccdf_refine_rule_set_selector(struct xccdf_refine_rule *obj, const char *newval);
2927 bool xccdf_refine_rule_set_role(struct xccdf_refine_rule *obj, xccdf_role_t newval);
2929 bool xccdf_refine_rule_set_severity(struct xccdf_refine_rule *obj, xccdf_level_t newval);
2931 bool xccdf_refine_rule_set_weight(struct xccdf_refine_rule *obj, xccdf_numeric newval);
2932
2934 struct xccdf_refine_value *xccdf_refine_value_new(void);
2936 struct xccdf_refine_value * xccdf_refine_value_clone(const struct xccdf_refine_value * old_value);
2938 bool xccdf_refine_value_set_item(struct xccdf_refine_value *obj, const char *newval);
2940 bool xccdf_refine_value_set_selector(struct xccdf_refine_value *obj, const char *newval);
2942 bool xccdf_refine_value_set_oper(struct xccdf_refine_value *obj, xccdf_operator_t newval);
2943
2945 struct xccdf_setvalue *xccdf_setvalue_new(void);
2947 struct xccdf_setvalue * xccdf_setvalue_clone(const struct xccdf_setvalue * old_value);
2949 bool xccdf_setvalue_set_item(struct xccdf_setvalue *obj, const char *newval);
2951 bool xccdf_setvalue_set_value(struct xccdf_setvalue *obj, const char *newval);
2953 bool xccdf_plain_text_set_id(struct xccdf_plain_text *obj, const char *newval);
2955 bool xccdf_plain_text_set_text(struct xccdf_plain_text *obj, const char *newval);
2956
2958 bool xccdf_result_set_id(struct xccdf_result *item, const char *newval);
2960 bool xccdf_result_set_test_system(struct xccdf_result *item, const char *newval);
2962 bool xccdf_result_set_benchmark_uri(struct xccdf_result *item, const char *newval);
2964 bool xccdf_result_set_profile(struct xccdf_result *item, const char *newval);
2966 bool xccdf_result_set_start_time(struct xccdf_result *item, const char *newval);
2968 bool xccdf_result_set_end_time(struct xccdf_result *item, const char *newval);
2970 bool xccdf_result_set_version(struct xccdf_result *item, const char *newval);
2972 bool xccdf_result_add_metadata(struct xccdf_result *item, const char *metadata);
2973
2975 bool xccdf_rule_result_set_time(struct xccdf_rule_result *obj, const char *newval);
2977 bool xccdf_rule_result_set_role(struct xccdf_rule_result *obj, xccdf_role_t newval);
2979 bool xccdf_rule_result_set_weight(struct xccdf_rule_result *obj, float newval);
2981 bool xccdf_rule_result_set_severity(struct xccdf_rule_result *obj, xccdf_level_t newval);
2983 bool xccdf_rule_result_set_result(struct xccdf_rule_result *obj, xccdf_test_result_type_t newval);
2985 bool xccdf_rule_result_set_version(struct xccdf_rule_result *obj, const char *newval);
2987 bool xccdf_rule_result_set_idref(struct xccdf_rule_result *obj, const char *newval);
2988
2990 bool xccdf_identity_set_authenticated(struct xccdf_identity *obj, bool newval);
2992 bool xccdf_identity_set_privileged(struct xccdf_identity *obj, bool newval);
2994 bool xccdf_identity_set_name(struct xccdf_identity *obj, const char *newval);
2995
2997 bool xccdf_score_set_maximum(struct xccdf_score *obj, xccdf_numeric newval);
2999 bool xccdf_score_set_score(struct xccdf_score *obj, xccdf_numeric newval);
3001 bool xccdf_score_set_system(struct xccdf_score *obj, const char *newval);
3002
3004 bool xccdf_override_set_time(struct xccdf_override *obj, const char *newval);
3006 bool xccdf_override_set_new_result(struct xccdf_override *obj, xccdf_test_result_type_t newval);
3008 bool xccdf_override_set_old_result(struct xccdf_override *obj, xccdf_test_result_type_t newval);
3010 bool xccdf_override_set_authority(struct xccdf_override *obj, const char *newval);
3012 bool xccdf_override_set_remark(struct xccdf_override *obj, struct oscap_text *newval);
3013
3015 bool xccdf_message_set_severity(struct xccdf_message *obj, xccdf_message_severity_t newval);
3017 bool xccdf_message_set_content(struct xccdf_message *obj, const char *newval);
3018
3020 bool xccdf_target_fact_set_string(struct xccdf_target_fact *fact, const char *str);
3022 bool xccdf_target_fact_set_number(struct xccdf_target_fact *fact, xccdf_numeric val);
3024 bool xccdf_target_fact_set_boolean(struct xccdf_target_fact *fact, bool val);
3026 bool xccdf_target_fact_set_name(struct xccdf_target_fact *obj, const char *newval);
3027
3029 bool xccdf_target_identifier_set_xml_node(struct xccdf_target_identifier *ti, void* node);
3031 bool xccdf_target_identifier_set_system(struct xccdf_target_identifier *ti, const char *newval);
3033 bool xccdf_target_identifier_set_href(struct xccdf_target_identifier *ti, const char *newval);
3035 bool xccdf_target_identifier_set_name(struct xccdf_target_identifier *ti, const char *newval);
3036
3038 bool xccdf_instance_set_context(struct xccdf_instance *obj, const char *newval);
3040 bool xccdf_instance_set_parent_context(struct xccdf_instance *obj, const char *newval);
3042 bool xccdf_instance_set_content(struct xccdf_instance *obj, const char *newval);
3043
3045 bool xccdf_tailoring_set_id(struct xccdf_tailoring *tailoring, const char* newval);
3047 bool xccdf_tailoring_set_version(struct xccdf_tailoring *tailoring, const char* newval);
3049 bool xccdf_tailoring_set_version_update(struct xccdf_tailoring *tailoring, const char *newval);
3051 bool xccdf_tailoring_set_version_time(struct xccdf_tailoring *tailoring, const char *newval);
3053 bool xccdf_tailoring_set_benchmark_ref(struct xccdf_tailoring *tailoring, const char *newval);
3055 bool xccdf_tailoring_set_benchmark_ref_version(struct xccdf_tailoring *tailoring, const char *newval);
3056
3058 bool xccdf_tailoring_add_profile(struct xccdf_tailoring *tailoring, struct xccdf_profile *profile);
3059
3060 // @memberof xccdf_ident
3061 void xccdf_ident_set_id(struct xccdf_ident * ident, const char *id);
3062 // @memberof xccdf_ident
3063 void xccdf_ident_set_system(struct xccdf_ident * ident, const char *sys);
3064
3066 bool xccdf_benchmark_add_result(struct xccdf_benchmark *bench, struct xccdf_result *result);
3067
3069 bool xccdf_benchmark_add_description(struct xccdf_benchmark *item, struct oscap_text *newval);
3071 bool xccdf_benchmark_add_platform(struct xccdf_benchmark *item, const char *newval);
3073 bool xccdf_benchmark_add_reference(struct xccdf_benchmark *item, struct oscap_reference *newval);
3075 bool xccdf_benchmark_add_status(struct xccdf_benchmark *item, struct xccdf_status *newval);
3077 bool xccdf_benchmark_add_dc_status(struct xccdf_benchmark *item, struct oscap_reference *newval);
3079 bool xccdf_benchmark_add_title(struct xccdf_benchmark *item, struct oscap_text *newval);
3081 bool xccdf_benchmark_add_front_matter(struct xccdf_benchmark *item, struct oscap_text *newval);
3083 //bool xccdf_benchmark_add_item(struct xccdf_benchmark *item, struct xccdf_item *newval);
3085 bool xccdf_benchmark_add_model(struct xccdf_benchmark *item, struct xccdf_model *newval);
3087 bool xccdf_benchmark_add_notice(struct xccdf_benchmark *item, struct xccdf_notice *newval);
3089 bool xccdf_benchmark_add_plain_text(struct xccdf_benchmark *item, struct xccdf_plain_text *newval);
3091 bool xccdf_benchmark_add_profile(struct xccdf_benchmark *item, struct xccdf_profile *newval);
3093 bool xccdf_benchmark_add_rear_matter(struct xccdf_benchmark *item, struct oscap_text *newval);
3095 bool xccdf_benchmark_add_rule(struct xccdf_benchmark *benchmark, struct xccdf_rule *rule);
3097 bool xccdf_benchmark_add_group(struct xccdf_benchmark *benchmark, struct xccdf_group *group);
3099 bool xccdf_benchmark_add_value(struct xccdf_benchmark *benchmark, struct xccdf_value *value);
3101 bool xccdf_benchmark_add_content(struct xccdf_benchmark *bench, struct xccdf_item *item);
3102
3104 bool xccdf_profile_add_select(struct xccdf_profile *item, struct xccdf_select *newval);
3106 bool xccdf_profile_add_setvalue(struct xccdf_profile *item, struct xccdf_setvalue *newval);
3108 bool xccdf_profile_add_refine_value(struct xccdf_profile *item, struct xccdf_refine_value *newval);
3110 bool xccdf_profile_add_refine_rule(struct xccdf_profile *item, struct xccdf_refine_rule *newval);
3111
3113 bool xccdf_profile_add_description(struct xccdf_profile *item, struct oscap_text *newval);
3115 bool xccdf_profile_add_platform(struct xccdf_profile *item, const char *newval);
3117 bool xccdf_profile_add_reference(struct xccdf_profile *item, struct oscap_reference *newval);
3119 bool xccdf_profile_add_status(struct xccdf_profile *item, struct xccdf_status *newval);
3121 bool xccdf_profile_add_dc_status(struct xccdf_profile *item, struct oscap_reference *newval);
3123 bool xccdf_profile_add_title(struct xccdf_profile *item, struct oscap_text *newval);
3124
3126 bool xccdf_rule_add_description(struct xccdf_rule *item, struct oscap_text *newval);
3128 bool xccdf_rule_add_platform(struct xccdf_rule *item, const char *newval);
3130 bool xccdf_rule_add_question(struct xccdf_rule *item, struct oscap_text *newval);
3132 bool xccdf_rule_add_rationale(struct xccdf_rule *item, struct oscap_text *newval);
3134 bool xccdf_rule_add_reference(struct xccdf_rule *item, struct oscap_reference *newval);
3136 bool xccdf_rule_add_status(struct xccdf_rule *item, struct xccdf_status *newval);
3138 bool xccdf_rule_add_dc_status(struct xccdf_rule *item, struct oscap_reference *newval);
3140 bool xccdf_rule_add_title(struct xccdf_rule *item, struct oscap_text *newval);
3142 bool xccdf_rule_add_warning(struct xccdf_rule *item, struct xccdf_warning *newval);
3144 bool xccdf_rule_add_ident(struct xccdf_rule *item, struct xccdf_ident *newval);
3146 bool xccdf_rule_add_check(struct xccdf_rule *item, struct xccdf_check *newval);
3148 bool xccdf_rule_add_profile_note(struct xccdf_rule *item, struct xccdf_profile_note *newval);
3150 bool xccdf_rule_add_fix(struct xccdf_rule *item, struct xccdf_fix *newval);
3152 bool xccdf_rule_add_fixtext(struct xccdf_rule *item, struct xccdf_fixtext *newval);
3153
3155 bool xccdf_group_add_description(struct xccdf_group *item, struct oscap_text *newval);
3157 bool xccdf_group_add_platform(struct xccdf_group *item, const char *newval);
3159 bool xccdf_group_add_question(struct xccdf_group *item, struct oscap_text *newval);
3161 bool xccdf_group_add_rationale(struct xccdf_group *item, struct oscap_text *newval);
3163 bool xccdf_group_add_reference(struct xccdf_group *item, struct oscap_reference *newval);
3165 bool xccdf_group_add_status(struct xccdf_group *item, struct xccdf_status *newval);
3167 bool xccdf_group_add_dc_status(struct xccdf_group *item, struct oscap_reference *newval);
3169 bool xccdf_group_add_title(struct xccdf_group *item, struct oscap_text *newval);
3171 bool xccdf_group_add_warning(struct xccdf_group *item, struct xccdf_warning *newval);
3173 bool xccdf_group_add_rule(struct xccdf_group *group, struct xccdf_rule *item);
3175 bool xccdf_group_add_group(struct xccdf_group *group, struct xccdf_group *item);
3177 bool xccdf_group_add_value(struct xccdf_group *group, struct xccdf_value *item);
3179 bool xccdf_group_add_content(struct xccdf_group *rule, struct xccdf_item *item);
3180
3182 bool xccdf_value_add_description(struct xccdf_value *item, struct oscap_text *newval);
3184 bool xccdf_value_add_question(struct xccdf_value *item, struct oscap_text *newval);
3186 bool xccdf_value_add_reference(struct xccdf_value *item, struct oscap_reference *newval);
3188 bool xccdf_value_add_status(struct xccdf_value *item, struct xccdf_status *newval);
3190 bool xccdf_value_add_dc_status(struct xccdf_value *item, struct oscap_reference *newval);
3192 bool xccdf_value_add_title(struct xccdf_value *item, struct oscap_text *newval);
3194 bool xccdf_value_add_warning(struct xccdf_value *item, struct xccdf_warning *newval);
3195
3197 bool xccdf_check_add_import(struct xccdf_check *obj, struct xccdf_check_import *item);
3199 bool xccdf_check_add_export(struct xccdf_check *obj, struct xccdf_check_export *item);
3201 bool xccdf_check_add_content_ref(struct xccdf_check *obj, struct xccdf_check_content_ref *item);
3203 bool xccdf_check_add_child(struct xccdf_check *obj, struct xccdf_check *item);
3205 bool xccdf_select_add_remark(struct xccdf_select *obj, struct oscap_text *item);
3207 bool xccdf_refine_value_add_remark(struct xccdf_refine_value *obj, struct oscap_text *item);
3209 bool xccdf_result_add_rule_result(struct xccdf_result *item, struct xccdf_rule_result *newval);
3211 bool xccdf_result_add_setvalue(struct xccdf_result *item, struct xccdf_setvalue *newval);
3213 bool xccdf_result_add_target_fact(struct xccdf_result *item, struct xccdf_target_fact *newval);
3215 bool xccdf_result_add_target_identifier(struct xccdf_result *item, struct xccdf_target_identifier *newval);
3217 bool xccdf_result_add_remark(struct xccdf_result *item, struct oscap_text *newval);
3219 bool xccdf_result_add_organization(struct xccdf_result *item, const char *newval);
3221 bool xccdf_result_add_target(struct xccdf_result *item, const char *newval);
3223 bool xccdf_result_add_identity(struct xccdf_result *item, struct xccdf_identity *newval);
3225 bool xccdf_result_add_score(struct xccdf_result *item, struct xccdf_score *newval);
3227 bool xccdf_result_add_title(struct xccdf_result *item, struct oscap_text *newval);
3229 bool xccdf_result_add_target_address(struct xccdf_result *item, const char *newval);
3231 bool xccdf_rule_result_add_ident(struct xccdf_rule_result *obj, struct xccdf_ident *item);
3233 bool xccdf_rule_result_add_fix(struct xccdf_rule_result *obj, struct xccdf_fix *item);
3235 bool xccdf_rule_result_add_check(struct xccdf_rule_result *obj, struct xccdf_check *item);
3237 bool xccdf_rule_result_add_override(struct xccdf_rule_result *obj, struct xccdf_override *item);
3239 bool xccdf_rule_result_add_message(struct xccdf_rule_result *obj, struct xccdf_message *item);
3241 bool xccdf_rule_result_add_instance(struct xccdf_rule_result *obj, struct xccdf_instance *item);
3243 bool xccdf_item_add_description(struct xccdf_item *item, struct oscap_text *newval);
3245 bool xccdf_item_add_platform(struct xccdf_item *item, const char *newval);
3247 bool xccdf_item_add_question(struct xccdf_item *item, struct oscap_text *newval);
3249 bool xccdf_item_add_rationale(struct xccdf_item *item, struct oscap_text *newval);
3251 bool xccdf_item_add_reference(struct xccdf_item *item, struct oscap_reference *newval);
3253 bool xccdf_item_add_dc_status(struct xccdf_item *item, struct oscap_reference *newval);
3255 bool xccdf_item_add_status(struct xccdf_item *item, struct xccdf_status *newval);
3257 bool xccdf_item_add_title(struct xccdf_item *item, struct oscap_text *newval);
3259 bool xccdf_item_add_warning(struct xccdf_item *item, struct xccdf_warning *newval);
3261 bool xccdf_refine_rule_add_remark(struct xccdf_refine_rule *obj, struct oscap_text *item);
3262
3264 bool xccdf_rule_add_requires(struct xccdf_rule *rule, struct oscap_stringlist *requires);
3266 bool xccdf_group_add_requires(struct xccdf_group *group, struct oscap_stringlist *requires);
3268 bool xccdf_item_add_requires(struct xccdf_item *item, struct oscap_stringlist *requires);
3270 bool xccdf_rule_add_conflicts(struct xccdf_rule *rule, const char *conflicts);
3272 bool xccdf_group_add_conflicts(struct xccdf_group *group, const char *conflicts);
3274 bool xccdf_item_add_conflicts(struct xccdf_item *item, const char *conflicts);
3275
3276 /************************************************************
3277 ** @} End of Setters group */
3278
3279 // remove operations
3280
3282 void xccdf_notice_iterator_remove(struct xccdf_notice_iterator *it);
3284 void xccdf_model_iterator_remove(struct xccdf_model_iterator *it);
3286 void xccdf_profile_iterator_remove(struct xccdf_profile_iterator *it);
3288 void xccdf_item_iterator_remove(struct xccdf_item_iterator *it);
3290 void xccdf_status_iterator_remove(struct xccdf_status_iterator *it);
3292 void xccdf_profile_note_iterator_remove(struct xccdf_profile_note_iterator *it);
3294 void xccdf_refine_value_iterator_remove(struct xccdf_refine_value_iterator *it);
3296 void xccdf_refine_rule_iterator_remove(struct xccdf_refine_rule_iterator *it);
3298 void xccdf_setvalue_iterator_remove(struct xccdf_setvalue_iterator *it);
3300 void xccdf_select_iterator_remove(struct xccdf_select_iterator *it);
3302 void xccdf_ident_iterator_remove(struct xccdf_ident_iterator *it);
3304 void xccdf_check_content_ref_iterator_remove(struct xccdf_check_content_ref_iterator *it);
3306 void xccdf_check_export_iterator_remove(struct xccdf_check_export_iterator *it);
3308 void xccdf_check_import_iterator_remove(struct xccdf_check_import_iterator *it);
3310 void xccdf_check_iterator_remove(struct xccdf_check_iterator *it);
3312 void xccdf_fixtext_iterator_remove(struct xccdf_fixtext_iterator *it);
3314 void xccdf_fix_iterator_remove(struct xccdf_fix_iterator *it);
3316 void xccdf_value_iterator_remove(struct xccdf_value_iterator *it);
3318 void xccdf_plain_text_iterator_remove(struct xccdf_plain_text_iterator *it);
3320 void xccdf_warning_iterator_remove(struct xccdf_warning_iterator *it);
3322 void xccdf_result_iterator_remove(struct xccdf_result_iterator *it);
3324 void xccdf_override_iterator_remove(struct xccdf_override_iterator *it);
3326 void xccdf_message_iterator_remove(struct xccdf_message_iterator *it);
3328 void xccdf_instance_iterator_remove(struct xccdf_instance_iterator *it);
3330 void xccdf_rule_result_iterator_remove(struct xccdf_rule_result_iterator *it);
3332 void xccdf_identity_iterator_remove(struct xccdf_identity_iterator *it);
3334 void xccdf_score_iterator_remove(struct xccdf_score_iterator *it);
3336 void xccdf_target_fact_iterator_remove(struct xccdf_target_fact_iterator *it);
3338 void xccdf_target_identifier_iterator_remove(struct xccdf_target_identifier_iterator *it);
3340 void xccdf_value_instance_iterator_remove(struct xccdf_value_instance_iterator *it);
3341
3342
3343 // textual substitution interface
3344
3350 typedef enum xccdf_subst_type {
3351 XCCDF_SUBST_NONE,
3352 XCCDF_SUBST_SUB,
3353 XCCDF_SUBST_LINK,
3354 XCCDF_SUBST_INSTANCE
3355 } xccdf_subst_type_t;
3356
3367 typedef char*(*xccdf_substitution_func)(xccdf_subst_type_t type, const char *id, void *arg);
3368
3369
3380 OSCAP_DEPRECATED(char* oscap_text_xccdf_substitute(const char *text, xccdf_substitution_func cb, void *arg));
3381
3382 /************************************************************/
3384
3385
3386 #endif