Commit 61cebff5 authored by Jan Kadlec's avatar Jan Kadlec

zone-update: Added missing doxygen

parent cd2449fe
......@@ -30,8 +30,6 @@
#include "knot/zone/contents.h"
#include "common-knot/lists.h"
/*----------------------------------------------------------------------------*/
/*! \brief One zone change, from 'soa_from' to 'soa_to'. */
typedef struct {
node_t n; /*!< List node. */
......@@ -52,8 +50,6 @@ typedef struct {
uint16_t node_pos; /*!< Position in node. */
} changeset_iter_t;
/*----------------------------------------------------------------------------*/
/*!
* \brief Inits changeset structure.
*
......
......@@ -120,6 +120,8 @@ static zone_node_t *node_deep_copy(const zone_node_t *old_node, mm_ctx_t *mm)
return synth_node;
}
/* ------------------------------- API -------------------------------------- */
void zone_update_init(zone_update_t *update, const zone_contents_t *zone, changeset_t *change)
{
update->zone = zone;
......@@ -127,7 +129,6 @@ void zone_update_init(zone_update_t *update, const zone_contents_t *zone, change
mm_ctx_mempool(&update->mm, 4096);
}
/* Node is either zone original or synthesized, cannot free nor modify. */
const zone_node_t *zone_update_get_node(zone_update_t *update, const knot_dname_t *dname)
{
if (update == NULL || dname == NULL) {
......
......@@ -30,18 +30,40 @@
#include "knot/zone/contents.h"
#include "libknot/mempattern.h"
/*! \brief Structure for zone contents updating / querying \todo to be moved to new ZONE API */
typedef struct {
const zone_contents_t *zone;
changeset_t *change;
mm_ctx_t mm;
const zone_contents_t *zone; /*!< Zone being updated. */
changeset_t *change; /*!< Changes we want to apply. */
mm_ctx_t mm; /*!< Memory context used for intermediate nodes. */
} zone_update_t;
struct zone_node;
void zone_update_init(zone_update_t *update, const zone_contents_t *zone, changeset_t *change);
/*!
* \brief Inits given zone update structure, new memory context is created.
*
* \param update Zone update structure to init.
* \param zone Init with this zone.
* \param change Init with this changeset. \todo will not be present in zone API
*/
void zone_update_init(zone_update_t *update, const zone_contents_t *zone,
changeset_t *change);
/* Node is either zone original or synthesized, cannot free or modify. */
const zone_node_t *zone_update_get_node(zone_update_t *update, const knot_dname_t *dname);
/*!
* \brief Returns node that would be in the zone after updating it.
*
* \note Returned node is either zone original or synthesized, do *not* free or modify.
*
* \param update Zone update.
* \param dname Dname to search for.
*
* \return Node after zone update.
*/
const zone_node_t *zone_update_get_node(zone_update_t *update,
const knot_dname_t *dname);
/*!
* \brief Clear data allocated by given zone update structure.
*
* \param update Zone update to clear.
*/
void zone_update_clear(zone_update_t *update);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment