From e73b2c35a375af51b6c7341e9a98f9571f76b266 Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Tue, 23 May 2017 18:01:54 -0400 Subject: Add property and property group support Add support for defining groups of DBus properties. Groups are a list of property/interface/metadata tuples. Metadata can be used to give a property context when required. Change-Id: I5fc27f4d815b53332a2ddea2d270fde8e355dcbc Signed-off-by: Brad Bishop --- src/templates/generated.mako.hpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'src/templates') diff --git a/src/templates/generated.mako.hpp b/src/templates/generated.mako.hpp index 856975f..7c6e527 100644 --- a/src/templates/generated.mako.hpp +++ b/src/templates/generated.mako.hpp @@ -45,6 +45,38 @@ struct ConfigPaths return paths; } }; + +struct ConfigInterfaces +{ + using Interfaces = std::array; + + static auto& get() + { + static const Interfaces interfaces = + { +% for i in interfaces: + "${i.name}"s, +% endfor + }; + return interfaces; + } +}; + +struct ConfigProperties +{ + using Properties = std::array; + + static auto& get() + { + static const Properties properties = + { +% for p in propertynames: + "${p.name}"s, +% endfor + }; + return properties; + } +}; } // namespace monitoring } // namespace dbus } // namespace phosphor -- cgit v1.2.1