/usr/include/openscap/oval_results.h is in libopenscap-dev 1.0.9-1+b2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 | /**
* @addtogroup OVAL
* @{
* @addtogroup OVALRES
* Interface for Results model
* @{
*
* Class diagram
* \image html result_model.png
*
* @file
*
* @author "David Niemoller" <David.Niemoller@g2-inc.com>
*
*
*/
/*
* Copyright 2009-2013 Red Hat Inc., Durham, North Carolina.
* All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Authors:
* "David Niemoller" <David.Niemoller@g2-inc.com>
* Šimon Lukašík
*/
#ifndef OVAL_RESULTS_H_
#define OVAL_RESULTS_H_
#include "oval_types.h"
#include "oval_system_characteristics.h"
#include "oval_directives.h"
#include <stdbool.h>
const char *oval_result_get_text(oval_result_t);
/**
* @struct oval_results_model
* OVAL Results Model holds OVAL results structure instances.
*/
struct oval_results_model;
/**
* @struct oval_result_system
*/
struct oval_result_system;
/**
* @struct oval_result_system_iterator
* @see oval_results_model_get_systems
*/
struct oval_result_system_iterator;
/**
* @struct oval_result_definition
*/
struct oval_result_definition;
/**
* @struct oval_result_definition_iterator
* @see oval_result_system_get_definitions
*/
struct oval_result_definition_iterator;
/**
* @struct oval_result_test
*/
struct oval_result_test;
/**
* @struct oval_result_test_iterator
* @see oval_result_system_get_tests
*/
struct oval_result_test_iterator;
/**
* @struct oval_result_item
*/
struct oval_result_item;
/**
* @struct oval_result_item_iterator
* @see oval_result_test_get_items
*/
struct oval_result_item_iterator;
/**
* @struct oval_result_criteria_node
*/
struct oval_result_criteria_node;
/**
* @struct oval_result_criteria_node_iterator
* @see oval_result_criteria_node_get_subnodes
*/
struct oval_result_criteria_node_iterator;
/**
* Create new oval_results_model.
* The new model is bound to a specified oval_definition_model and variable bindings.
* @param definition_model the specified oval_definition_model.
* @param syschar_model the array of specified oval_syschar_model(s) terminated by NULL.
* @memberof oval_results_model
*/
struct oval_results_model *oval_results_model_new(struct oval_definition_model *definition_model,
struct oval_syschar_model **);
/**
* Import the content from the file into an oval_result_model.
* If imported content specifies a model entity that is already registered within the model its content is overwritten.
* @param model the oval_results_model
* @param file filename
* @return -1 if an error occurred
* @memberof oval_results_model
*/
int oval_results_model_import(struct oval_results_model *model, const char *file);
/**
* Copy an oval_results_model.
* @return A copy of the specified @ref oval_results_model.
* @memberof oval_results_model
*/
struct oval_results_model *oval_results_model_clone(struct oval_results_model *);
/**
* Free memory allocated to a specified oval results model.
* @param the specified oval_results model
* @memberof oval_results_model
*/
void oval_results_model_free(struct oval_results_model *model);
/**
* Export oval results into file.
* @param model the oval_results_model
* @param model the oval_directives_model
* @param file filename
* @memberof oval_results_model
*/
int oval_results_model_export(struct oval_results_model *, struct oval_directives_model *, const char *file);
/**
* @name Setters
* @{
*/
void oval_results_model_set_generator(struct oval_results_model *model, struct oval_generator *generator);
/** @} */
/**
* @name Getters
* @{
*/
struct oval_generator *oval_results_model_get_generator(struct oval_results_model *model);
/**
* Return bound definition model from an oval_results_model.
* @param model the specified oval_results_model.
* @memberof oval_results_model
*/
struct oval_definition_model *oval_results_model_get_definition_model(struct oval_results_model *model);
/**
* Return iterator over reporting systems.
* @param model the specified results model
* @memberof oval_results_model
*/
struct oval_result_system_iterator *oval_results_model_get_systems(struct oval_results_model *);
/** @} */
/**
* @name Evaluators
* @{
*/
/**
* Evaluate all result_systems. It's assumed that all necessary system
* characteristics for evaluation were altready gathered.
* @return 0 on sucess and -1 on fail. Use \ref ERRORS mechanism to examine the error.
*/
int oval_results_model_eval(struct oval_results_model *);
/** @} */
/**
* @memberof oval_result_system
*/
struct oval_result_system *oval_result_system_new(struct oval_results_model *, struct oval_syschar_model *);
/**
* @return A copy of the specified @ref oval_result_system.
* @memberof oval_result_system
*/
struct oval_result_system *oval_result_system_clone(struct oval_results_model *new_model,
struct oval_result_system *old_system);
/**
* @memberof oval_result_system
*/
void oval_result_system_free(struct oval_result_system *);
/**
* @name Setters
* @{
*/
/**
* @memberof oval_result_system
*/
void oval_result_system_add_definition(struct oval_result_system *, struct oval_result_definition *);
/**
* @memberof oval_result_system
*/
void oval_result_system_add_test(struct oval_result_system *, struct oval_result_test *);
/** @} */
/**
* @name Getters
* @{
*/
/**
* @memberof oval_result_system
*/
struct oval_results_model *oval_result_system_get_results_model(struct oval_result_system *);
/**
* @memberof oval_result_system
*/
struct oval_result_definition *oval_result_system_get_definition(struct oval_result_system *, const char *);
/**
* @memberof oval_result_system
*/
struct oval_result_definition_iterator *oval_result_system_get_definitions(struct oval_result_system *);
/**
* @memberof oval_result_system
*/
struct oval_result_test_iterator *oval_result_system_get_tests(struct oval_result_system *);
/**
* @memberof oval_result_system
*/
struct oval_syschar_model *oval_result_system_get_syschar_model(struct oval_result_system *);
/**
* @memberof oval_result_system
*/
struct oval_sysinfo *oval_result_system_get_sysinfo(struct oval_result_system *);
/** @} */
/**
* @name Iterators
* @{
*/
/**
* @memberof oval_result_system_iterator
*/
bool oval_result_system_iterator_has_more(struct oval_result_system_iterator *);
/**
* @memberof oval_result_system_iterator
*/
struct oval_result_system *oval_result_system_iterator_next(struct oval_result_system_iterator *);
/**
* @memberof oval_result_system_iterator
*/
void oval_result_system_iterator_free(struct oval_result_system_iterator *);
/** @} */
/**
* @name Evaluators
* @{
*/
/**
* Function evaluates all OVAL definitions of specified result_system. It assumes that all necessary system
* characteristics for evaluation were altready gathered.
* @memberof oval_result_system
* @param sys is result_system from result_model
* @return 0 on sucess and -1 on fail. Use \ref ERRORS mechanism to examine the error.
*/
int oval_result_system_eval(struct oval_result_system *sys);
/**
* Function evaluates specified OVAL definition in result_system. It assumes that all necessary system
* characteristics for evaluation were altready gathered.
* @memberof oval_result_system
* @param sys is result_system from result_model
* @param id of the definition from definition_model from result_model
* @return 0 on succeess, or non 0 if an error occurred. Use \ref ERRORS mechanism to examine the error.
*/
int oval_result_system_eval_definition(struct oval_result_system *sys, const char *id);
/** @} */
/**
* @memberof oval_result_definition
*/
struct oval_result_definition *oval_result_definition_new(struct oval_result_system *, char *);
/**
* @return A copy of the specified @ref oval_result_definition.
* @memberof oval_result_definition
*/
struct oval_result_definition *oval_result_definition_clone
(struct oval_result_system *new_system, struct oval_result_definition *old_definition);
/**
* @memberof oval_result_definition
*/
void oval_result_definition_free(struct oval_result_definition *);
/**
* @name Setters
* @{
*/
/**
* @memberof oval_result_definition
*/
void oval_result_definition_set_result(struct oval_result_definition *, oval_result_t);
/**
* @memberof oval_result_definition
*/
void oval_result_definition_set_instance(struct oval_result_definition *, int);
/**
* @memberof oval_result_definition
*/
void oval_result_definition_set_criteria(struct oval_result_definition *, struct oval_result_criteria_node *);
/**
* @memberof oval_result_definition
*/
void oval_result_definition_add_message(struct oval_result_definition *, struct oval_message *);
/** @} */
/**
* @name Getters
* @{
*/
/**
* @memberof oval_result_definition
*/
struct oval_definition *oval_result_definition_get_definition(const struct oval_result_definition *);
/**
* Returns the @idref attribute of a given result definition
* @memberof oval_result_definition
*/
const char *oval_result_definition_get_id(const struct oval_result_definition *rslt_definition);
/**
* @memberof oval_result_definition
*/
struct oval_result_system *oval_result_definition_get_system(const struct oval_result_definition *);
/**
* @memberof oval_result_definition
*/
int oval_result_definition_get_instance(const struct oval_result_definition *);
/**
* @memberof oval_result_definition
*/
oval_result_t oval_result_definition_eval(struct oval_result_definition *);
/**
* @memberof oval_result_definition
*/
oval_result_t oval_result_definition_get_result(const struct oval_result_definition *);
/**
* @memberof oval_result_definition
*/
struct oval_message_iterator *oval_result_definition_get_messages(const struct oval_result_definition *);
/**
* @memberof oval_result_definition
*/
struct oval_result_criteria_node *oval_result_definition_get_criteria(const struct oval_result_definition *);
/** @} */
/**
* @name Iterators
* @{
*/
/**
* @memberof oval_result_definition_iterator
*/
bool oval_result_definition_iterator_has_more(struct oval_result_definition_iterator *);
/**
* @memberof oval_result_definition_iterator
*/
struct oval_result_definition *oval_result_definition_iterator_next(struct oval_result_definition_iterator *);
/**
* @memberof oval_result_definition_iterator
*/
void oval_result_definition_iterator_free(struct oval_result_definition_iterator *);
/** @} */
/**
* @name Evaluators
* @{
*/
/** @} */
/**
* @memberof oval_result_test
*/
struct oval_result_test *oval_result_test_new(struct oval_result_system *, char *);
/**
* @return A copy of the specified @ref oval_result_test.
* @memberof oval_result_test
*/
struct oval_result_test *oval_result_test_clone
(struct oval_result_system *new_system, struct oval_result_test *old_test);
/**
* @memberof oval_result_test
*/
void oval_result_test_free(struct oval_result_test *);
/**
* @name Setters
* @{
*/
/**
* @memberof oval_result_test
*/
void oval_result_test_set_result(struct oval_result_test *, oval_result_t);
/**
* @memberof oval_result_test
*/
void oval_result_test_set_instance(struct oval_result_test *test, int instance);
/**
* @memberof oval_result_test
*/
void oval_result_test_add_message(struct oval_result_test *, struct oval_message *);
/**
* @memberof oval_result_test
*/
void oval_result_test_add_item(struct oval_result_test *, struct oval_result_item *);
/**
* @memberof oval_result_test
*/
void oval_result_test_add_binding(struct oval_result_test *, struct oval_variable_binding *);
/** @} */
/**
* @name Getters
* @{
*/
/**
* @memberof oval_result_test
*/
struct oval_test *oval_result_test_get_test(struct oval_result_test *);
/**
* @memberof oval_result_test
*/
struct oval_result_system *oval_result_test_get_system(struct oval_result_test *);
/**
* @memberof oval_result_test
*/
oval_result_t oval_result_test_eval(struct oval_result_test *);
/**
* @memberof oval_result_test
*/
oval_result_t oval_result_test_get_result(struct oval_result_test *);
/**
* @memberof oval_result_test
*/
int oval_result_test_get_instance(struct oval_result_test *);
/**
* @memberof oval_result_test
*/
struct oval_message_iterator *oval_result_test_get_messages(struct oval_result_test *);
/**
* @memberof oval_result_test
*/
struct oval_result_item_iterator *oval_result_test_get_items(struct oval_result_test *);
/**
* @memberof oval_result_test
*/
struct oval_variable_binding_iterator *oval_result_test_get_bindings(struct oval_result_test *);
/** @} */
/**
* @name Iterators
* @{
*/
/**
* @memberof oval_result_test_iterator
*/
bool oval_result_test_iterator_has_more(struct oval_result_test_iterator *);
/**
* @memberof oval_result_test_iterator
*/
struct oval_result_test *oval_result_test_iterator_next(struct oval_result_test_iterator *);
/**
* @memberof oval_result_test_iterator
*/
void oval_result_test_iterator_free(struct oval_result_test_iterator *);
/** @} */
/**
* @name Evaluators
* @{
*/
/** @} */
/**
* @memberof oval_result_item
*/
struct oval_result_item *oval_result_item_new(struct oval_result_system *, char *);
/**
* @return A copy of the specified @ref oval_result_item.
* @memberof oval_result_item
*/
struct oval_result_item *oval_result_item_clone
(struct oval_result_system *new_system, struct oval_result_item *old_item);
/**
* @memberof oval_result_item
*/
void oval_result_item_free(struct oval_result_item *);
/**
* @name Setters
* @{
*/
/**
* @memberof oval_result_item
*/
void oval_result_item_set_result(struct oval_result_item *, oval_result_t);
/**
* @memberof oval_result_item
*/
void oval_result_item_add_message(struct oval_result_item *, struct oval_message *);
/** @} */
/**
* @name Getters
* @{
*/
/**
* @memberof oval_result_item
*/
struct oval_sysitem *oval_result_item_get_sysitem(struct oval_result_item *);
/**
* @memberof oval_result_item
*/
oval_result_t oval_result_item_get_result(struct oval_result_item *);
/**
* @memberof oval_result_item
*/
struct oval_message_iterator *oval_result_item_get_messages(struct oval_result_item *);
/** @} */
/**
* @name Iterators
* @{
*/
/**
* @memberof oval_result_item_iterator
*/
bool oval_result_item_iterator_has_more(struct oval_result_item_iterator *);
/**
* @memberof oval_result_item_iterator
*/
struct oval_result_item *oval_result_item_iterator_next(struct oval_result_item_iterator *);
/**
* @memberof oval_result_item_iterator
*/
void oval_result_item_iterator_free(struct oval_result_item_iterator *);
/** @} */
/**
* @name Evaluators
* @{
*/
/** @} */
/**
* @memberof oval_result_criteria_node
*/
struct oval_result_criteria_node *oval_result_criteria_node_new(struct oval_result_system *,
oval_criteria_node_type_t,
int, int, ...);
/**
* @return A copy of the specified @ref oval_result_criteria_node.
* @memberof oval_result_criteria_node
*/
struct oval_result_criteria_node *oval_result_criteria_node_clone
(struct oval_result_system *new_system, struct oval_result_criteria_node *old_node);
/**
* @memberof oval_result_criteria_node
*/
void oval_result_criteria_node_free(struct oval_result_criteria_node *);
/**
* @name Setters
* @{
*/
/**
* @memberof oval_result_criteria_node
*/
void oval_result_criteria_node_set_result(struct oval_result_criteria_node *, oval_result_t);
/**
* @memberof oval_result_criteria_node
*/
void oval_result_criteria_node_set_negate(struct oval_result_criteria_node *, bool);
/**
* @memberof oval_result_criteria_node
*/
void oval_result_criteria_node_set_applicability_check(struct oval_result_criteria_node *, bool);
/**
* @memberof oval_result_criteria_node
*/
void oval_result_criteria_node_set_operator(struct oval_result_criteria_node *, oval_operator_t); //type==NODETYPE_CRITERIA
/**
* @memberof oval_result_criteria_node
*/
void oval_result_criteria_node_add_subnode(struct oval_result_criteria_node *, struct oval_result_criteria_node *); //type==NODETYPE_CRITERIA
/**
* @memberof oval_result_criteria_node
*/
void oval_result_criteria_node_set_test(struct oval_result_criteria_node *, struct oval_result_test *); //type==NODETYPE_CRITERION
/**
* @memberof oval_result_criteria_node
*/
void oval_result_criteria_node_set_extends(struct oval_result_criteria_node *, struct oval_result_definition *); //type==NODETYPE_EXTENDDEF
/** @} */
/**
* @name Getters
* @{
*/
/**
*/
oval_criteria_node_type_t oval_result_criteria_node_get_type(struct oval_result_criteria_node *);
/**
* @memberof oval_result_criteria_node
*/
oval_result_t oval_result_criteria_node_eval(struct oval_result_criteria_node *);
/**
* @memberof oval_result_criteria_node
*/
oval_result_t oval_result_criteria_node_get_result(struct oval_result_criteria_node *);
/**
* @memberof oval_result_criteria_node
*/
bool oval_result_criteria_node_get_negate(struct oval_result_criteria_node *);
/**
* @memberof oval_result_criteria_node
*/
bool oval_result_criteria_node_get_applicability_check(struct oval_result_criteria_node *);
/**
* @memberof oval_result_criteria_node
*/
oval_operator_t oval_result_criteria_node_get_operator(struct oval_result_criteria_node *); //type==NODETYPE_CRITERIA
/**
* @memberof oval_result_criteria_node
*/
struct oval_result_criteria_node_iterator *oval_result_criteria_node_get_subnodes(struct oval_result_criteria_node *); //type==NODETYPE_CRITERIA
/**
* @memberof oval_result_criteria_node
*/
struct oval_result_test *oval_result_criteria_node_get_test(struct oval_result_criteria_node *); //type==NODETYPE_CRITERION
/**
* @memberof oval_result_criteria_node
*/
struct oval_result_definition *oval_result_criteria_node_get_extends(struct oval_result_criteria_node *); //type==NODETYPE_EXTENDDEF
/** @} */
/**
* @name Iterators
* @{
*/
/**
* @memberof oval_result_criteria_node_iterator
*/
bool oval_result_criteria_node_iterator_has_more(struct oval_result_criteria_node_iterator *);
/**
* @memberof oval_result_criteria_node_iterator
*/
struct oval_result_criteria_node *oval_result_criteria_node_iterator_next(struct oval_result_criteria_node_iterator *);
/**
* @memberof oval_result_criteria_node_iterator
*/
void oval_result_criteria_node_iterator_free(struct oval_result_criteria_node_iterator *);
/** @} */
/**
* @name Evaluators
* @{
*/
/** @} */
/** @} */
/**
* @}END OVALRES
* @}END OVAL
*/
#endif /* OVAL_RESULTS_H_ */
|