[Bug 49505] somewhat high-level API to add client channel filters

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Mar 12 04:59:59 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=49505

--- Comment #10 from Guillaume Desmottes <guillaume.desmottes at collabora.co.uk> ---
(In reply to comment #6)
> (In reply to comment #3)
> > At the moment we could so
> > something like:
> >   f = tp_channel_filter_new_for_text_chatrooms ();
> >   tp_channel_filter_require_channel_type (f, TP_IFACE_CHANNEL_TYPE_CALL);
> > which is pretty weird.
> > 
> > If we go this way, tp_channel_filter_new () could be renamed new_for_all()
> > or something.
> 
> new_for_all_types() perhaps, yeah.
> 
> > Another option could be to return_if_fail () if there is already a channel
> > type on the filter.
> 
> Also a plausible route to take. I think I slightly prefer it this way.

I think I'd prefer to have tp_channel_filter_new_for_all_types() and remove
tp_channel_filter_require_channel_type() completely.

Rationale: this a very high level API and the channel type is the key part of
this API's naming scheme. If you have to use another channel type then either
it's common enough to be added to the high level API or you should use the
GVariant based lower API.
And that makes clear that the channel filter is bound to a channel type as
there is no way to change it once created.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.


More information about the telepathy-bugs mailing list