sdbus++: generate header for server bindings
Add a 'server-header' command to sdbus++ that generates a class
definition for the server bindings. This class defines static
functions for registering as sd-bus callbacks and virtual C++
functions to implement the method behavior.
It is expected that a server implementation will create a class,
which inherits from this generated class, and implement all of
the method behaviors. Instances of the class will then register
on construction with sd-bus.
Signals and properties are not yet supported.
Change-Id: If0ec37b2acb6f8d528358004ec91dbe979644df7
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/tools/sdbus++ b/tools/sdbus++
index e68685d..6606d07 100755
--- a/tools/sdbus++
+++ b/tools/sdbus++
@@ -5,7 +5,8 @@
def main():
valid_types = { 'interface': sdbusplus.Interface }
- valid_processes = { 'markdown' : "markdown" }
+ valid_processes = { 'markdown' : "markdown",
+ 'server-header' : "server_header" }
parser = argparse.ArgumentParser(description='Process sdbus++ YAML files.')