| Evolution API Reference: libebook, the Addressbook Library | ||||
|---|---|---|---|---|
EBookViewEBookView — A view of the contacts in an EBook |
EBookView;
EBookView* e_book_view_new (EBook *book,
EBookQuery *query,
DBusGProxy *view_proxy);
void e_book_view_start (EBookView *book_view);
void e_book_view_stop (EBookView *book_view);
struct _EBook* e_book_view_get_book (EBookView *book_view);
gboolean e_book_view_get_parse_vcards (EBookView *book_view);
void e_book_view_set_parse_vcards (EBookView *book_view,
gboolean parse_vcards);
struct EBookQuery* e_book_view_get_query (EBookView *book_view);
gboolean e_book_view_is_freezable (EBookView *book_view);
void e_book_view_set_freezable (EBookView *book_view,
gboolean freezable);
void e_book_view_set_sort_order (EBookView *book_view,
const gchar *query_term);
void e_book_view_thaw (EBookView *book_view);
"contacts-added" : Run Last "contacts-changed" : Run Last "contacts-removed" : Run Last "sequence-complete" : Run Last "status-message" : Run Last
EBookView is a (potentially-filtered) view of the contacts in an EBook. It provides signals for acting upon the addition, removal, or modification of contacts.
Instead of creating a new EBookView directly, you must retrieve it from an
EBook with e_book_async_get_book_view() (or e_book_get_book_view() if
blocking is acceptable).
typedef struct _EBookView EBookView;
All the fields of this structure are private to the object's implementation and should never be accessed directly.
EBookView* e_book_view_new (EBook *book, EBookQuery *query, DBusGProxy *view_proxy);
Creates a new EBookView based on EBook and listening to view_proxy. This
is a private function, applications should call e_book_get_book_view or
e_book_async_get_book_view.
book : |
an EBook |
query : |
an EBookQuery upon which the view is based |
view_proxy : |
The DBusGProxy to get signals from |
| Returns : | A new EBookView. |
void e_book_view_start (EBookView *book_view);
Tells book_view to start processing events.
book_view : |
an EBookView |
void e_book_view_stop (EBookView *book_view);
Tells book_view to stop processing events.
book_view : |
an EBookView |
struct _EBook* e_book_view_get_book (EBookView *book_view);
Retrieves book_view's parent EBook. This is owned by the EBookView, so use
g_object_ref() and g_object_unref() as necessary.
gboolean e_book_view_get_parse_vcards (EBookView *book_view);
Describes whether book_view parses contact vCards into EContact objects.
See e_book_view_set_parse_vcards().
void e_book_view_set_parse_vcards (EBookView *book_view, gboolean parse_vcards);
Tells the book_view how to send vCards in its signals. When
parse_vcards is FALSE the unparsed vCards are emitted as NULL terminated
array of strings. The receiver is responsible for parsing them. When
passing TRUE a GList of EContact instances is emitted. This is the
default behavior.
struct EBookQuery* e_book_view_get_query (EBookView *book_view);
Retrieves book_view's EBookQuery. This is owned by the EBookView, so use
g_object_ref() and g_object_unref() as necessary.
book_view : |
an EBookView |
| Returns : | book_view's EBookQuery.
|
gboolean e_book_view_is_freezable (EBookView *book_view);
Describes whether book_view is freezable. See e_book_view_set_freezable().
book_view : |
an EBookView |
| Returns : | TRUE if book_view is freezable.
|
void e_book_view_set_freezable (EBookView *book_view, gboolean freezable);
If freezable is TRUE and the back-end supports being frozen, this will
prevent book_view's subsequent EBookView::contacts-added signals from being
emitted. Once e_book_view_thaw() is called on book_view, these signals will
be emitted at once.
Note that book_view will continue "freezing" until
e_book_view_set_freezable() is called with freezable set to FALSE, even if
you call e_book_view_thaw() on it.
book_view : |
an EBookView |
freezable : |
TRUE to make book_view freezable, FALSE to make it unfreezable
|
void e_book_view_set_sort_order (EBookView *book_view, const gchar *query_term);
Sets the retrieval ordering of the book view to be based on the provided
query_term.
book_view : |
an EBookView |
query_term : |
the name of the field to order the view by |
void e_book_view_thaw (EBookView *book_view);
Enables notifications from book_view and emits all the signals that were
halted while book_view was frozen. See e_book_view_set_freezable().
book_view : |
an EBookView |
"contacts-added" signalvoid user_function (EBookView *view, gpointer vcards, gpointer user_data) : Run Last
This signal is emitted when contacts are added to the addressbook. When a large number of contacts are changed at once, the change notifications may be split up into smaller batches. When the final batch notification is sent, "sequence-complete" will be emitted.
view : |
an EBookView |
vcards : |
a NULL-terminated array of vCard strings (which must not be
altered or freed)
|
user_data : |
user data set when the signal handler was connected. |
"contacts-changed" signalvoid user_function (EBookView *view, gpointer vcards, gpointer user_data) : Run Last
This signal is emitted when contacts in the addressbook are modified. A batch of contacts may be split into several emissions. When a large number of contacts are changed at once, the change notifications may be split up into smaller batches. When the final batch notification is sent, "sequence-complete" will be emitted.
view : |
an EBookView |
vcards : |
a NULL-terminated array of vCard strings (which must not be
altered or freed)
|
user_data : |
user data set when the signal handler was connected. |
"contacts-removed" signalvoid user_function (EBookView *view, gpointer ids, gpointer user_data) : Run Last
This signal is emitted when contacts are removed from the addressbook. When a large number of contacts are changed at once, the change notifications may be split up into smaller batches. When the final batch notification is sent, "sequence-complete" will be emitted.
view : |
an EBookView |
ids : |
a NULL-terminated array of contact UID strings (which must not be
altered or freed)
|
user_data : |
user data set when the signal handler was connected. |
"sequence-complete" signalvoid user_function (EBookView *view, gint status, gpointer user_data) : Run Last
This signal is emitted when the view has finished transmitting contacts for "contacts-added", "contacts-changed", or "contacts-removed" sequences.
view : |
an EBookView |
status : |
the EBookViewStatus of the sequence transmission |
user_data : |
user data set when the signal handler was connected. |
"status-message" signalvoid user_function (EBookView *view, gchar *message, gpointer user_data) : Run Last
This signal is emitted when the back-end sends a status message (such as "Loading...").
It is not generally useful, and can safely be ignored.
view : |
an EBookView |
message : |
a string containing the message |
user_data : |
user data set when the signal handler was connected. |