1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>e-book-backend-db-cache</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
<link rel="home" href="index.html" title="Evolution-Data-Server Manual: Address Book Backend (libedata-book)">
8
<link rel="up" href="ch01.html" title="Evolution-Data-Server Manual: Address Book Backend (libedata-book)">
9
<link rel="prev" href="EBookBackendCache.html" title="EBookBackendCache">
10
<link rel="next" href="EBookBackendFactory.html" title="EBookBackendFactory">
11
<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17
<td><a accesskey="p" href="EBookBackendCache.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20
<th width="100%" align="center">Evolution-Data-Server Manual: Address Book Backend (libedata-book)</th>
21
<td><a accesskey="n" href="EBookBackendFactory.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#libedata-book-e-book-backend-db-cache.synopsis" class="shortcut">Top</a>
26
<a href="#libedata-book-e-book-backend-db-cache.description" class="shortcut">Description</a>
29
<div class="refentry" title="e-book-backend-db-cache">
30
<a name="libedata-book-e-book-backend-db-cache"></a><div class="titlepage"></div>
31
<div class="refnamediv"><table width="100%"><tr>
33
<h2><span class="refentrytitle"><a name="libedata-book-e-book-backend-db-cache.top_of_page"></a>e-book-backend-db-cache</span></h2>
34
<p>e-book-backend-db-cache</p>
36
<td valign="top" align="right"></td>
38
<div class="refsynopsisdiv" title="Synopsis">
39
<a name="libedata-book-e-book-backend-db-cache.synopsis"></a><h2>Synopsis</h2>
40
<pre class="synopsis"><span class="returnvalue">EContact</span>* <a class="link" href="libedata-book-e-book-backend-db-cache.html#e-book-backend-db-cache-get-contact" title="e_book_backend_db_cache_get_contact ()">e_book_backend_db_cache_get_contact</a> (<em class="parameter"><code><span class="type">DB</span> *db</code></em>,
41
<em class="parameter"><code>const <span class="type">gchar</span> *uid</code></em>);
42
<span class="returnvalue">void</span> <a class="link" href="libedata-book-e-book-backend-db-cache.html#string-to-dbt" title="string_to_dbt ()">string_to_dbt</a> (<em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>,
43
<em class="parameter"><code><span class="type">DBT</span> *dbt</code></em>);
44
<span class="returnvalue">gchar</span> * <a class="link" href="libedata-book-e-book-backend-db-cache.html#e-book-backend-db-cache-get-filename" title="e_book_backend_db_cache_get_filename ()">e_book_backend_db_cache_get_filename</a>
45
(<em class="parameter"><code><span class="type">DB</span> *db</code></em>);
46
<span class="returnvalue">void</span> <a class="link" href="libedata-book-e-book-backend-db-cache.html#e-book-backend-db-cache-set-filename" title="e_book_backend_db_cache_set_filename ()">e_book_backend_db_cache_set_filename</a>
47
(<em class="parameter"><code><span class="type">DB</span> *db</code></em>,
48
<em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>);
49
<span class="returnvalue">gboolean</span> <a class="link" href="libedata-book-e-book-backend-db-cache.html#e-book-backend-db-cache-add-contact" title="e_book_backend_db_cache_add_contact ()">e_book_backend_db_cache_add_contact</a> (<em class="parameter"><code><span class="type">DB</span> *db</code></em>,
50
<em class="parameter"><code><span class="type">EContact</span> *contact</code></em>);
51
<span class="returnvalue">gboolean</span> <a class="link" href="libedata-book-e-book-backend-db-cache.html#e-book-backend-db-cache-remove-contact" title="e_book_backend_db_cache_remove_contact ()">e_book_backend_db_cache_remove_contact</a>
52
(<em class="parameter"><code><span class="type">DB</span> *db</code></em>,
53
<em class="parameter"><code>const <span class="type">gchar</span> *uid</code></em>);
54
<span class="returnvalue">gboolean</span> <a class="link" href="libedata-book-e-book-backend-db-cache.html#e-book-backend-db-cache-check-contact" title="e_book_backend_db_cache_check_contact ()">e_book_backend_db_cache_check_contact</a>
55
(<em class="parameter"><code><span class="type">DB</span> *db</code></em>,
56
<em class="parameter"><code>const <span class="type">gchar</span> *uid</code></em>);
57
<span class="returnvalue">GList</span>* <a class="link" href="libedata-book-e-book-backend-db-cache.html#e-book-backend-db-cache-get-contacts" title="e_book_backend_db_cache_get_contacts ()">e_book_backend_db_cache_get_contacts</a>
58
(<em class="parameter"><code><span class="type">DB</span> *db</code></em>,
59
<em class="parameter"><code>const <span class="type">gchar</span> *query</code></em>);
60
<span class="returnvalue">gboolean</span> <a class="link" href="libedata-book-e-book-backend-db-cache.html#e-book-backend-db-cache-exists" title="e_book_backend_db_cache_exists ()">e_book_backend_db_cache_exists</a> (<em class="parameter"><code>const <span class="type">gchar</span> *uri</code></em>);
61
<span class="returnvalue">void</span> <a class="link" href="libedata-book-e-book-backend-db-cache.html#e-book-backend-db-cache-set-populated" title="e_book_backend_db_cache_set_populated ()">e_book_backend_db_cache_set_populated</a>
62
(<em class="parameter"><code><span class="type">DB</span> *db</code></em>);
63
<span class="returnvalue">gboolean</span> <a class="link" href="libedata-book-e-book-backend-db-cache.html#e-book-backend-db-cache-is-populated" title="e_book_backend_db_cache_is_populated ()">e_book_backend_db_cache_is_populated</a>
64
(<em class="parameter"><code><span class="type">DB</span> *db</code></em>);
65
<span class="returnvalue">GPtrArray</span>* <a class="link" href="libedata-book-e-book-backend-db-cache.html#e-book-backend-db-cache-search" title="e_book_backend_db_cache_search ()">e_book_backend_db_cache_search</a> (<em class="parameter"><code><span class="type">DB</span> *db</code></em>,
66
<em class="parameter"><code>const <span class="type">gchar</span> *query</code></em>);
67
<span class="returnvalue">void</span> <a class="link" href="libedata-book-e-book-backend-db-cache.html#e-book-backend-db-cache-set-time" title="e_book_backend_db_cache_set_time ()">e_book_backend_db_cache_set_time</a> (<em class="parameter"><code><span class="type">DB</span> *db</code></em>,
68
<em class="parameter"><code>const <span class="type">gchar</span> *t</code></em>);
69
<span class="returnvalue">gchar</span> * <a class="link" href="libedata-book-e-book-backend-db-cache.html#e-book-backend-db-cache-get-time" title="e_book_backend_db_cache_get_time ()">e_book_backend_db_cache_get_time</a> (<em class="parameter"><code><span class="type">DB</span> *db</code></em>);
72
<div class="refsect1" title="Description">
73
<a name="libedata-book-e-book-backend-db-cache.description"></a><h2>Description</h2>
77
<div class="refsect1" title="Details">
78
<a name="libedata-book-e-book-backend-db-cache.details"></a><h2>Details</h2>
79
<div class="refsect2" title="e_book_backend_db_cache_get_contact ()">
80
<a name="e-book-backend-db-cache-get-contact"></a><h3>e_book_backend_db_cache_get_contact ()</h3>
81
<pre class="programlisting"><span class="returnvalue">EContact</span>* e_book_backend_db_cache_get_contact (<em class="parameter"><code><span class="type">DB</span> *db</code></em>,
82
<em class="parameter"><code>const <span class="type">gchar</span> *uid</code></em>);</pre>
84
Get a cached contact. Note that the returned <span class="type">EContact</span> will be
85
newly created, and must be unreffed by the caller when no longer
88
<div class="variablelist"><table border="0">
89
<col align="left" valign="top">
92
<td><p><span class="term"><em class="parameter"><code>db</code></em> :</span></p></td>
97
<td><p><span class="term"><em class="parameter"><code>uid</code></em> :</span></p></td>
98
<td>a unique contact ID
102
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
103
<td> A cached <span class="type">EContact</span>, or <code class="literal">NULL</code> if <em class="parameter"><code>uid</code></em> is not cached.
110
<div class="refsect2" title="string_to_dbt ()">
111
<a name="string-to-dbt"></a><h3>string_to_dbt ()</h3>
112
<pre class="programlisting"><span class="returnvalue">void</span> string_to_dbt (<em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>,
113
<em class="parameter"><code><span class="type">DBT</span> *dbt</code></em>);</pre>
116
<div class="variablelist"><table border="0">
117
<col align="left" valign="top">
120
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
125
<td><p><span class="term"><em class="parameter"><code>dbt</code></em> :</span></p></td>
133
<div class="refsect2" title="e_book_backend_db_cache_get_filename ()">
134
<a name="e-book-backend-db-cache-get-filename"></a><h3>e_book_backend_db_cache_get_filename ()</h3>
135
<pre class="programlisting"><span class="returnvalue">gchar</span> * e_book_backend_db_cache_get_filename
136
(<em class="parameter"><code><span class="type">DB</span> *db</code></em>);</pre>
138
Get the filename for db cacahe file.
140
<div class="variablelist"><table border="0">
141
<col align="left" valign="top">
144
<td><p><span class="term"><em class="parameter"><code>db</code></em> :</span></p></td>
149
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
157
<div class="refsect2" title="e_book_backend_db_cache_set_filename ()">
158
<a name="e-book-backend-db-cache-set-filename"></a><h3>e_book_backend_db_cache_set_filename ()</h3>
159
<pre class="programlisting"><span class="returnvalue">void</span> e_book_backend_db_cache_set_filename
160
(<em class="parameter"><code><span class="type">DB</span> *db</code></em>,
161
<em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>);</pre>
163
Set the filename for db cacahe file.
165
<div class="variablelist"><table border="0">
166
<col align="left" valign="top">
169
<td><p><span class="term"><em class="parameter"><code>db</code></em> :</span></p></td>
174
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
175
<td>filename to be set
182
<div class="refsect2" title="e_book_backend_db_cache_add_contact ()">
183
<a name="e-book-backend-db-cache-add-contact"></a><h3>e_book_backend_db_cache_add_contact ()</h3>
184
<pre class="programlisting"><span class="returnvalue">gboolean</span> e_book_backend_db_cache_add_contact (<em class="parameter"><code><span class="type">DB</span> *db</code></em>,
185
<em class="parameter"><code><span class="type">EContact</span> *contact</code></em>);</pre>
187
Adds <em class="parameter"><code>contact</code></em> to <em class="parameter"><code>cache</code></em>.
189
<div class="variablelist"><table border="0">
190
<col align="left" valign="top">
193
<td><p><span class="term"><em class="parameter"><code>db</code></em> :</span></p></td>
198
<td><p><span class="term"><em class="parameter"><code>contact</code></em> :</span></p></td>
199
<td>an <span class="type">EContact</span>
203
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
204
<td> <code class="literal">TRUE</code> if the contact was cached successfully, <code class="literal">FALSE</code> otherwise.
211
<div class="refsect2" title="e_book_backend_db_cache_remove_contact ()">
212
<a name="e-book-backend-db-cache-remove-contact"></a><h3>e_book_backend_db_cache_remove_contact ()</h3>
213
<pre class="programlisting"><span class="returnvalue">gboolean</span> e_book_backend_db_cache_remove_contact
214
(<em class="parameter"><code><span class="type">DB</span> *db</code></em>,
215
<em class="parameter"><code>const <span class="type">gchar</span> *uid</code></em>);</pre>
217
Removes the contact identified by <em class="parameter"><code>uid</code></em> from <em class="parameter"><code>cache</code></em>.
219
<div class="variablelist"><table border="0">
220
<col align="left" valign="top">
223
<td><p><span class="term"><em class="parameter"><code>db</code></em> :</span></p></td>
228
<td><p><span class="term"><em class="parameter"><code>uid</code></em> :</span></p></td>
229
<td>a unique contact ID
233
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
234
<td> <code class="literal">TRUE</code> if the contact was found and removed, <code class="literal">FALSE</code> otherwise.
241
<div class="refsect2" title="e_book_backend_db_cache_check_contact ()">
242
<a name="e-book-backend-db-cache-check-contact"></a><h3>e_book_backend_db_cache_check_contact ()</h3>
243
<pre class="programlisting"><span class="returnvalue">gboolean</span> e_book_backend_db_cache_check_contact
244
(<em class="parameter"><code><span class="type">DB</span> *db</code></em>,
245
<em class="parameter"><code>const <span class="type">gchar</span> *uid</code></em>);</pre>
247
Checks if the contact identified by <em class="parameter"><code>uid</code></em> exists in <em class="parameter"><code>cache</code></em>.
249
<div class="variablelist"><table border="0">
250
<col align="left" valign="top">
253
<td><p><span class="term"><em class="parameter"><code>db</code></em> :</span></p></td>
258
<td><p><span class="term"><em class="parameter"><code>uid</code></em> :</span></p></td>
259
<td>a unique contact ID
263
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
264
<td> <code class="literal">TRUE</code> if the cache contains the contact, <code class="literal">FALSE</code> otherwise.
271
<div class="refsect2" title="e_book_backend_db_cache_get_contacts ()">
272
<a name="e-book-backend-db-cache-get-contacts"></a><h3>e_book_backend_db_cache_get_contacts ()</h3>
273
<pre class="programlisting"><span class="returnvalue">GList</span>* e_book_backend_db_cache_get_contacts
274
(<em class="parameter"><code><span class="type">DB</span> *db</code></em>,
275
<em class="parameter"><code>const <span class="type">gchar</span> *query</code></em>);</pre>
277
Returns a list of <span class="type">EContact</span> elements from <em class="parameter"><code>cache</code></em> matching <em class="parameter"><code>query</code></em>.
278
When done with the list, the caller must unref the contacts and
281
<div class="variablelist"><table border="0">
282
<col align="left" valign="top">
285
<td><p><span class="term"><em class="parameter"><code>db</code></em> :</span></p></td>
290
<td><p><span class="term"><em class="parameter"><code>query</code></em> :</span></p></td>
295
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
296
<td> A <span class="type">GList</span> of pointers to <span class="type">EContact</span>.
303
<div class="refsect2" title="e_book_backend_db_cache_exists ()">
304
<a name="e-book-backend-db-cache-exists"></a><h3>e_book_backend_db_cache_exists ()</h3>
305
<pre class="programlisting"><span class="returnvalue">gboolean</span> e_book_backend_db_cache_exists (<em class="parameter"><code>const <span class="type">gchar</span> *uri</code></em>);</pre>
307
Checks if an <a class="link" href="EBookBackendCache.html" title="EBookBackendCache"><span class="type">EBookBackendCache</span></a> exists at <em class="parameter"><code>uri</code></em>.
309
<div class="variablelist"><table border="0">
310
<col align="left" valign="top">
313
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
314
<td>URI for the cache
318
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
319
<td> <code class="literal">TRUE</code> if cache exists, <code class="literal">FALSE</code> if not.
326
<div class="refsect2" title="e_book_backend_db_cache_set_populated ()">
327
<a name="e-book-backend-db-cache-set-populated"></a><h3>e_book_backend_db_cache_set_populated ()</h3>
328
<pre class="programlisting"><span class="returnvalue">void</span> e_book_backend_db_cache_set_populated
329
(<em class="parameter"><code><span class="type">DB</span> *db</code></em>);</pre>
331
Flags <em class="parameter"><code>cache</code></em> as being populated - that is, it is up-to-date on the
332
contents of the book it's caching.
334
<div class="variablelist"><table border="0">
335
<col align="left" valign="top">
337
<td><p><span class="term"><em class="parameter"><code>db</code></em> :</span></p></td>
344
<div class="refsect2" title="e_book_backend_db_cache_is_populated ()">
345
<a name="e-book-backend-db-cache-is-populated"></a><h3>e_book_backend_db_cache_is_populated ()</h3>
346
<pre class="programlisting"><span class="returnvalue">gboolean</span> e_book_backend_db_cache_is_populated
347
(<em class="parameter"><code><span class="type">DB</span> *db</code></em>);</pre>
350
<div class="variablelist"><table border="0">
351
<col align="left" valign="top">
354
<td><p><span class="term"><em class="parameter"><code>db</code></em> :</span></p></td>
359
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
367
<div class="refsect2" title="e_book_backend_db_cache_search ()">
368
<a name="e-book-backend-db-cache-search"></a><h3>e_book_backend_db_cache_search ()</h3>
369
<pre class="programlisting"><span class="returnvalue">GPtrArray</span>* e_book_backend_db_cache_search (<em class="parameter"><code><span class="type">DB</span> *db</code></em>,
370
<em class="parameter"><code>const <span class="type">gchar</span> *query</code></em>);</pre>
372
Returns an array of pointers to unique contact ID strings for contacts
373
in <em class="parameter"><code>cache</code></em> matching <em class="parameter"><code>query</code></em>. When done with the array, the caller must
374
free the ID strings and the array.
376
<div class="variablelist"><table border="0">
377
<col align="left" valign="top">
380
<td><p><span class="term"><em class="parameter"><code>db</code></em> :</span></p></td>
385
<td><p><span class="term"><em class="parameter"><code>query</code></em> :</span></p></td>
390
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
391
<td> A <span class="type">GPtrArray</span> of pointers to contact ID strings.
398
<div class="refsect2" title="e_book_backend_db_cache_set_time ()">
399
<a name="e-book-backend-db-cache-set-time"></a><h3>e_book_backend_db_cache_set_time ()</h3>
400
<pre class="programlisting"><span class="returnvalue">void</span> e_book_backend_db_cache_set_time (<em class="parameter"><code><span class="type">DB</span> *db</code></em>,
401
<em class="parameter"><code>const <span class="type">gchar</span> *t</code></em>);</pre>
402
<div class="variablelist"><table border="0">
403
<col align="left" valign="top">
406
<td><p><span class="term"><em class="parameter"><code>db</code></em> :</span></p></td>
411
<td><p><span class="term"><em class="parameter"><code>t</code></em> :</span></p></td>
417
<p class="since">Since 2.26</p>
420
<div class="refsect2" title="e_book_backend_db_cache_get_time ()">
421
<a name="e-book-backend-db-cache-get-time"></a><h3>e_book_backend_db_cache_get_time ()</h3>
422
<pre class="programlisting"><span class="returnvalue">gchar</span> * e_book_backend_db_cache_get_time (<em class="parameter"><code><span class="type">DB</span> *db</code></em>);</pre>
423
<div class="variablelist"><table border="0">
424
<col align="left" valign="top">
427
<td><p><span class="term"><em class="parameter"><code>db</code></em> :</span></p></td>
432
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
438
<p class="since">Since 2.26</p>
444
Generated by GTK-Doc V1.14</div>
b'\\ No newline at end of file'