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