summaryrefslogtreecommitdiffstats
path: root/src/lib/hooks/libinfo.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 11:36:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 11:36:04 +0000
commit040eee1aa49b49df4698d83a05af57c220127fd1 (patch)
treef635435954e6ccde5eee9893889e24f30ca68346 /src/lib/hooks/libinfo.h
parentInitial commit. (diff)
downloadisc-kea-040eee1aa49b49df4698d83a05af57c220127fd1.tar.xz
isc-kea-040eee1aa49b49df4698d83a05af57c220127fd1.zip
Adding upstream version 2.2.0.upstream/2.2.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/lib/hooks/libinfo.h')
-rw-r--r--src/lib/hooks/libinfo.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/lib/hooks/libinfo.h b/src/lib/hooks/libinfo.h
new file mode 100644
index 0000000..42b0441
--- /dev/null
+++ b/src/lib/hooks/libinfo.h
@@ -0,0 +1,42 @@
+// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef HOOKS_LIBINFO_H
+#define HOOKS_LIBINFO_H
+
+#include <cc/data.h>
+
+#include <boost/shared_ptr.hpp>
+
+#include <string>
+#include <vector>
+#include <utility>
+
+namespace isc {
+namespace hooks {
+
+/// @brief Entity that holds information about hook libraries and their
+/// parameters.
+///
+/// The first parameter is a full filename with path to the library.
+/// The second parameter is a map of parameters that configure the
+/// library. There's always at least one parameter: "library", which
+/// contains the library name.
+typedef std::pair<std::string, data::ConstElementPtr> HookLibInfo;
+
+/// @brief A storage for information about hook libraries.
+typedef std::vector<HookLibInfo> HookLibsCollection;
+
+/// @brief Shared pointer to collection of hooks libraries.
+typedef boost::shared_ptr<HookLibsCollection> HookLibsCollectionPtr;
+
+/// @brief Extracts library names from full library information structure
+std::vector<std::string> extractNames(const HookLibsCollection& libinfo);
+
+};
+};
+
+#endif