292 if (!(zone->
dbo = __zone_db_new_object(connection))) {
366 char* name_text = NULL;
367 char* signconf_path_text = NULL;
368 char* input_adapter_type_text = NULL;
369 char* input_adapter_uri_text = NULL;
370 char* output_adapter_type_text = NULL;
371 char* output_adapter_uri_text = NULL;
380 if (zone_copy->
name) {
381 if (!(name_text = strdup(zone_copy->
name))) {
386 if (!(signconf_path_text = strdup(zone_copy->
signconf_path))) {
398 if (signconf_path_text) {
399 free(signconf_path_text);
409 if (signconf_path_text) {
410 free(signconf_path_text);
412 if (input_adapter_type_text) {
413 free(input_adapter_type_text);
423 if (signconf_path_text) {
424 free(signconf_path_text);
426 if (input_adapter_type_text) {
427 free(input_adapter_type_text);
429 if (input_adapter_uri_text) {
430 free(input_adapter_uri_text);
440 if (signconf_path_text) {
441 free(signconf_path_text);
443 if (input_adapter_type_text) {
444 free(input_adapter_type_text);
446 if (input_adapter_uri_text) {
447 free(input_adapter_uri_text);
449 if (output_adapter_type_text) {
450 free(output_adapter_type_text);
459 if (signconf_path_text) {
460 free(signconf_path_text);
462 if (input_adapter_type_text) {
463 free(input_adapter_type_text);
465 if (input_adapter_uri_text) {
466 free(input_adapter_uri_text);
468 if (output_adapter_type_text) {
469 free(output_adapter_type_text);
471 if (output_adapter_uri_text) {
472 free(output_adapter_uri_text);
480 if (signconf_path_text) {
481 free(signconf_path_text);
483 if (input_adapter_type_text) {
484 free(input_adapter_type_text);
486 if (input_adapter_uri_text) {
487 free(input_adapter_uri_text);
489 if (output_adapter_type_text) {
490 free(output_adapter_type_text);
492 if (output_adapter_uri_text) {
493 free(output_adapter_uri_text);
501 if (signconf_path_text) {
502 free(signconf_path_text);
504 if (input_adapter_type_text) {
505 free(input_adapter_type_text);
507 if (input_adapter_uri_text) {
508 free(input_adapter_uri_text);
510 if (output_adapter_type_text) {
511 free(output_adapter_type_text);
513 if (output_adapter_uri_text) {
514 free(output_adapter_uri_text);
528 if (signconf_path_text) {
529 free(signconf_path_text);
531 if (input_adapter_type_text) {
532 free(input_adapter_type_text);
534 if (input_adapter_uri_text) {
535 free(input_adapter_uri_text);
537 if (output_adapter_type_text) {
538 free(output_adapter_type_text);
540 if (output_adapter_uri_text) {
541 free(output_adapter_uri_text);
553 if (signconf_path_text) {
554 free(signconf_path_text);
556 if (input_adapter_type_text) {
557 free(input_adapter_type_text);
559 if (input_adapter_uri_text) {
560 free(input_adapter_uri_text);
562 if (output_adapter_type_text) {
563 free(output_adapter_type_text);
565 if (output_adapter_uri_text) {
566 free(output_adapter_uri_text);
580 if (signconf_path_text) {
581 free(signconf_path_text);
583 if (input_adapter_type_text) {
584 free(input_adapter_type_text);
586 if (input_adapter_uri_text) {
587 free(input_adapter_uri_text);
589 if (output_adapter_type_text) {
590 free(output_adapter_type_text);
592 if (output_adapter_uri_text) {
593 free(output_adapter_uri_text);
607 if (signconf_path_text) {
608 free(signconf_path_text);
610 if (input_adapter_type_text) {
611 free(input_adapter_type_text);
613 if (input_adapter_uri_text) {
614 free(input_adapter_uri_text);
616 if (output_adapter_type_text) {
617 free(output_adapter_type_text);
619 if (output_adapter_uri_text) {
620 free(output_adapter_uri_text);
627 zone->
name = name_text;
947 if (!(new_name = strdup(name_text))) {
954 zone->
name = new_name;
970 char* new_signconf_path;
975 if (!signconf_path_text) {
979 if (!(new_signconf_path = strdup(signconf_path_text))) {
1062 char* new_input_adapter_type;
1067 if (!input_adapter_type_text) {
1071 if (!(new_input_adapter_type = strdup(input_adapter_type_text))) {
1084 char* new_input_adapter_uri;
1089 if (!input_adapter_uri_text) {
1093 if (!(new_input_adapter_uri = strdup(input_adapter_uri_text))) {
1106 char* new_output_adapter_type;
1111 if (!output_adapter_type_text) {
1115 if (!(new_output_adapter_type = strdup(output_adapter_type_text))) {
1128 char* new_output_adapter_uri;
1133 if (!output_adapter_uri_text) {
1137 if (!(new_output_adapter_uri = strdup(output_adapter_uri_text))) {
1951 if (!(zone_list->
dbo = __zone_db_new_object(connection))) {
1963 if (!from_zone_list) {
1966 if (!from_zone_list->
dbo) {
1993 if (zone_list->
dbo) {
1999 if (zone_list->
zone) {
2023 if (!from_zone_list) {
2078 static int zone_list_db_get_associated(
zone_list_db_t* zone_list) {
2095 if (!zone_list->
dbo) {
2120 while (clause_walk) {
2166 while (policy_policy_id) {
2369 if (!zone_list->
dbo) {
2395 && zone_list_db_get_associated(zone_list))
2428 if (!zone_list->
dbo) {
2454 && zone_list_db_get_associated(zone_list))
2469 if (!zone_list->
dbo) {
2517 && zone_list_db_get_associated(zone_list))
2592 if (!zone_list->
zone) {
2600 return zone_list->
zone;
2658 if (!zone_list->
zone) {
2666 return zone_list->
zone;
db_clause_t * db_clause_new(void)
void db_clause_free(db_clause_t *clause)
db_value_t * db_clause_get_value(db_clause_t *clause)
db_clause_list_t * db_clause_list_new(void)
const db_clause_t * db_clause_list_begin(const db_clause_list_t *clause_list)
const db_value_t * db_clause_value(const db_clause_t *clause)
int db_clause_list_add(db_clause_list_t *clause_list, db_clause_t *clause)
void db_clause_list_free(db_clause_list_t *clause_list)
int db_clause_set_operator(db_clause_t *clause, db_clause_operator_t clause_operator)
int db_clause_set_field(db_clause_t *clause, const char *field)
const db_clause_t * db_clause_next(const db_clause_t *clause)
int db_clause_set_type(db_clause_t *clause, db_clause_type_t type)
db_object_t * db_object_new(void)
int db_object_update(const db_object_t *object, const db_object_field_list_t *object_field_list, const db_value_set_t *value_set, const db_clause_list_t *clause_list)
int db_object_field_list_add(db_object_field_list_t *object_field_list, db_object_field_t *object_field)
db_object_field_t * db_object_field_new(void)
const db_connection_t * db_object_connection(const db_object_t *object)
int db_object_set_table(db_object_t *object, const char *table)
int db_object_field_set_name(db_object_field_t *object_field, const char *name)
int db_object_set_connection(db_object_t *object, const db_connection_t *connection)
int db_object_field_set_type(db_object_field_t *object_field, db_type_t type)
db_object_field_list_t * db_object_field_list_new(void)
void db_object_free(db_object_t *object)
int db_object_set_object_field_list(db_object_t *object, db_object_field_list_t *object_field_list)
void db_object_field_free(db_object_field_t *object_field)
int db_object_create(const db_object_t *object, const db_object_field_list_t *object_field_list, const db_value_set_t *value_set)
int db_object_delete(const db_object_t *object, const db_clause_list_t *clause_list)
void db_object_field_list_free(db_object_field_list_t *object_field_list)
int db_object_count(const db_object_t *object, const db_join_list_t *join_list, const db_clause_list_t *clause_list, size_t *count)
int db_object_set_primary_key_name(db_object_t *object, const char *primary_key_name)
db_result_list_t * db_object_read(const db_object_t *object, const db_join_list_t *join_list, const db_clause_list_t *clause_list)
int db_result_list_fetch_all(db_result_list_t *result_list)
size_t db_result_list_size(const db_result_list_t *result_list)
const db_result_t * db_result_list_begin(db_result_list_t *result_list)
const db_result_t * db_result_list_next(db_result_list_t *result_list)
const db_value_set_t * db_result_value_set(const db_result_t *result)
void db_result_list_free(db_result_list_t *result_list)
db_result_list_t * db_result_list_new_copy(const db_result_list_t *from_result_list)
int db_value_to_int32(const db_value_t *value, db_type_int32_t *to_int32)
void db_value_set_free(db_value_set_t *value_set)
int db_value_from_uint32(db_value_t *value, db_type_uint32_t from_uint32)
int db_value_from_text(db_value_t *value, const char *from_text)
int db_value_from_int32(db_value_t *value, db_type_int32_t from_int32)
int db_value_copy(db_value_t *value, const db_value_t *from_value)
int db_value_cmp(const db_value_t *value_a, const db_value_t *value_b, int *result)
size_t db_value_set_size(const db_value_set_t *value_set)
int db_value_to_uint32(const db_value_t *value, db_type_uint32_t *to_uint32)
int db_value_to_text(const db_value_t *value, char **to_text)
const db_value_t * db_value_set_at(const db_value_set_t *value_set, size_t at)
int db_value_not_empty(const db_value_t *value)
db_value_set_t * db_value_set_new(size_t size)
void db_value_reset(db_value_t *value)
db_value_t * db_value_set_get(db_value_set_t *value_set, size_t at)
const key_data_t * key_data_list_next(key_data_list_t *key_data_list)
const key_data_t * key_data_list_begin(key_data_list_t *key_data_list)
int key_data_list_get_by_clauses(key_data_list_t *key_data_list, const db_clause_list_t *clause_list)
void key_data_list_free(key_data_list_t *key_data_list)
const db_value_t * key_data_zone_id(const key_data_t *key_data)
int key_data_list_object_store(key_data_list_t *key_data_list)
key_data_t * key_data_new_copy(const key_data_t *key_data)
key_data_list_t * key_data_list_new_copy(const key_data_list_t *from_key_data_list)
key_data_list_t * key_data_list_new(const db_connection_t *connection)
int key_dependency_list_object_store(key_dependency_list_t *key_dependency_list)
const key_dependency_t * key_dependency_list_next(key_dependency_list_t *key_dependency_list)
const db_value_t * key_dependency_zone_id(const key_dependency_t *key_dependency)
key_dependency_list_t * key_dependency_list_new(const db_connection_t *connection)
key_dependency_list_t * key_dependency_list_new_copy(const key_dependency_list_t *from_key_dependency_list)
int key_dependency_list_get_by_clauses(key_dependency_list_t *key_dependency_list, const db_clause_list_t *clause_list)
const key_dependency_t * key_dependency_list_begin(key_dependency_list_t *key_dependency_list)
key_dependency_t * key_dependency_new_copy(const key_dependency_t *key_dependency)
void key_dependency_list_free(key_dependency_list_t *key_dependency_list)
policy_list_t * policy_list_new_copy(const policy_list_t *from_policy_list)
const policy_t * policy_list_next(policy_list_t *policy_list)
void policy_list_free(policy_list_t *policy_list)
const db_value_t * policy_id(const policy_t *policy)
int policy_copy(policy_t *policy, const policy_t *policy_copy)
int policy_list_object_store(policy_list_t *policy_list)
policy_t * policy_new_copy(const policy_t *policy)
int policy_list_get_by_clauses(policy_list_t *policy_list, const db_clause_list_t *clause_list)
policy_list_t * policy_list_new(const db_connection_t *connection)
int policy_get_by_id(policy_t *policy, const db_value_t *id)
const policy_t * policy_list_begin(policy_list_t *policy_list)
void policy_free(policy_t *policy)
policy_t * policy_new(const db_connection_t *connection)
key_data_t ** object_list
key_dependency_t ** object_list
policy_t * private_policy_id
unsigned int next_zsk_roll
unsigned int roll_csk_now
char * output_adapter_uri
unsigned int roll_ksk_now
unsigned int next_csk_roll
unsigned int signconf_needs_writing
unsigned int roll_zsk_now
key_data_list_t * key_data_list
unsigned int next_ksk_roll
char * output_adapter_type
char * input_adapter_type
key_dependency_list_t * key_dependency_list
const policy_t * associated_policy_id
size_t object_list_position
policy_list_t * policy_id_list
db_result_list_t * result_list
unsigned int zone_db_roll_zsk_now(const zone_db_t *zone)
int zone_db_set_input_adapter_type(zone_db_t *zone, const char *input_adapter_type_text)
const char * zone_db_output_adapter_uri(const zone_db_t *zone)
int zone_db_set_ttl_end_dk(zone_db_t *zone, unsigned int ttl_end_dk)
zone_list_db_t * zone_list_db_new_get(const db_connection_t *connection)
int zone_list_db_object_store(zone_list_db_t *zone_list)
void zone_db_free(zone_db_t *zone)
int zone_db_from_result(zone_db_t *zone, const db_result_t *result)
int zone_db_set_next_ksk_roll(zone_db_t *zone, unsigned int next_ksk_roll)
unsigned int zone_db_ttl_end_rs(const zone_db_t *zone)
zone_list_db_t * zone_list_db_new_get_by_policy_id(const db_connection_t *connection, const db_value_t *policy_id)
int zone_db_set_signconf_needs_writing(zone_db_t *zone, unsigned int signconf_needs_writing)
const char * zone_db_name(const zone_db_t *zone)
int zone_db_delete(zone_db_t *zone)
unsigned int zone_db_ttl_end_ds(const zone_db_t *zone)
int zone_db_set_output_adapter_type(zone_db_t *zone, const char *output_adapter_type_text)
int zone_db_set_roll_zsk_now(zone_db_t *zone, unsigned int roll_zsk_now)
int zone_db_set_roll_csk_now(zone_db_t *zone, unsigned int roll_csk_now)
int zone_db_set_policy_id(zone_db_t *zone, const db_value_t *policy_id)
const char * zone_db_signconf_path(const zone_db_t *zone)
unsigned int zone_db_roll_ksk_now(const zone_db_t *zone)
const zone_db_t * zone_list_db_begin(zone_list_db_t *zone_list)
zone_db_t * zone_db_new_copy(const zone_db_t *zone)
unsigned int zone_db_next_ksk_roll(const zone_db_t *zone)
policy_t * zone_db_get_policy(const zone_db_t *zone)
zone_db_t * zone_db_new(const db_connection_t *connection)
unsigned int zone_db_next_csk_roll(const zone_db_t *zone)
int zone_db_create(zone_db_t *zone)
int zone_list_db_get_by_clauses(zone_list_db_t *zone_list, const db_clause_list_t *clause_list)
int zone_db_set_ttl_end_ds(zone_db_t *zone, unsigned int ttl_end_ds)
int zone_db_count(zone_db_t *zone, db_clause_list_t *clause_list, size_t *count)
size_t zone_list_db_size(zone_list_db_t *zone_list)
int zone_db_set_next_zsk_roll(zone_db_t *zone, unsigned int next_zsk_roll)
int zone_db_set_roll_ksk_now(zone_db_t *zone, unsigned int roll_ksk_now)
const zone_db_t * zone_list_db_next(zone_list_db_t *zone_list)
int zone_db_set_next_csk_roll(zone_db_t *zone, unsigned int next_csk_roll)
int zone_db_set_signconf_path(zone_db_t *zone, const char *signconf_path_text)
const char * zone_db_output_adapter_type(const zone_db_t *zone)
int zone_db_copy(zone_db_t *zone, const zone_db_t *zone_copy)
int zone_db_update(zone_db_t *zone)
int zone_db_get_by_id(zone_db_t *zone, const db_value_t *id)
int zone_list_db_get(zone_list_db_t *zone_list)
unsigned int zone_db_ttl_end_dk(const zone_db_t *zone)
const char * zone_db_input_adapter_type(const zone_db_t *zone)
zone_list_db_t * zone_list_db_new(const db_connection_t *connection)
int zone_db_set_output_adapter_uri(zone_db_t *zone, const char *output_adapter_uri_text)
int zone_db_set_name(zone_db_t *zone, const char *name_text)
unsigned int zone_db_next_zsk_roll(const zone_db_t *zone)
int zone_db_get_by_name(zone_db_t *zone, const char *name)
int zone_list_db_copy(zone_list_db_t *zone_list, const zone_list_db_t *from_zone_list)
zone_db_t * zone_list_db_get_next(zone_list_db_t *zone_list)
int zone_list_db_get_by_policy_id(zone_list_db_t *zone_list, const db_value_t *policy_id)
unsigned int zone_db_signconf_needs_writing(const zone_db_t *zone)
unsigned int zone_db_roll_csk_now(const zone_db_t *zone)
db_clause_t * zone_db_policy_id_clause(db_clause_list_t *clause_list, const db_value_t *policy_id)
const char * zone_db_input_adapter_uri(const zone_db_t *zone)
int zone_db_set_ttl_end_rs(zone_db_t *zone, unsigned int ttl_end_rs)
const db_value_t * zone_db_id(const zone_db_t *zone)
int zone_db_next_change(const zone_db_t *zone)
int zone_db_set_next_change(zone_db_t *zone, int next_change)
zone_list_db_t * zone_list_db_new_copy(const zone_list_db_t *from_zone_list)
void zone_list_db_free(zone_list_db_t *zone_list)
const db_value_t * zone_db_policy_id(const zone_db_t *zone)
zone_db_t * zone_db_new_get_by_name(const db_connection_t *connection, const char *name)
int zone_db_set_input_adapter_uri(zone_db_t *zone, const char *input_adapter_uri_text)