362 typedef bool *(*cpe_check_fn) (
const char*,
const char*,
const char*,
void*);
371 typedef bool *(*cpe_dict_fn) (
const struct cpe_name*,
void*);
bool cpe_name_set_part(struct cpe_name *cpe, cpe_part_t newval)
Set CPE name part type field.
const char * cpe_name_get_target_sw(const struct cpe_name *cpe)
Get CPE name target_sw field.
const char * cpe_name_get_other(const struct cpe_name *cpe)
Get CPE name other field.
struct cpe_name * cpe_name_new(const char *cpe)
Create a new CPE structure from string cpe.
Definition: cpename.c:224
const char * cpe_name_get_update(const struct cpe_name *cpe)
Get CPE name update field.
const char * cpe_name_get_version(const struct cpe_name *cpe)
Get CPE name version field.
bool cpe_name_match_one(const struct cpe_name *cpe, const struct cpe_name *against)
Check if candidate CPE cpe matches CPE against according to CPE specification v 2.1.
Definition: cpename.c:527
available in all CPE versions, default in CPE 2.2 and previous
Definition: cpe_name.h:54
bool cpe_name_set_sw_edition(struct cpe_name *cpe, const char *newval)
Set CPE name sw_edition field.
no part specified
Definition: cpe_name.h:46
const char * cpe_name_get_target_hw(const struct cpe_name *cpe)
Get CPE name target_hw field.
const char * cpe_name_get_sw_edition(const struct cpe_name *cpe)
Get CPE name sw_edition field.
bool cpe_name_set_format(struct cpe_name *cpe, cpe_format_t newval)
Set how the CPE name was loaded and how it should be saved.
bool cpe_name_set_language(struct cpe_name *cpe, const char *newval)
Set CPE name language field.
bool cpe_name_set_version(struct cpe_name *cpe, const char *newval)
Set CPE name version field.
const char * cpe_name_get_vendor(const struct cpe_name *cpe)
Get CPE name vendor field.
cpe_format_t cpe_name_get_format(const struct cpe_name *cpe)
Get how the CPE name was loaded and how it should be saved.
const char * cpe_name_get_language(const struct cpe_name *cpe)
Get CPE name language field.
cpe_format_t
Definition: cpe_name.h:52
bool cpe_name_set_other(struct cpe_name *cpe, const char *newval)
Set CPE name other field.
bool cpe_name_set_target_hw(struct cpe_name *cpe, const char *newval)
Set CPE name target_hw field.
available in CPE 2.3 and newer versions, default in CPE 2.3 and newer
Definition: cpe_name.h:56
bool cpe_name_check(const char *str)
Checks whether str is valid CPE string (in any supported format).
Definition: cpename.c:633
bool cpe_name_set_vendor(struct cpe_name *cpe, const char *newval)
Set CPE name vendor field.
can't be serialized, is usually used to signal errors
Definition: cpe_name.h:53
application
Definition: cpe_name.h:49
bool cpe_name_set_update(struct cpe_name *cpe, const char *newval)
Set CPE name update field.
bool cpe_name_match_cpes(const struct cpe_name *name, size_t n, struct cpe_name **namelist)
Check if CPE name matches any CPE in namelist.
Definition: cpename.c:547
const char * cpe_name_get_edition(const struct cpe_name *cpe)
Get CPE name edition field.
void cpe_name_free(struct cpe_name *cpe)
Destructor.
Definition: cpename.c:752
cpe_format_t cpe_name_get_format_of_str(const char *str)
Looks at given string and returns format it is in.
Definition: cpename.c:591
Structure holding Common Platform Enumeration URI data.
Definition: cpename.c:69
int cpe_name_write(const struct cpe_name *cpe, FILE *f)
Write CPE URI cpe to file a descriptor f.
Definition: cpename.c:734
const char * cpe_name_get_product(const struct cpe_name *cpe)
Get CPE name product field.
bool cpe_name_set_edition(struct cpe_name *cpe, const char *newval)
Set CPE name edition field.
hardware
Definition: cpe_name.h:47
struct cpe_name * cpe_name_clone(struct cpe_name *old_name)
Clone CPE Name.
Definition: cpename.c:313
char * cpe_name_get_as_str(const struct cpe_name *cpe)
Return CPE URI as a new string in the format in which it was loaded.
Definition: cpename.c:727
cpe_part_t cpe_name_get_part(const struct cpe_name *cpe)
Get CPE name part type field.
available in CPE 2.3 and newer
Definition: cpe_name.h:55
operating system
Definition: cpe_name.h:48
const char * cpe_name_supported(void)
Get supported version of CPE uri XML.
Definition: cpename.c:763
char * cpe_name_get_as_format(const struct cpe_name *cpe, cpe_format_t format)
Return CPE URI as a new string in specified format.
Definition: cpename.c:645
int cpe_name_match_strs(const char *candidate, size_t n, char **targets)
Match CPE URI candidate against list of n CPE URIs given by targets.
Definition: cpename.c:562
bool cpe_name_set_product(struct cpe_name *cpe, const char *newval)
Set CPE name product field.
bool cpe_name_set_target_sw(struct cpe_name *cpe, const char *newval)
Set CPE name target_sw field.
cpe_part_t
enumeration of possible CPE parts
Definition: cpe_name.h:45