1 /*
2  * This file is part of telepathy-idle
3  *
4  * Copyright (C) 2006-2007 Collabora Limited
5  * Copyright (C) 2006-2007 Nokia Corporation
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License
9  * version 2.1 as published by the Free Software Foundation.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  */
20 
21 #include <config.h>
22 
23 #include <telepathy-glib/telepathy-glib.h>
24 
25 #include "idle-connection-manager.h"
26 #include "idle-debug.h"
27 
_construct_cm(void)28 static TpBaseConnectionManager *_construct_cm (void) {
29 	TpBaseConnectionManager *base_cm = TP_BASE_CONNECTION_MANAGER(g_object_new(IDLE_TYPE_CONNECTION_MANAGER, NULL));
30 
31 	return base_cm;
32 }
33 
main(int argc,char ** argv)34 int main(int argc, char **argv) {
35 	TpDebugSender *debug_sender;
36 	int result;
37 
38 	g_type_init ();
39 	tp_debug_divert_messages (g_getenv ("IDLE_LOGFILE"));
40 
41 	idle_debug_init();
42 
43 	debug_sender = tp_debug_sender_dup ();
44 
45 	result = tp_run_connection_manager("telepathy-idle", VERSION, _construct_cm, argc, argv);
46 
47 	g_object_unref (debug_sender);
48 	return result;
49 }
50