1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>EBook</title><meta name="generator" content="DocBook XSL Stylesheets V1.64.1"><link rel="home" href="index.html" title="Evolution API Reference: libebook, the Addressbook Library"><link rel="up" href="ch01.html" title="Evolution API Reference: libebook, the Addressbook Library"><link rel="previous" href="ch01.html" title="Evolution API Reference: libebook, the Addressbook Library"><link rel="next" href="libebook-e-book-query.html" title="e-book-query"><link rel="chapter" href="ch01.html" title="Evolution API Reference: libebook, the Addressbook Library"><link rel="refentry" href="EBook.html" title="EBook"><link rel="refentry" href="libebook-e-book-query.html" title="e-book-query"><link rel="refentry" href="EContact.html" title="EContact"><link rel="refentry" href="EVCard.html" title="EVCard"><link rel="refentry" href="EBookListener.html" title="EBookListener"><link rel="refentry" href="EBookView.html" title="EBookView"><link rel="refentry" href="EBookViewListener.html" title="EBookViewListener"><link rel="refentry" href="libebook-e-book-async.html" title="e-book-async"><link rel="refentry" href="libebook-e-book-types.html" title="e-book-types"><link rel="refentry" href="libebook-EAddressWestern.html" title="e-address-western"><link rel="refentry" href="libebook-ENameWestern.html" title="e-name-western"><link rel="section" href="EBook.html#id2447705" title="Object Hierarchy"><link rel="section" href="EBook.html#id2447720" title="Signal Prototypes"><link rel="section" href="EBook.html#id2447779" title="Description"><link rel="section" href="EBook.html#id2447804" title="Details"><link rel="section" href="EBook.html#id2563406" title="Signals"><link rel="section" href="EBook.html#id2563544" title="See Also"><meta name="generator" content="GTK-Doc V1.2 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="ch01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">Evolution API Reference: libebook, the Addressbook Library</th><td><a accesskey="n" href="libebook-e-book-query.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="EBook"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2><span class="refentrytitle">EBook</span></h2><p>EBook — The primary Evolution addressbook client object.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
struct <a href="EBook.html#EBook-struct">EBook</a>;
<a href="EBook.html" title="EBook">EBook</a>* <a href="EBook.html#e-book-new">e_book_new</a> (ESource *source,
GError **error);
gboolean <a href="EBook.html#e-book-remove">e_book_remove</a> (<a href="EBook.html" title="EBook">EBook</a> *book,
GError **error);
gboolean <a href="EBook.html#e-book-get-supported-fields">e_book_get_supported_fields</a> (<a href="EBook.html" title="EBook">EBook</a> *book,
GList **fields,
GError **error);
gboolean <a href="EBook.html#e-book-get-supported-auth-methods">e_book_get_supported_auth_methods</a>
(<a href="EBook.html" title="EBook">EBook</a> *book,
GList **auth_methods,
GError **error);
gboolean <a href="EBook.html#e-book-authenticate-user">e_book_authenticate_user</a> (<a href="EBook.html" title="EBook">EBook</a> *book,
const char *user,
const char *passwd,
const char *auth_method,
GError **error);
gboolean <a href="EBook.html#e-book-get-contact">e_book_get_contact</a> (<a href="EBook.html" title="EBook">EBook</a> *book,
const char *id,
<a href="EContact.html" title="EContact">EContact</a> **contact,
GError **error);
gboolean <a href="EBook.html#e-book-remove-contact">e_book_remove_contact</a> (<a href="EBook.html" title="EBook">EBook</a> *book,
const char *id,
GError **error);
gboolean <a href="EBook.html#e-book-remove-contacts">e_book_remove_contacts</a> (<a href="EBook.html" title="EBook">EBook</a> *book,
GList *ids,
GError **error);
gboolean <a href="EBook.html#e-book-add-contact">e_book_add_contact</a> (<a href="EBook.html" title="EBook">EBook</a> *book,
<a href="EContact.html" title="EContact">EContact</a> *contact,
GError **error);
gboolean <a href="EBook.html#e-book-commit-contact">e_book_commit_contact</a> (<a href="EBook.html" title="EBook">EBook</a> *book,
<a href="EContact.html" title="EContact">EContact</a> *contact,
GError **error);
gboolean <a href="EBook.html#e-book-get-book-view">e_book_get_book_view</a> (<a href="EBook.html" title="EBook">EBook</a> *book,
EBookQuery *query,
GList *requested_fields,
int max_results,
<a href="EBookView.html" title="EBookView">EBookView</a> **book_view,
GError **error);
gboolean <a href="EBook.html#e-book-get-contacts">e_book_get_contacts</a> (<a href="EBook.html" title="EBook">EBook</a> *book,
EBookQuery *query,
GList **contacts,
GError **error);
gboolean <a href="EBook.html#e-book-get-changes">e_book_get_changes</a> (<a href="EBook.html" title="EBook">EBook</a> *book,
char *changeid,
GList **changes,
GError **error);
void <a href="EBook.html#e-book-free-change-list">e_book_free_change_list</a> (GList *change_list);
const char* <a href="EBook.html#e-book-get-uri">e_book_get_uri</a> (<a href="EBook.html" title="EBook">EBook</a> *book);
const char* <a href="EBook.html#e-book-get-static-capabilities">e_book_get_static_capabilities</a> (<a href="EBook.html" title="EBook">EBook</a> *book,
GError **error);
gboolean <a href="EBook.html#e-book-check-static-capability">e_book_check_static_capability</a> (<a href="EBook.html" title="EBook">EBook</a> *book,
const char *cap);
gboolean <a href="EBook.html#e-book-is-writable">e_book_is_writable</a> (<a href="EBook.html" title="EBook">EBook</a> *book);
gboolean <a href="EBook.html#e-book-cancel">e_book_cancel</a> (<a href="EBook.html" title="EBook">EBook</a> *book,
GError **error);
gboolean <a href="EBook.html#e-book-get-self">e_book_get_self</a> (<a href="EContact.html" title="EContact">EContact</a> **contact,
<a href="EBook.html" title="EBook">EBook</a> **book,
GError **error);
gboolean <a href="EBook.html#e-book-set-self">e_book_set_self</a> (<a href="EBook.html" title="EBook">EBook</a> *book,
<a href="EContact.html" title="EContact">EContact</a> *contact,
GError **error);
gboolean <a href="EBook.html#e-book-is-self">e_book_is_self</a> (<a href="EContact.html" title="EContact">EContact</a> *contact);
gboolean <a href="EBook.html#e-book-get-addressbooks">e_book_get_addressbooks</a> (ESourceList **addressbook_sources,
GError **error);
</pre></div><div class="refsect1" lang="en"><a name="id2447705"></a><h2>Object Hierarchy</h2><pre class="synopsis">
GObject
+----EBook
</pre></div><div class="refsect1" lang="en"><a name="id2447720"></a><h2>Signal Prototypes</h2><pre class="synopsis">
"<a href="EBook.html#EBook-backend-died">backend-died</a>"
void user_function (<a href="EBook.html" title="EBook">EBook</a> *ebook,
gpointer user_data);
"<a href="EBook.html#EBook-writable-status">writable-status</a>"
void user_function (<a href="EBook.html" title="EBook">EBook</a> *ebook,
gboolean arg1,
gpointer user_data);
</pre></div><div class="refsect1" lang="en"><a name="id2447779"></a><h2>Description</h2><p>
Represents a complete addressbook. Event notifications and callbacks go to the
<span class="type">e-book-listener</span>. Contrast with <span class="type">e-book-view</span>, which represents a search of the addressbook.
</p></div><div class="refsect1" lang="en"><a name="id2447804"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2447809"></a><h3><a name="EBook-struct"></a>struct EBook</h3><a class="indexterm" name="id2447818"></a><pre class="programlisting">struct EBook;</pre><p>
<a href="EBook.html" title="EBook"><span class="type">EBook</span></a> has no publicly available members.
</p></div><hr><div class="refsect2" lang="en"><a name="id2447833"></a><h3><a name="e-book-new"></a>e_book_new ()</h3><a class="indexterm" name="id2447842"></a><pre class="programlisting"><a href="EBook.html" title="EBook">EBook</a>* e_book_new (ESource *source,
GError **error);</pre><p>
<i class="parameter"><tt>source</tt></i>: An <span class="type">ESource</span> pointer
<i class="parameter"><tt>error</tt></i>: A <span class="type">GError</span> pointer
</p><p>
Creates a new <a href="EBook.html" title="EBook"><span class="type">EBook</span></a> corresponding to the given source. There are
only two operations that are valid on this book at this point:
<tt class="function">e_book_open()</tt>, and <a href="EBook.html#e-book-remove"><tt class="function">e_book_remove()</tt></a>.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>source</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> a new but unopened <a href="EBook.html" title="EBook"><span class="type">EBook</span></a>.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2560961"></a><h3><a name="e-book-remove"></a>e_book_remove ()</h3><a class="indexterm" name="id2560969"></a><pre class="programlisting">gboolean e_book_remove (<a href="EBook.html" title="EBook">EBook</a> *book,
GError **error);</pre><p>
Remove the backing data for this <a href="EBook.html" title="EBook"><span class="type">EBook</span></a>. For example, with the file backend this
deletes the database file. You cannot get it back!</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>book</tt></i>:</span></td><td> an <a href="EBook.html" title="EBook"><span class="type">EBook</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td> a <span class="type">GError</span> to set on failure
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <span class="type">TRUE</span> on success, <span class="type">FALSE</span> on failure.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2561066"></a><h3><a name="e-book-get-supported-fields"></a>e_book_get_supported_fields ()</h3><a class="indexterm" name="id2561074"></a><pre class="programlisting">gboolean e_book_get_supported_fields (<a href="EBook.html" title="EBook">EBook</a> *book,
GList **fields,
GError **error);</pre><p>
Queries <i class="parameter"><tt>book</tt></i> for the list of fields it supports. Mostly for use
by the contact editor so it knows what fields to sensitize.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>book</tt></i>:</span></td><td> an <a href="EBook.html" title="EBook"><span class="type">EBook</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>fields</tt></i>:</span></td><td> a <span class="type">GList</span>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td> a <span class="type">GError</span> to set on failure
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <span class="type">TRUE</span> if successful, <span class="type">FALSE</span> otherwise
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2561191"></a><h3><a name="e-book-get-supported-auth-methods"></a>e_book_get_supported_auth_methods ()</h3><a class="indexterm" name="id2561200"></a><pre class="programlisting">gboolean e_book_get_supported_auth_methods
(<a href="EBook.html" title="EBook">EBook</a> *book,
GList **auth_methods,
GError **error);</pre><p>
Queries <i class="parameter"><tt>book</tt></i> for the list of authentication methods it supports.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>book</tt></i>:</span></td><td> an <a href="EBook.html" title="EBook"><span class="type">EBook</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>auth_methods</tt></i>:</span></td><td> a <span class="type">GList</span>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td> a <span class="type">GError</span> to set on failure
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <span class="type">TRUE</span> if successful, <span class="type">FALSE</span> otherwise
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2561317"></a><h3><a name="e-book-authenticate-user"></a>e_book_authenticate_user ()</h3><a class="indexterm" name="id2561326"></a><pre class="programlisting">gboolean e_book_authenticate_user (<a href="EBook.html" title="EBook">EBook</a> *book,
const char *user,
const char *passwd,
const char *auth_method,
GError **error);</pre><p>
Authenticates <i class="parameter"><tt>user</tt></i> with <i class="parameter"><tt>passwd</tt></i>, using the auth method
<i class="parameter"><tt>auth_method</tt></i>. <i class="parameter"><tt>auth_method</tt></i> must be one of the authentication
methods returned using e_book_get_supported_auth_methods.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>book</tt></i>:</span></td><td> an <a href="EBook.html" title="EBook"><span class="type">EBook</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>user</tt></i>:</span></td><td> a string
</td></tr><tr><td><span class="term"><i class="parameter"><tt>passwd</tt></i>:</span></td><td> a string
</td></tr><tr><td><span class="term"><i class="parameter"><tt>auth_method</tt></i>:</span></td><td> a string
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td> a <span class="type">GError</span> to set on failure
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <span class="type">TRUE</span> if successful, <span class="type">FALSE</span> otherwise
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2561481"></a><h3><a name="e-book-get-contact"></a>e_book_get_contact ()</h3><a class="indexterm" name="id2561489"></a><pre class="programlisting">gboolean e_book_get_contact (<a href="EBook.html" title="EBook">EBook</a> *book,
const char *id,
<a href="EContact.html" title="EContact">EContact</a> **contact,
GError **error);</pre><p>
Fills in <i class="parameter"><tt>contact</tt></i> with the contents of the vcard in <i class="parameter"><tt>book</tt></i>
corresponding to <i class="parameter"><tt>id</tt></i>.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>book</tt></i>:</span></td><td> an <a href="EBook.html" title="EBook"><span class="type">EBook</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>id</tt></i>:</span></td><td> a string
</td></tr><tr><td><span class="term"><i class="parameter"><tt>contact</tt></i>:</span></td><td> an <a href="EContact.html" title="EContact"><span class="type">EContact</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td> a <span class="type">GError</span> to set on failure
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <span class="type">TRUE</span> if successful, <span class="type">FALSE</span> otherwise
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2561629"></a><h3><a name="e-book-remove-contact"></a>e_book_remove_contact ()</h3><a class="indexterm" name="id2561637"></a><pre class="programlisting">gboolean e_book_remove_contact (<a href="EBook.html" title="EBook">EBook</a> *book,
const char *id,
GError **error);</pre><p>
Removes the contact with id <i class="parameter"><tt>id</tt></i> from <i class="parameter"><tt>book</tt></i>.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>book</tt></i>:</span></td><td> an <a href="EBook.html" title="EBook"><span class="type">EBook</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>id</tt></i>:</span></td><td> a string
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td> a <span class="type">GError</span> to set on failure
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <span class="type">TRUE</span> if successful, <span class="type">FALSE</span> otherwise
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2561750"></a><h3><a name="e-book-remove-contacts"></a>e_book_remove_contacts ()</h3><a class="indexterm" name="id2561759"></a><pre class="programlisting">gboolean e_book_remove_contacts (<a href="EBook.html" title="EBook">EBook</a> *book,
GList *ids,
GError **error);</pre><p>
Removes the contacts with ids from the list <i class="parameter"><tt>ids</tt></i> from <i class="parameter"><tt>book</tt></i>. This is
always more efficient than calling e_book_remove_contact_by_id if you
have more than one id to remove, as some backends can implement it
as a batch request.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>book</tt></i>:</span></td><td> an <a href="EBook.html" title="EBook"><span class="type">EBook</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>ids</tt></i>:</span></td><td> an <span class="type">GList</span> of const char *id's
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td> a <span class="type">GError</span> to set on failure
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <span class="type">TRUE</span> if successful, <span class="type">FALSE</span> otherwise
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2561881"></a><h3><a name="e-book-add-contact"></a>e_book_add_contact ()</h3><a class="indexterm" name="id2561890"></a><pre class="programlisting">gboolean e_book_add_contact (<a href="EBook.html" title="EBook">EBook</a> *book,
<a href="EContact.html" title="EContact">EContact</a> *contact,
GError **error);</pre><p>
adds <i class="parameter"><tt>contact</tt></i> to <i class="parameter"><tt>book</tt></i>.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>book</tt></i>:</span></td><td> an <a href="EBook.html" title="EBook"><span class="type">EBook</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>contact</tt></i>:</span></td><td> an <a href="EContact.html" title="EContact"><span class="type">EContact</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td> a <span class="type">GError</span> to set on failure.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <span class="type">TRUE</span> if successful, <span class="type">FALSE</span> otherwise.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2562009"></a><h3><a name="e-book-commit-contact"></a>e_book_commit_contact ()</h3><a class="indexterm" name="id2562017"></a><pre class="programlisting">gboolean e_book_commit_contact (<a href="EBook.html" title="EBook">EBook</a> *book,
<a href="EContact.html" title="EContact">EContact</a> *contact,
GError **error);</pre><p>
applies the changes made to <i class="parameter"><tt>contact</tt></i> to the stored version in
<i class="parameter"><tt>book</tt></i>.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>book</tt></i>:</span></td><td> an <a href="EBook.html" title="EBook"><span class="type">EBook</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>contact</tt></i>:</span></td><td> an <a href="EContact.html" title="EContact"><span class="type">EContact</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td> a <span class="type">GError</span> to set on failure
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <span class="type">TRUE</span> if successful, <span class="type">FALSE</span> otherwise
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2562137"></a><h3><a name="e-book-get-book-view"></a>e_book_get_book_view ()</h3><a class="indexterm" name="id2562145"></a><pre class="programlisting">gboolean e_book_get_book_view (<a href="EBook.html" title="EBook">EBook</a> *book,
EBookQuery *query,
GList *requested_fields,
int max_results,
<a href="EBookView.html" title="EBookView">EBookView</a> **book_view,
GError **error);</pre><p>
Query <i class="parameter"><tt>book</tt></i> with <i class="parameter"><tt>query</tt></i>, creating a <a href="EBookView.html" title="EBookView"><span class="type">EBookView</span></a> in <i class="parameter"><tt>book_view</tt></i> with the fields
specified by <i class="parameter"><tt>requested_fields</tt></i> and limited at <i class="parameter"><tt>max_results</tt></i> records. On an
error, <i class="parameter"><tt>error</tt></i> is set and <span class="type">FALSE</span> returned.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>book</tt></i>:</span></td><td> an <a href="EBook.html" title="EBook"><span class="type">EBook</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>query</tt></i>:</span></td><td> an <span class="type">EBookQuery</span>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>requested_fields</tt></i>:</span></td><td> a <span class="type">GList</span> containing the names of fields to return, or NULL for all
</td></tr><tr><td><span class="term"><i class="parameter"><tt>max_results</tt></i>:</span></td><td> the maximum number of contacts to show (or 0 for all)
</td></tr><tr><td><span class="term"><i class="parameter"><tt>book_view</tt></i>:</span></td><td> A <a href="EBookView.html" title="EBookView"><span class="type">EBookView</span></a> pointer, will be set to the view
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td> a <span class="type">GError</span> to set on failure
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <span class="type">TRUE</span> if successful, <span class="type">FALSE</span> otherwise
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2562356"></a><h3><a name="e-book-get-contacts"></a>e_book_get_contacts ()</h3><a class="indexterm" name="id2562365"></a><pre class="programlisting">gboolean e_book_get_contacts (<a href="EBook.html" title="EBook">EBook</a> *book,
EBookQuery *query,
GList **contacts,
GError **error);</pre><p>
Query <i class="parameter"><tt>book</tt></i> with <i class="parameter"><tt>query</tt></i>, setting <i class="parameter"><tt>contacts</tt></i> to the list of contacts which
matched. On failed, <i class="parameter"><tt>error</tt></i> will be set and <span class="type">FALSE</span> returned.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>book</tt></i>:</span></td><td> an <a href="EBook.html" title="EBook"><span class="type">EBook</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>query</tt></i>:</span></td><td> an <span class="type">EBookQuery</span>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>contacts</tt></i>:</span></td><td> a <span class="type">GList</span> pointer, will be set to the list of contacts
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td> a <span class="type">GError</span> to set on failure
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <span class="type">TRUE</span> on success, <span class="type">FALSE</span> otherwise
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2562521"></a><h3><a name="e-book-get-changes"></a>e_book_get_changes ()</h3><a class="indexterm" name="id2562530"></a><pre class="programlisting">gboolean e_book_get_changes (<a href="EBook.html" title="EBook">EBook</a> *book,
char *changeid,
GList **changes,
GError **error);</pre><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>book</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>changeid</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>changes</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2562625"></a><h3><a name="e-book-free-change-list"></a>e_book_free_change_list ()</h3><a class="indexterm" name="id2562633"></a><pre class="programlisting">void e_book_free_change_list (GList *change_list);</pre><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>change_list</tt></i>:</span></td><td>
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2562668"></a><h3><a name="e-book-get-uri"></a>e_book_get_uri ()</h3><a class="indexterm" name="id2562676"></a><pre class="programlisting">const char* e_book_get_uri (<a href="EBook.html" title="EBook">EBook</a> *book);</pre><p>
Get the URI that this book has loaded. This string should not be freed.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>book</tt></i>:</span></td><td> an <a href="EBook.html" title="EBook"><span class="type">EBook</span></a>
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The URI.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2562735"></a><h3><a name="e-book-get-static-capabilities"></a>e_book_get_static_capabilities ()</h3><a class="indexterm" name="id2562748"></a><pre class="programlisting">const char* e_book_get_static_capabilities (<a href="EBook.html" title="EBook">EBook</a> *book,
GError **error);</pre><p>
Get the list of capabilities which the backend for this address book
supports. This string should not be freed.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>book</tt></i>:</span></td><td> an <a href="EBook.html" title="EBook"><span class="type">EBook</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td> an <span class="type">GError</span> to set on failure
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The capabilities list
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2562812"></a><h3><a name="e-book-check-static-capability"></a>e_book_check_static_capability ()</h3><a class="indexterm" name="id2562820"></a><pre class="programlisting">gboolean e_book_check_static_capability (<a href="EBook.html" title="EBook">EBook</a> *book,
const char *cap);</pre><p>
Check to see if the backend for this address book supports the capability
<i class="parameter"><tt>cap</tt></i>.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>book</tt></i>:</span></td><td> an <a href="EBook.html" title="EBook"><span class="type">EBook</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>cap</tt></i>:</span></td><td> A capability string
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <span class="type">TRUE</span> if the backend supports <i class="parameter"><tt>cap</tt></i>, <span class="type">FALSE</span> otherwise.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2562903"></a><h3><a name="e-book-is-writable"></a>e_book_is_writable ()</h3><a class="indexterm" name="id2562911"></a><pre class="programlisting">gboolean e_book_is_writable (<a href="EBook.html" title="EBook">EBook</a> *book);</pre><p>
Check if this book is writable.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>book</tt></i>:</span></td><td> an <a href="EBook.html" title="EBook"><span class="type">EBook</span></a>
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <span class="type">TRUE</span> if this book is writable, otherwise <span class="type">FALSE</span>.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2562977"></a><h3><a name="e-book-cancel"></a>e_book_cancel ()</h3><a class="indexterm" name="id2562985"></a><pre class="programlisting">gboolean e_book_cancel (<a href="EBook.html" title="EBook">EBook</a> *book,
GError **error);</pre><p>
Used to cancel an already running operation on <i class="parameter"><tt>book</tt></i>. This
function makes a synchronous CORBA to the backend telling it to
cancel the operation. If the operation wasn't cancellable (either
transiently or permanently) or had already comopleted on the server
side, this function will return E_BOOK_STATUS_COULD_NOT_CANCEL, and
the operation will continue uncancelled. If the operation could be
cancelled, this function will return E_BOOK_ERROR_OK, and the
blocked e_book function corresponding to current operation will
return with a status of E_BOOK_STATUS_CANCELLED.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>book</tt></i>:</span></td><td> an <a href="EBook.html" title="EBook"><span class="type">EBook</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td> a <span class="type">GError</span> to set on failure
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <span class="type">TRUE</span> on success, <span class="type">FALSE</span> otherwise
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2563087"></a><h3><a name="e-book-get-self"></a>e_book_get_self ()</h3><a class="indexterm" name="id2563096"></a><pre class="programlisting">gboolean e_book_get_self (<a href="EContact.html" title="EContact">EContact</a> **contact,
<a href="EBook.html" title="EBook">EBook</a> **book,
GError **error);</pre><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>contact</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>book</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2563174"></a><h3><a name="e-book-set-self"></a>e_book_set_self ()</h3><a class="indexterm" name="id2563182"></a><pre class="programlisting">gboolean e_book_set_self (<a href="EBook.html" title="EBook">EBook</a> *book,
<a href="EContact.html" title="EContact">EContact</a> *contact,
GError **error);</pre><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>book</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>contact</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2563260"></a><h3><a name="e-book-is-self"></a>e_book_is_self ()</h3><a class="indexterm" name="id2563269"></a><pre class="programlisting">gboolean e_book_is_self (<a href="EContact.html" title="EContact">EContact</a> *contact);</pre><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>contact</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2563313"></a><h3><a name="e-book-get-addressbooks"></a>e_book_get_addressbooks ()</h3><a class="indexterm" name="id2563321"></a><pre class="programlisting">gboolean e_book_get_addressbooks (ESourceList **addressbook_sources,
GError **error);</pre><p>
Populate *addressbook_sources with the list of all sources which have been
added to Evolution.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>addressbook_sources</tt></i>:</span></td><td> A pointer to a ESourceList* to set
</td></tr><tr><td><span class="term"><i class="parameter"><tt>error</tt></i>:</span></td><td> A pointer to a GError* to set on error
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <span class="type">TRUE</span> if <i class="parameter"><tt>addressbook_sources</tt></i> was set, otherwise <span class="type">FALSE</span>.
</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id2563406"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="id2563411"></a><h3><a name="EBook-backend-died"></a>The "backend-died" signal</h3><pre class="programlisting">void user_function (<a href="EBook.html" title="EBook">EBook</a> *ebook,
gpointer user_data);</pre><p>
The backend for this address book has died.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ebook</tt></i>:</span></td><td>the object which received the signal.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_data</tt></i>:</span></td><td>user data set when the signal handler was connected.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2563468"></a><h3><a name="EBook-writable-status"></a>The "writable-status" signal</h3><pre class="programlisting">void user_function (<a href="EBook.html" title="EBook">EBook</a> *ebook,
gboolean arg1,
gpointer user_data);</pre><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ebook</tt></i>:</span></td><td>the object which received the signal.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>arg1</tt></i>:</span></td><td>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_data</tt></i>:</span></td><td>user data set when the signal handler was connected.</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id2563544"></a><h2>See Also</h2><p>
<span class="type">e-book-listener</span>, <span class="type">e-book-view</span>
</p></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="ch01.html"><b><<Evolution API Reference: libebook, the Addressbook Library</b></a></td><td align="right"><a accesskey="n" href="libebook-e-book-query.html"><b>e-book-query>></b></a></td></tr></table></body></html>
|