From c1af9b2ba423a8ff31dd903492cdae9ad46fdea4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
Date: Thu, 11 Jul 2019 14:24:27 +0200
Subject: [PATCH] Add dbus protocol definition

This let's us drop the virtboard build dependency.
---
 data/dbus/sm.puri.OSK0.xml | 20 ++++++++++++++++++++
 src/meson.build            |  2 +-
 2 files changed, 21 insertions(+), 1 deletion(-)
 create mode 100644 data/dbus/sm.puri.OSK0.xml

diff --git a/data/dbus/sm.puri.OSK0.xml b/data/dbus/sm.puri.OSK0.xml
new file mode 100644
index 00000000..a543ee1d
--- /dev/null
+++ b/data/dbus/sm.puri.OSK0.xml
@@ -0,0 +1,20 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
+  <interface name="sm.puri.OSK0">
+    <method name="SetVisible">
+      <arg name="visible" type="b" direction="in"/>
+      <doc:doc><doc:description>
+        Switch keyboard visibility
+      </doc:description></doc:doc>
+    </method>
+    <method name="GetVisible">
+      <arg name="visible" type="b" direction="out"/>
+      <doc:doc><doc:description>
+        Get keyboard visibility
+      </doc:description></doc:doc>
+    </method>
+    <property name="Visible" type="b" access="read">
+    </property>
+  </interface>
+</node>
diff --git a/src/meson.build b/src/meson.build
index 1b304308..fc3ddc04 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,7 +1,7 @@
 gnome = import('gnome')
 dbus_src = gnome.gdbus_codegen(
     'sm.puri.OSK0',
-    join_paths(dbusdir, 'sm.puri.OSK0.xml')
+    join_paths(meson.source_root() / 'data' / 'dbus', 'sm.puri.OSK0.xml')
 )
 
 squeekboard_resources = gnome.compile_resources(
-- 
GitLab