[Pkg-telepathy-commits] [telepathy-mission-control-6] 144/280: Merge remote-tracking branch 'origin/master' into next

Simon McVittie smcv at debian.org
Thu Mar 27 20:07:16 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository telepathy-mission-control-6.

commit 879a1b06aa945dfb7a4d3df2dd5ce80b7f946f69
Merge: 590079e 37365d6
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Mon Jan 13 13:29:14 2014 +0000

    Merge remote-tracking branch 'origin/master' into next
    
    Conflicts:
    	src/connectivity-monitor.c
    	src/mcd-connection.c
    	tests/twisted/account-storage/libaccounts-sso-storage.py

 NEWS                                               |    5 +
 configure.ac                                       |   66 -
 plugins/mcp-dbus-aegis-acl.h                       |   34 -
 src/Makefile.am                                    |   23 -
 src/connectivity-monitor.c                         |   18 +-
 src/mcd-account-manager-sso.c                      | 1749 --------------------
 src/mcd-account-manager-sso.h                      |  101 --
 src/mcd-account-manager.c                          |   12 +-
 src/mcd-account-priv.h                             |    2 -
 src/mcd-account.c                                  |  150 +-
 src/mcd-account.h                                  |    5 +-
 src/mcd-client-priv.h                              |    2 -
 src/mcd-client.c                                   |   17 -
 src/mcd-connection.c                               |    8 +-
 src/mcd-dispatch-operation.c                       |   41 +-
 src/mcd-dispatcher.c                               |   10 -
 src/mcd-storage.c                                  |   13 -
 src/plugin-loader.c                                |   16 -
 tests/Makefile.am                                  |    6 -
 tests/account-store-libaccounts.c                  |  630 -------
 tests/account-store-libaccounts.h                  |   44 -
 tests/account-store.c                              |   13 -
 tests/twisted/Makefile.am                          |   10 +-
 .../account-manager/backend-makes-changes.py       |    3 +-
 .../twisted/account-manager/restricted-storage.py  |  185 +++
 tests/twisted/account-manager/update-parameters.py |    6 +-
 .../account-storage/libaccounts-sso-storage.py     |   89 -
 tests/twisted/constants.py                         |    6 +
 tests/twisted/dbus-account-plugin.c                |   32 +-
 tests/twisted/dispatcher/bypass-observers.py       |  291 ----
 tests/twisted/fakeaccountsservice.py               |  105 +-
 tests/twisted/mctest.py                            |    9 +-
 tests/twisted/run-test.sh.in                       |    9 -
 33 files changed, 397 insertions(+), 3313 deletions(-)

diff --cc NEWS
index 2dd22f4,2dd22f4..e2eb77b
--- a/NEWS
+++ b/NEWS
@@@ -1,3 -1,3 +1,8 @@@
++telepathy-mission-control 5.99.6 (2014-01-13)
++=============================================
++
++• Telepathy 1.0 branch
++
  telepathy-mission-control 5.17.0 (UNRELEASED)
  =============================================
  
diff --cc src/connectivity-monitor.c
index 9510cf1,286d73e..59434a6
--- a/src/connectivity-monitor.c
+++ b/src/connectivity-monitor.c
@@@ -476,10 -476,10 +476,10 @@@ mcd_connectivity_monitor_init (McdConne
        connectivity_monitor);
  
  #ifdef ENABLE_CONN_SETTING
 -  priv->settings = g_settings_new ("im.telepathy.MissionControl.FromEmpathy");
 +  priv->settings = g_settings_new ("im.telepathy.v1.MissionControl.FromEmpathy");
-   g_settings_bind (priv->settings, "use-conn",
-       connectivity_monitor, "use-conn",
-       G_SETTINGS_BIND_GET);
+   /* We'll call g_settings_bind() in constructed because default values of
+    * properties haven't been set yet at this point and we don't want them to
+    * override the value from GSettings. */
  #endif
  
  #ifdef HAVE_NM
diff --cc src/mcd-account.c
index 43fc862,7b51afb..b9d87dd
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@@ -3657,16 -3683,9 +3683,9 @@@ mcd_account_class_init (McdAccountClas
                                NULL,
                                G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
  
-     g_object_class_install_property
-         (object_class, PROP_ALWAYS_ON,
-          g_param_spec_boolean ("always-on", "Always on?", "Always on?",
-                               FALSE,
-                               G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
-                               G_PARAM_STATIC_STRINGS));
- 
      /* Signals */
 -    _mcd_account_signals[VALIDITY_CHANGED] =
 -	g_signal_new ("validity-changed",
 +    _mcd_account_signals[USABILITY_CHANGED] =
 +        g_signal_new ("usability-changed",
  		      G_OBJECT_CLASS_TYPE (klass),
  		      G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
  		      0,
diff --cc src/mcd-connection.c
index e5a6dd6,de2a6f5..0d941f4
--- a/src/mcd-connection.c
+++ b/src/mcd-connection.c
@@@ -1537,11 -1571,11 +1537,11 @@@ on_inactivity_changed (McdSlacker *slac
      McdConnection *self)
  {
    McdConnectionPrivate *priv = self->priv;
-   DEBUG ("%sactive, %s have power saving iface.", inactive ? "in" : "",
-       priv->has_power_saving_if ? "has" : "doesn't");
+   DEBUG ("%sactive, connection %s have power saving iface.", inactive ? "in" : "",
+       priv->has_power_saving_if ? "does" : "doesn't");
  
-   if (priv->has_power_saving_if)
+   if (priv->tp_conn != NULL && priv->has_power_saving_if)
 -    tp_cli_connection_interface_power_saving_call_set_power_saving (priv->tp_conn, -1,
 +    tp_cli_connection_interface_power_saving1_call_set_power_saving (priv->tp_conn, -1,
          inactive, NULL, NULL, NULL, NULL);
  }
  
diff --cc tests/twisted/account-manager/backend-makes-changes.py
index 0d367f9,a4caeac..b1d69df
--- a/tests/twisted/account-manager/backend-makes-changes.py
+++ b/tests/twisted/account-manager/backend-makes-changes.py
@@@ -47,10 -47,11 +47,11 @@@ def test(q, bus, mc, fake_accounts_serv
                      {'account': 'ezio at firenze.fic',
                          'password': 'nothing is true'},
                      {},
-                     {'account': 0, 'password': cs.PARAM_SECRET}]),
+                     {'account': 0, 'password': cs.PARAM_SECRET},
+                     0]),
              EventPattern('dbus-signal',
                  path=cs.AM_PATH,
 -                signal='AccountValidityChanged',
 +                signal='AccountUsabilityChanged',
                  args=[account_path, True]),
              )
      account = Account(bus, account_path)
diff --cc tests/twisted/account-manager/restricted-storage.py
index 0000000,6724863..d2be50f
mode 000000,100644..100644
--- a/tests/twisted/account-manager/restricted-storage.py
+++ b/tests/twisted/account-manager/restricted-storage.py
@@@ -1,0 -1,185 +1,185 @@@
+ # Copyright (C) 2009 Nokia Corporation
+ # Copyright (C) 2009-2012 Collabora Ltd.
+ #
+ # This library is free software; you can redistribute it and/or
+ # modify it under the terms of the GNU Lesser General Public
+ # License as published by the Free Software Foundation; either
+ # version 2.1 of the License, or (at your option) any later version.
+ #
+ # This library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ # Lesser General Public License for more details.
+ #
+ # You should have received a copy of the GNU Lesser General Public
+ # License along with this library; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ # 02110-1301 USA
+ 
+ import dbus
+ import dbus.service
+ 
+ from servicetest import EventPattern, call_async, assertEquals
+ from mctest import (exec_test, SimulatedConnection,
+     SimulatedConnectionManager, Account)
+ import constants as cs
+ 
+ def test(q, bus, mc, fake_accounts_service=None, **kwargs):
+     simulated_cm = SimulatedConnectionManager(q, bus)
+ 
+     for enabled in (True, False):
+         for online in (True, False):
+             account_tail = ('fakecm/fakeprotocol/ezio_2efirenze_40fic'
+                     + (enabled and '_enabled' or '_disabled')
+                     + (online and '_online' or '_offline'))
+             account_path = cs.ACCOUNT_PATH_PREFIX + account_tail
+ 
+             try_to_connect = [
+                     EventPattern('dbus-method-call', method='RequestConnection',
+                         destination=cs.tp_name_prefix + '.ConnectionManager.fakecm',
+                         path=cs.tp_path_prefix + '/ConnectionManager/fakecm',
+                         interface=cs.tp_name_prefix + '.ConnectionManager',
+                         predicate=lambda e:
+                             e.args[1]['account'] == account_tail,
+                         handled=False)
+                     ]
+ 
+             if enabled and online:
+                 also_expected = try_to_connect[:]
+             else:
+                 also_expected = []
+                 q.forbid_events(try_to_connect)
+ 
+             args = (
+                     {
+                         'Enabled': enabled,
+                         'ConnectAutomatically': online,
+                         'manager': 'fakecm',
+                         'protocol': 'fakeprotocol',
+                         'AutomaticPresence':
+                             dbus.Struct((dbus.UInt32(cs.PRESENCE_HIDDEN),
+                                 'hidden', 'press X to blend'),
+                                 signature='uss'),
+                     },
+                     {
+                         'Enabled': 0,
+                         'ConnectAutomatically': 0,
+                         'manager': 0,
+                         'protocol': 0,
+                         'AutomaticPresence': 0,
+                     },
+                     {
+                         'account': account_tail,
+                         'password': 'nothing is true'
+                     },
+                     {}, # untyped parameters
+                     {
+                         'account': 0,
+                         'password': cs.PARAM_SECRET
+                     },
+                     cs.StorageRestrictionFlags.CANNOT_SET_PRESENCE |
+                     cs.StorageRestrictionFlags.CANNOT_SET_ENABLED,
+                 )
+ 
+             fake_accounts_service.create_account(account_tail, *args)
+ 
+             events = q.expect_many(
+                     EventPattern('dbus-signal',
+                         path=cs.TEST_DBUS_ACCOUNT_SERVICE_PATH,
+                         signal='AccountCreated',
+                         args=[account_tail] + list(args)),
+                     EventPattern('dbus-signal',
+                         path=cs.AM_PATH,
 -                        signal='AccountValidityChanged',
++                        signal='AccountUsabilityChanged',
+                         args=[account_path, True]),
+                     *also_expected)
+             account = Account(bus, account_path)
+ 
+             if enabled and online:
+                 conn = SimulatedConnection(q, bus, 'fakecm', 'fakeprotocol',
+                         account_tail.replace('/', '_'), 'ezio',
+                         has_presence=True)
+                 q.dbus_return(events[-1].message, conn.bus_name,
+                         conn.object_path, signature='so')
+                 q.expect('dbus-method-call', method='SetPresence',
+                     # the fake CM doesn't support 'hidden' by default
+                     args=['busy', 'press X to blend'])
+ 
+                 requested_presence = (dbus.UInt32(cs.PRESENCE_HIDDEN), 'hidden',
+                         'press X to blend')
+             else:
+                 requested_presence = (dbus.UInt32(cs.PRESENCE_OFFLINE),
+                         'offline', '')
+ 
+             call_async(q, account.Properties, 'Get', cs.ACCOUNT,
+                     'RequestedPresence')
+             q.expect('dbus-return', method='Get', value=(requested_presence,))
+ 
+             # changes that are not really changes are fine
+             call_async(q, account.Properties, 'Set', cs.ACCOUNT,
+                     'Enabled', enabled)
+             q.expect('dbus-return', method='Set')
+             call_async(q, account.Properties, 'Set', cs.ACCOUNT,
+                     'ConnectAutomatically', online)
+             q.expect('dbus-return', method='Set')
+ 
+             # changes that actually change the restrictive properties
+             # are not allowed
+             call_async(q, account.Properties, 'Set', cs.ACCOUNT,
+                     'RequestedPresence',
+                     ((dbus.UInt32(cs.PRESENCE_AVAILABLE), 'available',
+                         'highly conspicuous')))
+             q.expect('dbus-error', method='Set')
+             call_async(q, account.Properties, 'Set', cs.ACCOUNT,
+                     'AutomaticPresence',
+                     ((dbus.UInt32(cs.PRESENCE_AVAILABLE), 'available',
+                         'highly conspicuous')))
+             q.expect('dbus-error', method='Set')
+             call_async(q, account.Properties, 'Set', cs.ACCOUNT,
+                     'Enabled', not enabled)
+             q.expect('dbus-error', method='Set')
+             call_async(q, account.Properties, 'Set', cs.ACCOUNT,
+                     'ConnectAutomatically', not online)
+             q.expect('dbus-error', method='Set')
+ 
+             call_async(q, account, 'Remove')
+             q.expect('dbus-error', method='Remove')
+ 
+             # ... but the backend can still change them
+             if enabled and online:
+                 q.forbid_events(try_to_connect)
+                 fake_accounts_service.update_attributes(account_tail,
+                         {
+                             'Enabled': False,
+                             'ConnectAutomatically': False,
+                         })
+                 q.expect('dbus-method-call', method='Disconnect')
+                 q.unforbid_events(try_to_connect)
+             else:
+                 q.unforbid_events(try_to_connect)
+                 fake_accounts_service.update_attributes(account_tail,
+                         {
+                             'Enabled': True,
+                             'ConnectAutomatically': True,
+                         })
+ 
+                 events = q.expect_many(*try_to_connect)
+                 conn = SimulatedConnection(q, bus, 'fakecm', 'fakeprotocol',
+                         account_tail.replace('/', '_'), 'ezio',
+                         has_presence=True)
+                 q.dbus_return(events[-1].message, conn.bus_name,
+                         conn.object_path, signature='so')
+ 
+                 # we are connected: deleting the account should
+                 # disconnect us
+                 fake_accounts_service.delete_account(account_tail)
+                 q.expect_many(
+                         EventPattern('dbus-signal', signal='AccountRemoved',
+                             args=[account_path]),
+                         EventPattern('dbus-signal', signal='Removed',
+                             path=account_path),
+                         EventPattern('dbus-method-call', method='Disconnect'),
+                         )
+ 
+ if __name__ == '__main__':
+     exec_test(test, {}, pass_kwargs=True)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/telepathy-mission-control-6.git



More information about the Pkg-telepathy-commits mailing list