blob: 590ee6be73fb17e3a6f901c8327db8627ad354ec [file] [log] [blame]
Patrick Williams831839a2016-10-16 18:09:00 -05001#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 %>
8namespace sdbusplus
9{
10namespace server
11{
12 % for s in namespaces:
13namespace ${s}
14{
15 % endfor
Patrick Williamsadc16822016-10-17 14:43:54 -050016
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 Williams831839a2016-10-16 18:09:00 -050023 % 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