00001
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef _CPELANG_H_
00036 #define _CPELANG_H_
00037
00038 #include <stdlib.h>
00039
00040 #include "cpeuri.h"
00041 #include "../common/oscap.h"
00042
00044 typedef enum {
00045 CPE_LANG_OPER_HALT = 0x00,
00046 CPE_LANG_OPER_AND = 0x01,
00047 CPE_LANG_OPER_OR = 0x02,
00048 CPE_LANG_OPER_MATCH = 0x03,
00049
00050 CPE_LANG_OPER_MASK = 0xFF,
00051 CPE_LANG_OPER_NOT = 0x100,
00052
00053 CPE_LANG_OPER_NAND = CPE_LANG_OPER_AND | CPE_LANG_OPER_NOT,
00054 CPE_LANG_OPER_NOR = CPE_LANG_OPER_OR | CPE_LANG_OPER_NOT,
00055 } cpe_lang_oper_t;
00056
00057
00058
00059
00060
00061 struct cpe_lang_expr;
00062
00067 struct cpe_platformspec;
00068
00073 struct cpe_platform;
00074
00079 struct cpe_platform_iterator;
00081 struct cpe_platform* cpe_platform_iterator_next(struct cpe_platform_iterator* it);
00083 bool cpe_platform_iterator_has_more(struct cpe_platform_iterator* it);
00085 void cpe_platform_iterator_free(struct cpe_platform_iterator* it);
00086
00094 struct cpe_platformspec *cpe_platformspec_new(const char *fname);
00095
00101 void cpe_platformspec_free(struct cpe_platformspec * platformspec);
00102
00107 struct cpe_platform_iterator* cpe_platformspec_get_items(const struct cpe_platformspec * platformspec);
00108
00117 struct cpe_platform* cpe_platformspec_get_item(const struct cpe_platformspec * platformspec, const char* id);
00118
00127 bool cpe_platform_match_cpe(struct cpe_name ** cpe, size_t n, const struct cpe_platform * platform);
00128
00133 const char* cpe_platform_get_id(const struct cpe_platform* platform);
00134
00139 const char* cpe_platform_get_title(const struct cpe_platform* platform);
00140
00145 const char* cpe_platform_get_remark(const struct cpe_platform* platform);
00146
00147 #endif
00148
00149