Kea 3.1.1
hooks_parser.h
Go to the documentation of this file.
1// Copyright (C) 2017-2025 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 HOOKS_PARSER_H
8#define HOOKS_PARSER_H
9
10#include <cc/data.h>
11#include <cc/simple_parser.h>
12#include <hooks/hooks_config.h>
13#include <util/filesystem.h>
14
15namespace isc {
16namespace hooks {
17
23public:
24
60 void parse(HooksConfig& libraries, isc::data::ConstElementPtr value);
61
67 static std::string validatePath(const std::string libpath);
68
82 static std::string getHooksPath(bool reset = false,
83 const std::string explicit_path = "");
84};
85
87public:
94 static std::string validatePath(const std::string libpath);
95
109 static std::string getHookScriptsPath(bool reset = false,
110 const std::string explicit_path = "");
111};
112
113} // namespace isc::hooks
114} // namespace isc
115
116#endif
static std::string validatePath(const std::string libpath)
Validates a script path (script loaded by a hook) against the supported path.
static std::string getHookScriptsPath(bool reset=false, const std::string explicit_path="")
Fetches the supported script path.
Wrapper class that holds hooks libraries configuration.
Parser for hooks library list.
static std::string validatePath(const std::string libpath)
Validates a library path against the supported path for hooks libraries.
void parse(HooksConfig &libraries, isc::data::ConstElementPtr value)
Parses parameters value.
static std::string getHooksPath(bool reset=false, const std::string explicit_path="")
Fetches the supported Hooks path.
boost::shared_ptr< const Element > ConstElementPtr
Definition data.h:29
Defines the logger used by the top-level component of kea-lfc.