5 #include <libempathy/empathy-contact-factory.h>
6 #include <libempathy/empathy-contact-manager.h>
7 #include <libmissioncontrol/mc-account.h>
10 pending_cb (EmpathyContactManager
*manager
,
11 EmpathyContact
*contact
,
12 EmpathyContact
*actor
,
22 g_print ("Contact handle=%d alias=%s\n",
23 empathy_contact_get_handle (contact
),
24 empathy_contact_get_name (contact
));
26 empathy_contact_run_until_ready (contact
,
27 EMPATHY_CONTACT_READY_NAME
,
30 g_print ("Contact ready: handle=%d alias=%s ready=%d\n",
31 empathy_contact_get_handle (contact
),
32 empathy_contact_get_name (contact
),
33 empathy_contact_get_ready (contact
));
35 g_object_unref (manager
);
40 callback (gpointer data
)
42 EmpathyContactManager
*manager
;
44 manager
= empathy_contact_manager_dup_singleton ();
45 g_signal_connect (manager
, "pendings-changed",
46 G_CALLBACK (pending_cb
),
53 main (int argc
, char **argv
)
55 gtk_init (&argc
, &argv
);
57 g_idle_add (callback
, NULL
);