39
32
<h2><span class="refentrytitle"><a name="GckObjectCache.top_of_page"></a>GckObjectCache</span></h2>
40
33
<p>GckObjectCache — An interface which holds attributes for a PKCS#11 object</p>
42
<td valign="top" align="right"></td>
35
<td class="gallery_image" valign="top" align="right"></td>
43
36
</tr></table></div>
44
<div class="refsynopsisdiv">
45
<a name="GckObjectCache.synopsis"></a><h2>Synopsis</h2>
46
<pre class="synopsis"> <a class="link" href="GckObjectCache.html#GckObjectCache-struct" title="GckObjectCache">GckObjectCache</a>;
47
struct <a class="link" href="GckObjectCache.html#GckObjectCacheIface" title="struct GckObjectCacheIface">GckObjectCacheIface</a>;
48
<a class="link" href="GckAttributes.html" title="GckAttributes"><span class="returnvalue">GckAttributes</span></a> * <a class="link" href="GckObjectCache.html#gck-object-cache-get-attributes" title="gck_object_cache_get_attributes ()">gck_object_cache_get_attributes</a> (<em class="parameter"><code><a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> *object</code></em>);
49
<span class="returnvalue">void</span> <a class="link" href="GckObjectCache.html#gck-object-cache-set-attributes" title="gck_object_cache_set_attributes ()">gck_object_cache_set_attributes</a> (<em class="parameter"><code><a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> *object</code></em>,
50
<em class="parameter"><code><a class="link" href="GckAttributes.html" title="GckAttributes"><span class="type">GckAttributes</span></a> *attrs</code></em>);
51
<span class="returnvalue">void</span> <a class="link" href="GckObjectCache.html#gck-object-cache-fill" title="gck_object_cache_fill ()">gck_object_cache_fill</a> (<em class="parameter"><code><a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> *object</code></em>,
52
<em class="parameter"><code><a class="link" href="GckAttributes.html" title="GckAttributes"><span class="type">GckAttributes</span></a> *attrs</code></em>);
53
<a class="link" href="GckAttributes.html" title="GckAttributes"><span class="returnvalue">GckAttributes</span></a> * <a class="link" href="GckObjectCache.html#gck-object-cache-lookup" title="gck_object_cache_lookup ()">gck_object_cache_lookup</a> (<em class="parameter"><code><a class="link" href="GckObject.html" title="GckObject"><span class="type">GckObject</span></a> *object</code></em>,
54
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> *attr_types</code></em>,
55
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_attr_types</code></em>,
56
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
57
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
58
<span class="returnvalue">void</span> <a class="link" href="GckObjectCache.html#gck-object-cache-lookup-async" title="gck_object_cache_lookup_async ()">gck_object_cache_lookup_async</a> (<em class="parameter"><code><a class="link" href="GckObject.html" title="GckObject"><span class="type">GckObject</span></a> *object</code></em>,
59
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> *attr_types</code></em>,
60
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_attr_types</code></em>,
61
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
62
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
63
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
64
<a class="link" href="GckAttributes.html" title="GckAttributes"><span class="returnvalue">GckAttributes</span></a> * <a class="link" href="GckObjectCache.html#gck-object-cache-lookup-finish" title="gck_object_cache_lookup_finish ()">gck_object_cache_lookup_finish</a> (<em class="parameter"><code><a class="link" href="GckObject.html" title="GckObject"><span class="type">GckObject</span></a> *object</code></em>,
65
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html"><span class="type">GAsyncResult</span></a> *result</code></em>,
66
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
67
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GckObjectCache.html#gck-object-cache-update" title="gck_object_cache_update ()">gck_object_cache_update</a> (<em class="parameter"><code><a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> *object</code></em>,
68
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> *attr_types</code></em>,
69
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_attr_types</code></em>,
70
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
71
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
72
<span class="returnvalue">void</span> <a class="link" href="GckObjectCache.html#gck-object-cache-update-async" title="gck_object_cache_update_async ()">gck_object_cache_update_async</a> (<em class="parameter"><code><a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> *object</code></em>,
73
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> *attr_types</code></em>,
74
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_attr_types</code></em>,
75
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
76
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
77
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
78
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GckObjectCache.html#gck-object-cache-update-finish" title="gck_object_cache_update_finish ()">gck_object_cache_update_finish</a> (<em class="parameter"><code><a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> *object</code></em>,
79
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html"><span class="type">GAsyncResult</span></a> *result</code></em>,
80
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
37
<div class="refsect1">
38
<a name="GckObjectCache.functions"></a><h2>Functions</h2>
39
<div class="informaltable"><table width="100%" border="0">
41
<col width="150px" class="functions_return">
42
<col class="functions_name">
46
<td class="function_type">
47
<a class="link" href="GckAttributes.html" title="GckAttributes"><span class="returnvalue">GckAttributes</span></a> *
49
<td class="function_name">
50
<a class="link" href="GckObjectCache.html#gck-object-cache-get-attributes" title="gck_object_cache_get_attributes ()">gck_object_cache_get_attributes</a> <span class="c_punctuation">()</span>
54
<td class="function_type">
55
<span class="returnvalue">void</span>
57
<td class="function_name">
58
<a class="link" href="GckObjectCache.html#gck-object-cache-set-attributes" title="gck_object_cache_set_attributes ()">gck_object_cache_set_attributes</a> <span class="c_punctuation">()</span>
62
<td class="function_type">
63
<span class="returnvalue">void</span>
65
<td class="function_name">
66
<a class="link" href="GckObjectCache.html#gck-object-cache-fill" title="gck_object_cache_fill ()">gck_object_cache_fill</a> <span class="c_punctuation">()</span>
70
<td class="function_type">
71
<a class="link" href="GckAttributes.html" title="GckAttributes"><span class="returnvalue">GckAttributes</span></a> *
73
<td class="function_name">
74
<a class="link" href="GckObjectCache.html#gck-object-cache-lookup" title="gck_object_cache_lookup ()">gck_object_cache_lookup</a> <span class="c_punctuation">()</span>
78
<td class="function_type">
79
<span class="returnvalue">void</span>
81
<td class="function_name">
82
<a class="link" href="GckObjectCache.html#gck-object-cache-lookup-async" title="gck_object_cache_lookup_async ()">gck_object_cache_lookup_async</a> <span class="c_punctuation">()</span>
86
<td class="function_type">
87
<a class="link" href="GckAttributes.html" title="GckAttributes"><span class="returnvalue">GckAttributes</span></a> *
89
<td class="function_name">
90
<a class="link" href="GckObjectCache.html#gck-object-cache-lookup-finish" title="gck_object_cache_lookup_finish ()">gck_object_cache_lookup_finish</a> <span class="c_punctuation">()</span>
94
<td class="function_type">
95
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
97
<td class="function_name">
98
<a class="link" href="GckObjectCache.html#gck-object-cache-update" title="gck_object_cache_update ()">gck_object_cache_update</a> <span class="c_punctuation">()</span>
102
<td class="function_type">
103
<span class="returnvalue">void</span>
105
<td class="function_name">
106
<a class="link" href="GckObjectCache.html#gck-object-cache-update-async" title="gck_object_cache_update_async ()">gck_object_cache_update_async</a> <span class="c_punctuation">()</span>
110
<td class="function_type">
111
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
113
<td class="function_name">
114
<a class="link" href="GckObjectCache.html#gck-object-cache-update-finish" title="gck_object_cache_update_finish ()">gck_object_cache_update_finish</a> <span class="c_punctuation">()</span>
120
<div class="refsect1">
121
<a name="GckObjectCache.properties"></a><h2>Properties</h2>
122
<div class="informaltable"><table border="0">
124
<col width="150px" class="properties_type">
125
<col width="300px" class="properties_name">
126
<col width="200px" class="properties_flags">
129
<td class="property_type">
130
<a class="link" href="GckAttributes.html" title="GckAttributes"><span class="type">GckAttributes</span></a> *</td>
131
<td class="property_name"><a class="link" href="GckObjectCache.html#GckObjectCache--attributes" title="The “attributes” property">attributes</a></td>
132
<td class="property_flags">Read / Write</td>
136
<div class="refsect1">
137
<a name="GckObjectCache.other"></a><h2>Types and Values</h2>
138
<div class="informaltable"><table width="100%" border="0">
140
<col width="150px" class="name">
141
<col class="description">
145
<td class="datatype_keyword"> </td>
146
<td class="function_name"><a class="link" href="GckObjectCache.html#GckObjectCache-struct" title="GckObjectCache">GckObjectCache</a></td>
149
<td class="datatype_keyword">struct</td>
150
<td class="function_name"><a class="link" href="GckObjectCache.html#GckObjectCacheIface" title="struct GckObjectCacheIface">GckObjectCacheIface</a></td>
83
155
<div class="refsect1">
84
156
<a name="GckObjectCache.object-hierarchy"></a><h2>Object Hierarchy</h2>
85
<pre class="synopsis">
157
<pre class="screen"> GInterface
158
<span class="lineart">╰──</span> GckObjectCache
90
161
<div class="refsect1">
94
165
<a class="link" href="GckObject.html" title="GckObject">GckObject</a>.</p>
96
167
<div class="refsect1">
97
<a name="GckObjectCache.properties"></a><h2>Properties</h2>
98
<pre class="synopsis">
99
"<a class="link" href="GckObjectCache.html#GckObjectCache--attributes" title='The "attributes" property'>attributes</a>" <a class="link" href="GckAttributes.html" title="GckAttributes"><span class="type">GckAttributes</span></a>* : Read / Write
102
<div class="refsect1">
103
168
<a name="GckObjectCache.description"></a><h2>Description</h2>
105
<a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> is an interface implemented by derived classes of
169
<p><a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> is an interface implemented by derived classes of
106
170
<a class="link" href="GckObject.html" title="GckObject"><span class="type">GckObject</span></a> to indicate which attributes they'd like an enumerator to retrieve.
107
171
These attributes are then cached on the object and can be retrieved through
108
the <a class="link" href="GckObjectCache.html#GckObjectCache--attributes" title='The "attributes" property'><span class="type">"attributes"</span></a> property.
111
<div class="refsect1">
112
<a name="GckObjectCache.details"></a><h2>Details</h2>
172
the <a class="link" href="GckObjectCache.html#GckObjectCache--attributes" title="The “attributes” property"><span class="type">“attributes”</span></a> property.</p>
174
<div class="refsect1">
175
<a name="GckObjectCache.functions_details"></a><h2>Functions</h2>
176
<div class="refsect2">
177
<a name="gck-object-cache-get-attributes"></a><h3>gck_object_cache_get_attributes ()</h3>
178
<pre class="programlisting"><a class="link" href="GckAttributes.html" title="GckAttributes"><span class="returnvalue">GckAttributes</span></a> *
179
gck_object_cache_get_attributes (<em class="parameter"><code><a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> *object</code></em>);</pre>
180
<p>Gets the attributes cached on this object.</p>
181
<div class="refsect3">
182
<a name="id-1.2.8.9.2.5"></a><h4>Parameters</h4>
183
<div class="informaltable"><table width="100%" border="0">
185
<col width="150px" class="parameters_name">
186
<col class="parameters_description">
187
<col width="200px" class="parameters_annotations">
190
<td class="parameter_name"><p>object</p></td>
191
<td class="parameter_description"><p>an object with an attribute cache</p></td>
192
<td class="parameter_annotations"> </td>
196
<div class="refsect3">
197
<a name="id-1.2.8.9.2.6"></a><h4>Returns</h4>
198
<p> the attributes. </p>
199
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></p>
203
<div class="refsect2">
204
<a name="gck-object-cache-set-attributes"></a><h3>gck_object_cache_set_attributes ()</h3>
205
<pre class="programlisting"><span class="returnvalue">void</span>
206
gck_object_cache_set_attributes (<em class="parameter"><code><a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> *object</code></em>,
207
<em class="parameter"><code><a class="link" href="GckAttributes.html" title="GckAttributes"><span class="type">GckAttributes</span></a> *attrs</code></em>);</pre>
208
<p>Sets the attributes cached on this object.</p>
209
<p>If the <em class="parameter"><code>attrs</code></em>
210
<a class="link" href="GckAttributes.html" title="GckAttributes"><span class="type">GckAttributes</span></a> is floating, it is consumed.</p>
211
<div class="refsect3">
212
<a name="id-1.2.8.9.3.6"></a><h4>Parameters</h4>
213
<div class="informaltable"><table width="100%" border="0">
215
<col width="150px" class="parameters_name">
216
<col class="parameters_description">
217
<col width="200px" class="parameters_annotations">
221
<td class="parameter_name"><p>object</p></td>
222
<td class="parameter_description"><p>an object with an attribute cache</p></td>
223
<td class="parameter_annotations"> </td>
226
<td class="parameter_name"><p>attrs</p></td>
227
<td class="parameter_description"><p> the attributes to set. </p></td>
228
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
235
<div class="refsect2">
236
<a name="gck-object-cache-fill"></a><h3>gck_object_cache_fill ()</h3>
237
<pre class="programlisting"><span class="returnvalue">void</span>
238
gck_object_cache_fill (<em class="parameter"><code><a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> *object</code></em>,
239
<em class="parameter"><code><a class="link" href="GckAttributes.html" title="GckAttributes"><span class="type">GckAttributes</span></a> *attrs</code></em>);</pre>
240
<p>Adds the attributes to the set cached on this object. If an attribute is
241
already present in the cache it will be overridden by this value.</p>
242
<p>This will be done in a thread-safe manner.</p>
243
<p>If the <em class="parameter"><code>attrs</code></em>
244
<a class="link" href="GckAttributes.html" title="GckAttributes"><span class="type">GckAttributes</span></a> is floating, it is consumed.</p>
245
<div class="refsect3">
246
<a name="id-1.2.8.9.4.7"></a><h4>Parameters</h4>
247
<div class="informaltable"><table width="100%" border="0">
249
<col width="150px" class="parameters_name">
250
<col class="parameters_description">
251
<col width="200px" class="parameters_annotations">
255
<td class="parameter_name"><p>object</p></td>
256
<td class="parameter_description"><p>an object with the cache</p></td>
257
<td class="parameter_annotations"> </td>
260
<td class="parameter_name"><p>attrs</p></td>
261
<td class="parameter_description"><p>the attributes to cache</p></td>
262
<td class="parameter_annotations"> </td>
269
<div class="refsect2">
270
<a name="gck-object-cache-lookup"></a><h3>gck_object_cache_lookup ()</h3>
271
<pre class="programlisting"><a class="link" href="GckAttributes.html" title="GckAttributes"><span class="returnvalue">GckAttributes</span></a> *
272
gck_object_cache_lookup (<em class="parameter"><code><a class="link" href="GckObject.html" title="GckObject"><span class="type">GckObject</span></a> *object</code></em>,
273
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> *attr_types</code></em>,
274
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_attr_types</code></em>,
275
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
276
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
277
<p>Lookup attributes in the cache, or retrieve them from the object if necessary.</p>
278
<p>If <em class="parameter"><code>object</code></em>
279
is a <a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> then this will lookup the attributes there
280
first if available, otherwise will read them from the object and update
282
<p>If <em class="parameter"><code>object</code></em>
283
is not a <a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a>, then the attributes will simply be
284
read from the object.</p>
285
<p>This may block, use the asynchronous version when this is not desirable</p>
286
<div class="refsect3">
287
<a name="id-1.2.8.9.5.8"></a><h4>Parameters</h4>
288
<div class="informaltable"><table width="100%" border="0">
290
<col width="150px" class="parameters_name">
291
<col class="parameters_description">
292
<col width="200px" class="parameters_annotations">
296
<td class="parameter_name"><p>object</p></td>
297
<td class="parameter_description"><p>the object</p></td>
298
<td class="parameter_annotations"> </td>
301
<td class="parameter_name"><p>attr_types</p></td>
302
<td class="parameter_description"><p> the types of attributes to update. </p></td>
303
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_attr_types]</span></td>
306
<td class="parameter_name"><p>n_attr_types</p></td>
307
<td class="parameter_description"><p>the number of attribute types</p></td>
308
<td class="parameter_annotations"> </td>
311
<td class="parameter_name"><p>cancellable</p></td>
312
<td class="parameter_description"><p>optional cancellation object</p></td>
313
<td class="parameter_annotations"> </td>
316
<td class="parameter_name"><p>error</p></td>
317
<td class="parameter_description"><p>location to place an error</p></td>
318
<td class="parameter_annotations"> </td>
323
<div class="refsect3">
324
<a name="id-1.2.8.9.5.9"></a><h4>Returns</h4>
325
<p> the attributes retrieved or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on failure. </p>
326
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
330
<div class="refsect2">
331
<a name="gck-object-cache-lookup-async"></a><h3>gck_object_cache_lookup_async ()</h3>
332
<pre class="programlisting"><span class="returnvalue">void</span>
333
gck_object_cache_lookup_async (<em class="parameter"><code><a class="link" href="GckObject.html" title="GckObject"><span class="type">GckObject</span></a> *object</code></em>,
334
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> *attr_types</code></em>,
335
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_attr_types</code></em>,
336
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
337
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
338
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
339
<p>Lookup attributes in the cache, or retrieve them from the object if necessary.</p>
340
<p>If <em class="parameter"><code>object</code></em>
341
is a <a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> then this will lookup the attributes there
342
first if available, otherwise will read them from the object and update
344
<p>If <em class="parameter"><code>object</code></em>
345
is not a <a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a>, then the attributes will simply be
346
read from the object.</p>
347
<p>This will return immediately and complete asynchronously</p>
348
<div class="refsect3">
349
<a name="id-1.2.8.9.6.8"></a><h4>Parameters</h4>
350
<div class="informaltable"><table width="100%" border="0">
352
<col width="150px" class="parameters_name">
353
<col class="parameters_description">
354
<col width="200px" class="parameters_annotations">
358
<td class="parameter_name"><p>object</p></td>
359
<td class="parameter_description"><p>the object</p></td>
360
<td class="parameter_annotations"> </td>
363
<td class="parameter_name"><p>attr_types</p></td>
364
<td class="parameter_description"><p> the types of attributes to update. </p></td>
365
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_attr_types]</span></td>
368
<td class="parameter_name"><p>n_attr_types</p></td>
369
<td class="parameter_description"><p>the number of attribute types</p></td>
370
<td class="parameter_annotations"> </td>
373
<td class="parameter_name"><p>cancellable</p></td>
374
<td class="parameter_description"><p>optional cancellation object</p></td>
375
<td class="parameter_annotations"> </td>
378
<td class="parameter_name"><p>callback</p></td>
379
<td class="parameter_description"><p>called when the operation completes</p></td>
380
<td class="parameter_annotations"> </td>
383
<td class="parameter_name"><p>user_data</p></td>
384
<td class="parameter_description"><p>data to pass to the callback</p></td>
385
<td class="parameter_annotations"> </td>
392
<div class="refsect2">
393
<a name="gck-object-cache-lookup-finish"></a><h3>gck_object_cache_lookup_finish ()</h3>
394
<pre class="programlisting"><a class="link" href="GckAttributes.html" title="GckAttributes"><span class="returnvalue">GckAttributes</span></a> *
395
gck_object_cache_lookup_finish (<em class="parameter"><code><a class="link" href="GckObject.html" title="GckObject"><span class="type">GckObject</span></a> *object</code></em>,
396
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html"><span class="type">GAsyncResult</span></a> *result</code></em>,
397
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
398
<p>Complete an operation to lookup attributes in the cache or retrieve them
399
from the object if necessary.</p>
400
<div class="refsect3">
401
<a name="id-1.2.8.9.7.5"></a><h4>Parameters</h4>
402
<div class="informaltable"><table width="100%" border="0">
404
<col width="150px" class="parameters_name">
405
<col class="parameters_description">
406
<col width="200px" class="parameters_annotations">
410
<td class="parameter_name"><p>object</p></td>
411
<td class="parameter_description"><p>the object</p></td>
412
<td class="parameter_annotations"> </td>
415
<td class="parameter_name"><p>result</p></td>
416
<td class="parameter_description"><p>the asynchrounous result passed to the callback</p></td>
417
<td class="parameter_annotations"> </td>
420
<td class="parameter_name"><p>error</p></td>
421
<td class="parameter_description"><p>location to place an error</p></td>
422
<td class="parameter_annotations"> </td>
427
<div class="refsect3">
428
<a name="id-1.2.8.9.7.6"></a><h4>Returns</h4>
429
<p> the attributes retrieved or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on failure. </p>
430
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
434
<div class="refsect2">
435
<a name="gck-object-cache-update"></a><h3>gck_object_cache_update ()</h3>
436
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
437
gck_object_cache_update (<em class="parameter"><code><a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> *object</code></em>,
438
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> *attr_types</code></em>,
439
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_attr_types</code></em>,
440
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
441
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
442
<p>Update the object cache with given attributes. If an attribute already
443
exists in the cache, it will be updated, and if it doesn't it will be added.</p>
444
<p>This may block, use the asynchronous version when this is not desirable</p>
445
<div class="refsect3">
446
<a name="id-1.2.8.9.8.6"></a><h4>Parameters</h4>
447
<div class="informaltable"><table width="100%" border="0">
449
<col width="150px" class="parameters_name">
450
<col class="parameters_description">
451
<col width="200px" class="parameters_annotations">
455
<td class="parameter_name"><p>object</p></td>
456
<td class="parameter_description"><p>the object with the cache</p></td>
457
<td class="parameter_annotations"> </td>
460
<td class="parameter_name"><p>attr_types</p></td>
461
<td class="parameter_description"><p> the types of attributes to update. </p></td>
462
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_attr_types]</span></td>
465
<td class="parameter_name"><p>n_attr_types</p></td>
466
<td class="parameter_description"><p>the number of attribute types</p></td>
467
<td class="parameter_annotations"> </td>
470
<td class="parameter_name"><p>cancellable</p></td>
471
<td class="parameter_description"><p>optional cancellation object</p></td>
472
<td class="parameter_annotations"> </td>
475
<td class="parameter_name"><p>error</p></td>
476
<td class="parameter_description"><p>location to place an error</p></td>
477
<td class="parameter_annotations"> </td>
482
<div class="refsect3">
483
<a name="id-1.2.8.9.8.7"></a><h4>Returns</h4>
484
<p> whether the cache update was successful</p>
489
<div class="refsect2">
490
<a name="gck-object-cache-update-async"></a><h3>gck_object_cache_update_async ()</h3>
491
<pre class="programlisting"><span class="returnvalue">void</span>
492
gck_object_cache_update_async (<em class="parameter"><code><a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> *object</code></em>,
493
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> *attr_types</code></em>,
494
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_attr_types</code></em>,
495
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
496
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
497
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
498
<p>Update the object cache with given attributes. If an attribute already
499
exists in the cache, it will be updated, and if it doesn't it will be added.</p>
500
<p>This call will return immediately and complete asynchronously.</p>
501
<div class="refsect3">
502
<a name="id-1.2.8.9.9.6"></a><h4>Parameters</h4>
503
<div class="informaltable"><table width="100%" border="0">
505
<col width="150px" class="parameters_name">
506
<col class="parameters_description">
507
<col width="200px" class="parameters_annotations">
511
<td class="parameter_name"><p>object</p></td>
512
<td class="parameter_description"><p>the object with the cache</p></td>
513
<td class="parameter_annotations"> </td>
516
<td class="parameter_name"><p>attr_types</p></td>
517
<td class="parameter_description"><p> the types of attributes to update. </p></td>
518
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_attr_types]</span></td>
521
<td class="parameter_name"><p>n_attr_types</p></td>
522
<td class="parameter_description"><p>the number of attribute types</p></td>
523
<td class="parameter_annotations"> </td>
526
<td class="parameter_name"><p>cancellable</p></td>
527
<td class="parameter_description"><p>optional cancellation object</p></td>
528
<td class="parameter_annotations"> </td>
531
<td class="parameter_name"><p>callback</p></td>
532
<td class="parameter_description"><p>called when the operation completes</p></td>
533
<td class="parameter_annotations"> </td>
536
<td class="parameter_name"><p>user_data</p></td>
537
<td class="parameter_description"><p>data to be passed to the callback</p></td>
538
<td class="parameter_annotations"> </td>
545
<div class="refsect2">
546
<a name="gck-object-cache-update-finish"></a><h3>gck_object_cache_update_finish ()</h3>
547
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
548
gck_object_cache_update_finish (<em class="parameter"><code><a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> *object</code></em>,
549
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html"><span class="type">GAsyncResult</span></a> *result</code></em>,
550
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
551
<p>Complete an asynchronous operation to update the object cache with given
553
<div class="refsect3">
554
<a name="id-1.2.8.9.10.5"></a><h4>Parameters</h4>
555
<div class="informaltable"><table width="100%" border="0">
557
<col width="150px" class="parameters_name">
558
<col class="parameters_description">
559
<col width="200px" class="parameters_annotations">
563
<td class="parameter_name"><p>object</p></td>
564
<td class="parameter_description"><p>the object with the cache</p></td>
565
<td class="parameter_annotations"> </td>
568
<td class="parameter_name"><p>result</p></td>
569
<td class="parameter_description"><p>the asynchronous result passed to the callback</p></td>
570
<td class="parameter_annotations"> </td>
573
<td class="parameter_name"><p>error</p></td>
574
<td class="parameter_description"><p>location to place an error</p></td>
575
<td class="parameter_annotations"> </td>
580
<div class="refsect3">
581
<a name="id-1.2.8.9.10.6"></a><h4>Returns</h4>
582
<p> whether the cache update was successful</p>
587
<div class="refsect1">
588
<a name="GckObjectCache.other_details"></a><h2>Types and Values</h2>
113
589
<div class="refsect2">
114
590
<a name="GckObjectCache-struct"></a><h3>GckObjectCache</h3>
115
591
<pre class="programlisting">typedef struct _GckObjectCache GckObjectCache;</pre>
117
An interface implemented on an <a class="link" href="GckObject.html" title="GckObject"><span class="type">GckObject</span></a> which contains a cache of attributes.
592
<p>An interface implemented on an <a class="link" href="GckObject.html" title="GckObject"><span class="type">GckObject</span></a> which contains a cache of attributes.</p>
121
595
<div class="refsect2">
130
604
GckAttributes *attrs);
134
Interface for <a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a>. If the <em class="parameter"><code>default_types</code></em> field is set by
607
<p>Interface for <a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a>. If the <em class="parameter"><code>default_types</code></em>
135
609
a implementing class, then the a <a class="link" href="GckEnumerator.html" title="GckEnumerator"><span class="type">GckEnumerator</span></a> which has been setup using
136
<a class="link" href="GckEnumerator.html#gck-enumerator-set-object-type" title="gck_enumerator_set_object_type ()"><code class="function">gck_enumerator_set_object_type()</code></a>
139
The implementation for <em class="parameter"><code>populate</code></em> should add the attributes to the
140
cache. It must be thread safe.
142
<div class="variablelist"><table border="0" class="variablelist">
144
<col align="left" valign="top">
149
<td><p><span class="term"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> <em class="structfield"><code><a name="GckObjectCacheIface.interface"></a>interface</code></em>;</span></p></td>
150
<td>parent interface</td>
153
<td><p><span class="term">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> *<em class="structfield"><code><a name="GckObjectCacheIface.default-types"></a>default_types</code></em>;</span></p></td>
154
<td>attribute types that an
155
enumerator should retrieve. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_default_types]</span>
159
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GckObjectCacheIface.n-default-types"></a>n_default_types</code></em>;</span></p></td>
160
<td>number of attribute types to be retrieved</td>
163
<td><p><span class="term"><em class="structfield"><code><a name="GckObjectCacheIface.fill"></a>fill</code></em> ()</span></p></td>
164
<td>virtual method to add attributes to the cache</td>
170
<div class="refsect2">
171
<a name="gck-object-cache-get-attributes"></a><h3>gck_object_cache_get_attributes ()</h3>
172
<pre class="programlisting"><a class="link" href="GckAttributes.html" title="GckAttributes"><span class="returnvalue">GckAttributes</span></a> * gck_object_cache_get_attributes (<em class="parameter"><code><a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> *object</code></em>);</pre>
174
Gets the attributes cached on this object.
176
<div class="variablelist"><table border="0" class="variablelist">
178
<col align="left" valign="top">
183
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
184
<td>an object with an attribute cache</td>
187
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
188
<td>the attributes. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
195
<div class="refsect2">
196
<a name="gck-object-cache-set-attributes"></a><h3>gck_object_cache_set_attributes ()</h3>
197
<pre class="programlisting"><span class="returnvalue">void</span> gck_object_cache_set_attributes (<em class="parameter"><code><a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> *object</code></em>,
198
<em class="parameter"><code><a class="link" href="GckAttributes.html" title="GckAttributes"><span class="type">GckAttributes</span></a> *attrs</code></em>);</pre>
200
Sets the attributes cached on this object.
203
If the <em class="parameter"><code>attrs</code></em> <a class="link" href="GckAttributes.html" title="GckAttributes"><span class="type">GckAttributes</span></a> is floating, it is consumed.
205
<div class="variablelist"><table border="0" class="variablelist">
207
<col align="left" valign="top">
212
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
213
<td>an object with an attribute cache</td>
216
<td><p><span class="term"><em class="parameter"><code>attrs</code></em> :</span></p></td>
217
<td>the attributes to set. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
224
<div class="refsect2">
225
<a name="gck-object-cache-fill"></a><h3>gck_object_cache_fill ()</h3>
226
<pre class="programlisting"><span class="returnvalue">void</span> gck_object_cache_fill (<em class="parameter"><code><a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> *object</code></em>,
227
<em class="parameter"><code><a class="link" href="GckAttributes.html" title="GckAttributes"><span class="type">GckAttributes</span></a> *attrs</code></em>);</pre>
229
Adds the attributes to the set cached on this object. If an attribute is
230
already present in the cache it will be overridden by this value.
233
This will be done in a thread-safe manner.
236
If the <em class="parameter"><code>attrs</code></em> <a class="link" href="GckAttributes.html" title="GckAttributes"><span class="type">GckAttributes</span></a> is floating, it is consumed.
238
<div class="variablelist"><table border="0" class="variablelist">
240
<col align="left" valign="top">
245
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
246
<td>an object with the cache</td>
249
<td><p><span class="term"><em class="parameter"><code>attrs</code></em> :</span></p></td>
250
<td>the attributes to cache</td>
256
<div class="refsect2">
257
<a name="gck-object-cache-lookup"></a><h3>gck_object_cache_lookup ()</h3>
258
<pre class="programlisting"><a class="link" href="GckAttributes.html" title="GckAttributes"><span class="returnvalue">GckAttributes</span></a> * gck_object_cache_lookup (<em class="parameter"><code><a class="link" href="GckObject.html" title="GckObject"><span class="type">GckObject</span></a> *object</code></em>,
259
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> *attr_types</code></em>,
260
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_attr_types</code></em>,
261
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
262
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
264
Lookup attributes in the cache, or retrieve them from the object if necessary.
267
If <em class="parameter"><code>object</code></em> is a <a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> then this will lookup the attributes there
268
first if available, otherwise will read them from the object and update
272
If <em class="parameter"><code>object</code></em> is not a <a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a>, then the attributes will simply be
273
read from the object.
276
This may block, use the asynchronous version when this is not desirable
278
<div class="variablelist"><table border="0" class="variablelist">
280
<col align="left" valign="top">
285
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
289
<td><p><span class="term"><em class="parameter"><code>attr_types</code></em> :</span></p></td>
290
<td>the types of attributes to update. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_attr_types]</span>
294
<td><p><span class="term"><em class="parameter"><code>n_attr_types</code></em> :</span></p></td>
295
<td>the number of attribute types</td>
298
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
299
<td>optional cancellation object</td>
302
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
303
<td>location to place an error</td>
306
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
307
<td>the attributes retrieved or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on failure. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
314
<div class="refsect2">
315
<a name="gck-object-cache-lookup-async"></a><h3>gck_object_cache_lookup_async ()</h3>
316
<pre class="programlisting"><span class="returnvalue">void</span> gck_object_cache_lookup_async (<em class="parameter"><code><a class="link" href="GckObject.html" title="GckObject"><span class="type">GckObject</span></a> *object</code></em>,
317
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> *attr_types</code></em>,
318
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_attr_types</code></em>,
319
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
320
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
321
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
323
Lookup attributes in the cache, or retrieve them from the object if necessary.
326
If <em class="parameter"><code>object</code></em> is a <a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> then this will lookup the attributes there
327
first if available, otherwise will read them from the object and update
331
If <em class="parameter"><code>object</code></em> is not a <a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a>, then the attributes will simply be
332
read from the object.
335
This will return immediately and complete asynchronously
337
<div class="variablelist"><table border="0" class="variablelist">
339
<col align="left" valign="top">
344
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
348
<td><p><span class="term"><em class="parameter"><code>attr_types</code></em> :</span></p></td>
349
<td>the types of attributes to update. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_attr_types]</span>
353
<td><p><span class="term"><em class="parameter"><code>n_attr_types</code></em> :</span></p></td>
354
<td>the number of attribute types</td>
357
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
358
<td>optional cancellation object</td>
361
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
362
<td>called when the operation completes</td>
365
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
366
<td>data to pass to the callback</td>
372
<div class="refsect2">
373
<a name="gck-object-cache-lookup-finish"></a><h3>gck_object_cache_lookup_finish ()</h3>
374
<pre class="programlisting"><a class="link" href="GckAttributes.html" title="GckAttributes"><span class="returnvalue">GckAttributes</span></a> * gck_object_cache_lookup_finish (<em class="parameter"><code><a class="link" href="GckObject.html" title="GckObject"><span class="type">GckObject</span></a> *object</code></em>,
375
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html"><span class="type">GAsyncResult</span></a> *result</code></em>,
376
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
378
Complete an operation to lookup attributes in the cache or retrieve them
379
from the object if necessary.
381
<div class="variablelist"><table border="0" class="variablelist">
383
<col align="left" valign="top">
388
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
392
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
393
<td>the asynchrounous result passed to the callback</td>
396
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
397
<td>location to place an error</td>
400
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
401
<td>the attributes retrieved or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on failure. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
408
<div class="refsect2">
409
<a name="gck-object-cache-update"></a><h3>gck_object_cache_update ()</h3>
410
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gck_object_cache_update (<em class="parameter"><code><a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> *object</code></em>,
411
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> *attr_types</code></em>,
412
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_attr_types</code></em>,
413
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
414
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
416
Update the object cache with given attributes. If an attribute already
417
exists in the cache, it will be updated, and if it doesn't it will be added.
420
This may block, use the asynchronous version when this is not desirable
422
<div class="variablelist"><table border="0" class="variablelist">
424
<col align="left" valign="top">
429
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
430
<td>the object with the cache</td>
433
<td><p><span class="term"><em class="parameter"><code>attr_types</code></em> :</span></p></td>
434
<td>the types of attributes to update. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_attr_types]</span>
438
<td><p><span class="term"><em class="parameter"><code>n_attr_types</code></em> :</span></p></td>
439
<td>the number of attribute types</td>
442
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
443
<td>optional cancellation object</td>
446
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
447
<td>location to place an error</td>
450
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
451
<td>whether the cache update was successful</td>
457
<div class="refsect2">
458
<a name="gck-object-cache-update-async"></a><h3>gck_object_cache_update_async ()</h3>
459
<pre class="programlisting"><span class="returnvalue">void</span> gck_object_cache_update_async (<em class="parameter"><code><a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> *object</code></em>,
460
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> *attr_types</code></em>,
461
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_attr_types</code></em>,
462
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
463
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
464
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
466
Update the object cache with given attributes. If an attribute already
467
exists in the cache, it will be updated, and if it doesn't it will be added.
470
This call will return immediately and complete asynchronously.
472
<div class="variablelist"><table border="0" class="variablelist">
474
<col align="left" valign="top">
479
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
480
<td>the object with the cache</td>
483
<td><p><span class="term"><em class="parameter"><code>attr_types</code></em> :</span></p></td>
484
<td>the types of attributes to update. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_attr_types]</span>
488
<td><p><span class="term"><em class="parameter"><code>n_attr_types</code></em> :</span></p></td>
489
<td>the number of attribute types</td>
492
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
493
<td>optional cancellation object</td>
496
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
497
<td>called when the operation completes</td>
500
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
501
<td>data to be passed to the callback</td>
507
<div class="refsect2">
508
<a name="gck-object-cache-update-finish"></a><h3>gck_object_cache_update_finish ()</h3>
509
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gck_object_cache_update_finish (<em class="parameter"><code><a class="link" href="GckObjectCache.html" title="GckObjectCache"><span class="type">GckObjectCache</span></a> *object</code></em>,
510
<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html"><span class="type">GAsyncResult</span></a> *result</code></em>,
511
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
513
Complete an asynchronous operation to update the object cache with given
516
<div class="variablelist"><table border="0" class="variablelist">
518
<col align="left" valign="top">
523
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
524
<td>the object with the cache</td>
527
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
528
<td>the asynchronous result passed to the callback</td>
531
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
532
<td>location to place an error</td>
535
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
536
<td>whether the cache update was successful</td>
610
<a class="link" href="GckEnumerator.html#gck-enumerator-set-object-type" title="gck_enumerator_set_object_type ()"><code class="function">gck_enumerator_set_object_type()</code></a></p>
611
<p>The implementation for <em class="parameter"><code>populate</code></em>
612
should add the attributes to the
613
cache. It must be thread safe.</p>
614
<div class="refsect3">
615
<a name="id-1.2.8.10.3.6"></a><h4>Members</h4>
616
<div class="informaltable"><table width="100%" border="0">
618
<col width="300px" class="struct_members_name">
619
<col class="struct_members_description">
620
<col width="200px" class="struct_members_annotations">
624
<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> <em class="structfield"><code><a name="GckObjectCacheIface.interface"></a>interface</code></em>;</p></td>
625
<td class="struct_member_description"><p>parent interface</p></td>
626
<td class="struct_member_annotations"> </td>
629
<td class="struct_member_name"><p>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> *<em class="structfield"><code><a name="GckObjectCacheIface.default-types"></a>default_types</code></em>;</p></td>
630
<td class="struct_member_description"><p> attribute types that an
631
enumerator should retrieve. </p></td>
632
<td class="struct_member_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_default_types]</span></td>
635
<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GckObjectCacheIface.n-default-types"></a>n_default_types</code></em>;</p></td>
636
<td class="struct_member_description"><p>number of attribute types to be retrieved</p></td>
637
<td class="struct_member_annotations"> </td>
640
<td class="struct_member_name"><p><em class="structfield"><code><a name="GckObjectCacheIface.fill"></a>fill</code></em> ()</p></td>
641
<td class="struct_member_description"><p>virtual method to add attributes to the cache</p></td>
642
<td class="struct_member_annotations"> </td>
542
649
<div class="refsect1">
543
650
<a name="GckObjectCache.property-details"></a><h2>Property Details</h2>
544
651
<div class="refsect2">
545
<a name="GckObjectCache--attributes"></a><h3>The <code class="literal">"attributes"</code> property</h3>
546
<pre class="programlisting"> "attributes" <a class="link" href="GckAttributes.html" title="GckAttributes"><span class="type">GckAttributes</span></a>* : Read / Write</pre>
548
The attributes cached on this object.
652
<a name="GckObjectCache--attributes"></a><h3>The <code class="literal">“attributes”</code> property</h3>
653
<pre class="programlisting"> “attributes” <a class="link" href="GckAttributes.html" title="GckAttributes"><span class="type">GckAttributes</span></a> *</pre>
654
<p>The attributes cached on this object.</p>
655
<p>Flags: Read / Write</p>
553
659
<div class="footer">
555
Generated by GTK-Doc V1.19</div>
661
Generated by GTK-Doc V1.20</div>
b'\\ No newline at end of file'