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>Search Functionality</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
7
<link rel="home" href="index.html" title="gnome-keyring Reference Manual">
8
<link rel="up" href="ch01.html" title="gnome-keyring API Reference">
9
<link rel="prev" href="gnome-keyring-gnome-keyring-acl.html" title="Item ACLs">
10
<link rel="next" href="gnome-keyring-gnome-keyring-network.html" title="Network Passwords">
11
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="chapter" href="ch01.html" title="gnome-keyring API Reference">
15
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
16
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
18
<td><a accesskey="p" href="gnome-keyring-gnome-keyring-acl.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
19
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
20
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
21
<th width="100%" align="center">gnome-keyring Reference Manual</th>
22
<td><a accesskey="n" href="gnome-keyring-gnome-keyring-network.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
24
<tr><td colspan="5" class="shortcuts">
25
<a href="#gnome-keyring-gnome-keyring-find.synopsis" class="shortcut">Top</a>
27
<a href="#gnome-keyring-gnome-keyring-find.description" class="shortcut">Description</a>
30
<div class="refentry" title="Search Functionality">
31
<a name="gnome-keyring-gnome-keyring-find"></a><div class="titlepage"></div>
32
<div class="refnamediv"><table width="100%"><tr>
34
<h2><span class="refentrytitle"><a name="gnome-keyring-gnome-keyring-find.top_of_page"></a>Search Functionality</span></h2>
35
<p>Search Functionality — Find Keyring Items</p>
37
<td valign="top" align="right"></td>
39
<div class="refsynopsisdiv" title="Synopsis">
40
<a name="gnome-keyring-gnome-keyring-find.synopsis"></a><h2>Synopsis</h2>
41
<pre class="synopsis">
42
<a class="link" href="gnome-keyring-gnome-keyring-find.html#GnomeKeyringFound" title="GnomeKeyringFound">GnomeKeyringFound</a>;
43
void <a class="link" href="gnome-keyring-gnome-keyring-find.html#gnome-keyring-found-free" title="gnome_keyring_found_free ()">gnome_keyring_found_free</a> (<a class="link" href="gnome-keyring-gnome-keyring-find.html#GnomeKeyringFound" title="GnomeKeyringFound">GnomeKeyringFound</a> *found);
44
void <a class="link" href="gnome-keyring-gnome-keyring-find.html#gnome-keyring-found-list-free" title="gnome_keyring_found_list_free ()">gnome_keyring_found_list_free</a> (<a
45
href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"
46
>GList</a> *found_list);
48
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
49
>gpointer</a> <a class="link" href="gnome-keyring-gnome-keyring-find.html#gnome-keyring-find-items" title="gnome_keyring_find_items ()">gnome_keyring_find_items</a> (<a class="link" href="gnome-keyring-gnome-keyring-item-info.html#GnomeKeyringItemType" title="enum GnomeKeyringItemType">GnomeKeyringItemType</a> type,
50
<a class="link" href="gnome-keyring-gnome-keyring-attributes.html#GnomeKeyringAttributeList" title="GnomeKeyringAttributeList">GnomeKeyringAttributeList</a> *attributes,
51
<a class="link" href="gnome-keyring-gnome-keyring-generic-callbacks.html#GnomeKeyringOperationGetListCallback" title="GnomeKeyringOperationGetListCallback ()">GnomeKeyringOperationGetListCallback</a> callback,
53
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
56
href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"
57
>GDestroyNotify</a> destroy_data);
59
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
60
>gpointer</a> <a class="link" href="gnome-keyring-gnome-keyring-find.html#gnome-keyring-find-itemsv" title="gnome_keyring_find_itemsv ()">gnome_keyring_find_itemsv</a> (<a class="link" href="gnome-keyring-gnome-keyring-item-info.html#GnomeKeyringItemType" title="enum GnomeKeyringItemType">GnomeKeyringItemType</a> type,
61
<a class="link" href="gnome-keyring-gnome-keyring-generic-callbacks.html#GnomeKeyringOperationGetListCallback" title="GnomeKeyringOperationGetListCallback ()">GnomeKeyringOperationGetListCallback</a> callback,
63
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
66
href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"
67
>GDestroyNotify</a> destroy_data,
69
<a class="link" href="gnome-keyring-gnome-keyring-result.html#GnomeKeyringResult" title="enum GnomeKeyringResult">GnomeKeyringResult</a> <a class="link" href="gnome-keyring-gnome-keyring-find.html#gnome-keyring-find-items-sync" title="gnome_keyring_find_items_sync ()">gnome_keyring_find_items_sync</a> (<a class="link" href="gnome-keyring-gnome-keyring-item-info.html#GnomeKeyringItemType" title="enum GnomeKeyringItemType">GnomeKeyringItemType</a> type,
70
<a class="link" href="gnome-keyring-gnome-keyring-attributes.html#GnomeKeyringAttributeList" title="GnomeKeyringAttributeList">GnomeKeyringAttributeList</a> *attributes,
72
href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"
74
<a class="link" href="gnome-keyring-gnome-keyring-result.html#GnomeKeyringResult" title="enum GnomeKeyringResult">GnomeKeyringResult</a> <a class="link" href="gnome-keyring-gnome-keyring-find.html#gnome-keyring-find-itemsv-sync" title="gnome_keyring_find_itemsv_sync ()">gnome_keyring_find_itemsv_sync</a> (<a class="link" href="gnome-keyring-gnome-keyring-item-info.html#GnomeKeyringItemType" title="enum GnomeKeyringItemType">GnomeKeyringItemType</a> type,
76
href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"
81
<div class="refsect1" title="Description">
82
<a name="gnome-keyring-gnome-keyring-find.description"></a><h2>Description</h2>
84
A find operation searches through all keyrings for items that match the
85
attributes. The user may have been prompted to unlock necessary keyrings, and
86
user will have been prompted for access to the items if needed.
89
A find operation may return multiple or zero results.</p>
93
<div class="refsect1" title="Details">
94
<a name="gnome-keyring-gnome-keyring-find.details"></a><h2>Details</h2>
95
<div class="refsect2" title="GnomeKeyringFound">
96
<a name="GnomeKeyringFound"></a><h3>GnomeKeyringFound</h3>
97
<pre class="programlisting">typedef struct {
100
GnomeKeyringAttributeList *attributes;
108
<div class="refsect2" title="gnome_keyring_found_free ()">
109
<a name="gnome-keyring-found-free"></a><h3>gnome_keyring_found_free ()</h3>
110
<pre class="programlisting">void gnome_keyring_found_free (<a class="link" href="gnome-keyring-gnome-keyring-find.html#GnomeKeyringFound" title="GnomeKeyringFound">GnomeKeyringFound</a> *found);</pre>
112
Free the memory used by a <a class="link" href="gnome-keyring-gnome-keyring-find.html#GnomeKeyringFound" title="GnomeKeyringFound"><span class="type">GnomeKeyringFound</span></a> item.
115
You usually want to use <a class="link" href="gnome-keyring-gnome-keyring-find.html#gnome-keyring-found-list-free" title="gnome_keyring_found_list_free ()"><code class="function">gnome_keyring_found_list_free()</code></a> on the list of
119
<div class="variablelist"><table border="0">
120
<col align="left" valign="top">
122
<td><p><span class="term"><em class="parameter"><code>found</code></em> :</span></p></td>
123
<td> a <a class="link" href="gnome-keyring-gnome-keyring-find.html#GnomeKeyringFound" title="GnomeKeyringFound"><span class="type">GnomeKeyringFound</span></a>
129
<div class="refsect2" title="gnome_keyring_found_list_free ()">
130
<a name="gnome-keyring-found-list-free"></a><h3>gnome_keyring_found_list_free ()</h3>
131
<pre class="programlisting">void gnome_keyring_found_list_free (<a
132
href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"
133
>GList</a> *found_list);</pre>
135
Free the memory used by the <a class="link" href="gnome-keyring-gnome-keyring-find.html#GnomeKeyringFound" title="GnomeKeyringFound"><span class="type">GnomeKeyringFound</span></a> items in <em class="parameter"><code>found_list</code></em>.</p>
138
<div class="variablelist"><table border="0">
139
<col align="left" valign="top">
141
<td><p><span class="term"><em class="parameter"><code>found_list</code></em> :</span></p></td>
143
href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"
144
><span class="type">GList</span></a> of <a class="link" href="gnome-keyring-gnome-keyring-find.html#GnomeKeyringFound" title="GnomeKeyringFound"><span class="type">GnomeKeyringFound</span></a>
150
<div class="refsect2" title="gnome_keyring_find_items ()">
151
<a name="gnome-keyring-find-items"></a><h3>gnome_keyring_find_items ()</h3>
152
<pre class="programlisting"><a
153
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
154
>gpointer</a> gnome_keyring_find_items (<a class="link" href="gnome-keyring-gnome-keyring-item-info.html#GnomeKeyringItemType" title="enum GnomeKeyringItemType">GnomeKeyringItemType</a> type,
155
<a class="link" href="gnome-keyring-gnome-keyring-attributes.html#GnomeKeyringAttributeList" title="GnomeKeyringAttributeList">GnomeKeyringAttributeList</a> *attributes,
156
<a class="link" href="gnome-keyring-gnome-keyring-generic-callbacks.html#GnomeKeyringOperationGetListCallback" title="GnomeKeyringOperationGetListCallback ()">GnomeKeyringOperationGetListCallback</a> callback,
158
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
161
href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"
162
>GDestroyNotify</a> destroy_data);</pre>
164
Searches through all keyrings for items that match the <em class="parameter"><code>attributes</code></em>. The matches
165
are for exact equality.
169
href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"
170
><code class="literal">GList</code></a> of GnomeKeyringFound structures are passed to the <em class="parameter"><code>callback</code></em>. The
171
list and structures are freed after the callback returns.
174
The user may have been prompted to unlock necessary keyrings, and user will
175
have been prompted for access to the items if needed.
178
For a synchronous version of this function see <a class="link" href="gnome-keyring-gnome-keyring-find.html#gnome-keyring-find-items-sync" title="gnome_keyring_find_items_sync ()"><code class="function">gnome_keyring_find_items_sync()</code></a>.</p>
181
<div class="variablelist"><table border="0">
182
<col align="left" valign="top">
185
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
186
<td> The type of items to find.
190
<td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td>
191
<td> A list of attributes to search for. This cannot be an empty list.
195
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
196
<td> A callback which will be called when the request completes or fails.
200
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
201
<td> A pointer to arbitrary data that will be passed to the <em class="parameter"><code>callback</code></em>.
205
<td><p><span class="term"><em class="parameter"><code>destroy_data</code></em> :</span></p></td>
206
<td> A function to free <em class="parameter"><code>data</code></em> when it's no longer needed.
210
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
211
<td> The asychronous request, which can be passed to <a class="link" href="gnome-keyring-gnome-keyring-misc.html#gnome-keyring-cancel-request" title="gnome_keyring_cancel_request ()"><code class="function">gnome_keyring_cancel_request()</code></a>.
218
<div class="refsect2" title="gnome_keyring_find_itemsv ()">
219
<a name="gnome-keyring-find-itemsv"></a><h3>gnome_keyring_find_itemsv ()</h3>
220
<pre class="programlisting"><a
221
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
222
>gpointer</a> gnome_keyring_find_itemsv (<a class="link" href="gnome-keyring-gnome-keyring-item-info.html#GnomeKeyringItemType" title="enum GnomeKeyringItemType">GnomeKeyringItemType</a> type,
223
<a class="link" href="gnome-keyring-gnome-keyring-generic-callbacks.html#GnomeKeyringOperationGetListCallback" title="GnomeKeyringOperationGetListCallback ()">GnomeKeyringOperationGetListCallback</a> callback,
225
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
228
href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"
229
>GDestroyNotify</a> destroy_data,
232
Searches through all keyrings for items that match the specified attributes.
233
The matches are for exact equality.
236
The variable argument list should contain a) The attribute name as a null
237
terminated string, followed by b) The attribute type, either
238
<code class="literal">GNOME_KEYRING_ATTRIBUTE_TYPE_STRING</code> or <code class="literal">GNOME_KEYRING_ATTRIBUTE_TYPE_UINT32</code>
239
and then the c) attribute value, either a character string, or 32-bit
240
unsigned int. The list should be terminated with a NULL.
244
href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"
245
><code class="literal">GList</code></a> of GnomeKeyringFound structures are passed to the <em class="parameter"><code>callback</code></em>. The
246
list and structures are freed after the callback returns.
249
The user may have been prompted to unlock necessary keyrings, and user will
250
have been prompted for access to the items if needed.
253
For a synchronous version of this function see <a class="link" href="gnome-keyring-gnome-keyring-find.html#gnome-keyring-find-itemsv-sync" title="gnome_keyring_find_itemsv_sync ()"><code class="function">gnome_keyring_find_itemsv_sync()</code></a>.</p>
256
<div class="variablelist"><table border="0">
257
<col align="left" valign="top">
260
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
261
<td> The type of items to find.
265
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
266
<td> A callback which will be called when the request completes or fails.
270
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
271
<td> A pointer to arbitrary data that will be passed to the <em class="parameter"><code>callback</code></em>.
275
<td><p><span class="term"><em class="parameter"><code>destroy_data</code></em> :</span></p></td>
276
<td> A function to free <em class="parameter"><code>data</code></em> when it's no longer needed.
280
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
285
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
286
<td> The asychronous request, which can be passed to <a class="link" href="gnome-keyring-gnome-keyring-misc.html#gnome-keyring-cancel-request" title="gnome_keyring_cancel_request ()"><code class="function">gnome_keyring_cancel_request()</code></a>.
293
<div class="refsect2" title="gnome_keyring_find_items_sync ()">
294
<a name="gnome-keyring-find-items-sync"></a><h3>gnome_keyring_find_items_sync ()</h3>
295
<pre class="programlisting"><a class="link" href="gnome-keyring-gnome-keyring-result.html#GnomeKeyringResult" title="enum GnomeKeyringResult">GnomeKeyringResult</a> gnome_keyring_find_items_sync (<a class="link" href="gnome-keyring-gnome-keyring-item-info.html#GnomeKeyringItemType" title="enum GnomeKeyringItemType">GnomeKeyringItemType</a> type,
296
<a class="link" href="gnome-keyring-gnome-keyring-attributes.html#GnomeKeyringAttributeList" title="GnomeKeyringAttributeList">GnomeKeyringAttributeList</a> *attributes,
298
href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"
299
>GList</a> **found);</pre>
301
Searches through all keyrings for items that match the <em class="parameter"><code>attributes</code></em> and <em class="parameter"><code>type</code></em>.
302
The matches are for exact equality.
306
href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"
307
><code class="literal">GList</code></a> of GnomeKeyringFound structures is returned in <em class="parameter"><code>found</code></em>. The list may
308
have zero items if nothing matched the criteria. The list should be freed
309
using <a class="link" href="gnome-keyring-gnome-keyring-find.html#gnome-keyring-found-list-free" title="gnome_keyring_found_list_free ()"><code class="function">gnome_keyring_found_list_free()</code></a>.
312
The user may have been prompted to unlock necessary keyrings, and user will
313
have been prompted for access to the items if needed.
316
For an asynchronous version of this function see <a class="link" href="gnome-keyring-gnome-keyring-find.html#gnome-keyring-find-items" title="gnome_keyring_find_items ()"><code class="function">gnome_keyring_find_items()</code></a>.</p>
319
<div class="variablelist"><table border="0">
320
<col align="left" valign="top">
323
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
324
<td> The type of items to find.
328
<td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td>
329
<td> A list of attributes to search for. This cannot be an empty list.
333
<td><p><span class="term"><em class="parameter"><code>found</code></em> :</span></p></td>
334
<td> The location to return a list of <a class="link" href="gnome-keyring-gnome-keyring-find.html#GnomeKeyringFound" title="GnomeKeyringFound"><span class="type">GnomeKeyringFound</span></a> pointers.
338
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
339
<td> <code class="literal">GNOME_KEYRING_RESULT_OK</code> if the operation was succcessful or
340
an error result otherwise.
347
<div class="refsect2" title="gnome_keyring_find_itemsv_sync ()">
348
<a name="gnome-keyring-find-itemsv-sync"></a><h3>gnome_keyring_find_itemsv_sync ()</h3>
349
<pre class="programlisting"><a class="link" href="gnome-keyring-gnome-keyring-result.html#GnomeKeyringResult" title="enum GnomeKeyringResult">GnomeKeyringResult</a> gnome_keyring_find_itemsv_sync (<a class="link" href="gnome-keyring-gnome-keyring-item-info.html#GnomeKeyringItemType" title="enum GnomeKeyringItemType">GnomeKeyringItemType</a> type,
351
href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"
355
Searches through all keyrings for items that match the <em class="parameter"><code>attributes</code></em> and <em class="parameter"><code>type</code></em>.
356
The matches are for exact equality.
359
The variable argument list should contain a) The attribute name as a null
360
terminated string, followed by b) The attribute type, either
361
<code class="literal">GNOME_KEYRING_ATTRIBUTE_TYPE_STRING</code> or <code class="literal">GNOME_KEYRING_ATTRIBUTE_TYPE_UINT32</code>
362
and then the c) attribute value, either a character string, or 32-bit
363
unsigned int. The list should be terminated with a NULL.
367
href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"
368
><code class="literal">GList</code></a> of GnomeKeyringFound structures is returned in <em class="parameter"><code>found</code></em>. The list may
369
have zero items if nothing matched the criteria. The list should be freed
370
using <a class="link" href="gnome-keyring-gnome-keyring-find.html#gnome-keyring-found-list-free" title="gnome_keyring_found_list_free ()"><code class="function">gnome_keyring_found_list_free()</code></a>.
373
The user may have been prompted to unlock necessary keyrings, and user will
374
have been prompted for access to the items if needed.
377
For an asynchronous version of this function see <a class="link" href="gnome-keyring-gnome-keyring-find.html#gnome-keyring-find-items" title="gnome_keyring_find_items ()"><code class="function">gnome_keyring_find_items()</code></a>.</p>
380
<div class="variablelist"><table border="0">
381
<col align="left" valign="top">
384
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
385
<td> The type of items to find.
389
<td><p><span class="term"><em class="parameter"><code>found</code></em> :</span></p></td>
390
<td> The location to return a list of <a class="link" href="gnome-keyring-gnome-keyring-find.html#GnomeKeyringFound" title="GnomeKeyringFound"><span class="type">GnomeKeyringFound</span></a> pointers.
394
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
399
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
400
<td> <code class="literal">GNOME_KEYRING_RESULT_OK</code> if the operation was succcessful or
401
an error result otherwise.
411
Generated by GTK-Doc V1.11</div>