/home/pvrabec/project/openscap/openscap-0.6.0/src/OVAL/probes/probe-cache.h File Reference
probe cache API header file
More...
#include <stdbool.h>
#include <pthread.h>
#include <sexp-types.h>
#include <../../common/util.h>
#include "SEAP/generic/rbt/rbt.h"
Go to the source code of this file.
Detailed Description
probe cache API header file
- 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 |