Current File : //proc/thread-self/root/kunden/usr/share/gtk-doc/html/libsecret-1/migrating-searching.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Searching for passwords and items: Libsecret Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Libsecret Library Reference Manual">
<link rel="up" href="migrating-api.html" title="API conversion">
<link rel="prev" href="migrating-storing.html" title="Storing passwords and items">
<link rel="next" href="migrating-removing.html" title="Removing passwords and icons">
<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="migrating-api.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="migrating-storing.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="migrating-removing.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="migrating-searching"></a>Searching for passwords and items</h2></div></div></div>
<p>In general libsecret tries not to unlocking keyrings
	where not necessary. Many search methods only return one item or
	password that matches, preferring already unlocked items, and recently stored
	items.</p>
<p>Attributes are meant to be used for lookup of items; they're not
	designed to be used as a generic key/value database. Although you can
	force libsecret to do the latter, it's better to store your account
	information elsewhere if possible, and use libsecret to store the password
	or other secret. Because of this many search methods return just the
	password or secret.</p>
<p>Replacements for related libgnome-keyring functions and types
	are described below:
	</p>
<div class="table">
<a name="id-1.6.3.6.4.1"></a><p class="title"><b>Table 4. </b></p>
<div class="table-contents"><table class="table" border="1">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>libgnome-keyring</th>
<th>libsecret</th>
</tr></thead>
<tbody>
<tr>
<td><code class="function">gnome_keyring_find_password()</code></td>
<td><a class="link" href="libsecret-Password-storage.html#secret-password-lookup" title="secret_password_lookup ()"><code class="function">secret_password_lookup()</code></a></td>
</tr>
<tr>
<td><code class="function">gnome_keyring_find_password_sync()</code></td>
<td><a class="link" href="libsecret-Password-storage.html#secret-password-lookup-sync" title="secret_password_lookup_sync ()"><code class="function">secret_password_lookup_sync()</code></a></td>
</tr>
<tr>
<td><code class="function">gnome_keyring_find_items()</code></td>
<td>
<a class="link" href="SecretService.html#secret-service-search" title="secret_service_search ()"><code class="function">secret_service_search()</code></a>, with flags to fine tune behavior</td>
</tr>
<tr>
<td><code class="function">gnome_keyring_find_itemsv()</code></td>
<td>
<a class="link" href="SecretService.html#secret-service-search" title="secret_service_search ()"><code class="function">secret_service_search()</code></a>, with flags to fine tune behavior</td>
</tr>
<tr>
<td><code class="function">gnome_keyring_find_items_sync()</code></td>
<td>
<a class="link" href="SecretService.html#secret-service-search-sync" title="secret_service_search_sync ()"><code class="function">secret_service_search_sync()</code></a>, with flags to fine tune behavior</td>
</tr>
<tr>
<td><code class="function">gnome_keyring_find_itemsv_sync()</code></td>
<td>
<a class="link" href="SecretService.html#secret-service-search" title="secret_service_search ()"><code class="function">secret_service_search()</code></a>, with flags to fine tune behavior</td>
</tr>
<tr>
<td>GnomeKeyringFound</td>
<td>no equivalent, <a class="link" href="SecretService.html#secret-service-search" title="secret_service_search ()"><code class="function">secret_service_search()</code></a> returns a <a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of
			<a class="link" href="SecretItem.html" title="SecretItem"><span class="type">SecretItem</span></a>s, and other methods return passwords directly.</td>
</tr>
<tr>
<td><code class="function">gnome_keyring_found_copy()</code></td>
<td>no equivalent</td>
</tr>
<tr>
<td><code class="function">gnome_keyring_found_free()</code></td>
<td>
<a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> on the each of the items returned from
			<a class="link" href="SecretService.html#secret-service-search" title="secret_service_search ()"><code class="function">secret_service_search()</code></a>
</td>
</tr>
<tr>
<td><code class="function">gnome_keyring_found_list_free()</code></td>
<td>
<a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#g-list-free-full"><code class="function">g_list_free_full()</code></a> used with <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> on the items returned from
			<a class="link" href="SecretService.html#secret-service-search" title="secret_service_search ()"><code class="function">secret_service_search()</code></a>
</td>
</tr>
<tr>
<td><code class="function">gnome_keyring_find_network_password()</code></td>
<td>
<a class="link" href="libsecret-Password-storage.html#secret-password-lookup" title="secret_password_lookup ()"><code class="function">secret_password_lookup()</code></a> with <a class="link" href="libsecret-SecretSchema.html#SECRET-SCHEMA-COMPAT-NETWORK:CAPS" title="SECRET_SCHEMA_COMPAT_NETWORK"><code class="literal">SECRET_SCHEMA_COMPAT_NETWORK</code></a>,
			although this only returns one password and no attributes</td>
</tr>
<tr>
<td><code class="function">gnome_keyring_find_network_password_sync()</code></td>
<td>
<a class="link" href="libsecret-Password-storage.html#secret-password-lookup-sync" title="secret_password_lookup_sync ()"><code class="function">secret_password_lookup_sync()</code></a> with <a class="link" href="libsecret-SecretSchema.html#SECRET-SCHEMA-COMPAT-NETWORK:CAPS" title="SECRET_SCHEMA_COMPAT_NETWORK"><code class="literal">SECRET_SCHEMA_COMPAT_NETWORK</code></a>,
			although this only returns one password and no attributes</td>
</tr>
<tr>
<td><span class="type">GnomeKeyringNetworkPasswordData</span></td>
<td>no equivalent, <a class="link" href="libsecret-Password-storage.html#secret-password-lookup" title="secret_password_lookup ()"><code class="function">secret_password_lookup()</code></a> gets the password directly
			and no attributes</td>
</tr>
<tr>
<td><code class="function">gnome_keyring_network_password_free()</code></td>
<td>no equivalent</td>
</tr>
<tr>
<td><code class="function">gnome_keyring_network_password_list_free()</code></td>
<td>no equivalent</td>
</tr>
</tbody>
</table></div>
</div>
<p><br class="table-break"></p>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.32</div>
</body>
</html>