aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/im-client.c4
-rw-r--r--tests/listen-and-print.c20
2 files changed, 13 insertions, 11 deletions
diff --git a/tests/im-client.c b/tests/im-client.c
index cdf3484..43635f0 100644
--- a/tests/im-client.c
+++ b/tests/im-client.c
@@ -13,7 +13,9 @@ main (int argc, char ** argv)
indicate_indicator_set_property(INDICATE_INDICATOR(indicator), "subtype", "im");
indicate_indicator_set_property(INDICATE_INDICATOR(indicator), "sender", "Ted Gould");
indicate_indicator_set_property(INDICATE_INDICATOR(indicator), "time", "11:11");
- indicate_indicator_show(indicator);
+ indicate_indicator_show(INDICATE_INDICATOR(indicator));
+
+ indicate_indicator_set_property(INDICATE_INDICATOR(indicator), "time", "11:12");
g_main_loop_run(g_main_loop_new(NULL, FALSE));
diff --git a/tests/listen-and-print.c b/tests/listen-and-print.c
index 9ad2cc8..b12fd3d 100644
--- a/tests/listen-and-print.c
+++ b/tests/listen-and-print.c
@@ -5,31 +5,31 @@
static void
indicator_added (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gpointer data)
{
- g_debug("Indicator Added: %s %d %s", (gchar *)server, (guint)indicator, type);
+ g_debug("Indicator Added: %s %d %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_INDICATOR_ID(indicator), type);
}
static void
indicator_removed (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gpointer data)
{
- g_debug("Indicator Removed: %s %d %s", (gchar *)server, (guint)indicator, type);
+ g_debug("Indicator Removed: %s %d %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_INDICATOR_ID(indicator), type);
}
static void
indicator_modified (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gchar * property, gpointer data)
{
- g_debug("Indicator Modified: %s %d %s %s", (gchar *)server, (guint)indicator, type, property);
+ g_debug("Indicator Modified: %s %d %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_INDICATOR_ID(indicator), type, property);
}
static void
server_added (IndicateListener * listener, IndicateListenerServer * server, gpointer data)
{
- g_debug("Indicator Server Added: %s", (gchar *)server);
+ g_debug("Indicator Server Added: %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server));
}
static void
server_removed (IndicateListener * listener, IndicateListenerServer * server, gpointer data)
{
- g_debug("Indicator Server Removed: %s", (gchar *)server);
+ g_debug("Indicator Server Removed: %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server));
}
int
@@ -39,11 +39,11 @@ main (int argc, char ** argv)
IndicateListener * listener = indicate_listener_new();
- g_signal_connect(listener, "indicator-added", G_CALLBACK(indicator_added), NULL);
- g_signal_connect(listener, "indicator-removed", G_CALLBACK(indicator_removed), NULL);
- g_signal_connect(listener, "indicator-modified", G_CALLBACK(indicator_modified), NULL);
- g_signal_connect(listener, "server-added", G_CALLBACK(server_added), NULL);
- g_signal_connect(listener, "server-removed", G_CALLBACK(server_removed), NULL);
+ g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_INDICATOR_ADDED, G_CALLBACK(indicator_added), NULL);
+ g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_INDICATOR_REMOVED, G_CALLBACK(indicator_removed), NULL);
+ g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_INDICATOR_MODIFIED, G_CALLBACK(indicator_modified), NULL);
+ g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), NULL);
+ g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_REMOVED, G_CALLBACK(server_removed), NULL);
g_main_loop_run(g_main_loop_new(NULL, FALSE));