diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-02-09 01:27:38 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-02-15 17:43:18 +0000 |
commit | c1f4798d36e63842c97692ca1a36c0975da18c09 (patch) | |
tree | 8268892833c89fba16aa364ef129c91afb455105 /types.hpp | |
parent | 02ca0219c1e20f4f51eba068a9a9e272a60f7385 (diff) | |
download | phosphor-inventory-manager-c1f4798d36e63842c97692ca1a36c0975da18c09.tar.gz phosphor-inventory-manager-c1f4798d36e63842c97692ca1a36c0975da18c09.zip |
Merge actions.hpp and events.hpp
Move all action/filter functors to a common functor.hpp.
The intent of this refactoring is to facilitate reuse
of functors in more than one context.
- Moved functors from actions.hpp and events.hpp to functor.hpp.
- Renamed events.cpp to functor.cpp.
- Moved Action/Filter types to types.hpp.
- Minor namespace shuffling.
- Update pimgen to render according to the new namespaces.
Change-Id: I630ec1587b8a48f6dc2eac1111365035873310d9
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'types.hpp')
-rw-r--r-- | types.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -4,6 +4,7 @@ #include <string> #include <sdbusplus/message.hpp> #include <experimental/any> +#include <functional> namespace phosphor { @@ -12,6 +13,7 @@ namespace inventory namespace manager { +class Manager; namespace any_ns = std::experimental; /** @brief Inventory manager supported property types. */ @@ -27,6 +29,10 @@ using ObjectType = std::map<std::string, InterfaceType<T>>; using Interface = InterfaceType<InterfaceVariantType>; using Object = ObjectType<InterfaceVariantType>; +using Action = std::function<void (sdbusplus::bus::bus&, Manager&)>; +using Filter = std::function < + bool (sdbusplus::bus::bus&, sdbusplus::message::message&, Manager&) >; + } // namespace manager } // namespace inventory } // namespace phosphor |