summaryrefslogtreecommitdiffstats
path: root/src/lib/nsas/nameserver_entry.h
diff options
context:
space:
mode:
authorMichal Vaner <michal.vaner@nic.cz>2010-11-22 10:55:17 +0100
committerMichal Vaner <michal.vaner@nic.cz>2010-11-22 10:55:17 +0100
commitdcf3f92a3164b9e0c0b36547705f626fc4e1d96a (patch)
treef3aa09a13c69b5c831bac0874fa9483f7f0e5a96 /src/lib/nsas/nameserver_entry.h
parentInterface update, TODO (diff)
downloadkea-dcf3f92a3164b9e0c0b36547705f626fc4e1d96a.tar.xz
kea-dcf3f92a3164b9e0c0b36547705f626fc4e1d96a.zip
Make nameserver entry test compile
git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac408@3588 e5f2f494-b856-4b98-b285-d166d9295462
Diffstat (limited to 'src/lib/nsas/nameserver_entry.h')
-rw-r--r--src/lib/nsas/nameserver_entry.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/lib/nsas/nameserver_entry.h b/src/lib/nsas/nameserver_entry.h
index 5c465378f6..32d3e0dec1 100644
--- a/src/lib/nsas/nameserver_entry.h
+++ b/src/lib/nsas/nameserver_entry.h
@@ -127,10 +127,17 @@ public:
/// convenient.)
/// \param family The family of address that is requested.
/// else for all addresses.
+ /// \param expired_ok Return addresses even when expired. In that case,
+ /// it will pretend to be READY. This is here to allow getting address
+ /// with TTL 0 from a nameserver that just arrived and triggered
+ /// a callback.
/// \return The state this is currently in. If the TTL expires, it enters
- /// the NOT_ASKED state by itself.
+ /// the EXPIRED state by itself. It may be IN_PROGRESS and still
+ /// return some addresses (when one address family arrived and is
+ /// is returned, but the other is still on the way).
virtual Fetchable::State getAddresses(
- NameserverEntry::AddressVector& addresses, AddressRequest family);
+ NameserverEntry::AddressVector& addresses,
+ AddressRequest family = ANY_OK, bool expired_ok = false);
// TODO Is this one of any use at all?
/// \brief Return Address that corresponding to the index
@@ -206,6 +213,8 @@ public:
/// \short A callback that some information here arrived (or are unavailable).
struct Callback {
virtual void operator()(NameserverEntry* self) = 0;
+ /// \short Virtual destructor, so descendants are properly cleaned up
+ virtual ~ Callback() {}
};
/**
@@ -214,9 +223,9 @@ public:
* Adds a callback for given zone when they are ready or the information
* is found unreachable.
*
- * If it is not in NOT_ASKED state, it does not ask the for the IP address
- * again, it just inserts the callback. It is up to the caller not to
- * insert one callback multiple times.
+ * If it is not in NOT_ASKED or EXPIRED state, it does not ask the for the
+ * IP address again, it just inserts the callback. It is up to the caller
+ * not to insert one callback multiple times.
*
* The callback might be called directly from this function.
*