[Bug 32053] Add a TpContactSearch proxy object
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Dec 10 09:58:12 CET 2010
https://bugs.freedesktop.org/show_bug.cgi?id=32053
--- Comment #15 from Guillaume Desmottes <guillaume.desmottes at collabora.co.uk> 2010-12-10 00:58:09 PST ---
tp_contact_search_new_finish should have (transfer full) and have
G_GNUC_WARN_UNUSED_RESULT
tp_contact_search_reset_async() looks a bit weird to me but I guess that's the
price we have to pay if we want to be able to change the server without
creating a new object.
* Since: 0.13.9
Lie! use 0.13.UNRELEASED
Shouldn't tp_contact_search_search() stop a previous search, if any?
You should pass self as weak_object to you call_ methods.
The TpAccount, server and limit should be proper GObject properties.
Also, tp_contact_search_new_async() should be a tin wrapper around
g_async_initable_new_async (ie, properties should be set by the GObeject
property
mechanism).
TpAccountChannelRequest is leaked. You can unref it just after you called
tp_account_channel_request_create_and_handle_channel_async() so it will be
destroyed when it's done.
_create_search_channel_cb: the error is leaked in the first error case.
_create_search_channel_cb should complete the operation synchronously not in
idle.
self->priv->keys is set in 2 places; is that expected?
Also, why not return self->priv->keys in tp_contact_search_reset_finish() ?
No API to ask for more results?
Like Smcv, I'd prefer to have an higher level object representing search
result.
Niptick
-------
We usually use : "GCallback _padding[7];" as padding.
if (error)
We use if (ptr != NULL)
return tp_asv_get_strv (tp_channel_borrow_immutable_properties
(self->priv->channel),
this line is too long (and some others too actually).
tp_contact_search_init: No need to init to NULL/0, GObject does it for us.
I tend to use g_hash_table_unref instead of _destroy.
close_search_channel: you can use tp_clear_object()
--
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