One design decision in the PIM API design is that there is only a single UI. Sorting is global and the same for all views.
Sorting is highly specific to local rules. This goes beyond taking the local character set and collation into account. In addition, some countries also have rules about ignoring certain name parts (Tussenvoegels in the Netherland, for example).
Deployment as part of specific UIs might also lead to different sort and search criteria. Therefore SyncEvolution provides a "plugin mechanism": at compile time, the actual implementation file can be chosen via the --enable-dbus-service-pim parameter.
SyncEvolution will provide a default sort and search implementation, based on boost::locale (and thus ICU) to handle UTF-8 correctly. It will *not* support stripping Tussenvoegels.
Searching has two different use cases:
- A user looks up a contact by entering a search text.
- The telephone system provides a caller ID which needs
to be matched with a contact.
Manager.SetSortOrder/GetSortOrder - control sorting
Manager.Search - start searching
ViewControl/ViewAgent - handle search results