summaryrefslogtreecommitdiffstats
path: root/src/templates/method.mako.cpp
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2017-05-25 23:38:37 -0400
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-06-19 16:26:48 -0400
commit0df00be00999bc3285b8b0a401b48e42fb862250 (patch)
treef1c9c332b7fede66daf5b42abc283fdbe190d98c /src/templates/method.mako.cpp
parent01079892b1768be2b2f28a6a8ac56422792ff930 (diff)
downloadphosphor-dbus-monitor-0df00be00999bc3285b8b0a401b48e42fb862250.tar.gz
phosphor-dbus-monitor-0df00be00999bc3285b8b0a401b48e42fb862250.zip
Method support
Add support for a method callback. The method callback enables arbitrary DBus method calls. A sample use case could be starting a systemd unit via the sytemd DBus API. Change-Id: If25131d11497c82f862ae1f47da066c5fd8b2e2e Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'src/templates/method.mako.cpp')
-rw-r--r--src/templates/method.mako.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/templates/method.mako.cpp b/src/templates/method.mako.cpp
new file mode 100644
index 0000000..31cdf65
--- /dev/null
+++ b/src/templates/method.mako.cpp
@@ -0,0 +1,6 @@
+makeMethod<SDBusPlus>(
+${indent(1)}ConfigInterfaces::get()[${c.service}],
+${indent(1)}ConfigPaths::get()[${c.path}],
+${indent(1)}ConfigInterfaces::get()[${c.interface}],
+${indent(1)}ConfigProperties::get()[${c.method}],
+${indent(1)}${(',\n' + indent(1)).join([val.argument(loader, indent=indent +1) for val in c.args])})\
OpenPOWER on IntegriCloud