Re: [Ekiga-devel-list] Ekiga address book searching by URI
- From: Eugen Dedu <Eugen Dedu pu-pm univ-fcomte fr>
- To: Ekiga development mailing list <ekiga-devel-list gnome org>
- Subject: Re: [Ekiga-devel-list] Ekiga address book searching by URI
- Date: Tue, 16 Nov 2010 21:04:39 +0100
On 16/11/10 21:00, Julien Puydt wrote:
Le 16/11/2010 12:59, Eugen Dedu a écrit :
On 16/11/10 08:13, Julien Puydt wrote:
Le 15/11/2010 21:33, Eugen Dedu a écrit :
On 15/11/10 21:32, Julien Puydt wrote:
Le 15/11/2010 21:25, Eugen Dedu a écrit :
On 15/11/10 21:15, Julien Puydt wrote:
What about only the has_uri... and the UI code does the looping [and
hence may stop at any point] ?
Hmm, I would rather say let's have a function get_contact_by_uri
which
does the loop; the has_uri is optional (it can be or not).
What do you do in your loop without the has_uri ?
Well, check if it has an URI directly, without using a has_uri
function.
But maybe this cannot be done, you know better than me.
Let's create an imaginary but realistic addressbook.
- First contact : (that one has many uris)
Name : Eugen Dedu
E-mail (this is an uri) : eugen dedu org
E-mail (this is an uri) : eugen dedu dedu org
E-mail (this is an uri) : eugen dedu ekiga net
E-mail (this is an uri) : eugen dedu hotmail com
E-mail (this is an uri) : dedu gmail com
SIP (this is an uri) : eugen dedu ekiga net
SIP (this is an uri) : eugen dedu dedu org
SIP (this is an uri) : eugen dedu org
XMPP (this is an uri) : eugen dedu org
XMPP (this is an uri) : dedu jabber org
XMPP (this is an uri) : dedu jabber fr
Adress : somewhere in France
- Second contact (she's 107 years old, never seen a computer, but reads
her snail mail just fine -- not a single uri) :
Name : Cassandra North
Address : somewhere in Canada -- of course in the north!
- Third contact : (shared uri)
Name : Felicia Fish
SIP : family fish bowl com
- Fourth contact : (shared uri)
Name : James Fish
SIP : family fish bowl com
Now we see something like :
const std::string get_uri () const;
doesn't fly : sometimes we have many to return, and sometimes none.
Only this one seems the best for me, since it so simple... If no match,
return "", elsewhere return the contact (if only 1) or one of them (the
first found for ex.) There is no problem if Felicia Fish and James Fish
cannot be distinguished.
Could you tell me which uri your simple get_uri method would return for
the first contact?
I think there is a misunderstanding here: it's not get_uri which is
needed, but get_name (uri). Grigory wants to show the name of the
contact instead of its SIP address (=uri) in the calling "window".
get_name (dedu jabber org) -> Eugen Dedu
get_name (family fish bowl com) -> Felicia Fish
--
Eugen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]