Bug 50093

Summary: [next] consider merging Contacts and Requests ifaces into Connection
Product: Telepathy Reporter: Xavier Claessens <xclaesse>
Component: tp-specAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium Keywords: patch
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard: spec/tp-glib r+, CMs/MC r?
i915 platform: i915 features:
Bug Depends on: 71262    
Bug Blocks: 69430, 71508    
Attachments: [spec next 1/2] Flatten Connection.I.Contacts into Connection
[spec next 2/2] Do not list Requests in the Interfaces property
[tp-glib next 1] TpBaseConnection: absorb the functionality of the TpContactsMixin
[tp-glib next 2] TpBaseConnection: add more ABI padding
[tp-glib next 3] [temporary] update spec: fold Contacts into Connection
[tp-glib next 4] Adjust telepathy-glib code for removal of Contacts interface
[tp-glib next 5] Assume that Conn.I.Requests is supported, and don't put it in Interfaces
[tp-glib next 6/7] Simplify TpPresenceMixin by making the "get contact status" vfunc singular
[tp-glib next 7/7] TpBaseContactList: add mandatory is_blocked vfunc
[gabble next 1/4] Adjust code for replacement of TpContactsMixin
[gabble next 2/4] presence: use new "singular" API for getting contact status
[gabble next 3/5] roster: implement new is_blocked() vfunc
[gabble next 5/5] Don't explicitly include Requests in list of interfaces
[gabble next 6/6] Add a comment indicating why wrap_connection treats Contacts specially
[salut next 1/5] Replace TpContactsMixin with fill_contact_attributes vfunc
[salut next 2/5] constants, servicetest: partially resync with Gabble
[salut next 3/5] tests: abolish Contacts interface
[salut next 4/5] presence mixin: switch to singular API
[salut next 5/5] don't explicitly list Requests in Interfaces
[gabble next] constants: remove obsolete and duplicate lines
[rakia next 1/1] Adapt for merge of Contacts into Connection, and deletion of Requests
[idle next 1/1] Adapt for merge of Contacts into Connection, and deletion of Requests
[haze next 1/5] remove use of TpContactsMixin and Contacts interface
[haze next 2/5] tests: resync constants, servicetest with Gabble
[haze next 3/5] contact list: implement is_blocked
[haze next 4/5] presence: switch to "singular" API
[haze next 5/5] connection: don't explicitly advertise Requests interface
[mc next 1/3] Resync constants, servicetest from Gabble
[mc next 2/3] the Requests interface no longer needs to appear in Interfaces
[mc next 3/3] tests: cope with Contacts being part of Connection now

Description Xavier Claessens 2012-05-18 06:35:40 UTC
I've heard Simon speaking about that: Contacts and Requests are now mandatory for any useful CM. With all the stuff we removed it won't make a huge iface...

Also about those ifaces:

 - GetContactAttributes should be renamed to GetContact(ByHandle) IMO since it's now the only way to get a contact.

 - ContactAttributeInterfaces can die now that CMs must implement all contact attributes. Connection.Interfaces is enough.

 - Request/InspectHandles can die (bug #50085)
Comment 1 Jonny Lamb 2012-06-07 07:05:42 UTC
Okay I could get behind this.

The most annoying thing will clearly be sedding gabble's test suite with s/conn.Requests/conn/g. :-D
Comment 2 Xavier Claessens 2012-08-31 13:33:01 UTC
True. Drop blocking bug #23148, life is too short. For now, we'll just make those 2 ifaces mandatory (bug #54321)
Comment 3 Simon McVittie 2013-11-04 18:23:51 UTC
I think I'm going to go for the "JFDI" approach. We've done worse sed operations.

See Bug #69430 which I arbitrarily repurposed for all this sort of thing.
Comment 4 Simon McVittie 2013-11-05 20:40:24 UTC
Prerequisite: squash TpContactsMixin into TpBaseConnection. I have a design which is even introspectable, I think.
Comment 5 Simon McVittie 2013-11-06 19:41:27 UTC
Created attachment 88777 [details] [review]
[spec next 1/2] Flatten Connection.I.Contacts into Connection
Comment 6 Simon McVittie 2013-11-06 19:41:45 UTC
Created attachment 88778 [details] [review]
[spec next 2/2] Do not list Requests in the Interfaces property
Comment 7 Simon McVittie 2013-11-06 19:42:30 UTC
Created attachment 88780 [details] [review]
[tp-glib next 1] TpBaseConnection: absorb the functionality of the  TpContactsMixin

It's a somewhat different "shape" - using a fill_contacts_attribute()
virtual method - so that it's (hopefully) introspectable. This is a
step towards folding Contacts into Connection.
Comment 8 Simon McVittie 2013-11-06 19:42:53 UTC
Created attachment 88781 [details] [review]
[tp-glib next 2] TpBaseConnection: add more ABI padding

We're starting to run out of pointers here; while the 'next' branch
isn't ABI-stable, we might as well add plenty of padding.
Comment 9 Simon McVittie 2013-11-06 19:43:12 UTC
Created attachment 88782 [details] [review]
[tp-glib next 3] [temporary] update spec: fold Contacts into Connection

To be replaced with an update to a newer spec.
Comment 10 Simon McVittie 2013-11-06 19:43:30 UTC
Created attachment 88783 [details] [review]
[tp-glib next 4] Adjust telepathy-glib code for removal of Contacts  interface
Comment 11 Simon McVittie 2013-11-06 19:43:59 UTC
Created attachment 88784 [details] [review]
[tp-glib next 5] Assume that Conn.I.Requests is supported, and don't put  it in Interfaces

---

Implementation of Attachment #88778 [details].
Comment 12 Simon McVittie 2013-11-06 19:44:31 UTC
Created attachment 88785 [details] [review]
[tp-glib next 6/7] Simplify TpPresenceMixin by making the "get contact  status" vfunc singular
Comment 13 Simon McVittie 2013-11-06 19:44:54 UTC
Created attachment 88786 [details] [review]
[tp-glib next 7/7] TpBaseContactList: add mandatory is_blocked vfunc

This makes the implementation of the former Contacts methods more
efficient.
Comment 14 Simon McVittie 2013-11-06 19:45:50 UTC
CMs not yet updated. This is going to break all of them.

I don't think this will affect non-CMs, apart from them needing to update their test code.
Comment 15 Simon McVittie 2013-11-07 15:22:27 UTC
Created attachment 88828 [details] [review]
[gabble next 1/4] Adjust code for replacement of TpContactsMixin
Comment 16 Simon McVittie 2013-11-07 15:22:44 UTC
Created attachment 88829 [details] [review]
[gabble next 2/4] presence: use new "singular" API for getting contact  status

API break in TpPresenceMixin.
Comment 17 Simon McVittie 2013-11-07 15:28:46 UTC
Created attachment 88830 [details] [review]
[gabble next 3/5] roster: implement new is_blocked() vfunc

---

This goes with Attachment #88786 [details].
Comment 18 Simon McVittie 2013-11-07 15:29:33 UTC
Created attachment 88831 [details] [review]
[gabble next 5/5] Don't explicitly include Requests in list of interfaces

---

Gabble's implementation of Attachment #88784 [details], Attachment #88778 [details]
Comment 19 Simon McVittie 2013-11-11 19:42:46 UTC
(In reply to comment #6)
> Created attachment 88778 [details] [review]
> [spec next 2/2] Do not list Requests in the Interfaces property

(In reply to comment #11)
> Created attachment 88784 [details] [review]
> [tp-glib next 5] Assume that Conn.I.Requests is supported, and don't put  it
> in Interfaces

See https://bugs.freedesktop.org/show_bug.cgi?id=69430#c14 for rationale.
Comment 20 Guillaume Desmottes 2013-12-27 11:44:15 UTC
Comment on attachment 88777 [details] [review]
[spec next 1/2] Flatten Connection.I.Contacts into Connection

Review of attachment 88777 [details] [review]:
-----------------------------------------------------------------

++
Comment 21 Guillaume Desmottes 2013-12-27 11:44:48 UTC
Comment on attachment 88778 [details] [review]
[spec next 2/2] Do not list Requests in the Interfaces property

Review of attachment 88778 [details] [review]:
-----------------------------------------------------------------

++
Comment 22 Guillaume Desmottes 2013-12-27 11:47:17 UTC
Comment on attachment 88780 [details] [review]
[tp-glib next 1] TpBaseConnection: absorb the functionality of the  TpContactsMixin

Review of attachment 88780 [details] [review]:
-----------------------------------------------------------------

++
Comment 23 Guillaume Desmottes 2013-12-27 11:48:09 UTC
Comment on attachment 88781 [details] [review]
[tp-glib next 2] TpBaseConnection: add more ABI padding

Review of attachment 88781 [details] [review]:
-----------------------------------------------------------------

++
Comment 24 Guillaume Desmottes 2013-12-27 11:48:29 UTC
Comment on attachment 88782 [details] [review]
[tp-glib next 3] [temporary] update spec: fold Contacts into Connection

Review of attachment 88782 [details] [review]:
-----------------------------------------------------------------

ok but should be be a proper update.
Comment 25 Guillaume Desmottes 2013-12-27 11:48:55 UTC
Comment on attachment 88783 [details] [review]
[tp-glib next 4] Adjust telepathy-glib code for removal of Contacts  interface

Review of attachment 88783 [details] [review]:
-----------------------------------------------------------------

++
Comment 26 Guillaume Desmottes 2013-12-27 11:49:10 UTC
Comment on attachment 88784 [details] [review]
[tp-glib next 5] Assume that Conn.I.Requests is supported, and don't put  it in Interfaces

Review of attachment 88784 [details] [review]:
-----------------------------------------------------------------

++
Comment 27 Guillaume Desmottes 2013-12-27 11:57:14 UTC
Comment on attachment 88785 [details] [review]
[tp-glib next 6/7] Simplify TpPresenceMixin by making the "get contact  status" vfunc singular

Review of attachment 88785 [details] [review]:
-----------------------------------------------------------------

++
Comment 28 Guillaume Desmottes 2013-12-27 11:58:16 UTC
Comment on attachment 88786 [details] [review]
[tp-glib next 7/7] TpBaseContactList: add mandatory is_blocked vfunc

Review of attachment 88786 [details] [review]:
-----------------------------------------------------------------

++
Comment 29 Simon McVittie 2014-01-08 13:25:26 UTC
Created attachment 91666 [details] [review]
[gabble next 6/6] Add a comment indicating why wrap_connection treats  Contacts specially

---

Can be squashed into Attachment #88828 [details] if desired.
Comment 30 Simon McVittie 2014-01-08 13:26:12 UTC
Created attachment 91667 [details] [review]
[salut next 1/5] Replace TpContactsMixin with fill_contact_attributes  vfunc
Comment 31 Simon McVittie 2014-01-08 13:28:43 UTC
Created attachment 91669 [details] [review]
[salut next 2/5] constants, servicetest: partially resync with Gabble

Gabble uses telepathy-glib for sidecars whereas Salut doesn't yet, so
I didn't delete the 'Future' line from wrap_connection().

---

> +CHANNEL_TYPE_CONTACT_LIST = CHANNEL + ".Type.ContactList1"

Yes, I know this shouldn't be here. I'll delete it from Gabble at some point, and resync to that, but that isn't on the critical path or anything.

> +ATTR_CONTACT_ID = CONN + '/contact-id'
> +ATTR_CONTACT_ID = CONN + '/contact-id'

Likewise.
Comment 32 Simon McVittie 2014-01-08 13:29:14 UTC
Created attachment 91670 [details] [review]
[salut next 3/5] tests: abolish Contacts interface

As with Gabble, I kept conn.Contacts working for now, but it's
now an alias for the default interface.
Comment 33 Simon McVittie 2014-01-08 13:30:03 UTC
Created attachment 91671 [details] [review]
[salut next 4/5] presence mixin: switch to singular API
Comment 34 Simon McVittie 2014-01-08 13:30:20 UTC
Created attachment 91672 [details] [review]
[salut next 5/5] don't explicitly list Requests in Interfaces
Comment 35 Simon McVittie 2014-01-08 13:43:34 UTC
Created attachment 91673 [details] [review]
[gabble next] constants: remove obsolete and duplicate lines

In the process, get rid of some now-redundant test code that relied on
CHANNEL_TYPE_CONTACT_LIST still existing.

---

Not part of this API break, can be merged whenever.
Comment 36 Simon McVittie 2014-01-08 14:33:19 UTC
Created attachment 91676 [details] [review]
[rakia next 1/1] Adapt for merge of Contacts into Connection, and deletion of  Requests

This also resyncs constants.py, servicetest.py with my current
Gabble branch.

---

... after Attachment #91673 [details], Attachment #91666 [details] have been applied.
Comment 37 Simon McVittie 2014-01-08 15:38:06 UTC
Created attachment 91679 [details] [review]
[idle next 1/1] Adapt for merge of Contacts into Connection, and deletion of  Requests

This also resyncs constants.py, servicetest.py with my current
Gabble branch.

---

Same notes as for the Rakia patch
Comment 38 Simon McVittie 2014-01-08 15:38:41 UTC
Created attachment 91680 [details] [review]
[haze next 1/5] remove use of TpContactsMixin and Contacts interface
Comment 39 Simon McVittie 2014-01-08 15:39:06 UTC
Created attachment 91681 [details] [review]
[haze next 2/5] tests: resync constants, servicetest with Gabble

---

Same notes as for the Rakia and Idle patches
Comment 40 Simon McVittie 2014-01-08 15:39:18 UTC
Created attachment 91682 [details] [review]
[haze next 3/5] contact list: implement is_blocked
Comment 41 Simon McVittie 2014-01-08 15:39:32 UTC
Created attachment 91683 [details] [review]
[haze next 4/5] presence: switch to "singular" API
Comment 42 Simon McVittie 2014-01-08 15:39:45 UTC
Created attachment 91684 [details] [review]
[haze next 5/5] connection: don't explicitly advertise Requests interface
Comment 43 Simon McVittie 2014-01-08 16:02:27 UTC
Created attachment 91685 [details] [review]
[mc next 1/3] Resync constants, servicetest from Gabble

---

Same caveats as the Rakia, Idle, Haze patches.
Comment 44 Simon McVittie 2014-01-08 16:02:46 UTC
Created attachment 91686 [details] [review]
[mc next 2/3] the Requests interface no longer needs to appear in  Interfaces

It's only a separate interface so its signals won't wake everything up.
Comment 45 Simon McVittie 2014-01-08 16:03:54 UTC
Created attachment 91687 [details] [review]
[mc next 3/3] tests: cope with Contacts being part of Connection now

Also delete ContactAttributeInterfaces, which no longer exists.

---

I think that's everything done, unless telepathy-farstream or Empathy need patching (I don't have the full VoIP stack set up for 1.0 yet).
Comment 46 Guillaume Desmottes 2014-01-13 09:51:23 UTC
Comment on attachment 91667 [details] [review]
[salut next 1/5] Replace TpContactsMixin with fill_contact_attributes  vfunc

Review of attachment 91667 [details] [review]:
-----------------------------------------------------------------

++
Comment 47 Guillaume Desmottes 2014-01-13 09:51:57 UTC
Comment on attachment 91669 [details] [review]
[salut next 2/5] constants, servicetest: partially resync with Gabble

Review of attachment 91669 [details] [review]:
-----------------------------------------------------------------

++
Comment 48 Guillaume Desmottes 2014-01-13 09:52:42 UTC
Comment on attachment 91670 [details] [review]
[salut next 3/5] tests: abolish Contacts interface

Review of attachment 91670 [details] [review]:
-----------------------------------------------------------------

++
Comment 49 Guillaume Desmottes 2014-01-13 09:53:15 UTC
Comment on attachment 91671 [details] [review]
[salut next 4/5] presence mixin: switch to singular API

Review of attachment 91671 [details] [review]:
-----------------------------------------------------------------

++
Comment 50 Guillaume Desmottes 2014-01-13 09:53:46 UTC
Comment on attachment 91672 [details] [review]
[salut next 5/5] don't explicitly list Requests in Interfaces

Review of attachment 91672 [details] [review]:
-----------------------------------------------------------------

++
Comment 51 Guillaume Desmottes 2014-01-13 09:54:20 UTC
Comment on attachment 91673 [details] [review]
[gabble next] constants: remove obsolete and duplicate lines

Review of attachment 91673 [details] [review]:
-----------------------------------------------------------------

++
Comment 52 Guillaume Desmottes 2014-01-13 09:55:24 UTC
Comment on attachment 91676 [details] [review]
[rakia next 1/1] Adapt for merge of Contacts into Connection, and deletion of  Requests

Review of attachment 91676 [details] [review]:
-----------------------------------------------------------------

++
Comment 53 Guillaume Desmottes 2014-01-13 09:56:31 UTC
Comment on attachment 91679 [details] [review]
[idle next 1/1] Adapt for merge of Contacts into Connection, and deletion of  Requests

Review of attachment 91679 [details] [review]:
-----------------------------------------------------------------

++
Comment 54 Guillaume Desmottes 2014-01-13 09:57:44 UTC
Comment on attachment 91680 [details] [review]
[haze next 1/5] remove use of TpContactsMixin and Contacts interface

Review of attachment 91680 [details] [review]:
-----------------------------------------------------------------

++
Comment 55 Guillaume Desmottes 2014-01-13 09:58:00 UTC
Comment on attachment 91681 [details] [review]
[haze next 2/5] tests: resync constants, servicetest with Gabble

Review of attachment 91681 [details] [review]:
-----------------------------------------------------------------

++
Comment 56 Guillaume Desmottes 2014-01-13 09:58:43 UTC
Comment on attachment 91682 [details] [review]
[haze next 3/5] contact list: implement is_blocked

Review of attachment 91682 [details] [review]:
-----------------------------------------------------------------

++
Comment 57 Guillaume Desmottes 2014-01-13 09:59:22 UTC
Comment on attachment 91683 [details] [review]
[haze next 4/5] presence: switch to "singular" API

Review of attachment 91683 [details] [review]:
-----------------------------------------------------------------

++
Comment 58 Guillaume Desmottes 2014-01-13 09:59:33 UTC
Comment on attachment 91684 [details] [review]
[haze next 5/5] connection: don't explicitly advertise Requests interface

Review of attachment 91684 [details] [review]:
-----------------------------------------------------------------

++
Comment 59 Guillaume Desmottes 2014-01-13 09:59:57 UTC
Comment on attachment 91685 [details] [review]
[mc next 1/3] Resync constants, servicetest from Gabble

Review of attachment 91685 [details] [review]:
-----------------------------------------------------------------

++
Comment 60 Guillaume Desmottes 2014-01-13 10:00:28 UTC
Comment on attachment 91686 [details] [review]
[mc next 2/3] the Requests interface no longer needs to appear in  Interfaces

Review of attachment 91686 [details] [review]:
-----------------------------------------------------------------

++
Comment 61 Guillaume Desmottes 2014-01-13 10:00:59 UTC
Comment on attachment 91687 [details] [review]
[mc next 3/3] tests: cope with Contacts being part of Connection now

Review of attachment 91687 [details] [review]:
-----------------------------------------------------------------

++
Comment 62 Simon McVittie 2014-01-13 13:59:03 UTC
Fixed in telepathy-{glib,gabble,salut,idle,haze,rakia} 0.99.6 and MC 5.99.6.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.