Data Structures | |
struct | cpe_name |
Structure holding Common Platform Enumeration URI data. More... | |
Files | |
file | cpeuri.h |
Interface to Common Platform Enumeration (CPE) URI. | |
Enumerations | |
enum | cpe_part_t { CPE_PART_NONE, CPE_PART_HW, CPE_PART_OS, CPE_PART_APP } |
enumeration of possible CPE parts More... | |
Functions | |
struct cpe_name * | cpe_name::cpe_name_new (const char *cpe) |
Create a new CPE structure from string cpe. | |
void | cpe_name::cpe_name_free (struct cpe_name *cpe) |
Destructor. | |
cpe_part_t | cpe_name::cpe_name_get_part (const struct cpe_name *cpe) |
Get CPE name part type field. | |
const char * | cpe_name::cpe_name_get_vendor (const struct cpe_name *cpe) |
Get CPE name vendor field. | |
const char * | cpe_name::cpe_name_get_product (const struct cpe_name *cpe) |
Get CPE name product field. | |
const char * | cpe_name::cpe_name_get_version (const struct cpe_name *cpe) |
Get CPE name version field. | |
const char * | cpe_name::cpe_name_get_update (const struct cpe_name *cpe) |
Get CPE name update field. | |
const char * | cpe_name::cpe_name_get_edition (const struct cpe_name *cpe) |
Get CPE name edition field. | |
const char * | cpe_name::cpe_name_get_language (const struct cpe_name *cpe) |
Get CPE name language field. | |
bool | cpe_name::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. | |
bool | cpe_name::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. | |
char * | cpe_name::cpe_name_get_uri (const struct cpe_name *cpe) |
Return CPE URI as a new string. | |
int | cpe_name::cpe_name_write (const struct cpe_name *cpe, FILE *f) |
Write CPE URI cpe to file a descriptor f. | |
bool | cpe_name::cpe_name_check (const char *str) |
Ensures str is in proper CPE format. | |
int | cpe_name::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. |
enum cpe_part_t |
bool cpe_name_check | ( | const char * | str | ) | [related, inherited] |
Ensures str is in proper CPE format.
str | string to be validated |
void cpe_name_free | ( | struct cpe_name * | cpe | ) | [related, inherited] |
Destructor.
Frees any used resources and safely destroys cpe.
cpe | CPE to be deleted |
char * cpe_name_get_uri | ( | const struct cpe_name * | cpe | ) | [related, inherited] |
Return CPE URI as a new string.
cpe | CPE to be converted |
NULL | on failure |
bool cpe_name_match_cpes | ( | const struct cpe_name * | name, | |
size_t | n, | |||
struct cpe_name ** | namelist | |||
) | [related, inherited] |
Check if CPE name matches any CPE in namelist.
name | name to be looked-up | |
n | number of items in namelist | |
namelist | list of names to search in |
int cpe_name_match_strs | ( | const char * | candidate, | |
size_t | n, | |||
char ** | targets | |||
) | [related, inherited] |
Match CPE URI candidate against list of n CPE URIs given by targets.
candidate | candidarte CPE URI as string | |
n | number of items in targets | |
targets | list of CPE URIs to be candidate matched against |
-1 | on mismatch | |
-2 | invalid CPE URI was given as parameter |
struct cpe_name * cpe_name_new | ( | const char * | cpe | ) | [related, inherited] |
Create a new CPE structure from string cpe.
cpe | CPE URI string to be parsed |
NULL | on failure |
int cpe_name_write | ( | const struct cpe_name * | cpe, | |
FILE * | f | |||
) | [related, inherited] |
Write CPE URI cpe to file a descriptor f.
cpe | cpe to write | |
f | file descriptor to write CPE URI to |
<0 | on failure |