4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>ECalBackendCache</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
7
<link rel="home" href="index.html" title="Evolution-Data-Server Manual: Calendar Backend (libedata-cal)">
8
8
<link rel="up" href="ch01.html" title="Evolution-Data-Server Manual: Calendar Backend (libedata-cal)">
9
9
<link rel="prev" href="ECalBackend.html" title="ECalBackend">
40
40
<td valign="top" align="right"></td>
41
41
</tr></table></div>
42
<div class="refsynopsisdiv">
42
<div class="refsynopsisdiv" title="Synopsis">
43
43
<a name="ECalBackendCache.synopsis"></a><h2>Synopsis</h2>
44
44
<pre class="synopsis"> <a class="link" href="ECalBackendCache.html#ECalBackendCache-struct" title="ECalBackendCache">ECalBackendCache</a>;
45
45
<a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="returnvalue">ECalBackendCache</span></a> * <a class="link" href="ECalBackendCache.html#e-cal-backend-cache-new" title="e_cal_backend_cache_new ()">e_cal_backend_cache_new</a> (<em class="parameter"><code>const <span class="type">gchar</span> *uri</code></em>,
46
<em class="parameter"><code><a href="../libecal/ECal.html#ECalSourceType"><span class="type">ECalSourceType</span></a> source_type</code></em>);
47
<a href="../libecal/ECalComponent.html"><span class="returnvalue">ECalComponent</span></a> * <a class="link" href="ECalBackendCache.html#e-cal-backend-cache-get-component" title="e_cal_backend_cache_get_component ()">e_cal_backend_cache_get_component</a> (<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>,
46
<em class="parameter"><code><span class="type">ECalSourceType</span> source_type</code></em>);
47
<span class="returnvalue">ECalComponent</span> * <a class="link" href="ECalBackendCache.html#e-cal-backend-cache-get-component" title="e_cal_backend_cache_get_component ()">e_cal_backend_cache_get_component</a> (<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>,
48
48
<em class="parameter"><code>const <span class="type">gchar</span> *uid</code></em>,
49
49
<em class="parameter"><code>const <span class="type">gchar</span> *rid</code></em>);
50
50
<span class="returnvalue">gboolean</span> <a class="link" href="ECalBackendCache.html#e-cal-backend-cache-put-component" title="e_cal_backend_cache_put_component ()">e_cal_backend_cache_put_component</a> (<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>,
51
<em class="parameter"><code><a href="../libecal/ECalComponent.html"><span class="type">ECalComponent</span></a> *comp</code></em>);
51
<em class="parameter"><code><span class="type">ECalComponent</span> *comp</code></em>);
52
52
<span class="returnvalue">gboolean</span> <a class="link" href="ECalBackendCache.html#e-cal-backend-cache-remove-component" title="e_cal_backend_cache_remove_component ()">e_cal_backend_cache_remove_component</a>
53
53
(<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>,
54
54
<em class="parameter"><code>const <span class="type">gchar</span> *uid</code></em>,
82
82
const <span class="returnvalue">gchar</span> * <a class="link" href="ECalBackendCache.html#e-cal-backend-cache-get-key-value" title="e_cal_backend_cache_get_key_value ()">e_cal_backend_cache_get_key_value</a> (<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>,
83
83
<em class="parameter"><code>const <span class="type">gchar</span> *key</code></em>);
84
84
<span class="returnvalue">gboolean</span> <a class="link" href="ECalBackendCache.html#e-cal-backend-cache-remove" title="e_cal_backend_cache_remove ()">e_cal_backend_cache_remove</a> (<em class="parameter"><code>const <span class="type">gchar</span> *uri</code></em>,
85
<em class="parameter"><code><a href="../libecal/ECal.html#ECalSourceType"><span class="type">ECalSourceType</span></a> source_type</code></em>);
85
<em class="parameter"><code><span class="type">ECalSourceType</span> source_type</code></em>);
88
<div class="refsect1" lang="en">
88
<div class="refsect1" title="Object Hierarchy">
89
89
<a name="ECalBackendCache.object-hierarchy"></a><h2>Object Hierarchy</h2>
90
90
<pre class="synopsis">
92
+----<a href="../libebackend/libebackend-e-file-cache.html#EFileCache">EFileCache</a>
93
93
+----ECalBackendCache
96
<div class="refsect1" lang="en">
96
<div class="refsect1" title="Properties">
97
97
<a name="ECalBackendCache.properties"></a><h2>Properties</h2>
98
98
<pre class="synopsis">
99
99
"<a class="link" href="ECalBackendCache.html#ECalBackendCache--source-type" title='The "source-type" property'>source-type</a>" <span class="type">ECalSourceTypeEnum</span> : Read / Write / Construct Only
100
100
"<a class="link" href="ECalBackendCache.html#ECalBackendCache--uri" title='The "uri" property'>uri</a>" <span class="type">gchar</span>* : Read / Write / Construct Only
103
<div class="refsect1" lang="en">
103
<div class="refsect1" title="Description">
104
104
<a name="ECalBackendCache.description"></a><h2>Description</h2>
108
<div class="refsect1" lang="en">
108
<div class="refsect1" title="Details">
109
109
<a name="ECalBackendCache.details"></a><h2>Details</h2>
110
<div class="refsect2" lang="en">
110
<div class="refsect2" title="ECalBackendCache">
111
111
<a name="ECalBackendCache-struct"></a><h3>ECalBackendCache</h3>
112
112
<pre class="programlisting">typedef struct _ECalBackendCache ECalBackendCache;</pre>
117
<div class="refsect2" lang="en">
117
<div class="refsect2" title="e_cal_backend_cache_new ()">
118
118
<a name="e-cal-backend-cache-new"></a><h3>e_cal_backend_cache_new ()</h3>
119
119
<pre class="programlisting"><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="returnvalue">ECalBackendCache</span></a> * e_cal_backend_cache_new (<em class="parameter"><code>const <span class="type">gchar</span> *uri</code></em>,
120
<em class="parameter"><code><a href="../libecal/ECal.html#ECalSourceType"><span class="type">ECalSourceType</span></a> source_type</code></em>);</pre>
120
<em class="parameter"><code><span class="type">ECalSourceType</span> source_type</code></em>);</pre>
122
122
Creates a new <a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> object, which implements a cache of
123
calendar/tasks objects, very useful for remote backends.</p>
123
calendar/tasks objects, very useful for remote backends.
124
125
<div class="variablelist"><table border="0">
125
126
<col align="left" valign="top">
146
<div class="refsect2" lang="en">
147
<div class="refsect2" title="e_cal_backend_cache_get_component ()">
147
148
<a name="e-cal-backend-cache-get-component"></a><h3>e_cal_backend_cache_get_component ()</h3>
148
<pre class="programlisting"><a href="../libecal/ECalComponent.html"><span class="returnvalue">ECalComponent</span></a> * e_cal_backend_cache_get_component (<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>,
149
<pre class="programlisting"><span class="returnvalue">ECalComponent</span> * e_cal_backend_cache_get_component (<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>,
149
150
<em class="parameter"><code>const <span class="type">gchar</span> *uid</code></em>,
150
151
<em class="parameter"><code>const <span class="type">gchar</span> *rid</code></em>);</pre>
152
Gets a component from the <a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><code class="literal">ECalBackendCache</code></a> object.</p>
153
Gets a component from the <a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><code class="literal">ECalBackendCache</code></a> object.
153
155
<div class="variablelist"><table border="0">
154
156
<col align="left" valign="top">
173
175
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
174
<td> The <a href="../libecal/ECalComponent.html"><code class="literal">ECalComponent</code></a> representing the component found,
176
<td> The <code class="literal">ECalComponent</code> representing the component found,
175
177
or <code class="literal">NULL</code> if it was not found in the cache.
182
<div class="refsect2" lang="en">
184
<div class="refsect2" title="e_cal_backend_cache_put_component ()">
183
185
<a name="e-cal-backend-cache-put-component"></a><h3>e_cal_backend_cache_put_component ()</h3>
184
186
<pre class="programlisting"><span class="returnvalue">gboolean</span> e_cal_backend_cache_put_component (<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>,
185
<em class="parameter"><code><a href="../libecal/ECalComponent.html"><span class="type">ECalComponent</span></a> *comp</code></em>);</pre>
187
<em class="parameter"><code><span class="type">ECalComponent</span> *comp</code></em>);</pre>
187
189
Puts the given calendar component in the given cache. This will add
188
190
the component if it does not exist or replace it if there was a
189
previous version of it.</p>
191
previous version of it.
190
193
<div class="variablelist"><table border="0">
191
194
<col align="left" valign="top">
212
<div class="refsect2" lang="en">
215
<div class="refsect2" title="e_cal_backend_cache_remove_component ()">
213
216
<a name="e-cal-backend-cache-remove-component"></a><h3>e_cal_backend_cache_remove_component ()</h3>
214
217
<pre class="programlisting"><span class="returnvalue">gboolean</span> e_cal_backend_cache_remove_component
215
218
(<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>,
216
219
<em class="parameter"><code>const <span class="type">gchar</span> *uid</code></em>,
217
220
<em class="parameter"><code>const <span class="type">gchar</span> *rid</code></em>);</pre>
219
Removes a component from the cache.</p>
222
Removes a component from the cache.
220
224
<div class="variablelist"><table border="0">
221
225
<col align="left" valign="top">
248
<div class="refsect2" lang="en">
252
<div class="refsect2" title="e_cal_backend_cache_get_components ()">
249
253
<a name="e-cal-backend-cache-get-components"></a><h3>e_cal_backend_cache_get_components ()</h3>
250
254
<pre class="programlisting"><span class="returnvalue">GList</span> * e_cal_backend_cache_get_components (<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>);</pre>
252
Retrieves a list of all the components stored in the cache.</p>
256
Retrieves a list of all the components stored in the cache.
253
258
<div class="variablelist"><table border="0">
254
259
<col align="left" valign="top">
262
267
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
263
268
<td> A list of all the components. Each item in the list is
264
an <a href="../libecal/ECalComponent.html"><span class="type">ECalComponent</span></a>, which should be freed when no longer needed.
269
an <span class="type">ECalComponent</span>, which should be freed when no longer needed.
271
<div class="refsect2" lang="en">
276
<div class="refsect2" title="e_cal_backend_cache_get_components_by_uid ()">
272
277
<a name="e-cal-backend-cache-get-components-by-uid"></a><h3>e_cal_backend_cache_get_components_by_uid ()</h3>
273
278
<pre class="programlisting"><span class="returnvalue">GSList</span> * e_cal_backend_cache_get_components_by_uid
274
279
(<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>,
275
280
<em class="parameter"><code>const <span class="type">gchar</span> *uid</code></em>);</pre>
277
Retrieves a ical components from the cache.</p>
282
Retrieves a ical components from the cache.
278
284
<div class="variablelist"><table border="0">
279
285
<col align="left" valign="top">
300
<div class="refsect2" lang="en">
306
<div class="refsect2" title="e_cal_backend_cache_get_timezone ()">
301
307
<a name="e-cal-backend-cache-get-timezone"></a><h3>e_cal_backend_cache_get_timezone ()</h3>
302
308
<pre class="programlisting">const <span class="returnvalue">icaltimezone</span> * e_cal_backend_cache_get_timezone (<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>,
303
309
<em class="parameter"><code>const <span class="type">gchar</span> *tzid</code></em>);</pre>
305
Retrieves a timezone component from the cache.</p>
311
Retrieves a timezone component from the cache.
306
313
<div class="variablelist"><table border="0">
307
314
<col align="left" valign="top">
328
<div class="refsect2" lang="en">
335
<div class="refsect2" title="e_cal_backend_cache_put_timezone ()">
329
336
<a name="e-cal-backend-cache-put-timezone"></a><h3>e_cal_backend_cache_put_timezone ()</h3>
330
337
<pre class="programlisting"><span class="returnvalue">gboolean</span> e_cal_backend_cache_put_timezone (<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>,
331
338
<em class="parameter"><code>const <span class="type">icaltimezone</span> *zone</code></em>);</pre>
333
340
Puts the given timezone in the cache, adding it, if it did not exist, or
334
replacing it, if there was an older version.</p>
341
replacing it, if there was an older version.
335
343
<div class="variablelist"><table border="0">
336
344
<col align="left" valign="top">
357
<div class="refsect2" lang="en">
365
<div class="refsect2" title="e_cal_backend_cache_remove_timezone ()">
358
366
<a name="e-cal-backend-cache-remove-timezone"></a><h3>e_cal_backend_cache_remove_timezone ()</h3>
359
367
<pre class="programlisting"><span class="returnvalue">gboolean</span> e_cal_backend_cache_remove_timezone (<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>,
360
368
<em class="parameter"><code>const <span class="type">gchar</span> *tzid</code></em>);</pre>
362
Removes a timezone component from the cache.</p>
370
Removes a timezone component from the cache.
363
372
<div class="variablelist"><table border="0">
364
373
<col align="left" valign="top">
385
<div class="refsect2" lang="en">
394
<div class="refsect2" title="e_cal_backend_cache_put_default_timezone ()">
386
395
<a name="e-cal-backend-cache-put-default-timezone"></a><h3>e_cal_backend_cache_put_default_timezone ()</h3>
387
396
<pre class="programlisting"><span class="returnvalue">gboolean</span> e_cal_backend_cache_put_default_timezone
388
397
(<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>,
389
398
<em class="parameter"><code><span class="type">icaltimezone</span> *default_zone</code></em>);</pre>
391
Sets the default timezone on the cache.</p>
400
Sets the default timezone on the cache.
392
402
<div class="variablelist"><table border="0">
393
403
<col align="left" valign="top">
414
<div class="refsect2" lang="en">
424
<div class="refsect2" title="e_cal_backend_cache_get_default_timezone ()">
415
425
<a name="e-cal-backend-cache-get-default-timezone"></a><h3>e_cal_backend_cache_get_default_timezone ()</h3>
416
426
<pre class="programlisting"><span class="returnvalue">icaltimezone</span> * e_cal_backend_cache_get_default_timezone
417
427
(<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>);</pre>
419
Retrieves the default timezone from the cache.</p>
429
Retrieves the default timezone from the cache.
420
431
<div class="variablelist"><table border="0">
421
432
<col align="left" valign="top">
438
<div class="refsect2" lang="en">
449
<div class="refsect2" title="e_cal_backend_cache_get_keys ()">
439
450
<a name="e-cal-backend-cache-get-keys"></a><h3>e_cal_backend_cache_get_keys ()</h3>
440
451
<pre class="programlisting"><span class="returnvalue">GSList</span> * e_cal_backend_cache_get_keys (<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>);</pre>
442
Gets the list of unique keys in the cache file.</p>
453
Gets the list of unique keys in the cache file.
443
455
<div class="variablelist"><table border="0">
444
456
<col align="left" valign="top">
461
<div class="refsect2" lang="en">
473
<div class="refsect2" title="e_cal_backend_cache_get_marker ()">
462
474
<a name="e-cal-backend-cache-get-marker"></a><h3>e_cal_backend_cache_get_marker ()</h3>
463
475
<pre class="programlisting">const <span class="returnvalue">gchar</span> * e_cal_backend_cache_get_marker (<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>);</pre>
465
477
Gets the marker of the cache. If this field is present, it means the
466
cache has been populated.</p>
478
cache has been populated.
467
480
<div class="variablelist"><table border="0">
468
481
<col align="left" valign="top">
484
<div class="refsect2" lang="en">
497
<div class="refsect2" title="e_cal_backend_cache_set_marker ()">
485
498
<a name="e-cal-backend-cache-set-marker"></a><h3>e_cal_backend_cache_set_marker ()</h3>
486
499
<pre class="programlisting"><span class="returnvalue">void</span> e_cal_backend_cache_set_marker (<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>);</pre>
488
501
Marks the cache as populated, to discriminate between an empty calendar
489
and an unpopulated one.</p>
502
and an unpopulated one.
490
504
<div class="variablelist"><table border="0">
491
505
<col align="left" valign="top">
500
<div class="refsect2" lang="en">
514
<div class="refsect2" title="e_cal_backend_cache_put_server_utc_time ()">
501
515
<a name="e-cal-backend-cache-put-server-utc-time"></a><h3>e_cal_backend_cache_put_server_utc_time ()</h3>
502
516
<pre class="programlisting"><span class="returnvalue">gboolean</span> e_cal_backend_cache_put_server_utc_time
503
517
(<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>,
527
<div class="refsect2" lang="en">
541
<div class="refsect2" title="e_cal_backend_cache_get_server_utc_time ()">
528
542
<a name="e-cal-backend-cache-get-server-utc-time"></a><h3>e_cal_backend_cache_get_server_utc_time ()</h3>
529
543
<pre class="programlisting">const <span class="returnvalue">gchar</span> * e_cal_backend_cache_get_server_utc_time
530
544
(<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>);</pre>
548
<div class="refsect2" lang="en">
562
<div class="refsect2" title="e_cal_backend_cache_put_key_value ()">
549
563
<a name="e-cal-backend-cache-put-key-value"></a><h3>e_cal_backend_cache_put_key_value ()</h3>
550
564
<pre class="programlisting"><span class="returnvalue">gboolean</span> e_cal_backend_cache_put_key_value (<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>,
551
565
<em class="parameter"><code>const <span class="type">gchar</span> *key</code></em>,
580
<div class="refsect2" lang="en">
594
<div class="refsect2" title="e_cal_backend_cache_get_key_value ()">
581
595
<a name="e-cal-backend-cache-get-key-value"></a><h3>e_cal_backend_cache_get_key_value ()</h3>
582
596
<pre class="programlisting">const <span class="returnvalue">gchar</span> * e_cal_backend_cache_get_key_value (<em class="parameter"><code><a class="link" href="ECalBackendCache.html" title="ECalBackendCache"><span class="type">ECalBackendCache</span></a> *cache</code></em>,
583
597
<em class="parameter"><code>const <span class="type">gchar</span> *key</code></em>);</pre>
606
<div class="refsect2" lang="en">
620
<div class="refsect2" title="e_cal_backend_cache_remove ()">
607
621
<a name="e-cal-backend-cache-remove"></a><h3>e_cal_backend_cache_remove ()</h3>
608
622
<pre class="programlisting"><span class="returnvalue">gboolean</span> e_cal_backend_cache_remove (<em class="parameter"><code>const <span class="type">gchar</span> *uri</code></em>,
609
<em class="parameter"><code><a href="../libecal/ECal.html#ECalSourceType"><span class="type">ECalSourceType</span></a> source_type</code></em>);</pre>
623
<em class="parameter"><code><span class="type">ECalSourceType</span> source_type</code></em>);</pre>
612
624
<div class="variablelist"><table border="0">
613
625
<col align="left" valign="top">
634
<div class="refsect1" lang="en">
644
<p class="since">Since 2.28</p>
647
<div class="refsect1" title="Property Details">
635
648
<a name="ECalBackendCache.property-details"></a><h2>Property Details</h2>
636
<div class="refsect2" lang="en">
649
<div class="refsect2" title='The "source-type" property'>
637
650
<a name="ECalBackendCache--source-type"></a><h3>The <code class="literal">"source-type"</code> property</h3>
638
651
<pre class="programlisting"> "source-type" <span class="type">ECalSourceTypeEnum</span> : Read / Write / Construct Only</pre>
640
653
<p>Default value: Event</p>
643
<div class="refsect2" lang="en">
656
<div class="refsect2" title='The "uri" property'>
644
657
<a name="ECalBackendCache--uri"></a><h3>The <code class="literal">"uri"</code> property</h3>
645
658
<pre class="programlisting"> "uri" <span class="type">gchar</span>* : Read / Write / Construct Only</pre>