7 #ifndef MYSQL_HOST_DATA_SOURCE_H 8 #define MYSQL_HOST_DATA_SOURCE_H 23 class MySqlHostDataSourceImpl;
99 const uint8_t* identifier_begin,
const size_t identifier_len);
115 const uint8_t* identifier_begin,
const size_t identifier_len);
132 const uint8_t* identifier_begin,
const size_t identifier_len)
const;
157 const uint8_t* identifier_begin,
const size_t identifier_len)
const;
190 const uint8_t* identifier_begin,
const size_t identifier_len)
const;
217 return (std::string(
"mysql"));
225 virtual std::string
getName()
const;
242 virtual std::pair<uint32_t, uint32_t>
getVersion()
const;
262 #endif // MYSQL_HOST_DATA_SOURCE_H virtual std::string getDescription() const
Returns description of the backend.
virtual void rollback()
Rollback Transactions.
virtual bool del4(const SubnetID &subnet_id, const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len)
Attempts to delete a host by (subnet4-id, identifier type, identifier)
boost::shared_ptr< Host > HostPtr
Pointer to the Host object.
virtual bool del6(const SubnetID &subnet_id, const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len)
Attempts to delete a host by (subnet6-id, identifier type, identifier)
std::vector< ConstHostPtr > ConstHostCollection
Collection of the const Host objects.
virtual void commit()
Commit Transactions.
virtual ~MySqlHostDataSource()
Virtual destructor.
boost::shared_ptr< const Host > ConstHostPtr
Const pointer to the Host object.
virtual std::string getName() const
Returns backend name.
virtual ConstHostPtr get6(const SubnetID &subnet_id, const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len) const
Returns a host connected to the IPv6 subnet.
Defines the logger used by the top-level component of kea-dhcp-ddns.
virtual std::pair< uint32_t, uint32_t > getVersion() const
Returns backend version.
Implementation of the MySqlHostDataSource.
Base interface for the classes implementing simple data source for host reservations.
virtual ConstHostCollection getAll(const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len) const
Return all hosts connected to any subnet for which reservations have been made using a specified iden...
IdentifierType
Type of the host identifier.
std::map< std::string, std::string > ParameterMap
Database configuration parameter map.
The IOAddress class represents an IP addresses (version agnostic)
virtual ConstHostPtr get4(const SubnetID &subnet_id, const Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len) const
Returns a host connected to the IPv4 subnet.
virtual ConstHostCollection getAll4(const asiolink::IOAddress &address) const
Returns a collection of hosts using the specified IPv4 address.
virtual bool del(const SubnetID &subnet_id, const asiolink::IOAddress &addr)
Attempts to delete a host by (subnet-id, address)
MySqlHostDataSource(const db::DatabaseConnection::ParameterMap ¶meters)
Constructor.
virtual std::string getType() const
Return backend type.
virtual void add(const HostPtr &host)
Adds a new host to the collection.
uint32_t SubnetID
Unique identifier for a subnet (both v4 and v6)