44 #include "oscap_source.h"
bool cpe_platform_applicable_lang_model(const char *platform, struct cpe_lang_model *lang_model, cpe_check_fn check_cb, cpe_dict_fn dict_cb, void *usr)
Verify whether given CPE platform idref is applicable by evaluating test expression associated with i...
Definition: cpelang.c:186
bool *(* cpe_dict_fn)(const struct cpe_name *, void *)
Shared callback definition used to match CPE names to perform applicability tests.
Definition: cpe_name.h:371
const char * cpe_lang_model_get_origin_file(const struct cpe_lang_model *lang_model)
Gets the file the CPE dict model was loaded from.
Definition: cpelang_priv.c:764
CPE platform specification.
Definition: cpelang_priv.c:63
void cpe_testexpr_free(struct cpe_testexpr *expr)
Free function of CPE test expression.
Definition: cpelang_priv.c:635
const char * cpe_platform_get_remark(const struct cpe_platform *item)
cpe_platform functions to get remark
General OpenScap functions and types.
cpe_lang_oper_t
CPE language operators.
Definition: cpe_lang.h:49
struct cpe_platform * cpe_platform_new(void)
Constructor of CPE Platform.
Definition: cpelang_priv.c:192
bool cpe_platform_iterator_has_more(struct cpe_platform_iterator *it)
struct cpe_platform_iterator * cpe_lang_model_get_platforms(const struct cpe_lang_model *item)
cpe_lang_model function to get CPE platforms
bool cpe_lang_model_set_origin_file(struct cpe_lang_model *lang_model, const char *origin_file)
Sets the origin file hint.
Definition: cpelang_priv.c:756
bool cpe_platform_set_expr(struct cpe_platform *platform, struct cpe_testexpr *expr)
Set evaluation expression for this CPE platform.
Definition: cpelang_priv.c:744
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.
Definition: cpelang_priv.c:677
#define OSCAP_DEPRECATED(func)
This macro will warn, when a deprecated function is used.
Definition: oscap.h:50
bool cpe_testexpr_add_subexpression(struct cpe_testexpr *expr, struct cpe_testexpr *sub)
Add XML namespace to CPE lang model.
Definition: cpelang_priv.c:714
bool cpe_platform_add_title(struct cpe_platform *platform, struct oscap_text *title)
Add title to platform.
struct cpe_lang_model * cpe_lang_model_new(void)
Constructor of CPE Language model.
Definition: cpelang_priv.c:176
cpe_lang_oper_t oper
operator
Definition: cpelang_priv.h:53
struct cpe_name * cpe
CPE for match operation.
Definition: cpelang_priv.h:56
void cpe_platform_iterator_remove(struct cpe_platform_iterator *it, struct cpe_lang_model *parent)
Definition: cpelang_priv.c:735
Interface to Common Platform Enumeration (CPE) URI.
struct cpe_platform * cpe_platform_iterator_next(struct cpe_platform_iterator *it)
char * cpe_lang_model_detect_version(const char *file)
Detect version of given CPE language XML.
Definition: cpelang.c:128
const char * cpe_lang_model_supported(void)
Get supported version of CPE language XML.
Definition: cpelang.c:116
struct cpe_testexpr_iterator * cpe_testexpr_get_meta_expr(const struct cpe_testexpr *item)
Get CPE expression subexpression.
Definition: cpelang_priv.c:653
bool cpe_testexpr_set_oper(struct cpe_testexpr *expr, cpe_lang_oper_t oper)
Set CPE operation.
Definition: cpelang_priv.c:693
negate
Definition: cpe_lang.h:57
Internationalized string iterator.
bool cpe_testexpr_iterator_has_more(struct cpe_testexpr_iterator *it)
bool *(* cpe_check_fn)(const char *, const char *, const char *, void *)
Shared callback definition used to evaluate checks to perform applicability tests.
Definition: cpe_name.h:362
struct cpe_name * cpe_testexpr_get_meta_cpe(const struct cpe_testexpr *item)
Get CPE name to match against.
Definition: cpelang_priv.c:661
bool cpe_testexpr_set_name(struct cpe_testexpr *expr, struct cpe_name *name)
Set CPE name.
Definition: cpelang_priv.c:702
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.
Definition: cpelang_priv.c:669
bool cpe_lang_model_add_platform(struct cpe_lang_model *lang, struct cpe_platform *platform)
Add platform to CPE lang model.
Definition: cpelang_priv.c:726
struct oscap_list * expr
array of subexpressions for operators
Definition: cpelang_priv.h:55
fact-ref = match given CPE name against available dictionaries
Definition: cpe_lang.h:53
bool cpe_platform_set_remark(struct cpe_platform *platform, const char *new_remark)
Set remark of CPE platform.
struct cpe_testexpr * cpe_testexpr_clone(struct cpe_testexpr *old_expr)
Clone CPE test expression.
Definition: cpelang_priv.c:151
Multilingual text processing interface.
struct cpe_testexpr * cpe_testexpr_iterator_next(struct cpe_testexpr_iterator *it)
Definition: oscap_source.c:62
struct cpe_testexpr * cpe_testexpr_get_next(const struct cpe_testexpr *expr)
Function to get next expr from array.
Definition: cpelang_priv.c:123
bool cpe_platform_set_id(struct cpe_platform *platform, const char *new_id)
Set ID of CPE platform.
cpe_lang_oper_t cpe_testexpr_get_oper(const struct cpe_testexpr *item)
cpe_testexpr functions to get variable members
logical OR
Definition: cpe_lang.h:52
void cpe_testexpr_iterator_reset(struct cpe_testexpr_iterator *it)
Reset function of CPE test expression.
void cpe_lang_model_export(const struct cpe_lang_model *spec, const char *file)
Write the lang_model to a file.
Definition: cpelang.c:57
void cpe_platform_free(struct cpe_platform *platform)
Free function of CPE Platform.
Definition: cpelang_priv.c:596
struct cpe_testexpr * cpe_platform_get_expr(const struct cpe_platform *item)
cpe_platform functions to get test expression
Structure holding Common Platform Enumeration URI data.
Definition: cpename.c:69
CPE language boolean expression.
Definition: cpelang_priv.h:52
Representation of internationalizable character strings.
Definition: text_priv.h:47
struct cpe_lang_model * cpe_lang_model_import_source(struct oscap_source *source)
Load CPE language model from an oscap_source.
Definition: cpelang_priv.c:219
void cpe_platform_iterator_reset(struct cpe_platform_iterator *it)
void cpe_testexpr_iterator_free(struct cpe_testexpr_iterator *it)
invalid or unknown operation
Definition: cpe_lang.h:50
struct cpe_lang_model * cpe_lang_model_import(const char *file)
Load CPE language model from a XML document.
Definition: cpelang.c:46
void cpe_platform_iterator_free(struct cpe_platform_iterator *it)
struct cpe_platform * cpe_lang_model_get_item(const struct cpe_lang_model *item, const char *key)
cpe_lang_model function to get CPE platforms
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.
Definition: cpelang_priv.c:685
bool cpe_platform_match_cpe(struct cpe_name **cpe, size_t n, const struct cpe_platform *platform)
Function to match cpe in platform.
Definition: cpelang.c:111
logical AND
Definition: cpe_lang.h:51
Iterator over CPE language expressions.
struct cpe_testexpr * cpe_testexpr_new(void)
Constructor of CPE test expression.
Definition: cpelang_priv.c:137
void cpe_lang_model_free(struct cpe_lang_model *platformspec)
Free function of CPE test expression.
Definition: cpelang_priv.c:584
mask to extract the operator w/o possible negation
Definition: cpe_lang.h:56
const char * cpe_platform_get_id(const struct cpe_platform *item)
cpe_platform functions to get id
check-ref = evaluate given check
Definition: cpe_lang.h:54
struct oscap_text_iterator * cpe_platform_get_titles(const struct cpe_platform *item)
cpe_platform functions to get titles