summaryrefslogtreecommitdiffstats
path: root/src/lib/resolve/resolve.h
diff options
context:
space:
mode:
authorJelte Jansen <jelte@isc.org>2011-01-28 13:51:21 +0100
committerJelte Jansen <jelte@isc.org>2011-01-28 13:51:21 +0100
commita6f9d5cd07ea1b21641232312cc15adcce91f1ec (patch)
tree91da31a9ed577ad04f906bcafe20988529139572 /src/lib/resolve/resolve.h
parent[trac494] move ResolverInterface to lib/resolve (diff)
downloadkea-a6f9d5cd07ea1b21641232312cc15adcce91f1ec.tar.xz
kea-a6f9d5cd07ea1b21641232312cc15adcce91f1ec.zip
[trac494] moved extra callback layer to its own file
Diffstat (limited to 'src/lib/resolve/resolve.h')
-rw-r--r--src/lib/resolve/resolve.h62
1 files changed, 0 insertions, 62 deletions
diff --git a/src/lib/resolve/resolve.h b/src/lib/resolve/resolve.h
deleted file mode 100644
index 9d23b46fcc..0000000000
--- a/src/lib/resolve/resolve.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
-//
-// Permission to use, copy, modify, and/or distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-// PERFORMANCE OF THIS SOFTWARE.
-
-#ifndef _ISC_RESOLVE_H
-#define _ISC_RESOLVE_H 1
-
-#include <asiolink/asiolink.h>
-
-namespace isc {
-namespace resolve {
-
-// We define two types of callbackholders for processing recursive
-// queries; one calls back the original DNSServer to resume()
-// the other uses direct callbacks (for instance when we need to
-// resolve something ourselves)
-// Caller warning: only callback once! The objects will delete
-// themselves on callback (after they have done they callback)
-class AbstractResolverCallback {
-public:
- ~AbstractResolverCallback() {};
- virtual void callback(bool result) = 0;
-};
-
-class ResolverCallbackServer : public AbstractResolverCallback {
-public:
- ResolverCallbackServer(asiolink::DNSServer* server) :
- server_(server->clone()) {}
- void callback(bool result);
-
-private:
- asiolink::DNSServer* server_;
-};
-
-class ResolverCallbackDirect : public AbstractResolverCallback {
-public:
- ResolverCallbackDirect(
- const isc::resolve::ResolverInterface::CallbackPtr callback,
- isc::dns::MessagePtr answer_message) :
- callback_(callback),
- answer_message_(answer_message) {}
- void callback(bool result);
-
-private:
- const isc::resolve::ResolverInterface::CallbackPtr callback_;
- isc::dns::MessagePtr answer_message_;
-};
-
-} //namespace resolve
-} //namespace isc
-
-#endif // ISC_RESOLVE_H_