[notification-daemon] add / update notifications interface



commit 5599cf3ea9380a7d6996594dcf5fa855d702bcfb
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Wed Sep 16 16:04:24 2015 +0300

    add / update notifications interface

 src/Makefile.am                       |   34 +++++++++++++++++++++---
 src/notificationdaemon.xml            |   40 ------------------------------
 src/org.freedesktop.Notifications.xml |   44 +++++++++++++++++++++++++++++++++
 3 files changed, 73 insertions(+), 45 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 4ecb9fc..fc04892 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,8 @@
 NULL =
 
-libexec_PROGRAMS = notification-daemon
+libexec_PROGRAMS = \
+       notification-daemon \
+       $(NULL)
 
 notification_daemon_SOURCES = \
        nd-notification.c \
@@ -17,13 +19,12 @@ notification_daemon_SOURCES = \
        daemon.h \
        sound.c \
        sound.h \
+       $(BUILT_SOURCES) \
        $(NULL)
 
-notification_daemon_LDADD = $(NOTIFICATION_DAEMON_LIBS)
-
 notification_daemon_CFLAGS = \
-       -I$(top_srcdir) \
        -DLOCALE_DIR=\""$(datadir)/locale"\" \
+       -I$(top_builddir)/src \
        $(NOTIFICATION_DAEMON_CFLAGS) \
        $(WARN_CFLAGS) \
        $(AM_CFLAGS) \
@@ -34,6 +35,29 @@ notification_daemon_LDFLAGS = \
        $(AM_LDFLAGS) \
        $(NULL)
 
-EXTRA_DIST = notificationdaemon.xml
+notification_daemon_LDADD = \
+       $(NOTIFICATION_DAEMON_LIBS) \
+       $(NULL)
+
+nd-fd-notifications.h:
+nd-fd-notifications.c: org.freedesktop.Notifications.xml
+       $(AM_V_GEN) gdbus-codegen \
+               --interface-prefix org.freedesktop.Notifications \
+               --c-namespace Nd \
+               --generate-c-code nd-fd-notifications \
+               $(srcdir)/org.freedesktop.Notifications.xml
+
+BUILT_SOURCES = \
+       nd-fd-notifications.c \
+       nd-fd-notifications.h \
+       $(NULL)
+
+EXTRA_DIST = \
+       org.freedesktop.Notifications.xml \
+       $(NULL)
+
+CLEANFILES = \
+       $(BUILT_SOURCES) \
+       $(NULL)
 
 -include $(top_srcdir)/git.mk
diff --git a/src/org.freedesktop.Notifications.xml b/src/org.freedesktop.Notifications.xml
new file mode 100644
index 0000000..a0966f9
--- /dev/null
+++ b/src/org.freedesktop.Notifications.xml
@@ -0,0 +1,44 @@
+<node>
+  <interface name="org.freedesktop.Notifications">
+
+    <annotation name="org.gtk.GDBus.C.Name" value="FdNotifications" />
+
+    <method name="CloseNotification">
+      <arg type="u" name="id" direction="in" />
+    </method>
+
+    <method name="GetCapabilities">
+      <arg type="as" name="capabilities" direction="out" />
+    </method>
+
+    <method name="GetServerInformation">
+      <arg type="s" name="name" direction="out" />
+      <arg type="s" name="vendor" direction="out" />
+      <arg type="s" name="version" direction="out" />
+      <arg type="s" name="spec_version" direction="out" />
+    </method>
+
+    <method name="Notify">
+      <arg type="s" name="app_name" direction="in" />
+      <arg type="u" name="replaces_id" direction="in" />
+      <arg type="s" name="app_icon" direction="in" />
+      <arg type="s" name="summary" direction="in" />
+      <arg type="s" name="body" direction="in" />
+      <arg type="as" name="actions" direction="in" />
+      <arg type="a{sv}" name="hints" direction="in" />
+      <arg type="i" name="expire_timeout" direction="in" />
+      <arg type="u" name="id" direction="out" />
+    </method>
+
+    <signal name="ActionInvoked">
+      <arg type="u" name="id" />
+      <arg type="s" name="action_key" />
+    </signal>
+
+    <signal name="NotificationClosed">
+      <arg type="u" name="id" />
+      <arg type="u" name="reason" />
+    </signal>
+
+  </interface>
+</node>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]