Back to index

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

Go to the source code of this file.

Functions

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

Variables

static gboolean passed = TRUE
static GMainLoop * mainloop = NULL

Function Documentation

void cb ( IndicateListener *  listener,
IndicateListenerServer *  server,
gchar *  value,
gpointer  data 
)

Definition at line 9 of file test-icon-theme-server.c.

{
       g_debug("Got Icon Theme: %s", value);
       if (g_strcmp0(value, "test-theme") != 0) {
              passed = FALSE;
       }
       g_main_loop_quit(mainloop);
       return;
}

Here is the caller graph for this function:

static gboolean failed_cb ( gpointer  data) [static]

Definition at line 29 of file test-icon-theme-server.c.

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

Here is the caller graph for this function:

int main ( int  argc,
char *  argv 
)

Definition at line 38 of file test-icon-theme-server.c.

{
       g_type_init();

       IndicateListener * listener = indicate_listener_ref_default();

       g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), NULL);

       g_timeout_add_seconds(5, failed_cb, NULL);

       mainloop = g_main_loop_new(NULL, FALSE);
       g_main_loop_run(mainloop);

       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 20 of file test-icon-theme-server.c.

{
       g_debug("Indicator Server Added:   %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type);
       g_debug("\tLooking for theme...");
       indicate_listener_server_get_icon_theme(listener, server, cb, NULL);
       return;
}

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-icon-theme-server.c.

gboolean passed = TRUE [static]

Definition at line 5 of file test-icon-theme-server.c.