Kea  1.9.9-git
base_config_backend.h
Go to the documentation of this file.
1 // Copyright (C) 2018-2020 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 
11 
12 #include <boost/shared_ptr.hpp>
13 #include <cstdint>
14 #include <set>
15 #include <string>
16 
17 namespace isc {
18 namespace cb {
19 
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 
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
Interface for Kea server specific configuration backend implementations.
virtual std::string getType() const =0
Returns backend type in the textual format.
virtual bool isUnusable()
Flag which indicates if the config backend has an unusable connection.
virtual uint16_t getPort() const =0
Returns backend port number.
virtual ~BaseConfigBackend()
Virtual destructor.
virtual std::string getHost() const =0
Returns backend host.
Defines the logger used by the top-level component of kea-dhcp-ddns.
boost::shared_ptr< BaseConfigBackend > BaseConfigBackendPtr
Shared pointer to the BaseConfigBackend.
virtual isc::db::DatabaseConnection::ParameterMap getParameters() const
Return backend parameters.
std::map< std::string, std::string > ParameterMap
Database configuration parameter map.