Kea  2.3.2-git
stdout_control_socket.h
Go to the documentation of this file.
1 // Copyright (C) 2018-2021 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:
26 
33 
35  virtual ~StdoutControlSocket() = default;
36 
44  virtual data::ConstElementPtr configGet(const std::string& service);
45 
54  const std::string& service);
55 
64  const std::string& service);
65 
66 protected:
71  StdoutControlSocket(CfgControlSocketPtr ctrl_sock, std::ostream& output);
72 
74  std::ostream& output_;
75 };
76 
78 typedef boost::shared_ptr<StdoutControlSocket> StdoutControlSocketPtr;
79 
84 template <> ControlSocketBasePtr
85 createControlSocket<CfgControlSocket::Type::STDOUT>(CfgControlSocketPtr ctrl_sock);
86 
87 } // namespace netconf
88 } // namespace isc
89 
90 #endif // STDOUT_CONTROL_SOCKET_H
StdoutControlSocket(CfgControlSocketPtr ctrl_sock)
Constructor.
virtual ~StdoutControlSocket()=default
Destructor (does nothing).
boost::shared_ptr< ControlSocketBase > ControlSocketBasePtr
Type definition for the pointer to the ControlSocketBase.
Base class for control socket communication.
std::ostream & output_
The output stream (std::cout outside tests).
virtual data::ConstElementPtr configGet(const std::string &service)
Get configuration.
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:27
Defines the logger used by the top-level component of kea-lfc.
Contains declarations for control socket communication.
boost::shared_ptr< StdoutControlSocket > StdoutControlSocketPtr
Type definition for the pointer to the StdoutControlSocket.
virtual data::ConstElementPtr configTest(data::ConstElementPtr config, const std::string &service)
Test configuration.
Class for control socket communication over stdout.
boost::shared_ptr< CfgControlSocket > CfgControlSocketPtr
Defines a pointer for CfgControlSocket instances.
virtual data::ConstElementPtr configSet(data::ConstElementPtr config, const std::string &service)
Set configuration.