aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurélien Gâteau <agateau@canonical.com>2010-01-08 09:56:56 -0600
committerTed Gould <ted@gould.cx>2010-01-08 09:56:56 -0600
commit1c834b9b1e97a7a2ef552a5cdff726f3d4e6194a (patch)
treee9b9249dd7aed9227c0f423a9494a28980e8cc04
parentd7719b9d3dd3647e7b412d60665d534f6923b87a (diff)
parent5f86c7263748a2e95c3f9101a5197ef924b69ec9 (diff)
downloadlibayatana-appindicator-1c834b9b1e97a7a2ef552a5cdff726f3d4e6194a.tar.gz
libayatana-appindicator-1c834b9b1e97a7a2ef552a5cdff726f3d4e6194a.tar.bz2
libayatana-appindicator-1c834b9b1e97a7a2ef552a5cdff726f3d4e6194a.zip
Changing to freedesktop.org namespace and fixing some of the function names and interfaces that weren't matching the FD.o spec.
-rw-r--r--src/application-service-watcher.c18
-rw-r--r--src/dbus-shared.h9
-rw-r--r--src/libappindicator/app-indicator.c2
-rw-r--r--src/notification-item.xml4
-rw-r--r--src/notification-watcher.xml8
5 files changed, 25 insertions, 16 deletions
diff --git a/src/application-service-watcher.c b/src/application-service-watcher.c
index 984b9d4..1ad59d4 100644
--- a/src/application-service-watcher.c
+++ b/src/application-service-watcher.c
@@ -29,8 +29,8 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include "application-service-watcher.h"
#include "dbus-shared.h"
-static gboolean _notification_watcher_server_register_service (ApplicationServiceWatcher * appwatcher, const gchar * service, DBusGMethodInvocation * method);
-static gboolean _notification_watcher_server_registered_services (ApplicationServiceWatcher * appwatcher, GArray ** apps);
+static gboolean _notification_watcher_server_register_status_notifier_item (ApplicationServiceWatcher * appwatcher, const gchar * service, DBusGMethodInvocation * method);
+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_is_notification_host_registered (ApplicationServiceWatcher * appwatcher, gboolean * haveHost);
@@ -165,18 +165,26 @@ application_service_watcher_new (ApplicationServiceAppstore * appstore)
}
static gboolean
-_notification_watcher_server_register_service (ApplicationServiceWatcher * appwatcher, const gchar * service, DBusGMethodInvocation * method)
+_notification_watcher_server_register_status_notifier_item (ApplicationServiceWatcher * appwatcher, const gchar * service, DBusGMethodInvocation * method)
{
ApplicationServiceWatcherPrivate * priv = APPLICATION_SERVICE_WATCHER_GET_PRIVATE(appwatcher);
- application_service_appstore_application_add(priv->appstore, dbus_g_method_get_sender(method), service);
+ if (service[0] == '/') {
+ application_service_appstore_application_add(priv->appstore,
+ dbus_g_method_get_sender(method),
+ service);
+ } else {
+ application_service_appstore_application_add(priv->appstore,
+ service,
+ NOTIFICATION_ITEM_DEFAULT_OBJ);
+ }
dbus_g_method_return(method, G_TYPE_NONE);
return TRUE;
}
static gboolean
-_notification_watcher_server_registered_services (ApplicationServiceWatcher * appwatcher, GArray ** apps)
+_notification_watcher_server_registered_status_notifier_items (ApplicationServiceWatcher * appwatcher, GArray ** apps)
{
return FALSE;
diff --git a/src/dbus-shared.h b/src/dbus-shared.h
index f888e02..efc57a4 100644
--- a/src/dbus-shared.h
+++ b/src/dbus-shared.h
@@ -20,12 +20,13 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define INDICATOR_APPLICATION_DBUS_ADDR "org.ayatana.indicator.application"
+#define INDICATOR_APPLICATION_DBUS_ADDR "org.freedesktop.StatusNotifierWatcher"
#define INDICATOR_APPLICATION_DBUS_OBJ "/org/ayatana/indicator/application/service"
#define INDICATOR_APPLICATION_DBUS_IFACE "org.ayatana.indicator.application.service"
-#define NOTIFICATION_WATCHER_DBUS_OBJ "/org/ayatana/indicator/application/NotificationWatcher"
-#define NOTIFICATION_WATCHER_DBUS_IFACE "org.ayatana.indicator.application.NotificationWatcher"
+#define NOTIFICATION_WATCHER_DBUS_OBJ "/StatusNotifierWatcher"
+#define NOTIFICATION_WATCHER_DBUS_IFACE "org.freedesktop.StatusNotifierWatcher"
-#define NOTIFICATION_ITEM_DBUS_IFACE "org.ayatana.indicator.application.NotificationItem"
+#define NOTIFICATION_ITEM_DBUS_IFACE "org.freedesktop.StatusNotifierItem"
+#define NOTIFICATION_ITEM_DEFAULT_OBJ "/StatusNotifierItem"
diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c
index ec598db..401f535 100644
--- a/src/libappindicator/app-indicator.c
+++ b/src/libappindicator/app-indicator.c
@@ -513,7 +513,7 @@ check_connect (AppIndicator *self)
return;
}
- org_ayatana_indicator_application_NotificationWatcher_register_service_async(priv->watcher_proxy, "/need/a/path", register_service_cb, self);
+ org_freedesktop_StatusNotifierWatcher_register_status_notifier_item_async(priv->watcher_proxy, "/need/a/path", register_service_cb, self);
return;
}
diff --git a/src/notification-item.xml b/src/notification-item.xml
index c28cc54..93ff903 100644
--- a/src/notification-item.xml
+++ b/src/notification-item.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<node name="/">
- <interface name="org.ayatana.indicator.application.NotificationItem">
+<node name="/StatusNotifierItem">
+ <interface name="org.freedesktop.StatusNotifierItem">
<!-- Properties -->
<property name="Id" type="s" access="read" />
diff --git a/src/notification-watcher.xml b/src/notification-watcher.xml
index 2ef54a0..22ada5f 100644
--- a/src/notification-watcher.xml
+++ b/src/notification-watcher.xml
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
-<node name="/">
- <interface name="org.ayatana.indicator.application.NotificationWatcher">
+<node name="/StatusNotifierWatcher">
+ <interface name="org.freedesktop.StatusNotifierWatcher">
<!-- Properties -->
<!-- None currently -->
<!-- Methods -->
- <method name="RegisterService">
+ <method name="RegisterStatusNotifierItem">
<annotation name="org.freedesktop.DBus.GLib.Async" value="true" />
<arg type="s" name="service" direction="in" />
</method>
- <method name="RegisteredServices">
+ <method name="RegisteredStatusNotifierItems">
<arg type="as" name="services" direction="out" />
</method>
<method name="ProtocolVersion">