Kea  2.3.5-git
stdout_control_socket.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 
9 
10 #ifndef STDOUT_CONTROL_SOCKET_H
11 #define STDOUT_CONTROL_SOCKET_H
12 
13 #include <netconf/control_socket.h>
14 #include <iostream>
15 
16 namespace isc {
17 namespace netconf {
18 
25 public:
32 
34  virtual ~StdoutControlSocket() = default;
35 
43  data::ConstElementPtr configGet(const std::string& service) override final;
44 
53  const std::string& service) override final;
54 
63  const std::string& service) override final;
64 
65 protected:
70  StdoutControlSocket(CfgControlSocketPtr ctrl_sock, std::ostream& output);
71 
73  std::ostream& output_;
74 }; // StdoutControlSocket
75 
77 using StdoutControlSocketPtr = std::shared_ptr<StdoutControlSocket>;
78 
83 template <> ControlSocketBasePtr
84 createControlSocket<CfgControlSocket::Type::STDOUT>(CfgControlSocketPtr ctrl_sock);
85 
86 } // namespace netconf
87 } // namespace isc
88 
89 #endif // STDOUT_CONTROL_SOCKET_H
StdoutControlSocket(CfgControlSocketPtr ctrl_sock)
Constructor.
virtual ~StdoutControlSocket()=default
Destructor (does nothing).
Base class for control socket communication.
std::ostream & output_
The output stream (std::cout outside tests).
boost::shared_ptr< Element > ElementPtr
Definition: data.h:24
data::ConstElementPtr configGet(const std::string &service) override final
Get configuration.
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:27
data::ConstElementPtr configTest(data::ElementPtr config, const std::string &service) override final
Test configuration.
std::shared_ptr< StdoutControlSocket > StdoutControlSocketPtr
Type definition for the pointer to the StdoutControlSocket.
std::shared_ptr< CfgControlSocket > CfgControlSocketPtr
Defines a pointer for CfgControlSocket instances.
Defines the logger used by the top-level component of kea-lfc.
Contains declarations for control socket communication.
Class for control socket communication over stdout.
std::shared_ptr< ControlSocketBase > ControlSocketBasePtr
Type definition for the pointer to the ControlSocketBase.
data::ConstElementPtr configSet(data::ElementPtr config, const std::string &service) override final
Set configuration.