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>
23 #include <libmissioncontrol/mission-control.h>
25 #include <extensions/extensions.h>
26 #include <libempathy/empathy-tp-call.h>
27 #include <libempathy/empathy-chandler.h>
28 #include <libempathy/empathy-debug.h>
29 #include <libempathy/empathy-utils.h>
31 #include <libempathy-gtk/empathy-call-window.h>
33 #define DEBUG_DOMAIN "CallChandler"
35 static guint nb_calls = 0;
38 weak_notify (gpointer data,
39 GObject *where_the_object_was)
44 empathy_debug (DEBUG_DOMAIN, "No more calls, leaving...");
50 new_channel_cb (EmpathyChandler *chandler,
57 call = empathy_tp_call_new (connection, channel);
58 empathy_call_window_new (call);
59 g_object_unref (call);
62 g_object_weak_ref (G_OBJECT (call), weak_notify, NULL);
66 main (int argc, char *argv[])
69 EmpathyChandler *chandler;
71 gtk_init (&argc, &argv);
74 mc = empathy_mission_control_new ();
76 chandler = empathy_chandler_new ("org.gnome.Empathy.CallChandler",
77 "/org/gnome/Empathy/CallChandler");
78 g_signal_connect (chandler, "new-channel",
79 G_CALLBACK (new_channel_cb), mc);
81 empathy_debug (DEBUG_DOMAIN, "Ready to handle new streamed media channels");
85 g_object_unref (chandler);