diff options
author | Ted Gould <ted@gould.cx> | 2009-12-01 16:34:32 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2009-12-01 16:34:32 -0600 |
commit | aa951a3eb41ba3e4c9fcf9732992aa6e28dc83a8 (patch) | |
tree | 2c42be9ebf202e375444e9eb8513735b1419fd5e /libindicator | |
parent | ad2ef4d35017d674caecc65ccde4e500b0740982 (diff) | |
download | libayatana-indicator-aa951a3eb41ba3e4c9fcf9732992aa6e28dc83a8.tar.gz libayatana-indicator-aa951a3eb41ba3e4c9fcf9732992aa6e28dc83a8.tar.bz2 libayatana-indicator-aa951a3eb41ba3e4c9fcf9732992aa6e28dc83a8.zip |
Change the watch function to return both an API version and a user set version.
Diffstat (limited to 'libindicator')
-rw-r--r-- | libindicator/indicator-service-manager.c | 6 | ||||
-rw-r--r-- | libindicator/indicator-service.c | 2 | ||||
-rw-r--r-- | libindicator/indicator-service.xml | 3 |
3 files changed, 6 insertions, 5 deletions
diff --git a/libindicator/indicator-service-manager.c b/libindicator/indicator-service-manager.c index 4eaed23..4cf80c6 100644 --- a/libindicator/indicator-service-manager.c +++ b/libindicator/indicator-service-manager.c @@ -232,7 +232,7 @@ get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspe } static void -watch_cb (DBusGProxy * proxy, gint service_version, GError * error, gpointer user_data) +watch_cb (DBusGProxy * proxy, guint service_api_version, guint this_service_version, GError * error, gpointer user_data) { IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(user_data); @@ -242,8 +242,8 @@ watch_cb (DBusGProxy * proxy, gint service_version, GError * error, gpointer use return; } - if (service_version != INDICATOR_SERVICE_VERSION) { - g_warning("Service is using a different version of the service interface. Expecting %d and got %d.", INDICATOR_SERVICE_VERSION, service_version); + if (service_api_version != INDICATOR_SERVICE_VERSION) { + g_warning("Service is using a different version of the service interface. Expecting %d and got %d.", INDICATOR_SERVICE_VERSION, service_api_version); return; } diff --git a/libindicator/indicator-service.c b/libindicator/indicator-service.c index 69422c5..a4cdb68 100644 --- a/libindicator/indicator-service.c +++ b/libindicator/indicator-service.c @@ -305,7 +305,7 @@ _indicator_service_server_watch (IndicatorService * service, DBusGMethodInvocati priv->timeout = 0; } - dbus_g_method_return(method, 1); + dbus_g_method_return(method, INDICATOR_SERVICE_VERSION, 0); return TRUE; } diff --git a/libindicator/indicator-service.xml b/libindicator/indicator-service.xml index d876ea8..dc872e2 100644 --- a/libindicator/indicator-service.xml +++ b/libindicator/indicator-service.xml @@ -7,7 +7,8 @@ <!-- Methods --> <method name="Watch"> <annotation name="org.freedesktop.DBus.GLib.Async" value="true" /> - <arg type="i" name="version" direction="out" /> + <arg type="u" name="version" direction="out" /> + <arg type="u" name="service_version" direction="out" /> </method> <!-- Signals --> |