]> git.0d.be Git - empathy.git/blob - tests/contact-manager.c
Display debug messages in the contact-manager tests program.
[empathy.git] / tests / contact-manager.c
1 #include <stdlib.h>
2
3 #include <glib.h>
4 #include <libempathy/empathy-contact-manager.h>
5 #include <libempathy/empathy-debug.h>
6
7
8 static gboolean
9 time_out (gpointer main_loop)
10 {
11         g_main_loop_quit (main_loop);
12
13         return FALSE;
14 }
15
16 int
17 main (int argc, char **argv)
18 {
19         EmpathyContactManager *manager;
20         GMainLoop             *main_loop;
21
22         g_type_init ();
23
24         empathy_debug_set_flags (g_getenv ("EMPATHY_DEBUG"));
25         main_loop = g_main_loop_new (NULL, FALSE);
26         manager = empathy_contact_manager_new ();
27
28         g_timeout_add_seconds (5, time_out, main_loop);
29
30         g_main_loop_run (main_loop);
31
32         g_object_unref (manager);
33         g_main_loop_unref (main_loop);
34
35         return EXIT_SUCCESS;
36 }
37