[Bug 41801] High level API for ContactBlocking

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Nov 1 11:42:34 CET 2011


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

--- Comment #6 from Will Thompson <will.thompson at collabora.co.uk> 2011-11-01 03:42:34 PDT ---
(In reply to comment #5)
> (In reply to comment #3)
> > + * @n_contacts: the number of contacts in @contacts (must be at least 1)
> > 
> > but the code doesn't enforce that.
> 
> _tp_contacts_to_handles() now does.

It would be kinder to application developers to (also) g_return_if_fail()
directly from the functions they actually call, so that the criticals in their
terminal refer to something they do rather than the internals of tp-glib.

> > Why is "contact-blocking" in quotes with a hyphen? The GQuark isn't for that
> > string.
> 
> That's how we document all the features.

Okay, but I don't think it's very useful documentation.

> > +      goto out;
> > +    }
> > +
> > +  self->priv->contact_blocking_capabilities = tp_asv_get_uint32 (properties,
> > +      "ContactBlockingCapabilities", &valid);
> > +  if (!valid)
> > +    {
> > +      DEBUG ("Connection %s doesn't have ContactBlockingCapabilities
> > property",
> > +          tp_proxy_get_object_path (self));
> > +    }
> > +
> > +out:
> > 
> > I don't really see that the goto buys us anything here.
> 
> removed.

I should have been clearer: I didn't mean “just blindly remove the goto”, I
meant “use an else block”. Without the goto, it crashes because 'properties' is
NULL.

> > There must be code elsewhere to turn an a{us} into an array of TpContacts. And
> > presumably also to prepare 'em all with the set of features from grabbed from a
> > factory for 'self'.
> 
> There is, but it's pretty dependent of the way the queue is managed. One
> option could have been to re-use the same prepare queue as the contact list
> but it would have make things much more complicated. I discussed this with
> Xavier and he agreed that using another queue was fine.

Okay! This makes sense given later patches.

> > +void _tp_connection_blocked_changed_queue_free (GQueue *queue)
> > 
> > Coding style: add a newline.
> 
> added.

Sorry, I should have been clearer: I didn't mean in the header. I meant in the
.c file, between 'void' and '_tp_connection_blocked_changed_queue_free'.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the telepathy-bugs mailing list