Hello community,
here is the log from the commit of package telepathy-haze for openSUSE:Factory checked in at 2013-04-02 20:44:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/telepathy-haze (Old)
and /work/SRC/openSUSE:Factory/.telepathy-haze.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "telepathy-haze", Maintainer is "gnome-maintainers@suse.de"
Changes:
--------
--- /work/SRC/openSUSE:Factory/telepathy-haze/telepathy-haze.changes 2012-04-12 09:53:44.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.telepathy-haze.new/telepathy-haze.changes 2013-04-02 20:44:12.000000000 +0200
@@ -1,0 +2,8 @@
+Sat Dec 22 22:09:39 UTC 2012 - alinm.elena@gmail.com
+
+- Update to version 0.7.0
+ + Add skype-x11 to known protocols, rename the other one to
+ skype-dbus.
+ + Expose third party skype prpl as 'skype' (fdo#57201).
+
+-------------------------------------------------------------------
Old:
----
telepathy-haze-0.6.0.tar.gz
New:
----
telepathy-haze-0.7.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ telepathy-haze.spec ++++++
--- /var/tmp/diff_new_pack.yHfuMd/_old 2013-04-02 20:44:13.000000000 +0200
+++ /var/tmp/diff_new_pack.yHfuMd/_new 2013-04-02 20:44:13.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package telepathy-haze
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
Url: http://telepathy.freedesktop.org/wiki/
Name: telepathy-haze
-Version: 0.6.0
+Version: 0.7.0
Release: 0
Summary: A libpurple connection manager for Telepathy
License: GPL-2.0+
++++++ telepathy-haze-0.6.0.tar.gz -> telepathy-haze-0.7.0.tar.gz ++++++
++++ 3476 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/ChangeLog new/telepathy-haze-0.7.0/ChangeLog
--- old/telepathy-haze-0.6.0/ChangeLog 2012-04-04 21:59:32.000000000 +0200
+++ new/telepathy-haze-0.7.0/ChangeLog 2012-11-21 18:11:57.000000000 +0100
@@ -1,3 +1,144 @@
+commit b232ad1cc35037f6ec18b59c194f8c5444f3fad1
+Author: Will Thompson
+Date: 2012-11-21 17:11:25 +0000
+
+ Version 0.7.0
+
+commit f7ce27e8524f80ffecaabeed8f211932a976cd1e
+Author: Will Thompson
+Date: 2012-11-21 17:10:08 +0000
+
+ NEWS for 0.7.0
+
+commit 156316d1cfd2fb36311882a0ca0ed569893878da
+Author: Gabriele Giacone <1o5g4r8o@gmail.com>
+Date: 2012-11-21 16:44:12 +0000
+
+ Add skype-x11 to known protocols, rename the other to skype-dbus
+
+ I'd like having both so users can test both, like on pidgin. linux skype
+ apis often are broken, one could be better than the other.
+
+ Signed-off-by: Will Thompson
+
+commit 3d4b6b41f6994b2c90890e8ba7bac53e947343f6
+Author: Gabriele Giacone <1o5g4r8o@gmail.com>
+Date: 2012-11-17 18:16:16 +0000
+
+ Expose third-party Skype prpl as 'skype'
+
+ Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=57201
+ Signed-off-by: Will Thompson
+
+commit 3915dbc1d2d343cbeed93e1453daba94860a875a
+Author: Xavier Claessens
+Date: 2012-05-10 15:23:29 +0200
+
+ Remove deprecated tp_handle_ref/unref
+
+commit c0d9beb94395120401bf632cf3277d37a63b0b99
+Author: Simon McVittie
+Date: 2012-05-07 19:28:33 +0100
+
+ Set G_MESSAGES_DEBUG during testing
+
+ The same as Gabble commit cbfa9d06.
+
+commit bab2be17b5c6af95b7a990038a1978454829b511
+Author: Simon McVittie
+Date: 2012-05-07 18:02:06 +0100
+
+ Use non-deprecated TpMessage APIs
+
+commit eb516a9909fe271e40b91df9d7f9cc12a83c2422
+Author: Simon McVittie
+Date: 2012-05-07 17:37:15 +0100
+
+ Use non-deprecated TpIntset APIs
+
+commit 4c9eaa898b14442d23d3d485c2725af978b35da4
+Author: Simon McVittie
+Date: 2012-05-07 17:36:21 +0100
+
+ Use TP_ERRORS instead of deprecated TP_ERROR
+
+commit d81cdd5171afb380bdf862b63ddd1858818f0523
+Author: Jonny Lamb
+Date: 2012-05-02 12:16:13 +0100
+
+ caps test: do a simple test for media caps changes
+
+ Signed-off-by: Jonny Lamb
+
+commit ad7122d60c70ba106661a0b0ecd58e36420d46d5
+Author: Jonny Lamb
+Date: 2012-05-02 12:15:39 +0100
+
+ twisted tests: add a config module for knowing whether media is enabled
+
+ Signed-off-by: Jonny Lamb
+
+commit 41b053cdcc220687506d8922e129ef759d70fddb
+Author: Jonny Lamb
+Date: 2012-05-02 11:36:36 +0100
+
+ capabilities: implement UpdateCapabilities
+
+ I didn't bother touching AdvertiseCapabilities as old style caps are
+ only going to be removed soon.
+
+ Signed-off-by: Jonny Lamb
+
+commit 1fafed8d0efac5075e7d681a9f80962ae0a8b3a3
+Author: Jonny Lamb
+Date: 2012-05-01 13:45:05 +0100
+
+ capabilities: emit ContactCapabilityChanged where appropriate
+
+ Signed-off-by: Jonny Lamb
+
+commit 59922b9aedd0fc0e24d73a563a3806291672d213
+Author: Jonny Lamb
+Date: 2012-05-01 12:00:51 +0100
+
+ capabilities: implement Media for contact caps
+
+ It's untested... bad me.
+
+ Signed-off-by: Jonny Lamb
+
+commit e851e224d7a733acc67f031c8c3b900e78d7dea5
+Author: Jonny Lamb
+Date: 2012-05-01 11:07:00 +0100
+
+ tests: add simple test to ensure ContactCapabilities are working
+
+ Signed-off-by: Jonny Lamb
+
+commit 04909550618339a33f6a5b40ac5e6176ca280972
+Author: Jonny Lamb
+Date: 2012-05-01 11:06:42 +0100
+
+ capabilities: implement ContactCapabilities
+
+ Signed-off-by: Jonny Lamb
+
+commit 9379255451b6a4d805d070ee2eb4bca80f9a7993
+Author: Jonny Lamb
+Date: 2012-04-04 16:00:41 -0400
+
+ start on version 0.7.0
+
+ Signed-off-by: Jonny Lamb
+
+commit 7af2f4947add8a20ba81f96213594b0012492327
+Author: Jonny Lamb
+Date: 2012-04-04 16:00:18 -0400
+
+ start on version 0.6.1
+
+ Signed-off-by: Jonny Lamb
+
commit ec9c21b47860fb75cd7a13fe57b9ed44be4a451d
Author: Jonny Lamb
Date: 2012-04-04 15:58:56 -0400
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/INSTALL new/telepathy-haze-0.7.0/INSTALL
--- old/telepathy-haze-0.6.0/INSTALL 2012-04-04 21:59:11.000000000 +0200
+++ new/telepathy-haze-0.7.0/INSTALL 2011-11-21 18:37:26.000000000 +0100
@@ -1,8 +1,8 @@
Installation Instructions
*************************
-Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
-Inc.
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008, 2009 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
@@ -226,11 +226,6 @@
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
- HP-UX `make' updates targets which have the same time stamps as
-their prerequisites, which makes it generally unusable when shipped
-generated files such as `configure' are involved. Use GNU `make'
-instead.
-
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/NEWS new/telepathy-haze-0.7.0/NEWS
--- old/telepathy-haze-0.6.0/NEWS 2012-04-04 21:58:45.000000000 +0200
+++ new/telepathy-haze-0.7.0/NEWS 2012-11-21 18:11:10.000000000 +0100
@@ -1,3 +1,18 @@
+telepathy-haze 0.7.0 (2012-11-21)
+=================================
+
+This is the start of a new unstable branch. Don't swing on it too hard.
+
+Enhancements:
+
+• Jonny implemented ContactCapabilities;
+• Simon got rid of some deprecated API;
+• So did Xavier;
+• Gabriele Giacone kindly mapped two of the extant Skype prpls to
+ "skype-x11" and "skype-dbus". Maybe you'd like to give them a whirl?
+ (fd.o#57201)
+
+
telepathy-haze 0.6.0 (2012-04-04)
=================================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/build-aux/missing new/telepathy-haze-0.7.0/build-aux/missing
--- old/telepathy-haze-0.6.0/build-aux/missing 2012-04-04 21:59:11.000000000 +0200
+++ new/telepathy-haze-0.7.0/build-aux/missing 2011-11-21 18:37:25.000000000 +0100
@@ -1,10 +1,10 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-scriptversion=2012-01-06.13; # UTC
+scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+# 2008, 2009 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard , 1996.
# This program is free software; you can redistribute it and/or modify
@@ -84,6 +84,7 @@
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
@@ -121,6 +122,15 @@
# Not GNU programs, they don't have --version.
;;
+ tar*)
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ exit 1
+ fi
+ ;;
+
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
@@ -216,7 +226,7 @@
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if test $# -ne 1; then
- eval LASTARG=\${$#}
+ eval LASTARG="\${$#}"
case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
@@ -246,7 +256,7 @@
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if test $# -ne 1; then
- eval LASTARG=\${$#}
+ eval LASTARG="\${$#}"
case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
@@ -308,6 +318,41 @@
touch $file
;;
+ tar*)
+ shift
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar "$@" && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar "$@" && exit 0
+ fi
+ firstarg="$1"
+ if shift; then
+ case $firstarg in
+ *o*)
+ firstarg=`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ case $firstarg in
+ *h*)
+ firstarg=`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/configure.ac new/telepathy-haze-0.7.0/configure.ac
--- old/telepathy-haze-0.6.0/configure.ac 2012-04-04 21:58:52.000000000 +0200
+++ new/telepathy-haze-0.7.0/configure.ac 2012-11-21 18:11:17.000000000 +0100
@@ -7,7 +7,7 @@
# set nano_version to 1
m4_define([haze_major_version], [0])
-m4_define([haze_minor_version], [6])
+m4_define([haze_minor_version], [7])
m4_define([haze_micro_version], [0])
m4_define([haze_nano_version], [0])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/src/connection-aliasing.c new/telepathy-haze-0.7.0/src/connection-aliasing.c
--- old/telepathy-haze-0.6.0/src/connection-aliasing.c 2010-11-18 18:55:05.000000000 +0100
+++ new/telepathy-haze-0.7.0/src/connection-aliasing.c 2012-11-17 19:15:50.000000000 +0100
@@ -247,7 +247,7 @@
{
DEBUG ("can't set alias for %s to \"%s\": not on contact list",
bname, new_alias);
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"can't set alias for %s to \"%s\": not on contact list",
bname, new_alias);
}
@@ -288,7 +288,7 @@
if (!can_alias (conn))
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"You can't set aliases on this protocol");
dbus_g_method_return_error (context, error);
g_error_free (error);
@@ -355,7 +355,6 @@
aliases);
g_ptr_array_free (aliases, TRUE);
- tp_handle_unref (contact_handles, handle);
}
void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/src/connection-avatars.c new/telepathy-haze-0.7.0/src/connection-avatars.c
--- old/telepathy-haze-0.6.0/src/connection-avatars.c 2010-06-01 16:22:09.000000000 +0200
+++ new/telepathy-haze-0.7.0/src/connection-avatars.c 2012-11-17 19:15:50.000000000 +0100
@@ -378,7 +378,7 @@
else
{
DEBUG ("handle %u has no avatar", contact);
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"handle %u has no avatar", contact);
@@ -455,7 +455,7 @@
if (max_filesize > 0 && icon_len > max_filesize)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"avatar is %" G_GSIZE_FORMAT "B, "
"but the limit is %" G_GSIZE_FORMAT "B",
icon_len, max_filesize);
@@ -484,7 +484,7 @@
if (!acceptable_mime_type)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"'%s' is not a supported MIME type", mime_type);
dbus_g_method_return_error (context, error);
@@ -547,7 +547,6 @@
tp_svc_connection_interface_avatars_emit_avatar_updated (conn, contact,
token);
- tp_handle_unref (contact_repo, contact);
g_free (token);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/src/connection-capabilities.c new/telepathy-haze-0.7.0/src/connection-capabilities.c
--- old/telepathy-haze-0.6.0/src/connection-capabilities.c 2010-06-09 17:30:52.000000000 +0200
+++ new/telepathy-haze-0.7.0/src/connection-capabilities.c 2012-11-17 19:15:50.000000000 +0100
@@ -20,12 +20,15 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
+#include "config.h"
+
#include "connection-capabilities.h"
#include
#include
#include
#include
+#include
#include "connection.h"
#include "debug.h"
@@ -33,6 +36,12 @@
#include "mediamanager.h"
#endif
+static void
+free_rcc_list (GPtrArray *rccs)
+{
+ g_boxed_free (TP_ARRAY_TYPE_REQUESTABLE_CHANNEL_CLASS_LIST, rccs);
+}
+
#ifdef ENABLE_MEDIA
static PurpleMediaCaps
tp_flags_to_purple_caps (guint flags)
@@ -56,6 +65,9 @@
return flags;
}
+static GPtrArray * haze_connection_get_handle_contact_capabilities (
+ HazeConnection *self, TpHandle handle);
+
static void
_emit_capabilities_changed (HazeConnection *conn,
TpHandle handle,
@@ -104,6 +116,21 @@
tp_svc_connection_interface_capabilities_emit_capabilities_changed (
conn, caps_arr);
+ if (caps_arr->len > 0)
+ {
+ GHashTable *ret = g_hash_table_new_full (g_direct_hash, g_direct_equal,
+ NULL, (GDestroyNotify) free_rcc_list);
+ GPtrArray *arr;
+
+ arr = haze_connection_get_handle_contact_capabilities (conn, handle);
+ g_hash_table_insert (ret, GUINT_TO_POINTER (handle), arr);
+
+ tp_svc_connection_interface_contact_capabilities_emit_contact_capabilities_changed (
+ conn, ret);
+
+ g_hash_table_unref (ret);
+ }
+
for (i = 0; i < caps_arr->len; i++)
{
g_boxed_free (TP_STRUCT_TYPE_CAPABILITY_CHANGE,
@@ -182,6 +209,92 @@
g_ptr_array_free (ret, TRUE);
}
+typedef enum {
+ CAPS_FLAGS_AUDIO = 1 << 0,
+ CAPS_FLAGS_VIDEO = 1 << 1,
+} CapsFlags;
+
+static void
+haze_connection_update_capabilities (TpSvcConnectionInterfaceContactCapabilities *iface,
+ const GPtrArray *clients,
+ DBusGMethodInvocation *context)
+{
+ HazeConnection *self = HAZE_CONNECTION (iface);
+ TpBaseConnection *base = (TpBaseConnection *) self;
+#ifdef ENABLE_MEDIA
+ guint i;
+ PurpleMediaCaps old_caps, caps;
+ GHashTableIter iter;
+ gpointer value;
+#endif
+
+ TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (base, context);
+
+#ifdef ENABLE_MEDIA
+ caps = PURPLE_MEDIA_CAPS_NONE;
+ old_caps = purple_media_manager_get_ui_caps (
+ purple_media_manager_get ());
+
+ DEBUG ("enter");
+
+ /* go through all the clients and if they can do audio or video save
+ * it in the client_caps hash table */
+ for (i = 0; i < clients->len; i++)
+ {
+ GValueArray *va = g_ptr_array_index (clients, i);
+ const gchar *client_name = g_value_get_string (va->values + 0);
+ const GPtrArray *rccs = g_value_get_boxed (va->values + 1);
+ guint j;
+ CapsFlags flags = 0;
+
+ g_hash_table_remove (self->client_caps, client_name);
+
+ for (j = 0; j < rccs->len; j++)
+ {
+ GHashTable *class = g_ptr_array_index (rccs, i);
+
+ if (tp_strdiff (tp_asv_get_string (class, TP_PROP_CHANNEL_CHANNEL_TYPE),
+ TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA))
+ continue;
+
+ if (tp_asv_get_boolean (class,
+ TP_PROP_CHANNEL_TYPE_STREAMED_MEDIA_INITIAL_AUDIO, NULL))
+ flags |= CAPS_FLAGS_AUDIO;
+
+ if (tp_asv_get_boolean (class,
+ TP_PROP_CHANNEL_TYPE_STREAMED_MEDIA_INITIAL_VIDEO, NULL))
+ flags |= CAPS_FLAGS_VIDEO;
+ }
+
+ if (flags != 0)
+ {
+ g_hash_table_insert (self->client_caps, g_strdup (client_name),
+ GUINT_TO_POINTER (flags));
+ }
+ }
+
+ /* now we have an updated client_caps hash table, go through it and
+ * let libpurple know */
+ g_hash_table_iter_init (&iter, self->client_caps);
+ while (g_hash_table_iter_next (&iter, NULL, &value))
+ {
+ CapsFlags flags = GPOINTER_TO_UINT (value);
+
+ if (flags & CAPS_FLAGS_AUDIO)
+ caps |= PURPLE_MEDIA_CAPS_AUDIO;
+ if (flags & CAPS_FLAGS_VIDEO)
+ caps |= PURPLE_MEDIA_CAPS_VIDEO;
+ }
+
+ purple_media_manager_set_ui_caps (purple_media_manager_get(), caps);
+
+ _emit_capabilities_changed (self, base->self_handle, old_caps, caps);
+#endif
+
+ tp_svc_connection_interface_contact_capabilities_return_from_update_capabilities (
+ context);
+}
+
static const gchar *assumed_caps[] =
{
TP_IFACE_CHANNEL_TYPE_TEXT,
@@ -267,6 +380,123 @@
}
}
+static GPtrArray *
+haze_connection_get_handle_contact_capabilities (HazeConnection *self,
+ TpHandle handle)
+{
+#ifdef ENABLE_MEDIA
+ PurpleAccount *account = self->account;
+ TpBaseConnection *conn = TP_BASE_CONNECTION (self);
+ TpHandleRepoIface *contact_handles =
+ tp_base_connection_get_handles (conn, TP_HANDLE_TYPE_CONTACT);
+ const gchar *bname;
+ PurpleMediaCaps caps;
+ GValue media_monster = {0, };
+ guint typeflags = 0;
+ const gchar * const sm_allowed_audio[] = {
+ TP_PROP_CHANNEL_TYPE_STREAMED_MEDIA_INITIAL_AUDIO, NULL };
+ const gchar * const sm_allowed_video[] = {
+ TP_PROP_CHANNEL_TYPE_STREAMED_MEDIA_INITIAL_AUDIO,
+ TP_PROP_CHANNEL_TYPE_STREAMED_MEDIA_INITIAL_VIDEO,
+ NULL };
+#endif
+ GPtrArray *arr = g_ptr_array_new ();
+ GValue monster = {0, };
+ GHashTable *fixed_properties;
+ GValue *channel_type_value;
+ GValue *target_handle_type_value;
+ const gchar * const text_allowed_properties[] = {
+ TP_PROP_CHANNEL_TARGET_HANDLE, NULL };
+
+ if (0 == handle)
+ {
+ /* obsolete request for the connection's capabilities, do nothing */
+ return arr;
+ }
+
+ /* TODO: Check for presence */
+
+#ifdef ENABLE_MEDIA
+ if (handle == conn->self_handle)
+ caps = purple_media_manager_get_ui_caps (purple_media_manager_get ());
+ else
+ {
+ bname = tp_handle_inspect (contact_handles, handle);
+ caps = purple_prpl_get_media_caps (account, bname);
+ }
+
+ typeflags = purple_caps_to_tp_flags(caps);
+
+ if (typeflags != 0)
+ {
+ const gchar * const *allowed;
+
+ g_value_init (&media_monster,
+ TP_STRUCT_TYPE_REQUESTABLE_CHANNEL_CLASS);
+ g_value_take_boxed (&media_monster,
+ dbus_g_type_specialized_construct (
+ TP_STRUCT_TYPE_REQUESTABLE_CHANNEL_CLASS));
+
+ fixed_properties = g_hash_table_new_full (g_str_hash, g_str_equal, NULL,
+ (GDestroyNotify) tp_g_value_slice_free);
+
+ channel_type_value = tp_g_value_slice_new (G_TYPE_STRING);
+ g_value_set_static_string (channel_type_value,
+ TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA);
+ g_hash_table_insert (fixed_properties, TP_PROP_CHANNEL_CHANNEL_TYPE,
+ channel_type_value);
+
+ target_handle_type_value = tp_g_value_slice_new (G_TYPE_UINT);
+ g_value_set_uint (target_handle_type_value, TP_HANDLE_TYPE_CONTACT);
+ g_hash_table_insert (fixed_properties, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE,
+ target_handle_type_value);
+
+ if (typeflags & TP_CHANNEL_MEDIA_CAPABILITY_VIDEO)
+ allowed = sm_allowed_video;
+ else
+ allowed = sm_allowed_audio;
+
+ dbus_g_type_struct_set (&media_monster,
+ 0, fixed_properties,
+ 1, allowed,
+ G_MAXUINT);
+
+ g_hash_table_unref (fixed_properties);
+
+ g_ptr_array_add (arr, g_value_get_boxed (&media_monster));
+ }
+#endif
+
+ g_value_init (&monster, TP_STRUCT_TYPE_REQUESTABLE_CHANNEL_CLASS);
+ g_value_take_boxed (&monster,
+ dbus_g_type_specialized_construct (
+ TP_STRUCT_TYPE_REQUESTABLE_CHANNEL_CLASS));
+
+ fixed_properties = g_hash_table_new_full (g_str_hash, g_str_equal, NULL,
+ (GDestroyNotify) tp_g_value_slice_free);
+
+ channel_type_value = tp_g_value_slice_new (G_TYPE_STRING);
+ g_value_set_static_string (channel_type_value, TP_IFACE_CHANNEL_TYPE_TEXT);
+ g_hash_table_insert (fixed_properties, TP_IFACE_CHANNEL ".ChannelType",
+ channel_type_value);
+
+ target_handle_type_value = tp_g_value_slice_new (G_TYPE_UINT);
+ g_value_set_uint (target_handle_type_value, TP_HANDLE_TYPE_CONTACT);
+ g_hash_table_insert (fixed_properties, TP_IFACE_CHANNEL ".TargetHandleType",
+ target_handle_type_value);
+
+ dbus_g_type_struct_set (&monster,
+ 0, fixed_properties,
+ 1, text_allowed_properties,
+ G_MAXUINT);
+
+ g_hash_table_unref (fixed_properties);
+
+ g_ptr_array_add (arr, g_value_get_boxed (&monster));
+
+ return arr;
+}
+
/**
* haze_connection_get_capabilities
*
@@ -351,6 +581,37 @@
g_ptr_array_free (array, TRUE);
}
+static void
+conn_capabilities_fill_contact_attributes_contact_caps (
+ GObject *obj,
+ const GArray *contacts,
+ GHashTable *attributes_hash)
+{
+ HazeConnection *self = HAZE_CONNECTION (obj);
+ guint i;
+
+ for (i = 0; i < contacts->len; i++)
+ {
+ TpHandle handle = g_array_index (contacts, TpHandle, i);
+ GPtrArray *array;
+
+ array = haze_connection_get_handle_contact_capabilities (self, handle);
+
+ if (array->len > 0)
+ {
+ GValue *val = tp_g_value_slice_new (
+ TP_ARRAY_TYPE_REQUESTABLE_CHANNEL_CLASS_LIST);
+
+ g_value_take_boxed (val, array);
+ tp_contacts_mixin_set_contact_attribute (attributes_hash,
+ handle, TP_IFACE_CONNECTION_INTERFACE_CONTACT_CAPABILITIES "/capabilities",
+ val);
+ }
+ else
+ g_ptr_array_free (array, TRUE);
+ }
+}
+
void
haze_connection_capabilities_iface_init (gpointer g_iface,
gpointer iface_data)
@@ -365,6 +626,61 @@
#undef IMPLEMENT
}
+static void
+haze_connection_get_contact_capabilities (
+ TpSvcConnectionInterfaceContactCapabilities *svc,
+ const GArray *handles,
+ DBusGMethodInvocation *context)
+{
+ HazeConnection *self = HAZE_CONNECTION (svc);
+ TpBaseConnection *base = (TpBaseConnection *) self;
+ TpHandleRepoIface *contact_handles = tp_base_connection_get_handles (base,
+ TP_HANDLE_TYPE_CONTACT);
+ guint i;
+ GHashTable *ret;
+ GError *error = NULL;
+
+ TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (base, context);
+
+ if (!tp_handles_are_valid (contact_handles, handles, FALSE, &error))
+ {
+ dbus_g_method_return_error (context, error);
+ g_error_free (error);
+ return;
+ }
+
+ ret = g_hash_table_new_full (NULL, NULL, NULL,
+ (GDestroyNotify) free_rcc_list);
+
+ for (i = 0; i < handles->len; i++)
+ {
+ TpHandle handle = g_array_index (handles, TpHandle, i);
+ GPtrArray *arr;
+
+ arr = haze_connection_get_handle_contact_capabilities (self, handle);
+ g_hash_table_insert (ret, GUINT_TO_POINTER (handle), arr);
+ }
+
+ tp_svc_connection_interface_contact_capabilities_return_from_get_contact_capabilities
+ (context, ret);
+
+ g_hash_table_unref (ret);
+}
+
+void
+haze_connection_contact_capabilities_iface_init (gpointer g_iface,
+ gpointer iface_data)
+{
+ TpSvcConnectionInterfaceContactCapabilitiesClass *klass = g_iface;
+
+#define IMPLEMENT(x) \
+ tp_svc_connection_interface_contact_capabilities_implement_##x (\
+ klass, haze_connection_##x)
+ IMPLEMENT(update_capabilities);
+ IMPLEMENT(get_contact_capabilities);
+#undef IMPLEMENT
+}
+
#ifdef ENABLE_MEDIA
static void
caps_changed_cb (PurpleBuddy *buddy,
@@ -397,7 +713,23 @@
void
haze_connection_capabilities_init (GObject *object)
{
- tp_contacts_mixin_add_contact_attributes_iface (G_OBJECT (object),
+ HazeConnection *self = HAZE_CONNECTION (object);
+
+ tp_contacts_mixin_add_contact_attributes_iface (object,
TP_IFACE_CONNECTION_INTERFACE_CAPABILITIES,
conn_capabilities_fill_contact_attributes);
+ tp_contacts_mixin_add_contact_attributes_iface (object,
+ TP_IFACE_CONNECTION_INTERFACE_CONTACT_CAPABILITIES,
+ conn_capabilities_fill_contact_attributes_contact_caps);
+
+ self->client_caps = g_hash_table_new_full (g_str_hash, g_str_equal,
+ (GDestroyNotify) g_free, NULL);
+}
+
+void
+haze_connection_capabilities_finalize (GObject *object)
+{
+ HazeConnection *self = HAZE_CONNECTION (object);
+
+ tp_clear_pointer (&self->client_caps, g_hash_table_unref);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/src/connection-capabilities.h new/telepathy-haze-0.7.0/src/connection-capabilities.h
--- old/telepathy-haze-0.6.0/src/connection-capabilities.h 2010-02-18 18:24:56.000000000 +0100
+++ new/telepathy-haze-0.7.0/src/connection-capabilities.h 2012-11-17 19:15:50.000000000 +0100
@@ -25,7 +25,10 @@
void haze_connection_capabilities_iface_init (gpointer g_iface,
gpointer iface_data);
+void haze_connection_contact_capabilities_iface_init (gpointer g_iface,
+ gpointer iface_data);
void haze_connection_capabilities_class_init (GObjectClass *object_class);
void haze_connection_capabilities_init (GObject *object);
+void haze_connection_capabilities_finalize (GObject *object);
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/src/connection-mail.c new/telepathy-haze-0.7.0/src/connection-mail.c
--- old/telepathy-haze-0.6.0/src/connection-mail.c 2010-03-05 12:12:11.000000000 +0100
+++ new/telepathy-haze-0.7.0/src/connection-mail.c 2012-11-17 19:15:50.000000000 +0100
@@ -69,7 +69,7 @@
HazeSvcConnectionInterfaceMailNotification *iface,
DBusGMethodInvocation *context)
{
- GError e = {TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ GError e = {TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"LibPurple does not provide Inbox URL"};
dbus_g_method_return_error (context, &e);
}
@@ -86,7 +86,7 @@
if (!G_VALUE_HOLDS_STRING (in_url_data))
{
- GError e = {TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError e = {TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Wrong type for url-data"};
dbus_g_method_return_error (context, &e);
return;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/src/connection-presence.c new/telepathy-haze-0.7.0/src/connection-presence.c
--- old/telepathy-haze-0.6.0/src/connection-presence.c 2010-02-04 19:54:37.000000000 +0100
+++ new/telepathy-haze-0.7.0/src/connection-presence.c 2012-11-17 19:15:50.000000000 +0100
@@ -184,7 +184,7 @@
{
DEBUG ("[%s] %s isn't on the blist, ergo no status!",
conn->account->username, bname);
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Presence for %u unknown; subscribe to them first", handle);
g_hash_table_destroy (status_table);
status_table = NULL;
@@ -242,7 +242,6 @@
tp_presence_mixin_emit_one_presence_update (G_OBJECT (conn), handle,
tp_status);
- tp_handle_unref (handle_repo, handle);
}
static void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/src/connection.c new/telepathy-haze-0.7.0/src/connection.c
--- old/telepathy-haze-0.6.0/src/connection.c 2012-04-03 15:48:00.000000000 +0200
+++ new/telepathy-haze-0.7.0/src/connection.c 2012-11-17 19:15:50.000000000 +0100
@@ -75,6 +75,8 @@
haze_connection_aliasing_iface_init);
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_AVATARS,
haze_connection_avatars_iface_init);
+ G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACT_CAPABILITIES,
+ haze_connection_contact_capabilities_iface_init);
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CAPABILITIES,
haze_connection_capabilities_iface_init);
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACTS,
@@ -105,6 +107,7 @@
TP_IFACE_CONNECTION_INTERFACE_PRESENCE,
TP_IFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE,
TP_IFACE_CONNECTION_INTERFACE_CAPABILITIES,
+ TP_IFACE_CONNECTION_INTERFACE_CONTACT_CAPABILITIES,
TP_IFACE_CONNECTION_INTERFACE_CONTACTS,
/* TODO: This is a lie. Not all protocols supported by libpurple
* actually have the concept of a user-settable alias, but
@@ -387,7 +390,7 @@
* constructors can't fail.
*
* Returns: %TRUE if the account was successfully created and hooked up;
- * %FALSE with @error set in the TP_ERRORS domain if the account
+ * %FALSE with @error set in the TP_ERROR domain if the account
* already existed or another error occurred.
*/
gboolean
@@ -403,7 +406,7 @@
if (purple_accounts_find (priv->username, priv->prpl_id) != NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"a connection already exists to %s on %s", priv->username,
priv->prpl_id);
return FALSE;
@@ -718,6 +721,8 @@
tp_contacts_mixin_finalize (object);
tp_presence_mixin_finalize (object);
+ haze_connection_capabilities_finalize (object);
+
g_strfreev (self->acceptable_avatar_mime_types);
g_free (priv->username);
g_free (priv->password);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/src/connection.h new/telepathy-haze-0.7.0/src/connection.h
--- old/telepathy-haze-0.6.0/src/connection.h 2011-04-27 16:46:23.000000000 +0200
+++ new/telepathy-haze-0.7.0/src/connection.h 2012-11-17 19:15:50.000000000 +0100
@@ -62,6 +62,8 @@
gchar **acceptable_avatar_mime_types;
+ GHashTable *client_caps;
+
/* Part of the hack for Jabber media caps */
gulong status_changed_id;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/src/contact-list.c new/telepathy-haze-0.7.0/src/contact-list.c
--- old/telepathy-haze-0.6.0/src/contact-list.c 2012-04-03 15:48:00.000000000 +0200
+++ new/telepathy-haze-0.7.0/src/contact-list.c 2012-11-17 19:15:50.000000000 +0100
@@ -195,7 +195,6 @@
if (G_LIKELY (handle != 0))
{
tp_handle_set_add (handles, handle);
- tp_handle_unref (contact_repo, handle);
}
}
@@ -311,8 +310,6 @@
group_name = purple_group_get_name (purple_buddy_get_group (buddy));
tp_base_contact_list_one_contact_groups_changed (
(TpBaseContactList *) contact_list, handle, &group_name, 1, NULL, 0);
-
- tp_handle_unref (contact_repo, handle);
}
static void
@@ -362,8 +359,6 @@
tp_base_contact_list_one_contact_removed (
(TpBaseContactList *) contact_list, handle);
}
-
- tp_handle_unref (contact_repo, handle);
}
@@ -374,7 +369,7 @@
TpHandleRepoIface *contact_repo;
TpHandleSet *add_handles;
- /* Map from group names (const char *) to (TpIntSet *)s of handles */
+ /* Map from group names (const char *) to (TpIntset *)s of handles */
GHashTable *group_handles;
} HandleContext;
@@ -385,18 +380,11 @@
remove_pending_publish_request (HazeContactList *self,
TpHandle handle)
{
- HazeConnection *conn = self->priv->conn;
- TpBaseConnection *base_conn = TP_BASE_CONNECTION (conn);
- TpHandleRepoIface *handle_repo =
- tp_base_connection_get_handles (base_conn, TP_HANDLE_TYPE_CONTACT);
-
gpointer h = GUINT_TO_POINTER (handle);
gboolean removed;
removed = g_hash_table_remove (self->priv->pending_publish_requests, h);
g_assert (removed);
-
- tp_handle_unref (handle_repo, handle);
}
void
@@ -739,7 +727,7 @@
if (default_group == group)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Contacts can't be removed from '%s' unless they are in "
"another group", group->name);
return FALSE;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/src/im-channel-factory.c new/telepathy-haze-0.7.0/src/im-channel-factory.c
--- old/telepathy-haze-0.6.0/src/im-channel-factory.c 2010-11-18 18:55:05.000000000 +0100
+++ new/telepathy-haze-0.7.0/src/im-channel-factory.c 2012-11-17 19:15:50.000000000 +0100
@@ -457,14 +457,6 @@
static void
haze_destroy_conversation (PurpleConversation *conv)
{
- PurpleAccount *account = purple_conversation_get_account (conv);
-
- HazeImChannelFactory *im_factory =
- ACCOUNT_GET_HAZE_CONNECTION (account)->im_factory;
- TpBaseConnection *base_conn = TP_BASE_CONNECTION (im_factory->priv->conn);
- TpHandleRepoIface *contact_repo =
- tp_base_connection_get_handles (base_conn, TP_HANDLE_TYPE_CONTACT);
-
HazeConversationUiData *ui_data;
DEBUG ("(PurpleConversation *)%p destroyed", conv);
@@ -476,7 +468,6 @@
ui_data = PURPLE_CONV_GET_HAZE_UI_DATA (conv);
- tp_handle_unref (contact_repo, ui_data->contact_handle);
if (ui_data->resend_typing_timeout_id)
g_source_remove (ui_data->resend_typing_timeout_id);
@@ -596,7 +587,7 @@
if (require_new)
{
tp_channel_manager_emit_request_failed (self, request_token,
- TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "Channel already exists");
+ TP_ERROR, TP_ERROR_NOT_AVAILABLE, "Channel already exists");
}
else
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/src/im-channel.c new/telepathy-haze-0.7.0/src/im-channel.c
--- old/telepathy-haze-0.6.0/src/im-channel.c 2011-04-27 16:46:23.000000000 +0200
+++ new/telepathy-haze-0.7.0/src/im-channel.c 2012-11-17 19:15:50.000000000 +0100
@@ -98,15 +98,10 @@
{
if (priv->initiator != priv->handle)
{
- TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (
- (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT);
-
g_assert (priv->initiator != 0);
g_assert (priv->handle != 0);
- tp_handle_unref (contact_repo, priv->initiator);
priv->initiator = priv->handle;
- tp_handle_ref (contact_repo, priv->initiator);
}
tp_message_mixin_set_rescued ((GObject *) self);
@@ -283,7 +278,7 @@
{
case TP_CHANNEL_CHAT_STATE_GONE:
DEBUG ("The Gone state may not be explicitly set");
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"The Gone state may not be explicitly set");
break;
case TP_CHANNEL_CHAT_STATE_INACTIVE:
@@ -298,7 +293,7 @@
break;
default:
DEBUG ("Invalid chat state: %u", state);
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Invalid chat state: %u", state);
}
@@ -356,7 +351,7 @@
if (tp_message_count_parts (message) != 2)
{
- error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"messages must have a single plain-text part");
goto err;
}
@@ -370,14 +365,14 @@
if (tp_strdiff (content_type, "text/plain"))
{
- error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"messages must have a single plain-text part");
goto err;
}
if (text == NULL)
{
- error = g_error_new (TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"message body must be a UTF-8 string");
goto err;
}
@@ -401,7 +396,7 @@
* support TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE.
*/
default:
- error = g_error_new (TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ error = g_error_new (TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"unsupported message type: %u", type);
goto err;
}
@@ -569,7 +564,6 @@
GObject *obj;
HazeIMChannel *chan;
HazeIMChannelPrivate *priv;
- TpHandleRepoIface *contact_handles;
TpBaseConnection *conn;
TpDBusDaemon *bus;
@@ -579,11 +573,7 @@
priv = chan->priv;
conn = (TpBaseConnection *) (priv->conn);
- contact_handles = tp_base_connection_get_handles (conn,
- TP_HANDLE_TYPE_CONTACT);
- tp_handle_ref (contact_handles, priv->handle);
g_assert (priv->initiator != 0);
- tp_handle_ref (contact_handles, priv->initiator);
tp_message_mixin_init (obj, G_STRUCT_OFFSET (HazeIMChannel, messages),
conn);
@@ -604,20 +594,11 @@
{
HazeIMChannel *chan = HAZE_IM_CHANNEL (obj);
HazeIMChannelPrivate *priv = chan->priv;
- TpBaseConnection *conn = (TpBaseConnection *) priv->conn;
- TpHandleRepoIface *contact_handles = tp_base_connection_get_handles (conn,
- TP_HANDLE_TYPE_CONTACT);
if (priv->dispose_has_run)
return;
priv->dispose_has_run = TRUE;
- if (priv->handle != 0)
- tp_handle_unref (contact_handles, priv->handle);
-
- if (priv->initiator != 0)
- tp_handle_unref (contact_handles, priv->initiator);
-
if (!priv->closed)
{
purple_conversation_destroy (priv->conv);
@@ -757,8 +738,8 @@
PurpleMessageFlags flags,
time_t mtime)
{
- TpMessage *message = tp_message_new ((TpBaseConnection *) self->priv->conn,
- 2, 2);
+ TpBaseConnection *base_conn = (TpBaseConnection *) self->priv->conn;
+ TpMessage *message = tp_cm_message_new (base_conn, 2);
TpChannelTextMessageType type = TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL;
time_t now = time (NULL);
@@ -767,8 +748,7 @@
else if (purple_message_meify (text_plain, -1))
type = TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION;
- tp_message_set_handle (message, 0, "message-sender", TP_HANDLE_TYPE_CONTACT,
- self->priv->handle);
+ tp_cm_message_set_sender (message, self->priv->handle);
tp_message_set_uint32 (message, 0, "message-type", type);
/* FIXME: the second half of this test shouldn't be necessary but prpl-jabber
@@ -790,11 +770,11 @@
_make_delivery_report (HazeIMChannel *self,
char *text_plain)
{
- TpMessage *report = tp_message_new ((TpBaseConnection *) self->priv->conn, 2,
- 2);
+ TpBaseConnection *base_conn = (TpBaseConnection *) self->priv->conn;
+ TpMessage *report = tp_cm_message_new (base_conn, 2);
/* "MUST be the intended recipient of the original message" */
- tp_message_set_uint32 (report, 0, "message-sender", self->priv->handle);
+ tp_cm_message_set_sender (report, self->priv->handle);
tp_message_set_uint32 (report, 0, "message-type",
TP_CHANNEL_TEXT_MESSAGE_TYPE_DELIVERY_REPORT);
/* FIXME: we don't know that the failure is temporary */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/src/media-backend.c new/telepathy-haze-0.7.0/src/media-backend.c
--- old/telepathy-haze-0.6.0/src/media-backend.c 2010-11-18 18:55:05.000000000 +0100
+++ new/telepathy-haze-0.7.0/src/media-backend.c 2012-11-17 19:15:50.000000000 +0100
@@ -553,7 +553,7 @@
* error message describes the only legitimate situation in which this
* could arise.
*/
- GError e = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "call has already ended" };
+ GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE, "call has already ended" };
DEBUG ("no session, returning an error.");
dbus_g_method_return_error (context, &e);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/src/media-channel.c new/telepathy-haze-0.7.0/src/media-channel.c
--- old/telepathy-haze-0.6.0/src/media-channel.c 2010-11-18 18:55:05.000000000 +0100
+++ new/telepathy-haze-0.7.0/src/media-channel.c 2012-11-17 19:15:50.000000000 +0100
@@ -265,7 +265,7 @@
if (p->context != NULL)
{
- GError e = { TP_ERRORS, TP_ERROR_CANCELLED,
+ GError e = { TP_ERROR, TP_ERROR_CANCELLED,
"The session terminated before the requested streams could be added"
};
@@ -431,7 +431,7 @@
TpGroupMixin *mixin = TP_GROUP_MIXIN (chan);
guint terminator;
TpHandle peer;
- TpIntSet *set;
+ TpIntset *set;
priv->media_ended = TRUE;
@@ -483,7 +483,7 @@
if (type == PURPLE_MEDIA_INFO_ACCEPT)
{
- TpIntSet *set;
+ TpIntset *set;
TpHandle actor;
if (local == FALSE)
@@ -517,7 +517,7 @@
{
TpGroupMixin *mixin = TP_GROUP_MIXIN (chan);
guint terminator;
- TpIntSet *set;
+ TpIntset *set;
if (sid != NULL)
return;
@@ -583,7 +583,7 @@
HazeMediaChannelPrivate *priv;
TpBaseConnection *conn;
TpDBusDaemon *bus;
- TpIntSet *set;
+ TpIntset *set;
TpHandleRepoIface *contact_handles;
obj = G_OBJECT_CLASS (haze_media_channel_parent_class)->
@@ -609,7 +609,6 @@
/* automatically add creator to channel, but also ref them again (because
* priv->creator is the InitiatorHandle) */
g_assert (priv->creator != 0);
- tp_handle_ref (contact_handles, priv->creator);
set = tp_intset_new_containing (priv->creator);
tp_group_mixin_change_members (obj, "", set, NULL, NULL, NULL, 0,
@@ -787,15 +786,6 @@
break;
case PROP_INITIAL_PEER:
priv->initial_peer = g_value_get_uint (value);
-
- if (priv->initial_peer != 0)
- {
- TpBaseConnection *base_conn = (TpBaseConnection *) priv->conn;
- TpHandleRepoIface *repo = tp_base_connection_get_handles (base_conn,
- TP_HANDLE_TYPE_CONTACT);
- tp_handle_ref (repo, priv->initial_peer);
- }
-
break;
case PROP_MEDIA:
g_assert (priv->media == NULL);
@@ -967,9 +957,6 @@
{
HazeMediaChannel *self = HAZE_MEDIA_CHANNEL (object);
HazeMediaChannelPrivate *priv = self->priv;
- TpBaseConnection *conn = (TpBaseConnection *) priv->conn;
- TpHandleRepoIface *contact_handles = tp_base_connection_get_handles (
- conn, TP_HANDLE_TYPE_CONTACT);
if (priv->dispose_has_run)
return;
@@ -983,15 +970,6 @@
g_assert (priv->closed);
- tp_handle_unref (contact_handles, priv->creator);
- priv->creator = 0;
-
- if (priv->initial_peer != 0)
- {
- tp_handle_unref (contact_handles, priv->initial_peer);
- priv->initial_peer = 0;
- }
-
if (priv->media != NULL)
g_object_unref (priv->media);
priv->media = NULL;
@@ -1179,7 +1157,7 @@
GError *e;
g_object_get (base_conn, "protocol", &name, NULL);
- g_set_error (&e, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (&e, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Streams can't be removed in Haze's \"%s\" protocol's calls", name);
g_free (name);
@@ -1216,7 +1194,7 @@
if (j >= backend_streams->len)
{
- GError e = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ GError e = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Requested stream wasn't found" };
DEBUG ("%s", e.message);
dbus_g_method_return_error (context, &e);
@@ -1261,7 +1239,7 @@
DBusGMethodInvocation *context)
{
/* Libpurple doesn't have API for this yet */
- GError e = { TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ GError e = { TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"Stream direction can't be set Haze calls" };
DEBUG ("%s", e.message);
dbus_g_method_return_error (context, &e);
@@ -1327,7 +1305,7 @@
}
else
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"given media type %u is invalid", media_type);
return FALSE;
}
@@ -1348,7 +1326,7 @@
gchar *name;
g_object_get (base_conn, "protocol", &name, NULL);
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Streams can't be added in Haze's \"%s\" protocol's calls",
name);
@@ -1360,7 +1338,7 @@
if ((want_audio == FALSE || caps & PURPLE_MEDIA_CAPS_AUDIO) &&
(want_video == FALSE || caps & PURPLE_MEDIA_CAPS_VIDEO))
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Member does not have the desired audio/video capabilities");
return FALSE;
}
@@ -1442,7 +1420,7 @@
if (peer != contact_handle)
{
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"cannot add streams for %u: this channel's peer is %u",
contact_handle, peer);
goto error;
@@ -1565,7 +1543,7 @@
HazeMediaChannel *chan = HAZE_MEDIA_CHANNEL (obj);
HazeMediaChannelPrivate *priv = chan->priv;
TpGroupMixin *mixin = TP_GROUP_MIXIN (obj);
- TpIntSet *set;
+ TpIntset *set;
/* did we create this channel? */
if (priv->creator == mixin->self_handle)
@@ -1581,7 +1559,7 @@
if (peer != handle)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"handle %u cannot be added: this channel's peer is %u",
handle, peer);
return FALSE;
@@ -1611,7 +1589,7 @@
/* is the call on hold? */
if (priv->hold_state != TP_LOCAL_HOLD_STATE_UNHELD)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"Can't answer a call while it's on hold");
return FALSE;
}
@@ -1630,7 +1608,7 @@
}
}
- g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"handle %u cannot be added in the current state", handle);
return FALSE;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/src/media-manager.c new/telepathy-haze-0.7.0/src/media-manager.c
--- old/telepathy-haze-0.6.0/src/media-manager.c 2010-11-18 18:55:05.000000000 +0100
+++ new/telepathy-haze-0.7.0/src/media-manager.c 2012-11-17 19:15:50.000000000 +0100
@@ -478,7 +478,7 @@
/* already checked by TpBaseConnection */
g_assert (handle == 0);
- g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
"A valid Contact handle must be provided when requesting a media "
"channel");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/src/media-stream.c new/telepathy-haze-0.7.0/src/media-stream.c
--- old/telepathy-haze-0.6.0/src/media-stream.c 2011-04-27 16:46:23.000000000 +0200
+++ new/telepathy-haze-0.7.0/src/media-stream.c 2012-11-17 19:15:50.000000000 +0100
@@ -1345,7 +1345,7 @@
if (self->priv->codecs == NULL)
{
- GError e = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
+ GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"CodecsUpdated may only be called once an initial set of codecs "
"has been set" };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/src/protocol.c new/telepathy-haze-0.7.0/src/protocol.c
--- old/telepathy-haze-0.6.0/src/protocol.c 2011-04-27 16:46:23.000000000 +0200
+++ new/telepathy-haze-0.7.0/src/protocol.c 2012-11-21 17:44:01.000000000 +0100
@@ -207,6 +207,8 @@
{ "zephyr", "prpl-zephyr", encoding_to_charset, "x-zephyr" /* ? */ },
{ "mxit", "prpl-loubserp-mxit", NULL, "x-mxit" /* ? */ },
{ "sip", "prpl-simple", NULL, "x-sip" },
+ { "skype-dbus", "prpl-bigbrownchunx-skype-dbus", NULL, "x-skype" },
+ { "skype-x11", "prpl-bigbrownchunx-skype", NULL, "x-skype" },
{ NULL, NULL, NULL }
};
@@ -285,7 +287,7 @@
if (*str == '\0')
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Account parameter '%s' must not be empty",
paramspec->name);
return FALSE;
@@ -293,7 +295,7 @@
if (strstr (str, " ") != NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"Account parameter '%s' may not contain spaces",
paramspec->name);
return FALSE;
@@ -318,7 +320,7 @@
!= NULL)
return TRUE;
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
"'%s' is not a valid value for parameter '%s'", str, paramspec->name);
return FALSE;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/tests/exec-with-log.sh new/telepathy-haze-0.7.0/tests/exec-with-log.sh
--- old/telepathy-haze-0.6.0/tests/exec-with-log.sh 2010-11-18 18:55:05.000000000 +0100
+++ new/telepathy-haze-0.7.0/tests/exec-with-log.sh 2012-11-17 19:15:50.000000000 +0100
@@ -9,6 +9,8 @@
export LC_ALL=C
export HAZE_DEBUG=all
+G_MESSAGES_DEBUG=all
+export G_MESSAGES_DEBUG
ulimit -c unlimited
exec >> haze-testing.log 2>&1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/tests/twisted/Makefile.am new/telepathy-haze-0.7.0/tests/twisted/Makefile.am
--- old/telepathy-haze-0.6.0/tests/twisted/Makefile.am 2010-11-18 18:55:05.000000000 +0100
+++ new/telepathy-haze-0.7.0/tests/twisted/Makefile.am 2012-11-17 19:15:50.000000000 +0100
@@ -1,5 +1,6 @@
TWISTED_TESTS = \
avatar-requirements.py \
+ simple-caps.py \
cm/protocols.py \
connect/fail.py \
connect/success.py \
@@ -42,4 +43,17 @@
servicetest.py \
ns.py
-CLEANFILES = *.pyc */*.pyc
+if MEDIA_ENABLED
+MEDIA_ENABLED_PYBOOL = True
+else
+MEDIA_ENABLED_PYBOOL = False
+endif
+
+config.py: Makefile
+ $(AM_V_GEN) { \
+ echo "MEDIA_ENABLED = $(MEDIA_ENABLED_PYBOOL)"; \
+ } > $@
+
+BUILT_SOURCES = config.py
+
+CLEANFILES = *.pyc */*.pyc config.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/telepathy-haze-0.6.0/tests/twisted/simple-caps.py new/telepathy-haze-0.7.0/tests/twisted/simple-caps.py
--- old/telepathy-haze-0.6.0/tests/twisted/simple-caps.py 1970-01-01 01:00:00.000000000 +0100
+++ new/telepathy-haze-0.7.0/tests/twisted/simple-caps.py 2012-11-17 19:15:50.000000000 +0100
@@ -0,0 +1,105 @@
+
+"""
+Make sure ContactCaps works well enough.
+"""
+
+from twisted.words.xish import domish
+
+from servicetest import assertEquals, assertContains, EventPattern
+from hazetest import exec_test, sync_stream
+import constants as cs
+
+import config
+
+import ns
+
+# assert this list of RCCs is only text
+def check_text_only(rccs):
+ assertEquals([({
+ cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_TEXT,
+ cs.TARGET_HANDLE_TYPE: cs.HT_CONTACT
+ }, [cs.TARGET_HANDLE])], rccs)
+
+# assert GetContactCaps and GetContactAttributes returns just text caps
+def check_rccs(conn, handle):
+ rccs = conn.ContactCapabilities.GetContactCapabilities([handle])
+ assertEquals(1, len(rccs))
+ check_text_only(rccs[handle])
+
+ attrs = conn.Contacts.GetContactAttributes([handle],
+ [cs.CONN_IFACE_CONTACT_CAPS],
+ False)
+ rccs = attrs[handle][cs.CONN_IFACE_CONTACT_CAPS + '/capabilities']
+ check_text_only(rccs)
+
+# do the self handle which will just be text
+def test_self_handle(q, bus, conn, stream):
+ conn.Connect()
+ q.expect('dbus-signal', signal='StatusChanged',
+ args=[cs.CONN_STATUS_CONNECTED, cs.CSR_REQUESTED])
+
+ self_handle = conn.Properties.Get(cs.CONN, 'SelfHandle')
+
+ check_rccs(conn, self_handle)
+
+# do someone else which will also just be text
+def test_someone_else(q, bus, conn, stream):
+ conn.Connect()
+ q.expect_many(
+ EventPattern('dbus-signal', signal='StatusChanged',
+ args=[cs.CONN_STATUS_CONNECTING, cs.CSR_REQUESTED]),
+ EventPattern('stream-authenticated'),
+ )
+
+ event = q.expect('stream-iq', query_ns=ns.ROSTER)
+ event.stanza['type'] = 'result'
+
+ item = event.query.addElement('item')
+ item['jid'] = 'bob@foo.com'
+ item['subscription'] = 'both'
+
+ stream.send(event.stanza)
+
+ q.expect('dbus-signal', signal='StatusChanged',
+ args=[cs.CONN_STATUS_CONNECTED, cs.CSR_REQUESTED])
+
+ bob_handle = conn.RequestHandles(cs.HT_CONTACT, ['bob@foo.com'])[0]
+ check_rccs(conn, bob_handle)
+
+ # now a randomer who isn't even in our contact list
+ amy_handle = conn.RequestHandles(cs.HT_CONTACT, ['amy@foo.com'])[0]
+ check_rccs(conn, amy_handle)
+
+def test_media(q, bus, conn, stream):
+ conn.Connect()
+ q.expect('dbus-signal', signal='StatusChanged',
+ args=[cs.CONN_STATUS_CONNECTED, cs.CSR_REQUESTED])
+
+ sync_stream(q, stream)
+
+ conn.ContactCapabilities.UpdateCapabilities([(
+ 'im.telepathy1.Client.Foobar',
+ [{ cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_STREAMED_MEDIA,
+ cs.TARGET_HANDLE_TYPE: cs.HT_CONTACT,
+ cs.INITIAL_AUDIO: True },
+ { cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_STREAMED_MEDIA,
+ cs.TARGET_HANDLE_TYPE: cs.HT_CONTACT,
+ cs.INITIAL_VIDEO: True }],
+ [],
+ )])
+
+ q.expect('stream-presence') # can't be bothered checking this
+
+ conn.ContactCapabilities.UpdateCapabilities([(
+ 'im.telepathy1.Client.Foobar',
+ [], [])])
+
+ q.expect('stream-presence') # can't be bothered checking this
+
+if __name__ == '__main__':
+ exec_test(test_self_handle)
+ exec_test(test_someone_else)
+
+ if config.MEDIA_ENABLED:
+ exec_test(test_media)
+
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org