Meego Wiki
Views

Architecture/planning/evolution-data-server/QtContacts storage plugin

From MeeGo wiki
< Architecture | planning/evolution-data-server(Difference between revisions)
Jump to: navigation, search
(QtContacts-EDS)
(QtContacts-EDS)
 
(35 intermediate revisions not shown)
Line 1: Line 1:
== QtContacts-EDS ==
== QtContacts-EDS ==
-
Can be based on [[http://www.qt.gitorious.org/qt-mobility/contacts/blobs/master/plugins/contacts/maemo5/qcontactabook.cpp existing Harmattan EDS plugin]], which does not work as-is because of Nokia-specific API extensions.
+
The code is based on [http://www.qt.gitorious.org/qt-mobility/contacts/blobs/master/plugins/contacts/maemo5/qcontactabook.cpp existing Maemo 5 EDS plugin], which did not work as-is because of Nokia-specific API extensions.
Necessary changes:
Necessary changes:
* avoid ID mapping because it requires reading all contacts at startup:
* avoid ID mapping because it requires reading all contacts at startup:
** must change EDS to use 32 bit integers as local IDs for that (patch ready)
** must change EDS to use 32 bit integers as local IDs for that (patch ready)
-
** QtContacts-EDS supports (collision-safe) ID hashing as fallback if EDS is not patched (Define USE_ID_HASHING at compilation time to enable)
+
** alternatively, collision-safe ID hashing is used in QtContacts-EDS if string IDs are detected at run-time
* convert between QtContacts and vCard using QtVersit, with EDS specific properties and including custom properties for QtContactDetails which have no other mapping to vCard (same approach as in SyncEvolution QtContacts backend)
* convert between QtContacts and vCard using QtVersit, with EDS specific properties and including custom properties for QtContactDetails which have no other mapping to vCard (same approach as in SyncEvolution QtContacts backend)
 +
* EDS needs to be patched to support server-side filtering of dates [https://bugzilla.gnome.org/show_bug.cgi?id=651113 GNOME #651113], photo uris [https://bugzilla.gnome.org/show_bug.cgi?id=651054 GNOME #651054] and non-unique attributes [https://bugzilla.gnome.org/show_bug.cgi?id=650950 GNOME #650950].
 +
* EDS needs to be patched to support fetching of raw vCards (instead of parsed contacts) in EBook [https://bugzilla.gnome.org/show_bug.cgi?id=651541 GNOME #651541].
 +
* EDS needs to be patched to support UID-only contact change notifications instead of sending full contacts (for performance) [https://bugzilla.gnome.org/show_bug.cgi?id=652172  GNOME #652172]
 +
* EDS needs to be patched so that we don't get a notification for each contact in the database on startup [https://bugzilla.gnome.org/show_bug.cgi?id=652171 GNOME #652171]
Goals for initial milestone:
Goals for initial milestone:
* full support for all QContactDetails, including custom ones and additional fields of details which map to well-known vCard properties (QContactUrl::SubTypeFavourite, QContactAvatar::videoUrl, QContactOrganization::FieldLocation...)
* full support for all QContactDetails, including custom ones and additional fields of details which map to well-known vCard properties (QContactUrl::SubTypeFavourite, QContactAvatar::videoUrl, QContactOrganization::FieldLocation...)
-
** QContactGeoLocation detail is not interoperable with libebook/EDS because QtVersit reverses latitude/longitude in the vCard [[http://bugreports.qt.nokia.com/browse/QTMOBILITY-1589 QTMOBILITY-1589]]
+
** The following contact details are not interoperable with Evolution (but they can be saved and are fully compatible with QtContacts):
-
** QContactOnlineAccount is not interoperable with libebook/EDS (not direct equivalent is available in vCard)
+
*** QContactGeoLocation, QContactAnniversary, QContactOnlineAccount, QContactGender, QContactFamily::FieldChildren (X-CHILDREN), QContactGlobalPresence, QContactFavorite, QContactHobby, QContactPresence, QContactRingtone, QContactSyncTarget
 +
*** QContactOrganization::FieldDepartment is not fully interoperable with libebook/EDS (libebook can only parse one department)
** There does not seem to be any equivalent for X-EVOLUTION-MANAGER in QtContacts, no mapping is done for this extension
** There does not seem to be any equivalent for X-EVOLUTION-MANAGER in QtContacts, no mapping is done for this extension
-
** QContactOrganization::FieldDepartment is not fully interoperable with libebook/EDS (libebook can only parse one department)
 
** QContactOrganization does not have any API for binary (QImage) organization logo (Only URL: QContactOrganization::FieldLocation) but libebook supports both
** QContactOrganization does not have any API for binary (QImage) organization logo (Only URL: QContactOrganization::FieldLocation) but libebook supports both
-
** The following details are not interoperable with libebook/EDS (but they can be saved): QContactGender, QContactFamily::FieldChildren (X-CHILDREN), QContactGlobalPresence, QContactFavorite, QContactHobby, QContactPresence, QContactRingtone, QContactSyncTarget.
 
* change notifications (added/updated/removed)
* change notifications (added/updated/removed)
** There does not seem to be any signal in ebook view for selfContactIdChange?
** There does not seem to be any signal in ebook view for selfContactIdChange?
* mapping of QtContacts filters to EDS queries, with unsupported filters implemented by QtContacts after retrieving contacts (slower than filtering in EDS daemon)
* mapping of QtContacts filters to EDS queries, with unsupported filters implemented by QtContacts after retrieving contacts (slower than filtering in EDS daemon)
-
** TODO: complete list of native searches
+
** Non-native (slower) search used for QContactFavorite::FieldIndex, QContactGeoLocation, QContactAnniversary, QContactGlobalPresence, QContactOnlineAccount, QContactPresence, QContactRingtone.
 +
** Partially native search is used when CaseSentive match flag is set because EDS does not support case sensitive matching
* Errors are properly handled and reported to the client application
* Errors are properly handled and reported to the client application
Goals for later milestones:
Goals for later milestones:
-
* performance
+
* performance improvement
 +
 
 +
Testing:
 +
* Packages for patched evolution-data-server and qtcontacts-eds backend are maintained in eds and devel:meego-ux repositories.
Related bugs:
Related bugs:
-
* [[http://bugreports.qt.nokia.com/browse/QTMOBILITY-1298 QTMOBILITY-1298]] QtVersit does not allow custom properties to have complex types
+
* [http://bugreports.qt.nokia.com/browse/QTMOBILITY-1298 QTMOBILITY-1298] QtVersit does not allow custom properties to have complex types
-
* [[http://bugreports.qt.nokia.com/browse/QTMOBILITY-1592 QTMOBILITY-1592]] QContactManagerEngine schema definitions are incomplete
+
* [http://bugreports.qt.nokia.com/browse/QTMOBILITY-1592 QTMOBILITY-1592] QContactManagerEngine schema definitions are incomplete
-
* [[http://bugreports.qt.nokia.com/browse/QTMOBILITY-1590 QTMOBILITY-1590]] QtVersit contact importer does not follow RFC-2426 for LOGO/PHOTO value
+
* [http://bugreports.qt.nokia.com/browse/QTMOBILITY-1590 QTMOBILITY-1590] QtVersit contact importer does not follow RFC-2426 for LOGO/PHOTO value (MERGED UPSTREAM for v1.2.1)
-
* [[http://bugreports.qt.nokia.com/browse/QTMOBILITY-1589 QTMOBILITY-1589]] QtVersit writes/reads QContactGeoLocation's latitude/longitude in reverse order (Compared to RFC-2426 and libebook)
+
* [http://bugreports.qt.nokia.com/browse/QTMOBILITY-1589 QTMOBILITY-1589] QtVersit writes/reads QContactGeoLocation's latitude/longitude in reverse order (Compared to RFC-2426 and libebook)
-
* [[http://bugreports.qt.nokia.com/browse/QTMOBILITY-1623 QTMOBILITY-1623]] QContactManagerEngine::CompareVariant() does not support QVariant::StringList  
+
* [http://bugreports.qt.nokia.com/browse/QTMOBILITY-1623 QTMOBILITY-1623] QContactManagerEngine::CompareVariant() does not support QVariant::StringList  
-
* [[http://bugreports.qt.nokia.com/browse/QTMOBILITY-1667 QTMOBILITY-1667]] QContactManagerEngine::CompareVariant() does not support QVariant::Url  
+
* [http://bugreports.qt.nokia.com/browse/QTMOBILITY-1667 QTMOBILITY-1667] QContactManagerEngine::CompareVariant() does not support QVariant::Url  
-
* [[https://bugzilla.gnome.org/show_bug.cgi?id=650952 GNOME #650952]] EDS displays misleading warnings such as "libebook-WARNING **: unknown field name `X-GENDER'" (NO FEEDBACK - MINOR)
+
* [https://bugzilla.gnome.org/show_bug.cgi?id=650952 GNOME #650952] EDS displays misleading warnings such as "libebook-WARNING **: unknown field name `X-GENDER'" (MERGED UPSTREAM, master only)
-
* [[https://bugzilla.gnome.org/show_bug.cgi?id=650950 GNOME #650950]] EDS: Queries should iterate over all attributes with the same name for proper matching (ACCEPTED UPSTREAM)
+
* [https://bugzilla.gnome.org/show_bug.cgi?id=650950 GNOME #650950] EDS: Queries should iterate over all attributes with the same name for proper matching (MERGED UPSTREAM, master only)
-
* [[https://bugzilla.gnome.org/show_bug.cgi?id=651054 GNOME #651054]] EDS: Support queries based on "photo" contact field. This is needed for EDS-side QContactAvatar::FieldImageUrl filtering. (ACCEPTED UPSTREAM)
+
* [https://bugzilla.gnome.org/show_bug.cgi?id=651054 GNOME #651054] EDS: Support queries based on "photo" contact field. This is needed for EDS-side QContactAvatar::FieldImageUrl filtering. (MERGED UPSTREAM, master only)
-
* [[https://bugzilla.gnome.org/show_bug.cgi?id=651113 GNOME #651113]] EDS: Support queries based on date field (e.g. birthday, anniversary).
+
* [https://bugzilla.gnome.org/show_bug.cgi?id=651113 GNOME #651113] EDS: Support queries based on date field (e.g. birthday, anniversary). (MERGED UPSTREAM, master only)
 +
* [https://bugzilla.gnome.org/show_bug.cgi?id=651226 GNOME #651226] EDS: e_book_new_system_addressbook() should create source in GConf (REVIEWED by dwmw2)
 +
* [https://bugzilla.gnome.org/show_bug.cgi?id=651433 GNOME #651433] EDS: Possible memory leak in e_book_backend_file_get_contact_list() (ACCEPTED UPSTREAM)
 +
* [https://bugzilla.gnome.org/show_bug.cgi?id=651435 GNOME #651435] EDS: Possible memory leak in e_name_western_reorder_asshole() (ACCEPTED UPSTREAM)
 +
* [https://bugzilla.gnome.org/show_bug.cgi?id=651436 GNOME #651436] EDS: Possible memory leak in e_contact_name_from_string() (ACCEPTED UPSTREAM)
 +
* [https://bugzilla.gnome.org/show_bug.cgi?id=651459 GNOME #651459] EDS: Possible memory leak in e_book_backend_file_changes_foreach_key() (ACCEPTED UPSTREAM)
 +
* [https://bugzilla.gnome.org/show_bug.cgi?id=651461 GNOME #651461] EDS: Possible memory leak in e_book_backend_file_get_changes() (ACCEPTED UPSTREAM)
 +
* [https://bugzilla.gnome.org/show_bug.cgi?id=651466 GNOME #651466] EDS: e_dbhash_new: Close and reopen db handle to avoid memory leak (ACCEPTED UPSTREAM)
 +
* [https://bugzilla.gnome.org/show_bug.cgi?id=651468 GNOME #651468] EDS: Possible memory leak in return_error_and_list()
 +
* [https://bugzilla.gnome.org/show_bug.cgi?id=651541 GNOME #651541] EDS: EBook: Implement optional / delayed vCard parsing (REJECTED for 2.32 by UPSTREAM, IMPLEMENTED in master)
 +
* [https://bugzilla.gnome.org/show_bug.cgi?id=652172 GNOME #652172] EDS: EBookView: Nofify with UIDs Only
 +
* [https://bugzilla.gnome.org/show_bug.cgi?id=652171 GNOME #652171] EDS: EBookView: Avoid initial notifications
 +
 
 +
Contacts:
 +
* [mailto:patrick.ohly@intel.com Patrick Ohly]
 +
* [mailto:christophe.dumez@linux.intel.com Christophe Dumez]

Latest revision as of 07:13, 17 June 2011

QtContacts-EDS

The code is based on existing Maemo 5 EDS plugin, which did not work as-is because of Nokia-specific API extensions.

Necessary changes:

  • avoid ID mapping because it requires reading all contacts at startup:
    • must change EDS to use 32 bit integers as local IDs for that (patch ready)
    • alternatively, collision-safe ID hashing is used in QtContacts-EDS if string IDs are detected at run-time
  • convert between QtContacts and vCard using QtVersit, with EDS specific properties and including custom properties for QtContactDetails which have no other mapping to vCard (same approach as in SyncEvolution QtContacts backend)
  • EDS needs to be patched to support server-side filtering of dates GNOME #651113, photo uris GNOME #651054 and non-unique attributes GNOME #650950.
  • EDS needs to be patched to support fetching of raw vCards (instead of parsed contacts) in EBook GNOME #651541.
  • EDS needs to be patched to support UID-only contact change notifications instead of sending full contacts (for performance) GNOME #652172
  • EDS needs to be patched so that we don't get a notification for each contact in the database on startup GNOME #652171

Goals for initial milestone:

  • full support for all QContactDetails, including custom ones and additional fields of details which map to well-known vCard properties (QContactUrl::SubTypeFavourite, QContactAvatar::videoUrl, QContactOrganization::FieldLocation...)
    • The following contact details are not interoperable with Evolution (but they can be saved and are fully compatible with QtContacts):
      • QContactGeoLocation, QContactAnniversary, QContactOnlineAccount, QContactGender, QContactFamily::FieldChildren (X-CHILDREN), QContactGlobalPresence, QContactFavorite, QContactHobby, QContactPresence, QContactRingtone, QContactSyncTarget
      • QContactOrganization::FieldDepartment is not fully interoperable with libebook/EDS (libebook can only parse one department)
    • There does not seem to be any equivalent for X-EVOLUTION-MANAGER in QtContacts, no mapping is done for this extension
    • QContactOrganization does not have any API for binary (QImage) organization logo (Only URL: QContactOrganization::FieldLocation) but libebook supports both
  • change notifications (added/updated/removed)
    • There does not seem to be any signal in ebook view for selfContactIdChange?
  • mapping of QtContacts filters to EDS queries, with unsupported filters implemented by QtContacts after retrieving contacts (slower than filtering in EDS daemon)
    • Non-native (slower) search used for QContactFavorite::FieldIndex, QContactGeoLocation, QContactAnniversary, QContactGlobalPresence, QContactOnlineAccount, QContactPresence, QContactRingtone.
    • Partially native search is used when CaseSentive match flag is set because EDS does not support case sensitive matching
  • Errors are properly handled and reported to the client application

Goals for later milestones:

  • performance improvement

Testing:

  • Packages for patched evolution-data-server and qtcontacts-eds backend are maintained in eds and devel:meego-ux repositories.

Related bugs:

  • QTMOBILITY-1298 QtVersit does not allow custom properties to have complex types
  • QTMOBILITY-1592 QContactManagerEngine schema definitions are incomplete
  • QTMOBILITY-1590 QtVersit contact importer does not follow RFC-2426 for LOGO/PHOTO value (MERGED UPSTREAM for v1.2.1)
  • QTMOBILITY-1589 QtVersit writes/reads QContactGeoLocation's latitude/longitude in reverse order (Compared to RFC-2426 and libebook)
  • QTMOBILITY-1623 QContactManagerEngine::CompareVariant() does not support QVariant::StringList
  • QTMOBILITY-1667 QContactManagerEngine::CompareVariant() does not support QVariant::Url
  • GNOME #650952 EDS displays misleading warnings such as "libebook-WARNING **: unknown field name `X-GENDER'" (MERGED UPSTREAM, master only)
  • GNOME #650950 EDS: Queries should iterate over all attributes with the same name for proper matching (MERGED UPSTREAM, master only)
  • GNOME #651054 EDS: Support queries based on "photo" contact field. This is needed for EDS-side QContactAvatar::FieldImageUrl filtering. (MERGED UPSTREAM, master only)
  • GNOME #651113 EDS: Support queries based on date field (e.g. birthday, anniversary). (MERGED UPSTREAM, master only)
  • GNOME #651226 EDS: e_book_new_system_addressbook() should create source in GConf (REVIEWED by dwmw2)
  • GNOME #651433 EDS: Possible memory leak in e_book_backend_file_get_contact_list() (ACCEPTED UPSTREAM)
  • GNOME #651435 EDS: Possible memory leak in e_name_western_reorder_asshole() (ACCEPTED UPSTREAM)
  • GNOME #651436 EDS: Possible memory leak in e_contact_name_from_string() (ACCEPTED UPSTREAM)
  • GNOME #651459 EDS: Possible memory leak in e_book_backend_file_changes_foreach_key() (ACCEPTED UPSTREAM)
  • GNOME #651461 EDS: Possible memory leak in e_book_backend_file_get_changes() (ACCEPTED UPSTREAM)
  • GNOME #651466 EDS: e_dbhash_new: Close and reopen db handle to avoid memory leak (ACCEPTED UPSTREAM)
  • GNOME #651468 EDS: Possible memory leak in return_error_and_list()
  • GNOME #651541 EDS: EBook: Implement optional / delayed vCard parsing (REJECTED for 2.32 by UPSTREAM, IMPLEMENTED in master)
  • GNOME #652172 EDS: EBookView: Nofify with UIDs Only
  • GNOME #652171 EDS: EBookView: Avoid initial notifications

Contacts:

Personal tools