summaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/meson.build57
-rw-r--r--data/org.automotivelinux.AppLaunch.service.in3
-rw-r--r--data/org.automotivelinux.AppLaunch.xml74
-rw-r--r--data/org.freedesktop.Application.xml17
4 files changed, 151 insertions, 0 deletions
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 0000000..34aefa4
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,57 @@
+#
+# Copyright (C) 2021 Collabora Ltd
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+gnome = import('gnome')
+
+# DBus server interface
+dbus_prefix = 'org.automotivelinux.'
+dbus_namespace = 'applaunchd'
+
+generated_dbus_sources = []
+
+dbus_interfaces = [ 'org.automotivelinux.AppLaunch.xml' ]
+
+generated_dbus_sources += gnome.gdbus_codegen('applaunch-dbus',
+ sources : dbus_interfaces,
+ object_manager : false,
+ interface_prefix : 'org.automotivelinux.',
+ install_header : false,
+ namespace : 'applaunchd')
+
+dbus_header_dir = meson.current_build_dir()
+dbus_inc = include_directories('.')
+install_data(dbus_interfaces, install_dir: ifacedir)
+
+# Application DBus interface
+generated_dbus_sources += gnome.gdbus_codegen('fdo-dbus',
+ sources : [ 'org.freedesktop.Application.xml' ],
+ object_manager : false,
+ interface_prefix : 'org.freedesktop.',
+ install_header : false,
+ namespace : 'fdo')
+
+# systemd service file
+service_data = configuration_data()
+service_data.set('bindir', bindir)
+service_file = 'org.automotivelinux.AppLaunch.service'
+
+configure_file(
+ input : service_file + '.in',
+ output : service_file,
+ configuration : service_data,
+ install : true,
+ install_dir: servicedir,
+)
diff --git a/data/org.automotivelinux.AppLaunch.service.in b/data/org.automotivelinux.AppLaunch.service.in
new file mode 100644
index 0000000..41acad5
--- /dev/null
+++ b/data/org.automotivelinux.AppLaunch.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.automotivelinux.AppLaunch
+Exec=@bindir@/applaunchd
diff --git a/data/org.automotivelinux.AppLaunch.xml b/data/org.automotivelinux.AppLaunch.xml
new file mode 100644
index 0000000..52aa20b
--- /dev/null
+++ b/data/org.automotivelinux.AppLaunch.xml
@@ -0,0 +1,74 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+
+<!--
+ AppLaunch Interface Specification
+
+ Copyright (C) 2021 Collabora Ltd
+-->
+<node name="/org/automotivelinux/AppLaunch" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
+
+ <!--
+ org.automotivelinux.AppLaunch:
+ @short_description: The AppLaunch interface.
+
+ The AppLaunch interface allows requesting application startup and
+ being notified of application startup and termination events.
+ -->
+ <interface name="org.automotivelinux.AppLaunch">
+
+ <!--
+ start:
+ @appid: Application ID, should match:
+ - the xdg-shell app-id for graphical applications started
+ through a command line
+ - the D-Bus name owned by the application for D-Bus activated
+ apps
+
+ Start the application with the corresponding application ID.
+ -->
+ <method name="start">
+ <arg name="appid" type="s" direction="in"/>
+ </method>
+
+ <!--
+ listApplications:
+ @graphical: Whether the should should be limited to graphical
+ applications.
+ @applist: The application list as an array of variants. Each array item
+ is an application entry, represented as a structure of 3 strings:
+ - application ID
+ - application name
+ - absolute icon path
+
+ Retrieve the list of applications which can be started using this interface.
+ -->
+ <method name="listApplications">
+ <arg name="graphical" type="b" direction="in"/>
+ <arg name="applist" type="av" direction="out"/>
+ </method>
+
+ <!--
+ started:
+ @appid: Application ID
+
+ Emitted when an application started successfully, which happens when:
+ - the D-Bus name has been taken for D-Bus activated applications
+ - the process was created for other applications
+ -->
+ <signal name="started">
+ <arg name="appid" type="s"/>
+ </signal>
+
+ <!--
+ terminated:
+ @appid: Application ID
+
+ Emitted when an application terminated, which happens when:
+ - the D-Bus name has been released for D-Bus activated applications
+ - the process exited for other applications
+ -->
+ <signal name="terminated">
+ <arg name="appid" type="s"/>
+ </signal>
+ </interface>
+</node>
diff --git a/data/org.freedesktop.Application.xml b/data/org.freedesktop.Application.xml
new file mode 100644
index 0000000..dc03d70
--- /dev/null
+++ b/data/org.freedesktop.Application.xml
@@ -0,0 +1,17 @@
+<!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='org.freedesktop.Application'>
+ <method name='Activate'>
+ <arg type='a{sv}' name='platform_data' direction='in'/>
+ </method>
+ <method name='Open'>
+ <arg type='as' name='uris' direction='in'/>
+ <arg type='as' name='platform_data' direction='in'/>
+ </method>
+ <method name='ActivateAction'>
+ <arg type='s' name='action_name' direction='in'/>
+ <arg type='av' name='parameter' direction='in'/>
+ <arg type='as' name='platform_data' direction='in'/>
+ </method>
+ </interface>
+</node>