[svn] commit: r593 - in /experiments/each-query/src/lib/auth/cpp: data_source.cc data_source.h
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Jan 28 20:15:46 UTC 2010
Author: mgraff
Date: Thu Jan 28 20:15:46 2010
New Revision: 593
Log:
checkpoint
Modified:
experiments/each-query/src/lib/auth/cpp/data_source.cc
experiments/each-query/src/lib/auth/cpp/data_source.h
Modified: experiments/each-query/src/lib/auth/cpp/data_source.cc
==============================================================================
--- experiments/each-query/src/lib/auth/cpp/data_source.cc (original)
+++ experiments/each-query/src/lib/auth/cpp/data_source.cc Thu Jan 28 20:15:46 2010
@@ -5,7 +5,7 @@
#include <cc/cpp/data.h>
-#include "data_source.h"
+#include <auth/cpp/data_source.h>
namespace isc {
namespace dns {
Modified: experiments/each-query/src/lib/auth/cpp/data_source.h
==============================================================================
--- experiments/each-query/src/lib/auth/cpp/data_source.h (original)
+++ experiments/each-query/src/lib/auth/cpp/data_source.h Thu Jan 28 20:15:46 2010
@@ -19,34 +19,10 @@
#include <dns/cpp/name.h>
#include <dns/cpp/rrset.h>
+#include <auth/cpp/query.h>
namespace isc {
namespace dns {
-
-// do we need to make a template for this?
-// i.e. do we want this to be able to hold more types than RRset?
-class SearchResult {
-public:
- enum status_type { success, error, not_implemented,
- zone_not_found, name_not_found };
-
- void addRRset(RRsetPtr rrset) { rrsets.push_back(rrset); }
-
- status_type getStatus() { return status; }
- void setStatus(status_type s) { status = s; }
-
- /* forward iterator interface */
- typedef std::vector<RRsetPtr>::iterator iterator;
- typedef std::vector<RRsetPtr>::const_iterator const_iterator;
- std::vector<RRsetPtr>::iterator begin() { return rrsets.begin(); }
- std::vector<RRsetPtr>::iterator end() { return rrsets.end(); }
- std::vector<RRsetPtr>::const_iterator begin() const { return rrsets.begin(); }
- std::vector<RRsetPtr>::const_iterator end() const { return rrsets.end(); }
-
-private:
- status_type status;
- std::vector<RRsetPtr> rrsets;
-};
// Base class for a DNS Data Source
class DataSource {
@@ -88,10 +64,7 @@
// for the zone_name, see getZoneFor, perhaps this needs to be a more
// general handle
// And perhaps we need a function that does not have that argument too
- virtual SearchResult findRRsets(const Name& zone_name,
- const Name& name,
- const RRClass& clas,
- const RRType& type) const = 0;
+ virtual int findRRsets(Query &query) = 0;
//
// optional 'low-level' methods, an implementation may overwrite these,
More information about the bind10-changes
mailing list