Re: [Evolution-hackers] When do I overwrite a server-side EContact?



On Tue, 2007-11-13 at 15:51 +0100, Jules Colding wrote:
> On Tue, 2007-11-13 at 14:39 +0000, Ross Burton wrote:
> > On Tue, 2007-11-13 at 15:00 +0100, Jules Colding wrote:
> > > The create_contact() e-book function is rather loosely defined:
> > > 
> > > create_contact(EBookBackend *backend,
> > > 	       EDataBook *book,
> > > 	       guint32 opid,
> > > 	       const char *vcard)
> > > 
> > > 
> > > How would a backend know if an already existing contact entry should be
> > > overwritten with the new one?
> > 
> > If there is an existing contact with the same UID, create_contact fails.
> > Use modify_contact().
> 
> OK - How about the case where there is an existing contact that looks
> similar to the one that we attempts to create?

If it looks similar but is in all respects a different contact
(different UID, primarily), then you get two contacts.

EDS isn't the place for "this contact looks the same" logic, the UI is.

Ross
-- 
Ross Burton                                 mail: ross burtonini com
                                          jabber: ross burtonini com
                                     www: http://www.burtonini.com./
 PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF

Attachment: signature.asc
Description: This is a digitally signed message part



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