diff options
Diffstat (limited to '')
-rw-r--r-- | lib/plugins/lrm/dbus/Makefile.am | 16 | ||||
-rw-r--r-- | lib/plugins/lrm/dbus/com.ubuntu.Upstart.Instance.xml | 45 | ||||
-rw-r--r-- | lib/plugins/lrm/dbus/com.ubuntu.Upstart.Job.xml | 71 | ||||
-rw-r--r-- | lib/plugins/lrm/dbus/com.ubuntu.Upstart.xml | 57 |
4 files changed, 189 insertions, 0 deletions
diff --git a/lib/plugins/lrm/dbus/Makefile.am b/lib/plugins/lrm/dbus/Makefile.am new file mode 100644 index 0000000..ec93436 --- /dev/null +++ b/lib/plugins/lrm/dbus/Makefile.am @@ -0,0 +1,16 @@ +if UPSTART +BINDINGS=Upstart_Instance.h \ + Upstart_Job.h \ + Upstart.h + +all-local: + for header in $(BINDINGS); do \ + input=com.ubuntu.`echo $$header | sed 's/\.h//' | tr _ .`.xml; \ + $(DBUS_BINDING_TOOL) --mode=glib-client $$input > $$header; \ + done + +clean-local: + rm -f $(BINDINGS) + +EXTRA_DIST = *.xml +endif diff --git a/lib/plugins/lrm/dbus/com.ubuntu.Upstart.Instance.xml b/lib/plugins/lrm/dbus/com.ubuntu.Upstart.Instance.xml new file mode 100644 index 0000000..d4f7ab2 --- /dev/null +++ b/lib/plugins/lrm/dbus/com.ubuntu.Upstart.Instance.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!-- upstart + + com.ubuntu.Upstart.Instance.xml - interface definition for interface + objects + + Copyright © 2009 Canonical Ltd. + Author: Scott James Remnant <scott@netsplit.com>. + + This file is free software; Canonical Ltd gives unlimited permission + to copy and/or distribute it, with or without modifications, as long + as this notice is preserved. + + Communication and interaction with Upstart through this interface is + permitted without restriction. + --> + +<!DOCTYPE node PUBLIC + "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" + "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> + +<node> + <interface name="com.ubuntu.Upstart0_6.Instance"> + <!-- Methods to directly control instances. Unlike the equivalent methods + for a Job, these are not permitted to pass or set environment. --> + <method name="Start"> + <annotation name="com.netsplit.Nih.Method.Async" value="true" /> + <arg name="wait" type="b" direction="in" /> + </method> + <method name="Stop"> + <annotation name="com.netsplit.Nih.Method.Async" value="true" /> + <arg name="wait" type="b" direction="in" /> + </method> + <method name="Restart"> + <annotation name="com.netsplit.Nih.Method.Async" value="true" /> + <arg name="wait" type="b" direction="in" /> + </method> + + <!-- Basic information about an Instance --> + <property name="name" type="s" access="read" /> + <property name="goal" type="s" access="read" /> + <property name="state" type="s" access="read" /> + <property name="processes" type="a(si)" access="read" /> + </interface> +</node> diff --git a/lib/plugins/lrm/dbus/com.ubuntu.Upstart.Job.xml b/lib/plugins/lrm/dbus/com.ubuntu.Upstart.Job.xml new file mode 100644 index 0000000..27f47a1 --- /dev/null +++ b/lib/plugins/lrm/dbus/com.ubuntu.Upstart.Job.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!-- upstart + + com.ubuntu.Upstart.Job.xml - interface definition for job objects + + Copyright © 2009 Canonical Ltd. + Author: Scott James Remnant <scott@netsplit.com>. + + This file is free software; Canonical Ltd gives unlimited permission + to copy and/or distribute it, with or without modifications, as long + as this notice is preserved. + + Communication and interaction with Upstart through this interface is + permitted without restriction. + --> + +<!DOCTYPE node PUBLIC + "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" + "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> + +<node> + <interface name="com.ubuntu.Upstart0_6.Job"> + <!-- Get object paths for instances, while you can figure these out too, + it's still better form to use these --> + <method name="GetInstance"> + <arg name="env" type="as" direction="in" /> + <arg name="instance" type="o" direction="out" /> + </method> + <method name="GetInstanceByName"> + <arg name="name" type="s" direction="in" /> + <arg name="instance" type="o" direction="out" /> + </method> + <method name="GetAllInstances"> + <arg name="instances" type="ao" direction="out" /> + </method> + + <!-- Signals for changes to the instance list for a job --> + <signal name="InstanceAdded"> + <arg name="instance" type="o" /> + </signal> + <signal name="InstanceRemoved"> + <arg name="instance" type="o" /> + </signal> + + <!-- Job control; the environment arguments are used for both instance + selection and for passing environment to the processes of the job. --> + <method name="Start"> + <annotation name="com.netsplit.Nih.Method.Async" value="true" /> + <arg name="env" type="as" direction="in" /> + <arg name="wait" type="b" direction="in" /> + <arg name="instance" type="o" direction="out" /> + </method> + <method name="Stop"> + <annotation name="com.netsplit.Nih.Method.Async" value="true" /> + <arg name="env" type="as" direction="in" /> + <arg name="wait" type="b" direction="in" /> + </method> + <method name="Restart"> + <annotation name="com.netsplit.Nih.Method.Async" value="true" /> + <arg name="env" type="as" direction="in" /> + <arg name="wait" type="b" direction="in" /> + <arg name="instance" type="o" direction="out" /> + </method> + + <!-- Basic information about a Job --> + <property name="name" type="s" access="read" /> + <property name="description" type="s" access="read" /> + <property name="author" type="s" access="read" /> + <property name="version" type="s" access="read" /> + </interface> +</node> diff --git a/lib/plugins/lrm/dbus/com.ubuntu.Upstart.xml b/lib/plugins/lrm/dbus/com.ubuntu.Upstart.xml new file mode 100644 index 0000000..a4331cd --- /dev/null +++ b/lib/plugins/lrm/dbus/com.ubuntu.Upstart.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!-- upstart + + com.ubuntu.Upstart.xml - interface definition for manager object + + Copyright © 2009 Canonical Ltd. + Author: Scott James Remnant <scott@netsplit.com>. + + This file is free software; Canonical Ltd gives unlimited permission + to copy and/or distribute it, with or without modifications, as long + as this notice is preserved. + + Communication and interaction with Upstart through this interface is + permitted without restriction. + --> + +<!DOCTYPE node PUBLIC + "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" + "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> + +<node name="/com/ubuntu/Upstart"> + <interface name="com.ubuntu.Upstart0_6"> + <!-- Reload all configuration sources --> + <method name="ReloadConfiguration"> + </method> + + <!-- Get object paths for jobs, while you can figure them out, it's + better form to use these --> + <method name="GetJobByName"> + <arg name="name" type="s" direction="in" /> + <arg name="job" type="o" direction="out" /> + </method> + <method name="GetAllJobs"> + <arg name="jobs" type="ao" direction="out" /> + </method> + + <!-- Signals for changes to the job list --> + <signal name="JobAdded"> + <arg name="job" type="o" /> + </signal> + <signal name="JobRemoved"> + <arg name="job" type="o" /> + </signal> + + <!-- Event emission --> + <method name="EmitEvent"> + <annotation name="com.netsplit.Nih.Method.Async" value="true" /> + <arg name="name" type="s" direction="in" /> + <arg name="env" type="as" direction="in" /> + <arg name="wait" type="b" direction="in" /> + </method> + + <!-- Basic information about Upstart --> + <property name="version" type="s" access="read" /> + <property name="log_priority" type="s" access="readwrite" /> + </interface> +</node> |