3
#include "libindicate/listener.h"
4
#include "test-max-indicators-list.h"
6
static gboolean passed = TRUE;
7
static GMainLoop * mainloop = NULL;
11
indicator_added (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gpointer data)
13
return indicate_listener_displayed(listener, server, indicator, TRUE);
17
failed_cb (gpointer data)
19
g_debug("Done indicatating displayed");
20
g_main_loop_quit(mainloop);
27
g_debug("Server went away, exiting.");
28
g_main_loop_quit(mainloop);
33
main (int argc, char * argv)
37
IndicateListener * listener = indicate_listener_ref_default();
39
g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_INDICATOR_ADDED, G_CALLBACK(indicator_added), NULL);
40
g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_REMOVED, G_CALLBACK(server_removed), NULL);
42
g_timeout_add_seconds(2, failed_cb, NULL);
44
mainloop = g_main_loop_new(NULL, FALSE);
45
g_main_loop_run(mainloop);