summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Mardegan <alberto.mardegan@nokia.com>2009-04-01 09:48:27 +0300
committerAlberto Mardegan <alberto.mardegan@nokia.com>2009-04-01 09:48:27 +0300
commit8cd1ae91b3b8014bec14b301a126baabcabcf0c8 (patch)
treef3adb0ddbb3272e9fa922dc9b0414a2016b99e92
parent04690c72d5f29fba232a9ca8cb0d135ee7eb1729 (diff)
parentee8f3e731a015b390e8914f95f48c491f3ac6248 (diff)
Merge branch 'master' of git+ssh://git.collabora.co.uk/git/telepathy-mission-control5.0.beta64
-rw-r--r--.gitignore7
-rw-r--r--Makefile.am2
-rw-r--r--libmcclient/Makefile.am1
-rw-r--r--server/mc-server.c1
-rw-r--r--src/Makefile.am1
-rw-r--r--src/mcd-dispatcher.c12
-rw-r--r--test/twisted/Makefile.am25
-rw-r--r--test/twisted/account-bad-cm.py59
-rw-r--r--test/twisted/constants.py107
-rw-r--r--test/twisted/do-nothing.py8
-rw-r--r--test/twisted/managers/fakecm.manager7
-rw-r--r--test/twisted/mc-debug-server.c120
-rw-r--r--test/twisted/telepathy/clients/README (renamed from test/twisted/clients/README)0
-rw-r--r--test/twisted/telepathy/managers/README (renamed from test/twisted/managers/README)0
-rw-r--r--test/twisted/telepathy/managers/fakecm.manager15
-rw-r--r--test/twisted/test-account.py122
-rw-r--r--test/twisted/test-connect.py68
-rw-r--r--test/twisted/tools/Makefile.am6
-rw-r--r--test/twisted/tools/exec-with-log.sh.in20
-rw-r--r--test/twisted/tools/valgrind.supp871
-rw-r--r--tools/Makefile.am1
-rw-r--r--tools/lcov.am25
-rw-r--r--xml/Account.xml103
-rw-r--r--xml/Account_Interface_Avatar.xml2
-rw-r--r--xml/Account_Manager.xml49
-rw-r--r--xml/Makefile.am1
26 files changed, 1497 insertions, 136 deletions
diff --git a/.gitignore b/.gitignore
index b666c79f..715c9d37 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,8 @@
*.stamp
*.pyc
*.bak
+*.gcda
+*.gcno
/doc/reference/*/html
/doc/reference/*/xml
/doc/reference/*/*-decl-list.txt
@@ -46,6 +48,9 @@ examples/mc-example-2
examples/mc-example-3
gtk-doc.make
install-sh
+/lcov.html
+/lcov.info
+/lcov.info.tmp
libmcclient.pc
libmcclient/diff
libmissioncontrol.pc
@@ -62,9 +67,11 @@ server/mission-control
server/org.freedesktop.Telepathy.AccountManager.service
server/org.freedesktop.Telepathy.MissionControl.service
tags
+/telepathy-mission-control-5*
test/mc-client
test/twisted/with-session-bus-*.dbus-monitor-logs
test/twisted/accounts/accounts.cfg
+/test/twisted/mc-debug-server
test/twisted/tools/exec-with-log.sh
test/twisted/tools/missioncontrol-testing.log
test/twisted/tools/org.freedesktop.Telepathy.MissionControl.service
diff --git a/Makefile.am b/Makefile.am
index ff39fb9e..5530e4f9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,3 +19,5 @@ pkgconfig_DATA += libmissioncontrol.pc
endif
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
+
+include tools/lcov.am
diff --git a/libmcclient/Makefile.am b/libmcclient/Makefile.am
index b587eb30..5cfa8e4f 100644
--- a/libmcclient/Makefile.am
+++ b/libmcclient/Makefile.am
@@ -97,6 +97,7 @@ EXTRA_DIST = \
account.xml \
account-manager.xml \
client.xml \
+ dispatch-operation.xml \
mc-quark.list \
mc-signals-marshal.list
diff --git a/server/mc-server.c b/server/mc-server.c
index 17958509..fa7d813d 100644
--- a/server/mc-server.c
+++ b/server/mc-server.c
@@ -50,6 +50,7 @@ main (int argc, char **argv)
g_type_init ();
+ mcd_debug_init ();
tp_debug_set_flags (g_getenv ("MC_TP_DEBUG"));
mcd = mcd_service_new ();
diff --git a/src/Makefile.am b/src/Makefile.am
index dcb50dc4..3d4d8678 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -198,6 +198,7 @@ mcd-service-gen.h: $(top_builddir)/xml/MissionControl-gen.xml
EXTRA_DIST = \
client.xml \
+ dispatch-operation.xml \
mcd-signals-marshal.list \
stamp-mcd-enum-types.h
diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index 019ac666..1b8be084 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -1963,9 +1963,19 @@ get_channel_filter_cb (TpProxy *proxy,
GObject *weak_object)
{
GList **client_filters = user_data;
- GPtrArray *filters = g_value_get_boxed (out_Value);
+ GPtrArray *filters;
guint i;
+ if (error != NULL)
+ {
+ DEBUG ("error getting a filter list for client %s: %s #%d: %s",
+ tp_proxy_get_object_path (proxy),
+ g_quark_to_string (error->domain), error->code, error->message);
+ return;
+ }
+
+ filters = g_value_get_boxed (out_Value);
+
for (i = 0 ; i < filters->len ; i++)
{
GHashTable *channel_class = g_ptr_array_index (filters, i);
diff --git a/test/twisted/Makefile.am b/test/twisted/Makefile.am
index ecf4fb84..78397034 100644
--- a/test/twisted/Makefile.am
+++ b/test/twisted/Makefile.am
@@ -1,8 +1,24 @@
TWISTED_TESTS =
TWISTED_BASIC_TESTS = \
- test-account.py \
- test-connect.py
+ account-bad-cm.py \
+ do-nothing.py \
+ test-account.py \
+ test-connect.py
+
+# A debug version of the normal MC executable, which exits cleanly on
+# disconnection from D-Bus (so gcov info gets written out)
+noinst_PROGRAMS = mc-debug-server
+mc_debug_server_SOURCES = mc-debug-server.c
+mc_debug_server_LDADD = $(top_builddir)/src/libmissioncontrol-server.la
+
+INCLUDES = \
+ -I$(top_srcdir) -I$(top_builddir) \
+ -I$(top_srcdir)/src -I$(top_builddir)/src \
+ $(DBUS_CFLAGS) \
+ $(TELEPATHY_CFLAGS) \
+ -DMC_DISABLE_DEPRECATED \
+ -DLIBDIR="@libdir@" -DLIBVERSION="0"
TESTS =
@@ -28,12 +44,17 @@ check-twisted:
EXTRA_DIST = \
$(TWISTED_BASIC_TESTS) \
+ telepathy/clients/README \
+ telepathy/managers/fakecm.manager \
+ telepathy/managers/README \
+ constants.py \
fakeclient.py \
fakecm.py \
mctest.py \
servicetest.py
CLEANFILES = \
+ accounts/accounts.cfg \
mc-[1-9]*.log \
*.pyc \
*/*.pyc \
diff --git a/test/twisted/account-bad-cm.py b/test/twisted/account-bad-cm.py
new file mode 100644
index 00000000..d41a5e1c
--- /dev/null
+++ b/test/twisted/account-bad-cm.py
@@ -0,0 +1,59 @@
+print "Skipping test that is known to fail:"
+print " http://bugs.freedesktop.org/show_bug.cgi?id=20880"
+raise SystemExit(77)
+
+import dbus
+
+from servicetest import EventPattern, tp_name_prefix, tp_path_prefix, \
+ call_async
+from fakecm import start_fake_connection_manager
+from mctest import exec_test
+import constants as cs
+
+FakeCM_bus_name = "com.example.FakeCM"
+ConnectionManager_object_path = "/com/example/FakeCM/ConnectionManager"
+
+
+def test(q, bus, mc):
+ # Get the AccountManager interface
+ account_manager = bus.get_object(cs.AM, cs.AM_PATH)
+ account_manager_iface = dbus.Interface(account_manager, cs.AM)
+
+ # Create an account with a bad Connection_Manager - it should fail
+
+ params = dbus.Dictionary({"account": "someguy@example.com",
+ "password": "secrecy"}, signature='sv')
+ call_async(q, account_manager_iface, 'CreateAccount',
+ 'nonexistent_cm', # Connection_Manager
+ 'fakeprotocol', # Protocol
+ 'fakeaccount', #Display_Name
+ params, # Parameters
+ )
+ q.expect('dbus-error', method='CreateAccount')
+
+ # Create an account with a bad Protocol - it should fail
+
+ params = dbus.Dictionary({"account": "someguy@example.com",
+ "password": "secrecy"}, signature='sv')
+ call_async(q, account_manager_iface, 'CreateAccount',
+ 'fakecm', # Connection_Manager
+ 'nonexistent-protocol', # Protocol
+ 'fakeaccount', #Display_Name
+ params, # Parameters
+ )
+ q.expect('dbus-error', method='CreateAccount')
+
+ # Create an account with incomplete Parameters - it should fail
+
+ params = dbus.Dictionary({"account": "someguy@example.com"},
+ signature='sv')
+ call_async(q, account_manager_iface, 'CreateAccount',
+ 'fakecm', # Connection_Manager
+ 'fakeprotocol', # Protocol
+ 'fakeaccount', #Display_Name
+ params, # Parameters
+ )
+ q.expect('dbus-error', method='CreateAccount')
+
+if __name__ == '__main__':
+ exec_test(test, {})
diff --git a/test/twisted/constants.py b/test/twisted/constants.py
new file mode 100644
index 00000000..ed486ce1
--- /dev/null
+++ b/test/twisted/constants.py
@@ -0,0 +1,107 @@
+"""
+Some handy constants for other tests to share and enjoy.
+"""
+
+from dbus import PROPERTIES_IFACE, INTROSPECTABLE_IFACE
+from servicetest import tp_name_prefix, tp_path_prefix
+
+HT_CONTACT = 1
+HT_ROOM = 2
+
+CHANNEL = tp_name_prefix + ".Channel"
+CHANNEL_IFACE_GROUP = CHANNEL + ".Interface.Group"
+CHANNEL_IFACE_HOLD = CHANNEL + ".Interface.Hold"
+CHANNEL_IFACE_MEDIA_SIGNALLING = CHANNEL + ".Interface.MediaSignalling"
+CHANNEL_TYPE_TEXT = CHANNEL + ".Type.Text"
+CHANNEL_TYPE_TUBES = CHANNEL + ".Type.Tubes"
+CHANNEL_IFACE_TUBE = CHANNEL + ".Interface.Tube.DRAFT"
+CHANNEL_TYPE_STREAM_TUBE = CHANNEL + ".Type.StreamTube.DRAFT"
+CHANNEL_TYPE_DBUS_TUBE = CHANNEL + ".Type.DBusTube.DRAFT"
+CHANNEL_TYPE_STREAMED_MEDIA = CHANNEL + ".Type.StreamedMedia"
+CHANNEL_TYPE_TEXT = CHANNEL + ".Type.Text"
+
+TP_AWKWARD_PROPERTIES = tp_name_prefix + ".Properties"
+PROPERTY_FLAG_READ = 1
+PROPERTY_FLAG_WRITE = 2
+
+CHANNEL_TYPE = CHANNEL + '.ChannelType'
+TARGET_HANDLE_TYPE = CHANNEL + '.TargetHandleType'
+TARGET_HANDLE = CHANNEL + '.TargetHandle'
+TARGET_ID = CHANNEL + '.TargetID'
+REQUESTED = CHANNEL + '.Requested'
+INITIATOR_HANDLE = CHANNEL + '.InitiatorHandle'
+INITIATOR_ID = CHANNEL + '.InitiatorID'
+INTERFACES = CHANNEL + '.Interfaces'
+
+CONN = tp_name_prefix + ".Connection"
+CONN_IFACE_CONTACTS = CONN + '.Interface.Contacts'
+CONN_IFACE_CONTACT_CAPA = CONN + '.Interface.ContactCapabilities.DRAFT'
+CONN_IFACE_REQUESTS = CONN + '.Interface.Requests'
+
+ERROR = tp_name_prefix + '.Error'
+INVALID_ARGUMENT = ERROR + '.InvalidArgument'
+NOT_IMPLEMENTED = ERROR + '.NotImplemented'
+NOT_AVAILABLE = ERROR + '.NotAvailable'
+PERMISSION_DENIED = ERROR + '.PermissionDenied'
+
+TUBE_PARAMETERS = CHANNEL_IFACE_TUBE + '.Parameters'
+TUBE_STATE = CHANNEL_IFACE_TUBE + '.State'
+STREAM_TUBE_SERVICE = CHANNEL_TYPE_STREAM_TUBE + '.Service'
+DBUS_TUBE_SERVICE_NAME = CHANNEL_TYPE_DBUS_TUBE + '.ServiceName'
+DBUS_TUBE_DBUS_NAMES = CHANNEL_TYPE_DBUS_TUBE + '.DBusNames'
+
+TUBE_CHANNEL_STATE_LOCAL_PENDING = 0
+TUBE_CHANNEL_STATE_REMOTE_PENDING = 1
+TUBE_CHANNEL_STATE_OPEN = 2
+TUBE_CHANNEL_STATE_NOT_OFFERED = 3
+
+MEDIA_STREAM_TYPE_AUDIO = 0
+MEDIA_STREAM_TYPE_VIDEO = 1
+
+SOCKET_ADDRESS_TYPE_UNIX = 0
+SOCKET_ADDRESS_TYPE_ABSTRACT_UNIX = 1
+SOCKET_ADDRESS_TYPE_IPV4 = 2
+SOCKET_ADDRESS_TYPE_IPV6 = 3
+
+SOCKET_ACCESS_CONTROL_LOCALHOST = 0
+SOCKET_ACCESS_CONTROL_PORT = 1
+SOCKET_ACCESS_CONTROL_NETMASK = 2
+SOCKET_ACCESS_CONTROL_CREDENTIALS = 3
+
+TUBE_STATE_LOCAL_PENDING = 0
+TUBE_STATE_REMOTE_PENDING = 1
+TUBE_STATE_OPEN = 2
+TUBE_STATE_NOT_OFFERED = 3
+
+TUBE_TYPE_DBUS = 0
+TUBE_TYPE_STREAM = 1
+
+MEDIA_STREAM_DIRECTION_NONE = 0
+MEDIA_STREAM_DIRECTION_SEND = 1
+MEDIA_STREAM_DIRECTION_RECEIVE = 2
+MEDIA_STREAM_DIRECTION_BIDIRECTIONAL = 3
+
+MEDIA_STREAM_PENDING_LOCAL_SEND = 1
+MEDIA_STREAM_PENDING_REMOTE_SEND = 2
+
+MEDIA_STREAM_TYPE_AUDIO = 0
+MEDIA_STREAM_TYPE_VIDEO = 1
+
+MEDIA_STREAM_STATE_DISCONNECTED = 0
+MEDIA_STREAM_STATE_CONNECTING = 1
+MEDIA_STREAM_STATE_CONNECTED = 2
+
+MEDIA_STREAM_DIRECTION_NONE = 0
+MEDIA_STREAM_DIRECTION_SEND = 1
+MEDIA_STREAM_DIRECTION_RECEIVE = 2
+MEDIA_STREAM_DIRECTION_BIDIRECTIONAL = 3
+
+ACCOUNT = tp_name_prefix + '.Account'
+ACCOUNT_IFACE_AVATAR = ACCOUNT + '.Interface.Avatar'
+ACCOUNT_IFACE_NOKIA_COMPAT = ACCOUNT + '.Interface.Compat'
+ACCOUNT_IFACE_NOKIA_CONDITIONS = 'com.nokia.Account.Interface.Conditions'
+
+AM = tp_name_prefix + '.AccountManager'
+AM_IFACE_CREATION_DRAFT = AM + '.Interface.Creation.DRAFT'
+AM_IFACE_NOKIA_QUERY = 'com.nokia.AccountManager.Interface.Query'
+AM_PATH = tp_path_prefix + '/AccountManager'
diff --git a/test/twisted/do-nothing.py b/test/twisted/do-nothing.py
new file mode 100644
index 00000000..f8740175
--- /dev/null
+++ b/test/twisted/do-nothing.py
@@ -0,0 +1,8 @@
+from mctest import exec_test
+
+def test(q, bus, mc):
+ pass
+
+
+if __name__ == '__main__':
+ exec_test(test, {})
diff --git a/test/twisted/managers/fakecm.manager b/test/twisted/managers/fakecm.manager
deleted file mode 100644
index 60a45cf5..00000000
--- a/test/twisted/managers/fakecm.manager
+++ /dev/null
@@ -1,7 +0,0 @@
-[ConnectionManager]
-BusName=com.example.FakeCM
-ObjectPath=/com/example/FakeCM/ConnectionManager
-
-[Protocol fakeprotocol]
-param-nickname=s
-
diff --git a/test/twisted/mc-debug-server.c b/test/twisted/mc-debug-server.c
new file mode 100644
index 00000000..1bb640eb
--- /dev/null
+++ b/test/twisted/mc-debug-server.c
@@ -0,0 +1,120 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 8 -*- */
+/*
+ * This file is part of mission-control
+ *
+ * Copyright (C) 2007 Nokia Corporation.
+ *
+ * Contact: Naba Kumar <naba.kumar@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * 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
+ *
+ */
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <glib.h>
+
+#include <dbus/dbus-glib.h>
+#include <dbus/dbus-glib-lowlevel.h>
+
+#include <telepathy-glib/debug.h>
+#include <telepathy-glib/util.h>
+
+#include "mcd-service.h"
+
+
+static void
+on_abort (McdService * mcd)
+{
+ g_debug ("Exiting now ...");
+
+ mcd_debug_print_tree (mcd);
+
+ g_object_unref (mcd);
+ g_debug ("MC now exits .. bye bye");
+ exit (0);
+}
+
+static DBusHandlerResult
+dbus_filter_function (DBusConnection *connection,
+ DBusMessage *message,
+ void *user_data)
+{
+ if (dbus_message_is_signal (message, DBUS_INTERFACE_LOCAL, "Disconnected") &&
+ !tp_strdiff (dbus_message_get_path (message), DBUS_PATH_LOCAL))
+ {
+ g_message ("Got disconnected from the session bus");
+ exit (69); /* EX_UNAVAILABLE */
+ }
+
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+int
+main (int argc, char **argv)
+{
+ TpDBusDaemon *bus_daemon = NULL;
+ McdService *mcd = NULL;
+ GError *error = NULL;
+ DBusConnection *connection;
+ int ret = 1;
+
+ g_type_init ();
+
+ mcd_debug_init ();
+ tp_debug_set_flags (g_getenv ("MC_TP_DEBUG"));
+
+ bus_daemon = tp_dbus_daemon_dup (&error);
+
+ if (bus_daemon == NULL)
+ {
+ g_warning ("%s", error->message);
+ g_error_free (error);
+ error = NULL;
+ goto out;
+ }
+
+ /* It appears that dbus-glib registers a filter that wrongly returns
+ * DBUS_HANDLER_RESULT_HANDLED for signals, so for *our* filter to have any
+ * effect, we need to install it as soon as possible */
+ connection = dbus_g_connection_get_connection (
+ ((TpProxy *) bus_daemon)->dbus_connection);
+ dbus_connection_add_filter (connection, dbus_filter_function, NULL, NULL);
+
+ mcd = mcd_service_new ();
+
+ /* Listen for suicide notification */
+ g_signal_connect_after (mcd, "abort", G_CALLBACK (on_abort), mcd);
+
+ /* connect */
+ mcd_mission_connect (MCD_MISSION (mcd));
+
+ /* MC initialization sets exit on disconnect - turn it off again, so we
+ * get a graceful exit from the above handler instead (to keep gcov
+ * happy) */
+ dbus_connection_set_exit_on_disconnect (connection, FALSE);
+
+ mcd_service_run (MCD_OBJECT (mcd));
+
+ ret = 0;
+
+out:
+ if (bus_daemon != NULL)
+ {
+ g_object_unref (bus_daemon);
+ }
+
+ return ret;
+}
diff --git a/test/twisted/clients/README b/test/twisted/telepathy/clients/README
index 7b725bf9..7b725bf9 100644
--- a/test/twisted/clients/README
+++ b/test/twisted/telepathy/clients/README
diff --git a/test/twisted/managers/README b/test/twisted/telepathy/managers/README
index d77437cb..d77437cb 100644
--- a/test/twisted/managers/README
+++ b/test/twisted/telepathy/managers/README
diff --git a/test/twisted/telepathy/managers/fakecm.manager b/test/twisted/telepathy/managers/fakecm.manager
new file mode 100644
index 00000000..23a074e5
--- /dev/null
+++ b/test/twisted/telepathy/managers/fakecm.manager
@@ -0,0 +1,15 @@
+[ConnectionManager]
+BusName=com.example.FakeCM
+ObjectPath=/com/example/FakeCM/ConnectionManager
+
+[Protocol fakeprotocol]
+param-account=s register required
+param-password=s register required secret
+param-nickname=s register
+param-register=b
+param-com.example.Badgerable.Badgered=b dbus-property
+param-secret-mushroom=s
+param-snakes=u
+default-register=0
+default-com.example.Badgerable.Badgered=0
+default-snakes=1
diff --git a/test/twisted/test-account.py b/test/twisted/test-account.py
index c9be1f2e..a49c0b74 100644
--- a/test/twisted/test-account.py
+++ b/test/twisted/test-account.py
@@ -1,8 +1,10 @@
import dbus
-from servicetest import EventPattern, tp_name_prefix, tp_path_prefix
+from servicetest import EventPattern, tp_name_prefix, tp_path_prefix, \
+ call_async
from fakecm import start_fake_connection_manager
from mctest import exec_test
+import constants as cs
FakeCM_bus_name = "com.example.FakeCM"
ConnectionManager_object_path = "/com/example/FakeCM/ConnectionManager"
@@ -10,46 +12,51 @@ ConnectionManager_object_path = "/com/example/FakeCM/ConnectionManager"
def test(q, bus, mc):
# Get the AccountManager interface
- account_manager = bus.get_object(
- tp_name_prefix + '.AccountManager',
- tp_path_prefix + '/AccountManager')
- account_manager_iface = dbus.Interface(account_manager,
- 'org.freedesktop.Telepathy.AccountManager')
+ account_manager = bus.get_object(cs.AM, cs.AM_PATH)
+ account_manager_iface = dbus.Interface(account_manager, cs.AM)
# Introspect AccountManager for debugging purpose
account_manager_introspected = account_manager.Introspect(
- dbus_interface='org.freedesktop.DBus.Introspectable')
+ dbus_interface=cs.INTROSPECTABLE_IFACE)
#print account_manager_introspected
# Check AccountManager has D-Bus property interface
- properties = account_manager.GetAll(
- 'org.freedesktop.Telepathy.AccountManager',
- dbus_interface='org.freedesktop.DBus.Properties')
+ properties = account_manager.GetAll(cs.AM,
+ dbus_interface=cs.PROPERTIES_IFACE)
assert properties is not None
- assert properties.get('Interfaces') == [
- 'org.freedesktop.Telepathy.AccountManager',
- 'com.nokia.AccountManager.Interface.Query',
- 'org.freedesktop.Telepathy.AccountManager.Interface.Creation.DRAFT'
- ], properties.get('Interfaces')
assert properties.get('ValidAccounts') == [], \
properties.get('ValidAccounts')
assert properties.get('InvalidAccounts') == [], \
properties.get('InvalidAccounts')
+ interfaces = properties.get('Interfaces')
+
+ # assert that current functionality exists
+ assert cs.AM_IFACE_CREATION_DRAFT in interfaces, interfaces
+ assert cs.AM_IFACE_NOKIA_QUERY in interfaces, interfaces
# Create an account
- params = dbus.Dictionary({"nickname": "fakenick"}, signature='sv')
- account_path = account_manager_iface.CreateAccount(
+ params = dbus.Dictionary({"account": "someguy@example.com",
+ "password": "secrecy"}, signature='sv')
+ call_async(q, account_manager_iface, 'CreateAccount',
'fakecm', # Connection_Manager
'fakeprotocol', # Protocol
'fakeaccount', #Display_Name
params, # Parameters
)
+ # the spec has no order guarantee here
+ signal, ret = q.expect_many(
+ EventPattern('dbus-signal', path=cs.AM_PATH,
+ signal='AccountValidityChanged', interface=cs.AM),
+ EventPattern('dbus-return', method='CreateAccount'),
+ )
+ account_path = ret.value[0]
+ assert signal.args == [account_path, True], signal.args
+
assert account_path is not None
# Check the account is correctly created
- properties = account_manager.GetAll(
- 'org.freedesktop.Telepathy.AccountManager',
- dbus_interface='org.freedesktop.DBus.Properties')
+ properties = account_manager.GetAll(cs.AM,
+ dbus_interface=cs.PROPERTIES_IFACE)
assert properties is not None
assert properties.get('ValidAccounts') == [account_path], properties
account_path = properties['ValidAccounts'][0]
@@ -60,26 +67,17 @@ def test(q, bus, mc):
account = bus.get_object(
tp_name_prefix + '.AccountManager',
account_path)
- account_iface = dbus.Interface(account,
- 'org.freedesktop.Telepathy.Account')
+ account_iface = dbus.Interface(account, cs.ACCOUNT)
+ account_props = dbus.Interface(account, cs.PROPERTIES_IFACE)
# Introspect Account for debugging purpose
account_introspected = account.Introspect(
- dbus_interface='org.freedesktop.DBus.Introspectable')
+ dbus_interface=cs.INTROSPECTABLE_IFACE)
#print account_introspected
# Check Account has D-Bus property interface
- properties = account.GetAll(
- 'org.freedesktop.Telepathy.Account',
- dbus_interface='org.freedesktop.DBus.Properties')
+ properties = account_props.GetAll(cs.ACCOUNT)
assert properties is not None
- assert 'org.freedesktop.Telepathy.Account' \
- in properties.get('Interfaces'), properties.get('Interfaces')
- assert 'org.freedesktop.Telepathy.Account.Interface.Avatar' \
- in properties.get('Interfaces'), properties.get('Interfaces')
- assert 'org.freedesktop.Telepathy.Account.Interface.Compat' \
- in properties.get('Interfaces'), properties.get('Interfaces')
- assert 'com.nokia.Account.Interface.Conditions' \
- in properties.get('Interfaces'), properties.get('Interfaces')
+
assert properties.get('DisplayName') == 'fakeaccount', \
properties.get('DisplayName')
assert properties.get('Icon') == '', properties.get('Icon')
@@ -91,27 +89,71 @@ def test(q, bus, mc):
assert properties.get('NormalizedName') == '', \
properties.get('NormalizedName')
+ interfaces = properties.get('Interfaces')
+ assert cs.ACCOUNT_IFACE_AVATAR in interfaces, interfaces
+ assert cs.ACCOUNT_IFACE_NOKIA_COMPAT in interfaces, interfaces
+ assert cs.ACCOUNT_IFACE_NOKIA_CONDITIONS in interfaces, interfaces
+
+ # sanity check
+ for k in properties:
+ assert account_props.Get(cs.ACCOUNT, k) == properties[k], k
+
+ # Alter some miscellaneous r/w properties
+
+ call_async(q, account_props, 'Set', cs.ACCOUNT, 'DisplayName',
+ 'Work account')
+ q.expect_many(
+ EventPattern('dbus-signal',
+ path=account_path,
+ signal='AccountPropertyChanged',
+ interface=cs.ACCOUNT,
+ args=[{'DisplayName': 'Work account'}]),
+ EventPattern('dbus-return', method='Set'),
+ )
+ assert account_props.Get(cs.ACCOUNT, 'DisplayName') == 'Work account'
+
+ call_async(q, account_props, 'Set', cs.ACCOUNT, 'Icon', 'im-jabber')
+ q.expect_many(
+ EventPattern('dbus-signal',
+ path=account_path,
+ signal='AccountPropertyChanged',
+ interface=cs.ACCOUNT,
+ args=[{'Icon': 'im-jabber'}]),
+ EventPattern('dbus-return', method='Set'),
+ )
+ assert account_props.Get(cs.ACCOUNT, 'Icon') == 'im-jabber'
+
+ call_async(q, account_props, 'Set', cs.ACCOUNT, 'Nickname', 'Joe Bloggs')
+ q.expect_many(
+ EventPattern('dbus-signal',
+ path=account_path,
+ signal='AccountPropertyChanged',
+ interface=cs.ACCOUNT,
+ args=[{'Nickname': 'Joe Bloggs'}]),
+ EventPattern('dbus-return', method='Set'),
+ )
+ assert account_props.Get(cs.ACCOUNT, 'Nickname') == 'Joe Bloggs'
+
# Delete the account
assert account_iface.Remove() is None
account_event, account_manager_event = q.expect_many(
EventPattern('dbus-signal',
path=account_path,
signal='Removed',
- interface='org.freedesktop.Telepathy.Account',
+ interface=cs.ACCOUNT,
args=[]
),
EventPattern('dbus-signal',
- path=tp_path_prefix + '/AccountManager',
+ path=cs.AM_PATH,
signal='AccountRemoved',
- interface='org.freedesktop.Telepathy.AccountManager',
+ interface=cs.AM,
args=[account_path]
),
)
# Check the account is correctly deleted
- properties = account_manager.GetAll(
- 'org.freedesktop.Telepathy.AccountManager',
- dbus_interface='org.freedesktop.DBus.Properties')
+ properties = account_manager.GetAll(cs.AM,
+ dbus_interface=cs.PROPERTIES_IFACE)
assert properties is not None
assert properties.get('ValidAccounts') == [], properties
assert properties.get('InvalidAccounts') == [], properties
diff --git a/test/twisted/test-connect.py b/test/twisted/test-connect.py
index dbb60739..f43cb21f 100644
--- a/test/twisted/test-connect.py
+++ b/test/twisted/test-connect.py
@@ -4,14 +4,13 @@ from servicetest import EventPattern, tp_name_prefix, tp_path_prefix
from fakecm import start_fake_connection_manager
from fakeclient import start_fake_client
from mctest import exec_test
+import constants as cs
-FakeCM_bus_name = "org.freedesktop.Telepathy.ConnectionManager.fakecm"
-ConnectionManager_object_path = \
- "/org/freedesktop/Telepathy/ConnectionManager/fakecm"
+FakeCM_bus_name = tp_name_prefix + ".ConnectionManager.fakecm"
+ConnectionManager_object_path = tp_path_prefix + "/ConnectionManager/fakecm"
-FakeClient_bus_name = "org.freedesktop.Telepathy.Client.fakeclient"
-Client_object_path = \
- "/org/freedesktop/Telepathy/Client/fakeclient"
+FakeClient_bus_name = tp_name_prefix + ".Client.fakeclient"
+Client_object_path = tp_path_prefix + "/Client/fakeclient"
def test(q, bus, mc):
@@ -19,10 +18,9 @@ def test(q, bus, mc):
ConnectionManager_object_path)
http_fixed_properties = dbus.Dictionary({
- 'org.freedesktop.Telepathy.Channel.TargetHandleType': 1L,
- 'org.freedesktop.Telepathy.Channel.ChannelType':
- 'org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT',
- 'org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT.Service':
+ cs.CHANNEL + '.TargetHandleType': 1L,
+ cs.CHANNEL + '.ChannelType': cs.CHANNEL_TYPE_STREAM_TUBE,
+ cs.CHANNEL_TYPE_STREAM_TUBE + '.Service':
'http'
}, signature='sv')
caps = dbus.Array([http_fixed_properties], signature='a{sv}')
@@ -31,14 +29,12 @@ def test(q, bus, mc):
Client_object_path, caps)
# Get the AccountManager interface
- account_manager = bus.get_object(
- tp_name_prefix + '.AccountManager',
- tp_path_prefix + '/AccountManager')
- account_manager_iface = dbus.Interface(account_manager,
- 'org.freedesktop.Telepathy.AccountManager')
+ account_manager = bus.get_object(cs.AM, cs.AM_PATH)
+ account_manager_iface = dbus.Interface(account_manager, cs.AM)
# Create an account
- params = dbus.Dictionary({"nickname": "fakenick"}, signature='sv')
+ params = dbus.Dictionary({"account": "someguy@example.com",
+ "password": "secrecy"}, signature='sv')
account_path = account_manager_iface.CreateAccount(
'fakecm', # Connection_Manager
'fakeprotocol', # Protocol
@@ -51,23 +47,30 @@ def test(q, bus, mc):
account = bus.get_object(
tp_name_prefix + '.AccountManager',
account_path)
- account_iface = dbus.Interface(account,
- 'org.freedesktop.Telepathy.Account')
+ account_iface = dbus.Interface(account, cs.ACCOUNT)
+
+ # The account is initially valid but disabled
+ assert not account.Get(cs.ACCOUNT, 'Enabled',
+ dbus_interface=cs.PROPERTIES_IFACE)
+ assert account.Get(cs.ACCOUNT, 'Valid',
+ dbus_interface=cs.PROPERTIES_IFACE)
# Enable the account
- account.Set('org.freedesktop.Telepathy.Account',
- 'Enabled', True,
- dbus_interface='org.freedesktop.DBus.Properties')
+ account.Set(cs.ACCOUNT, 'Enabled', True,
+ dbus_interface=cs.PROPERTIES_IFACE)
q.expect('dbus-signal',
path=account_path,
signal='AccountPropertyChanged',
- interface='org.freedesktop.Telepathy.Account',
- args=[dbus.Dictionary({"Enabled": True}, signature='sv')])
+ interface=cs.ACCOUNT)
+
+ assert account.Get(cs.ACCOUNT, 'Enabled',
+ dbus_interface=cs.PROPERTIES_IFACE)
+ assert account.Get(cs.ACCOUNT, 'Valid',
+ dbus_interface=cs.PROPERTIES_IFACE)
# Check the requested presence is offline
- properties = account.GetAll(
- 'org.freedesktop.Telepathy.Account',
- dbus_interface='org.freedesktop.DBus.Properties')
+ properties = account.GetAll(cs.ACCOUNT,
+ dbus_interface=cs.PROPERTIES_IFACE)
assert properties is not None
# the requested presence is defined by Connection_Presence_Type:
# Connection_Presence_Type_Unset = 0
@@ -80,9 +83,9 @@ def test(q, bus, mc):
# Go online
requested_presence = dbus.Struct((dbus.UInt32(2L), dbus.String(u'brb'),
dbus.String(u'Be back soon!')))
- account.Set('org.freedesktop.Telepathy.Account',
+ account.Set(cs.ACCOUNT,
'RequestedPresence', requested_presence,
- dbus_interface='org.freedesktop.DBus.Properties')
+ dbus_interface=cs.PROPERTIES_IFACE)
e = q.expect('dbus-method-call', name='RequestConnection',
protocol='fakeprotocol')
@@ -98,17 +101,16 @@ def test(q, bus, mc):
assert e.caps == caps, e.caps
# Check the requested presence is online
- properties = account.GetAll(
- 'org.freedesktop.Telepathy.Account',
- dbus_interface='org.freedesktop.DBus.Properties')
+ properties = account.GetAll(cs.ACCOUNT,
+ dbus_interface=cs.PROPERTIES_IFACE)
assert properties is not None
assert properties.get('RequestedPresence') == requested_presence, \
properties.get('RequestedPresence')
new_channel = http_fixed_properties
handle = fake_conn.get_handle("buddy")
- new_channel['org.freedesktop.Telepathy.Channel.TargetID'] = "buddy"
- new_channel['org.freedesktop.Telepathy.Channel.TargetHandle'] = handle
+ new_channel[cs.CHANNEL + '.TargetID'] = "buddy"
+ new_channel[cs.CHANNEL + '.TargetHandle'] = handle
fake_conn.new_incoming_channel('/foobar', new_channel)
diff --git a/test/twisted/tools/Makefile.am b/test/twisted/tools/Makefile.am
index 633fee96..b5ade2ce 100644
--- a/test/twisted/tools/Makefile.am
+++ b/test/twisted/tools/Makefile.am
@@ -1,5 +1,7 @@
-exec-with-log.sh: exec-with-log.sh.in
- sed -e "s|[@]abs_top_builddir[@]|@abs_top_builddir@|g" $< > $@
+exec-with-log.sh: exec-with-log.sh.in Makefile
+ sed -e "s|[@]abs_top_srcdir[@]|@abs_top_srcdir@|g" \
+ -e "s|[@]abs_top_builddir[@]|@abs_top_builddir@|g" \
+ $< > $@
chmod +x $@
%.conf: %.conf.in
diff --git a/test/twisted/tools/exec-with-log.sh.in b/test/twisted/tools/exec-with-log.sh.in
index 0a44622e..afd808f6 100644
--- a/test/twisted/tools/exec-with-log.sh.in
+++ b/test/twisted/tools/exec-with-log.sh.in
@@ -4,10 +4,18 @@ cd "@abs_top_builddir@/test/twisted/tools"
# Run Mission Control in a private environment
export MC_DEBUG=2
+export MC_TP_DEBUG=all
export MC_CHANDLERS_DIR="@abs_top_builddir@/test/twisted/chandlers"
-export MC_CLIENTS_DIR="@abs_top_builddir@/test/twisted/clients"
-export MC_MANAGER_DIR="@abs_top_builddir@/test/twisted/managers"
export MC_ACCOUNT_DIR="@abs_top_builddir@/test/twisted/accounts"
+
+export XDG_DATA_HOME="@abs_top_builddir@/test/twisted"
+export XDG_DATA_DIRS="@abs_top_srcdir@/test/twisted"
+# FIXME: these two are probably superseded by XDG_DATA_*?
+export MC_CLIENTS_DIR="@abs_top_builddir@/test/twisted/telepathy/clients"
+export MC_MANAGER_DIR="@abs_top_builddir@/test/twisted/telepathy/managers"
+
+export G_DEBUG=fatal_criticals
+
#export MC_PROFILE_DIR=
ulimit -c unlimited
@@ -17,6 +25,10 @@ if test -n "$MISSIONCONTROL_TEST_VALGRIND"; then
export G_DEBUG=gc-friendly
export G_SLICE=always-malloc
MISSIONCONTROL_WRAPPER="valgrind --leak-check=full --num-callers=20"
+ MISSIONCONTROL_WRAPPER="$MISSIONCONTROL_WRAPPER --track-origins=yes"
+ MISSIONCONTROL_WRAPPER="$MISSIONCONTROL_WRAPPER -v"
+ MISSIONCONTROL_WRAPPER="$MISSIONCONTROL_WRAPPER --suppressions=@abs_top_srcdir@/test/twisted/tools/valgrind.supp"
+ MISSIONCONTROL_WRAPPER="$MISSIONCONTROL_WRAPPER --gen-suppressions=all"
elif test -n "$MISSIONCONTROL_TEST_REFDBG"; then
if test -z "$REFDBG_OPTIONS" ; then
export REFDBG_OPTIONS="btnum=10"
@@ -37,4 +49,6 @@ if [ -e "@abs_top_builddir@/test/twisted/accounts/accounts.cfg" ] ; then
exit 1
fi
-exec $MISSIONCONTROL_WRAPPER @abs_top_builddir@/server/mission-control
+exec @abs_top_builddir@/libtool --mode=execute \
+ $MISSIONCONTROL_WRAPPER \
+ @abs_top_builddir@/test/twisted/mc-debug-server
diff --git a/test/twisted/tools/valgrind.supp b/test/twisted/tools/valgrind.supp
new file mode 100644
index 00000000..5f757601
--- /dev/null
+++ b/test/twisted/tools/valgrind.supp
@@ -0,0 +1,871 @@
+# Valgrind error suppression file
+{
+ dbus-glib, https://bugs.freedesktop.org/show_bug.cgi?id=14125
+ Memcheck:Addr4
+ fun:g_hash_table_foreach
+ obj:/usr/lib/libdbus-glib-1.so.2.1.0
+ fun:g_object_run_dispose
+}
+
+{
+ libdbus shared connection via tp_get_bus (1)
+ Memcheck:Leak
+ fun:malloc
+ fun:dbus_malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (1)
+ Memcheck:Leak
+ fun:malloc
+ fun:dbus_malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (2)
+ Memcheck:Leak
+ fun:calloc
+ fun:dbus_malloc0
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (2)
+ Memcheck:Leak
+ fun:calloc
+ fun:dbus_malloc0
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (3)
+ Memcheck:Leak
+ fun:realloc
+ fun:dbus_realloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (3)
+ Memcheck:Leak
+ fun:realloc
+ fun:dbus_realloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (4)
+ Memcheck:Leak
+ fun:malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (4)
+ Memcheck:Leak
+ fun:malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (5)
+ Memcheck:Leak
+ fun:malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (5)
+ Memcheck:Leak
+ fun:malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (6)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (6)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (7)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (7)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (8)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (8)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (9)
+ Memcheck:Leak
+ fun:malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (9)
+ Memcheck:Leak
+ fun:malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (10)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (10)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (11)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (11)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (12)
+ Memcheck:Leak
+ fun:realloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (12)
+ Memcheck:Leak
+ fun:realloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (13. sigh.)
+ Memcheck:Leak
+ fun:malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (13. sigh.)
+ Memcheck:Leak
+ fun:malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (14)
+ Memcheck:Leak
+ fun:malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (14)
+ Memcheck:Leak
+ fun:malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (15)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (15)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ g_type_init cruft (1)
+ Memcheck:Leak
+ fun:malloc
+ fun:g_malloc
+ obj:/usr/lib/libgobject-2.0.so.*
+ obj:/usr/lib/libgobject-2.0.so.*
+ fun:g_type_init_with_debug_flags
+ fun:g_type_init
+ fun:main
+}
+
+{
+ g_type_init cruft (1), 2.16 version
+ Memcheck:Leak
+ fun:calloc
+ fun:g_malloc0
+ obj:/usr/lib/libgobject-2.0.so.*
+ obj:/usr/lib/libgobject-2.0.so.*
+ fun:g_type_init_with_debug_flags
+ fun:g_type_init
+ fun:main
+}
+
+{
+ g_type_init cruft (3)
+ Memcheck:Leak
+ fun:realloc
+ fun:g_realloc
+ obj:/usr/lib/libgobject-2.0.so.*
+ obj:/usr/lib/libgobject-2.0.so.*
+ fun:g_type_register_static
+ fun:g_param_type_register_static
+ obj:/usr/lib/libgobject-2.0.so.*
+ fun:g_type_init_with_debug_flags
+ fun:g_type_init
+}
+
+{
+ g_type_init cruft (4)
+ Memcheck:Leak
+ fun:realloc
+ fun:g_realloc
+ fun:g_boxed_type_register_static
+ fun:g_value_array_get_type
+ fun:g_param_spec_types_init
+ fun:g_type_init_with_debug_flags
+ fun:g_type_init
+}
+
+{
+ g_type_init cruft (5)
+ Memcheck:Leak
+ fun:calloc
+ fun:g_malloc0
+ obj:/usr/lib/libgobject-2.0.so.*
+ obj:/usr/lib/libgobject-2.0.so.*
+ fun:g_type_init_with_debug_flags
+}
+
+{
+ g_type_init cruft (6)
+ Memcheck:Leak
+ fun:realloc
+ fun:g_realloc
+ obj:/usr/lib/libgobject-2.0.so.*
+ fun:g_type_register_static
+ fun:g_param_type_register_static
+ obj:/usr/lib/libgobject-2.0.so.*
+ fun:g_type_init_with_debug_flags
+}
+
+{
+ g_slice_init_nomessage (1)
+ Memcheck:Leak
+ fun:calloc
+ fun:g_malloc0
+ obj:/usr/lib/libglib-2.0.so.*
+ fun:g_slice_alloc
+}
+
+{
+ creating param specs in tp_proxy_class_intern_init
+ Memcheck:Leak
+ fun:memalign
+ fun:posix_memalign
+ fun:slab_allocator_alloc_chunk
+ fun:g_slice_alloc
+ fun:g_slice_alloc0
+ fun:g_type_create_instance
+ fun:g_param_spec_internal
+ fun:g_param_spec_string
+}
+
+{
+ shared global default g_main_context (1)
+ Memcheck:Leak
+ fun:calloc
+ fun:g_malloc0
+ fun:g_main_context_new
+ fun:g_main_context_default
+}
+
+{
+ shared global default g_main_context (2)
+ Memcheck:Leak
+ fun:memalign
+ fun:posix_memalign
+ fun:slab_allocator_alloc_chunk
+ fun:g_slice_alloc
+ fun:g_ptr_array_sized_new
+ fun:g_ptr_array_new
+ fun:g_main_context_new
+ fun:g_main_context_default
+}
+
+{
+ shared global default g_main_context (2) (with G_SLICE_DEBUG=always-malloc)
+ Memcheck:Leak
+ fun:malloc
+ fun:g_malloc
+ fun:g_slice_alloc
+ fun:g_ptr_array_sized_new
+ fun:g_ptr_array_new
+ fun:g_main_context_new
+ fun:g_main_context_default
+}
+
+{
+ GQuarks can't be freed
+ Memcheck:Leak
+ fun:malloc
+ fun:realloc
+ fun:g_realloc
+ fun:g_quark_from_static_string
+}
+
+{
+ GQuark admin
+ Memcheck:Leak
+ fun:memalign
+ fun:posix_memalign
+ fun:slab_allocator_alloc_chunk
+ fun:g_slice_alloc
+ fun:g_hash_table_new_full
+ fun:g_hash_table_new
+ fun:g_quark_from_static_string
+}
+
+{
+ GQuark admin (with G_SLICE_DEBUG=always-malloc)
+ Memcheck:Leak
+ fun:malloc
+ fun:g_malloc
+ fun:g_slice_alloc
+ fun:g_hash_table_new_full
+ fun:g_hash_table_new
+ fun:g_quark_from_static_string
+}
+
+{
+ GQuark admin (with G_SLICE_DEBUG=always-malloc and a slightly different glib than above)
+ Memcheck:Leak
+ fun:malloc
+ fun:g_malloc
+ fun:g_slice_alloc
+ fun:g_hash_table_new_full
+ fun:g_quark_from_static_string
+}
+
+{
+ dlopen initialization, triggered by handle-leak-debug code on glibc 2.7
+ Memcheck:Leak
+ fun:malloc
+ fun:local_strdup
+ fun:_dl_map_object
+ fun:dl_open_worker
+ fun:_dl_catch_error
+ fun:_dl_open
+ fun:do_dlopen
+ fun:_dl_catch_error
+ fun:dlerror_run
+ fun:__libc_dlopen_mode
+ fun:init
+ fun:backtrace
+ fun:handle_leak_debug_bt
+ fun:dynamic_ensure_handle
+ fun:tp_handle_ensure
+}
+
+{
+ dlopen initialization, triggered by handle-leak-debug code on older glibc
+ Memcheck:Leak
+ fun:malloc
+ fun:_dl_map_object
+ fun:dl_open_worker
+ fun:_dl_catch_error
+ fun:_dl_open
+ fun:do_dlopen
+ fun:_dl_catch_error
+ fun:dlerror_run
+ fun:__libc_dlopen_mode
+ fun:init
+ fun:backtrace
+ fun:handle_leak_debug_bt
+ fun:dynamic_ensure_handle
+ fun:tp_handle_ensure
+}
+
+{
+ dlopen initialization, triggered by handle-leak-debug code (2)
+ Memcheck:Leak
+ fun:malloc
+ fun:_dl_new_object
+ fun:_dl_map_object_from_fd
+ fun:_dl_map_object
+ fun:dl_open_worker
+ fun:_dl_catch_error
+ fun:_dl_open
+ fun:do_dlopen
+ fun:_dl_catch_error
+ fun:dlerror_run
+ fun:__libc_dlopen_mode
+ fun:init
+ fun:backtrace
+ fun:handle_leak_debug_bt
+ fun:dynamic_ensure_handle
+ fun:tp_handle_ensure
+}
+
+{
+ dlopen initialization, triggered by handle-leak-debug code (3)
+ Memcheck:Leak
+ fun:malloc
+ fun:_dl_map_object_deps
+ fun:dl_open_worker
+ fun:_dl_catch_error
+ fun:_dl_open
+ fun:do_dlopen
+ fun:_dl_catch_error
+ fun:dlerror_run
+ fun:__libc_dlopen_mode
+ fun:init
+ fun:backtrace
+ fun:handle_leak_debug_bt
+ fun:dynamic_ensure_handle
+ fun:tp_handle_ensure
+}
+
+{
+ dlopen initialization, triggered by handle-leak-debug code (4)
+ Memcheck:Leak
+ fun:calloc
+ fun:_dl_check_map_versions
+ fun:dl_open_worker
+ fun:_dl_catch_error
+ fun:_dl_open
+ fun:do_dlopen
+ fun:_dl_catch_error
+ fun:dlerror_run
+ fun:__libc_dlopen_mode
+ fun:init
+ fun:backtrace
+ fun:handle_leak_debug_bt
+ fun:dynamic_ensure_handle
+ fun:tp_handle_ensure
+ fun:pretend_connected
+ fun:g_timeout_dispatch
+ fun:g_main_context_dispatch
+ fun:g_main_context_iterate
+ fun:g_main_loop_run
+ fun:tp_connection_run_until_ready
+}
+
+{
+ dlopen initialization, triggered by handle-leak-debug code (5)
+ Memcheck:Leak
+ fun:calloc
+ fun:_dl_new_object
+ fun:_dl_map_object_from_fd
+ fun:_dl_map_object
+ fun:dl_open_worker
+ fun:_dl_catch_error
+ fun:_dl_open
+ fun:do_dlopen
+ fun:_dl_catch_error
+ fun:dlerror_run
+ fun:__libc_dlopen_mode
+ fun:init
+ fun:backtrace
+ fun:handle_leak_debug_bt
+ fun:dynamic_ensure_handle
+ fun:tp_handle_ensure
+}
+
+{
+ dlopen initialization, triggered by handle-leak-debug code (6)
+ Memcheck:Leak
+ fun:calloc
+ fun:_dl_check_map_versions
+ fun:dl_open_worker
+ fun:_dl_catch_error
+ fun:_dl_open
+ fun:do_dlopen
+ fun:_dl_catch_error
+ fun:dlerror_run
+ fun:__libc_dlopen_mode
+ fun:init
+ fun:backtrace
+ fun:handle_leak_debug_bt
+ fun:dynamic_ensure_handle
+ fun:tp_handle_ensure
+}
+
+{
+ ld.so initialization + selinux
+ Memcheck:Leak
+ fun:malloc
+ obj:/lib/libselinux.so.*
+ obj:/lib/libselinux.so.*
+ obj:/lib/libselinux.so.*
+ fun:call_init
+ fun:_dl_init
+ obj:/lib/ld-*.so
+}
+
+{
+ ld.so initialization + selinux
+ Memcheck:Leak
+ fun:malloc
+ fun:vasprintf
+ fun:asprintf
+ obj:/lib/libselinux.so.*
+ obj:/lib/libselinux.so.*
+ obj:/lib/libselinux.so.*
+ fun:call_init
+ fun:_dl_init
+ obj:/lib/ld-*.so
+}
+
+{
+ ld.so initialization + selinux
+ Memcheck:Leak
+ fun:realloc
+ fun:vasprintf
+ fun:asprintf
+ obj:/lib/libselinux.so.*
+ obj:/lib/libselinux.so.*
+ obj:/lib/libselinux.so.*
+ fun:call_init
+ fun:_dl_init
+ obj:/lib/ld-*.so
+}
+
+{
+ ld.so initialization on glibc 2.9
+ Memcheck:Cond
+ fun:_dl_relocate_object
+ fun:dl_main
+ fun:_dl_sysdep_start
+ fun:_dl_start
+ obj:/lib/ld-2.9.so
+}
+
+{
+ ld.so initialization on glibc 2.9
+ Memcheck:Cond
+ fun:strlen
+ fun:_dl_init_paths
+ fun:dl_main
+ fun:_dl_sysdep_start
+ fun:_dl_start
+ obj:/lib/ld-2.9.so
+}
+
+{
+ GTest initialization
+ Memcheck:Leak
+ fun:malloc
+ fun:g_malloc
+ fun:g_strdup
+ fun:g_set_prgname
+ fun:g_test_init
+ fun:main
+}
+
+{
+ GTest initialization
+ Memcheck:Leak
+ fun:calloc
+ fun:g_malloc0
+ fun:g_rand_new_with_seed_array
+ fun:g_rand_new
+ fun:g_random_int
+ fun:g_test_init
+ fun:main
+}
+
+{
+ GTest logging
+ Memcheck:Leak
+ fun:malloc
+ fun:realloc
+ fun:g_realloc
+ fun:g_array_maybe_expand
+ fun:g_array_set_size
+ fun:g_static_private_set
+ fun:g_get_charset
+ fun:g_print
+ fun:g_test_log
+ fun:g_test_run_suite_internal
+ fun:g_test_run_suite_internal
+ fun:g_test_run_suite
+ fun:g_test_run
+ fun:main
+}
diff --git a/tools/Makefile.am b/tools/Makefile.am
index a5bf95df..d7aa53e8 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -12,6 +12,7 @@ EXTRA_DIST = \
glib-signals-marshal-gen.py \
gquark-gen.py \
identity.xsl \
+ lcov.am \
libtpcodegen.py \
libglibcodegen.py \
spec-to-introspect.xsl
diff --git a/tools/lcov.am b/tools/lcov.am
new file mode 100644
index 00000000..1455f834
--- /dev/null
+++ b/tools/lcov.am
@@ -0,0 +1,25 @@
+lcov-reset:
+ lcov --directory @top_srcdir@ --zerocounters
+
+lcov-report:
+ lcov --directory @top_srcdir@ --capture \
+ --output-file @top_builddir@/lcov.info.tmp
+ lcov --directory @top_srcdir@ --output-file @top_builddir@/lcov.info \
+ --remove @top_builddir@/lcov.info.tmp \
+ 'doc/reference/*/*-scan.c'
+ rm @top_builddir@/lcov.info.tmp
+ $(mkdir_p) @top_builddir@/lcov.html
+ git_commit=`GIT_DIR=@top_srcdir@/.git git log -1 --pretty=format:%h 2>/dev/null`;\
+ genhtml --title "@PACKAGE_STRING@ $$git_commit" \
+ --output-directory @top_builddir@/lcov.html lcov.info
+ @echo
+ @echo 'lcov report can be found in:'
+ @echo 'file://@abs_top_builddir@/lcov.html/index.html'
+ @echo
+
+lcov-check:
+ $(MAKE) lcov-reset
+ $(MAKE) check
+ $(MAKE) lcov-report
+
+## vim:set ft=automake:
diff --git a/xml/Account.xml b/xml/Account.xml
index e5b755f9..9dc34ad1 100644
--- a/xml/Account.xml
+++ b/xml/Account.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" ?>
<node name="/Account"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright>Copyright (C) 2008 Collabora Ltd.</tp:copyright>
- <tp:copyright>Copyright (C) 2008 Nokia Corporation</tp:copyright>
+ <tp:copyright>Copyright © 2008-2009 Collabora Ltd.</tp:copyright>
+ <tp:copyright>Copyright © 2008-2009 Nokia Corporation</tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
<p>This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -33,8 +33,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
that appears in the connection manager's well-known bus name and
object path</li>
<li><em>proto</em> is the <tp:type>Protocol</tp:type> name as seen in
- ConnectionManager.ListProtocols, but with "-" replaced with "_"
- (i.e. the same as in the object-path of a Connection)</li>
+ <tp:dbus-ref
+ namespace="org.freedesktop.Telepathy">ConnectionManager.ListProtocols</tp:dbus-ref>,
+ but with "-" replaced with "_"
+ (i.e. the same as in the object-path of a <tp:dbus-ref
+ namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>)</li>
<li><em>acct</em> is an arbitrary string of ASCII letters, digits
and underscores, starting with a letter or underscore, which
uniquely identifies this account</li>
@@ -123,9 +126,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
This account has been removed.
<tp:rationale>
- This is redundant with AccountRemoved, but it's still worth having,
+ This is redundant with <tp:dbus-ref
+ namespace="org.freedesktop.Telepathy.AccountManager">AccountRemoved</tp:dbus-ref>,
+ but it's still worth having,
to avoid having to bind to AccountManager.AccountRemoved to tell
- you whether your Account is valid - ideally, an account-editing UI
+ you whether your Account is valid — ideally, an account-editing UI
should only care about a single Account.
</tp:rationale>
</tp:docstring>
@@ -142,7 +147,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<arg name="Properties" type="a{sv}">
<tp:docstring>
- A map from property names in this namespace (e.g. Nickname) to
+ A map from property names in this namespace (e.g.
+ <tp:member-ref>Nickname</tp:member-ref>) to
values. Properties whose values have not changed SHOULD be
omitted, but this need not be done.
</tp:docstring>
@@ -223,14 +229,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
to be be bother by error messages, or change the account
configuration: temporarily disabling the account is quicker.</li>
</ul>
+ </tp:rationale>
- <p>The AccountManager SHOULD allow this property to be set on invalid
- accounts, but MUST NOT attempt to put invalid accounts online
- even if they become Enabled.</p>
+ <p>The AccountManager SHOULD allow this property to be set on invalid
+ accounts, but MUST NOT attempt to put invalid accounts online
+ even if they become Enabled.</p>
- <tp:rationale>
- <p>There doesn't seem to be any good reason not to allow this.</p>
- </tp:rationale>
+ <tp:rationale>
+ <p>There doesn't seem to be any good reason not to allow this.</p>
</tp:rationale>
</tp:docstring>
</property>
@@ -240,7 +246,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:docstring>
The nickname to set on this account for display to other contacts,
as set by the user. When the account becomes connected, the
- account manager SHOULD set this as the user's alias using SetAliases
+ account manager SHOULD set this as the user's alias using <tp:dbus-ref
+ namespace="org.freedesktop.Telepathy.Connection.Interface.Aliasing">SetAliases</tp:dbus-ref>
if appropriate.
<tp:rationale>
@@ -258,12 +265,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
type="a{sv}" access="read">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A map from connection manager parameter names (as in the
- ConnectionManager interface) to their values. This property includes
+ <tp:dbus-ref
+ namespace="org.freedesktop.Telepathy">ConnectionManager</tp:dbus-ref>
+ interface) to their values. This property includes
only those parameters that are stored for this account, and SHOULD
only include those parameters that the user has explicitly set.
</p>
<p>This property cannot be altered using Set() - use
- UpdateParameters instead.</p>
+ <tp:member-ref>UpdateParameters</tp:member-ref> instead.</p>
<tp:rationale>
This avoids NMC being tied to gconf as a matter of API.
@@ -272,10 +281,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</property>
<method name="UpdateParameters" tp:name-for-bindings="Update_Parameters">
- <tp:docstring>
- Change the value of the Parameters property. Any changes will not
- take effect until the next time the account is disconnected and
- reconnected.
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ Change the value of the <tp:member-ref>Parameters</tp:member-ref>
+ property. If any of the changed parameters'
+ <tp:type>Conn_Mgr_Param_Flags</tp:type> include
+ <code>DBus_Property</code>, the change will be applied to the
+ corresponding D-Bus Property on the active
+ <tp:member-ref>Connection</tp:member-ref> if there is one; changes to
+ other parameters will not take effect until the next time the account
+ is disconnected and reconnected.
<tp:rationale>
Migration tools that twiddle the settings of all accounts shouldn't
@@ -284,6 +298,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:rationale>
</tp:docstring>
+ <tp:changed version="0.17.16">
+ parameters which are also D-Bus properties can and should be updated on
+ existing Connections
+ </tp:changed>
+
<arg name="Set" type="a{sv}" direction="in">
<tp:docstring>
A mapping from parameter names to their values. These parameters
@@ -330,11 +349,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
tp:name-for-bindings="Connect_Automatically">
<tp:docstring>
If true, the account manager SHOULD attempt to put this account
- online with the AutomaticPresence whenever possible (in the base
+ online with the <tp:member-ref>AutomaticPresence</tp:member-ref>
+ whenever possible (in the base
Account interface this is deliberately left vague). If false,
it MUST NOT put the account online automatically in response to,
for instance, connectivity changes, but SHOULD still put the account
- online with the AutomaticPresence if requested by the user (for
+ online with the <tp:member-ref>AutomaticPresence</tp:member-ref> if
+ requested by the user (for
instance, if the user tries to start a conversation using this
account).
@@ -347,9 +368,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="Connection" tp:name-for-bindings="Connection"
type="o" access="read">
- <tp:docstring>
- Either the object path of the connection to this account,
- or the special value '/' if there is no connection.
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>Either the object path of the <tp:dbus-ref
+ namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref> to
+ this account, or the special value <code>'/'</code> if there is no
+ connection.</p>
+
+ <p>If this object path is not '/', the Connection's well-known bus
+ name can be derived from this object path by removing the first '/'
+ and replacing subsequent '/' characters with '.'.</p>
<tp:rationale>
Object paths aren't nullable, so we can't use an empty string.
@@ -360,7 +387,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="ConnectionStatus" type="u" access="read"
tp:name-for-bindings="Connection_Status">
<tp:docstring>
- If the Connection property is non-empty, the status of that connection.
+ If the <tp:member-ref>Connection</tp:member-ref> property is non-empty,
+ the status of that connection.
If the Connection property is the empty string, this property may
either be Disconnected (indicating that the account manager is not
attempting to bring it online), or Connecting (indicating that the
@@ -380,7 +408,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="ConnectionStatusReason" type="u" access="read"
tp:name-for-bindings="Connection_Status_Reason">
<tp:docstring>
- The reason for the last change to ConnectionStatus.
+ The reason for the last change to
+ <tp:member-ref>ConnectionStatus</tp:member-ref>.
The account manager is expected to set this by observing signals
from the Connection.
@@ -397,7 +426,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:docstring>
The actual presence. If the connection is not online, this should be
(Connection_Presence_Type_Offline, "", "").
- If the connection is online but does not support the Presence
+ If the connection is online but does not support the <tp:dbus-ref
+ namespace="org.freedesktop.Telepathy.Connection.Interface">SimplePresence</tp:dbus-ref>
interface, this should be (Connection_Presence_Type_Unset, "", "").
The account manager is expected to set this by observing signals
from the Connection.
@@ -412,14 +442,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
tp:type="Simple_Presence" tp:name-for-bindings="Requested_Presence">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The requested presence for this account. When this is changed, the
- account manager should attempt to manipulate the connection manager
- to make CurrentPresence match RequestedPresence as closely as
+ account manager should attempt to manipulate the connection manager to
+ make <tp:member-ref>CurrentPresence</tp:member-ref> match
+ <tp:member-ref>RequestedPresence</tp:member-ref> as closely as
possible. It should not be saved to any sort of persistent
storage.</p>
<p>When the account manager automatically connects an account,
it must signal this by setting the RequestedPresence to the same
- thing as the AutomaticPresence.</p>
+ thing as the <tp:member-ref>AutomaticPresence</tp:member-ref>.</p>
<tp:rationale>
This corresponds to e.g. GetPresence and GetPresenceMessage
@@ -432,9 +463,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
tp:name-for-bindings="Normalized_Name">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The normalized user ID of the local user on this account (i.e. the
- string returned when the InspectHandle method is called on the
- result of GetSelfHandle() for an active connection).</p>
-
+ string returned when the <tp:dbus-ref
+ namespace="org.freedesktop.Telepathy.Connection">InspectHandles</tp:dbus-ref>
+ method is called on the
+ result of <tp:dbus-ref
+ namespace="org.freedesktop.Telepathy.Connection">GetSelfHandle</tp:dbus-ref>
+ for an active connection).</p>
+
<p>It is unspecified whether this user ID is globally unique.</p>
<tp:rationale>
diff --git a/xml/Account_Interface_Avatar.xml b/xml/Account_Interface_Avatar.xml
index 3d0c2a9a..6c85b8e6 100644
--- a/xml/Account_Interface_Avatar.xml
+++ b/xml/Account_Interface_Avatar.xml
@@ -20,6 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</p>
</tp:license>
<interface name="org.freedesktop.Telepathy.Account.Interface.Avatar">
+ <tp:requires interface="org.freedesktop.Telepathy.Account"/>
+
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>This interface extends the core Account interface to provide a
user-settable avatar image.</p>
diff --git a/xml/Account_Manager.xml b/xml/Account_Manager.xml
index b92913e2..6fb9b088 100644
--- a/xml/Account_Manager.xml
+++ b/xml/Account_Manager.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" ?>
<node name="/Account_Manager"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright>Copyright (C) 2008 Collabora Ltd.</tp:copyright>
- <tp:copyright>Copyright (C) 2008 Nokia Corporation</tp:copyright>
+ <tp:copyright>Copyright © 2008-2009 Collabora Ltd.</tp:copyright>
+ <tp:copyright>Copyright © 2008-2009 Nokia Corporation</tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
<p>This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -63,7 +63,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
tp:name-for-bindings="Valid_Accounts">
<tp:docstring>
A list of the valid (complete, usable) accounts. Change notification
- is via AccountValidityChanged.
+ is via <tp:member-ref>AccountValidityChanged</tp:member-ref>.
<tp:rationale>
This split between valid and invalid accounts makes it easy to
@@ -78,7 +78,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
tp:name-for-bindings="Invalid_Accounts">
<tp:docstring>
A list of incomplete or otherwise unusable accounts. Change
- notification is via AccountValidityChanged.
+ notification is via
+ <tp:member-ref>AccountValidityChanged</tp:member-ref>.
</tp:docstring>
</property>
@@ -88,7 +89,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:rationale>
This is effectively change notification for the valid and invalid
- accounts lists.
+ accounts lists. On emission of this signal, the Account indicated
+ will no longer be present in either of the lists.
</tp:rationale>
</tp:docstring>
@@ -127,9 +129,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<method name="CreateAccount" tp:name-for-bindings="Create_Account">
<tp:docstring>
- Request the creation of a new account. The account manager SHOULD NOT
- allow invalid accounts to be created. Accounts created through this
- API SHOULD have an empty PresetParameters property.
+ Request the creation of a new <tp:dbus-ref
+ namespace="org.freedesktop.Telepathy">Account</tp:dbus-ref>. The
+ account manager SHOULD NOT allow invalid accounts to be created.
</tp:docstring>
<arg name="Connection_Manager" direction="in" type="s"
@@ -145,19 +147,38 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</arg>
<arg name="Display_Name" direction="in" type="s">
- <tp:docstring>The initial value of the new account's DisplayName
- property. The account manager MAY modify this to make it unique,
- for instance by appending a number or the 'account'
- parameter.</tp:docstring>
+ <tp:docstring>The initial value of the new account's <tp:dbus-ref
+ namespace="org.freedesktop.Telepathy.Account">DisplayName</tp:dbus-ref>
+ property. The account manager SHOULD modify this to make it unique if
+ an Account already exists with the same display name, for instance by
+ appending a number or the 'account' parameter. Account manager
+ implementations SHOULD accept an empty string but account editing user
+ interfaces should avoid passing an empty string for this parameter.
+
+ <tp:rationale>
+ <p>The account creation UI may ask the user for a name for the new
+ account. If the author of the UI chooses not to do this, the
+ account creation UI is better able to suggest a default display
+ name because it has protocol-specific knowledge which the account
+ manager does not.</p>
+
+ <p>The account manager always knows the complete list of accounts so
+ it can easily tell whether it should append something to the
+ display name to avoid presenting two identically-named accounts to
+ the user.</p>
+ </tp:rationale>
+ </tp:docstring>
</arg>
<arg name="Parameters" direction="in" type="a{sv}">
<tp:docstring>Initial parameter values, as would be passed to
- RequestConnection.</tp:docstring>
+ <tp:dbus-ref
+ namespace="org.freedesktop.Telepathy.ConnectionManager">RequestConnection</tp:dbus-ref>.</tp:docstring>
</arg>
<arg name="Account" direction="out" type="o">
- <tp:docstring>The new account.</tp:docstring>
+ <tp:docstring>The new <tp:dbus-ref
+ namespace="org.freedesktop.Telepathy">Account</tp:dbus-ref>.</tp:docstring>
</arg>
<tp:possible-errors>
diff --git a/xml/Makefile.am b/xml/Makefile.am
index 7a1b7997..3a78d00b 100644
--- a/xml/Makefile.am
+++ b/xml/Makefile.am
@@ -14,6 +14,7 @@ SPECS = MissionControl.xml \
Account_Interface_Compat.xml \
Account_Interface_Conditions.xml \
Account_Interface_Stats.xml \
+ Channel_Dispatch_Operation.xml \
Client.xml \
Client_Approver.xml \
Client_Handler.xml \