HEX
Server: Apache/2.4.41 (Amazon) OpenSSL/1.0.2k-fips PHP/5.6.40
System: Linux ip-172-31-40-18 4.14.146-93.123.amzn1.x86_64 #1 SMP Tue Sep 24 00:45:23 UTC 2019 x86_64
User: apache (48)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: //usr/share/gtk-doc/html/libuser/libuser-prompt.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>prompt</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="libuser Reference Manual">
<link rel="up" href="ch01.html" title="libuser">
<link rel="prev" href="libuser-error.html" title="error">
<link rel="next" href="libuser-user.html" title="user">
<meta name="generator" content="GTK-Doc V1.19 (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="2">
<tr valign="middle">
<td><a accesskey="p" href="libuser-error.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libuser Reference Manual</th>
<td><a accesskey="n" href="libuser-user.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libuser-prompt.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#libuser-prompt.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="libuser-prompt"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libuser-prompt.top_of_page"></a>prompt</span></h2>
<p>prompt — Sample prompter functions for use with the libuser
library.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="libuser-prompt.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libuser/prompt.h&gt;

<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="libuser-prompt.html#lu-prompt-console" title="lu_prompt_console ()">lu_prompt_console</a>                   (<em class="parameter"><code><span class="type">struct lu_prompt</span> *prompts</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> count</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> callback_data</code></em>,
                                                         <em class="parameter"><code><span class="type">struct lu_error</span> **error</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="libuser-prompt.html#lu-prompt-console-quiet" title="lu_prompt_console_quiet ()">lu_prompt_console_quiet</a>             (<em class="parameter"><code><span class="type">struct lu_prompt</span> *prompts</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> count</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> callback_data</code></em>,
                                                         <em class="parameter"><code><span class="type">struct lu_error</span> **error</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="libuser-prompt.description"></a><h2>Description</h2>
<p>
prompt.h declares two predefined prompter functions which applications can
use instead of providing their own.  These should suffice for most
command-line applications.  Authors of graphical applications are encouraged
to supply graphical implementations.
</p>
</div>
<div class="refsect1">
<a name="libuser-prompt.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="lu-prompt-console"></a><h3>lu_prompt_console ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            lu_prompt_console                   (<em class="parameter"><code><span class="type">struct lu_prompt</span> *prompts</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> count</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> callback_data</code></em>,
                                                         <em class="parameter"><code><span class="type">struct lu_error</span> **error</code></em>);</pre>
<p>
Prompts the user using a text console.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>prompts</code></em> :</span></p></td>
<td>An array of <span class="type">lu_prompt</span> structures.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>count</code></em> :</span></p></td>
<td>The number of elements in the <em class="parameter"><code>prompts</code></em> array.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
<td>Ignored.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>The location to store error information in the event of an error.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> indicating success or failure.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="lu-prompt-console-quiet"></a><h3>lu_prompt_console_quiet ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            lu_prompt_console_quiet             (<em class="parameter"><code><span class="type">struct lu_prompt</span> *prompts</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> count</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> callback_data</code></em>,
                                                         <em class="parameter"><code><span class="type">struct lu_error</span> **error</code></em>);</pre>
<p>
Prompts the user using a text console.  Unlike <a class="link" href="libuser-prompt.html#lu-prompt-console" title="lu_prompt_console ()"><code class="function">lu_prompt_console()</code></a>, this
function will not prompt users for a question for which the calling
application or module supplies a default, and will simply return the
default.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>prompts</code></em> :</span></p></td>
<td>An array of <span class="type">lu_prompt</span> structures.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>count</code></em> :</span></p></td>
<td>The number of elements in the <em class="parameter"><code>prompts</code></em> array.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
<td>Ignored.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>The location to store error information in the event of an error.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> indicating success or failure.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.19</div>
</body>
</html>