OpenDNSSEC-enforcer
2.1.4
|
Go to the source code of this file.
Data Structures | |
struct | db_result |
struct | db_result_list |
Typedefs | |
typedef struct db_result | db_result_t |
typedef struct db_result_list | db_result_list_t |
typedef db_result_t *(* | db_result_list_next_t) (void *data, int finish) |
typedef db_result_t*(* db_result_list_next_t) (void *data, int finish) |
Function pointer for walking a db_result_list. The backend handle specific data is supplied in data
and setting finish
to non-zero tells the backend that we are finished with the db_result_list.
[in] | data | a void pointer for the backend specific data. |
[in] | finish | an integer that if non-zero will tell the backend that we are finished with the result list. |
Definition at line 47 of file db_result.h.
typedef struct db_result_list db_result_list_t |
Definition at line 36 of file db_result.h.
typedef struct db_result db_result_t |
Definition at line 35 of file db_result.h.
int db_result_copy | ( | db_result_t * | result, |
const db_result_t * | from_result | ||
) |
Copy the content of another database result.
[in] | result | a db_result_t pointer. |
[in] | from_result | a db_result_t pointer. |
Definition at line 73 of file db_result.c.
void db_result_free | ( | db_result_t * | result | ) |
Delete a database result and the backend meta data list if set.
[in] | result | a db_result_t pointer. |
Definition at line 63 of file db_result.c.
Referenced by clean_suite_classes(), and test_class_end().
int db_result_list_add | ( | db_result_list_t * | result_list, |
db_result_t * | result | ||
) |
Add a database result to a database result list, this will takes over the ownership of the database result.
[in] | result_list | a db_result_list_t pointer. |
[in] | result | a db_result_t pointer. |
Definition at line 257 of file db_result.c.
const db_result_t* db_result_list_begin | ( | db_result_list_t * | result_list | ) |
Return the first database result in a database result list and reset the position of the list.
[in] | result_list | a db_result_list_t pointer. |
Definition at line 290 of file db_result.c.
int db_result_list_copy | ( | db_result_list_t * | result_list, |
const db_result_list_t * | from_result_list | ||
) |
free global allocator. db_result_list_free MUST be called for all its contents. Copy the content of another database result list.
[in] | result_list | a db_result_list_t pointer. |
Definition at line 183 of file db_result.c.
int db_result_list_fetch_all | ( | db_result_list_t * | result_list | ) |
Make sure that all objects in this database result list is loaded into memory so that db_result_list_begin() can be used to iterate over the list multiple times.
[in] | result_list | a db_result_list_t pointer. |
Definition at line 341 of file db_result.c.
Referenced by database_version_list_get(), key_data_list_get(), policy_list_get(), and zone_list_db_get().
void db_result_list_free | ( | db_result_list_t * | result_list | ) |
Delete a database result list and all database results within the list.
[in] | result_list | a db_result_list_t pointer. |
Definition at line 160 of file db_result.c.
Referenced by clean_suite_classes(), database_version_list_free(), database_version_list_get(), hsm_key_list_copy(), hsm_key_list_free(), key_data_list_copy(), key_data_list_free(), key_data_list_get(), key_dependency_list_copy(), key_dependency_list_free(), key_state_list_copy(), key_state_list_free(), policy_key_list_copy(), policy_key_list_free(), policy_list_copy(), policy_list_free(), policy_list_get(), test_list_free(), test_list_get(), zone_list_db_copy(), zone_list_db_free(), and zone_list_db_get().
db_result_list_t* db_result_list_new | ( | void | ) |
Create a new database result list.
Definition at line 134 of file db_result.c.
db_result_list_t* db_result_list_new_copy | ( | const db_result_list_t * | from_result_list | ) |
Create a new database result list that is a copy of another.
[in] | from_result_list | a db_result_list_t pointer. |
Definition at line 142 of file db_result.c.
Referenced by hsm_key_list_copy(), key_data_list_copy(), key_dependency_list_copy(), key_state_list_copy(), policy_key_list_copy(), policy_list_copy(), and zone_list_db_copy().
const db_result_t* db_result_list_next | ( | db_result_list_t * | result_list | ) |
Return the next database result in a database result list.
[in] | result_list | a db_result_list_t pointer. |
Definition at line 310 of file db_result.c.
int db_result_list_set_next | ( | db_result_list_t * | result_list, |
db_result_list_next_t | next_function, | ||
void * | next_data, | ||
size_t | size | ||
) |
Set the function pointer for fetching the next database result for a database result list. The backend handle specific data is supplied in next_data
along with the total size of the result list in size
.
[in] | result_list | a db_result_list_t pointer. |
[in] | next_function | a db_result_list_next_t function pointer. |
[in] | next_data | a void pointer. |
[in] | size | a size_t. |
Definition at line 234 of file db_result.c.
size_t db_result_list_size | ( | const db_result_list_t * | result_list | ) |
Return the size of the database result list.
[in] | result_list | a db_result_list_t pointer. |
Definition at line 333 of file db_result.c.
Referenced by key_data_list_size(), key_dependency_list_size(), policy_key_list_size(), and zone_list_db_size().
db_result_t* db_result_new | ( | void | ) |
Create a new database result.
Definition at line 38 of file db_result.c.
db_result_t* db_result_new_copy | ( | const db_result_t * | from_result | ) |
Create a new database result that is a copy of another.
[in] | from_result | a db_result_t pointer. |
Definition at line 46 of file db_result.c.
int db_result_not_empty | ( | const db_result_t * | result | ) |
Check if a database result is not empty.
[in] | result | a db_result_t pointer. |
Definition at line 120 of file db_result.c.
int db_result_set_value_set | ( | db_result_t * | result, |
db_value_set_t * | value_set | ||
) |
Set the value set of a database result.
[in] | result | a db_result_t pointer. |
[in] | value_set | a db_value_set_t pointer. |
Definition at line 105 of file db_result.c.
const db_value_set_t* db_result_value_set | ( | const db_result_t * | result | ) |
Get the value set of a database result.
[in] | result | a db_result_t pointer. |
Definition at line 97 of file db_result.c.