[Bug 32053] Add a TpContactSearch proxy object

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Dec 17 00:17:38 CET 2010


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

--- Comment #24 from Emilio Pozuelo Monfort <pochu27 at gmail.com> 2010-12-16 15:17:38 PST ---
(In reply to comment #22)
> (In reply to comment #20)
> > > +tp_capabilities_supports_contact_search (TpCapabilities *self,
> > 
> > If there are fixed properties other than the channel type, your channel request
> > is going to fail, because you only provide the channel type. So, you should
> > skip channel classes that have more than one fixed property, for
> > forwards-compat.
> 
> Hmm, can you clarify this a bit?

Thanks, fixed.

> > > + * tp_contact_search_reset_async:
> > [...]
> > > +  g_assert (self->priv->async_res == NULL);
> > 
> > This crashes if the caller resets it repeatedly, or resets it while a channel
> > is being fetched. At the very least, it should g_return_if_fail, and document
> > that it's an error to call this function while async_init or reset_async is in
> > progress.
> > 
> > However, I think it'd be nicer if you could set it up so that resetting while a
> > reset is already in progress just makes the first reset fail with
> > G_IO_ERROR_CANCELLED, or something.
> 
> I have changed the g_assert()s to g_return_if_fail(), and documented that. I'll
> look at the GCancellable thing.

Done, should be fixed now. It's the first time I look at GCancellable, so I'm
not quite sure it's the proper way, but it seems to work fine in my tests...

> I'll look at adding some tests tomorrow too.

I've added a couple of test cases. The TpContactSearchResult one works fine,
but the TpContactSearch one fails when creating a TpContactSearch object, I
guess because of the /what/ever path in the TpAccount... Need to fix that and
test that the other methods work as expected.

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



More information about the telepathy-bugs mailing list