OpenDNSSEC-enforcer
2.1.12
|
Go to the source code of this file.
Data Structures | |
struct | db_value |
struct | db_value_set |
Macros | |
#define | DB_VALUE_EMPTY { DB_TYPE_EMPTY, 0, NULL, 0, 0, 0, 0, 0, NULL } |
Typedefs | |
typedef struct db_value | db_value_t |
typedef struct db_value_set | db_value_set_t |
#define DB_VALUE_EMPTY { DB_TYPE_EMPTY, 0, NULL, 0, 0, 0, 0, 0, NULL } |
Definition at line 60 of file db_value.h.
typedef struct db_value_set db_value_set_t |
Definition at line 1 of file db_value.h.
typedef struct db_value db_value_t |
Definition at line 1 of file db_value.h.
int db_value_cmp | ( | const db_value_t * | value_a, |
const db_value_t * | value_b, | ||
int * | result | ||
) |
Compare two database values A and B. Sets result
with less than, equal to, or greater than zero if A is found, respectively, to be less than, to match, or be greater than B.
[in] | value_a | a db_value_t pointer. |
[in] | value_b | a db_value_t pointer. |
[out] | result | an integer pointer. |
Definition at line 102 of file db_value.c.
Referenced by key_data_cmp(), and policy_key_cmp().
int db_value_copy | ( | db_value_t * | value, |
const db_value_t * | from_value | ||
) |
Copy the contant from one database value into another.
[in] | value | a db_value_t pointer to copy to. |
[in] | from_value | a db_value_t pointer to copy from. |
Definition at line 77 of file db_value.c.
Referenced by hsm_key_copy(), hsm_key_set_policy_id(), key_data_copy(), key_data_set_hsm_key_id(), key_data_set_zone_id(), key_dependency_copy(), key_dependency_set_from_key_data_id(), key_dependency_set_to_key_data_id(), key_dependency_set_zone_id(), key_state_copy(), key_state_set_key_data_id(), policy_copy(), policy_key_copy(), policy_key_set_policy_id(), zone_db_copy(), and zone_db_set_policy_id().
int db_value_enum_value | ( | const db_value_t * | value, |
int * | enum_value | ||
) |
Sets enum_value
with the integer value of an enumeration database value.
[in] | value | a db_value_t pointer. |
[out] | enum_value | an integer pointer. |
Definition at line 332 of file db_value.c.
void db_value_free | ( | db_value_t * | value | ) |
Delete a database value.
[in] | value | a db_value_t pointer. |
Definition at line 51 of file db_value.c.
int db_value_from_enum_value | ( | db_value_t * | value, |
int | enum_value, | ||
const db_enum_t * | enum_set | ||
) |
Set the database value to an enumeration value based on an integer value.
[in] | value | a db_value_t pointer. |
[in] | enum_value | an integer pointer. |
[in] | enum_set | a db_enum_t array that MUST end with NULL. |
Definition at line 572 of file db_value.c.
int db_value_from_int32 | ( | db_value_t * | value, |
db_type_int32_t | from_int32 | ||
) |
Set the database value to a 32bit integer value.
[in] | value | a db_value_t pointer. |
[in] | from_int32 | a db_type_int32_t pointer. |
Definition at line 479 of file db_value.c.
int db_value_from_int64 | ( | db_value_t * | value, |
db_type_int64_t | from_int64 | ||
) |
Set the database value to a 64bit integer value.
[in] | value | a db_value_t pointer. |
[in] | from_int64 | a db_type_int64_t pointer. |
Definition at line 505 of file db_value.c.
int db_value_from_text | ( | db_value_t * | value, |
const char * | from_text | ||
) |
Set the database value to a text value.
[in] | value | a db_value_t pointer. |
[in] | from_text | a character pointer. |
Definition at line 531 of file db_value.c.
int db_value_from_text2 | ( | db_value_t * | value, |
const char * | from_text, | ||
size_t | size | ||
) |
Set the database value to a text value.
[in] | value | a db_value_t pointer. |
[in] | from_text | a character pointer. |
[in] | size | a size_t. |
Definition at line 550 of file db_value.c.
int db_value_from_uint32 | ( | db_value_t * | value, |
db_type_uint32_t | from_uint32 | ||
) |
Set the database value to an unsigned 32bit integer value.
[in] | value | a db_value_t pointer. |
[in] | from_uint32 | a db_type_uint32_t pointer. |
Definition at line 492 of file db_value.c.
int db_value_from_uint64 | ( | db_value_t * | value, |
db_type_uint64_t | from_uint64 | ||
) |
Set the database value to an unsigned 64bit integer value.
[in] | value | a db_value_t pointer. |
[in] | from_uint64 | a db_type_uint64_t pointer. |
Definition at line 518 of file db_value.c.
const db_type_int32_t* db_value_int32 | ( | const db_value_t * | value | ) |
Get a pointer for the 32bit integer in a database value.
[in] | value | a db_value_t pointer. |
Definition at line 277 of file db_value.c.
const db_type_int64_t* db_value_int64 | ( | const db_value_t * | value | ) |
Get a pointer for the 64bit integer in a database value.
[in] | value | a db_value_t pointer. |
Definition at line 299 of file db_value.c.
db_value_t* db_value_new | ( | void | ) |
Create a new database value.
Definition at line 40 of file db_value.c.
int db_value_not_empty | ( | const db_value_t * | value | ) |
Check if a database value is not empty.
[in] | value | a db_value_t pointer. |
Definition at line 347 of file db_value.c.
Referenced by hsm_key_set_policy_id(), key_data_get_hsm_key(), key_data_get_zone(), key_data_set_hsm_key_id(), key_data_set_zone_id(), key_dependency_get_from_key_data(), key_dependency_set_from_key_data_id(), key_dependency_set_to_key_data_id(), key_dependency_set_zone_id(), key_state_set_key_data_id(), policy_get_policy_keys(), policy_key_set_policy_id(), zone_db_get_key_dependencies(), zone_db_get_keys(), zone_db_get_policy(), and zone_db_set_policy_id().
void db_value_reset | ( | db_value_t * | value | ) |
Reset a database value, releasing all interal resources and marking it empty.
[in] | value | a db_value_t pointer. |
Definition at line 60 of file db_value.c.
Referenced by database_version_free(), hsm_key_free(), hsm_key_set_policy_id(), key_data_free(), key_data_set_hsm_key_id(), key_data_set_zone_id(), key_dependency_free(), key_dependency_set_from_key_data_id(), key_dependency_set_to_key_data_id(), key_dependency_set_zone_id(), key_state_free(), key_state_set_key_data_id(), policy_free(), policy_key_free(), policy_key_reset(), policy_key_set_policy_id(), zone_db_free(), and zone_db_set_policy_id().
const db_value_t* db_value_set_at | ( | const db_value_set_t * | value_set, |
size_t | at | ||
) |
Get a read only database value at a position in a database value set.
[in] | value_set | a db_value_set_t pointer. |
[in] | at | a size_t. |
Definition at line 742 of file db_value.c.
void db_value_set_free | ( | db_value_set_t * | value_set | ) |
Delete a database value set and all values within the set.
[in] | value_set | a db_value_set_t pointer. |
Definition at line 697 of file db_value.c.
db_value_t* db_value_set_get | ( | db_value_set_t * | value_set, |
size_t | at | ||
) |
Get a writable database value at a position in a database value set.
[in] | value_set | a db_value_set_t pointer. |
[in] | at | a size_t. |
Definition at line 756 of file db_value.c.
db_value_set_t* db_value_set_new | ( | size_t | size | ) |
Create a new set of database value.
[in] | size | a size_t. |
Definition at line 622 of file db_value.c.
db_value_set_t* db_value_set_new_copy | ( | const db_value_set_t * | from_value_set | ) |
Create a new set of database value that is a copy of another.
[in] | from_value_set | a db_value_set_t pointer. |
Definition at line 670 of file db_value.c.
int db_value_set_primary_key | ( | db_value_t * | value | ) |
Mark the database as a primary key.
[in] | value | a db_value_t pointer. |
Definition at line 595 of file db_value.c.
size_t db_value_set_size | ( | const db_value_set_t * | value_set | ) |
Get the size of database value set.
[in] | value_set | a db_value_set_t pointer. |
Definition at line 734 of file db_value.c.
const char* db_value_text | ( | const db_value_t * | value | ) |
Get a character pointer for the text in a database value.
[in] | value | a db_value_t pointer. |
Definition at line 321 of file db_value.c.
Referenced by __check_id().
int db_value_to_enum_value | ( | const db_value_t * | value, |
int * | to_int, | ||
const db_enum_t * | enum_set | ||
) |
Get the integer enumeration representation of the database value.
[in] | value | a db_value_t pointer. |
[out] | to_int | an integer pointer. |
[in] | enum_set | a db_enum_t array that MUST end with NULL. |
Definition at line 438 of file db_value.c.
int db_value_to_int32 | ( | const db_value_t * | value, |
db_type_int32_t * | to_int32 | ||
) |
Get the 32bit integer representation of the database value.
[in] | value | a db_value_t pointer. |
[out] | to_int32 | a db_type_int32_t pointer. |
Definition at line 357 of file db_value.c.
Referenced by __check_id().
int db_value_to_int64 | ( | const db_value_t * | value, |
db_type_int64_t * | to_int64 | ||
) |
Get the 64bit integer representation of the database value.
[in] | value | a db_value_t pointer. |
[out] | to_int64 | a db_type_int64_t pointer. |
Definition at line 387 of file db_value.c.
Referenced by __check_id().
int db_value_to_text | ( | const db_value_t * | value, |
char ** | to_text | ||
) |
Get the character representation of the database value.
[in] | value | a db_value_t pointer. |
[out] | to_text | a character pointer pointer. |
Definition at line 417 of file db_value.c.
int db_value_to_uint32 | ( | const db_value_t * | value, |
db_type_uint32_t * | to_uint32 | ||
) |
Get the unsigned 32bit integer representation of the database value.
[in] | value | a db_value_t pointer. |
[out] | to_uint32 | a db_type_uint32_t pointer. |
Definition at line 372 of file db_value.c.
Referenced by __check_id().
int db_value_to_uint64 | ( | const db_value_t * | value, |
db_type_uint64_t * | to_uint64 | ||
) |
Get the unsigned 64bit integer representation of the database value.
[in] | value | a db_value_t pointer. |
[out] | to_uint64 | a db_type_uint64_t pointer. |
Definition at line 402 of file db_value.c.
Referenced by __check_id().
db_type_t db_value_type | ( | const db_value_t * | value | ) |
Get the type of a database value.
[in] | value | a db_value_t pointer. |
Definition at line 269 of file db_value.c.
Referenced by __check_id().
const db_type_uint32_t* db_value_uint32 | ( | const db_value_t * | value | ) |
Get a pointer for the unsigned 32bit integer in a database value.
[in] | value | a db_value_t pointer. |
Definition at line 288 of file db_value.c.
const db_type_uint64_t* db_value_uint64 | ( | const db_value_t * | value | ) |
Get a pointer for the unsigned 64bit integer in a database value.
[in] | value | a db_value_t pointer. |
Definition at line 310 of file db_value.c.