1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
3 <!-- SECTION: Programming -->
5 <title>HTTP and IPP APIs
</title>
6 <meta name='keywords' content='Programming'
>
7 <meta name='creator' content='Mini-XML v2.3'
>
8 <style type='text/css'
><!--
9 h1, h2, h3, p { font-family: sans-serif; text-align: justify; }
10 tt, pre a:link, pre a:visited, tt a:link, tt a:visited { font-weight: bold; color: #7f0000; }
11 pre { font-weight: bold; color: #7f0000; margin-left: 2em; }
12 span.info { background: #000000; border: solid thin #000000; color: #ffffff; font-size: 80%; font-style: italic; font-weight: bold; white-space: nowrap; }
13 h3 span.info { float: right; font-size: 100%; }
14 h1.title, h2.title, h3.title { border-bottom: solid 2px #000000; }
21 HTTP and IPP API introduction for the Common UNIX Printing System (CUPS).
23 Copyright 1997-2005 by Easy Software Products.
25 These coded instructions, statements, and computer programs are the
26 property of Easy Software Products and are protected by Federal
27 copyright law. Distribution and use rights are outlined in the file
28 "LICENSE.txt" which should have been included with this file. If this
29 file is missing or damaged please contact Easy Software Products
32 Attn: CUPS Licensing Information
33 Easy Software Products
34 44141 Airport View Drive, Suite 204
35 Hollywood, Maryland 20636 USA
38 EMail: cups-info@cups.org
39 WWW: http://www.cups.org
42 <h2 class='title'
>Introduction
</h2>
44 <p>The CUPS HTTP and IPP APIs provide...
</p>
46 <h2 class='title'
>General Usage
</h2>
48 <p>The
<var><cups/cups.h
></var> header file must be included to
49 use the HTTP and IPP functions.
</p>
51 <p>Programs using these functions must be linked to the CUPS
52 library:
<var>libcups.a
</var>,
<var>libcups.so
.2</var>,
53 <var>libcups
.2.dylib
</var>,
<var>libcups_s.a
</var>, or
54 <var>libcups2.lib
</var> depending on the platform. The following
55 command compiles
<var>myprogram.c
</var> using GCC and the CUPS
59 <kbd>gcc -o myprogram myprogram.c -lcups
</kbd>
62 <h2 class='title'
>Compatibility
</h2>
64 <p>Unless otherwise specified, the HTTP and IPP API functions
65 require CUPS
1.1 or higher.
</p>
66 <h2 class='title'
>Contents
</h2>
68 <li><a href='#ENUMERATIONS'
>Enumerations
</a></li>
69 <li><a href='#FUNCTIONS'
>Functions
</a></li>
70 <li><a href='#STRUCTURES'
>Structures
</a></li>
71 <li><a href='#TYPES'
>Types
</a></li>
74 <h2 class='title'
><a name='ENUMERATIONS'
>Enumerations
</a></h2>
76 <li><a href='#cups_ptype_e'
><tt>cups_ptype_e
</tt></a> </li>
77 <li><a href='#http_auth_e'
><tt>http_auth_e
</tt></a> </li>
78 <li><a href='#http_encoding_e'
><tt>http_encoding_e
</tt></a> </li>
79 <li><a href='#http_encryption_e'
><tt>http_encryption_e
</tt></a> </li>
80 <li><a href='#http_field_e'
><tt>http_field_e
</tt></a> </li>
81 <li><a href='#http_keepalive_e'
><tt>http_keepalive_e
</tt></a> </li>
82 <li><a href='#http_status_e'
><tt>http_status_e
</tt></a> </li>
85 <h3 class='title'
><a name='cups_ptype_e'
>cups_ptype_e
</a></h3>
87 <p>Not a typedef'd enum so we can OR
</p>
89 <div class='table'
><table align='center' border='
1' width='
80%'
>
90 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
92 <tr><td><tt>CUPS_PRINTER_AUTHENTICATED
</tt> <span class='info'
> CUPS
1.2 </span></td><td>Printer requires authentication
</td></tr>
93 <tr><td><tt>CUPS_PRINTER_BIND
</tt> </td><td>Can bind output
</td></tr>
94 <tr><td><tt>CUPS_PRINTER_BW
</tt> </td><td>Can do B
&W printing
</td></tr>
95 <tr><td><tt>CUPS_PRINTER_CLASS
</tt> </td><td>Printer class
</td></tr>
96 <tr><td><tt>CUPS_PRINTER_COLLATE
</tt> </td><td>Can collage copies
</td></tr>
97 <tr><td><tt>CUPS_PRINTER_COLOR
</tt> </td><td>Can do color printing
</td></tr>
98 <tr><td><tt>CUPS_PRINTER_COPIES
</tt> </td><td>Can do copies
</td></tr>
99 <tr><td><tt>CUPS_PRINTER_COVER
</tt> </td><td>Can cover output
</td></tr>
100 <tr><td><tt>CUPS_PRINTER_DEFAULT
</tt> </td><td>Default printer on network
</td></tr>
101 <tr><td><tt>CUPS_PRINTER_DELETE
</tt> <span class='info'
> CUPS
1.2 </span></td><td>Delete printer
</td></tr>
102 <tr><td><tt>CUPS_PRINTER_DUPLEX
</tt> </td><td>Can do duplexing
</td></tr>
103 <tr><td><tt>CUPS_PRINTER_FAX
</tt> </td><td>Fax queue
</td></tr>
104 <tr><td><tt>CUPS_PRINTER_IMPLICIT
</tt> </td><td>Implicit class
</td></tr>
105 <tr><td><tt>CUPS_PRINTER_LARGE
</tt> </td><td>Can do D/E/A1/A0
</td></tr>
106 <tr><td><tt>CUPS_PRINTER_LOCAL
</tt> </td><td>Local printer or class
</td></tr>
107 <tr><td><tt>CUPS_PRINTER_MEDIUM
</tt> </td><td>Can do Tabloid/B/C/A3/A2
</td></tr>
108 <tr><td><tt>CUPS_PRINTER_NOT_SHARED
</tt> <span class='info'
> CUPS
1.2 </span></td><td>Printer is not shared
</td></tr>
109 <tr><td><tt>CUPS_PRINTER_OPTIONS
</tt> </td><td>~(CLASS | REMOTE | IMPLICIT)
</td></tr>
110 <tr><td><tt>CUPS_PRINTER_PUNCH
</tt> </td><td>Can punch output
</td></tr>
111 <tr><td><tt>CUPS_PRINTER_REJECTING
</tt> </td><td>Printer is rejecting jobs
</td></tr>
112 <tr><td><tt>CUPS_PRINTER_REMOTE
</tt> </td><td>Remote printer or class
</td></tr>
113 <tr><td><tt>CUPS_PRINTER_SMALL
</tt> </td><td>Can do Letter/Legal/A4
</td></tr>
114 <tr><td><tt>CUPS_PRINTER_SORT
</tt> </td><td>Can sort output
</td></tr>
115 <tr><td><tt>CUPS_PRINTER_STAPLE
</tt> </td><td>Can staple output
</td></tr>
116 <tr><td><tt>CUPS_PRINTER_VARIABLE
</tt> </td><td>Can do variable sizes
</td></tr>
117 </tbody></table></div>
119 <h3 class='title'
><a name='http_auth_e'
>http_auth_e
</a></h3>
121 <p>HTTP authentication types
</p>
123 <div class='table'
><table align='center' border='
1' width='
80%'
>
124 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
126 <tr><td><tt>HTTP_AUTH_BASIC
</tt> </td><td>Basic authentication in use
</td></tr>
127 <tr><td><tt>HTTP_AUTH_MD5
</tt> </td><td>Digest authentication in use
</td></tr>
128 <tr><td><tt>HTTP_AUTH_MD5_INT
</tt> </td><td>Digest authentication in use for body
</td></tr>
129 <tr><td><tt>HTTP_AUTH_MD5_SESS
</tt> </td><td>MD5-session authentication in use
</td></tr>
130 <tr><td><tt>HTTP_AUTH_MD5_SESS_INT
</tt> </td><td>MD5-session authentication in use for body
</td></tr>
131 <tr><td><tt>HTTP_AUTH_NONE
</tt> </td><td>No authentication in use
</td></tr>
132 </tbody></table></div>
134 <h3 class='title'
><a name='http_encoding_e'
>http_encoding_e
</a></h3>
136 <p>HTTP transfer encoding values
</p>
138 <div class='table'
><table align='center' border='
1' width='
80%'
>
139 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
141 <tr><td><tt>HTTP_ENCODE_CHUNKED
</tt> </td><td>Data is chunked
</td></tr>
142 <tr><td><tt>HTTP_ENCODE_LENGTH
</tt> </td><td>Data is sent with Content-Length
</td></tr>
143 </tbody></table></div>
145 <h3 class='title'
><a name='http_encryption_e'
>http_encryption_e
</a></h3>
147 <p>HTTP encryption values
</p>
149 <div class='table'
><table align='center' border='
1' width='
80%'
>
150 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
152 <tr><td><tt>HTTP_ENCRYPT_ALWAYS
</tt> </td><td>Always encrypt (SSL)
</td></tr>
153 <tr><td><tt>HTTP_ENCRYPT_IF_REQUESTED
</tt> </td><td>Encrypt if requested (TLS upgrade)
</td></tr>
154 <tr><td><tt>HTTP_ENCRYPT_NEVER
</tt> </td><td>Never encrypt
</td></tr>
155 <tr><td><tt>HTTP_ENCRYPT_REQUIRED
</tt> </td><td>Encryption is required (TLS upgrade)
</td></tr>
156 </tbody></table></div>
158 <h3 class='title'
><a name='http_field_e'
>http_field_e
</a></h3>
160 <p>HTTP field names
</p>
162 <div class='table'
><table align='center' border='
1' width='
80%'
>
163 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
165 <tr><td><tt>HTTP_FIELD_ACCEPT_LANGUAGE
</tt> </td><td>Accept-Language field
</td></tr>
166 <tr><td><tt>HTTP_FIELD_ACCEPT_RANGES
</tt> </td><td>Accept-Ranges field
</td></tr>
167 <tr><td><tt>HTTP_FIELD_AUTHORIZATION
</tt> </td><td>Authorization field
</td></tr>
168 <tr><td><tt>HTTP_FIELD_CONNECTION
</tt> </td><td>Connection field
</td></tr>
169 <tr><td><tt>HTTP_FIELD_CONTENT_ENCODING
</tt> </td><td>Content-Encoding field
</td></tr>
170 <tr><td><tt>HTTP_FIELD_CONTENT_LANGUAGE
</tt> </td><td>Content-Language field
</td></tr>
171 <tr><td><tt>HTTP_FIELD_CONTENT_LENGTH
</tt> </td><td>Content-Length field
</td></tr>
172 <tr><td><tt>HTTP_FIELD_CONTENT_LOCATION
</tt> </td><td>Content-Location field
</td></tr>
173 <tr><td><tt>HTTP_FIELD_CONTENT_MD5
</tt> </td><td>Content-MD5 field
</td></tr>
174 <tr><td><tt>HTTP_FIELD_CONTENT_RANGE
</tt> </td><td>Content-Range field
</td></tr>
175 <tr><td><tt>HTTP_FIELD_CONTENT_TYPE
</tt> </td><td>Content-Type field
</td></tr>
176 <tr><td><tt>HTTP_FIELD_CONTENT_VERSION
</tt> </td><td>Content-Version field
</td></tr>
177 <tr><td><tt>HTTP_FIELD_DATE
</tt> </td><td>Date field
</td></tr>
178 <tr><td><tt>HTTP_FIELD_HOST
</tt> </td><td>Host field
</td></tr>
179 <tr><td><tt>HTTP_FIELD_IF_MODIFIED_SINCE
</tt> </td><td>If-Modified-Since field
</td></tr>
180 <tr><td><tt>HTTP_FIELD_IF_UNMODIFIED_SINCE
</tt> </td><td>If-Unmodified-Since field
</td></tr>
181 <tr><td><tt>HTTP_FIELD_KEEP_ALIVE
</tt> </td><td>Keep-Alive field
</td></tr>
182 <tr><td><tt>HTTP_FIELD_LAST_MODIFIED
</tt> </td><td>Last-Modified field
</td></tr>
183 <tr><td><tt>HTTP_FIELD_LINK
</tt> </td><td>Link field
</td></tr>
184 <tr><td><tt>HTTP_FIELD_LOCATION
</tt> </td><td>Location field
</td></tr>
185 <tr><td><tt>HTTP_FIELD_MAX
</tt> </td><td>Maximum field index
</td></tr>
186 <tr><td><tt>HTTP_FIELD_RANGE
</tt> </td><td>Range field
</td></tr>
187 <tr><td><tt>HTTP_FIELD_REFERER
</tt> </td><td>Referer field
</td></tr>
188 <tr><td><tt>HTTP_FIELD_RETRY_AFTER
</tt> </td><td>Retry-After field
</td></tr>
189 <tr><td><tt>HTTP_FIELD_TRANSFER_ENCODING
</tt> </td><td>Transfer-Encoding field
</td></tr>
190 <tr><td><tt>HTTP_FIELD_UNKNOWN
</tt> </td><td>Unknown field
</td></tr>
191 <tr><td><tt>HTTP_FIELD_UPGRADE
</tt> </td><td>Upgrade field
</td></tr>
192 <tr><td><tt>HTTP_FIELD_USER_AGENT
</tt> </td><td>User-Agent field
</td></tr>
193 <tr><td><tt>HTTP_FIELD_WWW_AUTHENTICATE
</tt> </td><td>WWW-Authenticate field
</td></tr>
194 </tbody></table></div>
196 <h3 class='title'
><a name='http_keepalive_e'
>http_keepalive_e
</a></h3>
198 <p>Types and structures...
</p>
200 <div class='table'
><table align='center' border='
1' width='
80%'
>
201 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
203 <tr><td><tt>HTTP_KEEPALIVE_OFF
</tt> </td><td>No keep alive support
</td></tr>
204 <tr><td><tt>HTTP_KEEPALIVE_ON
</tt> </td><td>Use keep alive
</td></tr>
205 </tbody></table></div>
207 <h3 class='title'
><a name='http_status_e'
>http_status_e
</a></h3>
209 <p>HTTP status codes
</p>
211 <div class='table'
><table align='center' border='
1' width='
80%'
>
212 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
214 <tr><td><tt>HTTP_ACCEPTED
</tt> </td><td>DELETE command was successful
</td></tr>
215 <tr><td><tt>HTTP_BAD_GATEWAY
</tt> </td><td>Bad gateway
</td></tr>
216 <tr><td><tt>HTTP_BAD_REQUEST
</tt> </td><td>Bad request
</td></tr>
217 <tr><td><tt>HTTP_CONFLICT
</tt> </td><td>Request is self-conflicting
</td></tr>
218 <tr><td><tt>HTTP_CONTINUE
</tt> </td><td>Everything OK, keep going...
</td></tr>
219 <tr><td><tt>HTTP_CREATED
</tt> </td><td>PUT command was successful
</td></tr>
220 <tr><td><tt>HTTP_ERROR
</tt> </td><td>An error response from httpXxxx()
</td></tr>
221 <tr><td><tt>HTTP_FORBIDDEN
</tt> </td><td>Forbidden to access this URI
</td></tr>
222 <tr><td><tt>HTTP_GATEWAY_TIMEOUT
</tt> </td><td>Gateway connection timed out
</td></tr>
223 <tr><td><tt>HTTP_GONE
</tt> </td><td>Server has gone away
</td></tr>
224 <tr><td><tt>HTTP_LENGTH_REQUIRED
</tt> </td><td>A content length or encoding is required
</td></tr>
225 <tr><td><tt>HTTP_METHOD_NOT_ALLOWED
</tt> </td><td>Method is not allowed
</td></tr>
226 <tr><td><tt>HTTP_MOVED_PERMANENTLY
</tt> </td><td>Document has moved permanently
</td></tr>
227 <tr><td><tt>HTTP_MOVED_TEMPORARILY
</tt> </td><td>Document has moved temporarily
</td></tr>
228 <tr><td><tt>HTTP_MULTIPLE_CHOICES
</tt> </td><td>Multiple files match request
</td></tr>
229 <tr><td><tt>HTTP_NOT_ACCEPTABLE
</tt> </td><td>Not Acceptable
</td></tr>
230 <tr><td><tt>HTTP_NOT_AUTHORITATIVE
</tt> </td><td>Information isn't authoritative
</td></tr>
231 <tr><td><tt>HTTP_NOT_FOUND
</tt> </td><td>URI was not found
</td></tr>
232 <tr><td><tt>HTTP_NOT_IMPLEMENTED
</tt> </td><td>Feature not implemented
</td></tr>
233 <tr><td><tt>HTTP_NOT_MODIFIED
</tt> </td><td>File not modified
</td></tr>
234 <tr><td><tt>HTTP_NOT_SUPPORTED
</tt> </td><td>HTTP version not supported
</td></tr>
235 <tr><td><tt>HTTP_NO_CONTENT
</tt> </td><td>Successful command, no new data
</td></tr>
236 <tr><td><tt>HTTP_OK
</tt> </td><td>OPTIONS/GET/HEAD/POST/TRACE command was successful
</td></tr>
237 <tr><td><tt>HTTP_PARTIAL_CONTENT
</tt> </td><td>Only a partial file was recieved/sent
</td></tr>
238 <tr><td><tt>HTTP_PAYMENT_REQUIRED
</tt> </td><td>Payment required
</td></tr>
239 <tr><td><tt>HTTP_PRECONDITION
</tt> </td><td>Precondition failed
</td></tr>
240 <tr><td><tt>HTTP_PROXY_AUTHENTICATION
</tt> </td><td>Proxy Authentication is Required
</td></tr>
241 <tr><td><tt>HTTP_REQUEST_TIMEOUT
</tt> </td><td>Request timed out
</td></tr>
242 <tr><td><tt>HTTP_REQUEST_TOO_LARGE
</tt> </td><td>Request entity too large
</td></tr>
243 <tr><td><tt>HTTP_RESET_CONTENT
</tt> </td><td>Content was reset/recreated
</td></tr>
244 <tr><td><tt>HTTP_SEE_OTHER
</tt> </td><td>See this other link...
</td></tr>
245 <tr><td><tt>HTTP_SERVER_ERROR
</tt> </td><td>Internal server error
</td></tr>
246 <tr><td><tt>HTTP_SERVICE_UNAVAILABLE
</tt> </td><td>Service is unavailable
</td></tr>
247 <tr><td><tt>HTTP_SWITCHING_PROTOCOLS
</tt> </td><td>HTTP upgrade to TLS/SSL
</td></tr>
248 <tr><td><tt>HTTP_UNAUTHORIZED
</tt> </td><td>Unauthorized to access host
</td></tr>
249 <tr><td><tt>HTTP_UNSUPPORTED_MEDIATYPE
</tt> </td><td>The requested media type is unsupported
</td></tr>
250 <tr><td><tt>HTTP_UPGRADE_REQUIRED
</tt> </td><td>Upgrade to SSL/TLS required
</td></tr>
251 <tr><td><tt>HTTP_URI_TOO_LONG
</tt> </td><td>URI too long
</td></tr>
252 <tr><td><tt>HTTP_USE_PROXY
</tt> </td><td>Must use a proxy to access this URI
</td></tr>
253 </tbody></table></div>
255 <h2 class='title'
><a name='FUNCTIONS'
>Functions
</a></h2>
257 <li><a href='#cupsAddDest'
><tt>cupsAddDest()
</tt></a> </li>
258 <li><a href='#cupsAddOption'
><tt>cupsAddOption()
</tt></a> </li>
259 <li><a href='#cupsCancelJob'
><tt>cupsCancelJob()
</tt></a> </li>
260 <li><a href='#cupsDoAuthentication'
><tt>cupsDoAuthentication()
</tt></a> <span class='info'
> CUPS
1.1.20 </span></li>
261 <li><a href='#cupsDoFileRequest'
><tt>cupsDoFileRequest()
</tt></a> </li>
262 <li><a href='#cupsEncodeOptions'
><tt>cupsEncodeOptions()
</tt></a> </li>
263 <li><a href='#cupsEncodeOptions2'
><tt>cupsEncodeOptions2()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
264 <li><a href='#cupsEncryption'
><tt>cupsEncryption()
</tt></a> </li>
265 <li><a href='#cupsFreeDests'
><tt>cupsFreeDests()
</tt></a> </li>
266 <li><a href='#cupsFreeJobs'
><tt>cupsFreeJobs()
</tt></a> </li>
267 <li><a href='#cupsFreeOptions'
><tt>cupsFreeOptions()
</tt></a> </li>
268 <li><a href='#cupsGetClasses'
><tt>cupsGetClasses()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
269 <li><a href='#cupsGetDefault'
><tt>cupsGetDefault()
</tt></a> </li>
270 <li><a href='#cupsGetDefault2'
><tt>cupsGetDefault2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
271 <li><a href='#cupsGetDest'
><tt>cupsGetDest()
</tt></a> </li>
272 <li><a href='#cupsGetDests'
><tt>cupsGetDests()
</tt></a> </li>
273 <li><a href='#cupsGetDests2'
><tt>cupsGetDests2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
274 <li><a href='#cupsGetFd'
><tt>cupsGetFd()
</tt></a> <span class='info'
> CUPS
1.1.20 </span></li>
275 <li><a href='#cupsGetFile'
><tt>cupsGetFile()
</tt></a> <span class='info'
> CUPS
1.1.20 </span></li>
276 <li><a href='#cupsGetJobs'
><tt>cupsGetJobs()
</tt></a> </li>
277 <li><a href='#cupsGetJobs2'
><tt>cupsGetJobs2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
278 <li><a href='#cupsGetOption'
><tt>cupsGetOption()
</tt></a> </li>
279 <li><a href='#cupsGetPPD'
><tt>cupsGetPPD()
</tt></a> </li>
280 <li><a href='#cupsGetPPD2'
><tt>cupsGetPPD2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
281 <li><a href='#cupsGetPassword'
><tt>cupsGetPassword()
</tt></a> </li>
282 <li><a href='#cupsGetPrinters'
><tt>cupsGetPrinters()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
283 <li><a href='#cupsLastError'
><tt>cupsLastError()
</tt></a> </li>
284 <li><a href='#cupsLastErrorString'
><tt>cupsLastErrorString()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
285 <li><a href='#cupsMarkOptions'
><tt>cupsMarkOptions()
</tt></a> </li>
286 <li><a href='#cupsParseOptions'
><tt>cupsParseOptions()
</tt></a> </li>
287 <li><a href='#cupsPrintFile'
><tt>cupsPrintFile()
</tt></a> </li>
288 <li><a href='#cupsPrintFile2'
><tt>cupsPrintFile2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
289 <li><a href='#cupsPrintFiles'
><tt>cupsPrintFiles()
</tt></a> </li>
290 <li><a href='#cupsPrintFiles2'
><tt>cupsPrintFiles2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
291 <li><a href='#cupsPutFd'
><tt>cupsPutFd()
</tt></a> <span class='info'
> CUPS
1.1.20 </span></li>
292 <li><a href='#cupsPutFile'
><tt>cupsPutFile()
</tt></a> <span class='info'
> CUPS
1.1.20 </span></li>
293 <li><a href='#cupsServer'
><tt>cupsServer()
</tt></a> </li>
294 <li><a href='#cupsSetDests'
><tt>cupsSetDests()
</tt></a> </li>
295 <li><a href='#cupsSetDests2'
><tt>cupsSetDests2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
296 <li><a href='#cupsSetEncryption'
><tt>cupsSetEncryption()
</tt></a> </li>
297 <li><a href='#cupsSetPasswordCB'
><tt>cupsSetPasswordCB()
</tt></a> </li>
298 <li><a href='#cupsSetServer'
><tt>cupsSetServer()
</tt></a> </li>
299 <li><a href='#cupsSetUser'
><tt>cupsSetUser()
</tt></a> </li>
300 <li><a href='#cupsUser'
><tt>cupsUser()
</tt></a> </li>
301 <li><a href='#httpAddrAny'
><tt>httpAddrAny()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
302 <li><a href='#httpAddrEqual'
><tt>httpAddrEqual()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
303 <li><a href='#httpAddrLength'
><tt>httpAddrLength()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
304 <li><a href='#httpAddrLocalhost'
><tt>httpAddrLocalhost()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
305 <li><a href='#httpAddrLookup'
><tt>httpAddrLookup()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
306 <li><a href='#httpAddrString'
><tt>httpAddrString()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
307 <li><a href='#httpAssembleURI'
><tt>httpAssembleURI()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
308 <li><a href='#httpAssembleURIf'
><tt>httpAssembleURIf()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
309 <li><a href='#httpCheck'
><tt>httpCheck()
</tt></a> </li>
310 <li><a href='#httpClearCookie'
><tt>httpClearCookie()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
311 <li><a href='#httpClose'
><tt>httpClose()
</tt></a> </li>
312 <li><a href='#httpConnect'
><tt>httpConnect()
</tt></a> </li>
313 <li><a href='#httpConnectEncrypt'
><tt>httpConnectEncrypt()
</tt></a> </li>
314 <li><a href='#httpDecode64'
><tt>httpDecode64()
</tt></a> </li>
315 <li><a href='#httpDecode64_2'
><tt>httpDecode64_2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
316 <li><a href='#httpDelete'
><tt>httpDelete()
</tt></a> </li>
317 <li><a href='#httpEncode64'
><tt>httpEncode64()
</tt></a> </li>
318 <li><a href='#httpEncode64_2'
><tt>httpEncode64_2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
319 <li><a href='#httpEncryption'
><tt>httpEncryption()
</tt></a> </li>
320 <li><a href='#httpFlush'
><tt>httpFlush()
</tt></a> </li>
321 <li><a href='#httpFlushWrite'
><tt>httpFlushWrite()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
322 <li><a href='#httpGet'
><tt>httpGet()
</tt></a> </li>
323 <li><a href='#httpGetDateString'
><tt>httpGetDateString()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
324 <li><a href='#httpGetDateString2'
><tt>httpGetDateString2()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
325 <li><a href='#httpGetDateTime'
><tt>httpGetDateTime()
</tt></a> </li>
326 <li><a href='#httpGetHostByName'
><tt>httpGetHostByName()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
327 <li><a href='#httpGetHostname'
><tt>httpGetHostname()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
328 <li><a href='#httpGetLength'
><tt>httpGetLength()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
329 <li><a href='#httpGetLength2'
><tt>httpGetLength2()
</tt></a> </li>
330 <li><a href='#httpGetSubField'
><tt>httpGetSubField()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
331 <li><a href='#httpGetSubField2'
><tt>httpGetSubField2()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
332 <li><a href='#httpGets'
><tt>httpGets()
</tt></a> </li>
333 <li><a href='#httpHead'
><tt>httpHead()
</tt></a> </li>
334 <li><a href='#httpInitialize'
><tt>httpInitialize()
</tt></a> </li>
335 <li><a href='#httpMD5'
><tt>httpMD5()
</tt></a> </li>
336 <li><a href='#httpMD5Final'
><tt>httpMD5Final()
</tt></a> </li>
337 <li><a href='#httpMD5String'
><tt>httpMD5String()
</tt></a> </li>
338 <li><a href='#httpOptions'
><tt>httpOptions()
</tt></a> </li>
339 <li><a href='#httpPost'
><tt>httpPost()
</tt></a> </li>
340 <li><a href='#httpPrintf'
><tt>httpPrintf()
</tt></a> </li>
341 <li><a href='#httpPut'
><tt>httpPut()
</tt></a> </li>
342 <li><a href='#httpRead'
><tt>httpRead()
</tt></a> </li>
343 <li><a href='#httpReconnect'
><tt>httpReconnect()
</tt></a> </li>
344 <li><a href='#httpSeparate'
><tt>httpSeparate()
</tt></a> </li>
345 <li><a href='#httpSeparate2'
><tt>httpSeparate2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
346 <li><a href='#httpSeparateURI'
><tt>httpSeparateURI()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
347 <li><a href='#httpSetCookie'
><tt>httpSetCookie()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
348 <li><a href='#httpSetField'
><tt>httpSetField()
</tt></a> </li>
349 <li><a href='#httpSetLength'
><tt>httpSetLength()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
350 <li><a href='#httpStatus'
><tt>httpStatus()
</tt></a> </li>
351 <li><a href='#httpTrace'
><tt>httpTrace()
</tt></a> </li>
352 <li><a href='#httpUpdate'
><tt>httpUpdate()
</tt></a> </li>
353 <li><a href='#httpWait'
><tt>httpWait()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
354 <li><a href='#httpWrite'
><tt>httpWrite()
</tt></a> </li>
355 <li><a href='#ippAddBoolean'
><tt>ippAddBoolean()
</tt></a> </li>
356 <li><a href='#ippAddBooleans'
><tt>ippAddBooleans()
</tt></a> </li>
357 <li><a href='#ippAddCollection'
><tt>ippAddCollection()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
358 <li><a href='#ippAddCollections'
><tt>ippAddCollections()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
359 <li><a href='#ippAddDate'
><tt>ippAddDate()
</tt></a> </li>
360 <li><a href='#ippAddInteger'
><tt>ippAddInteger()
</tt></a> </li>
361 <li><a href='#ippAddIntegers'
><tt>ippAddIntegers()
</tt></a> </li>
362 <li><a href='#ippAddOctetString'
><tt>ippAddOctetString()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
363 <li><a href='#ippAddRange'
><tt>ippAddRange()
</tt></a> </li>
364 <li><a href='#ippAddRanges'
><tt>ippAddRanges()
</tt></a> </li>
365 <li><a href='#ippAddResolution'
><tt>ippAddResolution()
</tt></a> </li>
366 <li><a href='#ippAddResolutions'
><tt>ippAddResolutions()
</tt></a> </li>
367 <li><a href='#ippAddSeparator'
><tt>ippAddSeparator()
</tt></a> </li>
368 <li><a href='#ippAddString'
><tt>ippAddString()
</tt></a> </li>
369 <li><a href='#ippAddStrings'
><tt>ippAddStrings()
</tt></a> </li>
370 <li><a href='#ippDateToTime'
><tt>ippDateToTime()
</tt></a> </li>
371 <li><a href='#ippDelete'
><tt>ippDelete()
</tt></a> </li>
372 <li><a href='#ippDeleteAttribute'
><tt>ippDeleteAttribute()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
373 <li><a href='#ippErrorString'
><tt>ippErrorString()
</tt></a> </li>
374 <li><a href='#ippErrorValue'
><tt>ippErrorValue()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
375 <li><a href='#ippFindAttribute'
><tt>ippFindAttribute()
</tt></a> </li>
376 <li><a href='#ippFindNextAttribute'
><tt>ippFindNextAttribute()
</tt></a> </li>
377 <li><a href='#ippLength'
><tt>ippLength()
</tt></a> </li>
378 <li><a href='#ippNew'
><tt>ippNew()
</tt></a> </li>
379 <li><a href='#ippOpString'
><tt>ippOpString()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
380 <li><a href='#ippOpValue'
><tt>ippOpValue()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
381 <li><a href='#ippPort'
><tt>ippPort()
</tt></a> </li>
382 <li><a href='#ippRead'
><tt>ippRead()
</tt></a> </li>
383 <li><a href='#ippReadFile'
><tt>ippReadFile()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
384 <li><a href='#ippReadIO'
><tt>ippReadIO()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
385 <li><a href='#ippSetPort'
><tt>ippSetPort()
</tt></a> </li>
386 <li><a href='#ippTimeToDate'
><tt>ippTimeToDate()
</tt></a> </li>
387 <li><a href='#ippWrite'
><tt>ippWrite()
</tt></a> </li>
388 <li><a href='#ippWriteFile'
><tt>ippWriteFile()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
389 <li><a href='#ippWriteIO'
><tt>ippWriteIO()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
392 <h3 class='title'
><a name='cupsAddDest'
>cupsAddDest()
</a></h3>
394 <p>Add a destination to the list of destinations.
396 Use the cupsSaveDests() function to save the updated list of destinations
397 to the user's lpoptions file.
</p>
402 const
<a href='#char'
>char
</a> * name,
403 const
<a href='#char'
>char
</a> * instance,
405 <a href='#cups_dest_t'
>cups_dest_t
</a> ** dests);
408 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
409 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
411 <tr><td><tt>name
</tt></td><td>Name of destination
</td></tr>
412 <tr><td><tt>instance
</tt></td><td>Instance of destination or NULL for none/primary
</td></tr>
413 <tr><td><tt>num_dests
</tt></td><td>Number of destinations
</td></tr>
414 <tr><td><tt>dests
</tt></td><td>Destinations
</td></tr>
415 </tbody></table></div>
417 <p>New number of destinations
</p>
419 <h3 class='title'
><a name='cupsAddOption'
>cupsAddOption()
</a></h3>
421 <p>Add an option to an option array.
</p>
426 const
<a href='#char'
>char
</a> * name,
427 const
<a href='#char'
>char
</a> * value,
429 <a href='#cups_option_t'
>cups_option_t
</a> ** options);
432 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
433 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
435 <tr><td><tt>name
</tt></td><td>Name of option
</td></tr>
436 <tr><td><tt>value
</tt></td><td>Value of option
</td></tr>
437 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
438 <tr><td><tt>options
</tt></td><td>Pointer to options
</td></tr>
439 </tbody></table></div>
441 <p>Number of options
</p>
443 <h3 class='title'
><a name='cupsCancelJob'
>cupsCancelJob()
</a></h3>
445 <p>Cancel a print job on the default server.
447 Use the cupsLastError() and cupsLastErrorString() functions to get
448 the cause of any failure.
</p>
453 const
<a href='#char'
>char
</a> * name,
457 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
458 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
460 <tr><td><tt>name
</tt></td><td>Name of printer or class
</td></tr>
461 <tr><td><tt>job
</tt></td><td>Job ID
</td></tr>
462 </tbody></table></div>
464 <p>1 on success,
0 on failure
</p>
466 <h3 class='title'
><span class='info'
> CUPS
1.1.20 </span><a name='cupsDoAuthentication'
>cupsDoAuthentication()
</a></h3>
468 <p>Authenticate a request.
470 This function should be called in response to a HTTP_UNAUTHORIZED
471 status, prior to resubmitting your request.
477 cupsDoAuthentication(
478 <a href='#http_t'
>http_t
</a> * http,
479 const
<a href='#char'
>char
</a> * method,
480 const
<a href='#char'
>char
</a> * resource);
483 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
484 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
486 <tr><td><tt>http
</tt></td><td>HTTP connection to server
</td></tr>
487 <tr><td><tt>method
</tt></td><td>Request method (GET, POST, PUT)
</td></tr>
488 <tr><td><tt>resource
</tt></td><td>Resource path
</td></tr>
489 </tbody></table></div>
491 <p>0 on success, -
1 on error
</p>
493 <h3 class='title'
><a name='cupsDoFileRequest'
>cupsDoFileRequest()
</a></h3>
495 <p>Do an IPP request.
497 This function sends any IPP request to the specified server, retrying
498 and authenticating as necessary.
</p>
501 <a href='#ipp_t'
>ipp_t
</a> *
503 <a href='#http_t'
>http_t
</a> * http,
504 <a href='#ipp_t'
>ipp_t
</a> * request,
505 const
<a href='#char'
>char
</a> * resource,
506 const
<a href='#char'
>char
</a> * filename);
509 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
510 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
512 <tr><td><tt>http
</tt></td><td>HTTP connection to server
</td></tr>
513 <tr><td><tt>request
</tt></td><td>IPP request
</td></tr>
514 <tr><td><tt>resource
</tt></td><td>HTTP resource for POST
</td></tr>
515 <tr><td><tt>filename
</tt></td><td>File to send or NULL for none
</td></tr>
516 </tbody></table></div>
520 <h3 class='title'
><a name='cupsEncodeOptions'
>cupsEncodeOptions()
</a></h3>
522 <p>Encode printer options into IPP attributes.
524 This function adds operation, job, and then subscription attributes,
525 in that order. Use the cupsEncodeOptions2() function to add attributes
526 for a single group.
</p>
531 <a href='#ipp_t'
>ipp_t
</a> * ipp,
533 <a href='#cups_option_t'
>cups_option_t
</a> * options);
536 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
537 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
539 <tr><td><tt>ipp
</tt></td><td>Request to add to
</td></tr>
540 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
541 <tr><td><tt>options
</tt></td><td>Options
</td></tr>
542 </tbody></table></div>
546 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='cupsEncodeOptions2'
>cupsEncodeOptions2()
</a></h3>
548 <p>Encode printer options into IPP attributes for a group.
550 This function only adds attributes for a single group. Call this
551 function multiple times for each group, or use cupsEncodeOptions()
552 to add the standard groups.
559 <a href='#ipp_t'
>ipp_t
</a> * ipp,
561 <a href='#cups_option_t'
>cups_option_t
</a> * options,
562 ipp_tag_t group_tag);
565 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
566 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
568 <tr><td><tt>ipp
</tt></td><td>Request to add to
</td></tr>
569 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
570 <tr><td><tt>options
</tt></td><td>Options
</td></tr>
571 <tr><td><tt>group_tag
</tt></td><td>Group to encode
</td></tr>
572 </tbody></table></div>
576 <h3 class='title'
><a name='cupsEncryption'
>cupsEncryption()
</a></h3>
578 <p>Get the default encryption settings.
580 The default encryption setting comes from the CUPS_ENCRYPTION
581 environment variable, then the ~/.cupsrc file, and finally the
582 /etc/cups/client.conf file. If not set, the default is
583 HTTP_ENCRYPT_IF_REQUESTED.
</p>
586 <a href='#http_encryption_t'
>http_encryption_t
</a>
587 cupsEncryption(void);
592 <p>Encryption settings
</p>
594 <h3 class='title'
><a name='cupsFreeDests'
>cupsFreeDests()
</a></h3>
596 <p>Free the memory used by the list of destinations.
</p>
602 <a href='#cups_dest_t'
>cups_dest_t
</a> * dests);
605 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
606 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
608 <tr><td><tt>num_dests
</tt></td><td>Number of destinations
</td></tr>
609 <tr><td><tt>dests
</tt></td><td>Destinations
</td></tr>
610 </tbody></table></div>
614 <h3 class='title'
><a name='cupsFreeJobs'
>cupsFreeJobs()
</a></h3>
616 <p>Free memory used by job data.
</p>
622 <a href='#cups_job_t'
>cups_job_t
</a> * jobs);
625 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
626 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
628 <tr><td><tt>num_jobs
</tt></td><td>Number of jobs
</td></tr>
629 <tr><td><tt>jobs
</tt></td><td>Jobs
</td></tr>
630 </tbody></table></div>
634 <h3 class='title'
><a name='cupsFreeOptions'
>cupsFreeOptions()
</a></h3>
636 <p>Free all memory used by options.
</p>
642 <a href='#cups_option_t'
>cups_option_t
</a> * options);
645 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
646 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
648 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
649 <tr><td><tt>options
</tt></td><td>Pointer to options
</td></tr>
650 </tbody></table></div>
654 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='cupsGetClasses'
>cupsGetClasses()
</a></h3>
656 <p>Get a list of printer classes from the default server.
658 This function is deprecated - use cupsGetDests() instead.
665 <a href='#char'
>char
</a> *** classes);
668 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
669 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
671 <tr><td><tt>classes
</tt></td><td>Classes
</td></tr>
672 </tbody></table></div>
674 <p>Number of classes
</p>
676 <h3 class='title'
><a name='cupsGetDefault'
>cupsGetDefault()
</a></h3>
678 <p>Get the default printer or class for the default server.
680 This function returns the default printer or class as defined by
681 the LPDEST or PRINTER environment variables. If these environment
682 variables are not set, the server default destination is returned.
683 Applications should use the cupsGetDests() and cupsGetDest() functions
684 to get the user-defined default printer, as this function does not
685 support the lpoptions-defined default printer.
</p>
688 const
<a href='#char'
>char
</a> *
689 cupsGetDefault(void);
694 <p>Default printer or NULL
</p>
696 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='cupsGetDefault2'
>cupsGetDefault2()
</a></h3>
698 <p>Get the default printer or class for the specified server.
700 This function returns the default printer or class as defined by
701 the LPDEST or PRINTER environment variables. If these environment
702 variables are not set, the server default destination is returned.
703 Applications should use the cupsGetDests() and cupsGetDest() functions
704 to get the user-defined default printer, as this function does not
705 support the lpoptions-defined default printer.
710 const
<a href='#char'
>char
</a> *
712 <a href='#http_t'
>http_t
</a> * http);
715 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
716 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
718 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
719 </tbody></table></div>
721 <p>Default printer or NULL
</p>
723 <h3 class='title'
><a name='cupsGetDest'
>cupsGetDest()
</a></h3>
725 <p>Get the named destination from the list.
727 Use the cupsGetDests() or cupsGetDests2() functions to get a
728 list of supported destinations for the current user.
</p>
731 <a href='#cups_dest_t'
>cups_dest_t
</a> *
733 const
<a href='#char'
>char
</a> * name,
734 const
<a href='#char'
>char
</a> * instance,
736 <a href='#cups_dest_t'
>cups_dest_t
</a> * dests);
739 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
740 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
742 <tr><td><tt>name
</tt></td><td>Name of destination
</td></tr>
743 <tr><td><tt>instance
</tt></td><td>Instance of destination
</td></tr>
744 <tr><td><tt>num_dests
</tt></td><td>Number of destinations
</td></tr>
745 <tr><td><tt>dests
</tt></td><td>Destinations
</td></tr>
746 </tbody></table></div>
748 <p>Destination pointer or NULL
</p>
750 <h3 class='title'
><a name='cupsGetDests'
>cupsGetDests()
</a></h3>
752 <p>Get the list of destinations from the default server.
</p>
757 <a href='#cups_dest_t'
>cups_dest_t
</a> ** dests);
760 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
761 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
763 <tr><td><tt>dests
</tt></td><td>Destinations
</td></tr>
764 </tbody></table></div>
766 <p>Number of destinations
</p>
768 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='cupsGetDests2'
>cupsGetDests2()
</a></h3>
770 <p>Get the list of destinations from the specified server.
777 <a href='#http_t'
>http_t
</a> * http,
778 <a href='#cups_dest_t'
>cups_dest_t
</a> ** dests);
781 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
782 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
784 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
785 <tr><td><tt>dests
</tt></td><td>Destinations
</td></tr>
786 </tbody></table></div>
788 <p>Number of destinations
</p>
790 <h3 class='title'
><span class='info'
> CUPS
1.1.20 </span><a name='cupsGetFd'
>cupsGetFd()
</a></h3>
792 <p>Get a file from the server.
794 This function returns HTTP_OK when the file is successfully retrieved.
801 <a href='#http_t'
>http_t
</a> * http,
802 const
<a href='#char'
>char
</a> * resource,
806 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
807 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
809 <tr><td><tt>http
</tt></td><td>HTTP connection to server
</td></tr>
810 <tr><td><tt>resource
</tt></td><td>Resource name
</td></tr>
811 <tr><td><tt>fd
</tt></td><td>File descriptor
</td></tr>
812 </tbody></table></div>
816 <h3 class='title'
><span class='info'
> CUPS
1.1.20 </span><a name='cupsGetFile'
>cupsGetFile()
</a></h3>
818 <p>Get a file from the server.
820 This function returns HTTP_OK when the file is successfully retrieved.
827 <a href='#http_t'
>http_t
</a> * http,
828 const
<a href='#char'
>char
</a> * resource,
829 const
<a href='#char'
>char
</a> * filename);
832 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
833 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
835 <tr><td><tt>http
</tt></td><td>HTTP connection to server
</td></tr>
836 <tr><td><tt>resource
</tt></td><td>Resource name
</td></tr>
837 <tr><td><tt>filename
</tt></td><td>Filename
</td></tr>
838 </tbody></table></div>
842 <h3 class='title'
><a name='cupsGetJobs'
>cupsGetJobs()
</a></h3>
844 <p>Get the jobs from the default server.
</p>
849 <a href='#cups_job_t'
>cups_job_t
</a> ** jobs,
850 const
<a href='#char'
>char
</a> * mydest,
855 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
856 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
858 <tr><td><tt>jobs
</tt></td><td>Job data
</td></tr>
859 <tr><td><tt>mydest
</tt></td><td>Only show jobs for dest?
</td></tr>
860 <tr><td><tt>myjobs
</tt></td><td>Only show my jobs?
</td></tr>
861 <tr><td><tt>completed
</tt></td><td>Only show completed jobs?
</td></tr>
862 </tbody></table></div>
864 <p>Number of jobs
</p>
866 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='cupsGetJobs2'
>cupsGetJobs2()
</a></h3>
868 <p>Get the jobs from the specified server.
875 <a href='#http_t'
>http_t
</a> * http,
876 <a href='#cups_job_t'
>cups_job_t
</a> ** jobs,
877 const
<a href='#char'
>char
</a> * mydest,
882 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
883 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
885 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
886 <tr><td><tt>jobs
</tt></td><td>Job data
</td></tr>
887 <tr><td><tt>mydest
</tt></td><td>Only show jobs for dest?
</td></tr>
888 <tr><td><tt>myjobs
</tt></td><td>Only show my jobs?
</td></tr>
889 <tr><td><tt>completed
</tt></td><td>Only show completed jobs?
</td></tr>
890 </tbody></table></div>
892 <p>Number of jobs
</p>
894 <h3 class='title'
><a name='cupsGetOption'
>cupsGetOption()
</a></h3>
896 <p>Get an option value.
</p>
899 const
<a href='#char'
>char
</a> *
901 const
<a href='#char'
>char
</a> * name,
903 <a href='#cups_option_t'
>cups_option_t
</a> * options);
906 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
907 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
909 <tr><td><tt>name
</tt></td><td>Name of option
</td></tr>
910 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
911 <tr><td><tt>options
</tt></td><td>Options
</td></tr>
912 </tbody></table></div>
914 <p>Option value or NULL
</p>
916 <h3 class='title'
><a name='cupsGetPPD'
>cupsGetPPD()
</a></h3>
918 <p>Get the PPD file for a printer on the default server.
920 For classes, cupsGetPPD() returns the PPD file for the first printer
924 const
<a href='#char'
>char
</a> *
926 const
<a href='#char'
>char
</a> * name);
929 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
930 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
932 <tr><td><tt>name
</tt></td><td>Printer name
</td></tr>
933 </tbody></table></div>
935 <p>Filename for PPD file
</p>
937 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='cupsGetPPD2'
>cupsGetPPD2()
</a></h3>
939 <p>Get the PPD file for a printer from the specified server.
941 For classes, cupsGetPPD2() returns the PPD file for the first printer
947 const
<a href='#char'
>char
</a> *
949 <a href='#http_t'
>http_t
</a> * http,
950 const
<a href='#char'
>char
</a> * name);
953 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
954 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
956 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
957 <tr><td><tt>name
</tt></td><td>Printer name
</td></tr>
958 </tbody></table></div>
960 <p>Filename for PPD file
</p>
962 <h3 class='title'
><a name='cupsGetPassword'
>cupsGetPassword()
</a></h3>
964 <p>Get a password from the user.
966 Returns NULL if the user does not provide a password.
</p>
969 const
<a href='#char'
>char
</a> *
971 const
<a href='#char'
>char
</a> * prompt);
974 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
975 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
977 <tr><td><tt>prompt
</tt></td><td>Prompt string
</td></tr>
978 </tbody></table></div>
982 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='cupsGetPrinters'
>cupsGetPrinters()
</a></h3>
984 <p>Get a list of printers from the default server.
986 This function is deprecated - use cupsGetDests() instead.
993 <a href='#char'
>char
</a> *** printers);
996 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
997 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
999 <tr><td><tt>printers
</tt></td><td>Printers
</td></tr>
1000 </tbody></table></div>
1002 <p>Number of printers
</p>
1004 <h3 class='title'
><a name='cupsLastError'
>cupsLastError()
</a></h3>
1005 <h4>Description
</h4>
1006 <p>Return the last IPP status code.
</p>
1010 cupsLastError(void);
1015 <p>IPP status code from last request
</p>
1017 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='cupsLastErrorString'
>cupsLastErrorString()
</a></h3>
1018 <h4>Description
</h4>
1019 <p>Return the last IPP status-message.
1024 const
<a href='#char'
>char
</a> *
1025 cupsLastErrorString(void);
1030 <p>status-message text from last request
</p>
1032 <h3 class='title'
><a name='cupsMarkOptions'
>cupsMarkOptions()
</a></h3>
1033 <h4>Description
</h4>
1034 <p>Mark command-line options in a PPD file.
</p>
1041 <a href='#cups_option_t'
>cups_option_t
</a> * options);
1044 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1045 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1047 <tr><td><tt>ppd
</tt></td><td>PPD file
</td></tr>
1048 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
1049 <tr><td><tt>options
</tt></td><td>Options
</td></tr>
1050 </tbody></table></div>
1052 <p>1 if conflicting
</p>
1054 <h3 class='title'
><a name='cupsParseOptions'
>cupsParseOptions()
</a></h3>
1055 <h4>Description
</h4>
1056 <p>Parse options from a command-line argument.
1058 This function converts space-delimited name/value pairs according
1059 to the PAPI text option ABNF specification. Collection values
1060 (
"name={a=... b=... c=...}
") are stored with the curley brackets
1061 intact - use cupsParseOptions() on the value to extract the collection
1067 const
<a href='#char'
>char
</a> * arg,
1069 <a href='#cups_option_t'
>cups_option_t
</a> ** options);
1072 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1073 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1075 <tr><td><tt>arg
</tt></td><td>Argument to parse
</td></tr>
1076 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
1077 <tr><td><tt>options
</tt></td><td>Options found
</td></tr>
1078 </tbody></table></div>
1080 <p>Number of options found
</p>
1082 <h3 class='title'
><a name='cupsPrintFile'
>cupsPrintFile()
</a></h3>
1083 <h4>Description
</h4>
1084 <p>Print a file to a printer or class on the default server.
</p>
1089 const
<a href='#char'
>char
</a> * name,
1090 const
<a href='#char'
>char
</a> * filename,
1091 const
<a href='#char'
>char
</a> * title,
1093 <a href='#cups_option_t'
>cups_option_t
</a> * options);
1096 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1097 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1099 <tr><td><tt>name
</tt></td><td>Printer or class name
</td></tr>
1100 <tr><td><tt>filename
</tt></td><td>File to print
</td></tr>
1101 <tr><td><tt>title
</tt></td><td>Title of job
</td></tr>
1102 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
1103 <tr><td><tt>options
</tt></td><td>Options
</td></tr>
1104 </tbody></table></div>
1108 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='cupsPrintFile2'
>cupsPrintFile2()
</a></h3>
1109 <h4>Description
</h4>
1110 <p>Print a file to a printer or class on the specified server.
1117 <a href='#http_t'
>http_t
</a> * http,
1118 const
<a href='#char'
>char
</a> * name,
1119 const
<a href='#char'
>char
</a> * filename,
1120 const
<a href='#char'
>char
</a> * title,
1122 <a href='#cups_option_t'
>cups_option_t
</a> * options);
1125 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1126 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1128 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1129 <tr><td><tt>name
</tt></td><td>Printer or class name
</td></tr>
1130 <tr><td><tt>filename
</tt></td><td>File to print
</td></tr>
1131 <tr><td><tt>title
</tt></td><td>Title of job
</td></tr>
1132 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
1133 <tr><td><tt>options
</tt></td><td>Options
</td></tr>
1134 </tbody></table></div>
1138 <h3 class='title'
><a name='cupsPrintFiles'
>cupsPrintFiles()
</a></h3>
1139 <h4>Description
</h4>
1140 <p>Print one or more files to a printer or class on the default server.
</p>
1145 const
<a href='#char'
>char
</a> * name,
1147 const
<a href='#char'
>char
</a> ** files,
1148 const
<a href='#char'
>char
</a> * title,
1150 <a href='#cups_option_t'
>cups_option_t
</a> * options);
1153 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1154 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1156 <tr><td><tt>name
</tt></td><td>Printer or class name
</td></tr>
1157 <tr><td><tt>num_files
</tt></td><td>Number of files
</td></tr>
1158 <tr><td><tt>files
</tt></td><td>File(s) to print
</td></tr>
1159 <tr><td><tt>title
</tt></td><td>Title of job
</td></tr>
1160 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
1161 <tr><td><tt>options
</tt></td><td>Options
</td></tr>
1162 </tbody></table></div>
1166 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='cupsPrintFiles2'
>cupsPrintFiles2()
</a></h3>
1167 <h4>Description
</h4>
1168 <p>Print one or more files to a printer or class on the specified server.
1175 <a href='#http_t'
>http_t
</a> * http,
1176 const
<a href='#char'
>char
</a> * name,
1178 const
<a href='#char'
>char
</a> ** files,
1179 const
<a href='#char'
>char
</a> * title,
1181 <a href='#cups_option_t'
>cups_option_t
</a> * options);
1184 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1185 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1187 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1188 <tr><td><tt>name
</tt></td><td>Printer or class name
</td></tr>
1189 <tr><td><tt>num_files
</tt></td><td>Number of files
</td></tr>
1190 <tr><td><tt>files
</tt></td><td>File(s) to print
</td></tr>
1191 <tr><td><tt>title
</tt></td><td>Title of job
</td></tr>
1192 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
1193 <tr><td><tt>options
</tt></td><td>Options
</td></tr>
1194 </tbody></table></div>
1198 <h3 class='title'
><span class='info'
> CUPS
1.1.20 </span><a name='cupsPutFd'
>cupsPutFd()
</a></h3>
1199 <h4>Description
</h4>
1200 <p>Put a file on the server.
1202 This function returns HTTP_CREATED when the file is stored successfully.
1209 <a href='#http_t'
>http_t
</a> * http,
1210 const
<a href='#char'
>char
</a> * resource,
1214 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1215 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1217 <tr><td><tt>http
</tt></td><td>HTTP connection to server
</td></tr>
1218 <tr><td><tt>resource
</tt></td><td>Resource name
</td></tr>
1219 <tr><td><tt>fd
</tt></td><td>File descriptor
</td></tr>
1220 </tbody></table></div>
1224 <h3 class='title'
><span class='info'
> CUPS
1.1.20 </span><a name='cupsPutFile'
>cupsPutFile()
</a></h3>
1225 <h4>Description
</h4>
1226 <p>Put a file on the server.
1228 This function returns HTTP_CREATED when the file is stored successfully.
1235 <a href='#http_t'
>http_t
</a> * http,
1236 const
<a href='#char'
>char
</a> * resource,
1237 const
<a href='#char'
>char
</a> * filename);
1240 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1241 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1243 <tr><td><tt>http
</tt></td><td>HTTP connection to server
</td></tr>
1244 <tr><td><tt>resource
</tt></td><td>Resource name
</td></tr>
1245 <tr><td><tt>filename
</tt></td><td>Filename
</td></tr>
1246 </tbody></table></div>
1250 <h3 class='title'
><a name='cupsServer'
>cupsServer()
</a></h3>
1251 <h4>Description
</h4>
1252 <p>Return the hostname/address of the default server.
1254 The returned value can be a fully-qualified hostname, a numeric
1255 IPv4 or IPv6 address, or a domain socket pathname.
</p>
1258 const
<a href='#char'
>char
</a> *
1266 <h3 class='title'
><a name='cupsSetDests'
>cupsSetDests()
</a></h3>
1267 <h4>Description
</h4>
1268 <p>Save the list of destinations for the default server.
1270 This function saves the destinations to /etc/cups/lpoptions when run
1271 as root and ~/.lpoptions when run as a normal user.
</p>
1277 <a href='#cups_dest_t'
>cups_dest_t
</a> * dests);
1280 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1281 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1283 <tr><td><tt>num_dests
</tt></td><td>Number of destinations
</td></tr>
1284 <tr><td><tt>dests
</tt></td><td>Destinations
</td></tr>
1285 </tbody></table></div>
1289 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='cupsSetDests2'
>cupsSetDests2()
</a></h3>
1290 <h4>Description
</h4>
1291 <p>Save the list of destinations for the specified server.
1293 This function saves the destinations to /etc/cups/lpoptions when run
1294 as root and ~/.lpoptions when run as a normal user.
1301 <a href='#http_t'
>http_t
</a> * http,
1303 <a href='#cups_dest_t'
>cups_dest_t
</a> * dests);
1306 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1307 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1309 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1310 <tr><td><tt>num_dests
</tt></td><td>Number of destinations
</td></tr>
1311 <tr><td><tt>dests
</tt></td><td>Destinations
</td></tr>
1312 </tbody></table></div>
1314 <p>0 on success, -
1 on error
</p>
1316 <h3 class='title'
><a name='cupsSetEncryption'
>cupsSetEncryption()
</a></h3>
1317 <h4>Description
</h4>
1318 <p>Set the encryption preference.
</p>
1323 <a href='#http_encryption_t'
>http_encryption_t
</a> e);
1326 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1327 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1329 <tr><td><tt>e
</tt></td><td>New encryption preference
</td></tr>
1330 </tbody></table></div>
1334 <h3 class='title'
><a name='cupsSetPasswordCB'
>cupsSetPasswordCB()
</a></h3>
1335 <h4>Description
</h4>
1336 <p>Set the password callback for CUPS.
1338 Pass NULL to restore the default (console) password callback.
</p>
1343 cups_password_cb_t cb);
1346 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1347 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1349 <tr><td><tt>cb
</tt></td><td>Callback function
</td></tr>
1350 </tbody></table></div>
1354 <h3 class='title'
><a name='cupsSetServer'
>cupsSetServer()
</a></h3>
1355 <h4>Description
</h4>
1356 <p>Set the default server name.
1358 The
"server
" string can be a fully-qualified hostname, a numeric
1359 IPv4 or IPv6 address, or a domain socket pathname. Pass NULL to
1360 restore the default server name.
</p>
1365 const
<a href='#char'
>char
</a> * server);
1368 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1369 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1371 <tr><td><tt>server
</tt></td><td>Server name
</td></tr>
1372 </tbody></table></div>
1376 <h3 class='title'
><a name='cupsSetUser'
>cupsSetUser()
</a></h3>
1377 <h4>Description
</h4>
1378 <p>Set the default user name.
1380 Pass NULL to restore the default user name.
</p>
1385 const
<a href='#char'
>char
</a> * user);
1388 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1389 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1391 <tr><td><tt>user
</tt></td><td>User name
</td></tr>
1392 </tbody></table></div>
1396 <h3 class='title'
><a name='cupsUser'
>cupsUser()
</a></h3>
1397 <h4>Description
</h4>
1398 <p>Return the current user's name.
</p>
1401 const
<a href='#char'
>char
</a> *
1409 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAddrAny'
>httpAddrAny()
</a></h3>
1410 <h4>Description
</h4>
1411 <p>Check for the
"any
" address.
1418 const
<a href='#http_addr_t'
>http_addr_t
</a> * addr);
1421 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1422 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1424 <tr><td><tt>addr
</tt></td><td>Address to check
</td></tr>
1425 </tbody></table></div>
1427 <p>1 if
"any
",
0 otherwise
</p>
1429 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAddrEqual'
>httpAddrEqual()
</a></h3>
1430 <h4>Description
</h4>
1431 <p>Compare two addresses.
1438 const
<a href='#http_addr_t'
>http_addr_t
</a> * addr1,
1439 const
<a href='#http_addr_t'
>http_addr_t
</a> * addr2);
1442 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1443 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1445 <tr><td><tt>addr1
</tt></td><td>First address
</td></tr>
1446 <tr><td><tt>addr2
</tt></td><td>Second address
</td></tr>
1447 </tbody></table></div>
1449 <p>1 if equal,
0 if !=
</p>
1451 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAddrLength'
>httpAddrLength()
</a></h3>
1452 <h4>Description
</h4>
1453 <p>Return the length of the address in bytes.
1460 const
<a href='#http_addr_t'
>http_addr_t
</a> * addr);
1463 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1464 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1466 <tr><td><tt>addr
</tt></td><td>Address
</td></tr>
1467 </tbody></table></div>
1469 <p>Length in bytes
</p>
1471 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAddrLocalhost'
>httpAddrLocalhost()
</a></h3>
1472 <h4>Description
</h4>
1473 <p>Check for the local loopback address.
1480 const
<a href='#http_addr_t'
>http_addr_t
</a> * addr);
1483 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1484 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1486 <tr><td><tt>addr
</tt></td><td>Address to check
</td></tr>
1487 </tbody></table></div>
1489 <p>1 if local host,
0 otherwise
</p>
1491 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAddrLookup'
>httpAddrLookup()
</a></h3>
1492 <h4>Description
</h4>
1493 <p>Lookup the hostname associated with the address.
1498 <a href='#char'
>char
</a> *
1500 const
<a href='#http_addr_t'
>http_addr_t
</a> * addr,
1501 <a href='#char'
>char
</a> * name,
1505 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1506 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1508 <tr><td><tt>addr
</tt></td><td>Address to lookup
</td></tr>
1509 <tr><td><tt>name
</tt></td><td>Host name buffer
</td></tr>
1510 <tr><td><tt>namelen
</tt></td><td>Size of name buffer
</td></tr>
1511 </tbody></table></div>
1515 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAddrString'
>httpAddrString()
</a></h3>
1516 <h4>Description
</h4>
1517 <p>Convert an IP address to a dotted string.
1522 <a href='#char'
>char
</a> *
1524 const
<a href='#http_addr_t'
>http_addr_t
</a> * addr,
1525 <a href='#char'
>char
</a> * s,
1529 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1530 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1532 <tr><td><tt>addr
</tt></td><td>Address to convert
</td></tr>
1533 <tr><td><tt>s
</tt></td><td>String buffer
</td></tr>
1534 <tr><td><tt>slen
</tt></td><td>Length of string
</td></tr>
1535 </tbody></table></div>
1539 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAssembleURI'
>httpAssembleURI()
</a></h3>
1540 <h4>Description
</h4>
1541 <p>Assemble a uniform resource identifier from its
1544 This function properly escapes all reserved characters in a URI. You
1545 should use this function in place of traditional string functions
1546 whenever you need to create a URI string.
1553 <a href='#char'
>char
</a> * uri,
1555 const
<a href='#char'
>char
</a> * scheme,
1556 const
<a href='#char'
>char
</a> * username,
1557 const
<a href='#char'
>char
</a> * host,
1559 const
<a href='#char'
>char
</a> * resource);
1562 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1563 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1565 <tr><td><tt>uri
</tt></td><td>URI buffer
</td></tr>
1566 <tr><td><tt>urilen
</tt></td><td>Size of URI buffer
</td></tr>
1567 <tr><td><tt>scheme
</tt></td><td>Scheme name
</td></tr>
1568 <tr><td><tt>username
</tt></td><td>Username
</td></tr>
1569 <tr><td><tt>host
</tt></td><td>Hostname or address
</td></tr>
1570 <tr><td><tt>port
</tt></td><td>Port number
</td></tr>
1571 <tr><td><tt>resource
</tt></td><td>Resource
</td></tr>
1572 </tbody></table></div>
1576 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAssembleURIf'
>httpAssembleURIf()
</a></h3>
1577 <h4>Description
</h4>
1578 <p>Assemble a uniform resource identifier from its
1579 components with a formatted resource.
1581 This function creates a formatted version of the resource string
1582 argument
"resourcef
" and properly escapes all reserved characters
1583 in a URI. You should use this function in place of traditional
1584 string functions whenever you need to create a URI string.
1591 <a href='#char'
>char
</a> * uri,
1593 const
<a href='#char'
>char
</a> * scheme,
1594 const
<a href='#char'
>char
</a> * username,
1595 const
<a href='#char'
>char
</a> * host,
1597 const
<a href='#char'
>char
</a> * resourcef,
1601 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1602 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1604 <tr><td><tt>uri
</tt></td><td>URI buffer
</td></tr>
1605 <tr><td><tt>urilen
</tt></td><td>Size of URI buffer
</td></tr>
1606 <tr><td><tt>scheme
</tt></td><td>Scheme name
</td></tr>
1607 <tr><td><tt>username
</tt></td><td>Username
</td></tr>
1608 <tr><td><tt>host
</tt></td><td>Hostname or address
</td></tr>
1609 <tr><td><tt>port
</tt></td><td>Port number
</td></tr>
1610 <tr><td><tt>resourcef
</tt></td><td>Printf-style resource
</td></tr>
1611 <tr><td><tt>...
</tt></td><td>Additional arguments as needed
</td></tr>
1612 </tbody></table></div>
1616 <h3 class='title'
><a name='httpCheck'
>httpCheck()
</a></h3>
1617 <h4>Description
</h4>
1618 <p>Check to see if there is a pending response from the server.
</p>
1623 <a href='#http_t'
>http_t
</a> * http);
1626 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1627 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1629 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1630 </tbody></table></div>
1632 <p>0 = no data,
1 = data available
</p>
1634 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='httpClearCookie'
>httpClearCookie()
</a></h3>
1635 <h4>Description
</h4>
1636 <p>Clear the cookie value(s).
1643 <a href='#http_t'
>http_t
</a> * http);
1646 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1647 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1649 <tr><td><tt>http
</tt></td><td>Connection
</td></tr>
1650 </tbody></table></div>
1654 <h3 class='title'
><a name='httpClose'
>httpClose()
</a></h3>
1655 <h4>Description
</h4>
1656 <p>Close an HTTP connection...
</p>
1661 <a href='#http_t'
>http_t
</a> * http);
1664 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1665 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1667 <tr><td><tt>http
</tt></td><td>Connection to close
</td></tr>
1668 </tbody></table></div>
1672 <h3 class='title'
><a name='httpConnect'
>httpConnect()
</a></h3>
1673 <h4>Description
</h4>
1674 <p>Connect to a HTTP server.
</p>
1677 <a href='#http_t'
>http_t
</a> *
1679 const
<a href='#char'
>char
</a> * host,
1683 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1684 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1686 <tr><td><tt>host
</tt></td><td>Host to connect to
</td></tr>
1687 <tr><td><tt>port
</tt></td><td>Port number
</td></tr>
1688 </tbody></table></div>
1690 <p>New HTTP connection
</p>
1692 <h3 class='title'
><a name='httpConnectEncrypt'
>httpConnectEncrypt()
</a></h3>
1693 <h4>Description
</h4>
1694 <p>Connect to a HTTP server using encryption.
</p>
1697 <a href='#http_t'
>http_t
</a> *
1699 const
<a href='#char'
>char
</a> * host,
1701 <a href='#http_encryption_t'
>http_encryption_t
</a> encryption);
1704 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1705 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1707 <tr><td><tt>host
</tt></td><td>Host to connect to
</td></tr>
1708 <tr><td><tt>port
</tt></td><td>Port number
</td></tr>
1709 <tr><td><tt>encryption
</tt></td><td>Type of encryption to use
</td></tr>
1710 </tbody></table></div>
1712 <p>New HTTP connection
</p>
1714 <h3 class='title'
><a name='httpDecode64'
>httpDecode64()
</a></h3>
1715 <h4>Description
</h4>
1716 <p>Base64-decode a string.
</p>
1719 <a href='#char'
>char
</a> *
1721 <a href='#char'
>char
</a> * out,
1722 const
<a href='#char'
>char
</a> * in);
1725 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1726 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1728 <tr><td><tt>out
</tt></td><td>String to write to
</td></tr>
1729 <tr><td><tt>in
</tt></td><td>String to read from
</td></tr>
1730 </tbody></table></div>
1732 <p>Decoded string
</p>
1734 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='httpDecode64_2'
>httpDecode64_2()
</a></h3>
1735 <h4>Description
</h4>
1736 <p>Base64-decode a string.
1741 <a href='#char'
>char
</a> *
1743 <a href='#char'
>char
</a> * out,
1745 const
<a href='#char'
>char
</a> * in);
1748 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1749 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1751 <tr><td><tt>out
</tt></td><td>String to write to
</td></tr>
1752 <tr><td><tt>outlen
</tt></td><td>Size of output string
</td></tr>
1753 <tr><td><tt>in
</tt></td><td>String to read from
</td></tr>
1754 </tbody></table></div>
1756 <p>Decoded string
</p>
1758 <h3 class='title'
><a name='httpDelete'
>httpDelete()
</a></h3>
1759 <h4>Description
</h4>
1760 <p>Send a DELETE request to the server.
</p>
1765 <a href='#http_t'
>http_t
</a> * http,
1766 const
<a href='#char'
>char
</a> * uri);
1769 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1770 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1772 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
1773 <tr><td><tt>uri
</tt></td><td>URI to delete
</td></tr>
1774 </tbody></table></div>
1776 <p>Status of call (
0 = success)
</p>
1778 <h3 class='title'
><a name='httpEncode64'
>httpEncode64()
</a></h3>
1779 <h4>Description
</h4>
1780 <p>Base64-encode a string.
</p>
1783 <a href='#char'
>char
</a> *
1785 <a href='#char'
>char
</a> * out,
1786 const
<a href='#char'
>char
</a> * in);
1789 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1790 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1792 <tr><td><tt>out
</tt></td><td>String to write to
</td></tr>
1793 <tr><td><tt>in
</tt></td><td>String to read from
</td></tr>
1794 </tbody></table></div>
1796 <p>Encoded string
</p>
1798 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='httpEncode64_2'
>httpEncode64_2()
</a></h3>
1799 <h4>Description
</h4>
1800 <p>Base64-encode a string.
1805 <a href='#char'
>char
</a> *
1807 <a href='#char'
>char
</a> * out,
1809 const
<a href='#char'
>char
</a> * in,
1813 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1814 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1816 <tr><td><tt>out
</tt></td><td>String to write to
</td></tr>
1817 <tr><td><tt>outlen
</tt></td><td>Size of output string
</td></tr>
1818 <tr><td><tt>in
</tt></td><td>String to read from
</td></tr>
1819 <tr><td><tt>inlen
</tt></td><td>Size of input string
</td></tr>
1820 </tbody></table></div>
1822 <p>Encoded string
</p>
1824 <h3 class='title'
><a name='httpEncryption'
>httpEncryption()
</a></h3>
1825 <h4>Description
</h4>
1826 <p>Set the required encryption on the link.
</p>
1831 <a href='#http_t'
>http_t
</a> * http,
1832 <a href='#http_encryption_t'
>http_encryption_t
</a> e);
1835 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1836 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1838 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
1839 <tr><td><tt>e
</tt></td><td>New encryption preference
</td></tr>
1840 </tbody></table></div>
1842 <p>-
1 on error,
0 on success
</p>
1844 <h3 class='title'
><a name='httpFlush'
>httpFlush()
</a></h3>
1845 <h4>Description
</h4>
1846 <p>Flush data from a HTTP connection.
</p>
1851 <a href='#http_t'
>http_t
</a> * http);
1854 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1855 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1857 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
1858 </tbody></table></div>
1862 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpFlushWrite'
>httpFlushWrite()
</a></h3>
1863 <h4>Description
</h4>
1864 <p>Flush data in write buffer.
1871 <a href='#http_t'
>http_t
</a> * http);
1874 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1875 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1877 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
1878 </tbody></table></div>
1880 <p>Bytes written or -
1 on error
</p>
1882 <h3 class='title'
><a name='httpGet'
>httpGet()
</a></h3>
1883 <h4>Description
</h4>
1884 <p>Send a GET request to the server.
</p>
1889 <a href='#http_t'
>http_t
</a> * http,
1890 const
<a href='#char'
>char
</a> * uri);
1893 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1894 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1896 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
1897 <tr><td><tt>uri
</tt></td><td>URI to get
</td></tr>
1898 </tbody></table></div>
1900 <p>Status of call (
0 = success)
</p>
1902 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='httpGetDateString'
>httpGetDateString()
</a></h3>
1903 <h4>Description
</h4>
1904 <p>Get a formatted date/time string from a time value.
1909 const
<a href='#char'
>char
</a> *
1914 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1915 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1917 <tr><td><tt>t
</tt></td><td>UNIX time
</td></tr>
1918 </tbody></table></div>
1920 <p>Date/time string
</p>
1922 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpGetDateString2'
>httpGetDateString2()
</a></h3>
1923 <h4>Description
</h4>
1924 <p>Get a formatted date/time string from a time value.
1929 const
<a href='#char'
>char
</a> *
1932 <a href='#char'
>char
</a> * s,
1936 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1937 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1939 <tr><td><tt>t
</tt></td><td>UNIX time
</td></tr>
1940 <tr><td><tt>s
</tt></td><td>String buffer
</td></tr>
1941 <tr><td><tt>slen
</tt></td><td>Size of string buffer
</td></tr>
1942 </tbody></table></div>
1944 <p>Date/time string
</p>
1946 <h3 class='title'
><a name='httpGetDateTime'
>httpGetDateTime()
</a></h3>
1947 <h4>Description
</h4>
1948 <p>Get a time value from a formatted date/time string.
</p>
1953 const
<a href='#char'
>char
</a> * s);
1956 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1957 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1959 <tr><td><tt>s
</tt></td><td>Date/time string
</td></tr>
1960 </tbody></table></div>
1964 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='httpGetHostByName'
>httpGetHostByName()
</a></h3>
1965 <h4>Description
</h4>
1966 <p>Lookup a hostname or IPv4 address, and return
1967 address records for the specified name.
1974 const
<a href='#char'
>char
</a> * name);
1977 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1978 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1980 <tr><td><tt>name
</tt></td><td>Hostname or IP address
</td></tr>
1981 </tbody></table></div>
1985 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpGetHostname'
>httpGetHostname()
</a></h3>
1986 <h4>Description
</h4>
1987 <p>Get the FQDN for the local system.
1989 This function uses both gethostname() and gethostbyname() to
1990 get the local hostname with domain.
1995 const
<a href='#char'
>char
</a> *
1997 <a href='#char'
>char
</a> * s,
2001 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2002 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2004 <tr><td><tt>s
</tt></td><td>String buffer for name
</td></tr>
2005 <tr><td><tt>slen
</tt></td><td>Size of buffer
</td></tr>
2006 </tbody></table></div>
2008 <p>FQDN for this system
</p>
2010 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpGetLength'
>httpGetLength()
</a></h3>
2011 <h4>Description
</h4>
2012 <p>Get the amount of data remaining from the
2013 content-length or transfer-encoding fields.
2015 This function is deprecated and will not return lengths larger than
2016 2^
31 -
1; use httpGetLength2() instead.
2023 <a href='#http_t'
>http_t
</a> * http);
2026 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2027 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2029 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
2030 </tbody></table></div>
2032 <p>Content length
</p>
2034 <h3 class='title'
><a name='httpGetLength2'
>httpGetLength2()
</a></h3>
2035 <h4>Description
</h4>
2036 <p>Get the amount of data remaining from the
2037 content-length or transfer-encoding fields.
2039 This function returns the complete content length, even for
2040 content larger than
2^
31 -
1.
</p>
2045 <a href='#http_t'
>http_t
</a> * http);
2048 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2049 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2051 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
2052 </tbody></table></div>
2054 <p>Content length
</p>
2056 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='httpGetSubField'
>httpGetSubField()
</a></h3>
2057 <h4>Description
</h4>
2058 <p>Get a sub-field value.
2063 <a href='#char'
>char
</a> *
2065 <a href='#http_t'
>http_t
</a> * http,
2067 const
<a href='#char'
>char
</a> * name,
2068 <a href='#char'
>char
</a> * value);
2071 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2072 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2074 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
2075 <tr><td><tt>field
</tt></td><td>Field index
</td></tr>
2076 <tr><td><tt>name
</tt></td><td>Name of sub-field
</td></tr>
2077 <tr><td><tt>value
</tt></td><td>Value string
</td></tr>
2078 </tbody></table></div>
2080 <p>Value or NULL
</p>
2082 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpGetSubField2'
>httpGetSubField2()
</a></h3>
2083 <h4>Description
</h4>
2084 <p>Get a sub-field value.
2089 <a href='#char'
>char
</a> *
2091 <a href='#http_t'
>http_t
</a> * http,
2093 const
<a href='#char'
>char
</a> * name,
2094 <a href='#char'
>char
</a> * value,
2098 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2099 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2101 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
2102 <tr><td><tt>field
</tt></td><td>Field index
</td></tr>
2103 <tr><td><tt>name
</tt></td><td>Name of sub-field
</td></tr>
2104 <tr><td><tt>value
</tt></td><td>Value string
</td></tr>
2105 <tr><td><tt>valuelen
</tt></td><td>Size of value buffer
</td></tr>
2106 </tbody></table></div>
2108 <p>Value or NULL
</p>
2110 <h3 class='title'
><a name='httpGets'
>httpGets()
</a></h3>
2111 <h4>Description
</h4>
2112 <p>Get a line of text from a HTTP connection.
</p>
2115 <a href='#char'
>char
</a> *
2117 <a href='#char'
>char
</a> * line,
2119 <a href='#http_t'
>http_t
</a> * http);
2122 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2123 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2125 <tr><td><tt>line
</tt></td><td>Line to read into
</td></tr>
2126 <tr><td><tt>length
</tt></td><td>Max length of buffer
</td></tr>
2127 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
2128 </tbody></table></div>
2132 <h3 class='title'
><a name='httpHead'
>httpHead()
</a></h3>
2133 <h4>Description
</h4>
2134 <p>Send a HEAD request to the server.
</p>
2139 <a href='#http_t'
>http_t
</a> * http,
2140 const
<a href='#char'
>char
</a> * uri);
2143 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2144 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2146 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
2147 <tr><td><tt>uri
</tt></td><td>URI for head
</td></tr>
2148 </tbody></table></div>
2150 <p>Status of call (
0 = success)
</p>
2152 <h3 class='title'
><a name='httpInitialize'
>httpInitialize()
</a></h3>
2153 <h4>Description
</h4>
2154 <p>Initialize the HTTP interface library and set the
2155 default HTTP proxy (if any).
</p>
2159 httpInitialize(void);
2166 <h3 class='title'
><a name='httpMD5'
>httpMD5()
</a></h3>
2167 <h4>Description
</h4>
2168 <p>Compute the MD5 sum of the username:group:password.
</p>
2171 <a href='#char'
>char
</a> *
2173 const
<a href='#char'
>char
</a> * username,
2174 const
<a href='#char'
>char
</a> * realm,
2175 const
<a href='#char'
>char
</a> * passwd,
2176 <a href='#char'
>char
</a> md5[
33]);
2179 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2180 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2182 <tr><td><tt>username
</tt></td><td>User name
</td></tr>
2183 <tr><td><tt>realm
</tt></td><td>Realm name
</td></tr>
2184 <tr><td><tt>passwd
</tt></td><td>Password string
</td></tr>
2185 <tr><td><tt>md5[
33]
</tt></td><td>MD5 string
</td></tr>
2186 </tbody></table></div>
2190 <h3 class='title'
><a name='httpMD5Final'
>httpMD5Final()
</a></h3>
2191 <h4>Description
</h4>
2192 <p>Combine the MD5 sum of the username, group, and password
2193 with the server-supplied nonce value, method, and
2197 <a href='#char'
>char
</a> *
2199 const
<a href='#char'
>char
</a> * nonce,
2200 const
<a href='#char'
>char
</a> * method,
2201 const
<a href='#char'
>char
</a> * resource,
2202 <a href='#char'
>char
</a> md5[
33]);
2205 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2206 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2208 <tr><td><tt>nonce
</tt></td><td>Server nonce value
</td></tr>
2209 <tr><td><tt>method
</tt></td><td>METHOD (GET, POST, etc.)
</td></tr>
2210 <tr><td><tt>resource
</tt></td><td>Resource path
</td></tr>
2211 <tr><td><tt>md5[
33]
</tt></td><td>MD5 sum
</td></tr>
2212 </tbody></table></div>
2216 <h3 class='title'
><a name='httpMD5String'
>httpMD5String()
</a></h3>
2217 <h4>Description
</h4>
2218 <p>Convert an MD5 sum to a character string.
</p>
2221 <a href='#char'
>char
</a> *
2223 const unsigned
<a href='#char'
>char
</a> * sum,
2224 <a href='#char'
>char
</a> md5[
33]);
2227 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2228 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2230 <tr><td><tt>sum
</tt></td><td>MD5 sum data
</td></tr>
2231 <tr><td><tt>md5[
33]
</tt></td><td>MD5 sum in hex
</td></tr>
2232 </tbody></table></div>
2234 <p>MD5 sum in hex
</p>
2236 <h3 class='title'
><a name='httpOptions'
>httpOptions()
</a></h3>
2237 <h4>Description
</h4>
2238 <p>Send an OPTIONS request to the server.
</p>
2243 <a href='#http_t'
>http_t
</a> * http,
2244 const
<a href='#char'
>char
</a> * uri);
2247 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2248 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2250 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
2251 <tr><td><tt>uri
</tt></td><td>URI for options
</td></tr>
2252 </tbody></table></div>
2254 <p>Status of call (
0 = success)
</p>
2256 <h3 class='title'
><a name='httpPost'
>httpPost()
</a></h3>
2257 <h4>Description
</h4>
2258 <p>Send a POST request to the server.
</p>
2263 <a href='#http_t'
>http_t
</a> * http,
2264 const
<a href='#char'
>char
</a> * uri);
2267 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2268 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2270 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
2271 <tr><td><tt>uri
</tt></td><td>URI for post
</td></tr>
2272 </tbody></table></div>
2274 <p>Status of call (
0 = success)
</p>
2276 <h3 class='title'
><a name='httpPrintf'
>httpPrintf()
</a></h3>
2277 <h4>Description
</h4>
2278 <p>Print a formatted string to a HTTP connection.
</p>
2283 <a href='#http_t'
>http_t
</a> * http,
2284 const
<a href='#char'
>char
</a> * format,
2288 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2289 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2291 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
2292 <tr><td><tt>format
</tt></td><td>printf-style format string
</td></tr>
2293 <tr><td><tt>...
</tt></td><td>Additional args as needed
</td></tr>
2294 </tbody></table></div>
2296 <p>Number of bytes written
</p>
2298 <h3 class='title'
><a name='httpPut'
>httpPut()
</a></h3>
2299 <h4>Description
</h4>
2300 <p>Send a PUT request to the server.
</p>
2305 <a href='#http_t'
>http_t
</a> * http,
2306 const
<a href='#char'
>char
</a> * uri);
2309 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2310 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2312 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
2313 <tr><td><tt>uri
</tt></td><td>URI to put
</td></tr>
2314 </tbody></table></div>
2316 <p>Status of call (
0 = success)
</p>
2318 <h3 class='title'
><a name='httpRead'
>httpRead()
</a></h3>
2319 <h4>Description
</h4>
2320 <p>Read data from a HTTP connection.
</p>
2325 <a href='#http_t'
>http_t
</a> * http,
2326 <a href='#char'
>char
</a> * buffer,
2330 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2331 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2333 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
2334 <tr><td><tt>buffer
</tt></td><td>Buffer for data
</td></tr>
2335 <tr><td><tt>length
</tt></td><td>Maximum number of bytes
</td></tr>
2336 </tbody></table></div>
2338 <p>Number of bytes read
</p>
2340 <h3 class='title'
><a name='httpReconnect'
>httpReconnect()
</a></h3>
2341 <h4>Description
</h4>
2342 <p>Reconnect to a HTTP server...
</p>
2347 <a href='#http_t'
>http_t
</a> * http);
2350 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2351 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2353 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
2354 </tbody></table></div>
2356 <p>0 on success, non-zero on failure
</p>
2358 <h3 class='title'
><a name='httpSeparate'
>httpSeparate()
</a></h3>
2359 <h4>Description
</h4>
2360 <p>Separate a Universal Resource Identifier into its
2366 const
<a href='#char'
>char
</a> * uri,
2367 <a href='#char'
>char
</a> * scheme,
2368 <a href='#char'
>char
</a> * username,
2369 <a href='#char'
>char
</a> * host,
2371 <a href='#char'
>char
</a> * resource);
2374 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2375 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2377 <tr><td><tt>uri
</tt></td><td>Universal Resource Identifier
</td></tr>
2378 <tr><td><tt>scheme
</tt></td><td>Scheme [
32] (http, https, etc.)
</td></tr>
2379 <tr><td><tt>username
</tt></td><td>Username [
1024]
</td></tr>
2380 <tr><td><tt>host
</tt></td><td>Hostname [
1024]
</td></tr>
2381 <tr><td><tt>port
</tt></td><td>Port number to use
</td></tr>
2382 <tr><td><tt>resource
</tt></td><td>Resource/filename [
1024]
</td></tr>
2383 </tbody></table></div>
2387 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='httpSeparate2'
>httpSeparate2()
</a></h3>
2388 <h4>Description
</h4>
2389 <p>Separate a Universal Resource Identifier into its
2397 const
<a href='#char'
>char
</a> * uri,
2398 <a href='#char'
>char
</a> * scheme,
2400 <a href='#char'
>char
</a> * username,
2402 <a href='#char'
>char
</a> * host,
2405 <a href='#char'
>char
</a> * resource,
2409 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2410 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2412 <tr><td><tt>uri
</tt></td><td>Universal Resource Identifier
</td></tr>
2413 <tr><td><tt>scheme
</tt></td><td>Scheme (http, https, etc.)
</td></tr>
2414 <tr><td><tt>schemelen
</tt></td><td>Size of scheme buffer
</td></tr>
2415 <tr><td><tt>username
</tt></td><td>Username
</td></tr>
2416 <tr><td><tt>usernamelen
</tt></td><td>Size of username buffer
</td></tr>
2417 <tr><td><tt>host
</tt></td><td>Hostname
</td></tr>
2418 <tr><td><tt>hostlen
</tt></td><td>Size of hostname buffer
</td></tr>
2419 <tr><td><tt>port
</tt></td><td>Port number to use
</td></tr>
2420 <tr><td><tt>resource
</tt></td><td>Resource/filename
</td></tr>
2421 <tr><td><tt>resourcelen
</tt></td><td>Size of resource buffer
</td></tr>
2422 </tbody></table></div>
2426 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpSeparateURI'
>httpSeparateURI()
</a></h3>
2427 <h4>Description
</h4>
2428 <p>Separate a Universal Resource Identifier into its
2436 const
<a href='#char'
>char
</a> * uri,
2437 <a href='#char'
>char
</a> * scheme,
2439 <a href='#char'
>char
</a> * username,
2441 <a href='#char'
>char
</a> * host,
2444 <a href='#char'
>char
</a> * resource,
2448 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2449 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2451 <tr><td><tt>uri
</tt></td><td>Universal Resource Identifier
</td></tr>
2452 <tr><td><tt>scheme
</tt></td><td>Scheme (http, https, etc.)
</td></tr>
2453 <tr><td><tt>schemelen
</tt></td><td>Size of scheme buffer
</td></tr>
2454 <tr><td><tt>username
</tt></td><td>Username
</td></tr>
2455 <tr><td><tt>usernamelen
</tt></td><td>Size of username buffer
</td></tr>
2456 <tr><td><tt>host
</tt></td><td>Hostname
</td></tr>
2457 <tr><td><tt>hostlen
</tt></td><td>Size of hostname buffer
</td></tr>
2458 <tr><td><tt>port
</tt></td><td>Port number to use
</td></tr>
2459 <tr><td><tt>resource
</tt></td><td>Resource/filename
</td></tr>
2460 <tr><td><tt>resourcelen
</tt></td><td>Size of resource buffer
</td></tr>
2461 </tbody></table></div>
2463 <p>Result of separation
</p>
2465 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='httpSetCookie'
>httpSetCookie()
</a></h3>
2466 <h4>Description
</h4>
2467 <p>Set the cookie value(s)...
2474 <a href='#http_t'
>http_t
</a> * http,
2475 const
<a href='#char'
>char
</a> * cookie);
2478 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2479 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2481 <tr><td><tt>http
</tt></td><td>Connection
</td></tr>
2482 <tr><td><tt>cookie
</tt></td><td>Cookie string
</td></tr>
2483 </tbody></table></div>
2487 <h3 class='title'
><a name='httpSetField'
>httpSetField()
</a></h3>
2488 <h4>Description
</h4>
2489 <p>Set the value of an HTTP header.
</p>
2494 <a href='#http_t'
>http_t
</a> * http,
2496 const
<a href='#char'
>char
</a> * value);
2499 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2500 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2502 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
2503 <tr><td><tt>field
</tt></td><td>Field index
</td></tr>
2504 <tr><td><tt>value
</tt></td><td>Value
</td></tr>
2505 </tbody></table></div>
2509 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpSetLength'
>httpSetLength()
</a></h3>
2510 <h4>Description
</h4>
2511 <p>Set the content-length and content-encoding.
2518 <a href='#http_t'
>http_t
</a> * http,
2522 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2523 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2525 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
2526 <tr><td><tt>length
</tt></td><td>Length (
0 for chunked)
</td></tr>
2527 </tbody></table></div>
2531 <h3 class='title'
><a name='httpStatus'
>httpStatus()
</a></h3>
2532 <h4>Description
</h4>
2533 <p>Return a short string describing a HTTP status code.
</p>
2536 const
<a href='#char'
>char
</a> *
2538 http_status_t status);
2541 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2542 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2544 <tr><td><tt>status
</tt></td><td>HTTP status code
</td></tr>
2545 </tbody></table></div>
2547 <p>String or NULL
</p>
2549 <h3 class='title'
><a name='httpTrace'
>httpTrace()
</a></h3>
2550 <h4>Description
</h4>
2551 <p>Send an TRACE request to the server.
</p>
2556 <a href='#http_t'
>http_t
</a> * http,
2557 const
<a href='#char'
>char
</a> * uri);
2560 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2561 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2563 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
2564 <tr><td><tt>uri
</tt></td><td>URI for trace
</td></tr>
2565 </tbody></table></div>
2567 <p>Status of call (
0 = success)
</p>
2569 <h3 class='title'
><a name='httpUpdate'
>httpUpdate()
</a></h3>
2570 <h4>Description
</h4>
2571 <p>Update the current HTTP state for incoming data.
</p>
2576 <a href='#http_t'
>http_t
</a> * http);
2579 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2580 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2582 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
2583 </tbody></table></div>
2587 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='httpWait'
>httpWait()
</a></h3>
2588 <h4>Description
</h4>
2589 <p>Wait for data available on a connection.
2596 <a href='#http_t'
>http_t
</a> * http,
2600 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2601 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2603 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
2604 <tr><td><tt>msec
</tt></td><td>Milliseconds to wait
</td></tr>
2605 </tbody></table></div>
2607 <p>1 if data is available,
0 otherwise
</p>
2609 <h3 class='title'
><a name='httpWrite'
>httpWrite()
</a></h3>
2610 <h4>Description
</h4>
2611 <p>Write data to a HTTP connection.
</p>
2616 <a href='#http_t'
>http_t
</a> * http,
2617 const
<a href='#char'
>char
</a> * buffer,
2621 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2622 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2624 <tr><td><tt>http
</tt></td><td>HTTP data
</td></tr>
2625 <tr><td><tt>buffer
</tt></td><td>Buffer for data
</td></tr>
2626 <tr><td><tt>length
</tt></td><td>Number of bytes to write
</td></tr>
2627 </tbody></table></div>
2629 <p>Number of bytes written
</p>
2631 <h3 class='title'
><a name='ippAddBoolean'
>ippAddBoolean()
</a></h3>
2632 <h4>Description
</h4>
2633 <p>Add a boolean attribute to an IPP request.
</p>
2636 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2638 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2640 const
<a href='#char'
>char
</a> * name,
2641 <a href='#char'
>char
</a> value);
2644 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2645 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2647 <tr><td><tt>ipp
</tt></td><td>IPP request
</td></tr>
2648 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2649 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2650 <tr><td><tt>value
</tt></td><td>Value of attribute
</td></tr>
2651 </tbody></table></div>
2653 <p>New attribute
</p>
2655 <h3 class='title'
><a name='ippAddBooleans'
>ippAddBooleans()
</a></h3>
2656 <h4>Description
</h4>
2657 <p>Add an array of boolean values.
</p>
2660 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2662 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2664 const
<a href='#char'
>char
</a> * name,
2666 const
<a href='#char'
>char
</a> * values);
2669 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2670 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2672 <tr><td><tt>ipp
</tt></td><td>IPP request
</td></tr>
2673 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2674 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2675 <tr><td><tt>num_values
</tt></td><td>Number of values
</td></tr>
2676 <tr><td><tt>values
</tt></td><td>Values
</td></tr>
2677 </tbody></table></div>
2679 <p>New attribute
</p>
2681 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ippAddCollection'
>ippAddCollection()
</a></h3>
2682 <h4>Description
</h4>
2683 <p>Add a collection value.
2688 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2690 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2692 const
<a href='#char'
>char
</a> * name,
2693 <a href='#ipp_t'
>ipp_t
</a> * value);
2696 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2697 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2699 <tr><td><tt>ipp
</tt></td><td>IPP request
</td></tr>
2700 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2701 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2702 <tr><td><tt>value
</tt></td><td>Value
</td></tr>
2703 </tbody></table></div>
2705 <p>New attribute
</p>
2707 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ippAddCollections'
>ippAddCollections()
</a></h3>
2708 <h4>Description
</h4>
2709 <p>Add an array of collection values.
2714 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2716 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2718 const
<a href='#char'
>char
</a> * name,
2720 const
<a href='#ipp_t'
>ipp_t
</a> ** values);
2723 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2724 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2726 <tr><td><tt>ipp
</tt></td><td>IPP request
</td></tr>
2727 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2728 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2729 <tr><td><tt>num_values
</tt></td><td>Number of values
</td></tr>
2730 <tr><td><tt>values
</tt></td><td>Values
</td></tr>
2731 </tbody></table></div>
2733 <p>New attribute
</p>
2735 <h3 class='title'
><a name='ippAddDate'
>ippAddDate()
</a></h3>
2736 <h4>Description
</h4>
2737 <p>Add a date attribute to an IPP request.
</p>
2740 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2742 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2744 const
<a href='#char'
>char
</a> * name,
2745 const
<a href='#ipp_uchar_t'
>ipp_uchar_t
</a> * value);
2748 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2749 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2751 <tr><td><tt>ipp
</tt></td><td>IPP request
</td></tr>
2752 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2753 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2754 <tr><td><tt>value
</tt></td><td>Value
</td></tr>
2755 </tbody></table></div>
2757 <p>New attribute
</p>
2759 <h3 class='title'
><a name='ippAddInteger'
>ippAddInteger()
</a></h3>
2760 <h4>Description
</h4>
2761 <p>Add a integer attribute to an IPP request.
</p>
2764 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2766 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2769 const
<a href='#char'
>char
</a> * name,
2773 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2774 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2776 <tr><td><tt>ipp
</tt></td><td>IPP request
</td></tr>
2777 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2778 <tr><td><tt>type
</tt></td><td>Type of attribute
</td></tr>
2779 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2780 <tr><td><tt>value
</tt></td><td>Value of attribute
</td></tr>
2781 </tbody></table></div>
2783 <p>New attribute
</p>
2785 <h3 class='title'
><a name='ippAddIntegers'
>ippAddIntegers()
</a></h3>
2786 <h4>Description
</h4>
2787 <p>Add an array of integer values.
</p>
2790 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2792 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2795 const
<a href='#char'
>char
</a> * name,
2797 const int * values);
2800 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2801 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2803 <tr><td><tt>ipp
</tt></td><td>IPP request
</td></tr>
2804 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2805 <tr><td><tt>type
</tt></td><td>Type of attribute
</td></tr>
2806 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2807 <tr><td><tt>num_values
</tt></td><td>Number of values
</td></tr>
2808 <tr><td><tt>values
</tt></td><td>Values
</td></tr>
2809 </tbody></table></div>
2811 <p>New attribute
</p>
2813 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ippAddOctetString'
>ippAddOctetString()
</a></h3>
2814 <h4>Description
</h4>
2815 <p>Add an octetString value to an IPP request.
2820 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2822 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2824 const
<a href='#char'
>char
</a> * name,
2829 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2830 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2832 <tr><td><tt>ipp
</tt></td><td>IPP request
</td></tr>
2833 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2834 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2835 <tr><td><tt>data
</tt></td><td>octetString data
</td></tr>
2836 <tr><td><tt>datalen
</tt></td><td>Length of data in bytes
</td></tr>
2837 </tbody></table></div>
2839 <p>New attribute
</p>
2841 <h3 class='title'
><a name='ippAddRange'
>ippAddRange()
</a></h3>
2842 <h4>Description
</h4>
2843 <p>Add a range of values to an IPP request.
</p>
2846 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2848 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2850 const
<a href='#char'
>char
</a> * name,
2855 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2856 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2858 <tr><td><tt>ipp
</tt></td><td>IPP request
</td></tr>
2859 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2860 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2861 <tr><td><tt>lower
</tt></td><td>Lower value
</td></tr>
2862 <tr><td><tt>upper
</tt></td><td>Upper value
</td></tr>
2863 </tbody></table></div>
2865 <p>New attribute
</p>
2867 <h3 class='title'
><a name='ippAddRanges'
>ippAddRanges()
</a></h3>
2868 <h4>Description
</h4>
2869 <p>Add ranges of values to an IPP request.
</p>
2872 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2874 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2876 const
<a href='#char'
>char
</a> * name,
2882 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2883 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2885 <tr><td><tt>ipp
</tt></td><td>IPP request
</td></tr>
2886 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2887 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2888 <tr><td><tt>num_values
</tt></td><td>Number of values
</td></tr>
2889 <tr><td><tt>lower
</tt></td><td>Lower values
</td></tr>
2890 <tr><td><tt>upper
</tt></td><td>Upper values
</td></tr>
2891 </tbody></table></div>
2893 <p>New attribute
</p>
2895 <h3 class='title'
><a name='ippAddResolution'
>ippAddResolution()
</a></h3>
2896 <h4>Description
</h4>
2897 <p>Add a resolution value to an IPP request.
</p>
2900 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2902 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2904 const
<a href='#char'
>char
</a> * name,
2910 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2911 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2913 <tr><td><tt>ipp
</tt></td><td>IPP request
</td></tr>
2914 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2915 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2916 <tr><td><tt>units
</tt></td><td>Units for resolution
</td></tr>
2917 <tr><td><tt>xres
</tt></td><td>X resolution
</td></tr>
2918 <tr><td><tt>yres
</tt></td><td>Y resolution
</td></tr>
2919 </tbody></table></div>
2921 <p>New attribute
</p>
2923 <h3 class='title'
><a name='ippAddResolutions'
>ippAddResolutions()
</a></h3>
2924 <h4>Description
</h4>
2925 <p>Add resolution values to an IPP request.
</p>
2928 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2930 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2932 const
<a href='#char'
>char
</a> * name,
2939 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2940 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2942 <tr><td><tt>ipp
</tt></td><td>IPP request
</td></tr>
2943 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2944 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2945 <tr><td><tt>num_values
</tt></td><td>Number of values
</td></tr>
2946 <tr><td><tt>units
</tt></td><td>Units for resolution
</td></tr>
2947 <tr><td><tt>xres
</tt></td><td>X resolutions
</td></tr>
2948 <tr><td><tt>yres
</tt></td><td>Y resolutions
</td></tr>
2949 </tbody></table></div>
2951 <p>New attribute
</p>
2953 <h3 class='title'
><a name='ippAddSeparator'
>ippAddSeparator()
</a></h3>
2954 <h4>Description
</h4>
2955 <p>Add a group separator to an IPP request.
</p>
2958 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2960 <a href='#ipp_t'
>ipp_t
</a> * ipp);
2963 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2964 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2966 <tr><td><tt>ipp
</tt></td><td>IPP request
</td></tr>
2967 </tbody></table></div>
2969 <p>New attribute
</p>
2971 <h3 class='title'
><a name='ippAddString'
>ippAddString()
</a></h3>
2972 <h4>Description
</h4>
2973 <p>Add a language-encoded string to an IPP request.
</p>
2976 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2978 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2981 const
<a href='#char'
>char
</a> * name,
2982 const
<a href='#char'
>char
</a> * charset,
2983 const
<a href='#char'
>char
</a> * value);
2986 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2987 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2989 <tr><td><tt>ipp
</tt></td><td>IPP request
</td></tr>
2990 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2991 <tr><td><tt>type
</tt></td><td>Type of attribute
</td></tr>
2992 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2993 <tr><td><tt>charset
</tt></td><td>Character set
</td></tr>
2994 <tr><td><tt>value
</tt></td><td>Value
</td></tr>
2995 </tbody></table></div>
2997 <p>New attribute
</p>
2999 <h3 class='title'
><a name='ippAddStrings'
>ippAddStrings()
</a></h3>
3000 <h4>Description
</h4>
3001 <p>Add language-encoded strings to an IPP request.
</p>
3004 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
3006 <a href='#ipp_t'
>ipp_t
</a> * ipp,
3009 const
<a href='#char'
>char
</a> * name,
3011 const
<a href='#char'
>char
</a> * charset,
3012 const
<a href='#char'
>char
</a> *const * values);
3015 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
3016 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3018 <tr><td><tt>ipp
</tt></td><td>IPP request
</td></tr>
3019 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
3020 <tr><td><tt>type
</tt></td><td>Type of attribute
</td></tr>
3021 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
3022 <tr><td><tt>num_values
</tt></td><td>Number of values
</td></tr>
3023 <tr><td><tt>charset
</tt></td><td>Character set
</td></tr>
3024 <tr><td><tt>values
</tt></td><td>Values
</td></tr>
3025 </tbody></table></div>
3027 <p>New attribute
</p>
3029 <h3 class='title'
><a name='ippDateToTime'
>ippDateToTime()
</a></h3>
3030 <h4>Description
</h4>
3031 <p>Convert from RFC
1903 Date/Time format to UNIX time
3037 const
<a href='#ipp_uchar_t'
>ipp_uchar_t
</a> * date);
3040 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
3041 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3043 <tr><td><tt>date
</tt></td><td>RFC
1903 date info
</td></tr>
3044 </tbody></table></div>
3046 <p>UNIX time value
</p>
3048 <h3 class='title'
><a name='ippDelete'
>ippDelete()
</a></h3>
3049 <h4>Description
</h4>
3050 <p>Delete an IPP request.
</p>
3055 <a href='#ipp_t'
>ipp_t
</a> * ipp);
3058 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
3059 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3061 <tr><td><tt>ipp
</tt></td><td>IPP request
</td></tr>
3062 </tbody></table></div>
3066 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ippDeleteAttribute'
>ippDeleteAttribute()
</a></h3>
3067 <h4>Description
</h4>
3068 <p>Delete a single attribute in an IPP request.
3075 <a href='#ipp_t'
>ipp_t
</a> * ipp,
3076 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> * attr);
3079 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
3080 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3082 <tr><td><tt>ipp
</tt></td><td>IPP request
</td></tr>
3083 <tr><td><tt>attr
</tt></td><td>Attribute to delete
</td></tr>
3084 </tbody></table></div>
3088 <h3 class='title'
><a name='ippErrorString'
>ippErrorString()
</a></h3>
3089 <h4>Description
</h4>
3090 <p>Return a name for the given status code.
</p>
3093 const
<a href='#char'
>char
</a> *
3095 ipp_status_t error);
3098 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
3099 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3101 <tr><td><tt>error
</tt></td><td>Error status
</td></tr>
3102 </tbody></table></div>
3106 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ippErrorValue'
>ippErrorValue()
</a></h3>
3107 <h4>Description
</h4>
3108 <p>Return a status code for the given name.
3115 const
<a href='#char'
>char
</a> * name);
3118 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
3119 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3121 <tr><td><tt>name
</tt></td><td>Name
</td></tr>
3122 </tbody></table></div>
3124 <p>IPP status code
</p>
3126 <h3 class='title'
><a name='ippFindAttribute'
>ippFindAttribute()
</a></h3>
3127 <h4>Description
</h4>
3128 <p>Find a named attribute in a request...
</p>
3131 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
3133 <a href='#ipp_t'
>ipp_t
</a> * ipp,
3134 const
<a href='#char'
>char
</a> * name,
3138 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
3139 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3141 <tr><td><tt>ipp
</tt></td><td>IPP request
</td></tr>
3142 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
3143 <tr><td><tt>type
</tt></td><td>Type of attribute
</td></tr>
3144 </tbody></table></div>
3146 <p>Matching attribute
</p>
3148 <h3 class='title'
><a name='ippFindNextAttribute'
>ippFindNextAttribute()
</a></h3>
3149 <h4>Description
</h4>
3150 <p>Find the next named attribute in a request...
</p>
3153 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
3154 ippFindNextAttribute(
3155 <a href='#ipp_t'
>ipp_t
</a> * ipp,
3156 const
<a href='#char'
>char
</a> * name,
3160 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
3161 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3163 <tr><td><tt>ipp
</tt></td><td>IPP request
</td></tr>
3164 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
3165 <tr><td><tt>type
</tt></td><td>Type of attribute
</td></tr>
3166 </tbody></table></div>
3168 <p>Matching attribute
</p>
3170 <h3 class='title'
><a name='ippLength'
>ippLength()
</a></h3>
3171 <h4>Description
</h4>
3172 <p>Compute the length of an IPP request.
</p>
3177 <a href='#ipp_t'
>ipp_t
</a> * ipp);
3180 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
3181 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3183 <tr><td><tt>ipp
</tt></td><td>IPP request
</td></tr>
3184 </tbody></table></div>
3186 <p>Size of IPP request
</p>
3188 <h3 class='title'
><a name='ippNew'
>ippNew()
</a></h3>
3189 <h4>Description
</h4>
3190 <p>Allocate a new IPP request.
</p>
3193 <a href='#ipp_t'
>ipp_t
</a> *
3199 <p>New IPP request
</p>
3201 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ippOpString'
>ippOpString()
</a></h3>
3202 <h4>Description
</h4>
3203 <p>Return a name for the given operation id.
3208 const
<a href='#char'
>char
</a> *
3213 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
3214 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3216 <tr><td><tt>op
</tt></td><td>Operation ID
</td></tr>
3217 </tbody></table></div>
3221 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ippOpValue'
>ippOpValue()
</a></h3>
3222 <h4>Description
</h4>
3223 <p>Return an operation id for the given name.
3230 const
<a href='#char'
>char
</a> * name);
3233 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
3234 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3236 <tr><td><tt>name
</tt></td><td>Textual name
</td></tr>
3237 </tbody></table></div>
3241 <h3 class='title'
><a name='ippPort'
>ippPort()
</a></h3>
3242 <h4>Description
</h4>
3243 <p>Return the default IPP port number.
</p>
3254 <h3 class='title'
><a name='ippRead'
>ippRead()
</a></h3>
3255 <h4>Description
</h4>
3256 <p>Read data for an IPP request from a HTTP connection.
</p>
3261 <a href='#http_t'
>http_t
</a> * http,
3262 <a href='#ipp_t'
>ipp_t
</a> * ipp);
3265 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
3266 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3268 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
3269 <tr><td><tt>ipp
</tt></td><td>IPP data
</td></tr>
3270 </tbody></table></div>
3272 <p>Current state
</p>
3274 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ippReadFile'
>ippReadFile()
</a></h3>
3275 <h4>Description
</h4>
3276 <p>Read data for an IPP request from a file.
3284 <a href='#ipp_t'
>ipp_t
</a> * ipp);
3287 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
3288 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3290 <tr><td><tt>fd
</tt></td><td>HTTP data
</td></tr>
3291 <tr><td><tt>ipp
</tt></td><td>IPP data
</td></tr>
3292 </tbody></table></div>
3294 <p>Current state
</p>
3296 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ippReadIO'
>ippReadIO()
</a></h3>
3297 <h4>Description
</h4>
3298 <p>Read data for an IPP request.
3306 <a href='#ipp_iocb_t'
>ipp_iocb_t
</a> cb,
3308 <a href='#ipp_t'
>ipp_t
</a> * parent,
3309 <a href='#ipp_t'
>ipp_t
</a> * ipp);
3312 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
3313 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3315 <tr><td><tt>src
</tt></td><td>Data source
</td></tr>
3316 <tr><td><tt>cb
</tt></td><td>Read callback function
</td></tr>
3317 <tr><td><tt>blocking
</tt></td><td>Use blocking IO?
</td></tr>
3318 <tr><td><tt>parent
</tt></td><td>Parent request, if any
</td></tr>
3319 <tr><td><tt>ipp
</tt></td><td>IPP data
</td></tr>
3320 </tbody></table></div>
3322 <p>Current state
</p>
3324 <h3 class='title'
><a name='ippSetPort'
>ippSetPort()
</a></h3>
3325 <h4>Description
</h4>
3326 <p>Set the default port number.
</p>
3334 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
3335 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3337 <tr><td><tt>p
</tt></td><td>Port number to use
</td></tr>
3338 </tbody></table></div>
3342 <h3 class='title'
><a name='ippTimeToDate'
>ippTimeToDate()
</a></h3>
3343 <h4>Description
</h4>
3344 <p>Convert from UNIX time to RFC
1903 format.
</p>
3347 const
<a href='#ipp_uchar_t'
>ipp_uchar_t
</a> *
3352 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
3353 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3355 <tr><td><tt>t
</tt></td><td>UNIX time value
</td></tr>
3356 </tbody></table></div>
3358 <p>RFC-
1903 date/time data
</p>
3360 <h3 class='title'
><a name='ippWrite'
>ippWrite()
</a></h3>
3361 <h4>Description
</h4>
3362 <p>Write data for an IPP request to a HTTP connection.
</p>
3367 <a href='#http_t'
>http_t
</a> * http,
3368 <a href='#ipp_t'
>ipp_t
</a> * ipp);
3371 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
3372 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3374 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
3375 <tr><td><tt>ipp
</tt></td><td>IPP data
</td></tr>
3376 </tbody></table></div>
3378 <p>Current state
</p>
3380 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ippWriteFile'
>ippWriteFile()
</a></h3>
3381 <h4>Description
</h4>
3382 <p>Write data for an IPP request to a file.
3390 <a href='#ipp_t'
>ipp_t
</a> * ipp);
3393 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
3394 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3396 <tr><td><tt>fd
</tt></td><td>HTTP data
</td></tr>
3397 <tr><td><tt>ipp
</tt></td><td>IPP data
</td></tr>
3398 </tbody></table></div>
3400 <p>Current state
</p>
3402 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ippWriteIO'
>ippWriteIO()
</a></h3>
3403 <h4>Description
</h4>
3404 <p>Write data for an IPP request.
3412 <a href='#ipp_iocb_t'
>ipp_iocb_t
</a> cb,
3414 <a href='#ipp_t'
>ipp_t
</a> * parent,
3415 <a href='#ipp_t'
>ipp_t
</a> * ipp);
3418 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
3419 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3421 <tr><td><tt>dst
</tt></td><td>Destination
</td></tr>
3422 <tr><td><tt>cb
</tt></td><td>Write callback function
</td></tr>
3423 <tr><td><tt>blocking
</tt></td><td>Use blocking IO?
</td></tr>
3424 <tr><td><tt>parent
</tt></td><td>Parent IPP request
</td></tr>
3425 <tr><td><tt>ipp
</tt></td><td>IPP data
</td></tr>
3426 </tbody></table></div>
3428 <p>Current state
</p>
3430 <h2 class='title'
><a name='STRUCTURES'
>Structures
</a></h2>
3432 <li><a href='#cups_dest_s'
><tt>cups_dest_s
</tt></a> </li>
3433 <li><a href='#cups_job_s'
><tt>cups_job_s
</tt></a> </li>
3434 <li><a href='#cups_option_s'
><tt>cups_option_s
</tt></a> </li>
3435 <li><a href='#http_addrlist_s'
><tt>http_addrlist_s
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
3436 <li><a href='#http_s'
><tt>http_s
</tt></a> </li>
3437 <li><a href='#ipp_attribute_s'
><tt>ipp_attribute_s
</tt></a> </li>
3438 <li><a href='#ipp_str'
><tt>ipp_str
</tt></a> </li>
3441 <h3 class='title'
><a name='cups_dest_s'
>cups_dest_s
</a></h3>
3442 <h4>Description
</h4>
3448 <a href='#char'
>char
</a> *name, * instance;
3451 <a href='#cups_option_t'
>cups_option_t
</a> * options;
3455 <div class='table'
><table align='center' border='
1' width='
80%'
>
3456 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3458 <tr><td><tt>instance
</tt> </td><td>Local instance name or NULL
</td></tr>
3459 <tr><td><tt>is_default
</tt> </td><td>Is this printer the default?
</td></tr>
3460 <tr><td><tt>num_options
</tt> </td><td>Number of options
</td></tr>
3461 <tr><td><tt>options
</tt> </td><td>Options
</td></tr>
3462 </tbody></table></div>
3464 <h3 class='title'
><a name='cups_job_s'
>cups_job_s
</a></h3>
3465 <h4>Description
</h4>
3471 <a href='#char'
>char
</a> *dest, *title, *user, * format;
3474 time_t completed_time, creation_time, processing_time;
3479 <div class='table'
><table align='center' border='
1' width='
80%'
>
3480 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3482 <tr><td><tt>format
</tt> </td><td>Document format
</td></tr>
3483 <tr><td><tt>id
</tt> </td><td>The job ID
</td></tr>
3484 <tr><td><tt>priority
</tt> </td><td>Priority (
1-
100)
</td></tr>
3485 <tr><td><tt>processing_time
</tt> </td><td>Time the job was processed
</td></tr>
3486 <tr><td><tt>state
</tt> </td><td>Job state
</td></tr>
3487 </tbody></table></div>
3489 <h3 class='title'
><a name='cups_option_s'
>cups_option_s
</a></h3>
3490 <h4>Description
</h4>
3491 <p>Types and structures...
</p>
3494 struct cups_option_s
3496 <a href='#char'
>char
</a> * name;
3497 <a href='#char'
>char
</a> * value;
3501 <div class='table'
><table align='center' border='
1' width='
80%'
>
3502 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3504 <tr><td><tt>name
</tt> </td><td>Name of option
</td></tr>
3505 <tr><td><tt>value
</tt> </td><td>Value of option
</td></tr>
3506 </tbody></table></div>
3508 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='http_addrlist_s'
>http_addrlist_s
</a></h3>
3509 <h4>Description
</h4>
3510 <p>Socket address list, which is
3511 used to enumerate all of the
3512 addresses that are associated
3513 with a hostname.
</p>
3516 struct http_addrlist_s
3518 <a href='#http_addr_t'
>http_addr_t
</a> addr;
3519 struct
<a href='#http_addrlist_s'
>http_addrlist_s
</a> * next;
3523 <div class='table'
><table align='center' border='
1' width='
80%'
>
3524 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3526 <tr><td><tt>addr
</tt> </td><td>Address
</td></tr>
3527 <tr><td><tt>next
</tt> </td><td>Pointer to next address in list
</td></tr>
3528 </tbody></table></div>
3530 <h3 class='title'
><a name='http_s'
>http_s
</a></h3>
3531 <h4>Description
</h4>
3532 <p>HTTP connection structure.
</p>
3538 <a href='#http_addrlist_t'
>http_addrlist_t
</a> * addrlist;
3541 <a href='#char'
>char
</a> buffer[HTTP_MAX_BUFFER];
3542 <a href='#char'
>char
</a> * cookie;
3543 <a href='#char'
>char
</a> * data;
3544 <a href='#http_encoding_t'
>http_encoding_t
</a> data_encoding;
3545 off_t data_remaining;
3547 <a href='#http_encryption_t'
>http_encryption_t
</a> encryption;
3549 http_status_t expect;
3551 <a href='#char'
>char
</a> hostname[HTTP_MAX_HOST], fields[HTTP_FIELD_MAX][HTTP_MAX_VALUE];
3552 <a href='#http_addr_t'
>http_addr_t
</a> * hostaddr;
3554 http_keepalive_t keep_alive;
3555 _cups_md5_state_t md5_state;
3556 <a href='#char'
>char
</a> nonce[HTTP_MAX_VALUE];
3558 <a href='#http_state_t'
>http_state_t
</a> state;
3559 http_status_t status;
3562 <a href='#char'
>char
</a> authstring[HTTP_MAX_VALUE], userpass[HTTP_MAX_VALUE];
3563 http_version_t version;
3564 <a href='#char'
>char
</a> wbuffer[HTTP_MAX_BUFFER];
3569 <div class='table'
><table align='center' border='
1' width='
80%'
>
3570 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3572 <tr><td><tt>activity
</tt> </td><td>Time since last read/write
</td></tr>
3573 <tr><td><tt>addrlist
</tt> <span class='info'
> CUPS
1.2 </span></td><td>List of valid addresses
</td></tr>
3574 <tr><td><tt>auth_type
</tt> </td><td>Authentication in use
</td></tr>
3575 <tr><td><tt>blocking
</tt> </td><td>To block or not to block
</td></tr>
3576 <tr><td><tt>buffer[HTTP_MAX_BUFFER]
</tt> </td><td>Buffer for incoming data
</td></tr>
3577 <tr><td><tt>cookie
</tt> <span class='info'
> CUPS
1.1.19 </span></td><td>Cookie value(s)
</td></tr>
3578 <tr><td><tt>data
</tt> </td><td>Pointer to data buffer
</td></tr>
3579 <tr><td><tt>data_encoding
</tt> </td><td>Chunked or not
</td></tr>
3580 <tr><td><tt>data_remaining
</tt> <span class='info'
> CUPS
1.2 </span></td><td>Number of bytes left
</td></tr>
3581 <tr><td><tt>digest_tries
</tt> <span class='info'
> CUPS
1.1.20 </span></td><td>Number of tries for digest auth
</td></tr>
3582 <tr><td><tt>encryption
</tt> </td><td>Encryption requirements
</td></tr>
3583 <tr><td><tt>error
</tt> </td><td>Last error on read
</td></tr>
3584 <tr><td><tt>expect
</tt> <span class='info'
> CUPS
1.1.19 </span></td><td>Expect: header
</td></tr>
3585 <tr><td><tt>fd
</tt> </td><td>File descriptor for this socket
</td></tr>
3586 <tr><td><tt>fields[HTTP_FIELD_MAX][HTTP_MAX_VALUE]
</tt> </td><td>Field values
</td></tr>
3587 <tr><td><tt>hostaddr
</tt> <span class='info'
> CUPS
1.2 </span></td><td>Current host address and port
</td></tr>
3588 <tr><td><tt>input_set
</tt> <span class='info'
> CUPS
1.1.19 </span></td><td>select() set for httpWait()
</td></tr>
3589 <tr><td><tt>keep_alive
</tt> </td><td>Keep-alive supported?
</td></tr>
3590 <tr><td><tt>md5_state
</tt> </td><td>MD5 state
</td></tr>
3591 <tr><td><tt>nonce[HTTP_MAX_VALUE]
</tt> </td><td>Nonce value
</td></tr>
3592 <tr><td><tt>nonce_count
</tt> </td><td>Nonce count
</td></tr>
3593 <tr><td><tt>state
</tt> </td><td>State of client
</td></tr>
3594 <tr><td><tt>status
</tt> </td><td>Status of last request
</td></tr>
3595 <tr><td><tt>tls
</tt> </td><td>TLS state information
</td></tr>
3596 <tr><td><tt>used
</tt> </td><td>Number of bytes used in buffer
</td></tr>
3597 <tr><td><tt>userpass[HTTP_MAX_VALUE]
</tt> <span class='info'
> CUPS
1.1.20 </span></td><td>Username:password string
</td></tr>
3598 <tr><td><tt>version
</tt> </td><td>Protocol version
</td></tr>
3599 <tr><td><tt>wbuffer[HTTP_MAX_BUFFER]
</tt> </td><td>Buffer for outgoing data
</td></tr>
3600 <tr><td><tt>wused
</tt> <span class='info'
> CUPS
1.2 </span></td><td>Write buffer bytes used
</td></tr>
3601 </tbody></table></div>
3603 <h3 class='title'
><a name='ipp_attribute_s'
>ipp_attribute_s
</a></h3>
3604 <h4>Description
</h4>
3608 struct ipp_attribute_s
3610 <a href='#char'
>char
</a> * name;
3611 struct
<a href='#ipp_attribute_s'
>ipp_attribute_s
</a> * next;
3613 ipp_tag_t group_tag, value_tag;
3614 <a href='#ipp_value_t'
>ipp_value_t
</a> values[
1];
3618 <div class='table'
><table align='center' border='
1' width='
80%'
>
3619 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3621 <tr><td><tt>name
</tt> </td><td>Name of attribute
</td></tr>
3622 <tr><td><tt>next
</tt> </td><td>Next attribute in list
</td></tr>
3623 <tr><td><tt>num_values
</tt> </td><td>Number of values
</td></tr>
3624 <tr><td><tt>value_tag
</tt> </td><td>What type of value is it?
</td></tr>
3625 <tr><td><tt>values[
1]
</tt> </td><td>Values
</td></tr>
3626 </tbody></table></div>
3628 <h3 class='title'
><a name='ipp_str'
>ipp_str
</a></h3>
3629 <h4>Description
</h4>
3630 <p>IPP Request/Response/Notification
</p>
3635 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attrs, *last, * current;
3637 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> * prev;
3638 <a href='#ipp_request_t'
>ipp_request_t
</a> request;
3643 <div class='table'
><table align='center' border='
1' width='
80%'
>
3644 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3646 <tr><td><tt>current
</tt> </td><td>Current attribute (for read/write)
</td></tr>
3647 <tr><td><tt>curtag
</tt> </td><td>Current attribute group tag
</td></tr>
3648 <tr><td><tt>prev
</tt> </td><td>Previous attribute (for read)
</td></tr>
3649 <tr><td><tt>request
</tt> </td><td>Request header
</td></tr>
3650 <tr><td><tt>state
</tt> </td><td>State of request
</td></tr>
3651 </tbody></table></div>
3653 <h2 class='title'
><a name='TYPES'
>Types
</a></h2>
3655 <li><a href='#char'
><tt>char
</tt></a> </li>
3656 <li><a href='#cups_dest_t'
><tt>cups_dest_t
</tt></a> </li>
3657 <li><a href='#cups_job_t'
><tt>cups_job_t
</tt></a> </li>
3658 <li><a href='#cups_option_t'
><tt>cups_option_t
</tt></a> </li>
3659 <li><a href='#cups_ptype_t'
><tt>cups_ptype_t
</tt></a> </li>
3660 <li><a href='#http_addrlist_t'
><tt>http_addrlist_t
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
3661 <li><a href='#http_auth_t'
><tt>http_auth_t
</tt></a> </li>
3662 <li><a href='#http_encoding_t'
><tt>http_encoding_t
</tt></a> </li>
3663 <li><a href='#http_encryption_t'
><tt>http_encryption_t
</tt></a> </li>
3664 <li><a href='#http_t'
><tt>http_t
</tt></a> </li>
3665 <li><a href='#ipp_attribute_t'
><tt>ipp_attribute_t
</tt></a> </li>
3666 <li><a href='#ipp_iocb_t'
><tt>ipp_iocb_t
</tt></a> </li>
3667 <li><a href='#ipp_request_t'
><tt>ipp_request_t
</tt></a> </li>
3668 <li><a href='#ipp_t'
><tt>ipp_t
</tt></a> </li>
3669 <li><a href='#ipp_value_t'
><tt>ipp_value_t
</tt></a> </li>
3672 <h3 class='title'
><a name='char'
>char
</a></h3>
3673 <h4>Description
</h4>
3674 <p>Printer Options
</p>
3677 typedef const * (*charcups_password_cb_t)(const
<a href='#char'
>char
</a> *);
3680 <h3 class='title'
><a name='cups_dest_t'
>cups_dest_t
</a></h3>
3681 <h4>Description
</h4>
3685 typedef struct
<a href='#cups_dest_s'
>cups_dest_s
</a> cups_dest_t;
3688 <h3 class='title'
><a name='cups_job_t'
>cups_job_t
</a></h3>
3689 <h4>Description
</h4>
3693 typedef struct
<a href='#cups_job_s'
>cups_job_s
</a> cups_job_t;
3696 <h3 class='title'
><a name='cups_option_t'
>cups_option_t
</a></h3>
3697 <h4>Description
</h4>
3698 <p>Types and structures...
</p>
3701 typedef struct
<a href='#cups_option_s'
>cups_option_s
</a> cups_option_t;
3704 <h3 class='title'
><a name='cups_ptype_t'
>cups_ptype_t
</a></h3>
3705 <h4>Description
</h4>
3706 <p>Printer Type/Capability Bits
</p>
3709 typedef unsigned cups_ptype_t;
3712 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='http_addrlist_t'
>http_addrlist_t
</a></h3>
3713 <h4>Description
</h4>
3714 <p>Socket address list, which is
3715 used to enumerate all of the
3716 addresses that are associated
3717 with a hostname.
</p>
3720 typedef struct
<a href='#http_addrlist_s'
>http_addrlist_s
</a> / http_addrlist_t;
3723 <h3 class='title'
><a name='http_auth_t'
>http_auth_t
</a></h3>
3724 <h4>Description
</h4>
3725 <p>HTTP authentication types
</p>
3728 typedef enum
<a href='#http_auth_e'
>http_auth_e
</a> http_auth_t;
3731 <h3 class='title'
><a name='http_encoding_t'
>http_encoding_t
</a></h3>
3732 <h4>Description
</h4>
3733 <p>HTTP transfer encoding values
</p>
3736 typedef enum
<a href='#http_encoding_e'
>http_encoding_e
</a> http_encoding_t;
3739 <h3 class='title'
><a name='http_encryption_t'
>http_encryption_t
</a></h3>
3740 <h4>Description
</h4>
3741 <p>HTTP encryption values
</p>
3744 typedef enum
<a href='#http_encryption_e'
>http_encryption_e
</a> http_encryption_t;
3747 <h3 class='title'
><a name='http_t'
>http_t
</a></h3>
3748 <h4>Description
</h4>
3749 <p>HTTP connection structure.
</p>
3752 typedef struct
<a href='#http_s'
>http_s
</a> http_t;
3755 <h3 class='title'
><a name='ipp_attribute_t'
>ipp_attribute_t
</a></h3>
3756 <h4>Description
</h4>
3760 typedef struct
<a href='#ipp_attribute_s'
>ipp_attribute_s
</a> ipp_attribute_t;
3763 <h3 class='title'
><a name='ipp_iocb_t'
>ipp_iocb_t
</a></h3>
3764 <h4>Description
</h4>
3765 <p>IPP IO Callback Function
</p>
3768 typedef int (*ipp_iocb_t)(void *,
<a href='#ipp_uchar_t'
>ipp_uchar_t
</a> *, int);
3771 <h3 class='title'
><a name='ipp_request_t'
>ipp_request_t
</a></h3>
3772 <h4>Description
</h4>
3773 <p>Request Header
</p>
3776 typedef union ipp_request_t;
3779 <h3 class='title'
><a name='ipp_t'
>ipp_t
</a></h3>
3780 <h4>Description
</h4>
3781 <p>Attribute Value
</p>
3784 typedef struct
<a href='#ipp_str'
>ipp_str
</a> ipp_t;
3787 <h3 class='title'
><a name='ipp_value_t'
>ipp_value_t
</a></h3>
3788 <h4>Description
</h4>
3789 <p>New in CUPS
1.1.19</p>
3792 typedef union ipp_value_t;