#include <stdio.h>
#include <dconf-dbus-1.h>
#include <dbus/dbus-glib-lowlevel.h>

static void notify(DConfDBusClient *client, const char *key, gpointer user_data)
{
  printf("NOTIFY key %s\n", key);
}

int main(int argc, char **argv)
{
  g_type_init ();

  GMainLoop *loop;
  DConfDBusClient *dconfClient;

  loop = g_main_loop_new (NULL, FALSE);
  dbus_connection_setup_with_g_main (dbus_bus_get (DBUS_BUS_SESSION, 0), NULL);
  dconfClient = dconf_dbus_client_new(NULL, dbus_bus_get (DBUS_BUS_SESSION, 0), NULL);

  dconf_dbus_client_subscribe(dconfClient, "/", notify, NULL);

  g_main_loop_run(loop);
  return 0;
}

