#include <pgsql_cb_impl.h>
#include <pgsql_cb_dhcp4.h>
-
-/// @todo disabled for now, to be added in #96
-/// #include <pgsql_cb_dhcp6.h>
+#include <pgsql_cb_dhcp6.h>
#include <pgsql_cb_log.h>
using namespace isc::cb;
/// @param handle library handle
/// @return 0 when initialization is successful, 1 otherwise
-int
-load(LibraryHandle& /* handle */) {
+int load(LibraryHandle& /* handle */) {
LOG_INFO(pgsql_cb_logger, PGSQL_CB_INIT_OK);
-
- // Register Postgres CB factories with CB Managers
+ // Register PostgreSQL CB factories with CB Managers
isc::dhcp::PgSqlConfigBackendDHCPv4::registerBackendType();
-
- /// @todo disabled for now, to be added in #96
- ///isc::dhcp::PgSqlConfigBackendDHCPv6::registerBackendType();
+ isc::dhcp::PgSqlConfigBackendDHCPv6::registerBackendType();
return (0);
}
///
/// @param handle callout handle passed to the callout.
/// @return 0 on success, 1 otherwise.
-int
-dhcp4_srv_configured(CalloutHandle& handle) {
+int dhcp4_srv_configured(CalloutHandle& handle) {
isc::asiolink::IOServicePtr io_service;
handle.getArgument("io_context", io_service);
isc::dhcp::PgSqlConfigBackendImpl::setIOService(io_service);
///
/// @param handle callout handle passed to the callout.
/// @return 0 on success, 1 otherwise.
-int
-dhcp6_srv_configured(CalloutHandle& handle) {
+int dhcp6_srv_configured(CalloutHandle& handle) {
isc::asiolink::IOServicePtr io_service;
handle.getArgument("io_context", io_service);
isc::dhcp::PgSqlConfigBackendImpl::setIOService(io_service);
/// @brief This function is called when the library is unloaded.
///
/// @return 0 if deregistration was successful, 1 otherwise
-int
-unload() {
+int unload() {
LOG_INFO(pgsql_cb_logger, PGSQL_CB_DEINIT_OK);
- // Unregister the factories and remove Postgres backends
+ // Unregister the factories and remove PostgreSQL backends
isc::dhcp::PgSqlConfigBackendDHCPv4::unregisterBackendType();
- /// @todo disabled for now, to be added in #96
- ///isc::dhcp::PgSqlConfigBackendDHCPv6::unregisterBackendType();
+ isc::dhcp::PgSqlConfigBackendDHCPv6::unregisterBackendType();
return (0);
}
/// is always called from the main thread.
///
/// @return 1 which means compatible with multi-threading.
-int
-multi_threading_compatible() {
+int multi_threading_compatible() {
return (1);
}
-} // end extern "C"
+} // end extern "C"
/// @brief Destructor.
virtual ~PgSqlConfigBackendImpl();
- /// @todo: implement condCreateInteger(const util::Optional<T>& value)
-
/// @brief Returns server tag associated with the particular selector.
///
/// This method expects that there is exactly one server tag associated with
const uint64_t& modification_id,
db::AuditEntryCollection& audit_entries);
- /// @todo: implement uint64_t deleteFromTable(const int index, ...)
-
/// @brief Sends query to delete rows from a table.
///
/// @param index Index of the statement to be executed.
/// will be inserted.
void getAllServers(const int index, db::ServerCollection& servers);
- /// @todo implement
/// @brief Sends query to retrieve servers.
///
/// @param index Index of the query to be used.
size_t last_insert_id_index_;
};
-} // namespace dhcp
-} // end of namespace isc
+} // end of namespace isc::dhcp
+} // end of namespace isc
#endif