Data Structures | |
| struct | cpe_lang_expr |
| CPE language boolean expression. More... | |
| struct | cpe_platform_spec |
| CPE platform specification. More... | |
| struct | cpe_platform |
| Single platform representation in CPE language. More... | |
Files | |
| file | cpelang.h |
| Interface to Common Product Enumeration (CPE) Language. | |
Typedefs | |
| typedef struct cpe_lang_expr | cpe_lang_expr_t |
| CPE language boolean expression. | |
| typedef struct cpe_platform_spec | cpe_platform_spec_t |
| CPE platform specification. | |
| typedef struct cpe_platform | cpe_platform_t |
| Single platform representation in CPE language. | |
Enumerations | |
| enum | cpe_lang_oper_t { CPE_LANG_OPER_HALT = 0x00, CPE_LANG_OPER_AND = 0x01, CPE_LANG_OPER_OR = 0x02, CPE_LANG_OPER_MATCH = 0x03, CPE_LANG_OPER_MASK = 0xFF, CPE_LANG_OPER_NOT = 0x100, CPE_LANG_OPER_NAND = CPE_LANG_OPER_AND | CPE_LANG_OPER_NOT, CPE_LANG_OPER_NOR = CPE_LANG_OPER_OR | CPE_LANG_OPER_NOT } |
| CPE language operators. More... | |
Functions | |
| cpe_platform_spec_t * | cpe_platformspec_new (const char *fname) |
| New platform specification from file. | |
| bool | cpe_platformspec_add (cpe_platform_spec_t *platformspec, cpe_platform_t *platform) |
| Add new platform entry to platformspec. | |
| void | cpe_platformspec_delete (cpe_platform_spec_t *platformspec) |
| Free specified platform specification list. | |
| bool | cpe_language_match_cpe (cpe_t **cpe, size_t n, const cpe_platform_t *platform) |
| Match list of CPEs against CPE language platform specification. | |
| void | cpe_platform_delete (cpe_platform_t *platform) |
| Delete single CPE paltform specification. | |
| void | cpe_langexpr_delete (cpe_lang_expr_t *expr) |
| Delete CPE language boolean expression. | |
Variables | |
| cpe_t * cpe_lang_expr::cpe | |
| CPE for match operation. | |
| union { | |
| struct cpe_lang_expr * expr | |
| array of subexpressions for operators | |
| cpe_t * cpe_lang_expr::cpe | |
| CPE for match operation. | |
| } | cpe_lang_expr::meta |
| operation metadata | |
| size_t | cpe_platform_spec::platforms_n |
| number of platforms | |
| size_t | cpe_platform_spec::alloc_ |
| allocated memory (internal) | |
| char * | cpe_platform::title |
| human-readable platform description | |
| char * | cpe_platform::remark |
| remark | |
| struct cpe_lang_expr | cpe_platform::expr |
| expression for match evaluation | |
| enum cpe_lang_oper_t |
| void cpe_langexpr_delete | ( | cpe_lang_expr_t * | expr | ) |
Delete CPE language boolean expression.
| expr | expression to be deleted |
| bool cpe_language_match_cpe | ( | cpe_t ** | cpe, | |
| size_t | n, | |||
| const cpe_platform_t * | platform | |||
| ) |
Match list of CPEs against CPE language platform specification.
| cpe | List of CPEs describing tested platform as a list of pointers | |
| n | number of CPEs | |
| platform | CPE language platform, that is expected (not) to match given list of CPEs |
| void cpe_platform_delete | ( | cpe_platform_t * | platform | ) |
Delete single CPE paltform specification.
| platform | platform to be deleted |
| bool cpe_platformspec_add | ( | cpe_platform_spec_t * | platformspec, | |
| cpe_platform_t * | platform | |||
| ) |
Add new platform entry to platformspec.
| platformspec | list of platforms being extended | |
| platform | platform to add to the list |
| void cpe_platformspec_delete | ( | cpe_platform_spec_t * | platformspec | ) |
Free specified platform specification list.
| platformspec | pointer to list to be deleted |
| cpe_platform_spec_t* cpe_platformspec_new | ( | const char * | fname | ) |
New platform specification from file.
| fname | file name to load |
| NULL | on failure |
1.5.7.1