aboutsummaryrefslogtreecommitdiffstats
path: root/docs/dbus/org.ferdium.Ferdium.xml
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2023-03-15 17:26:13 +0100
committerLibravatar GitHub <noreply@github.com>2023-03-15 17:26:13 +0100
commitf1152d3dbb4c6deefea168d66f15f77b7155a5fe (patch)
tree22c27234b6e3a2dfe47ade037ece47b2533f7039 /docs/dbus/org.ferdium.Ferdium.xml
parent6.2.6-nightly.5 [skip ci] (diff)
downloadferdium-app-f1152d3dbb4c6deefea168d66f15f77b7155a5fe.tar.gz
ferdium-app-f1152d3dbb4c6deefea168d66f15f77b7155a5fe.tar.zst
ferdium-app-f1152d3dbb4c6deefea168d66f15f77b7155a5fe.zip
Basic D-Bus API (#866)
* feat: basic D-Bus API Expose muted state and the number of unread message over D-Bus when running on Linux. This is useful for, e.g., displaying notifications on a window manager status bar. Signed-off-by: Kristóf Marussy <kristof@marussy.com> * docs: create docs directory Move the documentation to a separate directory so that new documentation can be added into one place. We keep the following files still in the repository root by convention: * CHANGELOG.md * CODE_OF_CONDUCT.md * CONTRIBUTING.md * LICENSE.md * README.md * SECURITY.md Signed-off-by: Kristóf Marussy <kristof@marussy.com> * docs: D-Bus usage example Signed-off-by: Kristóf Marussy <kristof@marussy.com> * fix: remove unneeded D-Bus signals Only notify clients that the message counts or the mute status has changed if there actually was a change. Signed-off-by: Kristóf Marussy <kristof@marussy.com> * docs: rewrite sample bar client * docs: better unread --services help * docs: update dbus docs * docs: use ferdium-dbus in dbus bar example * docs: make command argument required in bar example --------- Signed-off-by: Kristóf Marussy <kristof@marussy.com> Co-authored-by: Victor Bonnelle <victor.bonnelle@protonmail.com>
Diffstat (limited to 'docs/dbus/org.ferdium.Ferdium.xml')
-rw-r--r--docs/dbus/org.ferdium.Ferdium.xml80
1 files changed, 80 insertions, 0 deletions
diff --git a/docs/dbus/org.ferdium.Ferdium.xml b/docs/dbus/org.ferdium.Ferdium.xml
new file mode 100644
index 000000000..8c66a9e21
--- /dev/null
+++ b/docs/dbus/org.ferdium.Ferdium.xml
@@ -0,0 +1,80 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
3"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
4<node>
5 <!--
6 org.ferdium.Ferdium:
7 @short_description: Control Ferdium from the desktop
8
9 Interface for accessing Ferdium notification state, allowing notification
10 counts to be displayed in the desktop (e.g., on a status bar) and updating
11 the muted state of notifications.
12
13 The #org.ferdium.UnreadDirectMessageCount,
14 #org.ferdium.UnreadIndirectMessageCount, and #org.ferdium.UnreadServices
15 are affected by notification muting and hiding settings of Ferdium.
16 In particular, they are not updated if #org.ferdium.Muted is #TRUE.
17 Moreover, services with muted notifications or hidden indirect message
18 counts will not appear in the respective counts.
19 This behavior is consistent with the behavior of the Ferdium tray icon.
20 -->
21 <interface name="org.ferdium.Ferdium">
22 <!--
23 ToggleMute:
24
25 Toggles the muted state of notifcations.
26
27 Use the #org.ferdium.Ferdium.Muted property to get or set the current
28 muted state.
29 -->
30 <method name="ToggleMute" />
31 <!--
32 ToggleWindow:
33
34 Brings the Ferdium window into the foreground if it is not currently
35 focused. Hides the Ferdium window if is is currently focused.
36
37 Calling this method is equivalent to clicking on the Ferdium tray icon.
38 -->
39 <method name="ToggleWindow" />
40 <!--
41 Muted:
42
43 Gets or sets the current muted state of notifications.
44
45 #TRUE if notifications are currently muted, #FALSE otherwise.
46 -->
47 <property name="Muted" type="b" access="readwrite" />
48 <!--
49 UnreadDirectMessageCount:
50
51 The number of unread direct messages.
52 -->
53 <property name="UnreadDirectMessageCount" type="u" access="read" />
54 <!--
55 UnreadIndirectMessageCount:
56
57 The number of unread indirect messages.
58 -->
59 <property name="UnreadIndirectMessageCount" type="u" access="read" />
60 <!--
61 UnreadServices:
62
63 The list of services with unread messages.
64
65 The value of this property is an array of structs corresponding to each
66 service with unread messages.
67 The elements of a struct are the following:
68
69 1. The name of the service.
70
71 2. The number of unread direct messages of the service.
72
73 3. The number of unread indirect messages of the service.
74
75 Services with no unread direct or indirect messages (i.e., structs with
76 the second and third element set to 0) are omitted from the array.
77 -->
78 <property name="UnreadServices" type="a(suu)" access="read" />
79 </interface>
80</node>