aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-11-06 16:19:35 -0600
committerTed Gould <ted@canonical.com>2009-11-06 16:19:35 -0600
commit46443702113ebba13864a1452333a3bd25a9088e (patch)
tree310885e938c332ad589b610e8f2e9288a758b7c0
parentfaef47fd05128981c33057236dca7bedab9dd639 (diff)
downloadayatana-indicator-application-46443702113ebba13864a1452333a3bd25a9088e.tar.gz
ayatana-indicator-application-46443702113ebba13864a1452333a3bd25a9088e.tar.bz2
ayatana-indicator-application-46443702113ebba13864a1452333a3bd25a9088e.zip
Changing some API and implementing the simple stuff.
-rw-r--r--src/custom-service-appstore.c41
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;
}