]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3569_rebase] Merge branch 'trac3569' into trac3569_rebase trac3569_rebase
authorTomek Mrugalski <tomasz@isc.org>
Mon, 30 Nov 2015 21:10:58 +0000 (22:10 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Mon, 30 Nov 2015 21:10:58 +0000 (22:10 +0100)
# Conflicts:
# src/lib/dhcpsrv/host_mgr.h

1  2 
doc/guide/dhcp4-srv.xml
doc/guide/dhcp6-srv.xml
src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
src/bin/dhcp6/json_config_parser.cc
src/bin/dhcp6/tests/dhcp6_srv_unittest.cc
src/lib/dhcpsrv/base_host_data_source.h
src/lib/dhcpsrv/host_mgr.h

Simple merge
Simple merge
Simple merge
index ce458b15f40d3827b1f67df57d360b2bd9d1ed1a,b56613470361106c3eef9cafaf22f4f382e23e6a..ccdd27242ff92396173aec546fcf0231b4ac01fc
@@@ -194,26 -181,11 +195,29 @@@ public
      /// @param host Pointer to the new @c Host object being added.
      virtual void add(const HostPtr& host) = 0;
  
 +    /// @brief Return backend type
 +    ///
 +    /// Returns the type of the backend (e.g. "mysql", "memfile" etc.)
 +    ///
 +    /// @return Type of the backend.
 +    virtual std::string getType() const = 0;
 +
 +    /// @brief Commit Transactions
 +    ///
 +    /// Commits all pending database operations.  On databases that don't
 +    /// support transactions, this is a no-op.
 +    virtual void commit() {};
 +
 +    /// @brief Rollback Transactions
 +    ///
 +    /// Rolls back all pending database operations.  On databases that don't
 +    /// support transactions, this is a no-op.
 +    virtual void rollback() {};
  };
  
+ /// @brief HostDataSource pointer
+ typedef boost::shared_ptr<BaseHostDataSource> HostDataSourcePtr;
  }
  }
  
index 051a0fb66b66badf85e7bd956a03a73062931446,193e8441fa4d0f709689e91be08269e9ca517ebc..942f7b0297aecbcf7e96a7bd5b28ed8616fcc6d8
@@@ -198,15 -198,14 +198,23 @@@ public
      /// @param host Pointer to the new @c Host object being added.
      virtual void add(const HostPtr& host);
  
 +    /// @brief Return backend type
 +    ///
 +    /// Returns the type of the backend (e.g. "mysql", "memfile" etc.)
 +    ///
 +    /// @return Type of the backend.
 +    virtual std::string getType() const {
 +        return (std::string("host_mgr"));
 +    }
 +
+     /// @brief Returns pointer to the host data source
+     ///
+     /// May return NULL
+     /// @return pointer to the host data source (or NULL)
+     HostDataSourcePtr getHostDataSource() const {
+         return (alternate_source);
+     }
  private:
  
      /// @brief Private default constructor.