Open SCAP Library
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
xccdf_item Struct Reference

A base class for XCCDF items. More...

#include <xccdf_benchmark.h>

Collaboration diagram for xccdf_item:
[legend]

Public Member Functions

OSCAP_API void xccdf_item_free (struct xccdf_item *item)
 
OSCAP_API struct xccdf_itemxccdf_item_clone (const struct xccdf_item *old_item)
 
OSCAP_API struct xccdf_benchmarkxccdf_item_to_benchmark (struct xccdf_item *item)
 Convert the item to a benchmark.
 
OSCAP_API struct xccdf_profilexccdf_item_to_profile (struct xccdf_item *item)
 Convert the item to a profile.
 
OSCAP_API struct xccdf_rulexccdf_item_to_rule (struct xccdf_item *item)
 Convert the item to a rule.
 
OSCAP_API struct xccdf_groupxccdf_item_to_group (struct xccdf_item *item)
 Convert the item to a group.
 
OSCAP_API struct xccdf_valuexccdf_item_to_value (struct xccdf_item *item)
 Convert the item to a value.
 
OSCAP_API struct xccdf_resultxccdf_item_to_result (struct xccdf_item *item)
 Convert the item to a test result.
 
Getters

Return value is pointer to structure's member.

Do not free unless you null the pointer in the structure. Use remove function otherwise.

OSCAP_API xccdf_type_t xccdf_item_get_type (const struct xccdf_item *item)
 
OSCAP_API const char * xccdf_item_get_id (const struct xccdf_item *item)
 
OSCAP_API struct oscap_text_iteratorxccdf_item_get_title (const struct xccdf_item *item)
 
OSCAP_API struct oscap_text_iteratorxccdf_item_get_description (const struct xccdf_item *item)
 
OSCAP_API const char * xccdf_item_get_version (const struct xccdf_item *item)
 
OSCAP_API const char * xccdf_item_get_extends (const struct xccdf_item *item)
 
OSCAP_API struct xccdf_status_iteratorxccdf_item_get_statuses (const struct xccdf_item *item)
 
OSCAP_API struct oscap_reference_iterator * xccdf_item_get_dc_statuses (const struct xccdf_item *item)
 
OSCAP_API struct oscap_reference_iterator * xccdf_item_get_references (const struct xccdf_item *item)
 
OSCAP_API struct oscap_string_iteratorxccdf_item_get_conflicts (const struct xccdf_item *item)
 
OSCAP_API struct oscap_stringlist_iteratorxccdf_item_get_requires (const struct xccdf_item *item)
 
OSCAP_API struct xccdf_statusxccdf_item_get_current_status (const struct xccdf_item *item)
 
OSCAP_API bool xccdf_item_get_hidden (const struct xccdf_item *item)
 
OSCAP_API bool xccdf_item_get_selected (const struct xccdf_item *item)
 
OSCAP_API bool xccdf_item_get_prohibit_changes (const struct xccdf_item *item)
 
OSCAP_API bool xccdf_item_get_abstract (const struct xccdf_item *item)
 
OSCAP_API struct xccdf_item_iteratorxccdf_item_get_content (const struct xccdf_item *item)
 
OSCAP_API struct xccdf_itemxccdf_item_get_parent (const struct xccdf_item *item)
 Return item's parent in the grouping hierarchy.
 
OSCAP_API const struct xccdf_version_infoxccdf_item_get_schema_version (struct xccdf_item *item)
 Retrieves the XCCDF version of top-level benchmark item.
 
OSCAP_API struct oscap_string_iteratorxccdf_item_get_metadata (const struct xccdf_item *item)
 
OSCAP_API struct oscap_text_iteratorxccdf_item_get_question (const struct xccdf_item *item)
 
OSCAP_API struct xccdf_warning_iteratorxccdf_item_get_warnings (const struct xccdf_item *item)
 
OSCAP_API struct oscap_text_iteratorxccdf_item_get_rationale (const struct xccdf_item *item)
 
OSCAP_API const char * xccdf_item_get_cluster_id (const struct xccdf_item *item)
 
OSCAP_API const char * xccdf_item_get_version_update (const struct xccdf_item *item)
 
OSCAP_API const char * xccdf_item_get_version_time (const struct xccdf_item *item)
 
OSCAP_API float xccdf_item_get_weight (const struct xccdf_item *item)
 
OSCAP_API struct xccdf_benchmarkxccdf_item_get_benchmark (const struct xccdf_item *item)
 
OSCAP_API struct oscap_string_iteratorxccdf_item_get_platforms (const struct xccdf_item *item)
 
Setters

For lists use add functions.

Parameters of set functions are duplicated in memory and need to be freed by caller.

OSCAP_API bool xccdf_item_set_weight (struct xccdf_item *item, xccdf_numeric newval)
 
OSCAP_API bool xccdf_item_set_id (struct xccdf_item *item, const char *newval)
 
OSCAP_API bool xccdf_item_set_cluster_id (struct xccdf_item *item, const char *newval)
 
OSCAP_API bool xccdf_item_set_extends (struct xccdf_item *item, const char *newval)
 
OSCAP_API bool xccdf_item_set_version (struct xccdf_item *item, const char *newval)
 
OSCAP_API bool xccdf_item_set_version_time (struct xccdf_item *item, const char *newval)
 
OSCAP_API bool xccdf_item_set_version_update (struct xccdf_item *item, const char *newval)
 
OSCAP_API bool xccdf_item_set_abstract (struct xccdf_item *item, bool newval)
 
OSCAP_API bool xccdf_item_set_hidden (struct xccdf_item *item, bool newval)
 
OSCAP_API bool xccdf_item_set_prohibit_changes (struct xccdf_item *item, bool newval)
 
OSCAP_API bool xccdf_item_set_selected (struct xccdf_item *item, bool newval)
 
OSCAP_API bool xccdf_item_add_metadata (struct xccdf_item *item, const char *metadata)
 
OSCAP_API bool xccdf_item_add_description (struct xccdf_item *item, struct oscap_text *newval)
 
OSCAP_API bool xccdf_item_add_platform (struct xccdf_item *item, const char *newval)
 
OSCAP_API bool xccdf_item_add_question (struct xccdf_item *item, struct oscap_text *newval)
 
OSCAP_API bool xccdf_item_add_rationale (struct xccdf_item *item, struct oscap_text *newval)
 
OSCAP_API bool xccdf_item_add_reference (struct xccdf_item *item, struct oscap_reference *newval)
 
OSCAP_API bool xccdf_item_add_dc_status (struct xccdf_item *item, struct oscap_reference *newval)
 
OSCAP_API bool xccdf_item_add_status (struct xccdf_item *item, struct xccdf_status *newval)
 
OSCAP_API bool xccdf_item_add_title (struct xccdf_item *item, struct oscap_text *newval)
 
OSCAP_API bool xccdf_item_add_warning (struct xccdf_item *item, struct xccdf_warning *newval)
 
OSCAP_API bool xccdf_item_add_requires (struct xccdf_item *item, struct oscap_stringlist *requires_)
 
OSCAP_API bool xccdf_item_add_conflicts (struct xccdf_item *item, const char *conflicts)
 

Data Fields

xccdf_type_t type
 
struct xccdf_item_base item
 
union { 
 
   struct xccdf_profile_item   profile 
 
   struct xccdf_benchmark_item   benchmark 
 
   struct xccdf_rule_item   rule 
 
   struct xccdf_group_item   group 
 
   struct xccdf_value_item   value 
 
   struct xccdf_result_item   result 
 
sub 
 

Detailed Description

A base class for XCCDF items.


The documentation for this struct was generated from the following files: