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>
25 #include <libmissioncontrol/mission-control.h>
27 #include <libempathy/empathy-chandler.h>
28 #include <libempathy/empathy-utils.h>
29 #include <libempathy/empathy-tp-call.h>
30 #include <libempathy/empathy-debug.h>
32 #include <libempathy-gtk/empathy-call-window.h>
34 #define DEBUG_DOMAIN "EmpathyCall"
36 #define BUS_NAME "org.gnome.Empathy.Call"
37 #define OBJECT_PATH "/org/freedesktop/Telepathy/ChannelHandler"
40 call_chandler_new_channel_cb (EmpathyChandler *chandler,
48 account = mission_control_get_account_for_connection (mc, tp_conn, NULL);
50 call = empathy_tp_call_new (account, tp_chan);
51 empathy_call_window_show (call);
52 g_object_unref (account);
53 g_object_unref (call);
57 main (int argc, char *argv[])
59 EmpathyChandler *chandler;
62 gtk_init (&argc, &argv);
64 mc = empathy_mission_control_new ();
65 chandler = empathy_chandler_new (BUS_NAME, OBJECT_PATH);
66 g_signal_connect (chandler, "new-channel",
67 G_CALLBACK (call_chandler_new_channel_cb),
70 empathy_debug (DEBUG_DOMAIN, "Ready to handle new streamed media channels");
74 g_object_unref (chandler);