2 * Copyright (C) 2007 Elliot Fairweather
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 * Authors: Elliot Fairweather <elliot.fairweather@collabora.co.uk>
26 #include <glib/gi18n.h>
29 #include <libgnomevfs/gnome-vfs.h>
31 #include <libmissioncontrol/mission-control.h>
33 #include <libempathy/empathy-chandler.h>
34 #include <libempathy/empathy-utils.h>
35 #include <libempathy/empathy-tp-call.h>
36 #include <libempathy/empathy-debug.h>
38 #include <libempathy-gtk/empathy-call-window.h>
40 #define DEBUG_DOMAIN "EmpathyCall"
42 #define BUS_NAME "org.gnome.Empathy.CallChandler"
43 #define OBJECT_PATH "/org/gnome/Empathy/CallChandler"
46 call_chandler_new_channel_cb (EmpathyChandler *chandler,
54 account = mission_control_get_account_for_connection (mc, tp_conn, NULL);
56 call = empathy_tp_call_new (account, tp_chan);
57 empathy_call_window_show (call);
58 g_object_unref (account);
59 g_object_unref (call);
63 main (int argc, char *argv[])
65 EmpathyChandler *chandler;
68 empathy_debug_set_log_file_from_env ();
70 bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
71 bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
72 textdomain (GETTEXT_PACKAGE);
74 gtk_init (&argc, &argv);
76 gtk_window_set_default_icon_name ("empathy");
77 gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
78 PKGDATADIR G_DIR_SEPARATOR_S "icons");
80 mc = empathy_mission_control_new ();
81 chandler = empathy_chandler_new (BUS_NAME, OBJECT_PATH);
82 g_signal_connect (chandler, "new-channel",
83 G_CALLBACK (call_chandler_new_channel_cb),
86 empathy_debug (DEBUG_DOMAIN, "Ready to handle new streamed media channels");
90 g_object_unref (chandler);