1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
4 <TITLE>CUPS Software Programmers Manual
</TITLE>
5 <META NAME=
"author" CONTENT=
"Easy Software Products">
6 <META NAME=
"copyright" CONTENT=
"Copyright 1997-2003, All Rights Reserved">
7 <META NAME=
"docnumber" CONTENT=
"CUPS-SPM-1.2.0">
8 <META HTTP-EQUIV=
"Content-Type" CONTENT=
"text/html; CHARSET=iso-8859-1">
9 <STYLE TYPE=
"text/css"><!--
10 BODY { font-family: serif }
11 H1 { font-family: sans-serif }
12 H2 { font-family: sans-serif }
13 H3 { font-family: sans-serif }
14 H4 { font-family: sans-serif }
15 H5 { font-family: sans-serif }
16 H6 { font-family: sans-serif }
17 SUB { font-size: smaller }
18 SUP { font-size: smaller }
19 PRE { font-family: monospace }
22 <BODY BGCOLOR=
"#ffffff">
23 <CENTER><A HREF=
"#CONTENTS"><IMG SRC=
"images/cups-large.gif" BORDER=
"0" WIDTH=
"431" HEIGHT=
"511"><BR>
24 <H1>CUPS Software Programmers Manual
</H1></A><BR>
26 Easy Software Products
<BR>
27 Copyright
1997-
2003, All Rights Reserved
<BR>
30 <H1 ALIGN=
"CENTER"><A NAME=
"CONTENTS">Table of Contents
</A></H1>
32 <BR><B><A HREF=
"#1">Preface
</A></B>
34 <LI><A HREF=
"#1_1">System Overview
</A></LI>
35 <LI><A HREF=
"#1_2">Document Overview
</A></LI>
36 <LI><A HREF=
"#1_3">Notation Conventions
</A></LI>
37 <LI><A HREF=
"#1_4">Abbreviations
</A></LI>
38 <LI><A HREF=
"#1_5">Other References
</A></LI>
40 <B><A HREF=
"#OVERVIEW">1 - Printing System Overview
</A></B>
42 <LI><A HREF=
"#2_1">The Printing Problem
</A></LI>
43 <LI><A HREF=
"#2_2">The Technology
</A></LI>
44 <LI><A HREF=
"#2_3">Jobs
</A></LI>
45 <LI><A HREF=
"#2_4">Classes
</A></LI>
46 <LI><A HREF=
"#2_5">Filters
</A></LI>
47 <LI><A HREF=
"#2_6">Backends
</A></LI>
48 <LI><A HREF=
"#2_7">Printer Drivers
</A></LI>
49 <LI><A HREF=
"#2_8">Networking
</A></LI>
51 <B><A HREF=
"#CUPS_API">2 - The CUPS API
</A></B>
53 <LI><A HREF=
"#3_1">The CUPS API Library
</A></LI>
55 <LI><A HREF=
"#3_1_1">Detecting the CUPS API Library in GNU Autoconf
</A></LI>
57 <LI><A HREF=
"#3_2">Printing Services
</A></LI>
59 <LI><A HREF=
"#3_2_1">Include Files
</A></LI>
60 <LI><A HREF=
"#3_2_2">Printing a File
</A></LI>
61 <LI><A HREF=
"#3_2_3">Printing Multiple Files
</A></LI>
62 <LI><A HREF=
"#3_2_4">Cancelling Jobs
</A></LI>
63 <LI><A HREF=
"#3_2_5">Getting the Available Printers and Classes
</A></LI>
64 <LI><A HREF=
"#3_2_6">Printing with Options
</A></LI>
65 <LI><A HREF=
"#3_2_7">Setting Printer Options
</A></LI>
66 <LI><A HREF=
"#3_2_8">Getting Errors
</A></LI>
67 <LI><A HREF=
"#3_2_9">Passwords and Authentication
</A></LI>
69 <LI><A HREF=
"#3_3">PPD Services
</A></LI>
71 <LI><A HREF=
"#3_3_1">Include Files
</A></LI>
72 <LI><A HREF=
"#3_3_2">Getting a PPD File for a Printer
</A></LI>
73 <LI><A HREF=
"#3_3_3">Loading a PPD File
</A></LI>
74 <LI><A HREF=
"#3_3_4">Freeing PPD File Information
</A></LI>
75 <LI><A HREF=
"#3_3_5">The PPD File Structure
</A></LI>
76 <LI><A HREF=
"#3_3_6">Marking Options
</A></LI>
77 <LI><A HREF=
"#3_3_7">Checking for Conflicts
</A></LI>
80 <B><A HREF=
"#WRITING_FILTERS">3 - Writing Filters
</A></B>
82 <LI><A HREF=
"#4_1">Overview
</A></LI>
84 <LI><A HREF=
"#4_1_1">Security Considerations
</A></LI>
85 <LI><A HREF=
"#4_1_2">Users and Groups
</A></LI>
86 <LI><A HREF=
"#4_1_3">Temporary Files
</A></LI>
87 <LI><A HREF=
"#4_1_4">Sending Messages to the User
</A></LI>
88 <LI><A HREF=
"#4_1_5">Page Accounting
</A></LI>
89 <LI><A HREF=
"#4_1_6">Command-Line Arguments
</A></LI>
90 <LI><A HREF=
"#4_1_7">Copy Generation
</A></LI>
91 <LI><A HREF=
"#4_1_8">Environment Variables
</A></LI>
93 <LI><A HREF=
"#4_2">Dissecting the HP-GL/
2 Filter
</A></LI>
95 <LI><A HREF=
"#4_2_1">Initializing the Filter
</A></LI>
97 <LI><A HREF=
"#4_3">PostScript Output
</A></LI>
99 <B><A HREF=
"#WRITING_DRIVERS">4 - Writing Printer Drivers
</A></B>
101 <LI><A HREF=
"#5_1">Overview
</A></LI>
103 <LI><A HREF=
"#5_1_1">CUPS Raster Data
</A></LI>
104 <LI><A HREF=
"#5_1_2">Page Accounting
</A></LI>
105 <LI><A HREF=
"#5_1_3">Color Management
</A></LI>
106 <LI><A HREF=
"#5_1_4">Device and Bitmap Variables
</A></LI>
108 <LI><A HREF=
"#5_2">Dissecting the HP-PCL Driver
</A></LI>
110 <LI><A HREF=
"#5_2_1">PPD Files
</A></LI>
111 <LI><A HREF=
"#5_2_2">Reading Raster Data
</A></LI>
114 <B><A HREF=
"#WRITING_BACKENDS">5 - Writing Backends
</A></B>
116 <LI><A HREF=
"#6_1">Overview
</A></LI>
118 <LI><A HREF=
"#6_1_1">Security Considerations
</A></LI>
119 <LI><A HREF=
"#6_1_2">Command-Line Arguments
</A></LI>
120 <LI><A HREF=
"#6_1_3">Copy Generation
</A></LI>
121 <LI><A HREF=
"#6_1_4">Page Accounting
</A></LI>
122 <LI><A HREF=
"#6_1_5">Exclusive Access
</A></LI>
123 <LI><A HREF=
"#6_1_6">Retries
</A></LI>
125 <LI><A HREF=
"#6_2">Dissecting the Serial Port Backend
</A></LI>
127 <LI><A HREF=
"#6_2_1">Supporting Device Discovery
</A></LI>
128 <LI><A HREF=
"#6_2_2">Opening the Serial Port
</A></LI>
129 <LI><A HREF=
"#6_2_3">Writing Data to the Port
</A></LI>
130 <LI><A HREF=
"#6_2_4">Finishing Up
</A></LI>
133 <B><A HREF=
"#LICENSE">A - Software License Agreement
</A></B>
135 <LI><A HREF=
"#7_1">Common UNIX Printing System License Agreement
</A></LI>
137 <LI><A HREF=
"#7_1_1">Introduction
</A></LI>
138 <LI><A HREF=
"#7_1_2">License Exceptions
</A></LI>
139 <LI><A HREF=
"#7_1_3">Trademarks
</A></LI>
140 <LI><A HREF=
"#7_1_4">Binary Distribution Rights
</A></LI>
141 <LI><A HREF=
"#7_1_5">Support
</A></LI>
143 <LI><A HREF=
"#7_2">GNU GENERAL PUBLIC LICENSE
</A></LI>
144 <LI><A HREF=
"#7_3">GNU LIBRARY GENERAL PUBLIC LICENSE
</A></LI>
146 <B><A HREF=
"#CONSTANTS">B - Constants
</A></B>
148 <LI><A HREF=
"#8_1">CUPS Constants
</A></LI>
150 <LI><A HREF=
"#8_1_1">Version Number
</A></LI>
151 <LI><A HREF=
"#8_1_2">Printer Capabilities
</A></LI>
152 <LI><A HREF=
"#8_1_3">Encodings
</A></LI>
154 <LI><A HREF=
"#8_2">HTTP Constants
</A></LI>
156 <LI><A HREF=
"#8_2_1">Limits
</A></LI>
157 <LI><A HREF=
"#8_2_2">Status Codes
</A></LI>
158 <LI><A HREF=
"#8_2_3">Fields
</A></LI>
160 <LI><A HREF=
"#8_3">IPP Constants
</A></LI>
162 <LI><A HREF=
"#8_3_1">Limits
</A></LI>
163 <LI><A HREF=
"#8_3_2">Tags
</A></LI>
164 <LI><A HREF=
"#8_3_3">Resolution Units
</A></LI>
165 <LI><A HREF=
"#8_3_4">Finishings
</A></LI>
166 <LI><A HREF=
"#8_3_5">Orientations
</A></LI>
167 <LI><A HREF=
"#8_3_6">Qualities
</A></LI>
168 <LI><A HREF=
"#8_3_7">Job States
</A></LI>
169 <LI><A HREF=
"#8_3_8">Printer States
</A></LI>
170 <LI><A HREF=
"#8_3_9">Operations
</A></LI>
171 <LI><A HREF=
"#8_3_10">Status Codes
</A></LI>
173 <LI><A HREF=
"#8_4">PPD Constants
</A></LI>
175 <LI><A HREF=
"#8_4_1">PPD Format Version
</A></LI>
176 <LI><A HREF=
"#8_4_2">PPD User-Interface Types
</A></LI>
177 <LI><A HREF=
"#8_4_3">PPD Sections
</A></LI>
178 <LI><A HREF=
"#8_4_4">PPD Colorspaces
</A></LI>
180 <LI><A HREF=
"#8_5">Raster Constants
</A></LI>
182 <LI><A HREF=
"#8_5_1">Raster Sync Words
</A></LI>
183 <LI><A HREF=
"#8_5_2">Raster Stream Modes
</A></LI>
184 <LI><A HREF=
"#8_5_3">Raster Boolean Constants
</A></LI>
185 <LI><A HREF=
"#8_5_4">Raster Jog Values
</A></LI>
186 <LI><A HREF=
"#8_5_5">Raster Orientation Values
</A></LI>
187 <LI><A HREF=
"#8_5_6">Raster CutMedia Values
</A></LI>
188 <LI><A HREF=
"#8_5_7">Raster AdvanceMedia Values
</A></LI>
189 <LI><A HREF=
"#8_5_8">Raster LeadingEdge Values
</A></LI>
190 <LI><A HREF=
"#8_5_9">Raster Color Order Values
</A></LI>
191 <LI><A HREF=
"#8_5_10">Raster Colorspace Values
</A></LI>
194 <B><A HREF=
"#STRUCTURES">C - Structures
</A></B>
196 <LI><A HREF=
"#9_1">CUPS Structures
</A></LI>
198 <LI><A HREF=
"#cups_dest_t">CUPS Destinations
</A></LI>
199 <LI><A HREF=
"#cups_job_t">CUPS Jobs
</A></LI>
200 <LI><A HREF=
"#cups_lang_t">CUPS Messages
</A></LI>
201 <LI><A HREF=
"#cups_option_t">CUPS Options
</A></LI>
203 <LI><A HREF=
"#9_2">Networking Structures
</A></LI>
205 <LI><A HREF=
"#http_t">HTTP State
</A></LI>
206 <LI><A HREF=
"#ipp_t">IPP State
</A></LI>
208 <LI><A HREF=
"#9_3">Raster Structures
</A></LI>
210 <LI><A HREF=
"#cups_raster_header_t">Raster Page Header
</A></LI>
213 <B><A HREF=
"#FUNCTIONS">D - Functions
</A></B>
215 <LI><A HREF=
"#cupsAddDest">cupsAddDest()
</A></LI>
217 <LI><A HREF=
"#10_1_1">Usage
</A></LI>
218 <LI><A HREF=
"#10_1_2">Arguments
</A></LI>
219 <LI><A HREF=
"#10_1_3">Returns
</A></LI>
220 <LI><A HREF=
"#10_1_4">Description
</A></LI>
221 <LI><A HREF=
"#10_1_5">Example
</A></LI>
222 <LI><A HREF=
"#10_1_6">See Also
</A></LI>
224 <LI><A HREF=
"#cupsAddOption">cupsAddOption()
</A></LI>
226 <LI><A HREF=
"#10_2_1">Usage
</A></LI>
227 <LI><A HREF=
"#10_2_2">Arguments
</A></LI>
228 <LI><A HREF=
"#10_2_3">Returns
</A></LI>
229 <LI><A HREF=
"#10_2_4">Description
</A></LI>
230 <LI><A HREF=
"#10_2_5">Example
</A></LI>
231 <LI><A HREF=
"#10_2_6">See Also
</A></LI>
233 <LI><A HREF=
"#cupsCancelJob">cupsCancelJob()
</A></LI>
235 <LI><A HREF=
"#10_3_1">Usage
</A></LI>
236 <LI><A HREF=
"#10_3_2">Arguments
</A></LI>
237 <LI><A HREF=
"#10_3_3">Returns
</A></LI>
238 <LI><A HREF=
"#10_3_4">Description
</A></LI>
239 <LI><A HREF=
"#10_3_5">Example
</A></LI>
240 <LI><A HREF=
"#10_3_6">See Also
</A></LI>
242 <LI><A HREF=
"#cupsDoFileRequest">cupsDoFileRequest()
</A></LI>
244 <LI><A HREF=
"#10_4_1">Usage
</A></LI>
245 <LI><A HREF=
"#10_4_2">Arguments
</A></LI>
246 <LI><A HREF=
"#10_4_3">Returns
</A></LI>
247 <LI><A HREF=
"#10_4_4">Description
</A></LI>
248 <LI><A HREF=
"#10_4_5">Example
</A></LI>
249 <LI><A HREF=
"#10_4_6">See Also
</A></LI>
251 <LI><A HREF=
"#cupsDoRequest">cupsDoRequest()
</A></LI>
253 <LI><A HREF=
"#10_5_1">Usage
</A></LI>
254 <LI><A HREF=
"#10_5_2">Arguments
</A></LI>
255 <LI><A HREF=
"#10_5_3">Returns
</A></LI>
256 <LI><A HREF=
"#10_5_4">Description
</A></LI>
257 <LI><A HREF=
"#10_5_5">Example
</A></LI>
258 <LI><A HREF=
"#10_5_6">See Also
</A></LI>
260 <LI><A HREF=
"#cupsEncodeOptions">cupsEncodeOptions()
</A></LI>
262 <LI><A HREF=
"#10_6_1">Usage
</A></LI>
263 <LI><A HREF=
"#10_6_2">Arguments
</A></LI>
264 <LI><A HREF=
"#10_6_3">Description
</A></LI>
265 <LI><A HREF=
"#10_6_4">Example
</A></LI>
266 <LI><A HREF=
"#10_6_5">See Also
</A></LI>
268 <LI><A HREF=
"#cupsEncryption">cupsEncryption()
</A></LI>
270 <LI><A HREF=
"#10_7_1">Usage
</A></LI>
271 <LI><A HREF=
"#10_7_2">Returns
</A></LI>
272 <LI><A HREF=
"#10_7_3">Description
</A></LI>
273 <LI><A HREF=
"#10_7_4">Example
</A></LI>
274 <LI><A HREF=
"#10_7_5">See Also
</A></LI>
276 <LI><A HREF=
"#cupsFreeDests">cupsFreeDests()
</A></LI>
278 <LI><A HREF=
"#10_8_1">Usage
</A></LI>
279 <LI><A HREF=
"#10_8_2">Arguments
</A></LI>
280 <LI><A HREF=
"#10_8_3">Description
</A></LI>
281 <LI><A HREF=
"#10_8_4">Example
</A></LI>
282 <LI><A HREF=
"#10_8_5">See Also
</A></LI>
284 <LI><A HREF=
"#cupsFreeJobs">cupsFreeJobs()
</A></LI>
286 <LI><A HREF=
"#10_9_1">Usage
</A></LI>
287 <LI><A HREF=
"#10_9_2">Arguments
</A></LI>
288 <LI><A HREF=
"#10_9_3">Description
</A></LI>
289 <LI><A HREF=
"#10_9_4">Example
</A></LI>
290 <LI><A HREF=
"#10_9_5">See Also
</A></LI>
292 <LI><A HREF=
"#cupsFreeOptions">cupsFreeOptions()
</A></LI>
294 <LI><A HREF=
"#10_10_1">Usage
</A></LI>
295 <LI><A HREF=
"#10_10_2">Arguments
</A></LI>
296 <LI><A HREF=
"#10_10_3">Description
</A></LI>
297 <LI><A HREF=
"#10_10_4">Example
</A></LI>
298 <LI><A HREF=
"#10_10_5">See Also
</A></LI>
300 <LI><A HREF=
"#cupsGetClasses">cupsGetClasses()
</A></LI>
302 <LI><A HREF=
"#10_11_1">Usage
</A></LI>
303 <LI><A HREF=
"#10_11_2">Arguments
</A></LI>
304 <LI><A HREF=
"#10_11_3">Returns
</A></LI>
305 <LI><A HREF=
"#10_11_4">Description
</A></LI>
306 <LI><A HREF=
"#10_11_5">Example
</A></LI>
307 <LI><A HREF=
"#10_11_6">See Also
</A></LI>
309 <LI><A HREF=
"#cupsGetDefault">cupsGetDefault()
</A></LI>
311 <LI><A HREF=
"#10_12_1">Usage
</A></LI>
312 <LI><A HREF=
"#10_12_2">Returns
</A></LI>
313 <LI><A HREF=
"#10_12_3">Description
</A></LI>
314 <LI><A HREF=
"#10_12_4">Example
</A></LI>
315 <LI><A HREF=
"#10_12_5">See Also
</A></LI>
317 <LI><A HREF=
"#cupsGetDest">cupsGetDest()
</A></LI>
319 <LI><A HREF=
"#10_13_1">Usage
</A></LI>
320 <LI><A HREF=
"#10_13_2">Arguments
</A></LI>
321 <LI><A HREF=
"#10_13_3">Returns
</A></LI>
322 <LI><A HREF=
"#10_13_4">Description
</A></LI>
323 <LI><A HREF=
"#10_13_5">Example
</A></LI>
324 <LI><A HREF=
"#10_13_6">See Also
</A></LI>
326 <LI><A HREF=
"#cupsGetDests">cupsGetDests()
</A></LI>
328 <LI><A HREF=
"#10_14_1">Usage
</A></LI>
329 <LI><A HREF=
"#10_14_2">Arguments
</A></LI>
330 <LI><A HREF=
"#10_14_3">Returns
</A></LI>
331 <LI><A HREF=
"#10_14_4">Description
</A></LI>
332 <LI><A HREF=
"#10_14_5">Example
</A></LI>
333 <LI><A HREF=
"#10_14_6">See Also
</A></LI>
335 <LI><A HREF=
"#cupsGetJobs">cupsGetJobs()
</A></LI>
337 <LI><A HREF=
"#10_15_1">Usage
</A></LI>
338 <LI><A HREF=
"#10_15_2">Arguments
</A></LI>
339 <LI><A HREF=
"#10_15_3">Returns
</A></LI>
340 <LI><A HREF=
"#10_15_4">Description
</A></LI>
341 <LI><A HREF=
"#10_15_5">Example
</A></LI>
342 <LI><A HREF=
"#10_15_6">See Also
</A></LI>
344 <LI><A HREF=
"#cupsGetOption">cupsGetOption()
</A></LI>
346 <LI><A HREF=
"#10_16_1">Usage
</A></LI>
347 <LI><A HREF=
"#10_16_2">Arguments
</A></LI>
348 <LI><A HREF=
"#10_16_3">Returns
</A></LI>
349 <LI><A HREF=
"#10_16_4">Description
</A></LI>
350 <LI><A HREF=
"#10_16_5">See Also
</A></LI>
352 <LI><A HREF=
"#cupsGetPassword">cupsGetPassword()
</A></LI>
354 <LI><A HREF=
"#10_17_1">Usage
</A></LI>
355 <LI><A HREF=
"#10_17_2">Arguments
</A></LI>
356 <LI><A HREF=
"#10_17_3">Returns
</A></LI>
357 <LI><A HREF=
"#10_17_4">Description
</A></LI>
358 <LI><A HREF=
"#10_17_5">Example
</A></LI>
359 <LI><A HREF=
"#10_17_6">See Also
</A></LI>
361 <LI><A HREF=
"#cupsGetPPD">cupsGetPPD()
</A></LI>
363 <LI><A HREF=
"#10_18_1">Usage
</A></LI>
364 <LI><A HREF=
"#10_18_2">Arguments
</A></LI>
365 <LI><A HREF=
"#10_18_3">Returns
</A></LI>
366 <LI><A HREF=
"#10_18_4">Description
</A></LI>
367 <LI><A HREF=
"#10_18_5">Example
</A></LI>
369 <LI><A HREF=
"#cupsGetPrinters">cupsGetPrinters()
</A></LI>
371 <LI><A HREF=
"#10_19_1">Usage
</A></LI>
372 <LI><A HREF=
"#10_19_2">Arguments
</A></LI>
373 <LI><A HREF=
"#10_19_3">Returns
</A></LI>
374 <LI><A HREF=
"#10_19_4">Description
</A></LI>
375 <LI><A HREF=
"#10_19_5">Example
</A></LI>
376 <LI><A HREF=
"#10_19_6">See Also
</A></LI>
378 <LI><A HREF=
"#cupsLangDefault">cupsLangDefault()
</A></LI>
380 <LI><A HREF=
"#10_20_1">Usage
</A></LI>
381 <LI><A HREF=
"#10_20_2">Returns
</A></LI>
382 <LI><A HREF=
"#10_20_3">Description
</A></LI>
383 <LI><A HREF=
"#10_20_4">Example
</A></LI>
384 <LI><A HREF=
"#10_20_5">See Also
</A></LI>
386 <LI><A HREF=
"#cupsLangEncoding">cupsLangEncoding()
</A></LI>
388 <LI><A HREF=
"#10_21_1">Usage
</A></LI>
389 <LI><A HREF=
"#10_21_2">Arguments
</A></LI>
390 <LI><A HREF=
"#10_21_3">Returns
</A></LI>
391 <LI><A HREF=
"#10_21_4">Description
</A></LI>
392 <LI><A HREF=
"#10_21_5">Example
</A></LI>
393 <LI><A HREF=
"#10_21_6">See Also
</A></LI>
395 <LI><A HREF=
"#cupsLangFlush">cupsLangFlush()
</A></LI>
397 <LI><A HREF=
"#10_22_1">Usage
</A></LI>
398 <LI><A HREF=
"#10_22_2">Description
</A></LI>
399 <LI><A HREF=
"#10_22_3">Example
</A></LI>
400 <LI><A HREF=
"#10_22_4">See Also
</A></LI>
402 <LI><A HREF=
"#cupsLangFree">cupsLangFree()
</A></LI>
404 <LI><A HREF=
"#10_23_1">Usage
</A></LI>
405 <LI><A HREF=
"#10_23_2">Arguments
</A></LI>
406 <LI><A HREF=
"#10_23_3">Description
</A></LI>
407 <LI><A HREF=
"#10_23_4">Example
</A></LI>
408 <LI><A HREF=
"#10_23_5">See Also
</A></LI>
410 <LI><A HREF=
"#cupsLangGet">cupsLangGet()
</A></LI>
412 <LI><A HREF=
"#10_24_1">Usage
</A></LI>
413 <LI><A HREF=
"#10_24_2">Arguments
</A></LI>
414 <LI><A HREF=
"#10_24_3">Returns
</A></LI>
415 <LI><A HREF=
"#10_24_4">Description
</A></LI>
416 <LI><A HREF=
"#10_24_5">Example
</A></LI>
417 <LI><A HREF=
"#10_24_6">See Also
</A></LI>
419 <LI><A HREF=
"#cupsLangString">cupsLangString()
</A></LI>
421 <LI><A HREF=
"#10_25_1">Usage
</A></LI>
422 <LI><A HREF=
"#10_25_2">Arguments
</A></LI>
423 <LI><A HREF=
"#10_25_3">Returns
</A></LI>
424 <LI><A HREF=
"#10_25_4">Description
</A></LI>
425 <LI><A HREF=
"#10_25_5">Example
</A></LI>
426 <LI><A HREF=
"#10_25_6">See Also
</A></LI>
428 <LI><A HREF=
"#cupsLastError">cupsLastError()
</A></LI>
430 <LI><A HREF=
"#10_26_1">Usage
</A></LI>
431 <LI><A HREF=
"#10_26_2">Returns
</A></LI>
432 <LI><A HREF=
"#10_26_3">Description
</A></LI>
433 <LI><A HREF=
"#10_26_4">Example
</A></LI>
434 <LI><A HREF=
"#10_26_5">See Also
</A></LI>
436 <LI><A HREF=
"#cupsMarkOptions">cupsMarkOptions()
</A></LI>
438 <LI><A HREF=
"#10_27_1">Usage
</A></LI>
439 <LI><A HREF=
"#10_27_2">Arguments
</A></LI>
440 <LI><A HREF=
"#10_27_3">Returns
</A></LI>
441 <LI><A HREF=
"#10_27_4">Description
</A></LI>
442 <LI><A HREF=
"#10_27_5">Example
</A></LI>
443 <LI><A HREF=
"#10_27_6">See Also
</A></LI>
445 <LI><A HREF=
"#cupsParseOptions">cupsParseOptions()
</A></LI>
447 <LI><A HREF=
"#10_28_1">Usage
</A></LI>
448 <LI><A HREF=
"#10_28_2">Arguments
</A></LI>
449 <LI><A HREF=
"#10_28_3">Returns
</A></LI>
450 <LI><A HREF=
"#10_28_4">Description
</A></LI>
451 <LI><A HREF=
"#10_28_5">Example
</A></LI>
452 <LI><A HREF=
"#10_28_6">See Also
</A></LI>
454 <LI><A HREF=
"#cupsPrintFile">cupsPrintFile()
</A></LI>
456 <LI><A HREF=
"#10_29_1">Usage
</A></LI>
457 <LI><A HREF=
"#10_29_2">Arguments
</A></LI>
458 <LI><A HREF=
"#10_29_3">Returns
</A></LI>
459 <LI><A HREF=
"#10_29_4">Description
</A></LI>
460 <LI><A HREF=
"#10_29_5">Example
</A></LI>
461 <LI><A HREF=
"#10_29_6">See Also
</A></LI>
463 <LI><A HREF=
"#cupsPrintFiles">cupsPrintFiles()
</A></LI>
465 <LI><A HREF=
"#10_30_1">Usage
</A></LI>
466 <LI><A HREF=
"#10_30_2">Arguments
</A></LI>
467 <LI><A HREF=
"#10_30_3">Returns
</A></LI>
468 <LI><A HREF=
"#10_30_4">Description
</A></LI>
469 <LI><A HREF=
"#10_30_5">Example
</A></LI>
470 <LI><A HREF=
"#10_30_6">See Also
</A></LI>
472 <LI><A HREF=
"#cupsRasterClose">cupsRasterClose()
</A></LI>
474 <LI><A HREF=
"#10_31_1">Usage
</A></LI>
475 <LI><A HREF=
"#10_31_2">Arguments
</A></LI>
476 <LI><A HREF=
"#10_31_3">Description
</A></LI>
477 <LI><A HREF=
"#10_31_4">Example
</A></LI>
478 <LI><A HREF=
"#10_31_5">See Also
</A></LI>
480 <LI><A HREF=
"#cupsRasterOpen">cupsRasterOpen()
</A></LI>
482 <LI><A HREF=
"#10_32_1">Usage
</A></LI>
483 <LI><A HREF=
"#10_32_2">Arguments
</A></LI>
484 <LI><A HREF=
"#10_32_3">Returns
</A></LI>
485 <LI><A HREF=
"#10_32_4">Description
</A></LI>
486 <LI><A HREF=
"#10_32_5">Example
</A></LI>
487 <LI><A HREF=
"#10_32_6">See Also
</A></LI>
489 <LI><A HREF=
"#cupsRasterReadHeader">cupsRasterReadHeader()
</A></LI>
491 <LI><A HREF=
"#10_33_1">Usage
</A></LI>
492 <LI><A HREF=
"#10_33_2">Arguments
</A></LI>
493 <LI><A HREF=
"#10_33_3">Returns
</A></LI>
494 <LI><A HREF=
"#10_33_4">Description
</A></LI>
495 <LI><A HREF=
"#10_33_5">Example
</A></LI>
496 <LI><A HREF=
"#10_33_6">See Also
</A></LI>
498 <LI><A HREF=
"#cupsRasterReadPixels">cupsRasterReadPixels()
</A></LI>
500 <LI><A HREF=
"#10_34_1">Usage
</A></LI>
501 <LI><A HREF=
"#10_34_2">Arguments
</A></LI>
502 <LI><A HREF=
"#10_34_3">Returns
</A></LI>
503 <LI><A HREF=
"#10_34_4">Description
</A></LI>
504 <LI><A HREF=
"#10_34_5">Example
</A></LI>
505 <LI><A HREF=
"#10_34_6">See Also
</A></LI>
507 <LI><A HREF=
"#cupsRasterWriteHeader">cupsRasterWriteHeader()
</A></LI>
509 <LI><A HREF=
"#10_35_1">Usage
</A></LI>
510 <LI><A HREF=
"#10_35_2">Arguments
</A></LI>
511 <LI><A HREF=
"#10_35_3">Returns
</A></LI>
512 <LI><A HREF=
"#10_35_4">Description
</A></LI>
513 <LI><A HREF=
"#10_35_5">Example
</A></LI>
514 <LI><A HREF=
"#10_35_6">See Also
</A></LI>
516 <LI><A HREF=
"#cupsRasterWritePixels">cupsRasterWritePixels()
</A></LI>
518 <LI><A HREF=
"#10_36_1">Usage
</A></LI>
519 <LI><A HREF=
"#10_36_2">Arguments
</A></LI>
520 <LI><A HREF=
"#10_36_3">Returns
</A></LI>
521 <LI><A HREF=
"#10_36_4">Description
</A></LI>
522 <LI><A HREF=
"#10_36_5">Example
</A></LI>
523 <LI><A HREF=
"#10_36_6">See Also
</A></LI>
525 <LI><A HREF=
"#cupsServer">cupsServer()
</A></LI>
527 <LI><A HREF=
"#10_37_1">Usage
</A></LI>
528 <LI><A HREF=
"#10_37_2">Returns
</A></LI>
529 <LI><A HREF=
"#10_37_3">Description
</A></LI>
530 <LI><A HREF=
"#10_37_4">Example
</A></LI>
531 <LI><A HREF=
"#10_37_5">See Also
</A></LI>
533 <LI><A HREF=
"#cupsSetDests">cupsSetDests()
</A></LI>
535 <LI><A HREF=
"#10_38_1">Usage
</A></LI>
536 <LI><A HREF=
"#10_38_2">Arguments
</A></LI>
537 <LI><A HREF=
"#10_38_3">Description
</A></LI>
538 <LI><A HREF=
"#10_38_4">Example
</A></LI>
539 <LI><A HREF=
"#10_38_5">See Also
</A></LI>
541 <LI><A HREF=
"#cupsSetEncryption">cupsSetEncryption()
</A></LI>
543 <LI><A HREF=
"#10_39_1">Usage
</A></LI>
544 <LI><A HREF=
"#10_39_2">Arguments
</A></LI>
545 <LI><A HREF=
"#10_39_3">Description
</A></LI>
546 <LI><A HREF=
"#10_39_4">Example
</A></LI>
547 <LI><A HREF=
"#10_39_5">See Also
</A></LI>
549 <LI><A HREF=
"#cupsSetPasswordCB">cupsSetPasswordCB()
</A></LI>
551 <LI><A HREF=
"#10_40_1">Usage
</A></LI>
552 <LI><A HREF=
"#10_40_2">Arguments
</A></LI>
553 <LI><A HREF=
"#10_40_3">Description
</A></LI>
554 <LI><A HREF=
"#10_40_4">Example
</A></LI>
555 <LI><A HREF=
"#10_40_5">See Also
</A></LI>
557 <LI><A HREF=
"#cupsSetServer">cupsSetServer()
</A></LI>
559 <LI><A HREF=
"#10_41_1">Usage
</A></LI>
560 <LI><A HREF=
"#10_41_2">Arguments
</A></LI>
561 <LI><A HREF=
"#10_41_3">Description
</A></LI>
562 <LI><A HREF=
"#10_41_4">Example
</A></LI>
563 <LI><A HREF=
"#10_41_5">See Also
</A></LI>
565 <LI><A HREF=
"#cupsSetUser">cupsSetUser()
</A></LI>
567 <LI><A HREF=
"#10_42_1">Usage
</A></LI>
568 <LI><A HREF=
"#10_42_2">Arguments
</A></LI>
569 <LI><A HREF=
"#10_42_3">Description
</A></LI>
570 <LI><A HREF=
"#10_42_4">Example
</A></LI>
571 <LI><A HREF=
"#10_42_5">See Also
</A></LI>
573 <LI><A HREF=
"#cupsTempFd">cupsTempFd()
</A></LI>
575 <LI><A HREF=
"#10_43_1">Usage
</A></LI>
576 <LI><A HREF=
"#10_43_2">Arguments
</A></LI>
577 <LI><A HREF=
"#10_43_3">Returns
</A></LI>
578 <LI><A HREF=
"#10_43_4">Description
</A></LI>
579 <LI><A HREF=
"#10_43_5">Example
</A></LI>
580 <LI><A HREF=
"#10_43_6">See Also
</A></LI>
582 <LI><A HREF=
"#cupsTempFile">cupsTempFile()
</A></LI>
584 <LI><A HREF=
"#10_44_1">Usage
</A></LI>
585 <LI><A HREF=
"#10_44_2">Arguments
</A></LI>
586 <LI><A HREF=
"#10_44_3">Returns
</A></LI>
587 <LI><A HREF=
"#10_44_4">Description
</A></LI>
588 <LI><A HREF=
"#10_44_5">Example
</A></LI>
589 <LI><A HREF=
"#10_44_6">See Also
</A></LI>
591 <LI><A HREF=
"#cupsUser">cupsUser()
</A></LI>
593 <LI><A HREF=
"#10_45_1">Usage
</A></LI>
594 <LI><A HREF=
"#10_45_2">Returns
</A></LI>
595 <LI><A HREF=
"#10_45_3">Description
</A></LI>
596 <LI><A HREF=
"#10_45_4">Example
</A></LI>
597 <LI><A HREF=
"#10_45_5">See Also
</A></LI>
599 <LI><A HREF=
"#httpBlocking">httpBlocking()
</A></LI>
601 <LI><A HREF=
"#10_46_1">Usage
</A></LI>
602 <LI><A HREF=
"#10_46_2">Arguments
</A></LI>
603 <LI><A HREF=
"#10_46_3">Description
</A></LI>
604 <LI><A HREF=
"#10_46_4">Example
</A></LI>
605 <LI><A HREF=
"#10_46_5">See Also
</A></LI>
607 <LI><A HREF=
"#httpCheck">httpCheck()
</A></LI>
609 <LI><A HREF=
"#10_47_1">Usage
</A></LI>
610 <LI><A HREF=
"#10_47_2">Arguments
</A></LI>
611 <LI><A HREF=
"#10_47_3">Returns
</A></LI>
612 <LI><A HREF=
"#10_47_4">Description
</A></LI>
613 <LI><A HREF=
"#10_47_5">Example
</A></LI>
614 <LI><A HREF=
"#10_47_6">See Also
</A></LI>
616 <LI><A HREF=
"#httpClearFields">httpClearFields()
</A></LI>
618 <LI><A HREF=
"#10_48_1">Usage
</A></LI>
619 <LI><A HREF=
"#10_48_2">Arguments
</A></LI>
620 <LI><A HREF=
"#10_48_3">Description
</A></LI>
621 <LI><A HREF=
"#10_48_4">Example
</A></LI>
622 <LI><A HREF=
"#10_48_5">See Also
</A></LI>
624 <LI><A HREF=
"#httpClose">httpClose()
</A></LI>
626 <LI><A HREF=
"#10_49_1">Usage
</A></LI>
627 <LI><A HREF=
"#10_49_2">Arguments
</A></LI>
628 <LI><A HREF=
"#10_49_3">Description
</A></LI>
629 <LI><A HREF=
"#10_49_4">Example
</A></LI>
630 <LI><A HREF=
"#10_49_5">See Also
</A></LI>
632 <LI><A HREF=
"#httpConnect">httpConnect()
</A></LI>
634 <LI><A HREF=
"#10_50_1">Usage
</A></LI>
635 <LI><A HREF=
"#10_50_2">Arguments
</A></LI>
636 <LI><A HREF=
"#10_50_3">Returns
</A></LI>
637 <LI><A HREF=
"#10_50_4">Description
</A></LI>
638 <LI><A HREF=
"#10_50_5">Example
</A></LI>
639 <LI><A HREF=
"#10_50_6">See Also
</A></LI>
641 <LI><A HREF=
"#httpConnectEncrypt">httpConnectEncrypt()
</A></LI>
643 <LI><A HREF=
"#10_51_1">Usage
</A></LI>
644 <LI><A HREF=
"#10_51_2">Arguments
</A></LI>
645 <LI><A HREF=
"#10_51_3">Returns
</A></LI>
646 <LI><A HREF=
"#10_51_4">Description
</A></LI>
647 <LI><A HREF=
"#10_51_5">Example
</A></LI>
648 <LI><A HREF=
"#10_51_6">See Also
</A></LI>
650 <LI><A HREF=
"#httpDecode64">httpDecode64()
</A></LI>
652 <LI><A HREF=
"#10_52_1">Usage
</A></LI>
653 <LI><A HREF=
"#10_52_2">Arguments
</A></LI>
654 <LI><A HREF=
"#10_52_3">Returns
</A></LI>
655 <LI><A HREF=
"#10_52_4">Description
</A></LI>
656 <LI><A HREF=
"#10_52_5">Example
</A></LI>
657 <LI><A HREF=
"#10_52_6">See Also
</A></LI>
659 <LI><A HREF=
"#httpDelete">httpDelete()
</A></LI>
661 <LI><A HREF=
"#10_53_1">Usage
</A></LI>
662 <LI><A HREF=
"#10_53_2">Arguments
</A></LI>
663 <LI><A HREF=
"#10_53_3">Returns
</A></LI>
664 <LI><A HREF=
"#10_53_4">Description
</A></LI>
665 <LI><A HREF=
"#10_53_5">Example
</A></LI>
666 <LI><A HREF=
"#10_53_6">See Also
</A></LI>
668 <LI><A HREF=
"#httpEncode64">httpEncode64()
</A></LI>
670 <LI><A HREF=
"#10_54_1">Usage
</A></LI>
671 <LI><A HREF=
"#10_54_2">Arguments
</A></LI>
672 <LI><A HREF=
"#10_54_3">Returns
</A></LI>
673 <LI><A HREF=
"#10_54_4">Description
</A></LI>
674 <LI><A HREF=
"#10_54_5">Example
</A></LI>
675 <LI><A HREF=
"#10_54_6">See Also
</A></LI>
677 <LI><A HREF=
"#httpEncryption">httpEncryption()
</A></LI>
679 <LI><A HREF=
"#10_55_1">Usage
</A></LI>
680 <LI><A HREF=
"#10_55_2">Arguments
</A></LI>
681 <LI><A HREF=
"#10_55_3">Returns
</A></LI>
682 <LI><A HREF=
"#10_55_4">Description
</A></LI>
683 <LI><A HREF=
"#10_55_5">Example
</A></LI>
684 <LI><A HREF=
"#10_55_6">See Also
</A></LI>
686 <LI><A HREF=
"#httpError">httpError()
</A></LI>
688 <LI><A HREF=
"#10_56_1">Usage
</A></LI>
689 <LI><A HREF=
"#10_56_2">Arguments
</A></LI>
690 <LI><A HREF=
"#10_56_3">Returns
</A></LI>
691 <LI><A HREF=
"#10_56_4">Description
</A></LI>
692 <LI><A HREF=
"#10_56_5">Example
</A></LI>
693 <LI><A HREF=
"#10_56_6">See Also
</A></LI>
695 <LI><A HREF=
"#httpFlush">httpFlush()
</A></LI>
697 <LI><A HREF=
"#10_57_1">Usage
</A></LI>
698 <LI><A HREF=
"#10_57_2">Arguments
</A></LI>
699 <LI><A HREF=
"#10_57_3">Description
</A></LI>
700 <LI><A HREF=
"#10_57_4">Example
</A></LI>
701 <LI><A HREF=
"#10_57_5">See Also
</A></LI>
703 <LI><A HREF=
"#httpGet">httpGet()
</A></LI>
705 <LI><A HREF=
"#10_58_1">Usage
</A></LI>
706 <LI><A HREF=
"#10_58_2">Arguments
</A></LI>
707 <LI><A HREF=
"#10_58_3">Returns
</A></LI>
708 <LI><A HREF=
"#10_58_4">Description
</A></LI>
709 <LI><A HREF=
"#10_58_5">Example
</A></LI>
710 <LI><A HREF=
"#10_58_6">See Also
</A></LI>
712 <LI><A HREF=
"#httpGets">httpGets()
</A></LI>
714 <LI><A HREF=
"#10_59_1">Usage
</A></LI>
715 <LI><A HREF=
"#10_59_2">Arguments
</A></LI>
716 <LI><A HREF=
"#10_59_3">Returns
</A></LI>
717 <LI><A HREF=
"#10_59_4">Description
</A></LI>
718 <LI><A HREF=
"#10_59_5">Example
</A></LI>
719 <LI><A HREF=
"#10_59_6">See Also
</A></LI>
721 <LI><A HREF=
"#httpGetDateString">httpGetDateString()
</A></LI>
723 <LI><A HREF=
"#10_60_1">Usage
</A></LI>
724 <LI><A HREF=
"#10_60_2">Arguments
</A></LI>
725 <LI><A HREF=
"#10_60_3">Returns
</A></LI>
726 <LI><A HREF=
"#10_60_4">Description
</A></LI>
727 <LI><A HREF=
"#10_60_5">Example
</A></LI>
728 <LI><A HREF=
"#10_60_6">See Also
</A></LI>
730 <LI><A HREF=
"#httpGetDateTime">httpGetDateTime()
</A></LI>
732 <LI><A HREF=
"#10_61_1">Usage
</A></LI>
733 <LI><A HREF=
"#10_61_2">Arguments
</A></LI>
734 <LI><A HREF=
"#10_61_3">Returns
</A></LI>
735 <LI><A HREF=
"#10_61_4">Description
</A></LI>
736 <LI><A HREF=
"#10_61_5">Example
</A></LI>
737 <LI><A HREF=
"#10_61_6">See Also
</A></LI>
739 <LI><A HREF=
"#httpGetField">httpGetField()
</A></LI>
741 <LI><A HREF=
"#10_62_1">Usage
</A></LI>
742 <LI><A HREF=
"#10_62_2">Arguments
</A></LI>
743 <LI><A HREF=
"#10_62_3">Returns
</A></LI>
744 <LI><A HREF=
"#10_62_4">Description
</A></LI>
745 <LI><A HREF=
"#10_62_5">Example
</A></LI>
746 <LI><A HREF=
"#10_62_6">See Also
</A></LI>
748 <LI><A HREF=
"#httpGetHostByName">httpGetHostByName()
</A></LI>
750 <LI><A HREF=
"#10_63_1">Usage
</A></LI>
751 <LI><A HREF=
"#10_63_2">Arguments
</A></LI>
752 <LI><A HREF=
"#10_63_3">Returns
</A></LI>
753 <LI><A HREF=
"#10_63_4">Description
</A></LI>
754 <LI><A HREF=
"#10_63_5">Example
</A></LI>
756 <LI><A HREF=
"#httpGetLength">httpGetLength()
</A></LI>
758 <LI><A HREF=
"#10_64_1">Usage
</A></LI>
759 <LI><A HREF=
"#10_64_2">Arguments
</A></LI>
760 <LI><A HREF=
"#10_64_3">Returns
</A></LI>
761 <LI><A HREF=
"#10_64_4">Description
</A></LI>
762 <LI><A HREF=
"#10_64_5">Example
</A></LI>
763 <LI><A HREF=
"#10_64_6">See Also
</A></LI>
765 <LI><A HREF=
"#httpGetSubField">httpGetSubField()
</A></LI>
767 <LI><A HREF=
"#10_65_1">Usage
</A></LI>
768 <LI><A HREF=
"#10_65_2">Arguments
</A></LI>
769 <LI><A HREF=
"#10_65_3">Returns
</A></LI>
770 <LI><A HREF=
"#10_65_4">Description
</A></LI>
771 <LI><A HREF=
"#10_65_5">Example
</A></LI>
772 <LI><A HREF=
"#10_65_6">See Also
</A></LI>
774 <LI><A HREF=
"#httpHead">httpHead()
</A></LI>
776 <LI><A HREF=
"#10_66_1">Usage
</A></LI>
777 <LI><A HREF=
"#10_66_2">Arguments
</A></LI>
778 <LI><A HREF=
"#10_66_3">Returns
</A></LI>
779 <LI><A HREF=
"#10_66_4">Description
</A></LI>
780 <LI><A HREF=
"#10_66_5">Example
</A></LI>
781 <LI><A HREF=
"#10_66_6">See Also
</A></LI>
783 <LI><A HREF=
"#httpInitialize">httpInitialize()
</A></LI>
785 <LI><A HREF=
"#10_67_1">Usage
</A></LI>
786 <LI><A HREF=
"#10_67_2">Description
</A></LI>
787 <LI><A HREF=
"#10_67_3">Example
</A></LI>
788 <LI><A HREF=
"#10_67_4">See Also
</A></LI>
790 <LI><A HREF=
"#httpMD5">httpMD5()
</A></LI>
792 <LI><A HREF=
"#10_68_1">Usage
</A></LI>
793 <LI><A HREF=
"#10_68_2">Arguments
</A></LI>
794 <LI><A HREF=
"#10_68_3">Returns
</A></LI>
795 <LI><A HREF=
"#10_68_4">Description
</A></LI>
796 <LI><A HREF=
"#10_68_5">Example
</A></LI>
797 <LI><A HREF=
"#10_68_6">See Also
</A></LI>
799 <LI><A HREF=
"#httpMD5Final">httpMD5Final()
</A></LI>
801 <LI><A HREF=
"#10_69_1">Usage
</A></LI>
802 <LI><A HREF=
"#10_69_2">Arguments
</A></LI>
803 <LI><A HREF=
"#10_69_3">Returns
</A></LI>
804 <LI><A HREF=
"#10_69_4">Description
</A></LI>
805 <LI><A HREF=
"#10_69_5">Example
</A></LI>
806 <LI><A HREF=
"#10_69_6">See Also
</A></LI>
808 <LI><A HREF=
"#httpMD5String">httpMD5String()
</A></LI>
810 <LI><A HREF=
"#10_70_1">Usage
</A></LI>
811 <LI><A HREF=
"#10_70_2">Arguments
</A></LI>
812 <LI><A HREF=
"#10_70_3">Returns
</A></LI>
813 <LI><A HREF=
"#10_70_4">Description
</A></LI>
814 <LI><A HREF=
"#10_70_5">Example
</A></LI>
815 <LI><A HREF=
"#10_70_6">See Also
</A></LI>
817 <LI><A HREF=
"#httpOptions">httpOptions()
</A></LI>
819 <LI><A HREF=
"#10_71_1">Usage
</A></LI>
820 <LI><A HREF=
"#10_71_2">Arguments
</A></LI>
821 <LI><A HREF=
"#10_71_3">Returns
</A></LI>
822 <LI><A HREF=
"#10_71_4">Description
</A></LI>
823 <LI><A HREF=
"#10_71_5">Example
</A></LI>
824 <LI><A HREF=
"#10_71_6">See Also
</A></LI>
826 <LI><A HREF=
"#httpPost">httpPost()
</A></LI>
828 <LI><A HREF=
"#10_72_1">Usage
</A></LI>
829 <LI><A HREF=
"#10_72_2">Arguments
</A></LI>
830 <LI><A HREF=
"#10_72_3">Returns
</A></LI>
831 <LI><A HREF=
"#10_72_4">Description
</A></LI>
832 <LI><A HREF=
"#10_72_5">Example
</A></LI>
833 <LI><A HREF=
"#10_72_6">See Also
</A></LI>
835 <LI><A HREF=
"#httpPrintf">httpPrintf()
</A></LI>
837 <LI><A HREF=
"#10_73_1">Usage
</A></LI>
838 <LI><A HREF=
"#10_73_2">Arguments
</A></LI>
839 <LI><A HREF=
"#10_73_3">Returns
</A></LI>
840 <LI><A HREF=
"#10_73_4">Description
</A></LI>
841 <LI><A HREF=
"#10_73_5">Example
</A></LI>
842 <LI><A HREF=
"#10_73_6">See Also
</A></LI>
844 <LI><A HREF=
"#httpPut">httpPut()
</A></LI>
846 <LI><A HREF=
"#10_74_1">Usage
</A></LI>
847 <LI><A HREF=
"#10_74_2">Arguments
</A></LI>
848 <LI><A HREF=
"#10_74_3">Returns
</A></LI>
849 <LI><A HREF=
"#10_74_4">Description
</A></LI>
850 <LI><A HREF=
"#10_74_5">Example
</A></LI>
851 <LI><A HREF=
"#10_74_6">See Also
</A></LI>
853 <LI><A HREF=
"#httpRead">httpRead()
</A></LI>
855 <LI><A HREF=
"#10_75_1">Usage
</A></LI>
856 <LI><A HREF=
"#10_75_2">Arguments
</A></LI>
857 <LI><A HREF=
"#10_75_3">Returns
</A></LI>
858 <LI><A HREF=
"#10_75_4">Description
</A></LI>
859 <LI><A HREF=
"#10_75_5">Example
</A></LI>
860 <LI><A HREF=
"#10_75_6">See Also
</A></LI>
862 <LI><A HREF=
"#httpReconnect">httpReconnect()
</A></LI>
864 <LI><A HREF=
"#10_76_1">Usage
</A></LI>
865 <LI><A HREF=
"#10_76_2">Arguments
</A></LI>
866 <LI><A HREF=
"#10_76_3">Returns
</A></LI>
867 <LI><A HREF=
"#10_76_4">Description
</A></LI>
868 <LI><A HREF=
"#10_76_5">Example
</A></LI>
869 <LI><A HREF=
"#10_76_6">See Also
</A></LI>
871 <LI><A HREF=
"#httpSeparate">httpSeparate()
</A></LI>
873 <LI><A HREF=
"#10_77_1">Usage
</A></LI>
874 <LI><A HREF=
"#10_77_2">Arguments
</A></LI>
875 <LI><A HREF=
"#10_77_3">Description
</A></LI>
876 <LI><A HREF=
"#10_77_4">Example
</A></LI>
877 <LI><A HREF=
"#10_77_5">See Also
</A></LI>
879 <LI><A HREF=
"#httpSetField">httpSetField()
</A></LI>
881 <LI><A HREF=
"#10_78_1">Usage
</A></LI>
882 <LI><A HREF=
"#10_78_2">Arguments
</A></LI>
883 <LI><A HREF=
"#10_78_3">Description
</A></LI>
884 <LI><A HREF=
"#10_78_4">Example
</A></LI>
885 <LI><A HREF=
"#10_78_5">See Also
</A></LI>
887 <LI><A HREF=
"#httpStatus">httpStatus()
</A></LI>
889 <LI><A HREF=
"#10_79_1">Usage
</A></LI>
890 <LI><A HREF=
"#10_79_2">Arguments
</A></LI>
891 <LI><A HREF=
"#10_79_3">Returns
</A></LI>
892 <LI><A HREF=
"#10_79_4">Description
</A></LI>
893 <LI><A HREF=
"#10_79_5">Example
</A></LI>
895 <LI><A HREF=
"#httpTrace">httpTrace()
</A></LI>
897 <LI><A HREF=
"#10_80_1">Usage
</A></LI>
898 <LI><A HREF=
"#10_80_2">Arguments
</A></LI>
899 <LI><A HREF=
"#10_80_3">Returns
</A></LI>
900 <LI><A HREF=
"#10_80_4">Description
</A></LI>
901 <LI><A HREF=
"#10_80_5">Example
</A></LI>
902 <LI><A HREF=
"#10_80_6">See Also
</A></LI>
904 <LI><A HREF=
"#httpUpdate">httpUpdate()
</A></LI>
906 <LI><A HREF=
"#10_81_1">Usage
</A></LI>
907 <LI><A HREF=
"#10_81_2">Arguments
</A></LI>
908 <LI><A HREF=
"#10_81_3">Returns
</A></LI>
909 <LI><A HREF=
"#10_81_4">Description
</A></LI>
910 <LI><A HREF=
"#10_81_5">Example
</A></LI>
911 <LI><A HREF=
"#10_81_6">See Also
</A></LI>
913 <LI><A HREF=
"#httpWrite">httpWrite()
</A></LI>
915 <LI><A HREF=
"#10_82_1">Usage
</A></LI>
916 <LI><A HREF=
"#10_82_2">Arguments
</A></LI>
917 <LI><A HREF=
"#10_82_3">Returns
</A></LI>
918 <LI><A HREF=
"#10_82_4">Description
</A></LI>
919 <LI><A HREF=
"#10_82_5">Example
</A></LI>
920 <LI><A HREF=
"#10_82_6">See Also
</A></LI>
922 <LI><A HREF=
"#ippAddBoolean">ippAddBoolean()
</A></LI>
924 <LI><A HREF=
"#10_83_1">Usage
</A></LI>
925 <LI><A HREF=
"#10_83_2">Arguments
</A></LI>
926 <LI><A HREF=
"#10_83_3">Returns
</A></LI>
927 <LI><A HREF=
"#10_83_4">Description
</A></LI>
928 <LI><A HREF=
"#10_83_5">Example
</A></LI>
929 <LI><A HREF=
"#10_83_6">See Also
</A></LI>
931 <LI><A HREF=
"#ippAddBooleans">ippAddBooleans()
</A></LI>
933 <LI><A HREF=
"#10_84_1">Usage
</A></LI>
934 <LI><A HREF=
"#10_84_2">Arguments
</A></LI>
935 <LI><A HREF=
"#10_84_3">Returns
</A></LI>
936 <LI><A HREF=
"#10_84_4">Description
</A></LI>
937 <LI><A HREF=
"#10_84_5">Example
</A></LI>
938 <LI><A HREF=
"#10_84_6">See Also
</A></LI>
940 <LI><A HREF=
"#ippAddDate">ippAddDate()
</A></LI>
942 <LI><A HREF=
"#10_85_1">Usage
</A></LI>
943 <LI><A HREF=
"#10_85_2">Arguments
</A></LI>
944 <LI><A HREF=
"#10_85_3">Returns
</A></LI>
945 <LI><A HREF=
"#10_85_4">Description
</A></LI>
946 <LI><A HREF=
"#10_85_5">Example
</A></LI>
947 <LI><A HREF=
"#10_85_6">See Also
</A></LI>
949 <LI><A HREF=
"#ippAddInteger">ippAddInteger()
</A></LI>
951 <LI><A HREF=
"#10_86_1">Usage
</A></LI>
952 <LI><A HREF=
"#10_86_2">Arguments
</A></LI>
953 <LI><A HREF=
"#10_86_3">Returns
</A></LI>
954 <LI><A HREF=
"#10_86_4">Description
</A></LI>
955 <LI><A HREF=
"#10_86_5">Example
</A></LI>
956 <LI><A HREF=
"#10_86_6">See Also
</A></LI>
958 <LI><A HREF=
"#ippAddIntegers">ippAddIntegers()
</A></LI>
960 <LI><A HREF=
"#10_87_1">Usage
</A></LI>
961 <LI><A HREF=
"#10_87_2">Arguments
</A></LI>
962 <LI><A HREF=
"#10_87_3">Returns
</A></LI>
963 <LI><A HREF=
"#10_87_4">Description
</A></LI>
964 <LI><A HREF=
"#10_87_5">Example
</A></LI>
965 <LI><A HREF=
"#10_87_6">See Also
</A></LI>
967 <LI><A HREF=
"#ippAddRange">ippAddRange()
</A></LI>
969 <LI><A HREF=
"#10_88_1">Usage
</A></LI>
970 <LI><A HREF=
"#10_88_2">Arguments
</A></LI>
971 <LI><A HREF=
"#10_88_3">Returns
</A></LI>
972 <LI><A HREF=
"#10_88_4">Description
</A></LI>
973 <LI><A HREF=
"#10_88_5">Example
</A></LI>
974 <LI><A HREF=
"#10_88_6">See Also
</A></LI>
976 <LI><A HREF=
"#ippAddRanges">ippAddRanges()
</A></LI>
978 <LI><A HREF=
"#10_89_1">Usage
</A></LI>
979 <LI><A HREF=
"#10_89_2">Arguments
</A></LI>
980 <LI><A HREF=
"#10_89_3">Returns
</A></LI>
981 <LI><A HREF=
"#10_89_4">Description
</A></LI>
982 <LI><A HREF=
"#10_89_5">Example
</A></LI>
983 <LI><A HREF=
"#10_89_6">See Also
</A></LI>
985 <LI><A HREF=
"#ippAddResolution">ippAddResolution()
</A></LI>
987 <LI><A HREF=
"#10_90_1">Usage
</A></LI>
988 <LI><A HREF=
"#10_90_2">Arguments
</A></LI>
989 <LI><A HREF=
"#10_90_3">Returns
</A></LI>
990 <LI><A HREF=
"#10_90_4">Description
</A></LI>
991 <LI><A HREF=
"#10_90_5">Example
</A></LI>
992 <LI><A HREF=
"#10_90_6">See Also
</A></LI>
994 <LI><A HREF=
"#ippAddResolutions">ippAddResolutions()
</A></LI>
996 <LI><A HREF=
"#10_91_1">Usage
</A></LI>
997 <LI><A HREF=
"#10_91_2">Arguments
</A></LI>
998 <LI><A HREF=
"#10_91_3">Returns
</A></LI>
999 <LI><A HREF=
"#10_91_4">Description
</A></LI>
1000 <LI><A HREF=
"#10_91_5">Example
</A></LI>
1001 <LI><A HREF=
"#10_91_6">See Also
</A></LI>
1003 <LI><A HREF=
"#ippAddSeparator">ippAddSeparator()
</A></LI>
1005 <LI><A HREF=
"#10_92_1">Usage
</A></LI>
1006 <LI><A HREF=
"#10_92_2">Arguments
</A></LI>
1007 <LI><A HREF=
"#10_92_3">Returns
</A></LI>
1008 <LI><A HREF=
"#10_92_4">Description
</A></LI>
1009 <LI><A HREF=
"#10_92_5">Example
</A></LI>
1010 <LI><A HREF=
"#10_92_6">See Also
</A></LI>
1012 <LI><A HREF=
"#ippAddString">ippAddString()
</A></LI>
1014 <LI><A HREF=
"#10_93_1">Usage
</A></LI>
1015 <LI><A HREF=
"#10_93_2">Arguments
</A></LI>
1016 <LI><A HREF=
"#10_93_3">Returns
</A></LI>
1017 <LI><A HREF=
"#10_93_4">Description
</A></LI>
1018 <LI><A HREF=
"#10_93_5">Example
</A></LI>
1019 <LI><A HREF=
"#10_93_6">See Also
</A></LI>
1021 <LI><A HREF=
"#ippAddStrings">ippAddStrings()
</A></LI>
1023 <LI><A HREF=
"#10_94_1">Usage
</A></LI>
1024 <LI><A HREF=
"#10_94_2">Arguments
</A></LI>
1025 <LI><A HREF=
"#10_94_3">Returns
</A></LI>
1026 <LI><A HREF=
"#10_94_4">Description
</A></LI>
1027 <LI><A HREF=
"#10_94_5">Example
</A></LI>
1028 <LI><A HREF=
"#10_94_6">See Also
</A></LI>
1030 <LI><A HREF=
"#ippDateToTime">ippDateToTime()
</A></LI>
1032 <LI><A HREF=
"#10_95_1">Usage
</A></LI>
1033 <LI><A HREF=
"#10_95_2">Arguments
</A></LI>
1034 <LI><A HREF=
"#10_95_3">Returns
</A></LI>
1035 <LI><A HREF=
"#10_95_4">Description
</A></LI>
1036 <LI><A HREF=
"#10_95_5">Example
</A></LI>
1037 <LI><A HREF=
"#10_95_6">See Also
</A></LI>
1039 <LI><A HREF=
"#ippDelete">ippDelete()
</A></LI>
1041 <LI><A HREF=
"#10_96_1">Usage
</A></LI>
1042 <LI><A HREF=
"#10_96_2">Arguments
</A></LI>
1043 <LI><A HREF=
"#10_96_3">Description
</A></LI>
1044 <LI><A HREF=
"#10_96_4">Example
</A></LI>
1045 <LI><A HREF=
"#10_96_5">See Also
</A></LI>
1047 <LI><A HREF=
"#ippErrorString">ippErrorString()
</A></LI>
1049 <LI><A HREF=
"#10_97_1">Usage
</A></LI>
1050 <LI><A HREF=
"#10_97_2">Arguments
</A></LI>
1051 <LI><A HREF=
"#10_97_3">Returns
</A></LI>
1052 <LI><A HREF=
"#10_97_4">Description
</A></LI>
1053 <LI><A HREF=
"#10_97_5">Example
</A></LI>
1054 <LI><A HREF=
"#10_97_6">See Also
</A></LI>
1056 <LI><A HREF=
"#ippFindAttribute">ippFindAttribute()
</A></LI>
1058 <LI><A HREF=
"#10_98_1">Usage
</A></LI>
1059 <LI><A HREF=
"#10_98_2">Arguments
</A></LI>
1060 <LI><A HREF=
"#10_98_3">Returns
</A></LI>
1061 <LI><A HREF=
"#10_98_4">Description
</A></LI>
1062 <LI><A HREF=
"#10_98_5">Example
</A></LI>
1063 <LI><A HREF=
"#10_98_6">See Also
</A></LI>
1065 <LI><A HREF=
"#ippFindNextAttribute">ippFindNextAttribute()
</A></LI>
1067 <LI><A HREF=
"#10_99_1">Usage
</A></LI>
1068 <LI><A HREF=
"#10_99_2">Arguments
</A></LI>
1069 <LI><A HREF=
"#10_99_3">Returns
</A></LI>
1070 <LI><A HREF=
"#10_99_4">Description
</A></LI>
1071 <LI><A HREF=
"#10_99_5">Example
</A></LI>
1072 <LI><A HREF=
"#10_99_6">See Also
</A></LI>
1074 <LI><A HREF=
"#ippLength">ippLength()
</A></LI>
1076 <LI><A HREF=
"#10_100_1">Usage
</A></LI>
1077 <LI><A HREF=
"#10_100_2">Arguments
</A></LI>
1078 <LI><A HREF=
"#10_100_3">Returns
</A></LI>
1079 <LI><A HREF=
"#10_100_4">Description
</A></LI>
1080 <LI><A HREF=
"#10_100_5">Example
</A></LI>
1081 <LI><A HREF=
"#10_100_6">See Also
</A></LI>
1083 <LI><A HREF=
"#ippNew">ippNew()
</A></LI>
1085 <LI><A HREF=
"#10_101_1">Usage
</A></LI>
1086 <LI><A HREF=
"#10_101_2">Returns
</A></LI>
1087 <LI><A HREF=
"#10_101_3">Description
</A></LI>
1088 <LI><A HREF=
"#10_101_4">Example
</A></LI>
1089 <LI><A HREF=
"#10_101_5">See Also
</A></LI>
1091 <LI><A HREF=
"#ippPort">ippPort()
</A></LI>
1093 <LI><A HREF=
"#10_102_1">Usage
</A></LI>
1094 <LI><A HREF=
"#10_102_2">Returns
</A></LI>
1095 <LI><A HREF=
"#10_102_3">Description
</A></LI>
1096 <LI><A HREF=
"#10_102_4">Example
</A></LI>
1097 <LI><A HREF=
"#10_102_5">See Also
</A></LI>
1099 <LI><A HREF=
"#ippRead">ippRead()
</A></LI>
1101 <LI><A HREF=
"#10_103_1">Usage
</A></LI>
1102 <LI><A HREF=
"#10_103_2">Arguments
</A></LI>
1103 <LI><A HREF=
"#10_103_3">Returns
</A></LI>
1104 <LI><A HREF=
"#10_103_4">Description
</A></LI>
1105 <LI><A HREF=
"#10_103_5">Example
</A></LI>
1106 <LI><A HREF=
"#10_103_6">See Also
</A></LI>
1108 <LI><A HREF=
"#ippSetPort">ippSetPort()
</A></LI>
1110 <LI><A HREF=
"#10_104_1">Usage
</A></LI>
1111 <LI><A HREF=
"#10_104_2">Arguments
</A></LI>
1112 <LI><A HREF=
"#10_104_3">Description
</A></LI>
1113 <LI><A HREF=
"#10_104_4">Example
</A></LI>
1114 <LI><A HREF=
"#10_104_5">See Also
</A></LI>
1116 <LI><A HREF=
"#ippTimeToDate">ippTimeToDate()
</A></LI>
1118 <LI><A HREF=
"#10_105_1">Usage
</A></LI>
1119 <LI><A HREF=
"#10_105_2">Arguments
</A></LI>
1120 <LI><A HREF=
"#10_105_3">Returns
</A></LI>
1121 <LI><A HREF=
"#10_105_4">Description
</A></LI>
1122 <LI><A HREF=
"#10_105_5">Example
</A></LI>
1123 <LI><A HREF=
"#10_105_6">See Also
</A></LI>
1125 <LI><A HREF=
"#ippWrite">ippWrite()
</A></LI>
1127 <LI><A HREF=
"#10_106_1">Usage
</A></LI>
1128 <LI><A HREF=
"#10_106_2">Arguments
</A></LI>
1129 <LI><A HREF=
"#10_106_3">Returns
</A></LI>
1130 <LI><A HREF=
"#10_106_4">Description
</A></LI>
1131 <LI><A HREF=
"#10_106_5">Example
</A></LI>
1132 <LI><A HREF=
"#10_106_6">See Also
</A></LI>
1134 <LI><A HREF=
"#ppdClose">ppdClose()
</A></LI>
1136 <LI><A HREF=
"#10_107_1">Usage
</A></LI>
1137 <LI><A HREF=
"#10_107_2">Arguments
</A></LI>
1138 <LI><A HREF=
"#10_107_3">Description
</A></LI>
1139 <LI><A HREF=
"#10_107_4">Example
</A></LI>
1140 <LI><A HREF=
"#10_107_5">See Also
</A></LI>
1142 <LI><A HREF=
"#ppdCollect">ppdCollect()
</A></LI>
1144 <LI><A HREF=
"#10_108_1">Usage
</A></LI>
1145 <LI><A HREF=
"#10_108_2">Arguments
</A></LI>
1146 <LI><A HREF=
"#10_108_3">Returns
</A></LI>
1147 <LI><A HREF=
"#10_108_4">Description
</A></LI>
1148 <LI><A HREF=
"#10_108_5">Example
</A></LI>
1149 <LI><A HREF=
"#10_108_6">See Also
</A></LI>
1151 <LI><A HREF=
"#ppdConflicts">ppdConflicts()
</A></LI>
1153 <LI><A HREF=
"#10_109_1">Usage
</A></LI>
1154 <LI><A HREF=
"#10_109_2">Arguments
</A></LI>
1155 <LI><A HREF=
"#10_109_3">Returns
</A></LI>
1156 <LI><A HREF=
"#10_109_4">Description
</A></LI>
1157 <LI><A HREF=
"#10_109_5">Example
</A></LI>
1158 <LI><A HREF=
"#10_109_6">See Also
</A></LI>
1160 <LI><A HREF=
"#ppdEmit">ppdEmit()
</A></LI>
1162 <LI><A HREF=
"#10_110_1">Usage
</A></LI>
1163 <LI><A HREF=
"#10_110_2">Arguments
</A></LI>
1164 <LI><A HREF=
"#10_110_3">Returns
</A></LI>
1165 <LI><A HREF=
"#10_110_4">Description
</A></LI>
1166 <LI><A HREF=
"#10_110_5">Example
</A></LI>
1167 <LI><A HREF=
"#10_110_6">See Also
</A></LI>
1169 <LI><A HREF=
"#ppdEmitFd">ppdEmitFd()
</A></LI>
1171 <LI><A HREF=
"#10_111_1">Usage
</A></LI>
1172 <LI><A HREF=
"#10_111_2">Arguments
</A></LI>
1173 <LI><A HREF=
"#10_111_3">Returns
</A></LI>
1174 <LI><A HREF=
"#10_111_4">Description
</A></LI>
1175 <LI><A HREF=
"#10_111_5">Example
</A></LI>
1176 <LI><A HREF=
"#10_111_6">See Also
</A></LI>
1178 <LI><A HREF=
"#ppdFindChoice">ppdFindChoice()
</A></LI>
1180 <LI><A HREF=
"#10_112_1">Usage
</A></LI>
1181 <LI><A HREF=
"#10_112_2">Arguments
</A></LI>
1182 <LI><A HREF=
"#10_112_3">Returns
</A></LI>
1183 <LI><A HREF=
"#10_112_4">Description
</A></LI>
1184 <LI><A HREF=
"#10_112_5">Example
</A></LI>
1185 <LI><A HREF=
"#10_112_6">See Also
</A></LI>
1187 <LI><A HREF=
"#ppdFindMarkedChoice">ppdFindMarkedChoice()
</A></LI>
1189 <LI><A HREF=
"#10_113_1">Usage
</A></LI>
1190 <LI><A HREF=
"#10_113_2">Arguments
</A></LI>
1191 <LI><A HREF=
"#10_113_3">Returns
</A></LI>
1192 <LI><A HREF=
"#10_113_4">Description
</A></LI>
1193 <LI><A HREF=
"#10_113_5">Example
</A></LI>
1194 <LI><A HREF=
"#10_113_6">See Also
</A></LI>
1196 <LI><A HREF=
"#ppdFindOption">ppdFindOption()
</A></LI>
1198 <LI><A HREF=
"#10_114_1">Usage
</A></LI>
1199 <LI><A HREF=
"#10_114_2">Arguments
</A></LI>
1200 <LI><A HREF=
"#10_114_3">Returns
</A></LI>
1201 <LI><A HREF=
"#10_114_4">Description
</A></LI>
1202 <LI><A HREF=
"#10_114_5">Example
</A></LI>
1203 <LI><A HREF=
"#10_114_6">See Also
</A></LI>
1205 <LI><A HREF=
"#ppdIsMarked">ppdIsMarked()
</A></LI>
1207 <LI><A HREF=
"#10_115_1">Usage
</A></LI>
1208 <LI><A HREF=
"#10_115_2">Arguments
</A></LI>
1209 <LI><A HREF=
"#10_115_3">Returns
</A></LI>
1210 <LI><A HREF=
"#10_115_4">Description
</A></LI>
1211 <LI><A HREF=
"#10_115_5">Example
</A></LI>
1212 <LI><A HREF=
"#10_115_6">See Also
</A></LI>
1214 <LI><A HREF=
"#ppdMarkDefaults">ppdMarkDefaults()
</A></LI>
1216 <LI><A HREF=
"#10_116_1">Usage
</A></LI>
1217 <LI><A HREF=
"#10_116_2">Arguments
</A></LI>
1218 <LI><A HREF=
"#10_116_3">Description
</A></LI>
1219 <LI><A HREF=
"#10_116_4">Example
</A></LI>
1220 <LI><A HREF=
"#10_116_5">See Also
</A></LI>
1222 <LI><A HREF=
"#ppdMarkOption">ppdMarkOption()
</A></LI>
1224 <LI><A HREF=
"#10_117_1">Usage
</A></LI>
1225 <LI><A HREF=
"#10_117_2">Arguments
</A></LI>
1226 <LI><A HREF=
"#10_117_3">Returns
</A></LI>
1227 <LI><A HREF=
"#10_117_4">Description
</A></LI>
1228 <LI><A HREF=
"#10_117_5">Example
</A></LI>
1229 <LI><A HREF=
"#10_117_6">See Also
</A></LI>
1231 <LI><A HREF=
"#ppdOpen">ppdOpen()
</A></LI>
1233 <LI><A HREF=
"#10_118_1">Usage
</A></LI>
1234 <LI><A HREF=
"#10_118_2">Arguments
</A></LI>
1235 <LI><A HREF=
"#10_118_3">Returns
</A></LI>
1236 <LI><A HREF=
"#10_118_4">Description
</A></LI>
1237 <LI><A HREF=
"#10_118_5">Example
</A></LI>
1238 <LI><A HREF=
"#10_118_6">See Also
</A></LI>
1240 <LI><A HREF=
"#ppdOpenFd">ppdOpenFd()
</A></LI>
1242 <LI><A HREF=
"#10_119_1">Usage
</A></LI>
1243 <LI><A HREF=
"#10_119_2">Arguments
</A></LI>
1244 <LI><A HREF=
"#10_119_3">Returns
</A></LI>
1245 <LI><A HREF=
"#10_119_4">Description
</A></LI>
1246 <LI><A HREF=
"#10_119_5">Example
</A></LI>
1247 <LI><A HREF=
"#10_119_6">See Also
</A></LI>
1249 <LI><A HREF=
"#ppdOpenFile">ppdOpenFile()
</A></LI>
1251 <LI><A HREF=
"#10_120_1">Usage
</A></LI>
1252 <LI><A HREF=
"#10_120_2">Arguments
</A></LI>
1253 <LI><A HREF=
"#10_120_3">Returns
</A></LI>
1254 <LI><A HREF=
"#10_120_4">Description
</A></LI>
1255 <LI><A HREF=
"#10_120_5">Example
</A></LI>
1256 <LI><A HREF=
"#10_120_6">See Also
</A></LI>
1258 <LI><A HREF=
"#ppdPageLength">ppdPageLength()
</A></LI>
1260 <LI><A HREF=
"#10_121_1">Usage
</A></LI>
1261 <LI><A HREF=
"#10_121_2">Arguments
</A></LI>
1262 <LI><A HREF=
"#10_121_3">Returns
</A></LI>
1263 <LI><A HREF=
"#10_121_4">Description
</A></LI>
1264 <LI><A HREF=
"#10_121_5">Example
</A></LI>
1265 <LI><A HREF=
"#10_121_6">See Also
</A></LI>
1267 <LI><A HREF=
"#ppdPageSize">ppdPageSize()
</A></LI>
1269 <LI><A HREF=
"#10_122_1">Usage
</A></LI>
1270 <LI><A HREF=
"#10_122_2">Arguments
</A></LI>
1271 <LI><A HREF=
"#10_122_3">Returns
</A></LI>
1272 <LI><A HREF=
"#10_122_4">Description
</A></LI>
1273 <LI><A HREF=
"#10_122_5">Example
</A></LI>
1274 <LI><A HREF=
"#10_122_6">See Also
</A></LI>
1276 <LI><A HREF=
"#ppdPageWidth">ppdPageWidth()
</A></LI>
1278 <LI><A HREF=
"#10_123_1">Usage
</A></LI>
1279 <LI><A HREF=
"#10_123_2">Arguments
</A></LI>
1280 <LI><A HREF=
"#10_123_3">Returns
</A></LI>
1281 <LI><A HREF=
"#10_123_4">Description
</A></LI>
1282 <LI><A HREF=
"#10_123_5">Example
</A></LI>
1283 <LI><A HREF=
"#10_123_6">See Also
</A></LI>
1287 <H1 ALIGN=
"RIGHT"><A NAME=
"1">Preface
</A></H1>
1288 <P>This software programmers manual provides software programming
1289 information for the Common UNIX Printing System (
"CUPS
") Version
1.2.0.
</P>
1290 <H2><A NAME=
"1_1">System Overview
</A></H2>
1291 <P>CUPS provides a portable printing layer for UNIX
®-based operating
1292 systems. It has been developed by
<A HREF=
"http://www.easysw.com"> Easy
1293 Software Products
</A> to promote a standard printing solution for all
1294 UNIX vendors and users. CUPS provides the System V and Berkeley
1295 command-line interfaces.
</P>
1296 <P>CUPS uses the Internet Printing Protocol (
"IPP
") as the basis for
1297 managing print jobs and queues. The Line Printer Daemon (
"LPD
") Server
1298 Message Block (
"SMB
"), and AppSocket (a.k.a. JetDirect) protocols are
1299 also supported with reduced functionality. CUPS adds network printer
1300 browsing and PostScript Printer Description (
"PPD
") based printing
1301 options to support real-world printing under UNIX.
</P>
1302 <P>CUPS also includes a customized version of GNU Ghostscript (currently
1303 based off GNU Ghostscript
5.50) and an image file RIP that are used to
1304 support non-PostScript printers. Sample drivers for HP and EPSON
1305 printers are included that use these filters.
</P>
1308 <H2><A NAME=
"1_2">Document Overview
</A></H2>
1309 <P>This software programmers manual is organized into the following
1312 <LI><A HREF=
"#OVERVIEW">1 - Printing System Overview
</A></LI>
1313 <LI><A HREF=
"#CUPS_API">2 - The CUPS API
</A></LI>
1314 <LI><A HREF=
"#WRITING_FILTERS">3 - Writing Filters
</A></LI>
1315 <LI><A HREF=
"#WRITING_DRIVERS">4 - Writing Printer Drivers
</A></LI>
1316 <LI><A HREF=
"#WRITING_BACKENDS">5 - Writing Backends
</A></LI>
1317 <LI><A HREF=
"#LICENSE">A - Software License Agreement
</A></LI>
1318 <LI><A HREF=
"#CONSTANTS">B - Constants
</A></LI>
1319 <LI><A HREF=
"#STRUCTURES">C - Structures
</A></LI>
1320 <LI><A HREF=
"#FUNCTIONS">D - Functions
</A></LI>
1322 <H2><A NAME=
"1_3">Notation Conventions
</A></H2>
1323 <P>Various font and syntax conventions are used in this guide. Examples
1324 and their meanings and uses are explained below:
1327 <TR><TH>Example
</TH><TD> </TD><TH>Description
</TH></TR>
1328 <TR><TD> </TD></TR>
1329 <TR VALIGN=
"TOP"><TD><CODE>lpstat
</CODE>
1330 <BR> <CODE>lpstat(
1)
</CODE></TD><TD> </TD><TD>The names of commands;
1331 the first mention of a command or function in a chapter is followed by
1332 a manual page section number.
</TD></TR>
1333 <TR><TD> </TD></TR>
1334 <TR VALIGN=
"TOP"><TD><VAR>/var
</VAR>
1335 <BR><VAR> /usr/share/cups/data/testprint.ps
</VAR></TD><TD> </TD><TD>
1336 File and directory names.
</TD></TR>
1337 <TR><TD> </TD></TR>
1338 <TR VALIGN=
"TOP"><TD NOWRAP
><TT>Request ID is Printer-
123</TT></TD><TD>
1339 </TD><TD>Screen output.
</TD></TR>
1340 <TR><TD> </TD></TR>
1341 <TR VALIGN=
"TOP"><TD NOWRAP
><KBD>lp -d printer filename ENTER
</KBD></TD><TD>
1342 </TD><TD>Literal user input; special keys like
<KBD>ENTER
</KBD> are
1343 in ALL CAPS.
</TD></TR>
1344 <TR><TD> </TD></TR>
1345 <TR VALIGN=
"TOP"><TD>12.3</TD><TD> </TD><TD>Numbers in the text are
1346 written using the period (.) to indicate the decimal point.
</TD></TR>
1352 <H2><A NAME=
"1_4">Abbreviations
</A></H2>
1353 The following abbreviations are used throughout this manual:
1357 <DD>Kilobytes, or
1024 bytes
1360 <DD>Megabytes, or
1048576 bytes
1363 <DD>Gigabytes, or
1073741824 bytes
1367 <H2><A NAME=
"1_5">Other References
</A></H2>
1370 <DT>CUPS Software Administrators Manual
</DT>
1371 <DD>An administration guide for the CUPS software.
1373 <DT>CUPS Software Users Manual
</DT>
1374 <DD>An end-user guide for using the CUPS software.
1378 <H1 ALIGN=
"RIGHT"><A NAME=
"OVERVIEW">1 - Printing System Overview
</A></H1>
1379 <P>This chapter provides an overview of how the Common UNIX Printing
1381 <H2><A NAME=
"2_1">The Printing Problem
</A></H2>
1382 <P>For years
<I> the printing problem
</I> has plagued UNIX. Unlike
1383 Microsoft
® Windows
® or Mac OS, UNIX has no standard interface or system
1384 in place for supporting printers. Among the solutions currently
1385 available, the Berkeley and System V printing systems are the most
1387 <P>These printing systems support line printers (text only) or
1388 PostScript printers (text and graphics), and with some coaxing they can
1389 be made to support a full range of printers and file formats. However,
1390 because each varient of the UNIX operating system uses a different
1391 printing system than the next developing printer drivers for a wide
1392 range of printers and operating systems is extremely difficult. That
1393 combined with the limited volume of customers for each UNIX varient has
1394 forced most printer vendors to give up supporting UNIX entirely.
</P>
1395 <P>CUPS is designed to eliminate
<I> the printing problem
</I>. One common
1396 printing system can be used by all UNIX varients to support the
1397 printing needs of users. Printer vendors can use its modular filter
1398 interface to develop a single driver program that supports a wide range
1399 of file formats with little or no effort. Since CUPS provides both the
1400 System V and Berkeley printing commands, users (and applications) can
1401 reap the benefits of this new technology with no changes.
</P>
1402 <H2><A NAME=
"2_2">The Technology
</A></H2>
1403 <P>CUPS is based upon an emerging Internet standard called the Internet
1404 Printing Protocol. IPP has been embraced by dozens of printer and
1405 printer server manufacturers and is supported by Microsoft Windows
1407 <P>IPP defines a standard protocol for printing as well as managing
1408 print jobs and printer options like media size, resolution, and so
1409 forth. Like all IP-based protocols, IPP can be used locally or over the
1410 Internet to printers hundreds or thousands of miles away. Unlike other
1411 protocols, however, IPP also supports access control, authentication,
1412 and encryption, making it a much more capable and secure printing
1413 solution than older ones.
</P>
1414 <P>IPP is layered on top of the Hyper-Text Transport Protocol (
"HTTP
")
1415 which is the basis of web servers on the Internet. This allows users to
1416 view documentation, check status information on a printer or server,
1417 and manage their printers, classes, and jobs using their web browser.
</P>
1418 <P>CUPS provides a complete IPP/
1.1 based printing system that provides
1419 Basic, Digest, and local certificate authentication and user, domain,
1420 or IP-based access control. TLS encryption will be available in future
1421 versions of CUPS.
</P>
1422 <H2><A NAME=
"2_3">Jobs
</A></H2>
1423 <P>Each file or set of files that is submitted for printing is called a
<I>
1424 job
</I>. Jobs are identified by a unique number starting at
1 and are
1425 assigned to a particular destination, usually a printer. Jobs can also
1426 have options associated with them such as media size, number of copies,
1428 <H2><A NAME=
"2_4">Classes
</A></H2>
1429 <P>CUPS supports collections of printers known as
<I> classes
</I>. Jobs
1430 sent to a class are forwarded to the first available printer in the
1432 <H2><A NAME=
"2_5">Filters
</A></H2>
1433 <P>Filters allow a user or application to print many types of files
1434 without extra effort. Print jobs sent to a CUPS server are filtered
1435 before sending them to a printer. Some filters convert job files to
1436 different formats that the printer can understand. Others perform page
1437 selection and ordering tasks.
</P>
1438 <P>CUPS provides filters for printing many types of image files, HP-GL/
2
1439 files, PDF files, and text files. CUPS also supplies PostScript and
1440 image file Raster Image Processor (
"RIP
") filters that convert
1441 PostScript or image files into bitmaps that can be sent to a raster
1443 <H2><A NAME=
"2_6">Backends
</A></H2>
1444 <P>Backends perform the most important task of all - they send the
1445 filtered print data to the printer.
</P>
1446 <P>CUPS provides backends for printing over parallel, serial, and USB
1447 ports, and over the network via the IPP, JetDirect (AppSocket), and
1448 Line Printer Daemon (
"LPD
") protocols. Additional backends are
1449 available in network service packages such as the SMB backend included
1450 with the popular SAMBA software.
</P>
1451 <P>Backends are also used to determine the available devices. On startup
1452 each backend is asked for a list of devices it supports, and any
1453 information that is available. This allows the parallel backend to tell
1454 CUPS that an EPSON Stylus Color
600 printer is attached to parallel
1455 port
1, for example.
</P>
1456 <H2><A NAME=
"2_7">Printer Drivers
</A></H2>
1457 <P>Printer drivers in CUPS consist of one of more filters specific to a
1458 printer. CUPS includes sample printer drivers for Hewlett-Packard
1459 LaserJet and DeskJet printers and EPSON
9-pin,
24-pin, Stylus Color,
1460 and Stylus Photo printers. While these drivers do not generate optimal
1461 output for the different printer models, they do provide basic printing
1462 and demonstrate how you can write your own printer drivers and
1463 incorporate them into CUPS.
</P>
1464 <H2><A NAME=
"2_8">Networking
</A></H2>
1465 <P>Printers and classes on the local system are automatically shared
1466 with other systems on the network. This allows you to setup one system
1467 to print to a printer and use this system as a printer server or spool
1468 host for all of the others. Users may then select a local printer by
1469 name or a remote printer using
"name@server
".
</P>
1470 <P>CUPS also provides
<I> implicit classes
</I>, which are collections of
1471 printers and/or classes with the same name. This allows you to setup
1472 multiple servers pointing to the same physical network printer, for
1473 example, so that you aren't relying on a single system for printing.
1474 Because this also works with printer classes, you can setup multiple
1475 servers and printers and never worry about a single point of failure
1476 unless all of the printers and servers go down!
</P>
1477 <H1 ALIGN=
"RIGHT"><A NAME=
"CUPS_API">2 - The CUPS API
</A></H1>
1478 <P>This chapter describes the CUPS Application Programmers Interface
1479 (
"API
").
</P>
1480 <H2><A NAME=
"3_1">The CUPS API Library
</A></H2>
1481 <P>The CUPS library provides a whole collection of interfaces needed to
1482 support the internal needs of the CUPS software as well as the needs of
1483 applications, filters, printer drivers, and backends.
</P>
1484 <P>Unlike the rest of CUPS, the CUPS API library is provided under the
1485 GNU Library General Public License. This means that you can use the
1486 CUPS API library in both proprietary and open-source programs.
</P>
1487 <P>Programs that use the CUPS API library typically will include the
<CODE>
1488 <cups/cups.h
></CODE> header file:
</P>
1491 #include
<cups/cups.h
>
1495 jobid = cupsPrintFile(
"myprinter
",
"filename.ps
",
"title
",
1496 num_options, options);
1499 <P>Use the
<CODE>-lcups
</CODE> compiler option when linking to the CUPS
1503 <B>cc -o program program.c -lcups ENTER
</B>
1506 <P>Additional options and libraries may be required depending on the
1507 operating system and the location of the CUPS API library.
</P>
1508 <H3><A NAME=
"3_1_1">Detecting the CUPS API Library in GNU Autoconf
</A></H3>
1509 <P>GNU autoconf is a popular configuration tool used by many programs.
1510 Add the following lines to your
<VAR> configure.in
</VAR> file to check
1511 for the CUPS API library in your configuration script:
</P>
1514 AC_CHECK_LIB(socket,socket,
1515 if test
"$uname
" !=
"IRIX
"; then
1516 LIBS=
"-lsocket $LIBS
"
1518 echo
"Not using -lsocket since you are running IRIX.
"
1520 AC_CHECK_LIB(nsl,gethostbyaddr,
1521 if test
"$uname
" !=
"IRIX
"; then
1522 LIBS=
"-lnsl $LIBS
"
1524 echo
"Not using -lnsl since you are running IRIX.
"
1527 AC_CHECK_LIB(cups,httpConnect)
1530 <H2><A NAME=
"3_2">Printing Services
</A></H2>
1531 <P>The CUPS API library provides some basic printing services for
1532 applications that need to print files.
</P>
1533 <H3><A NAME=
"3_2_1">Include Files
</A></H3>
1534 <P>The include file used by all of these functions is
<CODE>
1535 <cups/cups.h
></CODE>:
</P>
1538 #include
<cups/cups.h
>
1541 <H3><A NAME=
"3_2_2">Printing a File
</A></H3>
1542 <P>The CUPS API provides two functions for printing files. The first is
<CODE>
1543 cupsPrintFile
</CODE> which prints a single named file:
</P>
1546 #include
<cups/cups.h
>
1554 jobid = cupsPrintFile(
"<I>name
</I>",
"<I>filename
</I>",
"<I>title
</I>",
0, NULL);
1557 <P>The
<CODE>name
</CODE> string is the name of the printer or class to
1558 print to. The
<CODE>filename
</CODE> string is the name of the file to
1559 print. The
<CODE>title
</CODE> string is the name of the print job, e.g.
1560 "Acme Word Document
".
</P>
1561 <P>The return value is a unique ID number for the print job or
0 if
1562 there was an error.
</P>
1563 <H3><A NAME=
"3_2_3">Printing Multiple Files
</A></H3>
1564 <P>The second printing function is
<CODE>cupsPrintFiles
</CODE>:
</P>
1567 #include
<cups/cups.h
>
1573 const char *files[
100];
1576 jobid = cupsPrintFiles(
"name
",
<I>num_files
</I>,
<I>files
</I>,
"title
",
0, NULL);
1579 <P>Instead of passing a filename string as with
<CODE>cupsPrintFile()
</CODE>
1580 you pass a file count (
<CODE>num_files
</CODE>) and filename pointer
1581 array (
<CODE>files
</CODE>) for each file that you want to print.
</P>
1582 <P>As with
<CODE>cupsPrintFile()
</CODE> the return value is a unique ID
1583 for the print job.
</P>
1584 <H3><A NAME=
"3_2_4">Cancelling Jobs
</A></H3>
1585 <P>The
<CODE>cupsCancelJob()
</CODE> function cancels a queued print job:
</P>
1588 #include
<cups/cups.h
>
1596 status = cupsCancelJob(
"<I>name
</I>",
<I>jobid
</I>);
1599 <P>The
<CODE>name
</CODE> string specifies the destination and is used to
1600 determine the server to send the request to. The
<CODE>jobid
</CODE>
1601 value is the integer returned from a previous
<CODE>cupsPrintFile()
</CODE>
1602 or
<CODE>cupsPrintFiles()
</CODE> call.
</P>
1603 <P><CODE>cupsCancelJob()
</CODE> returns
<CODE>1</CODE> if the job was
1604 successfully cancelled and
<CODE>0</CODE> if there was an error.
</P>
1605 <H3><A NAME=
"3_2_5">Getting the Available Printers and Classes
</A></H3>
1606 <P>The
<CODE>cupsGetDests()
</CODE> function can be used to get a list of
1607 the available printers, classes, and instances that a user has defined:
</P>
1610 #include
<cups/cups.h
>
1619 num_dests = cupsGetDests(
&dests);
1622 <P>Each destination is stored in a
<CODE>cups_dest_t
</CODE> structure
1623 which defines the printer or class name, the instance name (if any), if
1624 it is the default destination, and the default options the user has
1625 defined for the destination:
</P>
1628 typedef struct /**** Destination ****/
1630 char *name, /* Printer or class name */
1631 *instance; /* Local instance name or NULL */
1632 int is_default; /* Is this printer the default? */
1633 int num_options; /* Number of options */
1634 cups_option_t *options; /* Options */
1638 <P>The destinations are sorted by name and instance for your
1639 convenience. Once you have the list of available destinations, you can
1640 lookup a specific destination using the
<CODE>cupsGetDest()
</CODE>
1644 #include
<cups/cups.h
>
1650 cups_dest_t *mydest;
1654 mydest = cupsGetDest(
"<I>name
</I>",
"<I>instance
</I>", num_dests, dests);
1657 <P>The
<CODE>name
</CODE> string is the printer or class name. You can
1658 pass a value of
<CODE>NULL
</CODE> to get the default destination.
</P>
1659 <P>The
<CODE>instance
</CODE> string is the user-defined instance name.
1660 Pass
<CODE>NULL
</CODE> to select the default instance, e.g.
"name
"
1661 instead of
"name/instance
".
</P>
1662 <H3><A NAME=
"3_2_6">Printing with Options
</A></H3>
1663 <P>All of the previous printing examples have passed
<CODE>0</CODE> and
<CODE>
1664 NULL
</CODE> for the last two arguments to the
<CODE>cupsPrintFile()
</CODE>
1665 and
<CODE>cupsPrintFiles()
</CODE> functions. These last two arguments
1666 are the number of options and a pointer to the option array:
</P>
1669 int cupsPrintFile(const char *name, const char *filename, const char *title,
1670 int num_options, cups_option_t *options);
1671 int cupsPrintFiles(const char *name, int num_files, const char **files,
1672 const char *title, int num_options,
1673 cups_option_t *options);
1676 <P>The
<CODE>cups_option_t
</CODE> structure holds each option and its
1677 value. These are converted as needed and passed to the CUPS server when
1678 printing a file.
</P>
1679 <P>The simplest way of handling options is to use the
<CODE>num_options
</CODE>
1680 and
<CODE>options
</CODE> members of the
<CODE>cups_dest_t
</CODE>
1681 structure described earlier:
</P>
1684 #include
<cups/cups.h
>
1691 cups_dest_t *mydest;
1695 mydest = cupsGetDest(
"<I>name
</I>",
"<I>instance
</I>", num_dests, dests);
1697 jobid = cupsPrintFile(mydest-
>name,
"filename
",
"title
",
1698 mydest-
>num_options, mydest-
>options);
1701 <P>This effectively uses the options a user has previous selected
1702 without a lot of code.
</P>
1703 <H3><A NAME=
"3_2_7">Setting Printer Options
</A></H3>
1704 <P>Options can also be set by your program using the
<CODE>
1705 cupsAddOption()
</CODE> function:
</P>
1708 #include
<cups/cups.h
>
1713 cups_option_t *options;
1722 num_options = cupsAddOption(
"<I>name
</I>",
"<I>value
</I>", num_options,
&options);
1723 num_options = cupsAddOption(
"<I>name
</I>",
"<I>value
</I>", num_options,
&options);
1724 num_options = cupsAddOption(
"<I>name
</I>",
"<I>value
</I>", num_options,
&options);
1725 num_options = cupsAddOption(
"<I>name
</I>",
"<I>value
</I>", num_options,
&options);
1728 <P>The
<CODE>name
</CODE> string is the name of the option, and the
<CODE>
1729 value
</CODE> string is the value for that option.
</P>
1730 <P>Each call to
<CODE>cupsAddOption()
</CODE> returns the new number of
1731 options. Since adding two options with the same name overwrites the
1732 first value with the second, do not assume that calling
<CODE>
1733 cupsAddOptions()
</CODE> 20 times will result in
20 options.
</P>
1734 <P>Call
<CODE>cupsFreeOptions
</CODE> once you are done using the
1738 #include
<cups/cups.h
>
1743 cups_option_t *options;
1747 cupsFreeOptions(num_options, options);
1750 <H3><A NAME=
"3_2_8">Getting Errors
</A></H3>
1751 <P>If any of the CUPS API printing functions returns an error, the
1752 reason for that error can be found by calling
<CODE>cupsLastError()
</CODE>
1753 and
<CODE>cupsErrorString()
</CODE>.
<CODE>cupsLastError()
</CODE>
1754 returns the last IPP error code that was encountered.
<CODE>
1755 cupsErrorString()
</CODE> converts the error code to a localized message
1756 string suitable for presentation to the user:
</P>
1759 #include
<cups/cups.h
>
1768 puts(cupsErrorString(cupsLastError()));
1771 <H3><A NAME=
"3_2_9">Passwords and Authentication
</A></H3>
1772 <P>CUPS supports authentication of any request, including submission of
1773 print jobs. The default mechanism for getting the username and password
1774 is to use the login user and a password from the console.
</P>
1775 <P>To support other types of applications, in particular Graphical User
1776 Interfaces (
"GUIs
"), the CUPS API provides functions to set the default
1777 username and to register a callback function that returns a password
1779 <P>The
<A HREF=
"#cupsSetPasswordCB"> <CODE>cupsSetPasswordCB()
</CODE></A>
1780 function is used to set a password callback in your program. Only one
1781 function can be used at any time.
</P>
1782 <P>The
<A HREF=
"#cupsSetUser"> <CODE>cupsSetUser()
</CODE></A> function
1783 sets the current username for authentication. This function can be
1784 called by your password callback function to change the current
1785 username as needed.
</P>
1786 <P>The following example shows a simple password callback that gets a
1787 username and password from the user:
</P>
1790 #include
<cups/cups.h
>
1793 my_password_cb(const char *prompt)
1800 /* Get a username from the user */
1801 printf(
"Username:
");
1802 if (fgets(user, sizeof(user), stdin) == NULL)
1805 /* Strip the newline from the string and set the user */
1806 user[strlen(user) -
1] = '\
0';
1810 /* Use getpass() to ask for the password... */
1811 return (getpass(
"Password:
"));
1816 cupsSetPasswordCB(my_password_cb);
1819 <P>Similarly, a GUI interface could display the prompt string in a
1820 window with input fields for the username and password. The username
1821 should probably default to the value of
<A HREF=
"#cupsUser"> <CODE>
1822 cupsUser()
</CODE></A> to make things easier on the user.
</P>
1823 <H2><A NAME=
"3_3">PPD Services
</A></H2>
1824 <P>CUPS includes functions to access and manipulate PostScript Printer
1825 Description (
"PPD
") files that are used with the printer drivers in
1827 <P>Each PPD file enumerates the available features provided by a
1828 printer, including conflict information for specific options (e.g.
1829 can't duplex output on envelopes.)
</P>
1830 <H3><A NAME=
"3_3_1">Include Files
</A></H3>
1831 <P>Include the
<CODE><cups/ppd.h
></CODE> header file to use the PPD
1835 #include
<cups/ppd.h
>
1838 <P>This header file is also included by the
<CODE><cups/cups.h
></CODE>
1840 <H3><A NAME=
"3_3_2">Getting a PPD File for a Printer
</A></H3>
1841 <P>The
<CODE>cupsGetPPD()
</CODE> function retrieves the PPD file for the
1842 named printer or class:
</P>
1845 #include
<cups/cups.h
>
1849 const char *filename;
1851 filename = cupsGetPPD(
"<I>name
</I>");
1854 <P>The
<CODE>name
</CODE> string is the name of the printer or class,
1855 including the remote server name as appropriate (e.g.
1856 "printer@server
".)
</P>
1857 <P>The return value is a pointer to a filename in static storage; this
1858 value is overwritten with each call to
<CODE>cupsGetPPD()
</CODE>. If
1859 the printer or class does not exist, a
<CODE>NULL
</CODE> pointer will
1861 <H3><A NAME=
"3_3_3">Loading a PPD File
</A></H3>
1862 <P>The
<CODE>ppdOpenFile()
</CODE> function
"opens
" a PPD file and loads
1866 #include
<cups/ppd.h
>
1872 ppd = ppdOpenFile(
"<I>filename
</I>");
1875 <P>The
<CODE>filename
</CODE> string is the name of the file to load,
1876 such as the value returned by the
<CODE>cupsGetPPD()
</CODE> function.
</P>
1877 <P>The return value is a pointer to a structure describing the contents
1878 of the PPD file or NULL if the PPD file could not be read.
</P>
1879 <H3><A NAME=
"3_3_4">Freeing PPD File Information
</A></H3>
1880 <P>Once you are done using a PPD file, call the
<CODE>ppdClose()
</CODE>
1881 function to free all memory that has been used:
</P>
1884 #include
<cups/ppd.h
>
1895 <H3><A NAME=
"3_3_5">The PPD File Structure
</A></H3>
1896 <P>Each PPD file contains a number of capability attributes, printer
1897 options, and conflict definitions. The page size options also include
1898 the physical margins for the printer and the minimum and maximum sizes
1899 for the printer. All of this information is stored in the
<CODE>
1900 ppd_file_t
</CODE> structure.
</P>
1901 <H4>Capabilities
</H4>
1902 <P>Each PPD file contains a number of informational attributes that
1903 describe the capabilities of the printer. These are provided in the
<CODE>
1904 ppd_file_t
</CODE> structure in the following members:
1906 <TABLE BORDER=
"1" WIDTH=
"80%">
1907 <TR><TH>Member
</TH><TH>Type
</TH><TH>Description
</TH></TR>
1908 <TR><TD><CODE>accurate_screens
</CODE></TD><TD><CODE>int
</CODE></TD><TD>1
1909 = supports accurate screens
</TD></TR>
1910 <TR><TD><CODE>color_device
</CODE></TD><TD><CODE>int
</CODE></TD><TD>1 =
1911 color device
</TD></TR>
1912 <TR><TD><CODE>colorspace
</CODE></TD><TD><CODE>ppd_cs_t
</CODE></TD><TD>
1913 Default colorspace: PPD_CS_CMYK, PPD_CS_CMY, PPD_CS_GRAY, PPD_CS_RGB,
1914 PPD_CS_RGBK, PPD_CS_N
</TD></TR>
1915 <TR><TD><CODE>contone_only
</CODE></TD><TD><CODE>int
</CODE></TD><TD>1 =
1916 printer is continuous tone only
</TD></TR>
1917 <TR><TD><CODE>num_emulations
1918 <BR> emulations
</CODE></TD><TD><CODE>int
1919 <BR> ppd_emul_t *
</CODE></TD><TD>Emulations supported by the printer
</TD>
1921 <TR><TD><CODE>flip_duplex
</CODE></TD><TD><CODE>int
</CODE></TD><TD>1 =
1922 need to flip odd pages when duplexing
</TD></TR>
1923 <TR><TD><CODE>num_fonts
1924 <BR> fonts
</CODE></TD><TD><CODE>int
1925 <BR> char **
</CODE></TD><TD>The fonts available on the printer.
</TD></TR>
1926 <TR><TD><CODE>jcl_begin
1928 <BR> jcl_end
</CODE></TD><TD><CODE>char *
</CODE></TD><TD>Job Control
1929 Language commands for PostScript output
</TD></TR>
1930 <TR><TD><CODE>landscape
</CODE></TD><TD><CODE>int
</CODE></TD><TD>
1931 Landscape orientation, -
90 or
90 degrees
</TD></TR>
1932 <TR><TD><CODE>lang_encoding
</CODE></TD><TD><CODE>char *
</CODE></TD><TD>
1933 The character used for the option strings
</TD></TR>
1934 <TR><TD><CODE>lang_version
</CODE></TD><TD><CODE>char *
</CODE></TD><TD>
1935 The language used for the options strings (English, French, etc.)
</TD></TR>
1936 <TR><TD><CODE>language_level
</CODE></TD><TD><CODE>int
</CODE></TD><TD>
1937 PostScript language level,
1 to
3</TD></TR>
1938 <TR><TD><CODE>manual_copies
</CODE></TD><TD><CODE>int
</CODE></TD><TD>1 =
1939 Copies are done manually
</TD></TR>
1940 <TR><TD><CODE>model_number
</CODE></TD><TD><CODE>int
</CODE></TD><TD>
1941 Driver-specific model number.
</TD></TR>
1942 <TR><TD><CODE>patches
</CODE></TD><TD><CODE>char *
</CODE></TD><TD>Patch
1943 commands to send to the printer
</TD></TR>
1944 <TR><TD><CODE>manufacturer
</CODE></TD><TD><CODE>char *
</CODE></TD><TD>
1945 The Manufacturer attribute from the PPD file, if any
</TD></TR>
1946 <TR><TD><CODE>modelname
</CODE></TD><TD><CODE>char *
</CODE></TD><TD>The
1947 ModelName attribute from the PPD file
</TD></TR>
1948 <TR><TD><CODE>nickname
</CODE></TD><TD><CODE>char *
</CODE></TD><TD>The
1949 NickName attribute from the PPD file, if any
</TD></TR>
1950 <TR><TD><CODE>product
</CODE></TD><TD><CODE>char *
</CODE></TD><TD>The
1951 Product attribute from the PPD file, if any
</TD></TR>
1952 <TR><TD><CODE>shortnickname
</CODE></TD><TD><CODE>char *
</CODE></TD><TD>
1953 The ShortNickName attribute from the PPD file, if any
</TD></TR>
1954 <TR><TD><CODE>throughput
</CODE></TD><TD><CODE>int
</CODE></TD><TD>Number
1955 of pages per minute
</TD></TR>
1956 <TR><TD><CODE>ttrasterizer
</CODE></TD><TD><CODE>char *
</CODE></TD><TD>
1957 The TruType font rasterizer (Type42)
</TD></TR>
1958 <TR><TD><CODE>variable_sizes
</CODE></TD><TD><CODE>int
</CODE></TD><TD>1 =
1959 supports variable sizes
</TD></TR>
1963 <H4>Options and Groups
</H4>
1964 <P>PPD files support multiple options, which are stored in
<CODE>
1965 ppd_option_t
</CODE> and
<CODE>ppd_choice_t
</CODE> structures by the PPD
1967 <P>Each option in turn is associated with a group stored in the
<CODE>
1968 ppd_group_t
</CODE> structure. Groups can be specified in the PPD file;
1969 if an option is not associated with a group then it is put in a
1970 "General
" or
"Extra
" group depending on the option.
</P>
1971 <P>Groups can also have sub-groups; CUPS currently limits the depth of
1972 sub-groups to
1 level to reduce programming complexity.
</P>
1974 <P>PPD files support specification of conflict conditions between
1975 different options. Conflicts are stored in
<CODE>ppd_conflict_t
</CODE>
1976 structures which specify the options that conflict with each other.
</P>
1978 <P>PPD files specify all of the available pages sizes and the physical
1979 margins associated with them. These sizes are stored in
<CODE>
1980 ppd_size_t
</CODE> structures and are available in the
<CODE>num_sizes
</CODE>
1981 and
<CODE>sizes
</CODE> members of the
<CODE>ppd_file_t
</CODE>
1982 structure. You can lookup a particular page size with the
<CODE>
1983 ppdPageWidth()
</CODE>,
<CODE>ppdPageLength()
</CODE>, and
<CODE>
1984 ppdPageSize()
</CODE> functions:
</P>
1987 #include
<cups/ppd.h
>
1998 size = ppdPageSize(ppd,
"<I>size
</I>");
1999 width = ppdPageWidth(ppd,
"<I>size
</I>");
2000 length = ppdPageLength(ppd,
"<I>size
</I>");
2003 <P>The
<CODE>size
</CODE> string is the named page size option. The width
2004 and length are in points; there are
72 points per inch. The
<CODE>
2005 ppd_size_t
</CODE> structure contains the width, length, and margin
2009 typedef struct /**** Page Sizes ****/
2011 int marked; /* Page size selected? */
2012 char name[
41]; /* Media size option */
2013 float width, /* Width of media in points */
2014 length, /* Length of media in points */
2015 left, /* Left printable margin in points */
2016 bottom, /* Bottom printable margin in points */
2017 right, /* Right printable margin in points */
2018 top; /* Top printable margin in points */
2022 <H4>Custom Page Sizes
</H4>
2023 <P>Besides the standard page sizes listed in a PPD file, some printers
2024 support variable or custom page sizes. If
<CODE>variables_sizes
</CODE>
2025 is non-zero, the
<CODE>custom_min
</CODE>,
<CODE>custom_max
</CODE>, and
<CODE>
2026 custom_margins
</CODE> members of the
<CODE>ppd_file_t
</CODE> structure
2027 define the limits of the variable sizes.
</P>
2028 <P>To get the resulting media size, use a page size string of
<CODE>
2029 Custom.
<I>width
</I>x
<I>length
</I></CODE>, where
<CODE>width
</CODE> and
<CODE>
2030 length
</CODE> are integer values in points:
</P>
2033 Custom
.612x792 [
8.5 inches wide,
11 inches long]
2034 Custom
.1224x792 [
17 inches wide,
11 inches long]
2037 <H3><A NAME=
"3_3_6">Marking Options
</A></H3>
2038 <P>Before marking any user-defined options, call the
<CODE>
2039 ppdMarkDefaults()
</CODE> function to mark the default options from the
2043 #include
<cups/ppd.h
>
2051 ppdMarkDefaults(ppd);
2054 <P>Then call the
<CODE>ppdMarkOption()
</CODE> function to mark
2055 individual options:
</P>
2058 #include
<cups/ppd.h
>
2067 conflicts = ppdMarkOption(ppd,
"<I>name
</I>",
"<I>value
</I>");
2070 <P>The
<CODE>name
</CODE> and
<CODE>value
</CODE> strings choose a
2071 particular option and choice, respectively. The return value is
0 if
2072 there are not conflicts created by the selection.
</P>
2073 <P>CUPS also provides a convenience function for marking all options in
2074 the
<CODE>cups_option_t
</CODE> structure:
</P>
2077 #include
<cups/cups.h
>
2083 cups_option_t *options;
2088 conflicts = cupsMarkOptions(ppd, num_options, options);
2091 <P>The
<CODE>cupsMarkOptions()
</CODE> function also handles mapping the
2092 IPP job template attributes to PPD options. The return value is the
2093 number of conflicts present.
</P>
2094 <H3><A NAME=
"3_3_7">Checking for Conflicts
</A></H3>
2095 <P>The
<CODE>ppdMarkOption()
</CODE> and
<CODE>cupsMarkOptions()
</CODE>
2096 functions return the number of conflicts with the currently marked
2098 <P>Call the
<CODE>ppdConflicts()
</CODE> function to get the number of
2099 conflicts after you have marked all of the options:
</P>
2102 #include
<cups/cups.h
>
2111 conflicts = ppdConflicts(ppd);
2114 <P>The return value is the number of conflicting options, or
0 if there
2115 are no conflicts.
</P>
2116 <H1 ALIGN=
"RIGHT"><A NAME=
"WRITING_FILTERS">3 - Writing Filters
</A></H1>
2117 <P>This chapter describes how to write a file filter for CUPS.
</P>
2118 <H2><A NAME=
"4_1">Overview
</A></H2>
2119 <P>File filters are programs that convert from one or more MIME types to
2120 another type. Filters use a common command-line and environment
2121 interface that allows them to be joined as needed to print files to any
2122 type of printer.
</P>
2123 <H3><A NAME=
"4_1_1">Security Considerations
</A></H3>
2124 <P>Filters are normally run as a non-priviledged user, so the major
2125 security consideration is resource utilization - filters should not
2126 depend on unlimited amounts of memory and disk space.
</P>
2127 <H3><A NAME=
"4_1_2">Users and Groups
</A></H3>
2128 <P>The default CUPS configuration runs filters as user
"lp
" and group
2129 "other
".
</P>
2130 <H3><A NAME=
"4_1_3">Temporary Files
</A></H3>
2131 <P>Temporary files should be created in the directory specified by the
2132 "TMPDIR
" environment variable. The
<A HREF=
"#cupsTempFile"> <CODE>
2133 cupsTempFile()
</CODE></A> function can be used to safely choose
2134 temporary files in this directory.
</P>
2135 <H3><A NAME=
"4_1_4">Sending Messages to the User
</A></H3>
2136 <P>The CUPS scheduler collects messages sent to the standard error file
2137 by the filter. These messages are relayed to the user based upon the
2138 scheduler
<CODE>LogLevel
</CODE> directive.
</P>
2139 <P>The type of message is determined by an initial prefix sent on each
2142 <LI><CODE>DEBUG:
</CODE> - a debug message
</LI>
2143 <LI><CODE>INFO:
</CODE> - an informational message
</LI>
2144 <LI><CODE>WARNING:
</CODE> - a warning message
</LI>
2145 <LI><CODE>ERROR:
</CODE> - an error message
</LI>
2146 <LI><CODE>PAGE:
</CODE> - a page accounting message
</LI>
2148 <P>If the line of text does not begin with any of the above prefixes, it
2149 is treated as a debug message. Text following the prefix is copied to
2150 the
<CODE>printer-state-message
</CODE> attribute for the printer, and
2151 also added to the
<VAR> error_log
</VAR> unless it is an informational or
2152 page accounting message.
</P>
2153 <H3><A NAME=
"4_1_5">Page Accounting
</A></H3>
2154 <P>Page accounting messages are used to inform the server when one or
2155 more pages are printed. Each line has the form:
</P>
2158 PAGE: page-number copy-count
2161 <P>The
<I> page-number
</I> field is the current page number, starting at
2162 1. The
<I> copy-count
</I> field specifies the number of copies of that
2163 page that was produced.
</P>
2164 <P>Page account messages are added to the
<VAR> page_log
</VAR> file and
2165 cause the
<CODE>job-sheets-completed
</CODE> attribute to be updated for
2167 <H3><A NAME=
"4_1_6">Command-Line Arguments
</A></H3>
2168 <P>Every filter accepts exactly
6 or
7 command-line arguments:
</P>
2171 printer job user title copies options [filename]
2173 <LI><CODE>printer
</CODE> - The name of the printer queue (normally this
2174 is the name of the program being run)
</LI>
2175 <LI><CODE>job
</CODE> - The numeric job ID for the job being printed
</LI>
2176 <LI><CODE>user
</CODE> - The string from the
<CODE>originating-user-name
</CODE>
2178 <LI><CODE>title
</CODE> - The string from the
<CODE>job-name
</CODE>
2180 <LI><CODE>copies
</CODE> - The numeric value from the
<CODE>number-copies
</CODE>
2182 <LI><CODE>options
</CODE> - String representations of the job template
2183 attributes, separated by spaces. Boolean attributes are provided as
2184 "name
" for true values and
"noname
" for false values. All other
2185 attributes are provided as
"name=value
" for single-valued attributes
2186 and
"name=value1,value2,...,valueN
" for set attributes
</LI>
2187 <LI><CODE>filename
</CODE> - The request file
</LI>
2189 <P>The
<I> filename
</I> argument is only provided to the first filter in
2190 the chain; all filters
<B> must
</B> be prepared to read the print file
2191 from the standard input if the
<I> filename
</I> argument is omitted.
</P>
2192 <H3><A NAME=
"4_1_7">Copy Generation
</A></H3>
2193 <P>The
<I> copies
</I> argument specifies the number of copies to produce
2194 of the input file. In general, you should only generate copies if the
<I>
2195 filename
</I> argument is supplied. The only exception to this are
2196 filters that produce device-independent PostScript output (without any
2197 printer commands from the printer's PPD file), since the PostScript
2198 filter
<CODE>pstops
</CODE> is responsible for copy generation.
</P>
2199 <H3><A NAME=
"4_1_8">Environment Variables
</A></H3>
2200 <P>Every filter receives a fixed set of environment variables that can
2201 be used by the filter:
</P>
2203 <LI><CODE>CHARSET
</CODE> - The character set used by the client for this
2205 <LI><CODE>CONTENT_TYPE
</CODE> - The original document type, such as
2206 "application/postscript
"</LI>
2207 <LI><CODE>CUPS_DATADIR
</CODE> - The location of CUPS data files
</LI>
2208 <LI><CODE>CUPS_SERVERROOT
</CODE> - The location of CUPS configuration
2210 <LI><CODE>DEVICE_URI
</CODE> - The output device URI
</LI>
2211 <LI><CODE>LANG
</CODE> - The language used by the client for this print
2213 <LI><CODE>PATH
</CODE> - The execution path exported to the filter
</LI>
2214 <LI><CODE>PPD
</CODE> - The full filename of the printer's PPD file
</LI>
2215 <LI><CODE>PRINTER
</CODE> - The name of the printer queue
</LI>
2216 <LI><CODE>RIP_CACHE
</CODE> - The maximum amount of memory each filter
2218 <LI><CODE>SOFTWARE
</CODE> - The name of the CUPS software, typically
2219 "CUPS/
1.1"</LI>
2220 <LI><CODE>TZ
</CODE> - The local timezone
</LI>
2221 <LI><CODE>USER
</CODE> - The name of the current user
</LI>
2223 <H2><A NAME=
"4_2">Dissecting the HP-GL/
2 Filter
</A></H2>
2224 <P>The HP-GL/
2 filter (
<CODE>hpgltops
</CODE>) provided with CUPS is a
2225 complex program that converts HP-GL/
2 files into device-independent
2226 PostScript output. Since it produces device-independent PostScript
2227 output, it does not need to handle copy generation or writing printer
2228 options from the printer's PPD file.
</P>
2229 <H3><A NAME=
"4_2_1">Initializing the Filter
</A></H3>
2230 <P>The first task of any filter is to ensure that the correct number of
2231 command-line arguments are present:
</P>
2234 if (argc
< 6 || argc
> 7)
2236 fputs(
"ERROR: hpgltops job-id user title copies options [file]\n
", stderr);
2241 <P>After this you open the print file or read from the standard input as
2248 * If we have
7 arguments, print the file named on the command-line.
2249 * Otherwise, send stdin instead...
2257 * Try to open the print file...
2260 if ((fp = fopen(argv[
6],
"rb
")) == NULL)
2262 perror(
"ERROR: unable to open print file -
");
2268 <P>Once the print file has been opened, options can be processed using
2269 the
<A HREF=
"#cupsParseOptions"> <CODE>cupsParseOptions()
</CODE></A> and
<A
2270 HREF=
"#cupsGetOption"> <CODE>cupsGetOption()
</CODE></A> functions:
</P>
2274 cups_option_t *options;
2278 * Process command-line options and write the prolog...
2282 num_options = cupsParseOptions(argv[
5],
0,
2284 if ((val = cupsGetOption(
"blackplot
", num_options, options)) != NULL)
2287 if ((val = cupsGetOption(
"fitplot
", num_options, options)) != NULL)
2290 if ((val = cupsGetOption(
"penwidth
", num_options, options)) != NULL)
2291 PenWidth = (float)atoi(val) *
0.001f;
2294 <P>After the options have been processed, the filter writes PostScript
2295 code to the standard output based on the print file, closes the print
2296 file (as needed), and returns
0 to the scheduler.
</P>
2297 <H2><A NAME=
"4_3">PostScript Output
</A></H2>
2298 <P>Filters that produce PostScript output must generate output
2299 conforming to the Adobe Document Structuring Conventions,
3.0. In
2300 general this means the beginning of each file must begin with:
</P>
2304 %%BoundingBox: left bottom right top
2309 <P>The
<I> left
</I>,
<I> bottom
</I>,
<I> right
</I>, and
<I> top
</I> values
2310 are integers in points from the lower-lefthand corner of the page.
</P>
2311 <P>Pages must be surrounded by:
</P>
2314 %%Page: number number
2321 <P>And the end of each file must contain:
</P>
2325 %%Pages: number-pages
2329 <P>These comments allow the PostScript filter to correctly perform page
2330 accounting, copy generation, N-up printing, and so forth.
</P>
2331 <H1 ALIGN=
"RIGHT"><A NAME=
"WRITING_DRIVERS">4 - Writing Printer Drivers
</A>
2333 <P>This chapter discusses how to write a printer driver, which is a
2334 special filter program that converts CUPS raster data into the
2335 appropriate commands and data required for a printer.
</P>
2336 <H2><A NAME=
"5_1">Overview
</A></H2>
2337 <P>Raster printers utilitize PPD files that specify one or more
2338 device-specific filters that handle converting print files for the
2339 printer. The simplest raster printer drivers provide a single filter
2340 that converts CUPS raster data to the printer's native format.
</P>
2341 <H3><A NAME=
"5_1_1">CUPS Raster Data
</A></H3>
2342 <P>CUPS raster data (
<CODE>application/vnd.cups-raster
</CODE>) consists
2343 of a stream of raster page descriptions produced by one of the RIP
2344 filters, such as
<CODE>pstoraster
</CODE> or
<CODE>imagetoraster
</CODE>.
</P>
2345 <P>Each page of data begins with a page dictionary structure called
<A HREF=
"#cups_raster_header_t">
2346 <CODE>cups_raster_header_t
</CODE></A>. This structure contains the
2347 colorspace, bits per color, media size, media type, hardware
2348 resolution, and so forth.
</P>
2349 <P>After the page dictionary comes the page data which is a
2350 full-resolution, uncompressed bitmap representing the page in the
2351 printer's output colorspace.
</P>
2352 <H3><A NAME=
"5_1_2">Page Accounting
</A></H3>
2353 <P>Printer drivers must handle all page accounting. This means they must
2354 send
"PAGE:
" messages to the standard error file for each page (and in
2355 many cases, copy) sent to the printer.
</P>
2356 <H3><A NAME=
"5_1_3">Color Management
</A></H3>
2357 <P>Printer drivers can implement their color management via the
<CODE>
2358 cupsColorProfile
</CODE> attributes in the PPD file or internally in the
2359 driver from a device-independent colorspace. In general, color
2360 management performed by the RIP filters is more efficient than that
2361 performed inside printer drivers.
</P>
2362 <P>For example, the
<CODE>pstoraster
</CODE> filter often only has to
2363 perform a color conversion once each time the color is used for
2364 multiple output pixels, while the raster filter must convert every
2365 pixel on the page.
</P>
2366 <H3><A NAME=
"5_1_4">Device and Bitmap Variables
</A></H3>
2367 <P>Besides the standard PostScript page device dictionary variables
2368 defined in the Adobe PostScript Level
3 reference manual, the CUPS
2369 filters support additional variables that are passed in the page device
2370 dictionary header for the page and in some cases control the type of
2371 raster data that is generated:
2373 <TABLE BORDER=
"1" WIDTH=
"90%">
2374 <TR><TH>Variable
</TH><TH>Type
</TH><TH>Description
</TH></TR>
2375 <TR><TD>cupsWidth
</TD><TD>read-only integer
</TD><TD>Width of bitmap in
2377 <TR><TD>cupsHeight
</TD><TD>read-only integer
</TD><TD>Height of bitmap in
2379 <TR><TD>cupsMediaType
</TD><TD>read-write integer
</TD><TD>Device-specific
2380 media type code
</TD></TR>
2381 <TR><TD>cupsBitsPerColor
</TD><TD>read-write integer
</TD><TD>Number of
2382 bits per color;
1,
2,
4, and
8 are currently supported
</TD></TR>
2383 <TR><TD>cupsBitsPerPixel
</TD><TD>read-only integer
</TD><TD>Number of
2384 bits per pixel;
1 to
32</TD></TR>
2385 <TR><TD>cupsBytesPerLine
</TD><TD>read-only integer
</TD><TD>Number of
2386 bytes per line of raster graphics
</TD></TR>
2387 <TR><TD>cupsColorOrder
</TD><TD>read-write enum
</TD><TD>The order of
2388 color values in the bitmap:
2390 <LI><CODE>CUPS_ORDER_CHUNKED
</CODE> - CMYK
CMYK
CMYK
</LI>
2391 <LI><CODE>CUPS_ORDER_BANDED
</CODE> - CCC
MMM
YYY
KKK
</LI>
2392 <LI><CODE>CUPS_ORDER_PLANAR
</CODE> - CCC
...
MMM
...
YYY
...
KKK
...
</LI>
2395 <TR><TD>cupsColorSpace
</TD><TD>read-write enum
</TD><TD>The colorspace of
2398 <LI><CODE>CUPS_CSPACE_W
</CODE> - White (luminance)
</LI>
2399 <LI><CODE>CUPS_CSPACE_RGB
</CODE> - Red, green, blue
</LI>
2400 <LI><CODE>CUPS_CSPACE_RGBA
</CODE> - Red, green, blue, alpha
</LI>
2401 <LI><CODE>CUPS_CSPACE_K
</CODE> - Black
</LI>
2402 <LI><CODE>CUPS_CSPACE_CMY
</CODE> - Cyan, magenta, yellow
</LI>
2403 <LI><CODE>CUPS_CSPACE_YMC
</CODE> - Yellow, magenta, cyan
</LI>
2404 <LI><CODE>CUPS_CSPACE_CMYK
</CODE> - Cyan, magenta, yellow, black
</LI>
2405 <LI><CODE>CUPS_CSPACE_YMCK
</CODE> - Yellow, magenta, cyan, black
</LI>
2406 <LI><CODE>CUPS_CSPACE_KCMY
</CODE> - Black, cyan, magenta, yellow
</LI>
2407 <LI><CODE>CUPS_CSPACE_KCMYcm
</CODE> - Black, cyan, magenta, yellow,
2408 light cyan, light magenta
</LI>
2409 <LI><CODE>CUPS_CSPACE_GMCK
</CODE> - Metallic yellow (gold), metallic
2410 magenta, metallic cyan, black
</LI>
2411 <LI><CODE>CUPS_CSPACE_GMCS
</CODE> - Metallic yellow (gold), metallic
2412 magenta, metallic cyan, metallic grey (silver)
</LI>
2413 <LI><CODE>CUPS_CSPACE_WHITE
</CODE> - White pigment (black as white
2415 <LI><CODE>CUPS_CSPACE_GOLD
</CODE> - Gold foil (black as gold foil)
</LI>
2416 <LI><CODE>CUPS_CSPACE_SILVER
</CODE> - Silver foil (black as silver foil)
</LI>
2419 <TR><TD>cupsCompression
</TD><TD>read-write integer
</TD><TD>
2420 Device-specific compression type code
</TD></TR>
2421 <TR><TD>cupsRowCount
</TD><TD>read-write integer
</TD><TD>Device-specific
2422 row count value
</TD></TR>
2423 <TR><TD>cupsRowFeed
</TD><TD>read-write integer
</TD><TD>Device-specific
2424 row feed value
</TD></TR>
2425 <TR><TD>cupsRowStep
</TD><TD>read-write integer
</TD><TD>Device-specific
2426 row step value
</TD></TR>
2430 <P>Bitmaps with a colorspace of CUPS_CSPACE_KCMYcm and more than
1 bit
2431 per color are transmitted to the raster driver in KCMY colorspace; the
2432 driver is responsible for producing the correct separation of normal
2433 and light cyan and magenta inks.
</P>
2434 <H2><A NAME=
"5_2">Dissecting the HP-PCL Driver
</A></H2>
2435 <P>The HP-PCL driver provided with CUPS (
<CODE>rastertohp
</CODE>)
2436 converts bitmap data from the raster filters into HP-PCL commands for
2437 most PCL-compatible printers. The actual format of the raster data is
2438 controlled by the PPD file being used -
<VAR> deskjet.ppd
</VAR> or
<VAR>
2439 laserjet.ppd
</VAR>.
</P>
2440 <H3><A NAME=
"5_2_1">PPD Files
</A></H3>
2441 <P>PPD files play an important part of all raster printer drivers.
2442 Options defined in the PPD file contain PostScript commands that
2443 control the raster data that is sent to the printer driver.
</P>
2444 <P>A typical CUPS printer driver will include
<CODE>ColorModel
</CODE>,
<CODE>
2445 InputSlot
</CODE>,
<CODE>PageSize
</CODE>,
<CODE>PageRegion
</CODE>, and
<CODE>
2446 Resolution
</CODE> options. Each option is shown using the standard PPD
2450 *OpenUI *PageSize/Media Size: PickOne
2451 *OrderDependency:
10 AnySetup *PageSize
2452 *DefaultPageSize: Letter
2453 *PageSize Letter/US Letter:
"<<
2456 >> setpagedevice
"
2458 *PageSize Legal/US Legal:
"<<
2459 /PageSize [
612 1008]
2461 >> setpagedevice
"
2463 *PageSize A4/A4:
"<<
2466 >> setpagedevice
"
2471 <P>The
<CODE>OpenUI
</CODE> keyword specifies the new option. The first
2472 name is the option with an asterisk (*) in front of it. The first name
2473 is usually followed by a slash (/) and a human-readable version of the
2475 <P>Every option
<B> must
</B> have a default value, specified using the
<CODE>
2476 Default
<I>Option
</I></CODE> keyword.
</P>
2477 <P>Each option begins with the option name followed by the computer and
2478 human-readable values. The PostScript commands follow these inside
2479 double quotes. PostScript commands can be provided on a single line:
</P>
2482 *PageSize A4/A4:
"<</PageSize[
595 842]/ImagingBBox null
>> setpagedevice
"
2485 <P>or broken down on separate lines using the
<CODE>End
</CODE> keyword
2486 to terminate them:
</P>
2489 *PageSize A4/A4:
"<<
2492 >> setpagedevice
"
2496 <P>The choice of the two formats is usually esthetic. However, each line
2497 in a PPD file must not exceed
255 characters, so if your PostScript
2498 commands are long you may need to break them up on separate lines.
</P>
2499 <H3><A NAME=
"5_2_2">Reading Raster Data
</A></H3>
2500 <P>As with any filter, your printer driver should handle raster data
2501 from a filename specified on the command-line or from the standard
2502 input. The
<A HREF=
"#cupsRasterOpen"> <CODE>cupsRasterOpen()
</CODE></A>
2503 function opens a raster stream for printing:
</P>
2506 int fd; /* File descriptor */
2507 cups_raster_t *ras; /* Raster stream for printing */
2511 * Check for valid arguments...
2514 if (argc
< 6 || argc
> 7)
2517 * We don't have the correct number of arguments; write an error message
2521 fputs(
"ERROR: rastertopcl job-id user title copies options [file]\n
", stderr);
2526 * Open the page stream...
2531 if ((fd = open(argv[
6], O_RDONLY)) == -
1)
2533 perror(
"ERROR: Unable to open raster file -
");
2541 ras = cupsRasterOpen(fd, CUPS_RASTER_READ);
2544 <P>Once you have opened the raster stream you just need to read each
2545 page and print it:
</P>
2548 cups_raster_header_t header;
2550 unsigned char data[
8192];
2552 while (cupsRasterReadHeader(ras,
&header))
2554 ... initialize the printer ...
2555 for (y = header.cupsHeight; y
> 0; y ++)
2557 cupsRasterReadPixels(ras, data, header.cupsBytesPerLine);
2558 ... send raster line to printer ...
2563 <P>After you have processed all pages, close the raster stream and
2567 cupsRasterClose(ras);
2572 <H1 ALIGN=
"RIGHT"><A NAME=
"WRITING_BACKENDS">5 - Writing Backends
</A></H1>
2573 <P>This chapter describes how to write a backend for CUPS. Backends
2574 communicate directly with printers and allow printer drivers and
2575 filters to send data using any type of connection transparently.
</P>
2576 <H2><A NAME=
"6_1">Overview
</A></H2>
2577 <P>Backends are special filters that communicate with printers directly.
2578 They are treated slightly differently than filters, however, and have
2579 some unique requirements.
</P>
2580 <H3><A NAME=
"6_1_1">Security Considerations
</A></H3>
2581 <P>Backends are run as the root user, so special care must be taken to
2582 avoid potential security violations. In particular, remember that a
2583 backend will be able to manipulate disk files, devices, and other
2584 resources that potentially could damage a system or printer.
</P>
2585 <H3><A NAME=
"6_1_2">Command-Line Arguments
</A></H3>
2586 <P>Besides the standard filter arguments, backends are also run with no
2587 arguments to get a list of available devices. This discovery process is
2588 described later in this chapter.
</P>
2589 <H3><A NAME=
"6_1_3">Copy Generation
</A></H3>
2590 <P>Like filters, backends should send multiple copies of the print file
2591 only if a filename is supplied on the command-line. Otherwise the
2592 backend should assume that the upstream filter has already added the
2593 necessary commands or data to produce the multiple copies.
</P>
2594 <H3><A NAME=
"6_1_4">Page Accounting
</A></H3>
2595 <P>Backend filters generally do not do page accounting, however they
2596 should at a minimum produce a single page message for each copy that is
2597 produced when a filename is present on the command-line. This is
2598 because the user selected
"raw
" printing and no other accounting
2599 information is possible.
</P>
2600 <H3><A NAME=
"6_1_5">Exclusive Access
</A></H3>
2601 <P>Backends that talk to local character or block devices should open
2602 the device file in exclusive mode (
<CODE>O_EXCL
</CODE>) to cooperate
2603 with other printers defined for the same device.
</P>
2604 <H3><A NAME=
"6_1_6">Retries
</A></H3>
2605 <P>All backends
<B> must
</B> retry connections to the device. This
2606 includes backends that talk to local character or block devices, as the
2607 user may define more than one printer queue pointing at the same
2608 physical device.
</P>
2609 <P>To prevent excess CPU utilitization, the backend should go to sleep
2610 for an amount of time between retries; the CUPS-supplied backends retry
2611 once every
30 seconds.
</P>
2612 <H2><A NAME=
"6_2">Dissecting the Serial Port Backend
</A></H2>
2613 <P>The serial port backend provides support for serial printers. Since
2614 it does everything a good backend needs to do, it provides an excellent
2615 example of what to do.
</P>
2616 <H3><A NAME=
"6_2_1">Supporting Device Discovery
</A></H3>
2617 <P>As previously noted, backends are special filter programs that talk
2618 to printer devices. Another task a backend must perform is to list the
2619 available devices it supports. The backend lists the available devices
2620 when no additioanl arguments are supplied on the command-line (i.e.
2621 just the command name...)
</P>
2622 <P>The serial backend lists devices by looking at serial port files in
2623 the
<VAR> /dev
</VAR> directory, by consulting a hardware inventory
2624 (IRIX), and in some cases by trying to open the ports to see if they
2626 <P>Once it finds a serial port it writes a single line for each port to
2627 the standard error file. Each line looks like this:
</P>
2630 serial serial:/dev/ttyS0?baud=
115200 "Unknown
" "Serial Port
1"
2633 <P>The first word
"serial
" is the
<I> device class
</I>; this identifies
2634 the class of device which can be used to categorize it in user
2635 interfaces. CUPS currently recognizes the following classes:
</P>
2637 <LI>"file
" - a disk file.
</LI>
2638 <LI>"direct
" - a parallel or fixed-rate serial data port, currently used
2639 for Centronics, IEEE-
1284, and USB printer ports.
</LI>
2640 <LI>"serial
" - a variable-rate serial port.
</LI>
2641 <LI>"network
" - a network connection, typically via AppSocket, HTTP,
2642 IPP, LPD, or SMB/CIFS protocols.
</LI>
2644 <P>After the device class is the
<I> device URI
</I>, in this case
2645 "serial:/dev/ttyS0?baud=
115200". This is the URI that should be used by
2646 the user to select this port. For serial ports, the
"baud=
115200"
2647 specifies the maximum baud rate supported by the port - the actual
2648 value will vary based on the speed the user selects for the printer.
</P>
2649 <P>The last two strings are the model and description for the port. The
2650 "Unknown
" string means that the printer model is unknown - some devices
2651 are able to provide a make and model such as
"HP DeskJet
" that allows
2652 users and software to choose an appropriate printer driver more easily.
2653 Both the model and description must be enclosed inside double quotes.
</P>
2654 <H3><A NAME=
"6_2_2">Opening the Serial Port
</A></H3>
2655 <P>As noted previously, all backends should open device files in
2656 exclusive mode, and retry as needed until the port is available. The
2657 serial port does this using a
<CODE>do-while
</CODE> loop:
</P>
2662 if ((fd = open(resource, O_WRONLY | O_NOCTTY | O_EXCL)) == -
1)
2666 fputs(
"INFO: Serial port busy; will retry in
30 seconds...\n
", stderr);
2671 perror(
"ERROR: Unable to open serial port device file
");
2679 <P>If the port is busy or in use by another process, the backend will go
2680 to sleep for
30 seconds and try again. If another error is detected a
2681 message is sent to the user and the backend aborts the print job until
2682 the problem can be corrected.
</P>
2683 <H3><A NAME=
"6_2_3">Writing Data to the Port
</A></H3>
2684 <P>Network and character devices pose an interesting problem when
2685 writing data to the port - they may not be able to write all of the
2686 bytes in your buffer before returning. To work around this problem you
2687 must loop until all bytes have been written:
</P>
2690 while (nbytes
> 0)
2692 if ((wbytes = write(fd, bufptr, nbytes))
< 0)
2693 if (errno == ENOTTY)
2694 wbytes = write(fd, bufptr, nbytes);
2698 perror(
"ERROR: Unable to send print file to printer
");
2707 <P>The check for the
<CODE>ENOTTY
</CODE> error is needed on some
2708 platforms to clear an error from a previous
<CODE>ioctl()
</CODE> call.
</P>
2709 <H3><A NAME=
"6_2_4">Finishing Up
</A></H3>
2710 <P>Once you have sent the print file, return
0 if the file printed
2711 successfully or
1 if it did not. This will allow the scheduler to stop
2712 the print job if there is a device error, preserving the print job for
2713 later printing once the problem has been corrected.
</P>
2714 <H1 ALIGN=
"RIGHT"><A NAME=
"LICENSE">A - Software License Agreement
</A></H1>
2715 <H2 ALIGN=
"CENTER"><A NAME=
"7_1">Common UNIX Printing System License
2717 <P ALIGN=
"CENTER">Copyright
1997-
2003 by Easy Software Products
2718 <BR> 44141 AIRPORT VIEW DR STE
204
2719 <BR> HOLLYWOOD, MARYLAND
20636-
3111 USA
2721 <BR> Voice: +
1.301.373.9600
2722 <BR> Email:
<A HREF=
"mailto:cups-info@cups.org"> cups-info@cups.org
</A>
2723 <BR> WWW:
<A HREF=
"http://www.cups.org"> http://www.cups.org
</A></P>
2724 <H3><A NAME=
"7_1_1">Introduction
</A></H3>
2725 <P>The Common UNIX Printing System
<SUP>TM
</SUP>, (
"CUPS
<SUP>TM
</SUP>"),
2726 is provided under the GNU General Public License (
"GPL
") and GNU
2727 Library General Public License (
"LGPL
"), Version
2, with exceptions for
2728 Apple operating systems and the OpenSSL toolkit. A copy of the
2729 exceptions and licenses follow this introduction.
</P>
2730 <P>The GNU LGPL applies to the CUPS API library, located in the
"cups
"
2731 subdirectory of the CUPS source distribution and in the
"cups
" include
2732 directory and library files in the binary distributions. The GNU GPL
2733 applies to the remainder of the CUPS distribution, including the
2734 "pdftops
" filter which is based upon Xpdf and the CUPS imaging library.
</P>
2735 <P>For those not familiar with the GNU GPL, the license basically allows
2738 <LI>Use the CUPS software at no charge.
</LI>
2739 <LI>Distribute verbatim copies of the software in source or binary form.
</LI>
2740 <LI>Sell verbatim copies of the software for a media fee, or sell
2741 support for the software.
</LI>
2742 <LI>Distribute or sell printer drivers and filters that use CUPS so long
2743 as source code is made available under the GPL.
</LI>
2745 <P>What this license
<B> does not
</B> allow you to do is make changes or
2746 add features to CUPS and then sell a binary distribution without source
2747 code. You must provide source for any new drivers, changes, or
2748 additions to the software, and all code must be provided under the GPL
2749 or LGPL as appropriate. The only exceptions to this are the portions of
2750 the CUPS software covered by the Apple operating system license
2751 exceptions outlined later in this license agreement.
</P>
2752 <P>The GNU LGPL relaxes the
"link-to
" restriction, allowing you to
2753 develop applications that use the CUPS API library under other licenses
2754 and/or conditions as appropriate for your application.
</P>
2755 <H3><A NAME=
"7_1_2">License Exceptions
</A></H3>
2756 <P>In addition, as the copyright holder of CUPS, Easy Software Products
2757 grants the following special exceptions:
</P>
2759 <LI><B>Apple Operating System Development License Exception
</B>;
2761 <LI>Software that is developed by any person or entity for an Apple
2762 Operating System (
"Apple OS-Developed Software
"), including but not
2763 limited to Apple and third party printer drivers, filters, and backends
2764 for an Apple Operating System, that is linked to the CUPS imaging
2765 library or based on any sample filters or backends provided with CUPS
2766 shall not be considered to be a derivative work or collective work
2767 based on the CUPS program and is exempt from the mandatory source code
2768 release clauses of the GNU GPL. You may therefore distribute linked
2769 combinations of the CUPS imaging library with Apple OS-Developed
2770 Software without releasing the source code of the Apple OS-Developed
2771 Software. You may also use sample filters and backends provided with
2772 CUPS to develop Apple OS-Developed Software without releasing the
2773 source code of the Apple OS-Developed Software.
</LI>
2774 <LI>An Apple Operating System means any operating system software
2775 developed and/or marketed by Apple Computer, Inc., including but not
2776 limited to all existing releases and versions of Apple's Darwin, Mac OS
2777 X, and Mac OS X Server products and all follow-on releases and future
2778 versions thereof.
</LI>
2779 <LI>This exception is only available for Apple OS-Developed Software and
2780 does not apply to software that is distributed for use on other
2781 operating systems.
</LI>
2782 <LI>All CUPS software that falls under this license exception have the
2783 following text at the top of each source file:
<BLOCKQUOTE>This file is
2784 subject to the Apple OS-Developed Software exception.
</BLOCKQUOTE></LI>
2787 <LI><B>OpenSSL Toolkit License Exception
</B>;
2789 <LI>Easy Software Products explicitly allows the compilation and
2790 distribution of the CUPS software with the OpenSSL Toolkit.
</LI>
2794 <P>No developer is required to provide these exceptions in a derived
2796 <H3><A NAME=
"7_1_3">Trademarks
</A></H3>
2797 <P>Easy Software Products has trademarked the Common UNIX Printing
2798 System, CUPS, and CUPS logo. These names and logos may be used freely
2799 in any direct port or binary distribution of CUPS. Please contract Easy
2800 Software Products for written permission to use them in derivative
2801 products. Our intention is to protect the value of these trademarks and
2802 ensure that any derivative product meets the same high-quality
2803 standards as the original.
</P>
2804 <H3><A NAME=
"7_1_4">Binary Distribution Rights
</A></H3>
2805 <P>Easy Software Products also sells rights to the CUPS source code
2806 under a binary distribution license for vendors that are unable to
2807 release source code for their drivers, additions, and modifications to
2808 CUPS under the GNU GPL and LGPL. For information please contact us at
2809 the address shown above.
</P>
2810 <P>The Common UNIX Printing System provides a
"pdftops
" filter that is
2811 based on the Xpdf software. For binary distribution licensing of this
2812 software, please contact:
<BLOCKQUOTE> Derek B. Noonburg
2813 <BR> Email:
<A HREF=
"mailto:derekn@foolabs.com"> derekn@foolabs.com
</A>
2814 <BR> WWW:
<A HREF=
"http://www.foolabs.com/xpdf/">
2815 http://www.foolabs.com/xpdf/
</A></BLOCKQUOTE></P>
2816 <H3><A NAME=
"7_1_5">Support
</A></H3>
2817 <P>Easy Software Products sells software support for CUPS as well as a
2818 commercial printing product based on CUPS called ESP Print Pro. You can
2819 find out more at our web site:
</P>
2822 <A HREF=
"http://www.easysw.com/">http://www.easysw.com/
</A>
2827 <H2><A NAME=
"7_2">GNU GENERAL PUBLIC LICENSE
</A></H2>
2828 <P>Version
2, June
1991</P>
2830 Copyright
1989,
1991 Free Software Foundation, Inc.
2831 59 Temple Place, Suite
330, Boston, MA
02111-
1307 USA
2833 Everyone is permitted to copy and distribute verbatim
2834 copies of this license document, but changing it is not allowed.
2837 <P>The licenses for most software are designed to take away your freedom
2838 to share and change it. By contrast, the GNU General Public License is
2839 intended to guarantee your freedom to share and change free
2840 software--to make sure the software is free for all its users. This
2841 General Public License applies to most of the Free Software
2842 Foundation's software and to any other program whose authors commit to
2843 using it. (Some other Free Software Foundation software is covered by
2844 the GNU Library General Public License instead.) You can apply it to
2845 your programs, too.
</P>
2846 <P>When we speak of free software, we are referring to freedom, not
2847 price. Our General Public Licenses are designed to make sure that you
2848 have the freedom to distribute copies of free software (and charge for
2849 this service if you wish), that you receive source code or can get it
2850 if you want it, that you can change the software or use pieces of it in
2851 new free programs; and that you know you can do these things.
</P>
2852 <P>To protect your rights, we need to make restrictions that forbid
2853 anyone to deny you these rights or to ask you to surrender the rights.
2854 These restrictions translate to certain responsibilities for you if you
2855 distribute copies of the software, or if you modify it.
</P>
2856 <P>For example, if you distribute copies of such a program, whether
2857 gratis or for a fee, you must give the recipients all the rights that
2858 you have. You must make sure that they, too, receive or can get the
2859 source code. And you must show them these terms so they know their
2861 <P>We protect your rights with two steps: (
1) copyright the software,
2862 and (
2) offer you this license which gives you legal permission to
2863 copy, distribute and/or modify the software.
</P>
2864 <P>Also, for each author's protection and ours, we want to make certain
2865 that everyone understands that there is no warranty for this free
2866 software. If the software is modified by someone else and passed on, we
2867 want its recipients to know that what they have is not the original, so
2868 that any problems introduced by others will not reflect on the original
2869 authors' reputations.
</P>
2870 <P>Finally, any free program is threatened constantly by software
2871 patents. We wish to avoid the danger that redistributors of a free
2872 program will individually obtain patent licenses, in effect making the
2873 program proprietary. To prevent this, we have made it clear that any
2874 patent must be licensed for everyone's free use or not licensed at all.
</P>
2875 <P>The precise terms and conditions for copying, distribution and
2876 modification follow.
</P>
2877 <H4>GNU GENERAL PUBLIC LICENSE
2878 <BR> TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
</H4>
2880 <LI>This License applies to any program or other work which contains a
2881 notice placed by the copyright holder saying it may be distributed
2882 under the terms of this General Public License. The
"Program
", below,
2883 refers to any such program or work, and a
"work based on the Program
"
2884 means either the Program or any derivative work under copyright law:
2885 that is to say, a work containing the Program or a portion of it,
2886 either verbatim or with modifications and/or translated into another
2887 language. (Hereinafter, translation is included without limitation in
2888 the term
"modification
".) Each licensee is addressed as
"you
".
2889 <P>Activities other than copying, distribution and modification are not
2890 covered by this License; they are outside its scope. The act of running
2891 the Program is not restricted, and the output from the Program is
2892 covered only if its contents constitute a work based on the Program
2893 (independent of having been made by running the Program). Whether that
2894 is true depends on what the Program does.
</P>
2895 <LI>You may copy and distribute verbatim copies of the Program's source
2896 code as you receive it, in any medium, provided that you conspicuously
2897 and appropriately publish on each copy an appropriate copyright notice
2898 and disclaimer of warranty; keep intact all the notices that refer to
2899 this License and to the absence of any warranty; and give any other
2900 recipients of the Program a copy of this License along with the
2902 <P>You may charge a fee for the physical act of transferring a copy, and
2903 you may at your option offer warranty protection in exchange for a fee.
</P>
2904 <LI>You may modify your copy or copies of the Program or any portion of
2905 it, thus forming a work based on the Program, and copy and distribute
2906 such modifications or work under the terms of Section
1 above, provided
2907 that you also meet all of these conditions:
2909 <LI>You must cause the modified files to carry prominent notices stating
2910 that you changed the files and the date of any change.
</LI>
2911 <LI>You must cause any work that you distribute or publish, that in
2912 whole or in part contains or is derived from the Program or any part
2913 thereof, to be licensed as a whole at no charge to all third parties
2914 under the terms of this License.
</LI>
2915 <LI>if the modified program normally reads commands interactively when
2916 run, you must cause it, when started running for such interactive use
2917 in the most ordinary way, to print or display an announcement including
2918 an appropriate copyright notice and a notice that there is no warranty
2919 (or else, saying that you provide a warranty) and that users may
2920 redistribute the program under these conditions, and telling the user
2921 how to view a copy of this License. (Exception: if the Program itself
2922 is interactive but does not normally print such an announcement, your
2923 work based on the Program is not required to print an announcement.)
</LI>
2925 <P>These requirements apply to the modified work as a whole. If
2926 identifiable sections of that work are not derived from the Program,
2927 and can be reasonably considered independent and separate works in
2928 themselves, then this License, and its terms, do not apply to those
2929 sections when you distribute them as separate works. But when you
2930 distribute the same sections as part of a whole which is a work based
2931 on the Program, the distribution of the whole must be on the terms of
2932 this License, whose permissions for other licensees extend to the
2933 entire whole, and thus to each and every part regardless of who wrote
2935 <P>Thus, it is not the intent of this section to claim rights or contest
2936 your rights to work written entirely by you; rather, the intent is to
2937 exercise the right to control the distribution of derivative or
2938 collective works based on the Program.
</P>
2939 <P>In addition, mere aggregation of another work not based on the
2940 Program with the Program (or with a work based on the Program) on a
2941 volume of a storage or distribution medium does not bring the other
2942 work under the scope of this License.
</P>
2943 <LI>You may copy and distribute the Program (or a work based on it,
2944 under Section
2) in object code or executable form under the terms of
2945 Sections
1 and
2 above provided that you also do one of the following:
2947 <LI>Accompany it with the complete corresponding machine-readable source
2948 code, which must be distributed under the terms of Sections
1 and
2
2949 above on a medium customarily used for software interchange; or,
</LI>
2950 <LI>Accompany it with a written offer, valid for at least three years,
2951 to give any third party, for a charge no more than your cost of
2952 physically performing source distribution, a complete machine-readable
2953 copy of the corresponding source code, to be distributed under the
2954 terms of Sections
1 and
2 above on a medium customarily used for
2955 software interchange; or,
</LI>
2956 <LI>Accompany it with the information you received as to the offer to
2957 distribute corresponding source code. (This alternative is allowed only
2958 for noncommercial distribution and only if you received the program in
2959 object code or executable form with such an offer, in accord with
2960 Subsection b above.)
</LI>
2962 <P>The source code for a work means the preferred form of the work for
2963 making modifications to it. For an executable work, complete source
2964 code means all the source code for all modules it contains, plus any
2965 associated interface definition files, plus the scripts used to control
2966 compilation and installation of the executable. However, as a special
2967 exception, the source code distributed need not include anything that
2968 is normally distributed (in either source or binary form) with the
2969 major components (compiler, kernel, and so on) of the operating system
2970 on which the executable runs, unless that component itself accompanies
2972 <P>If distribution of executable or object code is made by offering
2973 access to copy from a designated place, then offering equivalent access
2974 to copy the source code from the same place counts as distribution of
2975 the source code, even though third parties are not compelled to copy
2976 the source along with the object code.
</P>
2977 <LI>You may not copy, modify, sublicense, or distribute the Program
2978 except as expressly provided under this License. Any attempt otherwise
2979 to copy, modify, sublicense or distribute the Program is void, and will
2980 automatically terminate your rights under this License. However,
2981 parties who have received copies, or rights, from you under this
2982 License will not have their licenses terminated so long as such parties
2983 remain in full compliance.
</LI>
2984 <LI>You are not required to accept this License, since you have not
2985 signed it. However, nothing else grants you permission to modify or
2986 distribute the Program or its derivative works. These actions are
2987 prohibited by law if you do not accept this License. Therefore, by
2988 modifying or distributing the Program (or any work based on the
2989 Program), you indicate your acceptance of this License to do so, and
2990 all its terms and conditions for copying, distributing or modifying the
2991 Program or works based on it.
</LI>
2992 <LI>Each time you redistribute the Program (or any work based on the
2993 Program), the recipient automatically receives a license from the
2994 original licensor to copy, distribute or modify the Program subject to
2995 these terms and conditions. You may not impose any further restrictions
2996 on the recipients' exercise of the rights granted herein. You are not
2997 responsible for enforcing compliance by third parties to this License.
</LI>
2998 <LI>If, as a consequence of a court judgment or allegation of patent
2999 infringement or for any other reason (not limited to patent issues),
3000 conditions are imposed on you (whether by court order, agreement or
3001 otherwise) that contradict the conditions of this License, they do not
3002 excuse you from the conditions of this License. If you cannot
3003 distribute so as to satisfy simultaneously your obligations under this
3004 License and any other pertinent obligations, then as a consequence you
3005 may not distribute the Program at all. For example, if a patent license
3006 would not permit royalty-free redistribution of the Program by all
3007 those who receive copies directly or indirectly through you, then the
3008 only way you could satisfy both it and this License would be to refrain
3009 entirely from distribution of the Program.
3010 <P>If any portion of this section is held invalid or unenforceable under
3011 any particular circumstance, the balance of the section is intended to
3012 apply and the section as a whole is intended to apply in other
3014 <P>It is not the purpose of this section to induce you to infringe any
3015 patents or other property right claims or to contest validity of any
3016 such claims; this section has the sole purpose of protecting the
3017 integrity of the free software distribution system, which is
3018 implemented by public license practices. Many people have made generous
3019 contributions to the wide range of software distributed through that
3020 system in reliance on consistent application of that system; it is up
3021 to the author/donor to decide if he or she is willing to distribute
3022 software through any other system and a licensee cannot impose that
3024 <P>This section is intended to make thoroughly clear what is believed to
3025 be a consequence of the rest of this License.
</P>
3026 <LI>If the distribution and/or use of the Program is restricted in
3027 certain countries either by patents or by copyrighted interfaces, the
3028 original copyright holder who places the Program under this License may
3029 add an explicit geographical distribution limitation excluding those
3030 countries, so that distribution is permitted only in or among countries
3031 not thus excluded. In such case, this License incorporates the
3032 limitation as if written in the body of this License.
</LI>
3033 <LI>The Free Software Foundation may publish revised and/or new versions
3034 of the General Public License from time to time. Such new versions will
3035 be similar in spirit to the present version, but may differ in detail
3036 to address new problems or concerns.
3037 <P>Each version is given a distinguishing version number. If the Program
3038 specifies a version number of this License which applies to it and
"any
3039 later version
", you have the option of following the terms and
3040 conditions either of that version or of any later version published by
3041 the Free Software Foundation. If the Program does not specify a version
3042 number of this License, you may choose any version ever published by
3043 the Free Software Foundation.
</P>
3044 <LI>If you wish to incorporate parts of the Program into other free
3045 programs whose distribution conditions are different, write to the
3046 author to ask for permission. For software which is copyrighted by the
3047 Free Software Foundation, write to the Free Software Foundation; we
3048 sometimes make exceptions for this. Our decision will be guided by the
3049 two goals of preserving the free status of all derivatives of our free
3050 software and of promoting the sharing and reuse of software generally.
</LI>
3058 <H4>NO WARRANTY
</H4>
3060 <LI>BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
3061 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
3062 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
3063 PROVIDE THE PROGRAM
"AS IS
" WITHOUT WARRANTY OF ANY KIND, EITHER
3064 EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3065 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
3066 ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
3067 YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
3068 NECESSARY SERVICING, REPAIR OR CORRECTION.
</LI>
3069 <LI>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
3070 WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
3071 AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
3072 FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
3073 CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
3074 PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
3075 RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
3076 FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF
3077 SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
3080 <H4>END OF TERMS AND CONDITIONS
</H4>
3083 <H2><A NAME=
"7_3">GNU LIBRARY GENERAL PUBLIC LICENSE
</A></H2>
3084 <P>Version
2, June
1991</P>
3086 Copyright (C)
1991 Free Software Foundation, Inc.
3087 59 Temple Place - Suite
330, Boston, MA
02111-
1307, USA
3088 Everyone is permitted to copy and distribute verbatim copies
3089 of this license document, but changing it is not allowed.
3091 [This is the first released version of the library GPL. It is
3092 numbered
2 because it goes with version
2 of the ordinary GPL.]
3095 <P>The licenses for most software are designed to take away your freedom
3096 to share and change it. By contrast, the GNU General Public Licenses
3097 are intended to guarantee your freedom to share and change free
3098 software--to make sure the software is free for all its users.
</P>
3099 <P>This license, the Library General Public License, applies to some
3100 specially designated Free Software Foundation software, and to any
3101 other libraries whose authors decide to use it. You can use it for your
3103 <P>When we speak of free software, we are referring to freedom, not
3104 price. Our General Public Licenses are designed to make sure that you
3105 have the freedom to distribute copies of free software (and charge for
3106 this service if you wish), that you receive source code or can get it
3107 if you want it, that you can change the software or use pieces of it in
3108 new free programs; and that you know you can do these things.
</P>
3109 <P>To protect your rights, we need to make restrictions that forbid
3110 anyone to deny you these rights or to ask you to surrender the rights.
3111 These restrictions translate to certain responsibilities for you if you
3112 distribute copies of the library, or if you modify it.
</P>
3113 <P>For example, if you distribute copies of the library, whether gratis
3114 or for a fee, you must give the recipients all the rights that we gave
3115 you. You must make sure that they, too, receive or can get the source
3116 code. If you link a program with the library, you must provide complete
3117 object files to the recipients so that they can relink them with the
3118 library, after making changes to the library and recompiling it. And
3119 you must show them these terms so they know their rights.
</P>
3120 <P>Our method of protecting your rights has two steps: (
1) copyright the
3121 library, and (
2) offer you this license which gives you legal
3122 permission to copy, distribute and/or modify the library.
</P>
3123 <P>Also, for each distributor's protection, we want to make certain that
3124 everyone understands that there is no warranty for this free library.
3125 If the library is modified by someone else and passed on, we want its
3126 recipients to know that what they have is not the original version, so
3127 that any problems introduced by others will not reflect on the original
3128 authors' reputations.
</P>
3129 <P>Finally, any free program is threatened constantly by software
3130 patents. We wish to avoid the danger that companies distributing free
3131 software will individually obtain patent licenses, thus in effect
3132 transforming the program into proprietary software. To prevent this, we
3133 have made it clear that any patent must be licensed for everyone's free
3134 use or not licensed at all.
</P>
3135 <P>Most GNU software, including some libraries, is covered by the
3136 ordinary GNU General Public License, which was designed for utility
3137 programs. This license, the GNU Library General Public License, applies
3138 to certain designated libraries. This license is quite different from
3139 the ordinary one; be sure to read it in full, and don't assume that
3140 anything in it is the same as in the ordinary license.
</P>
3141 <P>The reason we have a separate public license for some libraries is
3142 that they blur the distinction we usually make between modifying or
3143 adding to a program and simply using it. Linking a program with a
3144 library, without changing the library, is in some sense simply using
3145 the library, and is analogous to running a utility program or
3146 application program. However, in a textual and legal sense, the linked
3147 executable is a combined work, a derivative of the original library,
3148 and the ordinary General Public License treats it as such.
</P>
3149 <P>Because of this blurred distinction, using the ordinary General
3150 Public License for libraries did not effectively promote software
3151 sharing, because most developers did not use the libraries. We
3152 concluded that weaker conditions might promote sharing better.
</P>
3153 <P>However, unrestricted linking of non-free programs would deprive the
3154 users of those programs of all benefit from the free status of the
3155 libraries themselves. This Library General Public License is intended
3156 to permit developers of non-free programs to use free libraries, while
3157 preserving your freedom as a user of such programs to change the free
3158 libraries that are incorporated in them. (We have not seen how to
3159 achieve this as regards changes in header files, but we have achieved
3160 it as regards changes in the actual functions of the Library.) The hope
3161 is that this will lead to faster development of free libraries.
</P>
3162 <P>The precise terms and conditions for copying, distribution and
3163 modification follow. Pay close attention to the difference between a
3164 "work based on the library
" and a
"work that uses the library
". The
3165 former contains code derived from the library, while the latter only
3166 works together with the library.
</P>
3167 <P>Note that it is possible for a library to be covered by the ordinary
3168 General Public License rather than by this special one.
</P>
3169 <H4>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
</H4>
3170 <P><STRONG>0.
</STRONG> This License Agreement applies to any software
3171 library which contains a notice placed by the copyright holder or other
3172 authorized party saying it may be distributed under the terms of this
3173 Library General Public License (also called
"this License
"). Each
3174 licensee is addressed as
"you
".
</P>
3175 <P>A
"library
" means a collection of software functions and/or data
3176 prepared so as to be conveniently linked with application programs
3177 (which use some of those functions and data) to form executables.
</P>
3178 <P>The
"Library
", below, refers to any such software library or work
3179 which has been distributed under these terms. A
"work based on the
3180 Library
" means either the Library or any derivative work under
3181 copyright law: that is to say, a work containing the Library or a
3182 portion of it, either verbatim or with modifications and/or translated
3183 straightforwardly into another language. (Hereinafter, translation is
3184 included without limitation in the term
"modification
".)
</P>
3185 <P>"Source code
" for a work means the preferred form of the work for
3186 making modifications to it. For a library, complete source code means
3187 all the source code for all modules it contains, plus any associated
3188 interface definition files, plus the scripts used to control
3189 compilation and installation of the library.
</P>
3190 <P>Activities other than copying, distribution and modification are not
3191 covered by this License; they are outside its scope. The act of running
3192 a program using the Library is not restricted, and output from such a
3193 program is covered only if its contents constitute a work based on the
3194 Library (independent of the use of the Library in a tool for writing
3195 it). Whether that is true depends on what the Library does and what the
3196 program that uses the Library does.
</P>
3197 <P><STRONG>1.
</STRONG> You may copy and distribute verbatim copies of
3198 the Library's complete source code as you receive it, in any medium,
3199 provided that you conspicuously and appropriately publish on each copy
3200 an appropriate copyright notice and disclaimer of warranty; keep intact
3201 all the notices that refer to this License and to the absence of any
3202 warranty; and distribute a copy of this License along with the Library.
</P>
3203 <P>You may charge a fee for the physical act of transferring a copy, and
3204 you may at your option offer warranty protection in exchange for a fee.
</P>
3205 <P><STRONG>2.
</STRONG> You may modify your copy or copies of the Library
3206 or any portion of it, thus forming a work based on the Library, and
3207 copy and distribute such modifications or work under the terms of
3208 Section
1 above, provided that you also meet all of these conditions:
</P>
3210 <LI>The modified work must itself be a software library.
3212 <LI>You must cause the files modified to carry prominent notices stating
3213 that you changed the files and the date of any change.
3215 <LI>You must cause the whole of the work to be licensed at no charge to
3216 all third parties under the terms of this License.
3218 <LI>If a facility in the modified Library refers to a function or a
3219 table of data to be supplied by an application program that uses the
3220 facility, other than as an argument passed when the facility is
3221 invoked, then you must make a good faith effort to ensure that, in the
3222 event an application does not supply such function or table, the
3223 facility still operates, and performs whatever part of its purpose
3225 <P>(For example, a function in a library to compute square roots has a
3226 purpose that is entirely well-defined independent of the application.
3227 Therefore, Subsection
2d requires that any application-supplied
3228 function or table used by this function must be optional: if the
3229 application does not supply it, the square root function must still
3230 compute square roots.)
</P>
3236 <P>These requirements apply to the modified work as a whole. If
3237 identifiable sections of that work are not derived from the Library,
3238 and can be reasonably considered independent and separate works in
3239 themselves, then this License, and its terms, do not apply to those
3240 sections when you distribute them as separate works. But when you
3241 distribute the same sections as part of a whole which is a work based
3242 on the Library, the distribution of the whole must be on the terms of
3243 this License, whose permissions for other licensees extend to the
3244 entire whole, and thus to each and every part regardless of who wrote
3246 <P>Thus, it is not the intent of this section to claim rights or contest
3247 your rights to work written entirely by you; rather, the intent is to
3248 exercise the right to control the distribution of derivative or
3249 collective works based on the Library.
</P>
3250 <P>In addition, mere aggregation of another work not based on the
3251 Library with the Library (or with a work based on the Library) on a
3252 volume of a storage or distribution medium does not bring the other
3253 work under the scope of this License.
</P>
3254 <P><STRONG>3.
</STRONG> You may opt to apply the terms of the ordinary
3255 GNU General Public License instead of this License to a given copy of
3256 the Library. To do this, you must alter all the notices that refer to
3257 this License, so that they refer to the ordinary GNU General Public
3258 License, version
2, instead of to this License. (If a newer version
3259 than version
2 of the ordinary GNU General Public License has appeared,
3260 then you can specify that version instead if you wish.) Do not make any
3261 other change in these notices.
</P>
3262 <P>Once this change is made in a given copy, it is irreversible for that
3263 copy, so the ordinary GNU General Public License applies to all
3264 subsequent copies and derivative works made from that copy.
</P>
3265 <P>This option is useful when you wish to copy part of the code of the
3266 Library into a program that is not a library.
</P>
3267 <P><STRONG>4.
</STRONG> You may copy and distribute the Library (or a
3268 portion or derivative of it, under Section
2) in object code or
3269 executable form under the terms of Sections
1 and
2 above provided that
3270 you accompany it with the complete corresponding machine-readable
3271 source code, which must be distributed under the terms of Sections
1
3272 and
2 above on a medium customarily used for software interchange.
</P>
3273 <P>If distribution of object code is made by offering access to copy
3274 from a designated place, then offering equivalent access to copy the
3275 source code from the same place satisfies the requirement to distribute
3276 the source code, even though third parties are not compelled to copy
3277 the source along with the object code.
</P>
3278 <P><STRONG>5.
</STRONG> A program that contains no derivative of any
3279 portion of the Library, but is designed to work with the Library by
3280 being compiled or linked with it, is called a
"work that uses the
3281 Library
". Such a work, in isolation, is not a derivative work of the
3282 Library, and therefore falls outside the scope of this License.
</P>
3283 <P>However, linking a
"work that uses the Library
" with the Library
3284 creates an executable that is a derivative of the Library (because it
3285 contains portions of the Library), rather than a
"work that uses the
3286 library
". The executable is therefore covered by this License. Section
3287 6 states terms for distribution of such executables.
</P>
3288 <P>When a
"work that uses the Library
" uses material from a header file
3289 that is part of the Library, the object code for the work may be a
3290 derivative work of the Library even though the source code is not.
3291 Whether this is true is especially significant if the work can be
3292 linked without the Library, or if the work is itself a library. The
3293 threshold for this to be true is not precisely defined by law.
</P>
3294 <P>If such an object file uses only numerical parameters, data structure
3295 layouts and accessors, and small macros and small inline functions (ten
3296 lines or less in length), then the use of the object file is
3297 unrestricted, regardless of whether it is legally a derivative work.
3298 (Executables containing this object code plus portions of the Library
3299 will still fall under Section
6.)
</P>
3300 <P>Otherwise, if the work is a derivative of the Library, you may
3301 distribute the object code for the work under the terms of Section
6.
3302 Any executables containing that work also fall under Section
6, whether
3303 or not they are linked directly with the Library itself.
</P>
3304 <P><STRONG>6.
</STRONG> As an exception to the Sections above, you may
3305 also compile or link a
"work that uses the Library
" with the Library to
3306 produce a work containing portions of the Library, and distribute that
3307 work under terms of your choice, provided that the terms permit
3308 modification of the work for the customer's own use and reverse
3309 engineering for debugging such modifications.
</P>
3310 <P>You must give prominent notice with each copy of the work that the
3311 Library is used in it and that the Library and its use are covered by
3312 this License. You must supply a copy of this License. If the work
3313 during execution displays copyright notices, you must include the
3314 copyright notice for the Library among them, as well as a reference
3315 directing the user to the copy of this License. Also, you must do one
3316 of these things:
</P>
3318 <LI>Accompany the work with the complete corresponding machine-readable
3319 source code for the Library including whatever changes were used in the
3320 work (which must be distributed under Sections
1 and
2 above); and, if
3321 the work is an executable linked with the Library, with the complete
3322 machine-readable
"work that uses the Library
", as object code and/or
3323 source code, so that the user can modify the Library and then relink to
3324 produce a modified executable containing the modified Library. (It is
3325 understood that the user who changes the contents of definitions files
3326 in the Library will not necessarily be able to recompile the
3327 application to use the modified definitions.)
3329 <LI>Accompany the work with a written offer, valid for at least three
3330 years, to give the same user the materials specified in Subsection
6a,
3331 above, for a charge no more than the cost of performing this
3334 <LI>If distribution of the work is made by offering access to copy from
3335 a designated place, offer equivalent access to copy the above specified
3336 materials from the same place.
3338 <LI>Verify that the user has already received a copy of these materials
3339 or that you have already sent this user a copy.
</LI>
3344 <P>For an executable, the required form of the
"work that uses the
3345 Library
" must include any data and utility programs needed for
3346 reproducing the executable from it. However, as a special exception,
3347 the source code distributed need not include anything that is normally
3348 distributed (in either source or binary form) with the major components
3349 (compiler, kernel, and so on) of the operating system on which the
3350 executable runs, unless that component itself accompanies the
3352 <P>It may happen that this requirement contradicts the license
3353 restrictions of other proprietary libraries that do not normally
3354 accompany the operating system. Such a contradiction means you cannot
3355 use both them and the Library together in an executable that you
3357 <P><STRONG>7.
</STRONG> You may place library facilities that are a work
3358 based on the Library side-by-side in a single library together with
3359 other library facilities not covered by this License, and distribute
3360 such a combined library, provided that the separate distribution of the
3361 work based on the Library and of the other library facilities is
3362 otherwise permitted, and provided that you do these two things:
</P>
3364 <LI>Accompany the combined library with a copy of the same work based on
3365 the Library, uncombined with any other library facilities. This must be
3366 distributed under the terms of the Sections above.
3368 <LI>Give prominent notice with the combined library of the fact that
3369 part of it is a work based on the Library, and explaining where to find
3370 the accompanying uncombined form of the same work.
</LI>
3373 <P><STRONG>8.
</STRONG> You may not copy, modify, sublicense, link with,
3374 or distribute the Library except as expressly provided under this
3375 License. Any attempt otherwise to copy, modify, sublicense, link with,
3376 or distribute the Library is void, and will automatically terminate
3377 your rights under this License. However, parties who have received
3378 copies, or rights, from you under this License will not have their
3379 licenses terminated so long as such parties remain in full compliance.
</P>
3380 <P><STRONG>9.
</STRONG> You are not required to accept this License,
3381 since you have not signed it. However, nothing else grants you
3382 permission to modify or distribute the Library or its derivative works.
3383 These actions are prohibited by law if you do not accept this License.
3384 Therefore, by modifying or distributing the Library (or any work based
3385 on the Library), you indicate your acceptance of this License to do so,
3386 and all its terms and conditions for copying, distributing or modifying
3387 the Library or works based on it.
</P>
3388 <P><STRONG>10.
</STRONG> Each time you redistribute the Library (or any
3389 work based on the Library), the recipient automatically receives a
3390 license from the original licensor to copy, distribute, link with or
3391 modify the Library subject to these terms and conditions. You may not
3392 impose any further restrictions on the recipients' exercise of the
3393 rights granted herein. You are not responsible for enforcing compliance
3394 by third parties to this License.
</P>
3395 <P><STRONG>11.
</STRONG> If, as a consequence of a court judgment or
3396 allegation of patent infringement or for any other reason (not limited
3397 to patent issues), conditions are imposed on you (whether by court
3398 order, agreement or otherwise) that contradict the conditions of this
3399 License, they do not excuse you from the conditions of this License. If
3400 you cannot distribute so as to satisfy simultaneously your obligations
3401 under this License and any other pertinent obligations, then as a
3402 consequence you may not distribute the Library at all. For example, if
3403 a patent license would not permit royalty-free redistribution of the
3404 Library by all those who receive copies directly or indirectly through
3405 you, then the only way you could satisfy both it and this License would
3406 be to refrain entirely from distribution of the Library.
</P>
3407 <P>If any portion of this section is held invalid or unenforceable under
3408 any particular circumstance, the balance of the section is intended to
3409 apply, and the section as a whole is intended to apply in other
3411 <P>It is not the purpose of this section to induce you to infringe any
3412 patents or other property right claims or to contest validity of any
3413 such claims; this section has the sole purpose of protecting the
3414 integrity of the free software distribution system which is implemented
3415 by public license practices. Many people have made generous
3416 contributions to the wide range of software distributed through that
3417 system in reliance on consistent application of that system; it is up
3418 to the author/donor to decide if he or she is willing to distribute
3419 software through any other system and a licensee cannot impose that
3421 <P>This section is intended to make thoroughly clear what is believed to
3422 be a consequence of the rest of this License.
</P>
3423 <P><STRONG>12.
</STRONG> If the distribution and/or use of the Library is
3424 restricted in certain countries either by patents or by copyrighted
3425 interfaces, the original copyright holder who places the Library under
3426 this License may add an explicit geographical distribution limitation
3427 excluding those countries, so that distribution is permitted only in or
3428 among countries not thus excluded. In such case, this License
3429 incorporates the limitation as if written in the body of this License.
</P>
3430 <P><STRONG>13.
</STRONG> The Free Software Foundation may publish revised
3431 and/or new versions of the Library General Public License from time to
3432 time. Such new versions will be similar in spirit to the present
3433 version, but may differ in detail to address new problems or concerns.
</P>
3434 <P>Each version is given a distinguishing version number. If the Library
3435 specifies a version number of this License which applies to it and
"any
3436 later version
", you have the option of following the terms and
3437 conditions either of that version or of any later version published by
3438 the Free Software Foundation. If the Library does not specify a license
3439 version number, you may choose any version ever published by the Free
3440 Software Foundation.
</P>
3441 <P><STRONG>14.
</STRONG> If you wish to incorporate parts of the Library
3442 into other free programs whose distribution conditions are incompatible
3443 with these, write to the author to ask for permission. For software
3444 which is copyrighted by the Free Software Foundation, write to the Free
3445 Software Foundation; we sometimes make exceptions for this. Our
3446 decision will be guided by the two goals of preserving the free status
3447 of all derivatives of our free software and of promoting the sharing
3448 and reuse of software generally.
</P>
3449 <P><STRONG>NO WARRANTY
</STRONG></P>
3450 <P><STRONG>15.
</STRONG> BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE,
3451 THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY
3452 APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
3453 HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY
"AS IS
" WITHOUT
3454 WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
3455 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
3456 PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE
3457 OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU
3458 ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
</P>
3459 <P><STRONG>16.
</STRONG> IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR
3460 AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO
3461 MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE
3462 LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL
3463 OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
3464 LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
3465 RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
3466 FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
3467 SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
3469 <H4>END OF TERMS AND CONDITIONS
</H4>
3470 <H1 ALIGN=
"RIGHT"><A NAME=
"CONSTANTS">B - Constants
</A></H1>
3471 <P>This appendix lists all of the constants that are defined by the CUPS
3473 <H2><A NAME=
"8_1">CUPS Constants
</A></H2>
3474 <H3><A NAME=
"8_1_1">Version Number
</A></H3>
3475 <P>The
<CODE>CUPS_VERSION
</CODE> constant is a floating-point number
3476 representing the API version number. The current version number is
3477 1.0100 which represents CUPS version
1.1.0.
</P>
3478 <H3><A NAME=
"8_1_2">Printer Capabilities
</A></H3>
3479 <P>The
<CODE>CUPS_PRINTER
</CODE> constants represent capability bits for
3480 printers and classes:
</P>
3482 <LI><CODE>CUPS_PRINTER_LOCAL
</CODE> - Is a local printer or class.
</LI>
3483 <LI><CODE>CUPS_PRINTER_REMOTE
</CODE> - Is a remote printer or class.
</LI>
3484 <LI><CODE>CUPS_PRINTER_CLASS
</CODE> - Is a class.
</LI>
3485 <LI><CODE>CUPS_PRINTER_BW
</CODE> - Printer prints in black and white.
</LI>
3486 <LI><CODE>CUPS_PRINTER_COLOR
</CODE> - Printer prints in color.
</LI>
3487 <LI><CODE>CUPS_PRINTER_DUPLEX
</CODE> - Printer can print double-sided.
</LI>
3488 <LI><CODE>CUPS_PRINTER_STAPLE
</CODE> - Printer can staple output.
</LI>
3489 <LI><CODE>CUPS_PRINTER_COPIES
</CODE> - Printer can produce multiple
3490 copies on its own.
</LI>
3491 <LI><CODE>CUPS_PRINTER_COLLATE
</CODE> - Printer can collate copies.
</LI>
3492 <LI><CODE>CUPS_PRINTER_PUNCH
</CODE> - Printer can punch holes in output.
</LI>
3493 <LI><CODE>CUPS_PRINTER_COVER
</CODE> - Printer can put covers on output.
</LI>
3494 <LI><CODE>CUPS_PRINTER_BIND
</CODE> - Printer can bind output.
</LI>
3495 <LI><CODE>CUPS_PRINTER_SORT
</CODE> - Printer can sort output.
</LI>
3496 <LI><CODE>CUPS_PRINTER_SMALL
</CODE> - Printer can print on media up to
3498 <LI><CODE>CUPS_PRINTER_MEDIUM
</CODE> - Printer can print on media from
3499 9x14 to
18x24 inches.
</LI>
3500 <LI><CODE>CUPS_PRINTER_LARGE
</CODE> - Printer can print on media larger
3501 than
18x24 inches.
</LI>
3502 <LI><CODE>CUPS_PRINTER_VARIABLE
</CODE> - Printer can print on variable
3503 or custom media sizes.
</LI>
3504 <LI><CODE>CUPS_PRINTER_IMPLICIT
</CODE> - Is an implicit class.
</LI>
3505 <LI><CODE>CUPS_PRINTER_OPTIONS
</CODE> - All of the printer capability
3506 and option bits.
</LI>
3508 <H3><A NAME=
"8_1_3">Encodings
</A></H3>
3509 <P>CUPS defines the following character set encoding constants:
</P>
3511 <LI><CODE>CUPS_US_ASCII
</CODE> - US ASCII character set.
</LI>
3512 <LI><CODE>CUPS_UTF_8
</CODE> - UTF-
8 encoding of Unicode.
</LI>
3513 <LI><CODE>CUPS_ISO8859_1
</CODE> - ISO-
8859-
1 character set.
</LI>
3514 <LI><CODE>CUPS_ISO8859_2
</CODE> - ISO-
8859-
2 character set.
</LI>
3515 <LI><CODE>CUPS_ISO8859_3
</CODE> - ISO-
8859-
3 character set.
</LI>
3516 <LI><CODE>CUPS_ISO8859_4
</CODE> - ISO-
8859-
4 character set.
</LI>
3517 <LI><CODE>CUPS_ISO8859_5
</CODE> - ISO-
8859-
5 character set.
</LI>
3518 <LI><CODE>CUPS_ISO8859_6
</CODE> - ISO-
8859-
6 character set.
</LI>
3519 <LI><CODE>CUPS_ISO8859_7
</CODE> - ISO-
8859-
7 character set.
</LI>
3520 <LI><CODE>CUPS_ISO8859_8
</CODE> - ISO-
8859-
8 character set.
</LI>
3521 <LI><CODE>CUPS_ISO8859_9
</CODE> - ISO-
8859-
9 character set.
</LI>
3522 <LI><CODE>CUPS_ISO8859_10
</CODE> - ISO-
8859-
10 character set.
</LI>
3523 <LI><CODE>CUPS_ISO8859_13
</CODE> - ISO-
8859-
13 character set.
</LI>
3524 <LI><CODE>CUPS_ISO8859_14
</CODE> - ISO-
8859-
14 character set.
</LI>
3525 <LI><CODE>CUPS_ISO8859_15
</CODE> - ISO-
8859-
15 character set.
</LI>
3526 <LI><CODE>CUPS_WINDOWS_874
</CODE> - Windows code page
874.
</LI>
3527 <LI><CODE>CUPS_WINDOWS_1250
</CODE> - Windows code page
1250.
</LI>
3528 <LI><CODE>CUPS_WINDOWS_1251
</CODE> - Windows code page
1251.
</LI>
3529 <LI><CODE>CUPS_WINDOWS_1252
</CODE> - Windows code page
1252.
</LI>
3530 <LI><CODE>CUPS_WINDOWS_1253
</CODE> - Windows code page
1253.
</LI>
3531 <LI><CODE>CUPS_WINDOWS_1254
</CODE> - Windows code page
1254.
</LI>
3532 <LI><CODE>CUPS_WINDOWS_1255
</CODE> - Windows code page
1255.
</LI>
3533 <LI><CODE>CUPS_WINDOWS_1256
</CODE> - Windows code page
1256.
</LI>
3534 <LI><CODE>CUPS_WINDOWS_1257
</CODE> - Windows code page
1257.
</LI>
3535 <LI><CODE>CUPS_WINDOWS_1258
</CODE> - Windows code page
1258.
</LI>
3536 <LI><CODE>CUPS_KOI8_R
</CODE> - Russian code page koi8-r.
</LI>
3537 <LI><CODE>CUPS_KOI8_U
</CODE> - Ukrainian code page koi8-r.
</LI>
3539 <H2><A NAME=
"8_2">HTTP Constants
</A></H2>
3540 <H3><A NAME=
"8_2_1">Limits
</A></H3>
3541 <P>The following constants define the limits for strings:
</P>
3543 <LI><CODE>HTTP_MAX_BUFFER
</CODE> - Size of socket buffer.
</LI>
3544 <LI><CODE>HTTP_MAX_HOST
</CODE> - Maximum length of hostname.
</LI>
3545 <LI><CODE>HTTP_MAX_URI
</CODE> - Maximum length of URI.
</LI>
3546 <LI><CODE>HTTP_MAX_VALUE
</CODE> - Maximum length of field values.
</LI>
3548 <H3><A NAME=
"8_2_2">Status Codes
</A></H3>
3549 <P>The following status codes can be returned by
<CODE>httpUpdate()
</CODE>
3552 <LI><CODE>HTTP_ERROR
</CODE> - A network error occurred
</LI>
3553 <LI><CODE>HTTP_CONTINUE
</CODE> - Continue response from HTTP proxy
</LI>
3554 <LI><CODE>HTTP_OK
</CODE> - OPTIONS/GET/HEAD/POST/TRACE command was
3556 <LI><CODE>HTTP_CREATED
</CODE> - PUT command was successful
</LI>
3557 <LI><CODE>HTTP_ACCEPTED
</CODE> - DELETE command was successful
</LI>
3558 <LI><CODE>HTTP_NOT_AUTHORITATIVE
</CODE> - Information isn't
3560 <LI><CODE>HTTP_NO_CONTENT
</CODE> - Successful command
</LI>
3561 <LI><CODE>HTTP_RESET_CONTENT
</CODE> - Content was reset/recreated
</LI>
3562 <LI><CODE>HTTP_PARTIAL_CONTENT
</CODE> - Only a partial file was
3564 <LI><CODE>HTTP_MULTIPLE_CHOICES
</CODE> - Multiple files match request
</LI>
3565 <LI><CODE>HTTP_MOVED_PERMANENTLY
</CODE> - Document has moved permanently
</LI>
3566 <LI><CODE>HTTP_MOVED_TEMPORARILY
</CODE> - Document has moved temporarily
</LI>
3567 <LI><CODE>HTTP_SEE_OTHER
</CODE> - See this other link...
</LI>
3568 <LI><CODE>HTTP_NOT_MODIFIED
</CODE> - File not modified
</LI>
3569 <LI><CODE>HTTP_USE_PROXY
</CODE> - Must use a proxy to access this URI
</LI>
3570 <LI><CODE>HTTP_BAD_REQUEST
</CODE> - Bad request
</LI>
3571 <LI><CODE>HTTP_UNAUTHORIZED
</CODE> - Unauthorized to access host
</LI>
3572 <LI><CODE>HTTP_PAYMENT_REQUIRED
</CODE> - Payment required
</LI>
3573 <LI><CODE>HTTP_FORBIDDEN
</CODE> - Forbidden to access this URI
</LI>
3574 <LI><CODE>HTTP_NOT_FOUND
</CODE> - URI was not found
</LI>
3575 <LI><CODE>HTTP_METHOD_NOT_ALLOWED
</CODE> - Method is not allowed
</LI>
3576 <LI><CODE>HTTP_NOT_ACCEPTABLE
</CODE> - Not Acceptable
</LI>
3577 <LI><CODE>HTTP_PROXY_AUTHENTICATION
</CODE> - Proxy Authentication is
3579 <LI><CODE>HTTP_REQUEST_TIMEOUT
</CODE> - Request timed out
</LI>
3580 <LI><CODE>HTTP_CONFLICT
</CODE> - Request is self-conflicting
</LI>
3581 <LI><CODE>HTTP_GONE
</CODE> - Server has gone away
</LI>
3582 <LI><CODE>HTTP_LENGTH_REQUIRED
</CODE> - A content length or encoding is
3584 <LI><CODE>HTTP_PRECONDITION
</CODE> - Precondition failed
</LI>
3585 <LI><CODE>HTTP_REQUEST_TOO_LARGE
</CODE> - Request entity too large
</LI>
3586 <LI><CODE>HTTP_URI_TOO_LONG
</CODE> - URI too long
</LI>
3587 <LI><CODE>HTTP_UNSUPPORTED_MEDIATYPE
</CODE> - The requested media type
3589 <LI><CODE>HTTP_SERVER_ERROR
</CODE> - Internal server error
</LI>
3590 <LI><CODE>HTTP_NOT_IMPLEMENTED
</CODE> - Feature not implemented
</LI>
3591 <LI><CODE>HTTP_BAD_GATEWAY
</CODE> - Bad gateway
</LI>
3592 <LI><CODE>HTTP_SERVICE_UNAVAILABLE
</CODE> - Service is unavailable
</LI>
3593 <LI><CODE>HTTP_GATEWAY_TIMEOUT
</CODE> - Gateway connection timed out
</LI>
3594 <LI><CODE>HTTP_NOT_SUPPORTED
</CODE> - HTTP version not supported
</LI>
3596 <H3><A NAME=
"8_2_3">Fields
</A></H3>
3597 <P>The following fields are indices for each of the standard HTTP fields
3600 <LI><CODE>HTTP_FIELD_ACCEPT_LANGUAGE
</CODE> - Accept-Language
</LI>
3601 <LI><CODE>HTTP_FIELD_ACCEPT_RANGES
</CODE> - Accept-Ranges
</LI>
3602 <LI><CODE>HTTP_FIELD_AUTHORIZATION
</CODE> - Authorization
</LI>
3603 <LI><CODE>HTTP_FIELD_CONNECTION
</CODE> - Connection
</LI>
3604 <LI><CODE>HTTP_FIELD_CONTENT_ENCODING
</CODE> - Content-Encoding
</LI>
3605 <LI><CODE>HTTP_FIELD_CONTENT_LANGUAGE
</CODE> - Content-Language
</LI>
3606 <LI><CODE>HTTP_FIELD_CONTENT_LENGTH
</CODE> - Content-Length
</LI>
3607 <LI><CODE>HTTP_FIELD_CONTENT_LOCATION
</CODE> - Content-Location
</LI>
3608 <LI><CODE>HTTP_FIELD_CONTENT_MD5
</CODE> - Content-MD5
</LI>
3609 <LI><CODE>HTTP_FIELD_CONTENT_RANGE
</CODE> - Content-Range
</LI>
3610 <LI><CODE>HTTP_FIELD_CONTENT_TYPE
</CODE> - Content-Type
</LI>
3611 <LI><CODE>HTTP_FIELD_CONTENT_VERSION
</CODE> - Content-Version
</LI>
3612 <LI><CODE>HTTP_FIELD_DATE
</CODE> - Date
</LI>
3613 <LI><CODE>HTTP_FIELD_HOST
</CODE> - Host
</LI>
3614 <LI><CODE>HTTP_FIELD_IF_MODIFIED_SINCE
</CODE> - If-Modified-Since
</LI>
3615 <LI><CODE>HTTP_FIELD_IF_UNMODIFIED_SINCE
</CODE> - If-Unmodified-Since
</LI>
3616 <LI><CODE>HTTP_FIELD_KEEP_ALIVE
</CODE> - Keep-Alive
</LI>
3617 <LI><CODE>HTTP_FIELD_LAST_MODIFIED
</CODE> - Last-Modified
</LI>
3618 <LI><CODE>HTTP_FIELD_LINK
</CODE> - Link
</LI>
3619 <LI><CODE>HTTP_FIELD_LOCATION
</CODE> - Location
</LI>
3620 <LI><CODE>HTTP_FIELD_RANGE
</CODE> - Range
</LI>
3621 <LI><CODE>HTTP_FIELD_REFERER
</CODE> - Referer
</LI>
3622 <LI><CODE>HTTP_FIELD_RETRY_AFTER
</CODE> - Retry-After
</LI>
3623 <LI><CODE>HTTP_FIELD_TRANSFER_ENCODING
</CODE> - Transfer-Encoding
</LI>
3624 <LI><CODE>HTTP_FIELD_UPGRADE
</CODE> - Upgrade
</LI>
3625 <LI><CODE>HTTP_FIELD_USER_AGENT
</CODE> - User-Agent
</LI>
3626 <LI><CODE>HTTP_FIELD_WWW_AUTHENTICATE
</CODE> - WWW-Authenticate
</LI>
3628 <H2><A NAME=
"8_3">IPP Constants
</A></H2>
3629 <H3><A NAME=
"8_3_1">Limits
</A></H3>
3630 <P>The following constants define array limits for IPP data:
</P>
3632 <LI><CODE>IPP_MAX_NAME
</CODE> - Maximum length of an attribute name
</LI>
3633 <LI><CODE>IPP_MAX_VALUES
</CODE> - Maximum number of set-of values that
3634 can be read in a request.
</LI>
3636 <H3><A NAME=
"8_3_2">Tags
</A></H3>
3638 <LI><CODE>IPP_TAG_ZERO
</CODE> - Wildcard tag value for searches; also
3639 used to separate groups of attributes
</LI>
3640 <LI><CODE>IPP_TAG_OPERATION
</CODE> - Tag for values of type operation
</LI>
3641 <LI><CODE>IPP_TAG_JOB
</CODE> - Tag for values of type job
</LI>
3642 <LI><CODE>IPP_TAG_END
</CODE> - Tag for values of type end
</LI>
3643 <LI><CODE>IPP_TAG_PRINTER
</CODE> - Tag for values of type printer
</LI>
3644 <LI><CODE>IPP_TAG_UNSUPPORTED_GROUP
</CODE> - Tag for values of type
3645 unsupported_group
</LI>
3646 <LI><CODE>IPP_TAG_UNSUPPORTED_VALUE
</CODE> - Tag for values of type
3647 unsupported_value
</LI>
3648 <LI><CODE>IPP_TAG_DEFAULT
</CODE> - Tag for values of type default
</LI>
3649 <LI><CODE>IPP_TAG_UNKNOWN
</CODE> - Tag for values of type unknown
</LI>
3650 <LI><CODE>IPP_TAG_NOVALUE
</CODE> - Tag for values of type novalue
</LI>
3651 <LI><CODE>IPP_TAG_NOTSETTABLE
</CODE> - Tag for values of type
3653 <LI><CODE>IPP_TAG_DELETEATTR
</CODE> - Tag for values of type deleteattr
</LI>
3654 <LI><CODE>IPP_TAG_ANYVALUE
</CODE> - Tag for values of type anyvalue
</LI>
3655 <LI><CODE>IPP_TAG_INTEGER
</CODE> - Tag for values of type integer
</LI>
3656 <LI><CODE>IPP_TAG_BOOLEAN
</CODE> - Tag for values of type boolean
</LI>
3657 <LI><CODE>IPP_TAG_ENUM
</CODE> - Tag for values of type enum
</LI>
3658 <LI><CODE>IPP_TAG_STRING
</CODE> - Tag for values of type string
</LI>
3659 <LI><CODE>IPP_TAG_DATE
</CODE> - Tag for values of type date
</LI>
3660 <LI><CODE>IPP_TAG_RESOLUTION
</CODE> - Tag for values of type resolution
</LI>
3661 <LI><CODE>IPP_TAG_RANGE
</CODE> - Tag for values of type range
</LI>
3662 <LI><CODE>IPP_TAG_COLLECTION
</CODE> - Tag for values of type collection
</LI>
3663 <LI><CODE>IPP_TAG_TEXTLANG
</CODE> - Tag for values of type textlang
</LI>
3664 <LI><CODE>IPP_TAG_NAMELANG
</CODE> - Tag for values of type namelang
</LI>
3665 <LI><CODE>IPP_TAG_TEXT
</CODE> - Tag for values of type text
</LI>
3666 <LI><CODE>IPP_TAG_NAME
</CODE> - Tag for values of type name
</LI>
3667 <LI><CODE>IPP_TAG_KEYWORD
</CODE> - Tag for values of type keyword
</LI>
3668 <LI><CODE>IPP_TAG_URI
</CODE> - Tag for values of type uri
</LI>
3669 <LI><CODE>IPP_TAG_URISCHEME
</CODE> - Tag for values of type urischeme
</LI>
3670 <LI><CODE>IPP_TAG_CHARSET
</CODE> - Tag for values of type charset
</LI>
3671 <LI><CODE>IPP_TAG_LANGUAGE
</CODE> - Tag for values of type language
</LI>
3672 <LI><CODE>IPP_TAG_MIMETYPE
</CODE> - Tag for values of type mimetype
</LI>
3674 <H3><A NAME=
"8_3_3">Resolution Units
</A></H3>
3675 <P>The
<CODE>IPP_RES_PER_INCH
</CODE> and
<CODE>IPP_RES_PER_CM
</CODE>
3676 constants specify dots per inch and dots per centimeter, respectively.
</P>
3677 <H3><A NAME=
"8_3_4">Finishings
</A></H3>
3678 <P>The finishing values specify special finishing operations to be
3679 performed on the job.
</P>
3681 <LI><CODE>IPP_FINISH_NONE
</CODE> - Do no finishing
</LI>
3682 <LI><CODE>IPP_FINISH_STAPLE
</CODE> - Staple the job
</LI>
3683 <LI><CODE>IPP_FINISH_PUNCH
</CODE> - Punch the job
</LI>
3684 <LI><CODE>IPP_FINISH_COVER
</CODE> - Cover the job
</LI>
3685 <LI><CODE>IPP_FINISH_BIND
</CODE> - Bind the job
</LI>
3687 <H3><A NAME=
"8_3_5">Orientations
</A></H3>
3688 <P>The orientation values specify the orientation of the job.
</P>
3690 <LI><CODE>IPP_PORTRAIT
</CODE> - No rotation
</LI>
3691 <LI><CODE>IPP_LANDSCAPE
</CODE> -
90 degrees counter-clockwise
</LI>
3692 <LI><CODE>IPP_REVERSE_LANDSCAPE
</CODE> -
90 degrees clockwise
</LI>
3693 <LI><CODE>IPP_REVERSE_PORTRAIT
</CODE> -
180 degrees
</LI>
3695 <H3><A NAME=
"8_3_6">Qualities
</A></H3>
3696 <P>The quality values specify the desired quality of the print.
</P>
3698 <LI><CODE>IPP_QUALITY_DRAFT
</CODE> - Draft quality
</LI>
3699 <LI><CODE>IPP_QUALITY_NORMAL
</CODE> - Normal quality
</LI>
3700 <LI><CODE>IPP_QUALITY_HIGH
</CODE> - High quality
</LI>
3702 <H3><A NAME=
"8_3_7">Job States
</A></H3>
3703 <P>The job state values are used to represent the current job state.
</P>
3705 <LI><CODE>IPP_JOB_PENDING
</CODE> - Job is pending
</LI>
3706 <LI><CODE>IPP_JOB_HELD
</CODE> - Job is held
</LI>
3707 <LI><CODE>IPP_JOB_PROCESSING
</CODE> - Job is processing
</LI>
3708 <LI><CODE>IPP_JOB_STOPPED
</CODE> - Job is stopped
</LI>
3709 <LI><CODE>IPP_JOB_CANCELLED
</CODE> - Job is cancelled
</LI>
3710 <LI><CODE>IPP_JOB_ABORTED
</CODE> - Job is aborted
</LI>
3711 <LI><CODE>IPP_JOB_COMPLETED
</CODE> - Job is completed
</LI>
3713 <H3><A NAME=
"8_3_8">Printer States
</A></H3>
3714 <P>The printer state values are used to represent the current printer
3717 <LI><CODE>IPP_PRINTER_IDLE
</CODE> - Printer is idle
</LI>
3718 <LI><CODE>IPP_PRINTER_PROCESSING
</CODE> - Printer is processing
</LI>
3719 <LI><CODE>IPP_PRINTER_STOPPED
</CODE> - Printer is stopped
</LI>
3721 <H3><A NAME=
"8_3_9">Operations
</A></H3>
3722 <P>The operation values represent the available IPP operations.
</P>
3724 <LI><CODE>IPP_PRINT_JOB
</CODE> - Print a file
</LI>
3725 <LI><CODE>IPP_PRINT_URI
</CODE> - Print a URI
</LI>
3726 <LI><CODE>IPP_VALIDATE_JOB
</CODE> - Validate job attributes
</LI>
3727 <LI><CODE>IPP_CREATE_JOB
</CODE> - Create a new job
</LI>
3728 <LI><CODE>IPP_SEND_DOCUMENT
</CODE> - Send a document to a job
</LI>
3729 <LI><CODE>IPP_SEND_URI
</CODE> - Send a URI to a job
</LI>
3730 <LI><CODE>IPP_CANCEL_JOB
</CODE> - Cancel a job
</LI>
3731 <LI><CODE>IPP_GET_JOB_ATTRIBUTES
</CODE> - Get job attributes
</LI>
3732 <LI><CODE>IPP_GET_JOBS
</CODE> - Get a list of all jobs
</LI>
3733 <LI><CODE>IPP_GET_PRINTER_ATTRIBUTES
</CODE> - Get printer attributes
</LI>
3734 <LI><CODE>IPP_HOLD_JOB
</CODE> - Hold a pending job
</LI>
3735 <LI><CODE>IPP_RELEASE_JOB
</CODE> - Release a held job
</LI>
3736 <LI><CODE>IPP_RESTART_JOB
</CODE> - Restart a completed job
</LI>
3737 <LI><CODE>IPP_PAUSE_PRINTER
</CODE> - Pause a printer
</LI>
3738 <LI><CODE>IPP_RESUME_PRINTER
</CODE> - Restart a paused printer
</LI>
3739 <LI><CODE>IPP_PURGE_JOBS
</CODE> - Purge jobs from the queue
</LI>
3740 <LI><CODE>IPP_SET_PRINTER_ATTRIBUTES
</CODE> - Set printer attributes
</LI>
3741 <LI><CODE>IPP_SET_JOB_ATTRIBUTES
</CODE> - Set job attributes
</LI>
3742 <LI><CODE>IPP_GET_PRINTER_SUPPORTED_VALUES
</CODE> - Get printer
3743 supported values
</LI>
3744 <LI><CODE>CUPS_GET_DEFAULT
</CODE> - Get the default destination
</LI>
3745 <LI><CODE>CUPS_GET_PRINTERS
</CODE> - Get a list of all printers
</LI>
3746 <LI><CODE>CUPS_ADD_PRINTER
</CODE> - Add or modify a printer
</LI>
3747 <LI><CODE>CUPS_DELETE_PRINTER
</CODE> - Delete a printer
</LI>
3748 <LI><CODE>CUPS_GET_CLASSES
</CODE> - Get a list of all classes
</LI>
3749 <LI><CODE>CUPS_ADD_CLASS
</CODE> - Add or modify a class
</LI>
3750 <LI><CODE>CUPS_DELETE_CLASS
</CODE> - Delete a class
</LI>
3751 <LI><CODE>CUPS_ACCEPT_JOBS
</CODE> - Accept jobs on a printer or class
</LI>
3752 <LI><CODE>CUPS_REJECT_JOBS
</CODE> - Reject jobs on a printer or class
</LI>
3753 <LI><CODE>CUPS_SET_DEFAULT
</CODE> - Set the default destination
</LI>
3754 <LI><CODE>CUPS_GET_DEVICES
</CODE> - Get a list of all devices
</LI>
3755 <LI><CODE>CUPS_GET_PPDS
</CODE> - Get a list of all PPDs
</LI>
3756 <LI><CODE>CUPS_MOVE_JOB
</CODE> - Move a job to a new destination
</LI>
3758 <H3><A NAME=
"8_3_10">Status Codes
</A></H3>
3759 <P>Status codes are returned by all IPP requests.
</P>
3761 <LI><CODE>IPP_OK
</CODE> - Request completed with no errors
</LI>
3762 <LI><CODE>IPP_OK_SUBST
</CODE> - Request completed but some attribute
3763 values were substituted
</LI>
3764 <LI><CODE>IPP_OK_CONFLICT
</CODE> - Request completed but some attributes
3766 <LI><CODE>IPP_BAD_REQUEST
</CODE> - The request was bad
</LI>
3767 <LI><CODE>IPP_FORBIDDEN
</CODE> - You don't have access to the resource
</LI>
3768 <LI><CODE>IPP_NOT_AUTHENTICATED
</CODE> - You are not authenticated for
3770 <LI><CODE>IPP_NOT_AUTHORIZED
</CODE> - You not authorized to access the
3772 <LI><CODE>IPP_NOT_POSSIBLE
</CODE> - The requested operation cannot be
3774 <LI><CODE>IPP_TIMEOUT
</CODE> - A timeout occurred
</LI>
3775 <LI><CODE>IPP_NOT_FOUND
</CODE> - The resource was not found
</LI>
3776 <LI><CODE>IPP_GONE
</CODE> - The resource has gone away
</LI>
3777 <LI><CODE>IPP_REQUEST_ENTITY
</CODE> - The request was too large
</LI>
3778 <LI><CODE>IPP_REQUEST_VALUE
</CODE> - The request contained a value that
3779 was unknown to the server
</LI>
3780 <LI><CODE>IPP_DOCUMENT_FORMAT
</CODE> - The document format is not
3781 supported by the server
</LI>
3782 <LI><CODE>IPP_ATTRIBUTES
</CODE> - Required attributes are missing
</LI>
3783 <LI><CODE>IPP_URI_SCHEME
</CODE> - The URI scheme is not supported
</LI>
3784 <LI><CODE>IPP_CHARSET
</CODE> - The charset is not supported
</LI>
3785 <LI><CODE>IPP_CONFLICT
</CODE> - One or more attributes conflict
</LI>
3786 <LI><CODE>IPP_COMPRESSION_NOT_SUPPORTED
</CODE> - The specified
3787 compression is not supported
</LI>
3788 <LI><CODE>IPP_COMPRESSION_ERROR
</CODE> - The compressed data contained
3790 <LI><CODE>IPP_DOCUMENT_FORMAT_ERROR
</CODE> - The document data contained
3792 <LI><CODE>IPP_DOCUMENT_ACCESS_ERROR
</CODE> - The remote document could
3793 not be accessed
</LI>
3794 <LI><CODE>IPP_INTERNAL_ERROR
</CODE> - The server encountered an internal
3796 <LI><CODE>IPP_OPERATION_NOT_SUPPORTED
</CODE> - The requested operation
3797 is not supported
</LI>
3798 <LI><CODE>IPP_SERVICE_UNAVAILABLE
</CODE> - The requested service is
3800 <LI><CODE>IPP_VERSION_NOT_SUPPORTED
</CODE> - The IPP request version is
3802 <LI><CODE>IPP_DEVICE_ERROR
</CODE> - The output device encountered an
3804 <LI><CODE>IPP_TEMPORARY_ERROR
</CODE> - A temporary error occurred
</LI>
3805 <LI><CODE>IPP_NOT_ACCEPTING
</CODE> - The destination is not accepting
3807 <LI><CODE>IPP_PRINTER_BUSY
</CODE> - The destination is busy
</LI>
3808 <LI><CODE>IPP_ERROR_JOB_CANCELLED
</CODE> - The requested job has been
3810 <LI><CODE>IPP_MULTIPLE_JOBS_NOT_SUPPORTED
</CODE> - The server does not
3811 support multiple jobs
</LI>
3813 <H2><A NAME=
"8_4">PPD Constants
</A></H2>
3814 <H3><A NAME=
"8_4_1">PPD Format Version
</A></H3>
3815 <P>The
<CODE>PPD_VERSION
</CODE> constant defines a floating point number
3816 representing the newest format version that is supported by CUPS,
3818 <H3><A NAME=
"8_4_2">PPD User-Interface Types
</A></H3>
3819 <P>Each printer option has a type associated with it:
</P>
3821 <LI><CODE>PPD_UI_BOOLEAN
</CODE> - The user can turn this option on or
3823 <LI><CODE>PPD_UI_PICKONE
</CODE> - The user can choose one option value
3825 <LI><CODE>PPD_UI_PICKMANY
</CODE> - The user can choose zero or more
3828 <H3><A NAME=
"8_4_3">PPD Sections
</A></H3>
3829 <P>Some options must be output before others, or in different sections
3830 of the output document. The
<CODE>ppd_section_t
</CODE> enumeration
3831 defines which section the option must be output in:
</P>
3833 <LI><CODE>PPD_ORDER_ANY
</CODE> - The option can be output in any of the
3834 document, page, or prolog sections of the document
</LI>
3835 <LI><CODE>PPD_ORDER_DOCUMENT
</CODE> - The option must be output in the
3836 DocumentSetup section of the document
</LI>
3837 <LI><CODE>PPD_ORDER_EXIT
</CODE> - The option must be output before the
3839 <LI><CODE>PPD_ORDER_JCL
</CODE> - The option must be output in the job
3840 control section of the document
</LI>
3841 <LI><CODE>PPD_ORDER_PAGE
</CODE> - The option must be output in the
3842 PageSetup section of the document
</LI>
3843 <LI><CODE>PPD_ORDER_PROLOG
</CODE> - The option must be output in the
3844 Prolog section of the document
</LI>
3846 <H3><A NAME=
"8_4_4">PPD Colorspaces
</A></H3>
3847 <P>Each printer has a default colorspace:
</P>
3849 <LI><CODE>PPD_CS_CMYK
</CODE> - The printer uses CMYK colors by default
</LI>
3850 <LI><CODE>PPD_CS_CMY
</CODE> - The printer uses CMY colors by default
</LI>
3851 <LI><CODE>PPD_CS_GRAY
</CODE> - The printer uses grayscale by default
</LI>
3852 <LI><CODE>PPD_CS_RGB
</CODE> - The printer uses RGB colors by default
</LI>
3853 <LI><CODE>PPD_CS_RGBK
</CODE> - The printer uses RGBK colors by default
</LI>
3854 <LI><CODE>PPD_CS_N
</CODE> - The printer uses a DeviceN colorspace by
3857 <H2><A NAME=
"8_5">Raster Constants
</A></H2>
3858 <H3><A NAME=
"8_5_1">Raster Sync Words
</A></H3>
3859 <P>The
<CODE>CUPS_RASTER_SYNC
</CODE> and
<CODE>CUPS_RASTER_REVSYNC
</CODE>
3860 constants define the standard sync words at the beginning of each CUPS
3862 <H3><A NAME=
"8_5_2">Raster Stream Modes
</A></H3>
3863 <P>The
<CODE>CUPS_RASTER_READ
</CODE> and
<CODE>CUPS_RASTER_WRITE
</CODE>
3864 constants are used with the
<A HREF=
"#cupsRasterOpen"> <CODE>
3865 cupsRasterOpen()
</CODE></A> function to specify a stream for reading or
3867 <H3><A NAME=
"8_5_3">Raster Boolean Constants
</A></H3>
3868 <P>The
<CODE>CUPS_FALSE
</CODE> and
<CODE>CUPS_TRUE
</CODE> constants
3869 represent boolean values in the page header.
</P>
3870 <H3><A NAME=
"8_5_4">Raster Jog Values
</A></H3>
3871 <P>The
<CODE>cups_jog_t
</CODE> enumeration defines constants for the Jog
3872 page device dictionary variable:
</P>
3874 <LI><CODE>CUPS_JOG_NONE
</CODE> - Do no jogging
</LI>
3875 <LI><CODE>CUPS_JOG_FILE
</CODE> - Jog pages after each file
</LI>
3876 <LI><CODE>CUPS_JOG_JOB
</CODE> - Jog pages after each job
</LI>
3877 <LI><CODE>CUPS_JOG_SET
</CODE> - Jog pages after each set of jobs
</LI>
3879 <H3><A NAME=
"8_5_5">Raster Orientation Values
</A></H3>
3880 <P>The
<CODE>cups_orient_t
</CODE> enumeration defines constants for the
3881 Orientation page device dictionary variable:
</P>
3883 <LI><CODE>CUPS_ORIENT_0
</CODE> - Portrait orientation
</LI>
3884 <LI><CODE>CUPS_ORIENT_90
</CODE> - Landscape orientation
</LI>
3885 <LI><CODE>CUPS_ORIENT_180
</CODE> - Reverse-portrait orientation
</LI>
3886 <LI><CODE>CUPS_ORIENT_270
</CODE> - Reverse-landscape orientation
</LI>
3888 <H3><A NAME=
"8_5_6">Raster CutMedia Values
</A></H3>
3889 <P>The
<CODE>cups_cut_t
</CODE> enumeration defines constants for the
3890 CutMedia page device dictionary variable:
</P>
3892 <LI><CODE>CUPS_CUT_NONE
</CODE> - Do no jogging
</LI>
3893 <LI><CODE>CUPS_CUT_FILE
</CODE> - Cut pages after each file
</LI>
3894 <LI><CODE>CUPS_CUT_JOB
</CODE> - Cut pages after each job
</LI>
3895 <LI><CODE>CUPS_CUT_SET
</CODE> - Cut pages after each set of jobs
</LI>
3896 <LI><CODE>CUPS_CUT_PAGE
</CODE> - Cut each page
</LI>
3898 <H3><A NAME=
"8_5_7">Raster AdvanceMedia Values
</A></H3>
3899 <P>The
<CODE>cups_advance_t
</CODE> enumeration defines constants for the
3900 AdvanceMedia page device dictionary variable:
</P>
3902 <LI><CODE>CUPS_ADVANCE_NONE
</CODE> - Do no jogging
</LI>
3903 <LI><CODE>CUPS_ADVANCE_FILE
</CODE> - Advance media after each file
</LI>
3904 <LI><CODE>CUPS_ADVANCE_JOB
</CODE> - Advance media after each job
</LI>
3905 <LI><CODE>CUPS_ADVANCE_SET
</CODE> - Advance media after each set of jobs
</LI>
3906 <LI><CODE>CUPS_ADVANCE_PAGE
</CODE> - Advance media for each page
</LI>
3908 <H3><A NAME=
"8_5_8">Raster LeadingEdge Values
</A></H3>
3909 <P>The
<CODE>cups_edge_t
</CODE> enumeration defines constants for the
3910 LeadingEdge page device dictionary variable:
</P>
3912 <LI><CODE>CUPS_EDGE_TOP
</CODE> - The top of the media is the leading
3914 <LI><CODE>CUPS_EDGE_RIGHT
</CODE> - The right of the media is the leading
3916 <LI><CODE>CUPS_EDGE_BOTTOM
</CODE> - The bottom of the media is the
3918 <LI><CODE>CUPS_EDGE_LEFT
</CODE> - The left of the media is the leading
3921 <H3><A NAME=
"8_5_9">Raster Color Order Values
</A></H3>
3922 <P>The
<CODE>cups_order_t
</CODE> enumeration defines the possible color
3923 value orderings:
</P>
3925 <LI><CODE>CUPS_ORDER_CHUNKED
</CODE> - CMYK
CMYK
CMYK
</LI>
3926 <LI><CODE>CUPS_ORDER_BANDED
</CODE> - CCC
MMM
YYY
KKK
</LI>
3927 <LI><CODE>CUPS_ORDER_PLANAR
</CODE> - CCC
...
MMM
...
YYY
...
KKK
...
</LI>
3929 <H3><A NAME=
"8_5_10">Raster Colorspace Values
</A></H3>
3930 <P>The
<CODE>cups_cspace_t
</CODE> enumeration defines the possible
3933 <LI><CODE>CUPS_CSPACE_W
</CODE> - White (luminance)
</LI>
3934 <LI><CODE>CUPS_CSPACE_RGB
</CODE> - Red, green, blue
</LI>
3935 <LI><CODE>CUPS_CSPACE_RGBA
</CODE> - Red, green, blue, alpha
</LI>
3936 <LI><CODE>CUPS_CSPACE_K
</CODE> - Black
</LI>
3937 <LI><CODE>CUPS_CSPACE_CMY
</CODE> - Cyan, magenta, yellow
</LI>
3938 <LI><CODE>CUPS_CSPACE_YMC
</CODE> - Yellow, magenta, cyan
</LI>
3939 <LI><CODE>CUPS_CSPACE_CMYK
</CODE> - Cyan, magenta, yellow, black
</LI>
3940 <LI><CODE>CUPS_CSPACE_YMCK
</CODE> - Yellow, magenta, cyan, black
</LI>
3941 <LI><CODE>CUPS_CSPACE_KCMY
</CODE> - Black, cyan, magenta, yellow
</LI>
3942 <LI><CODE>CUPS_CSPACE_KCMYcm
</CODE> - Black, cyan, magenta, yellow,
3943 light cyan, light magenta
</LI>
3944 <LI><CODE>CUPS_CSPACE_GMCK
</CODE> - Metallic yellow (gold), metallic
3945 magenta, metallic cyan, black
</LI>
3946 <LI><CODE>CUPS_CSPACE_GMCS
</CODE> - Metallic yellow (gold), metallic
3947 magenta, metallic cyan, metallic grey (silver)
</LI>
3948 <LI><CODE>CUPS_CSPACE_WHITE
</CODE> - White pigment (black as white
3950 <LI><CODE>CUPS_CSPACE_GOLD
</CODE> - Gold foil (black as gold foil)
</LI>
3951 <LI><CODE>CUPS_CSPACE_SILVER
</CODE> - Silver foil (black as silver foil)
</LI>
3953 <H1 ALIGN=
"RIGHT"><A NAME=
"STRUCTURES">C - Structures
</A></H1>
3954 <P>This appendix describes all of the structures that are defined by the
3956 <H2><A NAME=
"9_1">CUPS Structures
</A></H2>
3957 <H3><A NAME=
"cups_dest_t">CUPS Destinations
</A></H3>
3958 <P>The CUPS destination structure (
<CODE>cups_dest_t
</CODE>) contains
3959 information on a specific destination or instance:
3961 <TABLE BORDER=
"1" WIDTH=
"90%">
3962 <TR><TH>Member
</TH><TH>Type
</TH><TH>Description
</TH></TR>
3963 <TR><TD>name
</TD><TD>char *
</TD><TD>The name of the printer or class.
</TD>
3965 <TR><TD>instance
</TD><TD>char *
</TD><TD>The instance of the printer or
3966 class; NULL for the primary instance.
</TD></TR>
3967 <TR><TD>is_default
</TD><TD>int
</TD><TD>1 if the destination is set as
3968 the default,
0 otherwise.
</TD></TR>
3969 <TR><TD>num_options
</TD><TD>int
</TD><TD>The number of options associated
3970 with this destination.
</TD></TR>
3971 <TR><TD>options
</TD><TD><A HREF=
"#cups_option_t">cups_option_t *
</A></TD><TD>
3972 The options associated with this destination.
</TD></TR>
3976 <H3><A NAME=
"cups_job_t">CUPS Jobs
</A></H3>
3977 <P>The CUPS job structure (
<CODE>cups_job_t
</CODE>) contains information
3980 <TABLE BORDER=
"1" WIDTH=
"90%">
3981 <TR><TH>Member
</TH><TH>Type
</TH><TH>Description
</TH></TR>
3982 <TR><TD>id
</TD><TD>int
</TD><TD>The job ID for this job.
</TD></TR>
3983 <TR><TD>dest
</TD><TD>char *
</TD><TD>The destination for this job
3984 (printer or class name).
</TD></TR>
3985 <TR><TD>title
</TD><TD>char *
</TD><TD>The job-name for this job (title).
</TD>
3987 <TR><TD>user
</TD><TD>char *
</TD><TD>The job-originating-user-name for
3988 this job (username).
</TD></TR>
3989 <TR><TD>format
</TD><TD>char *
</TD><TD>The document-format for this job
3990 (MIME type string).
</TD></TR>
3991 <TR><TD>state
</TD><TD>ipp_jstate
</TD><TD>The current state of the job.
</TD>
3993 <TR><TD>size
</TD><TD>int
</TD><TD>The size of this job in kilobytes.
</TD></TR>
3994 <TR><TD>priority
</TD><TD>int
</TD><TD>The priority of this job from
1 to
3995 100 (
50 is normal).
</TD></TR>
3996 <TR><TD>completed_time
</TD><TD>time_t
</TD><TD>The time the job was
3997 completed, or
0 if not yet completed.
</TD></TR>
3998 <TR><TD>creation_time
</TD><TD>time_t
</TD><TD>The time the job was
4000 <TR><TD>processing_time
</TD><TD>time_t
</TD><TD>The time the job started
4005 <H3><A NAME=
"cups_lang_t">CUPS Messages
</A></H3>
4006 <P>The CUPS messages structure (
<CODE>cups_lang_t
</CODE>) contains the
4007 character set, locale name, and messages array:
4009 <TABLE BORDER=
"1" WIDTH=
"90%">
4010 <TR><TH>Member
</TH><TH>Type
</TH><TH>Description
</TH></TR>
4011 <TR><TD>next
</TD><TD>cups_lang_t *
</TD><TD>Pointer to the next messages
4012 structure in memory.
</TD></TR>
4013 <TR><TD>used
</TD><TD>int
</TD><TD>The number of active users of this
4014 messages structure.
</TD></TR>
4015 <TR><TD>encoding
</TD><TD>cups_encoding_t
</TD><TD>The character encoding
4016 of the message strings.
</TD></TR>
4017 <TR><TD>language
</TD><TD>char [
16]
</TD><TD>The language/locale name.
</TD>
4019 <TR><TD>messages
</TD><TD>char *[]
</TD><TD>The array of message strings.
</TD>
4024 <H3><A NAME=
"cups_option_t">CUPS Options
</A></H3>
4025 <P>The CUPS option structure (
<CODE>cups_option_t
</CODE>) contains the
4026 option name and string value:
4028 <TABLE BORDER=
"1" WIDTH=
"90%">
4029 <TR><TH>Member
</TH><TH>Type
</TH><TH>Description
</TH></TR>
4030 <TR><TD>name
</TD><TD>char *
</TD><TD>The name of the option.
</TD></TR>
4031 <TR><TD>value
</TD><TD>char *
</TD><TD>The string value of the option.
</TD>
4036 <H2><A NAME=
"9_2">Networking Structures
</A></H2>
4037 <H3><A NAME=
"http_t">HTTP State
</A></H3>
4038 <P>The HTTP state structure (
<CODE>http_t
</CODE>) contains the current
4039 state of a HTTP request or response:
4041 <TABLE BORDER=
"1" WIDTH=
"90%">
4042 <TR><TH>Member
</TH><TH>Type
</TH><TH>Description
</TH></TR>
4043 <TR><TD>fd
</TD><TD>int
</TD><TD>The socket for the HTTP connection.
</TD></TR>
4044 <TR><TD>blocking
</TD><TD>int
</TD><TD>1 if the HTTP functions should
4045 block,
0 if not.
</TD></TR>
4046 <TR><TD>error
</TD><TD>int
</TD><TD>The last OS error that occurred on the
4048 <TR><TD>activity
</TD><TD>time_t
</TD><TD>The last time the HTTP
4049 connection was used.
</TD></TR>
4050 <TR><TD>state
</TD><TD>http_state_t
</TD><TD>The current HTTP
4051 request/response state.
</TD></TR>
4052 <TR><TD>status
</TD><TD>int
</TD><TD>The last HTTP status seen.
</TD></TR>
4053 <TR><TD>version
</TD><TD>http_version_t
</TD><TD>The HTTP protocol version
4055 <TR><TD>keep_alive
</TD><TD>http_keep_alive_t
</TD><TD>Whether or not to
4056 use Keep-Alive
</TD></TR>
4057 <TR><TD>hostaddr
</TD><TD>struct sockaddr_in
</TD><TD>The IPv4 address of
4058 the HTTP server.
</TD></TR>
4059 <TR><TD>hostname
</TD><TD>char []
</TD><TD>The hostname of the HTTP
4061 <TR><TD>fields
</TD><TD>char [][]
</TD><TD>The string values of all HTTP
4062 request/response fields.
</TD></TR>
4063 <TR><TD>data
</TD><TD>char *
</TD><TD>Current byte in data buffer.
</TD></TR>
4064 <TR><TD>data_encoding
</TD><TD>http_encoding_t
</TD><TD>The transfer
4065 encoding for the request/response.
</TD></TR>
4066 <TR><TD>data_remaining
</TD><TD>int
</TD><TD>The number of bytes remaining
4067 in the current request, response, or chunk.
</TD></TR>
4068 <TR><TD>used
</TD><TD>int
</TD><TD>The number of bytes that are used in
4069 the buffer.
</TD></TR>
4070 <TR><TD>buffer
</TD><TD>char []
</TD><TD>The read/write buffer.
</TD></TR>
4071 <TR><TD>auth_type
</TD><TD>int
</TD><TD>The type of authentication in use.
</TD>
4073 <TR><TD>md5_state
</TD><TD>md5_state_t
</TD><TD>The current MD5 digest
4075 <TR><TD>nonce
</TD><TD>char []
</TD><TD>The nonce value for Digest
4076 authentication.
</TD></TR>
4077 <TR><TD>nonce_count
</TD><TD>int
</TD><TD>The nonce count value.
</TD></TR>
4078 <TR><TD>tls
</TD><TD>void *
</TD><TD>A pointer to private encryption data.
</TD>
4080 <TR><TD>encryption
</TD><TD>http_encryption_t
</TD><TD>The current
4081 encryption mode.
</TD></TR>
4085 <H3><A NAME=
"ipp_t">IPP State
</A></H3>
4086 <P>The IPP state structure (
<CODE>ipp_t
</CODE>) contains the current
4087 state of a IPP request or response:
4089 <TABLE BORDER=
"1" WIDTH=
"90%">
4090 <TR><TH>Member
</TH><TH>Type
</TH><TH>Description
</TH></TR>
4091 <TR><TD></TD><TD></TD><TD></TD></TR>
4095 <H2><A NAME=
"9_3">Raster Structures
</A></H2>
4096 <H3><A NAME=
"cups_raster_header_t">Raster Page Header
</A></H3>
4097 <P>The raster page header (
<CODE>cups_raster_header_t
</CODE>) consists
4098 of the PostScript page device dictionary for the page:
4100 <TABLE BORDER=
"1" WIDTH=
"90%">
4101 <TR><TH>Member
</TH><TH>Type
</TH><TH>Description
</TH></TR>
4102 <TR><TD>MediaClass
</TD><TD>char[
64]
</TD><TD>The media class name
</TD></TR>
4103 <TR><TD>MediaColor
</TD><TD>char[
64]
</TD><TD>The media color name
</TD></TR>
4104 <TR><TD>MediaType
</TD><TD>char[
64]
</TD><TD>The media type name
</TD></TR>
4105 <TR><TD>OutputType
</TD><TD>char[
64]
</TD><TD>The output type name
</TD></TR>
4106 <TR><TD>AdvanceDistance
</TD><TD>unsigned
</TD><TD>The distance to advance
4107 the media in points
</TD></TR>
4108 <TR><TD>AdvanceMedia
</TD><TD>cups_adv_t
</TD><TD>When to advance the
4110 <TR><TD>Collate
</TD><TD>cups_bool_t
</TD><TD>Whether or not to produce
4111 collated copies
</TD></TR>
4112 <TR><TD>CutMedia
</TD><TD>cups_cut_t
</TD><TD>When to cut the media
</TD></TR>
4113 <TR><TD>Duplex
</TD><TD>cups_bool_t
</TD><TD>Whether or not to print on
4114 both sides of the paper
</TD></TR>
4115 <TR><TD>HWResolution
</TD><TD>unsigned[
2]
</TD><TD>The resolution of the
4116 page image in pixels per inch; the HWResolution[
0] represents the
4117 horizontal resolution and HWResolution[
1] represents the vertical
4118 resolution
</TD></TR>
4119 <TR><TD>ImagingBoundingBox
</TD><TD>unsigned[
4]
</TD><TD>The bounding box
4120 for the page in points; the elements represent the left, bottom, right,
4121 and top coordinates of the imaged area (if
0 then the whole page is
4123 <TR><TD>InsertSheet
</TD><TD>cups_bool_t
</TD><TD>Whether or not to insert
4124 a sheet before this page
</TD></TR>
4125 <TR><TD>Jog
</TD><TD>cups_jog_t
</TD><TD>When to jog copies of the page
</TD>
4127 <TR><TD>LeadingEdge
</TD><TD>cups_edge_t
</TD><TD>The leading edge of the
4129 <TR><TD>Margins
</TD><TD>unsigned[
2]
</TD><TD>The lower-lefthand margin of
4130 the page in points
</TD></TR>
4131 <TR><TD>ManualFeed
</TD><TD>cups_bool_t
</TD><TD>Whether or not to
4132 manually feed the page
</TD></TR>
4133 <TR><TD>MediaPosition
</TD><TD>unsigned
</TD><TD>The input slot number to
4135 <TR><TD>MediaWeight
</TD><TD>unsigned
</TD><TD>The weight of the output
4136 media in grams/m
<SUP>2</SUP></TD></TR>
4137 <TR><TD>MirrorPrint
</TD><TD>cups_bool_t
</TD><TD>Whether or not to mirror
4139 <TR><TD>NegativePrint
</TD><TD>cups_bool_t
</TD><TD>Whether or not to
4140 invert the print
</TD></TR>
4141 <TR><TD>NumCopies
</TD><TD>unsigned
</TD><TD>The number of copies to
4143 <TR><TD>Orientation
</TD><TD>cups_orient_t
</TD><TD>The orientation of the
4144 page image
</TD></TR>
4145 <TR><TD>OutputFaceUp
</TD><TD>cups_bool_t
</TD><TD>Whether or not to
4146 output the page face up
</TD></TR>
4147 <TR><TD>PageSize
</TD><TD>unsigned[
2]
</TD><TD>The width and height of the
4148 page in points
</TD></TR>
4149 <TR><TD>Separations
</TD><TD>cups_bool_t
</TD><TD>Whether or not to output
4150 separations
</TD></TR>
4151 <TR><TD>TraySwitch
</TD><TD>cups_bool_t
</TD><TD>Whether or not to
4152 automatically switch trays for the requested media size/type
</TD></TR>
4153 <TR><TD>Tumble
</TD><TD>cups_bool_t
</TD><TD>Whether or not to rotate the
4154 back side of the page
</TD></TR>
4155 <TR><TD>cupsWidth
</TD><TD>unsigned
</TD><TD>The width of the page image
4157 <TR><TD>cupsHeight
</TD><TD>unsigned
</TD><TD>The height of the page image
4159 <TR><TD>cupsMediaType
</TD><TD>unsigned
</TD><TD>The device-specific media
4161 <TR><TD>cupsBitsPerColor
</TD><TD>unsigned
</TD><TD>The number of bits per
4163 <TR><TD>cupsBitsPerPixel
</TD><TD>unsigned
</TD><TD>The number of bits per
4165 <TR><TD>cupsBytesPerLine
</TD><TD>unsigned
</TD><TD>The number of bytes
4166 per line of image data
</TD></TR>
4167 <TR><TD>cupsColorOrder
</TD><TD>cups_order_t
</TD><TD>The order of color
4169 <TR><TD>cupsColorSpace
</TD><TD>cups_cspace_t
</TD><TD>The type of color
4171 <TR><TD>cupsCompression
</TD><TD>unsigned
</TD><TD>The device-specific
4172 compression code
</TD></TR>
4173 <TR><TD>cupsRowCount
</TD><TD>unsigned
</TD><TD>The device-specific row
4175 <TR><TD>cupsRowFeed
</TD><TD>unsigned
</TD><TD>The device-specific row
4177 <TR><TD>cupsRowStep
</TD><TD>unsigned
</TD><TD>The device-specific row
4182 <H1 ALIGN=
"RIGHT"><A NAME=
"FUNCTIONS">D - Functions
</A></H1>
4183 <P>This appendix provides a reference for all of the CUPS API functions.
4186 <H2><A NAME=
"cupsAddDest">cupsAddDest()
</A></H2>
4187 <H3><A NAME=
"10_1_1">Usage
</A></H3>
4190 cupsAddDest(const char *name,
4191 const char *instance,
4193 cups_dest_t **dests);
4195 <H3><A NAME=
"10_1_2">Arguments
</A></H3>
4197 <TABLE BORDER
WIDTH=
"80%">
4198 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
4199 <TR><TD>name
</TD><TD>The name of the destination.
</TD></TR>
4200 <TR><TD>instance
</TD><TD>The instance of the destination, or NULL for
4201 the primary instance.
</TD></TR>
4202 <TR><TD>num_dests
</TD><TD>The number of destinations in the array.
</TD></TR>
4203 <TR><TD>dest
</TD><TD>A pointer to the destination array pointer.
</TD></TR>
4206 <H3><A NAME=
"10_1_3">Returns
</A></H3>
4207 <P>The new number of destinations in the array.
</P>
4208 <H3><A NAME=
"10_1_4">Description
</A></H3>
4209 <P><CODE>cupsAddDest()
</CODE> adds the named destination to the
4210 destination array if it does not already exist.
</P>
4211 <H3><A NAME=
"10_1_5">Example
</A></H3>
4213 #include
<cups/cups.h
>
4216 <A HREF=
"#cups_dest_t">cups_dest_t
</A> *dests;
4219 num_dests = cupsAddDests(
"foo
",
"bar
", num_dests,
&dests);
4221 <H3><A NAME=
"10_1_6">See Also
</A></H3>
4222 <P><A HREF=
"#cupsFreeDests"> <CODE>cupsFreeDests()
</CODE></A>,
<A HREF=
"#cupsGetDest">
4223 <CODE>cupsGetDest()
</CODE></A>,
<A HREF=
"#cupsGetDests"> <CODE>
4224 cupsGetDests()
</CODE></A>
4227 <H2><A NAME=
"cupsAddOption">cupsAddOption()
</A></H2>
4228 <H3><A NAME=
"10_2_1">Usage
</A></H3>
4231 cupsAddOption(const char *name,
4234 cups_option_t **options);
4236 <H3><A NAME=
"10_2_2">Arguments
</A></H3>
4238 <TABLE BORDER
WIDTH=
"80%">
4239 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
4240 <TR><TD>name
</TD><TD>The name of the option.
</TD></TR>
4241 <TR><TD>value
</TD><TD>The value of the option.
</TD></TR>
4242 <TR><TD>num_options
</TD><TD>Number of options currently in the array.
</TD>
4244 <TR><TD>options
</TD><TD>Pointer to the options array.
</TD></TR>
4247 <H3><A NAME=
"10_2_3">Returns
</A></H3>
4248 <P>The new number of options.
</P>
4249 <H3><A NAME=
"10_2_4">Description
</A></H3>
4250 <P><CODE>cupsAddOption()
</CODE> adds an option to the specified array.
</P>
4251 <H3><A NAME=
"10_2_5">Example
</A></H3>
4253 #include
<cups.h
>
4257 /* Declare the options array */
4259 <A HREF=
"#cups_option_t">cups_option_t
</A> *options;
4261 /* Initialize the options array */
4263 options = (cups_option_t *)
0;
4265 /* Add options using cupsAddOption() */
4266 num_options = cupsAddOption(
"media
",
"letter
", num_options,
&options);
4267 num_options = cupsAddOption(
"resolution
",
"300dpi
", num_options,
&options);
4269 <H3><A NAME=
"10_2_6">See Also
</A></H3>
4270 <A HREF=
"#cupsEncodeOptions"> <CODE>cupsEncodeOptions()
</CODE></A>,
<A HREF=
"#cupsFreeOptions">
4271 <CODE>cupsFreeOptions()
</CODE></A>,
<A HREF=
"#cupsGetOption"> <CODE>
4272 cupsGetOption()
</CODE></A>,
<A HREF=
"#cupsParseOptions"> <CODE>
4273 cupsParseOptions()
</CODE></A>
4276 <H2><A NAME=
"cupsCancelJob">cupsCancelJob()
</A></H2>
4277 <H3><A NAME=
"10_3_1">Usage
</A></H3>
4280 cupsCancelJob(const char *dest,
4283 <H3><A NAME=
"10_3_2">Arguments
</A></H3>
4285 <TABLE BORDER
WIDTH=
"80%">
4286 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
4287 <TR><TD>dest
</TD><TD>Printer or class name
</TD></TR>
4288 <TR><TD>job
</TD><TD>Job ID
</TD></TR>
4291 <H3><A NAME=
"10_3_3">Returns
</A></H3>
4292 <P>1 on success,
0 on failure. On failure the error can be found by
4293 calling
<A HREF=
"#cupsLastError"> <CODE>cupsLastError()
</CODE></A>.
</P>
4294 <H3><A NAME=
"10_3_4">Description
</A></H3>
4295 <P><CODE>cupsCancelJob()
</CODE> cancels the specifies job.
</P>
4296 <H3><A NAME=
"10_3_5">Example
</A></H3>
4298 #include
<cups.h
>
4300 cupsCancelJob(
"LaserJet
",
1);
4302 <H3><A NAME=
"10_3_6">See Also
</A></H3>
4303 <P><A HREF=
"#cupsLastError"> <CODE>cupsLastError()
</CODE></A>,
<A HREF=
"#cupsPrintFile">
4304 <CODE>cupsPrintFile()
</CODE></A>,
<A HREF=
"#cupsPrintFiles"> <CODE>
4305 cupsPrintFiles()
</CODE></A>
4308 <H2><A NAME=
"cupsDoFileRequest">cupsDoFileRequest()
</A></H2>
4309 <H3><A NAME=
"10_4_1">Usage
</A></H3>
4312 cupsDoFileRequest(http_t *http,
4314 const char *resource,
4315 const char *filename);
4317 <H3><A NAME=
"10_4_2">Arguments
</A></H3>
4319 <TABLE BORDER
WIDTH=
"80%">
4320 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
4321 <TR><TD>http
</TD><TD>HTTP connection to server.
</TD></TR>
4322 <TR><TD>request
</TD><TD>IPP request data.
</TD></TR>
4323 <TR><TD>resource
</TD><TD>HTTP resource name for POST.
</TD></TR>
4324 <TR><TD>filename
</TD><TD>File to send with POST request (
<CODE>NULL
</CODE>
4325 pointer if none.)
</TD></TR>
4328 <H3><A NAME=
"10_4_3">Returns
</A></H3>
4329 <P>IPP response data or
<CODE>NULL
</CODE> if the request fails. On
4330 failure the error can be found by calling
<A HREF=
"#cupsLastError"> <CODE>
4331 cupsLastError()
</CODE></A>.
</P>
4332 <H3><A NAME=
"10_4_4">Description
</A></H3>
4333 <P><CODE>cupsDoFileRequest()
</CODE> does a HTTP POST request and
4334 provides the IPP request and optionally the contents of a file to the
4335 IPP server. It also handles resubmitting the request and performing
4336 password authentication as needed.
</P>
4337 <H3><A NAME=
"10_4_5">Example
</A></H3>
4339 #include
<cups.h
>
4341 <A HREF=
"#http_t">http_t
</A> *http;
4342 <A HREF=
"#cups_lang_t">cups_lang_t
</A> *language;
4343 <A HREF=
"#ipp_t">ipp_t
</A> *request;
4348 /* Get the default language */
4349 language =
<A HREF=
"#cupsLangDefault">cupsLangDefault()
</A>;
4351 /* Create a new IPP request */
4352 request =
<A HREF=
"#ippNew">ippNew()
</A>;
4354 request-
>request.op.operation_id = IPP_PRINT_FILE;
4355 request-
>request.op.request_id =
1;
4357 /* Add required attributes */
4358 <A HREF=
"#ippAddString">ippAddString
</A>(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
4359 "attributes-charset
", NULL,
<A HREF=
"#cupsLangEncoding">cupsLangEncoding
</A>(language));
4361 ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
4362 "attributes-natural-language
", NULL,
4363 language != NULL ? language-
>language :
"C
");
4365 ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri
",
4366 NULL,
"ipp://hostname/resource
");
4368 ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name
",
4369 NULL,
<A HREF=
"#cupsUser">cupsUser()
</A>);
4371 /* Do the request... */
4372 response = cupsDoFileRequest(http, request,
"/resource
",
"filename.txt
");
4374 <H3><A NAME=
"10_4_6">See Also
</A></H3>
4375 <P><A HREF=
"#cupsLangDefault"> <CODE>cupsLangDefault()
</CODE></A>,
<A HREF=
"#cupsLangEncoding">
4376 <CODE>cupsLangEncoding()
</CODE></A>,
<A HREF=
"#cupsUser"> <CODE>
4377 cupsUser()
</CODE></A>,
<A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>
4378 ,
<A HREF=
"#ippAddString"> <CODE>ippAddString()
</CODE></A>,
<A HREF=
"#ippNew">
4379 <CODE>ippNew()
</CODE></A>
4382 <H2><A NAME=
"cupsDoRequest">cupsDoRequest()
</A></H2>
4383 <H3><A NAME=
"10_5_1">Usage
</A></H3>
4386 cupsDoRequest(http_t *http,
4388 const char *resource);
4390 <H3><A NAME=
"10_5_2">Arguments
</A></H3>
4392 <TABLE BORDER
WIDTH=
"80%">
4393 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
4394 <TR><TD>http
</TD><TD>HTTP connection to server.
</TD></TR>
4395 <TR><TD>request
</TD><TD>IPP request data.
</TD></TR>
4396 <TR><TD>resource
</TD><TD>HTTP resource name for POST.
</TD></TR>
4399 <H3><A NAME=
"10_5_3">Returns
</A></H3>
4400 <P>IPP response data or
<CODE>NULL
</CODE> if the request fails. On
4401 failure the error can be found by calling
<A HREF=
"#cupsLastError"> <CODE>
4402 cupsLastError()
</CODE></A>.
</P>
4403 <H3><A NAME=
"10_5_4">Description
</A></H3>
4404 <P><CODE>cupsDoRequest()
</CODE> does a HTTP POST request and provides
4405 the IPP request to the IPP server. It also handles resubmitting the
4406 request and performing password authentication as needed.
</P>
4407 <H3><A NAME=
"10_5_5">Example
</A></H3>
4409 #include
<cups.h
>
4411 <A HREF=
"#http_t">http_t
</A> *http;
4412 <A HREF=
"#cups_lang_t">cups_lang_t
</A> *language;
4413 <A HREF=
"#ipp_t">ipp_t
</A> *request;
4418 /* Get the default language */
4419 language =
<A HREF=
"#cupsLangDefault">cupsLangDefault()
</A>;
4421 /* Create a new IPP request */
4422 request =
<A HREF=
"#ippNew">ippNew()
</A>;
4424 request-
>request.op.operation_id = IPP_GET_PRINTER_ATTRIBUTES;
4425 request-
>request.op.request_id =
1;
4427 /* Add required attributes */
4428 <A HREF=
"#ippAddString">ippAddString
</A>(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
4429 "attributes-charset
", NULL,
<A HREF=
"#cupsLangEncoding">cupsLangEncoding
</A>(language));
4431 ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
4432 "attributes-natural-language
", NULL,
4433 language != NULL ? language-
>language :
"C
");
4435 ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri
",
4436 NULL,
"ipp://hostname/resource
");
4438 /* Do the request... */
4439 response = cupsDoRequest(http, request,
"/resource
");
4441 <H3><A NAME=
"10_5_6">See Also
</A></H3>
4442 <P><A HREF=
"#cupsLangDefault"> <CODE>cupsLangDefault()
</CODE></A>,
<A HREF=
"#cupsLangEncoding">
4443 <CODE>cupsLangEncoding()
</CODE></A>,
<A HREF=
"#cupsUser"> <CODE>
4444 cupsUser()
</CODE></A>,
<A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>
4445 ,
<A HREF=
"#ippAddString"> <CODE>ippAddString()
</CODE></A>,
<A HREF=
"#ippNew">
4446 <CODE>ippNew()
</CODE></A>
4449 <H2><A NAME=
"cupsEncodeOptions">cupsEncodeOptions()
</A></H2>
4450 <H3><A NAME=
"10_6_1">Usage
</A></H3>
4453 cupsEncodeOptions(ipp_t *ipp,
4455 cups_option_t *options);
4457 <H3><A NAME=
"10_6_2">Arguments
</A></H3>
4459 <TABLE BORDER
WIDTH=
"80%">
4460 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
4461 <TR><TD>ipp
</TD><TD>The IPP request.
</TD></TR>
4462 <TR><TD>num_options
</TD><TD>The number of options.
</TD></TR>
4463 <TR><TD>options
</TD><TD>The options.
</TD></TR>
4466 <H3><A NAME=
"10_6_3">Description
</A></H3>
4467 <P><CODE>cupsEncodeOptions()
</CODE> encodes all of the options in the
4468 specified array as IPP attributes and adds them to the IPP request.
</P>
4469 <H3><A NAME=
"10_6_4">Example
</A></H3>
4471 #include
<cups/cups.h
>
4473 <A HREF=
"#ipp_t">ipp_t
</A> *ipp;
4475 <A HREF=
"#cups_option_t">cups_option_t
</A> *options;
4478 cupsEncodeOptions(ipp, num_options, options);
4480 <H3><A NAME=
"10_6_5">See Also
</A></H3>
4481 <P><A HREF=
"#cupsAddOption"> <CODE>cupsAddOption()
</CODE></A>,
<A HREF=
"#cupsParseOptions">
4482 <CODE>cupsParseOptions()
</CODE></A>,
<A HREF=
"#ippNew"> <CODE>ippNew()
</CODE>
4486 <H2><A NAME=
"cupsEncryption">cupsEncryption()
</A></H2>
4487 <H3><A NAME=
"10_7_1">Usage
</A></H3>
4490 cupsEncryption(void);
4492 <H3><A NAME=
"10_7_2">Returns
</A></H3>
4493 <P>The current encryption setting.
</P>
4494 <H3><A NAME=
"10_7_3">Description
</A></H3>
4495 <P><CODE>cupsEncryption()
</CODE> returns the current encryption setting
4496 for IPP requests such as printing.
</P>
4497 <H3><A NAME=
"10_7_4">Example
</A></H3>
4499 #include
<cups/cups.h
>
4501 <A HREF=
"#http_t">http_t
</A> *http;
4503 printf(
"The current encryption setting is %d.\n
", cupsEncryption());
4505 http = httpConnectEncrypt(cupsServer(), ippPort(), cupsEncryption());
4507 <H3><A NAME=
"10_7_5">See Also
</A></H3>
4508 <P><A HREF=
"#cupsServer"> <CODE>cupsServer()
</CODE></A>,
<A HREF=
"#httpConnectEncrypt">
4509 <CODE>httpConnectEncrypt()
</CODE></A>,
<A HREF=
"#ippPort"> <CODE>
4510 ippPort()
</CODE></A>
4513 <H2><A NAME=
"cupsFreeDests">cupsFreeDests()
</A></H2>
4514 <H3><A NAME=
"10_8_1">Usage
</A></H3>
4517 cupsFreeDests(int num_dests,
4518 cups_dest_t *dests);
4520 <H3><A NAME=
"10_8_2">Arguments
</A></H3>
4522 <TABLE BORDER
WIDTH=
"80%">
4523 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
4524 <TR><TD>num_dests
</TD><TD>The number of destinations in the array.
</TD></TR>
4525 <TR><TD>dests
</TD><TD>The destination array.
</TD></TR>
4528 <H3><A NAME=
"10_8_3">Description
</A></H3>
4529 <P><CODE>cupsFreeDests()
</CODE> frees a destination array that was
4530 created using
<CODE>cupsGetDests()
</CODE>.
</P>
4531 <H3><A NAME=
"10_8_4">Example
</A></H3>
4533 #include
<cups/cups.h
>
4536 <A HREF=
"#cups_dest_t">cups_dest_t
</A> *dests;
4539 num_dests = cupsGetDests(
&dests);
4540 dest = cupsGetDest(NULL, NULL, num_dests, dests);
4543 printf(
"The default destination is %s\n
", dest-
>name);
4545 puts(
"No default destination.
");
4547 cupsFreeDests(num_dests, dests);
4549 <H3><A NAME=
"10_8_5">See Also
</A></H3>
4550 <P><A HREF=
"#cupsGetDest"> <CODE>cupsGetDest()
</CODE></A>,
<A HREF=
"#cupsGetDests">
4551 <CODE>cupsGetDests()
</CODE></A>
4554 <H2><A NAME=
"cupsFreeJobs">cupsFreeJobs()
</A></H2>
4555 <H3><A NAME=
"10_9_1">Usage
</A></H3>
4558 cupsFreeJobs(int num_jobs,
4561 <H3><A NAME=
"10_9_2">Arguments
</A></H3>
4563 <TABLE BORDER
WIDTH=
"80%">
4564 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
4565 <TR><TD>num_jobs
</TD><TD>The number of jobs.
</TD></TR>
4566 <TR><TD>jobs
</TD><TD>The job array.
</TD></TR>
4569 <H3><A NAME=
"10_9_3">Description
</A></H3>
4570 <P><CODE>cupsFreeJobs()
</CODE> frees an array of print jobs created by
4571 the
<CODE>cupsGetJobs()
</CODE> function.
</P>
4572 <H3><A NAME=
"10_9_4">Example
</A></H3>
4574 #include
<cups/cups.h
>
4578 <A HREF=
"#cups_job_t">cups_job_t
</A> *jobs;
4581 num_jobs = cupsGetJobs(
&jobs, NULL,
0,
0);
4583 printf(
"%d active job(s):\n
", num_jobs);
4584 for (i =
0; i
< num_jobs; i ++)
4585 printf(
"%-
16.16s %-
6d %-
12.12s %s (%s)\n
", jobs[i].dest, jobs[i].id,
4586 jobs[i].user, jobs[i].title,
4587 jobs[i].state != IPP_JOB_PENDING ?
"printing
" :
"pending
");
4589 cupsFreeJobs(num_jobs, jobs);
4591 <H3><A NAME=
"10_9_5">See Also
</A></H3>
4592 <P><A HREF=
"#cupsGetJobs"> <CODE>cupsGetJobs()
</CODE></A>,
<A HREF=
"#cupsGetDests">
4593 <CODE>cupsGetDests()
</CODE></A>
4596 <H2><A NAME=
"cupsFreeOptions">cupsFreeOptions()
</A></H2>
4597 <H3><A NAME=
"10_10_1">Usage
</A></H3>
4600 cupsFreeOptions(int num_options,
4601 cups_option_t *options);
4603 <H3><A NAME=
"10_10_2">Arguments
</A></H3>
4605 <TABLE BORDER
WIDTH=
"80%">
4606 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
4607 <TR><TD>num_options
</TD><TD>Number of options in array.
</TD></TR>
4608 <TR><TD>options
</TD><TD>Pointer to options array.
</TD></TR>
4611 <H3><A NAME=
"10_10_3">Description
</A></H3>
4612 <P><CODE>cupsFreeOptions()
</CODE> frees all memory associated with the
4613 option array specified.
</P>
4614 <H3><A NAME=
"10_10_4">Example
</A></H3>
4616 #include
<cups/cups.h
>
4619 <A HREF=
"#cups_option_t">cups_option_t
</A> *options;
4623 cupsFreeOptions(num_options, options);
4625 <H3><A NAME=
"10_10_5">See Also
</A></H3>
4626 <P><A HREF=
"#cupsAddOption"> <CODE>cupsAddOption()
</CODE></A>,
<A HREF=
"#cupsEncodeOptions">
4627 <CODE>cupsEncodeOptions()
</CODE></A>,
<A HREF=
"#cupsGetOption"> <CODE>
4628 cupsGetOption()
</CODE></A>,
<A HREF=
"#cupsMarkOptions"> <CODE>
4629 cupsMarkOptions()
</CODE></A>,
<A HREF=
"#cupsParseOptions"> <CODE>
4630 cupsParseOptions()
</CODE></A>
4633 <H2><A NAME=
"cupsGetClasses">cupsGetClasses()
</A></H2>
4634 <H3><A NAME=
"10_11_1">Usage
</A></H3>
4637 cupsGetClasses(char ***classes);
4639 <H3><A NAME=
"10_11_2">Arguments
</A></H3>
4641 <TABLE BORDER
WIDTH=
"80%">
4642 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
4643 <TR><TD>classes
</TD><TD>Pointer to character pointer array.
</TD></TR>
4646 <H3><A NAME=
"10_11_3">Returns
</A></H3>
4647 <P>The number of printer classes available.
</P>
4648 <H3><A NAME=
"10_11_4">Description
</A></H3>
4649 <P><CODE>cupsGetClasses()
</CODE> gets a list of the available printer
4650 classes. The returned array should be freed using the
<CODE>free()
</CODE>
4651 when it is no longer needed.
</P>
4652 <H3><A NAME=
"10_11_5">Example
</A></H3>
4654 #include
<cups/cups.h
>
4662 num_classes = cupsGetClasses(
4666 if (num_classes
> 0)
4668 for (i =
0; i
< num_classes; i ++)
4674 <H3><A NAME=
"10_11_6">See Also
</A></H3>
4675 <P><A HREF=
"#cupsGetDefault"> <CODE>cupsGetDefault()
</CODE></A>,
<A HREF=
"#cupsGetPrinters">
4676 <CODE>cupsGetPrinters()
</CODE></A>
4679 <H2><A NAME=
"cupsGetDefault">cupsGetDefault()
</A></H2>
4680 <H3><A NAME=
"10_12_1">Usage
</A></H3>
4683 cupsGetDefault(void);
4685 <H3><A NAME=
"10_12_2">Returns
</A></H3>
4686 <P>A pointer to the default destination.
</P>
4687 <H3><A NAME=
"10_12_3">Description
</A></H3>
4688 <P><CODE>cupsGetDefault()
</CODE> gets the default destination printer or
4689 class. The default destination is stored in a static string and will be
4690 overwritten (usually with the same value) after each call.
</P>
4691 <H3><A NAME=
"10_12_4">Example
</A></H3>
4693 #include
<cups/cups.h
>
4695 printf(
"The default destination is %s\n
", cupsGetDefault());
4697 <H3><A NAME=
"10_12_5">See Also
</A></H3>
4698 <P><A HREF=
"#cupsGetClasses"> <CODE>cupsGetClasses()
</CODE></A>,
<A HREF=
"#cupsGetPrinters">
4699 <CODE>cupsGetPrinters()
</CODE></A>
4702 <H2><A NAME=
"cupsGetDest">cupsGetDest()
</A></H2>
4703 <H3><A NAME=
"10_13_1">Usage
</A></H3>
4706 cupsGetDest(const char *name,
4707 const char *instance,
4709 cups_dest_t *dests);
4711 <H3><A NAME=
"10_13_2">Arguments
</A></H3>
4713 <TABLE BORDER
WIDTH=
"80%">
4714 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
4715 <TR><TD>name
</TD><TD>The name of the destination, or NULL for the
4716 default destination.
</TD></TR>
4717 <TR><TD>instance
</TD><TD>The instance of the destination, or NULL for
4718 the primary instance.
</TD></TR>
4719 <TR><TD>num_dests
</TD><TD>The number of destinations.
</TD></TR>
4720 <TR><TD>dests
</TD><TD>The destination array.
</TD></TR>
4723 <H3><A NAME=
"10_13_3">Returns
</A></H3>
4724 <P>A pointer to the specified destination, or NULL if none exists.
</P>
4725 <H3><A NAME=
"10_13_4">Description
</A></H3>
4726 <P><CODE>cupsGetDest()
</CODE> finds the specified destination in the
4727 array of destinations created by the
<CODE>cupsGetDests()
</CODE>
4729 <H3><A NAME=
"10_13_5">Example
</A></H3>
4731 #include
<cups/cups.h
>
4734 <A HREF=
"#cups_dest_t">cups_dest_t
</A> *dests;
4737 num_dests = cupsGetDests(
&dests);
4738 dest = cupsGetDest(NULL, NULL, num_dests, dests);
4741 printf(
"The default destination is %s\n
", dest-
>name);
4743 puts(
"No default destination.
");
4745 cupsFreeDests(num_dests, dests);
4747 <H3><A NAME=
"10_13_6">See Also
</A></H3>
4748 <P><A HREF=
"#cupsGetDests"> <CODE>cupsGetDests()
</CODE></A>,
<A HREF=
"#cupsGetJobs">
4749 <CODE>cupsGetJobs()
</CODE></A>
4752 <H2><A NAME=
"cupsGetDests">cupsGetDests()
</A></H2>
4753 <H3><A NAME=
"10_14_1">Usage
</A></H3>
4756 cupsGetDests(cups_dest_t **dests);
4758 <H3><A NAME=
"10_14_2">Arguments
</A></H3>
4760 <TABLE BORDER
WIDTH=
"80%">
4761 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
4762 <TR><TD>dests
</TD><TD>A pointer to a destination array pointer.
</TD></TR>
4765 <H3><A NAME=
"10_14_3">Returns
</A></H3>
4766 <P>The number of available destinations.
</P>
4767 <H3><A NAME=
"10_14_4">Description
</A></H3>
4768 <P><CODE>cupsGetDests()
</CODE> creates an array of available
4769 destinations that the user can print to. The array should be freed
4770 using the
<CODE>cupsFreeDests()
</CODE> function.
</P>
4771 <H3><A NAME=
"10_14_5">Example
</A></H3>
4773 #include
<cups/cups.h
>
4776 <A HREF=
"#cups_dest_t">cups_dest_t
</A> *dests;
4779 num_dests = cupsGetDests(
&dests);
4780 dest = cupsGetDest(NULL, NULL, num_dests, dests);
4783 printf(
"The default destination is %s\n
", dest-
>name);
4785 puts(
"No default destination.
");
4787 cupsFreeDests(num_dests, dests);
4789 <H3><A NAME=
"10_14_6">See Also
</A></H3>
4790 <P><A HREF=
"#cupsFreeDests"> <CODE>cupsFreeDests()
</CODE></A>,
<A HREF=
"#cupsGetDest">
4791 <CODE>cupsGetDest()
</CODE></A>,
<A HREF=
"#cupsGetJobs"> <CODE>
4792 cupsGetJobs()
</CODE></A>
4795 <H2><A NAME=
"cupsGetJobs">cupsGetJobs()
</A></H2>
4796 <H3><A NAME=
"10_15_1">Usage
</A></H3>
4799 cupsGetJobs(cups_job_t **jobs,
4804 <H3><A NAME=
"10_15_2">Arguments
</A></H3>
4806 <TABLE BORDER
WIDTH=
"80%">
4807 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
4808 <TR><TD>jobs
</TD><TD>A pointer to the job array pointer.
</TD></TR>
4809 <TR><TD>dest
</TD><TD>The destination name, or NULL if jobs for all
4810 destinations are requested.
</TD></TR>
4811 <TR><TD>myjobs
</TD><TD>1 if only those jobs submitted by the current
<CODE>
4812 cupsUser()
</CODE> should be returned,
0 for jobs submitted by all users.
</TD>
4814 <TR><TD>completed
</TD><TD>1 if only completed jobs should be returned,
0
4815 if only pending/processing jobs should be returned.
</TD></TR>
4818 <H3><A NAME=
"10_15_3">Returns
</A></H3>
4819 <P>The number of jobs.
</P>
4820 <H3><A NAME=
"10_15_4">Description
</A></H3>
4821 <P><CODE>cupsGetJobs()
</CODE> creates an array of print jobs based on
4822 the arguments supplied in the function call. The returned array should
4823 be freed using the
<CODE>cupsFreeJobs()
</CODE> function.
</P>
4824 <H3><A NAME=
"10_15_5">Example
</A></H3>
4826 #include
<cups/cups.h
>
4830 <A HREF=
"#cups_job_t">cups_job_t
</A> *jobs;
4833 num_jobs = cupsGetJobs(
&jobs, NULL,
0,
0);
4835 printf(
"%d active job(s):\n
", num_jobs);
4836 for (i =
0; i
< num_jobs; i ++)
4837 printf(
"%-
16.16s %-
6d %-
12.12s %s (%s)\n
", jobs[i].dest, jobs[i].id,
4838 jobs[i].user, jobs[i].title,
4839 jobs[i].state != IPP_JOB_PENDING ?
"printing
" :
"pending
");
4841 cupsFreeJobs(num_jobs, jobs);
4843 <H3><A NAME=
"10_15_6">See Also
</A></H3>
4844 <P><A HREF=
"#cupsFreeJobs"> <CODE>cupsFreeJobs()
</CODE></A>,
<A HREF=
"#cupsGetDests">
4845 <CODE>cupsGetDests()
</CODE></A>
4848 <H2><A NAME=
"cupsGetOption">cupsGetOption()
</A></H2>
4849 <H3><A NAME=
"10_16_1">Usage
</A></H3>
4852 cupsGetOption(const char *name,
4854 cups_option_t *options);
4856 <H3><A NAME=
"10_16_2">Arguments
</A></H3>
4858 <TABLE BORDER
WIDTH=
"80%">
4859 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
4860 <TR><TD>name
</TD><TD>The name of the option.
</TD></TR>
4861 <TR><TD>num_options
</TD><TD>The number of options in the array.
</TD></TR>
4862 <TR><TD>options
</TD><TD>The options array.
</TD></TR>
4865 <H3><A NAME=
"10_16_3">Returns
</A></H3>
4866 <P>A pointer to the option values or
<CODE>NULL
</CODE> if the option is
4868 <H3><A NAME=
"10_16_4">Description
</A></H3>
4869 <P><CODE>cupsGetOption()
</CODE> returns the first occurrence of the
4870 named option. If the option is not included in the options array then a
4871 <CODE>NULL
</CODE> pointer is returned.
</P>
4873 #include
<cups/cups.h
>
4876 cups_option_t *options;
4881 media = cupsGetOption(
"media
", num_options, options);
4883 <H3><A NAME=
"10_16_5">See Also
</A></H3>
4884 <P><A HREF=
"#cupsAddOption"> <CODE>cupsAddOption()
</CODE></A>,
<A HREF=
"#cupsEncodeOptions">
4885 <CODE>cupsEncodeOptions()
</CODE></A>,
<A HREF=
"#cupsFreeOptions"> <CODE>
4886 cupsFreeOptions()
</CODE></A>,
<A HREF=
"#cupsMarkOptions"> <CODE>
4887 cupsMarkOptions()
</CODE></A>,
<A HREF=
"#cupsParseOptions"> <CODE>
4888 cupsParseOptions()
</CODE></A>
4891 <H2><A NAME=
"cupsGetPassword">cupsGetPassword()
</A></H2>
4892 <H3><A NAME=
"10_17_1">Usage
</A></H3>
4895 cupsGetPassword(const char *prompt);
4897 <H3><A NAME=
"10_17_2">Arguments
</A></H3>
4899 <TABLE BORDER
WIDTH=
"80%">
4900 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
4901 <TR><TD>prompt
</TD><TD>The prompt to display to the user.
</TD></TR>
4904 <H3><A NAME=
"10_17_3">Returns
</A></H3>
4905 <P>A pointer to the password that was entered or
<CODE>NULL
</CODE> if no
4906 password was entered.
</P>
4907 <H3><A NAME=
"10_17_4">Description
</A></H3>
4908 <P><CODE>cupsGetPassword()
</CODE> displays the prompt string and asks
4909 the user for a password. The password text is not echoed to the user.
</P>
4910 <H3><A NAME=
"10_17_5">Example
</A></H3>
4912 #include
<cups/cups.h
>
4918 password = cupsGetPassword(
"Please enter a password:
");
4920 <H3><A NAME=
"10_17_6">See Also
</A></H3>
4921 <P><A HREF=
"#cupsServer"> <CODE>cupsServer()
</CODE></A>,
<A HREF=
"#cupsSetPasswordCB">
4922 <CODE>cupsSetPasswordCB()
</CODE></A>,
<A HREF=
"#cupsSetServer"> <CODE>
4923 cupsSetServer()
</CODE></A>,
<A HREF=
"#cupsSetUser"> <CODE>cupsSetUser()
</CODE>
4924 </A>,
<A HREF=
"#cupsUser"> <CODE>cupsUser()
</CODE></A>
4927 <H2><A NAME=
"cupsGetPPD">cupsGetPPD()
</A></H2>
4928 <H3><A NAME=
"10_18_1">Usage
</A></H3>
4931 cupsGetPPD(const char *printer);
4933 <H3><A NAME=
"10_18_2">Arguments
</A></H3>
4935 <TABLE BORDER
WIDTH=
"80%">
4936 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
4937 <TR><TD>printer
</TD><TD>The name of the printer.
</TD></TR>
4940 <H3><A NAME=
"10_18_3">Returns
</A></H3>
4941 <P>The name of a temporary file containing the PPD file or
<CODE>NULL
</CODE>
4942 if the printer cannot be located or does not have a PPD file.
</P>
4943 <H3><A NAME=
"10_18_4">Description
</A></H3>
4944 <P><CODE>cupsGetPPD()
</CODE> gets a copy of the PPD file for the named
4945 printer. The printer name can be of the form
"printer
" or
4946 "printer@hostname
".
</P>
4947 <P>You should remove (unlink) the PPD file after you are done using it.
4948 The filename is stored in a static buffer and will be overwritten with
4949 each call to
<CODE>cupsGetPPD()
</CODE>.
</P>
4950 <H3><A NAME=
"10_18_5">Example
</A></H3>
4952 #include
<cups/cups.h
>
4958 ppd = cupsGetPPD(
"printer@hostname
");
4966 <H2><A NAME=
"cupsGetPrinters">cupsGetPrinters()
</A></H2>
4967 <H3><A NAME=
"10_19_1">Usage
</A></H3>
4970 cupsGetPrinters(char ***printers);
4972 <H3><A NAME=
"10_19_2">Arguments
</A></H3>
4974 <TABLE BORDER
WIDTH=
"80%">
4975 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
4976 <TR><TD>printers
</TD><TD>Pointer to character pointer array.
</TD></TR>
4979 <H3><A NAME=
"10_19_3">Returns
</A></H3>
4980 <P>The number of printer printers available.
</P>
4981 <H3><A NAME=
"10_19_4">Description
</A></H3>
4982 <P><CODE>cupsGetPrinters()
</CODE> gets a list of the available printers.
4983 The returned array should be freed using the
<CODE>free()
</CODE> when
4984 it is no longer needed.
</P>
4985 <H3><A NAME=
"10_19_5">Example
</A></H3>
4987 #include
<cups/cups.h
>
4995 num_printers = cupsGetPrinters(
4999 if (num_printers
> 0)
5001 for (i =
0; i
< num_printers; i ++)
5007 <H3><A NAME=
"10_19_6">See Also
</A></H3>
5008 <P><A HREF=
"#cupsGetClasses"> <CODE>cupsGetClasses()
</CODE></A><A HREF=
"#cupsGetDefault">
5009 <CODE>cupsGetDefault()
</CODE></A>
5012 <H2><A NAME=
"cupsLangDefault">cupsLangDefault()
</A></H2>
5013 <H3><A NAME=
"10_20_1">Usage
</A></H3>
5016 cupsLangDefault(void);
5018 <H3><A NAME=
"10_20_2">Returns
</A></H3>
5019 <P>A pointer to the default language structure.
</P>
5020 <H3><A NAME=
"10_20_3">Description
</A></H3>
5021 <P><CODE>cupsLangDefault()
</CODE> returns a language structure for the
5022 default language. The default language is defined by the
<CODE>LANG
</CODE>
5023 environment variable. If the specified language cannot be located then
5024 the POSIX (English) locale is used.
</P>
5025 <P>Call
<CODE>cupsLangFree()
</CODE> to free any memory associated with
5026 the language structure when you are done.
</P>
5027 <H3><A NAME=
"10_20_4">Example
</A></H3>
5029 #include
<cups/language.h
>
5031 <A HREF=
"#cups_lang_t">cups_lang_t
</A> *language;
5034 language = cupsLangDefault();
5038 cupsLangFree(language);
5040 <H3><A NAME=
"10_20_5">See Also
</A></H3>
5041 <P><A HREF=
"#cupsLangEncoding"> <CODE>cupsLangEncoding()
</CODE></A>,
<A HREF=
"#cupsLangFlush">
5042 <CODE>cupsLangFlush()
</CODE></A>,
<A HREF=
"#cupsLangFree"> <CODE>
5043 cupsLangFree()
</CODE></A>,
<A HREF=
"#cupsLangGet"> <CODE>cupsLangGet()
</CODE>
5044 </A>,
<A HREF=
"#cupsLangString"> <CODE>cupsLangString()
</CODE></A>
5047 <H2><A NAME=
"cupsLangEncoding">cupsLangEncoding()
</A></H2>
5048 <H3><A NAME=
"10_21_1">Usage
</A></H3>
5051 cupsLangEncoding(cups_lang_t *language);
5053 <H3><A NAME=
"10_21_2">Arguments
</A></H3>
5055 <TABLE BORDER
WIDTH=
"80%">
5056 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
5057 <TR><TD>language
</TD><TD>The language structure.
</TD></TR>
5060 <H3><A NAME=
"10_21_3">Returns
</A></H3>
5061 <P>A pointer to the encoding string.
</P>
5062 <H3><A NAME=
"10_21_4">Description
</A></H3>
5063 <P><CODE>cupsLangEncoding()
</CODE> returns the language encoding used
5064 for the specified language, e.g.
"iso-
8859-
1",
"utf-
8", etc.
</P>
5065 <H3><A NAME=
"10_21_5">Example
</A></H3>
5067 #include
<cups/language.h
>
5069 <A HREF=
"#cups_lang_t">cups_lang_t
</A> *language;
5073 language = cupsLangDefault();
5074 encoding = cupsLangEncoding(language);
5077 cupsLangFree(language);
5079 <H3><A NAME=
"10_21_6">See Also
</A></H3>
5080 <P><A HREF=
"#cupsLangDefault"> <CODE>cupsLangDefault()
</CODE></A>,
<A HREF=
"#cupsLangFlush">
5081 <CODE>cupsLangFlush()
</CODE></A>,
<A HREF=
"#cupsLangFree"> <CODE>
5082 cupsLangFree()
</CODE></A>,
<A HREF=
"#cupsLangGet"> <CODE>cupsLangGet()
</CODE>
5083 </A>,
<A HREF=
"#cupsLangString"> <CODE>cupsLangString()
</CODE></A>
5086 <H2><A NAME=
"cupsLangFlush">cupsLangFlush()
</A></H2>
5087 <H3><A NAME=
"10_22_1">Usage
</A></H3>
5090 cupsLangFlush(void);
5092 <H3><A NAME=
"10_22_2">Description
</A></H3>
5093 <P><CODE>cupsLangFlush()
</CODE> frees all language structures that have
5095 <H3><A NAME=
"10_22_3">Example
</A></H3>
5097 #include
<cups/language.h
>
5103 <H3><A NAME=
"10_22_4">See Also
</A></H3>
5104 <P><A HREF=
"#cupsLangDefault"> <CODE>cupsLangDefault()
</CODE></A>,
<A HREF=
"#cupsLangEncoding">
5105 <CODE>cupsLangEncoding()
</CODE></A>,
<A HREF=
"#cupsLangFree"> <CODE>
5106 cupsLangFree()
</CODE></A>,
<A HREF=
"#cupsLangGet"> <CODE>cupsLangGet()
</CODE>
5107 </A>,
<A HREF=
"#cupsLangString"> <CODE>cupsLangString()
</CODE></A>
5110 <H2><A NAME=
"cupsLangFree">cupsLangFree()
</A></H2>
5111 <H3><A NAME=
"10_23_1">Usage
</A></H3>
5114 cupsLangFree(cups_lang_t *language);
5116 <H3><A NAME=
"10_23_2">Arguments
</A></H3>
5118 <TABLE BORDER
WIDTH=
"80%">
5119 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
5120 <TR><TD>language
</TD><TD>The language structure to free.
</TD></TR>
5123 <H3><A NAME=
"10_23_3">Description
</A></H3>
5124 <P><CODE>cupsLangFree()
</CODE> frees the specified language structure.
</P>
5125 <H3><A NAME=
"10_23_4">Example
</A></H3>
5127 #include
<cups/language.h
>
5129 <A HREF=
"#cups_lang_t">cups_lang_t
</A> *language;
5132 cupsLangFree(language);
5134 <H3><A NAME=
"10_23_5">See Also
</A></H3>
5135 <P><A HREF=
"#cupsLangDefault"> <CODE>cupsLangDefault()
</CODE></A>,
<A HREF=
"#cupsLangEncoding">
5136 <CODE>cupsLangEncoding()
</CODE></A>,
<A HREF=
"#cupsLangFlush"> <CODE>
5137 cupsLangFlush()
</CODE></A>,
<A HREF=
"#cupsLangGet"> <CODE>cupsLangGet()
</CODE>
5138 </A>,
<A HREF=
"#cupsLangString"> <CODE>cupsLangString()
</CODE></A>
5141 <H2><A NAME=
"cupsLangGet">cupsLangGet()
</A></H2>
5142 <H3><A NAME=
"10_24_1">Usage
</A></H3>
5145 cupsLangGet(const char *name);
5147 <H3><A NAME=
"10_24_2">Arguments
</A></H3>
5149 <TABLE BORDER
WIDTH=
"80%">
5150 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
5151 <TR><TD>name
</TD><TD>The name of the locale.
</TD></TR>
5154 <H3><A NAME=
"10_24_3">Returns
</A></H3>
5155 <P>A pointer to a language structure.
</P>
5156 <H3><A NAME=
"10_24_4">Description
</A></H3>
5157 <P><CODE>cupsLangGet()
</CODE> returns a language structure for the
5158 specified locale. If the locale is not defined then the POSIX (English)
5159 locale is substituted.
</P>
5160 <H3><A NAME=
"10_24_5">Example
</A></H3>
5162 #include
<cups/language.h
>
5164 <A HREF=
"#cups_lang_t">cups_lang_t
</A> *language;
5168 language = cupsLangGet(
"fr
");
5172 cupsLangFree(language);
5174 <H3><A NAME=
"10_24_6">See Also
</A></H3>
5175 <P><A HREF=
"#cupsLangDefault"> <CODE>cupsLangDefault()
</CODE></A>,
<A HREF=
"#cupsLangEncoding">
5176 <CODE>cupsLangEncoding()
</CODE></A>,
<A HREF=
"#cupsLangFlush"> <CODE>
5177 cupsLangFlush()
</CODE></A>,
<A HREF=
"#cupsLangFree"> <CODE>cupsLangFree()
</CODE>
5178 </A>,
<A HREF=
"#cupsLangString"> <CODE>cupsLangString()
</CODE></A>
5181 <H2><A NAME=
"cupsLangString">cupsLangString()
</A></H2>
5182 <H3><A NAME=
"10_25_1">Usage
</A></H3>
5185 cupsLangString(cups_lang_t *language,
5188 <H3><A NAME=
"10_25_2">Arguments
</A></H3>
5190 <TABLE BORDER
WIDTH=
"80%">
5191 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
5192 <TR><TD>language
</TD><TD>The language to query.
</TD></TR>
5193 <TR><TD>message
</TD><TD>The message number.
</TD></TR>
5196 <H3><A NAME=
"10_25_3">Returns
</A></H3>
5197 <P>A pointer to the message string or
<CODE>NULL
</CODE> if the message
5199 <H3><A NAME=
"10_25_4">Description
</A></H3>
5200 <P><CODE>cupsLangString()
</CODE> returns a pointer to the specified
5201 message string in the specified language.
</P>
5202 <H3><A NAME=
"10_25_5">Example
</A></H3>
5204 #include
<cups/language.h
>
5206 <A HREF=
"#cups_lang_t">cups_lang_t
</A> *language;
5210 language = cupsLangGet(
"fr
");
5212 s = cupsLangString(language, CUPS_MSG_YES);
5216 cupsLangFree(language);
5218 <H3><A NAME=
"10_25_6">See Also
</A></H3>
5219 <P><A HREF=
"#cupsLangDefault"> <CODE>cupsLangDefault()
</CODE></A>,
<A HREF=
"#cupsLangEncoding">
5220 <CODE>cupsLangEncoding()
</CODE></A>,
<A HREF=
"#cupsLangFlush"> <CODE>
5221 cupsLangFlush()
</CODE></A>,
<A HREF=
"#cupsLangFree"> <CODE>cupsLangFree()
</CODE>
5222 </A>,
<A HREF=
"#cupsLangGet"> <CODE>cupsLangGet()
</CODE></A>
5225 <H2><A NAME=
"cupsLastError">cupsLastError()
</A></H2>
5226 <H3><A NAME=
"10_26_1">Usage
</A></H3>
5229 cupsLastError(void);
5231 <H3><A NAME=
"10_26_2">Returns
</A></H3>
5232 <P>An enumeration containing the last IPP error.
</P>
5233 <H3><A NAME=
"10_26_3">Description
</A></H3>
5234 <P><CODE>cupsLastError()
</CODE> returns the last IPP error that
5235 occurred. If no error occurred then it will return
<CODE>IPP_OK
</CODE>
5236 or
<CODE>IPP_OK_CONFLICT
</CODE>.
</P>
5237 <H3><A NAME=
"10_26_4">Example
</A></H3>
5239 #include
<cups/cups.h
>
5241 ipp_status_t status;
5245 status = cupsLastError();
5247 <H3><A NAME=
"10_26_5">See Also
</A></H3>
5248 <P><A HREF=
"#cupsCancelJob"> <CODE>cupsCancelJob()
</CODE></A>,
<A HREF=
"#cupsPrintFile">
5249 <CODE>cupsPrintFile()
</CODE></A>
5252 <H2><A NAME=
"cupsMarkOptions">cupsMarkOptions()
</A></H2>
5253 <H3><A NAME=
"10_27_1">Usage
</A></H3>
5256 cupsMarkOptions(ppd_file_t *ppd,
5258 cups_option_t *options);
5260 <H3><A NAME=
"10_27_2">Arguments
</A></H3>
5262 <TABLE BORDER
WIDTH=
"80%">
5263 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
5264 <TR><TD>ppd
</TD><TD>The PPD file to mark.
</TD></TR>
5265 <TR><TD>num_options
</TD><TD>The number of options in the options array.
</TD>
5267 <TR><TD>options
</TD><TD>A pointer to the options array.
</TD></TR>
5270 <H3><A NAME=
"10_27_3">Returns
</A></H3>
5271 <P>The number of conflicts found.
</P>
5272 <H3><A NAME=
"10_27_4">Description
</A></H3>
5273 <P><CODE>cupsMarkOptions()
</CODE> marks options in the PPD file. It also
5274 handles mapping of IPP option names and values to PPD option names.
</P>
5275 <H3><A NAME=
"10_27_5">Example
</A></H3>
5277 #include
<cups/cups.h
>
5280 <A HREF=
"#cups_option_t">cups_option_t
</A> *options;
5281 <A HREF=
"#ppd_file_t">ppd_file_t
</A> *ppd;
5285 cupsMarkOptions(ppd, num_options, options);
5287 <H3><A NAME=
"10_27_6">See Also
</A></H3>
5288 <P><A HREF=
"#cupsAddOption"> <CODE>cupsAddOption()
</CODE></A>,
<A HREF=
"#cupsFreeOptions">
5289 <CODE>cupsFreeOptions()
</CODE></A>,
<A HREF=
"#cupsGetOption"> <CODE>
5290 cupsGetOption()
</CODE></A>,
<A HREF=
"#cupsParseOptions"> <CODE>
5291 cupsParseOptions()
</CODE></A>
5294 <H2><A NAME=
"cupsParseOptions">cupsParseOptions()
</A></H2>
5295 <H3><A NAME=
"10_28_1">Usage
</A></H3>
5298 cupsParseOptions(const char *arg,
5300 cups_option_t **options);
5302 <H3><A NAME=
"10_28_2">Arguments
</A></H3>
5304 <TABLE BORDER
WIDTH=
"80%">
5305 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
5306 <TR><TD>arg
</TD><TD>The string containing one or more options.
</TD></TR>
5307 <TR><TD>num_options
</TD><TD>The number of options in the options array.
</TD>
5309 <TR><TD>options
</TD><TD>A pointer to the options array pointer.
</TD></TR>
5312 <H3><A NAME=
"10_28_3">Returns
</A></H3>
5313 <P>The new number of options in the array.
</P>
5314 <H3><A NAME=
"10_28_4">Description
</A></H3>
5315 <P><CODE>cupsParseOptions()
</CODE> parses the specifies string for one
5316 or more options of the form
"name=value
",
"name
", or
"noname
". It can
5317 be called multiple times to combine the options from several strings.
</P>
5318 <H3><A NAME=
"10_28_5">Example
</A></H3>
5320 #include
<cups/cups.h
>
5323 <A HREF=
"#cups_options_t">cups_option_t
</A> *options;
5328 options = (cups_option_t *)
0;
5329 num_options = cupsParseOptions(argv[
5], num_options,
&options);
5331 <H3><A NAME=
"10_28_6">See Also
</A></H3>
5332 <P><A HREF=
"#cupsAddOption"> <CODE>cupsAddOption()
</CODE></A>,
<A HREF=
"#cupsFreeOptions">
5333 <CODE>cupsFreeOptions()
</CODE></A>,
<A HREF=
"#cupsGetOption"> <CODE>
5334 cupsGetOption()
</CODE></A>,
<A HREF=
"#cupsMarkOptions"> <CODE>
5335 cupsMarkOptions()
</CODE></A>
5338 <H2><A NAME=
"cupsPrintFile">cupsPrintFile()
</A></H2>
5339 <H3><A NAME=
"10_29_1">Usage
</A></H3>
5342 cupsPrintFile(const char *printer,
5343 const char *filename,
5346 cups_option_t *options);
5348 <H3><A NAME=
"10_29_2">Arguments
</A></H3>
5350 <TABLE BORDER
WIDTH=
"80%">
5351 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
5352 <TR><TD>printer
</TD><TD>The printer or class to print to.
</TD></TR>
5353 <TR><TD>filename
</TD><TD>The file to print.
</TD></TR>
5354 <TR><TD>title
</TD><TD>The job title.
</TD></TR>
5355 <TR><TD>num_options
</TD><TD>The number of options in the options array.
</TD>
5357 <TR><TD>options
</TD><TD>A pointer to the options array.
</TD></TR>
5360 <H3><A NAME=
"10_29_3">Returns
</A></H3>
5361 <P>The new job ID number or
0 on error.
</P>
5362 <H3><A NAME=
"10_29_4">Description
</A></H3>
5363 <P><CODE>cupsPrintFile()
</CODE> sends a file to the specified printer or
5364 class for printing. If the job cannot be printed the error code can be
5365 found by calling
<CODE>cupsLastError()
</CODE>.
</P>
5366 <H3><A NAME=
"10_29_5">Example
</A></H3>
5368 #include
<cups/cups.h
>
5371 <A HREF=
"#cups_option_t">cups_option_t
</A> *options;
5376 jobid = cupsPrintFile(
"printer@hostname
",
"filename.ps
",
"Job Title
",
5377 num_options, options);
5379 <H3><A NAME=
"10_29_6">See Also
</A></H3>
5380 <P><A HREF=
"#cupsCancelJob"> <CODE>cupsCancelJob()
</CODE></A>,
<A HREF=
"#cupsLastError">
5381 <CODE>cupsLastError()
</CODE></A>,
<A HREF=
"#cupsPrintFiles"> <CODE>
5382 cupsPrintFiles()
</CODE></A>
5385 <H2><A NAME=
"cupsPrintFiles">cupsPrintFiles()
</A></H2>
5386 <H3><A NAME=
"10_30_1">Usage
</A></H3>
5389 cupsPrintFiles(const char *printer,
5394 cups_option_t *options);
5396 <H3><A NAME=
"10_30_2">Arguments
</A></H3>
5398 <TABLE BORDER
WIDTH=
"80%">
5399 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
5400 <TR><TD>printer
</TD><TD>The printer or class to print to.
</TD></TR>
5401 <TR><TD>num_files
</TD><TD>The number of files to print.
</TD></TR>
5402 <TR><TD>files
</TD><TD>The files to print.
</TD></TR>
5403 <TR><TD>title
</TD><TD>The job title.
</TD></TR>
5404 <TR><TD>num_options
</TD><TD>The number of options in the options array.
</TD>
5406 <TR><TD>options
</TD><TD>A pointer to the options array.
</TD></TR>
5409 <H3><A NAME=
"10_30_3">Returns
</A></H3>
5410 <P>The new job ID number or
0 on error.
</P>
5411 <H3><A NAME=
"10_30_4">Description
</A></H3>
5412 <P><CODE>cupsPrintFiles()
</CODE> sends multiple files to the specified
5413 printer or class for printing. If the job cannot be printed the error
5414 code can be found by calling
<CODE>cupsLastError()
</CODE>.
</P>
5415 <H3><A NAME=
"10_30_5">Example
</A></H3>
5417 #include
<cups/cups.h
>
5420 const char *files[
100];
5422 <A HREF=
"#cups_option_t">cups_option_t
</A> *options;
5427 jobid = cupsPrintFiles(
"printer@hostname
", num_files, files,
5428 "Job Title
", num_options, options);
5430 <H3><A NAME=
"10_30_6">See Also
</A></H3>
5431 <P><A HREF=
"#cupsCancelJob"> <CODE>cupsCancelJob()
</CODE></A>,
<A HREF=
"#cupsLastError">
5432 <CODE>cupsLastError()
</CODE></A>,
<A HREF=
"#cupsPrintFile"> <CODE>
5433 cupsPrintFile()
</CODE></A>
5436 <H2><A NAME=
"cupsRasterClose">cupsRasterClose()
</A></H2>
5437 <H3><A NAME=
"10_31_1">Usage
</A></H3>
5440 cupsRasterClose(cups_raster_t *ras);
5442 <H3><A NAME=
"10_31_2">Arguments
</A></H3>
5444 <TABLE BORDER
WIDTH=
"80%">
5445 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
5446 <TR><TD>ras
</TD><TD>The raster stream to close.
</TD></TR>
5449 <H3><A NAME=
"10_31_3">Description
</A></H3>
5450 <P><CODE>cupsRasterClose()
</CODE> closes the specified raster stream.
</P>
5451 <H3><A NAME=
"10_31_4">Example
</A></H3>
5453 #include
<cups/raster.h
>
5455 <A HREF=
"#cups_raster_t">cups_raster_t
</A> *ras;
5459 cupsRasterClose(ras);
5461 <H3><A NAME=
"10_31_5">See Also
</A></H3>
5462 <P><A HREF=
"#cupsRasterOpen"> <CODE>cupsRasterOpen()
</CODE></A>,
<A HREF=
"#cupsRasterReadHeader">
5463 <CODE>cupsRasterReadHeader()
</CODE></A>,
<A HREF=
"#cupsRasterReadPixels">
5464 <CODE>cupsRasterReadPixels()
</CODE></A>,
<A HREF=
"#cupsRasterWriteHeader">
5465 <CODE>cupsRasterWriteHeader()
</CODE></A>,
<A HREF=
"#cupsRasterWritePixels">
5466 <CODE>cupsRasterWritePixels()
</CODE></A>
5469 <H2><A NAME=
"cupsRasterOpen">cupsRasterOpen()
</A></H2>
5470 <H3><A NAME=
"10_32_1">Usage
</A></H3>
5473 cupsRasterOpen(int fd,
5476 <H3><A NAME=
"10_32_2">Arguments
</A></H3>
5478 <TABLE BORDER
WIDTH=
"80%">
5479 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
5480 <TR><TD>fd
</TD><TD>The file descriptor to use.
</TD></TR>
5481 <TR><TD>mode
</TD><TD>The mode to use;
<CODE>CUPS_RASTER_READ
</CODE> or
<CODE>
5482 CUPS_RASTER_WRITE
</CODE>.
</TD></TR>
5485 <H3><A NAME=
"10_32_3">Returns
</A></H3>
5486 <P>A pointer to a raster stream or
<CODE>NULL
</CODE> if there was an
5488 <H3><A NAME=
"10_32_4">Description
</A></H3>
5489 <P><CODE>cupsRasterOpen()
</CODE> opens a raster stream for reading or
5491 <H3><A NAME=
"10_32_5">Example
</A></H3>
5493 #include
<cups/raster.h
>
5495 <A HREF=
"#cups_raster_t">cups_raster_t
</A> *ras;
5499 ras = cupsRasterOpen(
0, CUPS_RASTER_READ);
5501 <H3><A NAME=
"10_32_6">See Also
</A></H3>
5502 <P><A HREF=
"#cupsRasterClose"> <CODE>cupsRasterClose()
</CODE></A>,
<A HREF=
"#cupsRasterReadHeader">
5503 <CODE>cupsRasterReadHeader()
</CODE></A>,
<A HREF=
"#cupsRasterReadPixels">
5504 <CODE>cupsRasterReadPixels()
</CODE></A>,
<A HREF=
"#cupsRasterWriteHeader">
5505 <CODE>cupsRasterWriteHeader()
</CODE></A>,
<A HREF=
"#cupsRasterWritePixels">
5506 <CODE>cupsRasterWritePixels()
</CODE></A>
5509 <H2><A NAME=
"cupsRasterReadHeader">cupsRasterReadHeader()
</A></H2>
5510 <H3><A NAME=
"10_33_1">Usage
</A></H3>
5513 cupsRasterReadHeader(cups_raster_t *ras,
5514 cups_page_header_t *header);
5516 <H3><A NAME=
"10_33_2">Arguments
</A></H3>
5518 <TABLE BORDER
WIDTH=
"80%">
5519 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
5520 <TR><TD>ras
</TD><TD>The raster stream to read from.
</TD></TR>
5521 <TR><TD>header
</TD><TD>A pointer to a page header structure to read
5525 <H3><A NAME=
"10_33_3">Returns
</A></H3>
5526 <P>1 on success,
0 on EOF or error.
</P>
5527 <H3><A NAME=
"10_33_4">Description
</A></H3>
5528 <P><CODE>cupsRasterReadHeader()
</CODE> reads a page header from the
5529 specified raster stream.
</P>
5530 <H3><A NAME=
"10_33_5">Example
</A></H3>
5532 #include
<cups/raster.h
>
5535 <A HREF=
"#cups_raster_t">cups_raster_t
</A> *ras;
5536 <A HREF=
"#cups_raster_header_t">cups_raster_header_t
</A> header;
5537 unsigned char pixels[
8192];
5540 while (cupsRasterReadHeader(ras,
&header))
5544 for (line =
0; line
< header.cupsHeight; line ++)
5546 cupsRasterReadPixels(ras, pixels, header.cupsBytesPerLine);
5552 <H3><A NAME=
"10_33_6">See Also
</A></H3>
5553 <P><A HREF=
"#cupsRasterClose"> <CODE>cupsRasterClose()
</CODE></A>,
<A HREF=
"#cupsRasterOpen">
5554 <CODE>cupsRasterOpen()
</CODE></A>,
<A HREF=
"#cupsRasterReadPixels"> <CODE>
5555 cupsRasterReadPixels()
</CODE></A>,
<A HREF=
"#cupsRasterWriteHeader"> <CODE>
5556 cupsRasterWriteHeader()
</CODE></A>,
<A HREF=
"#cupsRasterWritePixels"> <CODE>
5557 cupsRasterWritePixels()
</CODE></A>
5560 <H2><A NAME=
"cupsRasterReadPixels">cupsRasterReadPixels()
</A></H2>
5561 <H3><A NAME=
"10_34_1">Usage
</A></H3>
5564 cupsRasterReadPixels(cups_raster_t *ras,
5565 unsigned char *pixels,
5568 <H3><A NAME=
"10_34_2">Arguments
</A></H3>
5570 <TABLE BORDER
WIDTH=
"80%">
5571 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
5572 <TR><TD>ras
</TD><TD>The raster stream to read from.
</TD></TR>
5573 <TR><TD>pixels
</TD><TD>The pointer to a pixel buffer.
</TD></TR>
5574 <TR><TD>length
</TD><TD>The number of bytes of pixel data to read.
</TD></TR>
5577 <H3><A NAME=
"10_34_3">Returns
</A></H3>
5578 <P>The number of bytes read or
0 on EOF or error.
</P>
5579 <H3><A NAME=
"10_34_4">Description
</A></H3>
5580 <P><CODE>cupsRasterReadPixels()
</CODE> reads pixel data from the
5581 specified raster stream.
</P>
5582 <H3><A NAME=
"10_34_5">Example
</A></H3>
5584 #include
<cups/raster.h
>
5587 <A HREF=
"#cups_raster_t">cups_raster_t
</A> *ras;
5588 <A HREF=
"#cups_raster_header_t">cups_raster_header_t
</A> header;
5589 unsigned char pixels[
8192];
5592 while (cupsRasterReadHeader(ras,
&header))
5596 for (line =
0; line
< header.cupsHeight; line ++)
5598 cupsRasterReadPixels(ras, pixels, header.cupsBytesPerLine);
5604 <H3><A NAME=
"10_34_6">See Also
</A></H3>
5605 <P><A HREF=
"#cupsRasterClose"> <CODE>cupsRasterClose()
</CODE></A>,
<A HREF=
"#cupsRasterOpen">
5606 <CODE>cupsRasterOpen()
</CODE></A>,
<A HREF=
"#cupsRasterReadHeader"> <CODE>
5607 cupsRasterReadHeader()
</CODE></A>,
<A HREF=
"#cupsRasterWriteHeader"> <CODE>
5608 cupsRasterWriteHeader()
</CODE></A>,
<A HREF=
"#cupsRasterWritePixels"> <CODE>
5609 cupsRasterWritePixels()
</CODE></A>
5612 <H2><A NAME=
"cupsRasterWriteHeader">cupsRasterWriteHeader()
</A></H2>
5613 <H3><A NAME=
"10_35_1">Usage
</A></H3>
5616 cupsRasterWriteHeader(cups_raster_t *ras,
5617 cups_page_header_t *header);
5619 <H3><A NAME=
"10_35_2">Arguments
</A></H3>
5621 <TABLE BORDER
WIDTH=
"80%">
5622 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
5623 <TR><TD>ras
</TD><TD>The raster stream to write to.
</TD></TR>
5624 <TR><TD>header
</TD><TD>A pointer to the page header to write.
</TD></TR>
5627 <H3><A NAME=
"10_35_3">Returns
</A></H3>
5628 <P>1 on success,
0 on error.
</P>
5629 <H3><A NAME=
"10_35_4">Description
</A></H3>
5630 <P><CODE>cupsRasterWriteHeader()
</CODE> writes the specified page header
5631 to a raster stream.
</P>
5632 <H3><A NAME=
"10_35_5">Example
</A></H3>
5634 #include
<cups/raster.h
>
5637 <A HREF=
"#cups_raster_t">cups_raster_t
</A> *ras;
5638 <A HREF=
"#cups_raster_header_t">cups_raster_header_t
</A> header;
5639 unsigned char pixels[
8192];
5642 cupsRasterWriteHeader(ras,
&header);
5644 for (line =
0; line
< header.cupsHeight; line ++)
5648 cupsRasterWritePixels(ras, pixels, header.cupsBytesPerLine);
5651 <H3><A NAME=
"10_35_6">See Also
</A></H3>
5652 <P><A HREF=
"#cupsRasterClose"> <CODE>cupsRasterClose()
</CODE></A>,
<A HREF=
"#cupsRasterOpen">
5653 <CODE>cupsRasterOpen()
</CODE></A>,
<A HREF=
"#cupsRasterReadHeader"> <CODE>
5654 cupsRasterReadHeader()
</CODE></A>,
<A HREF=
"#cupsRasterReadPixels"> <CODE>
5655 cupsRasterReadPixels()
</CODE></A>,
<A HREF=
"#cupsRasterWritePixels"> <CODE>
5656 cupsRasterWritePixels()
</CODE></A>
5659 <H2><A NAME=
"cupsRasterWritePixels">cupsRasterWritePixels()
</A></H2>
5660 <H3><A NAME=
"10_36_1">Usage
</A></H3>
5663 cupsRasterWritePixels(cups_raster_t *ras,
5664 unsigned char *pixels,
5667 <H3><A NAME=
"10_36_2">Arguments
</A></H3>
5669 <TABLE BORDER
WIDTH=
"80%">
5670 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
5671 <TR><TD>ras
</TD><TD>The raster stream to write to.
</TD></TR>
5672 <TR><TD>pixels
</TD><TD>The pixel data to write.
</TD></TR>
5673 <TR><TD>length
</TD><TD>The number of bytes to write.
</TD></TR>
5676 <H3><A NAME=
"10_36_3">Returns
</A></H3>
5677 <P>The number of bytes written.
</P>
5678 <H3><A NAME=
"10_36_4">Description
</A></H3>
5679 <P><CODE>cupsRasterWritePixels()
</CODE> writes the specified pixel data
5680 to a raster stream.
</P>
5681 <H3><A NAME=
"10_36_5">Example
</A></H3>
5683 #include
<cups/raster.h
>
5686 <A HREF=
"#cups_raster_t">cups_raster_t
</A> *ras;
5687 <A HREF=
"#cups_raster_header_t">cups_raster_header_t
</A> header;
5688 unsigned char pixels[
8192];
5691 cupsRasterWriteHeader(ras,
&header);
5693 for (line =
0; line
< header.cupsHeight; line ++)
5697 cupsRasterWritePixels(ras, pixels, header.cupsBytesPerLine);
5700 <H3><A NAME=
"10_36_6">See Also
</A></H3>
5701 <P><A HREF=
"#cupsRasterClose"> <CODE>cupsRasterClose()
</CODE></A>,
<A HREF=
"#cupsRasterOpen">
5702 <CODE>cupsRasterOpen()
</CODE></A>,
<A HREF=
"#cupsRasterReadHeader"> <CODE>
5703 cupsRasterReadHeader()
</CODE></A>,
<A HREF=
"#cupsRasterReadPixels"> <CODE>
5704 cupsRasterReadPixels()
</CODE></A>,
<A HREF=
"#cupsRasterWriteHeader"> <CODE>
5705 cupsRasterWriteHeader()
</CODE></A>
5708 <H2><A NAME=
"cupsServer">cupsServer()
</A></H2>
5709 <H3><A NAME=
"10_37_1">Usage
</A></H3>
5714 <H3><A NAME=
"10_37_2">Returns
</A></H3>
5715 <P>A pointer to the default server name.
</P>
5716 <H3><A NAME=
"10_37_3">Description
</A></H3>
5717 <P><CODE>cupsServer()
</CODE> returns a pointer to the default server
5718 name. The server name is stored in a static location and will be
5719 overwritten with every call to
<CODE>cupsServer()
</CODE>.
</P>
5720 <P>The default server is determined from the following locations:
</P>
5722 <LI>The
<CODE>CUPS_SERVER
</CODE> environment variable,
</LI>
5723 <LI>The
<CODE>ServerName
</CODE> directive in the
<VAR> client.conf
</VAR>
5725 <LI>The default host,
"localhost
".
</LI>
5727 <H3><A NAME=
"10_37_4">Example
</A></H3>
5729 #include
<cups/cups.h
>
5733 server = cupsServer();
5735 <H3><A NAME=
"10_37_5">See Also
</A></H3>
5736 <P><A HREF=
"#cupsGetPassword"> <CODE>cupsGetPassword()
</CODE></A>,
<A HREF=
"#cupsSetPasswordCB">
5737 <CODE>cupsSetPasswordCB()
</CODE></A>,
<A HREF=
"#cupsSetServer"> <CODE>
5738 cupsSetServer()
</CODE></A>,
<A HREF=
"#cupsSetUser"> <CODE>cupsSetUser()
</CODE>
5739 </A>,
<A HREF=
"#cupsUser"> <CODE>cupsUser()
</CODE></A>
5742 <H2><A NAME=
"cupsSetDests">cupsSetDests()
</A></H2>
5743 <H3><A NAME=
"10_38_1">Usage
</A></H3>
5746 cupsSetDests(int num_dests,
5747 cups_dest_t *dests);
5749 <H3><A NAME=
"10_38_2">Arguments
</A></H3>
5751 <TABLE BORDER
WIDTH=
"80%">
5752 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
5753 <TR><TD>num_dests
</TD><TD>Number of destinations.
</TD></TR>
5754 <TR><TD>dests
</TD><TD>Array of destinations.
</TD></TR>
5757 <H3><A NAME=
"10_38_3">Description
</A></H3>
5758 <P><CODE>cupsSetDests()
</CODE> saves the destination array to disk. If
5759 the current UID is
0, the destinations are saved in the
<VAR>
5760 /etc/cups/lpoptions
</VAR> file, otherwise they are saved in the
<VAR>
5761 ~/.lpoptions
</VAR> file. This function is typically used to save the
5762 default options and instances that are set by the user.
</P>
5763 <H3><A NAME=
"10_38_4">Example
</A></H3>
5765 #include
<cups/cups.h
>
5768 <A HREF=
"#cups_dest_t">cups_dest_t
</A> *dests;
5772 cupsSetDests(num_dests, dests);
5774 <H3><A NAME=
"10_38_5">See Also
</A></H3>
5775 <P><A HREF=
"#cupsGetDests"> <CODE>cupsGetDests()
</CODE></A>
5778 <H2><A NAME=
"cupsSetEncryption">cupsSetEncryption()
</A></H2>
5779 <H3><A NAME=
"10_39_1">Usage
</A></H3>
5782 cupsSetEncryption(http_encryption_t encryption);
5784 <H3><A NAME=
"10_39_2">Arguments
</A></H3>
5786 <TABLE BORDER
WIDTH=
"80%">
5787 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
5788 <TR><TD>encryption
</TD><TD>The type of encryption to use.
</TD></TR>
5791 <H3><A NAME=
"10_39_3">Description
</A></H3>
5792 <P><CODE>cupsSetEncryption()
</CODE> sets the default type of encryption
5793 to use when connecting with the print server.
</P>
5794 <H3><A NAME=
"10_39_4">Example
</A></H3>
5796 #include
<cups/cups.h
>
5798 cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
5800 <H3><A NAME=
"10_39_5">See Also
</A></H3>
5801 <P><A HREF=
"#cupsEncryption"> <CODE>cupsEncryption()
</CODE></A>
5804 <H2><A NAME=
"cupsSetPasswordCB">cupsSetPasswordCB()
</A></H2>
5805 <H3><A NAME=
"10_40_1">Usage
</A></H3>
5808 cupsSetPasswordCB(const char *(*cb)(const char *prompt));
5810 <H3><A NAME=
"10_40_2">Arguments
</A></H3>
5812 <TABLE BORDER
WIDTH=
"80%">
5813 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
5814 <TR><TD>cb
</TD><TD>The password callback function.
</TD></TR>
5817 <H3><A NAME=
"10_40_3">Description
</A></H3>
5818 <P><CODE>cupsSetPasswordCB()
</CODE> sets the callback function to use
5819 when asking the user for a password. The callback function must accept
5820 a single character string pointer (the prompt string) and return
<CODE>
5821 NULL
</CODE> if the user did not enter a password string or a pointer to
5822 the password string otherwise.
</P>
5823 <H3><A NAME=
"10_40_4">Example
</A></H3>
5825 #include
<cups/cups.h
>
5828 my_password_cb(const char *prompt)
5830 return (getpass(prompt));
5839 cupsSetPasswordCB(my_password_cb);
5840 password = cupsGetPassword(
"Please enter a password:
");
5842 <H3><A NAME=
"10_40_5">See Also
</A></H3>
5843 <P><A HREF=
"#cupsServer"> <CODE>cupsServer()
</CODE></A>,
<A HREF=
"#cupsSetServer">
5844 <CODE>cupsSetServer()
</CODE></A>,
<A HREF=
"#cupsSetUser"> <CODE>
5845 cupsSetUser()
</CODE></A>,
<A HREF=
"#cupsUser"> <CODE>cupsUser()
</CODE></A>
5849 <H2><A NAME=
"cupsSetServer">cupsSetServer()
</A></H2>
5850 <H3><A NAME=
"10_41_1">Usage
</A></H3>
5853 cupsSetServer(const char *server);
5855 <H3><A NAME=
"10_41_2">Arguments
</A></H3>
5857 <TABLE BORDER
WIDTH=
"80%">
5858 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
5859 <TR><TD>server
</TD><TD>The default server to use.
</TD></TR>
5862 <H3><A NAME=
"10_41_3">Description
</A></H3>
5863 <P><CODE>cupsSetServer()
</CODE> sets the default server to use for the
5864 CUPS API. If the
<CODE>server
</CODE> argument is
<CODE>NULL
</CODE>, the
5865 default server is used.
</P>
5866 <H3><A NAME=
"10_41_4">Example
</A></H3>
5868 #include
<cups/cups.h
>
5870 cupsSetServer(
"foo.bar.com
");
5872 <H3><A NAME=
"10_41_5">See Also
</A></H3>
5873 <P><A HREF=
"#cupsServer"> <CODE>cupsServer()
</CODE></A>,
<A HREF=
"#cupsSetPasswordCB">
5874 <CODE>cupsSetPasswordCB()
</CODE></A>,
<A HREF=
"#cupsSetUser"> <CODE>
5875 cupsSetUser()
</CODE></A>,
<A HREF=
"#cupsUser"> <CODE>cupsUser()
</CODE></A>
5879 <H2><A NAME=
"cupsSetUser">cupsSetUser()
</A></H2>
5880 <H3><A NAME=
"10_42_1">Usage
</A></H3>
5883 cupsSetUser(const char *user);
5885 <H3><A NAME=
"10_42_2">Arguments
</A></H3>
5887 <TABLE BORDER
WIDTH=
"80%">
5888 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
5889 <TR><TD>user
</TD><TD>The user name string to use.
</TD></TR>
5892 <H3><A NAME=
"10_42_3">Description
</A></H3>
5893 <P><CODE>cupsSetUser()
</CODE> sets the default user name for
5894 authentication. If the
<CODE>user
</CODE> argument is
<CODE>NULL
</CODE>
5895 then the current login user is used.
</P>
5896 <H3><A NAME=
"10_42_4">Example
</A></H3>
5898 #include
<cups/cups.h
>
5902 cupsSetUser(
"root
");
5904 <H3><A NAME=
"10_42_5">See Also
</A></H3>
5905 <P><A HREF=
"#cupsServer"> <CODE>cupsServer()
</CODE></A>,
<A HREF=
"#cupsSetPasswordCB">
5906 <CODE>cupsSetPasswordCB()
</CODE></A>,
<A HREF=
"#cupsSetServer"> <CODE>
5907 cupsSetServer()
</CODE></A>,
<A HREF=
"#cupsUser"> <CODE>cupsUser()
</CODE></A>
5911 <H2><A NAME=
"cupsTempFd">cupsTempFd()
</A></H2>
5912 <H3><A NAME=
"10_43_1">Usage
</A></H3>
5915 cupsTempFd(char *filename,
5918 <H3><A NAME=
"10_43_2">Arguments
</A></H3>
5920 <TABLE BORDER
WIDTH=
"80%">
5921 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
5922 <TR><TD>filename
</TD><TD>The character string to hold the temporary
5924 <TR><TD>length
</TD><TD>The size of the filename string in bytes.
</TD></TR>
5927 <H3><A NAME=
"10_43_3">Returns
</A></H3>
5928 <P>A file descriptor open for reading and writing.
</P>
5929 <H3><A NAME=
"10_43_4">Description
</A></H3>
5930 <P><CODE>cupsTempFd()
</CODE> create a temporary filename in the
<VAR>
5931 /var/tmp
</VAR> directory or the directory specified by the
<CODE>TMPDIR
</CODE>
5932 environment variable.
</P>
5933 <H3><A NAME=
"10_43_5">Example
</A></H3>
5935 #include
<cups/cups.h
>
5940 fd = cupsTempFd(filename, sizeof(filename));
5942 <H3><A NAME=
"10_43_6">See Also
</A></H3>
5943 <P><A HREF=
"#cupsTempFile"> <CODE>cupsTempFile()
</CODE></A>
5946 <H2><A NAME=
"cupsTempFile">cupsTempFile()
</A></H2>
5947 <H3><A NAME=
"10_44_1">Usage
</A></H3>
5950 cupsTempFile(char *filename,
5953 <H3><A NAME=
"10_44_2">Arguments
</A></H3>
5955 <TABLE BORDER
WIDTH=
"80%">
5956 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
5957 <TR><TD>filename
</TD><TD>The character string to hold the temporary
5959 <TR><TD>length
</TD><TD>The size of the filename string in bytes.
</TD></TR>
5962 <H3><A NAME=
"10_44_3">Returns
</A></H3>
5963 <P>A pointer to
<CODE>filename
</CODE>.
</P>
5964 <H3><A NAME=
"10_44_4">Description
</A></H3>
5965 <P><CODE>cupsTempFile()
</CODE> creates a temporary filename in the
<VAR>
5966 /var/tmp
</VAR> directory or the directory specified by the
<CODE>TMPDIR
</CODE>
5967 environment variable.
</P>
5968 <H3><A NAME=
"10_44_5">Example
</A></H3>
5970 #include
<cups/cups.h
>
5974 cupsTempFile(filename, sizeof(filename));
5976 <H3><A NAME=
"10_44_6">See Also
</A></H3>
5977 <P><A HREF=
"#cupsTempFd"> <CODE>cupsTempFd()
</CODE></A>
5980 <H2><A NAME=
"cupsUser">cupsUser()
</A></H2>
5981 <H3><A NAME=
"10_45_1">Usage
</A></H3>
5986 <H3><A NAME=
"10_45_2">Returns
</A></H3>
5987 <P>A pointer to the current username or
<CODE>NULL
</CODE> if the user ID
5989 <H3><A NAME=
"10_45_3">Description
</A></H3>
5990 <P><CODE>cupsUser()
</CODE> returns the name associated with the current
5991 user ID as reported by the
<CODE>getuid()
</CODE> system call.
</P>
5992 <H3><A NAME=
"10_45_4">Example
</A></H3>
5994 #include
<cups/cups.h
>
6000 <H3><A NAME=
"10_45_5">See Also
</A></H3>
6001 <P><A HREF=
"#cupsGetPassword"> <CODE>cupsGetPassword()
</CODE></A>,
<A HREF=
"#cupsServer">
6002 <CODE>cupsServer()
</CODE></A>
6005 <H2><A NAME=
"httpBlocking">httpBlocking()
</A></H2>
6006 <H3><A NAME=
"10_46_1">Usage
</A></H3>
6009 httpBlocking(http_t *http,
6012 <H3><A NAME=
"10_46_2">Arguments
</A></H3>
6014 <TABLE BORDER
WIDTH=
"80%">
6015 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6016 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
6017 <TR><TD>blocking
</TD><TD>0 if the connection should be non-blocking,
1
6018 if it should be blocking
</TD></TR>
6021 <H3><A NAME=
"10_46_3">Description
</A></H3>
6022 <P>The
<CODE>httpBlocking()
</CODE> function sets the blocking mode for
6023 the HTTP connection. By default HTTP connections will block (stop) the
6024 client program until data is available or can be sent to the server.
</P>
6025 <H3><A NAME=
"10_46_4">Example
</A></H3>
6027 #include
<cups/http.h
>
6031 http = httpConnect(
"server
", port);
6032 httpBlocking(http,
0);
6034 <H3><A NAME=
"10_46_5">See Also
</A></H3>
6035 <A HREF=
"#httpCheck"> <CODE>httpCheck()
</CODE></A>,
<A HREF=
"#httpConnect">
6036 <CODE>httpConnect()
</CODE></A>
6039 <H2><A NAME=
"httpCheck">httpCheck()
</A></H2>
6040 <H3><A NAME=
"10_47_1">Usage
</A></H3>
6043 httpCheck(http_t *http);
6045 <H3><A NAME=
"10_47_2">Arguments
</A></H3>
6047 <TABLE BORDER
WIDTH=
"80%">
6048 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6049 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
6052 <H3><A NAME=
"10_47_3">Returns
</A></H3>
6053 <P>0 if there is no data pending,
1 otherwise.
</P>
6054 <H3><A NAME=
"10_47_4">Description
</A></H3>
6055 <P>The
<CODE>httpCheck()
</CODE> function checks to see if there is any
6056 data pending on an HTTP connection.
</P>
6057 <H3><A NAME=
"10_47_5">Example
</A></H3>
6059 #include
<cups/http.h
>
6063 if (httpCheck(http))
6065 ... do something ...
6068 <H3><A NAME=
"10_47_6">See Also
</A></H3>
6069 <A HREF=
"#httpBlocking"> <CODE>httpBlocking()
</CODE></A>,
<A HREF=
"#httpConnect">
6070 <CODE>httpConnect()
</CODE></A>,
<A HREF=
"#httpGets"> <CODE>httpGets()
</CODE>
6071 </A>,
<A HREF=
"#httpRead"> <CODE>httpRead()
</CODE></A>
6074 <H2><A NAME=
"httpClearFields">httpClearFields()
</A></H2>
6075 <H3><A NAME=
"10_48_1">Usage
</A></H3>
6078 httpClearFields(http_t *http)
6080 <H3><A NAME=
"10_48_2">Arguments
</A></H3>
6082 <TABLE BORDER
WIDTH=
"80%">
6083 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6084 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
6087 <H3><A NAME=
"10_48_3">Description
</A></H3>
6088 <P>The
<CODE>httpClearFields()
</CODE> function clears all HTTP request
6089 fields for the HTTP connection.
</P>
6090 <H3><A NAME=
"10_48_4">Example
</A></H3>
6092 #include
<cups/http.h
>
6096 httpClearFields(http);
6098 <H3><A NAME=
"10_48_5">See Also
</A></H3>
6099 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>,
<A HREF=
"#httpGetField">
6100 <CODE>httpGetField()
</CODE></A>,
<A HREF=
"#httpSetField"> <CODE>
6101 httpSetField()
</CODE></A>
6104 <H2><A NAME=
"httpClose">httpClose()
</A></H2>
6105 <H3><A NAME=
"10_49_1">Usage
</A></H3>
6108 httpClose(http_t *http);
6110 <H3><A NAME=
"10_49_2">Arguments
</A></H3>
6112 <TABLE BORDER
WIDTH=
"80%">
6113 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6114 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
6117 <H3><A NAME=
"10_49_3">Description
</A></H3>
6118 <P>The
<CODE>httpClose()
</CODE> function closes an active HTTP
6120 <H3><A NAME=
"10_49_4">Example
</A></H3>
6122 #include
<cups/http.h
>
6128 <H3><A NAME=
"10_49_5">See Also
</A></H3>
6129 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>
6132 <H2><A NAME=
"httpConnect">httpConnect()
</A></H2>
6133 <H3><A NAME=
"10_50_1">Usage
</A></H3>
6136 httpConnect(const char *hostname,
6139 <H3><A NAME=
"10_50_2">Arguments
</A></H3>
6141 <TABLE BORDER
WIDTH=
"80%">
6142 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6143 <TR><TD>hostname
</TD><TD>The name or IP address of the server to connect
6145 <TR><TD>port
</TD><TD>The port number to use
</TD></TR>
6148 <H3><A NAME=
"10_50_3">Returns
</A></H3>
6149 <P>A pointer to a HTTP connection structure or NULL if the connection
6150 could not be made.
</P>
6151 <H3><A NAME=
"10_50_4">Description
</A></H3>
6152 <P>The
<CODE>httpConnect()
</CODE> function opens a HTTP connection to
6153 the specified server and port.
</P>
6154 <H3><A NAME=
"10_50_5">Example
</A></H3>
6156 #include
<cups/http.h
>
6158 <A HREF=
"#http_t">http_t
</A> *http;
6160 http = httpConnect(cupsServer(), ippPort());
6162 <H3><A NAME=
"10_50_6">See Also
</A></H3>
6163 <A HREF=
"#httpClose"> <CODE>httpClose()
</CODE></A>,
<A HREF=
"#httpConnectEncrypt">
6164 <CODE>httpConnectEncrypt()
</CODE></A>,
<A HREF=
"#httpGet"> <CODE>
6165 httpGet()
</CODE></A>,
<A HREF=
"#httpGets"> <CODE>httpGets()
</CODE></A>,
<A HREF=
"#httpPost">
6166 <CODE>httpPost()
</CODE></A>,
<A HREF=
"#httpRead"> <CODE>httpRead()
</CODE>
6167 </A>,
<A HREF=
"#httpWrite"> <CODE>httpWrite()
</CODE></A>
6170 <H2><A NAME=
"httpConnectEncrypt">httpConnectEncrypt()
</A></H2>
6171 <H3><A NAME=
"10_51_1">Usage
</A></H3>
6174 httpConnectEncrypt(const char *hostname,
6176 http_encryption_t encryption);
6178 <H3><A NAME=
"10_51_2">Arguments
</A></H3>
6180 <TABLE BORDER
WIDTH=
"80%">
6181 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6182 <TR><TD>hostname
</TD><TD>The name or IP address of the server to connect
6184 <TR><TD>port
</TD><TD>The port number to use
</TD></TR>
6185 <TR><TD>encryption
</TD><TD>The level of encryption to use
</TD></TR>
6188 <H3><A NAME=
"10_51_3">Returns
</A></H3>
6189 <P>A pointer to a HTTP connection structure or NULL if the connection
6190 could not be made.
</P>
6191 <H3><A NAME=
"10_51_4">Description
</A></H3>
6192 <P>The
<CODE>httpConnectEncrypt()
</CODE> function opens a HTTP
6193 connection to the specified server, port, and encryption.
</P>
6194 <H3><A NAME=
"10_51_5">Example
</A></H3>
6196 #include
<cups/http.h
>
6198 <A HREF=
"#http_t">http_t
</A> *http;
6200 http = httpConnectEncrypt(cupsServer(), ippPort(), cupsEncryption());
6202 <H3><A NAME=
"10_51_6">See Also
</A></H3>
6203 <A HREF=
"#httpClose"> <CODE>httpClose()
</CODE></A>,
<A HREF=
"#httpConnect">
6204 <CODE>httpConnect()
</CODE></A>,
<A HREF=
"#httpGet"> <CODE>httpGet()
</CODE>
6205 </A>,
<A HREF=
"#httpGets"> <CODE>httpGets()
</CODE></A>,
<A HREF=
"#httpPost">
6206 <CODE>httpPost()
</CODE></A>,
<A HREF=
"#httpRead"> <CODE>httpRead()
</CODE>
6207 </A>,
<A HREF=
"#httpWrite"> <CODE>httpWrite()
</CODE></A>
6210 <H2><A NAME=
"httpDecode64">httpDecode64()
</A></H2>
6211 <H3><A NAME=
"10_52_1">Usage
</A></H3>
6214 httpDecode64(char *out,
6217 <H3><A NAME=
"10_52_2">Arguments
</A></H3>
6219 <TABLE BORDER
WIDTH=
"80%">
6220 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6221 <TR><TD>out
</TD><TD>The output string
</TD></TR>
6222 <TR><TD>in
</TD><TD>The input string
</TD></TR>
6225 <H3><A NAME=
"10_52_3">Returns
</A></H3>
6226 <P>A pointer to the decoded string.
</P>
6227 <H3><A NAME=
"10_52_4">Description
</A></H3>
6228 <P>The
<CODE>httpDecode64()
</CODE> function decodes a base-
64 encoded
6229 string to the original string.
</P>
6230 <H3><A NAME=
"10_52_5">Example
</A></H3>
6232 #include
<cups/http.h
>
6234 char encoded_string[
255];
6235 char original_string[
255];
6237 httpDecode64(original_string, encoded_string);
6239 <H3><A NAME=
"10_52_6">See Also
</A></H3>
6240 <A HREF=
"#httpEncode64"> <CODE>httpEncode64()
</CODE></A>
6243 <H2><A NAME=
"httpDelete">httpDelete()
</A></H2>
6244 <H3><A NAME=
"10_53_1">Usage
</A></H3>
6247 httpDelete(http_t *http,
6250 <H3><A NAME=
"10_53_2">Arguments
</A></H3>
6252 <TABLE BORDER
WIDTH=
"80%">
6253 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6254 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
6255 <TR><TD>uri
</TD><TD>The URI to delete
</TD></TR>
6258 <H3><A NAME=
"10_53_3">Returns
</A></H3>
6259 <P>0 on success, non-zero on failure.
</P>
6260 <H3><A NAME=
"10_53_4">Description
</A></H3>
6261 <P>The
<CODE>httpDelete()
</CODE> function sends a HTTP DELETE request to
6263 <H3><A NAME=
"10_53_5">Example
</A></H3>
6265 #include
<cups/http.h
>
6269 httpDelete(http,
"/some/uri
");
6271 <H3><A NAME=
"10_53_6">See Also
</A></H3>
6272 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>,
<A HREF=
"#httpSetField">
6273 <CODE>httpSetField()
</CODE></A>,
<A HREF=
"#httpUpdate"> <CODE>
6274 httpUpdate()
</CODE></A>
6277 <H2><A NAME=
"httpEncode64">httpEncode64()
</A></H2>
6278 <H3><A NAME=
"10_54_1">Usage
</A></H3>
6281 httpEncode64(char *out,
6284 <H3><A NAME=
"10_54_2">Arguments
</A></H3>
6286 <TABLE BORDER
WIDTH=
"80%">
6287 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6288 <TR><TD>out
</TD><TD>The output string
</TD></TR>
6289 <TR><TD>in
</TD><TD>The input string
</TD></TR>
6292 <H3><A NAME=
"10_54_3">Returns
</A></H3>
6293 <P>A pointer to the encoded string.
</P>
6294 <H3><A NAME=
"10_54_4">Description
</A></H3>
6295 <P>The
<CODE>httpEncode64()
</CODE> function decodes a base-
64 encoded
6296 string to the original string.
</P>
6297 <H3><A NAME=
"10_54_5">Example
</A></H3>
6299 #include
<cups/http.h
>
6301 char encoded_string[
255];
6302 char original_string[
255];
6304 httpEncode64(encoded_string, original_string);
6306 <H3><A NAME=
"10_54_6">See Also
</A></H3>
6307 <A HREF=
"#httpDecode64"> <CODE>httpDecode64()
</CODE></A>
6310 <H2><A NAME=
"httpEncryption">httpEncryption()
</A></H2>
6311 <H3><A NAME=
"10_55_1">Usage
</A></H3>
6314 httpEncryption(http_t *http,
6315 http_encryption_t encryption);
6317 <H3><A NAME=
"10_55_2">Arguments
</A></H3>
6319 <TABLE BORDER
WIDTH=
"80%">
6320 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6321 <TR><TD>http
</TD><TD>The HTTP connection.
</TD></TR>
6322 <TR><TD>encryption
</TD><TD>The desired level of encryption.
</TD></TR>
6325 <H3><A NAME=
"10_55_3">Returns
</A></H3>
6326 <P>0 on success, -
1 on error.
</P>
6327 <H3><A NAME=
"10_55_4">Description
</A></H3>
6328 <P><CODE>httpEncryption()
</CODE> sets the encryption level for the HTTP
6330 <H3><A NAME=
"10_55_5">Example
</A></H3>
6332 #include
<cups/http.h
>
6334 <A HREF=
"#http_t">http_t
</A> *http;
6338 httpEncryption(http, HTTP_ENCRYPT_REQUIRED);
6340 <H3><A NAME=
"10_55_6">See Also
</A></H3>
6341 <P><A HREF=
"#httpConnectEncrypt"> <CODE>httpConnectEncrypt()
</CODE></A>
6344 <H2><A NAME=
"httpError">httpError()
</A></H2>
6345 <H3><A NAME=
"10_56_1">Usage
</A></H3>
6348 httpError(http_t *http);
6350 <H3><A NAME=
"10_56_2">Arguments
</A></H3>
6352 <TABLE BORDER
WIDTH=
"80%">
6353 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6354 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
6357 <H3><A NAME=
"10_56_3">Returns
</A></H3>
6358 <P>The last error that occurred or
0 if no error has occurred.
</P>
6359 <H3><A NAME=
"10_56_4">Description
</A></H3>
6360 <P>The
<CODE>httpError()
</CODE> function returns the last error that
6361 occurred on the HTTP connection.
</P>
6362 <H3><A NAME=
"10_56_5">Example
</A></H3>
6364 #include
<cups/http.h
>
6368 if (httpError(http))
6370 ... show an error message ...
6373 <H3><A NAME=
"10_56_6">See Also
</A></H3>
6374 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>
6377 <H2><A NAME=
"httpFlush">httpFlush()
</A></H2>
6378 <H3><A NAME=
"10_57_1">Usage
</A></H3>
6381 httpFlush(http_t *http);
6383 <H3><A NAME=
"10_57_2">Arguments
</A></H3>
6385 <TABLE BORDER
WIDTH=
"80%">
6386 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6387 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
6390 <H3><A NAME=
"10_57_3">Description
</A></H3>
6391 <P>The
<CODE>httpFlush()
</CODE> function flushes any remaining data left
6392 from a GET or POST operation.
</P>
6393 <H3><A NAME=
"10_57_4">Example
</A></H3>
6395 #include
<cups/http.h
>
6401 <H3><A NAME=
"10_57_5">See Also
</A></H3>
6402 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>,
6405 <H2><A NAME=
"httpGet">httpGet()
</A></H2>
6406 <H3><A NAME=
"10_58_1">Usage
</A></H3>
6409 httpGet(http_t *http,
6412 <H3><A NAME=
"10_58_2">Arguments
</A></H3>
6414 <TABLE BORDER
WIDTH=
"80%">
6415 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6416 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
6417 <TR><TD>uri
</TD><TD>The URI to get
</TD></TR>
6420 <H3><A NAME=
"10_58_3">Returns
</A></H3>
6421 <P>0 on success, non-zero on failure.
</P>
6422 <H3><A NAME=
"10_58_4">Description
</A></H3>
6423 <P>The
<CODE>httpGet()
</CODE> function sends a HTTP GET request to the
6425 <H3><A NAME=
"10_58_5">Example
</A></H3>
6427 #include
<cups/http.h
>
6429 <A HREF=
"#http_t">http_t
</A> *http;
6431 httpGet(http,
"/some/uri
");
6433 <H3><A NAME=
"10_58_6">See Also
</A></H3>
6434 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>,
<A HREF=
"#httpSetField">
6435 <CODE>httpSetField()
</CODE></A>,
<A HREF=
"#httpUpdate"> <CODE>
6436 httpUpdate()
</CODE></A>
6439 <H2><A NAME=
"httpGets">httpGets()
</A></H2>
6440 <H3><A NAME=
"10_59_1">Usage
</A></H3>
6443 httpGets(char *line,
6447 <H3><A NAME=
"10_59_2">Arguments
</A></H3>
6449 <TABLE BORDER
WIDTH=
"80%">
6450 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6451 <TR><TD>line
</TD><TD>The string to fill with a line from the HTTP
6452 connection
</TD></TR>
6453 <TR><TD>length
</TD><TD>The maximum length of the string
</TD></TR>
6454 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
6457 <H3><A NAME=
"10_59_3">Returns
</A></H3>
6458 <P>A pointer to the string or NULL if no line could be retrieved.
</P>
6459 <H3><A NAME=
"10_59_4">Description
</A></H3>
6460 <P>The
<CODE>httpGets()
</CODE> function is used to read a request line
6461 from the HTTP connection. It is not normally used by a client program.
</P>
6462 <H3><A NAME=
"10_59_5">Example
</A></H3>
6464 #include
<cups/http.h
>
6466 <A HREF=
"#http_t">http_t
</A> *http;
6469 if (httpGets(line, sizeof(line), http))
6471 ... process the line ...
6474 <H3><A NAME=
"10_59_6">See Also
</A></H3>
6475 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>,
<A HREF=
"#httpUpdate">
6476 <CODE>httpUpdate()
</CODE></A>
6479 <H2><A NAME=
"httpGetDateString">httpGetDateString()
</A></H2>
6480 <H3><A NAME=
"10_60_1">Usage
</A></H3>
6483 httpGetDateString(time_t time)
6485 <H3><A NAME=
"10_60_2">Arguments
</A></H3>
6487 <TABLE BORDER
WIDTH=
"80%">
6488 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6489 <TR><TD>time
</TD><TD>The UNIX date/time value
</TD></TR>
6492 <H3><A NAME=
"10_60_3">Returns
</A></H3>
6493 <P>A pointer to a static string containing the HTTP date/time string for
6494 the specified UNIX time value.
</P>
6495 <H3><A NAME=
"10_60_4">Description
</A></H3>
6496 <P>The
<CODE>httpGetDateString()
</CODE> function generates a date/time
6497 string suitable for HTTP requests from a UNIX time value.
</P>
6498 <H3><A NAME=
"10_60_5">Example
</A></H3>
6500 #include
<cups/http.h
>
6502 puts(httpGetDateString(time(NULL)));
6504 <H3><A NAME=
"10_60_6">See Also
</A></H3>
6505 <A HREF=
"#httpGetDateTime"> <CODE>httpGetDateTime()
</CODE></A>
6508 <H2><A NAME=
"httpGetDateTime">httpGetDateTime()
</A></H2>
6509 <H3><A NAME=
"10_61_1">Usage
</A></H3>
6512 httpGetDateTime(const char *date)
6514 <H3><A NAME=
"10_61_2">Arguments
</A></H3>
6516 <TABLE BORDER
WIDTH=
"80%">
6517 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6518 <TR><TD>date
</TD><TD>The HTTP date/time string
</TD></TR>
6521 <H3><A NAME=
"10_61_3">Returns
</A></H3>
6522 <P>A UNIX time value.
</P>
6523 <H3><A NAME=
"10_61_4">Description
</A></H3>
6524 <P>The
<CODE>httpGetDateTime()
</CODE> function converts a HTTP date/time
6525 string to a UNIX time value.
</P>
6526 <H3><A NAME=
"10_61_5">Example
</A></H3>
6528 #include
<cups/http.h
>
6530 printf(
"%d\n
", httpGetDateTime(
"Fri,
30 June
2000 12:
34:
56 GMT
"));
6532 <H3><A NAME=
"10_61_6">See Also
</A></H3>
6533 <A HREF=
"#httpGetDateString"> <CODE>httpGetDateString()
</CODE></A>
6536 <H2><A NAME=
"httpGetField">httpGetField()
</A></H2>
6537 <H3><A NAME=
"10_62_1">Usage
</A></H3>
6540 httpGetField(http_t *http,
6541 http_field_t field);
6543 <H3><A NAME=
"10_62_2">Arguments
</A></H3>
6545 <TABLE BORDER
WIDTH=
"80%">
6546 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6547 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
6548 <TR><TD>field
</TD><TD>The HTTP field
</TD></TR>
6551 <H3><A NAME=
"10_62_3">Returns
</A></H3>
6552 <P>A pointer to the field value string.
</P>
6553 <H3><A NAME=
"10_62_4">Description
</A></H3>
6554 <P>The
<CODE>httpGetField()
</CODE> function returns the current value
6555 for the specified HTTP field.
</P>
6556 <H3><A NAME=
"10_62_5">Example
</A></H3>
6558 #include
<cups/http.h
>
6560 <A HREF=
"#http_t">http_t
</A> *http;
6562 httpGet(http,
"/some/uri
");
6563 while (httpUpdate(http) == HTTP_CONTINUE);
6565 puts(httpGetField(http, HTTP_FIELD_CONTENT_TYPE));
6567 <H3><A NAME=
"10_62_6">See Also
</A></H3>
6568 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>,
<A HREF=
"#httpGetSubField">
6569 <CODE>httpGetSubField()
</CODE></A>,
<A HREF=
"#httpSetField"> <CODE>
6570 httpSetField()
</CODE></A>
6573 <H2><A NAME=
"httpGetHostByName">httpGetHostByName()
</A></H2>
6574 <H3><A NAME=
"10_63_1">Usage
</A></H3>
6577 httpGetHostByName(const char *name);
6579 <H3><A NAME=
"10_63_2">Arguments
</A></H3>
6581 <TABLE BORDER
WIDTH=
"80%">
6582 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6583 <TR><TD>name
</TD><TD>Name or IP address to lookup.
</TD></TR>
6586 <H3><A NAME=
"10_63_3">Returns
</A></H3>
6587 <P>NULL if the host could not be found or a pointer to a host entry
6588 containing one or more addresses.
</P>
6589 <H3><A NAME=
"10_63_4">Description
</A></H3>
6590 <P><CODE>httpGetHostByName()
</CODE> is a portable wrapper around the
<CODE>
6591 gethostbyname()
</CODE> function which handles both hostnames and IP
6593 <H3><A NAME=
"10_63_5">Example
</A></H3>
6595 #include
<cups/http.h
>
6597 struct hostent *hostaddr;
6599 hostaddr = httpGetHostByName(
"foo.bar.com
");
6603 <H2><A NAME=
"httpGetLength">httpGetLength()
</A></H2>
6604 <H3><A NAME=
"10_64_1">Usage
</A></H3>
6607 httpGetLength(http_t *http);
6609 <H3><A NAME=
"10_64_2">Arguments
</A></H3>
6611 <TABLE BORDER
WIDTH=
"80%">
6612 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6613 <TR><TD>http
</TD><TD>The HTTP connection.
</TD></TR>
6616 <H3><A NAME=
"10_64_3">Returns
</A></H3>
6617 <P>The content length of the response or MAX_INT if chunking is used.
</P>
6618 <H3><A NAME=
"10_64_4">Description
</A></H3>
6619 <P><CODE>httpGetLength()
</CODE> returns the content length of a
6621 <H3><A NAME=
"10_64_5">Example
</A></H3>
6623 #include
<cups/http.h
>
6625 <A HREF=
"#http_t">http_t
</A> *http;
6629 printf(
"The length of the response is %d bytes.\n
", httpGetLength(http));
6631 <H3><A NAME=
"10_64_6">See Also
</A></H3>
6632 <P><A HREF=
"#httpGet"> <CODE>httpGet()
</CODE></A>,
<A HREF=
"#httpPost"> <CODE>
6633 httpPost()
</CODE></A>
6636 <H2><A NAME=
"httpGetSubField">httpGetSubField()
</A></H2>
6637 <H3><A NAME=
"10_65_1">Usage
</A></H3>
6640 httpGetSubField(http_t *http,
6645 <H3><A NAME=
"10_65_2">Arguments
</A></H3>
6647 <TABLE BORDER
WIDTH=
"80%">
6648 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6649 <TR><TD>http
</TD><TD>The HTTP connection.
</TD></TR>
6650 <TR><TD>field
</TD><TD>The HTTP field.
</TD></TR>
6651 <TR><TD>name
</TD><TD>The name of the subfield.
</TD></TR>
6652 <TR><TD>value
</TD><TD>The string to hold the subfield value.
</TD></TR>
6655 <H3><A NAME=
"10_65_3">Returns
</A></H3>
6656 <P>A pointer to the subfield value string or NULL if it does not exist.
</P>
6657 <H3><A NAME=
"10_65_4">Description
</A></H3>
6658 <P>The
<CODE>httpGetSubField()
</CODE> function returns a subfield value
6659 from the specified HTTP field. The destination string buffer must be at
6660 least
<CODE>HTTP_MAX_VALUE
</CODE> bytes in length.
</P>
6661 <H3><A NAME=
"10_65_5">Example
</A></H3>
6663 #include
<cups/http.h
>
6665 <A HREF=
"#http_t">http_t
</A> *http;
6666 char value[HTTP_MAX_VALUE];
6668 httpGet(http,
"/some/uri
");
6669 while (httpUpdate(http) == HTTP_CONTINUE);
6671 puts(httpGetSubField(http, HTTP_FIELD_CONTENT_TYPE,
"charset
", value));
6673 <H3><A NAME=
"10_65_6">See Also
</A></H3>
6674 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>,
<A HREF=
"#httpGetField">
6675 <CODE>httpGetField()
</CODE></A>,
<A HREF=
"#httpSetField"> <CODE>
6676 httpSetField()
</CODE></A>
6679 <H2><A NAME=
"httpHead">httpHead()
</A></H2>
6680 <H3><A NAME=
"10_66_1">Usage
</A></H3>
6683 httpHead(http_t *http,
6686 <H3><A NAME=
"10_66_2">Arguments
</A></H3>
6688 <TABLE BORDER
WIDTH=
"80%">
6689 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6690 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
6691 <TR><TD>uri
</TD><TD>The URI to head
</TD></TR>
6694 <H3><A NAME=
"10_66_3">Returns
</A></H3>
6695 <P>0 on success, non-zero on failure.
</P>
6696 <H3><A NAME=
"10_66_4">Description
</A></H3>
6697 <P>The
<CODE>httpHead()
</CODE> function sends a HTTP HEAD request to the
6699 <H3><A NAME=
"10_66_5">Example
</A></H3>
6701 #include
<cups/http.h
>
6705 httpHead(http,
"/some/uri
");
6707 <H3><A NAME=
"10_66_6">See Also
</A></H3>
6708 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>,
<A HREF=
"#httpSetField">
6709 <CODE>httpSetField()
</CODE></A>,
<A HREF=
"#httpUpdate"> <CODE>
6710 httpUpdate()
</CODE></A>
6713 <H2><A NAME=
"httpInitialize">httpInitialize()
</A></H2>
6714 <H3><A NAME=
"10_67_1">Usage
</A></H3>
6716 void httpInitialize(void);
6718 <H3><A NAME=
"10_67_2">Description
</A></H3>
6719 <P>The
<CODE>httpInitialize()
</CODE> function initializes the networking
6720 code as needed by the underlying platform. It is called automatically
6721 by the
<CODE>httpConnect()
</CODE> function.
</P>
6722 <H3><A NAME=
"10_67_3">Example
</A></H3>
6724 #include
<cups/http.h
>
6728 <H3><A NAME=
"10_67_4">See Also
</A></H3>
6729 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>
6732 <H2><A NAME=
"httpMD5">httpMD5()
</A></H2>
6733 <H3><A NAME=
"10_68_1">Usage
</A></H3>
6736 httpMD5(const char *username,
6741 <H3><A NAME=
"10_68_2">Arguments
</A></H3>
6743 <TABLE BORDER
WIDTH=
"80%">
6744 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6745 <TR><TD>username
</TD><TD>The authenticating user name.
</TD></TR>
6746 <TR><TD>realm
</TD><TD>The authenticating realm name.
</TD></TR>
6747 <TR><TD>passwd
</TD><TD>The authenticating password.
</TD></TR>
6748 <TR><TD>md5
</TD><TD>The MD5 sum string.
</TD></TR>
6751 <H3><A NAME=
"10_68_3">Returns
</A></H3>
6752 <P>A pointer to the MD5 sum string.
</P>
6753 <H3><A NAME=
"10_68_4">Description
</A></H3>
6754 <P><CODE>httpMD5()
</CODE> computes the MD5 hash of the username, realm,
6755 and password as required by the HTTP Digest specification.
</P>
6756 <H3><A NAME=
"10_68_5">Example
</A></H3>
6758 #include
<cups/http.h
>
6764 httpMD5(
"user
",
"realm
",
"password
", md5);
6766 <H3><A NAME=
"10_68_6">See Also
</A></H3>
6767 <P><A HREF=
"#httpMD5Final"> <CODE>httpMD5Final()
</CODE></A>,
<A HREF=
"#httpMD5String">
6768 <CODE>httpMD5String()
</CODE></A>
6771 <H2><A NAME=
"httpMD5Final">httpMD5Final()
</A></H2>
6772 <H3><A NAME=
"10_69_1">Usage
</A></H3>
6775 httpMD5Final(const char *nonce,
6777 const char *resource,
6780 <H3><A NAME=
"10_69_2">Arguments
</A></H3>
6782 <TABLE BORDER
WIDTH=
"80%">
6783 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6784 <TR><TD>nonce
</TD><TD>The server nonce value.
</TD></TR>
6785 <TR><TD>method
</TD><TD>The HTTP method (GET, POST, etc.)
</TD></TR>
6786 <TR><TD>resource
</TD><TD>The resource path.
</TD></TR>
6787 <TR><TD>md5
</TD><TD>The MD5 sum string.
</TD></TR>
6790 <H3><A NAME=
"10_69_3">Returns
</A></H3>
6791 <P>The MD5 sum string.
</P>
6792 <H3><A NAME=
"10_69_4">Description
</A></H3>
6793 <P><CODE>httpMD5Final()
</CODE> appends the nonce, method, and resource
6794 to the specified MD5 sum.
</P>
6795 <H3><A NAME=
"10_69_5">Example
</A></H3>
6797 #include
<cups/http.h
>
6803 httpMD5Final(
"nonce
",
"GET
",
"/jobs
", md5);
6805 <H3><A NAME=
"10_69_6">See Also
</A></H3>
6806 <P><A HREF=
"#httpMD5"> <CODE>httpMD5()
</CODE></A>,
<A HREF=
"#httpMD5String">
6807 <CODE>httpMD5String()
</CODE></A>
6810 <H2><A NAME=
"httpMD5String">httpMD5String()
</A></H2>
6811 <H3><A NAME=
"10_70_1">Usage
</A></H3>
6814 httpMD5String(const md5_byte_t *sum,
6817 <H3><A NAME=
"10_70_2">Arguments
</A></H3>
6819 <TABLE BORDER
WIDTH=
"80%">
6820 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6821 <TR><TD>sum
</TD><TD>The raw MD5 sum data.
</TD></TR>
6822 <TR><TD>md5
</TD><TD>The MD5 sum string.
</TD></TR>
6825 <H3><A NAME=
"10_70_3">Returns
</A></H3>
6826 <P>The MD5 sum string.
</P>
6827 <H3><A NAME=
"10_70_4">Description
</A></H3>
6828 <P><CODE>httpMD5String()
</CODE> converts the raw MD5 sum value to a
6830 <H3><A NAME=
"10_70_5">Example
</A></H3>
6832 #include
<cups/http.h
>
6839 httpMD5String(sum, md5);
6841 <H3><A NAME=
"10_70_6">See Also
</A></H3>
6842 <P><A HREF=
"#httpMD5"> <CODE>httpMD5()
</CODE></A>,
<A HREF=
"#httpMD5Final">
6843 <CODE>httpMD5Final()
</CODE></A>
6846 <H2><A NAME=
"httpOptions">httpOptions()
</A></H2>
6847 <H3><A NAME=
"10_71_1">Usage
</A></H3>
6850 httpOptions(http_t *http,
6853 <H3><A NAME=
"10_71_2">Arguments
</A></H3>
6855 <TABLE BORDER
WIDTH=
"80%">
6856 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6857 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
6858 <TR><TD>uri
</TD><TD>The URI to check for options
</TD></TR>
6861 <H3><A NAME=
"10_71_3">Returns
</A></H3>
6862 <P>0 on success, non-zero on failure.
</P>
6863 <H3><A NAME=
"10_71_4">Description
</A></H3>
6864 <P>The
<CODE>httpOptions()
</CODE> function sends a HTTP OPTIONS request
6866 <H3><A NAME=
"10_71_5">Example
</A></H3>
6868 #include
<cups/http.h
>
6872 httpOptions(http,
"/some/uri
");
6874 <H3><A NAME=
"10_71_6">See Also
</A></H3>
6875 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>,
<A HREF=
"#httpSetField">
6876 <CODE>httpSetField()
</CODE></A>,
<A HREF=
"#httpUpdate"> <CODE>
6877 httpUpdate()
</CODE></A>
6880 <H2><A NAME=
"httpPost">httpPost()
</A></H2>
6881 <H3><A NAME=
"10_72_1">Usage
</A></H3>
6884 httpPost(http_t *http,
6887 <H3><A NAME=
"10_72_2">Arguments
</A></H3>
6889 <TABLE BORDER
WIDTH=
"80%">
6890 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6891 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
6892 <TR><TD>uri
</TD><TD>The URI to post to
</TD></TR>
6895 <H3><A NAME=
"10_72_3">Returns
</A></H3>
6896 <P>0 on success, non-zero on failure.
</P>
6897 <H3><A NAME=
"10_72_4">Description
</A></H3>
6898 <P>The
<CODE>httpPost()
</CODE> function sends a HTTP POST request to the
6900 <H3><A NAME=
"10_72_5">Example
</A></H3>
6902 #include
<cups/http.h
>
6906 httpPost(http,
"/some/uri
");
6908 <H3><A NAME=
"10_72_6">See Also
</A></H3>
6909 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>,
<A HREF=
"#httpSetField">
6910 <CODE>httpSetField()
</CODE></A>,
<A HREF=
"#httpUpdate"> <CODE>
6911 httpUpdate()
</CODE></A>
6914 <H2><A NAME=
"httpPrintf">httpPrintf()
</A></H2>
6915 <H3><A NAME=
"10_73_1">Usage
</A></H3>
6918 httpPrintf(http_t *http,
6922 <H3><A NAME=
"10_73_2">Arguments
</A></H3>
6924 <TABLE BORDER
WIDTH=
"80%">
6925 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6926 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
6927 <TR><TD>format
</TD><TD>A printf-style format string
</TD></TR>
6930 <H3><A NAME=
"10_73_3">Returns
</A></H3>
6931 <P>The number of bytes written.
</P>
6932 <H3><A NAME=
"10_73_4">Description
</A></H3>
6933 <P>The
<CODE>httpPrintf()
</CODE> function sends a formatted string to
6934 the HTTP connection. It is normally only used by the CUPS API and
6936 <H3><A NAME=
"10_73_5">Example
</A></H3>
6938 #include
<cups/http.h
>
6942 httpPrintf(http,
"GET / HTTP/
1.1 \r\n
");
6944 <H3><A NAME=
"10_73_6">See Also
</A></H3>
6945 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>
6948 <H2><A NAME=
"httpPut">httpPut()
</A></H2>
6949 <H3><A NAME=
"10_74_1">Usage
</A></H3>
6952 httpPut(http_t *http,
6955 <H3><A NAME=
"10_74_2">Arguments
</A></H3>
6957 <TABLE BORDER
WIDTH=
"80%">
6958 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6959 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
6960 <TR><TD>uri
</TD><TD>The URI to put
</TD></TR>
6963 <H3><A NAME=
"10_74_3">Returns
</A></H3>
6964 <P>0 on success, non-zero on failure.
</P>
6965 <H3><A NAME=
"10_74_4">Description
</A></H3>
6966 <P>The
<CODE>httpPut()
</CODE> function sends a HTTP PUT request to the
6968 <H3><A NAME=
"10_74_5">Example
</A></H3>
6970 #include
<cups/http.h
>
6974 httpDelete(http,
"/some/uri
");
6976 <H3><A NAME=
"10_74_6">See Also
</A></H3>
6977 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>,
<A HREF=
"#httpSetField">
6978 <CODE>httpSetField()
</CODE></A>,
<A HREF=
"#httpUpdate"> <CODE>
6979 httpUpdate()
</CODE></A>
6982 <H2><A NAME=
"httpRead">httpRead()
</A></H2>
6983 <H3><A NAME=
"10_75_1">Usage
</A></H3>
6986 httpRead(http_t *http,
6990 <H3><A NAME=
"10_75_2">Arguments
</A></H3>
6992 <TABLE BORDER
WIDTH=
"80%">
6993 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
6994 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
6995 <TR><TD>buffer
</TD><TD>The buffer to read into
</TD></TR>
6996 <TR><TD>length
</TD><TD>The number of bytes to read
</TD></TR>
6999 <H3><A NAME=
"10_75_3">Returns
</A></H3>
7000 <P>The number of bytes read or -
1 on error.
</P>
7001 <H3><A NAME=
"10_75_4">Description
</A></H3>
7002 <P>The
<CODE>httpRead()
</CODE> function reads data from the HTTP
7003 connection, possibly the result of a GET or POST request.
</P>
7004 <H3><A NAME=
"10_75_5">Example
</A></H3>
7006 #include
<cups/http.h
>
7012 httpGet(http,
"/
");
7013 while (httpUpdate(http) != HTTP_CONTINUE);
7014 while ((bytes = httpRead(http, buffer, sizeof(buffer) -
1))
> 0)
7016 buffer[bytes] = '\
0';
7017 fputs(buffer, stdout);
7020 <H3><A NAME=
"10_75_6">See Also
</A></H3>
7021 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>,
<A HREF=
"#httpWrite">
7022 <CODE>httpWrite()
</CODE></A>
7025 <H2><A NAME=
"httpReconnect">httpReconnect()
</A></H2>
7026 <H3><A NAME=
"10_76_1">Usage
</A></H3>
7029 httpReconnect(http_t *http);
7031 <H3><A NAME=
"10_76_2">Arguments
</A></H3>
7033 <TABLE BORDER
WIDTH=
"80%">
7034 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7035 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
7038 <H3><A NAME=
"10_76_3">Returns
</A></H3>
7039 <P>0 on success, non-zero on failure.
</P>
7040 <H3><A NAME=
"10_76_4">Description
</A></H3>
7041 <P>The
<CODE>httpReconnect()
</CODE> function reconnects to the HTTP
7042 server. This is usually done automatically if the HTTP functions detect
7043 that the server connection has terminated.
</P>
7044 <H3><A NAME=
"10_76_5">Example
</A></H3>
7046 #include
<cups/http.h
>
7050 httpReconnect(http);
7052 <H3><A NAME=
"10_76_6">See Also
</A></H3>
7053 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>
7056 <H2><A NAME=
"httpSeparate">httpSeparate()
</A></H2>
7057 <H3><A NAME=
"10_77_1">Usage
</A></H3>
7060 httpSeparate(const char *uri,
7067 <H3><A NAME=
"10_77_2">Arguments
</A></H3>
7069 <TABLE BORDER
WIDTH=
"80%">
7070 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7071 <TR><TD>uri
</TD><TD>The URI to separate
</TD></TR>
7072 <TR><TD>method
</TD><TD>The method (scheme) of the URI
</TD></TR>
7073 <TR><TD>username
</TD><TD>The username (and password) portion of the URI,
7075 <TR><TD>host
</TD><TD>The hostname portion of the URI, if any
</TD></TR>
7076 <TR><TD>port
</TD><TD>The port number for the URI, either as specified or
7077 as default for the method/scheme
</TD></TR>
7078 <TR><TD>resource
</TD><TD>The resource string, usually a filename on the
7082 <H3><A NAME=
"10_77_3">Description
</A></H3>
7083 <P>The
<CODE>httpSeparate()
</CODE> function separates the specified URI
7084 into its component parts. The method, username, hostname, and resource
7085 strings should be at least
<CODE>HTTP_MAX_URI
</CODE> characters long to
7086 avoid potential buffer overflow problems.
</P>
7087 <H3><A NAME=
"10_77_4">Example
</A></H3>
7089 char uri[HTTP_MAX_URI];
7090 char method[HTTP_MAX_URI];
7091 char username[HTTP_MAX_URI];
7092 char host[HTTP_MAX_URI];
7093 char resource[HTTP_MAX_URI];
7098 httpSeparate(uri, method, username, host,
&port, resource);
7100 <H3><A NAME=
"10_77_5">See Also
</A></H3>
7101 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>
7104 <H2><A NAME=
"httpSetField">httpSetField()
</A></H2>
7105 <H3><A NAME=
"10_78_1">Usage
</A></H3>
7108 httpSetField(http_t *http,
7112 <H3><A NAME=
"10_78_2">Arguments
</A></H3>
7114 <TABLE BORDER
WIDTH=
"80%">
7115 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7116 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
7117 <TR><TD>field
</TD><TD>The HTTP field
</TD></TR>
7118 <TR><TD>value
</TD><TD>The string value for the field
</TD></TR>
7121 <H3><A NAME=
"10_78_3">Description
</A></H3>
7122 <P>The
<CODE>httpSetField()
</CODE> function sets the current value for
7123 the specified HTTP field.
</P>
7124 <H3><A NAME=
"10_78_4">Example
</A></H3>
7126 #include
<cups/http.h
>
7130 httpSetField(http, HTTP_FIELD_AUTHORIZATION,
"Basic dfdr34453454325
"));
7131 httpGet(http,
"/some/uri
");
7132 while (httpUpdate(http) == HTTP_CONTINUE);
7134 <H3><A NAME=
"10_78_5">See Also
</A></H3>
7135 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>,
<A HREF=
"#httpGetField">
7136 <CODE>httpGetField()
</CODE></A>
7139 <H2><A NAME=
"httpStatus">httpStatus()
</A></H2>
7140 <H3><A NAME=
"10_79_1">Usage
</A></H3>
7143 httpStatus(http_status_t status);
7145 <H3><A NAME=
"10_79_2">Arguments
</A></H3>
7147 <TABLE BORDER
WIDTH=
"80%">
7148 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7149 <TR><TD>status
</TD><TD>The HTTP status code from the server.
</TD></TR>
7152 <H3><A NAME=
"10_79_3">Returns
</A></H3>
7153 <P>The standard HTTP status text associated with the status code.
</P>
7154 <H3><A NAME=
"10_79_4">Description
</A></H3>
7155 <P><CODE>httpStatus()
</CODE> returns the standard HTTP status text
7156 associated with the status code.
</P>
7157 <H3><A NAME=
"10_79_5">Example
</A></H3>
7159 #include
<cups/http.h
>
7161 <A HREF=
"#http_t">http_t
</A> *http;
7165 puts(httpStatus(http-
>status));
7169 <H2><A NAME=
"httpTrace">httpTrace()
</A></H2>
7170 <H3><A NAME=
"10_80_1">Usage
</A></H3>
7173 httpTrace(http_t *http,
7176 <H3><A NAME=
"10_80_2">Arguments
</A></H3>
7178 <TABLE BORDER
WIDTH=
"80%">
7179 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7180 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
7181 <TR><TD>uri
</TD><TD>The URI to trace
</TD></TR>
7184 <H3><A NAME=
"10_80_3">Returns
</A></H3>
7185 <P>0 on success, non-zero on failure.
</P>
7186 <H3><A NAME=
"10_80_4">Description
</A></H3>
7187 <P>The
<CODE>httpTrace()
</CODE> function sends a HTTP TRACE request to
7189 <H3><A NAME=
"10_80_5">Example
</A></H3>
7191 #include
<cups/http.h
>
7195 httpTrace(http,
"/some/uri
");
7197 <H3><A NAME=
"10_80_6">See Also
</A></H3>
7198 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>,
<A HREF=
"#httpSetField">
7199 <CODE>httpSetField()
</CODE></A>,
<A HREF=
"#httpUpdate"> <CODE>
7200 httpUpdate()
</CODE></A>
7203 <H2><A NAME=
"httpUpdate">httpUpdate()
</A></H2>
7204 <H3><A NAME=
"10_81_1">Usage
</A></H3>
7207 httpUpdate(http_t *http);
7209 <H3><A NAME=
"10_81_2">Arguments
</A></H3>
7211 <TABLE BORDER
WIDTH=
"80%">
7212 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7213 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
7216 <H3><A NAME=
"10_81_3">Returns
</A></H3>
7217 <P>The HTTP status of the current request.
</P>
7218 <H3><A NAME=
"10_81_4">Description
</A></H3>
7219 <P>The
<CODE>httpUpdate()
</CODE> function updates the current request
7220 status. It is used after any DELETE, GET, HEAD, OPTIONS, POST, PUT, or
7221 TRACE request to finalize the HTTP request and retrieve the request
7223 <P>Since proxies and the current blocking mode can cause the request to
7224 take longer, programs should continue calling
<CODE>httpUpdate()
<CODE>
7225 until the return status is not the constant value
<CODE>HTTP_CONTINUE
</CODE>
7227 <H3><A NAME=
"10_81_5">Example
</A></H3>
7229 #include
<cups/http.h
>
7232 http_status_t status;
7234 httpGet(http,
"/some/uri
");
7235 while ((status = httpUpdate(http)) == HTTP_CONTINUE);
7236 printf(
"Request status is %d\n
", status);
7238 <H3><A NAME=
"10_81_6">See Also
</A></H3>
7239 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>,
<A HREF=
"#httpDelete">
7240 <CODE>httpDelete()
</CODE></A>,
<A HREF=
"#httpGet"> <CODE>httpGet()
</CODE>
7241 </A>,
<A HREF=
"#httpHead"> <CODE>httpHead()
</CODE></A>,
<A HREF=
"#httpOptions">
7242 <CODE>httpOptions()
</CODE></A>,
<A HREF=
"#httpPost"> <CODE>httpPost()
</CODE>
7243 </A>,
<A HREF=
"#httpPut"> <CODE>httpPut()
</CODE></A>,
<A HREF=
"#httpTrace">
7244 <CODE>httpTrace()
</CODE></A>
7247 <H2><A NAME=
"httpWrite">httpWrite()
</A></H2>
7248 <H3><A NAME=
"10_82_1">Usage
</A></H3>
7251 httpWrite(http_t *http,
7255 <H3><A NAME=
"10_82_2">Arguments
</A></H3>
7257 <TABLE BORDER
WIDTH=
"80%">
7258 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7259 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
7260 <TR><TD>buffer
</TD><TD>The buffer to read into
</TD></TR>
7261 <TR><TD>length
</TD><TD>The number of bytes to read
</TD></TR>
7264 <H3><A NAME=
"10_82_3">Returns
</A></H3>
7265 <P>The number of bytes read or -
1 on error.
</P>
7266 <H3><A NAME=
"10_82_4">Description
</A></H3>
7267 <P>The
<CODE>httpWrite()
</CODE> function reads data from the HTTP
7268 connection, possibly the result of a GET or POST request.
</P>
7269 <H3><A NAME=
"10_82_5">Example
</A></H3>
7271 #include
<cups/http.h
>
7278 httpPost(http,
"/
");
7280 while ((bytes = fread(buffer,
1, sizeof(buffer), fp))
> 0)
7281 httpWrite(http, buffer, bytes);
7283 while (httpUpdate(http) != HTTP_CONTINUE);
7285 while ((bytes = httpRead(http, buffer, sizeof(buffer) -
1))
> 0)
7287 buffer[bytes] = '\
0';
7288 fputs(buffer, stdout);
7291 <H3><A NAME=
"10_82_6">See Also
</A></H3>
7292 <A HREF=
"#httpConnect"> <CODE>httpConnect()
</CODE></A>,
<A HREF=
"#httpRead">
7293 <CODE>httpRead()
</CODE></A>
7296 <H2><A NAME=
"ippAddBoolean">ippAddBoolean()
</A></H2>
7297 <H3><A NAME=
"10_83_1">Usage
</A></H3>
7300 ippAddBoolean(ipp_t *ipp,
7305 <H3><A NAME=
"10_83_2">Arguments
</A></H3>
7307 <TABLE BORDER
WIDTH=
"80%">
7308 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7309 <TR><TD>ipp
</TD><TD>The IPP request
</TD></TR>
7310 <TR><TD>group
</TD><TD>The IPP group
</TD></TR>
7311 <TR><TD>name
</TD><TD>The name of attribute
</TD></TR>
7312 <TR><TD>value
</TD><TD>The boolean value
</TD></TR>
7315 <H3><A NAME=
"10_83_3">Returns
</A></H3>
7316 <P>A pointer to the new attribute or NULL if the attribute could not be
7318 <H3><A NAME=
"10_83_4">Description
</A></H3>
7319 <P>The
<CODE>ippAddBoolean()
</CODE> function adds a single boolean
7320 attribute value to the specified IPP request.
</P>
7321 <H3><A NAME=
"10_83_5">Example
</A></H3>
7323 #include
<cups/ipp.h
>
7327 ippAddBoolean(ipp, IPP_TAG_OPERATION,
"my-jobs
",
1);
7329 <H3><A NAME=
"10_83_6">See Also
</A></H3>
7330 <A HREF=
"#ippAddBooleans"> <CODE>ippAddBooleans()
</CODE></A>,
<A HREF=
"#ippAddDate">
7331 <CODE>ippAddDate()
</CODE></A>,
<A HREF=
"#ippAddInteger"> <CODE>
7332 ippAddInteger()
</CODE></A>,
<A HREF=
"#ippAddIntegers"> <CODE>
7333 ippAddIntegers()
</CODE></A>,
<A HREF=
"#ippAddRange"> <CODE>ippAddRange()
</CODE>
7334 </A>,
<A HREF=
"#ippAddRanges"> <CODE>ippAddRanges()
</CODE></A>,
<A HREF=
"#ippAddResolution">
7335 <CODE>ippAddResolution()
</CODE></A>,
<A HREF=
"#ippAddResolutions"> <CODE>
7336 ippAddResolutions()
</CODE></A>,
<A HREF=
"#ippAddSeparator"> <CODE>
7337 ippAddSeparator()
</CODE></A>,
<A HREF=
"#ippAddString"> <CODE>
7338 ippAddString()
</CODE></A>,
<A HREF=
"#ippAddStrings"> <CODE>
7339 ippAddStrings()
</CODE></A>
7342 <H2><A NAME=
"ippAddBooleans">ippAddBooleans()
</A></H2>
7343 <H3><A NAME=
"10_84_1">Usage
</A></H3>
7346 ippAddBooleans(ipp_t *ipp,
7350 const char *values);
7352 <H3><A NAME=
"10_84_2">Arguments
</A></H3>
7354 <TABLE BORDER
WIDTH=
"80%">
7355 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7356 <TR><TD>ipp
</TD><TD>The IPP request
</TD></TR>
7357 <TR><TD>group
</TD><TD>The IPP group
</TD></TR>
7358 <TR><TD>name
</TD><TD>The name of attribute
</TD></TR>
7359 <TR><TD>num_values
</TD><TD>The number of values
</TD></TR>
7360 <TR><TD>values
</TD><TD>The boolean values
</TD></TR>
7363 <H3><A NAME=
"10_84_3">Returns
</A></H3>
7364 <P>A pointer to the new attribute or NULL if the attribute could not be
7366 <H3><A NAME=
"10_84_4">Description
</A></H3>
7367 <P>The
<CODE>ippAddBooleans()
</CODE> function adds one or more boolean
7368 attribute values to the specified IPP request. If the
<CODE>values
</CODE>
7369 pointer is
<CODE>NULL
</CODE> then an array of
<CODE>num_values
</CODE>
7370 false values is created.
</P>
7371 <H3><A NAME=
"10_84_5">Example
</A></H3>
7373 #include
<cups/ipp.h
>
7378 ippAddBooleans(ipp, IPP_TAG_OPERATION,
"some-attribute
",
10, values);
7380 <H3><A NAME=
"10_84_6">See Also
</A></H3>
7381 <A HREF=
"#ippAddBoolean"> <CODE>ippAddBoolean()
</CODE></A>,
<A HREF=
"#ippAddDate">
7382 <CODE>ippAddDate()
</CODE></A>,
<A HREF=
"#ippAddInteger"> <CODE>
7383 ippAddInteger()
</CODE></A>,
<A HREF=
"#ippAddIntegers"> <CODE>
7384 ippAddIntegers()
</CODE></A>,
<A HREF=
"#ippAddRange"> <CODE>ippAddRange()
</CODE>
7385 </A>,
<A HREF=
"#ippAddRanges"> <CODE>ippAddRanges()
</CODE></A>,
<A HREF=
"#ippAddResolution">
7386 <CODE>ippAddResolution()
</CODE></A>,
<A HREF=
"#ippAddResolutions"> <CODE>
7387 ippAddResolutions()
</CODE></A>,
<A HREF=
"#ippAddSeparator"> <CODE>
7388 ippAddSeparator()
</CODE></A>,
<A HREF=
"#ippAddString"> <CODE>
7389 ippAddString()
</CODE></A>,
<A HREF=
"#ippAddStrings"> <CODE>
7390 ippAddStrings()
</CODE></A>
7393 <H2><A NAME=
"ippAddDate">ippAddDate()
</A></H2>
7394 <H3><A NAME=
"10_85_1">Usage
</A></H3>
7397 ippAddDate(ipp_t *ipp,
7400 ipp_uchar_t *value);
7402 <H3><A NAME=
"10_85_2">Arguments
</A></H3>
7404 <TABLE BORDER
WIDTH=
"80%">
7405 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7406 <TR><TD>ipp
</TD><TD>The IPP request
</TD></TR>
7407 <TR><TD>group
</TD><TD>The IPP group
</TD></TR>
7408 <TR><TD>name
</TD><TD>The name of attribute
</TD></TR>
7409 <TR><TD>value
</TD><TD>The date value
</TD></TR>
7412 <H3><A NAME=
"10_85_3">Returns
</A></H3>
7413 <P>A pointer to the new attribute or NULL if the attribute could not be
7415 <H3><A NAME=
"10_85_4">Description
</A></H3>
7416 <P>The
<CODE>ippAddDate()
</CODE> function adds a single date-time
7417 attribute value to the specified IPP request.
</P>
7418 <H3><A NAME=
"10_85_5">Example
</A></H3>
7420 #include
<cups/ipp.h
>
7424 ippAddDate(ipp, IPP_TAG_OPERATION,
"some-attribute
",
7425 ippTimeToDate(time(NULL));
7427 <H3><A NAME=
"10_85_6">See Also
</A></H3>
7428 <A HREF=
"#ippAddBoolean"> <CODE>ippAddBoolean()
</CODE></A>,
<A HREF=
"#ippAddBooleans">
7429 <CODE>ippAddBooleans()
</CODE></A>,
<A HREF=
"#ippAddInteger"> <CODE>
7430 ippAddInteger()
</CODE></A>,
<A HREF=
"#ippAddIntegers"> <CODE>
7431 ippAddIntegers()
</CODE></A>,
<A HREF=
"#ippAddRange"> <CODE>ippAddRange()
</CODE>
7432 </A>,
<A HREF=
"#ippAddRanges"> <CODE>ippAddRanges()
</CODE></A>,
<A HREF=
"#ippAddResolution">
7433 <CODE>ippAddResolution()
</CODE></A>,
<A HREF=
"#ippAddResolutions"> <CODE>
7434 ippAddResolutions()
</CODE></A>,
<A HREF=
"#ippAddSeparator"> <CODE>
7435 ippAddSeparator()
</CODE></A>,
<A HREF=
"#ippAddString"> <CODE>
7436 ippAddString()
</CODE></A>,
<A HREF=
"#ippAddStrings"> <CODE>
7437 ippAddStrings()
</CODE></A>,
<A HREF=
"#ippTimeToDate"> <CODE>
7438 ippTimeToDate()
</CODE></A>
7441 <H2><A NAME=
"ippAddInteger">ippAddInteger()
</A></H2>
7442 <H3><A NAME=
"10_86_1">Usage
</A></H3>
7445 ippAddInteger(ipp_t *ipp,
7451 <H3><A NAME=
"10_86_2">Arguments
</A></H3>
7453 <TABLE BORDER
WIDTH=
"80%">
7454 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7455 <TR><TD>ipp
</TD><TD>The IPP request
</TD></TR>
7456 <TR><TD>group
</TD><TD>The IPP group
</TD></TR>
7457 <TR><TD>tag
</TD><TD>The type of integer value (IPP_TAG_INTEGER or
7458 IPP_TAG_ENUM)
</TD></TR>
7459 <TR><TD>name
</TD><TD>The name of attribute
</TD></TR>
7460 <TR><TD>value
</TD><TD>The integer value
</TD></TR>
7463 <H3><A NAME=
"10_86_3">Returns
</A></H3>
7464 <P>A pointer to the new attribute or NULL if the attribute could not be
7466 <H3><A NAME=
"10_86_4">Description
</A></H3>
7467 <P>The
<CODE>ippAddInteger()
</CODE> function adds a single integer
7468 attribute value to the specified IPP request.
</P>
7469 <H3><A NAME=
"10_86_5">Example
</A></H3>
7471 #include
<cups/ipp.h
>
7475 ippAddInteger(ipp, IPP_TAG_OPERATION,
"limit
",
100);
7477 <H3><A NAME=
"10_86_6">See Also
</A></H3>
7478 <A HREF=
"#ippAddBoolean"> <CODE>ippAddBoolean()
</CODE></A>,
<A HREF=
"#ippAddBooleans">
7479 <CODE>ippAddBooleans()
</CODE></A>,
<A HREF=
"#ippAddDate"> <CODE>
7480 ippAddDate()
</CODE></A>,
<A HREF=
"#ippAddIntegers"> <CODE>
7481 ippAddIntegers()
</CODE></A>,
<A HREF=
"#ippAddRange"> <CODE>ippAddRange()
</CODE>
7482 </A>,
<A HREF=
"#ippAddRanges"> <CODE>ippAddRanges()
</CODE></A>,
<A HREF=
"#ippAddResolution">
7483 <CODE>ippAddResolution()
</CODE></A>,
<A HREF=
"#ippAddResolutions"> <CODE>
7484 ippAddResolutions()
</CODE></A>,
<A HREF=
"#ippAddSeparator"> <CODE>
7485 ippAddSeparator()
</CODE></A>,
<A HREF=
"#ippAddString"> <CODE>
7486 ippAddString()
</CODE></A>,
<A HREF=
"#ippAddStrings"> <CODE>
7487 ippAddStrings()
</CODE></A>
7490 <H2><A NAME=
"ippAddIntegers">ippAddIntegers()
</A></H2>
7491 <H3><A NAME=
"10_87_1">Usage
</A></H3>
7494 ippAddIntegers(ipp_t *ipp,
7501 <H3><A NAME=
"10_87_2">Arguments
</A></H3>
7503 <TABLE BORDER
WIDTH=
"80%">
7504 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7505 <TR><TD>ipp
</TD><TD>The IPP request
</TD></TR>
7506 <TR><TD>group
</TD><TD>The IPP group
</TD></TR>
7507 <TR><TD>tag
</TD><TD>The type of integer value (IPP_TAG_INTEGER or
7508 IPP_TAG_ENUM)
</TD></TR>
7509 <TR><TD>name
</TD><TD>The name of attribute
</TD></TR>
7510 <TR><TD>num_values
</TD><TD>The number of values
</TD></TR>
7511 <TR><TD>values
</TD><TD>The integer values
</TD></TR>
7514 <H3><A NAME=
"10_87_3">Returns
</A></H3>
7515 <P>A pointer to the new attribute or NULL if the attribute could not be
7517 <H3><A NAME=
"10_87_4">Description
</A></H3>
7518 <P>The
<CODE>ippAddIntegers()
</CODE> function adds one or more integer
7519 attribute values to the specified IPP request. If the
<CODE>values
</CODE>
7520 pointer is
<CODE>NULL
</CODE> then an array of
<CODE>num_values
</CODE> 0
7521 values is created.
</P>
7522 <H3><A NAME=
"10_87_5">Example
</A></H3>
7524 #include
<cups/ipp.h
>
7529 ippAddIntegers(ipp, IPP_TAG_OPERATION,
"some-attribute
",
100, values);
7531 <H3><A NAME=
"10_87_6">See Also
</A></H3>
7532 <A HREF=
"#ippAddBoolean"> <CODE>ippAddBoolean()
</CODE></A>,
<A HREF=
"#ippAddBooleans">
7533 <CODE>ippAddBooleans()
</CODE></A>,
<A HREF=
"#ippAddDate"> <CODE>
7534 ippAddDate()
</CODE></A>,
<A HREF=
"#ippAddInteger"> <CODE>ippAddInteger()
</CODE>
7535 </A>,
<A HREF=
"#ippAddRange"> <CODE>ippAddRange()
</CODE></A>,
<A HREF=
"#ippAddRanges">
7536 <CODE>ippAddRanges()
</CODE></A>,
<A HREF=
"#ippAddResolution"> <CODE>
7537 ippAddResolution()
</CODE></A>,
<A HREF=
"#ippAddResolutions"> <CODE>
7538 ippAddResolutions()
</CODE></A>,
<A HREF=
"#ippAddSeparator"> <CODE>
7539 ippAddSeparator()
</CODE></A>,
<A HREF=
"#ippAddString"> <CODE>
7540 ippAddString()
</CODE></A>,
<A HREF=
"#ippAddStrings"> <CODE>
7541 ippAddStrings()
</CODE></A>
7544 <H2><A NAME=
"ippAddRange">ippAddRange()
</A></H2>
7545 <H3><A NAME=
"10_88_1">Usage
</A></H3>
7548 ippAddRange(ipp_t *ipp,
7554 <H3><A NAME=
"10_88_2">Arguments
</A></H3>
7556 <TABLE BORDER
WIDTH=
"80%">
7557 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7558 <TR><TD>ipp
</TD><TD>The IPP request
</TD></TR>
7559 <TR><TD>group
</TD><TD>The IPP group
</TD></TR>
7560 <TR><TD>name
</TD><TD>The name of attribute
</TD></TR>
7561 <TR><TD>low
</TD><TD>The lower value
</TD></TR>
7562 <TR><TD>high
</TD><TD>The higher value
</TD></TR>
7565 <H3><A NAME=
"10_88_3">Returns
</A></H3>
7566 <P>A pointer to the new attribute or NULL if the attribute could not be
7568 <H3><A NAME=
"10_88_4">Description
</A></H3>
7569 <P>The
<CODE>ippAddRange()
</CODE> function adds a single range attribute
7570 value to the specified IPP request.
</P>
7571 <H3><A NAME=
"10_88_5">Example
</A></H3>
7573 #include
<cups/ipp.h
>
7577 ippAddRange(ipp, IPP_TAG_OPERATION,
"page-ranges
",
1,
10);
7579 <H3><A NAME=
"10_88_6">See Also
</A></H3>
7580 <A HREF=
"#ippAddBoolean"> <CODE>ippAddBoolean()
</CODE></A>,
<A HREF=
"#ippAddBooleans">
7581 <CODE>ippAddBooleans()
</CODE></A>,
<A HREF=
"#ippAddDate"> <CODE>
7582 ippAddDate()
</CODE></A>,
<A HREF=
"#ippAddInteger"> <CODE>ippAddInteger()
</CODE>
7583 </A>,
<A HREF=
"#ippAddIntegers"> <CODE>ippAddIntegers()
</CODE></A>,
<A HREF=
"#ippAddRanges">
7584 <CODE>ippAddRanges()
</CODE></A>,
<A HREF=
"#ippAddResolution"> <CODE>
7585 ippAddResolution()
</CODE></A>,
<A HREF=
"#ippAddResolutions"> <CODE>
7586 ippAddResolutions()
</CODE></A>,
<A HREF=
"#ippAddSeparator"> <CODE>
7587 ippAddSeparator()
</CODE></A>,
<A HREF=
"#ippAddString"> <CODE>
7588 ippAddString()
</CODE></A>,
<A HREF=
"#ippAddStrings"> <CODE>
7589 ippAddStrings()
</CODE></A>
7592 <H2><A NAME=
"ippAddRanges">ippAddRanges()
</A></H2>
7593 <H3><A NAME=
"10_89_1">Usage
</A></H3>
7596 ippAddRanges(ipp_t *ipp,
7603 <H3><A NAME=
"10_89_2">Arguments
</A></H3>
7605 <TABLE BORDER
WIDTH=
"80%">
7606 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7607 <TR><TD>ipp
</TD><TD>The IPP request
</TD></TR>
7608 <TR><TD>group
</TD><TD>The IPP group
</TD></TR>
7609 <TR><TD>name
</TD><TD>The name of attribute
</TD></TR>
7610 <TR><TD>num_values
</TD><TD>The number of range values
</TD></TR>
7611 <TR><TD>lows
</TD><TD>The lower values
</TD></TR>
7612 <TR><TD>highs
</TD><TD>The higher values
</TD></TR>
7615 <H3><A NAME=
"10_89_3">Returns
</A></H3>
7616 <P>A pointer to the new attribute or NULL if the attribute could not be
7618 <H3><A NAME=
"10_89_4">Description
</A></H3>
7619 <P>The
<CODE>ippAddRanges()
</CODE> function adds one or more range
7620 attribute values to the specified IPP request. If the
<CODE>values
</CODE>
7621 pointer is
<CODE>NULL
</CODE> then an array of
<CODE>num_values
</CODE>
7622 0,
0 ranges is created.
</P>
7623 <H3><A NAME=
"10_89_5">Example
</A></H3>
7625 #include
<cups/ipp.h
>
7631 ippAddRanges(ipp, IPP_TAG_OPERATION,
"page-ranges
",
2, lows, highs);
7633 <H3><A NAME=
"10_89_6">See Also
</A></H3>
7634 <A HREF=
"#ippAddBoolean"> <CODE>ippAddBoolean()
</CODE></A>,
<A HREF=
"#ippAddBooleans">
7635 <CODE>ippAddBooleans()
</CODE></A>,
<A HREF=
"#ippAddDate"> <CODE>
7636 ippAddDate()
</CODE></A>,
<A HREF=
"#ippAddInteger"> <CODE>ippAddInteger()
</CODE>
7637 </A>,
<A HREF=
"#ippAddIntegers"> <CODE>ippAddIntegers()
</CODE></A>,
<A HREF=
"#ippAddRange">
7638 <CODE>ippAddRange()
</CODE></A>,
<A HREF=
"#ippAddResolution"> <CODE>
7639 ippAddResolution()
</CODE></A>,
<A HREF=
"#ippAddResolutions"> <CODE>
7640 ippAddResolutions()
</CODE></A>,
<A HREF=
"#ippAddSeparator"> <CODE>
7641 ippAddSeparator()
</CODE></A>,
<A HREF=
"#ippAddString"> <CODE>
7642 ippAddString()
</CODE></A>,
<A HREF=
"#ippAddStrings"> <CODE>
7643 ippAddStrings()
</CODE></A>
7646 <H2><A NAME=
"ippAddResolution">ippAddResolution()
</A></H2>
7647 <H3><A NAME=
"10_90_1">Usage
</A></H3>
7650 ippAddResolution(ipp_t *ipp,
7657 <H3><A NAME=
"10_90_2">Arguments
</A></H3>
7659 <TABLE BORDER
WIDTH=
"80%">
7660 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7661 <TR><TD>ipp
</TD><TD>The IPP request
</TD></TR>
7662 <TR><TD>group
</TD><TD>The IPP group
</TD></TR>
7663 <TR><TD>name
</TD><TD>The name of attribute
</TD></TR>
7664 <TR><TD>xres
</TD><TD>The horizontal resolution
</TD></TR>
7665 <TR><TD>yres
</TD><TD>The vertical resolution
</TD></TR>
7666 <TR><TD>units
</TD><TD>The resolution units
</TD></TR>
7669 <H3><A NAME=
"10_90_3">Returns
</A></H3>
7670 <P>A pointer to the new attribute or NULL if the attribute could not be
7672 <H3><A NAME=
"10_90_4">Description
</A></H3>
7673 <P>The
<CODE>ippAddResolution()
</CODE> function adds a single resolution
7674 attribute value to the specified IPP request.
</P>
7675 <H3><A NAME=
"10_90_5">Example
</A></H3>
7677 #include
<cups/ipp.h
>
7681 ippAddBoolean(ipp, IPP_TAG_OPERATION,
"printer-resolution
",
7682 720,
720, IPP_RES_PER_INCH);
7684 <H3><A NAME=
"10_90_6">See Also
</A></H3>
7685 <A HREF=
"#ippAddBoolean"> <CODE>ippAddBoolean()
</CODE></A>,
<A HREF=
"#ippAddBooleans">
7686 <CODE>ippAddBooleans()
</CODE></A>,
<A HREF=
"#ippAddDate"> <CODE>
7687 ippAddDate()
</CODE></A>,
<A HREF=
"#ippAddInteger"> <CODE>ippAddInteger()
</CODE>
7688 </A>,
<A HREF=
"#ippAddIntegers"> <CODE>ippAddIntegers()
</CODE></A>,
<A HREF=
"#ippAddRange">
7689 <CODE>ippAddRange()
</CODE></A>,
<A HREF=
"#ippAddRanges"> <CODE>
7690 ippAddRanges()
</CODE></A>,
<A HREF=
"#ippAddResolutions"> <CODE>
7691 ippAddResolutions()
</CODE></A>,
<A HREF=
"#ippAddSeparator"> <CODE>
7692 ippAddSeparator()
</CODE></A>,
<A HREF=
"#ippAddString"> <CODE>
7693 ippAddString()
</CODE></A>,
<A HREF=
"#ippAddStrings"> <CODE>
7694 ippAddStrings()
</CODE></A>
7697 <H2><A NAME=
"ippAddResolutions">ippAddResolutions()
</A></H2>
7698 <H3><A NAME=
"10_91_1">Usage
</A></H3>
7701 ippAddResolutions(ipp_t *ipp,
7707 const ipp_res_t *units);
7709 <H3><A NAME=
"10_91_2">Arguments
</A></H3>
7711 <TABLE BORDER
WIDTH=
"80%">
7712 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7713 <TR><TD>ipp
</TD><TD>The IPP request
</TD></TR>
7714 <TR><TD>group
</TD><TD>The IPP group
</TD></TR>
7715 <TR><TD>name
</TD><TD>The name of attribute
</TD></TR>
7716 <TR><TD>num_values
</TD><TD>The number of resolution values
</TD></TR>
7717 <TR><TD>xres
</TD><TD>The horizontal resolutions
</TD></TR>
7718 <TR><TD>yres
</TD><TD>The vertical resolutions
</TD></TR>
7719 <TR><TD>units
</TD><TD>The resolution units
</TD></TR>
7722 <H3><A NAME=
"10_91_3">Returns
</A></H3>
7723 <P>A pointer to the new attribute or NULL if the attribute could not be
7725 <H3><A NAME=
"10_91_4">Description
</A></H3>
7726 <P>The
<CODE>ippAddResolutions()
</CODE> function adds one or more
7727 resolution attribute values to the specified IPP request. If the
<CODE>
7728 values
</CODE> pointer is
<CODE>NULL
</CODE> then an array of
<CODE>
7729 num_values
</CODE> 0,
0 resolutions is created.
</P>
7730 <H3><A NAME=
"10_91_5">Example
</A></H3>
7732 #include
<cups/ipp.h
>
7739 ippAddBoolean(ipp, IPP_TAG_OPERATION,
"printer-resolutions-supported
",
7740 5, xres, yres, units);
7742 <H3><A NAME=
"10_91_6">See Also
</A></H3>
7743 <A HREF=
"#ippAddBoolean"> <CODE>ippAddBoolean()
</CODE></A>,
<A HREF=
"#ippAddBooleans">
7744 <CODE>ippAddBooleans()
</CODE></A>,
<A HREF=
"#ippAddDate"> <CODE>
7745 ippAddDate()
</CODE></A>,
<A HREF=
"#ippAddInteger"> <CODE>ippAddInteger()
</CODE>
7746 </A>,
<A HREF=
"#ippAddIntegers"> <CODE>ippAddIntegers()
</CODE></A>,
<A HREF=
"#ippAddRange">
7747 <CODE>ippAddRange()
</CODE></A>,
<A HREF=
"#ippAddRanges"> <CODE>
7748 ippAddRanges()
</CODE></A>,
<A HREF=
"#ippAddResolution"> <CODE>
7749 ippAddResolution()
</CODE></A>,
<A HREF=
"#ippAddSeparator"> <CODE>
7750 ippAddSeparator()
</CODE></A>,
<A HREF=
"#ippAddString"> <CODE>
7751 ippAddString()
</CODE></A>,
<A HREF=
"#ippAddStrings"> <CODE>
7752 ippAddStrings()
</CODE></A>
7755 <H2><A NAME=
"ippAddSeparator">ippAddSeparator()
</A></H2>
7756 <H3><A NAME=
"10_92_1">Usage
</A></H3>
7759 ippAddSeparator(ipp_t *ipp);
7761 <H3><A NAME=
"10_92_2">Arguments
</A></H3>
7763 <TABLE BORDER
WIDTH=
"80%">
7764 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7765 <TR><TD>ipp
</TD><TD>The IPP request
</TD></TR>
7768 <H3><A NAME=
"10_92_3">Returns
</A></H3>
7769 <P>A pointer to the new separator or NULL if the separator could not be
7771 <H3><A NAME=
"10_92_4">Description
</A></H3>
7772 <P>The
<CODE>ippAddSeparator()
</CODE> function adds a group separator to
7773 the specified IPP request.
</P>
7774 <H3><A NAME=
"10_92_5">Example
</A></H3>
7776 #include
<cups/ipp.h
>
7780 ippAddSeparator(ipp);
7782 <H3><A NAME=
"10_92_6">See Also
</A></H3>
7783 <A HREF=
"#ippAddBoolean"> <CODE>ippAddBoolean()
</CODE></A>,
<A HREF=
"#ippAddBooleans">
7784 <CODE>ippAddBooleans()
</CODE></A>,
<A HREF=
"#ippAddDate"> <CODE>
7785 ippAddDate()
</CODE></A>,
<A HREF=
"#ippAddInteger"> <CODE>ippAddInteger()
</CODE>
7786 </A>,
<A HREF=
"#ippAddIntegers"> <CODE>ippAddIntegers()
</CODE></A>,
<A HREF=
"#ippAddRange">
7787 <CODE>ippAddRange()
</CODE></A>,
<A HREF=
"#ippAddRanges"> <CODE>
7788 ippAddRanges()
</CODE></A>,
<A HREF=
"#ippAddResolution"> <CODE>
7789 ippAddResolution()
</CODE></A>,
<A HREF=
"#ippAddResolutions"> <CODE>
7790 ippAddResolutions()
</CODE></A>,
<A HREF=
"#ippAddString"> <CODE>
7791 ippAddString()
</CODE></A>,
<A HREF=
"#ippAddStrings"> <CODE>
7792 ippAddStrings()
</CODE></A>
7795 <H2><A NAME=
"ippAddString">ippAddString()
</A></H2>
7796 <H3><A NAME=
"10_93_1">Usage
</A></H3>
7799 ippAddString(ipp_t *ipp,
7803 const char *charset,
7806 <H3><A NAME=
"10_93_2">Arguments
</A></H3>
7808 <TABLE BORDER
WIDTH=
"80%">
7809 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7810 <TR><TD>ipp
</TD><TD>The IPP request
</TD></TR>
7811 <TR><TD>group
</TD><TD>The IPP group
</TD></TR>
7812 <TR><TD>tag
</TD><TD>The type of string value
</TD></TR>
7813 <TR><TD>name
</TD><TD>The name of attribute
</TD></TR>
7814 <TR><TD>charset
</TD><TD>The character set for the string
</TD></TR>
7815 <TR><TD>value
</TD><TD>The string value
</TD></TR>
7818 <H3><A NAME=
"10_93_3">Returns
</A></H3>
7819 <P>A pointer to the new attribute or NULL if the attribute could not be
7821 <H3><A NAME=
"10_93_4">Description
</A></H3>
7822 <P>The
<CODE>ippAddString()
</CODE> function adds a single string
7823 attribute value to the specified IPP request. For
<CODE>
7824 IPP_TAG_NAMELANG
</CODE> and
<CODE>IPP_TAG_TEXTLANG
</CODE> strings, the
7825 charset value is provided with the string to identify the string
7826 encoding used. Otherwise the charset value is ignored.
</P>
7827 <H3><A NAME=
"10_93_5">Example
</A></H3>
7829 #include
<cups/ipp.h
>
7833 ippAddString(ipp, IPP_TAG_OPERATION, IPP_TAG_NAME,
"job-name
",
7834 NULL,
"abc123
");
7836 <H3><A NAME=
"10_93_6">See Also
</A></H3>
7837 <A HREF=
"#ippAddBoolean"> <CODE>ippAddBoolean()
</CODE></A>,
<A HREF=
"#ippAddBooleans">
7838 <CODE>ippAddBooleans()
</CODE></A>,
<A HREF=
"#ippAddDate"> <CODE>
7839 ippAddDate()
</CODE></A>,
<A HREF=
"#ippAddInteger"> <CODE>ippAddInteger()
</CODE>
7840 </A>,
<A HREF=
"#ippAddIntegers"> <CODE>ippAddIntegers()
</CODE></A>,
<A HREF=
"#ippAddRange">
7841 <CODE>ippAddRange()
</CODE></A>,
<A HREF=
"#ippAddRanges"> <CODE>
7842 ippAddRanges()
</CODE></A>,
<A HREF=
"#ippAddResolution"> <CODE>
7843 ippAddResolution()
</CODE></A>,
<A HREF=
"#ippAddResolutions"> <CODE>
7844 ippAddResolutions()
</CODE></A>,
<A HREF=
"#ippAddSeparator"> <CODE>
7845 ippAddSeparator()
</CODE></A>,
<A HREF=
"#ippAddStrings"> <CODE>
7846 ippAddStrings()
</CODE></A>
7849 <H2><A NAME=
"ippAddStrings">ippAddStrings()
</A></H2>
7850 <H3><A NAME=
"10_94_1">Usage
</A></H3>
7853 ippAddStrings(ipp_t *ipp,
7858 const char *charset,
7859 const char **values);
7861 <H3><A NAME=
"10_94_2">Arguments
</A></H3>
7863 <TABLE BORDER
WIDTH=
"80%">
7864 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7865 <TR><TD>ipp
</TD><TD>The IPP request
</TD></TR>
7866 <TR><TD>group
</TD><TD>The IPP group
</TD></TR>
7867 <TR><TD>tag
</TD><TD>The type of string value
</TD></TR>
7868 <TR><TD>name
</TD><TD>The name of attribute
</TD></TR>
7869 <TR><TD>num_values
</TD><TD>The number of strings
</TD></TR>
7870 <TR><TD>charset
</TD><TD>The character set for the strings
</TD></TR>
7871 <TR><TD>values
</TD><TD>The string values
</TD></TR>
7874 <H3><A NAME=
"10_94_3">Returns
</A></H3>
7875 <P>A pointer to the new attribute or NULL if the attribute could not be
7877 <H3><A NAME=
"10_94_4">Description
</A></H3>
7878 <P>The
<CODE>ippAddStrings()
</CODE> function adds one or more string
7879 attribute values to the specified IPP request. For
<CODE>
7880 IPP_TAG_NAMELANG
</CODE> and
<CODE>IPP_TAG_TEXTLANG
</CODE> strings, the
7881 charset value is provided with the strings to identify the string
7882 encoding used. Otherwise the charset value is ignored. If the
<CODE>
7883 values
</CODE> pointer is
<CODE>NULL
</CODE> then an array of
<CODE>
7884 num_values
</CODE> NULL strings is created.
</P>
7885 <H3><A NAME=
"10_94_5">Example
</A></H3>
7887 #include
<cups/ipp.h
>
7890 char *values[
2] = {
"one
",
"two
" };
7892 ippAddStrings(ipp, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
"attr-name
",
7895 <H3><A NAME=
"10_94_6">See Also
</A></H3>
7896 <A HREF=
"#ippAddBoolean"> <CODE>ippAddBoolean()
</CODE></A>,
<A HREF=
"#ippAddBooleans">
7897 <CODE>ippAddBooleans()
</CODE></A>,
<A HREF=
"#ippAddDate"> <CODE>
7898 ippAddDate()
</CODE></A>,
<A HREF=
"#ippAddInteger"> <CODE>ippAddInteger()
</CODE>
7899 </A>,
<A HREF=
"#ippAddIntegers"> <CODE>ippAddIntegers()
</CODE></A>,
<A HREF=
"#ippAddRange">
7900 <CODE>ippAddRange()
</CODE></A>,
<A HREF=
"#ippAddRanges"> <CODE>
7901 ippAddRanges()
</CODE></A>,
<A HREF=
"#ippAddResolution"> <CODE>
7902 ippAddResolution()
</CODE></A>,
<A HREF=
"#ippAddResolutions"> <CODE>
7903 ippAddResolutions()
</CODE></A>,
<A HREF=
"#ippAddSeparator"> <CODE>
7904 ippAddSeparator()
</CODE></A>,
<A HREF=
"#ippAddString"> <CODE>
7905 ippAddString()
</CODE></A>
7908 <H2><A NAME=
"ippDateToTime">ippDateToTime()
</A></H2>
7909 <H3><A NAME=
"10_95_1">Usage
</A></H3>
7912 ippDateToTime(const ipp_uchar_t date[
11]);
7914 <H3><A NAME=
"10_95_2">Arguments
</A></H3>
7916 <TABLE BORDER
WIDTH=
"80%">
7917 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7918 <TR><TD>date
</TD><TD>The IPP date-time value
</TD></TR>
7921 <H3><A NAME=
"10_95_3">Returns
</A></H3>
7922 <P>A UNIX time value.
</P>
7923 <H3><A NAME=
"10_95_4">Description
</A></H3>
7924 <P>The
<CODE>ippDateToTime()
</CODE> function converts an IPP date-time
7925 value to a UNIX time value.
</P>
7926 <H3><A NAME=
"10_95_5">Example
</A></H3>
7928 #include
<cups/ipp.h
>
7930 ipp_uchar_t date[
11];
7932 printf(
"UNIX time is %d\n
", ippDateToTime(date));
7934 <H3><A NAME=
"10_95_6">See Also
</A></H3>
7935 <A HREF=
"#ippTimeToDate"> <CODE>ippTimeToDate()
</CODE></A>
7938 <H2><A NAME=
"ippDelete">ippDelete()
</A></H2>
7939 <H3><A NAME=
"10_96_1">Usage
</A></H3>
7942 ippDelete(ipp_t *ipp);
7944 <H3><A NAME=
"10_96_2">Arguments
</A></H3>
7946 <TABLE BORDER
WIDTH=
"80%">
7947 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7948 <TR><TD>ipp
</TD><TD>The IPP request or response
</TD></TR>
7951 <H3><A NAME=
"10_96_3">Description
</A></H3>
7952 <P>The
<CODE>ippDelete()
</CODE> function deletes all memory used by an
7953 IPP request or response.
</P>
7954 <H3><A NAME=
"10_96_4">Example
</A></H3>
7956 #include
<cups/ipp.h
>
7962 <H3><A NAME=
"10_96_5">See Also
</A></H3>
7963 <A HREF=
"#ippNew"> <CODE>ippNew()
</CODE></A>
7966 <H2><A NAME=
"ippErrorString">ippErrorString()
</A></H2>
7967 <H3><A NAME=
"10_97_1">Usage
</A></H3>
7970 ippErrorString(ipp_status_t error);
7972 <H3><A NAME=
"10_97_2">Arguments
</A></H3>
7974 <TABLE BORDER
WIDTH=
"80%">
7975 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
7976 <TR><TD>error
</TD><TD>IPP error code.
</TD></TR>
7979 <H3><A NAME=
"10_97_3">Returns
</A></H3>
7980 <P>The standard text representation of the IPP error code.
</P>
7981 <H3><A NAME=
"10_97_4">Description
</A></H3>
7982 <P><CODE>ippErrorString()
</CODE> returns the standard text
7983 representation of the IPP error code.
</P>
7984 <H3><A NAME=
"10_97_5">Example
</A></H3>
7986 #include
<cups/ipp.h
>
7988 puts(ippErrorString(IPP_OK));
7990 <H3><A NAME=
"10_97_6">See Also
</A></H3>
7991 <P><A HREF=
"#cupsLastError"> <CODE>cupsLastError()
</CODE></A>
7994 <H2><A NAME=
"ippFindAttribute">ippFindAttribute()
</A></H2>
7995 <H3><A NAME=
"10_98_1">Usage
</A></H3>
7998 ippFindAttribute(ipp_t *ipp,
8002 <H3><A NAME=
"10_98_2">Arguments
</A></H3>
8004 <TABLE BORDER
WIDTH=
"80%">
8005 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8006 <TR><TD>ipp
</TD><TD>The IPP request or response
</TD></TR>
8007 <TR><TD>name
</TD><TD>The name of the attribute
</TD></TR>
8008 <TR><TD>tag
</TD><TD>The required value tag for the attribute or
<CODE>
8009 IPP_TAG_ZERO
</CODE> for any type of value.
</TD></TR>
8012 <H3><A NAME=
"10_98_3">Returns
</A></H3>
8013 <P>A pointer to the first occurrence of the requested attribute, or
<CODE>
8014 NULL
</CODE> if it was not found.
</P>
8015 <H3><A NAME=
"10_98_4">Description
</A></H3>
8016 <P><CODE>ippFindAttribute()
</CODE> finds the first occurrence of the
8017 named attribute. The
<CODE>tag
</CODE> parameter restricts the search to
8018 a specific value type - use
<CODE>IPP_TAG_ZERO
</CODE> to find any value
8020 <P>The value tags
<CODE>IPP_TAG_NAME
</CODE> and
<CODE>IPP_TAG_TEXT
</CODE>
8021 match the name/text values with or without the language code.
</P>
8022 <H3><A NAME=
"10_98_5">Example
</A></H3>
8024 <A HREF=
"#ipp_attribute_t">ipp_attribute_t
</A> *attr;
8026 attr = ippFindAttribute(response,
"printer-state-message
", IPP_TAG_TEXT);
8027 while (attr != NULL)
8029 puts(attr-
>values[
0].string.text);
8031 attr = ippFindNextAttribute(response,
"printer-state-message
", IPP_TAG_TEXT);
8034 <H3><A NAME=
"10_98_6">See Also
</A></H3>
8035 <A HREF=
"#cupsDoFileRequest"> <CODE>cupsDoFileRequest()
</CODE></A>,
<A HREF=
"#cupsDoRequest">
8036 <CODE>cupsDoRequest()
</CODE></A>,
<A HREF=
"#ippDelete"> <CODE>
8037 ippDelete()
</CODE></A>,
<A HREF=
"#ippFindNextAttribute"> <CODE>
8038 ippFindNextAttribute()
</CODE></A>,
<A HREF=
"#ippNew"> <CODE>ippNew()
</CODE>
8042 <H2><A NAME=
"ippFindNextAttribute">ippFindNextAttribute()
</A></H2>
8043 <H3><A NAME=
"10_99_1">Usage
</A></H3>
8046 ippFindNextAttribute(ipp_t *ipp,
8050 <H3><A NAME=
"10_99_2">Arguments
</A></H3>
8052 <TABLE BORDER
WIDTH=
"80%">
8053 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8054 <TR><TD>ipp
</TD><TD>The IPP request or response
</TD></TR>
8055 <TR><TD>name
</TD><TD>The name of the attribute
</TD></TR>
8056 <TR><TD>tag
</TD><TD>The required value tag for the attribute or
<CODE>
8057 IPP_TAG_ZERO
</CODE> for any type of value.
</TD></TR>
8060 <H3><A NAME=
"10_99_3">Returns
</A></H3>
8061 <P>A pointer to the next occurrence of the requested attribute, or
<CODE>
8062 NULL
</CODE> if it was not found.
</P>
8063 <H3><A NAME=
"10_99_4">Description
</A></H3>
8064 <P><CODE>ippFindNextAttribute()
</CODE> finds the next occurrence of the
8065 named attribute. The
<CODE>tag
</CODE> parameter restricts the search to
8066 a specific value type - use
<CODE>IPP_TAG_ZERO
</CODE> to find any value
8068 <P>The value tags
<CODE>IPP_TAG_NAME
</CODE> and
<CODE>IPP_TAG_TEXT
</CODE>
8069 match the name/text values with or without the language code.
</P>
8070 <H3><A NAME=
"10_99_5">Example
</A></H3>
8072 <A HREF=
"#ipp_attribute_t">ipp_attribute_t
</A> *attr;
8074 attr = ippFindAttribute(response,
"printer-state-message
", IPP_TAG_TEXT);
8075 while (attr != NULL)
8077 puts(attr-
>values[
0].string.text);
8079 attr = ippFindNextAttribute(response,
"printer-state-message
", IPP_TAG_TEXT);
8082 <H3><A NAME=
"10_99_6">See Also
</A></H3>
8083 <A HREF=
"#cupsDoFileRequest"> <CODE>cupsDoFileRequest()
</CODE></A>,
<A HREF=
"#cupsDoRequest">
8084 <CODE>cupsDoRequest()
</CODE></A>,
<A HREF=
"#ippDelete"> <CODE>
8085 ippDelete()
</CODE></A>,
<A HREF=
"#ippFindNextAttribute"> <CODE>
8086 ippFindNextAttribute()
</CODE></A>,
<A HREF=
"#ippNew"> <CODE>ippNew()
</CODE>
8090 <H2><A NAME=
"ippLength">ippLength()
</A></H2>
8091 <H3><A NAME=
"10_100_1">Usage
</A></H3>
8094 ippLength(ipp_t *ipp);
8096 <H3><A NAME=
"10_100_2">Arguments
</A></H3>
8098 <TABLE BORDER
WIDTH=
"80%">
8099 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8100 <TR><TD>ipp
</TD><TD>The IPP request or response
</TD></TR>
8103 <H3><A NAME=
"10_100_3">Returns
</A></H3>
8104 <P>The total encoded length of the IPP request or response in bytes.
</P>
8105 <H3><A NAME=
"10_100_4">Description
</A></H3>
8106 <P><CODE>ippLength()
</CODE> returns the length of the IPP request or
8107 response in bytes.
</P>
8108 <H3><A NAME=
"10_100_5">Example
</A></H3>
8110 printf(
"The length of the response is %d bytes.\n
", ippLength(response));
8112 <H3><A NAME=
"10_100_6">See Also
</A></H3>
8113 <A HREF=
"#ippDelete"> <CODE>ippDelete()
</CODE></A>,
<A HREF=
"#ippNew"> <CODE>
8117 <H2><A NAME=
"ippNew">ippNew()
</A></H2>
8118 <H3><A NAME=
"10_101_1">Usage
</A></H3>
8123 <H3><A NAME=
"10_101_2">Returns
</A></H3>
8124 <P>A pointer to a new IPP request or response.
</P>
8125 <H3><A NAME=
"10_101_3">Description
</A></H3>
8126 <P>The
<CODE>ippNew()
</CODE> function creates a new IPP request or
8128 <H3><A NAME=
"10_101_4">Example
</A></H3>
8130 #include
<cups/ipp.h
>
8136 <H3><A NAME=
"10_101_5">See Also
</A></H3>
8137 <A HREF=
"#ippDelete"> <CODE>ippDelete()
</CODE></A>
8140 <H2><A NAME=
"ippPort">ippPort()
</A></H2>
8141 <H3><A NAME=
"10_102_1">Usage
</A></H3>
8146 <H3><A NAME=
"10_102_2">Returns
</A></H3>
8147 <P>The default TCP/IP port number for IPP requests.
</P>
8148 <H3><A NAME=
"10_102_3">Description
</A></H3>
8149 <P>The
<CODE>ippPort()
</CODE> function returns the default IPP port
8150 number for requests.
</P>
8151 <H3><A NAME=
"10_102_4">Example
</A></H3>
8153 #include
<cups/http.h
>
8154 #include
<cups/ipp.h
>
8158 http = httpConnect(cupsServer(), ippPort());
8160 <H3><A NAME=
"10_102_5">See Also
</A></H3>
8161 <A HREF=
"#cupsServer"> <CODE>cupsServer()
</CODE></A>,
<A HREF=
"#ippSetPort">
8162 <CODE>ippSetPort()
</CODE></A>
8165 <H2><A NAME=
"ippRead">ippRead()
</A></H2>
8166 <H3><A NAME=
"10_103_1">Usage
</A></H3>
8169 ippRead(http_t *http,
8172 <H3><A NAME=
"10_103_2">Arguments
</A></H3>
8174 <TABLE BORDER
WIDTH=
"80%">
8175 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8176 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
8177 <TR><TD>ipp
</TD><TD>The IPP request or response
</TD></TR>
8180 <H3><A NAME=
"10_103_3">Returns
</A></H3>
8181 <P>The current read state.
</P>
8182 <H3><A NAME=
"10_103_4">Description
</A></H3>
8183 <P>The
<CODE>ippRead()
</CODE> function reads IPP attributes from the
8184 specified HTTP connection. Programs should continue calling
<CODE>
8185 ippRead()
</CODE> until
<CODE>IPP_ERROR
</CODE> or
<CODE>IPP_DATA
</CODE>
8187 <H3><A NAME=
"10_103_5">Example
</A></H3>
8189 #include
<cups/http.h
>
8190 #include
<cups/ipp.h
>
8198 while ((status = ippRead(http, ipp)) != IPP_ERROR)
8199 if (status == IPP_DATA)
8202 if (status == IPP_DATA)
8204 ... read additional non-IPP data using httpRead() ...
8207 <H3><A NAME=
"10_103_6">See Also
</A></H3>
8208 <A HREF=
"#ippWrite"> <CODE>ippWrite()
</CODE></A>
8211 <H2><A NAME=
"ippSetPort">ippSetPort()
</A></H2>
8212 <H3><A NAME=
"10_104_1">Usage
</A></H3>
8215 ippSetPort(int port);
8217 <H3><A NAME=
"10_104_2">Arguments
</A></H3>
8219 <TABLE BORDER
WIDTH=
"80%">
8220 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8221 <TR><TD>port
</TD><TD>The port number to use
</TD></TR>
8224 <H3><A NAME=
"10_104_3">Description
</A></H3>
8225 <P>The
<CODE>ippSetPort()
</CODE> function sets the default IPP port
8226 number for requests.
</P>
8227 <H3><A NAME=
"10_104_4">Example
</A></H3>
8229 #include
<cups/http.h
>
8230 #include
<cups/ipp.h
>
8236 <H3><A NAME=
"10_104_5">See Also
</A></H3>
8237 <A HREF=
"#ippPort"> <CODE>ippPort()
</CODE></A>
8240 <H2><A NAME=
"ippTimeToDate">ippTimeToDate()
</A></H2>
8241 <H3><A NAME=
"10_105_1">Usage
</A></H3>
8244 ippTimeToDate(time_t time);
8246 <H3><A NAME=
"10_105_2">Arguments
</A></H3>
8248 <TABLE BORDER
WIDTH=
"80%">
8249 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8250 <TR><TD>time
</TD><TD>The UNIX time value
</TD></TR>
8253 <H3><A NAME=
"10_105_3">Returns
</A></H3>
8254 <P>A static pointer to an IPP date-time value.
</P>
8255 <H3><A NAME=
"10_105_4">Description
</A></H3>
8256 <P>The
<CODE>ippTimeToDate()
</CODE> function converts a UNIX time to an
8257 IPP date-time value.
</P>
8258 <H3><A NAME=
"10_105_5">Example
</A></H3>
8260 #include
<cups/ipp.h
>
8264 date = ippTimeToDate(time(NULL));
8266 <H3><A NAME=
"10_105_6">See Also
</A></H3>
8267 <A HREF=
"#ippDateToTime"> <CODE>ippDateToTime()
</CODE></A>
8270 <H2><A NAME=
"ippWrite">ippWrite()
</A></H2>
8271 <H3><A NAME=
"10_106_1">Usage
</A></H3>
8274 ippWrite(http_t *http,
8277 <H3><A NAME=
"10_106_2">Arguments
</A></H3>
8279 <TABLE BORDER
WIDTH=
"80%">
8280 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8281 <TR><TD>http
</TD><TD>The HTTP connection
</TD></TR>
8282 <TR><TD>ipp
</TD><TD>The IPP request or response
</TD></TR>
8285 <H3><A NAME=
"10_106_3">Returns
</A></H3>
8286 <P>The current write state.
</P>
8287 <H3><A NAME=
"10_106_4">Description
</A></H3>
8288 <P>The
<CODE>ippWrite()
</CODE> function writes IPP attributes to the
8289 specified HTTP connection. Programs should continue calling
<CODE>
8290 ippWrite()
</CODE> until
<CODE>IPP_ERROR
</CODE> or
<CODE>IPP_DATA
</CODE>
8292 <H3><A NAME=
"10_106_5">Example
</A></H3>
8294 #include
<cups/http.h
>
8295 #include
<cups/ipp.h
>
8302 ... add attributes ...
8304 while ((status = ippWrite(http, ipp)) != IPP_ERROR)
8305 if (status == IPP_DATA)
8308 if (status == IPP_DATA)
8310 ... read additional non-IPP data using httpWrite() ...
8313 <H3><A NAME=
"10_106_6">See Also
</A></H3>
8314 <A HREF=
"#ippRead"> <CODE>ippRead()
</CODE></A>
8317 <H2><A NAME=
"ppdClose">ppdClose()
</A></H2>
8318 <H3><A NAME=
"10_107_1">Usage
</A></H3>
8321 ppdClose(ppd_file_t *ppd);
8323 <H3><A NAME=
"10_107_2">Arguments
</A></H3>
8325 <TABLE BORDER
WIDTH=
"80%">
8326 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8327 <TR><TD>ppd
</TD><TD>The PPD file
</TD></TR>
8330 <H3><A NAME=
"10_107_3">Description
</A></H3>
8331 <P>The
<CODE>ppdClose()
</CODE> function frees all memory associated with
8333 <H3><A NAME=
"10_107_4">Example
</A></H3>
8335 #include
<cups/ppd.h
>
8341 <H3><A NAME=
"10_107_5">See Also
</A></H3>
8342 <A HREF=
"#ppdOpen"> <CODE>ppdOpen()
</CODE></A>,
<A HREF=
"#ppdOpenFd"> <CODE>
8343 ppdOpenFd()
</CODE></A>,
<A HREF=
"#ppdOpenFile"> <CODE>ppdOpenFile()
</CODE>
8347 <H2><A NAME=
"ppdCollect">ppdCollect()
</A></H2>
8348 <H3><A NAME=
"10_108_1">Usage
</A></H3>
8351 ppdCollect(ppd_file_t *ppd,
8352 ppd_section_t section,
8353 ppd_choice_t ***choices);
8355 <H3><A NAME=
"10_108_2">Arguments
</A></H3>
8357 <TABLE BORDER
WIDTH=
"80%">
8358 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8359 <TR><TD>ppd
</TD><TD>The PPD file.
</TD></TR>
8360 <TR><TD>section
</TD><TD>The document section to collect.
</TD></TR>
8361 <TR><TD>choices
</TD><TD>The array of option choices that are marked.
</TD>
8365 <H3><A NAME=
"10_108_3">Returns
</A></H3>
8366 <P>The number of options collected.
</P>
8367 <H3><A NAME=
"10_108_4">Description
</A></H3>
8368 <P><CODE>ppdCollect()
</CODE> collects all of the marked options in the
8369 specified section, sorts them by their order dependency values, and
8370 returns an array that can be used to emit option commands in the proper
8371 order. It is normally used by the
<CODE>ppdEmit*()
</CODE> functions.
</P>
8372 <H3><A NAME=
"10_108_5">Example
</A></H3>
8374 #include
<cups/ppd.h
>
8376 <A HREF=
"#ppd_file_t">ppd_file_t
</A> *ppd;
8378 <A HREF=
"#ppd_choice_t">ppd_choice_t
</A> **choices;
8382 num_choices = ppdCollect(ppd, PPD_ORDER_JCL,
&choices);
8384 <H3><A NAME=
"10_108_6">See Also
</A></H3>
8385 <P><A HREF=
"#ppdEmit"> <CODE>ppdEmit()
</CODE></A>,
<A HREF=
"#ppdEmitFd"> <CODE>
8386 ppdEmitFd()
</CODE></A>,
<A HREF=
"#ppdEmitJCL"> <CODE>ppdEmitJCL()
</CODE></A>
8390 <H2><A NAME=
"ppdConflicts">ppdConflicts()
</A></H2>
8391 <H3><A NAME=
"10_109_1">Usage
</A></H3>
8394 ppdConflicts(ppd_file_t *ppd);
8396 <H3><A NAME=
"10_109_2">Arguments
</A></H3>
8398 <TABLE BORDER
WIDTH=
"80%">
8399 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8400 <TR><TD>ppd
</TD><TD>The PPD file
</TD></TR>
8403 <H3><A NAME=
"10_109_3">Returns
</A></H3>
8404 <P>The number of option conflicts in the file.
</P>
8405 <H3><A NAME=
"10_109_4">Description
</A></H3>
8406 <P>The
<CODE>ppdConflicts()
</CODE> function returns the number of
8407 conflicts with the currently selected options.
</P>
8408 <H3><A NAME=
"10_109_5">Example
</A></H3>
8410 #include
<cups/ppd.h
>
8414 printf(
"%d conflicts\n
", ppdConflicts(ppd));
8416 <H3><A NAME=
"10_109_6">See Also
</A></H3>
8417 <A HREF=
"#cupsMarkOptions"> <CODE>cupsMarkOptions()
</CODE></A>,
<A HREF=
"#ppdIsMarked">
8418 <CODE>ppdIsMarked()
</CODE></A>,
<A HREF=
"#ppdMarkDefaults"> <CODE>
8419 ppdMarkDefaults()
</CODE></A>,
<A HREF=
"#ppdMarkOption"> <CODE>
8420 ppdMarkOption()
</CODE></A>
8423 <H2><A NAME=
"ppdEmit">ppdEmit()
</A></H2>
8424 <H3><A NAME=
"10_110_1">Usage
</A></H3>
8427 ppdEmit(ppd_file_t *ppd,
8429 ppd_section_t section);
8431 <H3><A NAME=
"10_110_2">Arguments
</A></H3>
8433 <TABLE BORDER
WIDTH=
"80%">
8434 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8435 <TR><TD>ppd
</TD><TD>The PPD file
</TD></TR>
8436 <TR><TD>file
</TD><TD>The file to write to
</TD></TR>
8437 <TR><TD>section
</TD><TD>The option section to write
</TD></TR>
8440 <H3><A NAME=
"10_110_3">Returns
</A></H3>
8441 <P>0 on success, -
1 on error.
</P>
8442 <H3><A NAME=
"10_110_4">Description
</A></H3>
8443 <P>The
<CODE>ppdEmit()
</CODE> function sends printer-specific option
8444 commands to the specified file.
</P>
8445 <H3><A NAME=
"10_110_5">Example
</A></H3>
8447 #include
<cups/ppd.h
>
8451 ppdEmit(ppd, stdout, PPD_ORDER_PAGE);
8453 <H3><A NAME=
"10_110_6">See Also
</A></H3>
8454 <A HREF=
"#ppdEmitFd"> <CODE>ppdEmitFd()
</CODE></A>
8457 <H2><A NAME=
"ppdEmitFd">ppdEmitFd()
</A></H2>
8458 <H3><A NAME=
"10_111_1">Usage
</A></H3>
8461 ppdEmitFd(ppd_file_t *ppd,
8463 ppd_section_t section);
8465 <H3><A NAME=
"10_111_2">Arguments
</A></H3>
8467 <TABLE BORDER
WIDTH=
"80%">
8468 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8469 <TR><TD>ppd
</TD><TD>The PPD file
</TD></TR>
8470 <TR><TD>fd
</TD><TD>The file descriptor to write to
</TD></TR>
8471 <TR><TD>section
</TD><TD>The option section to write
</TD></TR>
8474 <H3><A NAME=
"10_111_3">Returns
</A></H3>
8475 <P>0 on success, -
1 on error.
</P>
8476 <H3><A NAME=
"10_111_4">Description
</A></H3>
8477 <P>The
<CODE>ppdEmitFd()
</CODE> function sends printer-specific option
8478 commands to the specified file descriptor.
</P>
8479 <H3><A NAME=
"10_111_5">Example
</A></H3>
8481 #include
<cups/ppd.h
>
8485 ppdEmitFd(ppd,
1, PPD_ORDER_PAGE);
8487 <H3><A NAME=
"10_111_6">See Also
</A></H3>
8488 <A HREF=
"#ppdEmit"> <CODE>ppdEmit()
</CODE></A>
8491 <H2><A NAME=
"ppdFindChoice">ppdFindChoice()
</A></H2>
8492 <H3><A NAME=
"10_112_1">Usage
</A></H3>
8495 ppdFindChoice(ppd_option_t *option,
8496 const char *choice);
8498 <H3><A NAME=
"10_112_2">Arguments
</A></H3>
8500 <TABLE BORDER
WIDTH=
"80%">
8501 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8502 <TR><TD>option
</TD><TD>A pointer to the option
</TD></TR>
8503 <TR><TD>choice
</TD><TD>The name of the choice
</TD></TR>
8506 <H3><A NAME=
"10_112_3">Returns
</A></H3>
8507 <P>A pointer to the choice data or NULL if the choice does not exist.
</P>
8508 <H3><A NAME=
"10_112_4">Description
</A></H3>
8509 <P>The
<CODE>ppdFindChoice()
</CODE> function returns a pointer to the
8510 choice data for the specified option.
</P>
8511 <H3><A NAME=
"10_112_5">Example
</A></H3>
8513 #include
<cups/ppd.h
>
8516 ppd_option_t *option;
8517 ppd_choice_t *choice;
8519 option = ppdFindOption(ppd,
"PageSize
");
8520 choice = ppdFindChoice(option,
"Letter
");
8522 <H3><A NAME=
"10_112_6">See Also
</A></H3>
8523 <A HREF=
"#ppdFindMarkedChoice"> <CODE>ppdFindMarkedChoice()
</CODE></A>,
<A
8524 HREF=
"#ppdFindOption"> <CODE>ppdFindOption()
</CODE></A>
8527 <H2><A NAME=
"ppdFindMarkedChoice">ppdFindMarkedChoice()
</A></H2>
8528 <H3><A NAME=
"10_113_1">Usage
</A></H3>
8531 ppdFindMarkedChoice(ppd_file_t *ppd,
8532 const char *keyword);
8534 <H3><A NAME=
"10_113_2">Arguments
</A></H3>
8536 <TABLE BORDER
WIDTH=
"80%">
8537 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8538 <TR><TD>ppd
</TD><TD>The PPD file
</TD></TR>
8539 <TR><TD>keyword
</TD><TD>The name of the option
</TD></TR>
8542 <H3><A NAME=
"10_113_3">Returns
</A></H3>
8543 <P>A pointer to the choice data or NULL if the choice does not exist or
8545 <H3><A NAME=
"10_113_4">Description
</A></H3>
8546 <P>The
<CODE>ppdFindMarkedChoice()
</CODE> function returns a pointer to
8547 the marked choice data for the specified option.
</P>
8548 <H3><A NAME=
"10_113_5">Example
</A></H3>
8550 #include
<cups/ppd.h
>
8553 ppd_choice_t *choice;
8555 choice = ppdFindMarkedChoice(ppd,
"PageSize
");
8557 <H3><A NAME=
"10_113_6">See Also
</A></H3>
8558 <A HREF=
"#ppdFindChoice"> <CODE>ppdFindChoice()
</CODE></A>,
<A HREF=
"#ppdFindOption">
8559 <CODE>ppdFindOption()
</CODE></A>
8562 <H2><A NAME=
"ppdFindOption">ppdFindOption()
</A></H2>
8563 <H3><A NAME=
"10_114_1">Usage
</A></H3>
8566 ppdFindOption(ppd_file_t *ppd,
8567 const char *keyword);
8569 <H3><A NAME=
"10_114_2">Arguments
</A></H3>
8571 <TABLE BORDER
WIDTH=
"80%">
8572 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8573 <TR><TD>ppd
</TD><TD>The PPD file
</TD></TR>
8574 <TR><TD>keyword
</TD><TD>The name of the option
</TD></TR>
8577 <H3><A NAME=
"10_114_3">Returns
</A></H3>
8578 <P>A pointer to the option data or NULL if the option does not exist.
</P>
8579 <H3><A NAME=
"10_114_4">Description
</A></H3>
8580 <P>The
<CODE>ppdFindOption()
</CODE> function returns a pointer to the
8581 option data for the specified option.
</P>
8582 <H3><A NAME=
"10_114_5">Example
</A></H3>
8584 #include
<cups/ppd.h
>
8587 ppd_option_t *option;
8589 option = ppdFindOption(ppd,
"PageSize
");
8591 <H3><A NAME=
"10_114_6">See Also
</A></H3>
8592 <A HREF=
"#ppdFindChoice"> <CODE>ppdFindChoice()
</CODE></A>,
<A HREF=
"#ppdFindMarkedChoice">
8593 <CODE>ppdFindMarkedChoice()
</CODE></A>
8596 <H2><A NAME=
"ppdIsMarked">ppdIsMarked()
</A></H2>
8597 <H3><A NAME=
"10_115_1">Usage
</A></H3>
8600 ppdIsMarked(ppd_file_t *ppd,
8601 const char *keyword,
8602 const char *choice);
8604 <H3><A NAME=
"10_115_2">Arguments
</A></H3>
8606 <TABLE BORDER
WIDTH=
"80%">
8607 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8608 <TR><TD>ppd
</TD><TD>The PPD file
</TD></TR>
8609 <TR><TD>keyword
</TD><TD>The name of the option
</TD></TR>
8610 <TR><TD>choice
</TD><TD>The name of the option choice
</TD></TR>
8613 <H3><A NAME=
"10_115_3">Returns
</A></H3>
8614 <P>1 if the choice is marked,
0 otherwise.
</P>
8615 <H3><A NAME=
"10_115_4">Description
</A></H3>
8616 <P>The
<CODE>ppdIsMarked()
</CODE> function returns whether or not the
8617 specified option choice is marked.
</P>
8618 <H3><A NAME=
"10_115_5">Example
</A></H3>
8620 #include
<cups/ppd.h
>
8624 printf(
"Letter size %s selected.\n
",
8625 ppdIsMarked(ppd,
"PageSize
",
"Letter
") ?
"is
" :
"is not
");
8627 <H3><A NAME=
"10_115_6">See Also
</A></H3>
8628 <A HREF=
"#cupsMarkOptions"> <CODE>cupsMarkOptions()
</CODE></A>,
<A HREF=
"#ppdConflicts">
8629 <CODE>ppdConflicts()
</CODE></A>,
<A HREF=
"#ppdIsMarked"> <CODE>
8630 ppdIsMarked()
</CODE></A>,
<A HREF=
"#ppdMarkDefaults"> <CODE>
8631 ppdMarkDefaults()
</CODE></A>,
<A HREF=
"#ppdMarkOption"> <CODE>
8632 ppdMarkOption()
</CODE></A>
8635 <H2><A NAME=
"ppdMarkDefaults">ppdMarkDefaults()
</A></H2>
8636 <H3><A NAME=
"10_116_1">Usage
</A></H3>
8639 ppdMarkDefaults(ppd_file_t *ppd);
8641 <H3><A NAME=
"10_116_2">Arguments
</A></H3>
8643 <TABLE BORDER
WIDTH=
"80%">
8644 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8645 <TR><TD>ppd
</TD><TD>The PPD file
</TD></TR>
8648 <H3><A NAME=
"10_116_3">Description
</A></H3>
8649 <P>The
<CODE>ppdMarkDefaults()
</CODE> function marks all of the default
8650 choices in the PPD file.
</P>
8651 <H3><A NAME=
"10_116_4">Example
</A></H3>
8653 #include
<cups/ppd.h
>
8657 ppdMarkDefaults(ppd);
8659 <H3><A NAME=
"10_116_5">See Also
</A></H3>
8660 <A HREF=
"#cupsMarkOptions"> <CODE>cupsMarkOptions()
</CODE></A>,
<A HREF=
"#ppdConflicts">
8661 <CODE>ppdConflicts()
</CODE></A>,
<A HREF=
"#ppdIsMarked"> <CODE>
8662 ppdIsMarked()
</CODE></A>,
<A HREF=
"#ppdMarkDefaults"> <CODE>
8663 ppdMarkDefaults()
</CODE></A>,
<A HREF=
"#ppdMarkOption"> <CODE>
8664 ppdMarkOption()
</CODE></A>
8667 <H2><A NAME=
"ppdMarkOption">ppdMarkOption()
</A></H2>
8668 <H3><A NAME=
"10_117_1">Usage
</A></H3>
8671 ppdMarkOption(ppd_file_t *ppd,
8672 const char *keyword,
8673 const char *choice);
8675 <H3><A NAME=
"10_117_2">Arguments
</A></H3>
8677 <TABLE BORDER
WIDTH=
"80%">
8678 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8679 <TR><TD>ppd
</TD><TD>The PPD file
</TD></TR>
8680 <TR><TD>keyword
</TD><TD>The name of the option
</TD></TR>
8681 <TR><TD>choice
</TD><TD>The name of the choice
</TD></TR>
8684 <H3><A NAME=
"10_117_3">Returns
</A></H3>
8685 <P>The number of conflicts in the PPD file.
</P>
8686 <H3><A NAME=
"10_117_4">Description
</A></H3>
8687 <P>The
<CODE>ppdMarkOption()
</CODE> function marks the specified option
8689 <H3><A NAME=
"10_117_5">Example
</A></H3>
8691 #include
<cups/ppd.h
>
8695 ppdMarkOption(ppd,
"PageSize
",
"Letter
");
8697 <H3><A NAME=
"10_117_6">See Also
</A></H3>
8698 <A HREF=
"#cupsMarkOptions"> <CODE>cupsMarkOptions()
</CODE></A>,
<A HREF=
"#ppdConflicts">
8699 <CODE>ppdConflicts()
</CODE></A>,
<A HREF=
"#ppdIsMarked"> <CODE>
8700 ppdIsMarked()
</CODE></A>,
<A HREF=
"#ppdMarkDefaults"> <CODE>
8701 ppdMarkDefaults()
</CODE></A>,
<A HREF=
"#ppdMarkOption"> <CODE>
8702 ppdMarkOption()
</CODE></A>
8705 <H2><A NAME=
"ppdOpen">ppdOpen()
</A></H2>
8706 <H3><A NAME=
"10_118_1">Usage
</A></H3>
8709 ppdOpen(FILE *file);
8711 <H3><A NAME=
"10_118_2">Arguments
</A></H3>
8713 <TABLE BORDER
WIDTH=
"80%">
8714 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8715 <TR><TD>file
</TD><TD>The file to read from
</TD></TR>
8718 <H3><A NAME=
"10_118_3">Returns
</A></H3>
8719 <P>A pointer to a PPD file structure or NULL if the PPD file could not
8721 <H3><A NAME=
"10_118_4">Description
</A></H3>
8722 <P>The
<CODE>ppdOpen()
</CODE> function reads a PPD file from the
8723 specified file into memory.
</P>
8724 <H3><A NAME=
"10_118_5">Example
</A></H3>
8726 #include
<cups/ppd.h
>
8731 file = fopen(
"filename.ppd
",
"rb
");
8732 ppd = ppdOpen(file);
8735 <H3><A NAME=
"10_118_6">See Also
</A></H3>
8736 <A HREF=
"#ppdClose"> <CODE>ppdClose()
</CODE></A>,
<A HREF=
"#ppdOpenFd"> <CODE>
8737 ppdOpenFd()
</CODE></A>,
<A HREF=
"#ppdOpenFile"> <CODE>ppdOpenFile()
</CODE>
8741 <H2><A NAME=
"ppdOpenFd">ppdOpenFd()
</A></H2>
8742 <H3><A NAME=
"10_119_1">Usage
</A></H3>
8747 <H3><A NAME=
"10_119_2">Arguments
</A></H3>
8749 <TABLE BORDER
WIDTH=
"80%">
8750 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8751 <TR><TD>fd
</TD><TD>The file descriptor to read from
</TD></TR>
8754 <H3><A NAME=
"10_119_3">Returns
</A></H3>
8755 <P>A pointer to a PPD file structure or NULL if the PPD file could not
8757 <H3><A NAME=
"10_119_4">Description
</A></H3>
8758 <P>The
<CODE>ppdOpenFd()
</CODE> function reads a PPD file from the
8759 specified file descriptor into memory.
</P>
8760 <H3><A NAME=
"10_119_5">Example
</A></H3>
8762 #include
<cups/ppd.h
>
8767 fd = open(
"filename.ppd
", O_RDONLY);
8768 ppd = ppdOpenFd(fd);
8771 <H3><A NAME=
"10_119_6">See Also
</A></H3>
8772 <A HREF=
"#ppdClose"> <CODE>ppdClose()
</CODE></A>,
<A HREF=
"#ppdOpen"> <CODE>
8773 ppdOpen()
</CODE></A>,
<A HREF=
"#ppdOpenFile"> <CODE>ppdOpenFile()
</CODE></A>
8776 <H2><A NAME=
"ppdOpenFile">ppdOpenFile()
</A></H2>
8777 <H3><A NAME=
"10_120_1">Usage
</A></H3>
8780 ppdOpenFile(const char *filename);
8782 <H3><A NAME=
"10_120_2">Arguments
</A></H3>
8784 <TABLE BORDER
WIDTH=
"80%">
8785 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8786 <TR><TD>filename
</TD><TD>The name of the file to read from
</TD></TR>
8789 <H3><A NAME=
"10_120_3">Returns
</A></H3>
8790 <P>A pointer to a PPD file structure or NULL if the PPD file could not
8792 <H3><A NAME=
"10_120_4">Description
</A></H3>
8793 <P>The
<CODE>ppdOpenFile()
</CODE> function reads a PPD file from the
8794 named file into memory.
</P>
8795 <H3><A NAME=
"10_120_5">Example
</A></H3>
8797 #include
<cups/ppd.h
>
8801 ppd = ppdOpenFile(
"filename.ppd
");
8803 <H3><A NAME=
"10_120_6">See Also
</A></H3>
8804 <A HREF=
"#ppdClose"> <CODE>ppdClose()
</CODE></A>,
<A HREF=
"#ppdOpen"> <CODE>
8805 ppdOpen()
</CODE></A>,
<A HREF=
"#ppdOpenFd"> <CODE>ppdOpenFd()
</CODE></A>
8808 <H2><A NAME=
"ppdPageLength">ppdPageLength()
</A></H2>
8809 <H3><A NAME=
"10_121_1">Usage
</A></H3>
8812 ppdPageLength(ppd_file_t *ppd,
8815 <H3><A NAME=
"10_121_2">Arguments
</A></H3>
8817 <TABLE BORDER
WIDTH=
"80%">
8818 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8819 <TR><TD>ppd
</TD><TD>The PPD file
</TD></TR>
8820 <TR><TD>name
</TD><TD>The name of the page size
</TD></TR>
8823 <H3><A NAME=
"10_121_3">Returns
</A></H3>
8824 <P>The length of the specified page size in points or
0 if the page size
8826 <H3><A NAME=
"10_121_4">Description
</A></H3>
8827 <P>The
<CODE>ppdPageLength()
</CODE> function returns the page length of
8828 the specified page size.
</P>
8829 <H3><A NAME=
"10_121_5">Example
</A></H3>
8831 #include
<cups/ppd.h
>
8835 printf(
"Length = %
.0f\n
", ppdPageLength(ppd,
"Letter
"));
8837 <H3><A NAME=
"10_121_6">See Also
</A></H3>
8838 <A HREF=
"#ppdPageLength"> <CODE>ppdPageLength()
</CODE></A>,
<A HREF=
"#ppdPageSize">
8839 <CODE>ppdPageSize()
</CODE></A>,
<A HREF=
"#ppdPageWidth"> <CODE>
8840 ppdPageWidth()
</CODE></A>
8843 <H2><A NAME=
"ppdPageSize">ppdPageSize()
</A></H2>
8844 <H3><A NAME=
"10_122_1">Usage
</A></H3>
8847 ppdPageSize(ppd_file_t *ppd,
8850 <H3><A NAME=
"10_122_2">Arguments
</A></H3>
8852 <TABLE BORDER
WIDTH=
"80%">
8853 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8854 <TR><TD>ppd
</TD><TD>The PPD file
</TD></TR>
8855 <TR><TD>name
</TD><TD>The name of the page size
</TD></TR>
8858 <H3><A NAME=
"10_122_3">Returns
</A></H3>
8859 <P>A pointer to the page size record of the specified page size in
8860 points or NULL if the page size does not exist.
</P>
8861 <H3><A NAME=
"10_122_4">Description
</A></H3>
8862 <P>The
<CODE>ppdPageSize()
</CODE> function returns the page size record
8863 for the specified page size.
</P>
8864 <H3><A NAME=
"10_122_5">Example
</A></H3>
8866 #include
<cups/ppd.h
>
8871 size = ppdPageSize(ppd,
"Letter
");
8874 printf(
" Width = %
.0f\n
", size-
>width);
8875 printf(
"Length = %
.0f\n
", size-
>length);
8876 printf(
" Left = %
.0f\n
", size-
>left);
8877 printf(
" Right = %
.0f\n
", size-
>right);
8878 printf(
"Bottom = %
.0f\n
", size-
>bottom);
8879 printf(
" Top = %
.0f\n
", size-
>top);
8882 <H3><A NAME=
"10_122_6">See Also
</A></H3>
8883 <A HREF=
"#ppdPageLength"> <CODE>ppdPageLength()
</CODE></A>,
<A HREF=
"#ppdPageWidth">
8884 <CODE>ppdPageWidth()
</CODE></A>
8887 <H2><A NAME=
"ppdPageWidth">ppdPageWidth()
</A></H2>
8888 <H3><A NAME=
"10_123_1">Usage
</A></H3>
8891 ppdPageWidth(ppd_file_t *ppd,
8894 <H3><A NAME=
"10_123_2">Arguments
</A></H3>
8896 <TABLE BORDER
WIDTH=
"80%">
8897 <TR><TH>Argument
</TH><TH>Description
</TH></TR>
8898 <TR><TD>ppd
</TD><TD>The PPD file
</TD></TR>
8899 <TR><TD>name
</TD><TD>The name of the page size
</TD></TR>
8902 <H3><A NAME=
"10_123_3">Returns
</A></H3>
8903 <P>The width of the specified page size in points or
0 if the page size
8905 <H3><A NAME=
"10_123_4">Description
</A></H3>
8906 <P>The
<CODE>ppdPageWidth()
</CODE> function returns the page width of
8907 the specified page size.
</P>
8908 <H3><A NAME=
"10_123_5">Example
</A></H3>
8910 #include
<cups/ppd.h
>
8914 printf(
"Width = %
.0f\n
", ppdPageWidth(ppd,
"Letter
"));
8916 <H3><A NAME=
"10_123_6">See Also
</A></H3>
8917 <A HREF=
"#ppdPageLength"> <CODE>ppdPageLength()
</CODE></A>,
<A HREF=
"#ppdPageSize">
8918 <CODE>ppdPageSize()
</CODE></A></BODY>