Brad Bishop | 92665b2 | 2016-10-26 20:51:16 -0500 | [diff] [blame] | 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 | #include "manager.hpp" |
Brad Bishop | 5fbaa7f | 2016-10-31 10:42:41 -0500 | [diff] [blame] | 6 | % for i in interfaces: |
| 7 | #include <${'/'.join(i.split('.') + ['server.hpp'])}> |
| 8 | % endfor |
Brad Bishop | 92665b2 | 2016-10-26 20:51:16 -0500 | [diff] [blame] | 9 | |
| 10 | namespace phosphor |
| 11 | { |
| 12 | namespace inventory |
| 13 | { |
| 14 | namespace manager |
| 15 | { |
| 16 | |
Brad Bishop | 5fbaa7f | 2016-10-31 10:42:41 -0500 | [diff] [blame] | 17 | const Manager::Makers Manager::_makers{ |
| 18 | % for i in interfaces: |
| 19 | { |
| 20 | "${i}", |
| 21 | details::interface::holder::Holder< |
| 22 | sdbusplus::server::${'::'.join(i.split('.'))}>::make, |
| 23 | }, |
| 24 | % endfor |
| 25 | }; |
| 26 | |
Brad Bishop | 92665b2 | 2016-10-26 20:51:16 -0500 | [diff] [blame] | 27 | const Manager::Events Manager::_events{ |
| 28 | % for e in events: |
| 29 | { |
| 30 | % if e.get('description'): |
| 31 | // ${e['description']} |
| 32 | % endif |
| 33 | "${e['name']}", |
| 34 | std::make_tuple( |
| 35 | % for i, s in enumerate(e['signature'].items()): |
| 36 | % if i + 1 == len(e['signature']): |
| 37 | ${'"{0}=\'{1}\'"'.format(*s)}, |
| 38 | % else: |
| 39 | ${'"{0}=\'{1}\',"'.format(*s)} |
| 40 | % endif |
| 41 | % endfor |
| 42 | % if e['filter'].get('args'): |
| 43 | filters::${e['filter']['type']}( |
| 44 | % for i, a in enumerate(e['filter']['args']): |
| 45 | % if i + 1 == len(e['filter']['args']): |
| 46 | "${a['value']}"), |
| 47 | % else: |
| 48 | "${a['value']}", |
| 49 | % endif |
| 50 | % endfor |
| 51 | % else: |
| 52 | filters::${e['filter']['type']}, |
| 53 | % endif |
| 54 | % if e['action'].get('args'): |
| 55 | actions::${e['action']['type']}( |
| 56 | % for i, a in enumerate(e['action']['args']): |
| 57 | % if i + 1 == len(e['action']['args']): |
| 58 | "${a['value']}") |
| 59 | % else: |
| 60 | "${a['value']}", |
| 61 | % endif |
| 62 | % endfor |
| 63 | % else: |
| 64 | actions::${e['action']['type']} |
| 65 | % endif |
| 66 | ), |
| 67 | }, |
| 68 | % endfor |
| 69 | }; |
| 70 | |
| 71 | } // namespace manager |
| 72 | } // namespace inventory |
| 73 | } // namespace phosphor |