diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-11-14 17:57:54 +0100 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-11-14 17:57:54 +0100 |
commit | 5a9434c6652ef1117a50a9226f8609cea2ee53c0 (patch) | |
tree | 61f0c88e1439a04375e27e0cdf26acb1e60f46de /common | |
parent | ebba9b86ef73743af028a82d53afa0a556017fe9 (diff) | |
download | ayatana-indicator-messages-5a9434c6652ef1117a50a9226f8609cea2ee53c0.tar.gz ayatana-indicator-messages-5a9434c6652ef1117a50a9226f8609cea2ee53c0.tar.bz2 ayatana-indicator-messages-5a9434c6652ef1117a50a9226f8609cea2ee53c0.zip |
Change application to service d-bus protocol
Previously, the protocol was simply a menu model and an action group of the
currently active sources. The service inserted the menu as a section into the
indicator menu.
This doesn't work anymore, because applications can (soon) expose individual
messages, and the messaging menu doesn't always display all of those at once.
This patch introduces a more specific d-bus API.
That API is still considered private: applications have to use
libmessaging-menu.
Diffstat (limited to 'common')
-rw-r--r-- | common/Makefile.am | 12 | ||||
-rw-r--r-- | common/com.canonical.indicator.messages.application.xml | 21 |
2 files changed, 32 insertions, 1 deletions
diff --git a/common/Makefile.am b/common/Makefile.am index 5bd7e20..0b8bad4 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -9,9 +9,19 @@ indicator-messages-service.c: com.canonical.indicator.messages.service.xml $^ indicator-messages-service.h: indicator-messages-service.c +indicator-messages-application.c: com.canonical.indicator.messages.application.xml + $(AM_V_GEN) gdbus-codegen \ + --interface-prefix com.canonical.indicator.messages. \ + --generate-c-code indicator-messages-application \ + --c-namespace IndicatorMessages \ + $^ +indicator-messages-application.h: indicator-messages-application.c + BUILT_SOURCES = \ indicator-messages-service.c \ - indicator-messages-service.h + indicator-messages-service.h \ + indicator-messages-application.c \ + indicator-messages-application.h libmessaging_common_la_SOURCES = \ $(BUILT_SOURCES) diff --git a/common/com.canonical.indicator.messages.application.xml b/common/com.canonical.indicator.messages.application.xml new file mode 100644 index 0000000..ec095dd --- /dev/null +++ b/common/com.canonical.indicator.messages.application.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<node name="/"> + <interface name="com.canonical.indicator.messages.application"> + <method name="ListSources"> + <arg type="a(sssuxsb)" name="sources" direction="out" /> + </method> + <method name="ActivateSource"> + <arg type="s" name="source_id" direction="in" /> + </method> + <signal name="SourceAdded"> + <arg type="u" name="position" direction="in" /> + <arg type="(sssuxsb)" name="source" direction="in" /> + </signal> + <signal name="SourceChanged"> + <arg type="(sssuxsb)" name="source" direction="in" /> + </signal> + <signal name="SourceRemoved"> + <arg type="s" name="source_id" direction="in" /> + </signal> + </interface> +</node> |