types: minor build improvements
We don't need all of message.hpp to be included from types.hpp since
all we need is the variant definition. Instead, just get
sdbusplus/message/types.hpp, which has the variant definition.
message.hpp picks up <memory> so add that where it is now missing
(events.hpp).
Add a missing cstdint include.
Change-Id: Ic033ceafcd982dba3e39592a4d8f64e5b4e65f2e
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/events.hpp b/events.hpp
index 0cdcfbc..735834a 100644
--- a/events.hpp
+++ b/events.hpp
@@ -2,6 +2,9 @@
#include "types.hpp"
+#include <memory>
+#include <vector>
+
namespace phosphor
{
namespace inventory
diff --git a/types.hpp b/types.hpp
index 4160dc9..1526ce9 100644
--- a/types.hpp
+++ b/types.hpp
@@ -1,10 +1,23 @@
#pragma once
+#include <cstdint>
#include <functional>
#include <map>
-#include <sdbusplus/message.hpp>
+#include <sdbusplus/message/types.hpp>
#include <string>
+namespace sdbusplus
+{
+namespace message
+{
+class message;
+}
+namespace bus
+{
+class bus;
+}
+} // namespace sdbusplus
+
namespace phosphor
{
namespace inventory
@@ -16,7 +29,7 @@
/** @brief Inventory manager supported property types. */
using InterfaceVariantType =
- sdbusplus::message::variant<bool, int64_t, std::string>;
+ sdbusplus::message::variant_ns::variant<bool, int64_t, std::string>;
template <typename T>
using InterfaceType = std::map<std::string, T>;