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 <libempathy/empathy-tp-call.h>
26 #include <libempathy/empathy-chandler.h>
27 #include <libempathy/empathy-debug.h>
28 #include <libempathy/empathy-utils.h>
30 #include "empathy-call-window.h"
32 #define DEBUG_DOMAIN "CallChandler"
34 static guint nb_calls = 0;
37 weak_notify (gpointer data,
38 GObject *where_the_object_was)
43 empathy_debug (DEBUG_DOMAIN, "No more calls, leaving...");
49 new_channel_cb (EmpathyChandler *chandler,
56 call = empathy_tp_call_new (connection, channel);
57 empathy_call_window_new (call);
58 g_object_unref (call);
61 g_object_weak_ref (G_OBJECT (call), weak_notify, NULL);
65 main (int argc, char *argv[])
68 EmpathyChandler *chandler;
70 gtk_init (&argc, &argv);
72 mc = empathy_mission_control_new ();
74 chandler = empathy_chandler_new ("org.gnome.Empathy.CallChandler",
75 "/org/gnome/Empathy/CallChandler");
76 g_signal_connect (chandler, "new-channel",
77 G_CALLBACK (new_channel_cb), mc);
79 empathy_debug (DEBUG_DOMAIN, "Ready to handle new streamed media channels");
83 g_object_unref (chandler);