Browse Source

[2211] added trivial getter for data source clients manager.

JINMEI Tatuya 12 years ago
parent
commit
8a4c6f4bbf

+ 7 - 2
src/bin/auth/auth_srv.cc

@@ -272,6 +272,8 @@ public:
     /// The data source client list
     DataSrcClientListsPtr datasrc_client_lists_;
 
+    auth::DataSrcClientsMgr datasrc_clients_mgr_;
+
     shared_ptr<ConfigurableClientList> getDataSrcClientList(
         const RRClass& rrclass)
     {
@@ -329,8 +331,6 @@ private:
     bool validateStatistics(isc::data::ConstElementPtr data) const;
 
     auth::Query query_;
-
-    auth::DataSrcClientsMgr datasrc_clients_mgr_;
 };
 
 AuthSrvImpl::AuthSrvImpl(AbstractXfroutClient& xfrout_client,
@@ -491,6 +491,11 @@ AuthSrv::getIOService() {
     return (impl_->io_service_);
 }
 
+isc::auth::DataSrcClientsMgr&
+AuthSrv::getDataSrcClientsMgr() {
+    return (impl_->datasrc_clients_mgr_);
+}
+
 void
 AuthSrv::setXfrinSession(AbstractSession* xfrin_session) {
     impl_->xfrin_session_ = xfrin_session;

+ 7 - 0
src/bin/auth/auth_srv.h

@@ -35,7 +35,9 @@
 
 #include <asiolink/asiolink.h>
 #include <server_common/portconfig.h>
+
 #include <auth/statistics.h>
+#include <auth/datasrc_clients_mgr.h>
 
 #include <boost/shared_ptr.hpp>
 
@@ -194,6 +196,11 @@ public:
     /// \brief Return pointer to the Checkin callback function
     isc::asiolink::SimpleCallback* getCheckinProvider() const { return (checkin_); }
 
+    /// \brief Return data source clients manager.
+    ///
+    /// \throw None
+    isc::auth::DataSrcClientsMgr& getDataSrcClientsMgr();
+
     /// \brief Set the communication session with a separate process for
     /// outgoing zone transfers.
     ///

+ 1 - 0
src/bin/auth/datasrc_clients_mgr.h

@@ -27,6 +27,7 @@
 #include <dns/rrclass.h>
 
 #include <auth/auth_log.h>
+#include <auth/datasrc_config.h>
 
 #include <boost/array.hpp>
 #include <boost/bind.hpp>

+ 0 - 2
src/bin/auth/datasrc_config.h

@@ -15,8 +15,6 @@
 #ifndef DATASRC_CONFIG_H
 #define DATASRC_CONFIG_H
 
-#include "auth_srv.h"
-
 #include <cc/data.h>
 #include <datasrc/client_list.h>
 

+ 1 - 0
src/bin/auth/tests/command_unittest.cc

@@ -18,6 +18,7 @@
 
 #include <util/threads/sync.h>
 
+#include <auth/auth_srv.h>
 #include <auth/command.h>
 #include <auth/datasrc_config.h>