diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-01-22 01:03:02 -0500 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-02-01 16:13:11 -0500 |
commit | 1157af1bd44655b34b10c1308cacaa7c1acb4b38 (patch) | |
tree | 47f7bc07f218be5eacb0a107f1d00eab4be18458 /types.hpp | |
parent | 48547a85412bcb5c6430978ce58fb96a96234293 (diff) | |
download | phosphor-inventory-manager-1157af1bd44655b34b10c1308cacaa7c1acb4b38.tar.gz phosphor-inventory-manager-1157af1bd44655b34b10c1308cacaa7c1acb4b38.zip |
Remove Object from testcase
Currently the testcase and the application both define their
own Object type. Move to a common header.
Change-Id: I05dba67dca7855f522be299fcfd361913ed73fbc
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'types.hpp')
-rw-r--r-- | types.hpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/types.hpp b/types.hpp new file mode 100644 index 0000000..3643bb1 --- /dev/null +++ b/types.hpp @@ -0,0 +1,30 @@ +#pragma once + +#include <map> +#include <string> +#include <sdbusplus/message.hpp> + +namespace phosphor +{ +namespace inventory +{ +namespace manager +{ + +/** @brief Inventory manager supported property types. */ +using InterfaceVariantType = sdbusplus::message::variant<int64_t, std::string>; + +template <typename T> +using InterfaceType = std::map<std::string, T>; + +template <typename T> +using ObjectType = std::map<std::string, InterfaceType<T>>; + +using Interface = InterfaceType<InterfaceVariantType>; +using Object = ObjectType<InterfaceVariantType>; + +} // namespace manager +} // namespace inventory +} // namespace phosphor + +// vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 |