[svn] commit: r574 - in /experiments/each-query: ./ src/bin/parkinglot/ src/lib/ src/lib/auth/ src/lib/auth/cpp/ src/lib/dns/cpp/

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Jan 28 00:04:31 UTC 2010


Author: each
Date: Thu Jan 28 00:04:30 2010
New Revision: 574

Log:
second kick at the can for a query API

Added:
    experiments/each-query/
      - copied from r571, branches/parkinglot/
    experiments/each-query/src/lib/auth/
    experiments/each-query/src/lib/auth/Makefile.am
    experiments/each-query/src/lib/auth/cpp/
    experiments/each-query/src/lib/auth/cpp/Makefile.am
    experiments/each-query/src/lib/auth/cpp/data_source.cc
      - copied unchanged from r571, branches/parkinglot/src/bin/parkinglot/data_source.cc
    experiments/each-query/src/lib/auth/cpp/data_source.h
      - copied unchanged from r571, branches/parkinglot/src/bin/parkinglot/data_source.h
    experiments/each-query/src/lib/auth/cpp/data_source_plot.cc
      - copied unchanged from r571, branches/parkinglot/src/bin/parkinglot/data_source_plot.cc
    experiments/each-query/src/lib/auth/cpp/data_source_plot.h
      - copied unchanged from r571, branches/parkinglot/src/bin/parkinglot/data_source_plot.h
    experiments/each-query/src/lib/auth/cpp/query.cc
    experiments/each-query/src/lib/auth/cpp/query.h
Removed:
    experiments/each-query/src/bin/parkinglot/data_source.cc
    experiments/each-query/src/bin/parkinglot/data_source.h
    experiments/each-query/src/bin/parkinglot/data_source_plot.cc
    experiments/each-query/src/bin/parkinglot/data_source_plot.h
Modified:
    experiments/each-query/configure.ac
    experiments/each-query/src/lib/Makefile.am
    experiments/each-query/src/lib/dns/cpp/message.h

Modified: experiments/each-query/configure.ac
==============================================================================
--- experiments/each-query/configure.ac (original)
+++ experiments/each-query/configure.ac Thu Jan 28 00:04:30 2010
@@ -158,6 +158,8 @@
                  src/lib/config/cpp/Makefile
                  src/lib/dns/Makefile
                  src/lib/dns/cpp/Makefile
+                 src/lib/auth/Makefile
+                 src/lib/auth/cpp/Makefile
                ])
 AC_OUTPUT([src/bin/bind-cfgd/bind-cfgd
            src/bin/cmd-ctrld/cmd-ctrld

Modified: experiments/each-query/src/lib/Makefile.am
==============================================================================
--- experiments/each-query/src/lib/Makefile.am (original)
+++ experiments/each-query/src/lib/Makefile.am Thu Jan 28 00:04:30 2010
@@ -1,1 +1,1 @@
-SUBDIRS = cc config dns
+SUBDIRS = cc config dns auth

Modified: experiments/each-query/src/lib/dns/cpp/message.h
==============================================================================
--- experiments/each-query/src/lib/dns/cpp/message.h (original)
+++ experiments/each-query/src/lib/dns/cpp/message.h Thu Jan 28 00:04:30 2010
@@ -397,9 +397,16 @@
     return (c);
 }
 
+enum SectionCode {
+    question = 0U,
+    answer = 1U,
+    authority = 2U,
+    additional = 3U
+};
+
 class Section {
 public:
-    unsigned int getCode() const { return (code_); }
+    SectionCode getCode() const { return (code_); }
     bool operator==(const Section& other) const
     { return (code_ == other.code_); }
     static const Section& QUESTION();
@@ -407,35 +414,35 @@
     static const Section& AUTHORITY();
     static const Section& ADDITIONAL();
 private:
-    Section(int code) : code_(code) {}
-    unsigned int code_;
+    Section(SectionCode code) : code_(code) {}
+    SectionCode code_;
 };
 
 inline const Section&
 Section::QUESTION()
 {
-    static Section s(0);
+    static Section s(question);
     return (s);
 }
 
 inline const Section&
 Section::ANSWER()
 {
-    static Section s(1);
+    static Section s(answer);
     return (s);
 }
 
 inline const Section&
 Section::AUTHORITY()
 {
-    static Section s(2);
+    static Section s(authority);
     return (s);
 }
 
 inline const Section&
 Section::ADDITIONAL()
 {
-    static Section s(3);
+    static Section s(additional);
     return (s);
 }
 




More information about the bind10-changes mailing list