1 #pragma once 2 3 #include <boost/container/flat_map.hpp> 4 #include <boost/container/flat_set.hpp> 5 #include <string> 6 7 /** @brief Define white list and black list data structure */ 8 using WhiteBlackList = boost::container::flat_set<std::string>; 9 10 /** @brief Get well known name of input unique name 11 * 12 * If user passes in well known name then that will be returned. 13 * 14 * @param[in] owners - Current list of owners 15 * @param[in] request - The name to look up 16 * @param[out] wellKnown - The well known name if found 17 * 18 * @return True if well known name is found, false otherwise 19 */ 20 bool getWellKnown( 21 const boost::container::flat_map<std::string, std::string>& owners, 22 const std::string& request, std::string& well_known); 23 24 /** @brief Determine if dbus service is something to monitor 25 * 26 * mapper supports a whitelist and blacklist concept. If a whitelist is provided 27 * as input then only dbus objects matching that list is monitored. If a 28 * blacklist is provided then objects matching it will not be monitored. 29 * 30 * @param[in] processName - Dbus service name 31 * @param[in] whiteList - The white list 32 * @param[in] blackList - The black list 33 * 34 * @return True if input process_name should be monitored, false otherwise 35 */ 36 bool needToIntrospect(const std::string& processName, 37 const WhiteBlackList& whiteList, 38 const WhiteBlackList& blackList); 39