| Kea 3.0.2-git

base_config_backend.h
Go to the documentation of this file.
1// Copyright (C) 2018-2022 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef BASE_CONFIG_BACKEND_H
8#define BASE_CONFIG_BACKEND_H
9
10#include <database/database_connection.h>
11
12#include <boost/shared_ptr.hpp>
13#include <cstdint>
14#include <set>
15#include <string>
16
17 namespace isc {
18 namespace cb {
19
34 class BaseConfigBackend {
35 public:
36
38 virtual ~BaseConfigBackend() { }
39
44 virtual std::string getType() const = 0;
45
52 virtual std::string getHost() const = 0;
53
60 virtual uint16_t getPort() const = 0;
61
67 virtual bool isUnusable() {
68 return (false);
69 }
70
76 virtual isc::db::DatabaseConnection::ParameterMap getParameters() const {
77 return (isc::db::DatabaseConnection::ParameterMap());
78 }
79};
80
82 typedef boost::shared_ptr<BaseConfigBackend> BaseConfigBackendPtr;
83
84} // end of namespace isc::cb
85} // end of namespace isc
86
87#endif // BASE_CONFIG_BACKEND_H
isc::cb::BaseConfigBackend
Interface for Kea server specific configuration backend implementations.
Definition base_config_backend.h:34
isc::cb::BaseConfigBackend::getParameters
virtual isc::db::DatabaseConnection::ParameterMap getParameters() const
Return backend parameters.
Definition base_config_backend.h:76
isc::cb::BaseConfigBackend::getPort
virtual uint16_t getPort() const =0
Returns backend port number.
isc::cb::BaseConfigBackend::~BaseConfigBackend
virtual ~BaseConfigBackend()
Virtual destructor.
Definition base_config_backend.h:38
isc::cb::BaseConfigBackend::getType
virtual std::string getType() const =0
Returns backend type in the textual format.
isc::cb::BaseConfigBackend::getHost
virtual std::string getHost() const =0
Returns backend host.
isc::cb::BaseConfigBackend::isUnusable
virtual bool isUnusable()
Flag which indicates if the config backend has an unusable connection.
Definition base_config_backend.h:67
isc::db::DatabaseConnection::ParameterMap
std::map< std::string, std::string > ParameterMap
Database configuration parameter map.
Definition database_connection.h:137
database_connection.h
isc::cb
Definition base_config_backend.h:18
isc::cb::BaseConfigBackendPtr
boost::shared_ptr< BaseConfigBackend > BaseConfigBackendPtr
Shared pointer to the BaseConfigBackend.
Definition base_config_backend.h:82
isc
Defines the logger used by the top-level component of kea-lfc.
Definition agent_parser.cc:148