Bug 77030 - [1.0] check that ContactSearch has a sane RequestableChannelClasses entry now
Summary: [1.0] check that ContactSearch has a sane RequestableChannelClasses entry now
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks: 68660
  Show dependency treegraph
 
Reported: 2014-04-03 20:04 UTC by Simon McVittie
Modified: 2014-05-13 12:50 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
[tp-glib] allow CMs to put 'TargetEntityType=None' in contact search requests (1.78 KB, patch)
2014-05-13 10:05 UTC, Guillaume Desmottes
Details | Splinter Review
[gabble] search-manager: use properties constants (1.52 KB, patch)
2014-05-13 10:05 UTC, Guillaume Desmottes
Details | Splinter Review
[gabble] search-manager: use tp_asv_new() (1.17 KB, patch)
2014-05-13 10:06 UTC, Guillaume Desmottes
Details | Splinter Review
[gabble] search-manager: allow user to pass TargetEntityType=NONE when requesting (2.48 KB, patch)
2014-05-13 10:06 UTC, Guillaume Desmottes
Details | Splinter Review

Description Simon McVittie 2014-04-03 20:04:26 UTC
telepathy-glib/capabilities.c:

      /* ContactSearch channel should have ChannelType and TargetEntityType=NONE
       * but CM implementations are wrong and omitted TargetEntityType,
       * so it's set in stone now.  */
      if (g_hash_table_size (fixed) != 1)
        continue;

I think we already changed the 1.x spec to fix that. We should change TpCapabilities and any connection managers that support ContactSearch so they put TargetEntityType=NONE in their requestable channel classes.

This would be a good bite-sized bug if someone has a Telepathy build environment and a few minutes.
Comment 1 Guillaume Desmottes 2014-05-13 10:05:03 UTC
Created attachment 98967 [details] [review]
[tp-glib] allow CMs to put 'TargetEntityType=None' in contact search requests
Comment 2 Guillaume Desmottes 2014-05-13 10:05:46 UTC
Created attachment 98968 [details] [review]
[gabble] search-manager: use properties constants
Comment 3 Guillaume Desmottes 2014-05-13 10:06:02 UTC
Created attachment 98969 [details] [review]
[gabble] search-manager: use tp_asv_new()
Comment 4 Guillaume Desmottes 2014-05-13 10:06:22 UTC
Created attachment 98970 [details] [review]
[gabble] search-manager: allow user to pass TargetEntityType=NONE when requesting
Comment 5 Simon McVittie 2014-05-13 11:09:09 UTC
Comment on attachment 98967 [details] [review]
[tp-glib] allow CMs to put 'TargetEntityType=None' in contact search requests

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

Looks good, although a regression test would be nice.

::: telepathy-glib/capabilities.c
@@ +920,5 @@
>          continue;
>  
> +      entity_type = tp_vardict_get_uint32 (fixed,
> +          TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, &valid);
> +      /* If TargetEntityType is missing we threat it as NONE */

treat

A threat is something rather different :-)
Comment 6 Simon McVittie 2014-05-13 11:09:38 UTC
Comment on attachment 98968 [details] [review]
[gabble] search-manager: use properties constants

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

Sure
Comment 7 Simon McVittie 2014-05-13 11:10:05 UTC
Comment on attachment 98969 [details] [review]
[gabble] search-manager: use tp_asv_new()

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

Yes, for next
Comment 8 Simon McVittie 2014-05-13 11:11:18 UTC
Comment on attachment 98970 [details] [review]
[gabble] search-manager: allow user to pass TargetEntityType=NONE when requesting

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

Looks good for 'next'.

Are there any other CMs that implement ContactSearch? If not, this can be closed when these are merged.
Comment 9 Guillaume Desmottes 2014-05-13 12:50:59 UTC
Fixed & merged.


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.