Top | ![]() |
![]() |
![]() |
![]() |
ESourceBackendSummarySetupESourceBackendSummarySetup — ESource extension to configure summary fields |
The ESourceBackendSummarySetup extension configures which
Access the extension as follows:
#include <libebook-contacts/libebook-contacts.h> ESourceBackendSummarySetup *extension; extension = e_source_get_extension (source, E_SOURCE_EXTENSION_BACKEND_SUMMARY_SETUP);
The summary configuration is expected to be setup in only one way for a given ESource at creation time. Any configurations made after creation of the book in question will be ignored.
EContactField * e_source_backend_summary_setup_get_summary_fields (ESourceBackendSummarySetup *extension
,);
gint *n_fields
Fetches the
If there are no configured summary fields, the default configuration is assumed
extension |
||
n_fields |
A return location for the number of |
[out] |
An array of n_fields
long, should be freed with g_free()
[transfer full]
Since: 3.8
void e_source_backend_summary_setup_set_summary_fieldsv (ESourceBackendSummarySetup *extension
,EContactField *fields
,);
gint n_fields
Sets the summary fields configured for the given addressbook.
The fields E_CONTACT_UID
and E_CONTACT_REV
are not optional,
they will be stored in the summary regardless of the configured summary.
An empty summary configuration is assumed to be the default summary configuration.
Only
extension |
||
fields |
The array of |
|
n_fields |
The number of |
Since: 3.8
void e_source_backend_summary_setup_set_summary_fields (ESourceBackendSummarySetup *extension
,...
);
Like e_source_backend_summary_setup_set_summary_fieldsv()
, but takes a literal
list of
To configure the address book summary fields with main phone nubmer fields:
#include <libebook/libebook.h> ESourceBackendSummarySetup *extension; extension = e_source_get_extension (source, E_SOURCE_EXTENSION_BACKEND_SUMMARY_SETUP); e_source_backend_summary_setup_set_summary_fields (extension, E_CONTACT_FULL_NAME, E_CONTACT_EMAIL, 0);
Since: 3.8
EContactField * e_source_backend_summary_setup_get_indexed_fields (ESourceBackendSummarySetup *extension
,EBookIndexType **types
,);
gint *n_fields
Fetches the
extension |
||
types |
A return location for the set of |
[out][transfer full] |
n_fields |
The number of elements in the returned arrays. |
[out] |
Since: 3.8
void e_source_backend_summary_setup_set_indexed_fieldsv (ESourceBackendSummarySetup *extension
,EContactField *fields
,EBookIndexType *types
,);
gint n_fields
Defines indexes for quick reference for the given given
The same EContactField may be specified multiple times to create multiple indexes with different characteristics. If an E_BOOK_INDEX_PREFIX index is created it will be used for E_BOOK_QUERY_BEGINS_WITH queries. A E_BOOK_INDEX_SUFFIX index will be constructed efficiently for suffix matching and will be used for E_BOOK_QUERY_ENDS_WITH queries. Similar a E_BOOK_INDEX_PHONE index will optimize E_BOOK_QUERY_EQUALS_PHONE_NUMBER searches.
The specified indexed fields must also be a part of the summary, any indexed fields specified that are not already a part of the summary will be ignored.
extension |
||
fields |
The array of |
|
types |
The array of |
|
n_fields |
The number elements in the passed |
Since: 3.8
void e_source_backend_summary_setup_set_indexed_fields (ESourceBackendSummarySetup *extension
,...
);
Like e_source_backend_summary_setup_set_indexed_fieldsv()
, but takes a literal list of
of indexes.
To give the 'fullname' field an index for prefix and suffix searches:
#include <libebook/libebook.h> ESourceBackendSummarySetup *extension; extension = e_source_get_extension (source, E_SOURCE_EXTENSION_BACKEND_SUMMARY_SETUP); e_source_backend_summary_setup_set_indexed_fields (extension, E_CONTACT_FULL_NAME, E_BOOK_INDEX_PREFIX, E_CONTACT_FULL_NAME, E_BOOK_INDEX_SUFFIX, 0);
Since: 3.8
#define E_SOURCE_EXTENSION_BACKEND_SUMMARY_SETUP "Backend Summary Setup"
Pass this extension name to e_source_get_extension()
to access
ESourceBackendSummarySetup. This is also used as a group name in key files.
Since: 3.8
struct ESourceBackendSummarySetup { };
Contains only private data that should be read and manipulated using the functions below.
Since: 3.8