aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bzrignore2
-rw-r--r--src/Makefile.am1
-rw-r--r--src/application-service-watcher.c8
-rw-r--r--src/notification-approver.xml22
-rw-r--r--src/notification-watcher.xml7
5 files changed, 40 insertions, 0 deletions
diff --git a/.bzrignore b/.bzrignore
index c044203..0d82d3e 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -107,3 +107,5 @@ docs/reference/libappindicator-decl.txt.bak
docs/reference/libappindicator-decl-list.txt.bak
src/AppIndicator-0.1.vapi
bindings/mono/policy.appindicator-sharp.dll
+src/notification-approver-client.h
+src/notification-approver-server.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 787ba2f..68be1c0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -116,6 +116,7 @@ libappindicator_la_LIBADD = \
DBUS_SPECS = \
dbus-properties.xml \
application-service.xml \
+ notification-approver.xml \
notification-item.xml \
notification-watcher.xml
diff --git a/src/application-service-watcher.c b/src/application-service-watcher.c
index eff249d..844585d 100644
--- a/src/application-service-watcher.c
+++ b/src/application-service-watcher.c
@@ -34,6 +34,7 @@ static gboolean _notification_watcher_server_register_status_notifier_item (Appl
static gboolean _notification_watcher_server_registered_status_notifier_items (ApplicationServiceWatcher * appwatcher, GArray ** apps);
static gboolean _notification_watcher_server_protocol_version (ApplicationServiceWatcher * appwatcher, char ** version);
static gboolean _notification_watcher_server_register_notification_host (ApplicationServiceWatcher * appwatcher, const gchar * host);
+static gboolean _notification_watcher_server_register_notification_approver (ApplicationServiceWatcher * appwatcher, const GValue * path, const GArray * categories, DBusGMethodInvocation * method);
static gboolean _notification_watcher_server_is_notification_host_registered (ApplicationServiceWatcher * appwatcher, gboolean * haveHost);
static void get_name_cb (DBusGProxy * proxy, guint status, GError * error, gpointer data);
@@ -249,3 +250,10 @@ get_name_cb (DBusGProxy * proxy, guint status, GError * error, gpointer data)
return;
}
+
+static gboolean
+_notification_watcher_server_register_notification_approver (ApplicationServiceWatcher * appwatcher, const GValue * path, const GArray * categories, DBusGMethodInvocation * method)
+{
+
+ return FALSE;
+}
diff --git a/src/notification-approver.xml b/src/notification-approver.xml
new file mode 100644
index 0000000..b1e69b9
--- /dev/null
+++ b/src/notification-approver.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/">
+ <interface name="org.ayatana.StatusNotifierApprover">
+
+<!-- Methods -->
+ <method name="ApproveItem">
+ <!-- KSNI ID -->
+ <arg type="s" name="id" direction="in" />
+ <!-- KSNI Category -->
+ <arg type="s" name="category" direction="in" />
+ <!-- Application PID -->
+ <arg type="u" name="pid" direction="in" />
+ <!-- Application DBus Address -->
+ <arg type="s" name="address" direction="in" />
+ <!-- Application DBus Path for KSNI interface -->
+ <arg type="o" name="path" direction="in" />
+ <!-- So, what do you think? -->
+ <arg type="b" name="approved" direction="out" />
+ </method>
+
+ </interface>
+</node>
diff --git a/src/notification-watcher.xml b/src/notification-watcher.xml
index c2324f1..cc7882d 100644
--- a/src/notification-watcher.xml
+++ b/src/notification-watcher.xml
@@ -22,6 +22,13 @@
<method name="IsNotificationHostRegistered">
<arg type="b" name="hasHost" direction="out" />
</method>
+ <method name="RegisterNotificationApprover">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value="true" />
+ <!-- The path where to find the approver interface -->
+ <arg type="o" name="path" direction="in" />
+ <!-- List of categories to approve, none represents all -->
+ <arg type="as" name="categories" direction="in" />
+ </method>
<!-- Signals -->
<signal name="ServiceRegistered">