diff options
-rw-r--r-- | src/custom-service-appstore.c | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/src/custom-service-appstore.c b/src/custom-service-appstore.c index 1e61852..f8d34d0 100644 --- a/src/custom-service-appstore.c +++ b/src/custom-service-appstore.c @@ -2,16 +2,18 @@ #include "config.h" #endif +#include <dbus/dbus-glib.h> #include "custom-service-appstore.h" +#include "dbus-shared.h" /* DBus Prototypes */ -static gboolean _custom_service_server_get_applications (CustomServiceAppstore * appstore, GArray ** apps, gpointer user_data); +static gboolean _custom_service_server_get_applications (CustomServiceAppstore * appstore, GArray ** apps); -static gboolean _notification_watcher_server_register_service (CustomServiceAppstore * appstore, const gchar * service, gpointer user_data); -static gboolean _notification_watcher_server_registered_services (CustomServiceAppstore * appstore, GArray ** apps, gpointer user_data); -static gboolean _notification_watcher_server_protocol_version (CustomServiceAppstore * appstore, char ** version, gpointer user_data); -static gboolean _notification_watcher_server_register_notification_host (CustomServiceAppstore * appstore, const gchar * host, gpointer user_data); -static gboolean _notification_watcher_server_is_notification_host_registered (CustomServiceAppstore * appstore, gboolean * haveHost, gpointer user_data); +static gboolean _notification_watcher_server_register_service (CustomServiceAppstore * appstore, const gchar * service, DBusGMethodInvocation * method); +static gboolean _notification_watcher_server_registered_services (CustomServiceAppstore * appstore, GArray ** apps); +static gboolean _notification_watcher_server_protocol_version (CustomServiceAppstore * appstore, char ** version); +static gboolean _notification_watcher_server_register_notification_host (CustomServiceAppstore * appstore, const gchar * host); +static gboolean _notification_watcher_server_is_notification_host_registered (CustomServiceAppstore * appstore, gboolean * haveHost); #include "custom-service-server.h" #include "notification-watcher-server.h" @@ -63,7 +65,7 @@ custom_service_appstore_init (CustomServiceAppstore *self) } dbus_g_connection_register_g_object(session_bus, - "/my/path", + INDICATOR_CUSTOM_DBUS_OBJ, G_OBJECT(self)); return; @@ -87,44 +89,47 @@ custom_service_appstore_finalize (GObject *object) /* DBus Interface */ static gboolean -_custom_service_server_get_applications (CustomServiceAppstore * appstore, GArray ** apps, gpointer user_data) +_custom_service_server_get_applications (CustomServiceAppstore * appstore, GArray ** apps) { return FALSE; } static gboolean -_notification_watcher_server_register_service (CustomServiceAppstore * appstore, const gchar * service, gpointer user_data) +_notification_watcher_server_register_service (CustomServiceAppstore * appstore, const gchar * service, DBusGMethodInvocation * method) { - return FALSE; + + + dbus_g_method_return(method, G_TYPE_NONE); + return TRUE; } static gboolean -_notification_watcher_server_registered_services (CustomServiceAppstore * appstore, GArray ** apps, gpointer user_data) +_notification_watcher_server_registered_services (CustomServiceAppstore * appstore, GArray ** apps) { return FALSE; } static gboolean -_notification_watcher_server_protocol_version (CustomServiceAppstore * appstore, char ** version, gpointer user_data) +_notification_watcher_server_protocol_version (CustomServiceAppstore * appstore, char ** version) { - - return FALSE; + *version = g_strdup("Ayatana Version 1"); + return TRUE; } static gboolean -_notification_watcher_server_register_notification_host (CustomServiceAppstore * appstore, const gchar * host, gpointer user_data) +_notification_watcher_server_register_notification_host (CustomServiceAppstore * appstore, const gchar * host) { return FALSE; } static gboolean -_notification_watcher_server_is_notification_host_registered (CustomServiceAppstore * appstore, gboolean * haveHost, gpointer user_data) +_notification_watcher_server_is_notification_host_registered (CustomServiceAppstore * appstore, gboolean * haveHost) { - - return FALSE; + *haveHost = TRUE; + return TRUE; } |