Bug 49753

Summary: Further MC modernization
Product: Telepathy Reporter: Simon McVittie <smcv>
Component: mission-controlAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: jonny.lamb, vivek
Version: unspecifiedKeywords: patch
Hardware: Other   
OS: All   
URL: http://cgit.freedesktop.org/~smcv/telepathy-mission-control/log/?h=modernity
Whiteboard:
i915 platform: i915 features:
Attachments: 1/7] _mcd_client_proxy_add_cap_tokens: switch from "add" to "set" semantics
2/7] McdClientProxy: store capability tokens as a strv, not a handle set
3/7] McdClientProxy, McdClientRegistry: remove now-unused string pool
4/7] mcd_account_connection_ready_cb: use self-contact for normalized name
5/7] McdConnection: don't bother refcounting handles, they're immortal
6/7] Require telepathy-glib 0.19.0
7/7] Use telepathy-glib meta-headers

Description Simon McVittie 2012-05-10 12:23:42 UTC
There are going to have to be several rounds of this, but here's a reviewable chunk of stuff.
Comment 1 Simon McVittie 2012-05-10 12:24:19 UTC
Created attachment 61388 [details] [review]
1/7] _mcd_client_proxy_add_cap_tokens: switch from "add" to  "set" semantics

In both the cases where it's called (when we get a reply to GetAll,
and when we've parsed a .client file), we actually want to take the
new set, not union it with an existing set.

Also, this will be easier to deal with when we stop (ab)using handles
for this.
Comment 2 Simon McVittie 2012-05-10 12:24:38 UTC
Created attachment 61389 [details] [review]
2/7] McdClientProxy: store capability tokens as a strv, not a  handle set

There aren't *that* many of them, and handles are immortal now.
If g_strdupv'ing the capability tokens ends up taking too much memory,
we should write a generic refcounted string pool instead (but I doubt
it will, in any case).
Comment 3 Simon McVittie 2012-05-10 12:24:50 UTC
Created attachment 61390 [details] [review]
3/7] McdClientProxy, McdClientRegistry: remove now-unused  string pool
Comment 4 Simon McVittie 2012-05-10 12:25:07 UTC
Created attachment 61391 [details] [review]
4/7] mcd_account_connection_ready_cb: use self-contact for  normalized name

This saves us a pointless round-trip: the normalized name is part
of CORE now.
Comment 5 Simon McVittie 2012-05-10 12:25:19 UTC
Created attachment 61392 [details] [review]
5/7] McdConnection: don't bother refcounting handles, they're  immortal
Comment 6 Simon McVittie 2012-05-10 12:25:55 UTC
Created attachment 61393 [details] [review]
6/7] Require telepathy-glib 0.19.0

---

For now I'm not enabling 0.19.x deprecations, because there's deprecated stuff tangled throughout MC and it's going to take a while to get through it all.
Comment 7 Simon McVittie 2012-05-10 12:26:14 UTC
Created attachment 61394 [details] [review]
7/7] Use telepathy-glib meta-headers
Comment 8 Jonny Lamb 2012-05-11 03:46:55 UTC
This all looks good to me.
Comment 9 Simon McVittie 2012-05-14 07:34:09 UTC
Thanks, fixed in git for 5.13.0

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.