1 ## This file is a template. The comment below is emitted 2 ## into the rendered file; feel free to edit this file. 3 // This file was auto generated. Do not edit. 4 <% 5 def interface_type(interface): 6 lst = interface.split('.') 7 lst.insert(-1, 'server') 8 return '::'.join(lst) 9 %> 10 #include "manager.hpp" 11 #include "utils.hpp" 12 % for i in interfaces: 13 #include <${'/'.join(i.split('.') + ['server.hpp'])}> 14 % endfor 15 16 namespace phosphor 17 { 18 namespace inventory 19 { 20 namespace manager 21 { 22 23 const Manager::Makers Manager::_makers{ 24 % for i in interfaces: 25 { 26 "${i}", 27 details::MakeInterface< 28 details::ServerObject< 29 sdbusplus::${interface_type(i)}>>::make, 30 }, 31 % endfor 32 }; 33 34 const Manager::Events Manager::_events{ 35 % for e in events: 36 { 37 % if e.get('description'): 38 // ${e['description']} 39 % endif 40 std::make_tuple( 41 % for i, s in enumerate(e['signature'].items()): 42 % if i + 1 == len(e['signature']): 43 ${'"{0}=\'{1}\'"'.format(*s)}, 44 % else: 45 ${'"{0}=\'{1}\',"'.format(*s)} 46 % endif 47 % endfor 48 % if e['filter'].get('args'): 49 details::make_filter(filters::${e['filter']['type']}( 50 % for i, a in enumerate(e['filter']['args']): 51 % if i + 1 == len(e['filter']['args']): 52 "${a['value']}")), 53 % else: 54 "${a['value']}", 55 % endif 56 % endfor 57 % else: 58 details::make_filter(filters::${e['filter']['type']}), 59 % endif 60 % if e['action'].get('args'): 61 std::vector<details::ActionBasePtr>({details::make_action(actions::${e['action']['type']}( 62 % for i, a in enumerate(e['action']['args']): 63 % if i + 1 == len(e['action']['args']): 64 "${a['value']}"))}) 65 % else: 66 "${a['value']}", 67 % endif 68 % endfor 69 % else: 70 std::vector<details::ActionBasePtr>( 71 {details::make_action(actions::${e['action']['type']})}) 72 % endif 73 ), 74 }, 75 % endfor 76 }; 77 78 } // namespace manager 79 } // namespace inventory 80 } // namespace phosphor 81