Kea 2.5.8
translator_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
7#ifndef ISC_TRANSLATOR_CONTROL_SOCKET_H
8#define ISC_TRANSLATOR_CONTROL_SOCKET_H 1
9
10#include <yang/translator.h>
11
12namespace isc {
13namespace yang {
14
59
68class TranslatorControlSocket : virtual public Translator {
69public:
74 TranslatorControlSocket(sysrepo::Session session,
75 const std::string& model);
76
78 virtual ~TranslatorControlSocket() = default;
79
87 isc::data::ElementPtr getControlSocket(libyang::DataNode const& data_node);
88
102
107 void setControlSocket(const std::string& xpath,
109
110protected:
116 isc::data::ElementPtr getControlSocketKea(libyang::DataNode const& data_node);
117
127 void setControlSocketKea(const std::string& xpath,
129}; // TranslatorControlSocket
130
131} // namespace yang
132} // namespace isc
133
134#endif // ISC_TRANSLATOR_CONTROL_SOCKET_H
Control socket translation between YANG and JSON.
void setControlSocket(const std::string &xpath, isc::data::ConstElementPtr elem)
Translate and set control socket from JSON to YANG.
void setControlSocketKea(const std::string &xpath, isc::data::ConstElementPtr elem)
setControlSocket for kea models.
virtual ~TranslatorControlSocket()=default
Destructor.
isc::data::ElementPtr getControlSocket(libyang::DataNode const &data_node)
Translate a control socket from YANG to JSON.
isc::data::ElementPtr getControlSocketKea(libyang::DataNode const &data_node)
getControlSocket JSON for kea models.
isc::data::ElementPtr getControlSocketFromAbsoluteXpath(std::string const &xpath)
Translate a control socket from YANG to JSON.
Between YANG and JSON translator class for basic values.
Definition: translator.h:23
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:29
boost::shared_ptr< Element > ElementPtr
Definition: data.h:28
Defines the logger used by the top-level component of kea-lfc.