blob: 78c6bba6f8aef65c6dff1446c703b77f4a175b43 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GTlsPassword: GIO Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GIO Reference Manual">
<link rel="up" href="tls.html" title="TLS (SSL) support">
<link rel="prev" href="GTlsInteraction.html" title="GTlsInteraction">
<link rel="next" href="resolver.html" title="DNS resolution">
<meta name="generator" content="GTK-Doc V1.25.1 (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">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
<a href="#GTlsPassword.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#GTlsPassword.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
<a href="#GTlsPassword.properties" class="shortcut">Properties</a></span>
</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="tls.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GTlsInteraction.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="resolver.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GTlsPassword"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GTlsPassword.top_of_page"></a>GTlsPassword</span></h2>
<p>GTlsPassword — TLS Passwords for prompting</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GTlsPassword.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="returnvalue">GTlsPassword</span></a> *
</td>
<td class="function_name">
<a class="link" href="GTlsPassword.html#g-tls-password-new" title="g_tls_password_new ()">g_tls_password_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib-Basic-Types.html#guchar"><span class="returnvalue">guchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="GTlsPassword.html#g-tls-password-get-value" title="g_tls_password_get_value ()">g_tls_password_get_value</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GTlsPassword.html#g-tls-password-set-value" title="g_tls_password_set_value ()">g_tls_password_set_value</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GTlsPassword.html#g-tls-password-set-value-full" title="g_tls_password_set_value_full ()">g_tls_password_set_value_full</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="GTlsPassword.html#g-tls-password-get-description" title="g_tls_password_get_description ()">g_tls_password_get_description</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GTlsPassword.html#g-tls-password-set-description" title="g_tls_password_set_description ()">g_tls_password_set_description</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GTlsPassword.html#GTlsPasswordFlags" title="enum GTlsPasswordFlags"><span class="returnvalue">GTlsPasswordFlags</span></a>
</td>
<td class="function_name">
<a class="link" href="GTlsPassword.html#g-tls-password-get-flags" title="g_tls_password_get_flags ()">g_tls_password_get_flags</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GTlsPassword.html#g-tls-password-set-flags" title="g_tls_password_set_flags ()">g_tls_password_set_flags</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="GTlsPassword.html#g-tls-password-get-warning" title="g_tls_password_get_warning ()">g_tls_password_get_warning</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GTlsPassword.html#g-tls-password-set-warning" title="g_tls_password_set_warning ()">g_tls_password_set_warning</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GTlsPassword.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type">
<a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
<td class="property_name"><a class="link" href="GTlsPassword.html#GTlsPassword--description" title="The “description” property">description</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a class="link" href="GTlsPassword.html#GTlsPasswordFlags" title="enum GTlsPasswordFlags"><span class="type">GTlsPasswordFlags</span></a></td>
<td class="property_name"><a class="link" href="GTlsPassword.html#GTlsPassword--flags" title="The “flags” property">flags</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type">
<a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
<td class="property_name"><a class="link" href="GTlsPassword.html#GTlsPassword--warning" title="The “warning” property">warning</a></td>
<td class="property_flags">Read / Write</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GTlsPassword.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GTlsPassword.html#GTlsPassword-struct" title="GTlsPassword">GTlsPassword</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GTlsPassword.html#GTlsPasswordClass" title="struct GTlsPasswordClass">GTlsPasswordClass</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GTlsPassword.html#GTlsPasswordFlags" title="enum GTlsPasswordFlags">GTlsPasswordFlags</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GTlsPassword.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="../gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
<span class="lineart">╰──</span> GTlsPassword
</pre>
</div>
<div class="refsect1">
<a name="GTlsPassword.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gio/gio.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GTlsPassword.description"></a><h2>Description</h2>
<p>Holds a password used in TLS.</p>
</div>
<div class="refsect1">
<a name="GTlsPassword.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="g-tls-password-new"></a><h3>g_tls_password_new ()</h3>
<pre class="programlisting"><a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="returnvalue">GTlsPassword</span></a> *
g_tls_password_new (<em class="parameter"><code><a class="link" href="GTlsPassword.html#GTlsPasswordFlags" title="enum GTlsPasswordFlags"><span class="type">GTlsPasswordFlags</span></a> flags</code></em>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *description</code></em>);</pre>
<p>Create a new <a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="type">GTlsPassword</span></a> object.</p>
<div class="refsect3">
<a name="g-tls-password-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>the password flags</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>description</p></td>
<td class="parameter_description"><p>description of what the password is for</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-tls-password-new.returns"></a><h4>Returns</h4>
<p> The newly allocated password object. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-tls-password-get-value"></a><h3>g_tls_password_get_value ()</h3>
<pre class="programlisting">const <a href="../glib-Basic-Types.html#guchar"><span class="returnvalue">guchar</span></a> *
g_tls_password_get_value (<em class="parameter"><code><a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="type">GTlsPassword</span></a> *password</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *length</code></em>);</pre>
<p>Get the password value. If <em class="parameter"><code>length</code></em>
is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then it will be
filled in with the length of the password value. (Note that the
password value is not nul-terminated, so you can only pass <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
for <em class="parameter"><code>length</code></em>
in contexts where you know the password will have a
certain fixed length.)</p>
<div class="refsect3">
<a name="g-tls-password-get-value.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>password</p></td>
<td class="parameter_description"><p>a <a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="type">GTlsPassword</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p> location to place the length of the password. </p></td>
<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>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-tls-password-get-value.returns"></a><h4>Returns</h4>
<p> The password value (owned by the password object).</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-30.html#api-index-2.30">2.30</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-tls-password-set-value"></a><h3>g_tls_password_set_value ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_tls_password_set_value (<em class="parameter"><code><a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="type">GTlsPassword</span></a> *password</code></em>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *value</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> length</code></em>);</pre>
<p>Set the value for this password. The <em class="parameter"><code>value</code></em>
will be copied by the password
object.</p>
<p>Specify the <em class="parameter"><code>length</code></em>
, for a non-nul-terminated password. Pass -1 as
<em class="parameter"><code>length</code></em>
if using a nul-terminated password, and <em class="parameter"><code>length</code></em>
will be
calculated automatically. (Note that the terminating nul is not
considered part of the password in this case.)</p>
<div class="refsect3">
<a name="g-tls-password-set-value.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>password</p></td>
<td class="parameter_description"><p>a <a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="type">GTlsPassword</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>the new password value</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>the length of the password, or -1</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-30.html#api-index-2.30">2.30</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-tls-password-set-value-full"></a><h3>g_tls_password_set_value_full ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_tls_password_set_value_full (<em class="parameter"><code><a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="type">GTlsPassword</span></a> *password</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *value</code></em>,
<em class="parameter"><code><a href="../glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> length</code></em>,
<em class="parameter"><code><a href="../glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);</pre>
<p>Provide the value for this password.</p>
<p>The <em class="parameter"><code>value</code></em>
will be owned by the password object, and later freed using
the <em class="parameter"><code>destroy</code></em>
function callback.</p>
<p>Specify the <em class="parameter"><code>length</code></em>
, for a non-nul-terminated password. Pass -1 as
<em class="parameter"><code>length</code></em>
if using a nul-terminated password, and <em class="parameter"><code>length</code></em>
will be
calculated automatically. (Note that the terminating nul is not
considered part of the password in this case.)</p>
<p>Virtual: set_value</p>
<div class="refsect3">
<a name="g-tls-password-set-value-full.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>password</p></td>
<td class="parameter_description"><p>a <a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="type">GTlsPassword</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>the value for the password</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>the length of the password, or -1</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>destroy</p></td>
<td class="parameter_description"><p> a function to use to free the password. </p></td>
<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>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-30.html#api-index-2.30">2.30</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-tls-password-get-description"></a><h3>g_tls_password_get_description ()</h3>
<pre class="programlisting">const <a href="../glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
g_tls_password_get_description (<em class="parameter"><code><a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="type">GTlsPassword</span></a> *password</code></em>);</pre>
<p>Get a description string about what the password will be used for.</p>
<div class="refsect3">
<a name="g-tls-password-get-description.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>password</p></td>
<td class="parameter_description"><p>a <a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="type">GTlsPassword</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-tls-password-get-description.returns"></a><h4>Returns</h4>
<p> The description of the password.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-30.html#api-index-2.30">2.30</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-tls-password-set-description"></a><h3>g_tls_password_set_description ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_tls_password_set_description (<em class="parameter"><code><a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="type">GTlsPassword</span></a> *password</code></em>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *description</code></em>);</pre>
<p>Set a description string about what the password will be used for.</p>
<div class="refsect3">
<a name="g-tls-password-set-description.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>password</p></td>
<td class="parameter_description"><p>a <a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="type">GTlsPassword</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>description</p></td>
<td class="parameter_description"><p>The description of the password</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-30.html#api-index-2.30">2.30</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-tls-password-get-flags"></a><h3>g_tls_password_get_flags ()</h3>
<pre class="programlisting"><a class="link" href="GTlsPassword.html#GTlsPasswordFlags" title="enum GTlsPasswordFlags"><span class="returnvalue">GTlsPasswordFlags</span></a>
g_tls_password_get_flags (<em class="parameter"><code><a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="type">GTlsPassword</span></a> *password</code></em>);</pre>
<p>Get flags about the password.</p>
<div class="refsect3">
<a name="g-tls-password-get-flags.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>password</p></td>
<td class="parameter_description"><p>a <a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="type">GTlsPassword</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-tls-password-get-flags.returns"></a><h4>Returns</h4>
<p> The flags about the password.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-30.html#api-index-2.30">2.30</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-tls-password-set-flags"></a><h3>g_tls_password_set_flags ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_tls_password_set_flags (<em class="parameter"><code><a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="type">GTlsPassword</span></a> *password</code></em>,
<em class="parameter"><code><a class="link" href="GTlsPassword.html#GTlsPasswordFlags" title="enum GTlsPasswordFlags"><span class="type">GTlsPasswordFlags</span></a> flags</code></em>);</pre>
<p>Set flags about the password.</p>
<div class="refsect3">
<a name="g-tls-password-set-flags.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>password</p></td>
<td class="parameter_description"><p>a <a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="type">GTlsPassword</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>The flags about the password</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-30.html#api-index-2.30">2.30</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-tls-password-get-warning"></a><h3>g_tls_password_get_warning ()</h3>
<pre class="programlisting">const <a href="../glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
g_tls_password_get_warning (<em class="parameter"><code><a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="type">GTlsPassword</span></a> *password</code></em>);</pre>
<p>Get a user readable translated warning. Usually this warning is a
representation of the password flags returned from
<a class="link" href="GTlsPassword.html#g-tls-password-get-flags" title="g_tls_password_get_flags ()"><code class="function">g_tls_password_get_flags()</code></a>.</p>
<div class="refsect3">
<a name="g-tls-password-get-warning.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>password</p></td>
<td class="parameter_description"><p>a <a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="type">GTlsPassword</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-tls-password-get-warning.returns"></a><h4>Returns</h4>
<p> The warning.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-30.html#api-index-2.30">2.30</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-tls-password-set-warning"></a><h3>g_tls_password_set_warning ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_tls_password_set_warning (<em class="parameter"><code><a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="type">GTlsPassword</span></a> *password</code></em>,
<em class="parameter"><code>const <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *warning</code></em>);</pre>
<p>Set a user readable translated warning. Usually this warning is a
representation of the password flags returned from
<a class="link" href="GTlsPassword.html#g-tls-password-get-flags" title="g_tls_password_get_flags ()"><code class="function">g_tls_password_get_flags()</code></a>.</p>
<div class="refsect3">
<a name="g-tls-password-set-warning.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>password</p></td>
<td class="parameter_description"><p>a <a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="type">GTlsPassword</span></a> object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>warning</p></td>
<td class="parameter_description"><p>The user readable warning</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-30.html#api-index-2.30">2.30</a></p>
</div>
</div>
<div class="refsect1">
<a name="GTlsPassword.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GTlsPassword-struct"></a><h3>GTlsPassword</h3>
<pre class="programlisting">typedef struct _GTlsPassword GTlsPassword;</pre>
<p>An abstract interface representing a password used in TLS. Often used in
user interaction such as unlocking a key storage token.</p>
<p class="since">Since: <a class="link" href="api-index-2-30.html#api-index-2.30">2.30</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GTlsPasswordClass"></a><h3>struct GTlsPasswordClass</h3>
<pre class="programlisting">struct GTlsPasswordClass {
GObjectClass parent_class;
/* methods */
const guchar * ( *get_value) (GTlsPassword *password,
gsize *length);
void ( *set_value) (GTlsPassword *password,
guchar *value,
gssize length,
GDestroyNotify destroy);
const gchar* ( *get_default_warning) (GTlsPassword *password);
};
</pre>
<p>Class structure for <a class="link" href="GTlsPassword.html" title="GTlsPassword"><span class="type">GTlsPassword</span></a>.</p>
<div class="refsect3">
<a name="GTlsPasswordClass.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GTlsPasswordClass.get-value"></a>get_value</code></em> ()</p></td>
<td class="struct_member_description"><p>virtual method for <a class="link" href="GTlsPassword.html#g-tls-password-get-value" title="g_tls_password_get_value ()"><code class="function">g_tls_password_get_value()</code></a></p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GTlsPasswordClass.set-value"></a>set_value</code></em> ()</p></td>
<td class="struct_member_description"><p>virtual method for <a class="link" href="GTlsPassword.html#g-tls-password-set-value" title="g_tls_password_set_value ()"><code class="function">g_tls_password_set_value()</code></a></p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GTlsPasswordClass.get-default-warning"></a>get_default_warning</code></em> ()</p></td>
<td class="struct_member_description"><p>virtual method for <a class="link" href="GTlsPassword.html#g-tls-password-get-warning" title="g_tls_password_get_warning ()"><code class="function">g_tls_password_get_warning()</code></a> if no
value has been set using <a class="link" href="GTlsPassword.html#g-tls-password-set-warning" title="g_tls_password_set_warning ()"><code class="function">g_tls_password_set_warning()</code></a></p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GTlsPasswordFlags"></a><h3>enum GTlsPasswordFlags</h3>
<p>Various flags for the password.</p>
<div class="refsect3">
<a name="GTlsPasswordFlags.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="G-TLS-PASSWORD-NONE:CAPS"></a>G_TLS_PASSWORD_NONE</p></td>
<td class="enum_member_description">
<p>No flags</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-TLS-PASSWORD-RETRY:CAPS"></a>G_TLS_PASSWORD_RETRY</p></td>
<td class="enum_member_description">
<p>The password was wrong, and the user should retry.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-TLS-PASSWORD-MANY-TRIES:CAPS"></a>G_TLS_PASSWORD_MANY_TRIES</p></td>
<td class="enum_member_description">
<p>Hint to the user that the password has been
wrong many times, and the user may not have many chances left.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="G-TLS-PASSWORD-FINAL-TRY:CAPS"></a>G_TLS_PASSWORD_FINAL_TRY</p></td>
<td class="enum_member_description">
<p>Hint to the user that this is the last try to get
this password right.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-30.html#api-index-2.30">2.30</a></p>
</div>
</div>
<div class="refsect1">
<a name="GTlsPassword.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GTlsPassword--description"></a><h3>The <code class="literal">“description”</code> property</h3>
<pre class="programlisting"> “description” <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
<p>Description of what the password is for.</p>
<p>Flags: Read / Write</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="GTlsPassword--flags"></a><h3>The <code class="literal">“flags”</code> property</h3>
<pre class="programlisting"> “flags” <a class="link" href="GTlsPassword.html#GTlsPasswordFlags" title="enum GTlsPasswordFlags"><span class="type">GTlsPasswordFlags</span></a></pre>
<p>Flags about the password.</p>
<p>Flags: Read / Write</p>
</div>
<hr>
<div class="refsect2">
<a name="GTlsPassword--warning"></a><h3>The <code class="literal">“warning”</code> property</h3>
<pre class="programlisting"> “warning” <a href="../glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
<p>Warning about the password.</p>
<p>Flags: Read / Write</p>
<p>Default value: NULL</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25.1</div>
</body>
</html>