]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> |
2 | <html> | |
3 | <!-- SECTION: Programming --> | |
4 | <head> | |
5a738aea MS |
5 | <title>HTTP and IPP APIs</title> |
6 | <meta name="keywords" content="Programming"> | |
7 | <meta name="creator" content="Mini-XML v2.5"> | |
8 | <style type="text/css"><!-- | |
9 | BODY { | |
10 | font-family: lucida grande, geneva, helvetica, arial, sans-serif; | |
11 | } | |
12 | ||
13 | H1, H2, H3, H4, H5, H6, P, TD, TH { | |
14 | font-family: lucida grande, geneva, helvetica, arial, sans-serif; | |
15 | } | |
16 | ||
17 | KBD { | |
18 | font-family: monaco, courier, monospace; | |
19 | font-weight: bold; | |
20 | } | |
21 | ||
22 | PRE { | |
23 | font-family: monaco, courier, monospace; | |
24 | } | |
25 | ||
26 | PRE.command { | |
27 | margin-left: 36pt; | |
28 | } | |
29 | ||
e4572d57 MS |
30 | P.example { |
31 | font-style: italic; | |
32 | margin-left: 36pt; | |
33 | } | |
34 | ||
5a738aea MS |
35 | PRE.example { |
36 | background: #eeeeee; | |
37 | border: dotted thin #999999; | |
38 | margin-left: 36pt; | |
39 | padding: 10px; | |
40 | } | |
41 | ||
42 | PRE.command EM, PRE.example EM { | |
43 | font-family: lucida grande, geneva, helvetica, arial, sans-serif; | |
44 | } | |
45 | ||
46 | P.command { | |
47 | font-family: monaco, courier, monospace; | |
48 | margin-left: 36pt; | |
49 | } | |
50 | ||
51 | P.formula { | |
52 | font-style: italic; | |
53 | margin-left: 36pt; | |
54 | } | |
55 | ||
56 | BLOCKQUOTE { | |
57 | background: #cccccc; | |
58 | border: solid thin #999999; | |
59 | padding: 10pt; | |
60 | } | |
61 | ||
e4572d57 MS |
62 | A IMG { |
63 | border: none; | |
64 | } | |
65 | ||
66 | A:link:hover IMG { | |
67 | background: #f0f0f0; | |
68 | border-radius: 10px; | |
69 | -moz-border-radius: 10px; | |
70 | } | |
71 | ||
5a738aea | 72 | A:link, A:visited { |
568fa3fa | 73 | font-weight: normal; |
5a738aea | 74 | text-decoration: none; |
5a738aea MS |
75 | } |
76 | ||
77 | A:link:hover, A:visited:hover, A:active { | |
78 | text-decoration: underline; | |
5a738aea MS |
79 | } |
80 | ||
81 | SUB, SUP { | |
82 | font-size: 50%; | |
83 | } | |
84 | ||
e4572d57 MS |
85 | TR.data, TD.data, TR.data TD { |
86 | margin-top: 10pt; | |
87 | padding: 5pt; | |
88 | border-bottom: solid 1pt #999999; | |
89 | } | |
90 | ||
91 | TR.data TH { | |
92 | border-bottom: solid 1pt #999999; | |
93 | padding-top: 10pt; | |
94 | padding-left: 5pt; | |
95 | text-align: left; | |
96 | } | |
97 | ||
5a738aea MS |
98 | DIV.table TABLE { |
99 | border: solid thin #999999; | |
100 | border-collapse: collapse; | |
101 | border-spacing: 0; | |
102 | margin-left: auto; | |
103 | margin-right: auto; | |
104 | } | |
105 | ||
106 | DIV.table CAPTION { | |
107 | caption-side: top; | |
108 | font-size: 120%; | |
109 | font-style: italic; | |
110 | font-weight: bold; | |
111 | margin-left: auto; | |
112 | margin-right: auto; | |
113 | } | |
114 | ||
115 | DIV.table TABLE TD { | |
116 | border: solid thin #cccccc; | |
117 | padding-top: 5pt; | |
118 | } | |
119 | ||
120 | DIV.table TABLE TH { | |
121 | background: #cccccc; | |
122 | border: none; | |
123 | border-bottom: solid thin #999999; | |
124 | } | |
125 | ||
126 | DIV.figure TABLE { | |
127 | margin-left: auto; | |
128 | margin-right: auto; | |
129 | } | |
130 | ||
131 | DIV.figure CAPTION { | |
132 | caption-side: bottom; | |
133 | font-size: 120%; | |
134 | font-style: italic; | |
135 | font-weight: bold; | |
136 | margin-left: auto; | |
137 | margin-right: auto; | |
138 | } | |
139 | ||
140 | TH.label { | |
5a738aea MS |
141 | text-align: right; |
142 | vertical-align: top; | |
143 | } | |
144 | ||
e4572d57 MS |
145 | TH.sublabel { |
146 | text-align: right; | |
147 | font-weight: normal; | |
148 | } | |
149 | ||
5a738aea MS |
150 | HR { |
151 | border: solid thin; | |
152 | } | |
153 | ||
154 | SPAN.info { | |
e4572d57 MS |
155 | background: black; |
156 | border: thin solid black; | |
157 | color: white; | |
5a738aea MS |
158 | font-size: 80%; |
159 | font-style: italic; | |
160 | font-weight: bold; | |
161 | white-space: nowrap; | |
162 | } | |
163 | ||
164 | H2 SPAN.info, H3 SPAN.info, H4 SPAN.info { | |
165 | float: right; | |
166 | font-size: 100%; | |
167 | } | |
168 | ||
169 | H2.title, H3.title { | |
170 | border-bottom: solid 2pt #000000; | |
171 | } | |
172 | ||
e4572d57 MS |
173 | DIV.indent, TABLE.indent { |
174 | margin-top: 2em; | |
175 | margin-left: auto; | |
176 | margin-right: auto; | |
177 | width: 90%; | |
178 | } | |
179 | ||
180 | TABLE.indent { | |
181 | border-collapse: collapse; | |
182 | } | |
183 | ||
184 | TABLE.indent TD, TABLE.indent TH { | |
185 | padding: 0; | |
186 | } | |
187 | ||
188 | TABLE.list { | |
189 | border-collapse: collapse; | |
190 | margin-left: auto; | |
191 | margin-right: auto; | |
192 | width: 90%; | |
193 | } | |
194 | ||
195 | TABLE.list TH { | |
196 | background: white; | |
197 | border-bottom: solid thin #cccccc; | |
198 | color: #444444; | |
199 | padding-top: 10pt; | |
200 | padding-left: 5pt; | |
201 | text-align: left; | |
202 | vertical-align: bottom; | |
203 | white-space: nowrap; | |
204 | } | |
205 | ||
206 | TABLE.list TH A { | |
207 | color: #4444cc; | |
208 | } | |
209 | ||
210 | TABLE.list TD { | |
211 | border-bottom: solid thin #eeeeee; | |
212 | padding-top: 5pt; | |
213 | padding-left: 5pt; | |
214 | } | |
215 | ||
216 | TABLE.list TR:nth-child(even) { | |
217 | background: #f8f8f8; | |
218 | } | |
219 | ||
220 | TABLE.list TR:nth-child(odd) { | |
221 | background: #f4f4f4; | |
222 | } | |
223 | ||
5a738aea MS |
224 | DT { |
225 | margin-left: 36pt; | |
226 | margin-top: 12pt; | |
227 | } | |
228 | ||
229 | DD { | |
230 | margin-left: 54pt; | |
231 | } | |
232 | ||
233 | DL.category DT { | |
234 | font-weight: bold; | |
235 | } | |
236 | ||
237 | P.summary { | |
238 | margin-left: 36pt; | |
239 | font-family: monaco, courier, monospace; | |
240 | } | |
241 | ||
5a738aea MS |
242 | DIV.summary TABLE { |
243 | border: solid thin #999999; | |
244 | border-collapse: collapse; | |
245 | border-spacing: 0; | |
246 | margin: 10px; | |
247 | } | |
248 | ||
249 | DIV.summary TABLE TD, DIV.summary TABLE TH { | |
250 | border: solid thin #999999; | |
251 | padding: 5px; | |
252 | text-align: left; | |
253 | vertical-align: top; | |
254 | } | |
255 | ||
256 | DIV.summary TABLE THEAD TH { | |
257 | background: #eeeeee; | |
258 | } | |
259 | ||
260 | /* API documentation styles... */ | |
261 | div.body h1 { | |
262 | margin: 0; | |
263 | } | |
264 | div.body h2 { | |
265 | margin-top: 1.5em; | |
266 | } | |
267 | div.body h3, div.body h4, div.body h5 { | |
268 | margin-bottom: 0.5em; | |
269 | margin-top: 1.5em; | |
270 | } | |
271 | .class, .enumeration, .function, .struct, .typedef, .union { | |
272 | border-bottom: solid thin #999999; | |
273 | margin-bottom: 0; | |
274 | margin-top: 2em; | |
275 | } | |
276 | .description { | |
277 | margin-top: 0.5em; | |
278 | } | |
279 | code, p.code, pre, ul.code li { | |
280 | font-family: monaco, courier, monospace; | |
281 | font-size: 90%; | |
282 | } | |
283 | ul.code, ul.contents, ul.subcontents { | |
284 | list-style-type: none; | |
285 | margin: 0; | |
286 | padding-left: 0; | |
287 | } | |
288 | ul.code li { | |
289 | margin: 0; | |
290 | } | |
291 | ul.contents > li { | |
292 | margin-top: 1em; | |
293 | } | |
294 | ul.contents li ul.code, ul.contents li ul.subcontents { | |
295 | padding-left: 2em; | |
296 | } | |
297 | div.body dl { | |
298 | margin-left: 0; | |
299 | margin-top: 0; | |
300 | } | |
301 | div.body dt { | |
302 | font-style: italic; | |
303 | margin-left: 0; | |
304 | margin-top: 0; | |
305 | } | |
306 | div.body dd { | |
307 | margin-bottom: 0.5em; | |
308 | } | |
309 | ||
310 | /* This is just for the HTML files generated with the framedhelp target */ | |
311 | div.contents { | |
312 | background: #e8e8e8; | |
313 | border: solid thin black; | |
314 | padding: 10px; | |
315 | } | |
316 | div.contents h1 { | |
317 | font-size: 110%; | |
318 | } | |
319 | div.contents h2 { | |
320 | font-size: 100%; | |
321 | } | |
322 | div.contents ul.contents { | |
323 | font-size: 80%; | |
324 | } | |
ac884b6a MS |
325 | div.contents ul.subcontents li { |
326 | margin-left: 1em; | |
327 | text-indent: -1em; | |
328 | } | |
5a738aea | 329 | --></style> |
ef416fc2 | 330 | </head> |
331 | <body> | |
5a738aea | 332 | <div class='body'> |
ef416fc2 | 333 | <!-- |
5a738aea MS |
334 | "$Id: api-httpipp.header 7258 2008-01-28 00:15:05Z mike $" |
335 | ||
336 | HTTP and IPP API header for the Common UNIX Printing System (CUPS). | |
337 | ||
338 | Copyright 2007-2008 by Apple Inc. | |
339 | Copyright 1997-2006 by Easy Software Products, all rights reserved. | |
340 | ||
341 | These coded instructions, statements, and computer programs are the | |
342 | property of Apple Inc. and are protected by Federal copyright | |
343 | law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
344 | which should have been included with this file. If this file is | |
345 | file is missing or damaged, see the license at "http://www.cups.org/". | |
346 | --> | |
347 | ||
5a738aea MS |
348 | <div class='summary'><table summary='General Information'> |
349 | <thead> | |
350 | <tr> | |
351 | <th>Header</th> | |
352 | <th>cups/cups.h</th> | |
353 | </tr> | |
354 | </thead> | |
355 | <tbody> | |
356 | <tr> | |
357 | <th>Library</th> | |
358 | <td>-lcups</td> | |
359 | </tr> | |
360 | <tr> | |
361 | <th>See Also</th> | |
362 | <td>Programming: <a href='api-overview.html'>Introduction to CUPS Programming</a><br> | |
363 | Programming: <a href='api-cups.html'>CUPS API</a><br> | |
364 | References: <a href='spec-ipp.html'>CUPS Implementation of IPP</a></td> | |
365 | </tr> | |
366 | </tbody> | |
367 | </table></div> | |
368 | <h2 class="title">Contents</h2> | |
369 | <ul class="contents"> | |
370 | </li> | |
371 | <li><a href="#OVERVIEW">Overview</a><ul class="subcontents"> | |
372 | <li><a href="#CREATING_URI_STRINGS">Creating URI Strings</a></li> | |
373 | <li><a href="#SENDING_REQUESTS_WITH_FILES">Sending Requests with Files</a></li> | |
374 | <li><a href="#ASYNCHRONOUS_REQUEST_PROCESSING">Asynchronous Request Processing</a></li> | |
375 | </ul></li> | |
376 | <li><a href="#FUNCTIONS">Functions</a><ul class="code"> | |
377 | <li><a href="#cupsDoAuthentication" title="Authenticate a request.">cupsDoAuthentication</a></li> | |
378 | <li><a href="#cupsDoFileRequest" title="Do an IPP request with a file.">cupsDoFileRequest</a></li> | |
379 | <li><a href="#cupsDoIORequest" title="Do an IPP request with file descriptors.">cupsDoIORequest</a></li> | |
380 | <li><a href="#cupsDoRequest" title="Do an IPP request.">cupsDoRequest</a></li> | |
381 | <li><a href="#cupsEncodeOptions" title="Encode printer options into IPP attributes.">cupsEncodeOptions</a></li> | |
382 | <li><a href="#cupsEncodeOptions2" title="Encode printer options into IPP attributes for a group.">cupsEncodeOptions2</a></li> | |
ae71f5de MS |
383 | <li><a href="#cupsGetDevices" title="Get available printer devices.">cupsGetDevices</a></li> |
384 | <li><a href="#cupsGetFd" title="Get a file from the server.">cupsGetFd</a></li> | |
385 | <li><a href="#cupsGetFile" title="Get a file from the server.">cupsGetFile</a></li> | |
5a738aea | 386 | <li><a href="#cupsGetResponse" title="Get a response to an IPP request.">cupsGetResponse</a></li> |
ae71f5de MS |
387 | <li><a href="#cupsPutFd" title="Put a file on the server.">cupsPutFd</a></li> |
388 | <li><a href="#cupsPutFile" title="Put a file on the server.">cupsPutFile</a></li> | |
5a738aea MS |
389 | <li><a href="#cupsReadResponseData" title="Read additional data after the IPP response.">cupsReadResponseData</a></li> |
390 | <li><a href="#cupsSendRequest" title="Send an IPP request.">cupsSendRequest</a></li> | |
391 | <li><a href="#cupsWriteRequestData" title="Write additional data after an IPP request.">cupsWriteRequestData</a></li> | |
392 | <li><a href="#httpAddrAny" title="Check for the "any" address.">httpAddrAny</a></li> | |
393 | <li><a href="#httpAddrEqual" title="Compare two addresses.">httpAddrEqual</a></li> | |
394 | <li><a href="#httpAddrLength" title="Return the length of the address in bytes.">httpAddrLength</a></li> | |
395 | <li><a href="#httpAddrLocalhost" title="Check for the local loopback address.">httpAddrLocalhost</a></li> | |
396 | <li><a href="#httpAddrLookup" title="Lookup the hostname associated with the address.">httpAddrLookup</a></li> | |
397 | <li><a href="#httpAddrString" title="Convert an address to a numeric string.">httpAddrString</a></li> | |
398 | <li><a href="#httpAssembleURI" title="Assemble a uniform resource identifier from its | |
399 | components.">httpAssembleURI</a></li> | |
400 | <li><a href="#httpAssembleURIf" title="Assemble a uniform resource identifier from its | |
401 | components with a formatted resource.">httpAssembleURIf</a></li> | |
402 | <li><a href="#httpBlocking" title="Set blocking/non-blocking behavior on a connection.">httpBlocking</a></li> | |
403 | <li><a href="#httpCheck" title="Check to see if there is a pending response from the server.">httpCheck</a></li> | |
404 | <li><a href="#httpClearCookie" title="Clear the cookie value(s).">httpClearCookie</a></li> | |
405 | <li><a href="#httpClearFields" title="Clear HTTP request fields.">httpClearFields</a></li> | |
406 | <li><a href="#httpClose" title="Close an HTTP connection...">httpClose</a></li> | |
407 | <li><a href="#httpConnect" title="Connect to a HTTP server.">httpConnect</a></li> | |
408 | <li><a href="#httpConnectEncrypt" title="Connect to a HTTP server using encryption.">httpConnectEncrypt</a></li> | |
409 | <li><a href="#httpDecode64" title="Base64-decode a string.">httpDecode64</a></li> | |
410 | <li><a href="#httpDecode64_2" title="Base64-decode a string.">httpDecode64_2</a></li> | |
411 | <li><a href="#httpDelete" title="Send a DELETE request to the server.">httpDelete</a></li> | |
412 | <li><a href="#httpEncode64" title="Base64-encode a string.">httpEncode64</a></li> | |
413 | <li><a href="#httpEncode64_2" title="Base64-encode a string.">httpEncode64_2</a></li> | |
414 | <li><a href="#httpEncryption" title="Set the required encryption on the link.">httpEncryption</a></li> | |
415 | <li><a href="#httpError" title="Get the last error on a connection.">httpError</a></li> | |
416 | <li><a href="#httpFlush" title="Flush data from a HTTP connection.">httpFlush</a></li> | |
417 | <li><a href="#httpFlushWrite" title="Flush data in write buffer.">httpFlushWrite</a></li> | |
418 | <li><a href="#httpGet" title="Send a GET request to the server.">httpGet</a></li> | |
419 | <li><a href="#httpGetAuthString" title="Get the current authorization string.">httpGetAuthString</a></li> | |
420 | <li><a href="#httpGetBlocking" title="Get the blocking/non-block state of a connection.">httpGetBlocking</a></li> | |
421 | <li><a href="#httpGetCookie" title="Get any cookie data from the response.">httpGetCookie</a></li> | |
422 | <li><a href="#httpGetDateString" title="Get a formatted date/time string from a time value.">httpGetDateString</a></li> | |
423 | <li><a href="#httpGetDateString2" title="Get a formatted date/time string from a time value.">httpGetDateString2</a></li> | |
424 | <li><a href="#httpGetDateTime" title="Get a time value from a formatted date/time string.">httpGetDateTime</a></li> | |
425 | <li><a href="#httpGetFd" title="Get the file descriptor associated with a connection.">httpGetFd</a></li> | |
426 | <li><a href="#httpGetField" title="Get a field value from a request/response.">httpGetField</a></li> | |
427 | <li><a href="#httpGetHostByName" title="Lookup a hostname or IPv4 address, and return | |
428 | address records for the specified name.">httpGetHostByName</a></li> | |
429 | <li><a href="#httpGetHostname" title="Get the FQDN for the connection or local system.">httpGetHostname</a></li> | |
430 | <li><a href="#httpGetLength" title="Get the amount of data remaining from the | |
431 | content-length or transfer-encoding fields.">httpGetLength</a></li> | |
432 | <li><a href="#httpGetLength2" title="Get the amount of data remaining from the | |
433 | content-length or transfer-encoding fields.">httpGetLength2</a></li> | |
434 | <li><a href="#httpGetStatus" title="Get the status of the last HTTP request.">httpGetStatus</a></li> | |
435 | <li><a href="#httpGetSubField" title="Get a sub-field value.">httpGetSubField</a></li> | |
436 | <li><a href="#httpGetSubField2" title="Get a sub-field value.">httpGetSubField2</a></li> | |
437 | <li><a href="#httpGets" title="Get a line of text from a HTTP connection.">httpGets</a></li> | |
438 | <li><a href="#httpHead" title="Send a HEAD request to the server.">httpHead</a></li> | |
439 | <li><a href="#httpInitialize" title="Initialize the HTTP interface library and set the | |
440 | default HTTP proxy (if any).">httpInitialize</a></li> | |
441 | <li><a href="#httpMD5" title="Compute the MD5 sum of the username:group:password.">httpMD5</a></li> | |
442 | <li><a href="#httpMD5Final" title="Combine the MD5 sum of the username, group, and password | |
443 | with the server-supplied nonce value, method, and | |
444 | request-uri.">httpMD5Final</a></li> | |
445 | <li><a href="#httpMD5String" title="Convert an MD5 sum to a character string.">httpMD5String</a></li> | |
446 | <li><a href="#httpOptions" title="Send an OPTIONS request to the server.">httpOptions</a></li> | |
447 | <li><a href="#httpPost" title="Send a POST request to the server.">httpPost</a></li> | |
448 | <li><a href="#httpPut" title="Send a PUT request to the server.">httpPut</a></li> | |
449 | <li><a href="#httpRead" title="Read data from a HTTP connection.">httpRead</a></li> | |
450 | <li><a href="#httpRead2" title="Read data from a HTTP connection.">httpRead2</a></li> | |
451 | <li><a href="#httpReconnect" title="Reconnect to a HTTP server.">httpReconnect</a></li> | |
452 | <li><a href="#httpSeparate" title="Separate a Universal Resource Identifier into its | |
453 | components.">httpSeparate</a></li> | |
454 | <li><a href="#httpSeparate2" title="Separate a Universal Resource Identifier into its | |
455 | components.">httpSeparate2</a></li> | |
456 | <li><a href="#httpSeparateURI" title="Separate a Universal Resource Identifier into its | |
457 | components.">httpSeparateURI</a></li> | |
458 | <li><a href="#httpSetAuthString" title="Set the current authorization string.">httpSetAuthString</a></li> | |
459 | <li><a href="#httpSetCookie" title="Set the cookie value(s)...">httpSetCookie</a></li> | |
460 | <li><a href="#httpSetExpect" title="Set the Expect: header in a request.">httpSetExpect</a></li> | |
461 | <li><a href="#httpSetField" title="Set the value of an HTTP header.">httpSetField</a></li> | |
462 | <li><a href="#httpSetLength" title="Set the content-length and content-encoding.">httpSetLength</a></li> | |
463 | <li><a href="#httpStatus" title="Return a short string describing a HTTP status code.">httpStatus</a></li> | |
464 | <li><a href="#httpTrace" title="Send an TRACE request to the server.">httpTrace</a></li> | |
465 | <li><a href="#httpUpdate" title="Update the current HTTP state for incoming data.">httpUpdate</a></li> | |
466 | <li><a href="#httpWait" title="Wait for data available on a connection.">httpWait</a></li> | |
467 | <li><a href="#httpWrite" title="Write data to a HTTP connection.">httpWrite</a></li> | |
468 | <li><a href="#httpWrite2" title="Write data to a HTTP connection.">httpWrite2</a></li> | |
469 | <li><a href="#ippAddBoolean" title="Add a boolean attribute to an IPP message.">ippAddBoolean</a></li> | |
470 | <li><a href="#ippAddBooleans" title="Add an array of boolean values.">ippAddBooleans</a></li> | |
471 | <li><a href="#ippAddCollection" title="Add a collection value.">ippAddCollection</a></li> | |
472 | <li><a href="#ippAddCollections" title="Add an array of collection values.">ippAddCollections</a></li> | |
473 | <li><a href="#ippAddDate" title="Add a date attribute to an IPP message.">ippAddDate</a></li> | |
474 | <li><a href="#ippAddInteger" title="Add a integer attribute to an IPP message.">ippAddInteger</a></li> | |
475 | <li><a href="#ippAddIntegers" title="Add an array of integer values.">ippAddIntegers</a></li> | |
476 | <li><a href="#ippAddOctetString" title="Add an octetString value to an IPP message.">ippAddOctetString</a></li> | |
477 | <li><a href="#ippAddRange" title="Add a range of values to an IPP message.">ippAddRange</a></li> | |
478 | <li><a href="#ippAddRanges" title="Add ranges of values to an IPP message.">ippAddRanges</a></li> | |
479 | <li><a href="#ippAddResolution" title="Add a resolution value to an IPP message.">ippAddResolution</a></li> | |
480 | <li><a href="#ippAddResolutions" title="Add resolution values to an IPP message.">ippAddResolutions</a></li> | |
481 | <li><a href="#ippAddSeparator" title="Add a group separator to an IPP message.">ippAddSeparator</a></li> | |
482 | <li><a href="#ippAddString" title="Add a language-encoded string to an IPP message.">ippAddString</a></li> | |
483 | <li><a href="#ippAddStrings" title="Add language-encoded strings to an IPP message.">ippAddStrings</a></li> | |
484 | <li><a href="#ippDateToTime" title="Convert from RFC 1903 Date/Time format to UNIX time | |
485 | in seconds.">ippDateToTime</a></li> | |
486 | <li><a href="#ippDelete" title="Delete an IPP message.">ippDelete</a></li> | |
487 | <li><a href="#ippDeleteAttribute" title="Delete a single attribute in an IPP message.">ippDeleteAttribute</a></li> | |
488 | <li><a href="#ippErrorString" title="Return a name for the given status code.">ippErrorString</a></li> | |
489 | <li><a href="#ippErrorValue" title="Return a status code for the given name.">ippErrorValue</a></li> | |
490 | <li><a href="#ippFindAttribute" title="Find a named attribute in a request...">ippFindAttribute</a></li> | |
491 | <li><a href="#ippFindNextAttribute" title="Find the next named attribute in a request...">ippFindNextAttribute</a></li> | |
492 | <li><a href="#ippLength" title="Compute the length of an IPP message.">ippLength</a></li> | |
493 | <li><a href="#ippNew" title="Allocate a new IPP message.">ippNew</a></li> | |
494 | <li><a href="#ippNewRequest" title="Allocate a new IPP request message.">ippNewRequest</a></li> | |
495 | <li><a href="#ippOpString" title="Return a name for the given operation id.">ippOpString</a></li> | |
496 | <li><a href="#ippOpValue" title="Return an operation id for the given name.">ippOpValue</a></li> | |
497 | <li><a href="#ippPort" title="Return the default IPP port number.">ippPort</a></li> | |
498 | <li><a href="#ippRead" title="Read data for an IPP message from a HTTP connection.">ippRead</a></li> | |
499 | <li><a href="#ippReadFile" title="Read data for an IPP message from a file.">ippReadFile</a></li> | |
500 | <li><a href="#ippReadIO" title="Read data for an IPP message.">ippReadIO</a></li> | |
501 | <li><a href="#ippSetPort" title="Set the default port number.">ippSetPort</a></li> | |
06d4e77b MS |
502 | <li><a href="#ippTagString" title="Return the tag name corresponding to a tag value.">ippTagString</a></li> |
503 | <li><a href="#ippTagValue" title="Return the tag value corresponding to a tag name.">ippTagValue</a></li> | |
5a738aea MS |
504 | <li><a href="#ippTimeToDate" title="Convert from UNIX time to RFC 1903 format.">ippTimeToDate</a></li> |
505 | <li><a href="#ippWrite" title="Write data for an IPP message to a HTTP connection.">ippWrite</a></li> | |
506 | <li><a href="#ippWriteFile" title="Write data for an IPP message to a file.">ippWriteFile</a></li> | |
507 | <li><a href="#ippWriteIO" title="Write data for an IPP message.">ippWriteIO</a></li> | |
508 | </ul> | |
509 | <li><a href="#TYPES">Data Types</a><ul class="code"> | |
510 | <li><a href="#http_addrlist_t" title="Socket address list, which is | |
511 | used to enumerate all of the | |
512 | addresses that are associated | |
513 | with a hostname. ">http_addrlist_t</a></li> | |
514 | <li><a href="#http_auth_t" title="HTTP authentication types">http_auth_t</a></li> | |
515 | <li><a href="#http_encoding_t" title="HTTP transfer encoding values">http_encoding_t</a></li> | |
516 | <li><a href="#http_encryption_t" title="HTTP encryption values">http_encryption_t</a></li> | |
79e1d494 MS |
517 | <li><a href="#http_field_t" title="HTTP field names">http_field_t</a></li> |
518 | <li><a href="#http_keepalive_t" title="Types and structures...">http_keepalive_t</a></li> | |
519 | <li><a href="#http_status_t" title="HTTP status codes">http_status_t</a></li> | |
5a738aea | 520 | <li><a href="#http_t" title="HTTP connection type">http_t</a></li> |
79e1d494 MS |
521 | <li><a href="#http_uri_coding_t" title="HTTP version numbers">http_uri_coding_t</a></li> |
522 | <li><a href="#http_uri_status_t" title="URI en/decode flags">http_uri_status_t</a></li> | |
523 | <li><a href="#http_version_t" title="Socket address union, which | |
524 | makes using IPv6 and other | |
525 | address types easier and | |
526 | more portable. ">http_version_t</a></li> | |
5a738aea | 527 | <li><a href="#ipp_attribute_t" title="Attribute">ipp_attribute_t</a></li> |
79e1d494 | 528 | <li><a href="#ipp_finish_t" title="Orientation...">ipp_finish_t</a></li> |
5a738aea | 529 | <li><a href="#ipp_iocb_t" title="IPP IO Callback Function ">ipp_iocb_t</a></li> |
79e1d494 MS |
530 | <li><a href="#ipp_jstate_t" title="Printer States....">ipp_jstate_t</a></li> |
531 | <li><a href="#ipp_op_t" title="Old names for the operations">ipp_op_t</a></li> | |
532 | <li><a href="#ipp_orient_t" title="Qualities...">ipp_orient_t</a></li> | |
533 | <li><a href="#ipp_pstate_t" title="IPP states...">ipp_pstate_t</a></li> | |
534 | <li><a href="#ipp_quality_t" title="Job States....">ipp_quality_t</a></li> | |
5a738aea | 535 | <li><a href="#ipp_request_t" title="Request Header">ipp_request_t</a></li> |
79e1d494 MS |
536 | <li><a href="#ipp_res_t" title="Types and structures...">ipp_res_t</a></li> |
537 | <li><a href="#ipp_state_t" title="IPP operations...">ipp_state_t</a></li> | |
5a738aea MS |
538 | <li><a href="#ipp_t" title="Attribute Value">ipp_t</a></li> |
539 | <li><a href="#ipp_uchar_t" title="IPP status codes...">ipp_uchar_t</a></li> | |
79e1d494 | 540 | <li><a href="#ipp_tag_t" title="Format tags for attributes...">ipp_tag_t</a></li> |
5a738aea MS |
541 | <li><a href="#ipp_value_t" title="New in CUPS 1.1.19">ipp_value_t</a></li> |
542 | </ul></li> | |
543 | <li><a href="#STRUCTURES">Structures</a><ul class="code"> | |
544 | <li><a href="#http_addrlist_s" title="Socket address list, which is | |
545 | used to enumerate all of the | |
546 | addresses that are associated | |
547 | with a hostname. ">http_addrlist_s</a></li> | |
548 | <li><a href="#ipp_attribute_s" title="Attribute">ipp_attribute_s</a></li> | |
549 | <li><a href="#ipp_s" title="IPP Request/Response/Notification">ipp_s</a></li> | |
550 | </ul></li> | |
551 | <li><a href="#UNIONS">Unions</a><ul class="code"> | |
552 | <li><a href="#ipp_request_u" title="Request Header">ipp_request_u</a></li> | |
553 | <li><a href="#ipp_value_u" title="New in CUPS 1.1.19">ipp_value_u</a></li> | |
554 | </ul></li> | |
555 | <li><a href="#ENUMERATIONS">Constants</a><ul class="code"> | |
556 | <li><a href="#http_auth_e" title="HTTP authentication types">http_auth_e</a></li> | |
557 | <li><a href="#http_encoding_e" title="HTTP transfer encoding values">http_encoding_e</a></li> | |
558 | <li><a href="#http_encryption_e" title="HTTP encryption values">http_encryption_e</a></li> | |
559 | <li><a href="#http_field_e" title="HTTP field names">http_field_e</a></li> | |
560 | <li><a href="#http_keepalive_e" title="Types and structures...">http_keepalive_e</a></li> | |
561 | <li><a href="#http_state_e" title="">http_state_e</a></li> | |
562 | <li><a href="#http_status_e" title="HTTP status codes">http_status_e</a></li> | |
563 | <li><a href="#http_uri_coding_e" title="">http_uri_coding_e</a></li> | |
564 | <li><a href="#http_uri_status_e" title="">http_uri_status_e</a></li> | |
565 | <li><a href="#http_version_e" title="">http_version_e</a></li> | |
566 | <li><a href="#ipp_finish_e" title="">ipp_finish_e</a></li> | |
567 | <li><a href="#ipp_jstate_e" title="">ipp_jstate_e</a></li> | |
568 | <li><a href="#ipp_op_e" title="">ipp_op_e</a></li> | |
569 | <li><a href="#ipp_orient_e" title="">ipp_orient_e</a></li> | |
570 | <li><a href="#ipp_pstate_e" title="">ipp_pstate_e</a></li> | |
571 | <li><a href="#ipp_quality_e" title="">ipp_quality_e</a></li> | |
572 | <li><a href="#ipp_res_e" title="Types and structures...">ipp_res_e</a></li> | |
573 | <li><a href="#ipp_state_e" title="">ipp_state_e</a></li> | |
574 | <li><a href="#ipp_status_e" title="IPP status codes...">ipp_status_e</a></li> | |
575 | <li><a href="#ipp_tag_e" title="Format tags for attributes...">ipp_tag_e</a></li> | |
576 | </ul></li> | |
577 | </ul> | |
578 | <!-- | |
66ab9486 | 579 | "$Id: api-httpipp.shtml 7684 2008-06-23 16:47:38Z mike $" |
ef416fc2 | 580 | |
581 | HTTP and IPP API introduction for the Common UNIX Printing System (CUPS). | |
582 | ||
5a738aea | 583 | Copyright 2007-2008 by Apple Inc. |
bc44d920 | 584 | Copyright 1997-2006 by Easy Software Products, all rights reserved. |
ef416fc2 | 585 | |
586 | These coded instructions, statements, and computer programs are the | |
bc44d920 | 587 | property of Apple Inc. and are protected by Federal copyright |
588 | law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
589 | which should have been included with this file. If this file is | |
590 | file is missing or damaged, see the license at "http://www.cups.org/". | |
ef416fc2 | 591 | --> |
592 | ||
5a738aea MS |
593 | <h2 class='title'><a name='OVERVIEW'>Overview</a></h2> |
594 | ||
595 | <p>The CUPS HTTP and IPP APIs provide low-level access to the HTTP and IPP | |
596 | protocols and CUPS scheduler. They are typically used by monitoring and | |
597 | administration programs to perform specific functions not supported by the | |
598 | high-level CUPS API functions.</p> | |
599 | ||
600 | <p>The HTTP APIs use an opaque structure called | |
601 | <a href='#http_t'><code>http_t</code></a> to manage connections to | |
602 | a particular HTTP or IPP server. The | |
603 | <a href='#httpConnectEncrypt'><code>httpConnectEncrypt</code></a> function is | |
604 | used to create an instance of this structure for a particular server. | |
605 | The constant <code>CUPS_HTTP_DEFAULT</code> can be used with all of the | |
606 | <code>cups</code> functions to refer to the default CUPS server - the functions | |
607 | create a per-thread <a href='#http_t'><code>http_t</code></a> as needed.</p> | |
608 | ||
609 | <p>The IPP APIs use two structures for requests (messages sent to the CUPS | |
610 | scheduler) and responses (messages sent back to your application from the | |
611 | scheduler). The <a href='#ipp_t'><code>ipp_t</code></a> structure holds a | |
612 | complete request or response and is allocated using the | |
613 | <a href='#ippNew'><code>ippNew</code></a> or | |
614 | <a href='#ippNewRequest'><code>ippNewRequest</code></a> functions and | |
615 | freed using the <a href='#ippDelete'><code>ippDelete</code></a> function.</p> | |
616 | ||
617 | <p>The second structure is called | |
618 | <a href='#ipp_attribute_t'><code>ipp_attribute_t</code></a> and holds a | |
619 | single IPP attribute which consists of a group tag (<code>group_tag</code>), a | |
620 | value type tag (<code>value_tag</code>), the attribute name (<code>name</code>), | |
621 | and 1 or more values (<code>values[]</code>). Attributes are added to an | |
622 | <a href='#ipp_t'><code>ipp_t</code></a> structure using one of the | |
623 | <code>ippAdd</code> functions. For example, use | |
624 | <a href='#ippAddString'><code>ippAddString</code></a> to add a | |
625 | "requesting-user-name" string attribute to a request:</p> | |
626 | ||
627 | <pre class='example'> | |
628 | <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(IPP_GET_JOBS); | |
629 | ||
630 | <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", | |
631 | NULL, cupsUser()); | |
632 | </pre> | |
ef416fc2 | 633 | |
5a738aea MS |
634 | <p>Once you have created an IPP request, use the <code>cups</code> |
635 | functions to send the request to and read the response from the server. | |
636 | For example, the <a href='#cupsDoRequest'><code>cupsDoRequest</code></a> | |
637 | function can be used for simple query operations that do not involve files:</p> | |
ef416fc2 | 638 | |
5a738aea MS |
639 | <pre class='example'> |
640 | #include <cups/cups.h> | |
ef416fc2 | 641 | |
ef416fc2 | 642 | |
5a738aea MS |
643 | <a href='#ipp_t'>ipp_t</a> *<a name='get_jobs'>get_jobs</a>(void) |
644 | { | |
645 | <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(IPP_GET_JOBS); | |
ef416fc2 | 646 | |
5a738aea MS |
647 | <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", |
648 | NULL, cupsUser()); | |
649 | ||
650 | return (<a href='#cupsDoRequest'>cupsDoRequest</a>(CUPS_HTTP_DEFAULT, request, "/")); | |
651 | } | |
ef416fc2 | 652 | </pre> |
653 | ||
5a738aea MS |
654 | <p>The <a href='#cupsDoRequest'><code>cupsDoRequest</code></a> function frees |
655 | the request structure and returns an IPP response structure or NULL pointer if | |
656 | the request could not be sent to the server. Once you have a response from | |
657 | the server, you can either use the | |
658 | <a href='#ippFindAttribute'><code>ippFindAttribute</code></a> and | |
659 | <a href='#ippFindNextAttribute'><code>ippFindNextAttribute</code></a> functions | |
660 | to find specific attributes, for example:</p> | |
ef416fc2 | 661 | |
5a738aea MS |
662 | <pre class='example'> |
663 | <a href='#ipp_t'>ipp_t</a> *response; | |
664 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> *attr; | |
bc44d920 | 665 | |
5a738aea MS |
666 | attr = <a href='#ippFindAttribute'>ippFindAttribute</a>(response, "printer-state", IPP_TAG_ENUM); |
667 | </pre> | |
668 | ||
669 | <p>You can also walk the list of attributes with a simple <code>for</code> loop | |
670 | like this:</p> | |
671 | ||
672 | <pre class='example'> | |
673 | <a href='#ipp_t'>ipp_t</a> *response; | |
674 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> *attr; | |
675 | ||
676 | for (attr = response->attrs; attr != NULL; attr = attr->next) | |
677 | if (attr->name == NULL) | |
678 | puts("--SEPARATOR--"); | |
679 | else | |
680 | puts(attr->name); | |
681 | </pre> | |
682 | ||
683 | <p>The <code>for</code> loop approach is normally used when collecting | |
684 | attributes for multiple objects (jobs, printers, etc.) in a response. Attributes | |
685 | with <code>NULL</code> names indicate a separator between the attributes of | |
686 | each object. For example, the following code will list the jobs returned from | |
687 | our previous <a href='#get_jobs'><code>get_jobs</code></a> example code:</p> | |
688 | ||
689 | <pre class='example'> | |
690 | <a href='#ipp_t'>ipp_t</a> *response = <a href='#get_jobs'>get_jobs</a>(); | |
691 | ||
692 | if (response != NULL) | |
693 | { | |
694 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> *attr; | |
695 | int job_id = 0; | |
696 | char *job_name = NULL; | |
697 | char *job_originating_user_name = NULL; | |
698 | ||
699 | puts("Job ID Owner Title"); | |
700 | puts("------ ---------------- ---------------------------------"); | |
701 | ||
702 | for (attr = response->attrs; attr != NULL; attr = attr->next) | |
703 | { | |
704 | /* Attributes without names are separators between jobs */ | |
705 | if (attr->name == NULL) | |
706 | { | |
707 | if (job_id > 0 && job_name != NULL && job_originating_user_name != NULL) | |
708 | printf("%5d %-16s %s\n", job_id, job_originating_user_name, job_name); | |
709 | ||
710 | job_id = 0; | |
711 | job_name = NULL; | |
712 | job_originating_user_name = NULL; | |
713 | continue; | |
714 | } | |
715 | else if (!strcmp(attr->name, "job-id") && attr->value_tag == IPP_TAG_INTEGER) | |
716 | job_id = attr->values[0].integer; | |
717 | else if (!strcmp(attr->name, "job-name") && attr->value_tag == IPP_TAG_NAME) | |
718 | job_name = attr->values[0].string.text; | |
719 | else if (!strcmp(attr->name, "job-originating-user-name") && | |
720 | attr->value_tag == IPP_TAG_NAME) | |
721 | job_originating_user_name = attr->values[0].string.text; | |
722 | } | |
723 | ||
724 | if (job_id > 0 && job_name != NULL && job_originating_user_name != NULL) | |
725 | printf("%5d %-16s %s\n", job_id, job_originating_user_name, job_name); | |
726 | } | |
727 | </pre> | |
728 | ||
729 | <h3><a name='CREATING_URI_STRINGS'>Creating URI Strings</a></h3> | |
730 | ||
731 | <p>To ensure proper encoding, the | |
732 | <a href='#httpAssembleURIf'><code>httpAssembleURIf</code></a> function must be | |
733 | used to format a "printer-uri" string for all printer-based requests:</p> | |
734 | ||
735 | <pre class='example'> | |
736 | const char *name = "Foo"; | |
737 | char uri[1024]; | |
738 | <a href='#ipp_t'>ipp_t</a> *request; | |
739 | ||
740 | <a href='#httpAssembleURIf'>httpAssembleURIf</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, cupsServer(), | |
741 | ippPort(), "/printers/%s", name); | |
742 | <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri); | |
743 | </pre> | |
744 | ||
745 | <h3><a name='SENDING_REQUESTS_WITH_FILES'>Sending Requests with Files</a></h3> | |
746 | ||
747 | <p>The <a href='#cupsDoFileRequest'><code>cupsDoFileRequest</code></a> and | |
748 | <a href='#cupsDoIORequest'><code>cupsDoIORequest</code></a> functions are | |
749 | used for requests involving files. The | |
750 | <a href='#cupsDoFileRequest'><code>cupsDoFileRequest</code></a> function | |
751 | attaches the named file to a request and is typically used when sending a print | |
752 | file or changing a printer's PPD file:</p> | |
753 | ||
754 | <pre class='example'> | |
755 | const char *filename = "/usr/share/cups/data/testprint.ps"; | |
756 | const char *name = "Foo"; | |
757 | char uri[1024]; | |
758 | char resource[1024]; | |
759 | <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(IPP_PRINT_JOB); | |
760 | <a href='#ipp_t'>ipp_t</a> *response; | |
761 | ||
762 | /* Use httpAssembleURIf for the printer-uri string */ | |
763 | <a href='#httpAssembleURIf'>httpAssembleURIf</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, cupsServer(), | |
764 | ippPort(), "/printers/%s", name); | |
765 | <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri); | |
766 | <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", | |
767 | NULL, cupsUser()); | |
768 | <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", | |
769 | NULL, "testprint.ps"); | |
770 | ||
771 | /* Use snprintf for the resource path */ | |
772 | snprintf(resource, sizeof(resource), "/printers/%s", name); | |
773 | ||
774 | response = <a href='#cupsDoFileRequest'>cupsDoFileRequest</a>(CUPS_HTTP_DEFAULT, request, resource, filename); | |
775 | </pre> | |
776 | ||
777 | <p>The <a href='#cupsDoIORequest'><code>cupsDoIORequest</code></a> function | |
778 | optionally attaches a file to the request and optionally saves a file in the | |
779 | response from the server. It is used when using a pipe for the request | |
780 | attachment or when using a request that returns a file, currently only | |
781 | <code>CUPS_GET_DOCUMENT</code> and <code>CUPS_GET_PPD</code>. For example, | |
782 | the following code will download the PPD file for the sample HP LaserJet | |
783 | printer driver:</p> | |
784 | ||
785 | <pre class='example'> | |
786 | char tempfile[1024]; | |
787 | int tempfd; | |
788 | <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(CUPS_GET_PPD); | |
789 | <a href='#ipp_t'>ipp_t</a> *response; | |
790 | ||
791 | <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name", | |
792 | NULL, "laserjet.ppd"); | |
793 | ||
794 | tempfd = cupsTempFd(tempfile, sizeof(tempfile)); | |
795 | ||
796 | response = <a href='#cupsDoIORequest'>cupsDoIORequest</a>(CUPS_HTTP_DEFAULT, request, "/", -1, tempfd); | |
797 | </pre> | |
798 | ||
799 | <p>The example passes <code>-1</code> for the input file descriptor to specify | |
800 | that no file is to be attached to the request. The PPD file attached to the | |
801 | response is written to the temporary file descriptor we created using the | |
802 | <code>cupsTempFd</code> function.</p> | |
803 | ||
804 | <h3><a name='ASYNCHRONOUS_REQUEST_PROCESSING'>Asynchronous Request Processing</a></h3> | |
805 | ||
806 | <p>The <a href='#cupsSendRequest'><code>cupsSendRequest</code></a> and | |
807 | <a href='#cupsGetResponse'><code>cupsGetResponse</code></a> support | |
808 | asynchronous communications with the server. Unlike the other request | |
809 | functions, the IPP request is not automatically freed, so remember to | |
810 | free your request with the <a href='#ippDelete'><code>ippDelete</code></a> | |
811 | function.</p> | |
812 | ||
813 | <p>File data is attached to the request using the | |
814 | <a href='#cupsWriteRequestData'><code>cupsWriteRequestData</code></a> | |
815 | function, while file data returned from the server is read using the | |
816 | <a href='#cupsReadResponseData'><code>cupsReadResponseData</code></a> | |
817 | function. We can rewrite the previous <code>CUPS_GET_PPD</code> example | |
818 | to use the asynchronous functions quite easily:</p> | |
819 | ||
820 | <pre class='example'> | |
821 | char tempfile[1024]; | |
822 | int tempfd; | |
823 | <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(CUPS_GET_PPD); | |
824 | <a href='#ipp_t'>ipp_t</a> *response; | |
825 | ||
826 | <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name", | |
827 | NULL, "laserjet.ppd"); | |
828 | ||
829 | tempfd = cupsTempFd(tempfile, sizeof(tempfile)); | |
830 | ||
831 | if (<a href='#cupsSendRequest'>cupsSendRequest</a>(CUPS_HTTP_DEFAULT, request, "/") == HTTP_CONTINUE) | |
832 | { | |
833 | response = <a href='#cupsGetResponse'>cupsGetResponse</a>(CUPS_HTTP_DEFAULT, "/"); | |
834 | ||
835 | if (response != NULL) | |
836 | { | |
837 | ssize_t bytes; | |
838 | char buffer[8192]; | |
839 | ||
840 | while ((bytes = <a href='#cupsReadResponseData'>cupsReadResponseData</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer))) > 0) | |
841 | write(tempfd, buffer, bytes); | |
842 | } | |
843 | } | |
844 | ||
845 | /* Free the request! */ | |
846 | <a href='#ippDelete'>ippDelete</a>(request); | |
847 | </pre> | |
848 | ||
849 | <p>The <a href='#cupsSendRequest'><code>cupsSendRequest</code></a> function | |
850 | returns the initial HTTP request status, typically either | |
851 | <code>HTTP_CONTINUE</code> or <code>HTTP_UNAUTHORIZED</code>. The latter status | |
852 | is returned when the request requires authentication of some sort. The | |
853 | <a href='#cupsDoAuthentication'><code>cupsDoAuthentication</code></a> function | |
854 | must be called when your see <code>HTTP_UNAUTHORIZED</code> and the request | |
855 | re-sent. We can add authentication support to our example code by using a | |
856 | <code>do ... while</code> loop:</p> | |
857 | ||
858 | <pre class='example'> | |
859 | char tempfile[1024]; | |
860 | int tempfd; | |
861 | <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(CUPS_GET_PPD); | |
862 | <a href='#ipp_t'>ipp_t</a> *response; | |
863 | http_status_t status; | |
864 | ||
865 | <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name", | |
866 | NULL, "laserjet.ppd"); | |
867 | ||
868 | tempfd = cupsTempFd(tempfile, sizeof(tempfile)); | |
869 | ||
870 | /* Loop for authentication */ | |
871 | do | |
872 | { | |
75bd9771 | 873 | status = <a href='#cupsSendRequest'>cupsSendRequest</a>(CUPS_HTTP_DEFAULT, request, "/"); |
5a738aea MS |
874 | |
875 | if (status == HTTP_UNAUTHORIZED) | |
876 | { | |
877 | /* Try to authenticate, break out of the loop if that fails */ | |
878 | if (<a href='#cupsDoAuthentication'>cupsDoAuthentication</a>(CUPS_HTTP_DEFAULT, "POST", "/")) | |
879 | break; | |
880 | } | |
881 | } | |
882 | while (status != HTTP_CONTINUE && status != HTTP_UNAUTHORIZED); | |
883 | ||
884 | if (status == HTTP_CONTINUE) | |
885 | { | |
886 | response = <a href='#cupsGetResponse'>cupsGetResponse</a>(CUPS_HTTP_DEFAULT, "/"); | |
887 | ||
888 | if (response != NULL) | |
889 | { | |
890 | ssize_t bytes; | |
891 | char buffer[8192]; | |
892 | ||
893 | while ((bytes = <a href='#cupsReadResponseData'>cupsReadResponseData</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer))) > 0) | |
894 | write(tempfd, buffer, bytes); | |
895 | } | |
896 | } | |
897 | ||
898 | /* Free the request! */ | |
899 | <a href='#ippDelete'>ippDelete</a>(request); | |
900 | </pre> | |
901 | <h2 class="title"><a name="FUNCTIONS">Functions</a></h2> | |
902 | <h3 class="function"><span class="info"> CUPS 1.1.20 </span><a name="cupsDoAuthentication">cupsDoAuthentication</a></h3> | |
903 | <p class="description">Authenticate a request.</p> | |
904 | <p class="code"> | |
905 | int cupsDoAuthentication (<br> | |
906 | <a href="#http_t">http_t</a> *http,<br> | |
907 | const char *method,<br> | |
908 | const char *resource<br> | |
909 | );</p> | |
910 | <h4 class="parameters">Parameters</h4> | |
911 | <dl> | |
912 | <dt>http</dt> | |
568fa3fa | 913 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> |
5a738aea MS |
914 | <dt>method</dt> |
915 | <dd class="description">Request method ("GET", "POST", "PUT")</dd> | |
916 | <dt>resource</dt> | |
917 | <dd class="description">Resource path</dd> | |
918 | </dl> | |
919 | <h4 class="returnvalue">Return Value</h4> | |
920 | <p class="description">0 on success, -1 on error</p> | |
921 | <h4 class="discussion">Discussion</h4> | |
922 | <p class="discussion">This function should be called in response to a <code>HTTP_UNAUTHORIZED</code> | |
923 | status, prior to resubmitting your request. | |
924 | ||
925 | </p> | |
926 | <h3 class="function"><a name="cupsDoFileRequest">cupsDoFileRequest</a></h3> | |
927 | <p class="description">Do an IPP request with a file.</p> | |
928 | <p class="code"> | |
929 | <a href="#ipp_t">ipp_t</a> *cupsDoFileRequest (<br> | |
930 | <a href="#http_t">http_t</a> *http,<br> | |
931 | <a href="#ipp_t">ipp_t</a> *request,<br> | |
932 | const char *resource,<br> | |
933 | const char *filename<br> | |
934 | );</p> | |
935 | <h4 class="parameters">Parameters</h4> | |
936 | <dl> | |
937 | <dt>http</dt> | |
568fa3fa | 938 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> |
5a738aea MS |
939 | <dt>request</dt> |
940 | <dd class="description">IPP request</dd> | |
941 | <dt>resource</dt> | |
942 | <dd class="description">HTTP resource for POST</dd> | |
943 | <dt>filename</dt> | |
568fa3fa | 944 | <dd class="description">File to send or <code>NULL</code> for none</dd> |
5a738aea MS |
945 | </dl> |
946 | <h4 class="returnvalue">Return Value</h4> | |
947 | <p class="description">Response data</p> | |
948 | <h4 class="discussion">Discussion</h4> | |
949 | <p class="discussion">This function sends the IPP request to the specified server, retrying | |
568fa3fa | 950 | and authenticating as necessary. The request is freed with <a href="#ippDelete"><code>ippDelete</code></a> |
5a738aea MS |
951 | after receiving a valid IPP response.</p> |
952 | <h3 class="function"><span class="info"> CUPS 1.3 </span><a name="cupsDoIORequest">cupsDoIORequest</a></h3> | |
953 | <p class="description">Do an IPP request with file descriptors.</p> | |
954 | <p class="code"> | |
955 | <a href="#ipp_t">ipp_t</a> *cupsDoIORequest (<br> | |
956 | <a href="#http_t">http_t</a> *http,<br> | |
957 | <a href="#ipp_t">ipp_t</a> *request,<br> | |
958 | const char *resource,<br> | |
959 | int infile,<br> | |
960 | int outfile<br> | |
961 | );</p> | |
962 | <h4 class="parameters">Parameters</h4> | |
963 | <dl> | |
964 | <dt>http</dt> | |
568fa3fa | 965 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> |
5a738aea MS |
966 | <dt>request</dt> |
967 | <dd class="description">IPP request</dd> | |
968 | <dt>resource</dt> | |
969 | <dd class="description">HTTP resource for POST</dd> | |
970 | <dt>infile</dt> | |
971 | <dd class="description">File to read from or -1 for none</dd> | |
972 | <dt>outfile</dt> | |
973 | <dd class="description">File to write to or -1 for none</dd> | |
974 | </dl> | |
975 | <h4 class="returnvalue">Return Value</h4> | |
976 | <p class="description">Response data</p> | |
977 | <h4 class="discussion">Discussion</h4> | |
978 | <p class="discussion">This function sends the IPP request to the specified server, retrying | |
bc44d920 | 979 | and authenticating as necessary. The request is freed with ippDelete() |
5a738aea MS |
980 | after receiving a valid IPP response.<br> |
981 | <br> | |
982 | If "infile" is a valid file descriptor, cupsDoIORequest() copies | |
983 | all of the data from the file after the IPP request message.<br> | |
984 | <br> | |
985 | If "outfile" is a valid file descriptor, cupsDoIORequest() copies | |
bc44d920 | 986 | all of the data after the IPP response message to the file. |
987 | ||
5a738aea MS |
988 | </p> |
989 | <h3 class="function"><a name="cupsDoRequest">cupsDoRequest</a></h3> | |
990 | <p class="description">Do an IPP request.</p> | |
991 | <p class="code"> | |
992 | <a href="#ipp_t">ipp_t</a> *cupsDoRequest (<br> | |
993 | <a href="#http_t">http_t</a> *http,<br> | |
994 | <a href="#ipp_t">ipp_t</a> *request,<br> | |
995 | const char *resource<br> | |
996 | );</p> | |
997 | <h4 class="parameters">Parameters</h4> | |
998 | <dl> | |
999 | <dt>http</dt> | |
568fa3fa | 1000 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> |
5a738aea MS |
1001 | <dt>request</dt> |
1002 | <dd class="description">IPP request</dd> | |
1003 | <dt>resource</dt> | |
1004 | <dd class="description">HTTP resource for POST</dd> | |
1005 | </dl> | |
1006 | <h4 class="returnvalue">Return Value</h4> | |
1007 | <p class="description">Response data</p> | |
1008 | <h4 class="discussion">Discussion</h4> | |
1009 | <p class="discussion">This function sends the IPP request to the specified server, retrying | |
ecdc0628 | 1010 | and authenticating as necessary. The request is freed with ippDelete() |
5a738aea MS |
1011 | after receiving a valid IPP response.</p> |
1012 | <h3 class="function"><a name="cupsEncodeOptions">cupsEncodeOptions</a></h3> | |
1013 | <p class="description">Encode printer options into IPP attributes.</p> | |
1014 | <p class="code"> | |
1015 | void cupsEncodeOptions (<br> | |
1016 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
1017 | int num_options,<br> | |
1018 | cups_option_t *options<br> | |
1019 | );</p> | |
1020 | <h4 class="parameters">Parameters</h4> | |
1021 | <dl> | |
1022 | <dt>ipp</dt> | |
1023 | <dd class="description">Request to add to</dd> | |
1024 | <dt>num_options</dt> | |
1025 | <dd class="description">Number of options</dd> | |
1026 | <dt>options</dt> | |
1027 | <dd class="description">Options</dd> | |
1028 | </dl> | |
1029 | <h4 class="discussion">Discussion</h4> | |
1030 | <p class="discussion">This function adds operation, job, and then subscription attributes, | |
ecdc0628 | 1031 | in that order. Use the cupsEncodeOptions2() function to add attributes |
5a738aea MS |
1032 | for a single group.</p> |
1033 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="cupsEncodeOptions2">cupsEncodeOptions2</a></h3> | |
1034 | <p class="description">Encode printer options into IPP attributes for a group.</p> | |
1035 | <p class="code"> | |
1036 | void cupsEncodeOptions2 (<br> | |
1037 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
1038 | int num_options,<br> | |
1039 | cups_option_t *options,<br> | |
79e1d494 | 1040 | <a href="#ipp_tag_t">ipp_tag_t</a> group_tag<br> |
5a738aea MS |
1041 | );</p> |
1042 | <h4 class="parameters">Parameters</h4> | |
1043 | <dl> | |
1044 | <dt>ipp</dt> | |
1045 | <dd class="description">Request to add to</dd> | |
1046 | <dt>num_options</dt> | |
1047 | <dd class="description">Number of options</dd> | |
1048 | <dt>options</dt> | |
1049 | <dd class="description">Options</dd> | |
1050 | <dt>group_tag</dt> | |
1051 | <dd class="description">Group to encode</dd> | |
1052 | </dl> | |
1053 | <h4 class="discussion">Discussion</h4> | |
1054 | <p class="discussion">This function only adds attributes for a single group. Call this | |
ecdc0628 | 1055 | function multiple times for each group, or use cupsEncodeOptions() |
1056 | to add the standard groups. | |
ef416fc2 | 1057 | |
ae71f5de MS |
1058 | </p> |
1059 | <h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsGetDevices">cupsGetDevices</a></h3> | |
1060 | <p class="description">Get available printer devices.</p> | |
1061 | <p class="code"> | |
1062 | ipp_status_t cupsGetDevices (<br> | |
1063 | <a href="#http_t">http_t</a> *http,<br> | |
1064 | int timeout,<br> | |
1065 | const char *exclude_schemes,<br> | |
1066 | cups_device_cb_t callback,<br> | |
1067 | void *user_data<br> | |
1068 | );</p> | |
1069 | <h4 class="parameters">Parameters</h4> | |
1070 | <dl> | |
1071 | <dt>http</dt> | |
1072 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> | |
1073 | <dt>timeout</dt> | |
1074 | <dd class="description">Timeout in seconds or <code>CUPS_TIMEOUT_DEFAULT</code></dd> | |
1075 | <dt>exclude_schemes</dt> | |
1076 | <dd class="description">Comma-separated URI schemes to exclude or <code>CUPS_EXCLUDE_NONE</code></dd> | |
1077 | <dt>callback</dt> | |
1078 | <dd class="description">Callback function</dd> | |
1079 | <dt>user_data</dt> | |
1080 | <dd class="description">User data pointer</dd> | |
1081 | </dl> | |
1082 | <h4 class="returnvalue">Return Value</h4> | |
1083 | <p class="description">Request status - <code>IPP_OK</code> on success.</p> | |
1084 | <h4 class="discussion">Discussion</h4> | |
1085 | <p class="discussion">This function sends a CUPS-Get-Devices request and streams the discovered | |
1086 | devices to the specified callback function. The "timeout" parameter controls | |
1087 | how long the request lasts, while the "exclude_schemes" parameter provides | |
1088 | a comma-delimited list of backends to omit from the request. | |
1089 | ||
1090 | </p> | |
1091 | <h3 class="function"><span class="info"> CUPS 1.1.20 </span><a name="cupsGetFd">cupsGetFd</a></h3> | |
1092 | <p class="description">Get a file from the server.</p> | |
1093 | <p class="code"> | |
79e1d494 | 1094 | <a href="#http_status_t">http_status_t</a> cupsGetFd (<br> |
ae71f5de MS |
1095 | <a href="#http_t">http_t</a> *http,<br> |
1096 | const char *resource,<br> | |
1097 | int fd<br> | |
1098 | );</p> | |
1099 | <h4 class="parameters">Parameters</h4> | |
1100 | <dl> | |
1101 | <dt>http</dt> | |
1102 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> | |
1103 | <dt>resource</dt> | |
1104 | <dd class="description">Resource name</dd> | |
1105 | <dt>fd</dt> | |
1106 | <dd class="description">File descriptor</dd> | |
1107 | </dl> | |
1108 | <h4 class="returnvalue">Return Value</h4> | |
1109 | <p class="description">HTTP status</p> | |
1110 | <h4 class="discussion">Discussion</h4> | |
1111 | <p class="discussion">This function returns <code>HTTP_OK</code> when the file is successfully retrieved. | |
1112 | ||
1113 | </p> | |
1114 | <h3 class="function"><span class="info"> CUPS 1.1.20 </span><a name="cupsGetFile">cupsGetFile</a></h3> | |
1115 | <p class="description">Get a file from the server.</p> | |
1116 | <p class="code"> | |
79e1d494 | 1117 | <a href="#http_status_t">http_status_t</a> cupsGetFile (<br> |
ae71f5de MS |
1118 | <a href="#http_t">http_t</a> *http,<br> |
1119 | const char *resource,<br> | |
1120 | const char *filename<br> | |
1121 | );</p> | |
1122 | <h4 class="parameters">Parameters</h4> | |
1123 | <dl> | |
1124 | <dt>http</dt> | |
1125 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> | |
1126 | <dt>resource</dt> | |
1127 | <dd class="description">Resource name</dd> | |
1128 | <dt>filename</dt> | |
1129 | <dd class="description">Filename</dd> | |
1130 | </dl> | |
1131 | <h4 class="returnvalue">Return Value</h4> | |
1132 | <p class="description">HTTP status</p> | |
1133 | <h4 class="discussion">Discussion</h4> | |
1134 | <p class="discussion">This function returns <code>HTTP_OK</code> when the file is successfully retrieved. | |
1135 | ||
5a738aea MS |
1136 | </p> |
1137 | <h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsGetResponse">cupsGetResponse</a></h3> | |
1138 | <p class="description">Get a response to an IPP request.</p> | |
1139 | <p class="code"> | |
1140 | <a href="#ipp_t">ipp_t</a> *cupsGetResponse (<br> | |
1141 | <a href="#http_t">http_t</a> *http,<br> | |
1142 | const char *resource<br> | |
1143 | );</p> | |
1144 | <h4 class="parameters">Parameters</h4> | |
1145 | <dl> | |
1146 | <dt>http</dt> | |
568fa3fa | 1147 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> |
5a738aea MS |
1148 | <dt>resource</dt> |
1149 | <dd class="description">HTTP resource for POST</dd> | |
1150 | </dl> | |
1151 | <h4 class="returnvalue">Return Value</h4> | |
568fa3fa | 1152 | <p class="description">Response or <code>NULL</code> on HTTP error</p> |
5a738aea MS |
1153 | <h4 class="discussion">Discussion</h4> |
1154 | <p class="discussion">Use this function to get the response for an IPP request sent using | |
1155 | cupsSendDocument() or cupsSendRequest(). For requests that return | |
1156 | additional data, use httpRead() after getting a successful response. | |
1157 | ||
ae71f5de MS |
1158 | </p> |
1159 | <h3 class="function"><span class="info"> CUPS 1.1.20 </span><a name="cupsPutFd">cupsPutFd</a></h3> | |
1160 | <p class="description">Put a file on the server.</p> | |
1161 | <p class="code"> | |
79e1d494 | 1162 | <a href="#http_status_t">http_status_t</a> cupsPutFd (<br> |
ae71f5de MS |
1163 | <a href="#http_t">http_t</a> *http,<br> |
1164 | const char *resource,<br> | |
1165 | int fd<br> | |
1166 | );</p> | |
1167 | <h4 class="parameters">Parameters</h4> | |
1168 | <dl> | |
1169 | <dt>http</dt> | |
1170 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> | |
1171 | <dt>resource</dt> | |
1172 | <dd class="description">Resource name</dd> | |
1173 | <dt>fd</dt> | |
1174 | <dd class="description">File descriptor</dd> | |
1175 | </dl> | |
1176 | <h4 class="returnvalue">Return Value</h4> | |
1177 | <p class="description">HTTP status</p> | |
1178 | <h4 class="discussion">Discussion</h4> | |
1179 | <p class="discussion">This function returns <code>HTTP_CREATED</code> when the file is stored | |
1180 | successfully. | |
1181 | ||
1182 | </p> | |
1183 | <h3 class="function"><span class="info"> CUPS 1.1.20 </span><a name="cupsPutFile">cupsPutFile</a></h3> | |
1184 | <p class="description">Put a file on the server.</p> | |
1185 | <p class="code"> | |
79e1d494 | 1186 | <a href="#http_status_t">http_status_t</a> cupsPutFile (<br> |
ae71f5de MS |
1187 | <a href="#http_t">http_t</a> *http,<br> |
1188 | const char *resource,<br> | |
1189 | const char *filename<br> | |
1190 | );</p> | |
1191 | <h4 class="parameters">Parameters</h4> | |
1192 | <dl> | |
1193 | <dt>http</dt> | |
1194 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> | |
1195 | <dt>resource</dt> | |
1196 | <dd class="description">Resource name</dd> | |
1197 | <dt>filename</dt> | |
1198 | <dd class="description">Filename</dd> | |
1199 | </dl> | |
1200 | <h4 class="returnvalue">Return Value</h4> | |
1201 | <p class="description">HTTP status</p> | |
1202 | <h4 class="discussion">Discussion</h4> | |
1203 | <p class="discussion">This function returns <code>HTTP_CREATED</code> when the file is stored | |
1204 | successfully. | |
1205 | ||
5a738aea MS |
1206 | </p> |
1207 | <h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsReadResponseData">cupsReadResponseData</a></h3> | |
1208 | <p class="description">Read additional data after the IPP response.</p> | |
1209 | <p class="code"> | |
1210 | ssize_t cupsReadResponseData (<br> | |
1211 | <a href="#http_t">http_t</a> *http,<br> | |
1212 | char *buffer,<br> | |
1213 | size_t length<br> | |
1214 | );</p> | |
1215 | <h4 class="parameters">Parameters</h4> | |
1216 | <dl> | |
1217 | <dt>http</dt> | |
568fa3fa | 1218 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> |
5a738aea MS |
1219 | <dt>buffer</dt> |
1220 | <dd class="description">Buffer to use</dd> | |
1221 | <dt>length</dt> | |
1222 | <dd class="description">Number of bytes to read</dd> | |
1223 | </dl> | |
1224 | <h4 class="returnvalue">Return Value</h4> | |
1225 | <p class="description">Bytes read, 0 on EOF, -1 on error</p> | |
1226 | <h4 class="discussion">Discussion</h4> | |
1227 | <p class="discussion">This function is used after cupsGetResponse() to read the PPD or document | |
1228 | files for CUPS_GET_PPD and CUPS_GET_DOCUMENT requests, respectively. | |
1229 | ||
1230 | </p> | |
1231 | <h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsSendRequest">cupsSendRequest</a></h3> | |
1232 | <p class="description">Send an IPP request.</p> | |
1233 | <p class="code"> | |
79e1d494 | 1234 | <a href="#http_status_t">http_status_t</a> cupsSendRequest (<br> |
5a738aea MS |
1235 | <a href="#http_t">http_t</a> *http,<br> |
1236 | <a href="#ipp_t">ipp_t</a> *request,<br> | |
1237 | const char *resource,<br> | |
1238 | size_t length<br> | |
1239 | );</p> | |
1240 | <h4 class="parameters">Parameters</h4> | |
1241 | <dl> | |
1242 | <dt>http</dt> | |
568fa3fa | 1243 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> |
5a738aea MS |
1244 | <dt>request</dt> |
1245 | <dd class="description">IPP request</dd> | |
1246 | <dt>resource</dt> | |
1247 | <dd class="description">Resource path</dd> | |
1248 | <dt>length</dt> | |
ae71f5de | 1249 | <dd class="description">Length of data to follow or <code>CUPS_LENGTH_VARIABLE</code></dd> |
5a738aea MS |
1250 | </dl> |
1251 | <h4 class="returnvalue">Return Value</h4> | |
1252 | <p class="description">Initial HTTP status</p> | |
1253 | <h4 class="discussion">Discussion</h4> | |
1254 | <p class="discussion">Use httpWrite() to write any additional data (document, PPD file, etc.) | |
1255 | for the request, cupsGetResponse() to get the IPP response, and httpRead() | |
1256 | to read any additional data following the response. Only one request can be | |
1257 | sent/queued at a time.<br> | |
1258 | <br> | |
1259 | Unlike cupsDoFileRequest(), cupsDoIORequest(), and cupsDoRequest(), the | |
1260 | request is not freed. | |
1261 | ||
1262 | </p> | |
1263 | <h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsWriteRequestData">cupsWriteRequestData</a></h3> | |
1264 | <p class="description">Write additional data after an IPP request.</p> | |
1265 | <p class="code"> | |
79e1d494 | 1266 | <a href="#http_status_t">http_status_t</a> cupsWriteRequestData (<br> |
5a738aea MS |
1267 | <a href="#http_t">http_t</a> *http,<br> |
1268 | const char *buffer,<br> | |
1269 | size_t length<br> | |
1270 | );</p> | |
1271 | <h4 class="parameters">Parameters</h4> | |
1272 | <dl> | |
1273 | <dt>http</dt> | |
568fa3fa | 1274 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> |
5a738aea MS |
1275 | <dt>buffer</dt> |
1276 | <dd class="description">Bytes to write</dd> | |
1277 | <dt>length</dt> | |
1278 | <dd class="description">Number of bytes to write</dd> | |
1279 | </dl> | |
1280 | <h4 class="returnvalue">Return Value</h4> | |
568fa3fa | 1281 | <p class="description"><code>HTTP_CONTINUE</code> if OK or HTTP status on error</p> |
5a738aea | 1282 | <h4 class="discussion">Discussion</h4> |
568fa3fa MS |
1283 | <p class="discussion">This function is used after <a href="#cupsSendRequest"><code>cupsSendRequest</code></a> to provide a PPD and |
1284 | after <a href="#cupsStartDocument"><code>cupsStartDocument</code></a> to provide a document file. | |
5a738aea MS |
1285 | |
1286 | </p> | |
1287 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpAddrAny">httpAddrAny</a></h3> | |
1288 | <p class="description">Check for the "any" address.</p> | |
1289 | <p class="code"> | |
1290 | int httpAddrAny (<br> | |
1291 | const <a href="#http_addr_t">http_addr_t</a> *addr<br> | |
1292 | );</p> | |
1293 | <h4 class="parameters">Parameters</h4> | |
1294 | <dl> | |
1295 | <dt>addr</dt> | |
1296 | <dd class="description">Address to check</dd> | |
1297 | </dl> | |
1298 | <h4 class="returnvalue">Return Value</h4> | |
1299 | <p class="description">1 if "any", 0 otherwise</p> | |
1300 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpAddrEqual">httpAddrEqual</a></h3> | |
1301 | <p class="description">Compare two addresses.</p> | |
1302 | <p class="code"> | |
1303 | int httpAddrEqual (<br> | |
1304 | const <a href="#http_addr_t">http_addr_t</a> *addr1,<br> | |
1305 | const <a href="#http_addr_t">http_addr_t</a> *addr2<br> | |
1306 | );</p> | |
1307 | <h4 class="parameters">Parameters</h4> | |
1308 | <dl> | |
1309 | <dt>addr1</dt> | |
1310 | <dd class="description">First address</dd> | |
1311 | <dt>addr2</dt> | |
1312 | <dd class="description">Second address</dd> | |
1313 | </dl> | |
1314 | <h4 class="returnvalue">Return Value</h4> | |
1315 | <p class="description">1 if equal, 0 if not</p> | |
1316 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpAddrLength">httpAddrLength</a></h3> | |
1317 | <p class="description">Return the length of the address in bytes.</p> | |
1318 | <p class="code"> | |
1319 | int httpAddrLength (<br> | |
1320 | const <a href="#http_addr_t">http_addr_t</a> *addr<br> | |
1321 | );</p> | |
1322 | <h4 class="parameters">Parameters</h4> | |
1323 | <dl> | |
1324 | <dt>addr</dt> | |
1325 | <dd class="description">Address</dd> | |
1326 | </dl> | |
1327 | <h4 class="returnvalue">Return Value</h4> | |
1328 | <p class="description">Length in bytes</p> | |
1329 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpAddrLocalhost">httpAddrLocalhost</a></h3> | |
1330 | <p class="description">Check for the local loopback address.</p> | |
1331 | <p class="code"> | |
1332 | int httpAddrLocalhost (<br> | |
1333 | const <a href="#http_addr_t">http_addr_t</a> *addr<br> | |
1334 | );</p> | |
1335 | <h4 class="parameters">Parameters</h4> | |
1336 | <dl> | |
1337 | <dt>addr</dt> | |
1338 | <dd class="description">Address to check</dd> | |
1339 | </dl> | |
1340 | <h4 class="returnvalue">Return Value</h4> | |
1341 | <p class="description">1 if local host, 0 otherwise</p> | |
1342 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpAddrLookup">httpAddrLookup</a></h3> | |
1343 | <p class="description">Lookup the hostname associated with the address.</p> | |
1344 | <p class="code"> | |
1345 | char *httpAddrLookup (<br> | |
1346 | const <a href="#http_addr_t">http_addr_t</a> *addr,<br> | |
1347 | char *name,<br> | |
1348 | int namelen<br> | |
1349 | );</p> | |
1350 | <h4 class="parameters">Parameters</h4> | |
1351 | <dl> | |
1352 | <dt>addr</dt> | |
1353 | <dd class="description">Address to lookup</dd> | |
1354 | <dt>name</dt> | |
1355 | <dd class="description">Host name buffer</dd> | |
1356 | <dt>namelen</dt> | |
1357 | <dd class="description">Size of name buffer</dd> | |
1358 | </dl> | |
1359 | <h4 class="returnvalue">Return Value</h4> | |
1360 | <p class="description">Host name</p> | |
1361 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpAddrString">httpAddrString</a></h3> | |
1362 | <p class="description">Convert an address to a numeric string.</p> | |
1363 | <p class="code"> | |
1364 | char *httpAddrString (<br> | |
1365 | const <a href="#http_addr_t">http_addr_t</a> *addr,<br> | |
1366 | char *s,<br> | |
1367 | int slen<br> | |
1368 | );</p> | |
1369 | <h4 class="parameters">Parameters</h4> | |
1370 | <dl> | |
1371 | <dt>addr</dt> | |
1372 | <dd class="description">Address to convert</dd> | |
1373 | <dt>s</dt> | |
1374 | <dd class="description">String buffer</dd> | |
1375 | <dt>slen</dt> | |
1376 | <dd class="description">Length of string</dd> | |
1377 | </dl> | |
1378 | <h4 class="returnvalue">Return Value</h4> | |
1379 | <p class="description">Numeric address string</p> | |
1380 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpAssembleURI">httpAssembleURI</a></h3> | |
1381 | <p class="description">Assemble a uniform resource identifier from its | |
1382 | components.</p> | |
1383 | <p class="code"> | |
79e1d494 MS |
1384 | <a href="#http_uri_status_t">http_uri_status_t</a> httpAssembleURI (<br> |
1385 | <a href="#http_uri_coding_t">http_uri_coding_t</a> encoding,<br> | |
5a738aea MS |
1386 | char *uri,<br> |
1387 | int urilen,<br> | |
1388 | const char *scheme,<br> | |
1389 | const char *username,<br> | |
1390 | const char *host,<br> | |
1391 | int port,<br> | |
1392 | const char *resource<br> | |
1393 | );</p> | |
1394 | <h4 class="parameters">Parameters</h4> | |
1395 | <dl> | |
1396 | <dt>encoding</dt> | |
1397 | <dd class="description">Encoding flags</dd> | |
1398 | <dt>uri</dt> | |
1399 | <dd class="description">URI buffer</dd> | |
1400 | <dt>urilen</dt> | |
1401 | <dd class="description">Size of URI buffer</dd> | |
1402 | <dt>scheme</dt> | |
1403 | <dd class="description">Scheme name</dd> | |
1404 | <dt>username</dt> | |
1405 | <dd class="description">Username</dd> | |
1406 | <dt>host</dt> | |
1407 | <dd class="description">Hostname or address</dd> | |
1408 | <dt>port</dt> | |
1409 | <dd class="description">Port number</dd> | |
1410 | <dt>resource</dt> | |
1411 | <dd class="description">Resource</dd> | |
1412 | </dl> | |
1413 | <h4 class="returnvalue">Return Value</h4> | |
1414 | <p class="description">URI status</p> | |
1415 | <h4 class="discussion">Discussion</h4> | |
1416 | <p class="discussion">This function escapes reserved characters in the URI depending on the | |
ecdc0628 | 1417 | value of the "encoding" argument. You should use this function in |
1418 | place of traditional string functions whenever you need to create a | |
1419 | URI string. | |
ef416fc2 | 1420 | |
5a738aea MS |
1421 | </p> |
1422 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpAssembleURIf">httpAssembleURIf</a></h3> | |
1423 | <p class="description">Assemble a uniform resource identifier from its | |
1424 | components with a formatted resource.</p> | |
1425 | <p class="code"> | |
79e1d494 MS |
1426 | <a href="#http_uri_status_t">http_uri_status_t</a> httpAssembleURIf (<br> |
1427 | <a href="#http_uri_coding_t">http_uri_coding_t</a> encoding,<br> | |
5a738aea MS |
1428 | char *uri,<br> |
1429 | int urilen,<br> | |
1430 | const char *scheme,<br> | |
1431 | const char *username,<br> | |
1432 | const char *host,<br> | |
1433 | int port,<br> | |
1434 | const char *resourcef,<br> | |
1435 | ...<br> | |
1436 | );</p> | |
1437 | <h4 class="parameters">Parameters</h4> | |
1438 | <dl> | |
1439 | <dt>encoding</dt> | |
1440 | <dd class="description">Encoding flags</dd> | |
1441 | <dt>uri</dt> | |
1442 | <dd class="description">URI buffer</dd> | |
1443 | <dt>urilen</dt> | |
1444 | <dd class="description">Size of URI buffer</dd> | |
1445 | <dt>scheme</dt> | |
1446 | <dd class="description">Scheme name</dd> | |
1447 | <dt>username</dt> | |
1448 | <dd class="description">Username</dd> | |
1449 | <dt>host</dt> | |
1450 | <dd class="description">Hostname or address</dd> | |
1451 | <dt>port</dt> | |
1452 | <dd class="description">Port number</dd> | |
1453 | <dt>resourcef</dt> | |
1454 | <dd class="description">Printf-style resource</dd> | |
1455 | <dt>...</dt> | |
1456 | <dd class="description">Additional arguments as needed</dd> | |
1457 | </dl> | |
1458 | <h4 class="returnvalue">Return Value</h4> | |
1459 | <p class="description">URI status</p> | |
1460 | <h4 class="discussion">Discussion</h4> | |
1461 | <p class="discussion">This function creates a formatted version of the resource string | |
ecdc0628 | 1462 | argument "resourcef" and escapes reserved characters in the URI |
1463 | depending on the value of the "encoding" argument. You should use | |
1464 | this function in place of traditional string functions whenever | |
1465 | you need to create a URI string. | |
ef416fc2 | 1466 | |
5a738aea MS |
1467 | </p> |
1468 | <h3 class="function"><a name="httpBlocking">httpBlocking</a></h3> | |
1469 | <p class="description">Set blocking/non-blocking behavior on a connection.</p> | |
1470 | <p class="code"> | |
1471 | void httpBlocking (<br> | |
1472 | <a href="#http_t">http_t</a> *http,<br> | |
1473 | int b<br> | |
1474 | );</p> | |
1475 | <h4 class="parameters">Parameters</h4> | |
1476 | <dl> | |
1477 | <dt>http</dt> | |
568fa3fa | 1478 | <dd class="description">Connection to server</dd> |
5a738aea MS |
1479 | <dt>b</dt> |
1480 | <dd class="description">1 = blocking, 0 = non-blocking</dd> | |
1481 | </dl> | |
1482 | <h3 class="function"><a name="httpCheck">httpCheck</a></h3> | |
1483 | <p class="description">Check to see if there is a pending response from the server.</p> | |
1484 | <p class="code"> | |
1485 | int httpCheck (<br> | |
1486 | <a href="#http_t">http_t</a> *http<br> | |
1487 | );</p> | |
1488 | <h4 class="parameters">Parameters</h4> | |
1489 | <dl> | |
1490 | <dt>http</dt> | |
568fa3fa | 1491 | <dd class="description">Connection to server</dd> |
5a738aea MS |
1492 | </dl> |
1493 | <h4 class="returnvalue">Return Value</h4> | |
1494 | <p class="description">0 = no data, 1 = data available</p> | |
1495 | <h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="httpClearCookie">httpClearCookie</a></h3> | |
1496 | <p class="description">Clear the cookie value(s).</p> | |
1497 | <p class="code"> | |
1498 | void httpClearCookie (<br> | |
1499 | <a href="#http_t">http_t</a> *http<br> | |
1500 | );</p> | |
1501 | <h4 class="parameters">Parameters</h4> | |
1502 | <dl> | |
1503 | <dt>http</dt> | |
568fa3fa | 1504 | <dd class="description">Connection to server</dd> |
5a738aea MS |
1505 | </dl> |
1506 | <h3 class="function"><a name="httpClearFields">httpClearFields</a></h3> | |
1507 | <p class="description">Clear HTTP request fields.</p> | |
1508 | <p class="code"> | |
1509 | void httpClearFields (<br> | |
1510 | <a href="#http_t">http_t</a> *http<br> | |
1511 | );</p> | |
1512 | <h4 class="parameters">Parameters</h4> | |
1513 | <dl> | |
1514 | <dt>http</dt> | |
568fa3fa | 1515 | <dd class="description">Connection to server</dd> |
5a738aea MS |
1516 | </dl> |
1517 | <h3 class="function"><a name="httpClose">httpClose</a></h3> | |
1518 | <p class="description">Close an HTTP connection...</p> | |
1519 | <p class="code"> | |
1520 | void httpClose (<br> | |
1521 | <a href="#http_t">http_t</a> *http<br> | |
1522 | );</p> | |
1523 | <h4 class="parameters">Parameters</h4> | |
1524 | <dl> | |
1525 | <dt>http</dt> | |
568fa3fa | 1526 | <dd class="description">Connection to server</dd> |
5a738aea | 1527 | </dl> |
06d4e77b | 1528 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpConnect">httpConnect</a></h3> |
5a738aea MS |
1529 | <p class="description">Connect to a HTTP server.</p> |
1530 | <p class="code"> | |
1531 | <a href="#http_t">http_t</a> *httpConnect (<br> | |
1532 | const char *host,<br> | |
1533 | int port<br> | |
1534 | );</p> | |
1535 | <h4 class="parameters">Parameters</h4> | |
1536 | <dl> | |
1537 | <dt>host</dt> | |
1538 | <dd class="description">Host to connect to</dd> | |
1539 | <dt>port</dt> | |
1540 | <dd class="description">Port number</dd> | |
1541 | </dl> | |
1542 | <h4 class="returnvalue">Return Value</h4> | |
1543 | <p class="description">New HTTP connection</p> | |
06d4e77b MS |
1544 | <h4 class="discussion">Discussion</h4> |
1545 | <p class="discussion">This function is deprecated - use <a href="#httpConnectEncrypt"><code>httpConnectEncrypt</code></a> instead. | |
1546 | ||
1547 | </p> | |
5a738aea MS |
1548 | <h3 class="function"><a name="httpConnectEncrypt">httpConnectEncrypt</a></h3> |
1549 | <p class="description">Connect to a HTTP server using encryption.</p> | |
1550 | <p class="code"> | |
1551 | <a href="#http_t">http_t</a> *httpConnectEncrypt (<br> | |
1552 | const char *host,<br> | |
1553 | int port,<br> | |
1554 | <a href="#http_encryption_t">http_encryption_t</a> encryption<br> | |
1555 | );</p> | |
1556 | <h4 class="parameters">Parameters</h4> | |
1557 | <dl> | |
1558 | <dt>host</dt> | |
1559 | <dd class="description">Host to connect to</dd> | |
1560 | <dt>port</dt> | |
1561 | <dd class="description">Port number</dd> | |
1562 | <dt>encryption</dt> | |
1563 | <dd class="description">Type of encryption to use</dd> | |
1564 | </dl> | |
1565 | <h4 class="returnvalue">Return Value</h4> | |
1566 | <p class="description">New HTTP connection</p> | |
1567 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpDecode64">httpDecode64</a></h3> | |
1568 | <p class="description">Base64-decode a string.</p> | |
1569 | <p class="code"> | |
1570 | char *httpDecode64 (<br> | |
1571 | char *out,<br> | |
1572 | const char *in<br> | |
1573 | );</p> | |
1574 | <h4 class="parameters">Parameters</h4> | |
1575 | <dl> | |
1576 | <dt>out</dt> | |
1577 | <dd class="description">String to write to</dd> | |
1578 | <dt>in</dt> | |
1579 | <dd class="description">String to read from</dd> | |
1580 | </dl> | |
1581 | <h4 class="returnvalue">Return Value</h4> | |
1582 | <p class="description">Decoded string</p> | |
1583 | <h4 class="discussion">Discussion</h4> | |
1584 | <p class="discussion">This function is deprecated. Use the httpDecode64_2() function instead | |
ecdc0628 | 1585 | which provides buffer length arguments. |
1586 | ||
5a738aea MS |
1587 | </p> |
1588 | <h3 class="function"><span class="info"> CUPS 1.1.21 </span><a name="httpDecode64_2">httpDecode64_2</a></h3> | |
1589 | <p class="description">Base64-decode a string.</p> | |
1590 | <p class="code"> | |
1591 | char *httpDecode64_2 (<br> | |
1592 | char *out,<br> | |
1593 | int *outlen,<br> | |
1594 | const char *in<br> | |
1595 | );</p> | |
1596 | <h4 class="parameters">Parameters</h4> | |
1597 | <dl> | |
1598 | <dt>out</dt> | |
1599 | <dd class="description">String to write to</dd> | |
1600 | <dt>outlen</dt> | |
1601 | <dd class="description">Size of output string</dd> | |
1602 | <dt>in</dt> | |
1603 | <dd class="description">String to read from</dd> | |
1604 | </dl> | |
1605 | <h4 class="returnvalue">Return Value</h4> | |
1606 | <p class="description">Decoded string</p> | |
1607 | <h3 class="function"><a name="httpDelete">httpDelete</a></h3> | |
1608 | <p class="description">Send a DELETE request to the server.</p> | |
1609 | <p class="code"> | |
1610 | int httpDelete (<br> | |
1611 | <a href="#http_t">http_t</a> *http,<br> | |
1612 | const char *uri<br> | |
1613 | );</p> | |
1614 | <h4 class="parameters">Parameters</h4> | |
1615 | <dl> | |
1616 | <dt>http</dt> | |
568fa3fa | 1617 | <dd class="description">Connection to server</dd> |
5a738aea MS |
1618 | <dt>uri</dt> |
1619 | <dd class="description">URI to delete</dd> | |
1620 | </dl> | |
1621 | <h4 class="returnvalue">Return Value</h4> | |
1622 | <p class="description">Status of call (0 = success)</p> | |
1623 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpEncode64">httpEncode64</a></h3> | |
1624 | <p class="description">Base64-encode a string.</p> | |
1625 | <p class="code"> | |
1626 | char *httpEncode64 (<br> | |
1627 | char *out,<br> | |
1628 | const char *in<br> | |
1629 | );</p> | |
1630 | <h4 class="parameters">Parameters</h4> | |
1631 | <dl> | |
1632 | <dt>out</dt> | |
1633 | <dd class="description">String to write to</dd> | |
1634 | <dt>in</dt> | |
1635 | <dd class="description">String to read from</dd> | |
1636 | </dl> | |
1637 | <h4 class="returnvalue">Return Value</h4> | |
1638 | <p class="description">Encoded string</p> | |
1639 | <h4 class="discussion">Discussion</h4> | |
1640 | <p class="discussion">This function is deprecated. Use the httpEncode64_2() function instead | |
ecdc0628 | 1641 | which provides buffer length arguments. |
1642 | ||
5a738aea MS |
1643 | </p> |
1644 | <h3 class="function"><span class="info"> CUPS 1.1.21 </span><a name="httpEncode64_2">httpEncode64_2</a></h3> | |
1645 | <p class="description">Base64-encode a string.</p> | |
1646 | <p class="code"> | |
1647 | char *httpEncode64_2 (<br> | |
1648 | char *out,<br> | |
1649 | int outlen,<br> | |
1650 | const char *in,<br> | |
1651 | int inlen<br> | |
1652 | );</p> | |
1653 | <h4 class="parameters">Parameters</h4> | |
1654 | <dl> | |
1655 | <dt>out</dt> | |
1656 | <dd class="description">String to write to</dd> | |
1657 | <dt>outlen</dt> | |
1658 | <dd class="description">Size of output string</dd> | |
1659 | <dt>in</dt> | |
1660 | <dd class="description">String to read from</dd> | |
1661 | <dt>inlen</dt> | |
1662 | <dd class="description">Size of input string</dd> | |
1663 | </dl> | |
1664 | <h4 class="returnvalue">Return Value</h4> | |
1665 | <p class="description">Encoded string</p> | |
1666 | <h3 class="function"><a name="httpEncryption">httpEncryption</a></h3> | |
1667 | <p class="description">Set the required encryption on the link.</p> | |
1668 | <p class="code"> | |
1669 | int httpEncryption (<br> | |
1670 | <a href="#http_t">http_t</a> *http,<br> | |
1671 | <a href="#http_encryption_t">http_encryption_t</a> e<br> | |
1672 | );</p> | |
1673 | <h4 class="parameters">Parameters</h4> | |
1674 | <dl> | |
1675 | <dt>http</dt> | |
568fa3fa | 1676 | <dd class="description">Connection to server</dd> |
5a738aea MS |
1677 | <dt>e</dt> |
1678 | <dd class="description">New encryption preference</dd> | |
1679 | </dl> | |
1680 | <h4 class="returnvalue">Return Value</h4> | |
1681 | <p class="description">-1 on error, 0 on success</p> | |
1682 | <h3 class="function"><a name="httpError">httpError</a></h3> | |
1683 | <p class="description">Get the last error on a connection.</p> | |
1684 | <p class="code"> | |
1685 | int httpError (<br> | |
1686 | <a href="#http_t">http_t</a> *http<br> | |
1687 | );</p> | |
1688 | <h4 class="parameters">Parameters</h4> | |
1689 | <dl> | |
1690 | <dt>http</dt> | |
568fa3fa | 1691 | <dd class="description">Connection to server</dd> |
5a738aea MS |
1692 | </dl> |
1693 | <h4 class="returnvalue">Return Value</h4> | |
1694 | <p class="description">Error code (errno) value</p> | |
1695 | <h3 class="function"><a name="httpFlush">httpFlush</a></h3> | |
1696 | <p class="description">Flush data from a HTTP connection.</p> | |
1697 | <p class="code"> | |
1698 | void httpFlush (<br> | |
1699 | <a href="#http_t">http_t</a> *http<br> | |
1700 | );</p> | |
1701 | <h4 class="parameters">Parameters</h4> | |
1702 | <dl> | |
1703 | <dt>http</dt> | |
568fa3fa | 1704 | <dd class="description">Connection to server</dd> |
5a738aea MS |
1705 | </dl> |
1706 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpFlushWrite">httpFlushWrite</a></h3> | |
1707 | <p class="description">Flush data in write buffer.</p> | |
1708 | <p class="code"> | |
1709 | int httpFlushWrite (<br> | |
1710 | <a href="#http_t">http_t</a> *http<br> | |
1711 | );</p> | |
1712 | <h4 class="parameters">Parameters</h4> | |
1713 | <dl> | |
1714 | <dt>http</dt> | |
568fa3fa | 1715 | <dd class="description">Connection to server</dd> |
5a738aea MS |
1716 | </dl> |
1717 | <h4 class="returnvalue">Return Value</h4> | |
1718 | <p class="description">Bytes written or -1 on error</p> | |
1719 | <h3 class="function"><a name="httpGet">httpGet</a></h3> | |
1720 | <p class="description">Send a GET request to the server.</p> | |
1721 | <p class="code"> | |
1722 | int httpGet (<br> | |
1723 | <a href="#http_t">http_t</a> *http,<br> | |
1724 | const char *uri<br> | |
1725 | );</p> | |
1726 | <h4 class="parameters">Parameters</h4> | |
1727 | <dl> | |
1728 | <dt>http</dt> | |
568fa3fa | 1729 | <dd class="description">Connection to server</dd> |
5a738aea MS |
1730 | <dt>uri</dt> |
1731 | <dd class="description">URI to get</dd> | |
1732 | </dl> | |
1733 | <h4 class="returnvalue">Return Value</h4> | |
1734 | <p class="description">Status of call (0 = success)</p> | |
1735 | <h3 class="function"><span class="info"> CUPS 1.3 </span><a name="httpGetAuthString">httpGetAuthString</a></h3> | |
1736 | <p class="description">Get the current authorization string.</p> | |
1737 | <p class="code"> | |
1738 | char *httpGetAuthString (<br> | |
1739 | <a href="#http_t">http_t</a> *http<br> | |
1740 | );</p> | |
1741 | <h4 class="parameters">Parameters</h4> | |
1742 | <dl> | |
1743 | <dt>http</dt> | |
568fa3fa | 1744 | <dd class="description">Connection to server</dd> |
5a738aea MS |
1745 | </dl> |
1746 | <h4 class="returnvalue">Return Value</h4> | |
1747 | <p class="description">Authorization string</p> | |
1748 | <h4 class="discussion">Discussion</h4> | |
1749 | <p class="discussion">The authorization string is set by cupsDoAuthentication() and | |
355e94dc MS |
1750 | httpSetAuthString(). Use httpGetAuthString() to retrieve the |
1751 | string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION | |
1752 | value. | |
1753 | ||
5a738aea MS |
1754 | </p> |
1755 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpGetBlocking">httpGetBlocking</a></h3> | |
1756 | <p class="description">Get the blocking/non-block state of a connection.</p> | |
1757 | <p class="code"> | |
1758 | int httpGetBlocking (<br> | |
1759 | <a href="#http_t">http_t</a> *http<br> | |
1760 | );</p> | |
1761 | <h4 class="parameters">Parameters</h4> | |
1762 | <dl> | |
1763 | <dt>http</dt> | |
568fa3fa | 1764 | <dd class="description">Connection to server</dd> |
5a738aea MS |
1765 | </dl> |
1766 | <h4 class="returnvalue">Return Value</h4> | |
1767 | <p class="description">1 if blocking, 0 if non-blocking</p> | |
1768 | <h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="httpGetCookie">httpGetCookie</a></h3> | |
1769 | <p class="description">Get any cookie data from the response.</p> | |
1770 | <p class="code"> | |
1771 | const char *httpGetCookie (<br> | |
1772 | <a href="#http_t">http_t</a> *http<br> | |
1773 | );</p> | |
1774 | <h4 class="parameters">Parameters</h4> | |
1775 | <dl> | |
1776 | <dt>http</dt> | |
1777 | <dd class="description">HTTP connecion</dd> | |
1778 | </dl> | |
1779 | <h4 class="returnvalue">Return Value</h4> | |
1780 | <p class="description">Cookie data or NULL</p> | |
1781 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpGetDateString">httpGetDateString</a></h3> | |
1782 | <p class="description">Get a formatted date/time string from a time value.</p> | |
1783 | <p class="code"> | |
1784 | const char *httpGetDateString (<br> | |
1785 | time_t t<br> | |
1786 | );</p> | |
1787 | <h4 class="parameters">Parameters</h4> | |
1788 | <dl> | |
1789 | <dt>t</dt> | |
1790 | <dd class="description">UNIX time</dd> | |
1791 | </dl> | |
1792 | <h4 class="returnvalue">Return Value</h4> | |
1793 | <p class="description">Date/time string</p> | |
1794 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpGetDateString2">httpGetDateString2</a></h3> | |
1795 | <p class="description">Get a formatted date/time string from a time value.</p> | |
1796 | <p class="code"> | |
1797 | const char *httpGetDateString2 (<br> | |
1798 | time_t t,<br> | |
1799 | char *s,<br> | |
1800 | int slen<br> | |
1801 | );</p> | |
1802 | <h4 class="parameters">Parameters</h4> | |
1803 | <dl> | |
1804 | <dt>t</dt> | |
1805 | <dd class="description">UNIX time</dd> | |
1806 | <dt>s</dt> | |
1807 | <dd class="description">String buffer</dd> | |
1808 | <dt>slen</dt> | |
1809 | <dd class="description">Size of string buffer</dd> | |
1810 | </dl> | |
1811 | <h4 class="returnvalue">Return Value</h4> | |
1812 | <p class="description">Date/time string</p> | |
1813 | <h3 class="function"><a name="httpGetDateTime">httpGetDateTime</a></h3> | |
1814 | <p class="description">Get a time value from a formatted date/time string.</p> | |
1815 | <p class="code"> | |
1816 | time_t httpGetDateTime (<br> | |
1817 | const char *s<br> | |
1818 | );</p> | |
1819 | <h4 class="parameters">Parameters</h4> | |
1820 | <dl> | |
1821 | <dt>s</dt> | |
1822 | <dd class="description">Date/time string</dd> | |
1823 | </dl> | |
1824 | <h4 class="returnvalue">Return Value</h4> | |
1825 | <p class="description">UNIX time</p> | |
1826 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpGetFd">httpGetFd</a></h3> | |
1827 | <p class="description">Get the file descriptor associated with a connection.</p> | |
1828 | <p class="code"> | |
1829 | int httpGetFd (<br> | |
1830 | <a href="#http_t">http_t</a> *http<br> | |
1831 | );</p> | |
1832 | <h4 class="parameters">Parameters</h4> | |
1833 | <dl> | |
1834 | <dt>http</dt> | |
568fa3fa | 1835 | <dd class="description">Connection to server</dd> |
5a738aea MS |
1836 | </dl> |
1837 | <h4 class="returnvalue">Return Value</h4> | |
1838 | <p class="description">File descriptor or -1 if none</p> | |
1839 | <h3 class="function"><a name="httpGetField">httpGetField</a></h3> | |
1840 | <p class="description">Get a field value from a request/response.</p> | |
1841 | <p class="code"> | |
1842 | const char *httpGetField (<br> | |
1843 | <a href="#http_t">http_t</a> *http,<br> | |
79e1d494 | 1844 | <a href="#http_field_t">http_field_t</a> field<br> |
5a738aea MS |
1845 | );</p> |
1846 | <h4 class="parameters">Parameters</h4> | |
1847 | <dl> | |
1848 | <dt>http</dt> | |
568fa3fa | 1849 | <dd class="description">Connection to server</dd> |
5a738aea MS |
1850 | <dt>field</dt> |
1851 | <dd class="description">Field to get</dd> | |
1852 | </dl> | |
1853 | <h4 class="returnvalue">Return Value</h4> | |
1854 | <p class="description">Field value</p> | |
1855 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpGetHostByName">httpGetHostByName</a></h3> | |
1856 | <p class="description">Lookup a hostname or IPv4 address, and return | |
1857 | address records for the specified name.</p> | |
1858 | <p class="code"> | |
1859 | struct hostent *httpGetHostByName (<br> | |
1860 | const char *name<br> | |
1861 | );</p> | |
1862 | <h4 class="parameters">Parameters</h4> | |
1863 | <dl> | |
1864 | <dt>name</dt> | |
1865 | <dd class="description">Hostname or IP address</dd> | |
1866 | </dl> | |
1867 | <h4 class="returnvalue">Return Value</h4> | |
1868 | <p class="description">Host entry</p> | |
1869 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpGetHostname">httpGetHostname</a></h3> | |
1870 | <p class="description">Get the FQDN for the connection or local system.</p> | |
1871 | <p class="code"> | |
1872 | const char *httpGetHostname (<br> | |
1873 | <a href="#http_t">http_t</a> *http,<br> | |
1874 | char *s,<br> | |
1875 | int slen<br> | |
1876 | );</p> | |
1877 | <h4 class="parameters">Parameters</h4> | |
1878 | <dl> | |
1879 | <dt>http</dt> | |
1880 | <dd class="description">HTTP connection or NULL</dd> | |
1881 | <dt>s</dt> | |
1882 | <dd class="description">String buffer for name</dd> | |
1883 | <dt>slen</dt> | |
1884 | <dd class="description">Size of buffer</dd> | |
1885 | </dl> | |
1886 | <h4 class="returnvalue">Return Value</h4> | |
1887 | <p class="description">FQDN for connection or system</p> | |
1888 | <h4 class="discussion">Discussion</h4> | |
1889 | <p class="discussion">When "http" points to a connected socket, return the hostname or | |
80ca4592 | 1890 | address that was used in the call to httpConnect() or httpConnectEncrypt(). |
1891 | Otherwise, return the FQDN for the local system using both gethostname() | |
1892 | and gethostbyname() to get the local hostname with domain. | |
ef416fc2 | 1893 | |
5a738aea MS |
1894 | </p> |
1895 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpGetLength">httpGetLength</a></h3> | |
1896 | <p class="description">Get the amount of data remaining from the | |
1897 | content-length or transfer-encoding fields.</p> | |
1898 | <p class="code"> | |
1899 | int httpGetLength (<br> | |
1900 | <a href="#http_t">http_t</a> *http<br> | |
1901 | );</p> | |
1902 | <h4 class="parameters">Parameters</h4> | |
1903 | <dl> | |
1904 | <dt>http</dt> | |
568fa3fa | 1905 | <dd class="description">Connection to server</dd> |
5a738aea MS |
1906 | </dl> |
1907 | <h4 class="returnvalue">Return Value</h4> | |
1908 | <p class="description">Content length</p> | |
1909 | <h4 class="discussion">Discussion</h4> | |
1910 | <p class="discussion">This function is deprecated and will not return lengths larger than | |
ef416fc2 | 1911 | 2^31 - 1; use httpGetLength2() instead. |
1912 | ||
5a738aea MS |
1913 | </p> |
1914 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpGetLength2">httpGetLength2</a></h3> | |
1915 | <p class="description">Get the amount of data remaining from the | |
1916 | content-length or transfer-encoding fields.</p> | |
1917 | <p class="code"> | |
1918 | off_t httpGetLength2 (<br> | |
1919 | <a href="#http_t">http_t</a> *http<br> | |
1920 | );</p> | |
1921 | <h4 class="parameters">Parameters</h4> | |
1922 | <dl> | |
1923 | <dt>http</dt> | |
568fa3fa | 1924 | <dd class="description">Connection to server</dd> |
5a738aea MS |
1925 | </dl> |
1926 | <h4 class="returnvalue">Return Value</h4> | |
1927 | <p class="description">Content length</p> | |
1928 | <h4 class="discussion">Discussion</h4> | |
1929 | <p class="discussion">This function returns the complete content length, even for | |
ecdc0628 | 1930 | content larger than 2^31 - 1. |
1931 | ||
5a738aea MS |
1932 | </p> |
1933 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpGetStatus">httpGetStatus</a></h3> | |
1934 | <p class="description">Get the status of the last HTTP request.</p> | |
1935 | <p class="code"> | |
79e1d494 | 1936 | <a href="#http_status_t">http_status_t</a> httpGetStatus (<br> |
5a738aea MS |
1937 | <a href="#http_t">http_t</a> *http<br> |
1938 | );</p> | |
1939 | <h4 class="parameters">Parameters</h4> | |
1940 | <dl> | |
1941 | <dt>http</dt> | |
568fa3fa | 1942 | <dd class="description">Connection to server</dd> |
5a738aea MS |
1943 | </dl> |
1944 | <h4 class="returnvalue">Return Value</h4> | |
1945 | <p class="description">HTTP status</p> | |
1946 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpGetSubField">httpGetSubField</a></h3> | |
1947 | <p class="description">Get a sub-field value.</p> | |
1948 | <p class="code"> | |
1949 | char *httpGetSubField (<br> | |
1950 | <a href="#http_t">http_t</a> *http,<br> | |
79e1d494 | 1951 | <a href="#http_field_t">http_field_t</a> field,<br> |
5a738aea MS |
1952 | const char *name,<br> |
1953 | char *value<br> | |
1954 | );</p> | |
1955 | <h4 class="parameters">Parameters</h4> | |
1956 | <dl> | |
1957 | <dt>http</dt> | |
568fa3fa | 1958 | <dd class="description">Connection to server</dd> |
5a738aea MS |
1959 | <dt>field</dt> |
1960 | <dd class="description">Field index</dd> | |
1961 | <dt>name</dt> | |
1962 | <dd class="description">Name of sub-field</dd> | |
1963 | <dt>value</dt> | |
1964 | <dd class="description">Value string</dd> | |
1965 | </dl> | |
1966 | <h4 class="returnvalue">Return Value</h4> | |
1967 | <p class="description">Value or NULL</p> | |
1968 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpGetSubField2">httpGetSubField2</a></h3> | |
1969 | <p class="description">Get a sub-field value.</p> | |
1970 | <p class="code"> | |
1971 | char *httpGetSubField2 (<br> | |
1972 | <a href="#http_t">http_t</a> *http,<br> | |
79e1d494 | 1973 | <a href="#http_field_t">http_field_t</a> field,<br> |
5a738aea MS |
1974 | const char *name,<br> |
1975 | char *value,<br> | |
1976 | int valuelen<br> | |
1977 | );</p> | |
1978 | <h4 class="parameters">Parameters</h4> | |
1979 | <dl> | |
1980 | <dt>http</dt> | |
568fa3fa | 1981 | <dd class="description">Connection to server</dd> |
5a738aea MS |
1982 | <dt>field</dt> |
1983 | <dd class="description">Field index</dd> | |
1984 | <dt>name</dt> | |
1985 | <dd class="description">Name of sub-field</dd> | |
1986 | <dt>value</dt> | |
1987 | <dd class="description">Value string</dd> | |
1988 | <dt>valuelen</dt> | |
1989 | <dd class="description">Size of value buffer</dd> | |
1990 | </dl> | |
1991 | <h4 class="returnvalue">Return Value</h4> | |
1992 | <p class="description">Value or NULL</p> | |
1993 | <h3 class="function"><a name="httpGets">httpGets</a></h3> | |
1994 | <p class="description">Get a line of text from a HTTP connection.</p> | |
1995 | <p class="code"> | |
1996 | char *httpGets (<br> | |
1997 | char *line,<br> | |
1998 | int length,<br> | |
1999 | <a href="#http_t">http_t</a> *http<br> | |
2000 | );</p> | |
2001 | <h4 class="parameters">Parameters</h4> | |
2002 | <dl> | |
2003 | <dt>line</dt> | |
2004 | <dd class="description">Line to read into</dd> | |
2005 | <dt>length</dt> | |
2006 | <dd class="description">Max length of buffer</dd> | |
2007 | <dt>http</dt> | |
568fa3fa | 2008 | <dd class="description">Connection to server</dd> |
5a738aea MS |
2009 | </dl> |
2010 | <h4 class="returnvalue">Return Value</h4> | |
2011 | <p class="description">Line or NULL</p> | |
2012 | <h3 class="function"><a name="httpHead">httpHead</a></h3> | |
2013 | <p class="description">Send a HEAD request to the server.</p> | |
2014 | <p class="code"> | |
2015 | int httpHead (<br> | |
2016 | <a href="#http_t">http_t</a> *http,<br> | |
2017 | const char *uri<br> | |
2018 | );</p> | |
2019 | <h4 class="parameters">Parameters</h4> | |
2020 | <dl> | |
2021 | <dt>http</dt> | |
568fa3fa | 2022 | <dd class="description">Connection to server</dd> |
5a738aea MS |
2023 | <dt>uri</dt> |
2024 | <dd class="description">URI for head</dd> | |
2025 | </dl> | |
2026 | <h4 class="returnvalue">Return Value</h4> | |
2027 | <p class="description">Status of call (0 = success)</p> | |
2028 | <h3 class="function"><a name="httpInitialize">httpInitialize</a></h3> | |
2029 | <p class="description">Initialize the HTTP interface library and set the | |
2030 | default HTTP proxy (if any).</p> | |
2031 | <p class="code"> | |
2032 | void httpInitialize (void);</p> | |
2033 | <h3 class="function"><a name="httpMD5">httpMD5</a></h3> | |
2034 | <p class="description">Compute the MD5 sum of the username:group:password.</p> | |
2035 | <p class="code"> | |
2036 | char *httpMD5 (<br> | |
2037 | const char *username,<br> | |
2038 | const char *realm,<br> | |
2039 | const char *passwd,<br> | |
2040 | char md5[33]<br> | |
2041 | );</p> | |
2042 | <h4 class="parameters">Parameters</h4> | |
2043 | <dl> | |
2044 | <dt>username</dt> | |
2045 | <dd class="description">User name</dd> | |
2046 | <dt>realm</dt> | |
2047 | <dd class="description">Realm name</dd> | |
2048 | <dt>passwd</dt> | |
2049 | <dd class="description">Password string</dd> | |
2050 | <dt>md5[33]</dt> | |
2051 | <dd class="description">MD5 string</dd> | |
2052 | </dl> | |
2053 | <h4 class="returnvalue">Return Value</h4> | |
2054 | <p class="description">MD5 sum</p> | |
2055 | <h3 class="function"><a name="httpMD5Final">httpMD5Final</a></h3> | |
2056 | <p class="description">Combine the MD5 sum of the username, group, and password | |
ef416fc2 | 2057 | with the server-supplied nonce value, method, and |
5a738aea MS |
2058 | request-uri.</p> |
2059 | <p class="code"> | |
2060 | char *httpMD5Final (<br> | |
2061 | const char *nonce,<br> | |
2062 | const char *method,<br> | |
2063 | const char *resource,<br> | |
2064 | char md5[33]<br> | |
2065 | );</p> | |
2066 | <h4 class="parameters">Parameters</h4> | |
2067 | <dl> | |
2068 | <dt>nonce</dt> | |
2069 | <dd class="description">Server nonce value</dd> | |
2070 | <dt>method</dt> | |
2071 | <dd class="description">METHOD (GET, POST, etc.)</dd> | |
2072 | <dt>resource</dt> | |
2073 | <dd class="description">Resource path</dd> | |
2074 | <dt>md5[33]</dt> | |
2075 | <dd class="description">MD5 sum</dd> | |
2076 | </dl> | |
2077 | <h4 class="returnvalue">Return Value</h4> | |
2078 | <p class="description">New sum</p> | |
2079 | <h3 class="function"><a name="httpMD5String">httpMD5String</a></h3> | |
2080 | <p class="description">Convert an MD5 sum to a character string.</p> | |
2081 | <p class="code"> | |
2082 | char *httpMD5String (<br> | |
2083 | const unsigned char *sum,<br> | |
2084 | char md5[33]<br> | |
2085 | );</p> | |
2086 | <h4 class="parameters">Parameters</h4> | |
2087 | <dl> | |
2088 | <dt>sum</dt> | |
2089 | <dd class="description">MD5 sum data</dd> | |
2090 | <dt>md5[33]</dt> | |
2091 | <dd class="description">MD5 sum in hex</dd> | |
2092 | </dl> | |
2093 | <h4 class="returnvalue">Return Value</h4> | |
2094 | <p class="description">MD5 sum in hex</p> | |
2095 | <h3 class="function"><a name="httpOptions">httpOptions</a></h3> | |
2096 | <p class="description">Send an OPTIONS request to the server.</p> | |
2097 | <p class="code"> | |
2098 | int httpOptions (<br> | |
2099 | <a href="#http_t">http_t</a> *http,<br> | |
2100 | const char *uri<br> | |
2101 | );</p> | |
2102 | <h4 class="parameters">Parameters</h4> | |
2103 | <dl> | |
2104 | <dt>http</dt> | |
568fa3fa | 2105 | <dd class="description">Connection to server</dd> |
5a738aea MS |
2106 | <dt>uri</dt> |
2107 | <dd class="description">URI for options</dd> | |
2108 | </dl> | |
2109 | <h4 class="returnvalue">Return Value</h4> | |
2110 | <p class="description">Status of call (0 = success)</p> | |
2111 | <h3 class="function"><a name="httpPost">httpPost</a></h3> | |
2112 | <p class="description">Send a POST request to the server.</p> | |
2113 | <p class="code"> | |
2114 | int httpPost (<br> | |
2115 | <a href="#http_t">http_t</a> *http,<br> | |
2116 | const char *uri<br> | |
2117 | );</p> | |
2118 | <h4 class="parameters">Parameters</h4> | |
2119 | <dl> | |
2120 | <dt>http</dt> | |
568fa3fa | 2121 | <dd class="description">Connection to server</dd> |
5a738aea MS |
2122 | <dt>uri</dt> |
2123 | <dd class="description">URI for post</dd> | |
2124 | </dl> | |
2125 | <h4 class="returnvalue">Return Value</h4> | |
2126 | <p class="description">Status of call (0 = success)</p> | |
2127 | <h3 class="function"><a name="httpPut">httpPut</a></h3> | |
2128 | <p class="description">Send a PUT request to the server.</p> | |
2129 | <p class="code"> | |
2130 | int httpPut (<br> | |
2131 | <a href="#http_t">http_t</a> *http,<br> | |
2132 | const char *uri<br> | |
2133 | );</p> | |
2134 | <h4 class="parameters">Parameters</h4> | |
2135 | <dl> | |
2136 | <dt>http</dt> | |
568fa3fa | 2137 | <dd class="description">Connection to server</dd> |
5a738aea MS |
2138 | <dt>uri</dt> |
2139 | <dd class="description">URI to put</dd> | |
2140 | </dl> | |
2141 | <h4 class="returnvalue">Return Value</h4> | |
2142 | <p class="description">Status of call (0 = success)</p> | |
2143 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpRead">httpRead</a></h3> | |
2144 | <p class="description">Read data from a HTTP connection.</p> | |
2145 | <p class="code"> | |
2146 | int httpRead (<br> | |
2147 | <a href="#http_t">http_t</a> *http,<br> | |
2148 | char *buffer,<br> | |
2149 | int length<br> | |
2150 | );</p> | |
2151 | <h4 class="parameters">Parameters</h4> | |
2152 | <dl> | |
2153 | <dt>http</dt> | |
568fa3fa | 2154 | <dd class="description">Connection to server</dd> |
5a738aea MS |
2155 | <dt>buffer</dt> |
2156 | <dd class="description">Buffer for data</dd> | |
2157 | <dt>length</dt> | |
2158 | <dd class="description">Maximum number of bytes</dd> | |
2159 | </dl> | |
2160 | <h4 class="returnvalue">Return Value</h4> | |
2161 | <p class="description">Number of bytes read</p> | |
2162 | <h4 class="discussion">Discussion</h4> | |
2163 | <p class="discussion">This function is deprecated. Use the httpRead2() function which can | |
ecdc0628 | 2164 | read more than 2GB of data. |
2165 | ||
5a738aea MS |
2166 | </p> |
2167 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpRead2">httpRead2</a></h3> | |
2168 | <p class="description">Read data from a HTTP connection.</p> | |
2169 | <p class="code"> | |
2170 | ssize_t httpRead2 (<br> | |
2171 | <a href="#http_t">http_t</a> *http,<br> | |
2172 | char *buffer,<br> | |
2173 | size_t length<br> | |
2174 | );</p> | |
2175 | <h4 class="parameters">Parameters</h4> | |
2176 | <dl> | |
2177 | <dt>http</dt> | |
568fa3fa | 2178 | <dd class="description">Connection to server</dd> |
5a738aea MS |
2179 | <dt>buffer</dt> |
2180 | <dd class="description">Buffer for data</dd> | |
2181 | <dt>length</dt> | |
2182 | <dd class="description">Maximum number of bytes</dd> | |
2183 | </dl> | |
2184 | <h4 class="returnvalue">Return Value</h4> | |
2185 | <p class="description">Number of bytes read</p> | |
2186 | <h3 class="function"><a name="httpReconnect">httpReconnect</a></h3> | |
2187 | <p class="description">Reconnect to a HTTP server.</p> | |
2188 | <p class="code"> | |
2189 | int httpReconnect (<br> | |
2190 | <a href="#http_t">http_t</a> *http<br> | |
2191 | );</p> | |
2192 | <h4 class="parameters">Parameters</h4> | |
2193 | <dl> | |
2194 | <dt>http</dt> | |
568fa3fa | 2195 | <dd class="description">Connection to server</dd> |
5a738aea MS |
2196 | </dl> |
2197 | <h4 class="returnvalue">Return Value</h4> | |
2198 | <p class="description">0 on success, non-zero on failure</p> | |
2199 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpSeparate">httpSeparate</a></h3> | |
2200 | <p class="description">Separate a Universal Resource Identifier into its | |
2201 | components.</p> | |
2202 | <p class="code"> | |
2203 | void httpSeparate (<br> | |
2204 | const char *uri,<br> | |
2205 | char *scheme,<br> | |
2206 | char *username,<br> | |
2207 | char *host,<br> | |
2208 | int *port,<br> | |
2209 | char *resource<br> | |
2210 | );</p> | |
2211 | <h4 class="parameters">Parameters</h4> | |
2212 | <dl> | |
2213 | <dt>uri</dt> | |
2214 | <dd class="description">Universal Resource Identifier</dd> | |
2215 | <dt>scheme</dt> | |
2216 | <dd class="description">Scheme [32] (http, https, etc.)</dd> | |
2217 | <dt>username</dt> | |
2218 | <dd class="description">Username [1024]</dd> | |
2219 | <dt>host</dt> | |
2220 | <dd class="description">Hostname [1024]</dd> | |
2221 | <dt>port</dt> | |
2222 | <dd class="description">Port number to use</dd> | |
2223 | <dt>resource</dt> | |
2224 | <dd class="description">Resource/filename [1024]</dd> | |
2225 | </dl> | |
2226 | <h4 class="discussion">Discussion</h4> | |
2227 | <p class="discussion">This function is deprecated; use the httpSeparateURI() function instead. | |
2228 | ||
2229 | </p> | |
2230 | <h3 class="function"><span class="info"> CUPS 1.1.21 </span><a name="httpSeparate2">httpSeparate2</a></h3> | |
2231 | <p class="description">Separate a Universal Resource Identifier into its | |
2232 | components.</p> | |
2233 | <p class="code"> | |
2234 | void httpSeparate2 (<br> | |
2235 | const char *uri,<br> | |
2236 | char *scheme,<br> | |
2237 | int schemelen,<br> | |
2238 | char *username,<br> | |
2239 | int usernamelen,<br> | |
2240 | char *host,<br> | |
2241 | int hostlen,<br> | |
2242 | int *port,<br> | |
2243 | char *resource,<br> | |
2244 | int resourcelen<br> | |
2245 | );</p> | |
2246 | <h4 class="parameters">Parameters</h4> | |
2247 | <dl> | |
2248 | <dt>uri</dt> | |
2249 | <dd class="description">Universal Resource Identifier</dd> | |
2250 | <dt>scheme</dt> | |
2251 | <dd class="description">Scheme (http, https, etc.)</dd> | |
2252 | <dt>schemelen</dt> | |
2253 | <dd class="description">Size of scheme buffer</dd> | |
2254 | <dt>username</dt> | |
2255 | <dd class="description">Username</dd> | |
2256 | <dt>usernamelen</dt> | |
2257 | <dd class="description">Size of username buffer</dd> | |
2258 | <dt>host</dt> | |
2259 | <dd class="description">Hostname</dd> | |
2260 | <dt>hostlen</dt> | |
2261 | <dd class="description">Size of hostname buffer</dd> | |
2262 | <dt>port</dt> | |
2263 | <dd class="description">Port number to use</dd> | |
2264 | <dt>resource</dt> | |
2265 | <dd class="description">Resource/filename</dd> | |
2266 | <dt>resourcelen</dt> | |
2267 | <dd class="description">Size of resource buffer</dd> | |
2268 | </dl> | |
2269 | <h4 class="discussion">Discussion</h4> | |
2270 | <p class="discussion">This function is deprecated; use the httpSeparateURI() function instead. | |
2271 | ||
2272 | ||
2273 | </p> | |
2274 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpSeparateURI">httpSeparateURI</a></h3> | |
2275 | <p class="description">Separate a Universal Resource Identifier into its | |
2276 | components.</p> | |
2277 | <p class="code"> | |
79e1d494 MS |
2278 | <a href="#http_uri_status_t">http_uri_status_t</a> httpSeparateURI (<br> |
2279 | <a href="#http_uri_coding_t">http_uri_coding_t</a> decoding,<br> | |
5a738aea MS |
2280 | const char *uri,<br> |
2281 | char *scheme,<br> | |
2282 | int schemelen,<br> | |
2283 | char *username,<br> | |
2284 | int usernamelen,<br> | |
2285 | char *host,<br> | |
2286 | int hostlen,<br> | |
2287 | int *port,<br> | |
2288 | char *resource,<br> | |
2289 | int resourcelen<br> | |
2290 | );</p> | |
2291 | <h4 class="parameters">Parameters</h4> | |
2292 | <dl> | |
2293 | <dt>decoding</dt> | |
2294 | <dd class="description">Decoding flags</dd> | |
2295 | <dt>uri</dt> | |
2296 | <dd class="description">Universal Resource Identifier</dd> | |
2297 | <dt>scheme</dt> | |
2298 | <dd class="description">Scheme (http, https, etc.)</dd> | |
2299 | <dt>schemelen</dt> | |
2300 | <dd class="description">Size of scheme buffer</dd> | |
2301 | <dt>username</dt> | |
2302 | <dd class="description">Username</dd> | |
2303 | <dt>usernamelen</dt> | |
2304 | <dd class="description">Size of username buffer</dd> | |
2305 | <dt>host</dt> | |
2306 | <dd class="description">Hostname</dd> | |
2307 | <dt>hostlen</dt> | |
2308 | <dd class="description">Size of hostname buffer</dd> | |
2309 | <dt>port</dt> | |
2310 | <dd class="description">Port number to use</dd> | |
2311 | <dt>resource</dt> | |
2312 | <dd class="description">Resource/filename</dd> | |
2313 | <dt>resourcelen</dt> | |
2314 | <dd class="description">Size of resource buffer</dd> | |
2315 | </dl> | |
2316 | <h4 class="returnvalue">Return Value</h4> | |
2317 | <p class="description">Result of separation</p> | |
2318 | <h3 class="function"><span class="info"> CUPS 1.3 </span><a name="httpSetAuthString">httpSetAuthString</a></h3> | |
2319 | <p class="description">Set the current authorization string.</p> | |
2320 | <p class="code"> | |
2321 | void httpSetAuthString (<br> | |
2322 | <a href="#http_t">http_t</a> *http,<br> | |
2323 | const char *scheme,<br> | |
2324 | const char *data<br> | |
2325 | );</p> | |
2326 | <h4 class="parameters">Parameters</h4> | |
2327 | <dl> | |
2328 | <dt>http</dt> | |
568fa3fa | 2329 | <dd class="description">Connection to server</dd> |
5a738aea MS |
2330 | <dt>scheme</dt> |
2331 | <dd class="description">Auth scheme (NULL to clear it)</dd> | |
2332 | <dt>data</dt> | |
2333 | <dd class="description">Auth data (NULL for none)</dd> | |
2334 | </dl> | |
2335 | <h4 class="discussion">Discussion</h4> | |
2336 | <p class="discussion">This function just stores a copy of the current authorization string in | |
355e94dc MS |
2337 | the HTTP connection object. You must still call httpSetField() to set |
2338 | HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(), | |
2339 | httpHead(), httpOptions(), httpPost, or httpPut(). | |
2340 | ||
5a738aea MS |
2341 | </p> |
2342 | <h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="httpSetCookie">httpSetCookie</a></h3> | |
2343 | <p class="description">Set the cookie value(s)...</p> | |
2344 | <p class="code"> | |
2345 | void httpSetCookie (<br> | |
2346 | <a href="#http_t">http_t</a> *http,<br> | |
2347 | const char *cookie<br> | |
2348 | );</p> | |
2349 | <h4 class="parameters">Parameters</h4> | |
2350 | <dl> | |
2351 | <dt>http</dt> | |
2352 | <dd class="description">Connection</dd> | |
2353 | <dt>cookie</dt> | |
2354 | <dd class="description">Cookie string</dd> | |
2355 | </dl> | |
2356 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpSetExpect">httpSetExpect</a></h3> | |
2357 | <p class="description">Set the Expect: header in a request.</p> | |
2358 | <p class="code"> | |
2359 | void httpSetExpect (<br> | |
2360 | <a href="#http_t">http_t</a> *http,<br> | |
79e1d494 | 2361 | <a href="#http_status_t">http_status_t</a> expect<br> |
5a738aea MS |
2362 | );</p> |
2363 | <h4 class="parameters">Parameters</h4> | |
2364 | <dl> | |
2365 | <dt>http</dt> | |
568fa3fa | 2366 | <dd class="description">Connection to server</dd> |
5a738aea MS |
2367 | <dt>expect</dt> |
2368 | <dd class="description">HTTP status to expect (HTTP_CONTINUE)</dd> | |
2369 | </dl> | |
2370 | <h4 class="discussion">Discussion</h4> | |
2371 | <p class="discussion">Currently only HTTP_CONTINUE is supported for the "expect" argument. | |
2372 | ||
2373 | </p> | |
2374 | <h3 class="function"><a name="httpSetField">httpSetField</a></h3> | |
2375 | <p class="description">Set the value of an HTTP header.</p> | |
2376 | <p class="code"> | |
2377 | void httpSetField (<br> | |
2378 | <a href="#http_t">http_t</a> *http,<br> | |
79e1d494 | 2379 | <a href="#http_field_t">http_field_t</a> field,<br> |
5a738aea MS |
2380 | const char *value<br> |
2381 | );</p> | |
2382 | <h4 class="parameters">Parameters</h4> | |
2383 | <dl> | |
2384 | <dt>http</dt> | |
568fa3fa | 2385 | <dd class="description">Connection to server</dd> |
5a738aea MS |
2386 | <dt>field</dt> |
2387 | <dd class="description">Field index</dd> | |
2388 | <dt>value</dt> | |
2389 | <dd class="description">Value</dd> | |
2390 | </dl> | |
2391 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpSetLength">httpSetLength</a></h3> | |
2392 | <p class="description">Set the content-length and content-encoding.</p> | |
2393 | <p class="code"> | |
2394 | void httpSetLength (<br> | |
2395 | <a href="#http_t">http_t</a> *http,<br> | |
2396 | size_t length<br> | |
2397 | );</p> | |
2398 | <h4 class="parameters">Parameters</h4> | |
2399 | <dl> | |
2400 | <dt>http</dt> | |
568fa3fa | 2401 | <dd class="description">Connection to server</dd> |
5a738aea MS |
2402 | <dt>length</dt> |
2403 | <dd class="description">Length (0 for chunked)</dd> | |
2404 | </dl> | |
2405 | <h3 class="function"><a name="httpStatus">httpStatus</a></h3> | |
2406 | <p class="description">Return a short string describing a HTTP status code.</p> | |
2407 | <p class="code"> | |
2408 | const char *httpStatus (<br> | |
79e1d494 | 2409 | <a href="#http_status_t">http_status_t</a> status<br> |
5a738aea MS |
2410 | );</p> |
2411 | <h4 class="parameters">Parameters</h4> | |
2412 | <dl> | |
2413 | <dt>status</dt> | |
2414 | <dd class="description">HTTP status code</dd> | |
2415 | </dl> | |
2416 | <h4 class="returnvalue">Return Value</h4> | |
06d4e77b MS |
2417 | <p class="description">Localized status string</p> |
2418 | <h4 class="discussion">Discussion</h4> | |
2419 | <p class="discussion">The returned string is localized to the current POSIX locale and is based | |
2420 | on the status strings defined in RFC 2616.</p> | |
5a738aea MS |
2421 | <h3 class="function"><a name="httpTrace">httpTrace</a></h3> |
2422 | <p class="description">Send an TRACE request to the server.</p> | |
2423 | <p class="code"> | |
2424 | int httpTrace (<br> | |
2425 | <a href="#http_t">http_t</a> *http,<br> | |
2426 | const char *uri<br> | |
2427 | );</p> | |
2428 | <h4 class="parameters">Parameters</h4> | |
2429 | <dl> | |
2430 | <dt>http</dt> | |
568fa3fa | 2431 | <dd class="description">Connection to server</dd> |
5a738aea MS |
2432 | <dt>uri</dt> |
2433 | <dd class="description">URI for trace</dd> | |
2434 | </dl> | |
2435 | <h4 class="returnvalue">Return Value</h4> | |
2436 | <p class="description">Status of call (0 = success)</p> | |
2437 | <h3 class="function"><a name="httpUpdate">httpUpdate</a></h3> | |
2438 | <p class="description">Update the current HTTP state for incoming data.</p> | |
2439 | <p class="code"> | |
79e1d494 | 2440 | <a href="#http_status_t">http_status_t</a> httpUpdate (<br> |
5a738aea MS |
2441 | <a href="#http_t">http_t</a> *http<br> |
2442 | );</p> | |
2443 | <h4 class="parameters">Parameters</h4> | |
2444 | <dl> | |
2445 | <dt>http</dt> | |
568fa3fa | 2446 | <dd class="description">Connection to server</dd> |
5a738aea MS |
2447 | </dl> |
2448 | <h4 class="returnvalue">Return Value</h4> | |
2449 | <p class="description">HTTP status</p> | |
2450 | <h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="httpWait">httpWait</a></h3> | |
2451 | <p class="description">Wait for data available on a connection.</p> | |
2452 | <p class="code"> | |
2453 | int httpWait (<br> | |
2454 | <a href="#http_t">http_t</a> *http,<br> | |
2455 | int msec<br> | |
2456 | );</p> | |
2457 | <h4 class="parameters">Parameters</h4> | |
2458 | <dl> | |
2459 | <dt>http</dt> | |
568fa3fa | 2460 | <dd class="description">Connection to server</dd> |
5a738aea MS |
2461 | <dt>msec</dt> |
2462 | <dd class="description">Milliseconds to wait</dd> | |
2463 | </dl> | |
2464 | <h4 class="returnvalue">Return Value</h4> | |
2465 | <p class="description">1 if data is available, 0 otherwise</p> | |
2466 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpWrite">httpWrite</a></h3> | |
2467 | <p class="description">Write data to a HTTP connection.</p> | |
2468 | <p class="code"> | |
2469 | int httpWrite (<br> | |
2470 | <a href="#http_t">http_t</a> *http,<br> | |
2471 | const char *buffer,<br> | |
2472 | int length<br> | |
2473 | );</p> | |
2474 | <h4 class="parameters">Parameters</h4> | |
2475 | <dl> | |
2476 | <dt>http</dt> | |
568fa3fa | 2477 | <dd class="description">Connection to server</dd> |
5a738aea MS |
2478 | <dt>buffer</dt> |
2479 | <dd class="description">Buffer for data</dd> | |
2480 | <dt>length</dt> | |
2481 | <dd class="description">Number of bytes to write</dd> | |
2482 | </dl> | |
2483 | <h4 class="returnvalue">Return Value</h4> | |
2484 | <p class="description">Number of bytes written</p> | |
2485 | <h4 class="discussion">Discussion</h4> | |
2486 | <p class="discussion">This function is deprecated. Use the httpWrite2() function which can | |
ecdc0628 | 2487 | write more than 2GB of data. |
2488 | ||
5a738aea MS |
2489 | </p> |
2490 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="httpWrite2">httpWrite2</a></h3> | |
2491 | <p class="description">Write data to a HTTP connection.</p> | |
2492 | <p class="code"> | |
2493 | ssize_t httpWrite2 (<br> | |
2494 | <a href="#http_t">http_t</a> *http,<br> | |
2495 | const char *buffer,<br> | |
2496 | size_t length<br> | |
2497 | );</p> | |
2498 | <h4 class="parameters">Parameters</h4> | |
2499 | <dl> | |
2500 | <dt>http</dt> | |
568fa3fa | 2501 | <dd class="description">Connection to server</dd> |
5a738aea MS |
2502 | <dt>buffer</dt> |
2503 | <dd class="description">Buffer for data</dd> | |
2504 | <dt>length</dt> | |
2505 | <dd class="description">Number of bytes to write</dd> | |
2506 | </dl> | |
2507 | <h4 class="returnvalue">Return Value</h4> | |
2508 | <p class="description">Number of bytes written</p> | |
2509 | <h3 class="function"><a name="ippAddBoolean">ippAddBoolean</a></h3> | |
2510 | <p class="description">Add a boolean attribute to an IPP message.</p> | |
2511 | <p class="code"> | |
2512 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddBoolean (<br> | |
2513 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
79e1d494 | 2514 | <a href="#ipp_tag_t">ipp_tag_t</a> group,<br> |
5a738aea MS |
2515 | const char *name,<br> |
2516 | char value<br> | |
2517 | );</p> | |
2518 | <h4 class="parameters">Parameters</h4> | |
2519 | <dl> | |
2520 | <dt>ipp</dt> | |
2521 | <dd class="description">IPP message</dd> | |
2522 | <dt>group</dt> | |
2523 | <dd class="description">IPP group</dd> | |
2524 | <dt>name</dt> | |
2525 | <dd class="description">Name of attribute</dd> | |
2526 | <dt>value</dt> | |
2527 | <dd class="description">Value of attribute</dd> | |
2528 | </dl> | |
2529 | <h4 class="returnvalue">Return Value</h4> | |
2530 | <p class="description">New attribute</p> | |
2531 | <h3 class="function"><a name="ippAddBooleans">ippAddBooleans</a></h3> | |
2532 | <p class="description">Add an array of boolean values.</p> | |
2533 | <p class="code"> | |
2534 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddBooleans (<br> | |
2535 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
79e1d494 | 2536 | <a href="#ipp_tag_t">ipp_tag_t</a> group,<br> |
5a738aea MS |
2537 | const char *name,<br> |
2538 | int num_values,<br> | |
2539 | const char *values<br> | |
2540 | );</p> | |
2541 | <h4 class="parameters">Parameters</h4> | |
2542 | <dl> | |
2543 | <dt>ipp</dt> | |
2544 | <dd class="description">IPP message</dd> | |
2545 | <dt>group</dt> | |
2546 | <dd class="description">IPP group</dd> | |
2547 | <dt>name</dt> | |
2548 | <dd class="description">Name of attribute</dd> | |
2549 | <dt>num_values</dt> | |
2550 | <dd class="description">Number of values</dd> | |
2551 | <dt>values</dt> | |
2552 | <dd class="description">Values</dd> | |
2553 | </dl> | |
2554 | <h4 class="returnvalue">Return Value</h4> | |
2555 | <p class="description">New attribute</p> | |
2556 | <h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="ippAddCollection">ippAddCollection</a></h3> | |
2557 | <p class="description">Add a collection value.</p> | |
2558 | <p class="code"> | |
2559 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddCollection (<br> | |
2560 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
79e1d494 | 2561 | <a href="#ipp_tag_t">ipp_tag_t</a> group,<br> |
5a738aea MS |
2562 | const char *name,<br> |
2563 | <a href="#ipp_t">ipp_t</a> *value<br> | |
2564 | );</p> | |
2565 | <h4 class="parameters">Parameters</h4> | |
2566 | <dl> | |
2567 | <dt>ipp</dt> | |
2568 | <dd class="description">IPP message</dd> | |
2569 | <dt>group</dt> | |
2570 | <dd class="description">IPP group</dd> | |
2571 | <dt>name</dt> | |
2572 | <dd class="description">Name of attribute</dd> | |
2573 | <dt>value</dt> | |
2574 | <dd class="description">Value</dd> | |
2575 | </dl> | |
2576 | <h4 class="returnvalue">Return Value</h4> | |
2577 | <p class="description">New attribute</p> | |
2578 | <h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="ippAddCollections">ippAddCollections</a></h3> | |
2579 | <p class="description">Add an array of collection values.</p> | |
2580 | <p class="code"> | |
2581 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddCollections (<br> | |
2582 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
79e1d494 | 2583 | <a href="#ipp_tag_t">ipp_tag_t</a> group,<br> |
5a738aea MS |
2584 | const char *name,<br> |
2585 | int num_values,<br> | |
2586 | const <a href="#ipp_t">ipp_t</a> **values<br> | |
2587 | );</p> | |
2588 | <h4 class="parameters">Parameters</h4> | |
2589 | <dl> | |
2590 | <dt>ipp</dt> | |
2591 | <dd class="description">IPP message</dd> | |
2592 | <dt>group</dt> | |
2593 | <dd class="description">IPP group</dd> | |
2594 | <dt>name</dt> | |
2595 | <dd class="description">Name of attribute</dd> | |
2596 | <dt>num_values</dt> | |
2597 | <dd class="description">Number of values</dd> | |
2598 | <dt>values</dt> | |
2599 | <dd class="description">Values</dd> | |
2600 | </dl> | |
2601 | <h4 class="returnvalue">Return Value</h4> | |
2602 | <p class="description">New attribute</p> | |
2603 | <h3 class="function"><a name="ippAddDate">ippAddDate</a></h3> | |
2604 | <p class="description">Add a date attribute to an IPP message.</p> | |
2605 | <p class="code"> | |
2606 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddDate (<br> | |
2607 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
79e1d494 | 2608 | <a href="#ipp_tag_t">ipp_tag_t</a> group,<br> |
5a738aea MS |
2609 | const char *name,<br> |
2610 | const <a href="#ipp_uchar_t">ipp_uchar_t</a> *value<br> | |
2611 | );</p> | |
2612 | <h4 class="parameters">Parameters</h4> | |
2613 | <dl> | |
2614 | <dt>ipp</dt> | |
2615 | <dd class="description">IPP message</dd> | |
2616 | <dt>group</dt> | |
2617 | <dd class="description">IPP group</dd> | |
2618 | <dt>name</dt> | |
2619 | <dd class="description">Name of attribute</dd> | |
2620 | <dt>value</dt> | |
2621 | <dd class="description">Value</dd> | |
2622 | </dl> | |
2623 | <h4 class="returnvalue">Return Value</h4> | |
2624 | <p class="description">New attribute</p> | |
2625 | <h3 class="function"><a name="ippAddInteger">ippAddInteger</a></h3> | |
2626 | <p class="description">Add a integer attribute to an IPP message.</p> | |
2627 | <p class="code"> | |
2628 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddInteger (<br> | |
2629 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
79e1d494 MS |
2630 | <a href="#ipp_tag_t">ipp_tag_t</a> group,<br> |
2631 | <a href="#ipp_tag_t">ipp_tag_t</a> type,<br> | |
5a738aea MS |
2632 | const char *name,<br> |
2633 | int value<br> | |
2634 | );</p> | |
2635 | <h4 class="parameters">Parameters</h4> | |
2636 | <dl> | |
2637 | <dt>ipp</dt> | |
2638 | <dd class="description">IPP message</dd> | |
2639 | <dt>group</dt> | |
2640 | <dd class="description">IPP group</dd> | |
2641 | <dt>type</dt> | |
2642 | <dd class="description">Type of attribute</dd> | |
2643 | <dt>name</dt> | |
2644 | <dd class="description">Name of attribute</dd> | |
2645 | <dt>value</dt> | |
2646 | <dd class="description">Value of attribute</dd> | |
2647 | </dl> | |
2648 | <h4 class="returnvalue">Return Value</h4> | |
2649 | <p class="description">New attribute</p> | |
2650 | <h3 class="function"><a name="ippAddIntegers">ippAddIntegers</a></h3> | |
2651 | <p class="description">Add an array of integer values.</p> | |
2652 | <p class="code"> | |
2653 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddIntegers (<br> | |
2654 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
79e1d494 MS |
2655 | <a href="#ipp_tag_t">ipp_tag_t</a> group,<br> |
2656 | <a href="#ipp_tag_t">ipp_tag_t</a> type,<br> | |
5a738aea MS |
2657 | const char *name,<br> |
2658 | int num_values,<br> | |
2659 | const int *values<br> | |
2660 | );</p> | |
2661 | <h4 class="parameters">Parameters</h4> | |
2662 | <dl> | |
2663 | <dt>ipp</dt> | |
2664 | <dd class="description">IPP message</dd> | |
2665 | <dt>group</dt> | |
2666 | <dd class="description">IPP group</dd> | |
2667 | <dt>type</dt> | |
2668 | <dd class="description">Type of attribute</dd> | |
2669 | <dt>name</dt> | |
2670 | <dd class="description">Name of attribute</dd> | |
2671 | <dt>num_values</dt> | |
2672 | <dd class="description">Number of values</dd> | |
2673 | <dt>values</dt> | |
2674 | <dd class="description">Values</dd> | |
2675 | </dl> | |
2676 | <h4 class="returnvalue">Return Value</h4> | |
2677 | <p class="description">New attribute</p> | |
2678 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ippAddOctetString">ippAddOctetString</a></h3> | |
2679 | <p class="description">Add an octetString value to an IPP message.</p> | |
2680 | <p class="code"> | |
2681 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddOctetString (<br> | |
2682 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
79e1d494 | 2683 | <a href="#ipp_tag_t">ipp_tag_t</a> group,<br> |
5a738aea MS |
2684 | const char *name,<br> |
2685 | const void *data,<br> | |
2686 | int datalen<br> | |
2687 | );</p> | |
2688 | <h4 class="parameters">Parameters</h4> | |
2689 | <dl> | |
2690 | <dt>ipp</dt> | |
2691 | <dd class="description">IPP message</dd> | |
2692 | <dt>group</dt> | |
2693 | <dd class="description">IPP group</dd> | |
2694 | <dt>name</dt> | |
2695 | <dd class="description">Name of attribute</dd> | |
2696 | <dt>data</dt> | |
2697 | <dd class="description">octetString data</dd> | |
2698 | <dt>datalen</dt> | |
2699 | <dd class="description">Length of data in bytes</dd> | |
2700 | </dl> | |
2701 | <h4 class="returnvalue">Return Value</h4> | |
2702 | <p class="description">New attribute</p> | |
2703 | <h3 class="function"><a name="ippAddRange">ippAddRange</a></h3> | |
2704 | <p class="description">Add a range of values to an IPP message.</p> | |
2705 | <p class="code"> | |
2706 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddRange (<br> | |
2707 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
79e1d494 | 2708 | <a href="#ipp_tag_t">ipp_tag_t</a> group,<br> |
5a738aea MS |
2709 | const char *name,<br> |
2710 | int lower,<br> | |
2711 | int upper<br> | |
2712 | );</p> | |
2713 | <h4 class="parameters">Parameters</h4> | |
2714 | <dl> | |
2715 | <dt>ipp</dt> | |
2716 | <dd class="description">IPP message</dd> | |
2717 | <dt>group</dt> | |
2718 | <dd class="description">IPP group</dd> | |
2719 | <dt>name</dt> | |
2720 | <dd class="description">Name of attribute</dd> | |
2721 | <dt>lower</dt> | |
2722 | <dd class="description">Lower value</dd> | |
2723 | <dt>upper</dt> | |
2724 | <dd class="description">Upper value</dd> | |
2725 | </dl> | |
2726 | <h4 class="returnvalue">Return Value</h4> | |
2727 | <p class="description">New attribute</p> | |
2728 | <h3 class="function"><a name="ippAddRanges">ippAddRanges</a></h3> | |
2729 | <p class="description">Add ranges of values to an IPP message.</p> | |
2730 | <p class="code"> | |
2731 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddRanges (<br> | |
2732 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
79e1d494 | 2733 | <a href="#ipp_tag_t">ipp_tag_t</a> group,<br> |
5a738aea MS |
2734 | const char *name,<br> |
2735 | int num_values,<br> | |
2736 | const int *lower,<br> | |
2737 | const int *upper<br> | |
2738 | );</p> | |
2739 | <h4 class="parameters">Parameters</h4> | |
2740 | <dl> | |
2741 | <dt>ipp</dt> | |
2742 | <dd class="description">IPP message</dd> | |
2743 | <dt>group</dt> | |
2744 | <dd class="description">IPP group</dd> | |
2745 | <dt>name</dt> | |
2746 | <dd class="description">Name of attribute</dd> | |
2747 | <dt>num_values</dt> | |
2748 | <dd class="description">Number of values</dd> | |
2749 | <dt>lower</dt> | |
2750 | <dd class="description">Lower values</dd> | |
2751 | <dt>upper</dt> | |
2752 | <dd class="description">Upper values</dd> | |
2753 | </dl> | |
2754 | <h4 class="returnvalue">Return Value</h4> | |
2755 | <p class="description">New attribute</p> | |
2756 | <h3 class="function"><a name="ippAddResolution">ippAddResolution</a></h3> | |
2757 | <p class="description">Add a resolution value to an IPP message.</p> | |
2758 | <p class="code"> | |
2759 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddResolution (<br> | |
2760 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
79e1d494 | 2761 | <a href="#ipp_tag_t">ipp_tag_t</a> group,<br> |
5a738aea | 2762 | const char *name,<br> |
79e1d494 | 2763 | <a href="#ipp_res_t">ipp_res_t</a> units,<br> |
5a738aea MS |
2764 | int xres,<br> |
2765 | int yres<br> | |
2766 | );</p> | |
2767 | <h4 class="parameters">Parameters</h4> | |
2768 | <dl> | |
2769 | <dt>ipp</dt> | |
2770 | <dd class="description">IPP message</dd> | |
2771 | <dt>group</dt> | |
2772 | <dd class="description">IPP group</dd> | |
2773 | <dt>name</dt> | |
2774 | <dd class="description">Name of attribute</dd> | |
2775 | <dt>units</dt> | |
2776 | <dd class="description">Units for resolution</dd> | |
2777 | <dt>xres</dt> | |
2778 | <dd class="description">X resolution</dd> | |
2779 | <dt>yres</dt> | |
2780 | <dd class="description">Y resolution</dd> | |
2781 | </dl> | |
2782 | <h4 class="returnvalue">Return Value</h4> | |
2783 | <p class="description">New attribute</p> | |
2784 | <h3 class="function"><a name="ippAddResolutions">ippAddResolutions</a></h3> | |
2785 | <p class="description">Add resolution values to an IPP message.</p> | |
2786 | <p class="code"> | |
2787 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddResolutions (<br> | |
2788 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
79e1d494 | 2789 | <a href="#ipp_tag_t">ipp_tag_t</a> group,<br> |
5a738aea MS |
2790 | const char *name,<br> |
2791 | int num_values,<br> | |
79e1d494 | 2792 | <a href="#ipp_res_t">ipp_res_t</a> units,<br> |
5a738aea MS |
2793 | const int *xres,<br> |
2794 | const int *yres<br> | |
2795 | );</p> | |
2796 | <h4 class="parameters">Parameters</h4> | |
2797 | <dl> | |
2798 | <dt>ipp</dt> | |
2799 | <dd class="description">IPP message</dd> | |
2800 | <dt>group</dt> | |
2801 | <dd class="description">IPP group</dd> | |
2802 | <dt>name</dt> | |
2803 | <dd class="description">Name of attribute</dd> | |
2804 | <dt>num_values</dt> | |
2805 | <dd class="description">Number of values</dd> | |
2806 | <dt>units</dt> | |
2807 | <dd class="description">Units for resolution</dd> | |
2808 | <dt>xres</dt> | |
2809 | <dd class="description">X resolutions</dd> | |
2810 | <dt>yres</dt> | |
2811 | <dd class="description">Y resolutions</dd> | |
2812 | </dl> | |
2813 | <h4 class="returnvalue">Return Value</h4> | |
2814 | <p class="description">New attribute</p> | |
2815 | <h3 class="function"><a name="ippAddSeparator">ippAddSeparator</a></h3> | |
2816 | <p class="description">Add a group separator to an IPP message.</p> | |
2817 | <p class="code"> | |
2818 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddSeparator (<br> | |
2819 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
2820 | );</p> | |
2821 | <h4 class="parameters">Parameters</h4> | |
2822 | <dl> | |
2823 | <dt>ipp</dt> | |
2824 | <dd class="description">IPP message</dd> | |
2825 | </dl> | |
2826 | <h4 class="returnvalue">Return Value</h4> | |
2827 | <p class="description">New attribute</p> | |
2828 | <h3 class="function"><a name="ippAddString">ippAddString</a></h3> | |
2829 | <p class="description">Add a language-encoded string to an IPP message.</p> | |
2830 | <p class="code"> | |
2831 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddString (<br> | |
2832 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
79e1d494 MS |
2833 | <a href="#ipp_tag_t">ipp_tag_t</a> group,<br> |
2834 | <a href="#ipp_tag_t">ipp_tag_t</a> type,<br> | |
5a738aea MS |
2835 | const char *name,<br> |
2836 | const char *charset,<br> | |
2837 | const char *value<br> | |
2838 | );</p> | |
2839 | <h4 class="parameters">Parameters</h4> | |
2840 | <dl> | |
2841 | <dt>ipp</dt> | |
2842 | <dd class="description">IPP message</dd> | |
2843 | <dt>group</dt> | |
2844 | <dd class="description">IPP group</dd> | |
2845 | <dt>type</dt> | |
2846 | <dd class="description">Type of attribute</dd> | |
2847 | <dt>name</dt> | |
2848 | <dd class="description">Name of attribute</dd> | |
2849 | <dt>charset</dt> | |
2850 | <dd class="description">Character set</dd> | |
2851 | <dt>value</dt> | |
2852 | <dd class="description">Value</dd> | |
2853 | </dl> | |
2854 | <h4 class="returnvalue">Return Value</h4> | |
2855 | <p class="description">New attribute</p> | |
2856 | <h3 class="function"><a name="ippAddStrings">ippAddStrings</a></h3> | |
2857 | <p class="description">Add language-encoded strings to an IPP message.</p> | |
2858 | <p class="code"> | |
2859 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddStrings (<br> | |
2860 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
79e1d494 MS |
2861 | <a href="#ipp_tag_t">ipp_tag_t</a> group,<br> |
2862 | <a href="#ipp_tag_t">ipp_tag_t</a> type,<br> | |
5a738aea MS |
2863 | const char *name,<br> |
2864 | int num_values,<br> | |
2865 | const char *charset,<br> | |
2866 | const char *const *values<br> | |
2867 | );</p> | |
2868 | <h4 class="parameters">Parameters</h4> | |
2869 | <dl> | |
2870 | <dt>ipp</dt> | |
2871 | <dd class="description">IPP message</dd> | |
2872 | <dt>group</dt> | |
2873 | <dd class="description">IPP group</dd> | |
2874 | <dt>type</dt> | |
2875 | <dd class="description">Type of attribute</dd> | |
2876 | <dt>name</dt> | |
2877 | <dd class="description">Name of attribute</dd> | |
2878 | <dt>num_values</dt> | |
2879 | <dd class="description">Number of values</dd> | |
2880 | <dt>charset</dt> | |
2881 | <dd class="description">Character set</dd> | |
2882 | <dt>values</dt> | |
2883 | <dd class="description">Values</dd> | |
2884 | </dl> | |
2885 | <h4 class="returnvalue">Return Value</h4> | |
2886 | <p class="description">New attribute</p> | |
2887 | <h3 class="function"><a name="ippDateToTime">ippDateToTime</a></h3> | |
2888 | <p class="description">Convert from RFC 1903 Date/Time format to UNIX time | |
2889 | in seconds.</p> | |
2890 | <p class="code"> | |
2891 | time_t ippDateToTime (<br> | |
2892 | const <a href="#ipp_uchar_t">ipp_uchar_t</a> *date<br> | |
2893 | );</p> | |
2894 | <h4 class="parameters">Parameters</h4> | |
2895 | <dl> | |
2896 | <dt>date</dt> | |
2897 | <dd class="description">RFC 1903 date info</dd> | |
2898 | </dl> | |
2899 | <h4 class="returnvalue">Return Value</h4> | |
2900 | <p class="description">UNIX time value</p> | |
2901 | <h3 class="function"><a name="ippDelete">ippDelete</a></h3> | |
2902 | <p class="description">Delete an IPP message.</p> | |
2903 | <p class="code"> | |
2904 | void ippDelete (<br> | |
2905 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
2906 | );</p> | |
2907 | <h4 class="parameters">Parameters</h4> | |
2908 | <dl> | |
2909 | <dt>ipp</dt> | |
2910 | <dd class="description">IPP message</dd> | |
2911 | </dl> | |
2912 | <h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="ippDeleteAttribute">ippDeleteAttribute</a></h3> | |
2913 | <p class="description">Delete a single attribute in an IPP message.</p> | |
2914 | <p class="code"> | |
2915 | void ippDeleteAttribute (<br> | |
2916 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
2917 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br> | |
2918 | );</p> | |
2919 | <h4 class="parameters">Parameters</h4> | |
2920 | <dl> | |
2921 | <dt>ipp</dt> | |
2922 | <dd class="description">IPP message</dd> | |
2923 | <dt>attr</dt> | |
2924 | <dd class="description">Attribute to delete</dd> | |
2925 | </dl> | |
2926 | <h3 class="function"><a name="ippErrorString">ippErrorString</a></h3> | |
2927 | <p class="description">Return a name for the given status code.</p> | |
2928 | <p class="code"> | |
2929 | const char *ippErrorString (<br> | |
2930 | ipp_status_t error<br> | |
2931 | );</p> | |
2932 | <h4 class="parameters">Parameters</h4> | |
2933 | <dl> | |
2934 | <dt>error</dt> | |
2935 | <dd class="description">Error status</dd> | |
2936 | </dl> | |
2937 | <h4 class="returnvalue">Return Value</h4> | |
2938 | <p class="description">Text string</p> | |
2939 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ippErrorValue">ippErrorValue</a></h3> | |
2940 | <p class="description">Return a status code for the given name.</p> | |
2941 | <p class="code"> | |
2942 | ipp_status_t ippErrorValue (<br> | |
2943 | const char *name<br> | |
2944 | );</p> | |
2945 | <h4 class="parameters">Parameters</h4> | |
2946 | <dl> | |
2947 | <dt>name</dt> | |
2948 | <dd class="description">Name</dd> | |
2949 | </dl> | |
2950 | <h4 class="returnvalue">Return Value</h4> | |
2951 | <p class="description">IPP status code</p> | |
2952 | <h3 class="function"><a name="ippFindAttribute">ippFindAttribute</a></h3> | |
2953 | <p class="description">Find a named attribute in a request...</p> | |
2954 | <p class="code"> | |
2955 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippFindAttribute (<br> | |
2956 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
2957 | const char *name,<br> | |
79e1d494 | 2958 | <a href="#ipp_tag_t">ipp_tag_t</a> type<br> |
5a738aea MS |
2959 | );</p> |
2960 | <h4 class="parameters">Parameters</h4> | |
2961 | <dl> | |
2962 | <dt>ipp</dt> | |
2963 | <dd class="description">IPP message</dd> | |
2964 | <dt>name</dt> | |
2965 | <dd class="description">Name of attribute</dd> | |
2966 | <dt>type</dt> | |
2967 | <dd class="description">Type of attribute</dd> | |
2968 | </dl> | |
2969 | <h4 class="returnvalue">Return Value</h4> | |
2970 | <p class="description">Matching attribute</p> | |
2971 | <h3 class="function"><a name="ippFindNextAttribute">ippFindNextAttribute</a></h3> | |
2972 | <p class="description">Find the next named attribute in a request...</p> | |
2973 | <p class="code"> | |
2974 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippFindNextAttribute (<br> | |
2975 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
2976 | const char *name,<br> | |
79e1d494 | 2977 | <a href="#ipp_tag_t">ipp_tag_t</a> type<br> |
5a738aea MS |
2978 | );</p> |
2979 | <h4 class="parameters">Parameters</h4> | |
2980 | <dl> | |
2981 | <dt>ipp</dt> | |
2982 | <dd class="description">IPP message</dd> | |
2983 | <dt>name</dt> | |
2984 | <dd class="description">Name of attribute</dd> | |
2985 | <dt>type</dt> | |
2986 | <dd class="description">Type of attribute</dd> | |
2987 | </dl> | |
2988 | <h4 class="returnvalue">Return Value</h4> | |
2989 | <p class="description">Matching attribute</p> | |
2990 | <h3 class="function"><a name="ippLength">ippLength</a></h3> | |
2991 | <p class="description">Compute the length of an IPP message.</p> | |
2992 | <p class="code"> | |
2993 | size_t ippLength (<br> | |
2994 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
2995 | );</p> | |
2996 | <h4 class="parameters">Parameters</h4> | |
2997 | <dl> | |
2998 | <dt>ipp</dt> | |
2999 | <dd class="description">IPP message</dd> | |
3000 | </dl> | |
3001 | <h4 class="returnvalue">Return Value</h4> | |
3002 | <p class="description">Size of IPP message</p> | |
3003 | <h3 class="function"><a name="ippNew">ippNew</a></h3> | |
3004 | <p class="description">Allocate a new IPP message.</p> | |
3005 | <p class="code"> | |
3006 | <a href="#ipp_t">ipp_t</a> *ippNew (void);</p> | |
3007 | <h4 class="returnvalue">Return Value</h4> | |
3008 | <p class="description">New IPP message</p> | |
3009 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ippNewRequest">ippNewRequest</a></h3> | |
3010 | <p class="description">Allocate a new IPP request message.</p> | |
3011 | <p class="code"> | |
3012 | <a href="#ipp_t">ipp_t</a> *ippNewRequest (<br> | |
79e1d494 | 3013 | <a href="#ipp_op_t">ipp_op_t</a> op<br> |
5a738aea MS |
3014 | );</p> |
3015 | <h4 class="parameters">Parameters</h4> | |
3016 | <dl> | |
3017 | <dt>op</dt> | |
3018 | <dd class="description">Operation code</dd> | |
3019 | </dl> | |
3020 | <h4 class="returnvalue">Return Value</h4> | |
3021 | <p class="description">IPP request message</p> | |
3022 | <h4 class="discussion">Discussion</h4> | |
3023 | <p class="discussion">The new request message is initialized with the attributes-charset and | |
ecdc0628 | 3024 | attributes-natural-language attributes added. The |
3025 | attributes-natural-language value is derived from the current locale. | |
3026 | ||
5a738aea MS |
3027 | </p> |
3028 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ippOpString">ippOpString</a></h3> | |
3029 | <p class="description">Return a name for the given operation id.</p> | |
3030 | <p class="code"> | |
3031 | const char *ippOpString (<br> | |
79e1d494 | 3032 | <a href="#ipp_op_t">ipp_op_t</a> op<br> |
5a738aea MS |
3033 | );</p> |
3034 | <h4 class="parameters">Parameters</h4> | |
3035 | <dl> | |
3036 | <dt>op</dt> | |
3037 | <dd class="description">Operation ID</dd> | |
3038 | </dl> | |
3039 | <h4 class="returnvalue">Return Value</h4> | |
3040 | <p class="description">Name</p> | |
3041 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ippOpValue">ippOpValue</a></h3> | |
3042 | <p class="description">Return an operation id for the given name.</p> | |
3043 | <p class="code"> | |
79e1d494 | 3044 | <a href="#ipp_op_t">ipp_op_t</a> ippOpValue (<br> |
5a738aea MS |
3045 | const char *name<br> |
3046 | );</p> | |
3047 | <h4 class="parameters">Parameters</h4> | |
3048 | <dl> | |
3049 | <dt>name</dt> | |
3050 | <dd class="description">Textual name</dd> | |
3051 | </dl> | |
3052 | <h4 class="returnvalue">Return Value</h4> | |
3053 | <p class="description">Operation ID</p> | |
3054 | <h3 class="function"><a name="ippPort">ippPort</a></h3> | |
3055 | <p class="description">Return the default IPP port number.</p> | |
3056 | <p class="code"> | |
3057 | int ippPort (void);</p> | |
3058 | <h4 class="returnvalue">Return Value</h4> | |
3059 | <p class="description">Port number</p> | |
3060 | <h3 class="function"><a name="ippRead">ippRead</a></h3> | |
3061 | <p class="description">Read data for an IPP message from a HTTP connection.</p> | |
3062 | <p class="code"> | |
79e1d494 | 3063 | <a href="#ipp_state_t">ipp_state_t</a> ippRead (<br> |
5a738aea MS |
3064 | <a href="#http_t">http_t</a> *http,<br> |
3065 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
3066 | );</p> | |
3067 | <h4 class="parameters">Parameters</h4> | |
3068 | <dl> | |
3069 | <dt>http</dt> | |
3070 | <dd class="description">HTTP connection</dd> | |
3071 | <dt>ipp</dt> | |
3072 | <dd class="description">IPP data</dd> | |
3073 | </dl> | |
3074 | <h4 class="returnvalue">Return Value</h4> | |
3075 | <p class="description">Current state</p> | |
3076 | <h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="ippReadFile">ippReadFile</a></h3> | |
3077 | <p class="description">Read data for an IPP message from a file.</p> | |
3078 | <p class="code"> | |
79e1d494 | 3079 | <a href="#ipp_state_t">ipp_state_t</a> ippReadFile (<br> |
5a738aea MS |
3080 | int fd,<br> |
3081 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
3082 | );</p> | |
3083 | <h4 class="parameters">Parameters</h4> | |
3084 | <dl> | |
3085 | <dt>fd</dt> | |
3086 | <dd class="description">HTTP data</dd> | |
3087 | <dt>ipp</dt> | |
3088 | <dd class="description">IPP data</dd> | |
3089 | </dl> | |
3090 | <h4 class="returnvalue">Return Value</h4> | |
3091 | <p class="description">Current state</p> | |
3092 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ippReadIO">ippReadIO</a></h3> | |
3093 | <p class="description">Read data for an IPP message.</p> | |
3094 | <p class="code"> | |
79e1d494 | 3095 | <a href="#ipp_state_t">ipp_state_t</a> ippReadIO (<br> |
5a738aea MS |
3096 | void *src,<br> |
3097 | <a href="#ipp_iocb_t">ipp_iocb_t</a> cb,<br> | |
3098 | int blocking,<br> | |
3099 | <a href="#ipp_t">ipp_t</a> *parent,<br> | |
3100 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
3101 | );</p> | |
3102 | <h4 class="parameters">Parameters</h4> | |
3103 | <dl> | |
3104 | <dt>src</dt> | |
3105 | <dd class="description">Data source</dd> | |
3106 | <dt>cb</dt> | |
3107 | <dd class="description">Read callback function</dd> | |
3108 | <dt>blocking</dt> | |
3109 | <dd class="description">Use blocking IO?</dd> | |
3110 | <dt>parent</dt> | |
3111 | <dd class="description">Parent request, if any</dd> | |
3112 | <dt>ipp</dt> | |
3113 | <dd class="description">IPP data</dd> | |
3114 | </dl> | |
3115 | <h4 class="returnvalue">Return Value</h4> | |
3116 | <p class="description">Current state</p> | |
3117 | <h3 class="function"><a name="ippSetPort">ippSetPort</a></h3> | |
3118 | <p class="description">Set the default port number.</p> | |
3119 | <p class="code"> | |
3120 | void ippSetPort (<br> | |
3121 | int p<br> | |
3122 | );</p> | |
3123 | <h4 class="parameters">Parameters</h4> | |
3124 | <dl> | |
3125 | <dt>p</dt> | |
3126 | <dd class="description">Port number to use</dd> | |
3127 | </dl> | |
06d4e77b MS |
3128 | <h3 class="function"><span class="info"> CUPS 1.4 </span><a name="ippTagString">ippTagString</a></h3> |
3129 | <p class="description">Return the tag name corresponding to a tag value.</p> | |
3130 | <p class="code"> | |
3131 | const char *ippTagString (<br> | |
3132 | <a href="#ipp_tag_t">ipp_tag_t</a> tag<br> | |
3133 | );</p> | |
3134 | <h4 class="parameters">Parameters</h4> | |
3135 | <dl> | |
3136 | <dt>tag</dt> | |
3137 | <dd class="description">Tag value</dd> | |
3138 | </dl> | |
3139 | <h4 class="returnvalue">Return Value</h4> | |
3140 | <p class="description">Tag name</p> | |
3141 | <h4 class="discussion">Discussion</h4> | |
3142 | <p class="discussion">The returned names are defined in RFC 2911 and 3382. | |
3143 | ||
3144 | </p> | |
3145 | <h3 class="function"><span class="info"> CUPS 1.4 </span><a name="ippTagValue">ippTagValue</a></h3> | |
3146 | <p class="description">Return the tag value corresponding to a tag name.</p> | |
3147 | <p class="code"> | |
3148 | <a href="#ipp_tag_t">ipp_tag_t</a> ippTagValue (<br> | |
3149 | const char *name<br> | |
3150 | );</p> | |
3151 | <h4 class="parameters">Parameters</h4> | |
3152 | <dl> | |
3153 | <dt>name</dt> | |
3154 | <dd class="description">Tag name</dd> | |
3155 | </dl> | |
3156 | <h4 class="returnvalue">Return Value</h4> | |
3157 | <p class="description">Tag value</p> | |
3158 | <h4 class="discussion">Discussion</h4> | |
3159 | <p class="discussion">The tag names are defined in RFC 2911 and 3382. | |
3160 | ||
3161 | </p> | |
5a738aea MS |
3162 | <h3 class="function"><a name="ippTimeToDate">ippTimeToDate</a></h3> |
3163 | <p class="description">Convert from UNIX time to RFC 1903 format.</p> | |
3164 | <p class="code"> | |
3165 | const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippTimeToDate (<br> | |
3166 | time_t t<br> | |
3167 | );</p> | |
3168 | <h4 class="parameters">Parameters</h4> | |
3169 | <dl> | |
3170 | <dt>t</dt> | |
3171 | <dd class="description">UNIX time value</dd> | |
3172 | </dl> | |
3173 | <h4 class="returnvalue">Return Value</h4> | |
3174 | <p class="description">RFC-1903 date/time data</p> | |
3175 | <h3 class="function"><a name="ippWrite">ippWrite</a></h3> | |
3176 | <p class="description">Write data for an IPP message to a HTTP connection.</p> | |
3177 | <p class="code"> | |
79e1d494 | 3178 | <a href="#ipp_state_t">ipp_state_t</a> ippWrite (<br> |
5a738aea MS |
3179 | <a href="#http_t">http_t</a> *http,<br> |
3180 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
3181 | );</p> | |
3182 | <h4 class="parameters">Parameters</h4> | |
3183 | <dl> | |
3184 | <dt>http</dt> | |
3185 | <dd class="description">HTTP connection</dd> | |
3186 | <dt>ipp</dt> | |
3187 | <dd class="description">IPP data</dd> | |
3188 | </dl> | |
3189 | <h4 class="returnvalue">Return Value</h4> | |
3190 | <p class="description">Current state</p> | |
3191 | <h3 class="function"><span class="info"> CUPS 1.1.19 </span><a name="ippWriteFile">ippWriteFile</a></h3> | |
3192 | <p class="description">Write data for an IPP message to a file.</p> | |
3193 | <p class="code"> | |
79e1d494 | 3194 | <a href="#ipp_state_t">ipp_state_t</a> ippWriteFile (<br> |
5a738aea MS |
3195 | int fd,<br> |
3196 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
3197 | );</p> | |
3198 | <h4 class="parameters">Parameters</h4> | |
3199 | <dl> | |
3200 | <dt>fd</dt> | |
3201 | <dd class="description">HTTP data</dd> | |
3202 | <dt>ipp</dt> | |
3203 | <dd class="description">IPP data</dd> | |
3204 | </dl> | |
3205 | <h4 class="returnvalue">Return Value</h4> | |
3206 | <p class="description">Current state</p> | |
3207 | <h3 class="function"><span class="info"> CUPS 1.2 </span><a name="ippWriteIO">ippWriteIO</a></h3> | |
3208 | <p class="description">Write data for an IPP message.</p> | |
3209 | <p class="code"> | |
79e1d494 | 3210 | <a href="#ipp_state_t">ipp_state_t</a> ippWriteIO (<br> |
5a738aea MS |
3211 | void *dst,<br> |
3212 | <a href="#ipp_iocb_t">ipp_iocb_t</a> cb,<br> | |
3213 | int blocking,<br> | |
3214 | <a href="#ipp_t">ipp_t</a> *parent,<br> | |
3215 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
3216 | );</p> | |
3217 | <h4 class="parameters">Parameters</h4> | |
3218 | <dl> | |
3219 | <dt>dst</dt> | |
3220 | <dd class="description">Destination</dd> | |
3221 | <dt>cb</dt> | |
3222 | <dd class="description">Write callback function</dd> | |
3223 | <dt>blocking</dt> | |
3224 | <dd class="description">Use blocking IO?</dd> | |
3225 | <dt>parent</dt> | |
3226 | <dd class="description">Parent IPP message</dd> | |
3227 | <dt>ipp</dt> | |
3228 | <dd class="description">IPP data</dd> | |
3229 | </dl> | |
3230 | <h4 class="returnvalue">Return Value</h4> | |
3231 | <p class="description">Current state</p> | |
3232 | <h2 class="title"><a name="TYPES">Data Types</a></h2> | |
3233 | <h3 class="typedef"><span class="info"> CUPS 1.2 </span><a name="http_addrlist_t">http_addrlist_t</a></h3> | |
3234 | <p class="description">Socket address list, which is | |
ef416fc2 | 3235 | used to enumerate all of the |
3236 | addresses that are associated | |
5a738aea MS |
3237 | with a hostname. </p> |
3238 | <p class="code"> | |
3239 | typedef struct <a href="#http_addrlist_s">http_addrlist_s</a> / http_addrlist_t; | |
3240 | </p> | |
3241 | <h3 class="typedef"><a name="http_auth_t">http_auth_t</a></h3> | |
3242 | <p class="description">HTTP authentication types</p> | |
3243 | <p class="code"> | |
3244 | typedef enum <a href="#http_auth_e">http_auth_e</a> http_auth_t; | |
3245 | </p> | |
3246 | <h3 class="typedef"><a name="http_encoding_t">http_encoding_t</a></h3> | |
3247 | <p class="description">HTTP transfer encoding values</p> | |
3248 | <p class="code"> | |
3249 | typedef enum <a href="#http_encoding_e">http_encoding_e</a> http_encoding_t; | |
3250 | </p> | |
3251 | <h3 class="typedef"><a name="http_encryption_t">http_encryption_t</a></h3> | |
3252 | <p class="description">HTTP encryption values</p> | |
3253 | <p class="code"> | |
3254 | typedef enum <a href="#http_encryption_e">http_encryption_e</a> http_encryption_t; | |
3255 | </p> | |
79e1d494 MS |
3256 | <h3 class="typedef"><a name="http_field_t">http_field_t</a></h3> |
3257 | <p class="description">HTTP field names</p> | |
3258 | <p class="code"> | |
3259 | typedef enum <a href="#http_field_e">http_field_e</a> http_field_t; | |
3260 | </p> | |
3261 | <h3 class="typedef"><a name="http_keepalive_t">http_keepalive_t</a></h3> | |
3262 | <p class="description">Types and structures...</p> | |
3263 | <p class="code"> | |
3264 | typedef enum <a href="#http_keepalive_e">http_keepalive_e</a> http_keepalive_t; | |
3265 | </p> | |
3266 | <h3 class="typedef"><a name="http_status_t">http_status_t</a></h3> | |
3267 | <p class="description">HTTP status codes</p> | |
3268 | <p class="code"> | |
3269 | typedef enum <a href="#http_status_e">http_status_e</a> http_status_t; | |
3270 | </p> | |
5a738aea MS |
3271 | <h3 class="typedef"><a name="http_t">http_t</a></h3> |
3272 | <p class="description">HTTP connection type</p> | |
3273 | <p class="code"> | |
ecdc0628 | 3274 | typedef struct _http_s http_t; |
5a738aea | 3275 | </p> |
79e1d494 MS |
3276 | <h3 class="typedef"><a name="http_uri_coding_t">http_uri_coding_t</a></h3> |
3277 | <p class="description">HTTP version numbers</p> | |
3278 | <p class="code"> | |
3279 | typedef enum <a href="#http_uri_coding_e">http_uri_coding_e</a> http_uri_coding_t; | |
3280 | </p> | |
3281 | <h3 class="typedef"><a name="http_uri_status_t">http_uri_status_t</a></h3> | |
3282 | <p class="description">URI en/decode flags</p> | |
3283 | <p class="code"> | |
3284 | typedef enum <a href="#http_uri_status_e">http_uri_status_e</a> http_uri_status_t; | |
3285 | </p> | |
3286 | <h3 class="typedef"><span class="info"> CUPS 1.2 </span><a name="http_version_t">http_version_t</a></h3> | |
3287 | <p class="description">Socket address union, which | |
3288 | makes using IPv6 and other | |
3289 | address types easier and | |
3290 | more portable. </p> | |
3291 | <p class="code"> | |
3292 | typedef enum <a href="#http_version_e">http_version_e</a> http_version_t; | |
3293 | </p> | |
5a738aea MS |
3294 | <h3 class="typedef"><a name="ipp_attribute_t">ipp_attribute_t</a></h3> |
3295 | <p class="description">Attribute</p> | |
3296 | <p class="code"> | |
3297 | typedef struct <a href="#ipp_attribute_s">ipp_attribute_s</a> ipp_attribute_t; | |
3298 | </p> | |
79e1d494 MS |
3299 | <h3 class="typedef"><a name="ipp_finish_t">ipp_finish_t</a></h3> |
3300 | <p class="description">Orientation...</p> | |
3301 | <p class="code"> | |
3302 | typedef enum <a href="#ipp_finish_e">ipp_finish_e</a> ipp_finish_t; | |
3303 | </p> | |
5a738aea MS |
3304 | <h3 class="typedef"><span class="info"> CUPS 1.2 </span><a name="ipp_iocb_t">ipp_iocb_t</a></h3> |
3305 | <p class="description">IPP IO Callback Function </p> | |
3306 | <p class="code"> | |
3307 | typedef ssize_t (*ipp_iocb_t)(void *, <a href="#ipp_uchar_t">ipp_uchar_t</a> *, size_t); | |
3308 | </p> | |
79e1d494 MS |
3309 | <h3 class="typedef"><a name="ipp_jstate_t">ipp_jstate_t</a></h3> |
3310 | <p class="description">Printer States....</p> | |
3311 | <p class="code"> | |
3312 | typedef enum <a href="#ipp_jstate_e">ipp_jstate_e</a> ipp_jstate_t; | |
3313 | </p> | |
3314 | <h3 class="typedef"><a name="ipp_op_t">ipp_op_t</a></h3> | |
3315 | <p class="description">Old names for the operations</p> | |
3316 | <p class="code"> | |
3317 | typedef enum <a href="#ipp_op_e">ipp_op_e</a> ipp_op_t; | |
3318 | </p> | |
3319 | <h3 class="typedef"><a name="ipp_orient_t">ipp_orient_t</a></h3> | |
3320 | <p class="description">Qualities...</p> | |
3321 | <p class="code"> | |
3322 | typedef enum <a href="#ipp_orient_e">ipp_orient_e</a> ipp_orient_t; | |
3323 | </p> | |
3324 | <h3 class="typedef"><a name="ipp_pstate_t">ipp_pstate_t</a></h3> | |
3325 | <p class="description">IPP states...</p> | |
3326 | <p class="code"> | |
3327 | typedef enum <a href="#ipp_pstate_e">ipp_pstate_e</a> ipp_pstate_t; | |
3328 | </p> | |
3329 | <h3 class="typedef"><a name="ipp_quality_t">ipp_quality_t</a></h3> | |
3330 | <p class="description">Job States....</p> | |
3331 | <p class="code"> | |
3332 | typedef enum <a href="#ipp_quality_e">ipp_quality_e</a> ipp_quality_t; | |
3333 | </p> | |
5a738aea MS |
3334 | <h3 class="typedef"><a name="ipp_request_t">ipp_request_t</a></h3> |
3335 | <p class="description">Request Header</p> | |
3336 | <p class="code"> | |
3337 | typedef union <a href="#ipp_request_u">ipp_request_u</a> ipp_request_t; | |
3338 | </p> | |
79e1d494 MS |
3339 | <h3 class="typedef"><a name="ipp_res_t">ipp_res_t</a></h3> |
3340 | <p class="description">Types and structures...</p> | |
3341 | <p class="code"> | |
3342 | typedef enum <a href="#ipp_res_e">ipp_res_e</a> ipp_res_t; | |
3343 | </p> | |
3344 | <h3 class="typedef"><a name="ipp_state_t">ipp_state_t</a></h3> | |
3345 | <p class="description">IPP operations...</p> | |
3346 | <p class="code"> | |
3347 | typedef enum <a href="#ipp_state_e">ipp_state_e</a> ipp_state_t; | |
3348 | </p> | |
5a738aea MS |
3349 | <h3 class="typedef"><a name="ipp_t">ipp_t</a></h3> |
3350 | <p class="description">Attribute Value</p> | |
3351 | <p class="code"> | |
3352 | typedef struct <a href="#ipp_s">ipp_s</a> ipp_t; | |
3353 | </p> | |
3354 | <h3 class="typedef"><a name="ipp_uchar_t">ipp_uchar_t</a></h3> | |
3355 | <p class="description">IPP status codes...</p> | |
3356 | <p class="code"> | |
ecdc0628 | 3357 | typedef typedef unsigned char ipp_uchar_t; |
5a738aea | 3358 | </p> |
79e1d494 MS |
3359 | <h3 class="typedef"><a name="ipp_tag_t">ipp_tag_t</a></h3> |
3360 | <p class="description">Format tags for attributes...</p> | |
3361 | <p class="code"> | |
3362 | typedef enum <a href="#ipp_tag_e">ipp_tag_e</a> ipp_tag_t; | |
3363 | </p> | |
5a738aea MS |
3364 | <h3 class="typedef"><a name="ipp_value_t">ipp_value_t</a></h3> |
3365 | <p class="description">New in CUPS 1.1.19</p> | |
3366 | <p class="code"> | |
3367 | typedef union <a href="#ipp_value_u">ipp_value_u</a> ipp_value_t; | |
3368 | </p> | |
3369 | <h2 class="title"><a name="STRUCTURES">Structures</a></h2> | |
3370 | <h3 class="struct"><span class="info"> CUPS 1.2 </span><a name="http_addrlist_s">http_addrlist_s</a></h3> | |
3371 | <p class="description">Socket address list, which is | |
3372 | used to enumerate all of the | |
3373 | addresses that are associated | |
3374 | with a hostname. </p> | |
3375 | <p class="code">struct http_addrlist_s {<br> | |
3376 | <a href="#http_addr_t">http_addr_t</a> addr;<br> | |
3377 | struct <a href="#http_addrlist_s">http_addrlist_s</a> *next;<br> | |
3378 | };</p> | |
3379 | <h4 class="members">Members</h4> | |
3380 | <dl> | |
3381 | <dt>addr </dt> | |
3382 | <dd class="description">Address</dd> | |
3383 | <dt>next </dt> | |
3384 | <dd class="description">Pointer to next address in list</dd> | |
3385 | </dl> | |
3386 | <h3 class="struct"><a name="ipp_attribute_s">ipp_attribute_s</a></h3> | |
3387 | <p class="description">Attribute</p> | |
3388 | <p class="code">struct ipp_attribute_s {<br> | |
3389 | char *name;<br> | |
3390 | struct <a href="#ipp_attribute_s">ipp_attribute_s</a> *next;<br> | |
3391 | int num_values;<br> | |
79e1d494 | 3392 | <a href="#ipp_tag_t">ipp_tag_t</a> group_tag, value_tag;<br> |
5a738aea MS |
3393 | <a href="#ipp_value_t">ipp_value_t</a> values[1];<br> |
3394 | };</p> | |
3395 | <h4 class="members">Members</h4> | |
3396 | <dl> | |
3397 | <dt>name </dt> | |
3398 | <dd class="description">Name of attribute</dd> | |
3399 | <dt>next </dt> | |
3400 | <dd class="description">Next attribute in list</dd> | |
3401 | <dt>num_values </dt> | |
3402 | <dd class="description">Number of values</dd> | |
3403 | <dt>value_tag </dt> | |
3404 | <dd class="description">What type of value is it?</dd> | |
3405 | <dt>values[1] </dt> | |
3406 | <dd class="description">Values</dd> | |
3407 | </dl> | |
3408 | <h3 class="struct"><a name="ipp_s">ipp_s</a></h3> | |
3409 | <p class="description">IPP Request/Response/Notification</p> | |
3410 | <p class="code">struct ipp_s {<br> | |
3411 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *attrs;<br> | |
3412 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *current;<br> | |
79e1d494 | 3413 | <a href="#ipp_tag_t">ipp_tag_t</a> curtag;<br> |
5a738aea MS |
3414 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *last;<br> |
3415 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *prev;<br> | |
3416 | <a href="#ipp_request_t">ipp_request_t</a> request;<br> | |
79e1d494 | 3417 | <a href="#ipp_state_t">ipp_state_t</a> state;<br> |
5a738aea MS |
3418 | };</p> |
3419 | <h4 class="members">Members</h4> | |
3420 | <dl> | |
3421 | <dt>attrs </dt> | |
3422 | <dd class="description">Attributes</dd> | |
3423 | <dt>current </dt> | |
3424 | <dd class="description">Current attribute (for read/write)</dd> | |
3425 | <dt>curtag </dt> | |
3426 | <dd class="description">Current attribute group tag</dd> | |
3427 | <dt>last </dt> | |
3428 | <dd class="description">Last attribute in list</dd> | |
3429 | <dt>prev </dt> | |
3430 | <dd class="description">Previous attribute (for read)</dd> | |
3431 | <dt>request </dt> | |
3432 | <dd class="description">Request header</dd> | |
3433 | <dt>state </dt> | |
3434 | <dd class="description">State of request</dd> | |
3435 | </dl> | |
3436 | <h2 class="title"><a name="UNIONS">Unions</a></h2> | |
3437 | <h3 class="union"><a name="ipp_request_u">ipp_request_u</a></h3> | |
3438 | <p class="description">Request Header</p> | |
3439 | <p class="code">union ipp_request_u {<br> | |
3440 | };</p> | |
3441 | <h4 class="members">Members</h4> | |
3442 | <dl> | |
3443 | </dl> | |
3444 | <h3 class="union"><a name="ipp_value_u">ipp_value_u</a></h3> | |
3445 | <p class="description">New in CUPS 1.1.19</p> | |
3446 | <p class="code">union ipp_value_u {<br> | |
3447 | char boolean;<br> | |
3448 | <a href="#ipp_t">ipp_t</a> *collection;<br> | |
3449 | <a href="#ipp_uchar_t">ipp_uchar_t</a> date[11];<br> | |
3450 | int integer;<br> | |
3451 | };</p> | |
3452 | <h4 class="members">Members</h4> | |
3453 | <dl> | |
3454 | <dt>boolean </dt> | |
3455 | <dd class="description">Boolean value</dd> | |
3456 | <dt>collection </dt> | |
3457 | <dd class="description">Collection value</dd> | |
3458 | <dt>date[11] </dt> | |
3459 | <dd class="description">Date/time value</dd> | |
3460 | <dt>integer </dt> | |
3461 | <dd class="description">Integer/enumerated value</dd> | |
3462 | </dl> | |
3463 | <h2 class="title"><a name="ENUMERATIONS">Constants</a></h2> | |
3464 | <h3 class="enumeration"><a name="http_auth_e">http_auth_e</a></h3> | |
3465 | <p class="description">HTTP authentication types</p> | |
3466 | <h4 class="constants">Constants</h4> | |
3467 | <dl> | |
3468 | <dt>HTTP_AUTH_BASIC </dt> | |
3469 | <dd class="description">Basic authentication in use</dd> | |
3470 | <dt>HTTP_AUTH_MD5 </dt> | |
3471 | <dd class="description">Digest authentication in use</dd> | |
3472 | <dt>HTTP_AUTH_MD5_INT </dt> | |
3473 | <dd class="description">Digest authentication in use for body</dd> | |
3474 | <dt>HTTP_AUTH_MD5_SESS </dt> | |
3475 | <dd class="description">MD5-session authentication in use</dd> | |
3476 | <dt>HTTP_AUTH_MD5_SESS_INT </dt> | |
3477 | <dd class="description">MD5-session authentication in use for body</dd> | |
3478 | <dt>HTTP_AUTH_NEGOTIATE <span class="info"> CUPS 1.3 </span></dt> | |
3479 | <dd class="description">GSSAPI authentication in use </dd> | |
3480 | <dt>HTTP_AUTH_NONE </dt> | |
3481 | <dd class="description">No authentication in use</dd> | |
3482 | </dl> | |
3483 | <h3 class="enumeration"><a name="http_encoding_e">http_encoding_e</a></h3> | |
3484 | <p class="description">HTTP transfer encoding values</p> | |
3485 | <h4 class="constants">Constants</h4> | |
3486 | <dl> | |
3487 | <dt>HTTP_ENCODE_CHUNKED </dt> | |
3488 | <dd class="description">Data is chunked</dd> | |
3489 | <dt>HTTP_ENCODE_FIELDS </dt> | |
3490 | <dd class="description">Sending HTTP fields</dd> | |
3491 | <dt>HTTP_ENCODE_LENGTH </dt> | |
3492 | <dd class="description">Data is sent with Content-Length</dd> | |
3493 | </dl> | |
3494 | <h3 class="enumeration"><a name="http_encryption_e">http_encryption_e</a></h3> | |
3495 | <p class="description">HTTP encryption values</p> | |
3496 | <h4 class="constants">Constants</h4> | |
3497 | <dl> | |
3498 | <dt>HTTP_ENCRYPT_ALWAYS </dt> | |
3499 | <dd class="description">Always encrypt (SSL)</dd> | |
3500 | <dt>HTTP_ENCRYPT_IF_REQUESTED </dt> | |
3501 | <dd class="description">Encrypt if requested (TLS upgrade)</dd> | |
3502 | <dt>HTTP_ENCRYPT_NEVER </dt> | |
3503 | <dd class="description">Never encrypt</dd> | |
3504 | <dt>HTTP_ENCRYPT_REQUIRED </dt> | |
3505 | <dd class="description">Encryption is required (TLS upgrade)</dd> | |
3506 | </dl> | |
3507 | <h3 class="enumeration"><a name="http_field_e">http_field_e</a></h3> | |
3508 | <p class="description">HTTP field names</p> | |
3509 | <h4 class="constants">Constants</h4> | |
3510 | <dl> | |
3511 | <dt>HTTP_FIELD_ACCEPT_LANGUAGE </dt> | |
3512 | <dd class="description">Accept-Language field</dd> | |
3513 | <dt>HTTP_FIELD_ACCEPT_RANGES </dt> | |
3514 | <dd class="description">Accept-Ranges field</dd> | |
3515 | <dt>HTTP_FIELD_AUTHORIZATION </dt> | |
3516 | <dd class="description">Authorization field</dd> | |
3517 | <dt>HTTP_FIELD_CONNECTION </dt> | |
3518 | <dd class="description">Connection field</dd> | |
3519 | <dt>HTTP_FIELD_CONTENT_ENCODING </dt> | |
3520 | <dd class="description">Content-Encoding field</dd> | |
3521 | <dt>HTTP_FIELD_CONTENT_LANGUAGE </dt> | |
3522 | <dd class="description">Content-Language field</dd> | |
3523 | <dt>HTTP_FIELD_CONTENT_LENGTH </dt> | |
3524 | <dd class="description">Content-Length field</dd> | |
3525 | <dt>HTTP_FIELD_CONTENT_LOCATION </dt> | |
3526 | <dd class="description">Content-Location field</dd> | |
3527 | <dt>HTTP_FIELD_CONTENT_MD5 </dt> | |
3528 | <dd class="description">Content-MD5 field</dd> | |
3529 | <dt>HTTP_FIELD_CONTENT_RANGE </dt> | |
3530 | <dd class="description">Content-Range field</dd> | |
3531 | <dt>HTTP_FIELD_CONTENT_TYPE </dt> | |
3532 | <dd class="description">Content-Type field</dd> | |
3533 | <dt>HTTP_FIELD_CONTENT_VERSION </dt> | |
3534 | <dd class="description">Content-Version field</dd> | |
3535 | <dt>HTTP_FIELD_DATE </dt> | |
3536 | <dd class="description">Date field</dd> | |
3537 | <dt>HTTP_FIELD_HOST </dt> | |
3538 | <dd class="description">Host field</dd> | |
3539 | <dt>HTTP_FIELD_IF_MODIFIED_SINCE </dt> | |
3540 | <dd class="description">If-Modified-Since field</dd> | |
3541 | <dt>HTTP_FIELD_IF_UNMODIFIED_SINCE </dt> | |
3542 | <dd class="description">If-Unmodified-Since field</dd> | |
3543 | <dt>HTTP_FIELD_KEEP_ALIVE </dt> | |
3544 | <dd class="description">Keep-Alive field</dd> | |
3545 | <dt>HTTP_FIELD_LAST_MODIFIED </dt> | |
3546 | <dd class="description">Last-Modified field</dd> | |
3547 | <dt>HTTP_FIELD_LINK </dt> | |
3548 | <dd class="description">Link field</dd> | |
3549 | <dt>HTTP_FIELD_LOCATION </dt> | |
3550 | <dd class="description">Location field</dd> | |
3551 | <dt>HTTP_FIELD_MAX </dt> | |
3552 | <dd class="description">Maximum field index</dd> | |
3553 | <dt>HTTP_FIELD_RANGE </dt> | |
3554 | <dd class="description">Range field</dd> | |
3555 | <dt>HTTP_FIELD_REFERER </dt> | |
3556 | <dd class="description">Referer field</dd> | |
3557 | <dt>HTTP_FIELD_RETRY_AFTER </dt> | |
3558 | <dd class="description">Retry-After field</dd> | |
3559 | <dt>HTTP_FIELD_TRANSFER_ENCODING </dt> | |
3560 | <dd class="description">Transfer-Encoding field</dd> | |
3561 | <dt>HTTP_FIELD_UNKNOWN </dt> | |
3562 | <dd class="description">Unknown field</dd> | |
3563 | <dt>HTTP_FIELD_UPGRADE </dt> | |
3564 | <dd class="description">Upgrade field</dd> | |
3565 | <dt>HTTP_FIELD_USER_AGENT </dt> | |
3566 | <dd class="description">User-Agent field</dd> | |
3567 | <dt>HTTP_FIELD_WWW_AUTHENTICATE </dt> | |
3568 | <dd class="description">WWW-Authenticate field</dd> | |
3569 | </dl> | |
3570 | <h3 class="enumeration"><a name="http_keepalive_e">http_keepalive_e</a></h3> | |
3571 | <p class="description">Types and structures...</p> | |
3572 | <h4 class="constants">Constants</h4> | |
3573 | <dl> | |
3574 | <dt>HTTP_KEEPALIVE_OFF </dt> | |
3575 | <dd class="description">No keep alive support</dd> | |
3576 | <dt>HTTP_KEEPALIVE_ON </dt> | |
3577 | <dd class="description">Use keep alive</dd> | |
3578 | </dl> | |
3579 | <h3 class="enumeration"><a name="http_state_e">http_state_e</a></h3> | |
3580 | <p class="description"></p> | |
3581 | <h4 class="constants">Constants</h4> | |
3582 | <dl> | |
3583 | <dt>HTTP_CLOSE </dt> | |
3584 | <dd class="description">CLOSE command, waiting for blank line</dd> | |
3585 | <dt>HTTP_DELETE </dt> | |
3586 | <dd class="description">DELETE command, waiting for blank line</dd> | |
3587 | <dt>HTTP_GET </dt> | |
3588 | <dd class="description">GET command, waiting for blank line</dd> | |
3589 | <dt>HTTP_GET_SEND </dt> | |
3590 | <dd class="description">GET command, sending data</dd> | |
3591 | <dt>HTTP_HEAD </dt> | |
3592 | <dd class="description">HEAD command, waiting for blank line</dd> | |
3593 | <dt>HTTP_OPTIONS </dt> | |
3594 | <dd class="description">OPTIONS command, waiting for blank line</dd> | |
3595 | <dt>HTTP_POST </dt> | |
3596 | <dd class="description">POST command, waiting for blank line</dd> | |
3597 | <dt>HTTP_POST_RECV </dt> | |
3598 | <dd class="description">POST command, receiving data</dd> | |
3599 | <dt>HTTP_POST_SEND </dt> | |
3600 | <dd class="description">POST command, sending data</dd> | |
3601 | <dt>HTTP_PUT </dt> | |
3602 | <dd class="description">PUT command, waiting for blank line</dd> | |
3603 | <dt>HTTP_PUT_RECV </dt> | |
3604 | <dd class="description">PUT command, receiving data</dd> | |
3605 | <dt>HTTP_STATUS </dt> | |
3606 | <dd class="description">Command complete, sending status</dd> | |
3607 | <dt>HTTP_TRACE </dt> | |
3608 | <dd class="description">TRACE command, waiting for blank line</dd> | |
3609 | <dt>HTTP_WAITING </dt> | |
3610 | <dd class="description">Waiting for command</dd> | |
3611 | </dl> | |
3612 | <h3 class="enumeration"><a name="http_status_e">http_status_e</a></h3> | |
3613 | <p class="description">HTTP status codes</p> | |
3614 | <h4 class="constants">Constants</h4> | |
3615 | <dl> | |
3616 | <dt>HTTP_ACCEPTED </dt> | |
3617 | <dd class="description">DELETE command was successful</dd> | |
3618 | <dt>HTTP_BAD_GATEWAY </dt> | |
3619 | <dd class="description">Bad gateway</dd> | |
3620 | <dt>HTTP_BAD_REQUEST </dt> | |
3621 | <dd class="description">Bad request</dd> | |
3622 | <dt>HTTP_CONFLICT </dt> | |
3623 | <dd class="description">Request is self-conflicting</dd> | |
3624 | <dt>HTTP_CONTINUE </dt> | |
3625 | <dd class="description">Everything OK, keep going...</dd> | |
3626 | <dt>HTTP_CREATED </dt> | |
3627 | <dd class="description">PUT command was successful</dd> | |
3628 | <dt>HTTP_ERROR </dt> | |
3629 | <dd class="description">An error response from httpXxxx()</dd> | |
3630 | <dt>HTTP_EXPECTATION_FAILED </dt> | |
3631 | <dd class="description">The expectation given in an Expect header field was not met</dd> | |
3632 | <dt>HTTP_FORBIDDEN </dt> | |
3633 | <dd class="description">Forbidden to access this URI</dd> | |
3634 | <dt>HTTP_GATEWAY_TIMEOUT </dt> | |
3635 | <dd class="description">Gateway connection timed out</dd> | |
3636 | <dt>HTTP_GONE </dt> | |
3637 | <dd class="description">Server has gone away</dd> | |
3638 | <dt>HTTP_LENGTH_REQUIRED </dt> | |
3639 | <dd class="description">A content length or encoding is required</dd> | |
3640 | <dt>HTTP_METHOD_NOT_ALLOWED </dt> | |
3641 | <dd class="description">Method is not allowed</dd> | |
3642 | <dt>HTTP_MOVED_PERMANENTLY </dt> | |
3643 | <dd class="description">Document has moved permanently</dd> | |
3644 | <dt>HTTP_MOVED_TEMPORARILY </dt> | |
3645 | <dd class="description">Document has moved temporarily</dd> | |
3646 | <dt>HTTP_MULTIPLE_CHOICES </dt> | |
3647 | <dd class="description">Multiple files match request</dd> | |
3648 | <dt>HTTP_NOT_ACCEPTABLE </dt> | |
3649 | <dd class="description">Not Acceptable</dd> | |
3650 | <dt>HTTP_NOT_AUTHORITATIVE </dt> | |
3651 | <dd class="description">Information isn't authoritative</dd> | |
3652 | <dt>HTTP_NOT_FOUND </dt> | |
3653 | <dd class="description">URI was not found</dd> | |
3654 | <dt>HTTP_NOT_IMPLEMENTED </dt> | |
3655 | <dd class="description">Feature not implemented</dd> | |
3656 | <dt>HTTP_NOT_MODIFIED </dt> | |
3657 | <dd class="description">File not modified</dd> | |
3658 | <dt>HTTP_NOT_SUPPORTED </dt> | |
3659 | <dd class="description">HTTP version not supported</dd> | |
3660 | <dt>HTTP_NO_CONTENT </dt> | |
3661 | <dd class="description">Successful command, no new data</dd> | |
3662 | <dt>HTTP_OK </dt> | |
3663 | <dd class="description">OPTIONS/GET/HEAD/POST/TRACE command was successful</dd> | |
3664 | <dt>HTTP_PARTIAL_CONTENT </dt> | |
3665 | <dd class="description">Only a partial file was recieved/sent</dd> | |
3666 | <dt>HTTP_PAYMENT_REQUIRED </dt> | |
3667 | <dd class="description">Payment required</dd> | |
3668 | <dt>HTTP_PRECONDITION </dt> | |
3669 | <dd class="description">Precondition failed</dd> | |
3670 | <dt>HTTP_PROXY_AUTHENTICATION </dt> | |
3671 | <dd class="description">Proxy Authentication is Required</dd> | |
3672 | <dt>HTTP_REQUESTED_RANGE </dt> | |
3673 | <dd class="description">The requested range is not satisfiable</dd> | |
3674 | <dt>HTTP_REQUEST_TIMEOUT </dt> | |
3675 | <dd class="description">Request timed out</dd> | |
3676 | <dt>HTTP_REQUEST_TOO_LARGE </dt> | |
3677 | <dd class="description">Request entity too large</dd> | |
3678 | <dt>HTTP_RESET_CONTENT </dt> | |
3679 | <dd class="description">Content was reset/recreated</dd> | |
3680 | <dt>HTTP_SEE_OTHER </dt> | |
3681 | <dd class="description">See this other link...</dd> | |
3682 | <dt>HTTP_SERVER_ERROR </dt> | |
3683 | <dd class="description">Internal server error</dd> | |
3684 | <dt>HTTP_SERVICE_UNAVAILABLE </dt> | |
3685 | <dd class="description">Service is unavailable</dd> | |
3686 | <dt>HTTP_SWITCHING_PROTOCOLS </dt> | |
3687 | <dd class="description">HTTP upgrade to TLS/SSL</dd> | |
3688 | <dt>HTTP_UNAUTHORIZED </dt> | |
3689 | <dd class="description">Unauthorized to access host</dd> | |
3690 | <dt>HTTP_UNSUPPORTED_MEDIATYPE </dt> | |
3691 | <dd class="description">The requested media type is unsupported</dd> | |
3692 | <dt>HTTP_UPGRADE_REQUIRED </dt> | |
3693 | <dd class="description">Upgrade to SSL/TLS required</dd> | |
3694 | <dt>HTTP_URI_TOO_LONG </dt> | |
3695 | <dd class="description">URI too long</dd> | |
3696 | <dt>HTTP_USE_PROXY </dt> | |
3697 | <dd class="description">Must use a proxy to access this URI</dd> | |
3698 | </dl> | |
3699 | <h3 class="enumeration"><a name="http_uri_coding_e">http_uri_coding_e</a></h3> | |
3700 | <p class="description"></p> | |
3701 | <h4 class="constants">Constants</h4> | |
3702 | <dl> | |
3703 | <dt>HTTP_URI_CODING_ALL </dt> | |
3704 | <dd class="description">En/decode everything</dd> | |
3705 | <dt>HTTP_URI_CODING_HOSTNAME </dt> | |
3706 | <dd class="description">En/decode the hostname portion</dd> | |
3707 | <dt>HTTP_URI_CODING_MOST </dt> | |
3708 | <dd class="description">En/decode all but the query</dd> | |
3709 | <dt>HTTP_URI_CODING_NONE </dt> | |
3710 | <dd class="description">Don't en/decode anything</dd> | |
3711 | <dt>HTTP_URI_CODING_QUERY </dt> | |
3712 | <dd class="description">En/decode the query portion</dd> | |
3713 | <dt>HTTP_URI_CODING_RESOURCE </dt> | |
3714 | <dd class="description">En/decode the resource portion</dd> | |
3715 | <dt>HTTP_URI_CODING_USERNAME </dt> | |
3716 | <dd class="description">En/decode the username portion</dd> | |
3717 | </dl> | |
3718 | <h3 class="enumeration"><a name="http_uri_status_e">http_uri_status_e</a></h3> | |
3719 | <p class="description"></p> | |
3720 | <h4 class="constants">Constants</h4> | |
3721 | <dl> | |
3722 | <dt>HTTP_URI_BAD_ARGUMENTS </dt> | |
3723 | <dd class="description">Bad arguments to function (error)</dd> | |
3724 | <dt>HTTP_URI_BAD_HOSTNAME </dt> | |
3725 | <dd class="description">Bad hostname in URI (error)</dd> | |
3726 | <dt>HTTP_URI_BAD_PORT </dt> | |
3727 | <dd class="description">Bad port number in URI (error)</dd> | |
3728 | <dt>HTTP_URI_BAD_RESOURCE </dt> | |
3729 | <dd class="description">Bad resource in URI (error)</dd> | |
3730 | <dt>HTTP_URI_BAD_SCHEME </dt> | |
3731 | <dd class="description">Bad scheme in URI (error)</dd> | |
3732 | <dt>HTTP_URI_BAD_URI </dt> | |
3733 | <dd class="description">Bad/empty URI (error)</dd> | |
3734 | <dt>HTTP_URI_BAD_USERNAME </dt> | |
3735 | <dd class="description">Bad username in URI (error)</dd> | |
3736 | <dt>HTTP_URI_MISSING_RESOURCE </dt> | |
3737 | <dd class="description">Missing resource in URI (warning)</dd> | |
3738 | <dt>HTTP_URI_MISSING_SCHEME </dt> | |
3739 | <dd class="description">Missing scheme in URI (warning)</dd> | |
3740 | <dt>HTTP_URI_OK </dt> | |
3741 | <dd class="description">URI decoded OK</dd> | |
3742 | <dt>HTTP_URI_OVERFLOW </dt> | |
3743 | <dd class="description">URI buffer for httpAssembleURI is too small</dd> | |
3744 | <dt>HTTP_URI_UNKNOWN_SCHEME </dt> | |
3745 | <dd class="description">Unknown scheme in URI (warning)</dd> | |
3746 | </dl> | |
3747 | <h3 class="enumeration"><a name="http_version_e">http_version_e</a></h3> | |
3748 | <p class="description"></p> | |
3749 | <h4 class="constants">Constants</h4> | |
3750 | <dl> | |
3751 | <dt>HTTP_0_9 </dt> | |
3752 | <dd class="description">HTTP/0.9</dd> | |
3753 | <dt>HTTP_1_0 </dt> | |
3754 | <dd class="description">HTTP/1.0</dd> | |
3755 | <dt>HTTP_1_1 </dt> | |
3756 | <dd class="description">HTTP/1.1</dd> | |
3757 | </dl> | |
3758 | <h3 class="enumeration"><a name="ipp_finish_e">ipp_finish_e</a></h3> | |
3759 | <p class="description"></p> | |
3760 | <h4 class="constants">Constants</h4> | |
3761 | <dl> | |
3762 | <dt>IPP_FINISHINGS_BALE </dt> | |
3763 | <dd class="description">Bale (any type)</dd> | |
3764 | <dt>IPP_FINISHINGS_BIND </dt> | |
3765 | <dd class="description">Bind</dd> | |
3766 | <dt>IPP_FINISHINGS_BIND_BOTTOM </dt> | |
3767 | <dd class="description">Bind on bottom</dd> | |
3768 | <dt>IPP_FINISHINGS_BIND_LEFT </dt> | |
3769 | <dd class="description">Bind on left</dd> | |
3770 | <dt>IPP_FINISHINGS_BIND_RIGHT </dt> | |
3771 | <dd class="description">Bind on right</dd> | |
3772 | <dt>IPP_FINISHINGS_BIND_TOP </dt> | |
3773 | <dd class="description">Bind on top</dd> | |
3774 | <dt>IPP_FINISHINGS_BOOKLET_MAKER </dt> | |
3775 | <dd class="description">Fold to make booklet</dd> | |
3776 | <dt>IPP_FINISHINGS_COVER </dt> | |
3777 | <dd class="description">Add cover</dd> | |
3778 | <dt>IPP_FINISHINGS_EDGE_STITCH </dt> | |
3779 | <dd class="description">Stitch along any side</dd> | |
3780 | <dt>IPP_FINISHINGS_EDGE_STITCH_BOTTOM </dt> | |
3781 | <dd class="description">Stitch along bottom edge</dd> | |
3782 | <dt>IPP_FINISHINGS_EDGE_STITCH_LEFT </dt> | |
3783 | <dd class="description">Stitch along left side</dd> | |
3784 | <dt>IPP_FINISHINGS_EDGE_STITCH_RIGHT </dt> | |
3785 | <dd class="description">Stitch along right side</dd> | |
3786 | <dt>IPP_FINISHINGS_EDGE_STITCH_TOP </dt> | |
3787 | <dd class="description">Stitch along top edge</dd> | |
3788 | <dt>IPP_FINISHINGS_FOLD </dt> | |
3789 | <dd class="description">Fold (any type)</dd> | |
3790 | <dt>IPP_FINISHINGS_JOB_OFFSET </dt> | |
3791 | <dd class="description">Offset for binding (any type)</dd> | |
3792 | <dt>IPP_FINISHINGS_NONE </dt> | |
3793 | <dd class="description">No finishing</dd> | |
3794 | <dt>IPP_FINISHINGS_PUNCH </dt> | |
3795 | <dd class="description">Punch (any location/count)</dd> | |
3796 | <dt>IPP_FINISHINGS_SADDLE_STITCH </dt> | |
3797 | <dd class="description">Staple interior</dd> | |
3798 | <dt>IPP_FINISHINGS_STAPLE </dt> | |
3799 | <dd class="description">Staple (any location)</dd> | |
3800 | <dt>IPP_FINISHINGS_STAPLE_BOTTOM_LEFT </dt> | |
3801 | <dd class="description">Staple bottom left corner</dd> | |
3802 | <dt>IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT </dt> | |
3803 | <dd class="description">Staple bottom right corner</dd> | |
3804 | <dt>IPP_FINISHINGS_STAPLE_DUAL_BOTTOM </dt> | |
3805 | <dd class="description">Two staples on bottom</dd> | |
3806 | <dt>IPP_FINISHINGS_STAPLE_DUAL_LEFT </dt> | |
3807 | <dd class="description">Two staples on left</dd> | |
3808 | <dt>IPP_FINISHINGS_STAPLE_DUAL_RIGHT </dt> | |
3809 | <dd class="description">Two staples on right</dd> | |
3810 | <dt>IPP_FINISHINGS_STAPLE_DUAL_TOP </dt> | |
3811 | <dd class="description">Two staples on top</dd> | |
3812 | <dt>IPP_FINISHINGS_STAPLE_TOP_LEFT </dt> | |
3813 | <dd class="description">Staple top left corner</dd> | |
3814 | <dt>IPP_FINISHINGS_STAPLE_TOP_RIGHT </dt> | |
3815 | <dd class="description">Staple top right corner</dd> | |
3816 | <dt>IPP_FINISHINGS_TRIM </dt> | |
3817 | <dd class="description">Trim (any type)</dd> | |
3818 | </dl> | |
3819 | <h3 class="enumeration"><a name="ipp_jstate_e">ipp_jstate_e</a></h3> | |
3820 | <p class="description"></p> | |
3821 | <h4 class="constants">Constants</h4> | |
3822 | <dl> | |
3823 | <dt>IPP_JOB_ABORTED </dt> | |
3824 | <dd class="description">Job has aborted due to error</dd> | |
3825 | <dt>IPP_JOB_CANCELED </dt> | |
3826 | <dd class="description">Job has been canceled</dd> | |
3827 | <dt>IPP_JOB_COMPLETED </dt> | |
3828 | <dd class="description">Job has completed successfully</dd> | |
3829 | <dt>IPP_JOB_HELD </dt> | |
3830 | <dd class="description">Job is held for printing</dd> | |
3831 | <dt>IPP_JOB_PENDING </dt> | |
3832 | <dd class="description">Job is waiting to be printed</dd> | |
3833 | <dt>IPP_JOB_PROCESSING </dt> | |
3834 | <dd class="description">Job is currently printing</dd> | |
3835 | <dt>IPP_JOB_STOPPED </dt> | |
3836 | <dd class="description">Job has been stopped</dd> | |
3837 | </dl> | |
3838 | <h3 class="enumeration"><a name="ipp_op_e">ipp_op_e</a></h3> | |
3839 | <p class="description"></p> | |
3840 | <h4 class="constants">Constants</h4> | |
3841 | <dl> | |
3842 | <dt>CUPS_ACCEPT_JOBS </dt> | |
3843 | <dd class="description">Accept new jobs on a printer</dd> | |
3844 | <dt>CUPS_ADD_MODIFY_CLASS </dt> | |
3845 | <dd class="description">Add or modify a class</dd> | |
3846 | <dt>CUPS_ADD_MODIFY_PRINTER </dt> | |
3847 | <dd class="description">Add or modify a printer</dd> | |
3848 | <dt>CUPS_AUTHENTICATE_JOB <span class="info"> CUPS 1.2 </span></dt> | |
3849 | <dd class="description">Authenticate a job </dd> | |
3850 | <dt>CUPS_DELETE_CLASS </dt> | |
3851 | <dd class="description">Delete a class</dd> | |
3852 | <dt>CUPS_DELETE_PRINTER </dt> | |
3853 | <dd class="description">Delete a printer</dd> | |
3854 | <dt>CUPS_GET_CLASSES <span class="info"> DEPRECATED </span></dt> | |
3855 | <dd class="description">Get a list of classes </dd> | |
3856 | <dt>CUPS_GET_DEFAULT </dt> | |
3857 | <dd class="description">Get the default printer</dd> | |
3858 | <dt>CUPS_GET_DEVICES </dt> | |
3859 | <dd class="description">Get a list of supported devices</dd> | |
3860 | <dt>CUPS_GET_DOCUMENT <span class="info"> CUPS 1.4 </span></dt> | |
3861 | <dd class="description">Get a document file </dd> | |
3862 | <dt>CUPS_GET_PPD <span class="info"> CUPS 1.3 </span></dt> | |
3863 | <dd class="description">Get a PPD file </dd> | |
3864 | <dt>CUPS_GET_PPDS </dt> | |
3865 | <dd class="description">Get a list of supported drivers</dd> | |
3866 | <dt>CUPS_GET_PRINTERS </dt> | |
3867 | <dd class="description">Get a list of printers and/or classes</dd> | |
3868 | <dt>CUPS_MOVE_JOB </dt> | |
3869 | <dd class="description">Move a job to a different printer</dd> | |
3870 | <dt>CUPS_REJECT_JOBS </dt> | |
3871 | <dd class="description">Reject new jobs on a printer</dd> | |
3872 | <dt>CUPS_SET_DEFAULT </dt> | |
3873 | <dd class="description">Set the default printer</dd> | |
3874 | <dt>IPP_CANCEL_JOB </dt> | |
3875 | <dd class="description">Cancel a job</dd> | |
3876 | <dt>IPP_CANCEL_SUBSCRIPTION <span class="info"> CUPS 1.2 </span></dt> | |
3877 | <dd class="description">Cancel a subscription </dd> | |
3878 | <dt>IPP_CREATE_JOB </dt> | |
3879 | <dd class="description">Create an empty print job</dd> | |
3880 | <dt>IPP_CREATE_JOB_SUBSCRIPTION <span class="info"> CUPS 1.2 </span></dt> | |
3881 | <dd class="description">Create a job subscription </dd> | |
3882 | <dt>IPP_CREATE_PRINTER_SUBSCRIPTION <span class="info"> CUPS 1.2 </span></dt> | |
3883 | <dd class="description">Create a printer subscription </dd> | |
3884 | <dt>IPP_DISABLE_PRINTER </dt> | |
3885 | <dd class="description">Stop a printer</dd> | |
3886 | <dt>IPP_ENABLE_PRINTER </dt> | |
3887 | <dd class="description">Start a printer</dd> | |
3888 | <dt>IPP_GET_JOBS </dt> | |
3889 | <dd class="description">Get a list of jobs</dd> | |
3890 | <dt>IPP_GET_JOB_ATTRIBUTES </dt> | |
3891 | <dd class="description">Get job attributes</dd> | |
3892 | <dt>IPP_GET_NOTIFICATIONS <span class="info"> CUPS 1.2 </span></dt> | |
3893 | <dd class="description">Get notification events </dd> | |
3894 | <dt>IPP_GET_PRINTER_ATTRIBUTES </dt> | |
3895 | <dd class="description">Get printer attributes</dd> | |
3896 | <dt>IPP_GET_PRINTER_SUPPORTED_VALUES </dt> | |
3897 | <dd class="description">Get supported attribute values</dd> | |
3898 | <dt>IPP_GET_SUBSCRIPTIONS <span class="info"> CUPS 1.2 </span></dt> | |
3899 | <dd class="description">Get list of subscriptions </dd> | |
3900 | <dt>IPP_GET_SUBSCRIPTION_ATTRIBUTES <span class="info"> CUPS 1.2 </span></dt> | |
3901 | <dd class="description">Get subscription attributes </dd> | |
3902 | <dt>IPP_HOLD_JOB </dt> | |
3903 | <dd class="description">Hold a job for printing</dd> | |
3904 | <dt>IPP_PAUSE_PRINTER </dt> | |
3905 | <dd class="description">Stop a printer</dd> | |
3906 | <dt>IPP_PRINT_JOB </dt> | |
3907 | <dd class="description">Print a single file</dd> | |
3908 | <dt>IPP_PURGE_JOBS </dt> | |
3909 | <dd class="description">Cancel all jobs</dd> | |
3910 | <dt>IPP_RELEASE_JOB </dt> | |
3911 | <dd class="description">Release a job for printing</dd> | |
3912 | <dt>IPP_RENEW_SUBSCRIPTION <span class="info"> CUPS 1.2 </span></dt> | |
3913 | <dd class="description">Renew a printer subscription </dd> | |
3914 | <dt>IPP_RESTART_JOB </dt> | |
3915 | <dd class="description">Reprint a job</dd> | |
3916 | <dt>IPP_RESUME_PRINTER </dt> | |
3917 | <dd class="description">Start a printer</dd> | |
3918 | <dt>IPP_SEND_DOCUMENT </dt> | |
3919 | <dd class="description">Add a file to a job</dd> | |
3920 | <dt>IPP_SET_JOB_ATTRIBUTES </dt> | |
3921 | <dd class="description">Set job attributes</dd> | |
3922 | <dt>IPP_VALIDATE_JOB </dt> | |
3923 | <dd class="description">Validate job options</dd> | |
3924 | </dl> | |
3925 | <h3 class="enumeration"><a name="ipp_orient_e">ipp_orient_e</a></h3> | |
3926 | <p class="description"></p> | |
3927 | <h4 class="constants">Constants</h4> | |
3928 | <dl> | |
3929 | <dt>IPP_LANDSCAPE </dt> | |
3930 | <dd class="description">90 degrees counter-clockwise</dd> | |
3931 | <dt>IPP_PORTRAIT </dt> | |
3932 | <dd class="description">No rotation</dd> | |
3933 | <dt>IPP_REVERSE_LANDSCAPE </dt> | |
3934 | <dd class="description">90 degrees clockwise</dd> | |
3935 | <dt>IPP_REVERSE_PORTRAIT </dt> | |
3936 | <dd class="description">180 degrees</dd> | |
3937 | </dl> | |
3938 | <h3 class="enumeration"><a name="ipp_pstate_e">ipp_pstate_e</a></h3> | |
3939 | <p class="description"></p> | |
3940 | <h4 class="constants">Constants</h4> | |
3941 | <dl> | |
3942 | <dt>IPP_PRINTER_IDLE </dt> | |
3943 | <dd class="description">Printer is idle</dd> | |
3944 | <dt>IPP_PRINTER_PROCESSING </dt> | |
3945 | <dd class="description">Printer is working</dd> | |
3946 | <dt>IPP_PRINTER_STOPPED </dt> | |
3947 | <dd class="description">Printer is stopped</dd> | |
3948 | </dl> | |
3949 | <h3 class="enumeration"><a name="ipp_quality_e">ipp_quality_e</a></h3> | |
3950 | <p class="description"></p> | |
3951 | <h4 class="constants">Constants</h4> | |
3952 | <dl> | |
3953 | <dt>IPP_QUALITY_DRAFT </dt> | |
3954 | <dd class="description">Draft quality</dd> | |
3955 | <dt>IPP_QUALITY_HIGH </dt> | |
3956 | <dd class="description">High quality</dd> | |
3957 | <dt>IPP_QUALITY_NORMAL </dt> | |
3958 | <dd class="description">Normal quality</dd> | |
3959 | </dl> | |
3960 | <h3 class="enumeration"><a name="ipp_res_e">ipp_res_e</a></h3> | |
3961 | <p class="description">Types and structures...</p> | |
3962 | <h4 class="constants">Constants</h4> | |
3963 | <dl> | |
3964 | <dt>IPP_RES_PER_CM </dt> | |
3965 | <dd class="description">Pixels per centimeter</dd> | |
3966 | <dt>IPP_RES_PER_INCH </dt> | |
3967 | <dd class="description">Pixels per inch</dd> | |
3968 | </dl> | |
3969 | <h3 class="enumeration"><a name="ipp_state_e">ipp_state_e</a></h3> | |
3970 | <p class="description"></p> | |
3971 | <h4 class="constants">Constants</h4> | |
3972 | <dl> | |
3973 | <dt>IPP_ATTRIBUTE </dt> | |
3974 | <dd class="description">One or more attributes need to be sent/received</dd> | |
3975 | <dt>IPP_DATA </dt> | |
3976 | <dd class="description">IPP request data needs to be sent/received</dd> | |
3977 | <dt>IPP_ERROR </dt> | |
3978 | <dd class="description">An error occurred</dd> | |
3979 | <dt>IPP_HEADER </dt> | |
3980 | <dd class="description">The request header needs to be sent/received</dd> | |
3981 | <dt>IPP_IDLE </dt> | |
3982 | <dd class="description">Nothing is happening/request completed</dd> | |
3983 | </dl> | |
3984 | <h3 class="enumeration"><a name="ipp_status_e">ipp_status_e</a></h3> | |
3985 | <p class="description">IPP status codes...</p> | |
3986 | <h4 class="constants">Constants</h4> | |
3987 | <dl> | |
3988 | <dt>CUPS_SEE_OTHER </dt> | |
3989 | <dd class="description">cups-see-other</dd> | |
3990 | <dt>IPP_ATTRIBUTES </dt> | |
3991 | <dd class="description">client-error-attributes-or-values-not-supported</dd> | |
3992 | <dt>IPP_ATTRIBUTES_NOT_SETTABLE </dt> | |
3993 | <dd class="description">client-error-attributes-not-settable</dd> | |
3994 | <dt>IPP_BAD_REQUEST </dt> | |
3995 | <dd class="description">client-error-bad-request</dd> | |
3996 | <dt>IPP_CHARSET </dt> | |
3997 | <dd class="description">client-error-charset-not-supported</dd> | |
3998 | <dt>IPP_COMPRESSION_ERROR </dt> | |
3999 | <dd class="description">client-error-compression-error</dd> | |
4000 | <dt>IPP_COMPRESSION_NOT_SUPPORTED </dt> | |
4001 | <dd class="description">client-error-compression-not-supported</dd> | |
4002 | <dt>IPP_CONFLICT </dt> | |
4003 | <dd class="description">client-error-conflicting-attributes</dd> | |
4004 | <dt>IPP_DEVICE_ERROR </dt> | |
4005 | <dd class="description">server-error-device-error</dd> | |
4006 | <dt>IPP_DOCUMENT_ACCESS_ERROR </dt> | |
4007 | <dd class="description">client-error-document-access-error</dd> | |
4008 | <dt>IPP_DOCUMENT_FORMAT </dt> | |
4009 | <dd class="description">client-error-document-format-not-supported</dd> | |
4010 | <dt>IPP_DOCUMENT_FORMAT_ERROR </dt> | |
4011 | <dd class="description">client-error-document-format-error</dd> | |
4012 | <dt>IPP_ERROR_JOB_CANCELED </dt> | |
4013 | <dd class="description">server-error-job-canceled</dd> | |
4014 | <dt>IPP_FORBIDDEN </dt> | |
4015 | <dd class="description">client-error-forbidden</dd> | |
4016 | <dt>IPP_GONE </dt> | |
4017 | <dd class="description">client-error-gone</dd> | |
4018 | <dt>IPP_IGNORED_ALL_NOTIFICATIONS </dt> | |
4019 | <dd class="description">client-error-ignored-all-notifications</dd> | |
4020 | <dt>IPP_IGNORED_ALL_SUBSCRIPTIONS </dt> | |
4021 | <dd class="description">client-error-ignored-all-subscriptions</dd> | |
4022 | <dt>IPP_INTERNAL_ERROR </dt> | |
4023 | <dd class="description">server-error-internal-error</dd> | |
4024 | <dt>IPP_MULTIPLE_JOBS_NOT_SUPPORTED </dt> | |
4025 | <dd class="description">server-error-multiple-document-jobs-not-supported</dd> | |
4026 | <dt>IPP_NOT_ACCEPTING </dt> | |
4027 | <dd class="description">server-error-not-accepting-jobs</dd> | |
4028 | <dt>IPP_NOT_AUTHENTICATED </dt> | |
4029 | <dd class="description">client-error-not-authenticated</dd> | |
4030 | <dt>IPP_NOT_AUTHORIZED </dt> | |
4031 | <dd class="description">client-error-not-authorized</dd> | |
4032 | <dt>IPP_NOT_FOUND </dt> | |
4033 | <dd class="description">client-error-not-found</dd> | |
4034 | <dt>IPP_NOT_POSSIBLE </dt> | |
4035 | <dd class="description">client-error-not-possible</dd> | |
4036 | <dt>IPP_OK </dt> | |
4037 | <dd class="description">successful-ok</dd> | |
4038 | <dt>IPP_OK_BUT_CANCEL_SUBSCRIPTION </dt> | |
4039 | <dd class="description">successful-ok-but-cancel-subscription</dd> | |
4040 | <dt>IPP_OK_CONFLICT </dt> | |
4041 | <dd class="description">successful-ok-conflicting-attributes</dd> | |
4042 | <dt>IPP_OK_EVENTS_COMPLETE </dt> | |
4043 | <dd class="description">successful-ok-events-complete</dd> | |
4044 | <dt>IPP_OK_IGNORED_NOTIFICATIONS </dt> | |
4045 | <dd class="description">successful-ok-ignored-notifications</dd> | |
4046 | <dt>IPP_OK_IGNORED_SUBSCRIPTIONS </dt> | |
4047 | <dd class="description">successful-ok-ignored-subscriptions</dd> | |
4048 | <dt>IPP_OK_SUBST </dt> | |
4049 | <dd class="description">successful-ok-ignored-or-substituted-attributes</dd> | |
4050 | <dt>IPP_OK_TOO_MANY_EVENTS </dt> | |
4051 | <dd class="description">successful-ok-too-many-events</dd> | |
4052 | <dt>IPP_OPERATION_NOT_SUPPORTED </dt> | |
4053 | <dd class="description">server-error-operation-not-supported</dd> | |
4054 | <dt>IPP_PRINTER_BUSY </dt> | |
4055 | <dd class="description">server-error-busy</dd> | |
4056 | <dt>IPP_PRINTER_IS_DEACTIVATED </dt> | |
4057 | <dd class="description">server-error-printer-is-deactivated</dd> | |
4058 | <dt>IPP_PRINT_SUPPORT_FILE_NOT_FOUND </dt> | |
4059 | <dd class="description">client-error-print-support-file-not-found</dd> | |
4060 | <dt>IPP_REQUEST_ENTITY </dt> | |
4061 | <dd class="description">client-error-request-entity-too-large</dd> | |
4062 | <dt>IPP_REQUEST_VALUE </dt> | |
4063 | <dd class="description">client-error-request-value-too-long</dd> | |
4064 | <dt>IPP_SERVICE_UNAVAILABLE </dt> | |
4065 | <dd class="description">server-error-service-unavailable</dd> | |
4066 | <dt>IPP_TEMPORARY_ERROR </dt> | |
4067 | <dd class="description">server-error-temporary-error</dd> | |
4068 | <dt>IPP_TIMEOUT </dt> | |
4069 | <dd class="description">client-error-timeout</dd> | |
4070 | <dt>IPP_TOO_MANY_SUBSCRIPTIONS </dt> | |
4071 | <dd class="description">client-error-too-many-subscriptions</dd> | |
4072 | <dt>IPP_URI_SCHEME </dt> | |
4073 | <dd class="description">client-error-uri-scheme-not-supported</dd> | |
4074 | <dt>IPP_VERSION_NOT_SUPPORTED </dt> | |
4075 | <dd class="description">server-error-version-not-supported</dd> | |
4076 | </dl> | |
4077 | <h3 class="enumeration"><a name="ipp_tag_e">ipp_tag_e</a></h3> | |
4078 | <p class="description">Format tags for attributes...</p> | |
4079 | <h4 class="constants">Constants</h4> | |
4080 | <dl> | |
4081 | <dt>IPP_TAG_ADMINDEFINE </dt> | |
4082 | <dd class="description">Admin-defined value</dd> | |
4083 | <dt>IPP_TAG_BEGIN_COLLECTION </dt> | |
4084 | <dd class="description">Beginning of collection value</dd> | |
4085 | <dt>IPP_TAG_BOOLEAN </dt> | |
4086 | <dd class="description">Boolean value</dd> | |
4087 | <dt>IPP_TAG_CHARSET </dt> | |
4088 | <dd class="description">Character set value</dd> | |
4089 | <dt>IPP_TAG_COPY </dt> | |
4090 | <dd class="description">Bitflag for copied attribute values</dd> | |
4091 | <dt>IPP_TAG_DATE </dt> | |
4092 | <dd class="description">Date/time value</dd> | |
4093 | <dt>IPP_TAG_DEFAULT </dt> | |
4094 | <dd class="description">Default value</dd> | |
4095 | <dt>IPP_TAG_DELETEATTR </dt> | |
4096 | <dd class="description">Delete-attribute value</dd> | |
4097 | <dt>IPP_TAG_END </dt> | |
4098 | <dd class="description">End-of-attributes</dd> | |
4099 | <dt>IPP_TAG_END_COLLECTION </dt> | |
4100 | <dd class="description">End of collection value</dd> | |
4101 | <dt>IPP_TAG_ENUM </dt> | |
4102 | <dd class="description">Enumeration value</dd> | |
4103 | <dt>IPP_TAG_EVENT_NOTIFICATION </dt> | |
4104 | <dd class="description">Event group</dd> | |
4105 | <dt>IPP_TAG_INTEGER </dt> | |
4106 | <dd class="description">Integer value</dd> | |
4107 | <dt>IPP_TAG_JOB </dt> | |
4108 | <dd class="description">Job group</dd> | |
4109 | <dt>IPP_TAG_KEYWORD </dt> | |
4110 | <dd class="description">Keyword value</dd> | |
4111 | <dt>IPP_TAG_LANGUAGE </dt> | |
4112 | <dd class="description">Language value</dd> | |
4113 | <dt>IPP_TAG_MASK </dt> | |
4114 | <dd class="description">Mask for copied attribute values</dd> | |
4115 | <dt>IPP_TAG_MEMBERNAME </dt> | |
4116 | <dd class="description">Collection member name value</dd> | |
4117 | <dt>IPP_TAG_MIMETYPE </dt> | |
4118 | <dd class="description">MIME media type value</dd> | |
4119 | <dt>IPP_TAG_NAME </dt> | |
4120 | <dd class="description">Name value</dd> | |
4121 | <dt>IPP_TAG_NAMELANG </dt> | |
4122 | <dd class="description">Name-with-language value</dd> | |
4123 | <dt>IPP_TAG_NOTSETTABLE </dt> | |
4124 | <dd class="description">Not-settable value</dd> | |
4125 | <dt>IPP_TAG_NOVALUE </dt> | |
4126 | <dd class="description">No-value value</dd> | |
4127 | <dt>IPP_TAG_OPERATION </dt> | |
4128 | <dd class="description">Operation group</dd> | |
4129 | <dt>IPP_TAG_PRINTER </dt> | |
4130 | <dd class="description">Printer group</dd> | |
4131 | <dt>IPP_TAG_RANGE </dt> | |
4132 | <dd class="description">Range value</dd> | |
4133 | <dt>IPP_TAG_RESOLUTION </dt> | |
4134 | <dd class="description">Resolution value</dd> | |
4135 | <dt>IPP_TAG_STRING </dt> | |
4136 | <dd class="description">Octet string value</dd> | |
4137 | <dt>IPP_TAG_SUBSCRIPTION </dt> | |
4138 | <dd class="description">Subscription group</dd> | |
4139 | <dt>IPP_TAG_TEXT </dt> | |
4140 | <dd class="description">Text value</dd> | |
4141 | <dt>IPP_TAG_TEXTLANG </dt> | |
4142 | <dd class="description">Text-with-language value</dd> | |
4143 | <dt>IPP_TAG_UNKNOWN </dt> | |
4144 | <dd class="description">Unknown value</dd> | |
4145 | <dt>IPP_TAG_UNSUPPORTED_GROUP </dt> | |
4146 | <dd class="description">Unsupported attributes group</dd> | |
4147 | <dt>IPP_TAG_UNSUPPORTED_VALUE </dt> | |
4148 | <dd class="description">Unsupported value</dd> | |
4149 | <dt>IPP_TAG_URI </dt> | |
4150 | <dd class="description">URI value</dd> | |
4151 | <dt>IPP_TAG_URISCHEME </dt> | |
4152 | <dd class="description">URI scheme value</dd> | |
4153 | <dt>IPP_TAG_ZERO </dt> | |
4154 | <dd class="description">Zero tag - used for separators</dd> | |
4155 | </dl> | |
4156 | </div> | |
ef416fc2 | 4157 | </body> |
4158 | </html> |