Evolution-Data-Server Manual: Address Book Backend (libedata-book) | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
Synopsis
struct EDataBookView; EDataBookView * e_data_book_view_new (struct _EBookBackend *backend
,EBookBackendSExp *sexp
,GDBusConnection *connection
,const gchar *object_path
,GError **error
); struct _EBookBackend * e_data_book_view_get_backend (EDataBookView *view
); GDBusConnection * e_data_book_view_get_connection (EDataBookView *view
); const gchar * e_data_book_view_get_object_path (EDataBookView *view
); EBookBackendSExp * e_data_book_view_get_sexp (EDataBookView *view
); EBookClientViewFlags e_data_book_view_get_flags (EDataBookView *view
); void e_data_book_view_notify_update (EDataBookView *view
,const EContact *contact
); void e_data_book_view_notify_update_vcard (EDataBookView *view
,const gchar *id
,const gchar *vcard
); void e_data_book_view_notify_update_prefiltered_vcard (EDataBookView *view
,const gchar *id
,const gchar *vcard
); void e_data_book_view_notify_remove (EDataBookView *view
,const gchar *id
); void e_data_book_view_notify_complete (EDataBookView *view
,const GError *error
); void e_data_book_view_notify_progress (EDataBookView *view
,guint percent
,const gchar *message
); GHashTable * e_data_book_view_get_fields_of_interest (EDataBookView *view
);
Properties
"backend" EBookBackend* : Read / Write / Construct Only "connection" GDBusConnection* : Read / Write / Construct Only "object-path" gchar* : Read / Write / Construct Only "sexp" EBookBackendSExp* : Read / Write / Construct Only
Details
e_data_book_view_new ()
EDataBookView * e_data_book_view_new (struct _EBookBackend *backend
,EBookBackendSExp *sexp
,GDBusConnection *connection
,const gchar *object_path
,GError **error
);
Creates a new EDataBookView and exports its D-Bus interface on
connection
at object_path
. If an error occurs while exporting,
the function sets error
and returns NULL
.
|
an EBookBackend |
|
an EBookBackendSExp |
|
a GDBusConnection |
|
an object path for the view |
|
return location for a GError, or NULL
|
Returns : |
an EDataBookView |
e_data_book_view_get_backend ()
struct _EBookBackend * e_data_book_view_get_backend (EDataBookView *view
);
Gets the backend that view
is querying.
|
an EDataBookView |
Returns : |
The associated EBookBackend. |
e_data_book_view_get_connection ()
GDBusConnection * e_data_book_view_get_connection (EDataBookView *view
);
Returns the GDBusConnection on which the AddressBookView D-Bus interface is exported.
|
an EDataBookView |
Returns : |
the GDBusConnection |
Since 3.8
e_data_book_view_get_object_path ()
const gchar * e_data_book_view_get_object_path (EDataBookView *view
);
Returns the object path at which the AddressBookView D-Bus interface is exported.
|
an EDataBookView |
Returns : |
the object path |
Since 3.8
e_data_book_view_get_sexp ()
EBookBackendSExp * e_data_book_view_get_sexp (EDataBookView *view
);
Gets the s-expression used for matching contacts to view
.
|
an EDataBookView |
Returns : |
The EBookBackendSExp used. |
Since 3.8
e_data_book_view_get_flags ()
EBookClientViewFlags e_data_book_view_get_flags (EDataBookView *view
);
Gets the EBookClientViewFlags that control the behaviour of view
.
|
an EDataBookView |
Returns : |
the flags for view . |
Since 3.4
e_data_book_view_notify_update ()
void e_data_book_view_notify_update (EDataBookView *view
,const EContact *contact
);
Notify listeners that contact
has changed. This can
trigger an add, change or removal event depending on
whether the change causes the contact to start matching,
no longer match, or stay matching the query specified
by view
.
|
an EDataBookView |
|
an EContact |
e_data_book_view_notify_update_vcard ()
void e_data_book_view_notify_update_vcard (EDataBookView *view
,const gchar *id
,const gchar *vcard
);
Notify listeners that vcard
has changed. This can
trigger an add, change or removal event depending on
whether the change causes the contact to start matching,
no longer match, or stay matching the query specified
by view
. This method should be preferred over
e_data_book_view_notify_update()
when the native
representation of a contact is a vCard.
|
an EDataBookView |
|
a plain vCard |
e_data_book_view_notify_update_prefiltered_vcard ()
void e_data_book_view_notify_update_prefiltered_vcard (EDataBookView *view
,const gchar *id
,const gchar *vcard
);
Notify listeners that vcard
has changed. This can
trigger an add, change or removal event depending on
whether the change causes the contact to start matching,
no longer match, or stay matching the query specified
by view
. This method should be preferred over
e_data_book_view_notify_update()
when the native
representation of a contact is a vCard.
The important difference between this method and
e_data_book_view_notify_update()
and
e_data_book_view_notify_update_vcard()
is
that it doesn't match the contact against the book view query to see if it
should be included, it assumes that this has been done and the contact is
known to exist in the view.
|
an EDataBookView |
|
the UID of this contact |
|
a plain vCard |
e_data_book_view_notify_remove ()
void e_data_book_view_notify_remove (EDataBookView *view
,const gchar *id
);
Notify listeners that a contact specified by id
was removed from view
.
|
an EDataBookView |
|
a unique contact ID |
e_data_book_view_notify_complete ()
void e_data_book_view_notify_complete (EDataBookView *view
,const GError *error
);
Notifies listeners that all pending updates on view
have been sent. The listener's information should now be
in sync with the backend's.
|
an EDataBookView |
|
the error of the query, if any |
e_data_book_view_notify_progress ()
void e_data_book_view_notify_progress (EDataBookView *view
,guint percent
,const gchar *message
);
Provides listeners with a human-readable text describing the current backend operation. This can be used for progress reporting.
|
an EDataBookView |
|
percent done; use -1 when not available |
|
a text message |
Since 3.2
e_data_book_view_get_fields_of_interest ()
GHashTable * e_data_book_view_get_fields_of_interest
(EDataBookView *view
);
|
an EDataBookView |
Returns : |
Hash table of field names which the listener is interested in.
Backends can return fully populated objects, but the listener advertised
that it will use only these. Returns NULL for all available fields.
Note: The data pointer in the hash table has no special meaning, it's
only GINT_TO_POINTER(1) for easier checking. Also, field names are
compared case insensitively. |
Property Details
The "backend"
property
"backend" EBookBackend* : Read / Write / Construct Only
The backend being monitored.
The "connection"
property
"connection" GDBusConnection* : Read / Write / Construct Only
The GDBusConnection on which to export the view interface.
The "object-path"
property
"object-path" gchar* : Read / Write / Construct Only
The object path at which to export the view interface.
Default value: NULL
The "sexp"
property
"sexp" EBookBackendSExp* : Read / Write / Construct Only
The query expression for this view.