#ifndef DBUS_API_SUBJECT_TO_CHANGE #define DBUS_API_SUBJECT_TO_CHANGE #include <dbus/dbus-glib.h> #include "purple-client.h" static DBusGConnection *bus; static DBusGProxy *purple_proxy; static GList *garray_int_to_glist(GArray *array) for (i = 0; i < array->len; i++) list = g_list_append(list, GINT_TO_POINTER(g_array_index(array,gint,i))); g_array_free(array, TRUE); static GSList *garray_int_to_gslist(GArray *array) for (i = 0; i < array->len; i++) list = g_slist_append(list, GINT_TO_POINTER(g_array_index(array,gint,i))); g_array_free(array, TRUE); #include "purple-client-bindings.c" static void lose(const char *fmt, ...) G_GNUC_NORETURN G_GNUC_PRINTF (1, 2); static void lose_gerror(const char *prefix, GError *error) G_GNUC_NORETURN; lose(const char *str, ...) vfprintf(stderr, str, args); lose_gerror(const char *prefix, GError *error) lose("%s: %s", prefix, error->message); bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error); lose_gerror ("Couldn't connect to session bus", error); purple_proxy = dbus_g_proxy_new_for_name (bus, lose_gerror ("Couldn't connect to the Purple Service", error);