aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-09-29 20:08:45 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-09-29 20:08:45 +0800
commite3e5702a683c468ccc1742515b4033f32c7d1083 (patch)
tree9036ec7c855079e59ec6b67128ee37134bb79abf /src
parentf5490a416f103d552344f7df0238a39c1e76b537 (diff)
downloadgsoc2013-empathy-e3e5702a683c468ccc1742515b4033f32c7d1083.tar
gsoc2013-empathy-e3e5702a683c468ccc1742515b4033f32c7d1083.tar.gz
gsoc2013-empathy-e3e5702a683c468ccc1742515b4033f32c7d1083.tar.bz2
gsoc2013-empathy-e3e5702a683c468ccc1742515b4033f32c7d1083.tar.lz
gsoc2013-empathy-e3e5702a683c468ccc1742515b4033f32c7d1083.tar.xz
gsoc2013-empathy-e3e5702a683c468ccc1742515b4033f32c7d1083.tar.zst
gsoc2013-empathy-e3e5702a683c468ccc1742515b4033f32c7d1083.zip
Initial Voice+Video support Fixes bug #468204 (Elliot Fairweather, Xavier
2007-09-29 Xavier Claessens <xclaesse@gmail.com> * libempathy-gtk/empathy-call-window.c: * libempathy-gtk/empathy-call-window.h: * libempathy-gtk/empathy-contact-list-view.c: * libempathy-gtk/empathy-call-window.glade: * libempathy-gtk/Makefile.am: * libempathy-gtk/empathy-chat-window.c: * src/empathy-call-chandler.c: * src/empathy-call.chandler: * src/org.gnome.Empathy.Call.service.in: * src/Makefile.am: * libempathy/empathy-utils.c: * libempathy/empathy-utils.h: * libempathy/empathy-tp-call.c: * libempathy/empathy-tp-call.h: * libempathy/Makefile.am: * libempathy/tp-stream-engine.xml: * configure.ac: * doc/libempathy-gtk/libempathy-gtk-docs.sgml: * doc/libempathy/libempathy.types: * doc/libempathy/libempathy-docs.sgml: * doc/libempathy/Makefile.am: * doc/libempathy/tmpl/empathy-utils.sgml: Initial Voice+Video support Fixes bug #468204 (Elliot Fairweather, Xavier Claessens). svn path=/trunk/; revision=339
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am17
-rw-r--r--src/empathy-call-chandler.c79
-rw-r--r--src/empathy-call.chandler5
-rw-r--r--src/org.gnome.Empathy.Call.service.in3
4 files changed, 100 insertions, 4 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index d81601ed0..ae336df09 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,15 +15,18 @@ LDADD = \
bin_PROGRAMS = \
empathy \
- empathy-accounts
+ empathy-accounts \
+ empathy-call-chandler
empathy_SOURCES = empathy.c
empathy_accounts_SOURCES = empathy-accounts.c
+empathy_call_chandler_SOURCES = empathy-call-chandler.c
-# Dbus service file
+# Dbus service files
servicedir = $(datadir)/dbus-1/services
service_DATA = \
- org.gnome.Empathy.Chat.service
+ org.gnome.Empathy.Chat.service \
+ org.gnome.Empathy.Call.service
%.service: %.service.in Makefile
@sed -e "s|\@bindir\@|$(bindir)|" $< > $@
@@ -31,11 +34,17 @@ chandlerdir = $(datadir)/telepathy/managers
chandler_DATA = \
empathy-chat.chandler
+if HAVE_VOIP
+chandler_DATA += empathy-call.chandler
+endif
+
BUILT_SOURCES = \
- org.gnome.Empathy.Chat.service
+ org.gnome.Empathy.Chat.service \
+ org.gnome.Empathy.Call.service
EXTRA_DIST = \
org.gnome.Empathy.Chat.service.in \
+ org.gnome.Empathy.Call.service.in \
$(autostart_DATA) \
$(chandler_DATA)
diff --git a/src/empathy-call-chandler.c b/src/empathy-call-chandler.c
new file mode 100644
index 000000000..bb88747f4
--- /dev/null
+++ b/src/empathy-call-chandler.c
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2007 Elliot Fairweather
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Authors: Elliot Fairweather <elliot.fairweather@collabora.co.uk>
+ */
+
+#include <stdlib.h>
+
+#include <gtk/gtk.h>
+
+#include <libmissioncontrol/mission-control.h>
+
+#include <libempathy/empathy-chandler.h>
+#include <libempathy/empathy-utils.h>
+#include <libempathy/empathy-tp-call.h>
+#include <libempathy/empathy-debug.h>
+
+#include <libempathy-gtk/empathy-call-window.h>
+
+#define DEBUG_DOMAIN "EmpathyCall"
+
+#define BUS_NAME "org.gnome.Empathy.Call"
+#define OBJECT_PATH "/org/freedesktop/Telepathy/ChannelHandler"
+
+static void
+call_chandler_new_channel_cb (EmpathyChandler *chandler,
+ TpConn *tp_conn,
+ TpChan *tp_chan,
+ MissionControl *mc)
+{
+ EmpathyTpCall *call;
+ McAccount *account;
+
+ account = mission_control_get_account_for_connection (mc, tp_conn, NULL);
+
+ call = empathy_tp_call_new (account, tp_chan);
+ empathy_call_window_show (call);
+ g_object_unref (account);
+ g_object_unref (call);
+}
+
+int
+main (int argc, char *argv[])
+{
+ EmpathyChandler *chandler;
+ MissionControl *mc;
+
+ gtk_init (&argc, &argv);
+
+ mc = empathy_mission_control_new ();
+ chandler = empathy_chandler_new (BUS_NAME, OBJECT_PATH);
+ g_signal_connect (chandler, "new-channel",
+ G_CALLBACK (call_chandler_new_channel_cb),
+ mc);
+
+ empathy_debug (DEBUG_DOMAIN, "Ready to handle new streamed media channels");
+
+ gtk_main ();
+
+ g_object_unref (chandler);
+ g_object_unref (mc);
+
+ return EXIT_SUCCESS;
+}
+
diff --git a/src/empathy-call.chandler b/src/empathy-call.chandler
new file mode 100644
index 000000000..190494d3c
--- /dev/null
+++ b/src/empathy-call.chandler
@@ -0,0 +1,5 @@
+[ChannelHandler]
+BusName = org.gnome.Empathy.Call
+ObjectPath = /org/freedesktop/Telepathy/ChannelHandler
+ChannelType = org.freedesktop.Telepathy.Channel.Type.StreamedMedia
+TypeSpecificCapabilities = 15
diff --git a/src/org.gnome.Empathy.Call.service.in b/src/org.gnome.Empathy.Call.service.in
new file mode 100644
index 000000000..38d0e763a
--- /dev/null
+++ b/src/org.gnome.Empathy.Call.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.gnome.Empathy.Call
+Exec=@bindir@/empathy-call-chandler