]>
Commit | Line | Data |
---|---|---|
f11a948a MS |
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
2 | <html> | |
3 | <!-- SECTION: Programming --> | |
4 | <head> | |
5 | <title>CGI API</title> | |
6 | <meta name="keywords" content="Programming"> | |
7 | <meta name="creator" content="Mini-XML v2.6"> | |
8 | <style type="text/css"><!-- | |
9 | BODY { | |
10 | font-family: lucida grande, geneva, helvetica, arial, sans-serif; | |
11 | } | |
12 | ||
13 | H1, H2, H3, H4, H5, H6, P, TD, TH { | |
14 | font-family: lucida grande, geneva, helvetica, arial, sans-serif; | |
15 | } | |
16 | ||
17 | KBD { | |
18 | font-family: monaco, courier, monospace; | |
19 | font-weight: bold; | |
20 | } | |
21 | ||
22 | PRE { | |
23 | font-family: monaco, courier, monospace; | |
24 | } | |
25 | ||
26 | PRE.command { | |
27 | margin-left: 36pt; | |
28 | } | |
29 | ||
30 | P.compact { | |
31 | margin: 0; | |
32 | } | |
33 | ||
34 | P.example { | |
35 | font-style: italic; | |
36 | margin-left: 36pt; | |
37 | } | |
38 | ||
39 | PRE.example { | |
40 | background: #eeeeee; | |
41 | border: dotted thin #999999; | |
42 | margin-left: 36pt; | |
178cb736 | 43 | padding: 10pt; |
f11a948a MS |
44 | } |
45 | ||
46 | PRE.command EM, PRE.example EM { | |
47 | font-family: lucida grande, geneva, helvetica, arial, sans-serif; | |
48 | } | |
49 | ||
50 | P.command { | |
51 | font-family: monaco, courier, monospace; | |
52 | margin-left: 36pt; | |
53 | } | |
54 | ||
55 | P.formula { | |
56 | font-style: italic; | |
57 | margin-left: 36pt; | |
58 | } | |
59 | ||
60 | BLOCKQUOTE { | |
178cb736 | 61 | background: #eeeeee; |
f11a948a MS |
62 | border: solid thin #999999; |
63 | padding: 10pt; | |
64 | } | |
65 | ||
66 | A IMG { | |
67 | border: none; | |
68 | } | |
69 | ||
70 | A:link:hover IMG { | |
71 | background: #f0f0f0; | |
72 | border-radius: 10px; | |
73 | -moz-border-radius: 10px; | |
74 | } | |
75 | ||
76 | A:link, A:visited { | |
77 | font-weight: normal; | |
78 | text-decoration: none; | |
79 | } | |
80 | ||
81 | A:link:hover, A:visited:hover, A:active { | |
82 | text-decoration: underline; | |
83 | } | |
84 | ||
85 | SUB, SUP { | |
86 | font-size: 50%; | |
87 | } | |
88 | ||
89 | TR.data, TD.data, TR.data TD { | |
90 | margin-top: 10pt; | |
91 | padding: 5pt; | |
92 | border-bottom: solid 1pt #999999; | |
93 | } | |
94 | ||
95 | TR.data TH { | |
96 | border-bottom: solid 1pt #999999; | |
97 | padding-top: 10pt; | |
98 | padding-left: 5pt; | |
99 | text-align: left; | |
100 | } | |
101 | ||
102 | DIV.table TABLE { | |
103 | border: solid thin #999999; | |
104 | border-collapse: collapse; | |
105 | border-spacing: 0; | |
106 | margin-left: auto; | |
107 | margin-right: auto; | |
108 | } | |
109 | ||
110 | DIV.table CAPTION { | |
111 | caption-side: top; | |
112 | font-size: 120%; | |
113 | font-style: italic; | |
114 | font-weight: bold; | |
115 | margin-left: auto; | |
116 | margin-right: auto; | |
117 | } | |
118 | ||
119 | DIV.table TABLE TD { | |
120 | border: solid thin #cccccc; | |
121 | padding-top: 5pt; | |
122 | } | |
123 | ||
124 | DIV.table TABLE TH { | |
125 | background: #cccccc; | |
126 | border: none; | |
127 | border-bottom: solid thin #999999; | |
128 | } | |
129 | ||
130 | DIV.figure TABLE { | |
131 | margin-left: auto; | |
132 | margin-right: auto; | |
133 | } | |
134 | ||
135 | DIV.figure CAPTION { | |
136 | caption-side: bottom; | |
137 | font-size: 120%; | |
138 | font-style: italic; | |
139 | font-weight: bold; | |
140 | margin-left: auto; | |
141 | margin-right: auto; | |
142 | } | |
143 | ||
144 | TH.label { | |
145 | text-align: right; | |
146 | vertical-align: top; | |
147 | } | |
148 | ||
149 | TH.sublabel { | |
150 | text-align: right; | |
151 | font-weight: normal; | |
152 | } | |
153 | ||
154 | HR { | |
155 | border: solid thin; | |
156 | } | |
157 | ||
158 | SPAN.info { | |
159 | background: black; | |
160 | border: thin solid black; | |
161 | color: white; | |
162 | font-size: 80%; | |
163 | font-style: italic; | |
164 | font-weight: bold; | |
165 | white-space: nowrap; | |
166 | } | |
167 | ||
168 | H2 SPAN.info, H3 SPAN.info, H4 SPAN.info { | |
169 | float: right; | |
170 | font-size: 100%; | |
171 | } | |
172 | ||
178cb736 MS |
173 | H1.title { |
174 | } | |
175 | ||
f11a948a MS |
176 | H2.title, H3.title { |
177 | border-bottom: solid 2pt #000000; | |
178 | } | |
179 | ||
180 | DIV.indent, TABLE.indent { | |
181 | margin-top: 2em; | |
182 | margin-left: auto; | |
183 | margin-right: auto; | |
184 | width: 90%; | |
185 | } | |
186 | ||
187 | TABLE.indent { | |
188 | border-collapse: collapse; | |
189 | } | |
190 | ||
191 | TABLE.indent TD, TABLE.indent TH { | |
192 | padding: 0; | |
193 | } | |
194 | ||
195 | TABLE.list { | |
196 | border-collapse: collapse; | |
197 | margin-left: auto; | |
198 | margin-right: auto; | |
199 | width: 90%; | |
200 | } | |
201 | ||
202 | TABLE.list TH { | |
203 | background: white; | |
204 | border-bottom: solid thin #cccccc; | |
205 | color: #444444; | |
206 | padding-top: 10pt; | |
207 | padding-left: 5pt; | |
208 | text-align: left; | |
209 | vertical-align: bottom; | |
210 | white-space: nowrap; | |
211 | } | |
212 | ||
213 | TABLE.list TH A { | |
214 | color: #4444cc; | |
215 | } | |
216 | ||
217 | TABLE.list TD { | |
218 | border-bottom: solid thin #eeeeee; | |
219 | padding-top: 5pt; | |
220 | padding-left: 5pt; | |
221 | } | |
222 | ||
223 | TABLE.list TR:nth-child(even) { | |
224 | background: #f8f8f8; | |
225 | } | |
226 | ||
227 | TABLE.list TR:nth-child(odd) { | |
228 | background: #f4f4f4; | |
229 | } | |
230 | ||
231 | DT { | |
232 | margin-left: 36pt; | |
233 | margin-top: 12pt; | |
234 | } | |
235 | ||
236 | DD { | |
237 | margin-left: 54pt; | |
238 | } | |
239 | ||
240 | DL.category DT { | |
241 | font-weight: bold; | |
242 | } | |
243 | ||
244 | P.summary { | |
245 | margin-left: 36pt; | |
246 | font-family: monaco, courier, monospace; | |
247 | } | |
248 | ||
249 | DIV.summary TABLE { | |
250 | border: solid thin #999999; | |
251 | border-collapse: collapse; | |
252 | border-spacing: 0; | |
253 | margin: 10px; | |
254 | } | |
255 | ||
256 | DIV.summary TABLE TD, DIV.summary TABLE TH { | |
257 | border: solid thin #999999; | |
258 | padding: 5px; | |
259 | text-align: left; | |
260 | vertical-align: top; | |
261 | } | |
262 | ||
263 | DIV.summary TABLE THEAD TH { | |
264 | background: #eeeeee; | |
265 | } | |
266 | ||
267 | /* API documentation styles... */ | |
268 | div.body h1 { | |
269 | margin: 0; | |
270 | } | |
271 | div.body h2 { | |
272 | margin-top: 1.5em; | |
273 | } | |
274 | div.body h3, div.body h4, div.body h5 { | |
275 | margin-bottom: 0.5em; | |
276 | margin-top: 1.5em; | |
277 | } | |
278 | .class, .enumeration, .function, .struct, .typedef, .union { | |
279 | border-bottom: solid thin #999999; | |
280 | margin-bottom: 0; | |
281 | margin-top: 2em; | |
282 | } | |
283 | .description { | |
284 | margin-top: 0.5em; | |
285 | } | |
286 | code, p.code, pre, ul.code li { | |
287 | font-family: monaco, courier, monospace; | |
288 | font-size: 90%; | |
289 | } | |
290 | ul.code, ul.contents, ul.subcontents { | |
291 | list-style-type: none; | |
292 | margin: 0; | |
293 | padding-left: 0; | |
294 | } | |
295 | ul.code li { | |
296 | margin: 0; | |
297 | } | |
298 | ul.contents > li { | |
299 | margin-top: 1em; | |
300 | } | |
301 | ul.contents li ul.code, ul.contents li ul.subcontents { | |
302 | padding-left: 2em; | |
303 | } | |
304 | div.body dl { | |
305 | margin-left: 0; | |
306 | margin-top: 0; | |
307 | } | |
308 | div.body dt { | |
309 | font-style: italic; | |
310 | margin-left: 0; | |
311 | margin-top: 0; | |
312 | } | |
313 | div.body dd { | |
314 | margin-bottom: 0.5em; | |
315 | } | |
316 | ||
317 | /* This is just for the HTML files generated with the framedhelp target */ | |
318 | div.contents { | |
319 | background: #e8e8e8; | |
320 | border: solid thin black; | |
321 | padding: 10px; | |
322 | } | |
323 | div.contents h1 { | |
324 | font-size: 110%; | |
325 | } | |
326 | div.contents h2 { | |
327 | font-size: 100%; | |
328 | } | |
329 | div.contents ul.contents { | |
330 | font-size: 80%; | |
331 | } | |
332 | div.contents ul.subcontents li { | |
333 | margin-left: 1em; | |
334 | text-indent: -1em; | |
335 | } | |
336 | --></style> | |
337 | </head> | |
338 | <body> | |
339 | <div class='body'> | |
178cb736 | 340 | <!-- |
68b10830 | 341 | "$Id$" |
178cb736 MS |
342 | |
343 | CGI API header for CUPS. | |
344 | ||
345 | Copyright 2009 by Apple Inc. | |
346 | ||
347 | These coded instructions, statements, and computer programs are the | |
348 | property of Apple Inc. and are protected by Federal copyright | |
349 | law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
350 | which should have been included with this file. If this file is | |
351 | file is missing or damaged, see the license at "http://www.cups.org/". | |
352 | --> | |
353 | ||
354 | <h1 class='title'>CGI API</h1> | |
355 | ||
356 | <div class='summary'><table summary='General Information'> | |
357 | <thead> | |
358 | <tr> | |
359 | <th>Header</th> | |
360 | <th>cups/cgi.h</th> | |
361 | </tr> | |
362 | </thead> | |
363 | <tbody> | |
364 | <tr> | |
365 | <th>Library</th> | |
366 | <td>-lcupscgi</td> | |
367 | </tr> | |
368 | <tr> | |
369 | <th>See Also</th> | |
370 | <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td> | |
371 | </tr> | |
372 | </tbody> | |
373 | </table></div> | |
f11a948a MS |
374 | <h2 class="title">Contents</h2> |
375 | <ul class="contents"> | |
178cb736 MS |
376 | <ul class="subcontents"> |
377 | <li><a href="#OVERVIEW">Overview</a></li> | |
f11a948a MS |
378 | <li><a href="#FUNCTIONS">Functions</a><ul class="code"> |
379 | <li><a href="#cgiCheckVariables" title="Check for the presence of "required" variables.">cgiCheckVariables</a></li> | |
aaf19ab0 | 380 | <li><a href="#cgiClearVariables" title="Clear all form variables.">cgiClearVariables</a></li> |
f11a948a MS |
381 | <li><a href="#cgiCompileSearch" title="Compile a search string.">cgiCompileSearch</a></li> |
382 | <li><a href="#cgiCopyTemplateFile" title="Copy a template file and replace all the | |
383 | '{variable}' strings with the variable value.">cgiCopyTemplateFile</a></li> | |
384 | <li><a href="#cgiCopyTemplateLang" title="Copy a template file using a language...">cgiCopyTemplateLang</a></li> | |
385 | <li><a href="#cgiDoSearch" title="Do a search of some text.">cgiDoSearch</a></li> | |
386 | <li><a href="#cgiEndHTML" title="End a HTML page.">cgiEndHTML</a></li> | |
387 | <li><a href="#cgiEndMultipart" title="End the delivery of a multipart web page.">cgiEndMultipart</a></li> | |
388 | <li><a href="#cgiFormEncode" title="Encode a string as a form variable.">cgiFormEncode</a></li> | |
389 | <li><a href="#cgiFreeSearch" title="Free a compiled search context.">cgiFreeSearch</a></li> | |
aaf19ab0 | 390 | <li><a href="#cgiGetArray" title="Get an element from a form array.">cgiGetArray</a></li> |
f11a948a MS |
391 | <li><a href="#cgiGetAttributes" title="Get the list of attributes that are needed |
392 | by the template file.">cgiGetAttributes</a></li> | |
aaf19ab0 | 393 | <li><a href="#cgiGetCookie" title="Get a cookie value.">cgiGetCookie</a></li> |
f11a948a MS |
394 | <li><a href="#cgiGetFile" title="Get the file (if any) that was submitted in the form.">cgiGetFile</a></li> |
395 | <li><a href="#cgiGetIPPObjects" title="Get the objects in an IPP response.">cgiGetIPPObjects</a></li> | |
396 | <li><a href="#cgiGetSize" title="Get the size of a form array value.">cgiGetSize</a></li> | |
397 | <li><a href="#cgiGetTemplateDir" title="Get the templates directory...">cgiGetTemplateDir</a></li> | |
aaf19ab0 MS |
398 | <li><a href="#cgiGetVariable" title="Get a CGI variable from the database.">cgiGetVariable</a></li> |
399 | <li><a href="#cgiInitialize" title="Initialize the CGI variable "database".">cgiInitialize</a></li> | |
f11a948a MS |
400 | <li><a href="#cgiIsPOST" title="Determine whether this page was POSTed.">cgiIsPOST</a></li> |
401 | <li><a href="#cgiMoveJobs" title="Move one or more jobs.">cgiMoveJobs</a></li> | |
402 | <li><a href="#cgiPrintCommand" title="Print a CUPS command job.">cgiPrintCommand</a></li> | |
403 | <li><a href="#cgiPrintTestPage" title="Print a test page.">cgiPrintTestPage</a></li> | |
404 | <li><a href="#cgiRewriteURL" title="Rewrite a printer URI into a web browser URL...">cgiRewriteURL</a></li> | |
405 | <li><a href="#cgiSetArray" title="Set array element N to the specified string.">cgiSetArray</a></li> | |
aaf19ab0 | 406 | <li><a href="#cgiSetCookie" title="Set a cookie value.">cgiSetCookie</a></li> |
f11a948a MS |
407 | <li><a href="#cgiSetIPPObjectVars" title="Set CGI variables from an IPP object.">cgiSetIPPObjectVars</a></li> |
408 | <li><a href="#cgiSetIPPVars" title="Set CGI variables from an IPP response.">cgiSetIPPVars</a></li> | |
409 | <li><a href="#cgiSetServerVersion" title="Set the server name and CUPS version...">cgiSetServerVersion</a></li> | |
410 | <li><a href="#cgiSetSize" title="Set the array size.">cgiSetSize</a></li> | |
aaf19ab0 | 411 | <li><a href="#cgiSetVariable" title="Set a CGI variable in the database.">cgiSetVariable</a></li> |
f11a948a MS |
412 | <li><a href="#cgiShowIPPError" title="Show the last IPP error message.">cgiShowIPPError</a></li> |
413 | <li><a href="#cgiShowJobs" title="Show print jobs.">cgiShowJobs</a></li> | |
414 | <li><a href="#cgiStartHTML" title="Start a HTML page.">cgiStartHTML</a></li> | |
415 | <li><a href="#cgiStartMultipart" title="Start a multipart delivery of a web page.">cgiStartMultipart</a></li> | |
416 | <li><a href="#cgiSupportsMultipart" title="Does the browser support multi-part documents?">cgiSupportsMultipart</a></li> | |
417 | <li><a href="#cgiText" title="Return localized text.">cgiText</a></li> | |
418 | <li><a href="#helpDeleteIndex" title="Delete an index, freeing all memory used.">helpDeleteIndex</a></li> | |
419 | <li><a href="#helpFindNode" title="Find a node in an index.">helpFindNode</a></li> | |
420 | <li><a href="#helpLoadIndex" title="Load a help index from disk.">helpLoadIndex</a></li> | |
421 | <li><a href="#helpSaveIndex" title="Save a help index to disk.">helpSaveIndex</a></li> | |
422 | <li><a href="#helpSearchIndex" title="Search an index.">helpSearchIndex</a></li> | |
423 | </ul></li> | |
424 | <li><a href="#TYPES">Data Types</a><ul class="code"> | |
425 | <li><a href="#cgi_file_t" title="Uploaded file data">cgi_file_t</a></li> | |
426 | <li><a href="#help_index_t" title="Help index structure">help_index_t</a></li> | |
427 | <li><a href="#help_node_t" title="Help node structure...">help_node_t</a></li> | |
428 | <li><a href="#help_word_t" title="Help word structure...">help_word_t</a></li> | |
429 | </ul></li> | |
430 | <li><a href="#STRUCTURES">Structures</a><ul class="code"> | |
431 | <li><a href="#cgi_file_s" title="Uploaded file data">cgi_file_s</a></li> | |
432 | <li><a href="#help_index_s" title="Help index structure">help_index_s</a></li> | |
433 | <li><a href="#help_node_s" title="Help node structure...">help_node_s</a></li> | |
434 | <li><a href="#help_word_s" title="Help word structure...">help_word_s</a></li> | |
435 | </ul></li> | |
178cb736 | 436 | <!-- |
68b10830 | 437 | "$Id$" |
178cb736 MS |
438 | |
439 | CGI API introduction for CUPS. | |
440 | ||
441 | Copyright 2009 by Apple Inc. | |
442 | ||
443 | These coded instructions, statements, and computer programs are the | |
444 | property of Apple Inc. and are protected by Federal copyright | |
445 | law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
446 | which should have been included with this file. If this file is | |
447 | file is missing or damaged, see the license at "http://www.cups.org/". | |
448 | --> | |
449 | ||
450 | <h2 class='title'><a name='OVERVIEW'>Overview</a></h2> | |
451 | ||
452 | <p>The CGI API provides Common Gateway Interface functions for CUPS.</p> | |
f11a948a MS |
453 | <h2 class="title"><a name="FUNCTIONS">Functions</a></h2> |
454 | <h3 class="function"><a name="cgiCheckVariables">cgiCheckVariables</a></h3> | |
455 | <p class="description">Check for the presence of "required" variables.</p> | |
456 | <p class="code"> | |
457 | int cgiCheckVariables (<br> | |
458 | const char *names<br> | |
459 | );</p> | |
460 | <h4 class="parameters">Parameters</h4> | |
461 | <dl> | |
462 | <dt>names</dt> | |
463 | <dd class="description">Variables to look for</dd> | |
464 | </dl> | |
465 | <h4 class="returnvalue">Return Value</h4> | |
466 | <p class="description">1 if all variables present, 0 otherwise</p> | |
467 | <h4 class="discussion">Discussion</h4> | |
468 | <p class="discussion">Names may be separated by spaces and/or commas.</p> | |
aaf19ab0 MS |
469 | <h3 class="function"><a name="cgiClearVariables">cgiClearVariables</a></h3> |
470 | <p class="description">Clear all form variables.</p> | |
471 | <p class="code"> | |
472 | void cgiClearVariables (void);</p> | |
f11a948a MS |
473 | <h3 class="function"><a name="cgiCompileSearch">cgiCompileSearch</a></h3> |
474 | <p class="description">Compile a search string.</p> | |
475 | <p class="code"> | |
476 | void *cgiCompileSearch (<br> | |
477 | const char *query<br> | |
478 | );</p> | |
479 | <h4 class="parameters">Parameters</h4> | |
480 | <dl> | |
481 | <dt>query</dt> | |
482 | <dd class="description">Query string</dd> | |
483 | </dl> | |
484 | <h4 class="returnvalue">Return Value</h4> | |
485 | <p class="description">Search context</p> | |
486 | <h3 class="function"><a name="cgiCopyTemplateFile">cgiCopyTemplateFile</a></h3> | |
487 | <p class="description">Copy a template file and replace all the | |
488 | '{variable}' strings with the variable value.</p> | |
489 | <p class="code"> | |
490 | void cgiCopyTemplateFile (<br> | |
491 | FILE *out,<br> | |
492 | const char *tmpl<br> | |
493 | );</p> | |
494 | <h4 class="parameters">Parameters</h4> | |
495 | <dl> | |
496 | <dt>out</dt> | |
497 | <dd class="description">Output file</dd> | |
498 | <dt>tmpl</dt> | |
499 | <dd class="description">Template file to read</dd> | |
500 | </dl> | |
501 | <h3 class="function"><a name="cgiCopyTemplateLang">cgiCopyTemplateLang</a></h3> | |
502 | <p class="description">Copy a template file using a language...</p> | |
503 | <p class="code"> | |
504 | void cgiCopyTemplateLang (<br> | |
505 | const char *tmpl<br> | |
506 | );</p> | |
507 | <h4 class="parameters">Parameters</h4> | |
508 | <dl> | |
509 | <dt>tmpl</dt> | |
510 | <dd class="description">Base filename</dd> | |
511 | </dl> | |
512 | <h3 class="function"><a name="cgiDoSearch">cgiDoSearch</a></h3> | |
513 | <p class="description">Do a search of some text.</p> | |
514 | <p class="code"> | |
515 | int cgiDoSearch (<br> | |
516 | void *search,<br> | |
517 | const char *text<br> | |
518 | );</p> | |
519 | <h4 class="parameters">Parameters</h4> | |
520 | <dl> | |
521 | <dt>search</dt> | |
522 | <dd class="description">Search context</dd> | |
523 | <dt>text</dt> | |
524 | <dd class="description">Text to search</dd> | |
525 | </dl> | |
526 | <h4 class="returnvalue">Return Value</h4> | |
527 | <p class="description">Number of matches</p> | |
528 | <h3 class="function"><a name="cgiEndHTML">cgiEndHTML</a></h3> | |
529 | <p class="description">End a HTML page.</p> | |
530 | <p class="code"> | |
531 | void cgiEndHTML (void);</p> | |
532 | <h3 class="function"><a name="cgiEndMultipart">cgiEndMultipart</a></h3> | |
533 | <p class="description">End the delivery of a multipart web page.</p> | |
534 | <p class="code"> | |
535 | void cgiEndMultipart (void);</p> | |
536 | <h3 class="function"><a name="cgiFormEncode">cgiFormEncode</a></h3> | |
537 | <p class="description">Encode a string as a form variable.</p> | |
538 | <p class="code"> | |
539 | char *cgiFormEncode (<br> | |
540 | char *dst,<br> | |
541 | const char *src,<br> | |
542 | size_t dstsize<br> | |
543 | );</p> | |
544 | <h4 class="parameters">Parameters</h4> | |
545 | <dl> | |
546 | <dt>dst</dt> | |
547 | <dd class="description">Destination string</dd> | |
548 | <dt>src</dt> | |
549 | <dd class="description">Source string</dd> | |
550 | <dt>dstsize</dt> | |
551 | <dd class="description">Size of destination string</dd> | |
552 | </dl> | |
553 | <h4 class="returnvalue">Return Value</h4> | |
554 | <p class="description">Destination string</p> | |
555 | <h3 class="function"><a name="cgiFreeSearch">cgiFreeSearch</a></h3> | |
556 | <p class="description">Free a compiled search context.</p> | |
557 | <p class="code"> | |
558 | void cgiFreeSearch (<br> | |
559 | void *search<br> | |
560 | );</p> | |
561 | <h4 class="parameters">Parameters</h4> | |
562 | <dl> | |
563 | <dt>search</dt> | |
564 | <dd class="description">Search context</dd> | |
565 | </dl> | |
566 | <h3 class="function"><a name="cgiGetArray">cgiGetArray</a></h3> | |
aaf19ab0 | 567 | <p class="description">Get an element from a form array.</p> |
f11a948a MS |
568 | <p class="code"> |
569 | const char *cgiGetArray (<br> | |
570 | const char *name,<br> | |
571 | int element<br> | |
572 | );</p> | |
573 | <h4 class="parameters">Parameters</h4> | |
574 | <dl> | |
575 | <dt>name</dt> | |
576 | <dd class="description">Name of array variable</dd> | |
577 | <dt>element</dt> | |
578 | <dd class="description">Element number (0 to N)</dd> | |
579 | </dl> | |
580 | <h4 class="returnvalue">Return Value</h4> | |
581 | <p class="description">Element value or NULL</p> | |
582 | <h3 class="function"><a name="cgiGetAttributes">cgiGetAttributes</a></h3> | |
583 | <p class="description">Get the list of attributes that are needed | |
584 | by the template file.</p> | |
585 | <p class="code"> | |
586 | void cgiGetAttributes (<br> | |
587 | ipp_t *request,<br> | |
588 | const char *tmpl<br> | |
589 | );</p> | |
590 | <h4 class="parameters">Parameters</h4> | |
591 | <dl> | |
592 | <dt>request</dt> | |
593 | <dd class="description">IPP request</dd> | |
594 | <dt>tmpl</dt> | |
595 | <dd class="description">Base filename</dd> | |
596 | </dl> | |
aaf19ab0 MS |
597 | <h3 class="function"><a name="cgiGetCookie">cgiGetCookie</a></h3> |
598 | <p class="description">Get a cookie value.</p> | |
599 | <p class="code"> | |
600 | const char *cgiGetCookie (<br> | |
601 | const char *name<br> | |
602 | );</p> | |
603 | <h4 class="parameters">Parameters</h4> | |
604 | <dl> | |
605 | <dt>name</dt> | |
606 | <dd class="description">Name of cookie</dd> | |
607 | </dl> | |
608 | <h4 class="returnvalue">Return Value</h4> | |
609 | <p class="description">Value or NULL</p> | |
f11a948a MS |
610 | <h3 class="function"><a name="cgiGetFile">cgiGetFile</a></h3> |
611 | <p class="description">Get the file (if any) that was submitted in the form.</p> | |
612 | <p class="code"> | |
613 | const <a href="#cgi_file_t">cgi_file_t</a> *cgiGetFile (void);</p> | |
614 | <h4 class="returnvalue">Return Value</h4> | |
615 | <p class="description">Attached file or NULL</p> | |
616 | <h3 class="function"><a name="cgiGetIPPObjects">cgiGetIPPObjects</a></h3> | |
617 | <p class="description">Get the objects in an IPP response.</p> | |
618 | <p class="code"> | |
619 | cups_array_t *cgiGetIPPObjects (<br> | |
620 | ipp_t *response,<br> | |
621 | void *search<br> | |
622 | );</p> | |
623 | <h4 class="parameters">Parameters</h4> | |
624 | <dl> | |
625 | <dt>response</dt> | |
626 | <dd class="description">IPP response</dd> | |
627 | <dt>search</dt> | |
628 | <dd class="description">Search filter</dd> | |
629 | </dl> | |
630 | <h4 class="returnvalue">Return Value</h4> | |
631 | <p class="description">Array of objects</p> | |
632 | <h3 class="function"><a name="cgiGetSize">cgiGetSize</a></h3> | |
633 | <p class="description">Get the size of a form array value.</p> | |
634 | <p class="code"> | |
635 | int cgiGetSize (<br> | |
636 | const char *name<br> | |
637 | );</p> | |
638 | <h4 class="parameters">Parameters</h4> | |
639 | <dl> | |
640 | <dt>name</dt> | |
641 | <dd class="description">Name of variable</dd> | |
642 | </dl> | |
643 | <h4 class="returnvalue">Return Value</h4> | |
644 | <p class="description">Number of elements</p> | |
645 | <h3 class="function"><a name="cgiGetTemplateDir">cgiGetTemplateDir</a></h3> | |
646 | <p class="description">Get the templates directory...</p> | |
647 | <p class="code"> | |
648 | char *cgiGetTemplateDir (void);</p> | |
649 | <h4 class="returnvalue">Return Value</h4> | |
650 | <p class="description">Template directory</p> | |
651 | <h3 class="function"><a name="cgiGetVariable">cgiGetVariable</a></h3> | |
aaf19ab0 | 652 | <p class="description">Get a CGI variable from the database.</p> |
f11a948a MS |
653 | <p class="code"> |
654 | const char *cgiGetVariable (<br> | |
655 | const char *name<br> | |
656 | );</p> | |
657 | <h4 class="parameters">Parameters</h4> | |
658 | <dl> | |
659 | <dt>name</dt> | |
660 | <dd class="description">Name of variable</dd> | |
661 | </dl> | |
662 | <h4 class="returnvalue">Return Value</h4> | |
663 | <p class="description">Value of variable</p> | |
664 | <h4 class="discussion">Discussion</h4> | |
665 | <p class="discussion">Returns NULL if the variable doesn't exist. If the variable is an | |
aaf19ab0 | 666 | array of values, returns the last element.</p> |
f11a948a | 667 | <h3 class="function"><a name="cgiInitialize">cgiInitialize</a></h3> |
aaf19ab0 | 668 | <p class="description">Initialize the CGI variable "database".</p> |
f11a948a MS |
669 | <p class="code"> |
670 | int cgiInitialize (void);</p> | |
671 | <h4 class="returnvalue">Return Value</h4> | |
672 | <p class="description">Non-zero if there was form data</p> | |
673 | <h3 class="function"><a name="cgiIsPOST">cgiIsPOST</a></h3> | |
674 | <p class="description">Determine whether this page was POSTed.</p> | |
675 | <p class="code"> | |
676 | int cgiIsPOST (void);</p> | |
677 | <h4 class="returnvalue">Return Value</h4> | |
678 | <p class="description">1 if POST, 0 if GET</p> | |
679 | <h3 class="function"><a name="cgiMoveJobs">cgiMoveJobs</a></h3> | |
680 | <p class="description">Move one or more jobs.</p> | |
681 | <p class="code"> | |
682 | void cgiMoveJobs (<br> | |
683 | http_t *http,<br> | |
684 | const char *dest,<br> | |
685 | int job_id<br> | |
686 | );</p> | |
687 | <h4 class="parameters">Parameters</h4> | |
688 | <dl> | |
689 | <dt>http</dt> | |
690 | <dd class="description">Connection to server</dd> | |
691 | <dt>dest</dt> | |
692 | <dd class="description">Destination or NULL</dd> | |
693 | <dt>job_id</dt> | |
694 | <dd class="description">Job ID or 0 for all</dd> | |
695 | </dl> | |
696 | <h4 class="discussion">Discussion</h4> | |
697 | <p class="discussion">At least one of dest or job_id must be non-zero/NULL.</p> | |
698 | <h3 class="function"><a name="cgiPrintCommand">cgiPrintCommand</a></h3> | |
699 | <p class="description">Print a CUPS command job.</p> | |
700 | <p class="code"> | |
701 | void cgiPrintCommand (<br> | |
702 | http_t *http,<br> | |
703 | const char *dest,<br> | |
704 | const char *command,<br> | |
705 | const char *title<br> | |
706 | );</p> | |
707 | <h4 class="parameters">Parameters</h4> | |
708 | <dl> | |
709 | <dt>http</dt> | |
710 | <dd class="description">Connection to server</dd> | |
711 | <dt>dest</dt> | |
712 | <dd class="description">Destination printer</dd> | |
713 | <dt>command</dt> | |
714 | <dd class="description">Command to send</dd> | |
715 | <dt>title</dt> | |
716 | <dd class="description">Page/job title</dd> | |
717 | </dl> | |
718 | <h3 class="function"><a name="cgiPrintTestPage">cgiPrintTestPage</a></h3> | |
719 | <p class="description">Print a test page.</p> | |
720 | <p class="code"> | |
721 | void cgiPrintTestPage (<br> | |
722 | http_t *http,<br> | |
723 | const char *dest<br> | |
724 | );</p> | |
725 | <h4 class="parameters">Parameters</h4> | |
726 | <dl> | |
727 | <dt>http</dt> | |
728 | <dd class="description">Connection to server</dd> | |
729 | <dt>dest</dt> | |
730 | <dd class="description">Destination printer/class</dd> | |
731 | </dl> | |
732 | <h3 class="function"><a name="cgiRewriteURL">cgiRewriteURL</a></h3> | |
733 | <p class="description">Rewrite a printer URI into a web browser URL...</p> | |
734 | <p class="code"> | |
735 | char *cgiRewriteURL (<br> | |
736 | const char *uri,<br> | |
737 | char *url,<br> | |
738 | int urlsize,<br> | |
739 | const char *newresource<br> | |
740 | );</p> | |
741 | <h4 class="parameters">Parameters</h4> | |
742 | <dl> | |
743 | <dt>uri</dt> | |
744 | <dd class="description">Current URI</dd> | |
745 | <dt>url</dt> | |
746 | <dd class="description">New URL</dd> | |
747 | <dt>urlsize</dt> | |
748 | <dd class="description">Size of URL buffer</dd> | |
749 | <dt>newresource</dt> | |
750 | <dd class="description">Replacement resource</dd> | |
751 | </dl> | |
752 | <h4 class="returnvalue">Return Value</h4> | |
753 | <p class="description">New URL</p> | |
754 | <h3 class="function"><a name="cgiSetArray">cgiSetArray</a></h3> | |
755 | <p class="description">Set array element N to the specified string.</p> | |
756 | <p class="code"> | |
757 | void cgiSetArray (<br> | |
758 | const char *name,<br> | |
759 | int element,<br> | |
760 | const char *value<br> | |
761 | );</p> | |
762 | <h4 class="parameters">Parameters</h4> | |
763 | <dl> | |
764 | <dt>name</dt> | |
765 | <dd class="description">Name of variable</dd> | |
766 | <dt>element</dt> | |
767 | <dd class="description">Element number (0 to N)</dd> | |
768 | <dt>value</dt> | |
769 | <dd class="description">Value of variable</dd> | |
770 | </dl> | |
771 | <h4 class="discussion">Discussion</h4> | |
772 | <p class="discussion">If the variable array is smaller than (element + 1), the intervening | |
773 | elements are set to NULL.</p> | |
aaf19ab0 MS |
774 | <h3 class="function"><a name="cgiSetCookie">cgiSetCookie</a></h3> |
775 | <p class="description">Set a cookie value.</p> | |
776 | <p class="code"> | |
777 | void cgiSetCookie (<br> | |
778 | const char *name,<br> | |
779 | const char *value,<br> | |
780 | const char *path,<br> | |
781 | const char *domain,<br> | |
782 | time_t expires,<br> | |
783 | int secure<br> | |
784 | );</p> | |
785 | <h4 class="parameters">Parameters</h4> | |
786 | <dl> | |
787 | <dt>name</dt> | |
788 | <dd class="description">Name</dd> | |
789 | <dt>value</dt> | |
790 | <dd class="description">Value</dd> | |
791 | <dt>path</dt> | |
792 | <dd class="description">Path (typically "/")</dd> | |
793 | <dt>domain</dt> | |
794 | <dd class="description">Domain name</dd> | |
795 | <dt>expires</dt> | |
796 | <dd class="description">Expiration date (0 for session)</dd> | |
797 | <dt>secure</dt> | |
798 | <dd class="description">Require SSL</dd> | |
799 | </dl> | |
f11a948a MS |
800 | <h3 class="function"><a name="cgiSetIPPObjectVars">cgiSetIPPObjectVars</a></h3> |
801 | <p class="description">Set CGI variables from an IPP object.</p> | |
802 | <p class="code"> | |
803 | ipp_attribute_t *cgiSetIPPObjectVars (<br> | |
804 | ipp_attribute_t *obj,<br> | |
805 | const char *prefix,<br> | |
806 | int element<br> | |
807 | );</p> | |
808 | <h4 class="parameters">Parameters</h4> | |
809 | <dl> | |
810 | <dt>obj</dt> | |
811 | <dd class="description">Response data to be copied...</dd> | |
812 | <dt>prefix</dt> | |
813 | <dd class="description">Prefix for name or NULL</dd> | |
814 | <dt>element</dt> | |
815 | <dd class="description">Parent element number</dd> | |
816 | </dl> | |
817 | <h4 class="returnvalue">Return Value</h4> | |
818 | <p class="description">Next object</p> | |
819 | <h3 class="function"><a name="cgiSetIPPVars">cgiSetIPPVars</a></h3> | |
820 | <p class="description">Set CGI variables from an IPP response.</p> | |
821 | <p class="code"> | |
822 | int cgiSetIPPVars (<br> | |
823 | ipp_t *response,<br> | |
824 | const char *filter_name,<br> | |
825 | const char *filter_value,<br> | |
826 | const char *prefix,<br> | |
827 | int parent_el<br> | |
828 | );</p> | |
829 | <h4 class="parameters">Parameters</h4> | |
830 | <dl> | |
831 | <dt>response</dt> | |
832 | <dd class="description">Response data to be copied...</dd> | |
833 | <dt>filter_name</dt> | |
834 | <dd class="description">Filter name</dd> | |
835 | <dt>filter_value</dt> | |
836 | <dd class="description">Filter value</dd> | |
837 | <dt>prefix</dt> | |
838 | <dd class="description">Prefix for name or NULL</dd> | |
839 | <dt>parent_el</dt> | |
840 | <dd class="description">Parent element number</dd> | |
841 | </dl> | |
842 | <h4 class="returnvalue">Return Value</h4> | |
843 | <p class="description">Maximum number of elements</p> | |
844 | <h3 class="function"><a name="cgiSetServerVersion">cgiSetServerVersion</a></h3> | |
845 | <p class="description">Set the server name and CUPS version...</p> | |
846 | <p class="code"> | |
847 | void cgiSetServerVersion (void);</p> | |
848 | <h3 class="function"><a name="cgiSetSize">cgiSetSize</a></h3> | |
849 | <p class="description">Set the array size.</p> | |
850 | <p class="code"> | |
851 | void cgiSetSize (<br> | |
852 | const char *name,<br> | |
853 | int size<br> | |
854 | );</p> | |
855 | <h4 class="parameters">Parameters</h4> | |
856 | <dl> | |
857 | <dt>name</dt> | |
858 | <dd class="description">Name of variable</dd> | |
859 | <dt>size</dt> | |
860 | <dd class="description">Number of elements (0 to N)</dd> | |
861 | </dl> | |
862 | <h3 class="function"><a name="cgiSetVariable">cgiSetVariable</a></h3> | |
aaf19ab0 | 863 | <p class="description">Set a CGI variable in the database.</p> |
f11a948a MS |
864 | <p class="code"> |
865 | void cgiSetVariable (<br> | |
866 | const char *name,<br> | |
867 | const char *value<br> | |
868 | );</p> | |
869 | <h4 class="parameters">Parameters</h4> | |
870 | <dl> | |
871 | <dt>name</dt> | |
872 | <dd class="description">Name of variable</dd> | |
873 | <dt>value</dt> | |
874 | <dd class="description">Value of variable</dd> | |
875 | </dl> | |
876 | <h4 class="discussion">Discussion</h4> | |
877 | <p class="discussion">If the variable is an array, this truncates the array to a single element.</p> | |
878 | <h3 class="function"><a name="cgiShowIPPError">cgiShowIPPError</a></h3> | |
879 | <p class="description">Show the last IPP error message.</p> | |
880 | <p class="code"> | |
881 | void cgiShowIPPError (<br> | |
882 | const char *message<br> | |
883 | );</p> | |
884 | <h4 class="parameters">Parameters</h4> | |
885 | <dl> | |
886 | <dt>message</dt> | |
887 | <dd class="description">Contextual message</dd> | |
888 | </dl> | |
889 | <h4 class="discussion">Discussion</h4> | |
890 | <p class="discussion">The caller must still call cgiStartHTML() and cgiEndHTML().</p> | |
891 | <h3 class="function"><a name="cgiShowJobs">cgiShowJobs</a></h3> | |
892 | <p class="description">Show print jobs.</p> | |
893 | <p class="code"> | |
894 | void cgiShowJobs (<br> | |
895 | http_t *http,<br> | |
896 | const char *dest<br> | |
897 | );</p> | |
898 | <h4 class="parameters">Parameters</h4> | |
899 | <dl> | |
900 | <dt>http</dt> | |
901 | <dd class="description">Connection to server</dd> | |
902 | <dt>dest</dt> | |
903 | <dd class="description">Destination name or NULL</dd> | |
904 | </dl> | |
905 | <h3 class="function"><a name="cgiStartHTML">cgiStartHTML</a></h3> | |
906 | <p class="description">Start a HTML page.</p> | |
907 | <p class="code"> | |
908 | void cgiStartHTML (<br> | |
909 | const char *title<br> | |
910 | );</p> | |
911 | <h4 class="parameters">Parameters</h4> | |
912 | <dl> | |
913 | <dt>title</dt> | |
914 | <dd class="description">Title of page</dd> | |
915 | </dl> | |
916 | <h3 class="function"><a name="cgiStartMultipart">cgiStartMultipart</a></h3> | |
917 | <p class="description">Start a multipart delivery of a web page.</p> | |
918 | <p class="code"> | |
919 | void cgiStartMultipart (void);</p> | |
920 | <h3 class="function"><a name="cgiSupportsMultipart">cgiSupportsMultipart</a></h3> | |
921 | <p class="description">Does the browser support multi-part documents?</p> | |
922 | <p class="code"> | |
923 | int cgiSupportsMultipart (void);</p> | |
924 | <h4 class="returnvalue">Return Value</h4> | |
925 | <p class="description">1 if multi-part supported, 0 otherwise</p> | |
926 | <h3 class="function"><a name="cgiText">cgiText</a></h3> | |
927 | <p class="description">Return localized text.</p> | |
928 | <p class="code"> | |
929 | const char *cgiText (<br> | |
930 | const char *message<br> | |
931 | );</p> | |
932 | <h4 class="parameters">Parameters</h4> | |
933 | <dl> | |
934 | <dt>message</dt> | |
935 | <dd class="description">Message</dd> | |
936 | </dl> | |
937 | <h4 class="returnvalue">Return Value</h4> | |
938 | <p class="description">Localized message</p> | |
939 | <h3 class="function"><a name="helpDeleteIndex">helpDeleteIndex</a></h3> | |
940 | <p class="description">Delete an index, freeing all memory used.</p> | |
941 | <p class="code"> | |
942 | void helpDeleteIndex (<br> | |
943 | <a href="#help_index_t">help_index_t</a> *hi<br> | |
944 | );</p> | |
945 | <h4 class="parameters">Parameters</h4> | |
946 | <dl> | |
947 | <dt>hi</dt> | |
948 | <dd class="description">Help index</dd> | |
949 | </dl> | |
950 | <h3 class="function"><a name="helpFindNode">helpFindNode</a></h3> | |
951 | <p class="description">Find a node in an index.</p> | |
952 | <p class="code"> | |
953 | <a href="#help_node_t">help_node_t</a> *helpFindNode (<br> | |
954 | <a href="#help_index_t">help_index_t</a> *hi,<br> | |
955 | const char *filename,<br> | |
956 | const char *anchor<br> | |
957 | );</p> | |
958 | <h4 class="parameters">Parameters</h4> | |
959 | <dl> | |
960 | <dt>hi</dt> | |
961 | <dd class="description">Index</dd> | |
962 | <dt>filename</dt> | |
963 | <dd class="description">Filename</dd> | |
964 | <dt>anchor</dt> | |
965 | <dd class="description">Anchor</dd> | |
966 | </dl> | |
967 | <h4 class="returnvalue">Return Value</h4> | |
968 | <p class="description">Node pointer or NULL</p> | |
969 | <h3 class="function"><a name="helpLoadIndex">helpLoadIndex</a></h3> | |
970 | <p class="description">Load a help index from disk.</p> | |
971 | <p class="code"> | |
972 | <a href="#help_index_t">help_index_t</a> *helpLoadIndex (<br> | |
973 | const char *hifile,<br> | |
974 | const char *directory<br> | |
975 | );</p> | |
976 | <h4 class="parameters">Parameters</h4> | |
977 | <dl> | |
978 | <dt>hifile</dt> | |
979 | <dd class="description">Index filename</dd> | |
980 | <dt>directory</dt> | |
981 | <dd class="description">Directory that is indexed</dd> | |
982 | </dl> | |
983 | <h4 class="returnvalue">Return Value</h4> | |
984 | <p class="description">Index pointer or NULL</p> | |
985 | <h3 class="function"><a name="helpSaveIndex">helpSaveIndex</a></h3> | |
986 | <p class="description">Save a help index to disk.</p> | |
987 | <p class="code"> | |
988 | int helpSaveIndex (<br> | |
989 | <a href="#help_index_t">help_index_t</a> *hi,<br> | |
990 | const char *hifile<br> | |
991 | );</p> | |
992 | <h4 class="parameters">Parameters</h4> | |
993 | <dl> | |
994 | <dt>hi</dt> | |
995 | <dd class="description">Index</dd> | |
996 | <dt>hifile</dt> | |
997 | <dd class="description">Index filename</dd> | |
998 | </dl> | |
999 | <h4 class="returnvalue">Return Value</h4> | |
1000 | <p class="description">0 on success, -1 on error</p> | |
1001 | <h3 class="function"><a name="helpSearchIndex">helpSearchIndex</a></h3> | |
1002 | <p class="description">Search an index.</p> | |
1003 | <p class="code"> | |
1004 | <a href="#help_index_t">help_index_t</a> *helpSearchIndex (<br> | |
1005 | <a href="#help_index_t">help_index_t</a> *hi,<br> | |
1006 | const char *query,<br> | |
1007 | const char *section,<br> | |
1008 | const char *filename<br> | |
1009 | );</p> | |
1010 | <h4 class="parameters">Parameters</h4> | |
1011 | <dl> | |
1012 | <dt>hi</dt> | |
1013 | <dd class="description">Index</dd> | |
1014 | <dt>query</dt> | |
1015 | <dd class="description">Query string</dd> | |
1016 | <dt>section</dt> | |
1017 | <dd class="description">Limit search to this section</dd> | |
1018 | <dt>filename</dt> | |
1019 | <dd class="description">Limit search to this file</dd> | |
1020 | </dl> | |
1021 | <h4 class="returnvalue">Return Value</h4> | |
1022 | <p class="description">Search index</p> | |
1023 | <h2 class="title"><a name="TYPES">Data Types</a></h2> | |
1024 | <h3 class="typedef"><a name="cgi_file_t">cgi_file_t</a></h3> | |
1025 | <p class="description">Uploaded file data</p> | |
1026 | <p class="code"> | |
1027 | typedef struct <a href="#cgi_file_s">cgi_file_s</a> cgi_file_t; | |
1028 | </p> | |
1029 | <h3 class="typedef"><a name="help_index_t">help_index_t</a></h3> | |
1030 | <p class="description">Help index structure</p> | |
1031 | <p class="code"> | |
1032 | typedef struct <a href="#help_index_s">help_index_s</a> help_index_t; | |
1033 | </p> | |
1034 | <h3 class="typedef"><a name="help_node_t">help_node_t</a></h3> | |
1035 | <p class="description">Help node structure...</p> | |
1036 | <p class="code"> | |
1037 | typedef struct <a href="#help_node_s">help_node_s</a> help_node_t; | |
1038 | </p> | |
1039 | <h3 class="typedef"><a name="help_word_t">help_word_t</a></h3> | |
1040 | <p class="description">Help word structure...</p> | |
1041 | <p class="code"> | |
1042 | typedef struct <a href="#help_word_s">help_word_s</a> help_word_t; | |
1043 | </p> | |
1044 | <h2 class="title"><a name="STRUCTURES">Structures</a></h2> | |
1045 | <h3 class="struct"><a name="cgi_file_s">cgi_file_s</a></h3> | |
1046 | <p class="description">Uploaded file data</p> | |
1047 | <p class="code">struct cgi_file_s {<br> | |
1048 | size_t filesize;<br> | |
1049 | char tempfile[1024], *name, *filename, *mimetype;<br> | |
1050 | };</p> | |
1051 | <h4 class="members">Members</h4> | |
1052 | <dl> | |
1053 | <dt>filesize </dt> | |
1054 | <dd class="description">Size of uploaded file</dd> | |
1055 | <dt>mimetype </dt> | |
1056 | <dd class="description">MIME media type</dd> | |
1057 | </dl> | |
1058 | <h3 class="struct"><a name="help_index_s">help_index_s</a></h3> | |
1059 | <p class="description">Help index structure</p> | |
1060 | <p class="code">struct help_index_s {<br> | |
1061 | cups_array_t *nodes;<br> | |
1062 | int search;<br> | |
1063 | cups_array_t *sorted;<br> | |
1064 | };</p> | |
1065 | <h4 class="members">Members</h4> | |
1066 | <dl> | |
1067 | <dt>nodes </dt> | |
1068 | <dd class="description">Nodes sorted by filename</dd> | |
1069 | <dt>search </dt> | |
1070 | <dd class="description">1 = search index, 0 = normal</dd> | |
1071 | <dt>sorted </dt> | |
1072 | <dd class="description">Nodes sorted by score + text</dd> | |
1073 | </dl> | |
1074 | <h3 class="struct"><a name="help_node_s">help_node_s</a></h3> | |
1075 | <p class="description">Help node structure...</p> | |
1076 | <p class="code">struct help_node_s {<br> | |
1077 | char *anchor;<br> | |
1078 | char *filename;<br> | |
1079 | size_t length;<br> | |
1080 | time_t mtime;<br> | |
1081 | off_t offset;<br> | |
1082 | int score;<br> | |
1083 | char *section;<br> | |
1084 | char *text;<br> | |
1085 | cups_array_t *words;<br> | |
1086 | };</p> | |
1087 | <h4 class="members">Members</h4> | |
1088 | <dl> | |
1089 | <dt>anchor </dt> | |
1090 | <dd class="description">Anchor name (NULL if none)</dd> | |
1091 | <dt>filename </dt> | |
1092 | <dd class="description">Filename, relative to help dir</dd> | |
1093 | <dt>length </dt> | |
1094 | <dd class="description">Length in bytes</dd> | |
1095 | <dt>mtime </dt> | |
1096 | <dd class="description">Last modification time</dd> | |
1097 | <dt>offset </dt> | |
1098 | <dd class="description">Offset in file</dd> | |
1099 | <dt>score </dt> | |
1100 | <dd class="description">Search score</dd> | |
1101 | <dt>section </dt> | |
1102 | <dd class="description">Section name (NULL if none)</dd> | |
1103 | <dt>text </dt> | |
1104 | <dd class="description">Text in anchor</dd> | |
1105 | <dt>words </dt> | |
1106 | <dd class="description">Words after this node</dd> | |
1107 | </dl> | |
1108 | <h3 class="struct"><a name="help_word_s">help_word_s</a></h3> | |
1109 | <p class="description">Help word structure...</p> | |
1110 | <p class="code">struct help_word_s {<br> | |
1111 | int count;<br> | |
1112 | char *text;<br> | |
1113 | };</p> | |
1114 | <h4 class="members">Members</h4> | |
1115 | <dl> | |
1116 | <dt>count </dt> | |
1117 | <dd class="description">Number of occurrences</dd> | |
1118 | <dt>text </dt> | |
1119 | <dd class="description">Word text</dd> | |
1120 | </dl> | |
1121 | </div> | |
1122 | </body> | |
1123 | </html> |