4 #include <libempathy/empathy-contact-factory.h>
5 #include <libmissioncontrol/mc-account.h>
8 main (int argc, char **argv)
10 EmpathyContactFactory *factory;
12 EmpathyContact *contact;
13 EmpathyContactReady ready_flags;
17 factory = empathy_contact_factory_new ();
18 account = mc_account_lookup ("jabber4");
19 contact = empathy_contact_factory_get_from_id (factory, account,
20 "testman@jabber.belnet.be");
22 g_print ("Contact handle=%d alias=%s\n",
23 empathy_contact_get_handle (contact),
24 empathy_contact_get_name (contact));
26 ready_flags = EMPATHY_CONTACT_READY_HANDLE | EMPATHY_CONTACT_READY_NAME;
27 empathy_contact_run_until_ready (contact, ready_flags, NULL);
29 g_print ("Contact ready: handle=%d alias=%s ready=%d needed-ready=%d\n",
30 empathy_contact_get_handle (contact),
31 empathy_contact_get_name (contact),
32 empathy_contact_get_ready (contact),
35 g_object_unref (factory);
36 g_object_unref (account);
37 g_object_unref (contact);