Kea  1.9.9-git
translator_control_socket.h
Go to the documentation of this file.
1 // Copyright (C) 2018-2019 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 #include <list>
12 
13 namespace isc {
14 namespace yang {
15 
61 
70 class TranslatorControlSocket : virtual public TranslatorBasic {
71 public:
72 
77 #ifndef HAVE_PRE_0_7_6_SYSREPO
78  TranslatorControlSocket(sysrepo::S_Session session,
79  const std::string& model);
80 #else
81  TranslatorControlSocket(S_Session session, const std::string& model);
82 #endif
83 
85  virtual ~TranslatorControlSocket();
86 
92  isc::data::ConstElementPtr getControlSocket(const std::string& xpath);
93 
98  void setControlSocket(const std::string& xpath,
100 
101 protected:
107  isc::data::ElementPtr getControlSocketKea(const std::string& xpath);
108 
118  void setControlSocketKea(const std::string& xpath,
120 };
121 
122 }; // end of namespace isc::yang
123 }; // end of namespace isc
124 
125 #endif // ISC_TRANSLATOR_CONTROL_SOCKET_H
Between YANG and JSON translator class for basic values.
Definition: translator.h:27
boost::shared_ptr< Element > ElementPtr
Definition: data.h:20
void setControlSocket(const std::string &xpath, isc::data::ConstElementPtr elem)
Translate and set control socket from JSON to YANG.
TranslatorControlSocket(sysrepo::S_Session session, const std::string &model)
Constructor.
Control socket translation between YANG and JSON.
void setControlSocketKea(const std::string &xpath, isc::data::ConstElementPtr elem)
setControlSocket for kea models.
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:23
Defines the logger used by the top-level component of kea-dhcp-ddns.
isc::data::ElementPtr getControlSocketKea(const std::string &xpath)
getControlSocket JSON for kea models.
isc::data::ConstElementPtr getControlSocket(const std::string &xpath)
Get and translate a control socket from YANG to JSON.