summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Kurzynski <zbigniew.kurzynski@intel.com>2020-02-28 16:06:37 +0300
committerZbigniew Kurzynski <zbigniew.kurzynski@intel.com>2020-03-03 09:22:53 +0300
commit755a33c41a9d189525c835eb2257e7505cda3cec (patch)
treeda38264ee311186111494eccec9a6d0eb98e44e3
parent66afe4fa3eac1dfbfb55e1fb726502c75a96e58b (diff)
downloadbmcweb-755a33c41a9d189525c835eb2257e7505cda3cec.tar.xz
Adding new types to simplify access to ManagedObjectType.
Current implementation of the ManagedObjectType is quite complicate, it has a lot of nested elements and those it is hard to access them. These new definitions makes the definition more readable and used in code will improve operations on nested types of the ManagedObjectType. Tests: This change is just a definition and does not requires additional tests. Signed-off-by: Zbigniew Kurzynski <zbigniew.kurzynski@intel.com> Change-Id: Icadd57653262009e60e3b4391607d22fa4b7be6b
-rw-r--r--include/dbus_utility.hpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/dbus_utility.hpp b/include/dbus_utility.hpp
index ac5970de74..ddf1e61c09 100644
--- a/include/dbus_utility.hpp
+++ b/include/dbus_utility.hpp
@@ -30,11 +30,12 @@ using DbusVariantType =
int64_t, uint64_t, double, int32_t, uint32_t, int16_t,
uint16_t, uint8_t, bool>;
-using ManagedObjectType = std::vector<
- std::pair<sdbusplus::message::object_path,
- boost::container::flat_map<
- std::string,
- boost::container::flat_map<std::string, DbusVariantType>>>>;
+using DBusPropertiesMap =
+ boost::container::flat_map<std::string, DbusVariantType>;
+using DBusInteracesMap =
+ boost::container::flat_map<std::string, DBusPropertiesMap>;
+using ManagedObjectType =
+ std::vector<std::pair<sdbusplus::message::object_path, DBusInteracesMap>>;
using ManagedItem = std::pair<
sdbusplus::message::object_path,