Skip to content

WIP: Vcard Import

Anjan Momi requested to merge anjandev/gnome-contacts:vcard into master

This is my implementation of Vcard parsing and import for issue #1 (closed). It is lacking a preview before importing but that should be trivial to add. I am currently trying to get the output of Evolution-Data-Server vcard import mapped to fake_persona. The commit history is gross because it's my first time writing in vala and I wanted to go step by step. I will squash the commit before it's in a merge-ready state.

Right now, the code reads the full name of the person from the vcard and makes a contact with the full name. I need to add mapping from the Vcard output to phone numbers, emails, etc. But I am having a hard time with if I add the following line to line 231:

../src/contacts-contact-pane.vala:242.75-242.90: error: Argument 2: Cannot convert from `string?' to `unowned Gee.MultiMap<string,string>?'
          fake_persona.phone_numbers.add(new PhoneFieldDetails ("Mobile", attr.get_value()));

Any assistance with what Im doing wrong would be greatly appreciated. Otherwise I may have to do alot of trial and error to fix. Further assistance in "this is the wrong place to put this function" would also be appreciated.

Merge request reports