[Bug 32053] Add a TpContactSearch proxy object

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Dec 3 16:28:48 CET 2010


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

--- Comment #3 from Emilio Pozuelo Monfort <pochu27 at gmail.com> 2010-12-03 07:28:02 PST ---
(In reply to comment #2)
> You didn't add new API to telepathy-glib-sections.txt. Please build with
> --enable-gtk-doc and make sure than "make check" pass.

Fixed.

> Speaking of checking, it would be good to have tests.
> 
> I didn't look at the details of the code, just the API:
> 
> - Maybe the API should be TpAccount centric rather than TpConnection ? Don't
> know

Neither do I...

> - tp_contact_search_set_connection() seems wrong, I'd make the conn/account
> prop construct only.

Agreed. If you need a TpContactSearch for another connection you can create a
new object. Fixed.

> That would also use to get rid of the search-keys-changed signal.

How would you know the search keys then? The problem that I see with adding an
API as you suggest below is that we need to query the search channel, but that
may not be valid at the beginning. Or the API to query it could have a callback
parameter which is called when the channel has been created and we know the
search keys. Is that what you propose?

> - Rename tp_contact_search_search() to tp_contact_search_start()?

Or tp_contact_search_do_search? I agree _search_search() sounds a bit weird :)

> - We need API to know the supported search terms.

See comment above

> - You don't use the More() method if needed.

What's this?

> - It would be good to return an higher level structur for results. Maybe we
> could use TpContact ?

Yeah, I guess I could do that. I'd need to translate the results from ids to
TpContacts. Would returning a TpContact * const *contacts (as returned by
tp_connection_get_contacts_by_id()) be acceptable, or would you put somewhere
else? Does anybody else think this would be useful?

-- 
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