1 <listitem id="command_version">
4 <parameter>number</parameter>
7 This exchanges with the frontend the protocol version
8 number that is being used. The current version is
9 2.0. Versions in the 2.x series will be
10 backwards-compatible. You may specify the protocol version
11 number you are speaking. The frontend will return the version
12 of the protocol it speaks. If the version you specify is too
13 low, this command will return the numeric return code
14 <literal>30</literal>.
17 <listitem id="command_capb">
20 <parameter>capabilities</parameter>
23 This exchanges with the frontend a list of supported capabilities
24 Capabilities both the frontend and your confmodule support may be
25 used; the capabilities supported by the frontend are returned by
28 <title>Currently used capabilities</title>
32 <entry>capability</entry>
33 <entry>description</entry>
40 Backing up to a previous step is supported.
44 <entry>multiselect</entry>
46 The multiselect data type is supported. For compatability
47 reasons, you should not ask questions of this type unless
48 this capability is returned.
56 <listitem id="command_title">
59 <parameter>string</parameter>
62 You can use this command to set a title in the
63 frontend. This may appear in different ways, depending on the
64 frontend being used, for example it might change the title
65 of the frontend's window. If you don't specify anything, a
66 title will automatically be generated.
69 <listitem id="command_stop">
74 This command tells the frontend you're done talking to it. Typically
75 the frontend can detect the termination of your program and this
76 command is not necessary.
79 <listitem id="command_input">
82 <parameter>priority</parameter>
83 <parameter>question</parameter>
86 This tells the frontend to display a question (or other type of
87 item) to the user. <parameter>question</parameter> is the name of the
88 item to display, all other information about the item is retrieved
89 from the templates described previously.
90 <parameter>priority</parameter> is how important it is that the
91 user be prompted. The frontend need only ask this question if the
92 priority is high enough. The question is not displayed until a go
93 command is given. This allows us to ask multiple questions in a single
94 screen. Once a question has been displayed to the user and the user has
95 provided input, the frontend will set the
96 <literal>seen</literal> flag.
100 Note that the frontend decides if the user is actually
101 prompted or not. If the user has already answered a
102 question, they are normally not asked it again even if
103 input is called again. And if the user is ignoring low
104 priority items, they will not see them. In either of
105 these cases, this command returns the numeric return code
106 <literal>30</literal>.
109 <listitem id="command_beginblock">
114 <listitem id="command_endblock">
119 Some frontends are able to display a number of items to
120 the user at once. To do this, they need to be given blocks
121 of input commands, enclosed in the BEGINBLOCK and ENDBLOCK
122 commands. Blocks can be nested and very advanced frontends
123 may use this as a user interface hint.
127 There is an implicit block around any set of INPUT commands
128 that are not enclosed in an explicit block.
132 <listitem id="command_go">
137 Shows the current set of accumulated items to the user and lets
138 them fill in values, etc. If the backup capability is supported
139 and the user indicates they want to back up a step, this command
140 returns the numeric return code <literal>30</literal>.
143 <listitem id="command_clear">
148 Clears the accumulated set of INPUT commands without displaying
152 <listitem id="command_get">
154 GET <parameter>question</parameter>
157 Ask the frontend to tell you how the user answered a question. The
158 value is returned to you.
161 <listitem id="command_set">
164 <parameter>question</parameter>
165 <parameter>value</parameter>
168 Set the answer of a question to a value.
171 <listitem id="command_reset">
173 RESET <parameter>question</parameter>
176 Reset the question to its default value. This includes
177 resetting flags to their defaults.
180 <listitem id="command_subst">
183 <parameter>question</parameter>
184 <parameter>key</parameter>
185 <parameter>value</parameter>
188 Questions (and other items) can have substitutions embedded in their
189 descriptions. These substitutions look like
190 "<literal>${key}</literal>". When the question is displayed,
191 the substitutions are replaced with their values. This
192 command can be used to set the value of a substitution.
195 <listitem id="command_fget">
198 <parameter>question</parameter>
199 <parameter>flag</parameter>
202 Questions (and other items) can have flags associated with them. The
203 flags have a value of "<literal>true</literal>" or
204 "<literal>false</literal>". This command returns
208 <listitem id="command_fset">
211 <parameter>question</parameter>
212 <parameter>flag</parameter>
213 <parameter>value</parameter>
216 This sets the state of a flag on a question. Valid
217 states for the flag are "<literal>true</literal>" and
218 "<literal>false</literal>".
221 One common flag is the
222 "<literal>seen</literal>" flag. It is normally only set if
223 a user already seen a question.
224 Typically, frontends only display questions to users if they have the
225 seen flag set to "false". Sometimes you want the user to see a
226 question again -- in these cases you can set the seen flag to
227 false to force the frontend to redisplay it.
230 <listitem id="command_metaget">
233 <parameter>question</parameter>
234 <parameter>field</parameter>
237 This returns the value of any field of a question (the description, for
241 <listitem id="command_register">
244 <parameter>template</parameter>
245 <parameter>question</parameter>
248 This creates a new question that is bound to a
249 template. By default each template has an associated
250 question with the same name. However, any number of
251 questions can really be associated with a template, and
252 this lets you create more such questions.
255 <listitem id="command_unregister">
258 <parameter>question</parameter>
261 This removes a question from the database.
264 <listitem id="command_purge">
269 Call this in your postrm when your package is
270 purged. It removes all templates and questions your
271 package has generated.