noinst_LTLIBRARIES = libcommon.la
+libcommon_la_built_headers = \
+ shutdown-consumer-dbus.h
+
+libcommon_la_built_sources = \
+ shutdown-consumer-dbus.c \
+ $(libcommon_la_built_headers)
+
libcommon_la_SOURCES = \
glib-extensions.c \
glib-extensions.h \
watchdog-client.c \
- watchdog-client.h
+ watchdog-client.h \
+ $(libcommon_la_built_sources)
libcommon_la_CFLAGS = \
-DG_LOG_DOMAIN=\"common\" \
$(GLIB_LIBS) \
$(SYSTEMD_DAEMON_LIBS)
+EXTRA_DIST = \
+ shutdown-consumer-dbus.xml
+
+DISTCLEANFILES = \
+ $(libcommon_la_built_sources)
+
+BUILT_SOURCES = \
+ $(libcommon_la_built_headers)
+
+shutdown-consumer-dbus.h: shutdown-consumer-dbus.xml Makefile
+ $(AM_V_GEN) $(GDBUS_CODEGEN) \
+ --interface-prefix org.genivi \
+ --c-namespace "" \
+ --generate-c-code shutdown-consumer-dbus \
+ --annotate org.genivi.lifecycle.ShutdownConsumer1 org.gtk.GDBus.C.Name \
+ Shutdown_Consumer $<
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<node>
+ <!--
+ org.genivi.lifecycle.ShutdownConsumer1:
+ @short_description: Interface for receiving Shutdown commands from the NSM
+
+ Shutdown Consumers are D-Bus object which are created to shut down apps
+ which do not have a Shutdown() D-Bus method to call. These are registered
+ with the Node State Manager (NSM) instead of the apps and shut down those
+ apps when Shutdown() is called on the Shutdown Consumer.
+ -->
+ <interface name="org.genivi.lifecycle.ShutdownConsumer1">
+ <!--
+ Shutdown:
+
+ Shuts down the app the ShutdownConsumer is associated with.
+ -->
+ <method name="Shutdown">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
+ </method>
+
+ </interface>
+</node>