Headers for CPE utils.
More...
#include <glib.h>
#include <stdio.h>
Go to the source code of this file.
◆ CPE_COMPONENT_IS_ANY
#define CPE_COMPONENT_IS_ANY |
( |
| component | ) |
|
◆ set_relation
Enumerator |
---|
DISJOINT | |
EQUAL | |
SUBSET | |
SUPERSET | |
UNDEFINED | |
◆ cpe_struct_free()
Free a CPE struct.
- Parameters
-
[in/out] | cpe The CPE to be freed. |
◆ cpe_struct_init()
Initialize a CPE struct.
- Parameters
-
[in/out] | cpe The pointer to the CPE to initialize. |
◆ cpe_struct_match()
Returns if source is a match for target. That means that source is a superset of target.
- Parameters
-
[in] | source | The cpe_struct that represents a set of CPEs. |
[in] | target | The cpe_struct that represents a single CPE or or a set of CPEs that is checked if it is a subset of source meaning that it is matched by source. |
- Returns
- Returns if source is a match for target.
◆ cpe_struct_match_tail()
Returns if the part behind the version of source is a match for that part of target. That means, that source is a superset of target if also the first part matches.
- Parameters
-
[in] | source | The cpe_struct that represents a set of CPEs. |
[in] | target | The cpe_struct that represents a single CPE or or a set of CPEs that is checked if it is a subset of source meaning that it is matched by source. |
- Returns
- Returns if source is a match for target.
◆ cpe_struct_to_fs_cpe()
Convert a CPE struct into a formatted string CPE.
- Parameters
-
[in] | cpe | A pointer to the CPE struct. |
- Returns
- A formatted string CPE.
◆ cpe_struct_to_fs_product()
Convert a CPE struct into a formatted string product.
- Parameters
-
[in] | cpe | A pointer to the CPE struct. |
- Returns
- A formatted string product.
◆ cpe_struct_to_uri_cpe()
Convert a CPE struct into a URI CPE.
- Parameters
-
[in] | cpe | A pointer to the CPE struct. |
- Returns
- A CPE v2.2-conformant URI.
◆ cpe_struct_to_uri_product()
char * cpe_struct_to_uri_product |
( |
const cpe_struct_t * | cpe | ) |
|
Convert a CPE struct into a URI product.
- Parameters
-
[in] | cpe | A pointer to the CPE struct. |
- Returns
- A CPE v2.2-conformant URI product.
◆ fs_cpe_to_cpe_struct()
void fs_cpe_to_cpe_struct |
( |
const char * | fs_cpe, |
|
|
cpe_struct_t * | cpe ) |
Read a formatted string CPE into the CPE struct.
- Parameters
-
[in] | fs_cpe | A formatted string CPE. |
[out] | cpe | Pointer to the filled CPE struct. |
◆ fs_cpe_to_uri_cpe()
char * fs_cpe_to_uri_cpe |
( |
const char * | fs_cpe | ) |
|
Convert a formatted string CPE to a URI CPE.
- Parameters
-
[in] | fs_cpe | A formatted string CPE. |
- Returns
- A CPE v2.2-conformant URI.
◆ fs_cpe_to_uri_product()
char * fs_cpe_to_uri_product |
( |
const char * | fs_cpe | ) |
|
Convert a formatted string CPE to an URI product.
- Parameters
-
[in] | fs_cpe | A formatted string CPE. |
- Returns
- An URI product.
◆ get_version_from_uri_cpe()
char * get_version_from_uri_cpe |
( |
const char * | uri_cpe | ) |
|
Get the version from an uri cpe.
- Parameters
-
[in] | uri_cpe | The uri cpe to get the version from. |
- Returns
- The version of the uri cpe.
◆ uri_cpe_to_cpe_struct()
void uri_cpe_to_cpe_struct |
( |
const char * | uri_cpe, |
|
|
cpe_struct_t * | cpe ) |
Read a URI CPE into the CPE struct.
- Parameters
-
[in] | uri_cpe | A CPE v2.2-conformant URI. |
[out] | cpe | Pointer to the filled CPE struct. |
◆ uri_cpe_to_fs_cpe()
char * uri_cpe_to_fs_cpe |
( |
const char * | uri_cpe | ) |
|
Convert a URI CPE to a formatted string CPE.
- Parameters
-
[in] | uri_cpe | A CPE v2.2-conformant URI. |
- Returns
- A formatted string CPE.
◆ uri_cpe_to_fs_product()
char * uri_cpe_to_fs_product |
( |
const char * | uri_cpe | ) |
|
Convert a URI CPE to a formatted string product.
- Parameters
-
[in] | uri_cpe | A CPE v2.2-conformant URI. |
- Returns
- A formatted string product.
◆ uri_cpe_to_uri_product()
char * uri_cpe_to_uri_product |
( |
const char * | uri_cpe | ) |
|
Convert a URI CPE to a formatted string product.
- Parameters
-
[in] | uri_cpe | A CPE v2.2-conformant URI. |
- Returns
- A CPE v2.2-conformant URI product.