Open SCAP Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions | Data Fields
cpe_testexpr Struct Reference

Detailed Description

CPE language boolean expression.

#include <cpelang_priv.h>

Public Member Functions

struct cpe_testexprcpe_testexpr_new (void)
 Constructor of CPE test expression.
 
struct cpe_testexprcpe_testexpr_clone (struct cpe_testexpr *old_expr)
 Clone CPE test expression. More...
 
void cpe_testexpr_free (struct cpe_testexpr *expr)
 Free function of CPE test expression.
 
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.

cpe_lang_oper_t cpe_testexpr_get_oper (const struct cpe_testexpr *item)
 cpe_testexpr functions to get variable members
 
struct cpe_testexpr_iteratorcpe_testexpr_get_meta_expr (const struct cpe_testexpr *item)
 Get CPE expression subexpression. More...
 
struct cpe_namecpe_testexpr_get_meta_cpe (const struct cpe_testexpr *item)
 Get CPE name to match against. More...
 
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.
 
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.
 
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.
 
struct cpe_testexprcpe_testexpr_get_next (const struct cpe_testexpr *expr)
 Function to get next expr from array. More...
 
Setters

For lists use add functions.

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

bool cpe_testexpr_add_subexpression (struct cpe_testexpr *expr, struct cpe_testexpr *sub)
 Add XML namespace to CPE lang model. More...
 
bool cpe_testexpr_set_oper (struct cpe_testexpr *expr, cpe_lang_oper_t oper)
 Set CPE operation. More...
 
bool cpe_testexpr_set_name (struct cpe_testexpr *expr, struct cpe_name *name)
 Set CPE name. More...
 

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
 

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