summaryrefslogtreecommitdiff
path: root/src/dbus
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbus')
-rw-r--r--src/dbus/com.github.hannesschulze.foobar.xml8
-rw-r--r--src/dbus/meson.build37
-rw-r--r--src/dbus/org.bluez.xml66
-rw-r--r--src/dbus/org.freedesktop.Notifications.xml35
-rw-r--r--src/dbus/org.freedesktop.UPower.xml12
5 files changed, 158 insertions, 0 deletions
diff --git a/src/dbus/com.github.hannesschulze.foobar.xml b/src/dbus/com.github.hannesschulze.foobar.xml
new file mode 100644
index 0000000..e8373a6
--- /dev/null
+++ b/src/dbus/com.github.hannesschulze.foobar.xml
@@ -0,0 +1,8 @@
+<node>
+ <interface name="com.github.hannesschulze.foobar.Server">
+ <method name="Inspector"/>
+ <method name="Quit"/>
+ <method name="ToggleLauncher"/>
+ <method name="ToggleControlCenter"/>
+ </interface>
+</node>
diff --git a/src/dbus/meson.build b/src/dbus/meson.build
new file mode 100644
index 0000000..ec22def
--- /dev/null
+++ b/src/dbus/meson.build
@@ -0,0 +1,37 @@
+foobar_sources += gnome.gdbus_codegen(
+ 'server',
+ 'com.github.hannesschulze.foobar.xml',
+ namespace: 'Foobar',
+ annotations: [
+ ['com.github.hannesschulze.foobar.Server', 'org.gtk.GDBus.C.Name', 'Server'],
+ ],
+)
+
+foobar_sources += gnome.gdbus_codegen(
+ 'notifications',
+ 'org.freedesktop.Notifications.xml',
+ namespace: 'Foobar',
+ annotations: [
+ ['org.freedesktop.Notifications', 'org.gtk.GDBus.C.Name', 'Notifications'],
+ ],
+)
+
+foobar_sources += gnome.gdbus_codegen(
+ 'upower',
+ 'org.freedesktop.UPower.xml',
+ namespace: 'Foobar',
+ annotations: [
+ ['org.freedesktop.UPower.Device', 'org.gtk.GDBus.C.Name', 'UPowerDevice'],
+ ],
+)
+
+foobar_sources += gnome.gdbus_codegen(
+ 'bluez',
+ 'org.bluez.xml',
+ namespace: 'Foobar',
+ annotations: [
+ ['org.bluez.Adapter1', 'org.gtk.GDBus.C.Name', 'BluezAdapter'],
+ ['org.bluez.Device1', 'org.gtk.GDBus.C.Name', 'BluezDevice'],
+ ['org.bluez.AgentManager1', 'org.gtk.GDBus.C.Name', 'BluezAgentManager'],
+ ],
+) \ No newline at end of file
diff --git a/src/dbus/org.bluez.xml b/src/dbus/org.bluez.xml
new file mode 100644
index 0000000..669e325
--- /dev/null
+++ b/src/dbus/org.bluez.xml
@@ -0,0 +1,66 @@
+<node>
+ <interface name="org.bluez.Adapter1">
+ <method name="StartDiscovery"/>
+ <method name="StopDiscovery"/>
+ <method name="RemoveDevice">
+ <arg name="device" type="o" direction="in"/>
+ </method>
+ <method name="SetDiscoveryFilter">
+ <arg name="properties" type="a{sv}" direction="in"/>
+ </method>
+ <property name="Address" type="s" access="read"/>
+ <property name="Name" type="s" access="read"/>
+ <property name="Alias" type="s" access="readwrite"/>
+ <property name="Class" type="u" access="read"/>
+ <property name="Powered" type="b" access="readwrite"/>
+ <property name="PowerState" type="s" access="read"/>
+ <property name="Discoverable" type="b" access="readwrite"/>
+ <property name="DiscoverableTimeout" type="u" access="readwrite"/>
+ <property name="Pairable" type="b" access="readwrite"/>
+ <property name="PairableTimeout" type="u" access="readwrite"/>
+ <property name="Discovering" type="b" access="read"/>
+ <property name="UUIDs" type="as" access="read"/>
+ <property name="Modalias" type="s" access="read"/>
+ </interface>
+
+ <interface name="org.bluez.Device1">
+ <method name="Disconnect"/>
+ <method name="Connect"/>
+ <method name="ConnectProfile">
+ <arg name="UUID" type="s" direction="in"/>
+ </method>
+ <method name="DisconnectProfile">
+ <arg name="UUID" type="s" direction="in"/>
+ </method>
+ <method name="Pair"/>
+ <method name="CancelPairing"/>
+ <property name="Address" type="s" access="read"/>
+ <property name="Name" type="s" access="read"/>
+ <property name="Alias" type="s" access="readwrite"/>
+ <property name="Class" type="u" access="read"/>
+ <property name="Appearance" type="q" access="read"/>
+ <property name="Icon" type="s" access="read"/>
+ <property name="Paired" type="b" access="read"/>
+ <property name="Trusted" type="b" access="readwrite"/>
+ <property name="Blocked" type="b" access="readwrite"/>
+ <property name="LegacyPairing" type="b" access="read"/>
+ <property name="RSSI" type="n" access="read"/>
+ <property name="Connected" type="b" access="read"/>
+ <property name="UUIDs" type="as" access="read"/>
+ <property name="Modalias" type="s" access="read"/>
+ <property name="Adapter" type="o" access="read"/>
+ </interface>
+
+ <interface name="org.bluez.AgentManager1">
+ <method name="RegisterAgent">
+ <arg name="agent" type="o" direction="in"/>
+ <arg name="capability" type="s" direction="in"/>
+ </method>
+ <method name="UnregisterAgent">
+ <arg name="agent" type="o" direction="in"/>
+ </method>
+ <method name="RequestDefaultAgent">
+ <arg name="agent" type="o" direction="in"/>
+ </method>
+ </interface>
+</node>
diff --git a/src/dbus/org.freedesktop.Notifications.xml b/src/dbus/org.freedesktop.Notifications.xml
new file mode 100644
index 0000000..6b1d2f2
--- /dev/null
+++ b/src/dbus/org.freedesktop.Notifications.xml
@@ -0,0 +1,35 @@
+<node>
+ <interface name="org.freedesktop.Notifications">
+ <method name="Notify">
+ <arg type="s" direction="in"/>
+ <arg type="u" direction="in"/>
+ <arg type="s" direction="in"/>
+ <arg type="s" direction="in"/>
+ <arg type="s" direction="in"/>
+ <arg type="as" direction="in"/>
+ <arg type="a{sv}" direction="in"/>
+ <arg type="i" direction="in"/>
+ <arg type="u" direction="out"/>
+ </method>
+ <method name="CloseNotification">
+ <arg type="u" direction="in" name="id"/>
+ </method>
+ <method name="GetCapabilities">
+ <arg type="as" direction="out"/>
+ </method>
+ <method name="GetServerInformation">
+ <arg type="s" direction="out"/>
+ <arg type="s" direction="out"/>
+ <arg type="s" direction="out"/>
+ <arg type="s" direction="out"/>
+ </method>
+ <signal name="NotificationClosed">
+ <arg type="u"/>
+ <arg type="u"/>
+ </signal>
+ <signal name="ActionInvoked">
+ <arg type="u"/>
+ <arg type="s"/>
+ </signal>
+ </interface>
+</node>
diff --git a/src/dbus/org.freedesktop.UPower.xml b/src/dbus/org.freedesktop.UPower.xml
new file mode 100644
index 0000000..18fc41d
--- /dev/null
+++ b/src/dbus/org.freedesktop.UPower.xml
@@ -0,0 +1,12 @@
+<node>
+ <interface name="org.freedesktop.UPower.Device">
+ <property name="State" type="u" access="read"/>
+ <property name="Percentage" type="d" access="read"/>
+ <property name="IsPresent" type="b" access="read"/>
+ <property name="TimeToEmpty" type="x" access="read"/>
+ <property name="TimeToFull" type="x" access="read"/>
+ <property name="Energy" type="d" access="read"/>
+ <property name="EnergyFull" type="d" access="read"/>
+ <property name="EnergyRate" type="d" access="read"/>
+ </interface>
+</node>