zone_db_ext.h File Reference
`#include "key_data.h"`
`#include "key_dependency.h"`
`#include <libxml/tree.h>`

Go to the source code of this file.

## Functions

char * | zone_db_ext_zonename_from_id (const db_connection_t *connection, const db_value_t *id)
key_data_list_t * | zone_db_get_keys (const zone_db_t *zone)
key_dependency_list_t * | zone_db_get_key_dependencies (const zone_db_t *zone)
int | zone_db_create_from_xml (zone_db_t *zone, xmlNodePtr zone_node)
int | zone_db_update_from_xml (zone_db_t *zone, xmlNodePtr zone_node, int *updated)

## Function Documentation

## zone_db_create_from_xml()

int zone_db_create_from_xml | ( | zone_db_t * | zone,
|  | xmlNodePtr | zone_node
| ) |  |

Create a zone object from XML.

Parameters

  [in] | zone | a zone_db_t object being created.
  [in] | zone_node | a xmlNodePtr to the XML for the zone.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 532 of file zone_db_ext.c.

References DB_ERROR_UNKNOWN.

## zone_db_ext_zonename_from_id()

char* zone_db_ext_zonename_from_id | ( | const db_connection_t * | connection,
|  | const db_value_t * | id
| ) |  |

Convert zone ID to name, caller must free resulting string. return NULL on error

Definition at line 39 of file zone_db_ext.c.

## zone_db_get_key_dependencies()

key_dependency_list_t* zone_db_get_key_dependencies | ( | const zone_db_t * | zone | ) |

Get a list of key dependencies for an enforcer zone object.

Parameters

  [in] | zone | an zone_db_t pointer.

Returns
  a key_dependency_list_t pointer or NULL on error.

Definition at line 76 of file zone_db_ext.c.

References db_object_connection(), db_value_not_empty(), zone_db::dbo, zone_db::id, and key_dependency_list_new_get_by_zone_id().

Referenced by removeDeadKeysNow().

## zone_db_get_keys()

key_data_list_t* zone_db_get_keys | ( | const zone_db_t * | zone | ) |

Get a list of keys for an enforcer zone object.

Parameters

  [in] | zone | an zone_db_t pointer.

Returns
  a key_data_list_t pointer or NULL on error.

Definition at line 56 of file zone_db_ext.c.

References db_object_connection(), db_value_not_empty(), zone_db::dbo, zone_db::id, and key_data_list_new_get_by_zone_id().

## zone_db_update_from_xml()

int zone_db_update_from_xml | ( | zone_db_t * | zone,
|  | xmlNodePtr | zone_node,
|  | int * | updated
| ) |  |

Update a zone object from XML.

Parameters

  [in] | zone | a zone_db_t object being updated.
  [in] | zone_node | a xmlNodePtr to the XML for the zone.
  [out] | updated | an integer pointer that will be set to non-zero if any values in the zone was updated.

Returns
  DB_ERROR_* on failure, otherwise DB_OK.

Definition at line 543 of file zone_db_ext.c.

References DB_ERROR_UNKNOWN.