]>
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> | |
0268488e MS |
5 | <title>HTTP and IPP APIs </title> |
6 | <meta name="keywords" content="Programming"> | |
7 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> | |
8 | <meta name="creator" content="Mini-XML v2.7"> | |
5a738aea MS |
9 | <style type="text/css"><!-- |
10 | BODY { | |
11 | font-family: lucida grande, geneva, helvetica, arial, sans-serif; | |
12 | } | |
13 | ||
14 | H1, H2, H3, H4, H5, H6, P, TD, TH { | |
15 | font-family: lucida grande, geneva, helvetica, arial, sans-serif; | |
16 | } | |
17 | ||
18 | KBD { | |
19 | font-family: monaco, courier, monospace; | |
20 | font-weight: bold; | |
21 | } | |
22 | ||
23 | PRE { | |
24 | font-family: monaco, courier, monospace; | |
25 | } | |
26 | ||
27 | PRE.command { | |
10d09e33 | 28 | border: dotted thin #7f7f7f; |
5a738aea | 29 | margin-left: 36pt; |
10d09e33 | 30 | padding: 10px; |
5a738aea MS |
31 | } |
32 | ||
f11a948a MS |
33 | P.compact { |
34 | margin: 0; | |
35 | } | |
36 | ||
e4572d57 MS |
37 | P.example { |
38 | font-style: italic; | |
39 | margin-left: 36pt; | |
40 | } | |
ca6b43fc | 41 | |
5a738aea MS |
42 | PRE.example { |
43 | background: #eeeeee; | |
44 | border: dotted thin #999999; | |
45 | margin-left: 36pt; | |
178cb736 | 46 | padding: 10pt; |
5a738aea MS |
47 | } |
48 | ||
49 | PRE.command EM, PRE.example EM { | |
50 | font-family: lucida grande, geneva, helvetica, arial, sans-serif; | |
51 | } | |
52 | ||
53 | P.command { | |
54 | font-family: monaco, courier, monospace; | |
55 | margin-left: 36pt; | |
56 | } | |
57 | ||
58 | P.formula { | |
59 | font-style: italic; | |
60 | margin-left: 36pt; | |
61 | } | |
62 | ||
63 | BLOCKQUOTE { | |
178cb736 | 64 | background: #eeeeee; |
5a738aea MS |
65 | border: solid thin #999999; |
66 | padding: 10pt; | |
67 | } | |
68 | ||
e4572d57 MS |
69 | A IMG { |
70 | border: none; | |
71 | } | |
72 | ||
73 | A:link:hover IMG { | |
74 | background: #f0f0f0; | |
75 | border-radius: 10px; | |
76 | -moz-border-radius: 10px; | |
77 | } | |
78 | ||
5a738aea | 79 | A:link, A:visited { |
ca6b43fc | 80 | font-weight: inherit; |
5a738aea | 81 | text-decoration: none; |
5a738aea MS |
82 | } |
83 | ||
84 | A:link:hover, A:visited:hover, A:active { | |
85 | text-decoration: underline; | |
5a738aea MS |
86 | } |
87 | ||
88 | SUB, SUP { | |
89 | font-size: 50%; | |
90 | } | |
91 | ||
e4572d57 MS |
92 | TR.data, TD.data, TR.data TD { |
93 | margin-top: 10pt; | |
94 | padding: 5pt; | |
95 | border-bottom: solid 1pt #999999; | |
96 | } | |
97 | ||
98 | TR.data TH { | |
99 | border-bottom: solid 1pt #999999; | |
100 | padding-top: 10pt; | |
101 | padding-left: 5pt; | |
102 | text-align: left; | |
103 | } | |
104 | ||
5a738aea MS |
105 | DIV.table TABLE { |
106 | border: solid thin #999999; | |
107 | border-collapse: collapse; | |
108 | border-spacing: 0; | |
109 | margin-left: auto; | |
110 | margin-right: auto; | |
111 | } | |
112 | ||
113 | DIV.table CAPTION { | |
114 | caption-side: top; | |
115 | font-size: 120%; | |
116 | font-style: italic; | |
117 | font-weight: bold; | |
118 | margin-left: auto; | |
119 | margin-right: auto; | |
120 | } | |
121 | ||
122 | DIV.table TABLE TD { | |
123 | border: solid thin #cccccc; | |
124 | padding-top: 5pt; | |
125 | } | |
126 | ||
127 | DIV.table TABLE TH { | |
128 | background: #cccccc; | |
129 | border: none; | |
130 | border-bottom: solid thin #999999; | |
131 | } | |
132 | ||
133 | DIV.figure TABLE { | |
134 | margin-left: auto; | |
135 | margin-right: auto; | |
136 | } | |
137 | ||
138 | DIV.figure CAPTION { | |
139 | caption-side: bottom; | |
140 | font-size: 120%; | |
141 | font-style: italic; | |
142 | font-weight: bold; | |
143 | margin-left: auto; | |
144 | margin-right: auto; | |
145 | } | |
146 | ||
147 | TH.label { | |
5a738aea MS |
148 | text-align: right; |
149 | vertical-align: top; | |
150 | } | |
151 | ||
e4572d57 MS |
152 | TH.sublabel { |
153 | text-align: right; | |
154 | font-weight: normal; | |
155 | } | |
156 | ||
5a738aea MS |
157 | HR { |
158 | border: solid thin; | |
159 | } | |
160 | ||
161 | SPAN.info { | |
e4572d57 MS |
162 | background: black; |
163 | border: thin solid black; | |
164 | color: white; | |
5a738aea MS |
165 | font-size: 80%; |
166 | font-style: italic; | |
167 | font-weight: bold; | |
168 | white-space: nowrap; | |
169 | } | |
170 | ||
171 | H2 SPAN.info, H3 SPAN.info, H4 SPAN.info { | |
172 | float: right; | |
173 | font-size: 100%; | |
174 | } | |
175 | ||
178cb736 MS |
176 | H1.title { |
177 | } | |
178 | ||
5a738aea MS |
179 | H2.title, H3.title { |
180 | border-bottom: solid 2pt #000000; | |
181 | } | |
182 | ||
e4572d57 MS |
183 | DIV.indent, TABLE.indent { |
184 | margin-top: 2em; | |
185 | margin-left: auto; | |
186 | margin-right: auto; | |
187 | width: 90%; | |
188 | } | |
189 | ||
190 | TABLE.indent { | |
191 | border-collapse: collapse; | |
192 | } | |
193 | ||
194 | TABLE.indent TD, TABLE.indent TH { | |
195 | padding: 0; | |
196 | } | |
197 | ||
198 | TABLE.list { | |
199 | border-collapse: collapse; | |
200 | margin-left: auto; | |
201 | margin-right: auto; | |
202 | width: 90%; | |
203 | } | |
204 | ||
205 | TABLE.list TH { | |
206 | background: white; | |
207 | border-bottom: solid thin #cccccc; | |
208 | color: #444444; | |
209 | padding-top: 10pt; | |
210 | padding-left: 5pt; | |
211 | text-align: left; | |
212 | vertical-align: bottom; | |
213 | white-space: nowrap; | |
214 | } | |
215 | ||
216 | TABLE.list TH A { | |
217 | color: #4444cc; | |
218 | } | |
219 | ||
220 | TABLE.list TD { | |
221 | border-bottom: solid thin #eeeeee; | |
222 | padding-top: 5pt; | |
223 | padding-left: 5pt; | |
224 | } | |
225 | ||
226 | TABLE.list TR:nth-child(even) { | |
227 | background: #f8f8f8; | |
228 | } | |
229 | ||
230 | TABLE.list TR:nth-child(odd) { | |
231 | background: #f4f4f4; | |
232 | } | |
233 | ||
5a738aea MS |
234 | DT { |
235 | margin-left: 36pt; | |
236 | margin-top: 12pt; | |
237 | } | |
238 | ||
239 | DD { | |
240 | margin-left: 54pt; | |
241 | } | |
242 | ||
243 | DL.category DT { | |
244 | font-weight: bold; | |
245 | } | |
246 | ||
247 | P.summary { | |
248 | margin-left: 36pt; | |
249 | font-family: monaco, courier, monospace; | |
250 | } | |
251 | ||
5a738aea MS |
252 | DIV.summary TABLE { |
253 | border: solid thin #999999; | |
254 | border-collapse: collapse; | |
255 | border-spacing: 0; | |
256 | margin: 10px; | |
257 | } | |
258 | ||
259 | DIV.summary TABLE TD, DIV.summary TABLE TH { | |
260 | border: solid thin #999999; | |
261 | padding: 5px; | |
262 | text-align: left; | |
263 | vertical-align: top; | |
264 | } | |
265 | ||
266 | DIV.summary TABLE THEAD TH { | |
267 | background: #eeeeee; | |
268 | } | |
269 | ||
270 | /* API documentation styles... */ | |
271 | div.body h1 { | |
272 | margin: 0; | |
273 | } | |
274 | div.body h2 { | |
275 | margin-top: 1.5em; | |
276 | } | |
277 | div.body h3, div.body h4, div.body h5 { | |
278 | margin-bottom: 0.5em; | |
279 | margin-top: 1.5em; | |
280 | } | |
281 | .class, .enumeration, .function, .struct, .typedef, .union { | |
282 | border-bottom: solid thin #999999; | |
283 | margin-bottom: 0; | |
284 | margin-top: 2em; | |
285 | } | |
286 | .description { | |
287 | margin-top: 0.5em; | |
288 | } | |
289 | code, p.code, pre, ul.code li { | |
290 | font-family: monaco, courier, monospace; | |
291 | font-size: 90%; | |
292 | } | |
293 | ul.code, ul.contents, ul.subcontents { | |
294 | list-style-type: none; | |
295 | margin: 0; | |
296 | padding-left: 0; | |
297 | } | |
298 | ul.code li { | |
299 | margin: 0; | |
300 | } | |
301 | ul.contents > li { | |
302 | margin-top: 1em; | |
303 | } | |
304 | ul.contents li ul.code, ul.contents li ul.subcontents { | |
305 | padding-left: 2em; | |
306 | } | |
307 | div.body dl { | |
308 | margin-left: 0; | |
309 | margin-top: 0; | |
310 | } | |
311 | div.body dt { | |
312 | font-style: italic; | |
313 | margin-left: 0; | |
314 | margin-top: 0; | |
315 | } | |
316 | div.body dd { | |
317 | margin-bottom: 0.5em; | |
318 | } | |
319 | ||
320 | /* This is just for the HTML files generated with the framedhelp target */ | |
321 | div.contents { | |
322 | background: #e8e8e8; | |
323 | border: solid thin black; | |
324 | padding: 10px; | |
325 | } | |
326 | div.contents h1 { | |
327 | font-size: 110%; | |
328 | } | |
329 | div.contents h2 { | |
330 | font-size: 100%; | |
331 | } | |
332 | div.contents ul.contents { | |
333 | font-size: 80%; | |
334 | } | |
ac884b6a MS |
335 | div.contents ul.subcontents li { |
336 | margin-left: 1em; | |
337 | text-indent: -1em; | |
338 | } | |
5a738aea | 339 | --></style> |
ef416fc2 | 340 | </head> |
341 | <body> | |
5a738aea | 342 | <div class='body'> |
ef416fc2 | 343 | <!-- |
9c0e8e5d | 344 | "$Id: api-httpipp.header 7258 2008-01-28 00:15:05Z mike $" |
5a738aea | 345 | |
321d8d57 | 346 | HTTP and IPP API header for CUPS. |
5a738aea | 347 | |
321d8d57 | 348 | Copyright 2007-2011 by Apple Inc. |
5a738aea MS |
349 | Copyright 1997-2006 by Easy Software Products, all rights reserved. |
350 | ||
351 | These coded instructions, statements, and computer programs are the | |
352 | property of Apple Inc. and are protected by Federal copyright | |
353 | law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
354 | which should have been included with this file. If this file is | |
355 | file is missing or damaged, see the license at "http://www.cups.org/". | |
356 | --> | |
357 | ||
178cb736 MS |
358 | <h1 class='title'>HTTP and IPP APIs</h1> |
359 | ||
5a738aea MS |
360 | <div class='summary'><table summary='General Information'> |
361 | <thead> | |
362 | <tr> | |
363 | <th>Header</th> | |
364 | <th>cups/cups.h</th> | |
365 | </tr> | |
366 | </thead> | |
367 | <tbody> | |
368 | <tr> | |
369 | <th>Library</th> | |
370 | <td>-lcups</td> | |
371 | </tr> | |
372 | <tr> | |
373 | <th>See Also</th> | |
374 | <td>Programming: <a href='api-overview.html'>Introduction to CUPS Programming</a><br> | |
375 | Programming: <a href='api-cups.html'>CUPS API</a><br> | |
376 | References: <a href='spec-ipp.html'>CUPS Implementation of IPP</a></td> | |
377 | </tr> | |
378 | </tbody> | |
379 | </table></div> | |
380 | <h2 class="title">Contents</h2> | |
381 | <ul class="contents"> | |
5a738aea | 382 | <li><a href="#OVERVIEW">Overview</a><ul class="subcontents"> |
0268488e MS |
383 | <li><a href="#CREATING_URI_STRINGS">Creating URI Strings</a></li> |
384 | <li><a href="#SENDING_REQUESTS_WITH_FILES">Sending Requests with Files</a></li> | |
385 | <li><a href="#ASYNCHRONOUS_REQUEST_PROCESSING">Asynchronous Request Processing</a></li> | |
5a738aea MS |
386 | </ul></li> |
387 | <li><a href="#FUNCTIONS">Functions</a><ul class="code"> | |
0268488e MS |
388 | <li><a href="#cupsDoAuthentication" title="Authenticate a request.">cupsDoAuthentication</a></li> |
389 | <li><a href="#cupsDoFileRequest" title="Do an IPP request with a file.">cupsDoFileRequest</a></li> | |
390 | <li><a href="#cupsDoIORequest" title="Do an IPP request with file descriptors.">cupsDoIORequest</a></li> | |
391 | <li><a href="#cupsDoRequest" title="Do an IPP request.">cupsDoRequest</a></li> | |
392 | <li><a href="#cupsEncodeOptions" title="Encode printer options into IPP attributes.">cupsEncodeOptions</a></li> | |
393 | <li><a href="#cupsEncodeOptions2" title="Encode printer options into IPP attributes for a group.">cupsEncodeOptions2</a></li> | |
394 | <li><a href="#cupsGetDevices" title="Get available printer devices.">cupsGetDevices</a></li> | |
395 | <li><a href="#cupsGetFd" title="Get a file from the server.">cupsGetFd</a></li> | |
396 | <li><a href="#cupsGetFile" title="Get a file from the server.">cupsGetFile</a></li> | |
397 | <li><a href="#cupsGetResponse" title="Get a response to an IPP request.">cupsGetResponse</a></li> | |
5a9febac MS |
398 | <li><a href="#cupsLastError" title="Return the last IPP status code received on the current |
399 | thread.">cupsLastError</a></li> | |
400 | <li><a href="#cupsLastErrorString" title="Return the last IPP status-message received on the | |
401 | current thread.">cupsLastErrorString</a></li> | |
0268488e MS |
402 | <li><a href="#cupsPutFd" title="Put a file on the server.">cupsPutFd</a></li> |
403 | <li><a href="#cupsPutFile" title="Put a file on the server.">cupsPutFile</a></li> | |
404 | <li><a href="#cupsReadResponseData" title="Read additional data after the IPP response.">cupsReadResponseData</a></li> | |
405 | <li><a href="#cupsSendRequest" title="Send an IPP request.">cupsSendRequest</a></li> | |
406 | <li><a href="#cupsWriteRequestData" title="Write additional data after an IPP request.">cupsWriteRequestData</a></li> | |
a469f8a5 MS |
407 | <li><a href="#httpAcceptConnection" title="Accept a new HTTP client connection from the |
408 | specified listening socket.">httpAcceptConnection</a></li> | |
0268488e MS |
409 | <li><a href="#httpAddCredential" title="Allocates and adds a single credential to an array.">httpAddCredential</a></li> |
410 | <li><a href="#httpAddrAny" title="Check for the "any" address.">httpAddrAny</a></li> | |
ca6b43fc MS |
411 | <li><a href="#httpAddrClose" title="Close a socket created by httpAddrConnect or |
412 | httpAddrListen.">httpAddrClose</a></li> | |
0268488e | 413 | <li><a href="#httpAddrEqual" title="Compare two addresses.">httpAddrEqual</a></li> |
ca6b43fc | 414 | <li><a href="#httpAddrFamily" title="Get the address family of an address.">httpAddrFamily</a></li> |
0268488e | 415 | <li><a href="#httpAddrLength" title="Return the length of the address in bytes.">httpAddrLength</a></li> |
a469f8a5 MS |
416 | <li><a href="#httpAddrListen" title="Create a listening socket bound to the specified |
417 | address and port.">httpAddrListen</a></li> | |
0268488e MS |
418 | <li><a href="#httpAddrLocalhost" title="Check for the local loopback address.">httpAddrLocalhost</a></li> |
419 | <li><a href="#httpAddrLookup" title="Lookup the hostname associated with the address.">httpAddrLookup</a></li> | |
a469f8a5 | 420 | <li><a href="#httpAddrPort" title="Get the port number associated with an address.">httpAddrPort</a></li> |
0268488e MS |
421 | <li><a href="#httpAddrString" title="Convert an address to a numeric string.">httpAddrString</a></li> |
422 | <li><a href="#httpAssembleURI" title="Assemble a uniform resource identifier from its | |
5a738aea | 423 | components.">httpAssembleURI</a></li> |
0268488e | 424 | <li><a href="#httpAssembleURIf" title="Assemble a uniform resource identifier from its |
5a738aea | 425 | components with a formatted resource.">httpAssembleURIf</a></li> |
db8b865d | 426 | <li><a href="#httpAssembleUUID" title="Assemble a name-based UUID URN conforming to RFC 4122.">httpAssembleUUID</a></li> |
0268488e MS |
427 | <li><a href="#httpBlocking" title="Set blocking/non-blocking behavior on a connection.">httpBlocking</a></li> |
428 | <li><a href="#httpCheck" title="Check to see if there is a pending response from the server.">httpCheck</a></li> | |
429 | <li><a href="#httpClearCookie" title="Clear the cookie value(s).">httpClearCookie</a></li> | |
430 | <li><a href="#httpClearFields" title="Clear HTTP request fields.">httpClearFields</a></li> | |
431 | <li><a href="#httpClose" title="Close an HTTP connection.">httpClose</a></li> | |
ca6b43fc | 432 | <li><a href="#httpCompareCredentials" title="Compare two sets of X.509 credentials.">httpCompareCredentials</a></li> |
0268488e | 433 | <li><a href="#httpConnect" title="Connect to a HTTP server.">httpConnect</a></li> |
a469f8a5 | 434 | <li><a href="#httpConnect2" title="Connect to a HTTP server.">httpConnect2</a></li> |
0268488e | 435 | <li><a href="#httpConnectEncrypt" title="Connect to a HTTP server using encryption.">httpConnectEncrypt</a></li> |
0268488e MS |
436 | <li><a href="#httpDecode64" title="Base64-decode a string.">httpDecode64</a></li> |
437 | <li><a href="#httpDecode64_2" title="Base64-decode a string.">httpDecode64_2</a></li> | |
438 | <li><a href="#httpDelete" title="Send a DELETE request to the server.">httpDelete</a></li> | |
439 | <li><a href="#httpEncode64" title="Base64-encode a string.">httpEncode64</a></li> | |
440 | <li><a href="#httpEncode64_2" title="Base64-encode a string.">httpEncode64_2</a></li> | |
441 | <li><a href="#httpEncryption" title="Set the required encryption on the link.">httpEncryption</a></li> | |
442 | <li><a href="#httpError" title="Get the last error on a connection.">httpError</a></li> | |
ca6b43fc MS |
443 | <li><a href="#httpFieldValue" title="Return the HTTP field enumeration value for a field |
444 | name.">httpFieldValue</a></li> | |
0268488e MS |
445 | <li><a href="#httpFlush" title="Flush data from a HTTP connection.">httpFlush</a></li> |
446 | <li><a href="#httpFlushWrite" title="Flush data in write buffer.">httpFlushWrite</a></li> | |
447 | <li><a href="#httpFreeCredentials" title="Free an array of credentials.">httpFreeCredentials</a></li> | |
448 | <li><a href="#httpGet" title="Send a GET request to the server.">httpGet</a></li> | |
ca6b43fc MS |
449 | <li><a href="#httpGetActivity" title="Get the most recent activity for a connection.">httpGetActivity</a></li> |
450 | <li><a href="#httpGetAddress" title="Get the address of the connected peer of a connection.">httpGetAddress</a></li> | |
0268488e MS |
451 | <li><a href="#httpGetAuthString" title="Get the current authorization string.">httpGetAuthString</a></li> |
452 | <li><a href="#httpGetBlocking" title="Get the blocking/non-block state of a connection.">httpGetBlocking</a></li> | |
a469f8a5 MS |
453 | <li><a href="#httpGetContentEncoding" title="Get a common content encoding, if any, between |
454 | the client and server.">httpGetContentEncoding</a></li> | |
0268488e MS |
455 | <li><a href="#httpGetCookie" title="Get any cookie data from the response.">httpGetCookie</a></li> |
456 | <li><a href="#httpGetDateString" title="Get a formatted date/time string from a time value.">httpGetDateString</a></li> | |
457 | <li><a href="#httpGetDateString2" title="Get a formatted date/time string from a time value.">httpGetDateString2</a></li> | |
458 | <li><a href="#httpGetDateTime" title="Get a time value from a formatted date/time string.">httpGetDateTime</a></li> | |
ca6b43fc | 459 | <li><a href="#httpGetEncryption" title="Get the current encryption mode of a connection.">httpGetEncryption</a></li> |
a469f8a5 | 460 | <li><a href="#httpGetExpect" title="Get the value of the Expect header, if any.">httpGetExpect</a></li> |
0268488e MS |
461 | <li><a href="#httpGetFd" title="Get the file descriptor associated with a connection.">httpGetFd</a></li> |
462 | <li><a href="#httpGetField" title="Get a field value from a request/response.">httpGetField</a></li> | |
463 | <li><a href="#httpGetHostByName" title="Lookup a hostname or IPv4 address, and return | |
5a738aea | 464 | address records for the specified name.">httpGetHostByName</a></li> |
0268488e | 465 | <li><a href="#httpGetHostname" title="Get the FQDN for the connection or local system.">httpGetHostname</a></li> |
ca6b43fc | 466 | <li><a href="#httpGetKeepAlive" title="Get the current Keep-Alive state of the connection.">httpGetKeepAlive</a></li> |
0268488e | 467 | <li><a href="#httpGetLength" title="Get the amount of data remaining from the |
5a738aea | 468 | content-length or transfer-encoding fields.">httpGetLength</a></li> |
0268488e | 469 | <li><a href="#httpGetLength2" title="Get the amount of data remaining from the |
5a738aea | 470 | content-length or transfer-encoding fields.">httpGetLength2</a></li> |
ca6b43fc MS |
471 | <li><a href="#httpGetPending" title="Get the number of bytes that are buffered for writing.">httpGetPending</a></li> |
472 | <li><a href="#httpGetReady" title="Get the number of bytes that can be read without blocking.">httpGetReady</a></li> | |
473 | <li><a href="#httpGetRemaining" title="Get the number of remaining bytes in the message | |
474 | body or current chunk.">httpGetRemaining</a></li> | |
a2326b5b | 475 | <li><a href="#httpGetState" title="Get the current state of the HTTP request.">httpGetState</a></li> |
0268488e MS |
476 | <li><a href="#httpGetStatus" title="Get the status of the last HTTP request.">httpGetStatus</a></li> |
477 | <li><a href="#httpGetSubField" title="Get a sub-field value.">httpGetSubField</a></li> | |
478 | <li><a href="#httpGetSubField2" title="Get a sub-field value.">httpGetSubField2</a></li> | |
a2326b5b | 479 | <li><a href="#httpGetVersion" title="Get the HTTP version at the other end.">httpGetVersion</a></li> |
0268488e MS |
480 | <li><a href="#httpGets" title="Get a line of text from a HTTP connection.">httpGets</a></li> |
481 | <li><a href="#httpHead" title="Send a HEAD request to the server.">httpHead</a></li> | |
482 | <li><a href="#httpInitialize" title="Initialize the HTTP interface library and set the | |
5a738aea | 483 | default HTTP proxy (if any).">httpInitialize</a></li> |
ca6b43fc MS |
484 | <li><a href="#httpIsChunked" title="Report whether a message body is chunked.">httpIsChunked</a></li> |
485 | <li><a href="#httpIsEncrypted" title="Report whether a connection is encrypted.">httpIsEncrypted</a></li> | |
0268488e MS |
486 | <li><a href="#httpMD5" title="Compute the MD5 sum of the username:group:password.">httpMD5</a></li> |
487 | <li><a href="#httpMD5Final" title="Combine the MD5 sum of the username, group, and password | |
5a738aea MS |
488 | with the server-supplied nonce value, method, and |
489 | request-uri.">httpMD5Final</a></li> | |
0268488e MS |
490 | <li><a href="#httpMD5String" title="Convert an MD5 sum to a character string.">httpMD5String</a></li> |
491 | <li><a href="#httpOptions" title="Send an OPTIONS request to the server.">httpOptions</a></li> | |
a469f8a5 | 492 | <li><a href="#httpPeek" title="Peek at data from a HTTP connection.">httpPeek</a></li> |
0268488e MS |
493 | <li><a href="#httpPost" title="Send a POST request to the server.">httpPost</a></li> |
494 | <li><a href="#httpPut" title="Send a PUT request to the server.">httpPut</a></li> | |
495 | <li><a href="#httpRead" title="Read data from a HTTP connection.">httpRead</a></li> | |
496 | <li><a href="#httpRead2" title="Read data from a HTTP connection.">httpRead2</a></li> | |
a469f8a5 | 497 | <li><a href="#httpReadRequest" title="Read a HTTP request from a connection.">httpReadRequest</a></li> |
0268488e | 498 | <li><a href="#httpReconnect" title="Reconnect to a HTTP server.">httpReconnect</a></li> |
3e7fe0ca MS |
499 | <li><a href="#httpReconnect2" title="Reconnect to a HTTP server with timeout and optional |
500 | cancel.">httpReconnect2</a></li> | |
ca6b43fc MS |
501 | <li><a href="#httpResolveHostname" title="Resolve the hostname of the HTTP connection |
502 | address.">httpResolveHostname</a></li> | |
0268488e | 503 | <li><a href="#httpSeparate" title="Separate a Universal Resource Identifier into its |
5a738aea | 504 | components.">httpSeparate</a></li> |
0268488e | 505 | <li><a href="#httpSeparate2" title="Separate a Universal Resource Identifier into its |
5a738aea | 506 | components.">httpSeparate2</a></li> |
0268488e | 507 | <li><a href="#httpSeparateURI" title="Separate a Universal Resource Identifier into its |
5a738aea | 508 | components.">httpSeparateURI</a></li> |
0268488e MS |
509 | <li><a href="#httpSetAuthString" title="Set the current authorization string.">httpSetAuthString</a></li> |
510 | <li><a href="#httpSetCookie" title="Set the cookie value(s).">httpSetCookie</a></li> | |
511 | <li><a href="#httpSetCredentials" title="Set the credentials associated with an encrypted | |
10d09e33 | 512 | connection.">httpSetCredentials</a></li> |
db8b865d | 513 | <li><a href="#httpSetDefaultField" title="Set the default value of an HTTP header.">httpSetDefaultField</a></li> |
0268488e MS |
514 | <li><a href="#httpSetExpect" title="Set the Expect: header in a request.">httpSetExpect</a></li> |
515 | <li><a href="#httpSetField" title="Set the value of an HTTP header.">httpSetField</a></li> | |
ca6b43fc | 516 | <li><a href="#httpSetKeepAlive" title="Set the current Keep-Alive state of a connection.">httpSetKeepAlive</a></li> |
0268488e | 517 | <li><a href="#httpSetLength" title="Set the content-length and content-encoding.">httpSetLength</a></li> |
f228370c | 518 | <li><a href="#httpSetTimeout" title="Set read/write timeouts and an optional callback.">httpSetTimeout</a></li> |
ca6b43fc MS |
519 | <li><a href="#httpShutdown" title="Shutdown one side of an HTTP connection.">httpShutdown</a></li> |
520 | <li><a href="#httpStateString" title="Return the string describing a HTTP state value.">httpStateString</a></li> | |
0268488e MS |
521 | <li><a href="#httpStatus" title="Return a short string describing a HTTP status code.">httpStatus</a></li> |
522 | <li><a href="#httpTrace" title="Send an TRACE request to the server.">httpTrace</a></li> | |
ca6b43fc | 523 | <li><a href="#httpURIStatusString" title="Return a string describing a URI status code.">httpURIStatusString</a></li> |
0268488e MS |
524 | <li><a href="#httpUpdate" title="Update the current HTTP state for incoming data.">httpUpdate</a></li> |
525 | <li><a href="#httpWait" title="Wait for data available on a connection.">httpWait</a></li> | |
526 | <li><a href="#httpWrite" title="Write data to a HTTP connection.">httpWrite</a></li> | |
527 | <li><a href="#httpWrite2" title="Write data to a HTTP connection.">httpWrite2</a></li> | |
a469f8a5 | 528 | <li><a href="#httpWriteResponse" title="Write a HTTP response to a client connection.">httpWriteResponse</a></li> |
0268488e MS |
529 | <li><a href="#ippAddBoolean" title="Add a boolean attribute to an IPP message.">ippAddBoolean</a></li> |
530 | <li><a href="#ippAddBooleans" title="Add an array of boolean values.">ippAddBooleans</a></li> | |
531 | <li><a href="#ippAddCollection" title="Add a collection value.">ippAddCollection</a></li> | |
532 | <li><a href="#ippAddCollections" title="Add an array of collection values.">ippAddCollections</a></li> | |
533 | <li><a href="#ippAddDate" title="Add a date attribute to an IPP message.">ippAddDate</a></li> | |
534 | <li><a href="#ippAddInteger" title="Add a integer attribute to an IPP message.">ippAddInteger</a></li> | |
535 | <li><a href="#ippAddIntegers" title="Add an array of integer values.">ippAddIntegers</a></li> | |
536 | <li><a href="#ippAddOctetString" title="Add an octetString value to an IPP message.">ippAddOctetString</a></li> | |
a2326b5b | 537 | <li><a href="#ippAddOutOfBand" title="Add an out-of-band value to an IPP message.">ippAddOutOfBand</a></li> |
0268488e MS |
538 | <li><a href="#ippAddRange" title="Add a range of values to an IPP message.">ippAddRange</a></li> |
539 | <li><a href="#ippAddRanges" title="Add ranges of values to an IPP message.">ippAddRanges</a></li> | |
540 | <li><a href="#ippAddResolution" title="Add a resolution value to an IPP message.">ippAddResolution</a></li> | |
541 | <li><a href="#ippAddResolutions" title="Add resolution values to an IPP message.">ippAddResolutions</a></li> | |
542 | <li><a href="#ippAddSeparator" title="Add a group separator to an IPP message.">ippAddSeparator</a></li> | |
543 | <li><a href="#ippAddString" title="Add a language-encoded string to an IPP message.">ippAddString</a></li> | |
a469f8a5 MS |
544 | <li><a href="#ippAddStringf" title="Add a formatted string to an IPP message.">ippAddStringf</a></li> |
545 | <li><a href="#ippAddStringfv" title="Add a formatted string to an IPP message.">ippAddStringfv</a></li> | |
0268488e | 546 | <li><a href="#ippAddStrings" title="Add language-encoded strings to an IPP message.">ippAddStrings</a></li> |
a2326b5b | 547 | <li><a href="#ippAttributeString" title="Convert the attribute's value to a string.">ippAttributeString</a></li> |
a469f8a5 MS |
548 | <li><a href="#ippContainsInteger" title="Determine whether an attribute contains the |
549 | specified value or is within the list of ranges.">ippContainsInteger</a></li> | |
550 | <li><a href="#ippContainsString" title="Determine whether an attribute contains the | |
551 | specified string value.">ippContainsString</a></li> | |
a2326b5b MS |
552 | <li><a href="#ippCopyAttribute" title="Copy an attribute.">ippCopyAttribute</a></li> |
553 | <li><a href="#ippCopyAttributes" title="Copy attributes from one IPP message to another.">ippCopyAttributes</a></li> | |
db8b865d MS |
554 | <li><a href="#ippCreateRequestedArray" title="Create a CUPS array of attribute names from the |
555 | given requested-attributes attribute.">ippCreateRequestedArray</a></li> | |
0268488e | 556 | <li><a href="#ippDateToTime" title="Convert from RFC 1903 Date/Time format to UNIX time |
5a738aea | 557 | in seconds.">ippDateToTime</a></li> |
0268488e MS |
558 | <li><a href="#ippDelete" title="Delete an IPP message.">ippDelete</a></li> |
559 | <li><a href="#ippDeleteAttribute" title="Delete a single attribute in an IPP message.">ippDeleteAttribute</a></li> | |
a2326b5b MS |
560 | <li><a href="#ippDeleteValues" title="Delete values in an attribute.">ippDeleteValues</a></li> |
561 | <li><a href="#ippEnumString" title="Return a string corresponding to the enum value.">ippEnumString</a></li> | |
562 | <li><a href="#ippEnumValue" title="Return the value associated with a given enum string.">ippEnumValue</a></li> | |
0268488e MS |
563 | <li><a href="#ippErrorString" title="Return a name for the given status code.">ippErrorString</a></li> |
564 | <li><a href="#ippErrorValue" title="Return a status code for the given name.">ippErrorValue</a></li> | |
3e7fe0ca MS |
565 | <li><a href="#ippFindAttribute" title="Find a named attribute in a request.">ippFindAttribute</a></li> |
566 | <li><a href="#ippFindNextAttribute" title="Find the next named attribute in a request.">ippFindNextAttribute</a></li> | |
a2326b5b MS |
567 | <li><a href="#ippFirstAttribute" title="Return the first attribute in the message.">ippFirstAttribute</a></li> |
568 | <li><a href="#ippGetBoolean" title="Get a boolean value for an attribute.">ippGetBoolean</a></li> | |
569 | <li><a href="#ippGetCollection" title="Get a collection value for an attribute.">ippGetCollection</a></li> | |
570 | <li><a href="#ippGetCount" title="Get the number of values in an attribute.">ippGetCount</a></li> | |
3e7fe0ca | 571 | <li><a href="#ippGetDate" title="Get a date value for an attribute.">ippGetDate</a></li> |
a2326b5b MS |
572 | <li><a href="#ippGetGroupTag" title="Get the group associated with an attribute.">ippGetGroupTag</a></li> |
573 | <li><a href="#ippGetInteger" title="Get the integer/enum value for an attribute.">ippGetInteger</a></li> | |
574 | <li><a href="#ippGetName" title="Get the attribute name.">ippGetName</a></li> | |
6961465f | 575 | <li><a href="#ippGetOctetString" title="Get an octetString value from an IPP attribute.">ippGetOctetString</a></li> |
a2326b5b | 576 | <li><a href="#ippGetOperation" title="Get the operation ID in an IPP message.">ippGetOperation</a></li> |
3e7fe0ca | 577 | <li><a href="#ippGetRange" title="Get a rangeOfInteger value from an attribute.">ippGetRange</a></li> |
a2326b5b MS |
578 | <li><a href="#ippGetRequestId" title="Get the request ID from an IPP message.">ippGetRequestId</a></li> |
579 | <li><a href="#ippGetResolution" title="Get a resolution value for an attribute.">ippGetResolution</a></li> | |
3e7fe0ca | 580 | <li><a href="#ippGetState" title="Get the IPP message state.">ippGetState</a></li> |
a2326b5b MS |
581 | <li><a href="#ippGetStatusCode" title="Get the status code from an IPP response or event message.">ippGetStatusCode</a></li> |
582 | <li><a href="#ippGetString" title="Return the value...">ippGetString</a></li> | |
583 | <li><a href="#ippGetValueTag" title="Get the value tag for an attribute.">ippGetValueTag</a></li> | |
584 | <li><a href="#ippGetVersion" title="Get the major and minor version number from an IPP message.">ippGetVersion</a></li> | |
0268488e MS |
585 | <li><a href="#ippLength" title="Compute the length of an IPP message.">ippLength</a></li> |
586 | <li><a href="#ippNew" title="Allocate a new IPP message.">ippNew</a></li> | |
587 | <li><a href="#ippNewRequest" title="Allocate a new IPP request message.">ippNewRequest</a></li> | |
a469f8a5 | 588 | <li><a href="#ippNewResponse" title="Allocate a new IPP response message.">ippNewResponse</a></li> |
a2326b5b | 589 | <li><a href="#ippNextAttribute" title="Return the next attribute in the message.">ippNextAttribute</a></li> |
0268488e MS |
590 | <li><a href="#ippOpString" title="Return a name for the given operation id.">ippOpString</a></li> |
591 | <li><a href="#ippOpValue" title="Return an operation id for the given name.">ippOpValue</a></li> | |
592 | <li><a href="#ippPort" title="Return the default IPP port number.">ippPort</a></li> | |
593 | <li><a href="#ippRead" title="Read data for an IPP message from a HTTP connection.">ippRead</a></li> | |
594 | <li><a href="#ippReadFile" title="Read data for an IPP message from a file.">ippReadFile</a></li> | |
595 | <li><a href="#ippReadIO" title="Read data for an IPP message.">ippReadIO</a></li> | |
a2326b5b MS |
596 | <li><a href="#ippSetBoolean" title="Set a boolean value in an attribute.">ippSetBoolean</a></li> |
597 | <li><a href="#ippSetCollection" title="Set a collection value in an attribute.">ippSetCollection</a></li> | |
3e7fe0ca | 598 | <li><a href="#ippSetDate" title="Set a date value in an attribute.">ippSetDate</a></li> |
a2326b5b MS |
599 | <li><a href="#ippSetGroupTag" title="Set the group tag of an attribute.">ippSetGroupTag</a></li> |
600 | <li><a href="#ippSetInteger" title="Set an integer or enum value in an attribute.">ippSetInteger</a></li> | |
601 | <li><a href="#ippSetName" title="Set the name of an attribute.">ippSetName</a></li> | |
6961465f | 602 | <li><a href="#ippSetOctetString" title="Set an octetString value in an IPP attribute.">ippSetOctetString</a></li> |
a2326b5b | 603 | <li><a href="#ippSetOperation" title="Set the operation ID in an IPP request message.">ippSetOperation</a></li> |
0268488e | 604 | <li><a href="#ippSetPort" title="Set the default port number.">ippSetPort</a></li> |
a2326b5b MS |
605 | <li><a href="#ippSetRange" title="Set a rangeOfInteger value in an attribute.">ippSetRange</a></li> |
606 | <li><a href="#ippSetRequestId" title="Set the request ID in an IPP message.">ippSetRequestId</a></li> | |
607 | <li><a href="#ippSetResolution" title="Set a resolution value in an attribute.">ippSetResolution</a></li> | |
3e7fe0ca | 608 | <li><a href="#ippSetState" title="Set the current state of the IPP message.">ippSetState</a></li> |
a2326b5b MS |
609 | <li><a href="#ippSetStatusCode" title="Set the status code in an IPP response or event message.">ippSetStatusCode</a></li> |
610 | <li><a href="#ippSetString" title="Set a string value in an attribute.">ippSetString</a></li> | |
a469f8a5 MS |
611 | <li><a href="#ippSetStringf" title="Set a formatted string value of an attribute.">ippSetStringf</a></li> |
612 | <li><a href="#ippSetStringfv" title="Set a formatted string value of an attribute.">ippSetStringfv</a></li> | |
a2326b5b MS |
613 | <li><a href="#ippSetValueTag" title="Set the value tag of an attribute.">ippSetValueTag</a></li> |
614 | <li><a href="#ippSetVersion" title="Set the version number in an IPP message.">ippSetVersion</a></li> | |
ca6b43fc | 615 | <li><a href="#ippStateString" title="Return the name corresponding to a state value.">ippStateString</a></li> |
0268488e MS |
616 | <li><a href="#ippTagString" title="Return the tag name corresponding to a tag value.">ippTagString</a></li> |
617 | <li><a href="#ippTagValue" title="Return the tag value corresponding to a tag name.">ippTagValue</a></li> | |
618 | <li><a href="#ippTimeToDate" title="Convert from UNIX time to RFC 1903 format.">ippTimeToDate</a></li> | |
db8b865d MS |
619 | <li><a href="#ippValidateAttribute" title="Validate the contents of an attribute.">ippValidateAttribute</a></li> |
620 | <li><a href="#ippValidateAttributes" title="Validate all attributes in an IPP message.">ippValidateAttributes</a></li> | |
0268488e MS |
621 | <li><a href="#ippWrite" title="Write data for an IPP message to a HTTP connection.">ippWrite</a></li> |
622 | <li><a href="#ippWriteFile" title="Write data for an IPP message to a file.">ippWriteFile</a></li> | |
623 | <li><a href="#ippWriteIO" title="Write data for an IPP message.">ippWriteIO</a></li> | |
8b450588 | 624 | </ul></li> |
5a738aea | 625 | <li><a href="#TYPES">Data Types</a><ul class="code"> |
eac3a0a0 | 626 | <li><a href="#gss_auth_identity_desc" title="Local functions...">gss_auth_identity_desc</a></li> |
f11a948a MS |
627 | <li><a href="#http_addr_t" title="Socket address union, which |
628 | makes using IPv6 and other | |
629 | address types easier and | |
630 | more portable. ">http_addr_t</a></li> | |
5a738aea MS |
631 | <li><a href="#http_addrlist_t" title="Socket address list, which is |
632 | used to enumerate all of the | |
633 | addresses that are associated | |
634 | with a hostname. ">http_addrlist_t</a></li> | |
635 | <li><a href="#http_auth_t" title="HTTP authentication types">http_auth_t</a></li> | |
f228370c | 636 | <li><a href="#http_credential_t" title="HTTP credential data ">http_credential_t</a></li> |
5a738aea MS |
637 | <li><a href="#http_encoding_t" title="HTTP transfer encoding values">http_encoding_t</a></li> |
638 | <li><a href="#http_encryption_t" title="HTTP encryption values">http_encryption_t</a></li> | |
79e1d494 | 639 | <li><a href="#http_field_t" title="HTTP field names">http_field_t</a></li> |
f11a948a MS |
640 | <li><a href="#http_keepalive_t" title="HTTP keep-alive values">http_keepalive_t</a></li> |
641 | <li><a href="#http_state_t" title="HTTP state values; states | |
642 | are server-oriented...">http_state_t</a></li> | |
5a738aea | 643 | <li><a href="#http_t" title="HTTP connection type">http_t</a></li> |
f228370c | 644 | <li><a href="#http_timeout_cb_t" title="HTTP timeout callback ">http_timeout_cb_t</a></li> |
f11a948a MS |
645 | <li><a href="#http_uri_coding_t" title="URI en/decode flags">http_uri_coding_t</a></li> |
646 | <li><a href="#http_uri_status_t" title="URI separation status ">http_uri_status_t</a></li> | |
647 | <li><a href="#http_version_t" title="HTTP version numbers">http_version_t</a></li> | |
a2326b5b | 648 | <li><a href="#ipp_attribute_t" title="IPP attribute">ipp_attribute_t</a></li> |
f3c17241 MS |
649 | <li><a href="#ipp_copycb_t" title="The following structures are PRIVATE starting with CUPS 1.6/OS X 10.8. |
650 | Please use the new accessor functions available in CUPS 1.6 and later, as | |
651 | these definitions will be moved to a private header file in a future release.">ipp_copycb_t</a></li> | |
a2326b5b | 652 | <li><a href="#ipp_dstate_t" title="Document states">ipp_dstate_t</a></li> |
a469f8a5 | 653 | <li><a href="#ipp_finish_t" title="Job collation types">ipp_finish_t</a></li> |
5a738aea | 654 | <li><a href="#ipp_iocb_t" title="IPP IO Callback Function ">ipp_iocb_t</a></li> |
a2326b5b | 655 | <li><a href="#ipp_jcollate_t" title="Job collation types">ipp_jcollate_t</a></li> |
aaf19ab0 MS |
656 | <li><a href="#ipp_orient_t" title="Orientation values">ipp_orient_t</a></li> |
657 | <li><a href="#ipp_pstate_t" title="Printer states">ipp_pstate_t</a></li> | |
658 | <li><a href="#ipp_quality_t" title="Qualities">ipp_quality_t</a></li> | |
aaf19ab0 MS |
659 | <li><a href="#ipp_res_t" title="Resolution units">ipp_res_t</a></li> |
660 | <li><a href="#ipp_state_t" title="IPP states">ipp_state_t</a></li> | |
a2326b5b MS |
661 | <li><a href="#ipp_t" title="IPP request/response data">ipp_t</a></li> |
662 | <li><a href="#ipp_uchar_t" title="Unsigned 8-bit integer/character">ipp_uchar_t</a></li> | |
5a738aea MS |
663 | </ul></li> |
664 | <li><a href="#STRUCTURES">Structures</a><ul class="code"> | |
eac3a0a0 | 665 | <li><a href="#gss_auth_identity" title="Local functions...">gss_auth_identity</a></li> |
5a738aea MS |
666 | <li><a href="#http_addrlist_s" title="Socket address list, which is |
667 | used to enumerate all of the | |
668 | addresses that are associated | |
669 | with a hostname. ">http_addrlist_s</a></li> | |
f228370c | 670 | <li><a href="#http_credential_s" title="HTTP credential data ">http_credential_s</a></li> |
f3c17241 | 671 | <li><a href="#pollfd" title="User data (unused)">pollfd</a></li> |
5a738aea MS |
672 | </ul></li> |
673 | <li><a href="#ENUMERATIONS">Constants</a><ul class="code"> | |
674 | <li><a href="#http_auth_e" title="HTTP authentication types">http_auth_e</a></li> | |
675 | <li><a href="#http_encoding_e" title="HTTP transfer encoding values">http_encoding_e</a></li> | |
676 | <li><a href="#http_encryption_e" title="HTTP encryption values">http_encryption_e</a></li> | |
677 | <li><a href="#http_field_e" title="HTTP field names">http_field_e</a></li> | |
f11a948a MS |
678 | <li><a href="#http_keepalive_e" title="HTTP keep-alive values">http_keepalive_e</a></li> |
679 | <li><a href="#http_state_e" title="HTTP state values; states | |
680 | are server-oriented...">http_state_e</a></li> | |
5a738aea | 681 | <li><a href="#http_status_e" title="HTTP status codes">http_status_e</a></li> |
f11a948a MS |
682 | <li><a href="#http_uri_coding_e" title="URI en/decode flags">http_uri_coding_e</a></li> |
683 | <li><a href="#http_uri_status_e" title="URI separation status ">http_uri_status_e</a></li> | |
684 | <li><a href="#http_version_e" title="HTTP version numbers">http_version_e</a></li> | |
a2326b5b | 685 | <li><a href="#ipp_dstate_e" title="Document states">ipp_dstate_e</a></li> |
a469f8a5 | 686 | <li><a href="#ipp_finishings_e" title="Finishings">ipp_finishings_e</a></li> |
a2326b5b | 687 | <li><a href="#ipp_jcollate_e" title="Job collation types">ipp_jcollate_e</a></li> |
aaf19ab0 MS |
688 | <li><a href="#ipp_jstate_e" title="Job states">ipp_jstate_e</a></li> |
689 | <li><a href="#ipp_op_e" title="IPP operations">ipp_op_e</a></li> | |
690 | <li><a href="#ipp_orient_e" title="Orientation values">ipp_orient_e</a></li> | |
691 | <li><a href="#ipp_pstate_e" title="Printer states">ipp_pstate_e</a></li> | |
692 | <li><a href="#ipp_quality_e" title="Qualities">ipp_quality_e</a></li> | |
693 | <li><a href="#ipp_res_e" title="Resolution units">ipp_res_e</a></li> | |
694 | <li><a href="#ipp_state_e" title="IPP states">ipp_state_e</a></li> | |
695 | <li><a href="#ipp_status_e" title="IPP status codes">ipp_status_e</a></li> | |
696 | <li><a href="#ipp_tag_e" title="Format tags for attributes">ipp_tag_e</a></li> | |
5a738aea | 697 | </ul></li> |
0268488e | 698 | </ul> |
5a738aea | 699 | <!-- |
9c0e8e5d | 700 | "$Id: api-httpipp.shtml 7684 2008-06-23 16:47:38Z mike $" |
ef416fc2 | 701 | |
eac3a0a0 | 702 | HTTP and IPP API introduction for CUPS. |
ef416fc2 | 703 | |
82cc1f9a | 704 | Copyright 2007-2012 by Apple Inc. |
bc44d920 | 705 | Copyright 1997-2006 by Easy Software Products, all rights reserved. |
ef416fc2 | 706 | |
707 | These coded instructions, statements, and computer programs are the | |
bc44d920 | 708 | property of Apple Inc. and are protected by Federal copyright |
709 | law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
710 | which should have been included with this file. If this file is | |
711 | file is missing or damaged, see the license at "http://www.cups.org/". | |
ef416fc2 | 712 | --> |
713 | ||
5a738aea MS |
714 | <h2 class='title'><a name='OVERVIEW'>Overview</a></h2> |
715 | ||
716 | <p>The CUPS HTTP and IPP APIs provide low-level access to the HTTP and IPP | |
717 | protocols and CUPS scheduler. They are typically used by monitoring and | |
718 | administration programs to perform specific functions not supported by the | |
719 | high-level CUPS API functions.</p> | |
720 | ||
721 | <p>The HTTP APIs use an opaque structure called | |
722 | <a href='#http_t'><code>http_t</code></a> to manage connections to | |
723 | a particular HTTP or IPP server. The | |
724 | <a href='#httpConnectEncrypt'><code>httpConnectEncrypt</code></a> function is | |
725 | used to create an instance of this structure for a particular server. | |
726 | The constant <code>CUPS_HTTP_DEFAULT</code> can be used with all of the | |
727 | <code>cups</code> functions to refer to the default CUPS server - the functions | |
728 | create a per-thread <a href='#http_t'><code>http_t</code></a> as needed.</p> | |
729 | ||
82cc1f9a MS |
730 | <p>The IPP APIs use two opaque structures for requests (messages sent to the CUPS scheduler) and responses (messages sent back to your application from the scheduler). The <a href='#ipp_t'><code>ipp_t</code></a> type holds a complete request or response and is allocated using the <a href='#ippNew'><code>ippNew</code></a> or <a href='#ippNewRequest'><code>ippNewRequest</code></a> functions and freed using the <a href='#ippDelete'><code>ippDelete</code></a> function.</p> |
731 | ||
732 | <p>The second opaque structure is called <a href='#ipp_attribute_t'><code>ipp_attribute_t</code></a> and holds a single IPP attribute which consists of a group tag (<a href='#ippGetGroupTag'><code>ippGetGroupTag</code></a>), a value type tag (<a href='#ippGetValueTag'><code>ippGetValueTag</code></a>), the attribute name (<a href='#ippGetName'><code>ippGetName</code></a>), and 1 or more values (<a href='#ippGetCount'><code>ippGetCount</code></a>, <a href='#ippGetBoolean'><code>ippGetBoolean</code></a>, <a href='#ippGetCollection'><code>ippGetCollection</code></a>, <a href='#ippGetDate'><code>ippGetDate</code></a>, <a href='#ippGetInteger'><code>ippGetInteger</code></a>, <a href='#ippGetRange'><code>ippGetRange</code></a>, <a href='#ippGetResolution'><code>ippGetResolution</code></a>, and <a href='#ippGetString'><code>ippGetString</code></a>). Attributes are added to an <a href='#ipp_t'><code>ipp_t</code></a> pointer using one of the <code>ippAdd</code> functions. For example, use <a href='#ippAddString'><code>ippAddString</code></a> to add the "printer-uri" and "requesting-user-name" string attributes to a request:</p> | |
5a738aea MS |
733 | |
734 | <pre class='example'> | |
735 | <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(IPP_GET_JOBS); | |
736 | ||
82cc1f9a MS |
737 | <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", |
738 | NULL, "ipp://localhost/printers/"); | |
5a738aea MS |
739 | <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", |
740 | NULL, cupsUser()); | |
741 | </pre> | |
ef416fc2 | 742 | |
82cc1f9a | 743 | <p>Once you have created an IPP request, use the <code>cups</code> functions to send the request to and read the response from the server. For example, the <a href='#cupsDoRequest'><code>cupsDoRequest</code></a> function can be used for simple query operations that do not involve files:</p> |
ef416fc2 | 744 | |
5a738aea MS |
745 | <pre class='example'> |
746 | #include <cups/cups.h> | |
ef416fc2 | 747 | |
ef416fc2 | 748 | |
5a738aea MS |
749 | <a href='#ipp_t'>ipp_t</a> *<a name='get_jobs'>get_jobs</a>(void) |
750 | { | |
751 | <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(IPP_GET_JOBS); | |
ef416fc2 | 752 | |
82cc1f9a MS |
753 | <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", |
754 | NULL, "ipp://localhost/printers/"); | |
5a738aea MS |
755 | <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", |
756 | NULL, cupsUser()); | |
757 | ||
758 | return (<a href='#cupsDoRequest'>cupsDoRequest</a>(CUPS_HTTP_DEFAULT, request, "/")); | |
759 | } | |
ef416fc2 | 760 | </pre> |
761 | ||
82cc1f9a | 762 | <p>The <a href='#cupsDoRequest'><code>cupsDoRequest</code></a> function frees the request and returns an IPP response or <code>NULL</code> pointer if the request could not be sent to the server. Once you have a response from the server, you can either use the <a href='#ippFindAttribute'><code>ippFindAttribute</code></a> and <a href='#ippFindNextAttribute'><code>ippFindNextAttribute</code></a> functions to find specific attributes, for example:</p> |
ef416fc2 | 763 | |
5a738aea MS |
764 | <pre class='example'> |
765 | <a href='#ipp_t'>ipp_t</a> *response; | |
766 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> *attr; | |
bc44d920 | 767 | |
5a738aea MS |
768 | attr = <a href='#ippFindAttribute'>ippFindAttribute</a>(response, "printer-state", IPP_TAG_ENUM); |
769 | </pre> | |
770 | ||
82cc1f9a | 771 | <p>You can also walk the list of attributes with a simple <code>for</code> loop like this:</p> |
5a738aea MS |
772 | |
773 | <pre class='example'> | |
774 | <a href='#ipp_t'>ipp_t</a> *response; | |
775 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> *attr; | |
776 | ||
82cc1f9a MS |
777 | for (attr = <a href='#ippFirstAttribute'>ippFirstAttribute</a>(response); attr != NULL; attr = <a href='#ippNextAttribute'>ippNextAttribute</a>(response)) |
778 | if (ippGetName(attr) == NULL) | |
5a738aea MS |
779 | puts("--SEPARATOR--"); |
780 | else | |
82cc1f9a | 781 | puts(ippGetName(attr)); |
5a738aea MS |
782 | </pre> |
783 | ||
82cc1f9a | 784 | <p>The <code>for</code> loop approach is normally used when collecting attributes for multiple objects (jobs, printers, etc.) in a response. Attributes with <code>NULL</code> names indicate a separator between the attributes of each object. For example, the following code will list the jobs returned from our previous <a href='#get_jobs'><code>get_jobs</code></a> example code:</p> |
5a738aea MS |
785 | |
786 | <pre class='example'> | |
787 | <a href='#ipp_t'>ipp_t</a> *response = <a href='#get_jobs'>get_jobs</a>(); | |
788 | ||
789 | if (response != NULL) | |
790 | { | |
791 | <a href='#ipp_attribute_t'>ipp_attribute_t</a> *attr; | |
82cc1f9a | 792 | const char *attrname; |
5a738aea | 793 | int job_id = 0; |
82cc1f9a MS |
794 | const char *job_name = NULL; |
795 | const char *job_originating_user_name = NULL; | |
5a738aea MS |
796 | |
797 | puts("Job ID Owner Title"); | |
798 | puts("------ ---------------- ---------------------------------"); | |
799 | ||
82cc1f9a | 800 | for (attr = <a href='#ippFirstAttribute'>ippFirstAttribute</a>(response); attr != NULL; attr = <a href='#ippNextAttribute'>ippNextAttribute</a>(response)) |
5a738aea MS |
801 | { |
802 | /* Attributes without names are separators between jobs */ | |
82cc1f9a MS |
803 | attrname = ippGetName(attr); |
804 | if (attrname == NULL) | |
5a738aea | 805 | { |
82cc1f9a MS |
806 | if (job_id > 0) |
807 | { | |
808 | if (job_name == NULL) | |
809 | job_name = "(withheld)"; | |
810 | ||
811 | if (job_originating_user_name == NULL) | |
812 | job_originating_user_name = "(withheld)"; | |
813 | ||
5a738aea | 814 | printf("%5d %-16s %s\n", job_id, job_originating_user_name, job_name); |
82cc1f9a | 815 | } |
5a738aea MS |
816 | |
817 | job_id = 0; | |
818 | job_name = NULL; | |
819 | job_originating_user_name = NULL; | |
820 | continue; | |
821 | } | |
82cc1f9a MS |
822 | else if (!strcmp(attrname, "job-id") && ippGetValueTag(attr) == IPP_TAG_INTEGER) |
823 | job_id = ippGetInteger(attr, 0); | |
824 | else if (!strcmp(attrname, "job-name") && ippGetValueTag(attr) == IPP_TAG_NAME) | |
825 | job_name = ippGetString(attr, 0, NULL); | |
826 | else if (!strcmp(attrname, "job-originating-user-name") && | |
827 | ippGetValueTag(attr) == IPP_TAG_NAME) | |
828 | job_originating_user_name = ippGetString(attr, 0, NULL); | |
5a738aea MS |
829 | } |
830 | ||
82cc1f9a MS |
831 | if (job_id > 0) |
832 | { | |
833 | if (job_name == NULL) | |
834 | job_name = "(withheld)"; | |
835 | ||
836 | if (job_originating_user_name == NULL) | |
837 | job_originating_user_name = "(withheld)"; | |
838 | ||
5a738aea | 839 | printf("%5d %-16s %s\n", job_id, job_originating_user_name, job_name); |
82cc1f9a | 840 | } |
5a738aea MS |
841 | } |
842 | </pre> | |
843 | ||
844 | <h3><a name='CREATING_URI_STRINGS'>Creating URI Strings</a></h3> | |
845 | ||
846 | <p>To ensure proper encoding, the | |
847 | <a href='#httpAssembleURIf'><code>httpAssembleURIf</code></a> function must be | |
848 | used to format a "printer-uri" string for all printer-based requests:</p> | |
849 | ||
850 | <pre class='example'> | |
851 | const char *name = "Foo"; | |
852 | char uri[1024]; | |
853 | <a href='#ipp_t'>ipp_t</a> *request; | |
854 | ||
855 | <a href='#httpAssembleURIf'>httpAssembleURIf</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, cupsServer(), | |
856 | ippPort(), "/printers/%s", name); | |
857 | <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri); | |
858 | </pre> | |
859 | ||
860 | <h3><a name='SENDING_REQUESTS_WITH_FILES'>Sending Requests with Files</a></h3> | |
861 | ||
862 | <p>The <a href='#cupsDoFileRequest'><code>cupsDoFileRequest</code></a> and | |
863 | <a href='#cupsDoIORequest'><code>cupsDoIORequest</code></a> functions are | |
864 | used for requests involving files. The | |
865 | <a href='#cupsDoFileRequest'><code>cupsDoFileRequest</code></a> function | |
866 | attaches the named file to a request and is typically used when sending a print | |
867 | file or changing a printer's PPD file:</p> | |
868 | ||
869 | <pre class='example'> | |
870 | const char *filename = "/usr/share/cups/data/testprint.ps"; | |
871 | const char *name = "Foo"; | |
872 | char uri[1024]; | |
873 | char resource[1024]; | |
874 | <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(IPP_PRINT_JOB); | |
875 | <a href='#ipp_t'>ipp_t</a> *response; | |
876 | ||
877 | /* Use httpAssembleURIf for the printer-uri string */ | |
878 | <a href='#httpAssembleURIf'>httpAssembleURIf</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, cupsServer(), | |
879 | ippPort(), "/printers/%s", name); | |
880 | <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri); | |
881 | <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", | |
882 | NULL, cupsUser()); | |
883 | <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", | |
884 | NULL, "testprint.ps"); | |
885 | ||
886 | /* Use snprintf for the resource path */ | |
887 | snprintf(resource, sizeof(resource), "/printers/%s", name); | |
888 | ||
889 | response = <a href='#cupsDoFileRequest'>cupsDoFileRequest</a>(CUPS_HTTP_DEFAULT, request, resource, filename); | |
890 | </pre> | |
891 | ||
892 | <p>The <a href='#cupsDoIORequest'><code>cupsDoIORequest</code></a> function | |
893 | optionally attaches a file to the request and optionally saves a file in the | |
894 | response from the server. It is used when using a pipe for the request | |
895 | attachment or when using a request that returns a file, currently only | |
896 | <code>CUPS_GET_DOCUMENT</code> and <code>CUPS_GET_PPD</code>. For example, | |
897 | the following code will download the PPD file for the sample HP LaserJet | |
898 | printer driver:</p> | |
899 | ||
900 | <pre class='example'> | |
901 | char tempfile[1024]; | |
902 | int tempfd; | |
903 | <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(CUPS_GET_PPD); | |
904 | <a href='#ipp_t'>ipp_t</a> *response; | |
905 | ||
906 | <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name", | |
907 | NULL, "laserjet.ppd"); | |
908 | ||
909 | tempfd = cupsTempFd(tempfile, sizeof(tempfile)); | |
910 | ||
911 | response = <a href='#cupsDoIORequest'>cupsDoIORequest</a>(CUPS_HTTP_DEFAULT, request, "/", -1, tempfd); | |
912 | </pre> | |
913 | ||
914 | <p>The example passes <code>-1</code> for the input file descriptor to specify | |
915 | that no file is to be attached to the request. The PPD file attached to the | |
916 | response is written to the temporary file descriptor we created using the | |
917 | <code>cupsTempFd</code> function.</p> | |
918 | ||
919 | <h3><a name='ASYNCHRONOUS_REQUEST_PROCESSING'>Asynchronous Request Processing</a></h3> | |
920 | ||
921 | <p>The <a href='#cupsSendRequest'><code>cupsSendRequest</code></a> and | |
922 | <a href='#cupsGetResponse'><code>cupsGetResponse</code></a> support | |
923 | asynchronous communications with the server. Unlike the other request | |
924 | functions, the IPP request is not automatically freed, so remember to | |
925 | free your request with the <a href='#ippDelete'><code>ippDelete</code></a> | |
926 | function.</p> | |
927 | ||
928 | <p>File data is attached to the request using the | |
929 | <a href='#cupsWriteRequestData'><code>cupsWriteRequestData</code></a> | |
930 | function, while file data returned from the server is read using the | |
931 | <a href='#cupsReadResponseData'><code>cupsReadResponseData</code></a> | |
932 | function. We can rewrite the previous <code>CUPS_GET_PPD</code> example | |
933 | to use the asynchronous functions quite easily:</p> | |
934 | ||
935 | <pre class='example'> | |
936 | char tempfile[1024]; | |
937 | int tempfd; | |
938 | <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(CUPS_GET_PPD); | |
939 | <a href='#ipp_t'>ipp_t</a> *response; | |
940 | ||
941 | <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name", | |
942 | NULL, "laserjet.ppd"); | |
943 | ||
944 | tempfd = cupsTempFd(tempfile, sizeof(tempfile)); | |
945 | ||
946 | if (<a href='#cupsSendRequest'>cupsSendRequest</a>(CUPS_HTTP_DEFAULT, request, "/") == HTTP_CONTINUE) | |
947 | { | |
948 | response = <a href='#cupsGetResponse'>cupsGetResponse</a>(CUPS_HTTP_DEFAULT, "/"); | |
949 | ||
950 | if (response != NULL) | |
951 | { | |
952 | ssize_t bytes; | |
953 | char buffer[8192]; | |
954 | ||
955 | while ((bytes = <a href='#cupsReadResponseData'>cupsReadResponseData</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer))) > 0) | |
956 | write(tempfd, buffer, bytes); | |
957 | } | |
958 | } | |
959 | ||
960 | /* Free the request! */ | |
961 | <a href='#ippDelete'>ippDelete</a>(request); | |
962 | </pre> | |
963 | ||
964 | <p>The <a href='#cupsSendRequest'><code>cupsSendRequest</code></a> function | |
965 | returns the initial HTTP request status, typically either | |
966 | <code>HTTP_CONTINUE</code> or <code>HTTP_UNAUTHORIZED</code>. The latter status | |
967 | is returned when the request requires authentication of some sort. The | |
968 | <a href='#cupsDoAuthentication'><code>cupsDoAuthentication</code></a> function | |
969 | must be called when your see <code>HTTP_UNAUTHORIZED</code> and the request | |
970 | re-sent. We can add authentication support to our example code by using a | |
971 | <code>do ... while</code> loop:</p> | |
972 | ||
973 | <pre class='example'> | |
974 | char tempfile[1024]; | |
975 | int tempfd; | |
976 | <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(CUPS_GET_PPD); | |
977 | <a href='#ipp_t'>ipp_t</a> *response; | |
978 | http_status_t status; | |
979 | ||
980 | <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name", | |
981 | NULL, "laserjet.ppd"); | |
982 | ||
983 | tempfd = cupsTempFd(tempfile, sizeof(tempfile)); | |
984 | ||
985 | /* Loop for authentication */ | |
986 | do | |
987 | { | |
75bd9771 | 988 | status = <a href='#cupsSendRequest'>cupsSendRequest</a>(CUPS_HTTP_DEFAULT, request, "/"); |
5a738aea MS |
989 | |
990 | if (status == HTTP_UNAUTHORIZED) | |
991 | { | |
992 | /* Try to authenticate, break out of the loop if that fails */ | |
993 | if (<a href='#cupsDoAuthentication'>cupsDoAuthentication</a>(CUPS_HTTP_DEFAULT, "POST", "/")) | |
994 | break; | |
995 | } | |
996 | } | |
997 | while (status != HTTP_CONTINUE && status != HTTP_UNAUTHORIZED); | |
998 | ||
999 | if (status == HTTP_CONTINUE) | |
1000 | { | |
1001 | response = <a href='#cupsGetResponse'>cupsGetResponse</a>(CUPS_HTTP_DEFAULT, "/"); | |
1002 | ||
1003 | if (response != NULL) | |
1004 | { | |
1005 | ssize_t bytes; | |
1006 | char buffer[8192]; | |
1007 | ||
1008 | while ((bytes = <a href='#cupsReadResponseData'>cupsReadResponseData</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer))) > 0) | |
1009 | write(tempfd, buffer, bytes); | |
1010 | } | |
1011 | } | |
1012 | ||
1013 | /* Free the request! */ | |
1014 | <a href='#ippDelete'>ippDelete</a>(request); | |
1015 | </pre> | |
1016 | <h2 class="title"><a name="FUNCTIONS">Functions</a></h2> | |
f3c17241 | 1017 | <h3 class="function"><span class="info"> CUPS 1.1.20/OS X 10.4 </span><a name="cupsDoAuthentication">cupsDoAuthentication</a></h3> |
5a738aea MS |
1018 | <p class="description">Authenticate a request.</p> |
1019 | <p class="code"> | |
1020 | int cupsDoAuthentication (<br> | |
1021 | <a href="#http_t">http_t</a> *http,<br> | |
1022 | const char *method,<br> | |
1023 | const char *resource<br> | |
1024 | );</p> | |
1025 | <h4 class="parameters">Parameters</h4> | |
1026 | <dl> | |
1027 | <dt>http</dt> | |
568fa3fa | 1028 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> |
5a738aea MS |
1029 | <dt>method</dt> |
1030 | <dd class="description">Request method ("GET", "POST", "PUT")</dd> | |
1031 | <dt>resource</dt> | |
1032 | <dd class="description">Resource path</dd> | |
1033 | </dl> | |
1034 | <h4 class="returnvalue">Return Value</h4> | |
1035 | <p class="description">0 on success, -1 on error</p> | |
1036 | <h4 class="discussion">Discussion</h4> | |
6961465f | 1037 | <p class="discussion">This function should be called in response to a <code>HTTP_STATUS_UNAUTHORIZED</code> |
5a738aea MS |
1038 | status, prior to resubmitting your request. |
1039 | ||
1040 | </p> | |
1041 | <h3 class="function"><a name="cupsDoFileRequest">cupsDoFileRequest</a></h3> | |
1042 | <p class="description">Do an IPP request with a file.</p> | |
1043 | <p class="code"> | |
1044 | <a href="#ipp_t">ipp_t</a> *cupsDoFileRequest (<br> | |
1045 | <a href="#http_t">http_t</a> *http,<br> | |
1046 | <a href="#ipp_t">ipp_t</a> *request,<br> | |
1047 | const char *resource,<br> | |
1048 | const char *filename<br> | |
1049 | );</p> | |
1050 | <h4 class="parameters">Parameters</h4> | |
1051 | <dl> | |
1052 | <dt>http</dt> | |
568fa3fa | 1053 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> |
5a738aea MS |
1054 | <dt>request</dt> |
1055 | <dd class="description">IPP request</dd> | |
1056 | <dt>resource</dt> | |
1057 | <dd class="description">HTTP resource for POST</dd> | |
1058 | <dt>filename</dt> | |
568fa3fa | 1059 | <dd class="description">File to send or <code>NULL</code> for none</dd> |
5a738aea MS |
1060 | </dl> |
1061 | <h4 class="returnvalue">Return Value</h4> | |
1062 | <p class="description">Response data</p> | |
1063 | <h4 class="discussion">Discussion</h4> | |
5a9febac MS |
1064 | <p class="discussion">This function sends the IPP request and attached file to the specified |
1065 | server, retrying and authenticating as necessary. The request is freed with | |
1066 | <a href="#ippDelete"><code>ippDelete</code></a>.</p> | |
f3c17241 | 1067 | <h3 class="function"><span class="info"> CUPS 1.3/OS X 10.5 </span><a name="cupsDoIORequest">cupsDoIORequest</a></h3> |
5a738aea MS |
1068 | <p class="description">Do an IPP request with file descriptors.</p> |
1069 | <p class="code"> | |
1070 | <a href="#ipp_t">ipp_t</a> *cupsDoIORequest (<br> | |
1071 | <a href="#http_t">http_t</a> *http,<br> | |
1072 | <a href="#ipp_t">ipp_t</a> *request,<br> | |
1073 | const char *resource,<br> | |
1074 | int infile,<br> | |
1075 | int outfile<br> | |
1076 | );</p> | |
1077 | <h4 class="parameters">Parameters</h4> | |
1078 | <dl> | |
1079 | <dt>http</dt> | |
568fa3fa | 1080 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> |
5a738aea MS |
1081 | <dt>request</dt> |
1082 | <dd class="description">IPP request</dd> | |
1083 | <dt>resource</dt> | |
1084 | <dd class="description">HTTP resource for POST</dd> | |
1085 | <dt>infile</dt> | |
1086 | <dd class="description">File to read from or -1 for none</dd> | |
1087 | <dt>outfile</dt> | |
1088 | <dd class="description">File to write to or -1 for none</dd> | |
1089 | </dl> | |
1090 | <h4 class="returnvalue">Return Value</h4> | |
1091 | <p class="description">Response data</p> | |
1092 | <h4 class="discussion">Discussion</h4> | |
5a9febac MS |
1093 | <p class="discussion">This function sends the IPP request with the optional input file "infile" to |
1094 | the specified server, retrying and authenticating as necessary. The request | |
1095 | is freed with <a href="#ippDelete"><code>ippDelete</code></a>.<br> | |
5a738aea | 1096 | <br> |
5a9febac | 1097 | If "infile" is a valid file descriptor, <code>cupsDoIORequest</code> copies |
5a738aea MS |
1098 | all of the data from the file after the IPP request message.<br> |
1099 | <br> | |
5a9febac | 1100 | If "outfile" is a valid file descriptor, <code>cupsDoIORequest</code> copies |
bc44d920 | 1101 | all of the data after the IPP response message to the file. |
1102 | ||
5a738aea MS |
1103 | </p> |
1104 | <h3 class="function"><a name="cupsDoRequest">cupsDoRequest</a></h3> | |
1105 | <p class="description">Do an IPP request.</p> | |
1106 | <p class="code"> | |
1107 | <a href="#ipp_t">ipp_t</a> *cupsDoRequest (<br> | |
1108 | <a href="#http_t">http_t</a> *http,<br> | |
1109 | <a href="#ipp_t">ipp_t</a> *request,<br> | |
1110 | const char *resource<br> | |
1111 | );</p> | |
1112 | <h4 class="parameters">Parameters</h4> | |
1113 | <dl> | |
1114 | <dt>http</dt> | |
568fa3fa | 1115 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> |
5a738aea MS |
1116 | <dt>request</dt> |
1117 | <dd class="description">IPP request</dd> | |
1118 | <dt>resource</dt> | |
1119 | <dd class="description">HTTP resource for POST</dd> | |
1120 | </dl> | |
1121 | <h4 class="returnvalue">Return Value</h4> | |
1122 | <p class="description">Response data</p> | |
1123 | <h4 class="discussion">Discussion</h4> | |
1124 | <p class="discussion">This function sends the IPP request to the specified server, retrying | |
5a9febac | 1125 | and authenticating as necessary. The request is freed with <a href="#ippDelete"><code>ippDelete</code></a>.</p> |
5a738aea MS |
1126 | <h3 class="function"><a name="cupsEncodeOptions">cupsEncodeOptions</a></h3> |
1127 | <p class="description">Encode printer options into IPP attributes.</p> | |
1128 | <p class="code"> | |
1129 | void cupsEncodeOptions (<br> | |
1130 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
1131 | int num_options,<br> | |
1132 | cups_option_t *options<br> | |
1133 | );</p> | |
1134 | <h4 class="parameters">Parameters</h4> | |
1135 | <dl> | |
1136 | <dt>ipp</dt> | |
1137 | <dd class="description">Request to add to</dd> | |
1138 | <dt>num_options</dt> | |
1139 | <dd class="description">Number of options</dd> | |
1140 | <dt>options</dt> | |
1141 | <dd class="description">Options</dd> | |
1142 | </dl> | |
1143 | <h4 class="discussion">Discussion</h4> | |
1144 | <p class="discussion">This function adds operation, job, and then subscription attributes, | |
ecdc0628 | 1145 | in that order. Use the cupsEncodeOptions2() function to add attributes |
5a738aea | 1146 | for a single group.</p> |
f3c17241 | 1147 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="cupsEncodeOptions2">cupsEncodeOptions2</a></h3> |
5a738aea MS |
1148 | <p class="description">Encode printer options into IPP attributes for a group.</p> |
1149 | <p class="code"> | |
1150 | void cupsEncodeOptions2 (<br> | |
1151 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
1152 | int num_options,<br> | |
1153 | cups_option_t *options,<br> | |
a2326b5b | 1154 | ipp_tag_t group_tag<br> |
5a738aea MS |
1155 | );</p> |
1156 | <h4 class="parameters">Parameters</h4> | |
1157 | <dl> | |
1158 | <dt>ipp</dt> | |
1159 | <dd class="description">Request to add to</dd> | |
1160 | <dt>num_options</dt> | |
1161 | <dd class="description">Number of options</dd> | |
1162 | <dt>options</dt> | |
1163 | <dd class="description">Options</dd> | |
1164 | <dt>group_tag</dt> | |
1165 | <dd class="description">Group to encode</dd> | |
1166 | </dl> | |
1167 | <h4 class="discussion">Discussion</h4> | |
1168 | <p class="discussion">This function only adds attributes for a single group. Call this | |
ecdc0628 | 1169 | function multiple times for each group, or use cupsEncodeOptions() |
1170 | to add the standard groups. | |
ef416fc2 | 1171 | |
ae71f5de | 1172 | </p> |
f3c17241 | 1173 | <h3 class="function"><span class="info"> CUPS 1.4/OS X 10.6 </span><a name="cupsGetDevices">cupsGetDevices</a></h3> |
ae71f5de MS |
1174 | <p class="description">Get available printer devices.</p> |
1175 | <p class="code"> | |
1176 | ipp_status_t cupsGetDevices (<br> | |
1177 | <a href="#http_t">http_t</a> *http,<br> | |
1178 | int timeout,<br> | |
8b450588 | 1179 | const char *include_schemes,<br> |
ae71f5de MS |
1180 | const char *exclude_schemes,<br> |
1181 | cups_device_cb_t callback,<br> | |
1182 | void *user_data<br> | |
1183 | );</p> | |
1184 | <h4 class="parameters">Parameters</h4> | |
1185 | <dl> | |
1186 | <dt>http</dt> | |
1187 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> | |
1188 | <dt>timeout</dt> | |
1189 | <dd class="description">Timeout in seconds or <code>CUPS_TIMEOUT_DEFAULT</code></dd> | |
8b450588 MS |
1190 | <dt>include_schemes</dt> |
1191 | <dd class="description">Comma-separated URI schemes to include or <code>CUPS_INCLUDE_ALL</code></dd> | |
ae71f5de MS |
1192 | <dt>exclude_schemes</dt> |
1193 | <dd class="description">Comma-separated URI schemes to exclude or <code>CUPS_EXCLUDE_NONE</code></dd> | |
1194 | <dt>callback</dt> | |
1195 | <dd class="description">Callback function</dd> | |
1196 | <dt>user_data</dt> | |
1197 | <dd class="description">User data pointer</dd> | |
1198 | </dl> | |
1199 | <h4 class="returnvalue">Return Value</h4> | |
1200 | <p class="description">Request status - <code>IPP_OK</code> on success.</p> | |
1201 | <h4 class="discussion">Discussion</h4> | |
1202 | <p class="discussion">This function sends a CUPS-Get-Devices request and streams the discovered | |
1203 | devices to the specified callback function. The "timeout" parameter controls | |
8b450588 MS |
1204 | how long the request lasts, while the "include_schemes" and "exclude_schemes" |
1205 | parameters provide comma-delimited lists of backends to include or omit from | |
1206 | the request respectively. | |
ae71f5de MS |
1207 | |
1208 | </p> | |
f3c17241 | 1209 | <h3 class="function"><span class="info"> CUPS 1.1.20/OS X 10.4 </span><a name="cupsGetFd">cupsGetFd</a></h3> |
ae71f5de MS |
1210 | <p class="description">Get a file from the server.</p> |
1211 | <p class="code"> | |
a469f8a5 | 1212 | http_status_t cupsGetFd (<br> |
ae71f5de MS |
1213 | <a href="#http_t">http_t</a> *http,<br> |
1214 | const char *resource,<br> | |
1215 | int fd<br> | |
1216 | );</p> | |
1217 | <h4 class="parameters">Parameters</h4> | |
1218 | <dl> | |
1219 | <dt>http</dt> | |
1220 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> | |
1221 | <dt>resource</dt> | |
1222 | <dd class="description">Resource name</dd> | |
1223 | <dt>fd</dt> | |
1224 | <dd class="description">File descriptor</dd> | |
1225 | </dl> | |
1226 | <h4 class="returnvalue">Return Value</h4> | |
1227 | <p class="description">HTTP status</p> | |
1228 | <h4 class="discussion">Discussion</h4> | |
6961465f | 1229 | <p class="discussion">This function returns <code>HTTP_STATUS_OK</code> when the file is successfully retrieved. |
ae71f5de MS |
1230 | |
1231 | </p> | |
f3c17241 | 1232 | <h3 class="function"><span class="info"> CUPS 1.1.20/OS X 10.4 </span><a name="cupsGetFile">cupsGetFile</a></h3> |
ae71f5de MS |
1233 | <p class="description">Get a file from the server.</p> |
1234 | <p class="code"> | |
a469f8a5 | 1235 | http_status_t cupsGetFile (<br> |
ae71f5de MS |
1236 | <a href="#http_t">http_t</a> *http,<br> |
1237 | const char *resource,<br> | |
1238 | const char *filename<br> | |
1239 | );</p> | |
1240 | <h4 class="parameters">Parameters</h4> | |
1241 | <dl> | |
1242 | <dt>http</dt> | |
1243 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> | |
1244 | <dt>resource</dt> | |
1245 | <dd class="description">Resource name</dd> | |
1246 | <dt>filename</dt> | |
1247 | <dd class="description">Filename</dd> | |
1248 | </dl> | |
1249 | <h4 class="returnvalue">Return Value</h4> | |
1250 | <p class="description">HTTP status</p> | |
1251 | <h4 class="discussion">Discussion</h4> | |
6961465f | 1252 | <p class="discussion">This function returns <code>HTTP_STATUS_OK</code> when the file is successfully retrieved. |
ae71f5de | 1253 | |
5a738aea | 1254 | </p> |
f3c17241 | 1255 | <h3 class="function"><span class="info"> CUPS 1.4/OS X 10.6 </span><a name="cupsGetResponse">cupsGetResponse</a></h3> |
5a738aea MS |
1256 | <p class="description">Get a response to an IPP request.</p> |
1257 | <p class="code"> | |
1258 | <a href="#ipp_t">ipp_t</a> *cupsGetResponse (<br> | |
1259 | <a href="#http_t">http_t</a> *http,<br> | |
1260 | const char *resource<br> | |
1261 | );</p> | |
1262 | <h4 class="parameters">Parameters</h4> | |
1263 | <dl> | |
1264 | <dt>http</dt> | |
568fa3fa | 1265 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> |
5a738aea MS |
1266 | <dt>resource</dt> |
1267 | <dd class="description">HTTP resource for POST</dd> | |
1268 | </dl> | |
1269 | <h4 class="returnvalue">Return Value</h4> | |
568fa3fa | 1270 | <p class="description">Response or <code>NULL</code> on HTTP error</p> |
5a738aea MS |
1271 | <h4 class="discussion">Discussion</h4> |
1272 | <p class="discussion">Use this function to get the response for an IPP request sent using | |
5a9febac MS |
1273 | <a href="#cupsSendRequest"><code>cupsSendRequest</code></a>. For requests that return additional data, use |
1274 | <a href="#cupsReadResponseData"><code>cupsReadResponseData</code></a> after getting a successful response, | |
1275 | otherwise call <a href="#httpFlush"><code>httpFlush</code></a> to complete the response processing. | |
5a738aea | 1276 | |
ae71f5de | 1277 | </p> |
10d09e33 | 1278 | <h3 class="function"><a name="cupsLastError">cupsLastError</a></h3> |
5a9febac MS |
1279 | <p class="description">Return the last IPP status code received on the current |
1280 | thread.</p> | |
10d09e33 MS |
1281 | <p class="code"> |
1282 | ipp_status_t cupsLastError (void);</p> | |
1283 | <h4 class="returnvalue">Return Value</h4> | |
1284 | <p class="description">IPP status code from last request</p> | |
f3c17241 | 1285 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="cupsLastErrorString">cupsLastErrorString</a></h3> |
5a9febac MS |
1286 | <p class="description">Return the last IPP status-message received on the |
1287 | current thread.</p> | |
10d09e33 MS |
1288 | <p class="code"> |
1289 | const char *cupsLastErrorString (void);</p> | |
1290 | <h4 class="returnvalue">Return Value</h4> | |
1291 | <p class="description">status-message text from last request</p> | |
f3c17241 | 1292 | <h3 class="function"><span class="info"> CUPS 1.1.20/OS X 10.4 </span><a name="cupsPutFd">cupsPutFd</a></h3> |
ae71f5de MS |
1293 | <p class="description">Put a file on the server.</p> |
1294 | <p class="code"> | |
a469f8a5 | 1295 | http_status_t cupsPutFd (<br> |
ae71f5de MS |
1296 | <a href="#http_t">http_t</a> *http,<br> |
1297 | const char *resource,<br> | |
1298 | int fd<br> | |
1299 | );</p> | |
1300 | <h4 class="parameters">Parameters</h4> | |
1301 | <dl> | |
1302 | <dt>http</dt> | |
1303 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> | |
1304 | <dt>resource</dt> | |
1305 | <dd class="description">Resource name</dd> | |
1306 | <dt>fd</dt> | |
1307 | <dd class="description">File descriptor</dd> | |
1308 | </dl> | |
1309 | <h4 class="returnvalue">Return Value</h4> | |
1310 | <p class="description">HTTP status</p> | |
1311 | <h4 class="discussion">Discussion</h4> | |
6961465f | 1312 | <p class="discussion">This function returns <code>HTTP_STATUS_CREATED</code> when the file is stored |
ae71f5de MS |
1313 | successfully. |
1314 | ||
1315 | </p> | |
f3c17241 | 1316 | <h3 class="function"><span class="info"> CUPS 1.1.20/OS X 10.4 </span><a name="cupsPutFile">cupsPutFile</a></h3> |
ae71f5de MS |
1317 | <p class="description">Put a file on the server.</p> |
1318 | <p class="code"> | |
a469f8a5 | 1319 | http_status_t cupsPutFile (<br> |
ae71f5de MS |
1320 | <a href="#http_t">http_t</a> *http,<br> |
1321 | const char *resource,<br> | |
1322 | const char *filename<br> | |
1323 | );</p> | |
1324 | <h4 class="parameters">Parameters</h4> | |
1325 | <dl> | |
1326 | <dt>http</dt> | |
1327 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> | |
1328 | <dt>resource</dt> | |
1329 | <dd class="description">Resource name</dd> | |
1330 | <dt>filename</dt> | |
1331 | <dd class="description">Filename</dd> | |
1332 | </dl> | |
1333 | <h4 class="returnvalue">Return Value</h4> | |
1334 | <p class="description">HTTP status</p> | |
1335 | <h4 class="discussion">Discussion</h4> | |
1336 | <p class="discussion">This function returns <code>HTTP_CREATED</code> when the file is stored | |
1337 | successfully. | |
1338 | ||
5a738aea | 1339 | </p> |
f3c17241 | 1340 | <h3 class="function"><span class="info"> CUPS 1.4/OS X 10.6 </span><a name="cupsReadResponseData">cupsReadResponseData</a></h3> |
5a738aea MS |
1341 | <p class="description">Read additional data after the IPP response.</p> |
1342 | <p class="code"> | |
1343 | ssize_t cupsReadResponseData (<br> | |
1344 | <a href="#http_t">http_t</a> *http,<br> | |
1345 | char *buffer,<br> | |
1346 | size_t length<br> | |
1347 | );</p> | |
1348 | <h4 class="parameters">Parameters</h4> | |
1349 | <dl> | |
1350 | <dt>http</dt> | |
568fa3fa | 1351 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> |
5a738aea MS |
1352 | <dt>buffer</dt> |
1353 | <dd class="description">Buffer to use</dd> | |
1354 | <dt>length</dt> | |
1355 | <dd class="description">Number of bytes to read</dd> | |
1356 | </dl> | |
1357 | <h4 class="returnvalue">Return Value</h4> | |
1358 | <p class="description">Bytes read, 0 on EOF, -1 on error</p> | |
1359 | <h4 class="discussion">Discussion</h4> | |
5a9febac MS |
1360 | <p class="discussion">This function is used after <a href="#cupsGetResponse"><code>cupsGetResponse</code></a> to read the PPD or document |
1361 | files from <code>CUPS_GET_PPD</code> and <code>CUPS_GET_DOCUMENT</code> requests, | |
1362 | respectively. | |
5a738aea MS |
1363 | |
1364 | </p> | |
f3c17241 | 1365 | <h3 class="function"><span class="info"> CUPS 1.4/OS X 10.6 </span><a name="cupsSendRequest">cupsSendRequest</a></h3> |
5a738aea MS |
1366 | <p class="description">Send an IPP request.</p> |
1367 | <p class="code"> | |
a469f8a5 | 1368 | http_status_t cupsSendRequest (<br> |
5a738aea MS |
1369 | <a href="#http_t">http_t</a> *http,<br> |
1370 | <a href="#ipp_t">ipp_t</a> *request,<br> | |
1371 | const char *resource,<br> | |
1372 | size_t length<br> | |
1373 | );</p> | |
1374 | <h4 class="parameters">Parameters</h4> | |
1375 | <dl> | |
1376 | <dt>http</dt> | |
568fa3fa | 1377 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> |
5a738aea MS |
1378 | <dt>request</dt> |
1379 | <dd class="description">IPP request</dd> | |
1380 | <dt>resource</dt> | |
1381 | <dd class="description">Resource path</dd> | |
1382 | <dt>length</dt> | |
ae71f5de | 1383 | <dd class="description">Length of data to follow or <code>CUPS_LENGTH_VARIABLE</code></dd> |
5a738aea MS |
1384 | </dl> |
1385 | <h4 class="returnvalue">Return Value</h4> | |
1386 | <p class="description">Initial HTTP status</p> | |
1387 | <h4 class="discussion">Discussion</h4> | |
5a9febac MS |
1388 | <p class="discussion">Use <a href="#cupsWriteRequestData"><code>cupsWriteRequestData</code></a> to write any additional data (document, PPD |
1389 | file, etc.) for the request, <a href="#cupsGetResponse"><code>cupsGetResponse</code></a> to get the IPP response, | |
1390 | and <a href="#cupsReadResponseData"><code>cupsReadResponseData</code></a> to read any additional data following the | |
1391 | response. Only one request can be sent/queued at a time per <code>http_t</code> | |
1392 | connection.<br> | |
1393 | <br> | |
6961465f | 1394 | Returns the initial HTTP status code, which will be <code>HTTP_STATUS_CONTINUE</code> |
5a9febac | 1395 | on a successful send of the request.<br> |
5a738aea | 1396 | <br> |
5a9febac MS |
1397 | Note: Unlike <a href="#cupsDoFileRequest"><code>cupsDoFileRequest</code></a>, <a href="#cupsDoIORequest"><code>cupsDoIORequest</code></a>, and |
1398 | <a href="#cupsDoRequest"><code>cupsDoRequest</code></a>, the request is NOT freed with <a href="#ippDelete"><code>ippDelete</code></a>. | |
5a738aea MS |
1399 | |
1400 | </p> | |
f3c17241 | 1401 | <h3 class="function"><span class="info"> CUPS 1.4/OS X 10.6 </span><a name="cupsWriteRequestData">cupsWriteRequestData</a></h3> |
5a738aea MS |
1402 | <p class="description">Write additional data after an IPP request.</p> |
1403 | <p class="code"> | |
a469f8a5 | 1404 | http_status_t cupsWriteRequestData (<br> |
5a738aea MS |
1405 | <a href="#http_t">http_t</a> *http,<br> |
1406 | const char *buffer,<br> | |
1407 | size_t length<br> | |
1408 | );</p> | |
1409 | <h4 class="parameters">Parameters</h4> | |
1410 | <dl> | |
1411 | <dt>http</dt> | |
568fa3fa | 1412 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> |
5a738aea MS |
1413 | <dt>buffer</dt> |
1414 | <dd class="description">Bytes to write</dd> | |
1415 | <dt>length</dt> | |
1416 | <dd class="description">Number of bytes to write</dd> | |
1417 | </dl> | |
1418 | <h4 class="returnvalue">Return Value</h4> | |
6961465f | 1419 | <p class="description"><code>HTTP_STATUS_CONTINUE</code> if OK or HTTP status on error</p> |
5a738aea | 1420 | <h4 class="discussion">Discussion</h4> |
568fa3fa MS |
1421 | <p class="discussion">This function is used after <a href="#cupsSendRequest"><code>cupsSendRequest</code></a> to provide a PPD and |
1422 | after <a href="#cupsStartDocument"><code>cupsStartDocument</code></a> to provide a document file. | |
5a738aea | 1423 | |
10d09e33 | 1424 | </p> |
9c0e8e5d | 1425 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="httpAcceptConnection">httpAcceptConnection</a></h3> |
a469f8a5 MS |
1426 | <p class="description">Accept a new HTTP client connection from the |
1427 | specified listening socket.</p> | |
1428 | <p class="code"> | |
1429 | <a href="#http_t">http_t</a> *httpAcceptConnection (<br> | |
1430 | int fd,<br> | |
1431 | int blocking<br> | |
1432 | );</p> | |
1433 | <h4 class="parameters">Parameters</h4> | |
1434 | <dl> | |
1435 | <dt>fd</dt> | |
1436 | <dd class="description">Listen socket file descriptor</dd> | |
1437 | <dt>blocking</dt> | |
1438 | <dd class="description">1 if the connection should be | |
1439 | blocking, 0 otherwise</dd> | |
1440 | </dl> | |
1441 | <h4 class="returnvalue">Return Value</h4> | |
1442 | <p class="description">HTTP connection or <code>NULL</code></p> | |
f3c17241 | 1443 | <h3 class="function"><span class="info"> CUPS 1.5/OS X 10.7 </span><a name="httpAddCredential">httpAddCredential</a></h3> |
10d09e33 MS |
1444 | <p class="description">Allocates and adds a single credential to an array.</p> |
1445 | <p class="code"> | |
1446 | int httpAddCredential (<br> | |
1447 | cups_array_t *credentials,<br> | |
1448 | const void *data,<br> | |
1449 | size_t datalen<br> | |
1450 | );</p> | |
1451 | <h4 class="parameters">Parameters</h4> | |
1452 | <dl> | |
1453 | <dt>credentials</dt> | |
1454 | <dd class="description">Credentials array</dd> | |
1455 | <dt>data</dt> | |
1456 | <dd class="description">PEM-encoded X.509 data</dd> | |
1457 | <dt>datalen</dt> | |
1458 | <dd class="description">Length of data</dd> | |
1459 | </dl> | |
1460 | <h4 class="returnvalue">Return Value</h4> | |
1461 | <p class="description">0 on success, -1 on error</p> | |
1462 | <h4 class="discussion">Discussion</h4> | |
1463 | <p class="discussion">Use <code>cupsArrayNew(NULL, NULL)</code> to create a credentials array. | |
1464 | ||
5a738aea | 1465 | </p> |
f3c17241 | 1466 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="httpAddrAny">httpAddrAny</a></h3> |
5a738aea MS |
1467 | <p class="description">Check for the "any" address.</p> |
1468 | <p class="code"> | |
1469 | int httpAddrAny (<br> | |
1470 | const <a href="#http_addr_t">http_addr_t</a> *addr<br> | |
1471 | );</p> | |
1472 | <h4 class="parameters">Parameters</h4> | |
1473 | <dl> | |
1474 | <dt>addr</dt> | |
1475 | <dd class="description">Address to check</dd> | |
1476 | </dl> | |
1477 | <h4 class="returnvalue">Return Value</h4> | |
1478 | <p class="description">1 if "any", 0 otherwise</p> | |
ca6b43fc MS |
1479 | <h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpAddrClose">httpAddrClose</a></h3> |
1480 | <p class="description">Close a socket created by <a href="#httpAddrConnect"><code>httpAddrConnect</code></a> or | |
1481 | <a href="#httpAddrListen"><code>httpAddrListen</code></a>.</p> | |
1482 | <p class="code"> | |
1483 | int httpAddrClose (<br> | |
1484 | <a href="#http_addr_t">http_addr_t</a> *addr,<br> | |
1485 | int fd<br> | |
1486 | );</p> | |
1487 | <h4 class="parameters">Parameters</h4> | |
1488 | <dl> | |
1489 | <dt>addr</dt> | |
1490 | <dd class="description">Listen address or <code>NULL</code></dd> | |
1491 | <dt>fd</dt> | |
1492 | <dd class="description">Socket file descriptor</dd> | |
1493 | </dl> | |
1494 | <h4 class="returnvalue">Return Value</h4> | |
1495 | <p class="description">0 on success, -1 on failure</p> | |
1496 | <h4 class="discussion">Discussion</h4> | |
1497 | <p class="discussion">Pass <code>NULL</code> for sockets created with <a href="#httpAddrConnect"><code>httpAddrConnect</code></a> and the | |
1498 | listen address for sockets created with <a href="#httpAddrListen"><code>httpAddrListen</code></a>. This will | |
1499 | ensure that domain sockets are removed when closed. | |
1500 | ||
1501 | </p> | |
f3c17241 | 1502 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="httpAddrEqual">httpAddrEqual</a></h3> |
5a738aea MS |
1503 | <p class="description">Compare two addresses.</p> |
1504 | <p class="code"> | |
1505 | int httpAddrEqual (<br> | |
1506 | const <a href="#http_addr_t">http_addr_t</a> *addr1,<br> | |
1507 | const <a href="#http_addr_t">http_addr_t</a> *addr2<br> | |
1508 | );</p> | |
1509 | <h4 class="parameters">Parameters</h4> | |
1510 | <dl> | |
1511 | <dt>addr1</dt> | |
1512 | <dd class="description">First address</dd> | |
1513 | <dt>addr2</dt> | |
1514 | <dd class="description">Second address</dd> | |
1515 | </dl> | |
1516 | <h4 class="returnvalue">Return Value</h4> | |
1517 | <p class="description">1 if equal, 0 if not</p> | |
ca6b43fc MS |
1518 | <h3 class="function"><a name="httpAddrFamily">httpAddrFamily</a></h3> |
1519 | <p class="description">Get the address family of an address.</p> | |
1520 | <p class="code"> | |
1521 | int httpAddrFamily (<br> | |
1522 | <a href="#http_addr_t">http_addr_t</a> *addr<br> | |
1523 | );</p> | |
1524 | <h4 class="parameters">Parameters</h4> | |
1525 | <dl> | |
1526 | <dt>addr</dt> | |
1527 | <dd class="description">Address</dd> | |
1528 | </dl> | |
1529 | <h4 class="returnvalue">Return Value</h4> | |
1530 | <p class="description">Address family</p> | |
f3c17241 | 1531 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="httpAddrLength">httpAddrLength</a></h3> |
5a738aea MS |
1532 | <p class="description">Return the length of the address in bytes.</p> |
1533 | <p class="code"> | |
1534 | int httpAddrLength (<br> | |
1535 | const <a href="#http_addr_t">http_addr_t</a> *addr<br> | |
1536 | );</p> | |
1537 | <h4 class="parameters">Parameters</h4> | |
1538 | <dl> | |
1539 | <dt>addr</dt> | |
1540 | <dd class="description">Address</dd> | |
1541 | </dl> | |
1542 | <h4 class="returnvalue">Return Value</h4> | |
1543 | <p class="description">Length in bytes</p> | |
9c0e8e5d | 1544 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="httpAddrListen">httpAddrListen</a></h3> |
a469f8a5 MS |
1545 | <p class="description">Create a listening socket bound to the specified |
1546 | address and port.</p> | |
1547 | <p class="code"> | |
1548 | int httpAddrListen (<br> | |
1549 | <a href="#http_addr_t">http_addr_t</a> *addr,<br> | |
1550 | int port<br> | |
1551 | );</p> | |
1552 | <h4 class="parameters">Parameters</h4> | |
1553 | <dl> | |
1554 | <dt>addr</dt> | |
1555 | <dd class="description">Address to bind to</dd> | |
1556 | <dt>port</dt> | |
1557 | <dd class="description">Port number to bind to</dd> | |
1558 | </dl> | |
1559 | <h4 class="returnvalue">Return Value</h4> | |
1560 | <p class="description">Socket or -1 on error</p> | |
f3c17241 | 1561 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="httpAddrLocalhost">httpAddrLocalhost</a></h3> |
5a738aea MS |
1562 | <p class="description">Check for the local loopback address.</p> |
1563 | <p class="code"> | |
1564 | int httpAddrLocalhost (<br> | |
1565 | const <a href="#http_addr_t">http_addr_t</a> *addr<br> | |
1566 | );</p> | |
1567 | <h4 class="parameters">Parameters</h4> | |
1568 | <dl> | |
1569 | <dt>addr</dt> | |
1570 | <dd class="description">Address to check</dd> | |
1571 | </dl> | |
1572 | <h4 class="returnvalue">Return Value</h4> | |
1573 | <p class="description">1 if local host, 0 otherwise</p> | |
f3c17241 | 1574 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="httpAddrLookup">httpAddrLookup</a></h3> |
5a738aea MS |
1575 | <p class="description">Lookup the hostname associated with the address.</p> |
1576 | <p class="code"> | |
1577 | char *httpAddrLookup (<br> | |
1578 | const <a href="#http_addr_t">http_addr_t</a> *addr,<br> | |
1579 | char *name,<br> | |
1580 | int namelen<br> | |
1581 | );</p> | |
1582 | <h4 class="parameters">Parameters</h4> | |
1583 | <dl> | |
1584 | <dt>addr</dt> | |
1585 | <dd class="description">Address to lookup</dd> | |
1586 | <dt>name</dt> | |
1587 | <dd class="description">Host name buffer</dd> | |
1588 | <dt>namelen</dt> | |
1589 | <dd class="description">Size of name buffer</dd> | |
1590 | </dl> | |
1591 | <h4 class="returnvalue">Return Value</h4> | |
1592 | <p class="description">Host name</p> | |
9c0e8e5d | 1593 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="httpAddrPort">httpAddrPort</a></h3> |
a469f8a5 MS |
1594 | <p class="description">Get the port number associated with an address.</p> |
1595 | <p class="code"> | |
1596 | int httpAddrPort (<br> | |
1597 | <a href="#http_addr_t">http_addr_t</a> *addr<br> | |
1598 | );</p> | |
1599 | <h4 class="parameters">Parameters</h4> | |
1600 | <dl> | |
1601 | <dt>addr</dt> | |
1602 | <dd class="description">Address</dd> | |
1603 | </dl> | |
1604 | <h4 class="returnvalue">Return Value</h4> | |
1605 | <p class="description">Port number</p> | |
f3c17241 | 1606 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="httpAddrString">httpAddrString</a></h3> |
5a738aea MS |
1607 | <p class="description">Convert an address to a numeric string.</p> |
1608 | <p class="code"> | |
1609 | char *httpAddrString (<br> | |
1610 | const <a href="#http_addr_t">http_addr_t</a> *addr,<br> | |
1611 | char *s,<br> | |
1612 | int slen<br> | |
1613 | );</p> | |
1614 | <h4 class="parameters">Parameters</h4> | |
1615 | <dl> | |
1616 | <dt>addr</dt> | |
1617 | <dd class="description">Address to convert</dd> | |
1618 | <dt>s</dt> | |
1619 | <dd class="description">String buffer</dd> | |
1620 | <dt>slen</dt> | |
1621 | <dd class="description">Length of string</dd> | |
1622 | </dl> | |
1623 | <h4 class="returnvalue">Return Value</h4> | |
1624 | <p class="description">Numeric address string</p> | |
f3c17241 | 1625 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="httpAssembleURI">httpAssembleURI</a></h3> |
5a738aea MS |
1626 | <p class="description">Assemble a uniform resource identifier from its |
1627 | components.</p> | |
1628 | <p class="code"> | |
79e1d494 MS |
1629 | <a href="#http_uri_status_t">http_uri_status_t</a> httpAssembleURI (<br> |
1630 | <a href="#http_uri_coding_t">http_uri_coding_t</a> encoding,<br> | |
5a738aea MS |
1631 | char *uri,<br> |
1632 | int urilen,<br> | |
1633 | const char *scheme,<br> | |
1634 | const char *username,<br> | |
1635 | const char *host,<br> | |
1636 | int port,<br> | |
1637 | const char *resource<br> | |
1638 | );</p> | |
1639 | <h4 class="parameters">Parameters</h4> | |
1640 | <dl> | |
1641 | <dt>encoding</dt> | |
1642 | <dd class="description">Encoding flags</dd> | |
1643 | <dt>uri</dt> | |
1644 | <dd class="description">URI buffer</dd> | |
1645 | <dt>urilen</dt> | |
1646 | <dd class="description">Size of URI buffer</dd> | |
1647 | <dt>scheme</dt> | |
1648 | <dd class="description">Scheme name</dd> | |
1649 | <dt>username</dt> | |
1650 | <dd class="description">Username</dd> | |
1651 | <dt>host</dt> | |
1652 | <dd class="description">Hostname or address</dd> | |
1653 | <dt>port</dt> | |
1654 | <dd class="description">Port number</dd> | |
1655 | <dt>resource</dt> | |
1656 | <dd class="description">Resource</dd> | |
1657 | </dl> | |
1658 | <h4 class="returnvalue">Return Value</h4> | |
1659 | <p class="description">URI status</p> | |
1660 | <h4 class="discussion">Discussion</h4> | |
1661 | <p class="discussion">This function escapes reserved characters in the URI depending on the | |
ecdc0628 | 1662 | value of the "encoding" argument. You should use this function in |
1663 | place of traditional string functions whenever you need to create a | |
1664 | URI string. | |
ef416fc2 | 1665 | |
5a738aea | 1666 | </p> |
f3c17241 | 1667 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="httpAssembleURIf">httpAssembleURIf</a></h3> |
5a738aea MS |
1668 | <p class="description">Assemble a uniform resource identifier from its |
1669 | components with a formatted resource.</p> | |
1670 | <p class="code"> | |
79e1d494 MS |
1671 | <a href="#http_uri_status_t">http_uri_status_t</a> httpAssembleURIf (<br> |
1672 | <a href="#http_uri_coding_t">http_uri_coding_t</a> encoding,<br> | |
5a738aea MS |
1673 | char *uri,<br> |
1674 | int urilen,<br> | |
1675 | const char *scheme,<br> | |
1676 | const char *username,<br> | |
1677 | const char *host,<br> | |
1678 | int port,<br> | |
1679 | const char *resourcef,<br> | |
1680 | ...<br> | |
1681 | );</p> | |
1682 | <h4 class="parameters">Parameters</h4> | |
1683 | <dl> | |
1684 | <dt>encoding</dt> | |
1685 | <dd class="description">Encoding flags</dd> | |
1686 | <dt>uri</dt> | |
1687 | <dd class="description">URI buffer</dd> | |
1688 | <dt>urilen</dt> | |
1689 | <dd class="description">Size of URI buffer</dd> | |
1690 | <dt>scheme</dt> | |
1691 | <dd class="description">Scheme name</dd> | |
1692 | <dt>username</dt> | |
1693 | <dd class="description">Username</dd> | |
1694 | <dt>host</dt> | |
1695 | <dd class="description">Hostname or address</dd> | |
1696 | <dt>port</dt> | |
1697 | <dd class="description">Port number</dd> | |
1698 | <dt>resourcef</dt> | |
1699 | <dd class="description">Printf-style resource</dd> | |
1700 | <dt>...</dt> | |
1701 | <dd class="description">Additional arguments as needed</dd> | |
1702 | </dl> | |
1703 | <h4 class="returnvalue">Return Value</h4> | |
1704 | <p class="description">URI status</p> | |
1705 | <h4 class="discussion">Discussion</h4> | |
1706 | <p class="discussion">This function creates a formatted version of the resource string | |
ecdc0628 | 1707 | argument "resourcef" and escapes reserved characters in the URI |
1708 | depending on the value of the "encoding" argument. You should use | |
1709 | this function in place of traditional string functions whenever | |
1710 | you need to create a URI string. | |
ef416fc2 | 1711 | |
5a738aea | 1712 | </p> |
9c0e8e5d | 1713 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="httpAssembleUUID">httpAssembleUUID</a></h3> |
db8b865d MS |
1714 | <p class="description">Assemble a name-based UUID URN conforming to RFC 4122.</p> |
1715 | <p class="code"> | |
1716 | char *httpAssembleUUID (<br> | |
1717 | const char *server,<br> | |
1718 | int port,<br> | |
1719 | const char *name,<br> | |
1720 | int number,<br> | |
1721 | char *buffer,<br> | |
1722 | size_t bufsize<br> | |
1723 | );</p> | |
1724 | <h4 class="parameters">Parameters</h4> | |
1725 | <dl> | |
1726 | <dt>server</dt> | |
1727 | <dd class="description">Server name</dd> | |
1728 | <dt>port</dt> | |
1729 | <dd class="description">Port number</dd> | |
1730 | <dt>name</dt> | |
1731 | <dd class="description">Object name or NULL</dd> | |
1732 | <dt>number</dt> | |
1733 | <dd class="description">Object number or 0</dd> | |
1734 | <dt>buffer</dt> | |
1735 | <dd class="description">String buffer</dd> | |
1736 | <dt>bufsize</dt> | |
1737 | <dd class="description">Size of buffer</dd> | |
1738 | </dl> | |
1739 | <h4 class="returnvalue">Return Value</h4> | |
1740 | <p class="description">UUID string</p> | |
1741 | <h4 class="discussion">Discussion</h4> | |
1742 | <p class="discussion">This function creates a unique 128-bit identifying number using the server | |
1743 | name, port number, random data, and optionally an object name and/or object | |
1744 | number. The result is formatted as a UUID URN as defined in RFC 4122.<br> | |
1745 | <br> | |
6961465f MS |
1746 | The buffer needs to be at least 46 bytes in size. |
1747 | ||
1748 | </p> | |
5a738aea MS |
1749 | <h3 class="function"><a name="httpBlocking">httpBlocking</a></h3> |
1750 | <p class="description">Set blocking/non-blocking behavior on a connection.</p> | |
1751 | <p class="code"> | |
1752 | void httpBlocking (<br> | |
1753 | <a href="#http_t">http_t</a> *http,<br> | |
1754 | int b<br> | |
1755 | );</p> | |
1756 | <h4 class="parameters">Parameters</h4> | |
1757 | <dl> | |
1758 | <dt>http</dt> | |
ca6b43fc | 1759 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
1760 | <dt>b</dt> |
1761 | <dd class="description">1 = blocking, 0 = non-blocking</dd> | |
1762 | </dl> | |
1763 | <h3 class="function"><a name="httpCheck">httpCheck</a></h3> | |
1764 | <p class="description">Check to see if there is a pending response from the server.</p> | |
1765 | <p class="code"> | |
1766 | int httpCheck (<br> | |
1767 | <a href="#http_t">http_t</a> *http<br> | |
1768 | );</p> | |
1769 | <h4 class="parameters">Parameters</h4> | |
1770 | <dl> | |
1771 | <dt>http</dt> | |
ca6b43fc | 1772 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
1773 | </dl> |
1774 | <h4 class="returnvalue">Return Value</h4> | |
1775 | <p class="description">0 = no data, 1 = data available</p> | |
f3c17241 | 1776 | <h3 class="function"><span class="info"> CUPS 1.1.19/OS X 10.3 </span><a name="httpClearCookie">httpClearCookie</a></h3> |
5a738aea MS |
1777 | <p class="description">Clear the cookie value(s).</p> |
1778 | <p class="code"> | |
1779 | void httpClearCookie (<br> | |
1780 | <a href="#http_t">http_t</a> *http<br> | |
1781 | );</p> | |
1782 | <h4 class="parameters">Parameters</h4> | |
1783 | <dl> | |
1784 | <dt>http</dt> | |
ca6b43fc | 1785 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
1786 | </dl> |
1787 | <h3 class="function"><a name="httpClearFields">httpClearFields</a></h3> | |
1788 | <p class="description">Clear HTTP request fields.</p> | |
1789 | <p class="code"> | |
1790 | void httpClearFields (<br> | |
1791 | <a href="#http_t">http_t</a> *http<br> | |
1792 | );</p> | |
1793 | <h4 class="parameters">Parameters</h4> | |
1794 | <dl> | |
1795 | <dt>http</dt> | |
ca6b43fc | 1796 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
1797 | </dl> |
1798 | <h3 class="function"><a name="httpClose">httpClose</a></h3> | |
10d09e33 | 1799 | <p class="description">Close an HTTP connection.</p> |
5a738aea MS |
1800 | <p class="code"> |
1801 | void httpClose (<br> | |
1802 | <a href="#http_t">http_t</a> *http<br> | |
1803 | );</p> | |
1804 | <h4 class="parameters">Parameters</h4> | |
1805 | <dl> | |
1806 | <dt>http</dt> | |
ca6b43fc | 1807 | <dd class="description">HTTP connection</dd> |
5a738aea | 1808 | </dl> |
ca6b43fc MS |
1809 | <h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpCompareCredentials">httpCompareCredentials</a></h3> |
1810 | <p class="description">Compare two sets of X.509 credentials.</p> | |
1811 | <p class="code"> | |
1812 | int httpCompareCredentials (<br> | |
1813 | cups_array_t *cred1,<br> | |
1814 | cups_array_t *cred2<br> | |
1815 | );</p> | |
1816 | <h4 class="parameters">Parameters</h4> | |
1817 | <dl> | |
1818 | <dt>cred1</dt> | |
1819 | <dd class="description">First set of X.509 credentials</dd> | |
1820 | <dt>cred2</dt> | |
1821 | <dd class="description">Second set of X.509 credentials</dd> | |
1822 | </dl> | |
1823 | <h4 class="returnvalue">Return Value</h4> | |
1824 | <p class="description">1 if they match, 0 if they do not</p> | |
06d4e77b | 1825 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpConnect">httpConnect</a></h3> |
5a738aea MS |
1826 | <p class="description">Connect to a HTTP server.</p> |
1827 | <p class="code"> | |
1828 | <a href="#http_t">http_t</a> *httpConnect (<br> | |
1829 | const char *host,<br> | |
1830 | int port<br> | |
1831 | );</p> | |
1832 | <h4 class="parameters">Parameters</h4> | |
1833 | <dl> | |
1834 | <dt>host</dt> | |
1835 | <dd class="description">Host to connect to</dd> | |
1836 | <dt>port</dt> | |
1837 | <dd class="description">Port number</dd> | |
1838 | </dl> | |
1839 | <h4 class="returnvalue">Return Value</h4> | |
1840 | <p class="description">New HTTP connection</p> | |
06d4e77b | 1841 | <h4 class="discussion">Discussion</h4> |
a469f8a5 | 1842 | <p class="discussion">This function is deprecated - use <a href="#httpConnect2"><code>httpConnect2</code></a> instead. |
06d4e77b MS |
1843 | |
1844 | </p> | |
9c0e8e5d | 1845 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="httpConnect2">httpConnect2</a></h3> |
a469f8a5 MS |
1846 | <p class="description">Connect to a HTTP server.</p> |
1847 | <p class="code"> | |
1848 | <a href="#http_t">http_t</a> *httpConnect2 (<br> | |
1849 | const char *host,<br> | |
1850 | int port,<br> | |
1851 | <a href="#http_addrlist_t">http_addrlist_t</a> *addrlist,<br> | |
1852 | int family,<br> | |
1853 | <a href="#http_encryption_t">http_encryption_t</a> encryption,<br> | |
1854 | int blocking,<br> | |
1855 | int msec,<br> | |
1856 | int *cancel<br> | |
1857 | );</p> | |
1858 | <h4 class="parameters">Parameters</h4> | |
1859 | <dl> | |
1860 | <dt>host</dt> | |
1861 | <dd class="description">Host to connect to</dd> | |
1862 | <dt>port</dt> | |
1863 | <dd class="description">Port number</dd> | |
1864 | <dt>addrlist</dt> | |
1865 | <dd class="description">List of addresses or NULL to lookup</dd> | |
1866 | <dt>family</dt> | |
1867 | <dd class="description">Address family to use or <code>AF_UNSPEC</code> for any</dd> | |
1868 | <dt>encryption</dt> | |
1869 | <dd class="description">Type of encryption to use</dd> | |
1870 | <dt>blocking</dt> | |
1871 | <dd class="description">1 for blocking connection, 0 for non-blocking</dd> | |
1872 | <dt>msec</dt> | |
db8b865d | 1873 | <dd class="description">Connection timeout in milliseconds, 0 means don't connect</dd> |
a469f8a5 MS |
1874 | <dt>cancel</dt> |
1875 | <dd class="description">Pointer to "cancel" variable</dd> | |
1876 | </dl> | |
1877 | <h4 class="returnvalue">Return Value</h4> | |
1878 | <p class="description">New HTTP connection</p> | |
1879 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpConnectEncrypt">httpConnectEncrypt</a></h3> | |
5a738aea MS |
1880 | <p class="description">Connect to a HTTP server using encryption.</p> |
1881 | <p class="code"> | |
1882 | <a href="#http_t">http_t</a> *httpConnectEncrypt (<br> | |
1883 | const char *host,<br> | |
1884 | int port,<br> | |
1885 | <a href="#http_encryption_t">http_encryption_t</a> encryption<br> | |
1886 | );</p> | |
1887 | <h4 class="parameters">Parameters</h4> | |
1888 | <dl> | |
1889 | <dt>host</dt> | |
1890 | <dd class="description">Host to connect to</dd> | |
1891 | <dt>port</dt> | |
1892 | <dd class="description">Port number</dd> | |
1893 | <dt>encryption</dt> | |
1894 | <dd class="description">Type of encryption to use</dd> | |
1895 | </dl> | |
1896 | <h4 class="returnvalue">Return Value</h4> | |
1897 | <p class="description">New HTTP connection</p> | |
a469f8a5 MS |
1898 | <h4 class="discussion">Discussion</h4> |
1899 | <p class="discussion">This function is now deprecated. Please use the <a href="#httpConnect2"><code>httpConnect2</code></a> function | |
1900 | instead. | |
1901 | ||
1902 | </p> | |
5a738aea MS |
1903 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpDecode64">httpDecode64</a></h3> |
1904 | <p class="description">Base64-decode a string.</p> | |
1905 | <p class="code"> | |
1906 | char *httpDecode64 (<br> | |
1907 | char *out,<br> | |
1908 | const char *in<br> | |
1909 | );</p> | |
1910 | <h4 class="parameters">Parameters</h4> | |
1911 | <dl> | |
1912 | <dt>out</dt> | |
1913 | <dd class="description">String to write to</dd> | |
1914 | <dt>in</dt> | |
1915 | <dd class="description">String to read from</dd> | |
1916 | </dl> | |
1917 | <h4 class="returnvalue">Return Value</h4> | |
1918 | <p class="description">Decoded string</p> | |
1919 | <h4 class="discussion">Discussion</h4> | |
1920 | <p class="discussion">This function is deprecated. Use the httpDecode64_2() function instead | |
ecdc0628 | 1921 | which provides buffer length arguments. |
1922 | ||
5a738aea | 1923 | </p> |
f3c17241 | 1924 | <h3 class="function"><span class="info"> CUPS 1.1.21/OS X 10.4 </span><a name="httpDecode64_2">httpDecode64_2</a></h3> |
5a738aea MS |
1925 | <p class="description">Base64-decode a string.</p> |
1926 | <p class="code"> | |
1927 | char *httpDecode64_2 (<br> | |
1928 | char *out,<br> | |
1929 | int *outlen,<br> | |
1930 | const char *in<br> | |
1931 | );</p> | |
1932 | <h4 class="parameters">Parameters</h4> | |
1933 | <dl> | |
1934 | <dt>out</dt> | |
1935 | <dd class="description">String to write to</dd> | |
1936 | <dt>outlen</dt> | |
1937 | <dd class="description">Size of output string</dd> | |
1938 | <dt>in</dt> | |
1939 | <dd class="description">String to read from</dd> | |
1940 | </dl> | |
1941 | <h4 class="returnvalue">Return Value</h4> | |
1942 | <p class="description">Decoded string</p> | |
1943 | <h3 class="function"><a name="httpDelete">httpDelete</a></h3> | |
1944 | <p class="description">Send a DELETE request to the server.</p> | |
1945 | <p class="code"> | |
1946 | int httpDelete (<br> | |
1947 | <a href="#http_t">http_t</a> *http,<br> | |
1948 | const char *uri<br> | |
1949 | );</p> | |
1950 | <h4 class="parameters">Parameters</h4> | |
1951 | <dl> | |
1952 | <dt>http</dt> | |
ca6b43fc | 1953 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
1954 | <dt>uri</dt> |
1955 | <dd class="description">URI to delete</dd> | |
1956 | </dl> | |
1957 | <h4 class="returnvalue">Return Value</h4> | |
1958 | <p class="description">Status of call (0 = success)</p> | |
1959 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpEncode64">httpEncode64</a></h3> | |
1960 | <p class="description">Base64-encode a string.</p> | |
1961 | <p class="code"> | |
1962 | char *httpEncode64 (<br> | |
1963 | char *out,<br> | |
1964 | const char *in<br> | |
1965 | );</p> | |
1966 | <h4 class="parameters">Parameters</h4> | |
1967 | <dl> | |
1968 | <dt>out</dt> | |
1969 | <dd class="description">String to write to</dd> | |
1970 | <dt>in</dt> | |
1971 | <dd class="description">String to read from</dd> | |
1972 | </dl> | |
1973 | <h4 class="returnvalue">Return Value</h4> | |
1974 | <p class="description">Encoded string</p> | |
1975 | <h4 class="discussion">Discussion</h4> | |
1976 | <p class="discussion">This function is deprecated. Use the httpEncode64_2() function instead | |
ecdc0628 | 1977 | which provides buffer length arguments. |
1978 | ||
5a738aea | 1979 | </p> |
f3c17241 | 1980 | <h3 class="function"><span class="info"> CUPS 1.1.21/OS X 10.4 </span><a name="httpEncode64_2">httpEncode64_2</a></h3> |
5a738aea MS |
1981 | <p class="description">Base64-encode a string.</p> |
1982 | <p class="code"> | |
1983 | char *httpEncode64_2 (<br> | |
1984 | char *out,<br> | |
1985 | int outlen,<br> | |
1986 | const char *in,<br> | |
1987 | int inlen<br> | |
1988 | );</p> | |
1989 | <h4 class="parameters">Parameters</h4> | |
1990 | <dl> | |
1991 | <dt>out</dt> | |
1992 | <dd class="description">String to write to</dd> | |
1993 | <dt>outlen</dt> | |
1994 | <dd class="description">Size of output string</dd> | |
1995 | <dt>in</dt> | |
1996 | <dd class="description">String to read from</dd> | |
1997 | <dt>inlen</dt> | |
1998 | <dd class="description">Size of input string</dd> | |
1999 | </dl> | |
2000 | <h4 class="returnvalue">Return Value</h4> | |
2001 | <p class="description">Encoded string</p> | |
2002 | <h3 class="function"><a name="httpEncryption">httpEncryption</a></h3> | |
2003 | <p class="description">Set the required encryption on the link.</p> | |
2004 | <p class="code"> | |
2005 | int httpEncryption (<br> | |
2006 | <a href="#http_t">http_t</a> *http,<br> | |
2007 | <a href="#http_encryption_t">http_encryption_t</a> e<br> | |
2008 | );</p> | |
2009 | <h4 class="parameters">Parameters</h4> | |
2010 | <dl> | |
2011 | <dt>http</dt> | |
ca6b43fc | 2012 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2013 | <dt>e</dt> |
2014 | <dd class="description">New encryption preference</dd> | |
2015 | </dl> | |
2016 | <h4 class="returnvalue">Return Value</h4> | |
2017 | <p class="description">-1 on error, 0 on success</p> | |
2018 | <h3 class="function"><a name="httpError">httpError</a></h3> | |
2019 | <p class="description">Get the last error on a connection.</p> | |
2020 | <p class="code"> | |
2021 | int httpError (<br> | |
2022 | <a href="#http_t">http_t</a> *http<br> | |
2023 | );</p> | |
2024 | <h4 class="parameters">Parameters</h4> | |
2025 | <dl> | |
2026 | <dt>http</dt> | |
ca6b43fc | 2027 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2028 | </dl> |
2029 | <h4 class="returnvalue">Return Value</h4> | |
2030 | <p class="description">Error code (errno) value</p> | |
ca6b43fc MS |
2031 | <h3 class="function"><a name="httpFieldValue">httpFieldValue</a></h3> |
2032 | <p class="description">Return the HTTP field enumeration value for a field | |
2033 | name.</p> | |
2034 | <p class="code"> | |
2035 | <a href="#http_field_t">http_field_t</a> httpFieldValue (<br> | |
2036 | const char *name<br> | |
2037 | );</p> | |
2038 | <h4 class="parameters">Parameters</h4> | |
2039 | <dl> | |
2040 | <dt>name</dt> | |
2041 | <dd class="description">String name</dd> | |
2042 | </dl> | |
2043 | <h4 class="returnvalue">Return Value</h4> | |
2044 | <p class="description">Field index</p> | |
5a738aea MS |
2045 | <h3 class="function"><a name="httpFlush">httpFlush</a></h3> |
2046 | <p class="description">Flush data from a HTTP connection.</p> | |
2047 | <p class="code"> | |
2048 | void httpFlush (<br> | |
2049 | <a href="#http_t">http_t</a> *http<br> | |
2050 | );</p> | |
2051 | <h4 class="parameters">Parameters</h4> | |
2052 | <dl> | |
2053 | <dt>http</dt> | |
ca6b43fc | 2054 | <dd class="description">HTTP connection</dd> |
5a738aea | 2055 | </dl> |
f3c17241 | 2056 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="httpFlushWrite">httpFlushWrite</a></h3> |
5a738aea MS |
2057 | <p class="description">Flush data in write buffer.</p> |
2058 | <p class="code"> | |
2059 | int httpFlushWrite (<br> | |
2060 | <a href="#http_t">http_t</a> *http<br> | |
2061 | );</p> | |
2062 | <h4 class="parameters">Parameters</h4> | |
2063 | <dl> | |
2064 | <dt>http</dt> | |
ca6b43fc | 2065 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2066 | </dl> |
2067 | <h4 class="returnvalue">Return Value</h4> | |
2068 | <p class="description">Bytes written or -1 on error</p> | |
10d09e33 MS |
2069 | <h3 class="function"><a name="httpFreeCredentials">httpFreeCredentials</a></h3> |
2070 | <p class="description">Free an array of credentials.</p> | |
2071 | <p class="code"> | |
2072 | void httpFreeCredentials (<br> | |
2073 | cups_array_t *credentials<br> | |
2074 | );</p> | |
2075 | <h4 class="parameters">Parameters</h4> | |
2076 | <dl> | |
2077 | <dt>credentials</dt> | |
2078 | <dd class="description">Array of credentials</dd> | |
2079 | </dl> | |
5a738aea MS |
2080 | <h3 class="function"><a name="httpGet">httpGet</a></h3> |
2081 | <p class="description">Send a GET request to the server.</p> | |
2082 | <p class="code"> | |
2083 | int httpGet (<br> | |
2084 | <a href="#http_t">http_t</a> *http,<br> | |
2085 | const char *uri<br> | |
2086 | );</p> | |
2087 | <h4 class="parameters">Parameters</h4> | |
2088 | <dl> | |
2089 | <dt>http</dt> | |
ca6b43fc | 2090 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2091 | <dt>uri</dt> |
2092 | <dd class="description">URI to get</dd> | |
2093 | </dl> | |
2094 | <h4 class="returnvalue">Return Value</h4> | |
2095 | <p class="description">Status of call (0 = success)</p> | |
ca6b43fc MS |
2096 | <h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpGetActivity">httpGetActivity</a></h3> |
2097 | <p class="description">Get the most recent activity for a connection.</p> | |
2098 | <p class="code"> | |
2099 | time_t httpGetActivity (<br> | |
2100 | <a href="#http_t">http_t</a> *http<br> | |
2101 | );</p> | |
2102 | <h4 class="parameters">Parameters</h4> | |
2103 | <dl> | |
2104 | <dt>http</dt> | |
2105 | <dd class="description">HTTP connection</dd> | |
2106 | </dl> | |
2107 | <h4 class="returnvalue">Return Value</h4> | |
2108 | <p class="description">Time of last read or write</p> | |
2109 | <h4 class="discussion">Discussion</h4> | |
2110 | <p class="discussion">The return value is the UNIX time of the last read or write. | |
2111 | ||
2112 | </p> | |
2113 | <h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpGetAddress">httpGetAddress</a></h3> | |
2114 | <p class="description">Get the address of the connected peer of a connection.</p> | |
2115 | <p class="code"> | |
2116 | <a href="#http_addr_t">http_addr_t</a> *httpGetAddress (<br> | |
2117 | <a href="#http_t">http_t</a> *http<br> | |
2118 | );</p> | |
2119 | <h4 class="parameters">Parameters</h4> | |
2120 | <dl> | |
2121 | <dt>http</dt> | |
2122 | <dd class="description">HTTP connection</dd> | |
2123 | </dl> | |
2124 | <h4 class="returnvalue">Return Value</h4> | |
2125 | <p class="description">Connected address or <code>NULL</code></p> | |
2126 | <h4 class="discussion">Discussion</h4> | |
2127 | <p class="discussion">Returns <code>NULL</code> if the socket is currently unconnected. | |
2128 | ||
2129 | </p> | |
f3c17241 | 2130 | <h3 class="function"><span class="info"> CUPS 1.3/OS X 10.5 </span><a name="httpGetAuthString">httpGetAuthString</a></h3> |
5a738aea MS |
2131 | <p class="description">Get the current authorization string.</p> |
2132 | <p class="code"> | |
2133 | char *httpGetAuthString (<br> | |
2134 | <a href="#http_t">http_t</a> *http<br> | |
2135 | );</p> | |
2136 | <h4 class="parameters">Parameters</h4> | |
2137 | <dl> | |
2138 | <dt>http</dt> | |
ca6b43fc | 2139 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2140 | </dl> |
2141 | <h4 class="returnvalue">Return Value</h4> | |
2142 | <p class="description">Authorization string</p> | |
2143 | <h4 class="discussion">Discussion</h4> | |
2144 | <p class="discussion">The authorization string is set by cupsDoAuthentication() and | |
355e94dc MS |
2145 | httpSetAuthString(). Use httpGetAuthString() to retrieve the |
2146 | string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION | |
2147 | value. | |
2148 | ||
5a738aea | 2149 | </p> |
f3c17241 | 2150 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="httpGetBlocking">httpGetBlocking</a></h3> |
5a738aea MS |
2151 | <p class="description">Get the blocking/non-block state of a connection.</p> |
2152 | <p class="code"> | |
2153 | int httpGetBlocking (<br> | |
2154 | <a href="#http_t">http_t</a> *http<br> | |
2155 | );</p> | |
2156 | <h4 class="parameters">Parameters</h4> | |
2157 | <dl> | |
2158 | <dt>http</dt> | |
ca6b43fc | 2159 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2160 | </dl> |
2161 | <h4 class="returnvalue">Return Value</h4> | |
2162 | <p class="description">1 if blocking, 0 if non-blocking</p> | |
9c0e8e5d | 2163 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="httpGetContentEncoding">httpGetContentEncoding</a></h3> |
a469f8a5 MS |
2164 | <p class="description">Get a common content encoding, if any, between |
2165 | the client and server.</p> | |
2166 | <p class="code"> | |
2167 | const char *httpGetContentEncoding (<br> | |
2168 | <a href="#http_t">http_t</a> *http<br> | |
2169 | );</p> | |
2170 | <h4 class="parameters">Parameters</h4> | |
2171 | <dl> | |
2172 | <dt>http</dt> | |
ca6b43fc | 2173 | <dd class="description">HTTP connection</dd> |
a469f8a5 MS |
2174 | </dl> |
2175 | <h4 class="returnvalue">Return Value</h4> | |
2176 | <p class="description">Content-Coding value or | |
2177 | <code>NULL</code> for the identity | |
2178 | coding.</p> | |
2179 | <h4 class="discussion">Discussion</h4> | |
2180 | <p class="discussion">This function uses the value of the Accepts-Encoding HTTP header and must be | |
2181 | called after receiving a response from the server or a request from the | |
2182 | client. The value returned can be use in subsequent requests (for clients) | |
2183 | or in the response (for servers) in order to compress the content stream. | |
2184 | ||
2185 | </p> | |
f3c17241 | 2186 | <h3 class="function"><span class="info"> CUPS 1.1.19/OS X 10.3 </span><a name="httpGetCookie">httpGetCookie</a></h3> |
5a738aea MS |
2187 | <p class="description">Get any cookie data from the response.</p> |
2188 | <p class="code"> | |
2189 | const char *httpGetCookie (<br> | |
2190 | <a href="#http_t">http_t</a> *http<br> | |
2191 | );</p> | |
2192 | <h4 class="parameters">Parameters</h4> | |
2193 | <dl> | |
2194 | <dt>http</dt> | |
2195 | <dd class="description">HTTP connecion</dd> | |
2196 | </dl> | |
2197 | <h4 class="returnvalue">Return Value</h4> | |
2198 | <p class="description">Cookie data or NULL</p> | |
2199 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpGetDateString">httpGetDateString</a></h3> | |
2200 | <p class="description">Get a formatted date/time string from a time value.</p> | |
2201 | <p class="code"> | |
2202 | const char *httpGetDateString (<br> | |
2203 | time_t t<br> | |
2204 | );</p> | |
2205 | <h4 class="parameters">Parameters</h4> | |
2206 | <dl> | |
2207 | <dt>t</dt> | |
2208 | <dd class="description">UNIX time</dd> | |
2209 | </dl> | |
2210 | <h4 class="returnvalue">Return Value</h4> | |
2211 | <p class="description">Date/time string</p> | |
f3c17241 | 2212 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="httpGetDateString2">httpGetDateString2</a></h3> |
5a738aea MS |
2213 | <p class="description">Get a formatted date/time string from a time value.</p> |
2214 | <p class="code"> | |
2215 | const char *httpGetDateString2 (<br> | |
2216 | time_t t,<br> | |
2217 | char *s,<br> | |
2218 | int slen<br> | |
2219 | );</p> | |
2220 | <h4 class="parameters">Parameters</h4> | |
2221 | <dl> | |
2222 | <dt>t</dt> | |
2223 | <dd class="description">UNIX time</dd> | |
2224 | <dt>s</dt> | |
2225 | <dd class="description">String buffer</dd> | |
2226 | <dt>slen</dt> | |
2227 | <dd class="description">Size of string buffer</dd> | |
2228 | </dl> | |
2229 | <h4 class="returnvalue">Return Value</h4> | |
2230 | <p class="description">Date/time string</p> | |
2231 | <h3 class="function"><a name="httpGetDateTime">httpGetDateTime</a></h3> | |
2232 | <p class="description">Get a time value from a formatted date/time string.</p> | |
2233 | <p class="code"> | |
2234 | time_t httpGetDateTime (<br> | |
2235 | const char *s<br> | |
2236 | );</p> | |
2237 | <h4 class="parameters">Parameters</h4> | |
2238 | <dl> | |
2239 | <dt>s</dt> | |
2240 | <dd class="description">Date/time string</dd> | |
2241 | </dl> | |
2242 | <h4 class="returnvalue">Return Value</h4> | |
2243 | <p class="description">UNIX time</p> | |
ca6b43fc MS |
2244 | <h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpGetEncryption">httpGetEncryption</a></h3> |
2245 | <p class="description">Get the current encryption mode of a connection.</p> | |
2246 | <p class="code"> | |
2247 | <a href="#http_encryption_t">http_encryption_t</a> httpGetEncryption (<br> | |
2248 | <a href="#http_t">http_t</a> *http<br> | |
2249 | );</p> | |
2250 | <h4 class="parameters">Parameters</h4> | |
2251 | <dl> | |
2252 | <dt>http</dt> | |
2253 | <dd class="description">HTTP connection</dd> | |
2254 | </dl> | |
2255 | <h4 class="returnvalue">Return Value</h4> | |
2256 | <p class="description">Current encryption mode</p> | |
2257 | <h4 class="discussion">Discussion</h4> | |
2258 | <p class="discussion">This function returns the encryption mode for the connection. Use the | |
2259 | <a href="#httpIsEncrypted"><code>httpIsEncrypted</code></a> function to determine whether a TLS session has | |
2260 | been established. | |
2261 | ||
2262 | </p> | |
9c0e8e5d | 2263 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="httpGetExpect">httpGetExpect</a></h3> |
a469f8a5 MS |
2264 | <p class="description">Get the value of the Expect header, if any.</p> |
2265 | <p class="code"> | |
2266 | http_status_t httpGetExpect (<br> | |
2267 | <a href="#http_t">http_t</a> *http<br> | |
2268 | );</p> | |
2269 | <h4 class="parameters">Parameters</h4> | |
2270 | <dl> | |
2271 | <dt>http</dt> | |
ca6b43fc | 2272 | <dd class="description">HTTP connection</dd> |
a469f8a5 MS |
2273 | </dl> |
2274 | <h4 class="returnvalue">Return Value</h4> | |
2275 | <p class="description">Expect: status, if any</p> | |
2276 | <h4 class="discussion">Discussion</h4> | |
2277 | <p class="discussion">Returns <code>HTTP_STATUS_NONE</code> if there is no Expect header, otherwise | |
2278 | returns the expected HTTP status code, typically <code>HTTP_STATUS_CONTINUE</code>. | |
2279 | ||
2280 | </p> | |
f3c17241 | 2281 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="httpGetFd">httpGetFd</a></h3> |
5a738aea MS |
2282 | <p class="description">Get the file descriptor associated with a connection.</p> |
2283 | <p class="code"> | |
2284 | int httpGetFd (<br> | |
2285 | <a href="#http_t">http_t</a> *http<br> | |
2286 | );</p> | |
2287 | <h4 class="parameters">Parameters</h4> | |
2288 | <dl> | |
2289 | <dt>http</dt> | |
ca6b43fc | 2290 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2291 | </dl> |
2292 | <h4 class="returnvalue">Return Value</h4> | |
2293 | <p class="description">File descriptor or -1 if none</p> | |
2294 | <h3 class="function"><a name="httpGetField">httpGetField</a></h3> | |
2295 | <p class="description">Get a field value from a request/response.</p> | |
2296 | <p class="code"> | |
2297 | const char *httpGetField (<br> | |
2298 | <a href="#http_t">http_t</a> *http,<br> | |
79e1d494 | 2299 | <a href="#http_field_t">http_field_t</a> field<br> |
5a738aea MS |
2300 | );</p> |
2301 | <h4 class="parameters">Parameters</h4> | |
2302 | <dl> | |
2303 | <dt>http</dt> | |
ca6b43fc | 2304 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2305 | <dt>field</dt> |
2306 | <dd class="description">Field to get</dd> | |
2307 | </dl> | |
2308 | <h4 class="returnvalue">Return Value</h4> | |
2309 | <p class="description">Field value</p> | |
2310 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpGetHostByName">httpGetHostByName</a></h3> | |
2311 | <p class="description">Lookup a hostname or IPv4 address, and return | |
2312 | address records for the specified name.</p> | |
2313 | <p class="code"> | |
2314 | struct hostent *httpGetHostByName (<br> | |
2315 | const char *name<br> | |
2316 | );</p> | |
2317 | <h4 class="parameters">Parameters</h4> | |
2318 | <dl> | |
2319 | <dt>name</dt> | |
2320 | <dd class="description">Hostname or IP address</dd> | |
2321 | </dl> | |
2322 | <h4 class="returnvalue">Return Value</h4> | |
2323 | <p class="description">Host entry</p> | |
f3c17241 | 2324 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="httpGetHostname">httpGetHostname</a></h3> |
5a738aea MS |
2325 | <p class="description">Get the FQDN for the connection or local system.</p> |
2326 | <p class="code"> | |
2327 | const char *httpGetHostname (<br> | |
2328 | <a href="#http_t">http_t</a> *http,<br> | |
2329 | char *s,<br> | |
2330 | int slen<br> | |
2331 | );</p> | |
2332 | <h4 class="parameters">Parameters</h4> | |
2333 | <dl> | |
2334 | <dt>http</dt> | |
2335 | <dd class="description">HTTP connection or NULL</dd> | |
2336 | <dt>s</dt> | |
2337 | <dd class="description">String buffer for name</dd> | |
2338 | <dt>slen</dt> | |
2339 | <dd class="description">Size of buffer</dd> | |
2340 | </dl> | |
2341 | <h4 class="returnvalue">Return Value</h4> | |
2342 | <p class="description">FQDN for connection or system</p> | |
2343 | <h4 class="discussion">Discussion</h4> | |
2344 | <p class="discussion">When "http" points to a connected socket, return the hostname or | |
ca6b43fc MS |
2345 | address that was used in the call to httpConnect() or httpConnectEncrypt(), |
2346 | or the address of the client for the connection from httpAcceptConnection(). | |
80ca4592 | 2347 | Otherwise, return the FQDN for the local system using both gethostname() |
2348 | and gethostbyname() to get the local hostname with domain. | |
ef416fc2 | 2349 | |
5a738aea | 2350 | </p> |
ca6b43fc MS |
2351 | <h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpGetKeepAlive">httpGetKeepAlive</a></h3> |
2352 | <p class="description">Get the current Keep-Alive state of the connection.</p> | |
2353 | <p class="code"> | |
2354 | <a href="#http_keepalive_t">http_keepalive_t</a> httpGetKeepAlive (<br> | |
2355 | <a href="#http_t">http_t</a> *http<br> | |
2356 | );</p> | |
2357 | <h4 class="parameters">Parameters</h4> | |
2358 | <dl> | |
2359 | <dt>http</dt> | |
2360 | <dd class="description">HTTP connection</dd> | |
2361 | </dl> | |
2362 | <h4 class="returnvalue">Return Value</h4> | |
2363 | <p class="description">Keep-Alive state</p> | |
5a738aea MS |
2364 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpGetLength">httpGetLength</a></h3> |
2365 | <p class="description">Get the amount of data remaining from the | |
2366 | content-length or transfer-encoding fields.</p> | |
2367 | <p class="code"> | |
2368 | int httpGetLength (<br> | |
2369 | <a href="#http_t">http_t</a> *http<br> | |
2370 | );</p> | |
2371 | <h4 class="parameters">Parameters</h4> | |
2372 | <dl> | |
2373 | <dt>http</dt> | |
ca6b43fc | 2374 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2375 | </dl> |
2376 | <h4 class="returnvalue">Return Value</h4> | |
2377 | <p class="description">Content length</p> | |
2378 | <h4 class="discussion">Discussion</h4> | |
2379 | <p class="discussion">This function is deprecated and will not return lengths larger than | |
ef416fc2 | 2380 | 2^31 - 1; use httpGetLength2() instead. |
2381 | ||
5a738aea | 2382 | </p> |
f3c17241 | 2383 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="httpGetLength2">httpGetLength2</a></h3> |
5a738aea MS |
2384 | <p class="description">Get the amount of data remaining from the |
2385 | content-length or transfer-encoding fields.</p> | |
2386 | <p class="code"> | |
2387 | off_t httpGetLength2 (<br> | |
2388 | <a href="#http_t">http_t</a> *http<br> | |
2389 | );</p> | |
2390 | <h4 class="parameters">Parameters</h4> | |
2391 | <dl> | |
2392 | <dt>http</dt> | |
ca6b43fc | 2393 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2394 | </dl> |
2395 | <h4 class="returnvalue">Return Value</h4> | |
2396 | <p class="description">Content length</p> | |
2397 | <h4 class="discussion">Discussion</h4> | |
2398 | <p class="discussion">This function returns the complete content length, even for | |
ecdc0628 | 2399 | content larger than 2^31 - 1. |
2400 | ||
ca6b43fc MS |
2401 | </p> |
2402 | <h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpGetPending">httpGetPending</a></h3> | |
2403 | <p class="description">Get the number of bytes that are buffered for writing.</p> | |
2404 | <p class="code"> | |
2405 | size_t httpGetPending (<br> | |
2406 | <a href="#http_t">http_t</a> *http<br> | |
2407 | );</p> | |
2408 | <h4 class="parameters">Parameters</h4> | |
2409 | <dl> | |
2410 | <dt>http</dt> | |
2411 | <dd class="description">HTTP connection</dd> | |
2412 | </dl> | |
2413 | <h4 class="returnvalue">Return Value</h4> | |
2414 | <p class="description">Number of bytes buffered</p> | |
2415 | <h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpGetReady">httpGetReady</a></h3> | |
2416 | <p class="description">Get the number of bytes that can be read without blocking.</p> | |
2417 | <p class="code"> | |
2418 | size_t httpGetReady (<br> | |
2419 | <a href="#http_t">http_t</a> *http<br> | |
2420 | );</p> | |
2421 | <h4 class="parameters">Parameters</h4> | |
2422 | <dl> | |
2423 | <dt>http</dt> | |
2424 | <dd class="description">HTTP connection</dd> | |
2425 | </dl> | |
2426 | <h4 class="returnvalue">Return Value</h4> | |
2427 | <p class="description">Number of bytes available</p> | |
2428 | <h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpGetRemaining">httpGetRemaining</a></h3> | |
2429 | <p class="description">Get the number of remaining bytes in the message | |
2430 | body or current chunk.</p> | |
2431 | <p class="code"> | |
2432 | size_t httpGetRemaining (<br> | |
2433 | <a href="#http_t">http_t</a> *http<br> | |
2434 | );</p> | |
2435 | <h4 class="parameters">Parameters</h4> | |
2436 | <dl> | |
2437 | <dt>http</dt> | |
2438 | <dd class="description">HTTP connection</dd> | |
2439 | </dl> | |
2440 | <h4 class="returnvalue">Return Value</h4> | |
2441 | <p class="description">Remaining bytes</p> | |
2442 | <h4 class="discussion">Discussion</h4> | |
2443 | <p class="discussion">The <a href="#httpIsChunked"><code>httpIsChunked</code></a> function can be used to determine whether the | |
2444 | message body is chunked or fixed-length. | |
2445 | ||
5a738aea | 2446 | </p> |
a2326b5b MS |
2447 | <h3 class="function"><a name="httpGetState">httpGetState</a></h3> |
2448 | <p class="description">Get the current state of the HTTP request.</p> | |
2449 | <p class="code"> | |
2450 | <a href="#http_state_t">http_state_t</a> httpGetState (<br> | |
2451 | <a href="#http_t">http_t</a> *http<br> | |
2452 | );</p> | |
2453 | <h4 class="parameters">Parameters</h4> | |
2454 | <dl> | |
2455 | <dt>http</dt> | |
ca6b43fc | 2456 | <dd class="description">HTTP connection</dd> |
a2326b5b MS |
2457 | </dl> |
2458 | <h4 class="returnvalue">Return Value</h4> | |
2459 | <p class="description">HTTP state</p> | |
f3c17241 | 2460 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="httpGetStatus">httpGetStatus</a></h3> |
5a738aea MS |
2461 | <p class="description">Get the status of the last HTTP request.</p> |
2462 | <p class="code"> | |
a469f8a5 | 2463 | http_status_t httpGetStatus (<br> |
5a738aea MS |
2464 | <a href="#http_t">http_t</a> *http<br> |
2465 | );</p> | |
2466 | <h4 class="parameters">Parameters</h4> | |
2467 | <dl> | |
2468 | <dt>http</dt> | |
ca6b43fc | 2469 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2470 | </dl> |
2471 | <h4 class="returnvalue">Return Value</h4> | |
2472 | <p class="description">HTTP status</p> | |
2473 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpGetSubField">httpGetSubField</a></h3> | |
2474 | <p class="description">Get a sub-field value.</p> | |
2475 | <p class="code"> | |
2476 | char *httpGetSubField (<br> | |
2477 | <a href="#http_t">http_t</a> *http,<br> | |
79e1d494 | 2478 | <a href="#http_field_t">http_field_t</a> field,<br> |
5a738aea MS |
2479 | const char *name,<br> |
2480 | char *value<br> | |
2481 | );</p> | |
2482 | <h4 class="parameters">Parameters</h4> | |
2483 | <dl> | |
2484 | <dt>http</dt> | |
ca6b43fc | 2485 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2486 | <dt>field</dt> |
2487 | <dd class="description">Field index</dd> | |
2488 | <dt>name</dt> | |
2489 | <dd class="description">Name of sub-field</dd> | |
2490 | <dt>value</dt> | |
2491 | <dd class="description">Value string</dd> | |
2492 | </dl> | |
2493 | <h4 class="returnvalue">Return Value</h4> | |
2494 | <p class="description">Value or NULL</p> | |
f3c17241 | 2495 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="httpGetSubField2">httpGetSubField2</a></h3> |
5a738aea MS |
2496 | <p class="description">Get a sub-field value.</p> |
2497 | <p class="code"> | |
2498 | char *httpGetSubField2 (<br> | |
2499 | <a href="#http_t">http_t</a> *http,<br> | |
79e1d494 | 2500 | <a href="#http_field_t">http_field_t</a> field,<br> |
5a738aea MS |
2501 | const char *name,<br> |
2502 | char *value,<br> | |
2503 | int valuelen<br> | |
2504 | );</p> | |
2505 | <h4 class="parameters">Parameters</h4> | |
2506 | <dl> | |
2507 | <dt>http</dt> | |
ca6b43fc | 2508 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2509 | <dt>field</dt> |
2510 | <dd class="description">Field index</dd> | |
2511 | <dt>name</dt> | |
2512 | <dd class="description">Name of sub-field</dd> | |
2513 | <dt>value</dt> | |
2514 | <dd class="description">Value string</dd> | |
2515 | <dt>valuelen</dt> | |
2516 | <dd class="description">Size of value buffer</dd> | |
2517 | </dl> | |
2518 | <h4 class="returnvalue">Return Value</h4> | |
2519 | <p class="description">Value or NULL</p> | |
a2326b5b MS |
2520 | <h3 class="function"><a name="httpGetVersion">httpGetVersion</a></h3> |
2521 | <p class="description">Get the HTTP version at the other end.</p> | |
2522 | <p class="code"> | |
2523 | <a href="#http_version_t">http_version_t</a> httpGetVersion (<br> | |
2524 | <a href="#http_t">http_t</a> *http<br> | |
2525 | );</p> | |
2526 | <h4 class="parameters">Parameters</h4> | |
2527 | <dl> | |
2528 | <dt>http</dt> | |
ca6b43fc | 2529 | <dd class="description">HTTP connection</dd> |
a2326b5b MS |
2530 | </dl> |
2531 | <h4 class="returnvalue">Return Value</h4> | |
2532 | <p class="description">Version number</p> | |
5a738aea MS |
2533 | <h3 class="function"><a name="httpGets">httpGets</a></h3> |
2534 | <p class="description">Get a line of text from a HTTP connection.</p> | |
2535 | <p class="code"> | |
2536 | char *httpGets (<br> | |
2537 | char *line,<br> | |
2538 | int length,<br> | |
2539 | <a href="#http_t">http_t</a> *http<br> | |
2540 | );</p> | |
2541 | <h4 class="parameters">Parameters</h4> | |
2542 | <dl> | |
2543 | <dt>line</dt> | |
2544 | <dd class="description">Line to read into</dd> | |
2545 | <dt>length</dt> | |
2546 | <dd class="description">Max length of buffer</dd> | |
2547 | <dt>http</dt> | |
ca6b43fc | 2548 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2549 | </dl> |
2550 | <h4 class="returnvalue">Return Value</h4> | |
2551 | <p class="description">Line or NULL</p> | |
2552 | <h3 class="function"><a name="httpHead">httpHead</a></h3> | |
2553 | <p class="description">Send a HEAD request to the server.</p> | |
2554 | <p class="code"> | |
2555 | int httpHead (<br> | |
2556 | <a href="#http_t">http_t</a> *http,<br> | |
2557 | const char *uri<br> | |
2558 | );</p> | |
2559 | <h4 class="parameters">Parameters</h4> | |
2560 | <dl> | |
2561 | <dt>http</dt> | |
ca6b43fc | 2562 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2563 | <dt>uri</dt> |
2564 | <dd class="description">URI for head</dd> | |
2565 | </dl> | |
2566 | <h4 class="returnvalue">Return Value</h4> | |
2567 | <p class="description">Status of call (0 = success)</p> | |
2568 | <h3 class="function"><a name="httpInitialize">httpInitialize</a></h3> | |
2569 | <p class="description">Initialize the HTTP interface library and set the | |
2570 | default HTTP proxy (if any).</p> | |
2571 | <p class="code"> | |
2572 | void httpInitialize (void);</p> | |
ca6b43fc MS |
2573 | <h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpIsChunked">httpIsChunked</a></h3> |
2574 | <p class="description">Report whether a message body is chunked.</p> | |
2575 | <p class="code"> | |
2576 | int httpIsChunked (<br> | |
2577 | <a href="#http_t">http_t</a> *http<br> | |
2578 | );</p> | |
2579 | <h4 class="parameters">Parameters</h4> | |
2580 | <dl> | |
2581 | <dt>http</dt> | |
2582 | <dd class="description">HTTP connection</dd> | |
2583 | </dl> | |
2584 | <h4 class="returnvalue">Return Value</h4> | |
2585 | <p class="description">1 if chunked, 0 if not</p> | |
2586 | <h4 class="discussion">Discussion</h4> | |
2587 | <p class="discussion">This function returns non-zero if the message body is composed of | |
2588 | variable-length chunks. | |
2589 | ||
2590 | </p> | |
2591 | <h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpIsEncrypted">httpIsEncrypted</a></h3> | |
2592 | <p class="description">Report whether a connection is encrypted.</p> | |
2593 | <p class="code"> | |
2594 | int httpIsEncrypted (<br> | |
2595 | <a href="#http_t">http_t</a> *http<br> | |
2596 | );</p> | |
2597 | <h4 class="parameters">Parameters</h4> | |
2598 | <dl> | |
2599 | <dt>http</dt> | |
2600 | <dd class="description">HTTP connection</dd> | |
2601 | </dl> | |
2602 | <h4 class="returnvalue">Return Value</h4> | |
2603 | <p class="description">1 if encrypted, 0 if not</p> | |
2604 | <h4 class="discussion">Discussion</h4> | |
2605 | <p class="discussion">This function returns non-zero if the connection is currently encrypted. | |
2606 | ||
2607 | </p> | |
5a738aea MS |
2608 | <h3 class="function"><a name="httpMD5">httpMD5</a></h3> |
2609 | <p class="description">Compute the MD5 sum of the username:group:password.</p> | |
2610 | <p class="code"> | |
2611 | char *httpMD5 (<br> | |
2612 | const char *username,<br> | |
2613 | const char *realm,<br> | |
2614 | const char *passwd,<br> | |
2615 | char md5[33]<br> | |
2616 | );</p> | |
2617 | <h4 class="parameters">Parameters</h4> | |
2618 | <dl> | |
2619 | <dt>username</dt> | |
2620 | <dd class="description">User name</dd> | |
2621 | <dt>realm</dt> | |
2622 | <dd class="description">Realm name</dd> | |
2623 | <dt>passwd</dt> | |
2624 | <dd class="description">Password string</dd> | |
2625 | <dt>md5[33]</dt> | |
2626 | <dd class="description">MD5 string</dd> | |
2627 | </dl> | |
2628 | <h4 class="returnvalue">Return Value</h4> | |
2629 | <p class="description">MD5 sum</p> | |
2630 | <h3 class="function"><a name="httpMD5Final">httpMD5Final</a></h3> | |
2631 | <p class="description">Combine the MD5 sum of the username, group, and password | |
ef416fc2 | 2632 | with the server-supplied nonce value, method, and |
5a738aea MS |
2633 | request-uri.</p> |
2634 | <p class="code"> | |
2635 | char *httpMD5Final (<br> | |
2636 | const char *nonce,<br> | |
2637 | const char *method,<br> | |
2638 | const char *resource,<br> | |
2639 | char md5[33]<br> | |
2640 | );</p> | |
2641 | <h4 class="parameters">Parameters</h4> | |
2642 | <dl> | |
2643 | <dt>nonce</dt> | |
2644 | <dd class="description">Server nonce value</dd> | |
2645 | <dt>method</dt> | |
2646 | <dd class="description">METHOD (GET, POST, etc.)</dd> | |
2647 | <dt>resource</dt> | |
2648 | <dd class="description">Resource path</dd> | |
2649 | <dt>md5[33]</dt> | |
2650 | <dd class="description">MD5 sum</dd> | |
2651 | </dl> | |
2652 | <h4 class="returnvalue">Return Value</h4> | |
2653 | <p class="description">New sum</p> | |
2654 | <h3 class="function"><a name="httpMD5String">httpMD5String</a></h3> | |
2655 | <p class="description">Convert an MD5 sum to a character string.</p> | |
2656 | <p class="code"> | |
2657 | char *httpMD5String (<br> | |
2658 | const unsigned char *sum,<br> | |
2659 | char md5[33]<br> | |
2660 | );</p> | |
2661 | <h4 class="parameters">Parameters</h4> | |
2662 | <dl> | |
2663 | <dt>sum</dt> | |
2664 | <dd class="description">MD5 sum data</dd> | |
2665 | <dt>md5[33]</dt> | |
2666 | <dd class="description">MD5 sum in hex</dd> | |
2667 | </dl> | |
2668 | <h4 class="returnvalue">Return Value</h4> | |
2669 | <p class="description">MD5 sum in hex</p> | |
2670 | <h3 class="function"><a name="httpOptions">httpOptions</a></h3> | |
2671 | <p class="description">Send an OPTIONS request to the server.</p> | |
2672 | <p class="code"> | |
2673 | int httpOptions (<br> | |
2674 | <a href="#http_t">http_t</a> *http,<br> | |
2675 | const char *uri<br> | |
2676 | );</p> | |
2677 | <h4 class="parameters">Parameters</h4> | |
2678 | <dl> | |
2679 | <dt>http</dt> | |
ca6b43fc | 2680 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2681 | <dt>uri</dt> |
2682 | <dd class="description">URI for options</dd> | |
2683 | </dl> | |
2684 | <h4 class="returnvalue">Return Value</h4> | |
2685 | <p class="description">Status of call (0 = success)</p> | |
9c0e8e5d | 2686 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="httpPeek">httpPeek</a></h3> |
a469f8a5 MS |
2687 | <p class="description">Peek at data from a HTTP connection.</p> |
2688 | <p class="code"> | |
2689 | ssize_t httpPeek (<br> | |
2690 | <a href="#http_t">http_t</a> *http,<br> | |
2691 | char *buffer,<br> | |
2692 | size_t length<br> | |
2693 | );</p> | |
2694 | <h4 class="parameters">Parameters</h4> | |
2695 | <dl> | |
2696 | <dt>http</dt> | |
ca6b43fc | 2697 | <dd class="description">HTTP connection</dd> |
a469f8a5 MS |
2698 | <dt>buffer</dt> |
2699 | <dd class="description">Buffer for data</dd> | |
2700 | <dt>length</dt> | |
2701 | <dd class="description">Maximum number of bytes</dd> | |
2702 | </dl> | |
2703 | <h4 class="returnvalue">Return Value</h4> | |
2704 | <p class="description">Number of bytes copied</p> | |
2705 | <h4 class="discussion">Discussion</h4> | |
2706 | <p class="discussion">This function copies available data from the given HTTP connection, reading | |
2707 | a buffer as needed. The data is still available for reading using | |
2708 | <a href="#httpRead"><code>httpRead</code></a> or <a href="#httpRead2"><code>httpRead2</code></a>.<br> | |
2709 | <br> | |
2710 | For non-blocking connections the usual timeouts apply. | |
2711 | ||
2712 | </p> | |
5a738aea MS |
2713 | <h3 class="function"><a name="httpPost">httpPost</a></h3> |
2714 | <p class="description">Send a POST request to the server.</p> | |
2715 | <p class="code"> | |
2716 | int httpPost (<br> | |
2717 | <a href="#http_t">http_t</a> *http,<br> | |
2718 | const char *uri<br> | |
2719 | );</p> | |
2720 | <h4 class="parameters">Parameters</h4> | |
2721 | <dl> | |
2722 | <dt>http</dt> | |
ca6b43fc | 2723 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2724 | <dt>uri</dt> |
2725 | <dd class="description">URI for post</dd> | |
2726 | </dl> | |
2727 | <h4 class="returnvalue">Return Value</h4> | |
2728 | <p class="description">Status of call (0 = success)</p> | |
2729 | <h3 class="function"><a name="httpPut">httpPut</a></h3> | |
2730 | <p class="description">Send a PUT request to the server.</p> | |
2731 | <p class="code"> | |
2732 | int httpPut (<br> | |
2733 | <a href="#http_t">http_t</a> *http,<br> | |
2734 | const char *uri<br> | |
2735 | );</p> | |
2736 | <h4 class="parameters">Parameters</h4> | |
2737 | <dl> | |
2738 | <dt>http</dt> | |
ca6b43fc | 2739 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2740 | <dt>uri</dt> |
2741 | <dd class="description">URI to put</dd> | |
2742 | </dl> | |
2743 | <h4 class="returnvalue">Return Value</h4> | |
2744 | <p class="description">Status of call (0 = success)</p> | |
2745 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpRead">httpRead</a></h3> | |
2746 | <p class="description">Read data from a HTTP connection.</p> | |
2747 | <p class="code"> | |
2748 | int httpRead (<br> | |
2749 | <a href="#http_t">http_t</a> *http,<br> | |
2750 | char *buffer,<br> | |
2751 | int length<br> | |
2752 | );</p> | |
2753 | <h4 class="parameters">Parameters</h4> | |
2754 | <dl> | |
2755 | <dt>http</dt> | |
ca6b43fc | 2756 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2757 | <dt>buffer</dt> |
2758 | <dd class="description">Buffer for data</dd> | |
2759 | <dt>length</dt> | |
2760 | <dd class="description">Maximum number of bytes</dd> | |
2761 | </dl> | |
2762 | <h4 class="returnvalue">Return Value</h4> | |
2763 | <p class="description">Number of bytes read</p> | |
2764 | <h4 class="discussion">Discussion</h4> | |
2765 | <p class="discussion">This function is deprecated. Use the httpRead2() function which can | |
ecdc0628 | 2766 | read more than 2GB of data. |
2767 | ||
5a738aea | 2768 | </p> |
f3c17241 | 2769 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="httpRead2">httpRead2</a></h3> |
5a738aea MS |
2770 | <p class="description">Read data from a HTTP connection.</p> |
2771 | <p class="code"> | |
2772 | ssize_t httpRead2 (<br> | |
2773 | <a href="#http_t">http_t</a> *http,<br> | |
2774 | char *buffer,<br> | |
2775 | size_t length<br> | |
2776 | );</p> | |
2777 | <h4 class="parameters">Parameters</h4> | |
2778 | <dl> | |
2779 | <dt>http</dt> | |
ca6b43fc | 2780 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2781 | <dt>buffer</dt> |
2782 | <dd class="description">Buffer for data</dd> | |
2783 | <dt>length</dt> | |
2784 | <dd class="description">Maximum number of bytes</dd> | |
2785 | </dl> | |
2786 | <h4 class="returnvalue">Return Value</h4> | |
2787 | <p class="description">Number of bytes read</p> | |
9c0e8e5d | 2788 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="httpReadRequest">httpReadRequest</a></h3> |
a469f8a5 MS |
2789 | <p class="description">Read a HTTP request from a connection.</p> |
2790 | <p class="code"> | |
2791 | <a href="#http_state_t">http_state_t</a> httpReadRequest (<br> | |
2792 | <a href="#http_t">http_t</a> *http,<br> | |
2793 | char *uri,<br> | |
2794 | size_t urilen<br> | |
2795 | );</p> | |
2796 | <h4 class="parameters">Parameters</h4> | |
2797 | <dl> | |
2798 | <dt>http</dt> | |
2799 | <dd class="description">HTTP connection</dd> | |
2800 | <dt>uri</dt> | |
2801 | <dd class="description">URI buffer</dd> | |
2802 | <dt>urilen</dt> | |
2803 | <dd class="description">Size of URI buffer</dd> | |
2804 | </dl> | |
2805 | <h4 class="returnvalue">Return Value</h4> | |
2806 | <p class="description">New state of connection</p> | |
2807 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpReconnect">httpReconnect</a></h3> | |
5a738aea MS |
2808 | <p class="description">Reconnect to a HTTP server.</p> |
2809 | <p class="code"> | |
2810 | int httpReconnect (<br> | |
2811 | <a href="#http_t">http_t</a> *http<br> | |
2812 | );</p> | |
2813 | <h4 class="parameters">Parameters</h4> | |
2814 | <dl> | |
2815 | <dt>http</dt> | |
ca6b43fc | 2816 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2817 | </dl> |
2818 | <h4 class="returnvalue">Return Value</h4> | |
2819 | <p class="description">0 on success, non-zero on failure</p> | |
a469f8a5 MS |
2820 | <h4 class="discussion">Discussion</h4> |
2821 | <p class="discussion">This function is deprecated. Please use the <a href="#httpReconnect2"><code>httpReconnect2</code></a> function | |
2822 | instead. | |
2823 | ||
2824 | </p> | |
3e7fe0ca MS |
2825 | <h3 class="function"><a name="httpReconnect2">httpReconnect2</a></h3> |
2826 | <p class="description">Reconnect to a HTTP server with timeout and optional | |
2827 | cancel.</p> | |
2828 | <p class="code"> | |
2829 | int httpReconnect2 (<br> | |
2830 | <a href="#http_t">http_t</a> *http,<br> | |
2831 | int msec,<br> | |
2832 | int *cancel<br> | |
2833 | );</p> | |
2834 | <h4 class="parameters">Parameters</h4> | |
2835 | <dl> | |
2836 | <dt>http</dt> | |
ca6b43fc | 2837 | <dd class="description">HTTP connection</dd> |
3e7fe0ca MS |
2838 | <dt>msec</dt> |
2839 | <dd class="description">Timeout in milliseconds</dd> | |
2840 | <dt>cancel</dt> | |
2841 | <dd class="description">Pointer to "cancel" variable</dd> | |
2842 | </dl> | |
2843 | <h4 class="returnvalue">Return Value</h4> | |
2844 | <p class="description">0 on success, non-zero on failure</p> | |
ca6b43fc MS |
2845 | <h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpResolveHostname">httpResolveHostname</a></h3> |
2846 | <p class="description">Resolve the hostname of the HTTP connection | |
2847 | address.</p> | |
2848 | <p class="code"> | |
2849 | const char *httpResolveHostname (<br> | |
2850 | <a href="#http_t">http_t</a> *http,<br> | |
2851 | char *buffer,<br> | |
2852 | size_t bufsize<br> | |
2853 | );</p> | |
2854 | <h4 class="parameters">Parameters</h4> | |
2855 | <dl> | |
2856 | <dt>http</dt> | |
2857 | <dd class="description">HTTP connection</dd> | |
2858 | <dt>buffer</dt> | |
2859 | <dd class="description">Hostname buffer</dd> | |
2860 | <dt>bufsize</dt> | |
2861 | <dd class="description">Size of buffer</dd> | |
2862 | </dl> | |
2863 | <h4 class="returnvalue">Return Value</h4> | |
2864 | <p class="description">Resolved hostname or <code>NULL</code></p> | |
5a738aea MS |
2865 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpSeparate">httpSeparate</a></h3> |
2866 | <p class="description">Separate a Universal Resource Identifier into its | |
2867 | components.</p> | |
2868 | <p class="code"> | |
2869 | void httpSeparate (<br> | |
2870 | const char *uri,<br> | |
2871 | char *scheme,<br> | |
2872 | char *username,<br> | |
2873 | char *host,<br> | |
2874 | int *port,<br> | |
2875 | char *resource<br> | |
2876 | );</p> | |
2877 | <h4 class="parameters">Parameters</h4> | |
2878 | <dl> | |
2879 | <dt>uri</dt> | |
2880 | <dd class="description">Universal Resource Identifier</dd> | |
2881 | <dt>scheme</dt> | |
2882 | <dd class="description">Scheme [32] (http, https, etc.)</dd> | |
2883 | <dt>username</dt> | |
2884 | <dd class="description">Username [1024]</dd> | |
2885 | <dt>host</dt> | |
2886 | <dd class="description">Hostname [1024]</dd> | |
2887 | <dt>port</dt> | |
2888 | <dd class="description">Port number to use</dd> | |
2889 | <dt>resource</dt> | |
2890 | <dd class="description">Resource/filename [1024]</dd> | |
2891 | </dl> | |
2892 | <h4 class="discussion">Discussion</h4> | |
2893 | <p class="discussion">This function is deprecated; use the httpSeparateURI() function instead. | |
2894 | ||
2895 | </p> | |
f3c17241 | 2896 | <h3 class="function"><span class="info"> CUPS 1.1.21/OS X 10.4 </span><a name="httpSeparate2">httpSeparate2</a></h3> |
5a738aea MS |
2897 | <p class="description">Separate a Universal Resource Identifier into its |
2898 | components.</p> | |
2899 | <p class="code"> | |
2900 | void httpSeparate2 (<br> | |
2901 | const char *uri,<br> | |
2902 | char *scheme,<br> | |
2903 | int schemelen,<br> | |
2904 | char *username,<br> | |
2905 | int usernamelen,<br> | |
2906 | char *host,<br> | |
2907 | int hostlen,<br> | |
2908 | int *port,<br> | |
2909 | char *resource,<br> | |
2910 | int resourcelen<br> | |
2911 | );</p> | |
2912 | <h4 class="parameters">Parameters</h4> | |
2913 | <dl> | |
2914 | <dt>uri</dt> | |
2915 | <dd class="description">Universal Resource Identifier</dd> | |
2916 | <dt>scheme</dt> | |
2917 | <dd class="description">Scheme (http, https, etc.)</dd> | |
2918 | <dt>schemelen</dt> | |
2919 | <dd class="description">Size of scheme buffer</dd> | |
2920 | <dt>username</dt> | |
2921 | <dd class="description">Username</dd> | |
2922 | <dt>usernamelen</dt> | |
2923 | <dd class="description">Size of username buffer</dd> | |
2924 | <dt>host</dt> | |
2925 | <dd class="description">Hostname</dd> | |
2926 | <dt>hostlen</dt> | |
2927 | <dd class="description">Size of hostname buffer</dd> | |
2928 | <dt>port</dt> | |
2929 | <dd class="description">Port number to use</dd> | |
2930 | <dt>resource</dt> | |
2931 | <dd class="description">Resource/filename</dd> | |
2932 | <dt>resourcelen</dt> | |
2933 | <dd class="description">Size of resource buffer</dd> | |
2934 | </dl> | |
2935 | <h4 class="discussion">Discussion</h4> | |
2936 | <p class="discussion">This function is deprecated; use the httpSeparateURI() function instead. | |
2937 | ||
2938 | ||
2939 | </p> | |
f3c17241 | 2940 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="httpSeparateURI">httpSeparateURI</a></h3> |
5a738aea MS |
2941 | <p class="description">Separate a Universal Resource Identifier into its |
2942 | components.</p> | |
2943 | <p class="code"> | |
79e1d494 MS |
2944 | <a href="#http_uri_status_t">http_uri_status_t</a> httpSeparateURI (<br> |
2945 | <a href="#http_uri_coding_t">http_uri_coding_t</a> decoding,<br> | |
5a738aea MS |
2946 | const char *uri,<br> |
2947 | char *scheme,<br> | |
2948 | int schemelen,<br> | |
2949 | char *username,<br> | |
2950 | int usernamelen,<br> | |
2951 | char *host,<br> | |
2952 | int hostlen,<br> | |
2953 | int *port,<br> | |
2954 | char *resource,<br> | |
2955 | int resourcelen<br> | |
2956 | );</p> | |
2957 | <h4 class="parameters">Parameters</h4> | |
2958 | <dl> | |
2959 | <dt>decoding</dt> | |
2960 | <dd class="description">Decoding flags</dd> | |
2961 | <dt>uri</dt> | |
2962 | <dd class="description">Universal Resource Identifier</dd> | |
2963 | <dt>scheme</dt> | |
2964 | <dd class="description">Scheme (http, https, etc.)</dd> | |
2965 | <dt>schemelen</dt> | |
2966 | <dd class="description">Size of scheme buffer</dd> | |
2967 | <dt>username</dt> | |
2968 | <dd class="description">Username</dd> | |
2969 | <dt>usernamelen</dt> | |
2970 | <dd class="description">Size of username buffer</dd> | |
2971 | <dt>host</dt> | |
2972 | <dd class="description">Hostname</dd> | |
2973 | <dt>hostlen</dt> | |
2974 | <dd class="description">Size of hostname buffer</dd> | |
2975 | <dt>port</dt> | |
2976 | <dd class="description">Port number to use</dd> | |
2977 | <dt>resource</dt> | |
2978 | <dd class="description">Resource/filename</dd> | |
2979 | <dt>resourcelen</dt> | |
2980 | <dd class="description">Size of resource buffer</dd> | |
2981 | </dl> | |
2982 | <h4 class="returnvalue">Return Value</h4> | |
2983 | <p class="description">Result of separation</p> | |
f3c17241 | 2984 | <h3 class="function"><span class="info"> CUPS 1.3/OS X 10.5 </span><a name="httpSetAuthString">httpSetAuthString</a></h3> |
5a738aea MS |
2985 | <p class="description">Set the current authorization string.</p> |
2986 | <p class="code"> | |
2987 | void httpSetAuthString (<br> | |
2988 | <a href="#http_t">http_t</a> *http,<br> | |
2989 | const char *scheme,<br> | |
2990 | const char *data<br> | |
2991 | );</p> | |
2992 | <h4 class="parameters">Parameters</h4> | |
2993 | <dl> | |
2994 | <dt>http</dt> | |
ca6b43fc | 2995 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
2996 | <dt>scheme</dt> |
2997 | <dd class="description">Auth scheme (NULL to clear it)</dd> | |
2998 | <dt>data</dt> | |
2999 | <dd class="description">Auth data (NULL for none)</dd> | |
3000 | </dl> | |
3001 | <h4 class="discussion">Discussion</h4> | |
3002 | <p class="discussion">This function just stores a copy of the current authorization string in | |
355e94dc MS |
3003 | the HTTP connection object. You must still call httpSetField() to set |
3004 | HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(), | |
3005 | httpHead(), httpOptions(), httpPost, or httpPut(). | |
3006 | ||
5a738aea | 3007 | </p> |
f3c17241 | 3008 | <h3 class="function"><span class="info"> CUPS 1.1.19/OS X 10.3 </span><a name="httpSetCookie">httpSetCookie</a></h3> |
10d09e33 | 3009 | <p class="description">Set the cookie value(s).</p> |
5a738aea MS |
3010 | <p class="code"> |
3011 | void httpSetCookie (<br> | |
3012 | <a href="#http_t">http_t</a> *http,<br> | |
3013 | const char *cookie<br> | |
3014 | );</p> | |
3015 | <h4 class="parameters">Parameters</h4> | |
3016 | <dl> | |
3017 | <dt>http</dt> | |
3018 | <dd class="description">Connection</dd> | |
3019 | <dt>cookie</dt> | |
3020 | <dd class="description">Cookie string</dd> | |
3021 | </dl> | |
f3c17241 | 3022 | <h3 class="function"><span class="info"> CUPS 1.5/OS X 10.7 </span><a name="httpSetCredentials">httpSetCredentials</a></h3> |
10d09e33 MS |
3023 | <p class="description">Set the credentials associated with an encrypted |
3024 | connection.</p> | |
3025 | <p class="code"> | |
3026 | int httpSetCredentials (<br> | |
3027 | <a href="#http_t">http_t</a> *http,<br> | |
3028 | cups_array_t *credentials<br> | |
3029 | );</p> | |
3030 | <h4 class="parameters">Parameters</h4> | |
3031 | <dl> | |
3032 | <dt>http</dt> | |
ca6b43fc | 3033 | <dd class="description">HTTP connection</dd> |
10d09e33 MS |
3034 | <dt>credentials</dt> |
3035 | <dd class="description">Array of credentials</dd> | |
3036 | </dl> | |
3037 | <h4 class="returnvalue">Return Value</h4> | |
3038 | <p class="description">Status of call (0 = success)</p> | |
9c0e8e5d | 3039 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="httpSetDefaultField">httpSetDefaultField</a></h3> |
db8b865d MS |
3040 | <p class="description">Set the default value of an HTTP header.</p> |
3041 | <p class="code"> | |
3042 | void httpSetDefaultField (<br> | |
3043 | <a href="#http_t">http_t</a> *http,<br> | |
3044 | <a href="#http_field_t">http_field_t</a> field,<br> | |
3045 | const char *value<br> | |
3046 | );</p> | |
3047 | <h4 class="parameters">Parameters</h4> | |
3048 | <dl> | |
3049 | <dt>http</dt> | |
ca6b43fc | 3050 | <dd class="description">HTTP connection</dd> |
db8b865d MS |
3051 | <dt>field</dt> |
3052 | <dd class="description">Field index</dd> | |
3053 | <dt>value</dt> | |
3054 | <dd class="description">Value</dd> | |
3055 | </dl> | |
3056 | <h4 class="discussion">Discussion</h4> | |
6961465f MS |
3057 | <p class="discussion">Currently only <code>HTTP_FIELD_ACCEPT_ENCODING</code>, <code>HTTP_FIELD_SERVER</code>, |
3058 | and <code>HTTP_FIELD_USER_AGENT</code> can be set. | |
db8b865d MS |
3059 | |
3060 | </p> | |
f3c17241 | 3061 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="httpSetExpect">httpSetExpect</a></h3> |
5a738aea MS |
3062 | <p class="description">Set the Expect: header in a request.</p> |
3063 | <p class="code"> | |
3064 | void httpSetExpect (<br> | |
3065 | <a href="#http_t">http_t</a> *http,<br> | |
a469f8a5 | 3066 | http_status_t expect<br> |
5a738aea MS |
3067 | );</p> |
3068 | <h4 class="parameters">Parameters</h4> | |
3069 | <dl> | |
3070 | <dt>http</dt> | |
ca6b43fc | 3071 | <dd class="description">HTTP connection</dd> |
5a738aea | 3072 | <dt>expect</dt> |
a469f8a5 | 3073 | <dd class="description">HTTP status to expect |
6961465f | 3074 | (<code>HTTP_STATUS_CONTINUE</code>)</dd> |
5a738aea MS |
3075 | </dl> |
3076 | <h4 class="discussion">Discussion</h4> | |
a469f8a5 MS |
3077 | <p class="discussion">Currently only <code>HTTP_STATUS_CONTINUE</code> is supported for the "expect" |
3078 | argument. | |
5a738aea MS |
3079 | |
3080 | </p> | |
3081 | <h3 class="function"><a name="httpSetField">httpSetField</a></h3> | |
3082 | <p class="description">Set the value of an HTTP header.</p> | |
3083 | <p class="code"> | |
3084 | void httpSetField (<br> | |
3085 | <a href="#http_t">http_t</a> *http,<br> | |
79e1d494 | 3086 | <a href="#http_field_t">http_field_t</a> field,<br> |
5a738aea MS |
3087 | const char *value<br> |
3088 | );</p> | |
3089 | <h4 class="parameters">Parameters</h4> | |
3090 | <dl> | |
3091 | <dt>http</dt> | |
ca6b43fc | 3092 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
3093 | <dt>field</dt> |
3094 | <dd class="description">Field index</dd> | |
3095 | <dt>value</dt> | |
3096 | <dd class="description">Value</dd> | |
3097 | </dl> | |
ca6b43fc MS |
3098 | <h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpSetKeepAlive">httpSetKeepAlive</a></h3> |
3099 | <p class="description">Set the current Keep-Alive state of a connection.</p> | |
3100 | <p class="code"> | |
3101 | void httpSetKeepAlive (<br> | |
3102 | <a href="#http_t">http_t</a> *http,<br> | |
3103 | <a href="#http_keepalive_t">http_keepalive_t</a> keep_alive<br> | |
3104 | );</p> | |
3105 | <h4 class="parameters">Parameters</h4> | |
3106 | <dl> | |
3107 | <dt>http</dt> | |
3108 | <dd class="description">HTTP connection</dd> | |
3109 | <dt>keep_alive</dt> | |
3110 | <dd class="description">New Keep-Alive value</dd> | |
3111 | </dl> | |
f3c17241 | 3112 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="httpSetLength">httpSetLength</a></h3> |
5a738aea MS |
3113 | <p class="description">Set the content-length and content-encoding.</p> |
3114 | <p class="code"> | |
3115 | void httpSetLength (<br> | |
3116 | <a href="#http_t">http_t</a> *http,<br> | |
3117 | size_t length<br> | |
3118 | );</p> | |
3119 | <h4 class="parameters">Parameters</h4> | |
3120 | <dl> | |
3121 | <dt>http</dt> | |
ca6b43fc | 3122 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
3123 | <dt>length</dt> |
3124 | <dd class="description">Length (0 for chunked)</dd> | |
3125 | </dl> | |
f3c17241 | 3126 | <h3 class="function"><span class="info"> CUPS 1.5/OS X 10.7 </span><a name="httpSetTimeout">httpSetTimeout</a></h3> |
f228370c MS |
3127 | <p class="description">Set read/write timeouts and an optional callback.</p> |
3128 | <p class="code"> | |
3129 | void httpSetTimeout (<br> | |
3130 | <a href="#http_t">http_t</a> *http,<br> | |
3131 | double timeout,<br> | |
3132 | <a href="#http_timeout_cb_t">http_timeout_cb_t</a> cb,<br> | |
3133 | void *user_data<br> | |
3134 | );</p> | |
3135 | <h4 class="parameters">Parameters</h4> | |
3136 | <dl> | |
3137 | <dt>http</dt> | |
ca6b43fc | 3138 | <dd class="description">HTTP connection</dd> |
f228370c MS |
3139 | <dt>timeout</dt> |
3140 | <dd class="description">Number of seconds for timeout, | |
3141 | must be greater than 0</dd> | |
3142 | <dt>cb</dt> | |
3143 | <dd class="description">Callback function or NULL</dd> | |
3144 | <dt>user_data</dt> | |
3145 | <dd class="description">User data pointer</dd> | |
3146 | </dl> | |
3147 | <h4 class="discussion">Discussion</h4> | |
3148 | <p class="discussion">The optional timeout callback receives both the HTTP connection and a user | |
3149 | data pointer and must return 1 to continue or 0 to error (time) out. | |
3150 | ||
3151 | </p> | |
ca6b43fc MS |
3152 | <h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpShutdown">httpShutdown</a></h3> |
3153 | <p class="description">Shutdown one side of an HTTP connection.</p> | |
3154 | <p class="code"> | |
3155 | void httpShutdown (<br> | |
3156 | <a href="#http_t">http_t</a> *http<br> | |
3157 | );</p> | |
3158 | <h4 class="parameters">Parameters</h4> | |
3159 | <dl> | |
3160 | <dt>http</dt> | |
3161 | <dd class="description">HTTP connection</dd> | |
3162 | </dl> | |
3163 | <h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpStateString">httpStateString</a></h3> | |
3164 | <p class="description">Return the string describing a HTTP state value.</p> | |
3165 | <p class="code"> | |
3166 | const char *httpStateString (<br> | |
3167 | <a href="#http_state_t">http_state_t</a> state<br> | |
3168 | );</p> | |
3169 | <h4 class="parameters">Parameters</h4> | |
3170 | <dl> | |
3171 | <dt>state</dt> | |
3172 | <dd class="description">HTTP state value</dd> | |
3173 | </dl> | |
3174 | <h4 class="returnvalue">Return Value</h4> | |
3175 | <p class="description">State string</p> | |
5a738aea MS |
3176 | <h3 class="function"><a name="httpStatus">httpStatus</a></h3> |
3177 | <p class="description">Return a short string describing a HTTP status code.</p> | |
3178 | <p class="code"> | |
3179 | const char *httpStatus (<br> | |
a469f8a5 | 3180 | http_status_t status<br> |
5a738aea MS |
3181 | );</p> |
3182 | <h4 class="parameters">Parameters</h4> | |
3183 | <dl> | |
3184 | <dt>status</dt> | |
3185 | <dd class="description">HTTP status code</dd> | |
3186 | </dl> | |
3187 | <h4 class="returnvalue">Return Value</h4> | |
06d4e77b MS |
3188 | <p class="description">Localized status string</p> |
3189 | <h4 class="discussion">Discussion</h4> | |
3190 | <p class="discussion">The returned string is localized to the current POSIX locale and is based | |
3191 | on the status strings defined in RFC 2616.</p> | |
5a738aea MS |
3192 | <h3 class="function"><a name="httpTrace">httpTrace</a></h3> |
3193 | <p class="description">Send an TRACE request to the server.</p> | |
3194 | <p class="code"> | |
3195 | int httpTrace (<br> | |
3196 | <a href="#http_t">http_t</a> *http,<br> | |
3197 | const char *uri<br> | |
3198 | );</p> | |
3199 | <h4 class="parameters">Parameters</h4> | |
3200 | <dl> | |
3201 | <dt>http</dt> | |
ca6b43fc | 3202 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
3203 | <dt>uri</dt> |
3204 | <dd class="description">URI for trace</dd> | |
3205 | </dl> | |
3206 | <h4 class="returnvalue">Return Value</h4> | |
3207 | <p class="description">Status of call (0 = success)</p> | |
ca6b43fc MS |
3208 | <h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpURIStatusString">httpURIStatusString</a></h3> |
3209 | <p class="description">Return a string describing a URI status code.</p> | |
3210 | <p class="code"> | |
3211 | const char *httpURIStatusString (<br> | |
3212 | <a href="#http_uri_status_t">http_uri_status_t</a> status<br> | |
3213 | );</p> | |
3214 | <h4 class="parameters">Parameters</h4> | |
3215 | <dl> | |
3216 | <dt>status</dt> | |
3217 | <dd class="description">URI status code</dd> | |
3218 | </dl> | |
3219 | <h4 class="returnvalue">Return Value</h4> | |
3220 | <p class="description">Localized status string</p> | |
5a738aea MS |
3221 | <h3 class="function"><a name="httpUpdate">httpUpdate</a></h3> |
3222 | <p class="description">Update the current HTTP state for incoming data.</p> | |
3223 | <p class="code"> | |
a469f8a5 | 3224 | http_status_t httpUpdate (<br> |
5a738aea MS |
3225 | <a href="#http_t">http_t</a> *http<br> |
3226 | );</p> | |
3227 | <h4 class="parameters">Parameters</h4> | |
3228 | <dl> | |
3229 | <dt>http</dt> | |
ca6b43fc | 3230 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
3231 | </dl> |
3232 | <h4 class="returnvalue">Return Value</h4> | |
3233 | <p class="description">HTTP status</p> | |
f3c17241 | 3234 | <h3 class="function"><span class="info"> CUPS 1.1.19/OS X 10.3 </span><a name="httpWait">httpWait</a></h3> |
5a738aea MS |
3235 | <p class="description">Wait for data available on a connection.</p> |
3236 | <p class="code"> | |
3237 | int httpWait (<br> | |
3238 | <a href="#http_t">http_t</a> *http,<br> | |
3239 | int msec<br> | |
3240 | );</p> | |
3241 | <h4 class="parameters">Parameters</h4> | |
3242 | <dl> | |
3243 | <dt>http</dt> | |
ca6b43fc | 3244 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
3245 | <dt>msec</dt> |
3246 | <dd class="description">Milliseconds to wait</dd> | |
3247 | </dl> | |
3248 | <h4 class="returnvalue">Return Value</h4> | |
3249 | <p class="description">1 if data is available, 0 otherwise</p> | |
3250 | <h3 class="function"><span class="info"> DEPRECATED </span><a name="httpWrite">httpWrite</a></h3> | |
3251 | <p class="description">Write data to a HTTP connection.</p> | |
3252 | <p class="code"> | |
3253 | int httpWrite (<br> | |
3254 | <a href="#http_t">http_t</a> *http,<br> | |
3255 | const char *buffer,<br> | |
3256 | int length<br> | |
3257 | );</p> | |
3258 | <h4 class="parameters">Parameters</h4> | |
3259 | <dl> | |
3260 | <dt>http</dt> | |
ca6b43fc | 3261 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
3262 | <dt>buffer</dt> |
3263 | <dd class="description">Buffer for data</dd> | |
3264 | <dt>length</dt> | |
3265 | <dd class="description">Number of bytes to write</dd> | |
3266 | </dl> | |
3267 | <h4 class="returnvalue">Return Value</h4> | |
3268 | <p class="description">Number of bytes written</p> | |
3269 | <h4 class="discussion">Discussion</h4> | |
3270 | <p class="discussion">This function is deprecated. Use the httpWrite2() function which can | |
ecdc0628 | 3271 | write more than 2GB of data. |
3272 | ||
5a738aea | 3273 | </p> |
f3c17241 | 3274 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="httpWrite2">httpWrite2</a></h3> |
5a738aea MS |
3275 | <p class="description">Write data to a HTTP connection.</p> |
3276 | <p class="code"> | |
3277 | ssize_t httpWrite2 (<br> | |
3278 | <a href="#http_t">http_t</a> *http,<br> | |
3279 | const char *buffer,<br> | |
3280 | size_t length<br> | |
3281 | );</p> | |
3282 | <h4 class="parameters">Parameters</h4> | |
3283 | <dl> | |
3284 | <dt>http</dt> | |
ca6b43fc | 3285 | <dd class="description">HTTP connection</dd> |
5a738aea MS |
3286 | <dt>buffer</dt> |
3287 | <dd class="description">Buffer for data</dd> | |
3288 | <dt>length</dt> | |
3289 | <dd class="description">Number of bytes to write</dd> | |
3290 | </dl> | |
3291 | <h4 class="returnvalue">Return Value</h4> | |
3292 | <p class="description">Number of bytes written</p> | |
9c0e8e5d | 3293 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="httpWriteResponse">httpWriteResponse</a></h3> |
a469f8a5 MS |
3294 | <p class="description">Write a HTTP response to a client connection.</p> |
3295 | <p class="code"> | |
3296 | int httpWriteResponse (<br> | |
3297 | <a href="#http_t">http_t</a> *http,<br> | |
3298 | http_status_t status<br> | |
3299 | );</p> | |
3300 | <h4 class="parameters">Parameters</h4> | |
3301 | <dl> | |
3302 | <dt>http</dt> | |
3303 | <dd class="description">HTTP connection</dd> | |
3304 | <dt>status</dt> | |
3305 | <dd class="description">Status code</dd> | |
3306 | </dl> | |
3307 | <h4 class="returnvalue">Return Value</h4> | |
3308 | <p class="description">0 on success, -1 on error</p> | |
5a738aea MS |
3309 | <h3 class="function"><a name="ippAddBoolean">ippAddBoolean</a></h3> |
3310 | <p class="description">Add a boolean attribute to an IPP message.</p> | |
3311 | <p class="code"> | |
3312 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddBoolean (<br> | |
3313 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
a2326b5b | 3314 | ipp_tag_t group,<br> |
5a738aea MS |
3315 | const char *name,<br> |
3316 | char value<br> | |
3317 | );</p> | |
3318 | <h4 class="parameters">Parameters</h4> | |
3319 | <dl> | |
3320 | <dt>ipp</dt> | |
3321 | <dd class="description">IPP message</dd> | |
3322 | <dt>group</dt> | |
3323 | <dd class="description">IPP group</dd> | |
3324 | <dt>name</dt> | |
3325 | <dd class="description">Name of attribute</dd> | |
3326 | <dt>value</dt> | |
3327 | <dd class="description">Value of attribute</dd> | |
3328 | </dl> | |
3329 | <h4 class="returnvalue">Return Value</h4> | |
3330 | <p class="description">New attribute</p> | |
a2326b5b | 3331 | <h4 class="discussion">Discussion</h4> |
a469f8a5 MS |
3332 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
3333 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
3334 | <br> |
3335 | The <code>group</code> parameter specifies the IPP attribute group tag: none | |
3336 | (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>), | |
3337 | event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation | |
3338 | (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription | |
3339 | (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p> | |
5a738aea MS |
3340 | <h3 class="function"><a name="ippAddBooleans">ippAddBooleans</a></h3> |
3341 | <p class="description">Add an array of boolean values.</p> | |
3342 | <p class="code"> | |
3343 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddBooleans (<br> | |
3344 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
a2326b5b | 3345 | ipp_tag_t group,<br> |
5a738aea MS |
3346 | const char *name,<br> |
3347 | int num_values,<br> | |
3348 | const char *values<br> | |
3349 | );</p> | |
3350 | <h4 class="parameters">Parameters</h4> | |
3351 | <dl> | |
3352 | <dt>ipp</dt> | |
3353 | <dd class="description">IPP message</dd> | |
3354 | <dt>group</dt> | |
3355 | <dd class="description">IPP group</dd> | |
3356 | <dt>name</dt> | |
3357 | <dd class="description">Name of attribute</dd> | |
3358 | <dt>num_values</dt> | |
3359 | <dd class="description">Number of values</dd> | |
3360 | <dt>values</dt> | |
3361 | <dd class="description">Values</dd> | |
3362 | </dl> | |
3363 | <h4 class="returnvalue">Return Value</h4> | |
3364 | <p class="description">New attribute</p> | |
a2326b5b | 3365 | <h4 class="discussion">Discussion</h4> |
a469f8a5 MS |
3366 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
3367 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
3368 | <br> |
3369 | The <code>group</code> parameter specifies the IPP attribute group tag: none | |
3370 | (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>), | |
3371 | event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation | |
3372 | (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription | |
3373 | (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p> | |
f3c17241 | 3374 | <h3 class="function"><span class="info"> CUPS 1.1.19/OS X 10.3 </span><a name="ippAddCollection">ippAddCollection</a></h3> |
5a738aea MS |
3375 | <p class="description">Add a collection value.</p> |
3376 | <p class="code"> | |
3377 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddCollection (<br> | |
3378 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
a2326b5b | 3379 | ipp_tag_t group,<br> |
5a738aea MS |
3380 | const char *name,<br> |
3381 | <a href="#ipp_t">ipp_t</a> *value<br> | |
3382 | );</p> | |
3383 | <h4 class="parameters">Parameters</h4> | |
3384 | <dl> | |
3385 | <dt>ipp</dt> | |
3386 | <dd class="description">IPP message</dd> | |
3387 | <dt>group</dt> | |
3388 | <dd class="description">IPP group</dd> | |
3389 | <dt>name</dt> | |
3390 | <dd class="description">Name of attribute</dd> | |
3391 | <dt>value</dt> | |
3392 | <dd class="description">Value</dd> | |
3393 | </dl> | |
3394 | <h4 class="returnvalue">Return Value</h4> | |
3395 | <p class="description">New attribute</p> | |
a2326b5b | 3396 | <h4 class="discussion">Discussion</h4> |
a469f8a5 MS |
3397 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
3398 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
3399 | <br> |
3400 | The <code>group</code> parameter specifies the IPP attribute group tag: none | |
3401 | (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>), | |
3402 | event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation | |
3403 | (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription | |
3404 | (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>). | |
3405 | ||
3406 | </p> | |
f3c17241 | 3407 | <h3 class="function"><span class="info"> CUPS 1.1.19/OS X 10.3 </span><a name="ippAddCollections">ippAddCollections</a></h3> |
5a738aea MS |
3408 | <p class="description">Add an array of collection values.</p> |
3409 | <p class="code"> | |
3410 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddCollections (<br> | |
3411 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
a2326b5b | 3412 | ipp_tag_t group,<br> |
5a738aea MS |
3413 | const char *name,<br> |
3414 | int num_values,<br> | |
3415 | const <a href="#ipp_t">ipp_t</a> **values<br> | |
3416 | );</p> | |
3417 | <h4 class="parameters">Parameters</h4> | |
3418 | <dl> | |
3419 | <dt>ipp</dt> | |
3420 | <dd class="description">IPP message</dd> | |
3421 | <dt>group</dt> | |
3422 | <dd class="description">IPP group</dd> | |
3423 | <dt>name</dt> | |
3424 | <dd class="description">Name of attribute</dd> | |
3425 | <dt>num_values</dt> | |
3426 | <dd class="description">Number of values</dd> | |
3427 | <dt>values</dt> | |
3428 | <dd class="description">Values</dd> | |
3429 | </dl> | |
3430 | <h4 class="returnvalue">Return Value</h4> | |
3431 | <p class="description">New attribute</p> | |
a2326b5b | 3432 | <h4 class="discussion">Discussion</h4> |
a469f8a5 MS |
3433 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
3434 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
3435 | <br> |
3436 | The <code>group</code> parameter specifies the IPP attribute group tag: none | |
3437 | (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>), | |
3438 | event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation | |
3439 | (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription | |
3440 | (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>). | |
3441 | ||
3442 | </p> | |
5a738aea MS |
3443 | <h3 class="function"><a name="ippAddDate">ippAddDate</a></h3> |
3444 | <p class="description">Add a date attribute to an IPP message.</p> | |
3445 | <p class="code"> | |
3446 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddDate (<br> | |
3447 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
a2326b5b | 3448 | ipp_tag_t group,<br> |
5a738aea MS |
3449 | const char *name,<br> |
3450 | const <a href="#ipp_uchar_t">ipp_uchar_t</a> *value<br> | |
3451 | );</p> | |
3452 | <h4 class="parameters">Parameters</h4> | |
3453 | <dl> | |
3454 | <dt>ipp</dt> | |
3455 | <dd class="description">IPP message</dd> | |
3456 | <dt>group</dt> | |
3457 | <dd class="description">IPP group</dd> | |
3458 | <dt>name</dt> | |
3459 | <dd class="description">Name of attribute</dd> | |
3460 | <dt>value</dt> | |
3461 | <dd class="description">Value</dd> | |
3462 | </dl> | |
3463 | <h4 class="returnvalue">Return Value</h4> | |
3464 | <p class="description">New attribute</p> | |
a2326b5b | 3465 | <h4 class="discussion">Discussion</h4> |
a469f8a5 MS |
3466 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
3467 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
3468 | <br> |
3469 | The <code>group</code> parameter specifies the IPP attribute group tag: none | |
3470 | (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>), | |
3471 | event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation | |
3472 | (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription | |
3473 | (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p> | |
5a738aea MS |
3474 | <h3 class="function"><a name="ippAddInteger">ippAddInteger</a></h3> |
3475 | <p class="description">Add a integer attribute to an IPP message.</p> | |
3476 | <p class="code"> | |
3477 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddInteger (<br> | |
3478 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
a2326b5b MS |
3479 | ipp_tag_t group,<br> |
3480 | ipp_tag_t value_tag,<br> | |
5a738aea MS |
3481 | const char *name,<br> |
3482 | int value<br> | |
3483 | );</p> | |
3484 | <h4 class="parameters">Parameters</h4> | |
3485 | <dl> | |
3486 | <dt>ipp</dt> | |
3487 | <dd class="description">IPP message</dd> | |
3488 | <dt>group</dt> | |
3489 | <dd class="description">IPP group</dd> | |
a2326b5b | 3490 | <dt>value_tag</dt> |
5a738aea MS |
3491 | <dd class="description">Type of attribute</dd> |
3492 | <dt>name</dt> | |
3493 | <dd class="description">Name of attribute</dd> | |
3494 | <dt>value</dt> | |
3495 | <dd class="description">Value of attribute</dd> | |
3496 | </dl> | |
3497 | <h4 class="returnvalue">Return Value</h4> | |
3498 | <p class="description">New attribute</p> | |
a2326b5b | 3499 | <h4 class="discussion">Discussion</h4> |
a469f8a5 MS |
3500 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
3501 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
3502 | <br> |
3503 | The <code>group</code> parameter specifies the IPP attribute group tag: none | |
3504 | (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>), | |
3505 | event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation | |
3506 | (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription | |
3507 | (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br> | |
3508 | <br> | |
3509 | Supported values include enum (<code>IPP_TAG_ENUM</code>) and integer | |
3510 | (<code>IPP_TAG_INTEGER</code>).</p> | |
5a738aea MS |
3511 | <h3 class="function"><a name="ippAddIntegers">ippAddIntegers</a></h3> |
3512 | <p class="description">Add an array of integer values.</p> | |
3513 | <p class="code"> | |
3514 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddIntegers (<br> | |
3515 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
a2326b5b MS |
3516 | ipp_tag_t group,<br> |
3517 | ipp_tag_t value_tag,<br> | |
5a738aea MS |
3518 | const char *name,<br> |
3519 | int num_values,<br> | |
3520 | const int *values<br> | |
3521 | );</p> | |
3522 | <h4 class="parameters">Parameters</h4> | |
3523 | <dl> | |
3524 | <dt>ipp</dt> | |
3525 | <dd class="description">IPP message</dd> | |
3526 | <dt>group</dt> | |
3527 | <dd class="description">IPP group</dd> | |
a2326b5b | 3528 | <dt>value_tag</dt> |
5a738aea MS |
3529 | <dd class="description">Type of attribute</dd> |
3530 | <dt>name</dt> | |
3531 | <dd class="description">Name of attribute</dd> | |
3532 | <dt>num_values</dt> | |
3533 | <dd class="description">Number of values</dd> | |
3534 | <dt>values</dt> | |
3535 | <dd class="description">Values</dd> | |
3536 | </dl> | |
3537 | <h4 class="returnvalue">Return Value</h4> | |
3538 | <p class="description">New attribute</p> | |
a2326b5b | 3539 | <h4 class="discussion">Discussion</h4> |
a469f8a5 MS |
3540 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
3541 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
3542 | <br> |
3543 | The <code>group</code> parameter specifies the IPP attribute group tag: none | |
3544 | (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>), | |
3545 | event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation | |
3546 | (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription | |
3547 | (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br> | |
3548 | <br> | |
3549 | Supported values include enum (<code>IPP_TAG_ENUM</code>) and integer | |
3550 | (<code>IPP_TAG_INTEGER</code>).</p> | |
f3c17241 | 3551 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="ippAddOctetString">ippAddOctetString</a></h3> |
5a738aea MS |
3552 | <p class="description">Add an octetString value to an IPP message.</p> |
3553 | <p class="code"> | |
3554 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddOctetString (<br> | |
3555 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
a2326b5b | 3556 | ipp_tag_t group,<br> |
5a738aea MS |
3557 | const char *name,<br> |
3558 | const void *data,<br> | |
3559 | int datalen<br> | |
3560 | );</p> | |
3561 | <h4 class="parameters">Parameters</h4> | |
3562 | <dl> | |
3563 | <dt>ipp</dt> | |
3564 | <dd class="description">IPP message</dd> | |
3565 | <dt>group</dt> | |
3566 | <dd class="description">IPP group</dd> | |
3567 | <dt>name</dt> | |
3568 | <dd class="description">Name of attribute</dd> | |
3569 | <dt>data</dt> | |
3570 | <dd class="description">octetString data</dd> | |
3571 | <dt>datalen</dt> | |
3572 | <dd class="description">Length of data in bytes</dd> | |
3573 | </dl> | |
3574 | <h4 class="returnvalue">Return Value</h4> | |
3575 | <p class="description">New attribute</p> | |
a2326b5b | 3576 | <h4 class="discussion">Discussion</h4> |
a469f8a5 MS |
3577 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
3578 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
3579 | <br> |
3580 | The <code>group</code> parameter specifies the IPP attribute group tag: none | |
3581 | (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>), | |
3582 | event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation | |
3583 | (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription | |
3584 | (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>). | |
3585 | ||
3586 | </p> | |
f3c17241 | 3587 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippAddOutOfBand">ippAddOutOfBand</a></h3> |
a2326b5b MS |
3588 | <p class="description">Add an out-of-band value to an IPP message.</p> |
3589 | <p class="code"> | |
3590 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddOutOfBand (<br> | |
3591 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
3592 | ipp_tag_t group,<br> | |
3593 | ipp_tag_t value_tag,<br> | |
3594 | const char *name<br> | |
3595 | );</p> | |
3596 | <h4 class="parameters">Parameters</h4> | |
3597 | <dl> | |
3598 | <dt>ipp</dt> | |
3599 | <dd class="description">IPP message</dd> | |
3600 | <dt>group</dt> | |
3601 | <dd class="description">IPP group</dd> | |
3602 | <dt>value_tag</dt> | |
3603 | <dd class="description">Type of attribute</dd> | |
3604 | <dt>name</dt> | |
3605 | <dd class="description">Name of attribute</dd> | |
3606 | </dl> | |
3607 | <h4 class="returnvalue">Return Value</h4> | |
3608 | <p class="description">New attribute</p> | |
3609 | <h4 class="discussion">Discussion</h4> | |
a469f8a5 MS |
3610 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
3611 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
3612 | <br> |
3613 | The <code>group</code> parameter specifies the IPP attribute group tag: none | |
3614 | (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>), | |
3615 | event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation | |
3616 | (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription | |
3617 | (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br> | |
3618 | <br> | |
3619 | Supported out-of-band values include unsupported-value | |
3620 | (<code>IPP_TAG_UNSUPPORTED_VALUE</code>), default (<code>IPP_TAG_DEFAULT</code>), unknown | |
3621 | (<code>IPP_TAG_UNKNOWN</code>), no-value (<code>IPP_TAG_NOVALUE</code>), not-settable | |
3622 | (<code>IPP_TAG_NOTSETTABLE</code>), delete-attribute (<code>IPP_TAG_DELETEATTR</code>), and | |
3623 | admin-define (<code>IPP_TAG_ADMINDEFINE</code>). | |
3624 | ||
3625 | </p> | |
5a738aea MS |
3626 | <h3 class="function"><a name="ippAddRange">ippAddRange</a></h3> |
3627 | <p class="description">Add a range of values to an IPP message.</p> | |
3628 | <p class="code"> | |
3629 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddRange (<br> | |
3630 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
a2326b5b | 3631 | ipp_tag_t group,<br> |
5a738aea MS |
3632 | const char *name,<br> |
3633 | int lower,<br> | |
3634 | int upper<br> | |
3635 | );</p> | |
3636 | <h4 class="parameters">Parameters</h4> | |
3637 | <dl> | |
3638 | <dt>ipp</dt> | |
3639 | <dd class="description">IPP message</dd> | |
3640 | <dt>group</dt> | |
3641 | <dd class="description">IPP group</dd> | |
3642 | <dt>name</dt> | |
3643 | <dd class="description">Name of attribute</dd> | |
3644 | <dt>lower</dt> | |
3645 | <dd class="description">Lower value</dd> | |
3646 | <dt>upper</dt> | |
3647 | <dd class="description">Upper value</dd> | |
3648 | </dl> | |
3649 | <h4 class="returnvalue">Return Value</h4> | |
3650 | <p class="description">New attribute</p> | |
a2326b5b | 3651 | <h4 class="discussion">Discussion</h4> |
a469f8a5 MS |
3652 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
3653 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
3654 | <br> |
3655 | The <code>group</code> parameter specifies the IPP attribute group tag: none | |
3656 | (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>), | |
3657 | event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation | |
3658 | (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription | |
3659 | (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br> | |
3660 | <br> | |
3661 | The <code>lower</code> parameter must be less than or equal to the <code>upper</code> parameter.</p> | |
5a738aea MS |
3662 | <h3 class="function"><a name="ippAddRanges">ippAddRanges</a></h3> |
3663 | <p class="description">Add ranges of values to an IPP message.</p> | |
3664 | <p class="code"> | |
3665 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddRanges (<br> | |
3666 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
a2326b5b | 3667 | ipp_tag_t group,<br> |
5a738aea MS |
3668 | const char *name,<br> |
3669 | int num_values,<br> | |
3670 | const int *lower,<br> | |
3671 | const int *upper<br> | |
3672 | );</p> | |
3673 | <h4 class="parameters">Parameters</h4> | |
3674 | <dl> | |
3675 | <dt>ipp</dt> | |
3676 | <dd class="description">IPP message</dd> | |
3677 | <dt>group</dt> | |
3678 | <dd class="description">IPP group</dd> | |
3679 | <dt>name</dt> | |
3680 | <dd class="description">Name of attribute</dd> | |
3681 | <dt>num_values</dt> | |
3682 | <dd class="description">Number of values</dd> | |
3683 | <dt>lower</dt> | |
3684 | <dd class="description">Lower values</dd> | |
3685 | <dt>upper</dt> | |
3686 | <dd class="description">Upper values</dd> | |
3687 | </dl> | |
3688 | <h4 class="returnvalue">Return Value</h4> | |
3689 | <p class="description">New attribute</p> | |
a2326b5b | 3690 | <h4 class="discussion">Discussion</h4> |
a469f8a5 MS |
3691 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
3692 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
3693 | <br> |
3694 | The <code>group</code> parameter specifies the IPP attribute group tag: none | |
3695 | (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>), | |
3696 | event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation | |
3697 | (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription | |
3698 | (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p> | |
5a738aea MS |
3699 | <h3 class="function"><a name="ippAddResolution">ippAddResolution</a></h3> |
3700 | <p class="description">Add a resolution value to an IPP message.</p> | |
3701 | <p class="code"> | |
3702 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddResolution (<br> | |
3703 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
a2326b5b | 3704 | ipp_tag_t group,<br> |
5a738aea | 3705 | const char *name,<br> |
79e1d494 | 3706 | <a href="#ipp_res_t">ipp_res_t</a> units,<br> |
5a738aea MS |
3707 | int xres,<br> |
3708 | int yres<br> | |
3709 | );</p> | |
3710 | <h4 class="parameters">Parameters</h4> | |
3711 | <dl> | |
3712 | <dt>ipp</dt> | |
3713 | <dd class="description">IPP message</dd> | |
3714 | <dt>group</dt> | |
3715 | <dd class="description">IPP group</dd> | |
3716 | <dt>name</dt> | |
3717 | <dd class="description">Name of attribute</dd> | |
3718 | <dt>units</dt> | |
3719 | <dd class="description">Units for resolution</dd> | |
3720 | <dt>xres</dt> | |
3721 | <dd class="description">X resolution</dd> | |
3722 | <dt>yres</dt> | |
3723 | <dd class="description">Y resolution</dd> | |
3724 | </dl> | |
3725 | <h4 class="returnvalue">Return Value</h4> | |
3726 | <p class="description">New attribute</p> | |
a2326b5b | 3727 | <h4 class="discussion">Discussion</h4> |
a469f8a5 MS |
3728 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
3729 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
3730 | <br> |
3731 | The <code>group</code> parameter specifies the IPP attribute group tag: none | |
3732 | (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>), | |
3733 | event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation | |
3734 | (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription | |
3735 | (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p> | |
5a738aea MS |
3736 | <h3 class="function"><a name="ippAddResolutions">ippAddResolutions</a></h3> |
3737 | <p class="description">Add resolution values to an IPP message.</p> | |
3738 | <p class="code"> | |
3739 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddResolutions (<br> | |
3740 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
a2326b5b | 3741 | ipp_tag_t group,<br> |
5a738aea MS |
3742 | const char *name,<br> |
3743 | int num_values,<br> | |
79e1d494 | 3744 | <a href="#ipp_res_t">ipp_res_t</a> units,<br> |
5a738aea MS |
3745 | const int *xres,<br> |
3746 | const int *yres<br> | |
3747 | );</p> | |
3748 | <h4 class="parameters">Parameters</h4> | |
3749 | <dl> | |
3750 | <dt>ipp</dt> | |
3751 | <dd class="description">IPP message</dd> | |
3752 | <dt>group</dt> | |
3753 | <dd class="description">IPP group</dd> | |
3754 | <dt>name</dt> | |
3755 | <dd class="description">Name of attribute</dd> | |
3756 | <dt>num_values</dt> | |
3757 | <dd class="description">Number of values</dd> | |
3758 | <dt>units</dt> | |
3759 | <dd class="description">Units for resolution</dd> | |
3760 | <dt>xres</dt> | |
3761 | <dd class="description">X resolutions</dd> | |
3762 | <dt>yres</dt> | |
3763 | <dd class="description">Y resolutions</dd> | |
3764 | </dl> | |
3765 | <h4 class="returnvalue">Return Value</h4> | |
3766 | <p class="description">New attribute</p> | |
a2326b5b | 3767 | <h4 class="discussion">Discussion</h4> |
a469f8a5 MS |
3768 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
3769 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
3770 | <br> |
3771 | The <code>group</code> parameter specifies the IPP attribute group tag: none | |
3772 | (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>), | |
3773 | event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation | |
3774 | (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription | |
3775 | (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p> | |
5a738aea MS |
3776 | <h3 class="function"><a name="ippAddSeparator">ippAddSeparator</a></h3> |
3777 | <p class="description">Add a group separator to an IPP message.</p> | |
3778 | <p class="code"> | |
3779 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddSeparator (<br> | |
3780 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
3781 | );</p> | |
3782 | <h4 class="parameters">Parameters</h4> | |
3783 | <dl> | |
3784 | <dt>ipp</dt> | |
3785 | <dd class="description">IPP message</dd> | |
3786 | </dl> | |
3787 | <h4 class="returnvalue">Return Value</h4> | |
3788 | <p class="description">New attribute</p> | |
a2326b5b | 3789 | <h4 class="discussion">Discussion</h4> |
a469f8a5 MS |
3790 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
3791 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.</p> | |
5a738aea MS |
3792 | <h3 class="function"><a name="ippAddString">ippAddString</a></h3> |
3793 | <p class="description">Add a language-encoded string to an IPP message.</p> | |
3794 | <p class="code"> | |
3795 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddString (<br> | |
3796 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
a2326b5b MS |
3797 | ipp_tag_t group,<br> |
3798 | ipp_tag_t value_tag,<br> | |
5a738aea | 3799 | const char *name,<br> |
a2326b5b | 3800 | const char *language,<br> |
5a738aea MS |
3801 | const char *value<br> |
3802 | );</p> | |
3803 | <h4 class="parameters">Parameters</h4> | |
3804 | <dl> | |
3805 | <dt>ipp</dt> | |
3806 | <dd class="description">IPP message</dd> | |
3807 | <dt>group</dt> | |
3808 | <dd class="description">IPP group</dd> | |
a2326b5b | 3809 | <dt>value_tag</dt> |
5a738aea MS |
3810 | <dd class="description">Type of attribute</dd> |
3811 | <dt>name</dt> | |
3812 | <dd class="description">Name of attribute</dd> | |
a2326b5b MS |
3813 | <dt>language</dt> |
3814 | <dd class="description">Language code</dd> | |
5a738aea MS |
3815 | <dt>value</dt> |
3816 | <dd class="description">Value</dd> | |
3817 | </dl> | |
3818 | <h4 class="returnvalue">Return Value</h4> | |
3819 | <p class="description">New attribute</p> | |
a2326b5b | 3820 | <h4 class="discussion">Discussion</h4> |
a469f8a5 MS |
3821 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
3822 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
3823 | <br> |
3824 | The <code>group</code> parameter specifies the IPP attribute group tag: none | |
3825 | (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>), | |
3826 | event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation | |
3827 | (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription | |
3828 | (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br> | |
3829 | <br> | |
3830 | Supported string values include charset (<code>IPP_TAG_CHARSET</code>), keyword | |
3831 | (<code>IPP_TAG_KEYWORD</code>), language (<code>IPP_TAG_LANGUAGE</code>), mimeMediaType | |
3832 | (<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code>), nameWithLanguage | |
3833 | (<code>IPP_TAG_NAMELANG), text (</code>code IPP_TAG_TEXT@), textWithLanguage | |
3834 | (<code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), and uriScheme | |
3835 | (<code>IPP_TAG_URISCHEME</code>).<br> | |
3836 | <br> | |
3837 | The <code>language</code> parameter must be non-<code>NULL</code> for nameWithLanguage and | |
3838 | textWithLanguage string values and must be <code>NULL</code> for all other string values.</p> | |
9c0e8e5d | 3839 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="ippAddStringf">ippAddStringf</a></h3> |
a469f8a5 MS |
3840 | <p class="description">Add a formatted string to an IPP message.</p> |
3841 | <p class="code"> | |
3842 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddStringf (<br> | |
3843 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
3844 | ipp_tag_t group,<br> | |
3845 | ipp_tag_t value_tag,<br> | |
3846 | const char *name,<br> | |
3847 | const char *language,<br> | |
3848 | const char *format,<br> | |
3849 | ...<br> | |
3850 | );</p> | |
3851 | <h4 class="parameters">Parameters</h4> | |
3852 | <dl> | |
3853 | <dt>ipp</dt> | |
3854 | <dd class="description">IPP message</dd> | |
3855 | <dt>group</dt> | |
3856 | <dd class="description">IPP group</dd> | |
3857 | <dt>value_tag</dt> | |
3858 | <dd class="description">Type of attribute</dd> | |
3859 | <dt>name</dt> | |
3860 | <dd class="description">Name of attribute</dd> | |
3861 | <dt>language</dt> | |
3862 | <dd class="description">Language code (<code>NULL</code> for default)</dd> | |
3863 | <dt>format</dt> | |
3864 | <dd class="description">Printf-style format string</dd> | |
3865 | <dt>...</dt> | |
3866 | <dd class="description">Additional arguments as needed</dd> | |
3867 | </dl> | |
3868 | <h4 class="returnvalue">Return Value</h4> | |
3869 | <p class="description">New attribute</p> | |
3870 | <h4 class="discussion">Discussion</h4> | |
3871 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using | |
3872 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
3873 | <br> | |
3874 | The <code>group</code> parameter specifies the IPP attribute group tag: none | |
3875 | (<code>IPP_TAG_ZERO</code>, for member attributes), document | |
3876 | (<code>IPP_TAG_DOCUMENT</code>), event notification | |
3877 | (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation (<code>IPP_TAG_OPERATION</code>), | |
3878 | printer (<code>IPP_TAG_PRINTER</code>), subscription (<code>IPP_TAG_SUBSCRIPTION</code>), | |
3879 | or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br> | |
3880 | <br> | |
3881 | Supported string values include charset (<code>IPP_TAG_CHARSET</code>), keyword | |
3882 | (<code>IPP_TAG_KEYWORD</code>), language (<code>IPP_TAG_LANGUAGE</code>), mimeMediaType | |
3883 | (<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code>), nameWithLanguage | |
3884 | (<code>IPP_TAG_NAMELANG), text (</code>code IPP_TAG_TEXT@), textWithLanguage | |
3885 | (<code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), and uriScheme | |
3886 | (<code>IPP_TAG_URISCHEME</code>).<br> | |
3887 | <br> | |
3888 | The <code>language</code> parameter must be non-<code>NULL</code> for nameWithLanguage | |
3889 | and textWithLanguage string values and must be <code>NULL</code> for all other | |
3890 | string values.<br> | |
3891 | <br> | |
3892 | The <code>format</code> parameter uses formatting characters compatible with the | |
3893 | printf family of standard functions. Additional arguments follow it as | |
3894 | needed. The formatted string is truncated as needed to the maximum length of | |
3895 | the corresponding value type. | |
3896 | ||
3897 | </p> | |
9c0e8e5d | 3898 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="ippAddStringfv">ippAddStringfv</a></h3> |
a469f8a5 MS |
3899 | <p class="description">Add a formatted string to an IPP message.</p> |
3900 | <p class="code"> | |
3901 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddStringfv (<br> | |
3902 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
3903 | ipp_tag_t group,<br> | |
3904 | ipp_tag_t value_tag,<br> | |
3905 | const char *name,<br> | |
3906 | const char *language,<br> | |
3907 | const char *format,<br> | |
3908 | va_list ap<br> | |
3909 | );</p> | |
3910 | <h4 class="parameters">Parameters</h4> | |
3911 | <dl> | |
3912 | <dt>ipp</dt> | |
3913 | <dd class="description">IPP message</dd> | |
3914 | <dt>group</dt> | |
3915 | <dd class="description">IPP group</dd> | |
3916 | <dt>value_tag</dt> | |
3917 | <dd class="description">Type of attribute</dd> | |
3918 | <dt>name</dt> | |
3919 | <dd class="description">Name of attribute</dd> | |
3920 | <dt>language</dt> | |
3921 | <dd class="description">Language code (<code>NULL</code> for default)</dd> | |
3922 | <dt>format</dt> | |
3923 | <dd class="description">Printf-style format string</dd> | |
3924 | <dt>ap</dt> | |
3925 | <dd class="description">Additional arguments</dd> | |
3926 | </dl> | |
3927 | <h4 class="returnvalue">Return Value</h4> | |
3928 | <p class="description">New attribute</p> | |
3929 | <h4 class="discussion">Discussion</h4> | |
3930 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using | |
3931 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
3932 | <br> | |
3933 | The <code>group</code> parameter specifies the IPP attribute group tag: none | |
3934 | (<code>IPP_TAG_ZERO</code>, for member attributes), document | |
3935 | (<code>IPP_TAG_DOCUMENT</code>), event notification | |
3936 | (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation (<code>IPP_TAG_OPERATION</code>), | |
3937 | printer (<code>IPP_TAG_PRINTER</code>), subscription (<code>IPP_TAG_SUBSCRIPTION</code>), | |
3938 | or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br> | |
3939 | <br> | |
3940 | Supported string values include charset (<code>IPP_TAG_CHARSET</code>), keyword | |
3941 | (<code>IPP_TAG_KEYWORD</code>), language (<code>IPP_TAG_LANGUAGE</code>), mimeMediaType | |
3942 | (<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code>), nameWithLanguage | |
3943 | (<code>IPP_TAG_NAMELANG), text (</code>code IPP_TAG_TEXT@), textWithLanguage | |
3944 | (<code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), and uriScheme | |
3945 | (<code>IPP_TAG_URISCHEME</code>).<br> | |
3946 | <br> | |
3947 | The <code>language</code> parameter must be non-<code>NULL</code> for nameWithLanguage | |
3948 | and textWithLanguage string values and must be <code>NULL</code> for all other | |
3949 | string values.<br> | |
3950 | <br> | |
3951 | The <code>format</code> parameter uses formatting characters compatible with the | |
3952 | printf family of standard functions. Additional arguments are passed in the | |
3953 | stdarg pointer <code>ap</code>. The formatted string is truncated as needed to the | |
3954 | maximum length of the corresponding value type. | |
3955 | ||
3956 | </p> | |
5a738aea MS |
3957 | <h3 class="function"><a name="ippAddStrings">ippAddStrings</a></h3> |
3958 | <p class="description">Add language-encoded strings to an IPP message.</p> | |
3959 | <p class="code"> | |
3960 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddStrings (<br> | |
3961 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
a2326b5b MS |
3962 | ipp_tag_t group,<br> |
3963 | ipp_tag_t value_tag,<br> | |
5a738aea MS |
3964 | const char *name,<br> |
3965 | int num_values,<br> | |
a2326b5b | 3966 | const char *language,<br> |
5a738aea MS |
3967 | const char *const *values<br> |
3968 | );</p> | |
3969 | <h4 class="parameters">Parameters</h4> | |
3970 | <dl> | |
3971 | <dt>ipp</dt> | |
3972 | <dd class="description">IPP message</dd> | |
3973 | <dt>group</dt> | |
3974 | <dd class="description">IPP group</dd> | |
a2326b5b | 3975 | <dt>value_tag</dt> |
5a738aea MS |
3976 | <dd class="description">Type of attribute</dd> |
3977 | <dt>name</dt> | |
3978 | <dd class="description">Name of attribute</dd> | |
3979 | <dt>num_values</dt> | |
3980 | <dd class="description">Number of values</dd> | |
a2326b5b MS |
3981 | <dt>language</dt> |
3982 | <dd class="description">Language code (<code>NULL</code> for default)</dd> | |
5a738aea MS |
3983 | <dt>values</dt> |
3984 | <dd class="description">Values</dd> | |
3985 | </dl> | |
3986 | <h4 class="returnvalue">Return Value</h4> | |
3987 | <p class="description">New attribute</p> | |
a2326b5b | 3988 | <h4 class="discussion">Discussion</h4> |
a469f8a5 MS |
3989 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
3990 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
3991 | <br> |
3992 | The <code>group</code> parameter specifies the IPP attribute group tag: none | |
3993 | (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>), | |
3994 | event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation | |
3995 | (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription | |
3996 | (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br> | |
3997 | <br> | |
3998 | Supported string values include charset (<code>IPP_TAG_CHARSET</code>), keyword | |
3999 | (<code>IPP_TAG_KEYWORD</code>), language (<code>IPP_TAG_LANGUAGE</code>), mimeMediaType | |
4000 | (<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code>), nameWithLanguage | |
4001 | (<code>IPP_TAG_NAMELANG), text (</code>code IPP_TAG_TEXT@), textWithLanguage | |
4002 | (<code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), and uriScheme | |
4003 | (<code>IPP_TAG_URISCHEME</code>).<br> | |
4004 | <br> | |
4005 | The <code>language</code> parameter must be non-<code>NULL</code> for nameWithLanguage and | |
4006 | textWithLanguage string values and must be <code>NULL</code> for all other string values.</p> | |
f3c17241 | 4007 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippAttributeString">ippAttributeString</a></h3> |
a2326b5b MS |
4008 | <p class="description">Convert the attribute's value to a string.</p> |
4009 | <p class="code"> | |
4010 | size_t ippAttributeString (<br> | |
4011 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br> | |
4012 | char *buffer,<br> | |
4013 | size_t bufsize<br> | |
4014 | );</p> | |
4015 | <h4 class="parameters">Parameters</h4> | |
4016 | <dl> | |
4017 | <dt>attr</dt> | |
4018 | <dd class="description">Attribute</dd> | |
4019 | <dt>buffer</dt> | |
4020 | <dd class="description">String buffer or NULL</dd> | |
4021 | <dt>bufsize</dt> | |
4022 | <dd class="description">Size of string buffer</dd> | |
4023 | </dl> | |
4024 | <h4 class="returnvalue">Return Value</h4> | |
4025 | <p class="description">Number of bytes less nul</p> | |
4026 | <h4 class="discussion">Discussion</h4> | |
4027 | <p class="discussion">Returns the number of bytes that would be written, not including the | |
4028 | trailing nul. The buffer pointer can be NULL to get the required length, | |
4029 | just like (v)snprintf. | |
4030 | ||
a469f8a5 | 4031 | </p> |
9c0e8e5d | 4032 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="ippContainsInteger">ippContainsInteger</a></h3> |
a469f8a5 MS |
4033 | <p class="description">Determine whether an attribute contains the |
4034 | specified value or is within the list of ranges.</p> | |
4035 | <p class="code"> | |
4036 | int ippContainsInteger (<br> | |
4037 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br> | |
4038 | int value<br> | |
4039 | );</p> | |
4040 | <h4 class="parameters">Parameters</h4> | |
4041 | <dl> | |
4042 | <dt>attr</dt> | |
4043 | <dd class="description">Attribute</dd> | |
4044 | <dt>value</dt> | |
4045 | <dd class="description">Integer/enum value</dd> | |
4046 | </dl> | |
4047 | <h4 class="returnvalue">Return Value</h4> | |
4048 | <p class="description">1 on a match, 0 on no match</p> | |
4049 | <h4 class="discussion">Discussion</h4> | |
4050 | <p class="discussion">Returns non-zero when the attribute contains either a matching integer or | |
4051 | enum value, or the value falls within one of the rangeOfInteger values for | |
4052 | the attribute. | |
4053 | ||
4054 | </p> | |
9c0e8e5d | 4055 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="ippContainsString">ippContainsString</a></h3> |
a469f8a5 MS |
4056 | <p class="description">Determine whether an attribute contains the |
4057 | specified string value.</p> | |
4058 | <p class="code"> | |
4059 | int ippContainsString (<br> | |
4060 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br> | |
4061 | const char *value<br> | |
4062 | );</p> | |
4063 | <h4 class="parameters">Parameters</h4> | |
4064 | <dl> | |
4065 | <dt>attr</dt> | |
4066 | <dd class="description">Attribute</dd> | |
4067 | <dt>value</dt> | |
4068 | <dd class="description">String value</dd> | |
4069 | </dl> | |
4070 | <h4 class="returnvalue">Return Value</h4> | |
4071 | <p class="description">1 on a match, 0 on no match</p> | |
4072 | <h4 class="discussion">Discussion</h4> | |
4073 | <p class="discussion">Returns non-zero when the attribute contains a matching charset, keyword, | |
4074 | language, mimeMediaType, name, text, URI, or URI scheme value. | |
4075 | ||
a2326b5b | 4076 | </p> |
f3c17241 | 4077 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippCopyAttribute">ippCopyAttribute</a></h3> |
a2326b5b MS |
4078 | <p class="description">Copy an attribute.</p> |
4079 | <p class="code"> | |
4080 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippCopyAttribute (<br> | |
4081 | <a href="#ipp_t">ipp_t</a> *dst,<br> | |
4082 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *srcattr,<br> | |
4083 | int quickcopy<br> | |
4084 | );</p> | |
4085 | <h4 class="parameters">Parameters</h4> | |
4086 | <dl> | |
4087 | <dt>dst</dt> | |
4088 | <dd class="description">Destination IPP message</dd> | |
4089 | <dt>srcattr</dt> | |
4090 | <dd class="description">Attribute to copy</dd> | |
4091 | <dt>quickcopy</dt> | |
4092 | <dd class="description">1 for a referenced copy, 0 for normal</dd> | |
4093 | </dl> | |
4094 | <h4 class="returnvalue">Return Value</h4> | |
4095 | <p class="description">New attribute</p> | |
4096 | <h4 class="discussion">Discussion</h4> | |
4097 | <p class="discussion">The specified attribute, <code>attr</code>, is copied to the destination IPP message. | |
4098 | When <code>quickcopy</code> is non-zero, a "shallow" reference copy of the attribute is | |
4099 | created - this should only be done as long as the original source IPP message will | |
4100 | not be freed for the life of the destination. | |
4101 | ||
4102 | </p> | |
f3c17241 | 4103 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippCopyAttributes">ippCopyAttributes</a></h3> |
a2326b5b MS |
4104 | <p class="description">Copy attributes from one IPP message to another.</p> |
4105 | <p class="code"> | |
4106 | int ippCopyAttributes (<br> | |
4107 | <a href="#ipp_t">ipp_t</a> *dst,<br> | |
4108 | <a href="#ipp_t">ipp_t</a> *src,<br> | |
4109 | int quickcopy,<br> | |
4110 | <a href="#ipp_copycb_t">ipp_copycb_t</a> cb,<br> | |
4111 | void *context<br> | |
4112 | );</p> | |
4113 | <h4 class="parameters">Parameters</h4> | |
4114 | <dl> | |
4115 | <dt>dst</dt> | |
4116 | <dd class="description">Destination IPP message</dd> | |
4117 | <dt>src</dt> | |
4118 | <dd class="description">Source IPP message</dd> | |
4119 | <dt>quickcopy</dt> | |
4120 | <dd class="description">1 for a referenced copy, 0 for normal</dd> | |
4121 | <dt>cb</dt> | |
4122 | <dd class="description">Copy callback or <code>NULL</code> for none</dd> | |
4123 | <dt>context</dt> | |
4124 | <dd class="description">Context pointer</dd> | |
4125 | </dl> | |
4126 | <h4 class="returnvalue">Return Value</h4> | |
4127 | <p class="description">1 on success, 0 on error</p> | |
4128 | <h4 class="discussion">Discussion</h4> | |
4129 | <p class="discussion">Zero or more attributes are copied from the source IPP message, @code@ src, to the | |
4130 | destination IPP message, <code>dst</code>. When <code>quickcopy</code> is non-zero, a "shallow" | |
4131 | reference copy of the attribute is created - this should only be done as long as the | |
4132 | original source IPP message will not be freed for the life of the destination.<br> | |
4133 | <br> | |
4134 | The <code>cb</code> and <code>context</code> parameters provide a generic way to "filter" the | |
4135 | attributes that are copied - the function must return 1 to copy the attribute or | |
4136 | 0 to skip it. The function may also choose to do a partial copy of the source attribute | |
4137 | itself. | |
4138 | ||
db8b865d | 4139 | </p> |
9c0e8e5d | 4140 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="ippCreateRequestedArray">ippCreateRequestedArray</a></h3> |
db8b865d MS |
4141 | <p class="description">Create a CUPS array of attribute names from the |
4142 | given requested-attributes attribute.</p> | |
4143 | <p class="code"> | |
4144 | cups_array_t *ippCreateRequestedArray (<br> | |
4145 | <a href="#ipp_t">ipp_t</a> *request<br> | |
4146 | );</p> | |
4147 | <h4 class="parameters">Parameters</h4> | |
4148 | <dl> | |
4149 | <dt>request</dt> | |
4150 | <dd class="description">IPP request</dd> | |
4151 | </dl> | |
4152 | <h4 class="returnvalue">Return Value</h4> | |
4153 | <p class="description">CUPS array or <code>NULL</code> if all</p> | |
4154 | <h4 class="discussion">Discussion</h4> | |
4155 | <p class="discussion">This function creates a (sorted) CUPS array of attribute names matching the | |
4156 | list of "requested-attribute" values supplied in an IPP request. All IANA- | |
4157 | registered values are supported in addition to the CUPS IPP extension | |
4158 | attributes.<br> | |
4159 | <br> | |
4160 | The <code>request</code> parameter specifies the request message that was read from | |
4161 | the client. | |
4162 | ||
4163 | <code>NULL</code> is returned if all attributes should be returned. Otherwise, the | |
4164 | result is a sorted array of attribute names, where <code>cupsArrayFind(array, | |
4165 | "attribute-name")</code> will return a non-NULL pointer. The array must be freed | |
4166 | using the <code>cupsArrayDelete</code> function. | |
4167 | ||
a2326b5b | 4168 | </p> |
5a738aea MS |
4169 | <h3 class="function"><a name="ippDateToTime">ippDateToTime</a></h3> |
4170 | <p class="description">Convert from RFC 1903 Date/Time format to UNIX time | |
4171 | in seconds.</p> | |
4172 | <p class="code"> | |
4173 | time_t ippDateToTime (<br> | |
4174 | const <a href="#ipp_uchar_t">ipp_uchar_t</a> *date<br> | |
4175 | );</p> | |
4176 | <h4 class="parameters">Parameters</h4> | |
4177 | <dl> | |
4178 | <dt>date</dt> | |
4179 | <dd class="description">RFC 1903 date info</dd> | |
4180 | </dl> | |
4181 | <h4 class="returnvalue">Return Value</h4> | |
4182 | <p class="description">UNIX time value</p> | |
4183 | <h3 class="function"><a name="ippDelete">ippDelete</a></h3> | |
4184 | <p class="description">Delete an IPP message.</p> | |
4185 | <p class="code"> | |
4186 | void ippDelete (<br> | |
4187 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
4188 | );</p> | |
4189 | <h4 class="parameters">Parameters</h4> | |
4190 | <dl> | |
4191 | <dt>ipp</dt> | |
4192 | <dd class="description">IPP message</dd> | |
4193 | </dl> | |
f3c17241 | 4194 | <h3 class="function"><span class="info"> CUPS 1.1.19/OS X 10.3 </span><a name="ippDeleteAttribute">ippDeleteAttribute</a></h3> |
5a738aea MS |
4195 | <p class="description">Delete a single attribute in an IPP message.</p> |
4196 | <p class="code"> | |
4197 | void ippDeleteAttribute (<br> | |
4198 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
4199 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br> | |
4200 | );</p> | |
4201 | <h4 class="parameters">Parameters</h4> | |
4202 | <dl> | |
4203 | <dt>ipp</dt> | |
4204 | <dd class="description">IPP message</dd> | |
4205 | <dt>attr</dt> | |
4206 | <dd class="description">Attribute to delete</dd> | |
4207 | </dl> | |
f3c17241 | 4208 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippDeleteValues">ippDeleteValues</a></h3> |
a2326b5b MS |
4209 | <p class="description">Delete values in an attribute.</p> |
4210 | <p class="code"> | |
4211 | int ippDeleteValues (<br> | |
4212 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
3e7fe0ca | 4213 | <a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br> |
a2326b5b MS |
4214 | int element,<br> |
4215 | int count<br> | |
4216 | );</p> | |
4217 | <h4 class="parameters">Parameters</h4> | |
4218 | <dl> | |
4219 | <dt>ipp</dt> | |
4220 | <dd class="description">IPP message</dd> | |
4221 | <dt>attr</dt> | |
4222 | <dd class="description">Attribute</dd> | |
4223 | <dt>element</dt> | |
4224 | <dd class="description">Index of first value to delete (0-based)</dd> | |
4225 | <dt>count</dt> | |
4226 | <dd class="description">Number of values to delete</dd> | |
4227 | </dl> | |
4228 | <h4 class="returnvalue">Return Value</h4> | |
4229 | <p class="description">1 on success, 0 on failure</p> | |
4230 | <h4 class="discussion">Discussion</h4> | |
3e7fe0ca MS |
4231 | <p class="discussion">The <code>element</code> parameter specifies the first value to delete, starting at |
4232 | 0. It must be less than the number of values returned by <a href="#ippGetCount"><code>ippGetCount</code></a>.<br> | |
4233 | <br> | |
4234 | The <code>attr</code> parameter may be modified as a result of setting the value.<br> | |
a2326b5b MS |
4235 | <br> |
4236 | Deleting all values in an attribute deletes the attribute. | |
4237 | ||
4238 | </p> | |
4239 | <h3 class="function"><a name="ippEnumString">ippEnumString</a></h3> | |
4240 | <p class="description">Return a string corresponding to the enum value.</p> | |
4241 | <p class="code"> | |
4242 | const char *ippEnumString (<br> | |
4243 | const char *attrname,<br> | |
4244 | int enumvalue<br> | |
4245 | );</p> | |
4246 | <h4 class="parameters">Parameters</h4> | |
4247 | <dl> | |
4248 | <dt>attrname</dt> | |
4249 | <dd class="description">Attribute name</dd> | |
4250 | <dt>enumvalue</dt> | |
4251 | <dd class="description">Enum value</dd> | |
4252 | </dl> | |
4253 | <h4 class="returnvalue">Return Value</h4> | |
4254 | <p class="description">Enum string</p> | |
4255 | <h3 class="function"><a name="ippEnumValue">ippEnumValue</a></h3> | |
4256 | <p class="description">Return the value associated with a given enum string.</p> | |
4257 | <p class="code"> | |
4258 | int ippEnumValue (<br> | |
4259 | const char *attrname,<br> | |
4260 | const char *enumstring<br> | |
4261 | );</p> | |
4262 | <h4 class="parameters">Parameters</h4> | |
4263 | <dl> | |
4264 | <dt>attrname</dt> | |
4265 | <dd class="description">Attribute name</dd> | |
4266 | <dt>enumstring</dt> | |
4267 | <dd class="description">Enum string</dd> | |
4268 | </dl> | |
4269 | <h4 class="returnvalue">Return Value</h4> | |
4270 | <p class="description">Enum value or -1 if unknown</p> | |
5a738aea MS |
4271 | <h3 class="function"><a name="ippErrorString">ippErrorString</a></h3> |
4272 | <p class="description">Return a name for the given status code.</p> | |
4273 | <p class="code"> | |
4274 | const char *ippErrorString (<br> | |
4275 | ipp_status_t error<br> | |
4276 | );</p> | |
4277 | <h4 class="parameters">Parameters</h4> | |
4278 | <dl> | |
4279 | <dt>error</dt> | |
4280 | <dd class="description">Error status</dd> | |
4281 | </dl> | |
4282 | <h4 class="returnvalue">Return Value</h4> | |
4283 | <p class="description">Text string</p> | |
f3c17241 | 4284 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="ippErrorValue">ippErrorValue</a></h3> |
5a738aea MS |
4285 | <p class="description">Return a status code for the given name.</p> |
4286 | <p class="code"> | |
4287 | ipp_status_t ippErrorValue (<br> | |
4288 | const char *name<br> | |
4289 | );</p> | |
4290 | <h4 class="parameters">Parameters</h4> | |
4291 | <dl> | |
4292 | <dt>name</dt> | |
4293 | <dd class="description">Name</dd> | |
4294 | </dl> | |
4295 | <h4 class="returnvalue">Return Value</h4> | |
4296 | <p class="description">IPP status code</p> | |
4297 | <h3 class="function"><a name="ippFindAttribute">ippFindAttribute</a></h3> | |
3e7fe0ca | 4298 | <p class="description">Find a named attribute in a request.</p> |
5a738aea MS |
4299 | <p class="code"> |
4300 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippFindAttribute (<br> | |
4301 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
4302 | const char *name,<br> | |
a2326b5b | 4303 | ipp_tag_t type<br> |
5a738aea MS |
4304 | );</p> |
4305 | <h4 class="parameters">Parameters</h4> | |
4306 | <dl> | |
4307 | <dt>ipp</dt> | |
4308 | <dd class="description">IPP message</dd> | |
4309 | <dt>name</dt> | |
4310 | <dd class="description">Name of attribute</dd> | |
4311 | <dt>type</dt> | |
4312 | <dd class="description">Type of attribute</dd> | |
4313 | </dl> | |
4314 | <h4 class="returnvalue">Return Value</h4> | |
4315 | <p class="description">Matching attribute</p> | |
4316 | <h3 class="function"><a name="ippFindNextAttribute">ippFindNextAttribute</a></h3> | |
3e7fe0ca | 4317 | <p class="description">Find the next named attribute in a request.</p> |
5a738aea MS |
4318 | <p class="code"> |
4319 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippFindNextAttribute (<br> | |
4320 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
4321 | const char *name,<br> | |
a2326b5b | 4322 | ipp_tag_t type<br> |
5a738aea MS |
4323 | );</p> |
4324 | <h4 class="parameters">Parameters</h4> | |
4325 | <dl> | |
4326 | <dt>ipp</dt> | |
4327 | <dd class="description">IPP message</dd> | |
4328 | <dt>name</dt> | |
4329 | <dd class="description">Name of attribute</dd> | |
4330 | <dt>type</dt> | |
4331 | <dd class="description">Type of attribute</dd> | |
4332 | </dl> | |
4333 | <h4 class="returnvalue">Return Value</h4> | |
4334 | <p class="description">Matching attribute</p> | |
f3c17241 | 4335 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippFirstAttribute">ippFirstAttribute</a></h3> |
a2326b5b | 4336 | <p class="description">Return the first attribute in the message.</p> |
5a738aea | 4337 | <p class="code"> |
a2326b5b | 4338 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippFirstAttribute (<br> |
5a738aea MS |
4339 | <a href="#ipp_t">ipp_t</a> *ipp<br> |
4340 | );</p> | |
4341 | <h4 class="parameters">Parameters</h4> | |
4342 | <dl> | |
4343 | <dt>ipp</dt> | |
4344 | <dd class="description">IPP message</dd> | |
4345 | </dl> | |
4346 | <h4 class="returnvalue">Return Value</h4> | |
a2326b5b | 4347 | <p class="description">First attribute or <code>NULL</code> if none</p> |
f3c17241 | 4348 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippGetBoolean">ippGetBoolean</a></h3> |
a2326b5b | 4349 | <p class="description">Get a boolean value for an attribute.</p> |
5a738aea | 4350 | <p class="code"> |
a2326b5b MS |
4351 | int ippGetBoolean (<br> |
4352 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br> | |
4353 | int element<br> | |
5a738aea MS |
4354 | );</p> |
4355 | <h4 class="parameters">Parameters</h4> | |
4356 | <dl> | |
a2326b5b MS |
4357 | <dt>attr</dt> |
4358 | <dd class="description">IPP attribute</dd> | |
4359 | <dt>element</dt> | |
4360 | <dd class="description">Value number (0-based)</dd> | |
5a738aea MS |
4361 | </dl> |
4362 | <h4 class="returnvalue">Return Value</h4> | |
a2326b5b | 4363 | <p class="description">Boolean value or -1 on error</p> |
5a738aea | 4364 | <h4 class="discussion">Discussion</h4> |
a2326b5b MS |
4365 | <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to |
4366 | <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1. | |
ecdc0628 | 4367 | |
5a738aea | 4368 | </p> |
f3c17241 | 4369 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippGetCollection">ippGetCollection</a></h3> |
a2326b5b | 4370 | <p class="description">Get a collection value for an attribute.</p> |
5a738aea | 4371 | <p class="code"> |
a2326b5b MS |
4372 | <a href="#ipp_t">ipp_t</a> *ippGetCollection (<br> |
4373 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br> | |
4374 | int element<br> | |
5a738aea MS |
4375 | );</p> |
4376 | <h4 class="parameters">Parameters</h4> | |
4377 | <dl> | |
a2326b5b MS |
4378 | <dt>attr</dt> |
4379 | <dd class="description">IPP attribute</dd> | |
4380 | <dt>element</dt> | |
4381 | <dd class="description">Value number (0-based)</dd> | |
5a738aea MS |
4382 | </dl> |
4383 | <h4 class="returnvalue">Return Value</h4> | |
a2326b5b MS |
4384 | <p class="description">Collection value or <code>NULL</code> on error</p> |
4385 | <h4 class="discussion">Discussion</h4> | |
4386 | <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to | |
4387 | <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1. | |
4388 | ||
4389 | </p> | |
f3c17241 | 4390 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippGetCount">ippGetCount</a></h3> |
a2326b5b | 4391 | <p class="description">Get the number of values in an attribute.</p> |
5a738aea | 4392 | <p class="code"> |
a2326b5b MS |
4393 | int ippGetCount (<br> |
4394 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br> | |
5a738aea MS |
4395 | );</p> |
4396 | <h4 class="parameters">Parameters</h4> | |
4397 | <dl> | |
a2326b5b MS |
4398 | <dt>attr</dt> |
4399 | <dd class="description">IPP attribute</dd> | |
5a738aea MS |
4400 | </dl> |
4401 | <h4 class="returnvalue">Return Value</h4> | |
a2326b5b | 4402 | <p class="description">Number of values or -1 on error</p> |
f3c17241 | 4403 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippGetDate">ippGetDate</a></h3> |
3e7fe0ca MS |
4404 | <p class="description">Get a date value for an attribute.</p> |
4405 | <p class="code"> | |
4406 | const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippGetDate (<br> | |
4407 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br> | |
4408 | int element<br> | |
4409 | );</p> | |
4410 | <h4 class="parameters">Parameters</h4> | |
4411 | <dl> | |
4412 | <dt>attr</dt> | |
4413 | <dd class="description">IPP attribute</dd> | |
4414 | <dt>element</dt> | |
4415 | <dd class="description">Value number (0-based)</dd> | |
4416 | </dl> | |
4417 | <h4 class="returnvalue">Return Value</h4> | |
4418 | <p class="description">Date value or <code>NULL</code></p> | |
4419 | <h4 class="discussion">Discussion</h4> | |
4420 | <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to | |
4421 | <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1. | |
4422 | ||
4423 | </p> | |
f3c17241 | 4424 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippGetGroupTag">ippGetGroupTag</a></h3> |
a2326b5b | 4425 | <p class="description">Get the group associated with an attribute.</p> |
5a738aea | 4426 | <p class="code"> |
a2326b5b MS |
4427 | ipp_tag_t ippGetGroupTag (<br> |
4428 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br> | |
4429 | );</p> | |
4430 | <h4 class="parameters">Parameters</h4> | |
4431 | <dl> | |
4432 | <dt>attr</dt> | |
4433 | <dd class="description">IPP attribute</dd> | |
4434 | </dl> | |
5a738aea | 4435 | <h4 class="returnvalue">Return Value</h4> |
a2326b5b | 4436 | <p class="description">Group tag or <code>IPP_TAG_ZERO</code> on error</p> |
f3c17241 | 4437 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippGetInteger">ippGetInteger</a></h3> |
a2326b5b | 4438 | <p class="description">Get the integer/enum value for an attribute.</p> |
5a738aea | 4439 | <p class="code"> |
a2326b5b MS |
4440 | int ippGetInteger (<br> |
4441 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br> | |
4442 | int element<br> | |
5a738aea MS |
4443 | );</p> |
4444 | <h4 class="parameters">Parameters</h4> | |
4445 | <dl> | |
a2326b5b MS |
4446 | <dt>attr</dt> |
4447 | <dd class="description">IPP attribute</dd> | |
4448 | <dt>element</dt> | |
4449 | <dd class="description">Value number (0-based)</dd> | |
5a738aea MS |
4450 | </dl> |
4451 | <h4 class="returnvalue">Return Value</h4> | |
a2326b5b MS |
4452 | <p class="description">Value or -1 on error</p> |
4453 | <h4 class="discussion">Discussion</h4> | |
4454 | <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to | |
4455 | <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1. | |
4456 | ||
4457 | </p> | |
f3c17241 | 4458 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippGetName">ippGetName</a></h3> |
a2326b5b | 4459 | <p class="description">Get the attribute name.</p> |
5a738aea | 4460 | <p class="code"> |
a2326b5b MS |
4461 | const char *ippGetName (<br> |
4462 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br> | |
5a738aea MS |
4463 | );</p> |
4464 | <h4 class="parameters">Parameters</h4> | |
4465 | <dl> | |
a2326b5b MS |
4466 | <dt>attr</dt> |
4467 | <dd class="description">IPP attribute</dd> | |
5a738aea MS |
4468 | </dl> |
4469 | <h4 class="returnvalue">Return Value</h4> | |
a2326b5b | 4470 | <p class="description">Attribute name or <code>NULL</code> for separators</p> |
9c0e8e5d | 4471 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="ippGetOctetString">ippGetOctetString</a></h3> |
6961465f MS |
4472 | <p class="description">Get an octetString value from an IPP attribute.</p> |
4473 | <p class="code"> | |
4474 | void *ippGetOctetString (<br> | |
4475 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br> | |
4476 | int element,<br> | |
4477 | int *datalen<br> | |
4478 | );</p> | |
4479 | <h4 class="parameters">Parameters</h4> | |
4480 | <dl> | |
4481 | <dt>attr</dt> | |
4482 | <dd class="description">IPP attribute</dd> | |
4483 | <dt>element</dt> | |
4484 | <dd class="description">Value number (0-based)</dd> | |
4485 | <dt>datalen</dt> | |
4486 | <dd class="description">Length of octetString data</dd> | |
4487 | </dl> | |
4488 | <h4 class="returnvalue">Return Value</h4> | |
4489 | <p class="description">Pointer to octetString data</p> | |
4490 | <h4 class="discussion">Discussion</h4> | |
4491 | <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to | |
4492 | <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1. | |
4493 | ||
4494 | </p> | |
f3c17241 | 4495 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippGetOperation">ippGetOperation</a></h3> |
a2326b5b | 4496 | <p class="description">Get the operation ID in an IPP message.</p> |
5a738aea | 4497 | <p class="code"> |
a2326b5b | 4498 | ipp_op_t ippGetOperation (<br> |
5a738aea MS |
4499 | <a href="#ipp_t">ipp_t</a> *ipp<br> |
4500 | );</p> | |
4501 | <h4 class="parameters">Parameters</h4> | |
4502 | <dl> | |
5a738aea | 4503 | <dt>ipp</dt> |
a2326b5b | 4504 | <dd class="description">IPP request message</dd> |
5a738aea MS |
4505 | </dl> |
4506 | <h4 class="returnvalue">Return Value</h4> | |
a2326b5b | 4507 | <p class="description">Operation ID or -1 on error</p> |
f3c17241 | 4508 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippGetRange">ippGetRange</a></h3> |
3e7fe0ca MS |
4509 | <p class="description">Get a rangeOfInteger value from an attribute.</p> |
4510 | <p class="code"> | |
4511 | int ippGetRange (<br> | |
4512 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br> | |
4513 | int element,<br> | |
4514 | int *uppervalue<br> | |
4515 | );</p> | |
4516 | <h4 class="parameters">Parameters</h4> | |
4517 | <dl> | |
4518 | <dt>attr</dt> | |
4519 | <dd class="description">IPP attribute</dd> | |
4520 | <dt>element</dt> | |
4521 | <dd class="description">Value number (0-based)</dd> | |
4522 | <dt>uppervalue</dt> | |
4523 | <dd class="description">Upper value of range</dd> | |
4524 | </dl> | |
4525 | <h4 class="returnvalue">Return Value</h4> | |
4526 | <p class="description">Lower value of range or -1</p> | |
4527 | <h4 class="discussion">Discussion</h4> | |
4528 | <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to | |
4529 | <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1. | |
4530 | ||
4531 | </p> | |
f3c17241 | 4532 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippGetRequestId">ippGetRequestId</a></h3> |
a2326b5b | 4533 | <p class="description">Get the request ID from an IPP message.</p> |
5a738aea | 4534 | <p class="code"> |
a2326b5b MS |
4535 | int ippGetRequestId (<br> |
4536 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
5a738aea MS |
4537 | );</p> |
4538 | <h4 class="parameters">Parameters</h4> | |
4539 | <dl> | |
a2326b5b MS |
4540 | <dt>ipp</dt> |
4541 | <dd class="description">IPP message</dd> | |
5a738aea | 4542 | </dl> |
a2326b5b MS |
4543 | <h4 class="returnvalue">Return Value</h4> |
4544 | <p class="description">Request ID or -1 on error</p> | |
f3c17241 | 4545 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippGetResolution">ippGetResolution</a></h3> |
a2326b5b MS |
4546 | <p class="description">Get a resolution value for an attribute.</p> |
4547 | <p class="code"> | |
4548 | int ippGetResolution (<br> | |
4549 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br> | |
4550 | int element,<br> | |
4551 | int *yres,<br> | |
4552 | <a href="#ipp_res_t">ipp_res_t</a> *units<br> | |
06d4e77b MS |
4553 | );</p> |
4554 | <h4 class="parameters">Parameters</h4> | |
4555 | <dl> | |
a2326b5b MS |
4556 | <dt>attr</dt> |
4557 | <dd class="description">IPP attribute</dd> | |
4558 | <dt>element</dt> | |
4559 | <dd class="description">Value number (0-based)</dd> | |
4560 | <dt>yres</dt> | |
4561 | <dd class="description">Vertical/feed resolution</dd> | |
4562 | <dt>units</dt> | |
4563 | <dd class="description">Units for resolution</dd> | |
4564 | </dl> | |
4565 | <h4 class="returnvalue">Return Value</h4> | |
4566 | <p class="description">Horizontal/cross feed resolution or -1</p> | |
4567 | <h4 class="discussion">Discussion</h4> | |
4568 | <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to | |
4569 | <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1. | |
4570 | ||
4571 | </p> | |
f3c17241 | 4572 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippGetState">ippGetState</a></h3> |
3e7fe0ca MS |
4573 | <p class="description">Get the IPP message state.</p> |
4574 | <p class="code"> | |
4575 | <a href="#ipp_state_t">ipp_state_t</a> ippGetState (<br> | |
4576 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
4577 | );</p> | |
4578 | <h4 class="parameters">Parameters</h4> | |
4579 | <dl> | |
4580 | <dt>ipp</dt> | |
4581 | <dd class="description">IPP message</dd> | |
4582 | </dl> | |
4583 | <h4 class="returnvalue">Return Value</h4> | |
4584 | <p class="description">IPP message state value</p> | |
f3c17241 | 4585 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippGetStatusCode">ippGetStatusCode</a></h3> |
a2326b5b MS |
4586 | <p class="description">Get the status code from an IPP response or event message.</p> |
4587 | <p class="code"> | |
4588 | ipp_status_t ippGetStatusCode (<br> | |
4589 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
4590 | );</p> | |
4591 | <h4 class="parameters">Parameters</h4> | |
4592 | <dl> | |
4593 | <dt>ipp</dt> | |
4594 | <dd class="description">IPP response or event message</dd> | |
4595 | </dl> | |
4596 | <h4 class="returnvalue">Return Value</h4> | |
4597 | <p class="description">Status code in IPP message</p> | |
4598 | <h3 class="function"><a name="ippGetString">ippGetString</a></h3> | |
4599 | <p class="description">Return the value...</p> | |
4600 | <p class="code"> | |
4601 | const char *ippGetString (<br> | |
4602 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br> | |
4603 | int element,<br> | |
4604 | const char **language<br> | |
4605 | );</p> | |
4606 | <h4 class="parameters">Parameters</h4> | |
4607 | <dl> | |
4608 | <dt>attr</dt> | |
4609 | <dd class="description">IPP attribute</dd> | |
4610 | <dt>element</dt> | |
4611 | <dd class="description">Value number (0-based)</dd> | |
4612 | <dt>language</dt> | |
4613 | <dd class="description">Language code (<code>NULL</code> for don't care)</dd> | |
4614 | </dl> | |
4615 | <h4 class="returnvalue">Return Value</h4> | |
4616 | <p class="description">Get the string and optionally the language code for an attribute.</p> | |
4617 | <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to | |
4618 | <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1. | |
4619 | ||
4620 | </p> | |
f3c17241 | 4621 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippGetValueTag">ippGetValueTag</a></h3> |
a2326b5b MS |
4622 | <p class="description">Get the value tag for an attribute.</p> |
4623 | <p class="code"> | |
4624 | ipp_tag_t ippGetValueTag (<br> | |
4625 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br> | |
4626 | );</p> | |
4627 | <h4 class="parameters">Parameters</h4> | |
4628 | <dl> | |
4629 | <dt>attr</dt> | |
4630 | <dd class="description">IPP attribute</dd> | |
4631 | </dl> | |
4632 | <h4 class="returnvalue">Return Value</h4> | |
4633 | <p class="description">Value tag or <code>IPP_TAG_ZERO</code> on error</p> | |
f3c17241 | 4634 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippGetVersion">ippGetVersion</a></h3> |
a2326b5b MS |
4635 | <p class="description">Get the major and minor version number from an IPP message.</p> |
4636 | <p class="code"> | |
4637 | int ippGetVersion (<br> | |
4638 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
4639 | int *minor<br> | |
4640 | );</p> | |
4641 | <h4 class="parameters">Parameters</h4> | |
4642 | <dl> | |
4643 | <dt>ipp</dt> | |
4644 | <dd class="description">IPP message</dd> | |
4645 | <dt>minor</dt> | |
4646 | <dd class="description">Minor version number or <code>NULL</code></dd> | |
4647 | </dl> | |
4648 | <h4 class="returnvalue">Return Value</h4> | |
4649 | <p class="description">Major version number or -1 on error</p> | |
4650 | <h3 class="function"><a name="ippLength">ippLength</a></h3> | |
4651 | <p class="description">Compute the length of an IPP message.</p> | |
4652 | <p class="code"> | |
4653 | size_t ippLength (<br> | |
4654 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
4655 | );</p> | |
4656 | <h4 class="parameters">Parameters</h4> | |
4657 | <dl> | |
4658 | <dt>ipp</dt> | |
4659 | <dd class="description">IPP message</dd> | |
4660 | </dl> | |
4661 | <h4 class="returnvalue">Return Value</h4> | |
4662 | <p class="description">Size of IPP message</p> | |
4663 | <h3 class="function"><a name="ippNew">ippNew</a></h3> | |
4664 | <p class="description">Allocate a new IPP message.</p> | |
4665 | <p class="code"> | |
4666 | <a href="#ipp_t">ipp_t</a> *ippNew (void);</p> | |
4667 | <h4 class="returnvalue">Return Value</h4> | |
4668 | <p class="description">New IPP message</p> | |
f3c17241 | 4669 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="ippNewRequest">ippNewRequest</a></h3> |
a2326b5b MS |
4670 | <p class="description">Allocate a new IPP request message.</p> |
4671 | <p class="code"> | |
4672 | <a href="#ipp_t">ipp_t</a> *ippNewRequest (<br> | |
4673 | ipp_op_t op<br> | |
4674 | );</p> | |
4675 | <h4 class="parameters">Parameters</h4> | |
4676 | <dl> | |
4677 | <dt>op</dt> | |
4678 | <dd class="description">Operation code</dd> | |
4679 | </dl> | |
4680 | <h4 class="returnvalue">Return Value</h4> | |
4681 | <p class="description">IPP request message</p> | |
4682 | <h4 class="discussion">Discussion</h4> | |
4683 | <p class="discussion">The new request message is initialized with the attributes-charset and | |
4684 | attributes-natural-language attributes added. The | |
4685 | attributes-natural-language value is derived from the current locale. | |
4686 | ||
a469f8a5 | 4687 | </p> |
9c0e8e5d | 4688 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="ippNewResponse">ippNewResponse</a></h3> |
a469f8a5 MS |
4689 | <p class="description">Allocate a new IPP response message.</p> |
4690 | <p class="code"> | |
4691 | <a href="#ipp_t">ipp_t</a> *ippNewResponse (<br> | |
4692 | <a href="#ipp_t">ipp_t</a> *request<br> | |
4693 | );</p> | |
4694 | <h4 class="parameters">Parameters</h4> | |
4695 | <dl> | |
4696 | <dt>request</dt> | |
4697 | <dd class="description">IPP request message</dd> | |
4698 | </dl> | |
4699 | <h4 class="returnvalue">Return Value</h4> | |
4700 | <p class="description">IPP response message</p> | |
4701 | <h4 class="discussion">Discussion</h4> | |
4702 | <p class="discussion">The new response message is initialized with the same version-number, | |
4703 | request-id, attributes-charset, and attributes-natural-language as the | |
4704 | provided request message. If the attributes-charset or | |
4705 | attributes-natural-language attributes are missing from the request, | |
4706 | "utf-8" and a value derived from the current locale are substituted, | |
4707 | respectively. | |
4708 | ||
a2326b5b | 4709 | </p> |
f3c17241 | 4710 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippNextAttribute">ippNextAttribute</a></h3> |
a2326b5b MS |
4711 | <p class="description">Return the next attribute in the message.</p> |
4712 | <p class="code"> | |
4713 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippNextAttribute (<br> | |
4714 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
4715 | );</p> | |
4716 | <h4 class="parameters">Parameters</h4> | |
4717 | <dl> | |
4718 | <dt>ipp</dt> | |
4719 | <dd class="description">IPP message</dd> | |
4720 | </dl> | |
4721 | <h4 class="returnvalue">Return Value</h4> | |
4722 | <p class="description">Next attribute or <code>NULL</code> if none</p> | |
f3c17241 | 4723 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="ippOpString">ippOpString</a></h3> |
a2326b5b MS |
4724 | <p class="description">Return a name for the given operation id.</p> |
4725 | <p class="code"> | |
4726 | const char *ippOpString (<br> | |
4727 | ipp_op_t op<br> | |
4728 | );</p> | |
4729 | <h4 class="parameters">Parameters</h4> | |
4730 | <dl> | |
4731 | <dt>op</dt> | |
4732 | <dd class="description">Operation ID</dd> | |
4733 | </dl> | |
4734 | <h4 class="returnvalue">Return Value</h4> | |
4735 | <p class="description">Name</p> | |
f3c17241 | 4736 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="ippOpValue">ippOpValue</a></h3> |
a2326b5b MS |
4737 | <p class="description">Return an operation id for the given name.</p> |
4738 | <p class="code"> | |
4739 | ipp_op_t ippOpValue (<br> | |
4740 | const char *name<br> | |
4741 | );</p> | |
4742 | <h4 class="parameters">Parameters</h4> | |
4743 | <dl> | |
4744 | <dt>name</dt> | |
4745 | <dd class="description">Textual name</dd> | |
4746 | </dl> | |
4747 | <h4 class="returnvalue">Return Value</h4> | |
4748 | <p class="description">Operation ID</p> | |
4749 | <h3 class="function"><a name="ippPort">ippPort</a></h3> | |
4750 | <p class="description">Return the default IPP port number.</p> | |
4751 | <p class="code"> | |
4752 | int ippPort (void);</p> | |
4753 | <h4 class="returnvalue">Return Value</h4> | |
4754 | <p class="description">Port number</p> | |
4755 | <h3 class="function"><a name="ippRead">ippRead</a></h3> | |
4756 | <p class="description">Read data for an IPP message from a HTTP connection.</p> | |
4757 | <p class="code"> | |
4758 | <a href="#ipp_state_t">ipp_state_t</a> ippRead (<br> | |
4759 | <a href="#http_t">http_t</a> *http,<br> | |
4760 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
4761 | );</p> | |
4762 | <h4 class="parameters">Parameters</h4> | |
4763 | <dl> | |
4764 | <dt>http</dt> | |
4765 | <dd class="description">HTTP connection</dd> | |
4766 | <dt>ipp</dt> | |
4767 | <dd class="description">IPP data</dd> | |
4768 | </dl> | |
4769 | <h4 class="returnvalue">Return Value</h4> | |
4770 | <p class="description">Current state</p> | |
f3c17241 | 4771 | <h3 class="function"><span class="info"> CUPS 1.1.19/OS X 10.3 </span><a name="ippReadFile">ippReadFile</a></h3> |
a2326b5b MS |
4772 | <p class="description">Read data for an IPP message from a file.</p> |
4773 | <p class="code"> | |
4774 | <a href="#ipp_state_t">ipp_state_t</a> ippReadFile (<br> | |
4775 | int fd,<br> | |
4776 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
4777 | );</p> | |
4778 | <h4 class="parameters">Parameters</h4> | |
4779 | <dl> | |
4780 | <dt>fd</dt> | |
4781 | <dd class="description">HTTP data</dd> | |
4782 | <dt>ipp</dt> | |
4783 | <dd class="description">IPP data</dd> | |
4784 | </dl> | |
4785 | <h4 class="returnvalue">Return Value</h4> | |
4786 | <p class="description">Current state</p> | |
f3c17241 | 4787 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="ippReadIO">ippReadIO</a></h3> |
a2326b5b MS |
4788 | <p class="description">Read data for an IPP message.</p> |
4789 | <p class="code"> | |
4790 | <a href="#ipp_state_t">ipp_state_t</a> ippReadIO (<br> | |
4791 | void *src,<br> | |
4792 | <a href="#ipp_iocb_t">ipp_iocb_t</a> cb,<br> | |
4793 | int blocking,<br> | |
4794 | <a href="#ipp_t">ipp_t</a> *parent,<br> | |
4795 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
4796 | );</p> | |
4797 | <h4 class="parameters">Parameters</h4> | |
4798 | <dl> | |
4799 | <dt>src</dt> | |
4800 | <dd class="description">Data source</dd> | |
4801 | <dt>cb</dt> | |
4802 | <dd class="description">Read callback function</dd> | |
4803 | <dt>blocking</dt> | |
4804 | <dd class="description">Use blocking IO?</dd> | |
4805 | <dt>parent</dt> | |
4806 | <dd class="description">Parent request, if any</dd> | |
4807 | <dt>ipp</dt> | |
4808 | <dd class="description">IPP data</dd> | |
4809 | </dl> | |
4810 | <h4 class="returnvalue">Return Value</h4> | |
4811 | <p class="description">Current state</p> | |
f3c17241 | 4812 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippSetBoolean">ippSetBoolean</a></h3> |
a2326b5b MS |
4813 | <p class="description">Set a boolean value in an attribute.</p> |
4814 | <p class="code"> | |
4815 | int ippSetBoolean (<br> | |
4816 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
4817 | <a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br> | |
4818 | int element,<br> | |
4819 | int boolvalue<br> | |
4820 | );</p> | |
4821 | <h4 class="parameters">Parameters</h4> | |
4822 | <dl> | |
4823 | <dt>ipp</dt> | |
4824 | <dd class="description">IPP message</dd> | |
4825 | <dt>attr</dt> | |
4826 | <dd class="description">IPP attribute</dd> | |
4827 | <dt>element</dt> | |
4828 | <dd class="description">Value number (0-based)</dd> | |
4829 | <dt>boolvalue</dt> | |
4830 | <dd class="description">Boolean value</dd> | |
4831 | </dl> | |
4832 | <h4 class="returnvalue">Return Value</h4> | |
4833 | <p class="description">1 on success, 0 on failure</p> | |
4834 | <h4 class="discussion">Discussion</h4> | |
a469f8a5 MS |
4835 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
4836 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
4837 | <br> |
4838 | The <code>attr</code> parameter may be modified as a result of setting the value.<br> | |
4839 | <br> | |
4840 | The <code>element</code> parameter specifies which value to set from 0 to | |
4841 | <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>. | |
4842 | ||
4843 | </p> | |
f3c17241 | 4844 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippSetCollection">ippSetCollection</a></h3> |
a2326b5b MS |
4845 | <p class="description">Set a collection value in an attribute.</p> |
4846 | <p class="code"> | |
4847 | int ippSetCollection (<br> | |
4848 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
4849 | <a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br> | |
4850 | int element,<br> | |
4851 | <a href="#ipp_t">ipp_t</a> *colvalue<br> | |
4852 | );</p> | |
4853 | <h4 class="parameters">Parameters</h4> | |
4854 | <dl> | |
4855 | <dt>ipp</dt> | |
4856 | <dd class="description">IPP message</dd> | |
4857 | <dt>attr</dt> | |
4858 | <dd class="description">IPP attribute</dd> | |
4859 | <dt>element</dt> | |
4860 | <dd class="description">Value number (0-based)</dd> | |
4861 | <dt>colvalue</dt> | |
4862 | <dd class="description">Collection value</dd> | |
4863 | </dl> | |
4864 | <h4 class="returnvalue">Return Value</h4> | |
4865 | <p class="description">1 on success, 0 on failure</p> | |
4866 | <h4 class="discussion">Discussion</h4> | |
a469f8a5 MS |
4867 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
4868 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
4869 | <br> |
4870 | The <code>attr</code> parameter may be modified as a result of setting the value.<br> | |
4871 | <br> | |
4872 | The <code>element</code> parameter specifies which value to set from 0 to | |
4873 | <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>. | |
4874 | ||
3e7fe0ca | 4875 | </p> |
f3c17241 | 4876 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippSetDate">ippSetDate</a></h3> |
3e7fe0ca MS |
4877 | <p class="description">Set a date value in an attribute.</p> |
4878 | <p class="code"> | |
4879 | int ippSetDate (<br> | |
4880 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
4881 | <a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br> | |
4882 | int element,<br> | |
4883 | const <a href="#ipp_uchar_t">ipp_uchar_t</a> *datevalue<br> | |
4884 | );</p> | |
4885 | <h4 class="parameters">Parameters</h4> | |
4886 | <dl> | |
4887 | <dt>ipp</dt> | |
4888 | <dd class="description">IPP message</dd> | |
4889 | <dt>attr</dt> | |
4890 | <dd class="description">IPP attribute</dd> | |
4891 | <dt>element</dt> | |
4892 | <dd class="description">Value number (0-based)</dd> | |
4893 | <dt>datevalue</dt> | |
4894 | <dd class="description">Date value</dd> | |
4895 | </dl> | |
4896 | <h4 class="returnvalue">Return Value</h4> | |
4897 | <p class="description">1 on success, 0 on failure</p> | |
4898 | <h4 class="discussion">Discussion</h4> | |
a469f8a5 MS |
4899 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
4900 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
3e7fe0ca MS |
4901 | <br> |
4902 | The <code>attr</code> parameter may be modified as a result of setting the value.<br> | |
4903 | <br> | |
4904 | The <code>element</code> parameter specifies which value to set from 0 to | |
4905 | <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>. | |
4906 | ||
a2326b5b | 4907 | </p> |
f3c17241 | 4908 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippSetGroupTag">ippSetGroupTag</a></h3> |
a2326b5b MS |
4909 | <p class="description">Set the group tag of an attribute.</p> |
4910 | <p class="code"> | |
4911 | int ippSetGroupTag (<br> | |
4912 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
4913 | <a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br> | |
4914 | ipp_tag_t group_tag<br> | |
4915 | );</p> | |
4916 | <h4 class="parameters">Parameters</h4> | |
4917 | <dl> | |
4918 | <dt>ipp</dt> | |
4919 | <dd class="description">IPP message</dd> | |
4920 | <dt>attr</dt> | |
4921 | <dd class="description">Attribute</dd> | |
4922 | <dt>group_tag</dt> | |
4923 | <dd class="description">Group tag</dd> | |
4924 | </dl> | |
4925 | <h4 class="returnvalue">Return Value</h4> | |
4926 | <p class="description">1 on success, 0 on failure</p> | |
4927 | <h4 class="discussion">Discussion</h4> | |
a469f8a5 MS |
4928 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
4929 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
4930 | <br> |
4931 | The <code>attr</code> parameter may be modified as a result of setting the value.<br> | |
4932 | <br> | |
4933 | The <code>group</code> parameter specifies the IPP attribute group tag: none | |
4934 | (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>), | |
4935 | event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation | |
4936 | (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription | |
4937 | (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>). | |
4938 | ||
4939 | </p> | |
f3c17241 | 4940 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippSetInteger">ippSetInteger</a></h3> |
a2326b5b MS |
4941 | <p class="description">Set an integer or enum value in an attribute.</p> |
4942 | <p class="code"> | |
4943 | int ippSetInteger (<br> | |
4944 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
4945 | <a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br> | |
4946 | int element,<br> | |
4947 | int intvalue<br> | |
4948 | );</p> | |
4949 | <h4 class="parameters">Parameters</h4> | |
4950 | <dl> | |
4951 | <dt>ipp</dt> | |
4952 | <dd class="description">IPP message</dd> | |
4953 | <dt>attr</dt> | |
4954 | <dd class="description">IPP attribute</dd> | |
4955 | <dt>element</dt> | |
4956 | <dd class="description">Value number (0-based)</dd> | |
4957 | <dt>intvalue</dt> | |
4958 | <dd class="description">Integer/enum value</dd> | |
4959 | </dl> | |
4960 | <h4 class="returnvalue">Return Value</h4> | |
4961 | <p class="description">1 on success, 0 on failure</p> | |
4962 | <h4 class="discussion">Discussion</h4> | |
a469f8a5 MS |
4963 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
4964 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
4965 | <br> |
4966 | The <code>attr</code> parameter may be modified as a result of setting the value.<br> | |
4967 | <br> | |
4968 | The <code>element</code> parameter specifies which value to set from 0 to | |
4969 | <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>. | |
4970 | ||
4971 | </p> | |
f3c17241 | 4972 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippSetName">ippSetName</a></h3> |
a2326b5b MS |
4973 | <p class="description">Set the name of an attribute.</p> |
4974 | <p class="code"> | |
4975 | int ippSetName (<br> | |
4976 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
4977 | <a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br> | |
4978 | const char *name<br> | |
4979 | );</p> | |
4980 | <h4 class="parameters">Parameters</h4> | |
4981 | <dl> | |
4982 | <dt>ipp</dt> | |
4983 | <dd class="description">IPP message</dd> | |
4984 | <dt>attr</dt> | |
4985 | <dd class="description">IPP attribute</dd> | |
4986 | <dt>name</dt> | |
4987 | <dd class="description">Attribute name</dd> | |
4988 | </dl> | |
4989 | <h4 class="returnvalue">Return Value</h4> | |
4990 | <p class="description">1 on success, 0 on failure</p> | |
4991 | <h4 class="discussion">Discussion</h4> | |
a469f8a5 MS |
4992 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
4993 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
4994 | <br> |
4995 | The <code>attr</code> parameter may be modified as a result of setting the value. | |
4996 | ||
6961465f | 4997 | </p> |
9c0e8e5d | 4998 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="ippSetOctetString">ippSetOctetString</a></h3> |
6961465f MS |
4999 | <p class="description">Set an octetString value in an IPP attribute.</p> |
5000 | <p class="code"> | |
5001 | int ippSetOctetString (<br> | |
5002 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
5003 | <a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br> | |
5004 | int element,<br> | |
5005 | const void *data,<br> | |
5006 | int datalen<br> | |
5007 | );</p> | |
5008 | <h4 class="parameters">Parameters</h4> | |
5009 | <dl> | |
5010 | <dt>ipp</dt> | |
5011 | <dd class="description">IPP message</dd> | |
5012 | <dt>attr</dt> | |
5013 | <dd class="description">IPP attribute</dd> | |
5014 | <dt>element</dt> | |
5015 | <dd class="description">Value number (0-based)</dd> | |
5016 | <dt>data</dt> | |
5017 | <dd class="description">Pointer to octetString data</dd> | |
5018 | <dt>datalen</dt> | |
5019 | <dd class="description">Length of octetString data</dd> | |
5020 | </dl> | |
5021 | <h4 class="returnvalue">Return Value</h4> | |
5022 | <p class="description">1 on success, 0 on failure</p> | |
5023 | <h4 class="discussion">Discussion</h4> | |
5024 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using | |
5025 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
5026 | <br> | |
5027 | The <code>attr</code> parameter may be modified as a result of setting the value.<br> | |
5028 | <br> | |
5029 | The <code>element</code> parameter specifies which value to set from 0 to | |
5030 | <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>. | |
5031 | ||
a2326b5b | 5032 | </p> |
f3c17241 | 5033 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippSetOperation">ippSetOperation</a></h3> |
a2326b5b MS |
5034 | <p class="description">Set the operation ID in an IPP request message.</p> |
5035 | <p class="code"> | |
5036 | int ippSetOperation (<br> | |
5037 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
5038 | ipp_op_t op<br> | |
5039 | );</p> | |
5040 | <h4 class="parameters">Parameters</h4> | |
5041 | <dl> | |
5042 | <dt>ipp</dt> | |
5043 | <dd class="description">IPP request message</dd> | |
5044 | <dt>op</dt> | |
5045 | <dd class="description">Operation ID</dd> | |
5046 | </dl> | |
5047 | <h4 class="returnvalue">Return Value</h4> | |
5048 | <p class="description">1 on success, 0 on failure</p> | |
5049 | <h4 class="discussion">Discussion</h4> | |
a469f8a5 MS |
5050 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
5051 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions. | |
a2326b5b MS |
5052 | |
5053 | </p> | |
5054 | <h3 class="function"><a name="ippSetPort">ippSetPort</a></h3> | |
5055 | <p class="description">Set the default port number.</p> | |
5056 | <p class="code"> | |
5057 | void ippSetPort (<br> | |
5058 | int p<br> | |
5059 | );</p> | |
5060 | <h4 class="parameters">Parameters</h4> | |
5061 | <dl> | |
5062 | <dt>p</dt> | |
5063 | <dd class="description">Port number to use</dd> | |
5064 | </dl> | |
f3c17241 | 5065 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippSetRange">ippSetRange</a></h3> |
a2326b5b MS |
5066 | <p class="description">Set a rangeOfInteger value in an attribute.</p> |
5067 | <p class="code"> | |
5068 | int ippSetRange (<br> | |
5069 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
5070 | <a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br> | |
5071 | int element,<br> | |
5072 | int lowervalue,<br> | |
5073 | int uppervalue<br> | |
5074 | );</p> | |
5075 | <h4 class="parameters">Parameters</h4> | |
5076 | <dl> | |
5077 | <dt>ipp</dt> | |
5078 | <dd class="description">IPP message</dd> | |
5079 | <dt>attr</dt> | |
5080 | <dd class="description">IPP attribute</dd> | |
5081 | <dt>element</dt> | |
5082 | <dd class="description">Value number (0-based)</dd> | |
5083 | <dt>lowervalue</dt> | |
5084 | <dd class="description">Lower bound for range</dd> | |
5085 | <dt>uppervalue</dt> | |
5086 | <dd class="description">Upper bound for range</dd> | |
5087 | </dl> | |
5088 | <h4 class="returnvalue">Return Value</h4> | |
5089 | <p class="description">1 on success, 0 on failure</p> | |
5090 | <h4 class="discussion">Discussion</h4> | |
a469f8a5 MS |
5091 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
5092 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
5093 | <br> |
5094 | The <code>attr</code> parameter may be modified as a result of setting the value.<br> | |
5095 | <br> | |
5096 | The <code>element</code> parameter specifies which value to set from 0 to | |
5097 | <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>. | |
5098 | ||
5099 | </p> | |
f3c17241 | 5100 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippSetRequestId">ippSetRequestId</a></h3> |
a2326b5b MS |
5101 | <p class="description">Set the request ID in an IPP message.</p> |
5102 | <p class="code"> | |
5103 | int ippSetRequestId (<br> | |
5104 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
5105 | int request_id<br> | |
5106 | );</p> | |
5107 | <h4 class="parameters">Parameters</h4> | |
5108 | <dl> | |
5109 | <dt>ipp</dt> | |
5110 | <dd class="description">IPP message</dd> | |
5111 | <dt>request_id</dt> | |
5112 | <dd class="description">Request ID</dd> | |
5113 | </dl> | |
5114 | <h4 class="returnvalue">Return Value</h4> | |
5115 | <p class="description">1 on success, 0 on failure</p> | |
5116 | <h4 class="discussion">Discussion</h4> | |
a469f8a5 MS |
5117 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
5118 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
5119 | <br> |
5120 | The <code>request_id</code> parameter must be greater than 0. | |
5121 | ||
5122 | </p> | |
f3c17241 | 5123 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippSetResolution">ippSetResolution</a></h3> |
a2326b5b MS |
5124 | <p class="description">Set a resolution value in an attribute.</p> |
5125 | <p class="code"> | |
5126 | int ippSetResolution (<br> | |
5127 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
5128 | <a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br> | |
5129 | int element,<br> | |
5130 | <a href="#ipp_res_t">ipp_res_t</a> unitsvalue,<br> | |
5131 | int xresvalue,<br> | |
5132 | int yresvalue<br> | |
5133 | );</p> | |
5134 | <h4 class="parameters">Parameters</h4> | |
5135 | <dl> | |
5136 | <dt>ipp</dt> | |
5137 | <dd class="description">IPP message</dd> | |
5138 | <dt>attr</dt> | |
5139 | <dd class="description">IPP attribute</dd> | |
5140 | <dt>element</dt> | |
5141 | <dd class="description">Value number (0-based)</dd> | |
5142 | <dt>unitsvalue</dt> | |
5143 | <dd class="description">Resolution units</dd> | |
5144 | <dt>xresvalue</dt> | |
5145 | <dd class="description">Horizontal/cross feed resolution</dd> | |
5146 | <dt>yresvalue</dt> | |
5147 | <dd class="description">Vertical/feed resolution</dd> | |
5148 | </dl> | |
5149 | <h4 class="returnvalue">Return Value</h4> | |
5150 | <p class="description">1 on success, 0 on failure</p> | |
5151 | <h4 class="discussion">Discussion</h4> | |
a469f8a5 MS |
5152 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
5153 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
5154 | <br> |
5155 | The <code>attr</code> parameter may be modified as a result of setting the value.<br> | |
5156 | <br> | |
5157 | The <code>element</code> parameter specifies which value to set from 0 to | |
5158 | <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>. | |
5159 | ||
5160 | </p> | |
f3c17241 | 5161 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippSetState">ippSetState</a></h3> |
3e7fe0ca MS |
5162 | <p class="description">Set the current state of the IPP message.</p> |
5163 | <p class="code"> | |
5164 | int ippSetState (<br> | |
5165 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
5166 | <a href="#ipp_state_t">ipp_state_t</a> state<br> | |
5167 | );</p> | |
5168 | <h4 class="parameters">Parameters</h4> | |
5169 | <dl> | |
5170 | <dt>ipp</dt> | |
5171 | <dd class="description">IPP message</dd> | |
5172 | <dt>state</dt> | |
5173 | <dd class="description">IPP state value</dd> | |
5174 | </dl> | |
5175 | <h4 class="returnvalue">Return Value</h4> | |
5176 | <p class="description">1 on success, 0 on failure</p> | |
f3c17241 | 5177 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippSetStatusCode">ippSetStatusCode</a></h3> |
a2326b5b MS |
5178 | <p class="description">Set the status code in an IPP response or event message.</p> |
5179 | <p class="code"> | |
5180 | int ippSetStatusCode (<br> | |
5181 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
5182 | ipp_status_t status<br> | |
5183 | );</p> | |
5184 | <h4 class="parameters">Parameters</h4> | |
5185 | <dl> | |
5186 | <dt>ipp</dt> | |
5187 | <dd class="description">IPP response or event message</dd> | |
5188 | <dt>status</dt> | |
5189 | <dd class="description">Status code</dd> | |
5190 | </dl> | |
5191 | <h4 class="returnvalue">Return Value</h4> | |
5192 | <p class="description">1 on success, 0 on failure</p> | |
5193 | <h4 class="discussion">Discussion</h4> | |
a469f8a5 MS |
5194 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
5195 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions. | |
a2326b5b MS |
5196 | |
5197 | </p> | |
f3c17241 | 5198 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippSetString">ippSetString</a></h3> |
a2326b5b MS |
5199 | <p class="description">Set a string value in an attribute.</p> |
5200 | <p class="code"> | |
5201 | int ippSetString (<br> | |
5202 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
5203 | <a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br> | |
5204 | int element,<br> | |
5205 | const char *strvalue<br> | |
5206 | );</p> | |
5207 | <h4 class="parameters">Parameters</h4> | |
5208 | <dl> | |
5209 | <dt>ipp</dt> | |
5210 | <dd class="description">IPP message</dd> | |
5211 | <dt>attr</dt> | |
5212 | <dd class="description">IPP attribute</dd> | |
5213 | <dt>element</dt> | |
5214 | <dd class="description">Value number (0-based)</dd> | |
5215 | <dt>strvalue</dt> | |
5216 | <dd class="description">String value</dd> | |
5217 | </dl> | |
5218 | <h4 class="returnvalue">Return Value</h4> | |
5219 | <p class="description">1 on success, 0 on failure</p> | |
5220 | <h4 class="discussion">Discussion</h4> | |
a469f8a5 MS |
5221 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
5222 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
5223 | <br> |
5224 | The <code>attr</code> parameter may be modified as a result of setting the value.<br> | |
5225 | <br> | |
5226 | The <code>element</code> parameter specifies which value to set from 0 to | |
5227 | <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>. | |
5228 | ||
a469f8a5 | 5229 | </p> |
9c0e8e5d | 5230 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="ippSetStringf">ippSetStringf</a></h3> |
a469f8a5 MS |
5231 | <p class="description">Set a formatted string value of an attribute.</p> |
5232 | <p class="code"> | |
5233 | int ippSetStringf (<br> | |
5234 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
5235 | <a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br> | |
5236 | int element,<br> | |
5237 | const char *format,<br> | |
5238 | ...<br> | |
5239 | );</p> | |
5240 | <h4 class="parameters">Parameters</h4> | |
5241 | <dl> | |
5242 | <dt>ipp</dt> | |
5243 | <dd class="description">IPP message</dd> | |
5244 | <dt>attr</dt> | |
5245 | <dd class="description">IPP attribute</dd> | |
5246 | <dt>element</dt> | |
5247 | <dd class="description">Value number (0-based)</dd> | |
5248 | <dt>format</dt> | |
5249 | <dd class="description">Printf-style format string</dd> | |
5250 | <dt>...</dt> | |
5251 | <dd class="description">Additional arguments as needed</dd> | |
5252 | </dl> | |
5253 | <h4 class="returnvalue">Return Value</h4> | |
5254 | <p class="description">1 on success, 0 on failure</p> | |
5255 | <h4 class="discussion">Discussion</h4> | |
5256 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using | |
5257 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
5258 | <br> | |
5259 | The <code>attr</code> parameter may be modified as a result of setting the value.<br> | |
5260 | <br> | |
5261 | The <code>element</code> parameter specifies which value to set from 0 to | |
5262 | <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.<br> | |
5263 | <br> | |
5264 | The <code>format</code> parameter uses formatting characters compatible with the | |
5265 | printf family of standard functions. Additional arguments follow it as | |
5266 | needed. The formatted string is truncated as needed to the maximum length of | |
5267 | the corresponding value type. | |
5268 | ||
5269 | </p> | |
9c0e8e5d | 5270 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="ippSetStringfv">ippSetStringfv</a></h3> |
a469f8a5 MS |
5271 | <p class="description">Set a formatted string value of an attribute.</p> |
5272 | <p class="code"> | |
5273 | int ippSetStringfv (<br> | |
5274 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
5275 | <a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br> | |
5276 | int element,<br> | |
5277 | const char *format,<br> | |
5278 | va_list ap<br> | |
5279 | );</p> | |
5280 | <h4 class="parameters">Parameters</h4> | |
5281 | <dl> | |
5282 | <dt>ipp</dt> | |
5283 | <dd class="description">IPP message</dd> | |
5284 | <dt>attr</dt> | |
5285 | <dd class="description">IPP attribute</dd> | |
5286 | <dt>element</dt> | |
5287 | <dd class="description">Value number (0-based)</dd> | |
5288 | <dt>format</dt> | |
5289 | <dd class="description">Printf-style format string</dd> | |
5290 | <dt>ap</dt> | |
5291 | <dd class="description">Pointer to additional arguments</dd> | |
5292 | </dl> | |
5293 | <h4 class="returnvalue">Return Value</h4> | |
5294 | <p class="description">1 on success, 0 on failure</p> | |
5295 | <h4 class="discussion">Discussion</h4> | |
5296 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using | |
5297 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
5298 | <br> | |
5299 | The <code>attr</code> parameter may be modified as a result of setting the value.<br> | |
5300 | <br> | |
5301 | The <code>element</code> parameter specifies which value to set from 0 to | |
5302 | <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.<br> | |
5303 | <br> | |
5304 | The <code>format</code> parameter uses formatting characters compatible with the | |
5305 | printf family of standard functions. Additional arguments follow it as | |
5306 | needed. The formatted string is truncated as needed to the maximum length of | |
5307 | the corresponding value type. | |
5308 | ||
a2326b5b | 5309 | </p> |
f3c17241 | 5310 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippSetValueTag">ippSetValueTag</a></h3> |
a2326b5b MS |
5311 | <p class="description">Set the value tag of an attribute.</p> |
5312 | <p class="code"> | |
5313 | int ippSetValueTag (<br> | |
5314 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
5315 | <a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br> | |
5316 | ipp_tag_t value_tag<br> | |
5317 | );</p> | |
5318 | <h4 class="parameters">Parameters</h4> | |
5319 | <dl> | |
5320 | <dt>ipp</dt> | |
5321 | <dd class="description">IPP message</dd> | |
5322 | <dt>attr</dt> | |
5323 | <dd class="description">IPP attribute</dd> | |
5324 | <dt>value_tag</dt> | |
5325 | <dd class="description">Value tag</dd> | |
5326 | </dl> | |
5327 | <h4 class="returnvalue">Return Value</h4> | |
5328 | <p class="description">1 on success, 0 on failure</p> | |
5329 | <h4 class="discussion">Discussion</h4> | |
a469f8a5 MS |
5330 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
5331 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
5332 | <br> |
5333 | The <code>attr</code> parameter may be modified as a result of setting the value.<br> | |
5334 | <br> | |
5335 | Integer (<code>IPP_TAG_INTEGER</code>) values can be promoted to rangeOfInteger | |
5336 | (<code>IPP_TAG_RANGE</code>) values, the various string tags can be promoted to name | |
5337 | (<code>IPP_TAG_NAME</code>) or nameWithLanguage (<code>IPP_TAG_NAMELANG</code>) values, text | |
5338 | (<code>IPP_TAG_TEXT</code>) values can be promoted to textWithLanguage | |
5339 | (<code>IPP_TAG_TEXTLANG</code>) values, and all values can be demoted to the various | |
5340 | out-of-band value tags such as no-value (<code>IPP_TAG_NOVALUE</code>). All other changes | |
5341 | will be rejected.<br> | |
5342 | <br> | |
5343 | Promoting a string attribute to nameWithLanguage or textWithLanguage adds the language | |
5344 | code in the "attributes-natural-language" attribute or, if not present, the language | |
5345 | code for the current locale. | |
5346 | ||
5347 | </p> | |
f3c17241 | 5348 | <h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="ippSetVersion">ippSetVersion</a></h3> |
a2326b5b MS |
5349 | <p class="description">Set the version number in an IPP message.</p> |
5350 | <p class="code"> | |
5351 | int ippSetVersion (<br> | |
5352 | <a href="#ipp_t">ipp_t</a> *ipp,<br> | |
5353 | int major,<br> | |
5354 | int minor<br> | |
5355 | );</p> | |
5356 | <h4 class="parameters">Parameters</h4> | |
5357 | <dl> | |
5358 | <dt>ipp</dt> | |
5359 | <dd class="description">IPP message</dd> | |
5360 | <dt>major</dt> | |
5361 | <dd class="description">Major version number (major.minor)</dd> | |
5362 | <dt>minor</dt> | |
5363 | <dd class="description">Minor version number (major.minor)</dd> | |
5364 | </dl> | |
5365 | <h4 class="returnvalue">Return Value</h4> | |
5366 | <p class="description">1 on success, 0 on failure</p> | |
5367 | <h4 class="discussion">Discussion</h4> | |
a469f8a5 MS |
5368 | <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using |
5369 | the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br> | |
a2326b5b MS |
5370 | <br> |
5371 | The valid version numbers are currently 1.0, 1.1, 2.0, 2.1, and 2.2. | |
5372 | ||
5373 | </p> | |
ca6b43fc MS |
5374 | <h3 class="function"><span class="info"> CUPS 2.0 </span><a name="ippStateString">ippStateString</a></h3> |
5375 | <p class="description">Return the name corresponding to a state value.</p> | |
5376 | <p class="code"> | |
5377 | const char *ippStateString (<br> | |
5378 | <a href="#ipp_state_t">ipp_state_t</a> state<br> | |
5379 | );</p> | |
5380 | <h4 class="parameters">Parameters</h4> | |
5381 | <dl> | |
5382 | <dt>state</dt> | |
5383 | <dd class="description">State value</dd> | |
5384 | </dl> | |
5385 | <h4 class="returnvalue">Return Value</h4> | |
5386 | <p class="description">State name</p> | |
f3c17241 | 5387 | <h3 class="function"><span class="info"> CUPS 1.4/OS X 10.6 </span><a name="ippTagString">ippTagString</a></h3> |
a2326b5b MS |
5388 | <p class="description">Return the tag name corresponding to a tag value.</p> |
5389 | <p class="code"> | |
5390 | const char *ippTagString (<br> | |
5391 | ipp_tag_t tag<br> | |
5392 | );</p> | |
5393 | <h4 class="parameters">Parameters</h4> | |
5394 | <dl> | |
5395 | <dt>tag</dt> | |
5396 | <dd class="description">Tag value</dd> | |
5397 | </dl> | |
06d4e77b MS |
5398 | <h4 class="returnvalue">Return Value</h4> |
5399 | <p class="description">Tag name</p> | |
5400 | <h4 class="discussion">Discussion</h4> | |
5401 | <p class="discussion">The returned names are defined in RFC 2911 and 3382. | |
5402 | ||
5403 | </p> | |
f3c17241 | 5404 | <h3 class="function"><span class="info"> CUPS 1.4/OS X 10.6 </span><a name="ippTagValue">ippTagValue</a></h3> |
06d4e77b MS |
5405 | <p class="description">Return the tag value corresponding to a tag name.</p> |
5406 | <p class="code"> | |
a2326b5b | 5407 | ipp_tag_t ippTagValue (<br> |
06d4e77b MS |
5408 | const char *name<br> |
5409 | );</p> | |
5410 | <h4 class="parameters">Parameters</h4> | |
5411 | <dl> | |
5412 | <dt>name</dt> | |
5413 | <dd class="description">Tag name</dd> | |
5414 | </dl> | |
5415 | <h4 class="returnvalue">Return Value</h4> | |
5416 | <p class="description">Tag value</p> | |
5417 | <h4 class="discussion">Discussion</h4> | |
5418 | <p class="discussion">The tag names are defined in RFC 2911 and 3382. | |
5419 | ||
5420 | </p> | |
5a738aea MS |
5421 | <h3 class="function"><a name="ippTimeToDate">ippTimeToDate</a></h3> |
5422 | <p class="description">Convert from UNIX time to RFC 1903 format.</p> | |
5423 | <p class="code"> | |
5424 | const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippTimeToDate (<br> | |
5425 | time_t t<br> | |
5426 | );</p> | |
5427 | <h4 class="parameters">Parameters</h4> | |
5428 | <dl> | |
5429 | <dt>t</dt> | |
5430 | <dd class="description">UNIX time value</dd> | |
5431 | </dl> | |
5432 | <h4 class="returnvalue">Return Value</h4> | |
5433 | <p class="description">RFC-1903 date/time data</p> | |
9c0e8e5d | 5434 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="ippValidateAttribute">ippValidateAttribute</a></h3> |
db8b865d MS |
5435 | <p class="description">Validate the contents of an attribute.</p> |
5436 | <p class="code"> | |
5437 | int ippValidateAttribute (<br> | |
5438 | <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br> | |
5439 | );</p> | |
5440 | <h4 class="parameters">Parameters</h4> | |
5441 | <dl> | |
5442 | <dt>attr</dt> | |
5443 | <dd class="description">Attribute</dd> | |
5444 | </dl> | |
5445 | <h4 class="returnvalue">Return Value</h4> | |
5446 | <p class="description">1 if valid, 0 otherwise</p> | |
5447 | <h4 class="discussion">Discussion</h4> | |
5448 | <p class="discussion">This function validates the contents of an attribute based on the name and | |
5449 | value tag. 1 is returned if the attribute is valid, 0 otherwise. On | |
5450 | failure, cupsLastErrorString() is set to a human-readable message. | |
5451 | ||
5452 | </p> | |
9c0e8e5d | 5453 | <h3 class="function"><span class="info"> CUPS 1.7/OS X 10.9 </span><a name="ippValidateAttributes">ippValidateAttributes</a></h3> |
db8b865d MS |
5454 | <p class="description">Validate all attributes in an IPP message.</p> |
5455 | <p class="code"> | |
5456 | int ippValidateAttributes (<br> | |
5457 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
5458 | );</p> | |
5459 | <h4 class="parameters">Parameters</h4> | |
5460 | <dl> | |
5461 | <dt>ipp</dt> | |
5462 | <dd class="description">IPP message</dd> | |
5463 | </dl> | |
5464 | <h4 class="returnvalue">Return Value</h4> | |
5465 | <p class="description">1 if valid, 0 otherwise</p> | |
5466 | <h4 class="discussion">Discussion</h4> | |
5467 | <p class="discussion">This function validates the contents of the IPP message, including each | |
5468 | attribute. Like <a href="#ippValidateAttribute"><code>ippValidateAttribute</code></a>, cupsLastErrorString() is set | |
5469 | to a human-readable message on failure. | |
5470 | ||
5471 | </p> | |
5a738aea MS |
5472 | <h3 class="function"><a name="ippWrite">ippWrite</a></h3> |
5473 | <p class="description">Write data for an IPP message to a HTTP connection.</p> | |
5474 | <p class="code"> | |
79e1d494 | 5475 | <a href="#ipp_state_t">ipp_state_t</a> ippWrite (<br> |
5a738aea MS |
5476 | <a href="#http_t">http_t</a> *http,<br> |
5477 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
5478 | );</p> | |
5479 | <h4 class="parameters">Parameters</h4> | |
5480 | <dl> | |
5481 | <dt>http</dt> | |
5482 | <dd class="description">HTTP connection</dd> | |
5483 | <dt>ipp</dt> | |
5484 | <dd class="description">IPP data</dd> | |
5485 | </dl> | |
5486 | <h4 class="returnvalue">Return Value</h4> | |
5487 | <p class="description">Current state</p> | |
f3c17241 | 5488 | <h3 class="function"><span class="info"> CUPS 1.1.19/OS X 10.3 </span><a name="ippWriteFile">ippWriteFile</a></h3> |
5a738aea MS |
5489 | <p class="description">Write data for an IPP message to a file.</p> |
5490 | <p class="code"> | |
79e1d494 | 5491 | <a href="#ipp_state_t">ipp_state_t</a> ippWriteFile (<br> |
5a738aea MS |
5492 | int fd,<br> |
5493 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
5494 | );</p> | |
5495 | <h4 class="parameters">Parameters</h4> | |
5496 | <dl> | |
5497 | <dt>fd</dt> | |
5498 | <dd class="description">HTTP data</dd> | |
5499 | <dt>ipp</dt> | |
5500 | <dd class="description">IPP data</dd> | |
5501 | </dl> | |
5502 | <h4 class="returnvalue">Return Value</h4> | |
5503 | <p class="description">Current state</p> | |
f3c17241 | 5504 | <h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="ippWriteIO">ippWriteIO</a></h3> |
5a738aea MS |
5505 | <p class="description">Write data for an IPP message.</p> |
5506 | <p class="code"> | |
79e1d494 | 5507 | <a href="#ipp_state_t">ipp_state_t</a> ippWriteIO (<br> |
5a738aea MS |
5508 | void *dst,<br> |
5509 | <a href="#ipp_iocb_t">ipp_iocb_t</a> cb,<br> | |
5510 | int blocking,<br> | |
5511 | <a href="#ipp_t">ipp_t</a> *parent,<br> | |
5512 | <a href="#ipp_t">ipp_t</a> *ipp<br> | |
5513 | );</p> | |
5514 | <h4 class="parameters">Parameters</h4> | |
5515 | <dl> | |
5516 | <dt>dst</dt> | |
5517 | <dd class="description">Destination</dd> | |
5518 | <dt>cb</dt> | |
5519 | <dd class="description">Write callback function</dd> | |
5520 | <dt>blocking</dt> | |
5521 | <dd class="description">Use blocking IO?</dd> | |
5522 | <dt>parent</dt> | |
5523 | <dd class="description">Parent IPP message</dd> | |
5524 | <dt>ipp</dt> | |
5525 | <dd class="description">IPP data</dd> | |
5526 | </dl> | |
5527 | <h4 class="returnvalue">Return Value</h4> | |
5528 | <p class="description">Current state</p> | |
5529 | <h2 class="title"><a name="TYPES">Data Types</a></h2> | |
eac3a0a0 MS |
5530 | <h3 class="typedef"><a name="gss_auth_identity_desc">gss_auth_identity_desc</a></h3> |
5531 | <p class="description">Local functions...</p> | |
5532 | <p class="code"> | |
5533 | typedef struct <a href="#gss_auth_identity">gss_auth_identity</a> gss_auth_identity_desc; | |
5534 | </p> | |
f3c17241 | 5535 | <h3 class="typedef"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="http_addr_t">http_addr_t</a></h3> |
f11a948a MS |
5536 | <p class="description">Socket address union, which |
5537 | makes using IPv6 and other | |
5538 | address types easier and | |
5539 | more portable. </p> | |
5540 | <p class="code"> | |
5541 | typedef union _http_addr_u / http_addr_t; | |
5542 | </p> | |
f3c17241 | 5543 | <h3 class="typedef"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="http_addrlist_t">http_addrlist_t</a></h3> |
5a738aea | 5544 | <p class="description">Socket address list, which is |
ef416fc2 | 5545 | used to enumerate all of the |
5546 | addresses that are associated | |
5a738aea MS |
5547 | with a hostname. </p> |
5548 | <p class="code"> | |
5549 | typedef struct <a href="#http_addrlist_s">http_addrlist_s</a> / http_addrlist_t; | |
5550 | </p> | |
5551 | <h3 class="typedef"><a name="http_auth_t">http_auth_t</a></h3> | |
5552 | <p class="description">HTTP authentication types</p> | |
5553 | <p class="code"> | |
5554 | typedef enum <a href="#http_auth_e">http_auth_e</a> http_auth_t; | |
5555 | </p> | |
f3c17241 | 5556 | <h3 class="typedef"><span class="info"> CUPS 1.5/OS X 10.7 </span><a name="http_credential_t">http_credential_t</a></h3> |
f228370c | 5557 | <p class="description">HTTP credential data </p> |
10d09e33 MS |
5558 | <p class="code"> |
5559 | typedef struct <a href="#http_credential_s">http_credential_s</a> http_credential_t; | |
5560 | </p> | |
5a738aea MS |
5561 | <h3 class="typedef"><a name="http_encoding_t">http_encoding_t</a></h3> |
5562 | <p class="description">HTTP transfer encoding values</p> | |
5563 | <p class="code"> | |
5564 | typedef enum <a href="#http_encoding_e">http_encoding_e</a> http_encoding_t; | |
5565 | </p> | |
5566 | <h3 class="typedef"><a name="http_encryption_t">http_encryption_t</a></h3> | |
5567 | <p class="description">HTTP encryption values</p> | |
5568 | <p class="code"> | |
5569 | typedef enum <a href="#http_encryption_e">http_encryption_e</a> http_encryption_t; | |
5570 | </p> | |
79e1d494 MS |
5571 | <h3 class="typedef"><a name="http_field_t">http_field_t</a></h3> |
5572 | <p class="description">HTTP field names</p> | |
5573 | <p class="code"> | |
5574 | typedef enum <a href="#http_field_e">http_field_e</a> http_field_t; | |
5575 | </p> | |
5576 | <h3 class="typedef"><a name="http_keepalive_t">http_keepalive_t</a></h3> | |
f11a948a | 5577 | <p class="description">HTTP keep-alive values</p> |
79e1d494 MS |
5578 | <p class="code"> |
5579 | typedef enum <a href="#http_keepalive_e">http_keepalive_e</a> http_keepalive_t; | |
5580 | </p> | |
f11a948a MS |
5581 | <h3 class="typedef"><a name="http_state_t">http_state_t</a></h3> |
5582 | <p class="description">HTTP state values; states | |
5583 | are server-oriented...</p> | |
5584 | <p class="code"> | |
a469f8a5 | 5585 | typedef enum <a href="#http_state_e">http_state_e</a> http_state_t; |
79e1d494 | 5586 | </p> |
5a738aea MS |
5587 | <h3 class="typedef"><a name="http_t">http_t</a></h3> |
5588 | <p class="description">HTTP connection type</p> | |
5589 | <p class="code"> | |
ecdc0628 | 5590 | typedef struct _http_s http_t; |
5a738aea | 5591 | </p> |
f3c17241 | 5592 | <h3 class="typedef"><span class="info"> CUPS 1.5/OS X 10.7 </span><a name="http_timeout_cb_t">http_timeout_cb_t</a></h3> |
f228370c MS |
5593 | <p class="description">HTTP timeout callback </p> |
5594 | <p class="code"> | |
5595 | typedef int (*http_timeout_cb_t)(<a href="#http_t">http_t</a> *http, void *user_data); | |
5596 | </p> | |
79e1d494 | 5597 | <h3 class="typedef"><a name="http_uri_coding_t">http_uri_coding_t</a></h3> |
f11a948a | 5598 | <p class="description">URI en/decode flags</p> |
79e1d494 MS |
5599 | <p class="code"> |
5600 | typedef enum <a href="#http_uri_coding_e">http_uri_coding_e</a> http_uri_coding_t; | |
5601 | </p> | |
10d09e33 | 5602 | <h3 class="typedef"><span class="info"> CUPS 1.2 </span><a name="http_uri_status_t">http_uri_status_t</a></h3> |
f11a948a | 5603 | <p class="description">URI separation status </p> |
79e1d494 MS |
5604 | <p class="code"> |
5605 | typedef enum <a href="#http_uri_status_e">http_uri_status_e</a> http_uri_status_t; | |
5606 | </p> | |
f11a948a MS |
5607 | <h3 class="typedef"><a name="http_version_t">http_version_t</a></h3> |
5608 | <p class="description">HTTP version numbers</p> | |
79e1d494 MS |
5609 | <p class="code"> |
5610 | typedef enum <a href="#http_version_e">http_version_e</a> http_version_t; | |
5611 | </p> | |
5a738aea | 5612 | <h3 class="typedef"><a name="ipp_attribute_t">ipp_attribute_t</a></h3> |
a2326b5b | 5613 | <p class="description">IPP attribute</p> |
5a738aea | 5614 | <p class="code"> |
a2326b5b MS |
5615 | typedef struct _ipp_attribute_s ipp_attribute_t; |
5616 | </p> | |
5617 | <h3 class="typedef"><a name="ipp_copycb_t">ipp_copycb_t</a></h3> | |
f3c17241 MS |
5618 | <p class="description">The following structures are PRIVATE starting with CUPS 1.6/OS X 10.8. |
5619 | Please use the new accessor functions available in CUPS 1.6 and later, as | |
5620 | these definitions will be moved to a private header file in a future release.</p> | |
a2326b5b MS |
5621 | <p class="code"> |
5622 | typedef int (*ipp_copycb_t)(void *context, <a href="#ipp_t">ipp_t</a> *dst, <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr); | |
5623 | </p> | |
5624 | <h3 class="typedef"><a name="ipp_dstate_t">ipp_dstate_t</a></h3> | |
5625 | <p class="description">Document states</p> | |
5626 | <p class="code"> | |
5627 | typedef enum <a href="#ipp_dstate_e">ipp_dstate_e</a> ipp_dstate_t; | |
5a738aea | 5628 | </p> |
79e1d494 | 5629 | <h3 class="typedef"><a name="ipp_finish_t">ipp_finish_t</a></h3> |
a469f8a5 | 5630 | <p class="description">Job collation types</p> |
79e1d494 | 5631 | <p class="code"> |
a469f8a5 | 5632 | typedef enum <a href="#ipp_finishings_e">ipp_finishings_e</a> ipp_finish_t; |
79e1d494 | 5633 | </p> |
f3c17241 | 5634 | <h3 class="typedef"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="ipp_iocb_t">ipp_iocb_t</a></h3> |
5a738aea MS |
5635 | <p class="description">IPP IO Callback Function </p> |
5636 | <p class="code"> | |
a2326b5b | 5637 | typedef ssize_t (*ipp_iocb_t)(void *context, <a href="#ipp_uchar_t">ipp_uchar_t</a> *buffer, size_t bytes); |
5a738aea | 5638 | </p> |
a2326b5b MS |
5639 | <h3 class="typedef"><a name="ipp_jcollate_t">ipp_jcollate_t</a></h3> |
5640 | <p class="description">Job collation types</p> | |
79e1d494 | 5641 | <p class="code"> |
a2326b5b | 5642 | typedef enum <a href="#ipp_jcollate_e">ipp_jcollate_e</a> ipp_jcollate_t; |
79e1d494 MS |
5643 | </p> |
5644 | <h3 class="typedef"><a name="ipp_orient_t">ipp_orient_t</a></h3> | |
aaf19ab0 | 5645 | <p class="description">Orientation values</p> |
79e1d494 MS |
5646 | <p class="code"> |
5647 | typedef enum <a href="#ipp_orient_e">ipp_orient_e</a> ipp_orient_t; | |
5648 | </p> | |
5649 | <h3 class="typedef"><a name="ipp_pstate_t">ipp_pstate_t</a></h3> | |
aaf19ab0 | 5650 | <p class="description">Printer states</p> |
79e1d494 MS |
5651 | <p class="code"> |
5652 | typedef enum <a href="#ipp_pstate_e">ipp_pstate_e</a> ipp_pstate_t; | |
5653 | </p> | |
5654 | <h3 class="typedef"><a name="ipp_quality_t">ipp_quality_t</a></h3> | |
aaf19ab0 | 5655 | <p class="description">Qualities</p> |
79e1d494 MS |
5656 | <p class="code"> |
5657 | typedef enum <a href="#ipp_quality_e">ipp_quality_e</a> ipp_quality_t; | |
5658 | </p> | |
79e1d494 | 5659 | <h3 class="typedef"><a name="ipp_res_t">ipp_res_t</a></h3> |
aaf19ab0 | 5660 | <p class="description">Resolution units</p> |
79e1d494 MS |
5661 | <p class="code"> |
5662 | typedef enum <a href="#ipp_res_e">ipp_res_e</a> ipp_res_t; | |
5663 | </p> | |
5664 | <h3 class="typedef"><a name="ipp_state_t">ipp_state_t</a></h3> | |
aaf19ab0 | 5665 | <p class="description">IPP states</p> |
79e1d494 MS |
5666 | <p class="code"> |
5667 | typedef enum <a href="#ipp_state_e">ipp_state_e</a> ipp_state_t; | |
5668 | </p> | |
5a738aea | 5669 | <h3 class="typedef"><a name="ipp_t">ipp_t</a></h3> |
a2326b5b | 5670 | <p class="description">IPP request/response data</p> |
5a738aea | 5671 | <p class="code"> |
a2326b5b | 5672 | typedef struct _ipp_s ipp_t; |
5a738aea MS |
5673 | </p> |
5674 | <h3 class="typedef"><a name="ipp_uchar_t">ipp_uchar_t</a></h3> | |
a2326b5b | 5675 | <p class="description">Unsigned 8-bit integer/character</p> |
5a738aea | 5676 | <p class="code"> |
a2326b5b | 5677 | typedef unsigned char ipp_uchar_t; |
5a738aea MS |
5678 | </p> |
5679 | <h2 class="title"><a name="STRUCTURES">Structures</a></h2> | |
eac3a0a0 MS |
5680 | <h3 class="struct"><a name="gss_auth_identity">gss_auth_identity</a></h3> |
5681 | <p class="description">Local functions...</p> | |
5682 | <p class="code">struct gss_auth_identity {<br> | |
5683 | gss_buffer_t *credentialsRef;<br> | |
5684 | uint32_t flags;<br> | |
5685 | char *password;<br> | |
5686 | char *realm;<br> | |
5687 | uint32_t type;<br> | |
5688 | char *username;<br> | |
5689 | };</p> | |
5690 | <h4 class="members">Members</h4> | |
5691 | <dl> | |
5692 | <dt>credentialsRef </dt> | |
5693 | <dt>flags </dt> | |
5694 | <dt>password </dt> | |
5695 | <dt>realm </dt> | |
5696 | <dt>type </dt> | |
5697 | <dt>username </dt> | |
5698 | </dl> | |
f3c17241 | 5699 | <h3 class="struct"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="http_addrlist_s">http_addrlist_s</a></h3> |
5a738aea MS |
5700 | <p class="description">Socket address list, which is |
5701 | used to enumerate all of the | |
5702 | addresses that are associated | |
5703 | with a hostname. </p> | |
5704 | <p class="code">struct http_addrlist_s {<br> | |
5705 | <a href="#http_addr_t">http_addr_t</a> addr;<br> | |
5706 | struct <a href="#http_addrlist_s">http_addrlist_s</a> *next;<br> | |
5707 | };</p> | |
5708 | <h4 class="members">Members</h4> | |
5709 | <dl> | |
5710 | <dt>addr </dt> | |
5711 | <dd class="description">Address</dd> | |
5712 | <dt>next </dt> | |
5713 | <dd class="description">Pointer to next address in list</dd> | |
5714 | </dl> | |
f3c17241 | 5715 | <h3 class="struct"><span class="info"> CUPS 1.5/OS X 10.7 </span><a name="http_credential_s">http_credential_s</a></h3> |
f228370c | 5716 | <p class="description">HTTP credential data </p> |
10d09e33 MS |
5717 | <p class="code">struct http_credential_s {<br> |
5718 | void *data;<br> | |
5719 | size_t datalen;<br> | |
5720 | };</p> | |
5721 | <h4 class="members">Members</h4> | |
5722 | <dl> | |
5723 | <dt>data </dt> | |
5724 | <dd class="description">Pointer to credential data</dd> | |
5725 | <dt>datalen </dt> | |
5726 | <dd class="description">Credential length</dd> | |
5727 | </dl> | |
f3c17241 MS |
5728 | <h3 class="struct"><a name="pollfd">pollfd</a></h3> |
5729 | <p class="description">User data (unused)</p> | |
5730 | <p class="code">struct pollfd *pollfds, unsigned int num_pollfds, int timeout, void *context) {<br> | |
5731 | void) context;<br> | |
5732 | void) timeout;<br> | |
5733 | };</p> | |
5734 | <h4 class="members">Members</h4> | |
5735 | <dl> | |
5736 | <dt>context </dt> | |
5737 | <dt>timeout </dt> | |
5738 | </dl> | |
5a738aea MS |
5739 | <h2 class="title"><a name="ENUMERATIONS">Constants</a></h2> |
5740 | <h3 class="enumeration"><a name="http_auth_e">http_auth_e</a></h3> | |
5741 | <p class="description">HTTP authentication types</p> | |
5742 | <h4 class="constants">Constants</h4> | |
5743 | <dl> | |
5744 | <dt>HTTP_AUTH_BASIC </dt> | |
5745 | <dd class="description">Basic authentication in use</dd> | |
5746 | <dt>HTTP_AUTH_MD5 </dt> | |
5747 | <dd class="description">Digest authentication in use</dd> | |
5748 | <dt>HTTP_AUTH_MD5_INT </dt> | |
5749 | <dd class="description">Digest authentication in use for body</dd> | |
5750 | <dt>HTTP_AUTH_MD5_SESS </dt> | |
5751 | <dd class="description">MD5-session authentication in use</dd> | |
5752 | <dt>HTTP_AUTH_MD5_SESS_INT </dt> | |
5753 | <dd class="description">MD5-session authentication in use for body</dd> | |
f3c17241 | 5754 | <dt>HTTP_AUTH_NEGOTIATE <span class="info"> CUPS 1.3/OS X 10.5 </span></dt> |
5a738aea MS |
5755 | <dd class="description">GSSAPI authentication in use </dd> |
5756 | <dt>HTTP_AUTH_NONE </dt> | |
5757 | <dd class="description">No authentication in use</dd> | |
5758 | </dl> | |
5759 | <h3 class="enumeration"><a name="http_encoding_e">http_encoding_e</a></h3> | |
5760 | <p class="description">HTTP transfer encoding values</p> | |
5761 | <h4 class="constants">Constants</h4> | |
5762 | <dl> | |
a469f8a5 | 5763 | <dt>HTTP_ENCODING_CHUNKED </dt> |
5a738aea | 5764 | <dd class="description">Data is chunked</dd> |
a469f8a5 | 5765 | <dt>HTTP_ENCODING_FIELDS </dt> |
5a738aea | 5766 | <dd class="description">Sending HTTP fields</dd> |
a469f8a5 | 5767 | <dt>HTTP_ENCODING_LENGTH </dt> |
5a738aea MS |
5768 | <dd class="description">Data is sent with Content-Length</dd> |
5769 | </dl> | |
5770 | <h3 class="enumeration"><a name="http_encryption_e">http_encryption_e</a></h3> | |
5771 | <p class="description">HTTP encryption values</p> | |
5772 | <h4 class="constants">Constants</h4> | |
5773 | <dl> | |
a469f8a5 | 5774 | <dt>HTTP_ENCRYPTION_ALWAYS </dt> |
5a738aea | 5775 | <dd class="description">Always encrypt (SSL)</dd> |
a469f8a5 | 5776 | <dt>HTTP_ENCRYPTION_IF_REQUESTED </dt> |
5a738aea | 5777 | <dd class="description">Encrypt if requested (TLS upgrade)</dd> |
a469f8a5 | 5778 | <dt>HTTP_ENCRYPTION_NEVER </dt> |
5a738aea | 5779 | <dd class="description">Never encrypt</dd> |
a469f8a5 | 5780 | <dt>HTTP_ENCRYPTION_REQUIRED </dt> |
5a738aea MS |
5781 | <dd class="description">Encryption is required (TLS upgrade)</dd> |
5782 | </dl> | |
5783 | <h3 class="enumeration"><a name="http_field_e">http_field_e</a></h3> | |
5784 | <p class="description">HTTP field names</p> | |
5785 | <h4 class="constants">Constants</h4> | |
5786 | <dl> | |
9c0e8e5d | 5787 | <dt>HTTP_FIELD_ACCEPT_ENCODING <span class="info"> CUPS 1.7/OS X 10.9 </span></dt> |
a469f8a5 | 5788 | <dd class="description">Accepting-Encoding field </dd> |
5a738aea MS |
5789 | <dt>HTTP_FIELD_ACCEPT_LANGUAGE </dt> |
5790 | <dd class="description">Accept-Language field</dd> | |
5791 | <dt>HTTP_FIELD_ACCEPT_RANGES </dt> | |
5792 | <dd class="description">Accept-Ranges field</dd> | |
9c0e8e5d | 5793 | <dt>HTTP_FIELD_ALLOW <span class="info"> CUPS 1.7/OS X 10.9 </span></dt> |
a469f8a5 | 5794 | <dd class="description">Allow field </dd> |
5a738aea MS |
5795 | <dt>HTTP_FIELD_AUTHORIZATION </dt> |
5796 | <dd class="description">Authorization field</dd> | |
5797 | <dt>HTTP_FIELD_CONNECTION </dt> | |
5798 | <dd class="description">Connection field</dd> | |
5799 | <dt>HTTP_FIELD_CONTENT_ENCODING </dt> | |
5800 | <dd class="description">Content-Encoding field</dd> | |
5801 | <dt>HTTP_FIELD_CONTENT_LANGUAGE </dt> | |
5802 | <dd class="description">Content-Language field</dd> | |
5803 | <dt>HTTP_FIELD_CONTENT_LENGTH </dt> | |
5804 | <dd class="description">Content-Length field</dd> | |
5805 | <dt>HTTP_FIELD_CONTENT_LOCATION </dt> | |
5806 | <dd class="description">Content-Location field</dd> | |
5807 | <dt>HTTP_FIELD_CONTENT_MD5 </dt> | |
5808 | <dd class="description">Content-MD5 field</dd> | |
5809 | <dt>HTTP_FIELD_CONTENT_RANGE </dt> | |
5810 | <dd class="description">Content-Range field</dd> | |
5811 | <dt>HTTP_FIELD_CONTENT_TYPE </dt> | |
5812 | <dd class="description">Content-Type field</dd> | |
5813 | <dt>HTTP_FIELD_CONTENT_VERSION </dt> | |
5814 | <dd class="description">Content-Version field</dd> | |
5815 | <dt>HTTP_FIELD_DATE </dt> | |
5816 | <dd class="description">Date field</dd> | |
5817 | <dt>HTTP_FIELD_HOST </dt> | |
5818 | <dd class="description">Host field</dd> | |
5819 | <dt>HTTP_FIELD_IF_MODIFIED_SINCE </dt> | |
5820 | <dd class="description">If-Modified-Since field</dd> | |
5821 | <dt>HTTP_FIELD_IF_UNMODIFIED_SINCE </dt> | |
5822 | <dd class="description">If-Unmodified-Since field</dd> | |
5823 | <dt>HTTP_FIELD_KEEP_ALIVE </dt> | |
5824 | <dd class="description">Keep-Alive field</dd> | |
5825 | <dt>HTTP_FIELD_LAST_MODIFIED </dt> | |
5826 | <dd class="description">Last-Modified field</dd> | |
5827 | <dt>HTTP_FIELD_LINK </dt> | |
5828 | <dd class="description">Link field</dd> | |
5829 | <dt>HTTP_FIELD_LOCATION </dt> | |
5830 | <dd class="description">Location field</dd> | |
5831 | <dt>HTTP_FIELD_MAX </dt> | |
5832 | <dd class="description">Maximum field index</dd> | |
5833 | <dt>HTTP_FIELD_RANGE </dt> | |
5834 | <dd class="description">Range field</dd> | |
5835 | <dt>HTTP_FIELD_REFERER </dt> | |
5836 | <dd class="description">Referer field</dd> | |
5837 | <dt>HTTP_FIELD_RETRY_AFTER </dt> | |
5838 | <dd class="description">Retry-After field</dd> | |
9c0e8e5d | 5839 | <dt>HTTP_FIELD_SERVER <span class="info"> CUPS 1.7/OS X 10.9 </span></dt> |
a469f8a5 | 5840 | <dd class="description">Server field </dd> |
5a738aea MS |
5841 | <dt>HTTP_FIELD_TRANSFER_ENCODING </dt> |
5842 | <dd class="description">Transfer-Encoding field</dd> | |
5843 | <dt>HTTP_FIELD_UNKNOWN </dt> | |
5844 | <dd class="description">Unknown field</dd> | |
5845 | <dt>HTTP_FIELD_UPGRADE </dt> | |
5846 | <dd class="description">Upgrade field</dd> | |
5847 | <dt>HTTP_FIELD_USER_AGENT </dt> | |
5848 | <dd class="description">User-Agent field</dd> | |
5849 | <dt>HTTP_FIELD_WWW_AUTHENTICATE </dt> | |
5850 | <dd class="description">WWW-Authenticate field</dd> | |
5851 | </dl> | |
5852 | <h3 class="enumeration"><a name="http_keepalive_e">http_keepalive_e</a></h3> | |
f11a948a | 5853 | <p class="description">HTTP keep-alive values</p> |
5a738aea MS |
5854 | <h4 class="constants">Constants</h4> |
5855 | <dl> | |
5856 | <dt>HTTP_KEEPALIVE_OFF </dt> | |
5857 | <dd class="description">No keep alive support</dd> | |
5858 | <dt>HTTP_KEEPALIVE_ON </dt> | |
5859 | <dd class="description">Use keep alive</dd> | |
5860 | </dl> | |
5861 | <h3 class="enumeration"><a name="http_state_e">http_state_e</a></h3> | |
f11a948a MS |
5862 | <p class="description">HTTP state values; states |
5863 | are server-oriented...</p> | |
5a738aea MS |
5864 | <h4 class="constants">Constants</h4> |
5865 | <dl> | |
a469f8a5 MS |
5866 | <dt>HTTP_STATE_CONNECT </dt> |
5867 | <dd class="description">CONNECT command, waiting for blank line</dd> | |
5868 | <dt>HTTP_STATE_DELETE </dt> | |
5a738aea | 5869 | <dd class="description">DELETE command, waiting for blank line</dd> |
a469f8a5 MS |
5870 | <dt>HTTP_STATE_ERROR </dt> |
5871 | <dd class="description">Error on socket</dd> | |
5872 | <dt>HTTP_STATE_GET </dt> | |
5a738aea | 5873 | <dd class="description">GET command, waiting for blank line</dd> |
a469f8a5 | 5874 | <dt>HTTP_STATE_GET_SEND </dt> |
5a738aea | 5875 | <dd class="description">GET command, sending data</dd> |
a469f8a5 | 5876 | <dt>HTTP_STATE_HEAD </dt> |
5a738aea | 5877 | <dd class="description">HEAD command, waiting for blank line</dd> |
a469f8a5 | 5878 | <dt>HTTP_STATE_OPTIONS </dt> |
5a738aea | 5879 | <dd class="description">OPTIONS command, waiting for blank line</dd> |
a469f8a5 | 5880 | <dt>HTTP_STATE_POST </dt> |
5a738aea | 5881 | <dd class="description">POST command, waiting for blank line</dd> |
a469f8a5 | 5882 | <dt>HTTP_STATE_POST_RECV </dt> |
5a738aea | 5883 | <dd class="description">POST command, receiving data</dd> |
a469f8a5 | 5884 | <dt>HTTP_STATE_POST_SEND </dt> |
5a738aea | 5885 | <dd class="description">POST command, sending data</dd> |
a469f8a5 | 5886 | <dt>HTTP_STATE_PUT </dt> |
5a738aea | 5887 | <dd class="description">PUT command, waiting for blank line</dd> |
a469f8a5 | 5888 | <dt>HTTP_STATE_PUT_RECV </dt> |
5a738aea | 5889 | <dd class="description">PUT command, receiving data</dd> |
a469f8a5 | 5890 | <dt>HTTP_STATE_STATUS </dt> |
5a738aea | 5891 | <dd class="description">Command complete, sending status</dd> |
a469f8a5 | 5892 | <dt>HTTP_STATE_TRACE </dt> |
5a738aea | 5893 | <dd class="description">TRACE command, waiting for blank line</dd> |
9c0e8e5d | 5894 | <dt>HTTP_STATE_UNKNOWN_METHOD <span class="info"> CUPS 1.7/OS X 10.9 </span></dt> |
a469f8a5 | 5895 | <dd class="description">Unknown request method, waiting for blank line </dd> |
9c0e8e5d | 5896 | <dt>HTTP_STATE_UNKNOWN_VERSION <span class="info"> CUPS 1.7/OS X 10.9 </span></dt> |
a469f8a5 MS |
5897 | <dd class="description">Unknown request method, waiting for blank line </dd> |
5898 | <dt>HTTP_STATE_WAITING </dt> | |
5a738aea MS |
5899 | <dd class="description">Waiting for command</dd> |
5900 | </dl> | |
5901 | <h3 class="enumeration"><a name="http_status_e">http_status_e</a></h3> | |
5902 | <p class="description">HTTP status codes</p> | |
5903 | <h4 class="constants">Constants</h4> | |
5904 | <dl> | |
a469f8a5 MS |
5905 | <dt>HTTP_STATUS_ACCEPTED </dt> |
5906 | <dd class="description">DELETE command was successful</dd> | |
5907 | <dt>HTTP_STATUS_BAD_GATEWAY </dt> | |
5a738aea | 5908 | <dd class="description">Bad gateway</dd> |
a469f8a5 | 5909 | <dt>HTTP_STATUS_BAD_REQUEST </dt> |
5a738aea | 5910 | <dd class="description">Bad request</dd> |
a469f8a5 | 5911 | <dt>HTTP_STATUS_CONFLICT </dt> |
5a738aea | 5912 | <dd class="description">Request is self-conflicting</dd> |
a469f8a5 | 5913 | <dt>HTTP_STATUS_CONTINUE </dt> |
5a738aea | 5914 | <dd class="description">Everything OK, keep going...</dd> |
a469f8a5 | 5915 | <dt>HTTP_STATUS_CREATED </dt> |
5a738aea | 5916 | <dd class="description">PUT command was successful</dd> |
6961465f MS |
5917 | <dt>HTTP_STATUS_CUPS_AUTHORIZATION_CANCELED <span class="info"> CUPS 1.4 </span></dt> |
5918 | <dd class="description">User canceled authorization </dd> | |
5919 | <dt>HTTP_STATUS_CUPS_PKI_ERROR <span class="info"> CUPS 1.5/OS X 10.7 </span></dt> | |
5920 | <dd class="description">Error negotiating a secure connection </dd> | |
a469f8a5 | 5921 | <dt>HTTP_STATUS_ERROR </dt> |
5a738aea | 5922 | <dd class="description">An error response from httpXxxx()</dd> |
a469f8a5 | 5923 | <dt>HTTP_STATUS_EXPECTATION_FAILED </dt> |
5a738aea | 5924 | <dd class="description">The expectation given in an Expect header field was not met</dd> |
a469f8a5 | 5925 | <dt>HTTP_STATUS_FORBIDDEN </dt> |
5a738aea | 5926 | <dd class="description">Forbidden to access this URI</dd> |
a469f8a5 | 5927 | <dt>HTTP_STATUS_GATEWAY_TIMEOUT </dt> |
5a738aea | 5928 | <dd class="description">Gateway connection timed out</dd> |
a469f8a5 | 5929 | <dt>HTTP_STATUS_GONE </dt> |
5a738aea | 5930 | <dd class="description">Server has gone away</dd> |
a469f8a5 | 5931 | <dt>HTTP_STATUS_LENGTH_REQUIRED </dt> |
5a738aea | 5932 | <dd class="description">A content length or encoding is required</dd> |
a469f8a5 | 5933 | <dt>HTTP_STATUS_METHOD_NOT_ALLOWED </dt> |
5a738aea | 5934 | <dd class="description">Method is not allowed</dd> |
a469f8a5 | 5935 | <dt>HTTP_STATUS_MOVED_PERMANENTLY </dt> |
5a738aea | 5936 | <dd class="description">Document has moved permanently</dd> |
a469f8a5 | 5937 | <dt>HTTP_STATUS_MOVED_TEMPORARILY </dt> |
5a738aea | 5938 | <dd class="description">Document has moved temporarily</dd> |
a469f8a5 | 5939 | <dt>HTTP_STATUS_MULTIPLE_CHOICES </dt> |
5a738aea | 5940 | <dd class="description">Multiple files match request</dd> |
9c0e8e5d | 5941 | <dt>HTTP_STATUS_NONE <span class="info"> CUPS 1.7/OS X 10.9 </span></dt> |
a469f8a5 MS |
5942 | <dd class="description">No Expect value </dd> |
5943 | <dt>HTTP_STATUS_NOT_ACCEPTABLE </dt> | |
5a738aea | 5944 | <dd class="description">Not Acceptable</dd> |
a469f8a5 | 5945 | <dt>HTTP_STATUS_NOT_AUTHORITATIVE </dt> |
5a738aea | 5946 | <dd class="description">Information isn't authoritative</dd> |
a469f8a5 | 5947 | <dt>HTTP_STATUS_NOT_FOUND </dt> |
5a738aea | 5948 | <dd class="description">URI was not found</dd> |
a469f8a5 | 5949 | <dt>HTTP_STATUS_NOT_IMPLEMENTED </dt> |
5a738aea | 5950 | <dd class="description">Feature not implemented</dd> |
a469f8a5 | 5951 | <dt>HTTP_STATUS_NOT_MODIFIED </dt> |
5a738aea | 5952 | <dd class="description">File not modified</dd> |
a469f8a5 | 5953 | <dt>HTTP_STATUS_NOT_SUPPORTED </dt> |
5a738aea | 5954 | <dd class="description">HTTP version not supported</dd> |
a469f8a5 | 5955 | <dt>HTTP_STATUS_NO_CONTENT </dt> |
5a738aea | 5956 | <dd class="description">Successful command, no new data</dd> |
a469f8a5 | 5957 | <dt>HTTP_STATUS_OK </dt> |
5a738aea | 5958 | <dd class="description">OPTIONS/GET/HEAD/POST/TRACE command was successful</dd> |
a469f8a5 | 5959 | <dt>HTTP_STATUS_PARTIAL_CONTENT </dt> |
5a738aea | 5960 | <dd class="description">Only a partial file was recieved/sent</dd> |
a469f8a5 | 5961 | <dt>HTTP_STATUS_PAYMENT_REQUIRED </dt> |
5a738aea | 5962 | <dd class="description">Payment required</dd> |
a469f8a5 | 5963 | <dt>HTTP_STATUS_PRECONDITION </dt> |
5a738aea | 5964 | <dd class="description">Precondition failed</dd> |
a469f8a5 | 5965 | <dt>HTTP_STATUS_PROXY_AUTHENTICATION </dt> |
5a738aea | 5966 | <dd class="description">Proxy Authentication is Required</dd> |
a469f8a5 | 5967 | <dt>HTTP_STATUS_REQUESTED_RANGE </dt> |
5a738aea | 5968 | <dd class="description">The requested range is not satisfiable</dd> |
a469f8a5 | 5969 | <dt>HTTP_STATUS_REQUEST_TIMEOUT </dt> |
5a738aea | 5970 | <dd class="description">Request timed out</dd> |
a469f8a5 | 5971 | <dt>HTTP_STATUS_REQUEST_TOO_LARGE </dt> |
5a738aea | 5972 | <dd class="description">Request entity too large</dd> |
a469f8a5 | 5973 | <dt>HTTP_STATUS_RESET_CONTENT </dt> |
5a738aea | 5974 | <dd class="description">Content was reset/recreated</dd> |
a469f8a5 | 5975 | <dt>HTTP_STATUS_SEE_OTHER </dt> |
5a738aea | 5976 | <dd class="description">See this other link...</dd> |
a469f8a5 | 5977 | <dt>HTTP_STATUS_SERVER_ERROR </dt> |
5a738aea | 5978 | <dd class="description">Internal server error</dd> |
a469f8a5 | 5979 | <dt>HTTP_STATUS_SERVICE_UNAVAILABLE </dt> |
5a738aea | 5980 | <dd class="description">Service is unavailable</dd> |
a469f8a5 | 5981 | <dt>HTTP_STATUS_SWITCHING_PROTOCOLS </dt> |
5a738aea | 5982 | <dd class="description">HTTP upgrade to TLS/SSL</dd> |
a469f8a5 | 5983 | <dt>HTTP_STATUS_UNAUTHORIZED </dt> |
5a738aea | 5984 | <dd class="description">Unauthorized to access host</dd> |
a469f8a5 | 5985 | <dt>HTTP_STATUS_UNSUPPORTED_MEDIATYPE </dt> |
5a738aea | 5986 | <dd class="description">The requested media type is unsupported</dd> |
a469f8a5 | 5987 | <dt>HTTP_STATUS_UPGRADE_REQUIRED </dt> |
5a738aea | 5988 | <dd class="description">Upgrade to SSL/TLS required</dd> |
a469f8a5 | 5989 | <dt>HTTP_STATUS_URI_TOO_LONG </dt> |
5a738aea | 5990 | <dd class="description">URI too long</dd> |
a469f8a5 | 5991 | <dt>HTTP_STATUS_USE_PROXY </dt> |
5a738aea MS |
5992 | <dd class="description">Must use a proxy to access this URI</dd> |
5993 | </dl> | |
5994 | <h3 class="enumeration"><a name="http_uri_coding_e">http_uri_coding_e</a></h3> | |
f11a948a | 5995 | <p class="description">URI en/decode flags</p> |
5a738aea MS |
5996 | <h4 class="constants">Constants</h4> |
5997 | <dl> | |
5998 | <dt>HTTP_URI_CODING_ALL </dt> | |
5999 | <dd class="description">En/decode everything</dd> | |
6000 | <dt>HTTP_URI_CODING_HOSTNAME </dt> | |
6001 | <dd class="description">En/decode the hostname portion</dd> | |
6002 | <dt>HTTP_URI_CODING_MOST </dt> | |
6003 | <dd class="description">En/decode all but the query</dd> | |
6004 | <dt>HTTP_URI_CODING_NONE </dt> | |
6005 | <dd class="description">Don't en/decode anything</dd> | |
6006 | <dt>HTTP_URI_CODING_QUERY </dt> | |
6007 | <dd class="description">En/decode the query portion</dd> | |
6008 | <dt>HTTP_URI_CODING_RESOURCE </dt> | |
6009 | <dd class="description">En/decode the resource portion</dd> | |
9c0e8e5d MS |
6010 | <dt>HTTP_URI_CODING_RFC6874 </dt> |
6011 | <dd class="description">Use RFC 6874 address format</dd> | |
5a738aea MS |
6012 | <dt>HTTP_URI_CODING_USERNAME </dt> |
6013 | <dd class="description">En/decode the username portion</dd> | |
6014 | </dl> | |
10d09e33 | 6015 | <h3 class="enumeration"><span class="info"> CUPS 1.2 </span><a name="http_uri_status_e">http_uri_status_e</a></h3> |
f11a948a | 6016 | <p class="description">URI separation status </p> |
5a738aea MS |
6017 | <h4 class="constants">Constants</h4> |
6018 | <dl> | |
a469f8a5 | 6019 | <dt>HTTP_URI_STATUS_BAD_ARGUMENTS </dt> |
5a738aea | 6020 | <dd class="description">Bad arguments to function (error)</dd> |
a469f8a5 | 6021 | <dt>HTTP_URI_STATUS_BAD_HOSTNAME </dt> |
5a738aea | 6022 | <dd class="description">Bad hostname in URI (error)</dd> |
a469f8a5 | 6023 | <dt>HTTP_URI_STATUS_BAD_PORT </dt> |
5a738aea | 6024 | <dd class="description">Bad port number in URI (error)</dd> |
a469f8a5 | 6025 | <dt>HTTP_URI_STATUS_BAD_RESOURCE </dt> |
5a738aea | 6026 | <dd class="description">Bad resource in URI (error)</dd> |
a469f8a5 | 6027 | <dt>HTTP_URI_STATUS_BAD_SCHEME </dt> |
5a738aea | 6028 | <dd class="description">Bad scheme in URI (error)</dd> |
a469f8a5 | 6029 | <dt>HTTP_URI_STATUS_BAD_URI </dt> |
5a738aea | 6030 | <dd class="description">Bad/empty URI (error)</dd> |
a469f8a5 | 6031 | <dt>HTTP_URI_STATUS_BAD_USERNAME </dt> |
5a738aea | 6032 | <dd class="description">Bad username in URI (error)</dd> |
a469f8a5 | 6033 | <dt>HTTP_URI_STATUS_MISSING_RESOURCE </dt> |
5a738aea | 6034 | <dd class="description">Missing resource in URI (warning)</dd> |
a469f8a5 | 6035 | <dt>HTTP_URI_STATUS_MISSING_SCHEME </dt> |
5a738aea | 6036 | <dd class="description">Missing scheme in URI (warning)</dd> |
a469f8a5 | 6037 | <dt>HTTP_URI_STATUS_OK </dt> |
5a738aea | 6038 | <dd class="description">URI decoded OK</dd> |
a469f8a5 | 6039 | <dt>HTTP_URI_STATUS_OVERFLOW </dt> |
5a738aea | 6040 | <dd class="description">URI buffer for httpAssembleURI is too small</dd> |
a469f8a5 | 6041 | <dt>HTTP_URI_STATUS_UNKNOWN_SCHEME </dt> |
5a738aea MS |
6042 | <dd class="description">Unknown scheme in URI (warning)</dd> |
6043 | </dl> | |
6044 | <h3 class="enumeration"><a name="http_version_e">http_version_e</a></h3> | |
f11a948a | 6045 | <p class="description">HTTP version numbers</p> |
5a738aea MS |
6046 | <h4 class="constants">Constants</h4> |
6047 | <dl> | |
a469f8a5 | 6048 | <dt>HTTP_VERSION_0_9 </dt> |
5a738aea | 6049 | <dd class="description">HTTP/0.9</dd> |
a469f8a5 | 6050 | <dt>HTTP_VERSION_1_0 </dt> |
5a738aea | 6051 | <dd class="description">HTTP/1.0</dd> |
a469f8a5 | 6052 | <dt>HTTP_VERSION_1_1 </dt> |
5a738aea MS |
6053 | <dd class="description">HTTP/1.1</dd> |
6054 | </dl> | |
a2326b5b MS |
6055 | <h3 class="enumeration"><a name="ipp_dstate_e">ipp_dstate_e</a></h3> |
6056 | <p class="description">Document states</p> | |
6057 | <h4 class="constants">Constants</h4> | |
6058 | <dl> | |
6059 | <dt>IPP_DOCUMENT_ABORTED </dt> | |
a469f8a5 | 6060 | <dd class="description">Document is aborted</dd> |
a2326b5b | 6061 | <dt>IPP_DOCUMENT_CANCELED </dt> |
a469f8a5 | 6062 | <dd class="description">Document is canceled</dd> |
a2326b5b | 6063 | <dt>IPP_DOCUMENT_COMPLETED </dt> |
a469f8a5 | 6064 | <dd class="description">Document is completed</dd> |
a2326b5b | 6065 | <dt>IPP_DOCUMENT_PENDING </dt> |
a469f8a5 | 6066 | <dd class="description">Document is pending</dd> |
a2326b5b | 6067 | <dt>IPP_DOCUMENT_PROCESSING </dt> |
a469f8a5 | 6068 | <dd class="description">Document is processing</dd> |
a2326b5b | 6069 | </dl> |
a469f8a5 | 6070 | <h3 class="enumeration"><a name="ipp_finishings_e">ipp_finishings_e</a></h3> |
aaf19ab0 | 6071 | <p class="description">Finishings</p> |
5a738aea MS |
6072 | <h4 class="constants">Constants</h4> |
6073 | <dl> | |
6074 | <dt>IPP_FINISHINGS_BALE </dt> | |
6075 | <dd class="description">Bale (any type)</dd> | |
6076 | <dt>IPP_FINISHINGS_BIND </dt> | |
6077 | <dd class="description">Bind</dd> | |
6078 | <dt>IPP_FINISHINGS_BIND_BOTTOM </dt> | |
6079 | <dd class="description">Bind on bottom</dd> | |
6080 | <dt>IPP_FINISHINGS_BIND_LEFT </dt> | |
6081 | <dd class="description">Bind on left</dd> | |
6082 | <dt>IPP_FINISHINGS_BIND_RIGHT </dt> | |
6083 | <dd class="description">Bind on right</dd> | |
6084 | <dt>IPP_FINISHINGS_BIND_TOP </dt> | |
6085 | <dd class="description">Bind on top</dd> | |
6086 | <dt>IPP_FINISHINGS_BOOKLET_MAKER </dt> | |
6087 | <dd class="description">Fold to make booklet</dd> | |
ca6b43fc MS |
6088 | <dt>IPP_FINISHINGS_COAT </dt> |
6089 | <dd class="description">Apply protective liquid or powder coating</dd> | |
5a738aea MS |
6090 | <dt>IPP_FINISHINGS_COVER </dt> |
6091 | <dd class="description">Add cover</dd> | |
6961465f MS |
6092 | <dt>IPP_FINISHINGS_CUPS_FOLD_ACCORDIAN </dt> |
6093 | <dd class="description">Accordian-fold the paper vertically into four sections</dd> | |
6094 | <dt>IPP_FINISHINGS_CUPS_FOLD_DOUBLE_GATE </dt> | |
6095 | <dd class="description">Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically</dd> | |
6096 | <dt>IPP_FINISHINGS_CUPS_FOLD_GATE </dt> | |
6097 | <dd class="description">Fold the top and bottom quarters of the paper towards the midline</dd> | |
6098 | <dt>IPP_FINISHINGS_CUPS_FOLD_HALF </dt> | |
6099 | <dd class="description">Fold the paper in half vertically</dd> | |
6100 | <dt>IPP_FINISHINGS_CUPS_FOLD_HALF_Z </dt> | |
6101 | <dd class="description">Fold the paper in half horizontally, then Z-fold the paper vertically</dd> | |
6102 | <dt>IPP_FINISHINGS_CUPS_FOLD_LEFT_GATE </dt> | |
6103 | <dd class="description">Fold the top quarter of the paper towards the midline</dd> | |
6104 | <dt>IPP_FINISHINGS_CUPS_FOLD_LETTER </dt> | |
6105 | <dd class="description">Fold the paper into three sections vertically; sometimes also known as a C fold</dd> | |
6106 | <dt>IPP_FINISHINGS_CUPS_FOLD_PARALLEL </dt> | |
6107 | <dd class="description">Fold the paper in half vertically two times, yielding four sections</dd> | |
6108 | <dt>IPP_FINISHINGS_CUPS_FOLD_POSTER </dt> | |
6109 | <dd class="description">Fold the paper in half horizontally and vertically; sometimes also called a cross fold</dd> | |
6110 | <dt>IPP_FINISHINGS_CUPS_FOLD_RIGHT_GATE </dt> | |
6111 | <dd class="description">Fold the bottom quarter of the paper towards the midline</dd> | |
6112 | <dt>IPP_FINISHINGS_CUPS_FOLD_Z </dt> | |
6113 | <dd class="description">Fold the paper vertically into three sections, forming a Z</dd> | |
a469f8a5 MS |
6114 | <dt>IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_LEFT </dt> |
6115 | <dd class="description">Punch 1 hole bottom left</dd> | |
6116 | <dt>IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_RIGHT </dt> | |
6117 | <dd class="description">Punch 1 hole bottom right</dd> | |
6118 | <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_BOTTOM </dt> | |
6119 | <dd class="description">Punch 2 holes bottom edge</dd> | |
6120 | <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_LEFT </dt> | |
6121 | <dd class="description">Punch 2 holes left side</dd> | |
6122 | <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_RIGHT </dt> | |
6123 | <dd class="description">Punch 2 holes right side</dd> | |
6124 | <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_TOP </dt> | |
6125 | <dd class="description">Punch 2 holes top edge</dd> | |
6126 | <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_BOTTOM </dt> | |
6127 | <dd class="description">Punch 4 holes bottom edge</dd> | |
6128 | <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_LEFT </dt> | |
6129 | <dd class="description">Punch 4 holes left side</dd> | |
6130 | <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_RIGHT </dt> | |
6131 | <dd class="description">Punch 4 holes right side</dd> | |
6132 | <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_TOP </dt> | |
6133 | <dd class="description">Punch 4 holes top edge</dd> | |
6134 | <dt>IPP_FINISHINGS_CUPS_PUNCH_TOP_LEFT </dt> | |
6135 | <dd class="description">Punch 1 hole top left</dd> | |
6136 | <dt>IPP_FINISHINGS_CUPS_PUNCH_TOP_RIGHT </dt> | |
6137 | <dd class="description">Punch 1 hole top right</dd> | |
6138 | <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_BOTTOM </dt> | |
6139 | <dd class="description">Punch 3 holes bottom edge</dd> | |
6140 | <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_LEFT </dt> | |
6141 | <dd class="description">Punch 3 holes left side</dd> | |
6142 | <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_RIGHT </dt> | |
6143 | <dd class="description">Punch 3 holes right side</dd> | |
6144 | <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_TOP </dt> | |
6145 | <dd class="description">Punch 3 holes top edge</dd> | |
5a738aea MS |
6146 | <dt>IPP_FINISHINGS_EDGE_STITCH </dt> |
6147 | <dd class="description">Stitch along any side</dd> | |
6148 | <dt>IPP_FINISHINGS_EDGE_STITCH_BOTTOM </dt> | |
6149 | <dd class="description">Stitch along bottom edge</dd> | |
6150 | <dt>IPP_FINISHINGS_EDGE_STITCH_LEFT </dt> | |
6151 | <dd class="description">Stitch along left side</dd> | |
6152 | <dt>IPP_FINISHINGS_EDGE_STITCH_RIGHT </dt> | |
6153 | <dd class="description">Stitch along right side</dd> | |
6154 | <dt>IPP_FINISHINGS_EDGE_STITCH_TOP </dt> | |
6155 | <dd class="description">Stitch along top edge</dd> | |
6156 | <dt>IPP_FINISHINGS_FOLD </dt> | |
6157 | <dd class="description">Fold (any type)</dd> | |
9c0e8e5d MS |
6158 | <dt>IPP_FINISHINGS_FOLD_ACCORDIAN </dt> |
6159 | <dd class="description">Accordian-fold the paper vertically into four sections</dd> | |
6160 | <dt>IPP_FINISHINGS_FOLD_DOUBLE_GATE </dt> | |
6161 | <dd class="description">Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically</dd> | |
6162 | <dt>IPP_FINISHINGS_FOLD_GATE </dt> | |
6163 | <dd class="description">Fold the top and bottom quarters of the paper towards the midline</dd> | |
6164 | <dt>IPP_FINISHINGS_FOLD_HALF </dt> | |
6165 | <dd class="description">Fold the paper in half vertically</dd> | |
6166 | <dt>IPP_FINISHINGS_FOLD_HALF_Z </dt> | |
6167 | <dd class="description">Fold the paper in half horizontally, then Z-fold the paper vertically</dd> | |
6168 | <dt>IPP_FINISHINGS_FOLD_LEFT_GATE </dt> | |
6169 | <dd class="description">Fold the top quarter of the paper towards the midline</dd> | |
6170 | <dt>IPP_FINISHINGS_FOLD_LETTER </dt> | |
6171 | <dd class="description">Fold the paper into three sections vertically; sometimes also known as a C fold</dd> | |
6172 | <dt>IPP_FINISHINGS_FOLD_PARALLEL </dt> | |
6173 | <dd class="description">Fold the paper in half vertically two times, yielding four sections</dd> | |
6174 | <dt>IPP_FINISHINGS_FOLD_POSTER </dt> | |
6175 | <dd class="description">Fold the paper in half horizontally and vertically; sometimes also called a cross fold</dd> | |
6176 | <dt>IPP_FINISHINGS_FOLD_RIGHT_GATE </dt> | |
6177 | <dd class="description">Fold the bottom quarter of the paper towards the midline</dd> | |
6178 | <dt>IPP_FINISHINGS_FOLD_Z </dt> | |
6179 | <dd class="description">Fold the paper vertically into three sections, forming a Z</dd> | |
6961465f | 6180 | <dt>IPP_FINISHINGS_JOG_OFFSET </dt> |
5a738aea | 6181 | <dd class="description">Offset for binding (any type)</dd> |
ca6b43fc MS |
6182 | <dt>IPP_FINISHINGS_LAMINATE </dt> |
6183 | <dd class="description">Apply protective (solid) material</dd> | |
5a738aea MS |
6184 | <dt>IPP_FINISHINGS_NONE </dt> |
6185 | <dd class="description">No finishing</dd> | |
6186 | <dt>IPP_FINISHINGS_PUNCH </dt> | |
6187 | <dd class="description">Punch (any location/count)</dd> | |
9c0e8e5d MS |
6188 | <dt>IPP_FINISHINGS_PUNCH_BOTTOM_LEFT </dt> |
6189 | <dd class="description">Punch 1 hole bottom left</dd> | |
6190 | <dt>IPP_FINISHINGS_PUNCH_BOTTOM_RIGHT </dt> | |
6191 | <dd class="description">Punch 1 hole bottom right</dd> | |
6192 | <dt>IPP_FINISHINGS_PUNCH_DUAL_BOTTOM </dt> | |
6193 | <dd class="description">Punch 2 holes bottom edge</dd> | |
6194 | <dt>IPP_FINISHINGS_PUNCH_DUAL_LEFT </dt> | |
6195 | <dd class="description">Punch 2 holes left side</dd> | |
6196 | <dt>IPP_FINISHINGS_PUNCH_DUAL_RIGHT </dt> | |
6197 | <dd class="description">Punch 2 holes right side</dd> | |
6198 | <dt>IPP_FINISHINGS_PUNCH_DUAL_TOP </dt> | |
6199 | <dd class="description">Punch 2 holes top edge</dd> | |
6200 | <dt>IPP_FINISHINGS_PUNCH_QUAD_BOTTOM </dt> | |
6201 | <dd class="description">Punch 4 holes bottom edge</dd> | |
6202 | <dt>IPP_FINISHINGS_PUNCH_QUAD_LEFT </dt> | |
6203 | <dd class="description">Punch 4 holes left side</dd> | |
6204 | <dt>IPP_FINISHINGS_PUNCH_QUAD_RIGHT </dt> | |
6205 | <dd class="description">Punch 4 holes right side</dd> | |
6206 | <dt>IPP_FINISHINGS_PUNCH_QUAD_TOP </dt> | |
6207 | <dd class="description">Punch 4 holes top edge</dd> | |
6208 | <dt>IPP_FINISHINGS_PUNCH_TOP_LEFT </dt> | |
6209 | <dd class="description">Punch 1 hole top left</dd> | |
6210 | <dt>IPP_FINISHINGS_PUNCH_TOP_RIGHT </dt> | |
6211 | <dd class="description">Punch 1 hole top right</dd> | |
6212 | <dt>IPP_FINISHINGS_PUNCH_TRIPLE_BOTTOM </dt> | |
6213 | <dd class="description">Punch 3 holes bottom edge</dd> | |
6214 | <dt>IPP_FINISHINGS_PUNCH_TRIPLE_LEFT </dt> | |
6215 | <dd class="description">Punch 3 holes left side</dd> | |
6216 | <dt>IPP_FINISHINGS_PUNCH_TRIPLE_RIGHT </dt> | |
6217 | <dd class="description">Punch 3 holes right side</dd> | |
6218 | <dt>IPP_FINISHINGS_PUNCH_TRIPLE_TOP </dt> | |
6219 | <dd class="description">Punch 3 holes top edge</dd> | |
5a738aea MS |
6220 | <dt>IPP_FINISHINGS_SADDLE_STITCH </dt> |
6221 | <dd class="description">Staple interior</dd> | |
6222 | <dt>IPP_FINISHINGS_STAPLE </dt> | |
6223 | <dd class="description">Staple (any location)</dd> | |
6224 | <dt>IPP_FINISHINGS_STAPLE_BOTTOM_LEFT </dt> | |
6225 | <dd class="description">Staple bottom left corner</dd> | |
6226 | <dt>IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT </dt> | |
6227 | <dd class="description">Staple bottom right corner</dd> | |
6228 | <dt>IPP_FINISHINGS_STAPLE_DUAL_BOTTOM </dt> | |
6229 | <dd class="description">Two staples on bottom</dd> | |
6230 | <dt>IPP_FINISHINGS_STAPLE_DUAL_LEFT </dt> | |
6231 | <dd class="description">Two staples on left</dd> | |
6232 | <dt>IPP_FINISHINGS_STAPLE_DUAL_RIGHT </dt> | |
6233 | <dd class="description">Two staples on right</dd> | |
6234 | <dt>IPP_FINISHINGS_STAPLE_DUAL_TOP </dt> | |
6235 | <dd class="description">Two staples on top</dd> | |
6236 | <dt>IPP_FINISHINGS_STAPLE_TOP_LEFT </dt> | |
6237 | <dd class="description">Staple top left corner</dd> | |
6238 | <dt>IPP_FINISHINGS_STAPLE_TOP_RIGHT </dt> | |
6239 | <dd class="description">Staple top right corner</dd> | |
ca6b43fc MS |
6240 | <dt>IPP_FINISHINGS_STAPLE_TRIPLE_BOTTOM </dt> |
6241 | <dd class="description">Three staples on bottom</dd> | |
6242 | <dt>IPP_FINISHINGS_STAPLE_TRIPLE_LEFT </dt> | |
6243 | <dd class="description">Three staples on left</dd> | |
6244 | <dt>IPP_FINISHINGS_STAPLE_TRIPLE_RIGHT </dt> | |
6245 | <dd class="description">Three staples on right</dd> | |
6246 | <dt>IPP_FINISHINGS_STAPLE_TRIPLE_TOP </dt> | |
6247 | <dd class="description">Three staples on top</dd> | |
5a738aea MS |
6248 | <dt>IPP_FINISHINGS_TRIM </dt> |
6249 | <dd class="description">Trim (any type)</dd> | |
a2326b5b MS |
6250 | <dt>IPP_FINISHINGS_TRIM_AFTER_COPIES </dt> |
6251 | <dd class="description">Trim output after each copy</dd> | |
6252 | <dt>IPP_FINISHINGS_TRIM_AFTER_DOCUMENTS </dt> | |
6253 | <dd class="description">Trim output after each document</dd> | |
6254 | <dt>IPP_FINISHINGS_TRIM_AFTER_JOB </dt> | |
6255 | <dd class="description">Trim output after job</dd> | |
6256 | <dt>IPP_FINISHINGS_TRIM_AFTER_PAGES </dt> | |
6257 | <dd class="description">Trim output after each page</dd> | |
6258 | </dl> | |
6259 | <h3 class="enumeration"><a name="ipp_jcollate_e">ipp_jcollate_e</a></h3> | |
6260 | <p class="description">Job collation types</p> | |
6261 | <h4 class="constants">Constants</h4> | |
6262 | <dl> | |
a469f8a5 MS |
6263 | <dt>IPP_JCOLLATE_COLLATED_DOCUMENTS </dt> |
6264 | <dt>IPP_JCOLLATE_UNCOLLATED_DOCUMENTS </dt> | |
6265 | <dt>IPP_JCOLLATE_UNCOLLATED_SHEETS </dt> | |
5a738aea MS |
6266 | </dl> |
6267 | <h3 class="enumeration"><a name="ipp_jstate_e">ipp_jstate_e</a></h3> | |
aaf19ab0 | 6268 | <p class="description">Job states</p> |
5a738aea MS |
6269 | <h4 class="constants">Constants</h4> |
6270 | <dl> | |
a469f8a5 | 6271 | <dt>IPP_JSTATE_ABORTED </dt> |
5a738aea | 6272 | <dd class="description">Job has aborted due to error</dd> |
a469f8a5 | 6273 | <dt>IPP_JSTATE_CANCELED </dt> |
5a738aea | 6274 | <dd class="description">Job has been canceled</dd> |
a469f8a5 | 6275 | <dt>IPP_JSTATE_COMPLETED </dt> |
5a738aea | 6276 | <dd class="description">Job has completed successfully</dd> |
a469f8a5 | 6277 | <dt>IPP_JSTATE_HELD </dt> |
5a738aea | 6278 | <dd class="description">Job is held for printing</dd> |
a469f8a5 | 6279 | <dt>IPP_JSTATE_PENDING </dt> |
5a738aea | 6280 | <dd class="description">Job is waiting to be printed</dd> |
a469f8a5 | 6281 | <dt>IPP_JSTATE_PROCESSING </dt> |
5a738aea | 6282 | <dd class="description">Job is currently printing</dd> |
a469f8a5 | 6283 | <dt>IPP_JSTATE_STOPPED </dt> |
5a738aea MS |
6284 | <dd class="description">Job has been stopped</dd> |
6285 | </dl> | |
6286 | <h3 class="enumeration"><a name="ipp_op_e">ipp_op_e</a></h3> | |
aaf19ab0 | 6287 | <p class="description">IPP operations</p> |
5a738aea MS |
6288 | <h4 class="constants">Constants</h4> |
6289 | <dl> | |
a469f8a5 MS |
6290 | <dt>IPP_OP_CANCEL_JOB </dt> |
6291 | <dd class="description">Cancel a job</dd> | |
6292 | <dt>IPP_OP_CANCEL_JOBS </dt> | |
6293 | <dd class="description">Cancel-Jobs</dd> | |
6294 | <dt>IPP_OP_CANCEL_MY_JOBS </dt> | |
6295 | <dd class="description">Cancel-My-Jobs</dd> | |
6296 | <dt>IPP_OP_CANCEL_SUBSCRIPTION <span class="info"> CUPS 1.2/OS X 10.5 </span></dt> | |
6297 | <dd class="description">Cancel a subscription </dd> | |
6298 | <dt>IPP_OP_CLOSE_JOB </dt> | |
6299 | <dd class="description">Close-Job</dd> | |
6300 | <dt>IPP_OP_CREATE_JOB </dt> | |
6301 | <dd class="description">Create an empty print job</dd> | |
ca6b43fc MS |
6302 | <dt>IPP_OP_CREATE_JOB_SUBSCRIPTIONS <span class="info"> CUPS 1.2/OS X 10.5 </span></dt> |
6303 | <dd class="description">Create one of more job subscriptions </dd> | |
6304 | <dt>IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS <span class="info"> CUPS 1.2/OS X 10.5 </span></dt> | |
6305 | <dd class="description">Create one or more printer subscriptions </dd> | |
a469f8a5 | 6306 | <dt>IPP_OP_CUPS_ACCEPT_JOBS </dt> |
5a738aea | 6307 | <dd class="description">Accept new jobs on a printer</dd> |
a469f8a5 | 6308 | <dt>IPP_OP_CUPS_ADD_MODIFY_CLASS </dt> |
5a738aea | 6309 | <dd class="description">Add or modify a class</dd> |
a469f8a5 | 6310 | <dt>IPP_OP_CUPS_ADD_MODIFY_PRINTER </dt> |
5a738aea | 6311 | <dd class="description">Add or modify a printer</dd> |
a469f8a5 | 6312 | <dt>IPP_OP_CUPS_AUTHENTICATE_JOB <span class="info"> CUPS 1.2/OS X 10.5 </span></dt> |
5a738aea | 6313 | <dd class="description">Authenticate a job </dd> |
a469f8a5 | 6314 | <dt>IPP_OP_CUPS_DELETE_CLASS </dt> |
5a738aea | 6315 | <dd class="description">Delete a class</dd> |
a469f8a5 | 6316 | <dt>IPP_OP_CUPS_DELETE_PRINTER </dt> |
5a738aea | 6317 | <dd class="description">Delete a printer</dd> |
a469f8a5 | 6318 | <dt>IPP_OP_CUPS_GET_CLASSES <span class="info"> DEPRECATED </span></dt> |
5a738aea | 6319 | <dd class="description">Get a list of classes </dd> |
a469f8a5 | 6320 | <dt>IPP_OP_CUPS_GET_DEFAULT </dt> |
5a738aea | 6321 | <dd class="description">Get the default printer</dd> |
a469f8a5 | 6322 | <dt>IPP_OP_CUPS_GET_DEVICES </dt> |
5a738aea | 6323 | <dd class="description">Get a list of supported devices</dd> |
a469f8a5 | 6324 | <dt>IPP_OP_CUPS_GET_DOCUMENT <span class="info"> CUPS 1.4/OS X 10.6 </span></dt> |
5a738aea | 6325 | <dd class="description">Get a document file </dd> |
a469f8a5 | 6326 | <dt>IPP_OP_CUPS_GET_PPD <span class="info"> CUPS 1.3/OS X 10.5 </span></dt> |
5a738aea | 6327 | <dd class="description">Get a PPD file </dd> |
a469f8a5 | 6328 | <dt>IPP_OP_CUPS_GET_PPDS </dt> |
5a738aea | 6329 | <dd class="description">Get a list of supported drivers</dd> |
a469f8a5 | 6330 | <dt>IPP_OP_CUPS_GET_PRINTERS </dt> |
5a738aea | 6331 | <dd class="description">Get a list of printers and/or classes</dd> |
a469f8a5 MS |
6332 | <dt>IPP_OP_CUPS_INVALID </dt> |
6333 | <dd class="description">Invalid operation name for <a href="#ippOpValue"><code>ippOpValue</code></a></dd> | |
6334 | <dt>IPP_OP_CUPS_MOVE_JOB </dt> | |
5a738aea | 6335 | <dd class="description">Move a job to a different printer</dd> |
a469f8a5 | 6336 | <dt>IPP_OP_CUPS_REJECT_JOBS </dt> |
5a738aea | 6337 | <dd class="description">Reject new jobs on a printer</dd> |
a469f8a5 | 6338 | <dt>IPP_OP_CUPS_SET_DEFAULT </dt> |
5a738aea | 6339 | <dd class="description">Set the default printer</dd> |
a469f8a5 | 6340 | <dt>IPP_OP_DISABLE_PRINTER </dt> |
5a738aea | 6341 | <dd class="description">Stop a printer</dd> |
a469f8a5 | 6342 | <dt>IPP_OP_ENABLE_PRINTER </dt> |
5a738aea | 6343 | <dd class="description">Start a printer</dd> |
a469f8a5 | 6344 | <dt>IPP_OP_GET_JOBS </dt> |
5a738aea | 6345 | <dd class="description">Get a list of jobs</dd> |
a469f8a5 | 6346 | <dt>IPP_OP_GET_JOB_ATTRIBUTES </dt> |
5a738aea | 6347 | <dd class="description">Get job attributes</dd> |
a469f8a5 | 6348 | <dt>IPP_OP_GET_NOTIFICATIONS <span class="info"> CUPS 1.2/OS X 10.5 </span></dt> |
5a738aea | 6349 | <dd class="description">Get notification events </dd> |
a469f8a5 | 6350 | <dt>IPP_OP_GET_PRINTER_ATTRIBUTES </dt> |
5a738aea | 6351 | <dd class="description">Get printer attributes</dd> |
a469f8a5 | 6352 | <dt>IPP_OP_GET_PRINTER_SUPPORTED_VALUES </dt> |
5a738aea | 6353 | <dd class="description">Get supported attribute values</dd> |
a469f8a5 | 6354 | <dt>IPP_OP_GET_SUBSCRIPTIONS <span class="info"> CUPS 1.2/OS X 10.5 </span></dt> |
5a738aea | 6355 | <dd class="description">Get list of subscriptions </dd> |
a469f8a5 | 6356 | <dt>IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES <span class="info"> CUPS 1.2/OS X 10.5 </span></dt> |
5a738aea | 6357 | <dd class="description">Get subscription attributes </dd> |
a469f8a5 | 6358 | <dt>IPP_OP_HOLD_JOB </dt> |
5a738aea | 6359 | <dd class="description">Hold a job for printing</dd> |
a469f8a5 | 6360 | <dt>IPP_OP_PAUSE_PRINTER </dt> |
5a738aea | 6361 | <dd class="description">Stop a printer</dd> |
a469f8a5 | 6362 | <dt>IPP_OP_PRINT_JOB </dt> |
5a738aea | 6363 | <dd class="description">Print a single file</dd> |
a469f8a5 | 6364 | <dt>IPP_OP_PURGE_JOBS </dt> |
5a738aea | 6365 | <dd class="description">Cancel all jobs</dd> |
a469f8a5 | 6366 | <dt>IPP_OP_RELEASE_JOB </dt> |
5a738aea | 6367 | <dd class="description">Release a job for printing</dd> |
a469f8a5 | 6368 | <dt>IPP_OP_RENEW_SUBSCRIPTION <span class="info"> CUPS 1.2/OS X 10.5 </span></dt> |
5a738aea | 6369 | <dd class="description">Renew a printer subscription </dd> |
a469f8a5 | 6370 | <dt>IPP_OP_RESTART_JOB </dt> |
5a738aea | 6371 | <dd class="description">Reprint a job</dd> |
a469f8a5 | 6372 | <dt>IPP_OP_RESUBMIT_JOB </dt> |
aaf19ab0 | 6373 | <dd class="description">Resubmit-Job</dd> |
a469f8a5 | 6374 | <dt>IPP_OP_RESUME_PRINTER </dt> |
5a738aea | 6375 | <dd class="description">Start a printer</dd> |
a469f8a5 | 6376 | <dt>IPP_OP_SEND_DOCUMENT </dt> |
5a738aea | 6377 | <dd class="description">Add a file to a job</dd> |
a469f8a5 | 6378 | <dt>IPP_OP_SET_JOB_ATTRIBUTES </dt> |
5a738aea | 6379 | <dd class="description">Set job attributes</dd> |
a469f8a5 | 6380 | <dt>IPP_OP_VALIDATE_JOB </dt> |
5a738aea MS |
6381 | <dd class="description">Validate job options</dd> |
6382 | </dl> | |
6383 | <h3 class="enumeration"><a name="ipp_orient_e">ipp_orient_e</a></h3> | |
aaf19ab0 | 6384 | <p class="description">Orientation values</p> |
5a738aea MS |
6385 | <h4 class="constants">Constants</h4> |
6386 | <dl> | |
a469f8a5 | 6387 | <dt>IPP_ORIENT_LANDSCAPE </dt> |
5a738aea | 6388 | <dd class="description">90 degrees counter-clockwise</dd> |
ca6b43fc MS |
6389 | <dt>IPP_ORIENT_NONE </dt> |
6390 | <dd class="description">No rotation</dd> | |
a469f8a5 | 6391 | <dt>IPP_ORIENT_PORTRAIT </dt> |
5a738aea | 6392 | <dd class="description">No rotation</dd> |
a469f8a5 | 6393 | <dt>IPP_ORIENT_REVERSE_LANDSCAPE </dt> |
5a738aea | 6394 | <dd class="description">90 degrees clockwise</dd> |
a469f8a5 | 6395 | <dt>IPP_ORIENT_REVERSE_PORTRAIT </dt> |
5a738aea MS |
6396 | <dd class="description">180 degrees</dd> |
6397 | </dl> | |
6398 | <h3 class="enumeration"><a name="ipp_pstate_e">ipp_pstate_e</a></h3> | |
aaf19ab0 | 6399 | <p class="description">Printer states</p> |
5a738aea MS |
6400 | <h4 class="constants">Constants</h4> |
6401 | <dl> | |
a469f8a5 | 6402 | <dt>IPP_PSTATE_IDLE </dt> |
5a738aea | 6403 | <dd class="description">Printer is idle</dd> |
a469f8a5 | 6404 | <dt>IPP_PSTATE_PROCESSING </dt> |
5a738aea | 6405 | <dd class="description">Printer is working</dd> |
a469f8a5 | 6406 | <dt>IPP_PSTATE_STOPPED </dt> |
5a738aea MS |
6407 | <dd class="description">Printer is stopped</dd> |
6408 | </dl> | |
6409 | <h3 class="enumeration"><a name="ipp_quality_e">ipp_quality_e</a></h3> | |
aaf19ab0 | 6410 | <p class="description">Qualities</p> |
5a738aea MS |
6411 | <h4 class="constants">Constants</h4> |
6412 | <dl> | |
6413 | <dt>IPP_QUALITY_DRAFT </dt> | |
6414 | <dd class="description">Draft quality</dd> | |
6415 | <dt>IPP_QUALITY_HIGH </dt> | |
6416 | <dd class="description">High quality</dd> | |
6417 | <dt>IPP_QUALITY_NORMAL </dt> | |
6418 | <dd class="description">Normal quality</dd> | |
6419 | </dl> | |
6420 | <h3 class="enumeration"><a name="ipp_res_e">ipp_res_e</a></h3> | |
aaf19ab0 | 6421 | <p class="description">Resolution units</p> |
5a738aea MS |
6422 | <h4 class="constants">Constants</h4> |
6423 | <dl> | |
6424 | <dt>IPP_RES_PER_CM </dt> | |
6425 | <dd class="description">Pixels per centimeter</dd> | |
6426 | <dt>IPP_RES_PER_INCH </dt> | |
6427 | <dd class="description">Pixels per inch</dd> | |
6428 | </dl> | |
6429 | <h3 class="enumeration"><a name="ipp_state_e">ipp_state_e</a></h3> | |
aaf19ab0 | 6430 | <p class="description">IPP states</p> |
5a738aea MS |
6431 | <h4 class="constants">Constants</h4> |
6432 | <dl> | |
a469f8a5 | 6433 | <dt>IPP_STATE_ATTRIBUTE </dt> |
5a738aea | 6434 | <dd class="description">One or more attributes need to be sent/received</dd> |
a469f8a5 | 6435 | <dt>IPP_STATE_DATA </dt> |
5a738aea | 6436 | <dd class="description">IPP request data needs to be sent/received</dd> |
a469f8a5 | 6437 | <dt>IPP_STATE_ERROR </dt> |
5a738aea | 6438 | <dd class="description">An error occurred</dd> |
a469f8a5 | 6439 | <dt>IPP_STATE_HEADER </dt> |
5a738aea | 6440 | <dd class="description">The request header needs to be sent/received</dd> |
a469f8a5 | 6441 | <dt>IPP_STATE_IDLE </dt> |
5a738aea MS |
6442 | <dd class="description">Nothing is happening/request completed</dd> |
6443 | </dl> | |
6444 | <h3 class="enumeration"><a name="ipp_status_e">ipp_status_e</a></h3> | |
aaf19ab0 | 6445 | <p class="description">IPP status codes</p> |
5a738aea MS |
6446 | <h4 class="constants">Constants</h4> |
6447 | <dl> | |
a469f8a5 MS |
6448 | <dt>IPP_STATUS_CUPS_INVALID </dt> |
6449 | <dd class="description">Invalid status name for <a href="#ippErrorValue"><code>ippErrorValue</code></a></dd> | |
6450 | <dt>IPP_STATUS_CUPS_SEE_OTHER </dt> | |
5a738aea | 6451 | <dd class="description">cups-see-other</dd> |
a469f8a5 | 6452 | <dt>IPP_STATUS_ERROR_ATTRIBUTES_NOT_SETTABLE </dt> |
5a738aea | 6453 | <dd class="description">client-error-attributes-not-settable</dd> |
a469f8a5 MS |
6454 | <dt>IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES </dt> |
6455 | <dd class="description">client-error-attributes-or-values-not-supported</dd> | |
6456 | <dt>IPP_STATUS_ERROR_BAD_REQUEST </dt> | |
5a738aea | 6457 | <dd class="description">client-error-bad-request</dd> |
a469f8a5 MS |
6458 | <dt>IPP_STATUS_ERROR_BUSY </dt> |
6459 | <dd class="description">server-error-busy</dd> | |
6460 | <dt>IPP_STATUS_ERROR_CHARSET </dt> | |
5a738aea | 6461 | <dd class="description">client-error-charset-not-supported</dd> |
a469f8a5 | 6462 | <dt>IPP_STATUS_ERROR_COMPRESSION_ERROR </dt> |
5a738aea | 6463 | <dd class="description">client-error-compression-error</dd> |
a469f8a5 | 6464 | <dt>IPP_STATUS_ERROR_COMPRESSION_NOT_SUPPORTED </dt> |
5a738aea | 6465 | <dd class="description">client-error-compression-not-supported</dd> |
a469f8a5 | 6466 | <dt>IPP_STATUS_ERROR_CONFLICTING </dt> |
5a738aea | 6467 | <dd class="description">client-error-conflicting-attributes</dd> |
9c0e8e5d | 6468 | <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED <span class="info"> CUPS 1.7/OS X 10.9 </span></dt> |
a469f8a5 | 6469 | <dd class="description">cups-error-account-authorization-failed </dd> |
9c0e8e5d | 6470 | <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED <span class="info"> CUPS 1.7/OS X 10.9 </span></dt> |
a469f8a5 | 6471 | <dd class="description">cups-error-account-closed </dd> |
9c0e8e5d | 6472 | <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED <span class="info"> CUPS 1.7/OS X 10.9 </span></dt> |
a469f8a5 | 6473 | <dd class="description">cups-error-account-info-needed </dd> |
9c0e8e5d | 6474 | <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_LIMIT_REACHED <span class="info"> CUPS 1.7/OS X 10.9 </span></dt> |
a469f8a5 MS |
6475 | <dd class="description">cups-error-account-limit-reached </dd> |
6476 | <dt>IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED <span class="info"> CUPS 1.5/OS X 10.7 </span></dt> | |
6477 | <dd class="description">cups-authentication-canceled - Authentication canceled by user </dd> | |
6478 | <dt>IPP_STATUS_ERROR_CUPS_PKI <span class="info"> CUPS 1.5/OS X 10.7 </span></dt> | |
6479 | <dd class="description">cups-pki-error - Error negotiating a secure connection </dd> | |
6480 | <dt>IPP_STATUS_ERROR_CUPS_UPGRADE_REQUIRED </dt> | |
6481 | <dd class="description">cups-upgrade-required - TLS upgrade required</dd> | |
6482 | <dt>IPP_STATUS_ERROR_DEVICE </dt> | |
5a738aea | 6483 | <dd class="description">server-error-device-error</dd> |
a469f8a5 | 6484 | <dt>IPP_STATUS_ERROR_DOCUMENT_ACCESS </dt> |
5a738aea | 6485 | <dd class="description">client-error-document-access-error</dd> |
a469f8a5 | 6486 | <dt>IPP_STATUS_ERROR_DOCUMENT_FORMAT_ERROR </dt> |
5a738aea | 6487 | <dd class="description">client-error-document-format-error</dd> |
a469f8a5 MS |
6488 | <dt>IPP_STATUS_ERROR_DOCUMENT_FORMAT_NOT_SUPPORTED </dt> |
6489 | <dd class="description">client-error-document-format-not-supported</dd> | |
6490 | <dt>IPP_STATUS_ERROR_DOCUMENT_PASSWORD </dt> | |
a2326b5b | 6491 | <dd class="description">client-error-document-password-error</dd> |
a469f8a5 | 6492 | <dt>IPP_STATUS_ERROR_DOCUMENT_PERMISSION </dt> |
a2326b5b | 6493 | <dd class="description">client-error-document-permission-error</dd> |
a469f8a5 | 6494 | <dt>IPP_STATUS_ERROR_DOCUMENT_SECURITY </dt> |
a2326b5b | 6495 | <dd class="description">client-error-document-security-error</dd> |
a469f8a5 | 6496 | <dt>IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE </dt> |
a2326b5b | 6497 | <dd class="description">client-error-document-unprintable-error</dd> |
a469f8a5 | 6498 | <dt>IPP_STATUS_ERROR_FORBIDDEN </dt> |
5a738aea | 6499 | <dd class="description">client-error-forbidden</dd> |
a469f8a5 | 6500 | <dt>IPP_STATUS_ERROR_GONE </dt> |
5a738aea | 6501 | <dd class="description">client-error-gone</dd> |
a469f8a5 | 6502 | <dt>IPP_STATUS_ERROR_IGNORED_ALL_SUBSCRIPTIONS </dt> |
5a738aea | 6503 | <dd class="description">client-error-ignored-all-subscriptions</dd> |
a469f8a5 | 6504 | <dt>IPP_STATUS_ERROR_INTERNAL </dt> |
5a738aea | 6505 | <dd class="description">server-error-internal-error</dd> |
a469f8a5 MS |
6506 | <dt>IPP_STATUS_ERROR_JOB_CANCELED </dt> |
6507 | <dd class="description">server-error-job-canceled</dd> | |
6508 | <dt>IPP_STATUS_ERROR_MULTIPLE_JOBS_NOT_SUPPORTED </dt> | |
5a738aea | 6509 | <dd class="description">server-error-multiple-document-jobs-not-supported</dd> |
a469f8a5 | 6510 | <dt>IPP_STATUS_ERROR_NOT_ACCEPTING_JOBS </dt> |
5a738aea | 6511 | <dd class="description">server-error-not-accepting-jobs</dd> |
a469f8a5 | 6512 | <dt>IPP_STATUS_ERROR_NOT_AUTHENTICATED </dt> |
5a738aea | 6513 | <dd class="description">client-error-not-authenticated</dd> |
a469f8a5 | 6514 | <dt>IPP_STATUS_ERROR_NOT_AUTHORIZED </dt> |
5a738aea | 6515 | <dd class="description">client-error-not-authorized</dd> |
a469f8a5 | 6516 | <dt>IPP_STATUS_ERROR_NOT_FOUND </dt> |
5a738aea | 6517 | <dd class="description">client-error-not-found</dd> |
a469f8a5 | 6518 | <dt>IPP_STATUS_ERROR_NOT_POSSIBLE </dt> |
5a738aea | 6519 | <dd class="description">client-error-not-possible</dd> |
a469f8a5 | 6520 | <dt>IPP_STATUS_ERROR_OPERATION_NOT_SUPPORTED </dt> |
5a738aea | 6521 | <dd class="description">server-error-operation-not-supported</dd> |
a469f8a5 | 6522 | <dt>IPP_STATUS_ERROR_PRINTER_IS_DEACTIVATED </dt> |
5a738aea | 6523 | <dd class="description">server-error-printer-is-deactivated</dd> |
a469f8a5 | 6524 | <dt>IPP_STATUS_ERROR_REQUEST_ENTITY </dt> |
5a738aea | 6525 | <dd class="description">client-error-request-entity-too-large</dd> |
a469f8a5 | 6526 | <dt>IPP_STATUS_ERROR_REQUEST_VALUE </dt> |
5a738aea | 6527 | <dd class="description">client-error-request-value-too-long</dd> |
a469f8a5 | 6528 | <dt>IPP_STATUS_ERROR_SERVICE_UNAVAILABLE </dt> |
5a738aea | 6529 | <dd class="description">server-error-service-unavailable</dd> |
a469f8a5 | 6530 | <dt>IPP_STATUS_ERROR_TEMPORARY </dt> |
5a738aea | 6531 | <dd class="description">server-error-temporary-error</dd> |
a469f8a5 | 6532 | <dt>IPP_STATUS_ERROR_TIMEOUT </dt> |
5a738aea | 6533 | <dd class="description">client-error-timeout</dd> |
a469f8a5 | 6534 | <dt>IPP_STATUS_ERROR_TOO_MANY_DOCUMENTS </dt> |
3e7fe0ca | 6535 | <dd class="description">server-error-too-many-documents</dd> |
a469f8a5 | 6536 | <dt>IPP_STATUS_ERROR_TOO_MANY_JOBS </dt> |
3e7fe0ca | 6537 | <dd class="description">server-error-too-many-jobs</dd> |
a469f8a5 | 6538 | <dt>IPP_STATUS_ERROR_TOO_MANY_SUBSCRIPTIONS </dt> |
5a738aea | 6539 | <dd class="description">client-error-too-many-subscriptions</dd> |
a469f8a5 | 6540 | <dt>IPP_STATUS_ERROR_URI_SCHEME </dt> |
5a738aea | 6541 | <dd class="description">client-error-uri-scheme-not-supported</dd> |
a469f8a5 | 6542 | <dt>IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED </dt> |
5a738aea | 6543 | <dd class="description">server-error-version-not-supported</dd> |
a469f8a5 MS |
6544 | <dt>IPP_STATUS_OK </dt> |
6545 | <dd class="description">successful-ok</dd> | |
6546 | <dt>IPP_STATUS_OK_CONFLICTING </dt> | |
6547 | <dd class="description">successful-ok-conflicting-attributes</dd> | |
6548 | <dt>IPP_STATUS_OK_EVENTS_COMPLETE </dt> | |
6549 | <dd class="description">successful-ok-events-complete</dd> | |
6550 | <dt>IPP_STATUS_OK_IGNORED_OR_SUBSTITUTED </dt> | |
6551 | <dd class="description">successful-ok-ignored-or-substituted-attributes</dd> | |
6552 | <dt>IPP_STATUS_OK_IGNORED_SUBSCRIPTIONS </dt> | |
6553 | <dd class="description">successful-ok-ignored-subscriptions</dd> | |
6554 | <dt>IPP_STATUS_OK_TOO_MANY_EVENTS </dt> | |
6555 | <dd class="description">successful-ok-too-many-events</dd> | |
5a738aea MS |
6556 | </dl> |
6557 | <h3 class="enumeration"><a name="ipp_tag_e">ipp_tag_e</a></h3> | |
aaf19ab0 | 6558 | <p class="description">Format tags for attributes</p> |
5a738aea MS |
6559 | <h4 class="constants">Constants</h4> |
6560 | <dl> | |
6561 | <dt>IPP_TAG_ADMINDEFINE </dt> | |
6562 | <dd class="description">Admin-defined value</dd> | |
6563 | <dt>IPP_TAG_BEGIN_COLLECTION </dt> | |
6564 | <dd class="description">Beginning of collection value</dd> | |
6565 | <dt>IPP_TAG_BOOLEAN </dt> | |
6566 | <dd class="description">Boolean value</dd> | |
6567 | <dt>IPP_TAG_CHARSET </dt> | |
6568 | <dd class="description">Character set value</dd> | |
3e7fe0ca MS |
6569 | <dt>IPP_TAG_CUPS_INVALID </dt> |
6570 | <dd class="description">Invalid tag name for <a href="#ippTagValue"><code>ippTagValue</code></a></dd> | |
5a738aea MS |
6571 | <dt>IPP_TAG_DATE </dt> |
6572 | <dd class="description">Date/time value</dd> | |
6573 | <dt>IPP_TAG_DEFAULT </dt> | |
6574 | <dd class="description">Default value</dd> | |
6575 | <dt>IPP_TAG_DELETEATTR </dt> | |
6576 | <dd class="description">Delete-attribute value</dd> | |
a2326b5b MS |
6577 | <dt>IPP_TAG_DOCUMENT </dt> |
6578 | <dd class="description">Document group</dd> | |
5a738aea MS |
6579 | <dt>IPP_TAG_END </dt> |
6580 | <dd class="description">End-of-attributes</dd> | |
6581 | <dt>IPP_TAG_END_COLLECTION </dt> | |
6582 | <dd class="description">End of collection value</dd> | |
6583 | <dt>IPP_TAG_ENUM </dt> | |
6584 | <dd class="description">Enumeration value</dd> | |
6585 | <dt>IPP_TAG_EVENT_NOTIFICATION </dt> | |
6586 | <dd class="description">Event group</dd> | |
a2326b5b MS |
6587 | <dt>IPP_TAG_EXTENSION </dt> |
6588 | <dd class="description">Extension point for 32-bit tags</dd> | |
5a738aea MS |
6589 | <dt>IPP_TAG_INTEGER </dt> |
6590 | <dd class="description">Integer value</dd> | |
6591 | <dt>IPP_TAG_JOB </dt> | |
6592 | <dd class="description">Job group</dd> | |
6593 | <dt>IPP_TAG_KEYWORD </dt> | |
6594 | <dd class="description">Keyword value</dd> | |
6595 | <dt>IPP_TAG_LANGUAGE </dt> | |
6596 | <dd class="description">Language value</dd> | |
5a738aea MS |
6597 | <dt>IPP_TAG_MEMBERNAME </dt> |
6598 | <dd class="description">Collection member name value</dd> | |
6599 | <dt>IPP_TAG_MIMETYPE </dt> | |
6600 | <dd class="description">MIME media type value</dd> | |
6601 | <dt>IPP_TAG_NAME </dt> | |
6602 | <dd class="description">Name value</dd> | |
6603 | <dt>IPP_TAG_NAMELANG </dt> | |
6604 | <dd class="description">Name-with-language value</dd> | |
6605 | <dt>IPP_TAG_NOTSETTABLE </dt> | |
6606 | <dd class="description">Not-settable value</dd> | |
6607 | <dt>IPP_TAG_NOVALUE </dt> | |
6608 | <dd class="description">No-value value</dd> | |
6609 | <dt>IPP_TAG_OPERATION </dt> | |
6610 | <dd class="description">Operation group</dd> | |
6611 | <dt>IPP_TAG_PRINTER </dt> | |
6612 | <dd class="description">Printer group</dd> | |
6613 | <dt>IPP_TAG_RANGE </dt> | |
6614 | <dd class="description">Range value</dd> | |
6615 | <dt>IPP_TAG_RESOLUTION </dt> | |
6616 | <dd class="description">Resolution value</dd> | |
6617 | <dt>IPP_TAG_STRING </dt> | |
6618 | <dd class="description">Octet string value</dd> | |
6619 | <dt>IPP_TAG_SUBSCRIPTION </dt> | |
6620 | <dd class="description">Subscription group</dd> | |
6621 | <dt>IPP_TAG_TEXT </dt> | |
6622 | <dd class="description">Text value</dd> | |
6623 | <dt>IPP_TAG_TEXTLANG </dt> | |
6624 | <dd class="description">Text-with-language value</dd> | |
6625 | <dt>IPP_TAG_UNKNOWN </dt> | |
6626 | <dd class="description">Unknown value</dd> | |
6627 | <dt>IPP_TAG_UNSUPPORTED_GROUP </dt> | |
6628 | <dd class="description">Unsupported attributes group</dd> | |
6629 | <dt>IPP_TAG_UNSUPPORTED_VALUE </dt> | |
6630 | <dd class="description">Unsupported value</dd> | |
6631 | <dt>IPP_TAG_URI </dt> | |
6632 | <dd class="description">URI value</dd> | |
6633 | <dt>IPP_TAG_URISCHEME </dt> | |
6634 | <dd class="description">URI scheme value</dd> | |
6635 | <dt>IPP_TAG_ZERO </dt> | |
6636 | <dd class="description">Zero tag - used for separators</dd> | |
6637 | </dl> | |
6638 | </div> | |
ef416fc2 | 6639 | </body> |
6640 | </html> |