From 34b56848467a0348b724148fe3e0d9080eb56402 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 24 Dec 2021 14:52:44 +0900 Subject: man: also add anotations for methods Fixes #21882. --- tools/update-dbus-docs.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tools') diff --git a/tools/update-dbus-docs.py b/tools/update-dbus-docs.py index 397d131be8..473469e457 100755 --- a/tools/update-dbus-docs.py +++ b/tools/update-dbus-docs.py @@ -47,6 +47,14 @@ def print_method(declarations, elem, *, prefix, file, is_signal=False): klass = 'signal' if is_signal else 'method' declarations[klass].append(name) + # @org.freedesktop.systemd1.Privileged("true") + # SetShowStatus(in s mode); + + for anno in elem.findall('./annotation'): + anno_name = anno.get('name') + anno_value = anno.get('value') + print(f'''{prefix}@{anno_name}("{anno_value}")''', file=file) + print(f'''{prefix}{name}(''', file=file, end='') lead = ',\n' + prefix + ' ' * len(name) + ' ' -- cgit v1.2.1