Summary: | Support ContactCapabilities draft 2 | ||
---|---|---|---|
Product: | Telepathy | Reporter: | Simon McVittie <smcv> |
Component: | mission-control | Assignee: | Simon McVittie <smcv> |
Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
URL: | http://git.collabora.co.uk/?p=user/smcv/telepathy-mission-control-smcv.git;a=shortlog;h=refs/heads/contact-caps-early | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 22934 |
Description
Simon McVittie
2009-03-27 06:57:18 UTC
Slightly repurposing this bug, here is an implementation of contact caps draft 2 as seen in the latest telepathy-spec: http://git.collabora.co.uk/?p=user/smcv/telepathy-mission-control-smcv.git;a=shortlog;h=refs/heads/contact-caps-draft2 With this branch, MC supports ancient Capabilities, draft 1 ContactCapabilities and draft 2 ContactCapabilities simultaneously. + TpHandle handle = tp_handle_ensure (dispatcher->priv->string_pool, + cap_tokens[i], NULL, NULL); + + if (handle != 0) It should never be 0, surely. + vas = g_ptr_array_sized_new (g_hash_table_size (self->priv->clients)); + + g_hash_table_iter_init (&iter, self->priv->clients); + + while (g_hash_table_iter_next (&iter, NULL, &p)) + { + mcd_dispatcher_append_client_caps (self, p, vas); + } // do some stuff + g_ptr_array_foreach (vas, (GFunc) g_value_array_free, NULL); + g_ptr_array_free (vas, TRUE); This code occurs twice; maybe it's worth function-ifying? That said, it would be longer that way. :) Otherwise, looks good! Sorry, there are more patches... (In reply to comment #2) > + TpHandle handle = tp_handle_ensure (dispatcher->priv->string_pool, > + cap_tokens[i], NULL, NULL); > + > + if (handle != 0) > > It should never be 0, surely. No, that check is indeed pointlessly defensive, and I've removed it. > + vas = g_ptr_array_sized_new (g_hash_table_size (self->priv->clients)); > + > + g_hash_table_iter_init (&iter, self->priv->clients); [...] > This code occurs twice; maybe it's worth function-ifying? The contact-caps-early branch does functionify it, but then doesn't use it in one of the places where it could (which I have now corrected). Fixed in git, will be in 5.3.0 5.3.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.