Open SCAP Library
|
CPE language boolean expression. More...
#include <cpelang_priv.h>
Public Member Functions | |
OSCAP_API struct cpe_testexpr * | cpe_testexpr_new (void) |
Constructor of CPE test expression. | |
OSCAP_API struct cpe_testexpr * | cpe_testexpr_clone (struct cpe_testexpr *old_expr) |
Clone CPE test expression. | |
OSCAP_API void | cpe_testexpr_free (struct cpe_testexpr *expr) |
Free function of CPE test expression. | |
OSCAP_API void | cpe_testexpr_iterator_reset (struct cpe_testexpr_iterator *it) |
Reset function of CPE test expression. | |
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 cpe_lang_oper_t | cpe_testexpr_get_oper (const struct cpe_testexpr *item) |
cpe_testexpr functions to get variable members | |
OSCAP_API struct cpe_testexpr_iterator * | cpe_testexpr_get_meta_expr (const struct cpe_testexpr *item) |
Get CPE expression subexpression. | |
OSCAP_API const struct cpe_name * | cpe_testexpr_get_meta_cpe (const struct cpe_testexpr *item) |
Get CPE name to match against. | |
OSCAP_API const char * | cpe_testexpr_get_meta_check_system (const struct cpe_testexpr *item) |
Get check system to evaluate Only valid for CPE_LANG_OPER_CHECK. | |
OSCAP_API const char * | cpe_testexpr_get_meta_check_href (const struct cpe_testexpr *item) |
Get check href to evaluate Only valid for CPE_LANG_OPER_CHECK. | |
OSCAP_API const char * | cpe_testexpr_get_meta_check_id (const struct cpe_testexpr *item) |
Get check idref to evaluate Only valid for CPE_LANG_OPER_CHECK. | |
OSCAP_API const struct cpe_testexpr * | cpe_testexpr_get_next (const struct cpe_testexpr *expr) |
Function to get next expr from array. | |
Setters | |
For lists use add functions. Parameters of set functions are duplicated in memory and need to be freed by caller. | |
OSCAP_API bool | cpe_testexpr_add_subexpression (struct cpe_testexpr *expr, struct cpe_testexpr *sub) |
Add XML namespace to CPE lang model. | |
OSCAP_API bool | cpe_testexpr_set_oper (struct cpe_testexpr *expr, cpe_lang_oper_t oper) |
Set CPE operation. | |
OSCAP_API bool | cpe_testexpr_set_name (struct cpe_testexpr *expr, struct cpe_name *name) |
Set CPE name. | |
Data Fields | ||
cpe_lang_oper_t | oper | |
operator | ||
union { | ||
struct oscap_list * expr | ||
array of subexpressions for operators | ||
struct cpe_name * cpe | ||
CPE for match operation. | ||
struct { | ||
char * system | ||
char * href | ||
char * id | ||
} check | ||
} | meta | |
operation metadata | ||
CPE language boolean expression.