http://bugs.meego.com/show_bug.cgi?id=4027

--- Comment #2 from athimm <[email protected]> 2010-07-27 01:20:51 PDT ---
I think the backend is fine, it extracts valid contacts, uris are part of the
vcard specification. In fact a non-local uri (say one pointing to a gravatar)
should indeed be just passed along.

The problem is that file:// uris are by definition only locally defined. I'm
also not sure this is a maemo specific issue, maybe other contact stores use
file:// uris as well. It does make sense to keep user data and avatars
separated, as avatars are changed frequently.

Anyway looking at the code (master) it probably needs to be fixed in
src/backends/addressbook/AddressBookSource.cpp in vCard2ABPerson::fromPerson:

        if (photo) {
            StringBuffer encoded;
            b64_encode(encoded, (void *)CFDataGetBytePtr(photo),
CFDataGetLength(photo));
            VProperty vprop("PHOTO");
            vprop.addParameter("ENCODING", asVCard30 ? "B" : "BASE64");
            vprop.setValue(encoded.c_str());
            m_vobj.addProperty(&vprop);
        }

Before calling b64_encode one should compare photo to "file://" and if that
matches the referenced file should be opened and used instead. I don't have the
SDK set up otherwise I'd give it a try.

What I find strange is that no one reported this before. There seem to be quite
a few n900/syncevolution users out there. The syncing does work towards the
phone, maybe these users feed their PHOTOs from other sources?

-- 
Configure bugmail: http://bugs.meego.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching someone on the CC list of the bug.
_______________________________________________
Syncevolution-issues mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution-issues

Reply via email to