1 // Copyright (C) 2016 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_LIBINFO_H
8 #define HOOKS_LIBINFO_H
9 
10 #include <cc/data.h>
11 
12 #include <boost/shared_ptr.hpp>
13 
14 #include <string>
15 #include <vector>
16 #include <utility>
17 
18 namespace isc {
19 namespace hooks {
20 
21 /// @brief Entity that holds information about hook libraries and their
22 /// parameters.
23 ///
24 /// The first parameter is a full filename with path to the library.
25 /// The second parameter is a map of parameters that configure the
26 /// library. There's always at least one parameter: "library", which
27 /// contains the library name.
28 typedef std::pair<std::string, data::ConstElementPtr> HookLibInfo;
29 
30 /// @brief A storage for information about hook libraries.
31 typedef std::vector<HookLibInfo> HookLibsCollection;
32 
33 /// @brief Shared pointer to collection of hooks libraries.
34 typedef boost::shared_ptr<HookLibsCollection> HookLibsCollectionPtr;
35 
36 /// @brief Extracts library names from full library information structure
37 std::vector<std::string> extractNames(const HookLibsCollection& libinfo);
38 
39 };
40 };
41 
42 #endif
43