Add XML spec and code generation for org.fd.systemd1.Manager
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>
Wed, 13 Jun 2012 13:09:15 +0000 (14:09 +0100)
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>
Wed, 13 Jun 2012 13:09:15 +0000 (14:09 +0100)
This will cause the SystemdManagerProxy class to be generated that
we can use to communicate with the systemd manager to start/stop units
etc.

boot-manager/Makefile.am
boot-manager/systemd-manager-dbus.xml [new file with mode: 0644]

index 7b2c13b..5af8562 100644 (file)
@@ -7,10 +7,12 @@ boot_manager_PROGRAMS =                                                       \
        boot-manager
 
 boot_manager_built_headers =                                           \
-       boot-manager-dbus.h
+       boot-manager-dbus.h                                             \
+       systemd-manager-dbus.h
 
 boot_manager_built_sources =                                           \
        boot-manager-dbus.c                                             \
+       systemd-manager-dbus.c                                          \
        $(boot_manager_built_headers)
 
 boot_manager_SOURCES =                                                 \
@@ -58,7 +60,8 @@ CLEANFILES =                                                          \
 
 EXTRA_DIST =                                                           \
        $(service_in_files)                                             \
-       boot-manager-dbus.xml
+       boot-manager-dbus.xml                                           \
+       systemd-manager-dbus.xml
 
 DISTCLEANFILES =                                                       \
        $(boot_manager_built_sources)
@@ -73,3 +76,11 @@ boot-manager-dbus.h: boot-manager-dbus.xml Makefile
            --generate-c-code boot-manager-dbus                         \
            --annotate org.genivi.BootManager1 org.gtk.GDBus.C.Name     \
              BootManager $<
+
+systemd-manager-dbus.h: systemd-manager-dbus.xml Makefile
+       $(AM_V_GEN) $(GDBUS_CODEGEN)                                    \
+           --interface-prefix org.freedesktop.systemd1                 \
+           --c-namespace ""                                            \
+           --generate-c-code systemd-manager-dbus                      \
+           --annotate org.freedesktop.systemd1.Manager org.gtk.GDBus.C.Name \
+             SystemdManager $<
diff --git a/boot-manager/systemd-manager-dbus.xml b/boot-manager/systemd-manager-dbus.xml
new file mode 100644 (file)
index 0000000..de640f7
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<node>
+  <interface name="org.freedesktop.systemd1.Manager">
+    <method name="StartUnit">
+      <arg name="name" type="s" direction="in"/>
+      <arg name="mode" type="s" direction="in"/>
+      <arg name="job" type="o" direction="out"/>
+    </method>
+
+    <method name="StopUnit">
+      <arg name="name" type="s" direction="in"/>
+      <arg name="mode" type="s" direction="in"/>
+      <arg name="job" type="o" direction="out"/>
+    </method>
+
+    <method name="RestartUnit">
+      <arg name="name" type="s" direction="in"/>
+      <arg name="mode" type="s" direction="in"/>
+      <arg name="job" type="o" direction="out"/>
+    </method>
+
+    <method name="KillUnit">
+      <arg name="name" type="s" direction="in"/>
+      <arg name="who" type="s" direction="in"/>
+      <arg name="mode" type="s" direction="in"/>
+      <arg name="signal" type="i" direction="in"/>
+    </method>
+
+    <method name="ListUnits">
+      <arg name="units" type="a(ssssssouso)" direction="out"/>
+    </method>
+
+    <method name="Subscribe"/>
+    <method name="Unsubscribe"/>
+
+    <signal name="JobRemoved">
+      <arg name="id" type="u"/>
+      <arg name="job" type="o"/>
+      <arg name="unit" type="s"/>
+      <arg name="result" type="s"/>
+    </signal>"
+  </interface>
+</node>