EBookBackendSqliteDB: Adding cursor related APIs
Added the following APIs:
o e_book_backend_sqlitedb_cursor_new()
Creates a cursor for a given query expression and sort order
o e_book_backend_sqlitedb_cursor_free()
Frees a cursor and it's resources
o e_book_backend_sqlitedb_cursor_move_by()
Moves the cursor and fetches results
Moving the cursor now has 3 possible "origins":
o EBSDB_CURSOR_ORIGIN_CURRENT:
Fetch results and move from the current
cursor position
o EBSDB_CURSOR_ORIGIN_PREVIOUS:
Fetch results and move from the previous
cursor position, practical for refreshing
a result set after the addressbook changes
o EBSDB_CURSOR_ORIGIN_RESET:
Fetch results from the beginning (or end,
if moving backwards through results).
To achieve the EBSDB_CURSOR_ORIGIN_PREVIOUS origin, the cursor
holds on to two cursor states at all times (the current cursor
state and previous cursor state).
o e_book_backend_sqlitedb_cursor_set_target_alphabetic_index()
To set the cursor target by alphabetic index, also added
e_book_backend_sqlitedb_ref_collator() to get a hold of the active
collator which can be used to list the active alphabet attributes.
o e_book_backend_sqlite_cursor_calculate()
Calculates the position / total values of a cursor.
o e_book_backend_sqlitedb_cursor_set_sexp()
Sets the search expression for a given cursor
o e_book_backend_sqlitedb_get/set_locale()
Locale setting is now only ever guessed when creating a new addressbook
before e_book_backend_sqlitedb_set_locale() is called, setting the locale
will save the localization setting and it will be reused on subsequent
accesses. If and when a locale setting is changed, the contact sort
keys are regenerated with a new ECollator for the new locale.
o e_book_backend_sqlitedb_cursor_compare()
An api to compare the cursor with an EContact, this allows
EDataBookCursor to track total / position when the addressbook is
modified without constantly recalculating it with SQLite queries.