/home/pvrabec/project/openscap/openscap-0.6.0/src/OVAL/probes/probe-cache.c File Reference
probe cache API implementation
More...
#include <seap.h>
#include <string.h>
#include <assume.h>
#include <alloc.h>
#include "SEAP/generic/rbt/rbt.h"
#include "probe-cache.h"
Detailed Description
probe cache API implementation
- Author:
- "Daniel Kopecek" <dkopecek@redhat.com>
Function Documentation
int pcache_cstr_add |
( |
pcache_t * |
cache, |
|
|
const char * |
id, |
|
|
SEXP_t * |
item | |
|
) |
| | |
Add a new S-exp to the cache identified by a C string.
- Parameters:
-
| cache | probe cache |
| id | C string containing the id |
| item | the S-exp (item) to be stored in the cache |
- Return values:
-
| 0 | on success |
| -1 | on failure |
int pcache_cstr_del |
( |
pcache_t * |
cache, |
|
|
const char * |
id | |
|
) |
| | |
Delete an S-exp from the cache identified by a C string.
- Parameters:
-
| cache | probe cache |
| id | C string containing the id |
| item | the S-exp (item) to be stored in the cache |
- Return values:
-
| 0 | on success |
| -1 | on failure |
Get a reference to an cached S-exp identified by a C string.
- Parameters:
-
| cache | probe cache |
| id | C string containing the id |
| item | the S-exp (item) to be stored in the cache |
- Return values:
-
| S-exp | reference to the requested item |
Free the probe cache.
This function frees the memory used to store the probe cache items and also the items themselves.
- Parameters:
-
| cache | the cache to be freed |
Create a new probe cache.
- Returns:
- probe cache pointer or NULL on failure
Add a new S-exp to the cache identified by an S-exp string.
- Parameters:
-
| cache | probe cache |
| id | S-exp string object containing the id |
| item | the S-exp (item) to be stored in the cache |
- Return values:
-
| 0 | on success |
| -1 | on failure |
Delete an S-exp from the cache identified by an S-exp string.
- Parameters:
-
| cache | probe cache |
| id | S-exp string object containing the id |
| item | the S-exp (item) to be stored in the cache |
- Return values:
-
| 0 | on success |
| -1 | on failure |
Get a reference to an cached S-exp identified by an S-exp string.
- Parameters:
-
| cache | probe cache |
| id | S-exp string object containing the id |
| item | the S-exp (item) to be stored in the cache |
- Return values:
-
| S-exp | reference to the requested item |