Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
84bc0b71
Commit
84bc0b71
authored
Jan 09, 2013
by
JINMEI Tatuya
Browse files
[2575] documentation updates
parent
e567eee7
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/lib/datasrc/client.h
View file @
84bc0b71
...
...
@@ -389,6 +389,36 @@ public:
/// \return True if the zone was added, false if it already existed
virtual
bool
createZone
(
const
dns
::
Name
&
zone_name
);
/// \brief Delete a zone from the data source
///
/// This method also checks if the specified zone exists in the data
/// source, and returns true/false depending on whether the zone
/// existed/not existed, respectively. In either case, on successful
/// return it ensures the data source does not contain the specified
/// name of the zone.
///
/// \note This is a tentative API, and this method is likely to change
/// or be removed in the near future. For that reason, it currently
/// provides a default implementation that throws NotImplemented.
/// Note also that this method does not delete other database records
/// related to the zone, such as zone's resource records or differences
/// corresponding to updates made in the zone. This is primarily for
/// implementation simplicity (in the currently intended usage there
/// wouldn't be such other data at the time of this call anyway) and due
/// to the fact that details of managing zones is still in flux. Once
/// the design in this area is fixed we may revisit the behavior.
///
/// Apart from the two exceptions mentioned below, in theory this
/// call can throw anything, depending on the implementation of
/// the datasource backend.
///
/// \throw NotImplemented If the datasource backend does not support
/// direct zone deletion.
/// \throw DataSourceError If something goes wrong in the data source
/// while deleting the zone.
/// \param zone_name The (fully qualified) name of the zone to be deleted
/// \return true if the zone previously existed and has been deleted by
/// this method; false if the zone didn't exist.
virtual
bool
deleteZone
(
const
dns
::
Name
&
zone_name
);
};
}
...
...
src/lib/datasrc/database.h
View file @
84bc0b71
...
...
@@ -195,6 +195,21 @@ public:
/// or was created by this call).
virtual
int
addZone
(
const
std
::
string
&
name
)
=
0
;
/// \brief Delete a zone from the database
///
/// Like for deleteRecordToZone, implementations are not required to
/// check for the existence of the given zone name, it is the
/// responsibility of the caller to do so.
///
/// Callers must also start a transaction before calling this method.
/// Implementations should throw InvalidOperation if this has not been
/// done. Callers should also expect DataSourceError for other potential
/// problems specific to the database.
///
/// \note This method does not delete other database records related to
/// the zone. See \c DataSourceClient::deleteZone for the rationale.
///
/// \param zone_id The ID of the zone, that would be returned by getZone().
virtual
void
deleteZone
(
int
zone_id
)
=
0
;
/// \brief This holds the internal context of ZoneIterator for databases
...
...
src/lib/datasrc/sqlite3_accessor.h
View file @
84bc0b71
...
...
@@ -139,6 +139,8 @@ public:
/// \return the id of the zone that has been added
virtual
int
addZone
(
const
std
::
string
&
name
);
// Nothing special to add for this implementation (the base class
// description is sufficient).
virtual
void
deleteZone
(
int
zone_id
);
/// \brief Look up all resource records for a name
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment