18
18
* Authors: Elliot Fairweather <elliot.fairweather@collabora.co.uk>
26
#include <glib/gi18n.h>
27
21
#include <gtk/gtk.h>
29
#include <libgnomevfs/gnome-vfs.h>
31
23
#include <libmissioncontrol/mission-control.h>
25
#include <libempathy/empathy-tp-call.h>
33
26
#include <libempathy/empathy-chandler.h>
27
#include <libempathy/empathy-debug.h>
34
28
#include <libempathy/empathy-utils.h>
35
#include <libempathy/empathy-tp-call.h>
36
#include <libempathy/empathy-debug.h>
38
30
#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"
32
#define DEBUG_DOMAIN "CallChandler"
45
34
static guint nb_calls = 0;
48
call_chandler_weak_notify (gpointer data,
49
GObject *where_the_object_was)
37
weak_notify (gpointer data,
38
GObject *where_the_object_was)
53
empathy_debug (DEBUG_DOMAIN, "No more calls, leaving...");
43
empathy_debug (DEBUG_DOMAIN, "No more calls, leaving...");
59
call_chandler_new_channel_cb (EmpathyChandler *chandler,
49
new_channel_cb (EmpathyChandler *chandler,
68
account = mission_control_get_account_for_connection (mc, tp_conn, NULL);
70
call = empathy_tp_call_new (account, tp_chan);
71
window = empathy_call_window_show (call);
72
g_object_unref (account);
73
g_object_unref (call);
76
g_object_weak_ref (G_OBJECT (window), call_chandler_weak_notify, NULL);
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);
80
65
main (int argc, char *argv[])
82
EmpathyChandler *chandler;
85
empathy_debug_set_log_file_from_env ();
87
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
88
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
89
textdomain (GETTEXT_PACKAGE);
91
gtk_init (&argc, &argv);
93
gtk_window_set_default_icon_name ("empathy");
94
gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
95
PKGDATADIR G_DIR_SEPARATOR_S "icons");
97
mc = empathy_mission_control_new ();
98
chandler = empathy_chandler_new (BUS_NAME, OBJECT_PATH);
99
g_signal_connect (chandler, "new-channel",
100
G_CALLBACK (call_chandler_new_channel_cb),
103
empathy_debug (DEBUG_DOMAIN, "Ready to handle new streamed media channels");
107
g_object_unref (chandler);
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);