| ## This file is a template. The comment below is emitted |
| ## into the rendered file; feel free to edit this file. |
| // This file was auto generated. Do not edit. |
| <% |
| def interface_type(interface): |
| lst = interface.split('.') |
| lst.insert(-1, 'server') |
| return '::'.join(lst) |
| %> |
| #include "manager.hpp" |
| #include "utils.hpp" |
| % for i in interfaces: |
| #include <${'/'.join(i.split('.') + ['server.hpp'])}> |
| % endfor |
| |
| namespace phosphor |
| { |
| namespace inventory |
| { |
| namespace manager |
| { |
| |
| const Manager::Makers Manager::_makers{ |
| % for i in interfaces: |
| { |
| "${i}", |
| details::MakeInterface< |
| details::ServerObject< |
| sdbusplus::${interface_type(i)}>>::make, |
| }, |
| % endfor |
| }; |
| |
| const Manager::Events Manager::_events{ |
| % for e in events: |
| { |
| % if e.get('description'): |
| // ${e['description']} |
| % endif |
| "${e['name']}", |
| std::make_tuple( |
| % for i, s in enumerate(e['signature'].items()): |
| % if i + 1 == len(e['signature']): |
| ${'"{0}=\'{1}\'"'.format(*s)}, |
| % else: |
| ${'"{0}=\'{1}\',"'.format(*s)} |
| % endif |
| % endfor |
| % if e['filter'].get('args'): |
| details::make_filter(filters::${e['filter']['type']}( |
| % for i, a in enumerate(e['filter']['args']): |
| % if i + 1 == len(e['filter']['args']): |
| "${a['value']}")), |
| % else: |
| "${a['value']}", |
| % endif |
| % endfor |
| % else: |
| details::make_filter(filters::${e['filter']['type']}), |
| % endif |
| % if e['action'].get('args'): |
| details::make_action(actions::${e['action']['type']}( |
| % for i, a in enumerate(e['action']['args']): |
| % if i + 1 == len(e['action']['args']): |
| "${a['value']}")) |
| % else: |
| "${a['value']}", |
| % endif |
| % endfor |
| % else: |
| details::make_action(actions::${e['action']['type']}) |
| % endif |
| ), |
| }, |
| % endfor |
| }; |
| |
| } // namespace manager |
| } // namespace inventory |
| } // namespace phosphor |