Re: [GnomeMeeting-devel-list] [DRAFT] Organization of the "find contact" task



Le mardi 30 mai 2006 à 18:28 +0200, Julien PUYDT a écrit :
> Damien Sandras a écrit :
> > If the GmContact contains an URL field, that field can be empty when it
> > doesn't make sense. So I do not understand this approach.
> 
> Bad idea... if we put in GmContact anything that can be used in each and 
> every case, we might as well say GmContact mean gpointer [500] and 
> access the data using :
> enum {
>    CONTACT_NAME,
>    CONTACT_URL,
>    CONTACT_FOO,
>    CONTACT_BAR,
>    CONTACT_BAR
> };
> 
> if (contact[CONTACT_NAME]) {
>   /* this one has a name! How nice! */
>   ...
> }
> 
> Add to that that an XMPP contact, say user server can appear as 
> user server/home, user server/work and user server/laptop (this is 
> called a "ressource" of the account), each with its own presence 
> information and its own capabilities (can do XHTML messages, can do 
> jingle, can do foo, etc).
> 
> Trust me : you really want that the code which displays a contact, knows 
> this contact to the very detail, not through an abstraction.
> 

Without that structure, I do not understand how to call a contact from
the search results coming from the calls history/local/remote address
books.

> >>> If we want to discuss further, please show me sample code that :
> >>> - Search for "Damien Sandras" in all types of address books and returns
> >>> a list of results
> >> Cannot be done : not all contacts may have names attached to them. 
> >> Notice that it isn't possible yet.
> > 
> > It should be a prerequisite.
> 
> To make that work, you would need to be able to present the result for 
> the user. Unfortunately, that is not possible, since as explained, we 
> don't have a non-empty common denominator between them :-/
> 
> >>> - Imagine we have a callback triggered when some action is triggered on
> >>> the contact allowing to call him. Please show me the sample code of that
> >>> callback.
> >> Actions are what I want to work on now that I think the view side is 
> >> covered.
> > 
> > Yes, I'm waiting for pseudo-sample code to be convinced.
> 
> Honestly, I am too ;-)
> 

Yes, see the previous mail talking about the callback. Without seeing
pseudo-code I can not comment on it. At first sight, not having a
contact structure seems to be a bad approach, your sample code will show
if it is the case or not.

Notice that EDS allows representing contacts as vcards, allowing all
fields that you want.
-- 
 _      Damien Sandras
(o-     
//\     Ekiga Softphone: http://www.ekiga.org/
v_/_    FOSDEM 2006    : http://www.fosdem.org/
        SIP Phone      : sip:dsandras ekiga net
                         sip:600000 ekiga net




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]