Debian Codegraph @

src/OVAL/public/oval_system_characteristics.h

raw symbols SCIP
1 /**
2 * @addtogroup OVAL
3 * @{
4 * @addtogroup OVALSYS
5 * Interface for System Characteristics model.
6 * @{
7 *
8 * Class diagram
9 * \image html system_characteristic.png
10 *
11 * @file
12 *
13 * @author "David Niemoller" <[email protected]>
14 */
15
16 /*
17 * Copyright 2009--2014 Red Hat Inc., Durham, North Carolina.
18 * All Rights Reserved.
19 *
20 * This library is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU Lesser General Public
22 * License as published by the Free Software Foundation; either
23 * version 2.1 of the License, or (at your option) any later version.
24 *
25 * This library is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28 * Lesser General Public License for more details.
29 *
30 * You should have received a copy of the GNU Lesser General Public
31 * License along with this library; if not, write to the Free Software
32 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33 *
34 * Authors:
35 * "David Niemoller" <[email protected]>
36 * Šimon Lukašík
37 */
38
39
40 #ifndef OVAL_SYSTEM_CHARACTERISTICS
41 #define OVAL_SYSTEM_CHARACTERISTICS
42
43 #include "oscap.h"
44 #include "oscap_source.h"
45 #include "oval_types.h"
46 #include "oval_definitions.h"
47 #include "oscap_export.h"
48
49 /// System characteristics result flag
50 typedef enum {
51 SYSCHAR_FLAG_UNKNOWN = 0,
52 SYSCHAR_FLAG_ERROR = 1,
53 SYSCHAR_FLAG_COMPLETE = 2,
54 SYSCHAR_FLAG_INCOMPLETE = 3,
55 SYSCHAR_FLAG_DOES_NOT_EXIST = 4,
56 SYSCHAR_FLAG_NOT_COLLECTED = 5,
57 SYSCHAR_FLAG_NOT_APPLICABLE = 6
58 } oval_syschar_collection_flag_t;
59
60 /// System characteristics status
61 typedef enum {
62 SYSCHAR_STATUS_UNKNOWN = 0,
63 SYSCHAR_STATUS_ERROR = 1,
64 SYSCHAR_STATUS_EXISTS = 2,
65 SYSCHAR_STATUS_DOES_NOT_EXIST = 3,
66 SYSCHAR_STATUS_NOT_COLLECTED = 4
67 } oval_syschar_status_t;
68
69 /// Message level.
70 typedef enum {
71 OVAL_MESSAGE_LEVEL_NONE = 0,
72 OVAL_MESSAGE_LEVEL_DEBUG = 1,
73 OVAL_MESSAGE_LEVEL_INFO = 2,
74 OVAL_MESSAGE_LEVEL_WARNING = 3,
75 OVAL_MESSAGE_LEVEL_ERROR = 4,
76 OVAL_MESSAGE_LEVEL_FATAL = 5
77 } oval_message_level_t;
78
79 OSCAP_API const char *oval_syschar_collection_flag_get_text(oval_syschar_collection_flag_t flag);
80 OSCAP_API const char *oval_syschar_status_get_text(oval_syschar_status_t status);
81 OSCAP_API const char *oval_message_level_text(oval_message_level_t);
82
83
84
85
86
87
88 /**
89 * @struct oval_syschar_model
90 * OVAL System Characteristics model.
91 * Object model holds OVAL system characteristics
92 * structure instances.
93 */
94 struct oval_syschar_model;
95
96 /**
97 * @struct oval_sysinfo
98 * General instrumented host description.
99 * Instances of Oval_sysinfo specify general information about instrumented host systems,
100 * including information that can be used to identify the system.
101 */
102 struct oval_sysinfo;
103 /**
104 * @struct oval_sysinfo_iterator
105 */
106 struct oval_sysinfo_iterator;
107
108 /**
109 * @struct oval_syschar
110 * Characteristics bound to an @ref Oval_object.
111 * Instances of Oval_syschar provide relate an Oval_object and @ref Oval_sysitem instances.
112 *
113 * If an OVAL Object does not exist on the system, then an object is still provided but with the flag attribute set to 'does not exist'
114 * and with no reference child elements. This shows that the object was looked for but not found on the system.
115 * If no object element is written in this case, users of the system characteristics file will not know whether
116 * the object was not found or no attempt was made to collect it.
117 *
118 * The flag attribute holds information regarding the outcome of the data collection.
119 * For example, if there was an error looking for items that match the object specification,
120 * then the flag would be 'error'. Please refer to the description of FlagEnumeration for details about the different flag values.
121 */
122 struct oval_syschar;
123 /**
124 * @struct oval_syschar_iterator
125 * @see oval_syschar_model_get_syschars
126 */
127 struct oval_syschar_iterator;
128
129 /**
130 * @struct oval_sysint
131 * Network interface description.
132 * Instances of Oval_sysint are used to describe existing network interfaces on the system.
133 * This information can help identify a specific system on a given network. *
134 */
135 struct oval_sysint;
136 /**
137 * @struct oval_sysint_iterator
138 * @see oval_sysinfo_get_interfaces
139 */
140 struct oval_sysint_iterator;
141
142 /**
143 * @struct oval_sysitem
144 * Each instance of Oval_sysitem represents one item.
145 * An item might be a file, a rpm, a process, etc.
146 * This element is extended by the different component schemas through substitution groups.
147 * Each item represents a unique instance of an object as specified by an OVAL Object.
148 * For example, a single file or a single user. Each item my be referenced by more than one object in
149 * the collected object section. Please refer to the description of ItemType for more details about the information stored in items.
150 */
151 struct oval_sysitem;
152 /**
153 * @struct oval_sysitem_iterator
154 * @see: oval_syschar_get_sysitem
155 */
156 struct oval_sysitem_iterator;
157
158 /**
159 * @struct oval_sysent
160 */
161 struct oval_sysent;
162 /**
163 * @struct oval_sysent_iterator
164 * @see: oval_sysitem_get_sysents
165 */
166 struct oval_sysent_iterator;
167
168 /**
169 * @struct oval_message
170 * OVAL message
171 */
172 struct oval_message;
173 /**
174 * @struct oval_message_iterator
175 */
176 struct oval_message_iterator;
177
178 /**
179 * @struct oval_variable_binding
180 * Binding of an value to an OVAL variable.
181 */
182 struct oval_variable_binding;
183 /**
184 * @struct oval_variable_binding_iterator
185 */
186 struct oval_variable_binding_iterator;
187
188
189
190
191
192 /**
193 * Create new oval_syschar_model.
194 * The new model is bound to a specified oval_definition_model and variable bindings.
195 * @param definition_model the specified oval_definition_model.
196 * @memberof oval_syschar_model
197 */
198 OSCAP_API struct oval_syschar_model *oval_syschar_model_new(struct oval_definition_model *definition_model);
199
200 /**
201 * Import the content from the oscap_source into an oval_syschar_model.
202 * If imported content specifies a model entity that is already registered within the model its content is overwritten.
203 * @param model the merge target model
204 * @param source The oscap_source to import data from.
205 * @return zero on success or non zero value if an error occurred
206 * @memberof oval_syschar_model
207 */
208 OSCAP_API int oval_syschar_model_import_source(struct oval_syschar_model *model, struct oscap_source *source);
209
210 /**
211 * Copy an oval_syschar_model.
212 * @return A copy of the specified @ref oval_syschar_model.
213 * @memberof oval_syschar_model
214 */
215 OSCAP_API struct oval_syschar_model *oval_syschar_model_clone(struct oval_syschar_model *);
216 /**
217 * Export system characteristics into file.
218 * @memberof oval_syschar_model
219 */
220 OSCAP_API int oval_syschar_model_export(struct oval_syschar_model *, const char *file);
221 /**
222 * Free memory allocated to a specified syschar model.
223 * @param model the specified syschar model
224 * @memberof oval_syschar_model
225 */
226 OSCAP_API void oval_syschar_model_free(struct oval_syschar_model *model);
227
228 /**
229 * @name Setters
230 * @{
231 */
232 OSCAP_API void oval_syschar_model_set_generator(struct oval_syschar_model *model, struct oval_generator *generator);
233 /**
234 * Bind a variable model to the definitions bound to the syschar model.
235 * @return zero on success or non zero value if an error occurred
236 * @memberof oval_syschar_model
237 */
238 OSCAP_API int oval_syschar_model_bind_variable_model(struct oval_syschar_model *, struct oval_variable_model *);
239 /**
240 * @memberof oval_syschar_model
241 */
242 OSCAP_API void oval_syschar_model_set_sysinfo(struct oval_syschar_model *model, struct oval_sysinfo *sysinfo);
243 /** @} */
244
245 /**
246 * @name Getters
247 * @{
248 */
249 OSCAP_API struct oval_generator *oval_syschar_model_get_generator(struct oval_syschar_model *model);
250 /**
251 * Return related oval_definition_model from an oval_syschar_model.
252 * @param model the specified oval_syschar_model.
253 * @memberof oval_syschar_model
254 */
255 OSCAP_API struct oval_definition_model *oval_syschar_model_get_definition_model(struct oval_syschar_model *model);
256 /**
257 * Return an iterator over the oval_sychar objects persisted by this model.
258 * @param model the specified oval_syschar_model.
259 * @memberof oval_syschar_model
260 */
261 OSCAP_API struct oval_syschar_iterator *oval_syschar_model_get_syschars(struct oval_syschar_model *model);
262 /**
263 * Return default sysinfo bound to syschar model.
264 * @param model the specified oval_syschar_model.
265 * @memberof oval_syschar_model
266 */
267 OSCAP_API struct oval_sysinfo *oval_syschar_model_get_sysinfo(struct oval_syschar_model *model);
268 /**
269 * Return the oval_syschar bound to a specified object_id.
270 * Returns NULL if the object_id does not resolve to an oval_object in the bound oval_definition_model.
271 * @param model the queried oval_syschar_model.
272 * @param object_id the specified object_id.
273 * @memberof oval_syschar_model
274 */
275 OSCAP_API struct oval_syschar *oval_syschar_model_get_syschar(struct oval_syschar_model *model, const char *object_id);
276 /**
277 * Get the oval_values bound to a specified variable.
278 * @memberof oval_syschar_model
279 */
280 OSCAP_API int oval_syschar_model_compute_variable(struct oval_syschar_model *, struct oval_variable *);
281 OSCAP_API oval_syschar_collection_flag_t oval_variable_get_collection_flag(struct oval_variable *);
282 /**
283 * @memberof oval_syschar_model
284 */
285 OSCAP_API struct oval_sysitem *oval_syschar_model_get_sysitem(struct oval_syschar_model *, const char *);
286 /** @} */
287
288 /**
289 * @name Evaluators
290 * @{
291 */
292 /** @} */
293
294
295
296
297
298
299 /**
300 * @memberof oval_sysinfo
301 */
302 OSCAP_API struct oval_sysinfo *oval_sysinfo_new(struct oval_syschar_model *);
303 /**
304 * @return A copy of the specified @ref oval_sysinfo.
305 * @memberof oval_sysinfo
306 */
307 OSCAP_API struct oval_sysinfo *oval_sysinfo_clone(struct oval_syschar_model *new_model, struct oval_sysinfo *old_sysinfo);
308 /**
309 * @memberof oval_sysinfo
310 */
311 OSCAP_API void oval_sysinfo_free(struct oval_sysinfo *);
312
313 /**
314 * @name Setters
315 * @{
316 */
317 /**
318 * @memberof oval_sysinfo
319 */
320 OSCAP_API void oval_sysinfo_set_os_name(struct oval_sysinfo *, char *);
321 /**
322 * @memberof oval_sysinfo
323 */
324 OSCAP_API void oval_sysinfo_set_os_version(struct oval_sysinfo *, char *);
325 /**
326 * @memberof oval_sysinfo
327 */
328 OSCAP_API void oval_sysinfo_set_os_architecture(struct oval_sysinfo *, char *);
329 /**
330 * @memberof oval_sysinfo
331 */
332 OSCAP_API void oval_sysinfo_set_primary_host_name(struct oval_sysinfo *, char *);
333 /**
334 * @memberof oval_sysinfo
335 */
336 OSCAP_API void oval_sysinfo_add_interface(struct oval_sysinfo *, struct oval_sysint *);
337 /** @} */
338
339 /**
340 * @name Getters
341 * @{
342 */
343 /**
344 * Get operating system name.
345 * @memberof oval_sysinfo
346 */
347 OSCAP_API char *oval_sysinfo_get_os_name(struct oval_sysinfo *);
348
349 /**
350 * Get operating system version.
351 * @memberof oval_sysinfo
352 */
353 OSCAP_API char *oval_sysinfo_get_os_version(struct oval_sysinfo *);
354
355 /**
356 * Get operating system architecture.
357 * @memberof oval_sysinfo
358 */
359 OSCAP_API char *oval_sysinfo_get_os_architecture(struct oval_sysinfo *);
360
361 /**
362 * Get primary host name of the tested machine.
363 * @memberof oval_sysinfo
364 */
365 OSCAP_API char *oval_sysinfo_get_primary_host_name(struct oval_sysinfo *);
366
367 /**
368 * Get an iterator to the list of network interfaces.
369 * @memberof oval_sysinfo
370 */
371 OSCAP_API struct oval_sysint_iterator *oval_sysinfo_get_interfaces(struct oval_sysinfo *);
372 /** @} */
373
374 /**
375 * @name Iterators
376 * @{
377 */
378 /**
379 * @memberof oval_sysinfo_iterator
380 */
381 OSCAP_API bool oval_sysinfo_iterator_has_more(struct oval_sysinfo_iterator *);
382 /**
383 * @memberof oval_sysinfo_iterator
384 */
385 OSCAP_API struct oval_sysinfo *oval_sysinfo_iterator_next(struct oval_sysinfo_iterator *);
386 /**
387 * @memberof oval_sysinfo_iterator
388 */
389 OSCAP_API void oval_sysinfo_iterator_free(struct oval_sysinfo_iterator *);
390 /** @} */
391
392 /**
393 * @name Evaluators
394 * @{
395 */
396 /** @} */
397
398
399
400
401
402
403 /**
404 * @memberof oval_syschar
405 */
406 OSCAP_API struct oval_syschar *oval_syschar_new(struct oval_syschar_model *, struct oval_object *);
407 /**
408 * @return A copy of the specified @ref oval_syschar.
409 * @memberof oval_syschar
410 */
411 OSCAP_API struct oval_syschar *oval_syschar_clone(struct oval_syschar_model *new_model, struct oval_syschar *old_syschar);
412 /**
413 * @memberof oval_syschar
414 */
415 OSCAP_API void oval_syschar_free(struct oval_syschar *);
416
417 /**
418 * @name Setters
419 * @{
420 */
421 /**
422 * @memberof oval_syschar
423 */
424 OSCAP_API void oval_syschar_add_variable_binding(struct oval_syschar *, struct oval_variable_binding *);
425 /**
426 * @memberof oval_syschar
427 */
428 OSCAP_API void oval_syschar_set_flag(struct oval_syschar *model, oval_syschar_collection_flag_t flag);
429 /**
430 * @memberof oval_syschar
431 */
432 OSCAP_API void oval_syschar_set_object(struct oval_syschar *, struct oval_object *);
433 /**
434 * Gets the variable_instance attribute of the syschar.
435 * @memberof oval_syschar
436 * @returns currect variable_instance attribute assigned
437 */
438 OSCAP_API int oval_syschar_get_variable_instance(const struct oval_syschar *syschar);
439 /**
440 * Sets the variable_instance attribute of the syschar.
441 * @memberof oval_syschar
442 * @param syschar collected object
443 * @param variable_instance_in new settings of variable_instance attribute
444 */
445 OSCAP_API void oval_syschar_set_variable_instance(struct oval_syschar *syschar, int variable_instance_in);
446 /**
447 * @memberof oval_syschar
448 */
449 OSCAP_API void oval_syschar_add_sysitem(struct oval_syschar *, struct oval_sysitem *);
450 /**
451 * @memberof oval_syschar
452 */
453 OSCAP_API void oval_syschar_add_message(struct oval_syschar *syschar, struct oval_message *message);
454 /**
455 * @memberof oval_syschar
456 */
457 OSCAP_API void oval_syschar_add_new_message(struct oval_syschar *syschar, char *text, oval_message_level_t level);
458 /** @} */
459
460 /**
461 * @name Getters
462 * @{
463 */
464 /**
465 * Get system characteristic flag.
466 * @memberof oval_syschar
467 */
468 OSCAP_API oval_syschar_collection_flag_t oval_syschar_get_flag(struct oval_syschar *);
469
470 /**
471 * Get messages bound to this system characteristic.
472 * @memberof oval_syschar
473 */
474 OSCAP_API struct oval_message_iterator *oval_syschar_get_messages(struct oval_syschar *);
475
476 /**
477 * Get object associated with this system characteristic.
478 * @memberof oval_syschar
479 */
480 OSCAP_API struct oval_object *oval_syschar_get_object(struct oval_syschar *);
481
482 /**
483 * Get system characteristic variable bindings.
484 * @memberof oval_syschar
485 */
486 OSCAP_API struct oval_variable_binding_iterator *oval_syschar_get_variable_bindings(struct oval_syschar *);
487
488 /**
489 * Get system characteristic data.
490 * @memberof oval_syschar
491 */
492 OSCAP_API struct oval_sysitem_iterator *oval_syschar_get_sysitem(struct oval_syschar *);
493 /** @} */
494
495 /**
496 * @name Iterators
497 * @{
498 */
499 /**
500 * @memberof oval_syschar_iterator
501 */
502 OSCAP_API bool oval_syschar_iterator_has_more(struct oval_syschar_iterator *);
503 /**
504 * @memberof oval_syschar_iterator
505 */
506 OSCAP_API struct oval_syschar *oval_syschar_iterator_next(struct oval_syschar_iterator *);
507 /**
508 * @memberof oval_syschar_iterator
509 */
510 OSCAP_API void oval_syschar_iterator_free(struct oval_syschar_iterator *);
511 /** @} */
512
513 /**
514 * @name Evaluators
515 * @{
516 */
517 /** @} */
518
519
520
521
522
523
524 /**
525 * @memberof oval_sysint
526 */
527 OSCAP_API struct oval_sysint *oval_sysint_new(struct oval_syschar_model *);
528 /**
529 * @return A copy of the specified @ref oval_sysint.
530 * @memberof oval_sysint
531 */
532 OSCAP_API struct oval_sysint *oval_sysint_clone(struct oval_syschar_model *new_model, struct oval_sysint *old_sysint);
533 /**
534 * @memberof oval_sysint
535 */
536 OSCAP_API void oval_sysint_free(struct oval_sysint *);
537
538 /**
539 * @name Setters
540 * @{
541 */
542 /**
543 * @memberof oval_sysint
544 */
545 OSCAP_API void oval_sysint_set_name(struct oval_sysint *, char *);
546 /**
547 * @memberof oval_sysint
548 */
549 OSCAP_API void oval_sysint_set_ip_address(struct oval_sysint *, char *);
550 /**
551 * @memberof oval_sysint
552 */
553 OSCAP_API void oval_sysint_set_mac_address(struct oval_sysint *, char *);
554 /** @} */
555
556 /**
557 * @name Getters
558 * @{
559 */
560 /**
561 * Get interface name.
562 * @memberof oval_sysint
563 */
564 OSCAP_API char *oval_sysint_get_name(struct oval_sysint *);
565
566 /**
567 * Get interface IP address.
568 * @memberof oval_sysint
569 */
570 OSCAP_API char *oval_sysint_get_ip_address(struct oval_sysint *);
571
572 /**
573 * Get interface MAC address.
574 * @memberof oval_sysint
575 */
576 OSCAP_API char *oval_sysint_get_mac_address(struct oval_sysint *);
577 /** @} */
578
579 /**
580 * @name Iterators
581 * @{
582 */
583 /**
584 * @memberof oval_sysint_iterator
585 */
586 OSCAP_API bool oval_sysint_iterator_has_more(struct oval_sysint_iterator *);
587 /**
588 * @memberof oval_sysint_iterator
589 */
590 OSCAP_API struct oval_sysint *oval_sysint_iterator_next(struct oval_sysint_iterator *);
591 /**
592 * @memberof oval_sysint_iterator
593 */
594 OSCAP_API void oval_sysint_iterator_free(struct oval_sysint_iterator *);
595 /** @} */
596
597 /**
598 * @name Evaluators
599 * @{
600 */
601 /** @} */
602
603
604
605
606
607
608 /**
609 * @memberof oval_sysitem
610 */
611 OSCAP_API struct oval_sysitem *oval_sysitem_new(struct oval_syschar_model *, const char *id);
612 /**
613 * @return A copy of the specified @ref oval_sysitem.
614 * @memberof oval_sysitem
615 */
616 OSCAP_API struct oval_sysitem *oval_sysitem_clone(struct oval_syschar_model *new_model, struct oval_sysitem *old_data);
617 /**
618 * @memberof oval_sysitem
619 */
620 OSCAP_API void oval_sysitem_free(struct oval_sysitem *);
621
622 /**
623 * @name Setters
624 * @{
625 */
626 /**
627 * @memberof oval_sysitem
628 */
629 OSCAP_API void oval_sysitem_set_status(struct oval_sysitem *, oval_syschar_status_t);
630 /**
631 * @memberof oval_sysitem
632 */
633 OSCAP_API void oval_sysitem_set_subtype(struct oval_sysitem *sysitem, oval_subtype_t subtype);
634 /**
635 * @memberof oval_sysitem
636 */
637 OSCAP_API void oval_sysitem_add_message(struct oval_sysitem *, struct oval_message *);
638 /**
639 * @memberof oval_sysitem
640 */
641 OSCAP_API void oval_sysitem_add_sysent(struct oval_sysitem *, struct oval_sysent *);
642 /** @} */
643
644 /**
645 * @name Getters
646 * @{
647 */
648 /**
649 * Get system data ID.
650 * @memberof oval_sysitem
651 */
652 OSCAP_API char *oval_sysitem_get_id(struct oval_sysitem *);
653 /**
654 * Get system data status.
655 * @memberof oval_sysitem
656 */
657 OSCAP_API oval_syschar_status_t oval_sysitem_get_status(struct oval_sysitem *);
658 /**
659 * Get system data individual items.
660 * @memberof oval_sysitem
661 */
662 OSCAP_API struct oval_sysent_iterator *oval_sysitem_get_sysents(struct oval_sysitem *);
663 /**
664 * Get system data message.
665 * @memberof oval_sysitem
666 */
667 OSCAP_API struct oval_message_iterator *oval_sysitem_get_messages(struct oval_sysitem *);
668 /**
669 * Get system data subtype.
670 * @memberof oval_sysitem
671 */
672 OSCAP_API oval_subtype_t oval_sysitem_get_subtype(struct oval_sysitem *);
673 /** @} */
674
675 /**
676 * @name Iterators
677 * @{
678 */
679 /**
680 * @memberof oval_sysitem_iterator
681 */
682 OSCAP_API bool oval_sysitem_iterator_has_more(struct oval_sysitem_iterator *);
683 /**
684 * @memberof oval_sysitem_iterator
685 */
686 OSCAP_API struct oval_sysitem *oval_sysitem_iterator_next(struct oval_sysitem_iterator *);
687 /**
688 * @memberof oval_sysitem_iterator
689 */
690 OSCAP_API void oval_sysitem_iterator_free(struct oval_sysitem_iterator *);
691 /** @} */
692
693 /**
694 * @name Evaluators
695 * @{
696 */
697 /** @} */
698
699
700
701
702
703
704 /**
705 * @memberof oval_sysent
706 */
707 OSCAP_API struct oval_sysent *oval_sysent_new(struct oval_syschar_model *);
708 /**
709 * @return A copy of the specified @ref oval_sysent.
710 * @memberof oval_sysent
711 */
712 OSCAP_API struct oval_sysent *oval_sysent_clone(struct oval_syschar_model *new_model, struct oval_sysent *old_item);
713 /**
714 * @memberof oval_sysent
715 */
716 OSCAP_API void oval_sysent_free(struct oval_sysent *);
717 /**
718 * @name Setters
719 * @{
720 */
721 /**
722 * @memberof oval_sysent
723 */
724 OSCAP_API void oval_sysent_set_name(struct oval_sysent *sysent, char *name);
725 /**
726 * @memberof oval_sysent
727 */
728 OSCAP_API void oval_sysent_set_value(struct oval_sysent *sysent, char *value);
729 /**
730 * @memberof oval_sysent
731 */
732 OSCAP_API void oval_sysent_add_record_field(struct oval_sysent *, struct oval_record_field *);
733 /**
734 * @memberof oval_sysent
735 */
736 OSCAP_API void oval_sysent_set_status(struct oval_sysent *sysent, oval_syschar_status_t status);
737 /**
738 * @memberof oval_sysent
739 */
740 OSCAP_API void oval_sysent_set_datatype(struct oval_sysent *sysent, oval_datatype_t type);
741 /**
742 * @memberof oval_sysent
743 */
744 OSCAP_API void oval_sysent_set_mask(struct oval_sysent *sysent, int mask);
745 /** @} */
746
747 /**
748 * @name Getters
749 * @{
750 */
751 /**
752 * Get system data item name.
753 * @memberof oval_sysent
754 */
755 OSCAP_API char *oval_sysent_get_name(struct oval_sysent *);
756
757 /**
758 * Get system data item value.
759 * @memberof oval_sysent
760 */
761 OSCAP_API char *oval_sysent_get_value(struct oval_sysent *);
762
763 /**
764 * @memberof oval_sysent
765 */
766 OSCAP_API struct oval_record_field_iterator *oval_sysent_get_record_fields(struct oval_sysent *);
767
768 /**
769 * Get system data item status.
770 * @memberof oval_sysent
771 */
772 OSCAP_API oval_syschar_status_t oval_sysent_get_status(struct oval_sysent *);
773
774 /**
775 * Get system data item data type.
776 * @memberof oval_sysent
777 */
778 OSCAP_API oval_datatype_t oval_sysent_get_datatype(struct oval_sysent *);
779
780 /**
781 * Get system data item mask.
782 * @memberof oval_sysent
783 */
784 OSCAP_API int oval_sysent_get_mask(struct oval_sysent *);
785 /** @} */
786
787 /**
788 * @name Iterators
789 * @{
790 */
791 /**
792 * @memberof oval_sysent_iterator
793 */
794 OSCAP_API bool oval_sysent_iterator_has_more(struct oval_sysent_iterator *);
795 /**
796 * @memberof oval_sysent_iterator
797 */
798 OSCAP_API struct oval_sysent *oval_sysent_iterator_next(struct oval_sysent_iterator *);
799 /**
800 * @memberof oval_sysent_iterator
801 */
802 OSCAP_API void oval_sysent_iterator_free(struct oval_sysent_iterator *);
803 /** @} */
804
805 /**
806 * @name Evaluators
807 * @{
808 */
809 /** @} */
810
811 /**
812 * @name Setters
813 * @{
814 */
815 /**
816 * @memberof oval_record_field
817 */
818 OSCAP_API void oval_record_field_set_status(struct oval_record_field *, oval_syschar_status_t);
819 /** @} */
820 /**
821 * @name Getters
822 * @{
823 */
824 /**
825 * @memberof oval_record_field
826 */
827 OSCAP_API oval_syschar_status_t oval_record_field_get_status(struct oval_record_field *);
828 /** @} */
829
830 /**
831 * @memberof oval_message
832 */
833 OSCAP_API struct oval_message *oval_message_new(void);
834 /**
835 * @return A copy of the specified @ref oval_message.
836 * @memberof oval_message
837 */
838 OSCAP_API struct oval_message *oval_message_clone(struct oval_message *old_message);
839 /**
840 * @memberof oval_message
841 */
842 OSCAP_API void oval_message_free(struct oval_message *);
843
844 /**
845 * @name Setters
846 * @{
847 */
848 /**
849 * @memberof oval_message
850 */
851 OSCAP_API void oval_message_set_text(struct oval_message *, char *);
852 /**
853 * @memberof oval_message
854 */
855 OSCAP_API void oval_message_set_level(struct oval_message *, oval_message_level_t);
856 /** @} */
857
858 /**
859 * @name Getters
860 * @{
861 */
862 /**
863 * Get OVAL message text.
864 * @memberof oval_message
865 */
866 OSCAP_API char *oval_message_get_text(struct oval_message *message);
867 /**
868 * Get OVAL message level.
869 * @memberof oval_message
870 */
871 OSCAP_API oval_message_level_t oval_message_get_level(struct oval_message *message);
872 /** @} */
873
874 /**
875 * @name Iterators
876 * @{
877 */
878 /**
879 * @memberof oval_message_iterator
880 */
881 OSCAP_API bool oval_message_iterator_has_more(struct oval_message_iterator *oc_message);
882 /**
883 * @memberof oval_message_iterator
884 */
885 OSCAP_API struct oval_message *oval_message_iterator_next(struct oval_message_iterator *oc_message);
886 /**
887 * @memberof oval_message_iterator
888 */
889 OSCAP_API void oval_message_iterator_free(struct oval_message_iterator *oc_message);
890 /** @} */
891
892
893 /**
894 * @memberof oval_variable_binding
895 */
896 OSCAP_API struct oval_variable_binding *oval_variable_binding_new(struct oval_variable *, char *);
897 /**
898 * @return A copy of the specified @ref oval_variable_binding.
899 * @memberof oval_variable_binding
900 */
901 OSCAP_API struct oval_variable_binding *oval_variable_binding_clone(struct oval_variable_binding *,
902 struct oval_definition_model *);
903 /**
904 * @memberof oval_variable_binding
905 */
906 OSCAP_API void oval_variable_binding_free(struct oval_variable_binding *);
907
908 /**
909 * @name Setters
910 * @{
911 */
912 /**
913 * @memberof oval_variable_binding
914 */
915 OSCAP_API void oval_variable_binding_set_variable(struct oval_variable_binding *, struct oval_variable *);
916 /**
917 * @memberof oval_variable_binding
918 */
919 OSCAP_API void oval_variable_binding_add_value(struct oval_variable_binding *, char *);
920 /** @} */
921
922 /**
923 * @name Getters
924 * @{
925 */
926 /**
927 * Get variable for this binding.
928 * @memberof oval_variable_binding
929 */
930 OSCAP_API struct oval_variable *oval_variable_binding_get_variable(struct oval_variable_binding *);
931 /**
932 * Get value of this binding.
933 * @memberof oval_variable_binding
934 */
935 OSCAP_API struct oval_string_iterator *oval_variable_binding_get_values(struct oval_variable_binding *);
936 /** @} */
937
938 /**
939 * @name Iterators
940 * @{
941 */
942 /**
943 * @memberof oval_variable_binding_iterator
944 */
945 OSCAP_API bool oval_variable_binding_iterator_has_more(struct oval_variable_binding_iterator *);
946 /**
947 * @memberof oval_variable_binding_iterator
948 */
949 OSCAP_API struct oval_variable_binding *oval_variable_binding_iterator_next(struct oval_variable_binding_iterator *);
950 /**
951 * @memberof oval_variable_binding_iterator
952 */
953 OSCAP_API void oval_variable_binding_iterator_free(struct oval_variable_binding_iterator *);
954 /** @} */
955
956 /**
957 * @}END OVALSYS
958 * @}END OVAL
959 */
960 #endif