Patrick Williams | 831839a | 2016-10-16 18:09:00 -0500 | [diff] [blame] | 1 | #include <sdbusplus/bus.hpp> |
| 2 | #include <sdbusplus/message.hpp> |
| 3 | #include <${"/".join(interface.name.split('.') + [ 'server.hpp' ])}> |
| 4 | <% |
| 5 | namespaces = interface.name.split('.') |
| 6 | classname = namespaces.pop() |
| 7 | %> |
| 8 | namespace sdbusplus |
| 9 | { |
| 10 | namespace server |
| 11 | { |
| 12 | % for s in namespaces: |
| 13 | namespace ${s} |
| 14 | { |
| 15 | % endfor |
Patrick Williams | adc1682 | 2016-10-17 14:43:54 -0500 | [diff] [blame^] | 16 | |
| 17 | ${classname}::${classname}(bus::bus& bus, const char* path) |
| 18 | : _${"_".join(interface.name.split('.'))}_interface( |
| 19 | bus, path, _interface, _vtable, this) |
| 20 | { |
| 21 | } |
| 22 | |
Patrick Williams | 831839a | 2016-10-16 18:09:00 -0500 | [diff] [blame] | 23 | % for m in interface.methods: |
| 24 | ${ m.cpp_prototype(loader, interface=interface, ptype='callback-cpp') } |
| 25 | % endfor |
| 26 | |
| 27 | % for s in namespaces: |
| 28 | } // namespace ${s} |
| 29 | % endfor |
| 30 | } // namespace server |
| 31 | } // namespace sdbusplus |