Back to index

libindicate  12.10.0
Functions | Variables
test-simple-server.c File Reference
#include <glib.h>
#include "libindicate/listener.h"

Go to the source code of this file.


static void server_added (IndicateListener *listener, IndicateListenerServer *server, gchar *type, gpointer data)
static gboolean failed_cb (gpointer data)
int main (int argc, char *argv)


static gboolean passed = TRUE
static GMainLoop * mainloop = NULL

Function Documentation

static gboolean failed_cb ( gpointer  data) [static]

Definition at line 20 of file test-simple-server.c.

       g_debug("Failed to get a server in 5 seconds.");
       passed = FALSE;
       return FALSE;

Here is the caller graph for this function:

int main ( int  argc,
char *  argv 

Definition at line 29 of file test-simple-server.c.

       // HACK: This just works around a bug
       indicate_server_ref_default ();
       IndicateListener * listener = indicate_listener_ref_default();
       IndicateServer * server = g_object_new (INDICATE_TYPE_SERVER, "path", "/com/tests/indicate/server", NULL);
       indicate_server_set_type(server, "test.type");
       g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), NULL);

       indicate_server_show (server);

       g_timeout_add_seconds(5, failed_cb, NULL);

       mainloop = g_main_loop_new(NULL, FALSE);

       return !passed;

Here is the call graph for this function:

static void server_added ( IndicateListener *  listener,
IndicateListenerServer *  server,
gchar *  type,
gpointer  data 
) [static]

Definition at line 9 of file test-simple-server.c.

        g_debug("Indicator Server Added:   %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type);
        if (!g_strcmp0(type, "test.type")) {
                if (!g_strcmp0(indicate_listener_server_get_dbuspath(server), "/com/tests/indicate/server")) {

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

GMainLoop* mainloop = NULL [static]

Definition at line 6 of file test-simple-server.c.

gboolean passed = TRUE [static]

Definition at line 5 of file test-simple-server.c.