]> git.ipfire.org Git - thirdparty/cups.git/blob - doc/help/api-httpipp.html
Changelog.
[thirdparty/cups.git] / doc / help / api-httpipp.html
1 <!doctype html>
2 <html>
3 <!-- SECTION: Programming -->
4 <head>
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.11">
9 <meta name="author" content="Unknown">
10 <meta name="copyright" content="Unknown">
11 <style type="text/css"><!--
12 BODY {
13 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
14 }
15
16 H1, H2, H3, H4, H5, H6, P, TD, TH {
17 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
18 }
19
20 KBD {
21 font-family: monaco, courier, monospace;
22 font-weight: bold;
23 }
24
25 PRE {
26 font-family: monaco, courier, monospace;
27 }
28
29 PRE.command {
30 border: dotted thin #7f7f7f;
31 margin-left: 36pt;
32 padding: 10px;
33 }
34
35 P.compact {
36 margin: 0;
37 }
38
39 P.example {
40 font-style: italic;
41 margin-left: 36pt;
42 }
43
44 DL.man DD {
45 margin-left: 5em;
46 }
47
48 DL.man DT {
49 margin-left: 0;
50 }
51
52 PRE.man {
53 margin: 0;
54 }
55
56 PRE.example {
57 background: #eeeeee;
58 border: dotted thin #999999;
59 margin-left: 36pt;
60 padding: 10pt;
61 }
62
63 PRE.command EM, PRE.example EM {
64 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
65 }
66
67 P.command {
68 font-family: monaco, courier, monospace;
69 margin-left: 36pt;
70 }
71
72 P.formula {
73 font-style: italic;
74 margin-left: 36pt;
75 }
76
77 BLOCKQUOTE {
78 background: #eeeeee;
79 border: solid thin #999999;
80 padding: 10pt;
81 }
82
83 A IMG {
84 border: none;
85 }
86
87 A:link:hover IMG {
88 background: #f0f0f0;
89 border-radius: 10px;
90 -moz-border-radius: 10px;
91 }
92
93 A:link, A:visited {
94 font-weight: inherit;
95 text-decoration: none;
96 }
97
98 A:link:hover, A:visited:hover, A:active {
99 text-decoration: underline;
100 }
101
102 SUB, SUP {
103 font-size: 50%;
104 }
105
106 TR.data, TD.data, TR.data TD {
107 margin-top: 10pt;
108 padding: 5pt;
109 border-bottom: solid 1pt #999999;
110 }
111
112 TR.data TH {
113 border-bottom: solid 1pt #999999;
114 padding-top: 10pt;
115 padding-left: 5pt;
116 text-align: left;
117 }
118
119 DIV.table TABLE {
120 border: solid thin #999999;
121 border-collapse: collapse;
122 border-spacing: 0;
123 margin-left: auto;
124 margin-right: auto;
125 }
126
127 DIV.table CAPTION {
128 caption-side: top;
129 font-size: 120%;
130 font-style: italic;
131 font-weight: bold;
132 margin-left: auto;
133 margin-right: auto;
134 }
135
136 DIV.table TABLE TD {
137 border: solid thin #cccccc;
138 padding-top: 5pt;
139 }
140
141 DIV.table TABLE TH {
142 background: #cccccc;
143 border: none;
144 border-bottom: solid thin #999999;
145 }
146
147 DIV.figure TABLE {
148 margin-left: auto;
149 margin-right: auto;
150 }
151
152 DIV.figure CAPTION {
153 caption-side: bottom;
154 font-size: 120%;
155 font-style: italic;
156 font-weight: bold;
157 margin-left: auto;
158 margin-right: auto;
159 }
160
161 TH.label {
162 text-align: right;
163 vertical-align: top;
164 }
165
166 TH.sublabel {
167 text-align: right;
168 font-weight: normal;
169 }
170
171 HR {
172 border: solid thin;
173 }
174
175 SPAN.info {
176 background: black;
177 border: thin solid black;
178 color: white;
179 font-size: 80%;
180 font-style: italic;
181 font-weight: bold;
182 white-space: nowrap;
183 }
184
185 H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
186 float: right;
187 font-size: 100%;
188 }
189
190 H1.title {
191 }
192
193 H2.title, H3.title {
194 border-bottom: solid 2pt #000000;
195 }
196
197 DIV.indent, TABLE.indent {
198 margin-top: 2em;
199 margin-left: auto;
200 margin-right: auto;
201 width: 90%;
202 }
203
204 TABLE.indent {
205 border-collapse: collapse;
206 }
207
208 TABLE.indent TD, TABLE.indent TH {
209 padding: 0;
210 }
211
212 TABLE.list {
213 border-collapse: collapse;
214 margin-left: auto;
215 margin-right: auto;
216 width: 90%;
217 }
218
219 TABLE.list TH {
220 background: white;
221 border-bottom: solid thin #cccccc;
222 color: #444444;
223 padding-top: 10pt;
224 padding-left: 5pt;
225 text-align: left;
226 vertical-align: bottom;
227 white-space: nowrap;
228 }
229
230 TABLE.list TH A {
231 color: #4444cc;
232 }
233
234 TABLE.list TD {
235 border-bottom: solid thin #eeeeee;
236 padding-top: 5pt;
237 padding-left: 5pt;
238 }
239
240 TABLE.list TR:nth-child(even) {
241 background: #f8f8f8;
242 }
243
244 TABLE.list TR:nth-child(odd) {
245 background: #f4f4f4;
246 }
247
248 DT {
249 margin-left: 36pt;
250 margin-top: 12pt;
251 }
252
253 DD {
254 margin-left: 54pt;
255 }
256
257 DL.category DT {
258 font-weight: bold;
259 }
260
261 P.summary {
262 margin-left: 36pt;
263 font-family: monaco, courier, monospace;
264 }
265
266 DIV.summary TABLE {
267 border: solid thin #999999;
268 border-collapse: collapse;
269 border-spacing: 0;
270 margin: 10px;
271 }
272
273 DIV.summary TABLE TD, DIV.summary TABLE TH {
274 border: solid thin #999999;
275 padding: 5px;
276 text-align: left;
277 vertical-align: top;
278 }
279
280 DIV.summary TABLE THEAD TH {
281 background: #eeeeee;
282 }
283
284 /* API documentation styles... */
285 div.body h1 {
286 margin: 0;
287 }
288 div.body h2 {
289 margin-top: 1.5em;
290 }
291 div.body h3, div.body h4, div.body h5 {
292 margin-bottom: 0.5em;
293 margin-top: 1.5em;
294 }
295 .class, .enumeration, .function, .struct, .typedef, .union {
296 border-bottom: solid thin #999999;
297 margin-bottom: 0;
298 margin-top: 2em;
299 }
300 .description {
301 margin-top: 0.5em;
302 }
303 code, p.code, pre, ul.code li {
304 font-family: monaco, courier, monospace;
305 font-size: 90%;
306 }
307 ul.code, ul.contents, ul.subcontents {
308 list-style-type: none;
309 margin: 0;
310 padding-left: 0;
311 }
312 ul.code li {
313 margin: 0;
314 }
315 ul.contents > li {
316 margin-top: 1em;
317 }
318 ul.contents li ul.code, ul.contents li ul.subcontents {
319 padding-left: 2em;
320 }
321 div.body dl {
322 margin-left: 0;
323 margin-top: 0;
324 }
325 div.body dt {
326 font-style: italic;
327 margin-left: 0;
328 margin-top: 0;
329 }
330 div.body dd {
331 margin-bottom: 0.5em;
332 }
333
334 /* This is just for the HTML files generated with the framedhelp target */
335 div.contents {
336 background: #e8e8e8;
337 border: solid thin black;
338 padding: 10px;
339 }
340 div.contents h1 {
341 font-size: 110%;
342 }
343 div.contents h2 {
344 font-size: 100%;
345 }
346 div.contents ul.contents {
347 font-size: 80%;
348 }
349 div.contents ul.subcontents li {
350 margin-left: 1em;
351 text-indent: -1em;
352 }
353 --></style>
354 </head>
355 <body>
356 <!--
357 HTTP and IPP API header for CUPS.
358
359 Copyright 2007-2016 by Apple Inc.
360 Copyright 1997-2006 by Easy Software Products, all rights reserved.
361
362 These coded instructions, statements, and computer programs are the
363 property of Apple Inc. and are protected by Federal copyright
364 law. Distribution and use rights are outlined in the file "LICENSE.txt"
365 which should have been included with this file. If this file is
366 file is missing or damaged, see the license at "http://www.cups.org/".
367 -->
368
369 <h1 class='title'>HTTP and IPP APIs</h1>
370
371 <div class='summary'><table summary='General Information'>
372 <thead>
373 <tr>
374 <th>Headers</th>
375 <th>cups/cups.h<br>
376 cups/http.h<br>
377 cups/ipp.h</th>
378 </tr>
379 </thead>
380 <tbody>
381 <tr>
382 <th>Library</th>
383 <td>-lcups</td>
384 </tr>
385 <tr>
386 <th>See Also</th>
387 <td>Programming: <a href='api-overview.html'>Introduction to CUPS Programming</a><br>
388 Programming: <a href='api-cups.html'>CUPS API</a><br>
389 References: <a href='spec-ipp.html'>CUPS Implementation of IPP</a></td>
390 </tr>
391 </tbody>
392 </table></div>
393 <div class="contents">
394 <h2 class="title">Contents</h2>
395 <ul class="contents">
396 <li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
397 <li><a href="#CREATING_URI_STRINGS">Creating URI Strings</a></li>
398 <li><a href="#SENDING_REQUESTS_WITH_FILES">Sending Requests with Files</a></li>
399 <li><a href="#ASYNCHRONOUS_REQUEST_PROCESSING">Asynchronous Request Processing</a></li>
400 </ul></li>
401 <li><a href="#FUNCTIONS">Functions</a><ul class="subcontents">
402 <li><a href="#cupsDoAuthentication">cupsDoAuthentication</a></li>
403 <li><a href="#cupsDoFileRequest">cupsDoFileRequest</a></li>
404 <li><a href="#cupsDoIORequest">cupsDoIORequest</a></li>
405 <li><a href="#cupsDoRequest">cupsDoRequest</a></li>
406 <li><a href="#cupsEncodeOptions">cupsEncodeOptions</a></li>
407 <li><a href="#cupsEncodeOptions2">cupsEncodeOptions2</a></li>
408 <li><a href="#cupsGetDevices">cupsGetDevices</a></li>
409 <li><a href="#cupsGetFd">cupsGetFd</a></li>
410 <li><a href="#cupsGetFile">cupsGetFile</a></li>
411 <li><a href="#cupsGetResponse">cupsGetResponse</a></li>
412 <li><a href="#cupsLastError">cupsLastError</a></li>
413 <li><a href="#cupsLastErrorString">cupsLastErrorString</a></li>
414 <li><a href="#cupsPutFd">cupsPutFd</a></li>
415 <li><a href="#cupsPutFile">cupsPutFile</a></li>
416 <li><a href="#cupsReadResponseData">cupsReadResponseData</a></li>
417 <li><a href="#cupsSendRequest">cupsSendRequest</a></li>
418 <li><a href="#cupsWriteRequestData">cupsWriteRequestData</a></li>
419 <li><a href="#httpAcceptConnection">httpAcceptConnection</a></li>
420 <li><a href="#httpAddCredential">httpAddCredential</a></li>
421 <li><a href="#httpAddrAny">httpAddrAny</a></li>
422 <li><a href="#httpAddrClose">httpAddrClose</a></li>
423 <li><a href="#httpAddrEqual">httpAddrEqual</a></li>
424 <li><a href="#httpAddrFamily">httpAddrFamily</a></li>
425 <li><a href="#httpAddrLength">httpAddrLength</a></li>
426 <li><a href="#httpAddrListen">httpAddrListen</a></li>
427 <li><a href="#httpAddrLocalhost">httpAddrLocalhost</a></li>
428 <li><a href="#httpAddrLookup">httpAddrLookup</a></li>
429 <li><a href="#httpAddrPort">httpAddrPort</a></li>
430 <li><a href="#httpAddrString">httpAddrString</a></li>
431 <li><a href="#httpAssembleURI">httpAssembleURI</a></li>
432 <li><a href="#httpAssembleURIf">httpAssembleURIf</a></li>
433 <li><a href="#httpAssembleUUID">httpAssembleUUID</a></li>
434 <li><a href="#httpBlocking">httpBlocking</a></li>
435 <li><a href="#httpCheck">httpCheck</a></li>
436 <li><a href="#httpClearCookie">httpClearCookie</a></li>
437 <li><a href="#httpClearFields">httpClearFields</a></li>
438 <li><a href="#httpClose">httpClose</a></li>
439 <li><a href="#httpCompareCredentials">httpCompareCredentials</a></li>
440 <li><a href="#httpConnect">httpConnect</a></li>
441 <li><a href="#httpConnect2">httpConnect2</a></li>
442 <li><a href="#httpConnectEncrypt">httpConnectEncrypt</a></li>
443 <li><a href="#httpDecode64">httpDecode64</a></li>
444 <li><a href="#httpDecode64_2">httpDecode64_2</a></li>
445 <li><a href="#httpDelete">httpDelete</a></li>
446 <li><a href="#httpEncode64">httpEncode64</a></li>
447 <li><a href="#httpEncode64_2">httpEncode64_2</a></li>
448 <li><a href="#httpEncryption">httpEncryption</a></li>
449 <li><a href="#httpError">httpError</a></li>
450 <li><a href="#httpFieldValue">httpFieldValue</a></li>
451 <li><a href="#httpFlush">httpFlush</a></li>
452 <li><a href="#httpFlushWrite">httpFlushWrite</a></li>
453 <li><a href="#httpFreeCredentials">httpFreeCredentials</a></li>
454 <li><a href="#httpGet">httpGet</a></li>
455 <li><a href="#httpGetActivity">httpGetActivity</a></li>
456 <li><a href="#httpGetAddress">httpGetAddress</a></li>
457 <li><a href="#httpGetAuthString">httpGetAuthString</a></li>
458 <li><a href="#httpGetBlocking">httpGetBlocking</a></li>
459 <li><a href="#httpGetContentEncoding">httpGetContentEncoding</a></li>
460 <li><a href="#httpGetCookie">httpGetCookie</a></li>
461 <li><a href="#httpGetDateString">httpGetDateString</a></li>
462 <li><a href="#httpGetDateString2">httpGetDateString2</a></li>
463 <li><a href="#httpGetDateTime">httpGetDateTime</a></li>
464 <li><a href="#httpGetEncryption">httpGetEncryption</a></li>
465 <li><a href="#httpGetExpect">httpGetExpect</a></li>
466 <li><a href="#httpGetFd">httpGetFd</a></li>
467 <li><a href="#httpGetField">httpGetField</a></li>
468 <li><a href="#httpGetHostByName">httpGetHostByName</a></li>
469 <li><a href="#httpGetHostname">httpGetHostname</a></li>
470 <li><a href="#httpGetKeepAlive">httpGetKeepAlive</a></li>
471 <li><a href="#httpGetLength">httpGetLength</a></li>
472 <li><a href="#httpGetLength2">httpGetLength2</a></li>
473 <li><a href="#httpGetPending">httpGetPending</a></li>
474 <li><a href="#httpGetReady">httpGetReady</a></li>
475 <li><a href="#httpGetRemaining">httpGetRemaining</a></li>
476 <li><a href="#httpGetState">httpGetState</a></li>
477 <li><a href="#httpGetStatus">httpGetStatus</a></li>
478 <li><a href="#httpGetSubField">httpGetSubField</a></li>
479 <li><a href="#httpGetSubField2">httpGetSubField2</a></li>
480 <li><a href="#httpGetVersion">httpGetVersion</a></li>
481 <li><a href="#httpGets">httpGets</a></li>
482 <li><a href="#httpHead">httpHead</a></li>
483 <li><a href="#httpInitialize">httpInitialize</a></li>
484 <li><a href="#httpIsChunked">httpIsChunked</a></li>
485 <li><a href="#httpIsEncrypted">httpIsEncrypted</a></li>
486 <li><a href="#httpMD5">httpMD5</a></li>
487 <li><a href="#httpMD5Final">httpMD5Final</a></li>
488 <li><a href="#httpMD5String">httpMD5String</a></li>
489 <li><a href="#httpOptions">httpOptions</a></li>
490 <li><a href="#httpPeek">httpPeek</a></li>
491 <li><a href="#httpPost">httpPost</a></li>
492 <li><a href="#httpPut">httpPut</a></li>
493 <li><a href="#httpRead">httpRead</a></li>
494 <li><a href="#httpRead2">httpRead2</a></li>
495 <li><a href="#httpReadRequest">httpReadRequest</a></li>
496 <li><a href="#httpReconnect">httpReconnect</a></li>
497 <li><a href="#httpReconnect2">httpReconnect2</a></li>
498 <li><a href="#httpResolveHostname">httpResolveHostname</a></li>
499 <li><a href="#httpSeparate">httpSeparate</a></li>
500 <li><a href="#httpSeparate2">httpSeparate2</a></li>
501 <li><a href="#httpSeparateURI">httpSeparateURI</a></li>
502 <li><a href="#httpSetAuthString">httpSetAuthString</a></li>
503 <li><a href="#httpSetCookie">httpSetCookie</a></li>
504 <li><a href="#httpSetCredentials">httpSetCredentials</a></li>
505 <li><a href="#httpSetDefaultField">httpSetDefaultField</a></li>
506 <li><a href="#httpSetExpect">httpSetExpect</a></li>
507 <li><a href="#httpSetField">httpSetField</a></li>
508 <li><a href="#httpSetKeepAlive">httpSetKeepAlive</a></li>
509 <li><a href="#httpSetLength">httpSetLength</a></li>
510 <li><a href="#httpSetTimeout">httpSetTimeout</a></li>
511 <li><a href="#httpShutdown">httpShutdown</a></li>
512 <li><a href="#httpStateString">httpStateString</a></li>
513 <li><a href="#httpStatus">httpStatus</a></li>
514 <li><a href="#httpTrace">httpTrace</a></li>
515 <li><a href="#httpURIStatusString">httpURIStatusString</a></li>
516 <li><a href="#httpUpdate">httpUpdate</a></li>
517 <li><a href="#httpWait">httpWait</a></li>
518 <li><a href="#httpWrite">httpWrite</a></li>
519 <li><a href="#httpWrite2">httpWrite2</a></li>
520 <li><a href="#httpWriteResponse">httpWriteResponse</a></li>
521 <li><a href="#ippAddBoolean">ippAddBoolean</a></li>
522 <li><a href="#ippAddBooleans">ippAddBooleans</a></li>
523 <li><a href="#ippAddCollection">ippAddCollection</a></li>
524 <li><a href="#ippAddCollections">ippAddCollections</a></li>
525 <li><a href="#ippAddDate">ippAddDate</a></li>
526 <li><a href="#ippAddInteger">ippAddInteger</a></li>
527 <li><a href="#ippAddIntegers">ippAddIntegers</a></li>
528 <li><a href="#ippAddOctetString">ippAddOctetString</a></li>
529 <li><a href="#ippAddOutOfBand">ippAddOutOfBand</a></li>
530 <li><a href="#ippAddRange">ippAddRange</a></li>
531 <li><a href="#ippAddRanges">ippAddRanges</a></li>
532 <li><a href="#ippAddResolution">ippAddResolution</a></li>
533 <li><a href="#ippAddResolutions">ippAddResolutions</a></li>
534 <li><a href="#ippAddSeparator">ippAddSeparator</a></li>
535 <li><a href="#ippAddString">ippAddString</a></li>
536 <li><a href="#ippAddStringf">ippAddStringf</a></li>
537 <li><a href="#ippAddStringfv">ippAddStringfv</a></li>
538 <li><a href="#ippAddStrings">ippAddStrings</a></li>
539 <li><a href="#ippAttributeString">ippAttributeString</a></li>
540 <li><a href="#ippContainsInteger">ippContainsInteger</a></li>
541 <li><a href="#ippContainsString">ippContainsString</a></li>
542 <li><a href="#ippCopyAttribute">ippCopyAttribute</a></li>
543 <li><a href="#ippCopyAttributes">ippCopyAttributes</a></li>
544 <li><a href="#ippCreateRequestedArray">ippCreateRequestedArray</a></li>
545 <li><a href="#ippDateToTime">ippDateToTime</a></li>
546 <li><a href="#ippDelete">ippDelete</a></li>
547 <li><a href="#ippDeleteAttribute">ippDeleteAttribute</a></li>
548 <li><a href="#ippDeleteValues">ippDeleteValues</a></li>
549 <li><a href="#ippEnumString">ippEnumString</a></li>
550 <li><a href="#ippEnumValue">ippEnumValue</a></li>
551 <li><a href="#ippErrorString">ippErrorString</a></li>
552 <li><a href="#ippErrorValue">ippErrorValue</a></li>
553 <li><a href="#ippFindAttribute">ippFindAttribute</a></li>
554 <li><a href="#ippFindNextAttribute">ippFindNextAttribute</a></li>
555 <li><a href="#ippFirstAttribute">ippFirstAttribute</a></li>
556 <li><a href="#ippGetBoolean">ippGetBoolean</a></li>
557 <li><a href="#ippGetCollection">ippGetCollection</a></li>
558 <li><a href="#ippGetCount">ippGetCount</a></li>
559 <li><a href="#ippGetDate">ippGetDate</a></li>
560 <li><a href="#ippGetGroupTag">ippGetGroupTag</a></li>
561 <li><a href="#ippGetInteger">ippGetInteger</a></li>
562 <li><a href="#ippGetName">ippGetName</a></li>
563 <li><a href="#ippGetOctetString">ippGetOctetString</a></li>
564 <li><a href="#ippGetOperation">ippGetOperation</a></li>
565 <li><a href="#ippGetRange">ippGetRange</a></li>
566 <li><a href="#ippGetRequestId">ippGetRequestId</a></li>
567 <li><a href="#ippGetResolution">ippGetResolution</a></li>
568 <li><a href="#ippGetState">ippGetState</a></li>
569 <li><a href="#ippGetStatusCode">ippGetStatusCode</a></li>
570 <li><a href="#ippGetString">ippGetString</a></li>
571 <li><a href="#ippGetValueTag">ippGetValueTag</a></li>
572 <li><a href="#ippGetVersion">ippGetVersion</a></li>
573 <li><a href="#ippLength">ippLength</a></li>
574 <li><a href="#ippNew">ippNew</a></li>
575 <li><a href="#ippNewRequest">ippNewRequest</a></li>
576 <li><a href="#ippNewResponse">ippNewResponse</a></li>
577 <li><a href="#ippNextAttribute">ippNextAttribute</a></li>
578 <li><a href="#ippOpString">ippOpString</a></li>
579 <li><a href="#ippOpValue">ippOpValue</a></li>
580 <li><a href="#ippPort">ippPort</a></li>
581 <li><a href="#ippRead">ippRead</a></li>
582 <li><a href="#ippReadFile">ippReadFile</a></li>
583 <li><a href="#ippReadIO">ippReadIO</a></li>
584 <li><a href="#ippSetBoolean">ippSetBoolean</a></li>
585 <li><a href="#ippSetCollection">ippSetCollection</a></li>
586 <li><a href="#ippSetDate">ippSetDate</a></li>
587 <li><a href="#ippSetGroupTag">ippSetGroupTag</a></li>
588 <li><a href="#ippSetInteger">ippSetInteger</a></li>
589 <li><a href="#ippSetName">ippSetName</a></li>
590 <li><a href="#ippSetOctetString">ippSetOctetString</a></li>
591 <li><a href="#ippSetOperation">ippSetOperation</a></li>
592 <li><a href="#ippSetPort">ippSetPort</a></li>
593 <li><a href="#ippSetRange">ippSetRange</a></li>
594 <li><a href="#ippSetRequestId">ippSetRequestId</a></li>
595 <li><a href="#ippSetResolution">ippSetResolution</a></li>
596 <li><a href="#ippSetState">ippSetState</a></li>
597 <li><a href="#ippSetStatusCode">ippSetStatusCode</a></li>
598 <li><a href="#ippSetString">ippSetString</a></li>
599 <li><a href="#ippSetStringf">ippSetStringf</a></li>
600 <li><a href="#ippSetStringfv">ippSetStringfv</a></li>
601 <li><a href="#ippSetValueTag">ippSetValueTag</a></li>
602 <li><a href="#ippSetVersion">ippSetVersion</a></li>
603 <li><a href="#ippStateString">ippStateString</a></li>
604 <li><a href="#ippTagString">ippTagString</a></li>
605 <li><a href="#ippTagValue">ippTagValue</a></li>
606 <li><a href="#ippTimeToDate">ippTimeToDate</a></li>
607 <li><a href="#ippValidateAttribute">ippValidateAttribute</a></li>
608 <li><a href="#ippValidateAttributes">ippValidateAttributes</a></li>
609 <li><a href="#ippWrite">ippWrite</a></li>
610 <li><a href="#ippWriteFile">ippWriteFile</a></li>
611 <li><a href="#ippWriteIO">ippWriteIO</a></li>
612 </ul></li>
613 <li><a href="#TYPES">Data Types</a><ul class="subcontents">
614 <li><a href="#gss_auth_identity_desc">gss_auth_identity_desc</a></li>
615 <li><a href="#http_addr_t">http_addr_t</a></li>
616 <li><a href="#http_addrlist_t">http_addrlist_t</a></li>
617 <li><a href="#http_auth_t">http_auth_t</a></li>
618 <li><a href="#http_credential_t">http_credential_t</a></li>
619 <li><a href="#http_encoding_t">http_encoding_t</a></li>
620 <li><a href="#http_encryption_t">http_encryption_t</a></li>
621 <li><a href="#http_field_t">http_field_t</a></li>
622 <li><a href="#http_keepalive_t">http_keepalive_t</a></li>
623 <li><a href="#http_state_t">http_state_t</a></li>
624 <li><a href="#http_t">http_t</a></li>
625 <li><a href="#http_timeout_cb_t">http_timeout_cb_t</a></li>
626 <li><a href="#http_trust_t">http_trust_t</a></li>
627 <li><a href="#http_uri_coding_t">http_uri_coding_t</a></li>
628 <li><a href="#http_uri_status_t">http_uri_status_t</a></li>
629 <li><a href="#http_version_t">http_version_t</a></li>
630 <li><a href="#ipp_attribute_t">ipp_attribute_t</a></li>
631 <li><a href="#ipp_copycb_t">ipp_copycb_t</a></li>
632 <li><a href="#ipp_dstate_t">ipp_dstate_t</a></li>
633 <li><a href="#ipp_finish_t">ipp_finish_t</a></li>
634 <li><a href="#ipp_iocb_t">ipp_iocb_t</a></li>
635 <li><a href="#ipp_jcollate_t">ipp_jcollate_t</a></li>
636 <li><a href="#ipp_orient_t">ipp_orient_t</a></li>
637 <li><a href="#ipp_pstate_t">ipp_pstate_t</a></li>
638 <li><a href="#ipp_quality_t">ipp_quality_t</a></li>
639 <li><a href="#ipp_res_t">ipp_res_t</a></li>
640 <li><a href="#ipp_state_t">ipp_state_t</a></li>
641 <li><a href="#ipp_t">ipp_t</a></li>
642 <li><a href="#ipp_uchar_t">ipp_uchar_t</a></li>
643 </ul></li>
644 <li><a href="#STRUCTURES">Structures</a><ul class="subcontents">
645 <li><a href="#gss_auth_identity">gss_auth_identity</a></li>
646 <li><a href="#http_addrlist_s">http_addrlist_s</a></li>
647 <li><a href="#http_credential_s">http_credential_s</a></li>
648 <li><a href="#pollfd">pollfd</a></li>
649 </ul></li>
650 <li><a href="#ENUMERATIONS">Enumerations</a><ul class="subcontents">
651 <li><a href="#http_auth_e">http_auth_e</a></li>
652 <li><a href="#http_encoding_e">http_encoding_e</a></li>
653 <li><a href="#http_encryption_e">http_encryption_e</a></li>
654 <li><a href="#http_field_e">http_field_e</a></li>
655 <li><a href="#http_keepalive_e">http_keepalive_e</a></li>
656 <li><a href="#http_state_e">http_state_e</a></li>
657 <li><a href="#http_status_e">http_status_e</a></li>
658 <li><a href="#http_trust_e">http_trust_e</a></li>
659 <li><a href="#http_uri_coding_e">http_uri_coding_e</a></li>
660 <li><a href="#http_uri_status_e">http_uri_status_e</a></li>
661 <li><a href="#http_version_e">http_version_e</a></li>
662 <li><a href="#ipp_dstate_e">ipp_dstate_e</a></li>
663 <li><a href="#ipp_finishings_e">ipp_finishings_e</a></li>
664 <li><a href="#ipp_jcollate_e">ipp_jcollate_e</a></li>
665 <li><a href="#ipp_jstate_e">ipp_jstate_e</a></li>
666 <li><a href="#ipp_op_e">ipp_op_e</a></li>
667 <li><a href="#ipp_orient_e">ipp_orient_e</a></li>
668 <li><a href="#ipp_pstate_e">ipp_pstate_e</a></li>
669 <li><a href="#ipp_quality_e">ipp_quality_e</a></li>
670 <li><a href="#ipp_res_e">ipp_res_e</a></li>
671 <li><a href="#ipp_state_e">ipp_state_e</a></li>
672 <li><a href="#ipp_status_e">ipp_status_e</a></li>
673 <li><a href="#ipp_tag_e">ipp_tag_e</a></li>
674 </ul></li>
675 </ul>
676 </div>
677 <div class="body">
678 <!--
679 HTTP and IPP API introduction for CUPS.
680
681 Copyright 2007-2012 by Apple Inc.
682 Copyright 1997-2006 by Easy Software Products, all rights reserved.
683
684 These coded instructions, statements, and computer programs are the
685 property of Apple Inc. and are protected by Federal copyright
686 law. Distribution and use rights are outlined in the file "LICENSE.txt"
687 which should have been included with this file. If this file is
688 file is missing or damaged, see the license at "http://www.cups.org/".
689 -->
690
691 <h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
692
693 <p>The CUPS HTTP and IPP APIs provide low-level access to the HTTP and IPP
694 protocols and CUPS scheduler. They are typically used by monitoring and
695 administration programs to perform specific functions not supported by the
696 high-level CUPS API functions.</p>
697
698 <p>The HTTP APIs use an opaque structure called
699 <a href='#http_t'><code>http_t</code></a> to manage connections to
700 a particular HTTP or IPP server. The
701 <a href='#httpConnectEncrypt'><code>httpConnectEncrypt</code></a> function is
702 used to create an instance of this structure for a particular server.
703 The constant <code>CUPS_HTTP_DEFAULT</code> can be used with all of the
704 <code>cups</code> functions to refer to the default CUPS server - the functions
705 create a per-thread <a href='#http_t'><code>http_t</code></a> as needed.</p>
706
707 <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>
708
709 <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>
710
711 <pre class='example'>
712 <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(IPP_GET_JOBS);
713
714 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
715 NULL, "ipp://localhost/printers/");
716 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
717 NULL, cupsUser());
718 </pre>
719
720 <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>
721
722 <pre class='example'>
723 #include &lt;cups/cups.h&gt;
724
725
726 <a href='#ipp_t'>ipp_t</a> *<a name='get_jobs'>get_jobs</a>(void)
727 {
728 <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(IPP_GET_JOBS);
729
730 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
731 NULL, "ipp://localhost/printers/");
732 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
733 NULL, cupsUser());
734
735 return (<a href='#cupsDoRequest'>cupsDoRequest</a>(CUPS_HTTP_DEFAULT, request, "/"));
736 }
737 </pre>
738
739 <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>
740
741 <pre class='example'>
742 <a href='#ipp_t'>ipp_t</a> *response;
743 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *attr;
744
745 attr = <a href='#ippFindAttribute'>ippFindAttribute</a>(response, "printer-state", IPP_TAG_ENUM);
746 </pre>
747
748 <p>You can also walk the list of attributes with a simple <code>for</code> loop like this:</p>
749
750 <pre class='example'>
751 <a href='#ipp_t'>ipp_t</a> *response;
752 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *attr;
753
754 for (attr = <a href='#ippFirstAttribute'>ippFirstAttribute</a>(response); attr != NULL; attr = <a href='#ippNextAttribute'>ippNextAttribute</a>(response))
755 if (ippGetName(attr) == NULL)
756 puts("--SEPARATOR--");
757 else
758 puts(ippGetName(attr));
759 </pre>
760
761 <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>
762
763 <pre class='example'>
764 <a href='#ipp_t'>ipp_t</a> *response = <a href='#get_jobs'>get_jobs</a>();
765
766 if (response != NULL)
767 {
768 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *attr;
769 const char *attrname;
770 int job_id = 0;
771 const char *job_name = NULL;
772 const char *job_originating_user_name = NULL;
773
774 puts("Job ID Owner Title");
775 puts("------ ---------------- ---------------------------------");
776
777 for (attr = <a href='#ippFirstAttribute'>ippFirstAttribute</a>(response); attr != NULL; attr = <a href='#ippNextAttribute'>ippNextAttribute</a>(response))
778 {
779 /* Attributes without names are separators between jobs */
780 attrname = ippGetName(attr);
781 if (attrname == NULL)
782 {
783 if (job_id > 0)
784 {
785 if (job_name == NULL)
786 job_name = "(withheld)";
787
788 if (job_originating_user_name == NULL)
789 job_originating_user_name = "(withheld)";
790
791 printf("%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
792 }
793
794 job_id = 0;
795 job_name = NULL;
796 job_originating_user_name = NULL;
797 continue;
798 }
799 else if (!strcmp(attrname, "job-id") &amp;&amp; ippGetValueTag(attr) == IPP_TAG_INTEGER)
800 job_id = ippGetInteger(attr, 0);
801 else if (!strcmp(attrname, "job-name") &amp;&amp; ippGetValueTag(attr) == IPP_TAG_NAME)
802 job_name = ippGetString(attr, 0, NULL);
803 else if (!strcmp(attrname, "job-originating-user-name") &amp;&amp;
804 ippGetValueTag(attr) == IPP_TAG_NAME)
805 job_originating_user_name = ippGetString(attr, 0, NULL);
806 }
807
808 if (job_id > 0)
809 {
810 if (job_name == NULL)
811 job_name = "(withheld)";
812
813 if (job_originating_user_name == NULL)
814 job_originating_user_name = "(withheld)";
815
816 printf("%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
817 }
818 }
819 </pre>
820
821 <h3><a name='CREATING_URI_STRINGS'>Creating URI Strings</a></h3>
822
823 <p>To ensure proper encoding, the
824 <a href='#httpAssembleURIf'><code>httpAssembleURIf</code></a> function must be
825 used to format a "printer-uri" string for all printer-based requests:</p>
826
827 <pre class='example'>
828 const char *name = "Foo";
829 char uri[1024];
830 <a href='#ipp_t'>ipp_t</a> *request;
831
832 <a href='#httpAssembleURIf'>httpAssembleURIf</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, cupsServer(),
833 ippPort(), "/printers/%s", name);
834 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
835 </pre>
836
837 <h3><a name='SENDING_REQUESTS_WITH_FILES'>Sending Requests with Files</a></h3>
838
839 <p>The <a href='#cupsDoFileRequest'><code>cupsDoFileRequest</code></a> and
840 <a href='#cupsDoIORequest'><code>cupsDoIORequest</code></a> functions are
841 used for requests involving files. The
842 <a href='#cupsDoFileRequest'><code>cupsDoFileRequest</code></a> function
843 attaches the named file to a request and is typically used when sending a print
844 file or changing a printer's PPD file:</p>
845
846 <pre class='example'>
847 const char *filename = "/usr/share/cups/data/testprint.ps";
848 const char *name = "Foo";
849 char uri[1024];
850 char resource[1024];
851 <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(IPP_PRINT_JOB);
852 <a href='#ipp_t'>ipp_t</a> *response;
853
854 /* Use httpAssembleURIf for the printer-uri string */
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 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
859 NULL, cupsUser());
860 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name",
861 NULL, "testprint.ps");
862
863 /* Use snprintf for the resource path */
864 snprintf(resource, sizeof(resource), "/printers/%s", name);
865
866 response = <a href='#cupsDoFileRequest'>cupsDoFileRequest</a>(CUPS_HTTP_DEFAULT, request, resource, filename);
867 </pre>
868
869 <p>The <a href='#cupsDoIORequest'><code>cupsDoIORequest</code></a> function
870 optionally attaches a file to the request and optionally saves a file in the
871 response from the server. It is used when using a pipe for the request
872 attachment or when using a request that returns a file, currently only
873 <code>CUPS_GET_DOCUMENT</code> and <code>CUPS_GET_PPD</code>. For example,
874 the following code will download the PPD file for the sample HP LaserJet
875 printer driver:</p>
876
877 <pre class='example'>
878 char tempfile[1024];
879 int tempfd;
880 <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(CUPS_GET_PPD);
881 <a href='#ipp_t'>ipp_t</a> *response;
882
883 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name",
884 NULL, "laserjet.ppd");
885
886 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
887
888 response = <a href='#cupsDoIORequest'>cupsDoIORequest</a>(CUPS_HTTP_DEFAULT, request, "/", -1, tempfd);
889 </pre>
890
891 <p>The example passes <code>-1</code> for the input file descriptor to specify
892 that no file is to be attached to the request. The PPD file attached to the
893 response is written to the temporary file descriptor we created using the
894 <code>cupsTempFd</code> function.</p>
895
896 <h3><a name='ASYNCHRONOUS_REQUEST_PROCESSING'>Asynchronous Request Processing</a></h3>
897
898 <p>The <a href='#cupsSendRequest'><code>cupsSendRequest</code></a> and
899 <a href='#cupsGetResponse'><code>cupsGetResponse</code></a> support
900 asynchronous communications with the server. Unlike the other request
901 functions, the IPP request is not automatically freed, so remember to
902 free your request with the <a href='#ippDelete'><code>ippDelete</code></a>
903 function.</p>
904
905 <p>File data is attached to the request using the
906 <a href='#cupsWriteRequestData'><code>cupsWriteRequestData</code></a>
907 function, while file data returned from the server is read using the
908 <a href='#cupsReadResponseData'><code>cupsReadResponseData</code></a>
909 function. We can rewrite the previous <code>CUPS_GET_PPD</code> example
910 to use the asynchronous functions quite easily:</p>
911
912 <pre class='example'>
913 char tempfile[1024];
914 int tempfd;
915 <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(CUPS_GET_PPD);
916 <a href='#ipp_t'>ipp_t</a> *response;
917
918 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name",
919 NULL, "laserjet.ppd");
920
921 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
922
923 if (<a href='#cupsSendRequest'>cupsSendRequest</a>(CUPS_HTTP_DEFAULT, request, "/") == HTTP_CONTINUE)
924 {
925 response = <a href='#cupsGetResponse'>cupsGetResponse</a>(CUPS_HTTP_DEFAULT, "/");
926
927 if (response != NULL)
928 {
929 ssize_t bytes;
930 char buffer[8192];
931
932 while ((bytes = <a href='#cupsReadResponseData'>cupsReadResponseData</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer))) > 0)
933 write(tempfd, buffer, bytes);
934 }
935 }
936
937 /* Free the request! */
938 <a href='#ippDelete'>ippDelete</a>(request);
939 </pre>
940
941 <p>The <a href='#cupsSendRequest'><code>cupsSendRequest</code></a> function
942 returns the initial HTTP request status, typically either
943 <code>HTTP_CONTINUE</code> or <code>HTTP_UNAUTHORIZED</code>. The latter status
944 is returned when the request requires authentication of some sort. The
945 <a href='#cupsDoAuthentication'><code>cupsDoAuthentication</code></a> function
946 must be called when your see <code>HTTP_UNAUTHORIZED</code> and the request
947 re-sent. We can add authentication support to our example code by using a
948 <code>do ... while</code> loop:</p>
949
950 <pre class='example'>
951 char tempfile[1024];
952 int tempfd;
953 <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(CUPS_GET_PPD);
954 <a href='#ipp_t'>ipp_t</a> *response;
955 http_status_t status;
956
957 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name",
958 NULL, "laserjet.ppd");
959
960 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
961
962 /* Loop for authentication */
963 do
964 {
965 status = <a href='#cupsSendRequest'>cupsSendRequest</a>(CUPS_HTTP_DEFAULT, request, "/");
966
967 if (status == HTTP_UNAUTHORIZED)
968 {
969 /* Try to authenticate, break out of the loop if that fails */
970 if (<a href='#cupsDoAuthentication'>cupsDoAuthentication</a>(CUPS_HTTP_DEFAULT, "POST", "/"))
971 break;
972 }
973 }
974 while (status != HTTP_CONTINUE &amp;&amp; status != HTTP_UNAUTHORIZED);
975
976 if (status == HTTP_CONTINUE)
977 {
978 response = <a href='#cupsGetResponse'>cupsGetResponse</a>(CUPS_HTTP_DEFAULT, "/");
979
980 if (response != NULL)
981 {
982 ssize_t bytes;
983 char buffer[8192];
984
985 while ((bytes = <a href='#cupsReadResponseData'>cupsReadResponseData</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer))) > 0)
986 write(tempfd, buffer, bytes);
987 }
988 }
989
990 /* Free the request! */
991 <a href='#ippDelete'>ippDelete</a>(request);
992 </pre>
993 <h2 class="title"><a id="FUNCTIONS">Functions</a></h2>
994 <h3 class="function"><span class="info">&#160;CUPS 1.1.20/macOS 10.4&#160;</span><a id="cupsDoAuthentication">cupsDoAuthentication</a></h3>
995 <p class="description">Authenticate a request.</p>
996 <p class="code">
997 int cupsDoAuthentication (<br />
998 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
999 &#160;&#160;&#160;&#160;const char *method,<br />
1000 &#160;&#160;&#160;&#160;const char *resource<br />
1001 );</p>
1002 <h4 class="parameters">Parameters</h4>
1003 <dl>
1004 <dt>http</dt>
1005 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1006 <dt>method</dt>
1007 <dd class="description">Request method (&quot;GET&quot;, &quot;POST&quot;, &quot;PUT&quot;)</dd>
1008 <dt>resource</dt>
1009 <dd class="description">Resource path</dd>
1010 </dl>
1011 <h4 class="returnvalue">Return Value</h4>
1012 <p class="description">0 on success, -1 on error</p>
1013 <h4 class="discussion">Discussion</h4>
1014 <p class="discussion">This function should be called in response to a <code>HTTP_STATUS_UNAUTHORIZED</code>
1015 status, prior to resubmitting your request.
1016
1017 </p>
1018 <h3 class="function"><a id="cupsDoFileRequest">cupsDoFileRequest</a></h3>
1019 <p class="description">Do an IPP request with a file.</p>
1020 <p class="code">
1021 <a href="#ipp_t">ipp_t</a> *cupsDoFileRequest (<br />
1022 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
1023 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *request,<br />
1024 &#160;&#160;&#160;&#160;const char *resource,<br />
1025 &#160;&#160;&#160;&#160;const char *filename<br />
1026 );</p>
1027 <h4 class="parameters">Parameters</h4>
1028 <dl>
1029 <dt>http</dt>
1030 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1031 <dt>request</dt>
1032 <dd class="description">IPP request</dd>
1033 <dt>resource</dt>
1034 <dd class="description">HTTP resource for POST</dd>
1035 <dt>filename</dt>
1036 <dd class="description">File to send or <code>NULL</code> for none</dd>
1037 </dl>
1038 <h4 class="returnvalue">Return Value</h4>
1039 <p class="description">Response data</p>
1040 <h4 class="discussion">Discussion</h4>
1041 <p class="discussion">This function sends the IPP request and attached file to the specified
1042 server, retrying and authenticating as necessary. The request is freed with
1043 <a href="#ippDelete"><code>ippDelete</code></a>.</p>
1044 <h3 class="function"><span class="info">&#160;CUPS 1.3/macOS 10.5&#160;</span><a id="cupsDoIORequest">cupsDoIORequest</a></h3>
1045 <p class="description">Do an IPP request with file descriptors.</p>
1046 <p class="code">
1047 <a href="#ipp_t">ipp_t</a> *cupsDoIORequest (<br />
1048 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
1049 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *request,<br />
1050 &#160;&#160;&#160;&#160;const char *resource,<br />
1051 &#160;&#160;&#160;&#160;int infile,<br />
1052 &#160;&#160;&#160;&#160;int outfile<br />
1053 );</p>
1054 <h4 class="parameters">Parameters</h4>
1055 <dl>
1056 <dt>http</dt>
1057 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1058 <dt>request</dt>
1059 <dd class="description">IPP request</dd>
1060 <dt>resource</dt>
1061 <dd class="description">HTTP resource for POST</dd>
1062 <dt>infile</dt>
1063 <dd class="description">File to read from or -1 for none</dd>
1064 <dt>outfile</dt>
1065 <dd class="description">File to write to or -1 for none</dd>
1066 </dl>
1067 <h4 class="returnvalue">Return Value</h4>
1068 <p class="description">Response data</p>
1069 <h4 class="discussion">Discussion</h4>
1070 <p class="discussion">This function sends the IPP request with the optional input file &quot;infile&quot; to
1071 the specified server, retrying and authenticating as necessary. The request
1072 is freed with <a href="#ippDelete"><code>ippDelete</code></a>.<br>
1073 <br>
1074 If &quot;infile&quot; is a valid file descriptor, <code>cupsDoIORequest</code> copies
1075 all of the data from the file after the IPP request message.<br>
1076 <br>
1077 If &quot;outfile&quot; is a valid file descriptor, <code>cupsDoIORequest</code> copies
1078 all of the data after the IPP response message to the file.
1079
1080 </p>
1081 <h3 class="function"><a id="cupsDoRequest">cupsDoRequest</a></h3>
1082 <p class="description">Do an IPP request.</p>
1083 <p class="code">
1084 <a href="#ipp_t">ipp_t</a> *cupsDoRequest (<br />
1085 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
1086 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *request,<br />
1087 &#160;&#160;&#160;&#160;const char *resource<br />
1088 );</p>
1089 <h4 class="parameters">Parameters</h4>
1090 <dl>
1091 <dt>http</dt>
1092 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1093 <dt>request</dt>
1094 <dd class="description">IPP request</dd>
1095 <dt>resource</dt>
1096 <dd class="description">HTTP resource for POST</dd>
1097 </dl>
1098 <h4 class="returnvalue">Return Value</h4>
1099 <p class="description">Response data</p>
1100 <h4 class="discussion">Discussion</h4>
1101 <p class="discussion">This function sends the IPP request to the specified server, retrying
1102 and authenticating as necessary. The request is freed with <a href="#ippDelete"><code>ippDelete</code></a>.</p>
1103 <h3 class="function"><a id="cupsEncodeOptions">cupsEncodeOptions</a></h3>
1104 <p class="description">Encode printer options into IPP attributes.</p>
1105 <p class="code">
1106 void cupsEncodeOptions (<br />
1107 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
1108 &#160;&#160;&#160;&#160;int num_options,<br />
1109 &#160;&#160;&#160;&#160;cups_option_t *options<br />
1110 );</p>
1111 <h4 class="parameters">Parameters</h4>
1112 <dl>
1113 <dt>ipp</dt>
1114 <dd class="description">Request to add to</dd>
1115 <dt>num_options</dt>
1116 <dd class="description">Number of options</dd>
1117 <dt>options</dt>
1118 <dd class="description">Options</dd>
1119 </dl>
1120 <h4 class="discussion">Discussion</h4>
1121 <p class="discussion">This function adds operation, job, and then subscription attributes,
1122 in that order. Use the cupsEncodeOptions2() function to add attributes
1123 for a single group.</p>
1124 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="cupsEncodeOptions2">cupsEncodeOptions2</a></h3>
1125 <p class="description">Encode printer options into IPP attributes for a group.</p>
1126 <p class="code">
1127 void cupsEncodeOptions2 (<br />
1128 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
1129 &#160;&#160;&#160;&#160;int num_options,<br />
1130 &#160;&#160;&#160;&#160;cups_option_t *options,<br />
1131 &#160;&#160;&#160;&#160;ipp_tag_t group_tag<br />
1132 );</p>
1133 <h4 class="parameters">Parameters</h4>
1134 <dl>
1135 <dt>ipp</dt>
1136 <dd class="description">Request to add to</dd>
1137 <dt>num_options</dt>
1138 <dd class="description">Number of options</dd>
1139 <dt>options</dt>
1140 <dd class="description">Options</dd>
1141 <dt>group_tag</dt>
1142 <dd class="description">Group to encode</dd>
1143 </dl>
1144 <h4 class="discussion">Discussion</h4>
1145 <p class="discussion">This function only adds attributes for a single group. Call this
1146 function multiple times for each group, or use cupsEncodeOptions()
1147 to add the standard groups.
1148
1149 </p>
1150 <h3 class="function"><span class="info">&#160;CUPS 1.4/macOS 10.6&#160;</span><a id="cupsGetDevices">cupsGetDevices</a></h3>
1151 <p class="description">Get available printer devices.</p>
1152 <p class="code">
1153 ipp_status_t cupsGetDevices (<br />
1154 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
1155 &#160;&#160;&#160;&#160;int timeout,<br />
1156 &#160;&#160;&#160;&#160;const char *include_schemes,<br />
1157 &#160;&#160;&#160;&#160;const char *exclude_schemes,<br />
1158 &#160;&#160;&#160;&#160;cups_device_cb_t callback,<br />
1159 &#160;&#160;&#160;&#160;void *user_data<br />
1160 );</p>
1161 <h4 class="parameters">Parameters</h4>
1162 <dl>
1163 <dt>http</dt>
1164 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1165 <dt>timeout</dt>
1166 <dd class="description">Timeout in seconds or <code>CUPS_TIMEOUT_DEFAULT</code></dd>
1167 <dt>include_schemes</dt>
1168 <dd class="description">Comma-separated URI schemes to include or <code>CUPS_INCLUDE_ALL</code></dd>
1169 <dt>exclude_schemes</dt>
1170 <dd class="description">Comma-separated URI schemes to exclude or <code>CUPS_EXCLUDE_NONE</code></dd>
1171 <dt>callback</dt>
1172 <dd class="description">Callback function</dd>
1173 <dt>user_data</dt>
1174 <dd class="description">User data pointer</dd>
1175 </dl>
1176 <h4 class="returnvalue">Return Value</h4>
1177 <p class="description">Request status - <code>IPP_OK</code> on success.</p>
1178 <h4 class="discussion">Discussion</h4>
1179 <p class="discussion">This function sends a CUPS-Get-Devices request and streams the discovered
1180 devices to the specified callback function. The &quot;timeout&quot; parameter controls
1181 how long the request lasts, while the &quot;include_schemes&quot; and &quot;exclude_schemes&quot;
1182 parameters provide comma-delimited lists of backends to include or omit from
1183 the request respectively.
1184
1185 </p>
1186 <h3 class="function"><span class="info">&#160;CUPS 1.1.20/macOS 10.4&#160;</span><a id="cupsGetFd">cupsGetFd</a></h3>
1187 <p class="description">Get a file from the server.</p>
1188 <p class="code">
1189 http_status_t cupsGetFd (<br />
1190 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
1191 &#160;&#160;&#160;&#160;const char *resource,<br />
1192 &#160;&#160;&#160;&#160;int fd<br />
1193 );</p>
1194 <h4 class="parameters">Parameters</h4>
1195 <dl>
1196 <dt>http</dt>
1197 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1198 <dt>resource</dt>
1199 <dd class="description">Resource name</dd>
1200 <dt>fd</dt>
1201 <dd class="description">File descriptor</dd>
1202 </dl>
1203 <h4 class="returnvalue">Return Value</h4>
1204 <p class="description">HTTP status</p>
1205 <h4 class="discussion">Discussion</h4>
1206 <p class="discussion">This function returns <code>HTTP_STATUS_OK</code> when the file is successfully retrieved.
1207
1208 </p>
1209 <h3 class="function"><span class="info">&#160;CUPS 1.1.20/macOS 10.4&#160;</span><a id="cupsGetFile">cupsGetFile</a></h3>
1210 <p class="description">Get a file from the server.</p>
1211 <p class="code">
1212 http_status_t cupsGetFile (<br />
1213 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
1214 &#160;&#160;&#160;&#160;const char *resource,<br />
1215 &#160;&#160;&#160;&#160;const char *filename<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>filename</dt>
1224 <dd class="description">Filename</dd>
1225 </dl>
1226 <h4 class="returnvalue">Return Value</h4>
1227 <p class="description">HTTP status</p>
1228 <h4 class="discussion">Discussion</h4>
1229 <p class="discussion">This function returns <code>HTTP_STATUS_OK</code> when the file is successfully retrieved.
1230
1231 </p>
1232 <h3 class="function"><span class="info">&#160;CUPS 1.4/macOS 10.6&#160;</span><a id="cupsGetResponse">cupsGetResponse</a></h3>
1233 <p class="description">Get a response to an IPP request.</p>
1234 <p class="code">
1235 <a href="#ipp_t">ipp_t</a> *cupsGetResponse (<br />
1236 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
1237 &#160;&#160;&#160;&#160;const char *resource<br />
1238 );</p>
1239 <h4 class="parameters">Parameters</h4>
1240 <dl>
1241 <dt>http</dt>
1242 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1243 <dt>resource</dt>
1244 <dd class="description">HTTP resource for POST</dd>
1245 </dl>
1246 <h4 class="returnvalue">Return Value</h4>
1247 <p class="description">Response or <code>NULL</code> on HTTP error</p>
1248 <h4 class="discussion">Discussion</h4>
1249 <p class="discussion">Use this function to get the response for an IPP request sent using
1250 <a href="#cupsSendRequest"><code>cupsSendRequest</code></a>. For requests that return additional data, use
1251 <a href="#cupsReadResponseData"><code>cupsReadResponseData</code></a> after getting a successful response,
1252 otherwise call <a href="#httpFlush"><code>httpFlush</code></a> to complete the response processing.
1253
1254 </p>
1255 <h3 class="function"><a id="cupsLastError">cupsLastError</a></h3>
1256 <p class="description">Return the last IPP status code received on the current
1257 thread.</p>
1258 <p class="code">
1259 ipp_status_t cupsLastError (void);</p>
1260 <h4 class="returnvalue">Return Value</h4>
1261 <p class="description">IPP status code from last request</p>
1262 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="cupsLastErrorString">cupsLastErrorString</a></h3>
1263 <p class="description">Return the last IPP status-message received on the
1264 current thread.</p>
1265 <p class="code">
1266 const char *cupsLastErrorString (void);</p>
1267 <h4 class="returnvalue">Return Value</h4>
1268 <p class="description">status-message text from last request</p>
1269 <h3 class="function"><span class="info">&#160;CUPS 1.1.20/macOS 10.4&#160;</span><a id="cupsPutFd">cupsPutFd</a></h3>
1270 <p class="description">Put a file on the server.</p>
1271 <p class="code">
1272 http_status_t cupsPutFd (<br />
1273 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
1274 &#160;&#160;&#160;&#160;const char *resource,<br />
1275 &#160;&#160;&#160;&#160;int fd<br />
1276 );</p>
1277 <h4 class="parameters">Parameters</h4>
1278 <dl>
1279 <dt>http</dt>
1280 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1281 <dt>resource</dt>
1282 <dd class="description">Resource name</dd>
1283 <dt>fd</dt>
1284 <dd class="description">File descriptor</dd>
1285 </dl>
1286 <h4 class="returnvalue">Return Value</h4>
1287 <p class="description">HTTP status</p>
1288 <h4 class="discussion">Discussion</h4>
1289 <p class="discussion">This function returns <code>HTTP_STATUS_CREATED</code> when the file is stored
1290 successfully.
1291
1292 </p>
1293 <h3 class="function"><span class="info">&#160;CUPS 1.1.20/macOS 10.4&#160;</span><a id="cupsPutFile">cupsPutFile</a></h3>
1294 <p class="description">Put a file on the server.</p>
1295 <p class="code">
1296 http_status_t cupsPutFile (<br />
1297 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
1298 &#160;&#160;&#160;&#160;const char *resource,<br />
1299 &#160;&#160;&#160;&#160;const char *filename<br />
1300 );</p>
1301 <h4 class="parameters">Parameters</h4>
1302 <dl>
1303 <dt>http</dt>
1304 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1305 <dt>resource</dt>
1306 <dd class="description">Resource name</dd>
1307 <dt>filename</dt>
1308 <dd class="description">Filename</dd>
1309 </dl>
1310 <h4 class="returnvalue">Return Value</h4>
1311 <p class="description">HTTP status</p>
1312 <h4 class="discussion">Discussion</h4>
1313 <p class="discussion">This function returns <code>HTTP_CREATED</code> when the file is stored
1314 successfully.
1315
1316 </p>
1317 <h3 class="function"><span class="info">&#160;CUPS 1.4/macOS 10.6&#160;</span><a id="cupsReadResponseData">cupsReadResponseData</a></h3>
1318 <p class="description">Read additional data after the IPP response.</p>
1319 <p class="code">
1320 ssize_t cupsReadResponseData (<br />
1321 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
1322 &#160;&#160;&#160;&#160;char *buffer,<br />
1323 &#160;&#160;&#160;&#160;size_t length<br />
1324 );</p>
1325 <h4 class="parameters">Parameters</h4>
1326 <dl>
1327 <dt>http</dt>
1328 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1329 <dt>buffer</dt>
1330 <dd class="description">Buffer to use</dd>
1331 <dt>length</dt>
1332 <dd class="description">Number of bytes to read</dd>
1333 </dl>
1334 <h4 class="returnvalue">Return Value</h4>
1335 <p class="description">Bytes read, 0 on EOF, -1 on error</p>
1336 <h4 class="discussion">Discussion</h4>
1337 <p class="discussion">This function is used after <a href="#cupsGetResponse"><code>cupsGetResponse</code></a> to read the PPD or document
1338 files from <code>CUPS_GET_PPD</code> and <code>CUPS_GET_DOCUMENT</code> requests,
1339 respectively.
1340
1341 </p>
1342 <h3 class="function"><span class="info">&#160;CUPS 1.4/macOS 10.6&#160;</span><a id="cupsSendRequest">cupsSendRequest</a></h3>
1343 <p class="description">Send an IPP request.</p>
1344 <p class="code">
1345 http_status_t cupsSendRequest (<br />
1346 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
1347 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *request,<br />
1348 &#160;&#160;&#160;&#160;const char *resource,<br />
1349 &#160;&#160;&#160;&#160;size_t length<br />
1350 );</p>
1351 <h4 class="parameters">Parameters</h4>
1352 <dl>
1353 <dt>http</dt>
1354 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1355 <dt>request</dt>
1356 <dd class="description">IPP request</dd>
1357 <dt>resource</dt>
1358 <dd class="description">Resource path</dd>
1359 <dt>length</dt>
1360 <dd class="description">Length of data to follow or <code>CUPS_LENGTH_VARIABLE</code></dd>
1361 </dl>
1362 <h4 class="returnvalue">Return Value</h4>
1363 <p class="description">Initial HTTP status</p>
1364 <h4 class="discussion">Discussion</h4>
1365 <p class="discussion">Use <a href="#cupsWriteRequestData"><code>cupsWriteRequestData</code></a> to write any additional data (document, PPD
1366 file, etc.) for the request, <a href="#cupsGetResponse"><code>cupsGetResponse</code></a> to get the IPP response,
1367 and <a href="#cupsReadResponseData"><code>cupsReadResponseData</code></a> to read any additional data following the
1368 response. Only one request can be sent/queued at a time per <code>http_t</code>
1369 connection.<br>
1370 <br>
1371 Returns the initial HTTP status code, which will be <code>HTTP_STATUS_CONTINUE</code>
1372 on a successful send of the request.<br>
1373 <br>
1374 Note: Unlike <a href="#cupsDoFileRequest"><code>cupsDoFileRequest</code></a>, <a href="#cupsDoIORequest"><code>cupsDoIORequest</code></a>, and
1375 <a href="#cupsDoRequest"><code>cupsDoRequest</code></a>, the request is NOT freed with <a href="#ippDelete"><code>ippDelete</code></a>.
1376
1377 </p>
1378 <h3 class="function"><span class="info">&#160;CUPS 1.4/macOS 10.6&#160;</span><a id="cupsWriteRequestData">cupsWriteRequestData</a></h3>
1379 <p class="description">Write additional data after an IPP request.</p>
1380 <p class="code">
1381 http_status_t cupsWriteRequestData (<br />
1382 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
1383 &#160;&#160;&#160;&#160;const char *buffer,<br />
1384 &#160;&#160;&#160;&#160;size_t length<br />
1385 );</p>
1386 <h4 class="parameters">Parameters</h4>
1387 <dl>
1388 <dt>http</dt>
1389 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1390 <dt>buffer</dt>
1391 <dd class="description">Bytes to write</dd>
1392 <dt>length</dt>
1393 <dd class="description">Number of bytes to write</dd>
1394 </dl>
1395 <h4 class="returnvalue">Return Value</h4>
1396 <p class="description"><code>HTTP_STATUS_CONTINUE</code> if OK or HTTP status on error</p>
1397 <h4 class="discussion">Discussion</h4>
1398 <p class="discussion">This function is used after <a href="#cupsSendRequest"><code>cupsSendRequest</code></a> to provide a PPD and
1399 after <a href="#cupsStartDocument"><code>cupsStartDocument</code></a> to provide a document file.
1400
1401 </p>
1402 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpAcceptConnection">httpAcceptConnection</a></h3>
1403 <p class="description">Accept a new HTTP client connection from the
1404 specified listening socket.</p>
1405 <p class="code">
1406 <a href="#http_t">http_t</a> *httpAcceptConnection (<br />
1407 &#160;&#160;&#160;&#160;int fd,<br />
1408 &#160;&#160;&#160;&#160;int blocking<br />
1409 );</p>
1410 <h4 class="parameters">Parameters</h4>
1411 <dl>
1412 <dt>fd</dt>
1413 <dd class="description">Listen socket file descriptor</dd>
1414 <dt>blocking</dt>
1415 <dd class="description">1 if the connection should be
1416 blocking, 0 otherwise</dd>
1417 </dl>
1418 <h4 class="returnvalue">Return Value</h4>
1419 <p class="description">HTTP connection or <code>NULL</code></p>
1420 <h3 class="function"><span class="info">&#160;CUPS 1.5/macOS 10.7&#160;</span><a id="httpAddCredential">httpAddCredential</a></h3>
1421 <p class="description">Allocates and adds a single credential to an array.</p>
1422 <p class="code">
1423 int httpAddCredential (<br />
1424 &#160;&#160;&#160;&#160;cups_array_t *credentials,<br />
1425 &#160;&#160;&#160;&#160;const void *data,<br />
1426 &#160;&#160;&#160;&#160;size_t datalen<br />
1427 );</p>
1428 <h4 class="parameters">Parameters</h4>
1429 <dl>
1430 <dt>credentials</dt>
1431 <dd class="description">Credentials array</dd>
1432 <dt>data</dt>
1433 <dd class="description">PEM-encoded X.509 data</dd>
1434 <dt>datalen</dt>
1435 <dd class="description">Length of data</dd>
1436 </dl>
1437 <h4 class="returnvalue">Return Value</h4>
1438 <p class="description">0 on success, -1 on error</p>
1439 <h4 class="discussion">Discussion</h4>
1440 <p class="discussion">Use <code>cupsArrayNew(NULL, NULL)</code> to create a credentials array.
1441
1442 </p>
1443 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpAddrAny">httpAddrAny</a></h3>
1444 <p class="description">Check for the &quot;any&quot; address.</p>
1445 <p class="code">
1446 int httpAddrAny (<br />
1447 &#160;&#160;&#160;&#160;const <a href="#http_addr_t">http_addr_t</a> *addr<br />
1448 );</p>
1449 <h4 class="parameters">Parameters</h4>
1450 <dl>
1451 <dt>addr</dt>
1452 <dd class="description">Address to check</dd>
1453 </dl>
1454 <h4 class="returnvalue">Return Value</h4>
1455 <p class="description">1 if &quot;any&quot;, 0 otherwise</p>
1456 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpAddrClose">httpAddrClose</a></h3>
1457 <p class="description">Close a socket created by <a href="#httpAddrConnect"><code>httpAddrConnect</code></a> or
1458 <a href="#httpAddrListen"><code>httpAddrListen</code></a>.</p>
1459 <p class="code">
1460 int httpAddrClose (<br />
1461 &#160;&#160;&#160;&#160;<a href="#http_addr_t">http_addr_t</a> *addr,<br />
1462 &#160;&#160;&#160;&#160;int fd<br />
1463 );</p>
1464 <h4 class="parameters">Parameters</h4>
1465 <dl>
1466 <dt>addr</dt>
1467 <dd class="description">Listen address or <code>NULL</code></dd>
1468 <dt>fd</dt>
1469 <dd class="description">Socket file descriptor</dd>
1470 </dl>
1471 <h4 class="returnvalue">Return Value</h4>
1472 <p class="description">0 on success, -1 on failure</p>
1473 <h4 class="discussion">Discussion</h4>
1474 <p class="discussion">Pass <code>NULL</code> for sockets created with <a href="#httpAddrConnect"><code>httpAddrConnect</code></a> and the
1475 listen address for sockets created with <a href="#httpAddrListen"><code>httpAddrListen</code></a>. This will
1476 ensure that domain sockets are removed when closed.
1477
1478 </p>
1479 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpAddrEqual">httpAddrEqual</a></h3>
1480 <p class="description">Compare two addresses.</p>
1481 <p class="code">
1482 int httpAddrEqual (<br />
1483 &#160;&#160;&#160;&#160;const <a href="#http_addr_t">http_addr_t</a> *addr1,<br />
1484 &#160;&#160;&#160;&#160;const <a href="#http_addr_t">http_addr_t</a> *addr2<br />
1485 );</p>
1486 <h4 class="parameters">Parameters</h4>
1487 <dl>
1488 <dt>addr1</dt>
1489 <dd class="description">First address</dd>
1490 <dt>addr2</dt>
1491 <dd class="description">Second address</dd>
1492 </dl>
1493 <h4 class="returnvalue">Return Value</h4>
1494 <p class="description">1 if equal, 0 if not</p>
1495 <h3 class="function"><a id="httpAddrFamily">httpAddrFamily</a></h3>
1496 <p class="description">Get the address family of an address.</p>
1497 <p class="code">
1498 int httpAddrFamily (<br />
1499 &#160;&#160;&#160;&#160;<a href="#http_addr_t">http_addr_t</a> *addr<br />
1500 );</p>
1501 <h4 class="parameters">Parameters</h4>
1502 <dl>
1503 <dt>addr</dt>
1504 <dd class="description">Address</dd>
1505 </dl>
1506 <h4 class="returnvalue">Return Value</h4>
1507 <p class="description">Address family</p>
1508 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpAddrLength">httpAddrLength</a></h3>
1509 <p class="description">Return the length of the address in bytes.</p>
1510 <p class="code">
1511 int httpAddrLength (<br />
1512 &#160;&#160;&#160;&#160;const <a href="#http_addr_t">http_addr_t</a> *addr<br />
1513 );</p>
1514 <h4 class="parameters">Parameters</h4>
1515 <dl>
1516 <dt>addr</dt>
1517 <dd class="description">Address</dd>
1518 </dl>
1519 <h4 class="returnvalue">Return Value</h4>
1520 <p class="description">Length in bytes</p>
1521 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpAddrListen">httpAddrListen</a></h3>
1522 <p class="description">Create a listening socket bound to the specified
1523 address and port.</p>
1524 <p class="code">
1525 int httpAddrListen (<br />
1526 &#160;&#160;&#160;&#160;<a href="#http_addr_t">http_addr_t</a> *addr,<br />
1527 &#160;&#160;&#160;&#160;int port<br />
1528 );</p>
1529 <h4 class="parameters">Parameters</h4>
1530 <dl>
1531 <dt>addr</dt>
1532 <dd class="description">Address to bind to</dd>
1533 <dt>port</dt>
1534 <dd class="description">Port number to bind to</dd>
1535 </dl>
1536 <h4 class="returnvalue">Return Value</h4>
1537 <p class="description">Socket or -1 on error</p>
1538 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpAddrLocalhost">httpAddrLocalhost</a></h3>
1539 <p class="description">Check for the local loopback address.</p>
1540 <p class="code">
1541 int httpAddrLocalhost (<br />
1542 &#160;&#160;&#160;&#160;const <a href="#http_addr_t">http_addr_t</a> *addr<br />
1543 );</p>
1544 <h4 class="parameters">Parameters</h4>
1545 <dl>
1546 <dt>addr</dt>
1547 <dd class="description">Address to check</dd>
1548 </dl>
1549 <h4 class="returnvalue">Return Value</h4>
1550 <p class="description">1 if local host, 0 otherwise</p>
1551 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpAddrLookup">httpAddrLookup</a></h3>
1552 <p class="description">Lookup the hostname associated with the address.</p>
1553 <p class="code">
1554 char *httpAddrLookup (<br />
1555 &#160;&#160;&#160;&#160;const <a href="#http_addr_t">http_addr_t</a> *addr,<br />
1556 &#160;&#160;&#160;&#160;char *name,<br />
1557 &#160;&#160;&#160;&#160;int namelen<br />
1558 );</p>
1559 <h4 class="parameters">Parameters</h4>
1560 <dl>
1561 <dt>addr</dt>
1562 <dd class="description">Address to lookup</dd>
1563 <dt>name</dt>
1564 <dd class="description">Host name buffer</dd>
1565 <dt>namelen</dt>
1566 <dd class="description">Size of name buffer</dd>
1567 </dl>
1568 <h4 class="returnvalue">Return Value</h4>
1569 <p class="description">Host name</p>
1570 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpAddrPort">httpAddrPort</a></h3>
1571 <p class="description">Get the port number associated with an address.</p>
1572 <p class="code">
1573 int httpAddrPort (<br />
1574 &#160;&#160;&#160;&#160;<a href="#http_addr_t">http_addr_t</a> *addr<br />
1575 );</p>
1576 <h4 class="parameters">Parameters</h4>
1577 <dl>
1578 <dt>addr</dt>
1579 <dd class="description">Address</dd>
1580 </dl>
1581 <h4 class="returnvalue">Return Value</h4>
1582 <p class="description">Port number</p>
1583 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpAddrString">httpAddrString</a></h3>
1584 <p class="description">Convert an address to a numeric string.</p>
1585 <p class="code">
1586 char *httpAddrString (<br />
1587 &#160;&#160;&#160;&#160;const <a href="#http_addr_t">http_addr_t</a> *addr,<br />
1588 &#160;&#160;&#160;&#160;char *s,<br />
1589 &#160;&#160;&#160;&#160;int slen<br />
1590 );</p>
1591 <h4 class="parameters">Parameters</h4>
1592 <dl>
1593 <dt>addr</dt>
1594 <dd class="description">Address to convert</dd>
1595 <dt>s</dt>
1596 <dd class="description">String buffer</dd>
1597 <dt>slen</dt>
1598 <dd class="description">Length of string</dd>
1599 </dl>
1600 <h4 class="returnvalue">Return Value</h4>
1601 <p class="description">Numeric address string</p>
1602 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpAssembleURI">httpAssembleURI</a></h3>
1603 <p class="description">Assemble a uniform resource identifier from its
1604 components.</p>
1605 <p class="code">
1606 <a href="#http_uri_status_t">http_uri_status_t</a> httpAssembleURI (<br />
1607 &#160;&#160;&#160;&#160;<a href="#http_uri_coding_t">http_uri_coding_t</a> encoding,<br />
1608 &#160;&#160;&#160;&#160;char *uri,<br />
1609 &#160;&#160;&#160;&#160;int urilen,<br />
1610 &#160;&#160;&#160;&#160;const char *scheme,<br />
1611 &#160;&#160;&#160;&#160;const char *username,<br />
1612 &#160;&#160;&#160;&#160;const char *host,<br />
1613 &#160;&#160;&#160;&#160;int port,<br />
1614 &#160;&#160;&#160;&#160;const char *resource<br />
1615 );</p>
1616 <h4 class="parameters">Parameters</h4>
1617 <dl>
1618 <dt>encoding</dt>
1619 <dd class="description">Encoding flags</dd>
1620 <dt>uri</dt>
1621 <dd class="description">URI buffer</dd>
1622 <dt>urilen</dt>
1623 <dd class="description">Size of URI buffer</dd>
1624 <dt>scheme</dt>
1625 <dd class="description">Scheme name</dd>
1626 <dt>username</dt>
1627 <dd class="description">Username</dd>
1628 <dt>host</dt>
1629 <dd class="description">Hostname or address</dd>
1630 <dt>port</dt>
1631 <dd class="description">Port number</dd>
1632 <dt>resource</dt>
1633 <dd class="description">Resource</dd>
1634 </dl>
1635 <h4 class="returnvalue">Return Value</h4>
1636 <p class="description">URI status</p>
1637 <h4 class="discussion">Discussion</h4>
1638 <p class="discussion">This function escapes reserved characters in the URI depending on the
1639 value of the &quot;encoding&quot; argument. You should use this function in
1640 place of traditional string functions whenever you need to create a
1641 URI string.
1642
1643 </p>
1644 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpAssembleURIf">httpAssembleURIf</a></h3>
1645 <p class="description">Assemble a uniform resource identifier from its
1646 components with a formatted resource.</p>
1647 <p class="code">
1648 <a href="#http_uri_status_t">http_uri_status_t</a> httpAssembleURIf (<br />
1649 &#160;&#160;&#160;&#160;<a href="#http_uri_coding_t">http_uri_coding_t</a> encoding,<br />
1650 &#160;&#160;&#160;&#160;char *uri,<br />
1651 &#160;&#160;&#160;&#160;int urilen,<br />
1652 &#160;&#160;&#160;&#160;const char *scheme,<br />
1653 &#160;&#160;&#160;&#160;const char *username,<br />
1654 &#160;&#160;&#160;&#160;const char *host,<br />
1655 &#160;&#160;&#160;&#160;int port,<br />
1656 &#160;&#160;&#160;&#160;const char *resourcef,<br />
1657 &#160;&#160;&#160;&#160;...<br />
1658 );</p>
1659 <h4 class="parameters">Parameters</h4>
1660 <dl>
1661 <dt>encoding</dt>
1662 <dd class="description">Encoding flags</dd>
1663 <dt>uri</dt>
1664 <dd class="description">URI buffer</dd>
1665 <dt>urilen</dt>
1666 <dd class="description">Size of URI buffer</dd>
1667 <dt>scheme</dt>
1668 <dd class="description">Scheme name</dd>
1669 <dt>username</dt>
1670 <dd class="description">Username</dd>
1671 <dt>host</dt>
1672 <dd class="description">Hostname or address</dd>
1673 <dt>port</dt>
1674 <dd class="description">Port number</dd>
1675 <dt>resourcef</dt>
1676 <dd class="description">Printf-style resource</dd>
1677 <dt>...</dt>
1678 <dd class="description">Additional arguments as needed</dd>
1679 </dl>
1680 <h4 class="returnvalue">Return Value</h4>
1681 <p class="description">URI status</p>
1682 <h4 class="discussion">Discussion</h4>
1683 <p class="discussion">This function creates a formatted version of the resource string
1684 argument &quot;resourcef&quot; and escapes reserved characters in the URI
1685 depending on the value of the &quot;encoding&quot; argument. You should use
1686 this function in place of traditional string functions whenever
1687 you need to create a URI string.
1688
1689 </p>
1690 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpAssembleUUID">httpAssembleUUID</a></h3>
1691 <p class="description">Assemble a name-based UUID URN conforming to RFC 4122.</p>
1692 <p class="code">
1693 char *httpAssembleUUID (<br />
1694 &#160;&#160;&#160;&#160;const char *server,<br />
1695 &#160;&#160;&#160;&#160;int port,<br />
1696 &#160;&#160;&#160;&#160;const char *name,<br />
1697 &#160;&#160;&#160;&#160;int number,<br />
1698 &#160;&#160;&#160;&#160;char *buffer,<br />
1699 &#160;&#160;&#160;&#160;size_t bufsize<br />
1700 );</p>
1701 <h4 class="parameters">Parameters</h4>
1702 <dl>
1703 <dt>server</dt>
1704 <dd class="description">Server name</dd>
1705 <dt>port</dt>
1706 <dd class="description">Port number</dd>
1707 <dt>name</dt>
1708 <dd class="description">Object name or NULL</dd>
1709 <dt>number</dt>
1710 <dd class="description">Object number or 0</dd>
1711 <dt>buffer</dt>
1712 <dd class="description">String buffer</dd>
1713 <dt>bufsize</dt>
1714 <dd class="description">Size of buffer</dd>
1715 </dl>
1716 <h4 class="returnvalue">Return Value</h4>
1717 <p class="description">UUID string</p>
1718 <h4 class="discussion">Discussion</h4>
1719 <p class="discussion">This function creates a unique 128-bit identifying number using the server
1720 name, port number, random data, and optionally an object name and/or object
1721 number. The result is formatted as a UUID URN as defined in RFC 4122.<br>
1722 <br>
1723 The buffer needs to be at least 46 bytes in size.
1724
1725 </p>
1726 <h3 class="function"><a id="httpBlocking">httpBlocking</a></h3>
1727 <p class="description">Set blocking/non-blocking behavior on a connection.</p>
1728 <p class="code">
1729 void httpBlocking (<br />
1730 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
1731 &#160;&#160;&#160;&#160;int b<br />
1732 );</p>
1733 <h4 class="parameters">Parameters</h4>
1734 <dl>
1735 <dt>http</dt>
1736 <dd class="description">HTTP connection</dd>
1737 <dt>b</dt>
1738 <dd class="description">1 = blocking, 0 = non-blocking</dd>
1739 </dl>
1740 <h3 class="function"><a id="httpCheck">httpCheck</a></h3>
1741 <p class="description">Check to see if there is a pending response from the server.</p>
1742 <p class="code">
1743 int httpCheck (<br />
1744 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
1745 );</p>
1746 <h4 class="parameters">Parameters</h4>
1747 <dl>
1748 <dt>http</dt>
1749 <dd class="description">HTTP connection</dd>
1750 </dl>
1751 <h4 class="returnvalue">Return Value</h4>
1752 <p class="description">0 = no data, 1 = data available</p>
1753 <h3 class="function"><span class="info">&#160;CUPS 1.1.19/macOS 10.3&#160;</span><a id="httpClearCookie">httpClearCookie</a></h3>
1754 <p class="description">Clear the cookie value(s).</p>
1755 <p class="code">
1756 void httpClearCookie (<br />
1757 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
1758 );</p>
1759 <h4 class="parameters">Parameters</h4>
1760 <dl>
1761 <dt>http</dt>
1762 <dd class="description">HTTP connection</dd>
1763 </dl>
1764 <h3 class="function"><a id="httpClearFields">httpClearFields</a></h3>
1765 <p class="description">Clear HTTP request fields.</p>
1766 <p class="code">
1767 void httpClearFields (<br />
1768 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
1769 );</p>
1770 <h4 class="parameters">Parameters</h4>
1771 <dl>
1772 <dt>http</dt>
1773 <dd class="description">HTTP connection</dd>
1774 </dl>
1775 <h3 class="function"><a id="httpClose">httpClose</a></h3>
1776 <p class="description">Close an HTTP connection.</p>
1777 <p class="code">
1778 void httpClose (<br />
1779 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
1780 );</p>
1781 <h4 class="parameters">Parameters</h4>
1782 <dl>
1783 <dt>http</dt>
1784 <dd class="description">HTTP connection</dd>
1785 </dl>
1786 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpCompareCredentials">httpCompareCredentials</a></h3>
1787 <p class="description">Compare two sets of X.509 credentials.</p>
1788 <p class="code">
1789 int httpCompareCredentials (<br />
1790 &#160;&#160;&#160;&#160;cups_array_t *cred1,<br />
1791 &#160;&#160;&#160;&#160;cups_array_t *cred2<br />
1792 );</p>
1793 <h4 class="parameters">Parameters</h4>
1794 <dl>
1795 <dt>cred1</dt>
1796 <dd class="description">First set of X.509 credentials</dd>
1797 <dt>cred2</dt>
1798 <dd class="description">Second set of X.509 credentials</dd>
1799 </dl>
1800 <h4 class="returnvalue">Return Value</h4>
1801 <p class="description">1 if they match, 0 if they do not</p>
1802 <h3 class="function"><span class="info">&#160;DEPRECATED&#160;</span><a id="httpConnect">httpConnect</a></h3>
1803 <p class="description">Connect to a HTTP server.</p>
1804 <p class="code">
1805 <a href="#http_t">http_t</a> *httpConnect (<br />
1806 &#160;&#160;&#160;&#160;const char *host,<br />
1807 &#160;&#160;&#160;&#160;int port<br />
1808 );</p>
1809 <h4 class="parameters">Parameters</h4>
1810 <dl>
1811 <dt>host</dt>
1812 <dd class="description">Host to connect to</dd>
1813 <dt>port</dt>
1814 <dd class="description">Port number</dd>
1815 </dl>
1816 <h4 class="returnvalue">Return Value</h4>
1817 <p class="description">New HTTP connection</p>
1818 <h4 class="discussion">Discussion</h4>
1819 <p class="discussion">This function is deprecated - use <a href="#httpConnect2"><code>httpConnect2</code></a> instead.
1820
1821 </p>
1822 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpConnect2">httpConnect2</a></h3>
1823 <p class="description">Connect to a HTTP server.</p>
1824 <p class="code">
1825 <a href="#http_t">http_t</a> *httpConnect2 (<br />
1826 &#160;&#160;&#160;&#160;const char *host,<br />
1827 &#160;&#160;&#160;&#160;int port,<br />
1828 &#160;&#160;&#160;&#160;<a href="#http_addrlist_t">http_addrlist_t</a> *addrlist,<br />
1829 &#160;&#160;&#160;&#160;int family,<br />
1830 &#160;&#160;&#160;&#160;<a href="#http_encryption_t">http_encryption_t</a> encryption,<br />
1831 &#160;&#160;&#160;&#160;int blocking,<br />
1832 &#160;&#160;&#160;&#160;int msec,<br />
1833 &#160;&#160;&#160;&#160;int *cancel<br />
1834 );</p>
1835 <h4 class="parameters">Parameters</h4>
1836 <dl>
1837 <dt>host</dt>
1838 <dd class="description">Host to connect to</dd>
1839 <dt>port</dt>
1840 <dd class="description">Port number</dd>
1841 <dt>addrlist</dt>
1842 <dd class="description">List of addresses or NULL to lookup</dd>
1843 <dt>family</dt>
1844 <dd class="description">Address family to use or <code>AF_UNSPEC</code> for any</dd>
1845 <dt>encryption</dt>
1846 <dd class="description">Type of encryption to use</dd>
1847 <dt>blocking</dt>
1848 <dd class="description">1 for blocking connection, 0 for non-blocking</dd>
1849 <dt>msec</dt>
1850 <dd class="description">Connection timeout in milliseconds, 0 means don't connect</dd>
1851 <dt>cancel</dt>
1852 <dd class="description">Pointer to &quot;cancel&quot; variable</dd>
1853 </dl>
1854 <h4 class="returnvalue">Return Value</h4>
1855 <p class="description">New HTTP connection</p>
1856 <h3 class="function"><span class="info">&#160;DEPRECATED&#160;</span><a id="httpConnectEncrypt">httpConnectEncrypt</a></h3>
1857 <p class="description">Connect to a HTTP server using encryption.</p>
1858 <p class="code">
1859 <a href="#http_t">http_t</a> *httpConnectEncrypt (<br />
1860 &#160;&#160;&#160;&#160;const char *host,<br />
1861 &#160;&#160;&#160;&#160;int port,<br />
1862 &#160;&#160;&#160;&#160;<a href="#http_encryption_t">http_encryption_t</a> encryption<br />
1863 );</p>
1864 <h4 class="parameters">Parameters</h4>
1865 <dl>
1866 <dt>host</dt>
1867 <dd class="description">Host to connect to</dd>
1868 <dt>port</dt>
1869 <dd class="description">Port number</dd>
1870 <dt>encryption</dt>
1871 <dd class="description">Type of encryption to use</dd>
1872 </dl>
1873 <h4 class="returnvalue">Return Value</h4>
1874 <p class="description">New HTTP connection</p>
1875 <h4 class="discussion">Discussion</h4>
1876 <p class="discussion">This function is now deprecated. Please use the <a href="#httpConnect2"><code>httpConnect2</code></a> function
1877 instead.
1878
1879 </p>
1880 <h3 class="function"><span class="info">&#160;DEPRECATED&#160;</span><a id="httpDecode64">httpDecode64</a></h3>
1881 <p class="description">Base64-decode a string.</p>
1882 <p class="code">
1883 char *httpDecode64 (<br />
1884 &#160;&#160;&#160;&#160;char *out,<br />
1885 &#160;&#160;&#160;&#160;const char *in<br />
1886 );</p>
1887 <h4 class="parameters">Parameters</h4>
1888 <dl>
1889 <dt>out</dt>
1890 <dd class="description">String to write to</dd>
1891 <dt>in</dt>
1892 <dd class="description">String to read from</dd>
1893 </dl>
1894 <h4 class="returnvalue">Return Value</h4>
1895 <p class="description">Decoded string</p>
1896 <h4 class="discussion">Discussion</h4>
1897 <p class="discussion">This function is deprecated. Use the httpDecode64_2() function instead
1898 which provides buffer length arguments.
1899
1900 </p>
1901 <h3 class="function"><span class="info">&#160;CUPS 1.1.21/macOS 10.4&#160;</span><a id="httpDecode64_2">httpDecode64_2</a></h3>
1902 <p class="description">Base64-decode a string.</p>
1903 <p class="code">
1904 char *httpDecode64_2 (<br />
1905 &#160;&#160;&#160;&#160;char *out,<br />
1906 &#160;&#160;&#160;&#160;int *outlen,<br />
1907 &#160;&#160;&#160;&#160;const char *in<br />
1908 );</p>
1909 <h4 class="parameters">Parameters</h4>
1910 <dl>
1911 <dt>out</dt>
1912 <dd class="description">String to write to</dd>
1913 <dt>outlen</dt>
1914 <dd class="description">Size of output string</dd>
1915 <dt>in</dt>
1916 <dd class="description">String to read from</dd>
1917 </dl>
1918 <h4 class="returnvalue">Return Value</h4>
1919 <p class="description">Decoded string</p>
1920 <h3 class="function"><a id="httpDelete">httpDelete</a></h3>
1921 <p class="description">Send a DELETE request to the server.</p>
1922 <p class="code">
1923 int httpDelete (<br />
1924 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
1925 &#160;&#160;&#160;&#160;const char *uri<br />
1926 );</p>
1927 <h4 class="parameters">Parameters</h4>
1928 <dl>
1929 <dt>http</dt>
1930 <dd class="description">HTTP connection</dd>
1931 <dt>uri</dt>
1932 <dd class="description">URI to delete</dd>
1933 </dl>
1934 <h4 class="returnvalue">Return Value</h4>
1935 <p class="description">Status of call (0 = success)</p>
1936 <h3 class="function"><span class="info">&#160;DEPRECATED&#160;</span><a id="httpEncode64">httpEncode64</a></h3>
1937 <p class="description">Base64-encode a string.</p>
1938 <p class="code">
1939 char *httpEncode64 (<br />
1940 &#160;&#160;&#160;&#160;char *out,<br />
1941 &#160;&#160;&#160;&#160;const char *in<br />
1942 );</p>
1943 <h4 class="parameters">Parameters</h4>
1944 <dl>
1945 <dt>out</dt>
1946 <dd class="description">String to write to</dd>
1947 <dt>in</dt>
1948 <dd class="description">String to read from</dd>
1949 </dl>
1950 <h4 class="returnvalue">Return Value</h4>
1951 <p class="description">Encoded string</p>
1952 <h4 class="discussion">Discussion</h4>
1953 <p class="discussion">This function is deprecated. Use the httpEncode64_2() function instead
1954 which provides buffer length arguments.
1955
1956 </p>
1957 <h3 class="function"><span class="info">&#160;CUPS 1.1.21/macOS 10.4&#160;</span><a id="httpEncode64_2">httpEncode64_2</a></h3>
1958 <p class="description">Base64-encode a string.</p>
1959 <p class="code">
1960 char *httpEncode64_2 (<br />
1961 &#160;&#160;&#160;&#160;char *out,<br />
1962 &#160;&#160;&#160;&#160;int outlen,<br />
1963 &#160;&#160;&#160;&#160;const char *in,<br />
1964 &#160;&#160;&#160;&#160;int inlen<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>outlen</dt>
1971 <dd class="description">Size of output string</dd>
1972 <dt>in</dt>
1973 <dd class="description">String to read from</dd>
1974 <dt>inlen</dt>
1975 <dd class="description">Size of input string</dd>
1976 </dl>
1977 <h4 class="returnvalue">Return Value</h4>
1978 <p class="description">Encoded string</p>
1979 <h3 class="function"><a id="httpEncryption">httpEncryption</a></h3>
1980 <p class="description">Set the required encryption on the link.</p>
1981 <p class="code">
1982 int httpEncryption (<br />
1983 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
1984 &#160;&#160;&#160;&#160;<a href="#http_encryption_t">http_encryption_t</a> e<br />
1985 );</p>
1986 <h4 class="parameters">Parameters</h4>
1987 <dl>
1988 <dt>http</dt>
1989 <dd class="description">HTTP connection</dd>
1990 <dt>e</dt>
1991 <dd class="description">New encryption preference</dd>
1992 </dl>
1993 <h4 class="returnvalue">Return Value</h4>
1994 <p class="description">-1 on error, 0 on success</p>
1995 <h3 class="function"><a id="httpError">httpError</a></h3>
1996 <p class="description">Get the last error on a connection.</p>
1997 <p class="code">
1998 int httpError (<br />
1999 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2000 );</p>
2001 <h4 class="parameters">Parameters</h4>
2002 <dl>
2003 <dt>http</dt>
2004 <dd class="description">HTTP connection</dd>
2005 </dl>
2006 <h4 class="returnvalue">Return Value</h4>
2007 <p class="description">Error code (errno) value</p>
2008 <h3 class="function"><a id="httpFieldValue">httpFieldValue</a></h3>
2009 <p class="description">Return the HTTP field enumeration value for a field
2010 name.</p>
2011 <p class="code">
2012 <a href="#http_field_t">http_field_t</a> httpFieldValue (<br />
2013 &#160;&#160;&#160;&#160;const char *name<br />
2014 );</p>
2015 <h4 class="parameters">Parameters</h4>
2016 <dl>
2017 <dt>name</dt>
2018 <dd class="description">String name</dd>
2019 </dl>
2020 <h4 class="returnvalue">Return Value</h4>
2021 <p class="description">Field index</p>
2022 <h3 class="function"><a id="httpFlush">httpFlush</a></h3>
2023 <p class="description">Flush data from a HTTP connection.</p>
2024 <p class="code">
2025 void httpFlush (<br />
2026 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2027 );</p>
2028 <h4 class="parameters">Parameters</h4>
2029 <dl>
2030 <dt>http</dt>
2031 <dd class="description">HTTP connection</dd>
2032 </dl>
2033 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpFlushWrite">httpFlushWrite</a></h3>
2034 <p class="description">Flush data in write buffer.</p>
2035 <p class="code">
2036 int httpFlushWrite (<br />
2037 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2038 );</p>
2039 <h4 class="parameters">Parameters</h4>
2040 <dl>
2041 <dt>http</dt>
2042 <dd class="description">HTTP connection</dd>
2043 </dl>
2044 <h4 class="returnvalue">Return Value</h4>
2045 <p class="description">Bytes written or -1 on error</p>
2046 <h3 class="function"><a id="httpFreeCredentials">httpFreeCredentials</a></h3>
2047 <p class="description">Free an array of credentials.</p>
2048 <p class="code">
2049 void httpFreeCredentials (<br />
2050 &#160;&#160;&#160;&#160;cups_array_t *credentials<br />
2051 );</p>
2052 <h4 class="parameters">Parameters</h4>
2053 <dl>
2054 <dt>credentials</dt>
2055 <dd class="description">Array of credentials</dd>
2056 </dl>
2057 <h3 class="function"><a id="httpGet">httpGet</a></h3>
2058 <p class="description">Send a GET request to the server.</p>
2059 <p class="code">
2060 int httpGet (<br />
2061 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
2062 &#160;&#160;&#160;&#160;const char *uri<br />
2063 );</p>
2064 <h4 class="parameters">Parameters</h4>
2065 <dl>
2066 <dt>http</dt>
2067 <dd class="description">HTTP connection</dd>
2068 <dt>uri</dt>
2069 <dd class="description">URI to get</dd>
2070 </dl>
2071 <h4 class="returnvalue">Return Value</h4>
2072 <p class="description">Status of call (0 = success)</p>
2073 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpGetActivity">httpGetActivity</a></h3>
2074 <p class="description">Get the most recent activity for a connection.</p>
2075 <p class="code">
2076 time_t httpGetActivity (<br />
2077 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2078 );</p>
2079 <h4 class="parameters">Parameters</h4>
2080 <dl>
2081 <dt>http</dt>
2082 <dd class="description">HTTP connection</dd>
2083 </dl>
2084 <h4 class="returnvalue">Return Value</h4>
2085 <p class="description">Time of last read or write</p>
2086 <h4 class="discussion">Discussion</h4>
2087 <p class="discussion">The return value is the UNIX time of the last read or write.
2088
2089 </p>
2090 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpGetAddress">httpGetAddress</a></h3>
2091 <p class="description">Get the address of the connected peer of a connection.</p>
2092 <p class="code">
2093 <a href="#http_addr_t">http_addr_t</a> *httpGetAddress (<br />
2094 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2095 );</p>
2096 <h4 class="parameters">Parameters</h4>
2097 <dl>
2098 <dt>http</dt>
2099 <dd class="description">HTTP connection</dd>
2100 </dl>
2101 <h4 class="returnvalue">Return Value</h4>
2102 <p class="description">Connected address or <code>NULL</code></p>
2103 <h4 class="discussion">Discussion</h4>
2104 <p class="discussion">Returns <code>NULL</code> if the socket is currently unconnected.
2105
2106 </p>
2107 <h3 class="function"><span class="info">&#160;CUPS 1.3/macOS 10.5&#160;</span><a id="httpGetAuthString">httpGetAuthString</a></h3>
2108 <p class="description">Get the current authorization string.</p>
2109 <p class="code">
2110 char *httpGetAuthString (<br />
2111 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2112 );</p>
2113 <h4 class="parameters">Parameters</h4>
2114 <dl>
2115 <dt>http</dt>
2116 <dd class="description">HTTP connection</dd>
2117 </dl>
2118 <h4 class="returnvalue">Return Value</h4>
2119 <p class="description">Authorization string</p>
2120 <h4 class="discussion">Discussion</h4>
2121 <p class="discussion">The authorization string is set by cupsDoAuthentication() and
2122 httpSetAuthString(). Use httpGetAuthString() to retrieve the
2123 string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
2124 value.
2125
2126 </p>
2127 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpGetBlocking">httpGetBlocking</a></h3>
2128 <p class="description">Get the blocking/non-block state of a connection.</p>
2129 <p class="code">
2130 int httpGetBlocking (<br />
2131 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2132 );</p>
2133 <h4 class="parameters">Parameters</h4>
2134 <dl>
2135 <dt>http</dt>
2136 <dd class="description">HTTP connection</dd>
2137 </dl>
2138 <h4 class="returnvalue">Return Value</h4>
2139 <p class="description">1 if blocking, 0 if non-blocking</p>
2140 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpGetContentEncoding">httpGetContentEncoding</a></h3>
2141 <p class="description">Get a common content encoding, if any, between
2142 the client and server.</p>
2143 <p class="code">
2144 const char *httpGetContentEncoding (<br />
2145 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2146 );</p>
2147 <h4 class="parameters">Parameters</h4>
2148 <dl>
2149 <dt>http</dt>
2150 <dd class="description">HTTP connection</dd>
2151 </dl>
2152 <h4 class="returnvalue">Return Value</h4>
2153 <p class="description">Content-Coding value or
2154 <code>NULL</code> for the identity
2155 coding.</p>
2156 <h4 class="discussion">Discussion</h4>
2157 <p class="discussion">This function uses the value of the Accepts-Encoding HTTP header and must be
2158 called after receiving a response from the server or a request from the
2159 client. The value returned can be use in subsequent requests (for clients)
2160 or in the response (for servers) in order to compress the content stream.
2161
2162 </p>
2163 <h3 class="function"><span class="info">&#160;CUPS 1.1.19/macOS 10.3&#160;</span><a id="httpGetCookie">httpGetCookie</a></h3>
2164 <p class="description">Get any cookie data from the response.</p>
2165 <p class="code">
2166 const char *httpGetCookie (<br />
2167 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2168 );</p>
2169 <h4 class="parameters">Parameters</h4>
2170 <dl>
2171 <dt>http</dt>
2172 <dd class="description">HTTP connection</dd>
2173 </dl>
2174 <h4 class="returnvalue">Return Value</h4>
2175 <p class="description">Cookie data or NULL</p>
2176 <h3 class="function"><span class="info">&#160;DEPRECATED&#160;</span><a id="httpGetDateString">httpGetDateString</a></h3>
2177 <p class="description">Get a formatted date/time string from a time value.</p>
2178 <p class="code">
2179 const char *httpGetDateString (<br />
2180 &#160;&#160;&#160;&#160;time_t t<br />
2181 );</p>
2182 <h4 class="parameters">Parameters</h4>
2183 <dl>
2184 <dt>t</dt>
2185 <dd class="description">UNIX time</dd>
2186 </dl>
2187 <h4 class="returnvalue">Return Value</h4>
2188 <p class="description">Date/time string</p>
2189 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpGetDateString2">httpGetDateString2</a></h3>
2190 <p class="description">Get a formatted date/time string from a time value.</p>
2191 <p class="code">
2192 const char *httpGetDateString2 (<br />
2193 &#160;&#160;&#160;&#160;time_t t,<br />
2194 &#160;&#160;&#160;&#160;char *s,<br />
2195 &#160;&#160;&#160;&#160;int slen<br />
2196 );</p>
2197 <h4 class="parameters">Parameters</h4>
2198 <dl>
2199 <dt>t</dt>
2200 <dd class="description">UNIX time</dd>
2201 <dt>s</dt>
2202 <dd class="description">String buffer</dd>
2203 <dt>slen</dt>
2204 <dd class="description">Size of string buffer</dd>
2205 </dl>
2206 <h4 class="returnvalue">Return Value</h4>
2207 <p class="description">Date/time string</p>
2208 <h3 class="function"><a id="httpGetDateTime">httpGetDateTime</a></h3>
2209 <p class="description">Get a time value from a formatted date/time string.</p>
2210 <p class="code">
2211 time_t httpGetDateTime (<br />
2212 &#160;&#160;&#160;&#160;const char *s<br />
2213 );</p>
2214 <h4 class="parameters">Parameters</h4>
2215 <dl>
2216 <dt>s</dt>
2217 <dd class="description">Date/time string</dd>
2218 </dl>
2219 <h4 class="returnvalue">Return Value</h4>
2220 <p class="description">UNIX time</p>
2221 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpGetEncryption">httpGetEncryption</a></h3>
2222 <p class="description">Get the current encryption mode of a connection.</p>
2223 <p class="code">
2224 <a href="#http_encryption_t">http_encryption_t</a> httpGetEncryption (<br />
2225 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2226 );</p>
2227 <h4 class="parameters">Parameters</h4>
2228 <dl>
2229 <dt>http</dt>
2230 <dd class="description">HTTP connection</dd>
2231 </dl>
2232 <h4 class="returnvalue">Return Value</h4>
2233 <p class="description">Current encryption mode</p>
2234 <h4 class="discussion">Discussion</h4>
2235 <p class="discussion">This function returns the encryption mode for the connection. Use the
2236 <a href="#httpIsEncrypted"><code>httpIsEncrypted</code></a> function to determine whether a TLS session has
2237 been established.
2238
2239 </p>
2240 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpGetExpect">httpGetExpect</a></h3>
2241 <p class="description">Get the value of the Expect header, if any.</p>
2242 <p class="code">
2243 http_status_t httpGetExpect (<br />
2244 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2245 );</p>
2246 <h4 class="parameters">Parameters</h4>
2247 <dl>
2248 <dt>http</dt>
2249 <dd class="description">HTTP connection</dd>
2250 </dl>
2251 <h4 class="returnvalue">Return Value</h4>
2252 <p class="description">Expect: status, if any</p>
2253 <h4 class="discussion">Discussion</h4>
2254 <p class="discussion">Returns <code>HTTP_STATUS_NONE</code> if there is no Expect header, otherwise
2255 returns the expected HTTP status code, typically <code>HTTP_STATUS_CONTINUE</code>.
2256
2257 </p>
2258 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpGetFd">httpGetFd</a></h3>
2259 <p class="description">Get the file descriptor associated with a connection.</p>
2260 <p class="code">
2261 int httpGetFd (<br />
2262 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2263 );</p>
2264 <h4 class="parameters">Parameters</h4>
2265 <dl>
2266 <dt>http</dt>
2267 <dd class="description">HTTP connection</dd>
2268 </dl>
2269 <h4 class="returnvalue">Return Value</h4>
2270 <p class="description">File descriptor or -1 if none</p>
2271 <h3 class="function"><a id="httpGetField">httpGetField</a></h3>
2272 <p class="description">Get a field value from a request/response.</p>
2273 <p class="code">
2274 const char *httpGetField (<br />
2275 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
2276 &#160;&#160;&#160;&#160;<a href="#http_field_t">http_field_t</a> field<br />
2277 );</p>
2278 <h4 class="parameters">Parameters</h4>
2279 <dl>
2280 <dt>http</dt>
2281 <dd class="description">HTTP connection</dd>
2282 <dt>field</dt>
2283 <dd class="description">Field to get</dd>
2284 </dl>
2285 <h4 class="returnvalue">Return Value</h4>
2286 <p class="description">Field value</p>
2287 <h3 class="function"><span class="info">&#160;DEPRECATED&#160;</span><a id="httpGetHostByName">httpGetHostByName</a></h3>
2288 <p class="description">Lookup a hostname or IPv4 address, and return
2289 address records for the specified name.</p>
2290 <p class="code">
2291 struct hostent *httpGetHostByName (<br />
2292 &#160;&#160;&#160;&#160;const char *name<br />
2293 );</p>
2294 <h4 class="parameters">Parameters</h4>
2295 <dl>
2296 <dt>name</dt>
2297 <dd class="description">Hostname or IP address</dd>
2298 </dl>
2299 <h4 class="returnvalue">Return Value</h4>
2300 <p class="description">Host entry</p>
2301 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpGetHostname">httpGetHostname</a></h3>
2302 <p class="description">Get the FQDN for the connection or local system.</p>
2303 <p class="code">
2304 const char *httpGetHostname (<br />
2305 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
2306 &#160;&#160;&#160;&#160;char *s,<br />
2307 &#160;&#160;&#160;&#160;int slen<br />
2308 );</p>
2309 <h4 class="parameters">Parameters</h4>
2310 <dl>
2311 <dt>http</dt>
2312 <dd class="description">HTTP connection or NULL</dd>
2313 <dt>s</dt>
2314 <dd class="description">String buffer for name</dd>
2315 <dt>slen</dt>
2316 <dd class="description">Size of buffer</dd>
2317 </dl>
2318 <h4 class="returnvalue">Return Value</h4>
2319 <p class="description">FQDN for connection or system</p>
2320 <h4 class="discussion">Discussion</h4>
2321 <p class="discussion">When &quot;http&quot; points to a connected socket, return the hostname or
2322 address that was used in the call to httpConnect() or httpConnectEncrypt(),
2323 or the address of the client for the connection from httpAcceptConnection().
2324 Otherwise, return the FQDN for the local system using both gethostname()
2325 and gethostbyname() to get the local hostname with domain.
2326
2327 </p>
2328 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpGetKeepAlive">httpGetKeepAlive</a></h3>
2329 <p class="description">Get the current Keep-Alive state of the connection.</p>
2330 <p class="code">
2331 <a href="#http_keepalive_t">http_keepalive_t</a> httpGetKeepAlive (<br />
2332 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2333 );</p>
2334 <h4 class="parameters">Parameters</h4>
2335 <dl>
2336 <dt>http</dt>
2337 <dd class="description">HTTP connection</dd>
2338 </dl>
2339 <h4 class="returnvalue">Return Value</h4>
2340 <p class="description">Keep-Alive state</p>
2341 <h3 class="function"><span class="info">&#160;DEPRECATED&#160;</span><a id="httpGetLength">httpGetLength</a></h3>
2342 <p class="description">Get the amount of data remaining from the
2343 content-length or transfer-encoding fields.</p>
2344 <p class="code">
2345 int httpGetLength (<br />
2346 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2347 );</p>
2348 <h4 class="parameters">Parameters</h4>
2349 <dl>
2350 <dt>http</dt>
2351 <dd class="description">HTTP connection</dd>
2352 </dl>
2353 <h4 class="returnvalue">Return Value</h4>
2354 <p class="description">Content length</p>
2355 <h4 class="discussion">Discussion</h4>
2356 <p class="discussion">This function is deprecated and will not return lengths larger than
2357 2^31 - 1; use httpGetLength2() instead.
2358
2359 </p>
2360 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpGetLength2">httpGetLength2</a></h3>
2361 <p class="description">Get the amount of data remaining from the
2362 content-length or transfer-encoding fields.</p>
2363 <p class="code">
2364 off_t httpGetLength2 (<br />
2365 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2366 );</p>
2367 <h4 class="parameters">Parameters</h4>
2368 <dl>
2369 <dt>http</dt>
2370 <dd class="description">HTTP connection</dd>
2371 </dl>
2372 <h4 class="returnvalue">Return Value</h4>
2373 <p class="description">Content length</p>
2374 <h4 class="discussion">Discussion</h4>
2375 <p class="discussion">This function returns the complete content length, even for
2376 content larger than 2^31 - 1.
2377
2378 </p>
2379 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpGetPending">httpGetPending</a></h3>
2380 <p class="description">Get the number of bytes that are buffered for writing.</p>
2381 <p class="code">
2382 size_t httpGetPending (<br />
2383 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2384 );</p>
2385 <h4 class="parameters">Parameters</h4>
2386 <dl>
2387 <dt>http</dt>
2388 <dd class="description">HTTP connection</dd>
2389 </dl>
2390 <h4 class="returnvalue">Return Value</h4>
2391 <p class="description">Number of bytes buffered</p>
2392 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpGetReady">httpGetReady</a></h3>
2393 <p class="description">Get the number of bytes that can be read without blocking.</p>
2394 <p class="code">
2395 size_t httpGetReady (<br />
2396 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2397 );</p>
2398 <h4 class="parameters">Parameters</h4>
2399 <dl>
2400 <dt>http</dt>
2401 <dd class="description">HTTP connection</dd>
2402 </dl>
2403 <h4 class="returnvalue">Return Value</h4>
2404 <p class="description">Number of bytes available</p>
2405 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpGetRemaining">httpGetRemaining</a></h3>
2406 <p class="description">Get the number of remaining bytes in the message
2407 body or current chunk.</p>
2408 <p class="code">
2409 size_t httpGetRemaining (<br />
2410 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2411 );</p>
2412 <h4 class="parameters">Parameters</h4>
2413 <dl>
2414 <dt>http</dt>
2415 <dd class="description">HTTP connection</dd>
2416 </dl>
2417 <h4 class="returnvalue">Return Value</h4>
2418 <p class="description">Remaining bytes</p>
2419 <h4 class="discussion">Discussion</h4>
2420 <p class="discussion">The <a href="#httpIsChunked"><code>httpIsChunked</code></a> function can be used to determine whether the
2421 message body is chunked or fixed-length.
2422
2423 </p>
2424 <h3 class="function"><a id="httpGetState">httpGetState</a></h3>
2425 <p class="description">Get the current state of the HTTP request.</p>
2426 <p class="code">
2427 <a href="#http_state_t">http_state_t</a> httpGetState (<br />
2428 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2429 );</p>
2430 <h4 class="parameters">Parameters</h4>
2431 <dl>
2432 <dt>http</dt>
2433 <dd class="description">HTTP connection</dd>
2434 </dl>
2435 <h4 class="returnvalue">Return Value</h4>
2436 <p class="description">HTTP state</p>
2437 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpGetStatus">httpGetStatus</a></h3>
2438 <p class="description">Get the status of the last HTTP request.</p>
2439 <p class="code">
2440 http_status_t httpGetStatus (<br />
2441 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2442 );</p>
2443 <h4 class="parameters">Parameters</h4>
2444 <dl>
2445 <dt>http</dt>
2446 <dd class="description">HTTP connection</dd>
2447 </dl>
2448 <h4 class="returnvalue">Return Value</h4>
2449 <p class="description">HTTP status</p>
2450 <h3 class="function"><span class="info">&#160;DEPRECATED&#160;</span><a id="httpGetSubField">httpGetSubField</a></h3>
2451 <p class="description">Get a sub-field value.</p>
2452 <p class="code">
2453 char *httpGetSubField (<br />
2454 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
2455 &#160;&#160;&#160;&#160;<a href="#http_field_t">http_field_t</a> field,<br />
2456 &#160;&#160;&#160;&#160;const char *name,<br />
2457 &#160;&#160;&#160;&#160;char *value<br />
2458 );</p>
2459 <h4 class="parameters">Parameters</h4>
2460 <dl>
2461 <dt>http</dt>
2462 <dd class="description">HTTP connection</dd>
2463 <dt>field</dt>
2464 <dd class="description">Field index</dd>
2465 <dt>name</dt>
2466 <dd class="description">Name of sub-field</dd>
2467 <dt>value</dt>
2468 <dd class="description">Value string</dd>
2469 </dl>
2470 <h4 class="returnvalue">Return Value</h4>
2471 <p class="description">Value or NULL</p>
2472 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpGetSubField2">httpGetSubField2</a></h3>
2473 <p class="description">Get a sub-field value.</p>
2474 <p class="code">
2475 char *httpGetSubField2 (<br />
2476 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
2477 &#160;&#160;&#160;&#160;<a href="#http_field_t">http_field_t</a> field,<br />
2478 &#160;&#160;&#160;&#160;const char *name,<br />
2479 &#160;&#160;&#160;&#160;char *value,<br />
2480 &#160;&#160;&#160;&#160;int valuelen<br />
2481 );</p>
2482 <h4 class="parameters">Parameters</h4>
2483 <dl>
2484 <dt>http</dt>
2485 <dd class="description">HTTP connection</dd>
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 <dt>valuelen</dt>
2493 <dd class="description">Size of value buffer</dd>
2494 </dl>
2495 <h4 class="returnvalue">Return Value</h4>
2496 <p class="description">Value or NULL</p>
2497 <h3 class="function"><a id="httpGetVersion">httpGetVersion</a></h3>
2498 <p class="description">Get the HTTP version at the other end.</p>
2499 <p class="code">
2500 <a href="#http_version_t">http_version_t</a> httpGetVersion (<br />
2501 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2502 );</p>
2503 <h4 class="parameters">Parameters</h4>
2504 <dl>
2505 <dt>http</dt>
2506 <dd class="description">HTTP connection</dd>
2507 </dl>
2508 <h4 class="returnvalue">Return Value</h4>
2509 <p class="description">Version number</p>
2510 <h3 class="function"><a id="httpGets">httpGets</a></h3>
2511 <p class="description">Get a line of text from a HTTP connection.</p>
2512 <p class="code">
2513 char *httpGets (<br />
2514 &#160;&#160;&#160;&#160;char *line,<br />
2515 &#160;&#160;&#160;&#160;int length,<br />
2516 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2517 );</p>
2518 <h4 class="parameters">Parameters</h4>
2519 <dl>
2520 <dt>line</dt>
2521 <dd class="description">Line to read into</dd>
2522 <dt>length</dt>
2523 <dd class="description">Max length of buffer</dd>
2524 <dt>http</dt>
2525 <dd class="description">HTTP connection</dd>
2526 </dl>
2527 <h4 class="returnvalue">Return Value</h4>
2528 <p class="description">Line or NULL</p>
2529 <h3 class="function"><a id="httpHead">httpHead</a></h3>
2530 <p class="description">Send a HEAD request to the server.</p>
2531 <p class="code">
2532 int httpHead (<br />
2533 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
2534 &#160;&#160;&#160;&#160;const char *uri<br />
2535 );</p>
2536 <h4 class="parameters">Parameters</h4>
2537 <dl>
2538 <dt>http</dt>
2539 <dd class="description">HTTP connection</dd>
2540 <dt>uri</dt>
2541 <dd class="description">URI for head</dd>
2542 </dl>
2543 <h4 class="returnvalue">Return Value</h4>
2544 <p class="description">Status of call (0 = success)</p>
2545 <h3 class="function"><a id="httpInitialize">httpInitialize</a></h3>
2546 <p class="description">Initialize the HTTP interface library and set the
2547 default HTTP proxy (if any).</p>
2548 <p class="code">
2549 void httpInitialize (void);</p>
2550 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpIsChunked">httpIsChunked</a></h3>
2551 <p class="description">Report whether a message body is chunked.</p>
2552 <p class="code">
2553 int httpIsChunked (<br />
2554 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2555 );</p>
2556 <h4 class="parameters">Parameters</h4>
2557 <dl>
2558 <dt>http</dt>
2559 <dd class="description">HTTP connection</dd>
2560 </dl>
2561 <h4 class="returnvalue">Return Value</h4>
2562 <p class="description">1 if chunked, 0 if not</p>
2563 <h4 class="discussion">Discussion</h4>
2564 <p class="discussion">This function returns non-zero if the message body is composed of
2565 variable-length chunks.
2566
2567 </p>
2568 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpIsEncrypted">httpIsEncrypted</a></h3>
2569 <p class="description">Report whether a connection is encrypted.</p>
2570 <p class="code">
2571 int httpIsEncrypted (<br />
2572 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2573 );</p>
2574 <h4 class="parameters">Parameters</h4>
2575 <dl>
2576 <dt>http</dt>
2577 <dd class="description">HTTP connection</dd>
2578 </dl>
2579 <h4 class="returnvalue">Return Value</h4>
2580 <p class="description">1 if encrypted, 0 if not</p>
2581 <h4 class="discussion">Discussion</h4>
2582 <p class="discussion">This function returns non-zero if the connection is currently encrypted.
2583
2584 </p>
2585 <h3 class="function"><a id="httpMD5">httpMD5</a></h3>
2586 <p class="description">Compute the MD5 sum of the username:group:password.</p>
2587 <p class="code">
2588 char *httpMD5 (<br />
2589 &#160;&#160;&#160;&#160;const char *username,<br />
2590 &#160;&#160;&#160;&#160;const char *realm,<br />
2591 &#160;&#160;&#160;&#160;const char *passwd,<br />
2592 &#160;&#160;&#160;&#160;char md5[33]<br />
2593 );</p>
2594 <h4 class="parameters">Parameters</h4>
2595 <dl>
2596 <dt>username</dt>
2597 <dd class="description">User name</dd>
2598 <dt>realm</dt>
2599 <dd class="description">Realm name</dd>
2600 <dt>passwd</dt>
2601 <dd class="description">Password string</dd>
2602 <dt>md5[33]</dt>
2603 <dd class="description">MD5 string</dd>
2604 </dl>
2605 <h4 class="returnvalue">Return Value</h4>
2606 <p class="description">MD5 sum</p>
2607 <h3 class="function"><a id="httpMD5Final">httpMD5Final</a></h3>
2608 <p class="description">Combine the MD5 sum of the username, group, and password
2609 with the server-supplied nonce value, method, and
2610 request-uri.</p>
2611 <p class="code">
2612 char *httpMD5Final (<br />
2613 &#160;&#160;&#160;&#160;const char *nonce,<br />
2614 &#160;&#160;&#160;&#160;const char *method,<br />
2615 &#160;&#160;&#160;&#160;const char *resource,<br />
2616 &#160;&#160;&#160;&#160;char md5[33]<br />
2617 );</p>
2618 <h4 class="parameters">Parameters</h4>
2619 <dl>
2620 <dt>nonce</dt>
2621 <dd class="description">Server nonce value</dd>
2622 <dt>method</dt>
2623 <dd class="description">METHOD (GET, POST, etc.)</dd>
2624 <dt>resource</dt>
2625 <dd class="description">Resource path</dd>
2626 <dt>md5[33]</dt>
2627 <dd class="description">MD5 sum</dd>
2628 </dl>
2629 <h4 class="returnvalue">Return Value</h4>
2630 <p class="description">New sum</p>
2631 <h3 class="function"><a id="httpMD5String">httpMD5String</a></h3>
2632 <p class="description">Convert an MD5 sum to a character string.</p>
2633 <p class="code">
2634 char *httpMD5String (<br />
2635 &#160;&#160;&#160;&#160;const unsigned char *sum,<br />
2636 &#160;&#160;&#160;&#160;char md5[33]<br />
2637 );</p>
2638 <h4 class="parameters">Parameters</h4>
2639 <dl>
2640 <dt>sum</dt>
2641 <dd class="description">MD5 sum data</dd>
2642 <dt>md5[33]</dt>
2643 <dd class="description">MD5 sum in hex</dd>
2644 </dl>
2645 <h4 class="returnvalue">Return Value</h4>
2646 <p class="description">MD5 sum in hex</p>
2647 <h3 class="function"><a id="httpOptions">httpOptions</a></h3>
2648 <p class="description">Send an OPTIONS request to the server.</p>
2649 <p class="code">
2650 int httpOptions (<br />
2651 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
2652 &#160;&#160;&#160;&#160;const char *uri<br />
2653 );</p>
2654 <h4 class="parameters">Parameters</h4>
2655 <dl>
2656 <dt>http</dt>
2657 <dd class="description">HTTP connection</dd>
2658 <dt>uri</dt>
2659 <dd class="description">URI for options</dd>
2660 </dl>
2661 <h4 class="returnvalue">Return Value</h4>
2662 <p class="description">Status of call (0 = success)</p>
2663 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpPeek">httpPeek</a></h3>
2664 <p class="description">Peek at data from a HTTP connection.</p>
2665 <p class="code">
2666 ssize_t httpPeek (<br />
2667 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
2668 &#160;&#160;&#160;&#160;char *buffer,<br />
2669 &#160;&#160;&#160;&#160;size_t length<br />
2670 );</p>
2671 <h4 class="parameters">Parameters</h4>
2672 <dl>
2673 <dt>http</dt>
2674 <dd class="description">HTTP connection</dd>
2675 <dt>buffer</dt>
2676 <dd class="description">Buffer for data</dd>
2677 <dt>length</dt>
2678 <dd class="description">Maximum number of bytes</dd>
2679 </dl>
2680 <h4 class="returnvalue">Return Value</h4>
2681 <p class="description">Number of bytes copied</p>
2682 <h4 class="discussion">Discussion</h4>
2683 <p class="discussion">This function copies available data from the given HTTP connection, reading
2684 a buffer as needed. The data is still available for reading using
2685 <a href="#httpRead"><code>httpRead</code></a> or <a href="#httpRead2"><code>httpRead2</code></a>.<br>
2686 <br>
2687 For non-blocking connections the usual timeouts apply.
2688
2689 </p>
2690 <h3 class="function"><a id="httpPost">httpPost</a></h3>
2691 <p class="description">Send a POST request to the server.</p>
2692 <p class="code">
2693 int httpPost (<br />
2694 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
2695 &#160;&#160;&#160;&#160;const char *uri<br />
2696 );</p>
2697 <h4 class="parameters">Parameters</h4>
2698 <dl>
2699 <dt>http</dt>
2700 <dd class="description">HTTP connection</dd>
2701 <dt>uri</dt>
2702 <dd class="description">URI for post</dd>
2703 </dl>
2704 <h4 class="returnvalue">Return Value</h4>
2705 <p class="description">Status of call (0 = success)</p>
2706 <h3 class="function"><a id="httpPut">httpPut</a></h3>
2707 <p class="description">Send a PUT request to the server.</p>
2708 <p class="code">
2709 int httpPut (<br />
2710 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
2711 &#160;&#160;&#160;&#160;const char *uri<br />
2712 );</p>
2713 <h4 class="parameters">Parameters</h4>
2714 <dl>
2715 <dt>http</dt>
2716 <dd class="description">HTTP connection</dd>
2717 <dt>uri</dt>
2718 <dd class="description">URI to put</dd>
2719 </dl>
2720 <h4 class="returnvalue">Return Value</h4>
2721 <p class="description">Status of call (0 = success)</p>
2722 <h3 class="function"><span class="info">&#160;DEPRECATED&#160;</span><a id="httpRead">httpRead</a></h3>
2723 <p class="description">Read data from a HTTP connection.</p>
2724 <p class="code">
2725 int httpRead (<br />
2726 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
2727 &#160;&#160;&#160;&#160;char *buffer,<br />
2728 &#160;&#160;&#160;&#160;int length<br />
2729 );</p>
2730 <h4 class="parameters">Parameters</h4>
2731 <dl>
2732 <dt>http</dt>
2733 <dd class="description">HTTP connection</dd>
2734 <dt>buffer</dt>
2735 <dd class="description">Buffer for data</dd>
2736 <dt>length</dt>
2737 <dd class="description">Maximum number of bytes</dd>
2738 </dl>
2739 <h4 class="returnvalue">Return Value</h4>
2740 <p class="description">Number of bytes read</p>
2741 <h4 class="discussion">Discussion</h4>
2742 <p class="discussion">This function is deprecated. Use the httpRead2() function which can
2743 read more than 2GB of data.
2744
2745 </p>
2746 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpRead2">httpRead2</a></h3>
2747 <p class="description">Read data from a HTTP connection.</p>
2748 <p class="code">
2749 ssize_t httpRead2 (<br />
2750 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
2751 &#160;&#160;&#160;&#160;char *buffer,<br />
2752 &#160;&#160;&#160;&#160;size_t length<br />
2753 );</p>
2754 <h4 class="parameters">Parameters</h4>
2755 <dl>
2756 <dt>http</dt>
2757 <dd class="description">HTTP connection</dd>
2758 <dt>buffer</dt>
2759 <dd class="description">Buffer for data</dd>
2760 <dt>length</dt>
2761 <dd class="description">Maximum number of bytes</dd>
2762 </dl>
2763 <h4 class="returnvalue">Return Value</h4>
2764 <p class="description">Number of bytes read</p>
2765 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpReadRequest">httpReadRequest</a></h3>
2766 <p class="description">Read a HTTP request from a connection.</p>
2767 <p class="code">
2768 <a href="#http_state_t">http_state_t</a> httpReadRequest (<br />
2769 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
2770 &#160;&#160;&#160;&#160;char *uri,<br />
2771 &#160;&#160;&#160;&#160;size_t urilen<br />
2772 );</p>
2773 <h4 class="parameters">Parameters</h4>
2774 <dl>
2775 <dt>http</dt>
2776 <dd class="description">HTTP connection</dd>
2777 <dt>uri</dt>
2778 <dd class="description">URI buffer</dd>
2779 <dt>urilen</dt>
2780 <dd class="description">Size of URI buffer</dd>
2781 </dl>
2782 <h4 class="returnvalue">Return Value</h4>
2783 <p class="description">New state of connection</p>
2784 <h3 class="function"><span class="info">&#160;DEPRECATED&#160;</span><a id="httpReconnect">httpReconnect</a></h3>
2785 <p class="description">Reconnect to a HTTP server.</p>
2786 <p class="code">
2787 int httpReconnect (<br />
2788 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
2789 );</p>
2790 <h4 class="parameters">Parameters</h4>
2791 <dl>
2792 <dt>http</dt>
2793 <dd class="description">HTTP connection</dd>
2794 </dl>
2795 <h4 class="returnvalue">Return Value</h4>
2796 <p class="description">0 on success, non-zero on failure</p>
2797 <h4 class="discussion">Discussion</h4>
2798 <p class="discussion">This function is deprecated. Please use the <a href="#httpReconnect2"><code>httpReconnect2</code></a> function
2799 instead.
2800
2801 </p>
2802 <h3 class="function"><a id="httpReconnect2">httpReconnect2</a></h3>
2803 <p class="description">Reconnect to a HTTP server with timeout and optional
2804 cancel.</p>
2805 <p class="code">
2806 int httpReconnect2 (<br />
2807 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
2808 &#160;&#160;&#160;&#160;int msec,<br />
2809 &#160;&#160;&#160;&#160;int *cancel<br />
2810 );</p>
2811 <h4 class="parameters">Parameters</h4>
2812 <dl>
2813 <dt>http</dt>
2814 <dd class="description">HTTP connection</dd>
2815 <dt>msec</dt>
2816 <dd class="description">Timeout in milliseconds</dd>
2817 <dt>cancel</dt>
2818 <dd class="description">Pointer to &quot;cancel&quot; variable</dd>
2819 </dl>
2820 <h4 class="returnvalue">Return Value</h4>
2821 <p class="description">0 on success, non-zero on failure</p>
2822 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpResolveHostname">httpResolveHostname</a></h3>
2823 <p class="description">Resolve the hostname of the HTTP connection
2824 address.</p>
2825 <p class="code">
2826 const char *httpResolveHostname (<br />
2827 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
2828 &#160;&#160;&#160;&#160;char *buffer,<br />
2829 &#160;&#160;&#160;&#160;size_t bufsize<br />
2830 );</p>
2831 <h4 class="parameters">Parameters</h4>
2832 <dl>
2833 <dt>http</dt>
2834 <dd class="description">HTTP connection</dd>
2835 <dt>buffer</dt>
2836 <dd class="description">Hostname buffer</dd>
2837 <dt>bufsize</dt>
2838 <dd class="description">Size of buffer</dd>
2839 </dl>
2840 <h4 class="returnvalue">Return Value</h4>
2841 <p class="description">Resolved hostname or <code>NULL</code></p>
2842 <h3 class="function"><span class="info">&#160;DEPRECATED&#160;</span><a id="httpSeparate">httpSeparate</a></h3>
2843 <p class="description">Separate a Universal Resource Identifier into its
2844 components.</p>
2845 <p class="code">
2846 void httpSeparate (<br />
2847 &#160;&#160;&#160;&#160;const char *uri,<br />
2848 &#160;&#160;&#160;&#160;char *scheme,<br />
2849 &#160;&#160;&#160;&#160;char *username,<br />
2850 &#160;&#160;&#160;&#160;char *host,<br />
2851 &#160;&#160;&#160;&#160;int *port,<br />
2852 &#160;&#160;&#160;&#160;char *resource<br />
2853 );</p>
2854 <h4 class="parameters">Parameters</h4>
2855 <dl>
2856 <dt>uri</dt>
2857 <dd class="description">Universal Resource Identifier</dd>
2858 <dt>scheme</dt>
2859 <dd class="description">Scheme [32] (http, https, etc.)</dd>
2860 <dt>username</dt>
2861 <dd class="description">Username [1024]</dd>
2862 <dt>host</dt>
2863 <dd class="description">Hostname [1024]</dd>
2864 <dt>port</dt>
2865 <dd class="description">Port number to use</dd>
2866 <dt>resource</dt>
2867 <dd class="description">Resource/filename [1024]</dd>
2868 </dl>
2869 <h4 class="discussion">Discussion</h4>
2870 <p class="discussion">This function is deprecated; use the httpSeparateURI() function instead.
2871
2872 </p>
2873 <h3 class="function"><span class="info">&#160;CUPS 1.1.21/macOS 10.4&#160;</span><a id="httpSeparate2">httpSeparate2</a></h3>
2874 <p class="description">Separate a Universal Resource Identifier into its
2875 components.</p>
2876 <p class="code">
2877 void httpSeparate2 (<br />
2878 &#160;&#160;&#160;&#160;const char *uri,<br />
2879 &#160;&#160;&#160;&#160;char *scheme,<br />
2880 &#160;&#160;&#160;&#160;int schemelen,<br />
2881 &#160;&#160;&#160;&#160;char *username,<br />
2882 &#160;&#160;&#160;&#160;int usernamelen,<br />
2883 &#160;&#160;&#160;&#160;char *host,<br />
2884 &#160;&#160;&#160;&#160;int hostlen,<br />
2885 &#160;&#160;&#160;&#160;int *port,<br />
2886 &#160;&#160;&#160;&#160;char *resource,<br />
2887 &#160;&#160;&#160;&#160;int resourcelen<br />
2888 );</p>
2889 <h4 class="parameters">Parameters</h4>
2890 <dl>
2891 <dt>uri</dt>
2892 <dd class="description">Universal Resource Identifier</dd>
2893 <dt>scheme</dt>
2894 <dd class="description">Scheme (http, https, etc.)</dd>
2895 <dt>schemelen</dt>
2896 <dd class="description">Size of scheme buffer</dd>
2897 <dt>username</dt>
2898 <dd class="description">Username</dd>
2899 <dt>usernamelen</dt>
2900 <dd class="description">Size of username buffer</dd>
2901 <dt>host</dt>
2902 <dd class="description">Hostname</dd>
2903 <dt>hostlen</dt>
2904 <dd class="description">Size of hostname buffer</dd>
2905 <dt>port</dt>
2906 <dd class="description">Port number to use</dd>
2907 <dt>resource</dt>
2908 <dd class="description">Resource/filename</dd>
2909 <dt>resourcelen</dt>
2910 <dd class="description">Size of resource buffer</dd>
2911 </dl>
2912 <h4 class="discussion">Discussion</h4>
2913 <p class="discussion">This function is deprecated; use the httpSeparateURI() function instead.
2914
2915
2916 </p>
2917 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpSeparateURI">httpSeparateURI</a></h3>
2918 <p class="description">Separate a Universal Resource Identifier into its
2919 components.</p>
2920 <p class="code">
2921 <a href="#http_uri_status_t">http_uri_status_t</a> httpSeparateURI (<br />
2922 &#160;&#160;&#160;&#160;<a href="#http_uri_coding_t">http_uri_coding_t</a> decoding,<br />
2923 &#160;&#160;&#160;&#160;const char *uri,<br />
2924 &#160;&#160;&#160;&#160;char *scheme,<br />
2925 &#160;&#160;&#160;&#160;int schemelen,<br />
2926 &#160;&#160;&#160;&#160;char *username,<br />
2927 &#160;&#160;&#160;&#160;int usernamelen,<br />
2928 &#160;&#160;&#160;&#160;char *host,<br />
2929 &#160;&#160;&#160;&#160;int hostlen,<br />
2930 &#160;&#160;&#160;&#160;int *port,<br />
2931 &#160;&#160;&#160;&#160;char *resource,<br />
2932 &#160;&#160;&#160;&#160;int resourcelen<br />
2933 );</p>
2934 <h4 class="parameters">Parameters</h4>
2935 <dl>
2936 <dt>decoding</dt>
2937 <dd class="description">Decoding flags</dd>
2938 <dt>uri</dt>
2939 <dd class="description">Universal Resource Identifier</dd>
2940 <dt>scheme</dt>
2941 <dd class="description">Scheme (http, https, etc.)</dd>
2942 <dt>schemelen</dt>
2943 <dd class="description">Size of scheme buffer</dd>
2944 <dt>username</dt>
2945 <dd class="description">Username</dd>
2946 <dt>usernamelen</dt>
2947 <dd class="description">Size of username buffer</dd>
2948 <dt>host</dt>
2949 <dd class="description">Hostname</dd>
2950 <dt>hostlen</dt>
2951 <dd class="description">Size of hostname buffer</dd>
2952 <dt>port</dt>
2953 <dd class="description">Port number to use</dd>
2954 <dt>resource</dt>
2955 <dd class="description">Resource/filename</dd>
2956 <dt>resourcelen</dt>
2957 <dd class="description">Size of resource buffer</dd>
2958 </dl>
2959 <h4 class="returnvalue">Return Value</h4>
2960 <p class="description">Result of separation</p>
2961 <h3 class="function"><span class="info">&#160;CUPS 1.3/macOS 10.5&#160;</span><a id="httpSetAuthString">httpSetAuthString</a></h3>
2962 <p class="description">Set the current authorization string.</p>
2963 <p class="code">
2964 void httpSetAuthString (<br />
2965 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
2966 &#160;&#160;&#160;&#160;const char *scheme,<br />
2967 &#160;&#160;&#160;&#160;const char *data<br />
2968 );</p>
2969 <h4 class="parameters">Parameters</h4>
2970 <dl>
2971 <dt>http</dt>
2972 <dd class="description">HTTP connection</dd>
2973 <dt>scheme</dt>
2974 <dd class="description">Auth scheme (NULL to clear it)</dd>
2975 <dt>data</dt>
2976 <dd class="description">Auth data (NULL for none)</dd>
2977 </dl>
2978 <h4 class="discussion">Discussion</h4>
2979 <p class="discussion">This function just stores a copy of the current authorization string in
2980 the HTTP connection object. You must still call httpSetField() to set
2981 HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
2982 httpHead(), httpOptions(), httpPost, or httpPut().
2983
2984 </p>
2985 <h3 class="function"><span class="info">&#160;CUPS 1.1.19/macOS 10.3&#160;</span><a id="httpSetCookie">httpSetCookie</a></h3>
2986 <p class="description">Set the cookie value(s).</p>
2987 <p class="code">
2988 void httpSetCookie (<br />
2989 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
2990 &#160;&#160;&#160;&#160;const char *cookie<br />
2991 );</p>
2992 <h4 class="parameters">Parameters</h4>
2993 <dl>
2994 <dt>http</dt>
2995 <dd class="description">Connection</dd>
2996 <dt>cookie</dt>
2997 <dd class="description">Cookie string</dd>
2998 </dl>
2999 <h3 class="function"><span class="info">&#160;CUPS 1.5/macOS 10.7&#160;</span><a id="httpSetCredentials">httpSetCredentials</a></h3>
3000 <p class="description">Set the credentials associated with an encrypted
3001 connection.</p>
3002 <p class="code">
3003 int httpSetCredentials (<br />
3004 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
3005 &#160;&#160;&#160;&#160;cups_array_t *credentials<br />
3006 );</p>
3007 <h4 class="parameters">Parameters</h4>
3008 <dl>
3009 <dt>http</dt>
3010 <dd class="description">HTTP connection</dd>
3011 <dt>credentials</dt>
3012 <dd class="description">Array of credentials</dd>
3013 </dl>
3014 <h4 class="returnvalue">Return Value</h4>
3015 <p class="description">Status of call (0 = success)</p>
3016 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpSetDefaultField">httpSetDefaultField</a></h3>
3017 <p class="description">Set the default value of an HTTP header.</p>
3018 <p class="code">
3019 void httpSetDefaultField (<br />
3020 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
3021 &#160;&#160;&#160;&#160;<a href="#http_field_t">http_field_t</a> field,<br />
3022 &#160;&#160;&#160;&#160;const char *value<br />
3023 );</p>
3024 <h4 class="parameters">Parameters</h4>
3025 <dl>
3026 <dt>http</dt>
3027 <dd class="description">HTTP connection</dd>
3028 <dt>field</dt>
3029 <dd class="description">Field index</dd>
3030 <dt>value</dt>
3031 <dd class="description">Value</dd>
3032 </dl>
3033 <h4 class="discussion">Discussion</h4>
3034 <p class="discussion">Currently only <code>HTTP_FIELD_ACCEPT_ENCODING</code>, <code>HTTP_FIELD_SERVER</code>,
3035 and <code>HTTP_FIELD_USER_AGENT</code> can be set.
3036
3037 </p>
3038 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpSetExpect">httpSetExpect</a></h3>
3039 <p class="description">Set the Expect: header in a request.</p>
3040 <p class="code">
3041 void httpSetExpect (<br />
3042 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
3043 &#160;&#160;&#160;&#160;http_status_t expect<br />
3044 );</p>
3045 <h4 class="parameters">Parameters</h4>
3046 <dl>
3047 <dt>http</dt>
3048 <dd class="description">HTTP connection</dd>
3049 <dt>expect</dt>
3050 <dd class="description">HTTP status to expect
3051 (<code>HTTP_STATUS_CONTINUE</code>)</dd>
3052 </dl>
3053 <h4 class="discussion">Discussion</h4>
3054 <p class="discussion">Currently only <code>HTTP_STATUS_CONTINUE</code> is supported for the &quot;expect&quot;
3055 argument.
3056
3057 </p>
3058 <h3 class="function"><a id="httpSetField">httpSetField</a></h3>
3059 <p class="description">Set the value of an HTTP header.</p>
3060 <p class="code">
3061 void httpSetField (<br />
3062 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
3063 &#160;&#160;&#160;&#160;<a href="#http_field_t">http_field_t</a> field,<br />
3064 &#160;&#160;&#160;&#160;const char *value<br />
3065 );</p>
3066 <h4 class="parameters">Parameters</h4>
3067 <dl>
3068 <dt>http</dt>
3069 <dd class="description">HTTP connection</dd>
3070 <dt>field</dt>
3071 <dd class="description">Field index</dd>
3072 <dt>value</dt>
3073 <dd class="description">Value</dd>
3074 </dl>
3075 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpSetKeepAlive">httpSetKeepAlive</a></h3>
3076 <p class="description">Set the current Keep-Alive state of a connection.</p>
3077 <p class="code">
3078 void httpSetKeepAlive (<br />
3079 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
3080 &#160;&#160;&#160;&#160;<a href="#http_keepalive_t">http_keepalive_t</a> keep_alive<br />
3081 );</p>
3082 <h4 class="parameters">Parameters</h4>
3083 <dl>
3084 <dt>http</dt>
3085 <dd class="description">HTTP connection</dd>
3086 <dt>keep_alive</dt>
3087 <dd class="description">New Keep-Alive value</dd>
3088 </dl>
3089 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpSetLength">httpSetLength</a></h3>
3090 <p class="description">Set the content-length and content-encoding.</p>
3091 <p class="code">
3092 void httpSetLength (<br />
3093 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
3094 &#160;&#160;&#160;&#160;size_t length<br />
3095 );</p>
3096 <h4 class="parameters">Parameters</h4>
3097 <dl>
3098 <dt>http</dt>
3099 <dd class="description">HTTP connection</dd>
3100 <dt>length</dt>
3101 <dd class="description">Length (0 for chunked)</dd>
3102 </dl>
3103 <h3 class="function"><span class="info">&#160;CUPS 1.5/macOS 10.7&#160;</span><a id="httpSetTimeout">httpSetTimeout</a></h3>
3104 <p class="description">Set read/write timeouts and an optional callback.</p>
3105 <p class="code">
3106 void httpSetTimeout (<br />
3107 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
3108 &#160;&#160;&#160;&#160;double timeout,<br />
3109 &#160;&#160;&#160;&#160;<a href="#http_timeout_cb_t">http_timeout_cb_t</a> cb,<br />
3110 &#160;&#160;&#160;&#160;void *user_data<br />
3111 );</p>
3112 <h4 class="parameters">Parameters</h4>
3113 <dl>
3114 <dt>http</dt>
3115 <dd class="description">HTTP connection</dd>
3116 <dt>timeout</dt>
3117 <dd class="description">Number of seconds for timeout,
3118 must be greater than 0</dd>
3119 <dt>cb</dt>
3120 <dd class="description">Callback function or NULL</dd>
3121 <dt>user_data</dt>
3122 <dd class="description">User data pointer</dd>
3123 </dl>
3124 <h4 class="discussion">Discussion</h4>
3125 <p class="discussion">The optional timeout callback receives both the HTTP connection and a user
3126 data pointer and must return 1 to continue or 0 to error (time) out.
3127
3128 </p>
3129 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpShutdown">httpShutdown</a></h3>
3130 <p class="description">Shutdown one side of an HTTP connection.</p>
3131 <p class="code">
3132 void httpShutdown (<br />
3133 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
3134 );</p>
3135 <h4 class="parameters">Parameters</h4>
3136 <dl>
3137 <dt>http</dt>
3138 <dd class="description">HTTP connection</dd>
3139 </dl>
3140 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpStateString">httpStateString</a></h3>
3141 <p class="description">Return the string describing a HTTP state value.</p>
3142 <p class="code">
3143 const char *httpStateString (<br />
3144 &#160;&#160;&#160;&#160;<a href="#http_state_t">http_state_t</a> state<br />
3145 );</p>
3146 <h4 class="parameters">Parameters</h4>
3147 <dl>
3148 <dt>state</dt>
3149 <dd class="description">HTTP state value</dd>
3150 </dl>
3151 <h4 class="returnvalue">Return Value</h4>
3152 <p class="description">State string</p>
3153 <h3 class="function"><a id="httpStatus">httpStatus</a></h3>
3154 <p class="description">Return a short string describing a HTTP status code.</p>
3155 <p class="code">
3156 const char *httpStatus (<br />
3157 &#160;&#160;&#160;&#160;http_status_t status<br />
3158 );</p>
3159 <h4 class="parameters">Parameters</h4>
3160 <dl>
3161 <dt>status</dt>
3162 <dd class="description">HTTP status code</dd>
3163 </dl>
3164 <h4 class="returnvalue">Return Value</h4>
3165 <p class="description">Localized status string</p>
3166 <h4 class="discussion">Discussion</h4>
3167 <p class="discussion">The returned string is localized to the current POSIX locale and is based
3168 on the status strings defined in RFC 2616.</p>
3169 <h3 class="function"><a id="httpTrace">httpTrace</a></h3>
3170 <p class="description">Send an TRACE request to the server.</p>
3171 <p class="code">
3172 int httpTrace (<br />
3173 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
3174 &#160;&#160;&#160;&#160;const char *uri<br />
3175 );</p>
3176 <h4 class="parameters">Parameters</h4>
3177 <dl>
3178 <dt>http</dt>
3179 <dd class="description">HTTP connection</dd>
3180 <dt>uri</dt>
3181 <dd class="description">URI for trace</dd>
3182 </dl>
3183 <h4 class="returnvalue">Return Value</h4>
3184 <p class="description">Status of call (0 = success)</p>
3185 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpURIStatusString">httpURIStatusString</a></h3>
3186 <p class="description">Return a string describing a URI status code.</p>
3187 <p class="code">
3188 const char *httpURIStatusString (<br />
3189 &#160;&#160;&#160;&#160;<a href="#http_uri_status_t">http_uri_status_t</a> status<br />
3190 );</p>
3191 <h4 class="parameters">Parameters</h4>
3192 <dl>
3193 <dt>status</dt>
3194 <dd class="description">URI status code</dd>
3195 </dl>
3196 <h4 class="returnvalue">Return Value</h4>
3197 <p class="description">Localized status string</p>
3198 <h3 class="function"><a id="httpUpdate">httpUpdate</a></h3>
3199 <p class="description">Update the current HTTP state for incoming data.</p>
3200 <p class="code">
3201 http_status_t httpUpdate (<br />
3202 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br />
3203 );</p>
3204 <h4 class="parameters">Parameters</h4>
3205 <dl>
3206 <dt>http</dt>
3207 <dd class="description">HTTP connection</dd>
3208 </dl>
3209 <h4 class="returnvalue">Return Value</h4>
3210 <p class="description">HTTP status</p>
3211 <h3 class="function"><span class="info">&#160;CUPS 1.1.19/macOS 10.3&#160;</span><a id="httpWait">httpWait</a></h3>
3212 <p class="description">Wait for data available on a connection.</p>
3213 <p class="code">
3214 int httpWait (<br />
3215 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
3216 &#160;&#160;&#160;&#160;int msec<br />
3217 );</p>
3218 <h4 class="parameters">Parameters</h4>
3219 <dl>
3220 <dt>http</dt>
3221 <dd class="description">HTTP connection</dd>
3222 <dt>msec</dt>
3223 <dd class="description">Milliseconds to wait</dd>
3224 </dl>
3225 <h4 class="returnvalue">Return Value</h4>
3226 <p class="description">1 if data is available, 0 otherwise</p>
3227 <h3 class="function"><span class="info">&#160;DEPRECATED&#160;</span><a id="httpWrite">httpWrite</a></h3>
3228 <p class="description">Write data to a HTTP connection.</p>
3229 <p class="code">
3230 int httpWrite (<br />
3231 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
3232 &#160;&#160;&#160;&#160;const char *buffer,<br />
3233 &#160;&#160;&#160;&#160;int length<br />
3234 );</p>
3235 <h4 class="parameters">Parameters</h4>
3236 <dl>
3237 <dt>http</dt>
3238 <dd class="description">HTTP connection</dd>
3239 <dt>buffer</dt>
3240 <dd class="description">Buffer for data</dd>
3241 <dt>length</dt>
3242 <dd class="description">Number of bytes to write</dd>
3243 </dl>
3244 <h4 class="returnvalue">Return Value</h4>
3245 <p class="description">Number of bytes written</p>
3246 <h4 class="discussion">Discussion</h4>
3247 <p class="discussion">This function is deprecated. Use the httpWrite2() function which can
3248 write more than 2GB of data.
3249
3250 </p>
3251 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpWrite2">httpWrite2</a></h3>
3252 <p class="description">Write data to a HTTP connection.</p>
3253 <p class="code">
3254 ssize_t httpWrite2 (<br />
3255 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
3256 &#160;&#160;&#160;&#160;const char *buffer,<br />
3257 &#160;&#160;&#160;&#160;size_t length<br />
3258 );</p>
3259 <h4 class="parameters">Parameters</h4>
3260 <dl>
3261 <dt>http</dt>
3262 <dd class="description">HTTP connection</dd>
3263 <dt>buffer</dt>
3264 <dd class="description">Buffer for data</dd>
3265 <dt>length</dt>
3266 <dd class="description">Number of bytes to write</dd>
3267 </dl>
3268 <h4 class="returnvalue">Return Value</h4>
3269 <p class="description">Number of bytes written</p>
3270 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpWriteResponse">httpWriteResponse</a></h3>
3271 <p class="description">Write a HTTP response to a client connection.</p>
3272 <p class="code">
3273 int httpWriteResponse (<br />
3274 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
3275 &#160;&#160;&#160;&#160;http_status_t status<br />
3276 );</p>
3277 <h4 class="parameters">Parameters</h4>
3278 <dl>
3279 <dt>http</dt>
3280 <dd class="description">HTTP connection</dd>
3281 <dt>status</dt>
3282 <dd class="description">Status code</dd>
3283 </dl>
3284 <h4 class="returnvalue">Return Value</h4>
3285 <p class="description">0 on success, -1 on error</p>
3286 <h3 class="function"><a id="ippAddBoolean">ippAddBoolean</a></h3>
3287 <p class="description">Add a boolean attribute to an IPP message.</p>
3288 <p class="code">
3289 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddBoolean (<br />
3290 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
3291 &#160;&#160;&#160;&#160;ipp_tag_t group,<br />
3292 &#160;&#160;&#160;&#160;const char *name,<br />
3293 &#160;&#160;&#160;&#160;char value<br />
3294 );</p>
3295 <h4 class="parameters">Parameters</h4>
3296 <dl>
3297 <dt>ipp</dt>
3298 <dd class="description">IPP message</dd>
3299 <dt>group</dt>
3300 <dd class="description">IPP group</dd>
3301 <dt>name</dt>
3302 <dd class="description">Name of attribute</dd>
3303 <dt>value</dt>
3304 <dd class="description">Value of attribute</dd>
3305 </dl>
3306 <h4 class="returnvalue">Return Value</h4>
3307 <p class="description">New attribute</p>
3308 <h4 class="discussion">Discussion</h4>
3309 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3310 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>
3311 <br>
3312 The <code>group</code> parameter specifies the IPP attribute group tag: none
3313 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3314 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3315 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3316 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
3317 <h3 class="function"><a id="ippAddBooleans">ippAddBooleans</a></h3>
3318 <p class="description">Add an array of boolean values.</p>
3319 <p class="code">
3320 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddBooleans (<br />
3321 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
3322 &#160;&#160;&#160;&#160;ipp_tag_t group,<br />
3323 &#160;&#160;&#160;&#160;const char *name,<br />
3324 &#160;&#160;&#160;&#160;int num_values,<br />
3325 &#160;&#160;&#160;&#160;const char *values<br />
3326 );</p>
3327 <h4 class="parameters">Parameters</h4>
3328 <dl>
3329 <dt>ipp</dt>
3330 <dd class="description">IPP message</dd>
3331 <dt>group</dt>
3332 <dd class="description">IPP group</dd>
3333 <dt>name</dt>
3334 <dd class="description">Name of attribute</dd>
3335 <dt>num_values</dt>
3336 <dd class="description">Number of values</dd>
3337 <dt>values</dt>
3338 <dd class="description">Values</dd>
3339 </dl>
3340 <h4 class="returnvalue">Return Value</h4>
3341 <p class="description">New attribute</p>
3342 <h4 class="discussion">Discussion</h4>
3343 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3344 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>
3345 <br>
3346 The <code>group</code> parameter specifies the IPP attribute group tag: none
3347 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3348 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3349 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3350 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
3351 <h3 class="function"><span class="info">&#160;CUPS 1.1.19/macOS 10.3&#160;</span><a id="ippAddCollection">ippAddCollection</a></h3>
3352 <p class="description">Add a collection value.</p>
3353 <p class="code">
3354 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddCollection (<br />
3355 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
3356 &#160;&#160;&#160;&#160;ipp_tag_t group,<br />
3357 &#160;&#160;&#160;&#160;const char *name,<br />
3358 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *value<br />
3359 );</p>
3360 <h4 class="parameters">Parameters</h4>
3361 <dl>
3362 <dt>ipp</dt>
3363 <dd class="description">IPP message</dd>
3364 <dt>group</dt>
3365 <dd class="description">IPP group</dd>
3366 <dt>name</dt>
3367 <dd class="description">Name of attribute</dd>
3368 <dt>value</dt>
3369 <dd class="description">Value</dd>
3370 </dl>
3371 <h4 class="returnvalue">Return Value</h4>
3372 <p class="description">New attribute</p>
3373 <h4 class="discussion">Discussion</h4>
3374 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3375 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>
3376 <br>
3377 The <code>group</code> parameter specifies the IPP attribute group tag: none
3378 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3379 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3380 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3381 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).
3382
3383 </p>
3384 <h3 class="function"><span class="info">&#160;CUPS 1.1.19/macOS 10.3&#160;</span><a id="ippAddCollections">ippAddCollections</a></h3>
3385 <p class="description">Add an array of collection values.</p>
3386 <p class="code">
3387 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddCollections (<br />
3388 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
3389 &#160;&#160;&#160;&#160;ipp_tag_t group,<br />
3390 &#160;&#160;&#160;&#160;const char *name,<br />
3391 &#160;&#160;&#160;&#160;int num_values,<br />
3392 &#160;&#160;&#160;&#160;const <a href="#ipp_t">ipp_t</a> **values<br />
3393 );</p>
3394 <h4 class="parameters">Parameters</h4>
3395 <dl>
3396 <dt>ipp</dt>
3397 <dd class="description">IPP message</dd>
3398 <dt>group</dt>
3399 <dd class="description">IPP group</dd>
3400 <dt>name</dt>
3401 <dd class="description">Name of attribute</dd>
3402 <dt>num_values</dt>
3403 <dd class="description">Number of values</dd>
3404 <dt>values</dt>
3405 <dd class="description">Values</dd>
3406 </dl>
3407 <h4 class="returnvalue">Return Value</h4>
3408 <p class="description">New attribute</p>
3409 <h4 class="discussion">Discussion</h4>
3410 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3411 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>
3412 <br>
3413 The <code>group</code> parameter specifies the IPP attribute group tag: none
3414 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3415 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3416 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3417 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).
3418
3419 </p>
3420 <h3 class="function"><a id="ippAddDate">ippAddDate</a></h3>
3421 <p class="description">Add a date attribute to an IPP message.</p>
3422 <p class="code">
3423 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddDate (<br />
3424 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
3425 &#160;&#160;&#160;&#160;ipp_tag_t group,<br />
3426 &#160;&#160;&#160;&#160;const char *name,<br />
3427 &#160;&#160;&#160;&#160;const <a href="#ipp_uchar_t">ipp_uchar_t</a> *value<br />
3428 );</p>
3429 <h4 class="parameters">Parameters</h4>
3430 <dl>
3431 <dt>ipp</dt>
3432 <dd class="description">IPP message</dd>
3433 <dt>group</dt>
3434 <dd class="description">IPP group</dd>
3435 <dt>name</dt>
3436 <dd class="description">Name of attribute</dd>
3437 <dt>value</dt>
3438 <dd class="description">Value</dd>
3439 </dl>
3440 <h4 class="returnvalue">Return Value</h4>
3441 <p class="description">New attribute</p>
3442 <h4 class="discussion">Discussion</h4>
3443 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3444 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>
3445 <br>
3446 The <code>group</code> parameter specifies the IPP attribute group tag: none
3447 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3448 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3449 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3450 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
3451 <h3 class="function"><a id="ippAddInteger">ippAddInteger</a></h3>
3452 <p class="description">Add a integer attribute to an IPP message.</p>
3453 <p class="code">
3454 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddInteger (<br />
3455 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
3456 &#160;&#160;&#160;&#160;ipp_tag_t group,<br />
3457 &#160;&#160;&#160;&#160;ipp_tag_t value_tag,<br />
3458 &#160;&#160;&#160;&#160;const char *name,<br />
3459 &#160;&#160;&#160;&#160;int value<br />
3460 );</p>
3461 <h4 class="parameters">Parameters</h4>
3462 <dl>
3463 <dt>ipp</dt>
3464 <dd class="description">IPP message</dd>
3465 <dt>group</dt>
3466 <dd class="description">IPP group</dd>
3467 <dt>value_tag</dt>
3468 <dd class="description">Type of attribute</dd>
3469 <dt>name</dt>
3470 <dd class="description">Name of attribute</dd>
3471 <dt>value</dt>
3472 <dd class="description">Value of attribute</dd>
3473 </dl>
3474 <h4 class="returnvalue">Return Value</h4>
3475 <p class="description">New attribute</p>
3476 <h4 class="discussion">Discussion</h4>
3477 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3478 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>
3479 <br>
3480 The <code>group</code> parameter specifies the IPP attribute group tag: none
3481 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3482 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3483 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3484 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3485 <br>
3486 Supported values include enum (<code>IPP_TAG_ENUM</code>) and integer
3487 (<code>IPP_TAG_INTEGER</code>).</p>
3488 <h3 class="function"><a id="ippAddIntegers">ippAddIntegers</a></h3>
3489 <p class="description">Add an array of integer values.</p>
3490 <p class="code">
3491 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddIntegers (<br />
3492 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
3493 &#160;&#160;&#160;&#160;ipp_tag_t group,<br />
3494 &#160;&#160;&#160;&#160;ipp_tag_t value_tag,<br />
3495 &#160;&#160;&#160;&#160;const char *name,<br />
3496 &#160;&#160;&#160;&#160;int num_values,<br />
3497 &#160;&#160;&#160;&#160;const int *values<br />
3498 );</p>
3499 <h4 class="parameters">Parameters</h4>
3500 <dl>
3501 <dt>ipp</dt>
3502 <dd class="description">IPP message</dd>
3503 <dt>group</dt>
3504 <dd class="description">IPP group</dd>
3505 <dt>value_tag</dt>
3506 <dd class="description">Type of attribute</dd>
3507 <dt>name</dt>
3508 <dd class="description">Name of attribute</dd>
3509 <dt>num_values</dt>
3510 <dd class="description">Number of values</dd>
3511 <dt>values</dt>
3512 <dd class="description">Values</dd>
3513 </dl>
3514 <h4 class="returnvalue">Return Value</h4>
3515 <p class="description">New attribute</p>
3516 <h4 class="discussion">Discussion</h4>
3517 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3518 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>
3519 <br>
3520 The <code>group</code> parameter specifies the IPP attribute group tag: none
3521 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3522 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3523 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3524 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3525 <br>
3526 Supported values include enum (<code>IPP_TAG_ENUM</code>) and integer
3527 (<code>IPP_TAG_INTEGER</code>).</p>
3528 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="ippAddOctetString">ippAddOctetString</a></h3>
3529 <p class="description">Add an octetString value to an IPP message.</p>
3530 <p class="code">
3531 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddOctetString (<br />
3532 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
3533 &#160;&#160;&#160;&#160;ipp_tag_t group,<br />
3534 &#160;&#160;&#160;&#160;const char *name,<br />
3535 &#160;&#160;&#160;&#160;const void *data,<br />
3536 &#160;&#160;&#160;&#160;int datalen<br />
3537 );</p>
3538 <h4 class="parameters">Parameters</h4>
3539 <dl>
3540 <dt>ipp</dt>
3541 <dd class="description">IPP message</dd>
3542 <dt>group</dt>
3543 <dd class="description">IPP group</dd>
3544 <dt>name</dt>
3545 <dd class="description">Name of attribute</dd>
3546 <dt>data</dt>
3547 <dd class="description">octetString data</dd>
3548 <dt>datalen</dt>
3549 <dd class="description">Length of data in bytes</dd>
3550 </dl>
3551 <h4 class="returnvalue">Return Value</h4>
3552 <p class="description">New attribute</p>
3553 <h4 class="discussion">Discussion</h4>
3554 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3555 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>
3556 <br>
3557 The <code>group</code> parameter specifies the IPP attribute group tag: none
3558 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3559 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3560 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3561 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).
3562
3563 </p>
3564 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippAddOutOfBand">ippAddOutOfBand</a></h3>
3565 <p class="description">Add an out-of-band value to an IPP message.</p>
3566 <p class="code">
3567 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddOutOfBand (<br />
3568 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
3569 &#160;&#160;&#160;&#160;ipp_tag_t group,<br />
3570 &#160;&#160;&#160;&#160;ipp_tag_t value_tag,<br />
3571 &#160;&#160;&#160;&#160;const char *name<br />
3572 );</p>
3573 <h4 class="parameters">Parameters</h4>
3574 <dl>
3575 <dt>ipp</dt>
3576 <dd class="description">IPP message</dd>
3577 <dt>group</dt>
3578 <dd class="description">IPP group</dd>
3579 <dt>value_tag</dt>
3580 <dd class="description">Type of attribute</dd>
3581 <dt>name</dt>
3582 <dd class="description">Name of attribute</dd>
3583 </dl>
3584 <h4 class="returnvalue">Return Value</h4>
3585 <p class="description">New attribute</p>
3586 <h4 class="discussion">Discussion</h4>
3587 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3588 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>
3589 <br>
3590 The <code>group</code> parameter specifies the IPP attribute group tag: none
3591 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3592 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3593 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3594 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3595 <br>
3596 Supported out-of-band values include unsupported-value
3597 (<code>IPP_TAG_UNSUPPORTED_VALUE</code>), default (<code>IPP_TAG_DEFAULT</code>), unknown
3598 (<code>IPP_TAG_UNKNOWN</code>), no-value (<code>IPP_TAG_NOVALUE</code>), not-settable
3599 (<code>IPP_TAG_NOTSETTABLE</code>), delete-attribute (<code>IPP_TAG_DELETEATTR</code>), and
3600 admin-define (<code>IPP_TAG_ADMINDEFINE</code>).
3601
3602 </p>
3603 <h3 class="function"><a id="ippAddRange">ippAddRange</a></h3>
3604 <p class="description">Add a range of values to an IPP message.</p>
3605 <p class="code">
3606 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddRange (<br />
3607 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
3608 &#160;&#160;&#160;&#160;ipp_tag_t group,<br />
3609 &#160;&#160;&#160;&#160;const char *name,<br />
3610 &#160;&#160;&#160;&#160;int lower,<br />
3611 &#160;&#160;&#160;&#160;int upper<br />
3612 );</p>
3613 <h4 class="parameters">Parameters</h4>
3614 <dl>
3615 <dt>ipp</dt>
3616 <dd class="description">IPP message</dd>
3617 <dt>group</dt>
3618 <dd class="description">IPP group</dd>
3619 <dt>name</dt>
3620 <dd class="description">Name of attribute</dd>
3621 <dt>lower</dt>
3622 <dd class="description">Lower value</dd>
3623 <dt>upper</dt>
3624 <dd class="description">Upper value</dd>
3625 </dl>
3626 <h4 class="returnvalue">Return Value</h4>
3627 <p class="description">New attribute</p>
3628 <h4 class="discussion">Discussion</h4>
3629 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3630 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>
3631 <br>
3632 The <code>group</code> parameter specifies the IPP attribute group tag: none
3633 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3634 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3635 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3636 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3637 <br>
3638 The <code>lower</code> parameter must be less than or equal to the <code>upper</code> parameter.</p>
3639 <h3 class="function"><a id="ippAddRanges">ippAddRanges</a></h3>
3640 <p class="description">Add ranges of values to an IPP message.</p>
3641 <p class="code">
3642 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddRanges (<br />
3643 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
3644 &#160;&#160;&#160;&#160;ipp_tag_t group,<br />
3645 &#160;&#160;&#160;&#160;const char *name,<br />
3646 &#160;&#160;&#160;&#160;int num_values,<br />
3647 &#160;&#160;&#160;&#160;const int *lower,<br />
3648 &#160;&#160;&#160;&#160;const int *upper<br />
3649 );</p>
3650 <h4 class="parameters">Parameters</h4>
3651 <dl>
3652 <dt>ipp</dt>
3653 <dd class="description">IPP message</dd>
3654 <dt>group</dt>
3655 <dd class="description">IPP group</dd>
3656 <dt>name</dt>
3657 <dd class="description">Name of attribute</dd>
3658 <dt>num_values</dt>
3659 <dd class="description">Number of values</dd>
3660 <dt>lower</dt>
3661 <dd class="description">Lower values</dd>
3662 <dt>upper</dt>
3663 <dd class="description">Upper values</dd>
3664 </dl>
3665 <h4 class="returnvalue">Return Value</h4>
3666 <p class="description">New attribute</p>
3667 <h4 class="discussion">Discussion</h4>
3668 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3669 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>
3670 <br>
3671 The <code>group</code> parameter specifies the IPP attribute group tag: none
3672 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3673 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3674 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3675 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
3676 <h3 class="function"><a id="ippAddResolution">ippAddResolution</a></h3>
3677 <p class="description">Add a resolution value to an IPP message.</p>
3678 <p class="code">
3679 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddResolution (<br />
3680 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
3681 &#160;&#160;&#160;&#160;ipp_tag_t group,<br />
3682 &#160;&#160;&#160;&#160;const char *name,<br />
3683 &#160;&#160;&#160;&#160;<a href="#ipp_res_t">ipp_res_t</a> units,<br />
3684 &#160;&#160;&#160;&#160;int xres,<br />
3685 &#160;&#160;&#160;&#160;int yres<br />
3686 );</p>
3687 <h4 class="parameters">Parameters</h4>
3688 <dl>
3689 <dt>ipp</dt>
3690 <dd class="description">IPP message</dd>
3691 <dt>group</dt>
3692 <dd class="description">IPP group</dd>
3693 <dt>name</dt>
3694 <dd class="description">Name of attribute</dd>
3695 <dt>units</dt>
3696 <dd class="description">Units for resolution</dd>
3697 <dt>xres</dt>
3698 <dd class="description">X resolution</dd>
3699 <dt>yres</dt>
3700 <dd class="description">Y resolution</dd>
3701 </dl>
3702 <h4 class="returnvalue">Return Value</h4>
3703 <p class="description">New attribute</p>
3704 <h4 class="discussion">Discussion</h4>
3705 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3706 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>
3707 <br>
3708 The <code>group</code> parameter specifies the IPP attribute group tag: none
3709 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3710 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3711 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3712 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
3713 <h3 class="function"><a id="ippAddResolutions">ippAddResolutions</a></h3>
3714 <p class="description">Add resolution values to an IPP message.</p>
3715 <p class="code">
3716 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddResolutions (<br />
3717 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
3718 &#160;&#160;&#160;&#160;ipp_tag_t group,<br />
3719 &#160;&#160;&#160;&#160;const char *name,<br />
3720 &#160;&#160;&#160;&#160;int num_values,<br />
3721 &#160;&#160;&#160;&#160;<a href="#ipp_res_t">ipp_res_t</a> units,<br />
3722 &#160;&#160;&#160;&#160;const int *xres,<br />
3723 &#160;&#160;&#160;&#160;const int *yres<br />
3724 );</p>
3725 <h4 class="parameters">Parameters</h4>
3726 <dl>
3727 <dt>ipp</dt>
3728 <dd class="description">IPP message</dd>
3729 <dt>group</dt>
3730 <dd class="description">IPP group</dd>
3731 <dt>name</dt>
3732 <dd class="description">Name of attribute</dd>
3733 <dt>num_values</dt>
3734 <dd class="description">Number of values</dd>
3735 <dt>units</dt>
3736 <dd class="description">Units for resolution</dd>
3737 <dt>xres</dt>
3738 <dd class="description">X resolutions</dd>
3739 <dt>yres</dt>
3740 <dd class="description">Y resolutions</dd>
3741 </dl>
3742 <h4 class="returnvalue">Return Value</h4>
3743 <p class="description">New attribute</p>
3744 <h4 class="discussion">Discussion</h4>
3745 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3746 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>
3747 <br>
3748 The <code>group</code> parameter specifies the IPP attribute group tag: none
3749 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3750 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3751 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3752 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
3753 <h3 class="function"><a id="ippAddSeparator">ippAddSeparator</a></h3>
3754 <p class="description">Add a group separator to an IPP message.</p>
3755 <p class="code">
3756 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddSeparator (<br />
3757 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br />
3758 );</p>
3759 <h4 class="parameters">Parameters</h4>
3760 <dl>
3761 <dt>ipp</dt>
3762 <dd class="description">IPP message</dd>
3763 </dl>
3764 <h4 class="returnvalue">Return Value</h4>
3765 <p class="description">New attribute</p>
3766 <h4 class="discussion">Discussion</h4>
3767 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3768 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>
3769 <h3 class="function"><a id="ippAddString">ippAddString</a></h3>
3770 <p class="description">Add a language-encoded string to an IPP message.</p>
3771 <p class="code">
3772 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddString (<br />
3773 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
3774 &#160;&#160;&#160;&#160;ipp_tag_t group,<br />
3775 &#160;&#160;&#160;&#160;ipp_tag_t value_tag,<br />
3776 &#160;&#160;&#160;&#160;const char *name,<br />
3777 &#160;&#160;&#160;&#160;const char *language,<br />
3778 &#160;&#160;&#160;&#160;const char *value<br />
3779 );</p>
3780 <h4 class="parameters">Parameters</h4>
3781 <dl>
3782 <dt>ipp</dt>
3783 <dd class="description">IPP message</dd>
3784 <dt>group</dt>
3785 <dd class="description">IPP group</dd>
3786 <dt>value_tag</dt>
3787 <dd class="description">Type of attribute</dd>
3788 <dt>name</dt>
3789 <dd class="description">Name of attribute</dd>
3790 <dt>language</dt>
3791 <dd class="description">Language code</dd>
3792 <dt>value</dt>
3793 <dd class="description">Value</dd>
3794 </dl>
3795 <h4 class="returnvalue">Return Value</h4>
3796 <p class="description">New attribute</p>
3797 <h4 class="discussion">Discussion</h4>
3798 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3799 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>
3800 <br>
3801 The <code>group</code> parameter specifies the IPP attribute group tag: none
3802 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3803 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3804 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3805 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3806 <br>
3807 Supported string values include charset (<code>IPP_TAG_CHARSET</code>), keyword
3808 (<code>IPP_TAG_KEYWORD</code>), language (<code>IPP_TAG_LANGUAGE</code>), mimeMediaType
3809 (<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code>), nameWithLanguage
3810 (<code>IPP_TAG_NAMELANG), text (</code>code IPP_TAG_TEXT@), textWithLanguage
3811 (<code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), and uriScheme
3812 (<code>IPP_TAG_URISCHEME</code>).<br>
3813 <br>
3814 The <code>language</code> parameter must be non-<code>NULL</code> for nameWithLanguage and
3815 textWithLanguage string values and must be <code>NULL</code> for all other string values.</p>
3816 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippAddStringf">ippAddStringf</a></h3>
3817 <p class="description">Add a formatted string to an IPP message.</p>
3818 <p class="code">
3819 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddStringf (<br />
3820 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
3821 &#160;&#160;&#160;&#160;ipp_tag_t group,<br />
3822 &#160;&#160;&#160;&#160;ipp_tag_t value_tag,<br />
3823 &#160;&#160;&#160;&#160;const char *name,<br />
3824 &#160;&#160;&#160;&#160;const char *language,<br />
3825 &#160;&#160;&#160;&#160;const char *format,<br />
3826 &#160;&#160;&#160;&#160;...<br />
3827 );</p>
3828 <h4 class="parameters">Parameters</h4>
3829 <dl>
3830 <dt>ipp</dt>
3831 <dd class="description">IPP message</dd>
3832 <dt>group</dt>
3833 <dd class="description">IPP group</dd>
3834 <dt>value_tag</dt>
3835 <dd class="description">Type of attribute</dd>
3836 <dt>name</dt>
3837 <dd class="description">Name of attribute</dd>
3838 <dt>language</dt>
3839 <dd class="description">Language code (<code>NULL</code> for default)</dd>
3840 <dt>format</dt>
3841 <dd class="description">Printf-style format string</dd>
3842 <dt>...</dt>
3843 <dd class="description">Additional arguments as needed</dd>
3844 </dl>
3845 <h4 class="returnvalue">Return Value</h4>
3846 <p class="description">New attribute</p>
3847 <h4 class="discussion">Discussion</h4>
3848 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3849 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>
3850 <br>
3851 The <code>group</code> parameter specifies the IPP attribute group tag: none
3852 (<code>IPP_TAG_ZERO</code>, for member attributes), document
3853 (<code>IPP_TAG_DOCUMENT</code>), event notification
3854 (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation (<code>IPP_TAG_OPERATION</code>),
3855 printer (<code>IPP_TAG_PRINTER</code>), subscription (<code>IPP_TAG_SUBSCRIPTION</code>),
3856 or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3857 <br>
3858 Supported string values include charset (<code>IPP_TAG_CHARSET</code>), keyword
3859 (<code>IPP_TAG_KEYWORD</code>), language (<code>IPP_TAG_LANGUAGE</code>), mimeMediaType
3860 (<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code>), nameWithLanguage
3861 (<code>IPP_TAG_NAMELANG), text (</code>code IPP_TAG_TEXT@), textWithLanguage
3862 (<code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), and uriScheme
3863 (<code>IPP_TAG_URISCHEME</code>).<br>
3864 <br>
3865 The <code>language</code> parameter must be non-<code>NULL</code> for nameWithLanguage
3866 and textWithLanguage string values and must be <code>NULL</code> for all other
3867 string values.<br>
3868 <br>
3869 The <code>format</code> parameter uses formatting characters compatible with the
3870 printf family of standard functions. Additional arguments follow it as
3871 needed. The formatted string is truncated as needed to the maximum length of
3872 the corresponding value type.
3873
3874 </p>
3875 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippAddStringfv">ippAddStringfv</a></h3>
3876 <p class="description">Add a formatted string to an IPP message.</p>
3877 <p class="code">
3878 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddStringfv (<br />
3879 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
3880 &#160;&#160;&#160;&#160;ipp_tag_t group,<br />
3881 &#160;&#160;&#160;&#160;ipp_tag_t value_tag,<br />
3882 &#160;&#160;&#160;&#160;const char *name,<br />
3883 &#160;&#160;&#160;&#160;const char *language,<br />
3884 &#160;&#160;&#160;&#160;const char *format,<br />
3885 &#160;&#160;&#160;&#160;va_list ap<br />
3886 );</p>
3887 <h4 class="parameters">Parameters</h4>
3888 <dl>
3889 <dt>ipp</dt>
3890 <dd class="description">IPP message</dd>
3891 <dt>group</dt>
3892 <dd class="description">IPP group</dd>
3893 <dt>value_tag</dt>
3894 <dd class="description">Type of attribute</dd>
3895 <dt>name</dt>
3896 <dd class="description">Name of attribute</dd>
3897 <dt>language</dt>
3898 <dd class="description">Language code (<code>NULL</code> for default)</dd>
3899 <dt>format</dt>
3900 <dd class="description">Printf-style format string</dd>
3901 <dt>ap</dt>
3902 <dd class="description">Additional arguments</dd>
3903 </dl>
3904 <h4 class="returnvalue">Return Value</h4>
3905 <p class="description">New attribute</p>
3906 <h4 class="discussion">Discussion</h4>
3907 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3908 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>
3909 <br>
3910 The <code>group</code> parameter specifies the IPP attribute group tag: none
3911 (<code>IPP_TAG_ZERO</code>, for member attributes), document
3912 (<code>IPP_TAG_DOCUMENT</code>), event notification
3913 (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation (<code>IPP_TAG_OPERATION</code>),
3914 printer (<code>IPP_TAG_PRINTER</code>), subscription (<code>IPP_TAG_SUBSCRIPTION</code>),
3915 or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3916 <br>
3917 Supported string values include charset (<code>IPP_TAG_CHARSET</code>), keyword
3918 (<code>IPP_TAG_KEYWORD</code>), language (<code>IPP_TAG_LANGUAGE</code>), mimeMediaType
3919 (<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code>), nameWithLanguage
3920 (<code>IPP_TAG_NAMELANG), text (</code>code IPP_TAG_TEXT@), textWithLanguage
3921 (<code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), and uriScheme
3922 (<code>IPP_TAG_URISCHEME</code>).<br>
3923 <br>
3924 The <code>language</code> parameter must be non-<code>NULL</code> for nameWithLanguage
3925 and textWithLanguage string values and must be <code>NULL</code> for all other
3926 string values.<br>
3927 <br>
3928 The <code>format</code> parameter uses formatting characters compatible with the
3929 printf family of standard functions. Additional arguments are passed in the
3930 stdarg pointer <code>ap</code>. The formatted string is truncated as needed to the
3931 maximum length of the corresponding value type.
3932
3933 </p>
3934 <h3 class="function"><a id="ippAddStrings">ippAddStrings</a></h3>
3935 <p class="description">Add language-encoded strings to an IPP message.</p>
3936 <p class="code">
3937 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddStrings (<br />
3938 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
3939 &#160;&#160;&#160;&#160;ipp_tag_t group,<br />
3940 &#160;&#160;&#160;&#160;ipp_tag_t value_tag,<br />
3941 &#160;&#160;&#160;&#160;const char *name,<br />
3942 &#160;&#160;&#160;&#160;int num_values,<br />
3943 &#160;&#160;&#160;&#160;const char *language,<br />
3944 &#160;&#160;&#160;&#160;const char *const *values<br />
3945 );</p>
3946 <h4 class="parameters">Parameters</h4>
3947 <dl>
3948 <dt>ipp</dt>
3949 <dd class="description">IPP message</dd>
3950 <dt>group</dt>
3951 <dd class="description">IPP group</dd>
3952 <dt>value_tag</dt>
3953 <dd class="description">Type of attribute</dd>
3954 <dt>name</dt>
3955 <dd class="description">Name of attribute</dd>
3956 <dt>num_values</dt>
3957 <dd class="description">Number of values</dd>
3958 <dt>language</dt>
3959 <dd class="description">Language code (<code>NULL</code> for default)</dd>
3960 <dt>values</dt>
3961 <dd class="description">Values</dd>
3962 </dl>
3963 <h4 class="returnvalue">Return Value</h4>
3964 <p class="description">New attribute</p>
3965 <h4 class="discussion">Discussion</h4>
3966 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3967 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>
3968 <br>
3969 The <code>group</code> parameter specifies the IPP attribute group tag: none
3970 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3971 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3972 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3973 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3974 <br>
3975 Supported string values include charset (<code>IPP_TAG_CHARSET</code>), keyword
3976 (<code>IPP_TAG_KEYWORD</code>), language (<code>IPP_TAG_LANGUAGE</code>), mimeMediaType
3977 (<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code>), nameWithLanguage
3978 (<code>IPP_TAG_NAMELANG), text (</code>code IPP_TAG_TEXT@), textWithLanguage
3979 (<code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), and uriScheme
3980 (<code>IPP_TAG_URISCHEME</code>).<br>
3981 <br>
3982 The <code>language</code> parameter must be non-<code>NULL</code> for nameWithLanguage and
3983 textWithLanguage string values and must be <code>NULL</code> for all other string values.</p>
3984 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippAttributeString">ippAttributeString</a></h3>
3985 <p class="description">Convert the attribute's value to a string.</p>
3986 <p class="code">
3987 size_t ippAttributeString (<br />
3988 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br />
3989 &#160;&#160;&#160;&#160;char *buffer,<br />
3990 &#160;&#160;&#160;&#160;size_t bufsize<br />
3991 );</p>
3992 <h4 class="parameters">Parameters</h4>
3993 <dl>
3994 <dt>attr</dt>
3995 <dd class="description">Attribute</dd>
3996 <dt>buffer</dt>
3997 <dd class="description">String buffer or NULL</dd>
3998 <dt>bufsize</dt>
3999 <dd class="description">Size of string buffer</dd>
4000 </dl>
4001 <h4 class="returnvalue">Return Value</h4>
4002 <p class="description">Number of bytes less nul</p>
4003 <h4 class="discussion">Discussion</h4>
4004 <p class="discussion">Returns the number of bytes that would be written, not including the
4005 trailing nul. The buffer pointer can be NULL to get the required length,
4006 just like (v)snprintf.
4007
4008 </p>
4009 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippContainsInteger">ippContainsInteger</a></h3>
4010 <p class="description">Determine whether an attribute contains the
4011 specified value or is within the list of ranges.</p>
4012 <p class="code">
4013 int ippContainsInteger (<br />
4014 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br />
4015 &#160;&#160;&#160;&#160;int value<br />
4016 );</p>
4017 <h4 class="parameters">Parameters</h4>
4018 <dl>
4019 <dt>attr</dt>
4020 <dd class="description">Attribute</dd>
4021 <dt>value</dt>
4022 <dd class="description">Integer/enum value</dd>
4023 </dl>
4024 <h4 class="returnvalue">Return Value</h4>
4025 <p class="description">1 on a match, 0 on no match</p>
4026 <h4 class="discussion">Discussion</h4>
4027 <p class="discussion">Returns non-zero when the attribute contains either a matching integer or
4028 enum value, or the value falls within one of the rangeOfInteger values for
4029 the attribute.
4030
4031 </p>
4032 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippContainsString">ippContainsString</a></h3>
4033 <p class="description">Determine whether an attribute contains the
4034 specified string value.</p>
4035 <p class="code">
4036 int ippContainsString (<br />
4037 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br />
4038 &#160;&#160;&#160;&#160;const char *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">String 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 a matching charset, keyword,
4051 language, mimeMediaType, name, text, URI, or URI scheme value.
4052
4053 </p>
4054 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippCopyAttribute">ippCopyAttribute</a></h3>
4055 <p class="description">Copy an attribute.</p>
4056 <p class="code">
4057 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippCopyAttribute (<br />
4058 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *dst,<br />
4059 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *srcattr,<br />
4060 &#160;&#160;&#160;&#160;int quickcopy<br />
4061 );</p>
4062 <h4 class="parameters">Parameters</h4>
4063 <dl>
4064 <dt>dst</dt>
4065 <dd class="description">Destination IPP message</dd>
4066 <dt>srcattr</dt>
4067 <dd class="description">Attribute to copy</dd>
4068 <dt>quickcopy</dt>
4069 <dd class="description">1 for a referenced copy, 0 for normal</dd>
4070 </dl>
4071 <h4 class="returnvalue">Return Value</h4>
4072 <p class="description">New attribute</p>
4073 <h4 class="discussion">Discussion</h4>
4074 <p class="discussion">The specified attribute, <code>attr</code>, is copied to the destination IPP message.
4075 When <code>quickcopy</code> is non-zero, a &quot;shallow&quot; reference copy of the attribute is
4076 created - this should only be done as long as the original source IPP message will
4077 not be freed for the life of the destination.
4078
4079 </p>
4080 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippCopyAttributes">ippCopyAttributes</a></h3>
4081 <p class="description">Copy attributes from one IPP message to another.</p>
4082 <p class="code">
4083 int ippCopyAttributes (<br />
4084 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *dst,<br />
4085 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *src,<br />
4086 &#160;&#160;&#160;&#160;int quickcopy,<br />
4087 &#160;&#160;&#160;&#160;<a href="#ipp_copycb_t">ipp_copycb_t</a> cb,<br />
4088 &#160;&#160;&#160;&#160;void *context<br />
4089 );</p>
4090 <h4 class="parameters">Parameters</h4>
4091 <dl>
4092 <dt>dst</dt>
4093 <dd class="description">Destination IPP message</dd>
4094 <dt>src</dt>
4095 <dd class="description">Source IPP message</dd>
4096 <dt>quickcopy</dt>
4097 <dd class="description">1 for a referenced copy, 0 for normal</dd>
4098 <dt>cb</dt>
4099 <dd class="description">Copy callback or <code>NULL</code> for none</dd>
4100 <dt>context</dt>
4101 <dd class="description">Context pointer</dd>
4102 </dl>
4103 <h4 class="returnvalue">Return Value</h4>
4104 <p class="description">1 on success, 0 on error</p>
4105 <h4 class="discussion">Discussion</h4>
4106 <p class="discussion">Zero or more attributes are copied from the source IPP message, <code>src</code>, to the
4107 destination IPP message, <code>dst</code>. When <code>quickcopy</code> is non-zero, a &quot;shallow&quot;
4108 reference copy of the attribute is created - this should only be done as long as the
4109 original source IPP message will not be freed for the life of the destination.<br>
4110 <br>
4111 The <code>cb</code> and <code>context</code> parameters provide a generic way to &quot;filter&quot; the
4112 attributes that are copied - the function must return 1 to copy the attribute or
4113 0 to skip it. The function may also choose to do a partial copy of the source attribute
4114 itself.
4115
4116 </p>
4117 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippCreateRequestedArray">ippCreateRequestedArray</a></h3>
4118 <p class="description">Create a CUPS array of attribute names from the
4119 given requested-attributes attribute.</p>
4120 <p class="code">
4121 cups_array_t *ippCreateRequestedArray (<br />
4122 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *request<br />
4123 );</p>
4124 <h4 class="parameters">Parameters</h4>
4125 <dl>
4126 <dt>request</dt>
4127 <dd class="description">IPP request</dd>
4128 </dl>
4129 <h4 class="returnvalue">Return Value</h4>
4130 <p class="description">CUPS array or <code>NULL</code> if all</p>
4131 <h4 class="discussion">Discussion</h4>
4132 <p class="discussion">This function creates a (sorted) CUPS array of attribute names matching the
4133 list of &quot;requested-attribute&quot; values supplied in an IPP request. All IANA-
4134 registered values are supported in addition to the CUPS IPP extension
4135 attributes.<br>
4136 <br>
4137 The <code>request</code> parameter specifies the request message that was read from
4138 the client.
4139
4140 <code>NULL</code> is returned if all attributes should be returned. Otherwise, the
4141 result is a sorted array of attribute names, where <code>cupsArrayFind(array,
4142 "attribute-name")</code> will return a non-NULL pointer. The array must be freed
4143 using the <code>cupsArrayDelete</code> function.
4144
4145 </p>
4146 <h3 class="function"><a id="ippDateToTime">ippDateToTime</a></h3>
4147 <p class="description">Convert from RFC 1903 Date/Time format to UNIX time
4148 in seconds.</p>
4149 <p class="code">
4150 time_t ippDateToTime (<br />
4151 &#160;&#160;&#160;&#160;const <a href="#ipp_uchar_t">ipp_uchar_t</a> *date<br />
4152 );</p>
4153 <h4 class="parameters">Parameters</h4>
4154 <dl>
4155 <dt>date</dt>
4156 <dd class="description">RFC 1903 date info</dd>
4157 </dl>
4158 <h4 class="returnvalue">Return Value</h4>
4159 <p class="description">UNIX time value</p>
4160 <h3 class="function"><a id="ippDelete">ippDelete</a></h3>
4161 <p class="description">Delete an IPP message.</p>
4162 <p class="code">
4163 void ippDelete (<br />
4164 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br />
4165 );</p>
4166 <h4 class="parameters">Parameters</h4>
4167 <dl>
4168 <dt>ipp</dt>
4169 <dd class="description">IPP message</dd>
4170 </dl>
4171 <h3 class="function"><span class="info">&#160;CUPS 1.1.19/macOS 10.3&#160;</span><a id="ippDeleteAttribute">ippDeleteAttribute</a></h3>
4172 <p class="description">Delete a single attribute in an IPP message.</p>
4173 <p class="code">
4174 void ippDeleteAttribute (<br />
4175 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
4176 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br />
4177 );</p>
4178 <h4 class="parameters">Parameters</h4>
4179 <dl>
4180 <dt>ipp</dt>
4181 <dd class="description">IPP message</dd>
4182 <dt>attr</dt>
4183 <dd class="description">Attribute to delete</dd>
4184 </dl>
4185 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippDeleteValues">ippDeleteValues</a></h3>
4186 <p class="description">Delete values in an attribute.</p>
4187 <p class="code">
4188 int ippDeleteValues (<br />
4189 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
4190 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br />
4191 &#160;&#160;&#160;&#160;int element,<br />
4192 &#160;&#160;&#160;&#160;int count<br />
4193 );</p>
4194 <h4 class="parameters">Parameters</h4>
4195 <dl>
4196 <dt>ipp</dt>
4197 <dd class="description">IPP message</dd>
4198 <dt>attr</dt>
4199 <dd class="description">Attribute</dd>
4200 <dt>element</dt>
4201 <dd class="description">Index of first value to delete (0-based)</dd>
4202 <dt>count</dt>
4203 <dd class="description">Number of values to delete</dd>
4204 </dl>
4205 <h4 class="returnvalue">Return Value</h4>
4206 <p class="description">1 on success, 0 on failure</p>
4207 <h4 class="discussion">Discussion</h4>
4208 <p class="discussion">The <code>element</code> parameter specifies the first value to delete, starting at
4209 0. It must be less than the number of values returned by <a href="#ippGetCount"><code>ippGetCount</code></a>.<br>
4210 <br>
4211 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4212 <br>
4213 Deleting all values in an attribute deletes the attribute.
4214
4215 </p>
4216 <h3 class="function"><a id="ippEnumString">ippEnumString</a></h3>
4217 <p class="description">Return a string corresponding to the enum value.</p>
4218 <p class="code">
4219 const char *ippEnumString (<br />
4220 &#160;&#160;&#160;&#160;const char *attrname,<br />
4221 &#160;&#160;&#160;&#160;int enumvalue<br />
4222 );</p>
4223 <h4 class="parameters">Parameters</h4>
4224 <dl>
4225 <dt>attrname</dt>
4226 <dd class="description">Attribute name</dd>
4227 <dt>enumvalue</dt>
4228 <dd class="description">Enum value</dd>
4229 </dl>
4230 <h4 class="returnvalue">Return Value</h4>
4231 <p class="description">Enum string</p>
4232 <h3 class="function"><a id="ippEnumValue">ippEnumValue</a></h3>
4233 <p class="description">Return the value associated with a given enum string.</p>
4234 <p class="code">
4235 int ippEnumValue (<br />
4236 &#160;&#160;&#160;&#160;const char *attrname,<br />
4237 &#160;&#160;&#160;&#160;const char *enumstring<br />
4238 );</p>
4239 <h4 class="parameters">Parameters</h4>
4240 <dl>
4241 <dt>attrname</dt>
4242 <dd class="description">Attribute name</dd>
4243 <dt>enumstring</dt>
4244 <dd class="description">Enum string</dd>
4245 </dl>
4246 <h4 class="returnvalue">Return Value</h4>
4247 <p class="description">Enum value or -1 if unknown</p>
4248 <h3 class="function"><a id="ippErrorString">ippErrorString</a></h3>
4249 <p class="description">Return a name for the given status code.</p>
4250 <p class="code">
4251 const char *ippErrorString (<br />
4252 &#160;&#160;&#160;&#160;ipp_status_t error<br />
4253 );</p>
4254 <h4 class="parameters">Parameters</h4>
4255 <dl>
4256 <dt>error</dt>
4257 <dd class="description">Error status</dd>
4258 </dl>
4259 <h4 class="returnvalue">Return Value</h4>
4260 <p class="description">Text string</p>
4261 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="ippErrorValue">ippErrorValue</a></h3>
4262 <p class="description">Return a status code for the given name.</p>
4263 <p class="code">
4264 ipp_status_t ippErrorValue (<br />
4265 &#160;&#160;&#160;&#160;const char *name<br />
4266 );</p>
4267 <h4 class="parameters">Parameters</h4>
4268 <dl>
4269 <dt>name</dt>
4270 <dd class="description">Name</dd>
4271 </dl>
4272 <h4 class="returnvalue">Return Value</h4>
4273 <p class="description">IPP status code</p>
4274 <h3 class="function"><a id="ippFindAttribute">ippFindAttribute</a></h3>
4275 <p class="description">Find a named attribute in a request.</p>
4276 <p class="code">
4277 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippFindAttribute (<br />
4278 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
4279 &#160;&#160;&#160;&#160;const char *name,<br />
4280 &#160;&#160;&#160;&#160;ipp_tag_t type<br />
4281 );</p>
4282 <h4 class="parameters">Parameters</h4>
4283 <dl>
4284 <dt>ipp</dt>
4285 <dd class="description">IPP message</dd>
4286 <dt>name</dt>
4287 <dd class="description">Name of attribute</dd>
4288 <dt>type</dt>
4289 <dd class="description">Type of attribute</dd>
4290 </dl>
4291 <h4 class="returnvalue">Return Value</h4>
4292 <p class="description">Matching attribute</p>
4293 <h4 class="discussion">Discussion</h4>
4294 <p class="discussion">Starting with CUPS 2.0, the attribute name can contain a hierarchical list
4295 of attribute and member names separated by slashes, for example
4296 &quot;media-col/media-size&quot;.</p>
4297 <h3 class="function"><a id="ippFindNextAttribute">ippFindNextAttribute</a></h3>
4298 <p class="description">Find the next named attribute in a request.</p>
4299 <p class="code">
4300 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippFindNextAttribute (<br />
4301 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
4302 &#160;&#160;&#160;&#160;const char *name,<br />
4303 &#160;&#160;&#160;&#160;ipp_tag_t type<br />
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 <h4 class="discussion">Discussion</h4>
4317 <p class="discussion">Starting with CUPS 2.0, the attribute name can contain a hierarchical list
4318 of attribute and member names separated by slashes, for example
4319 &quot;media-col/media-size&quot;.</p>
4320 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippFirstAttribute">ippFirstAttribute</a></h3>
4321 <p class="description">Return the first attribute in the message.</p>
4322 <p class="code">
4323 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippFirstAttribute (<br />
4324 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br />
4325 );</p>
4326 <h4 class="parameters">Parameters</h4>
4327 <dl>
4328 <dt>ipp</dt>
4329 <dd class="description">IPP message</dd>
4330 </dl>
4331 <h4 class="returnvalue">Return Value</h4>
4332 <p class="description">First attribute or <code>NULL</code> if none</p>
4333 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetBoolean">ippGetBoolean</a></h3>
4334 <p class="description">Get a boolean value for an attribute.</p>
4335 <p class="code">
4336 int ippGetBoolean (<br />
4337 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br />
4338 &#160;&#160;&#160;&#160;int element<br />
4339 );</p>
4340 <h4 class="parameters">Parameters</h4>
4341 <dl>
4342 <dt>attr</dt>
4343 <dd class="description">IPP attribute</dd>
4344 <dt>element</dt>
4345 <dd class="description">Value number (0-based)</dd>
4346 </dl>
4347 <h4 class="returnvalue">Return Value</h4>
4348 <p class="description">Boolean value or 0 on error</p>
4349 <h4 class="discussion">Discussion</h4>
4350 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4351 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4352
4353 </p>
4354 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetCollection">ippGetCollection</a></h3>
4355 <p class="description">Get a collection value for an attribute.</p>
4356 <p class="code">
4357 <a href="#ipp_t">ipp_t</a> *ippGetCollection (<br />
4358 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br />
4359 &#160;&#160;&#160;&#160;int element<br />
4360 );</p>
4361 <h4 class="parameters">Parameters</h4>
4362 <dl>
4363 <dt>attr</dt>
4364 <dd class="description">IPP attribute</dd>
4365 <dt>element</dt>
4366 <dd class="description">Value number (0-based)</dd>
4367 </dl>
4368 <h4 class="returnvalue">Return Value</h4>
4369 <p class="description">Collection value or <code>NULL</code> on error</p>
4370 <h4 class="discussion">Discussion</h4>
4371 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4372 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4373
4374 </p>
4375 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetCount">ippGetCount</a></h3>
4376 <p class="description">Get the number of values in an attribute.</p>
4377 <p class="code">
4378 int ippGetCount (<br />
4379 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br />
4380 );</p>
4381 <h4 class="parameters">Parameters</h4>
4382 <dl>
4383 <dt>attr</dt>
4384 <dd class="description">IPP attribute</dd>
4385 </dl>
4386 <h4 class="returnvalue">Return Value</h4>
4387 <p class="description">Number of values or 0 on error</p>
4388 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetDate">ippGetDate</a></h3>
4389 <p class="description">Get a date value for an attribute.</p>
4390 <p class="code">
4391 const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippGetDate (<br />
4392 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br />
4393 &#160;&#160;&#160;&#160;int element<br />
4394 );</p>
4395 <h4 class="parameters">Parameters</h4>
4396 <dl>
4397 <dt>attr</dt>
4398 <dd class="description">IPP attribute</dd>
4399 <dt>element</dt>
4400 <dd class="description">Value number (0-based)</dd>
4401 </dl>
4402 <h4 class="returnvalue">Return Value</h4>
4403 <p class="description">Date value or <code>NULL</code></p>
4404 <h4 class="discussion">Discussion</h4>
4405 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4406 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4407
4408 </p>
4409 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetGroupTag">ippGetGroupTag</a></h3>
4410 <p class="description">Get the group associated with an attribute.</p>
4411 <p class="code">
4412 ipp_tag_t ippGetGroupTag (<br />
4413 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br />
4414 );</p>
4415 <h4 class="parameters">Parameters</h4>
4416 <dl>
4417 <dt>attr</dt>
4418 <dd class="description">IPP attribute</dd>
4419 </dl>
4420 <h4 class="returnvalue">Return Value</h4>
4421 <p class="description">Group tag or <code>IPP_TAG_ZERO</code> on error</p>
4422 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetInteger">ippGetInteger</a></h3>
4423 <p class="description">Get the integer/enum value for an attribute.</p>
4424 <p class="code">
4425 int ippGetInteger (<br />
4426 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br />
4427 &#160;&#160;&#160;&#160;int element<br />
4428 );</p>
4429 <h4 class="parameters">Parameters</h4>
4430 <dl>
4431 <dt>attr</dt>
4432 <dd class="description">IPP attribute</dd>
4433 <dt>element</dt>
4434 <dd class="description">Value number (0-based)</dd>
4435 </dl>
4436 <h4 class="returnvalue">Return Value</h4>
4437 <p class="description">Value or 0 on error</p>
4438 <h4 class="discussion">Discussion</h4>
4439 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4440 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4441
4442 </p>
4443 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetName">ippGetName</a></h3>
4444 <p class="description">Get the attribute name.</p>
4445 <p class="code">
4446 const char *ippGetName (<br />
4447 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br />
4448 );</p>
4449 <h4 class="parameters">Parameters</h4>
4450 <dl>
4451 <dt>attr</dt>
4452 <dd class="description">IPP attribute</dd>
4453 </dl>
4454 <h4 class="returnvalue">Return Value</h4>
4455 <p class="description">Attribute name or <code>NULL</code> for separators</p>
4456 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippGetOctetString">ippGetOctetString</a></h3>
4457 <p class="description">Get an octetString value from an IPP attribute.</p>
4458 <p class="code">
4459 void *ippGetOctetString (<br />
4460 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br />
4461 &#160;&#160;&#160;&#160;int element,<br />
4462 &#160;&#160;&#160;&#160;int *datalen<br />
4463 );</p>
4464 <h4 class="parameters">Parameters</h4>
4465 <dl>
4466 <dt>attr</dt>
4467 <dd class="description">IPP attribute</dd>
4468 <dt>element</dt>
4469 <dd class="description">Value number (0-based)</dd>
4470 <dt>datalen</dt>
4471 <dd class="description">Length of octetString data</dd>
4472 </dl>
4473 <h4 class="returnvalue">Return Value</h4>
4474 <p class="description">Pointer to octetString data</p>
4475 <h4 class="discussion">Discussion</h4>
4476 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4477 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4478
4479 </p>
4480 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetOperation">ippGetOperation</a></h3>
4481 <p class="description">Get the operation ID in an IPP message.</p>
4482 <p class="code">
4483 ipp_op_t ippGetOperation (<br />
4484 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br />
4485 );</p>
4486 <h4 class="parameters">Parameters</h4>
4487 <dl>
4488 <dt>ipp</dt>
4489 <dd class="description">IPP request message</dd>
4490 </dl>
4491 <h4 class="returnvalue">Return Value</h4>
4492 <p class="description">Operation ID or 0 on error</p>
4493 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetRange">ippGetRange</a></h3>
4494 <p class="description">Get a rangeOfInteger value from an attribute.</p>
4495 <p class="code">
4496 int ippGetRange (<br />
4497 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br />
4498 &#160;&#160;&#160;&#160;int element,<br />
4499 &#160;&#160;&#160;&#160;int *uppervalue<br />
4500 );</p>
4501 <h4 class="parameters">Parameters</h4>
4502 <dl>
4503 <dt>attr</dt>
4504 <dd class="description">IPP attribute</dd>
4505 <dt>element</dt>
4506 <dd class="description">Value number (0-based)</dd>
4507 <dt>uppervalue</dt>
4508 <dd class="description">Upper value of range</dd>
4509 </dl>
4510 <h4 class="returnvalue">Return Value</h4>
4511 <p class="description">Lower value of range or 0</p>
4512 <h4 class="discussion">Discussion</h4>
4513 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4514 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4515
4516 </p>
4517 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetRequestId">ippGetRequestId</a></h3>
4518 <p class="description">Get the request ID from an IPP message.</p>
4519 <p class="code">
4520 int ippGetRequestId (<br />
4521 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br />
4522 );</p>
4523 <h4 class="parameters">Parameters</h4>
4524 <dl>
4525 <dt>ipp</dt>
4526 <dd class="description">IPP message</dd>
4527 </dl>
4528 <h4 class="returnvalue">Return Value</h4>
4529 <p class="description">Request ID or 0 on error</p>
4530 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetResolution">ippGetResolution</a></h3>
4531 <p class="description">Get a resolution value for an attribute.</p>
4532 <p class="code">
4533 int ippGetResolution (<br />
4534 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br />
4535 &#160;&#160;&#160;&#160;int element,<br />
4536 &#160;&#160;&#160;&#160;int *yres,<br />
4537 &#160;&#160;&#160;&#160;<a href="#ipp_res_t">ipp_res_t</a> *units<br />
4538 );</p>
4539 <h4 class="parameters">Parameters</h4>
4540 <dl>
4541 <dt>attr</dt>
4542 <dd class="description">IPP attribute</dd>
4543 <dt>element</dt>
4544 <dd class="description">Value number (0-based)</dd>
4545 <dt>yres</dt>
4546 <dd class="description">Vertical/feed resolution</dd>
4547 <dt>units</dt>
4548 <dd class="description">Units for resolution</dd>
4549 </dl>
4550 <h4 class="returnvalue">Return Value</h4>
4551 <p class="description">Horizontal/cross feed resolution or 0</p>
4552 <h4 class="discussion">Discussion</h4>
4553 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4554 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4555
4556 </p>
4557 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetState">ippGetState</a></h3>
4558 <p class="description">Get the IPP message state.</p>
4559 <p class="code">
4560 <a href="#ipp_state_t">ipp_state_t</a> ippGetState (<br />
4561 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br />
4562 );</p>
4563 <h4 class="parameters">Parameters</h4>
4564 <dl>
4565 <dt>ipp</dt>
4566 <dd class="description">IPP message</dd>
4567 </dl>
4568 <h4 class="returnvalue">Return Value</h4>
4569 <p class="description">IPP message state value</p>
4570 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetStatusCode">ippGetStatusCode</a></h3>
4571 <p class="description">Get the status code from an IPP response or event message.</p>
4572 <p class="code">
4573 ipp_status_t ippGetStatusCode (<br />
4574 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br />
4575 );</p>
4576 <h4 class="parameters">Parameters</h4>
4577 <dl>
4578 <dt>ipp</dt>
4579 <dd class="description">IPP response or event message</dd>
4580 </dl>
4581 <h4 class="returnvalue">Return Value</h4>
4582 <p class="description">Status code in IPP message</p>
4583 <h3 class="function"><a id="ippGetString">ippGetString</a></h3>
4584 <p class="description">Return the value...</p>
4585 <p class="code">
4586 const char *ippGetString (<br />
4587 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br />
4588 &#160;&#160;&#160;&#160;int element,<br />
4589 &#160;&#160;&#160;&#160;const char **language<br />
4590 );</p>
4591 <h4 class="parameters">Parameters</h4>
4592 <dl>
4593 <dt>attr</dt>
4594 <dd class="description">IPP attribute</dd>
4595 <dt>element</dt>
4596 <dd class="description">Value number (0-based)</dd>
4597 <dt>language</dt>
4598 <dd class="description">Language code (<code>NULL</code> for don't care)</dd>
4599 </dl>
4600 <h4 class="returnvalue">Return Value</h4>
4601 <p class="description">Get the string and optionally the language code for an attribute.</p>
4602 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4603 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4604
4605 </p>
4606 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetValueTag">ippGetValueTag</a></h3>
4607 <p class="description">Get the value tag for an attribute.</p>
4608 <p class="code">
4609 ipp_tag_t ippGetValueTag (<br />
4610 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br />
4611 );</p>
4612 <h4 class="parameters">Parameters</h4>
4613 <dl>
4614 <dt>attr</dt>
4615 <dd class="description">IPP attribute</dd>
4616 </dl>
4617 <h4 class="returnvalue">Return Value</h4>
4618 <p class="description">Value tag or <code>IPP_TAG_ZERO</code> on error</p>
4619 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetVersion">ippGetVersion</a></h3>
4620 <p class="description">Get the major and minor version number from an IPP message.</p>
4621 <p class="code">
4622 int ippGetVersion (<br />
4623 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
4624 &#160;&#160;&#160;&#160;int *minor<br />
4625 );</p>
4626 <h4 class="parameters">Parameters</h4>
4627 <dl>
4628 <dt>ipp</dt>
4629 <dd class="description">IPP message</dd>
4630 <dt>minor</dt>
4631 <dd class="description">Minor version number or <code>NULL</code></dd>
4632 </dl>
4633 <h4 class="returnvalue">Return Value</h4>
4634 <p class="description">Major version number or 0 on error</p>
4635 <h3 class="function"><a id="ippLength">ippLength</a></h3>
4636 <p class="description">Compute the length of an IPP message.</p>
4637 <p class="code">
4638 size_t ippLength (<br />
4639 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br />
4640 );</p>
4641 <h4 class="parameters">Parameters</h4>
4642 <dl>
4643 <dt>ipp</dt>
4644 <dd class="description">IPP message</dd>
4645 </dl>
4646 <h4 class="returnvalue">Return Value</h4>
4647 <p class="description">Size of IPP message</p>
4648 <h3 class="function"><a id="ippNew">ippNew</a></h3>
4649 <p class="description">Allocate a new IPP message.</p>
4650 <p class="code">
4651 <a href="#ipp_t">ipp_t</a> *ippNew (void);</p>
4652 <h4 class="returnvalue">Return Value</h4>
4653 <p class="description">New IPP message</p>
4654 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="ippNewRequest">ippNewRequest</a></h3>
4655 <p class="description">Allocate a new IPP request message.</p>
4656 <p class="code">
4657 <a href="#ipp_t">ipp_t</a> *ippNewRequest (<br />
4658 &#160;&#160;&#160;&#160;ipp_op_t op<br />
4659 );</p>
4660 <h4 class="parameters">Parameters</h4>
4661 <dl>
4662 <dt>op</dt>
4663 <dd class="description">Operation code</dd>
4664 </dl>
4665 <h4 class="returnvalue">Return Value</h4>
4666 <p class="description">IPP request message</p>
4667 <h4 class="discussion">Discussion</h4>
4668 <p class="discussion">The new request message is initialized with the attributes-charset and
4669 attributes-natural-language attributes added. The
4670 attributes-natural-language value is derived from the current locale.
4671
4672 </p>
4673 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippNewResponse">ippNewResponse</a></h3>
4674 <p class="description">Allocate a new IPP response message.</p>
4675 <p class="code">
4676 <a href="#ipp_t">ipp_t</a> *ippNewResponse (<br />
4677 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *request<br />
4678 );</p>
4679 <h4 class="parameters">Parameters</h4>
4680 <dl>
4681 <dt>request</dt>
4682 <dd class="description">IPP request message</dd>
4683 </dl>
4684 <h4 class="returnvalue">Return Value</h4>
4685 <p class="description">IPP response message</p>
4686 <h4 class="discussion">Discussion</h4>
4687 <p class="discussion">The new response message is initialized with the same version-number,
4688 request-id, attributes-charset, and attributes-natural-language as the
4689 provided request message. If the attributes-charset or
4690 attributes-natural-language attributes are missing from the request,
4691 &quot;utf-8&quot; and a value derived from the current locale are substituted,
4692 respectively.
4693
4694 </p>
4695 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippNextAttribute">ippNextAttribute</a></h3>
4696 <p class="description">Return the next attribute in the message.</p>
4697 <p class="code">
4698 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippNextAttribute (<br />
4699 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br />
4700 );</p>
4701 <h4 class="parameters">Parameters</h4>
4702 <dl>
4703 <dt>ipp</dt>
4704 <dd class="description">IPP message</dd>
4705 </dl>
4706 <h4 class="returnvalue">Return Value</h4>
4707 <p class="description">Next attribute or <code>NULL</code> if none</p>
4708 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="ippOpString">ippOpString</a></h3>
4709 <p class="description">Return a name for the given operation id.</p>
4710 <p class="code">
4711 const char *ippOpString (<br />
4712 &#160;&#160;&#160;&#160;ipp_op_t op<br />
4713 );</p>
4714 <h4 class="parameters">Parameters</h4>
4715 <dl>
4716 <dt>op</dt>
4717 <dd class="description">Operation ID</dd>
4718 </dl>
4719 <h4 class="returnvalue">Return Value</h4>
4720 <p class="description">Name</p>
4721 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="ippOpValue">ippOpValue</a></h3>
4722 <p class="description">Return an operation id for the given name.</p>
4723 <p class="code">
4724 ipp_op_t ippOpValue (<br />
4725 &#160;&#160;&#160;&#160;const char *name<br />
4726 );</p>
4727 <h4 class="parameters">Parameters</h4>
4728 <dl>
4729 <dt>name</dt>
4730 <dd class="description">Textual name</dd>
4731 </dl>
4732 <h4 class="returnvalue">Return Value</h4>
4733 <p class="description">Operation ID</p>
4734 <h3 class="function"><a id="ippPort">ippPort</a></h3>
4735 <p class="description">Return the default IPP port number.</p>
4736 <p class="code">
4737 int ippPort (void);</p>
4738 <h4 class="returnvalue">Return Value</h4>
4739 <p class="description">Port number</p>
4740 <h3 class="function"><a id="ippRead">ippRead</a></h3>
4741 <p class="description">Read data for an IPP message from a HTTP connection.</p>
4742 <p class="code">
4743 <a href="#ipp_state_t">ipp_state_t</a> ippRead (<br />
4744 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
4745 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br />
4746 );</p>
4747 <h4 class="parameters">Parameters</h4>
4748 <dl>
4749 <dt>http</dt>
4750 <dd class="description">HTTP connection</dd>
4751 <dt>ipp</dt>
4752 <dd class="description">IPP data</dd>
4753 </dl>
4754 <h4 class="returnvalue">Return Value</h4>
4755 <p class="description">Current state</p>
4756 <h3 class="function"><span class="info">&#160;CUPS 1.1.19/macOS 10.3&#160;</span><a id="ippReadFile">ippReadFile</a></h3>
4757 <p class="description">Read data for an IPP message from a file.</p>
4758 <p class="code">
4759 <a href="#ipp_state_t">ipp_state_t</a> ippReadFile (<br />
4760 &#160;&#160;&#160;&#160;int fd,<br />
4761 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br />
4762 );</p>
4763 <h4 class="parameters">Parameters</h4>
4764 <dl>
4765 <dt>fd</dt>
4766 <dd class="description">HTTP data</dd>
4767 <dt>ipp</dt>
4768 <dd class="description">IPP data</dd>
4769 </dl>
4770 <h4 class="returnvalue">Return Value</h4>
4771 <p class="description">Current state</p>
4772 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="ippReadIO">ippReadIO</a></h3>
4773 <p class="description">Read data for an IPP message.</p>
4774 <p class="code">
4775 <a href="#ipp_state_t">ipp_state_t</a> ippReadIO (<br />
4776 &#160;&#160;&#160;&#160;void *src,<br />
4777 &#160;&#160;&#160;&#160;<a href="#ipp_iocb_t">ipp_iocb_t</a> cb,<br />
4778 &#160;&#160;&#160;&#160;int blocking,<br />
4779 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *parent,<br />
4780 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br />
4781 );</p>
4782 <h4 class="parameters">Parameters</h4>
4783 <dl>
4784 <dt>src</dt>
4785 <dd class="description">Data source</dd>
4786 <dt>cb</dt>
4787 <dd class="description">Read callback function</dd>
4788 <dt>blocking</dt>
4789 <dd class="description">Use blocking IO?</dd>
4790 <dt>parent</dt>
4791 <dd class="description">Parent request, if any</dd>
4792 <dt>ipp</dt>
4793 <dd class="description">IPP data</dd>
4794 </dl>
4795 <h4 class="returnvalue">Return Value</h4>
4796 <p class="description">Current state</p>
4797 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetBoolean">ippSetBoolean</a></h3>
4798 <p class="description">Set a boolean value in an attribute.</p>
4799 <p class="code">
4800 int ippSetBoolean (<br />
4801 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
4802 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br />
4803 &#160;&#160;&#160;&#160;int element,<br />
4804 &#160;&#160;&#160;&#160;int boolvalue<br />
4805 );</p>
4806 <h4 class="parameters">Parameters</h4>
4807 <dl>
4808 <dt>ipp</dt>
4809 <dd class="description">IPP message</dd>
4810 <dt>attr</dt>
4811 <dd class="description">IPP attribute</dd>
4812 <dt>element</dt>
4813 <dd class="description">Value number (0-based)</dd>
4814 <dt>boolvalue</dt>
4815 <dd class="description">Boolean value</dd>
4816 </dl>
4817 <h4 class="returnvalue">Return Value</h4>
4818 <p class="description">1 on success, 0 on failure</p>
4819 <h4 class="discussion">Discussion</h4>
4820 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4821 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>
4822 <br>
4823 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4824 <br>
4825 The <code>element</code> parameter specifies which value to set from 0 to
4826 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
4827
4828 </p>
4829 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetCollection">ippSetCollection</a></h3>
4830 <p class="description">Set a collection value in an attribute.</p>
4831 <p class="code">
4832 int ippSetCollection (<br />
4833 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
4834 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br />
4835 &#160;&#160;&#160;&#160;int element,<br />
4836 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *colvalue<br />
4837 );</p>
4838 <h4 class="parameters">Parameters</h4>
4839 <dl>
4840 <dt>ipp</dt>
4841 <dd class="description">IPP message</dd>
4842 <dt>attr</dt>
4843 <dd class="description">IPP attribute</dd>
4844 <dt>element</dt>
4845 <dd class="description">Value number (0-based)</dd>
4846 <dt>colvalue</dt>
4847 <dd class="description">Collection value</dd>
4848 </dl>
4849 <h4 class="returnvalue">Return Value</h4>
4850 <p class="description">1 on success, 0 on failure</p>
4851 <h4 class="discussion">Discussion</h4>
4852 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4853 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>
4854 <br>
4855 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4856 <br>
4857 The <code>element</code> parameter specifies which value to set from 0 to
4858 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
4859
4860 </p>
4861 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetDate">ippSetDate</a></h3>
4862 <p class="description">Set a date value in an attribute.</p>
4863 <p class="code">
4864 int ippSetDate (<br />
4865 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
4866 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br />
4867 &#160;&#160;&#160;&#160;int element,<br />
4868 &#160;&#160;&#160;&#160;const <a href="#ipp_uchar_t">ipp_uchar_t</a> *datevalue<br />
4869 );</p>
4870 <h4 class="parameters">Parameters</h4>
4871 <dl>
4872 <dt>ipp</dt>
4873 <dd class="description">IPP message</dd>
4874 <dt>attr</dt>
4875 <dd class="description">IPP attribute</dd>
4876 <dt>element</dt>
4877 <dd class="description">Value number (0-based)</dd>
4878 <dt>datevalue</dt>
4879 <dd class="description">Date value</dd>
4880 </dl>
4881 <h4 class="returnvalue">Return Value</h4>
4882 <p class="description">1 on success, 0 on failure</p>
4883 <h4 class="discussion">Discussion</h4>
4884 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4885 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>
4886 <br>
4887 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4888 <br>
4889 The <code>element</code> parameter specifies which value to set from 0 to
4890 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
4891
4892 </p>
4893 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetGroupTag">ippSetGroupTag</a></h3>
4894 <p class="description">Set the group tag of an attribute.</p>
4895 <p class="code">
4896 int ippSetGroupTag (<br />
4897 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
4898 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br />
4899 &#160;&#160;&#160;&#160;ipp_tag_t group_tag<br />
4900 );</p>
4901 <h4 class="parameters">Parameters</h4>
4902 <dl>
4903 <dt>ipp</dt>
4904 <dd class="description">IPP message</dd>
4905 <dt>attr</dt>
4906 <dd class="description">Attribute</dd>
4907 <dt>group_tag</dt>
4908 <dd class="description">Group tag</dd>
4909 </dl>
4910 <h4 class="returnvalue">Return Value</h4>
4911 <p class="description">1 on success, 0 on failure</p>
4912 <h4 class="discussion">Discussion</h4>
4913 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4914 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>
4915 <br>
4916 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4917 <br>
4918 The <code>group</code> parameter specifies the IPP attribute group tag: none
4919 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
4920 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
4921 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
4922 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).
4923
4924 </p>
4925 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetInteger">ippSetInteger</a></h3>
4926 <p class="description">Set an integer or enum value in an attribute.</p>
4927 <p class="code">
4928 int ippSetInteger (<br />
4929 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
4930 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br />
4931 &#160;&#160;&#160;&#160;int element,<br />
4932 &#160;&#160;&#160;&#160;int intvalue<br />
4933 );</p>
4934 <h4 class="parameters">Parameters</h4>
4935 <dl>
4936 <dt>ipp</dt>
4937 <dd class="description">IPP message</dd>
4938 <dt>attr</dt>
4939 <dd class="description">IPP attribute</dd>
4940 <dt>element</dt>
4941 <dd class="description">Value number (0-based)</dd>
4942 <dt>intvalue</dt>
4943 <dd class="description">Integer/enum value</dd>
4944 </dl>
4945 <h4 class="returnvalue">Return Value</h4>
4946 <p class="description">1 on success, 0 on failure</p>
4947 <h4 class="discussion">Discussion</h4>
4948 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4949 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>
4950 <br>
4951 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4952 <br>
4953 The <code>element</code> parameter specifies which value to set from 0 to
4954 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
4955
4956 </p>
4957 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetName">ippSetName</a></h3>
4958 <p class="description">Set the name of an attribute.</p>
4959 <p class="code">
4960 int ippSetName (<br />
4961 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
4962 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br />
4963 &#160;&#160;&#160;&#160;const char *name<br />
4964 );</p>
4965 <h4 class="parameters">Parameters</h4>
4966 <dl>
4967 <dt>ipp</dt>
4968 <dd class="description">IPP message</dd>
4969 <dt>attr</dt>
4970 <dd class="description">IPP attribute</dd>
4971 <dt>name</dt>
4972 <dd class="description">Attribute name</dd>
4973 </dl>
4974 <h4 class="returnvalue">Return Value</h4>
4975 <p class="description">1 on success, 0 on failure</p>
4976 <h4 class="discussion">Discussion</h4>
4977 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4978 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>
4979 <br>
4980 The <code>attr</code> parameter may be modified as a result of setting the value.
4981
4982 </p>
4983 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippSetOctetString">ippSetOctetString</a></h3>
4984 <p class="description">Set an octetString value in an IPP attribute.</p>
4985 <p class="code">
4986 int ippSetOctetString (<br />
4987 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
4988 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br />
4989 &#160;&#160;&#160;&#160;int element,<br />
4990 &#160;&#160;&#160;&#160;const void *data,<br />
4991 &#160;&#160;&#160;&#160;int datalen<br />
4992 );</p>
4993 <h4 class="parameters">Parameters</h4>
4994 <dl>
4995 <dt>ipp</dt>
4996 <dd class="description">IPP message</dd>
4997 <dt>attr</dt>
4998 <dd class="description">IPP attribute</dd>
4999 <dt>element</dt>
5000 <dd class="description">Value number (0-based)</dd>
5001 <dt>data</dt>
5002 <dd class="description">Pointer to octetString data</dd>
5003 <dt>datalen</dt>
5004 <dd class="description">Length of octetString data</dd>
5005 </dl>
5006 <h4 class="returnvalue">Return Value</h4>
5007 <p class="description">1 on success, 0 on failure</p>
5008 <h4 class="discussion">Discussion</h4>
5009 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5010 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>
5011 <br>
5012 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
5013 <br>
5014 The <code>element</code> parameter specifies which value to set from 0 to
5015 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
5016
5017 </p>
5018 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetOperation">ippSetOperation</a></h3>
5019 <p class="description">Set the operation ID in an IPP request message.</p>
5020 <p class="code">
5021 int ippSetOperation (<br />
5022 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
5023 &#160;&#160;&#160;&#160;ipp_op_t op<br />
5024 );</p>
5025 <h4 class="parameters">Parameters</h4>
5026 <dl>
5027 <dt>ipp</dt>
5028 <dd class="description">IPP request message</dd>
5029 <dt>op</dt>
5030 <dd class="description">Operation ID</dd>
5031 </dl>
5032 <h4 class="returnvalue">Return Value</h4>
5033 <p class="description">1 on success, 0 on failure</p>
5034 <h4 class="discussion">Discussion</h4>
5035 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5036 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.
5037
5038 </p>
5039 <h3 class="function"><a id="ippSetPort">ippSetPort</a></h3>
5040 <p class="description">Set the default port number.</p>
5041 <p class="code">
5042 void ippSetPort (<br />
5043 &#160;&#160;&#160;&#160;int p<br />
5044 );</p>
5045 <h4 class="parameters">Parameters</h4>
5046 <dl>
5047 <dt>p</dt>
5048 <dd class="description">Port number to use</dd>
5049 </dl>
5050 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetRange">ippSetRange</a></h3>
5051 <p class="description">Set a rangeOfInteger value in an attribute.</p>
5052 <p class="code">
5053 int ippSetRange (<br />
5054 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
5055 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br />
5056 &#160;&#160;&#160;&#160;int element,<br />
5057 &#160;&#160;&#160;&#160;int lowervalue,<br />
5058 &#160;&#160;&#160;&#160;int uppervalue<br />
5059 );</p>
5060 <h4 class="parameters">Parameters</h4>
5061 <dl>
5062 <dt>ipp</dt>
5063 <dd class="description">IPP message</dd>
5064 <dt>attr</dt>
5065 <dd class="description">IPP attribute</dd>
5066 <dt>element</dt>
5067 <dd class="description">Value number (0-based)</dd>
5068 <dt>lowervalue</dt>
5069 <dd class="description">Lower bound for range</dd>
5070 <dt>uppervalue</dt>
5071 <dd class="description">Upper bound for range</dd>
5072 </dl>
5073 <h4 class="returnvalue">Return Value</h4>
5074 <p class="description">1 on success, 0 on failure</p>
5075 <h4 class="discussion">Discussion</h4>
5076 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5077 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>
5078 <br>
5079 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
5080 <br>
5081 The <code>element</code> parameter specifies which value to set from 0 to
5082 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
5083
5084 </p>
5085 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetRequestId">ippSetRequestId</a></h3>
5086 <p class="description">Set the request ID in an IPP message.</p>
5087 <p class="code">
5088 int ippSetRequestId (<br />
5089 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
5090 &#160;&#160;&#160;&#160;int request_id<br />
5091 );</p>
5092 <h4 class="parameters">Parameters</h4>
5093 <dl>
5094 <dt>ipp</dt>
5095 <dd class="description">IPP message</dd>
5096 <dt>request_id</dt>
5097 <dd class="description">Request ID</dd>
5098 </dl>
5099 <h4 class="returnvalue">Return Value</h4>
5100 <p class="description">1 on success, 0 on failure</p>
5101 <h4 class="discussion">Discussion</h4>
5102 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5103 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>
5104 <br>
5105 The <code>request_id</code> parameter must be greater than 0.
5106
5107 </p>
5108 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetResolution">ippSetResolution</a></h3>
5109 <p class="description">Set a resolution value in an attribute.</p>
5110 <p class="code">
5111 int ippSetResolution (<br />
5112 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
5113 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br />
5114 &#160;&#160;&#160;&#160;int element,<br />
5115 &#160;&#160;&#160;&#160;<a href="#ipp_res_t">ipp_res_t</a> unitsvalue,<br />
5116 &#160;&#160;&#160;&#160;int xresvalue,<br />
5117 &#160;&#160;&#160;&#160;int yresvalue<br />
5118 );</p>
5119 <h4 class="parameters">Parameters</h4>
5120 <dl>
5121 <dt>ipp</dt>
5122 <dd class="description">IPP message</dd>
5123 <dt>attr</dt>
5124 <dd class="description">IPP attribute</dd>
5125 <dt>element</dt>
5126 <dd class="description">Value number (0-based)</dd>
5127 <dt>unitsvalue</dt>
5128 <dd class="description">Resolution units</dd>
5129 <dt>xresvalue</dt>
5130 <dd class="description">Horizontal/cross feed resolution</dd>
5131 <dt>yresvalue</dt>
5132 <dd class="description">Vertical/feed resolution</dd>
5133 </dl>
5134 <h4 class="returnvalue">Return Value</h4>
5135 <p class="description">1 on success, 0 on failure</p>
5136 <h4 class="discussion">Discussion</h4>
5137 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5138 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>
5139 <br>
5140 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
5141 <br>
5142 The <code>element</code> parameter specifies which value to set from 0 to
5143 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
5144
5145 </p>
5146 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetState">ippSetState</a></h3>
5147 <p class="description">Set the current state of the IPP message.</p>
5148 <p class="code">
5149 int ippSetState (<br />
5150 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
5151 &#160;&#160;&#160;&#160;<a href="#ipp_state_t">ipp_state_t</a> state<br />
5152 );</p>
5153 <h4 class="parameters">Parameters</h4>
5154 <dl>
5155 <dt>ipp</dt>
5156 <dd class="description">IPP message</dd>
5157 <dt>state</dt>
5158 <dd class="description">IPP state value</dd>
5159 </dl>
5160 <h4 class="returnvalue">Return Value</h4>
5161 <p class="description">1 on success, 0 on failure</p>
5162 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetStatusCode">ippSetStatusCode</a></h3>
5163 <p class="description">Set the status code in an IPP response or event message.</p>
5164 <p class="code">
5165 int ippSetStatusCode (<br />
5166 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
5167 &#160;&#160;&#160;&#160;ipp_status_t status<br />
5168 );</p>
5169 <h4 class="parameters">Parameters</h4>
5170 <dl>
5171 <dt>ipp</dt>
5172 <dd class="description">IPP response or event message</dd>
5173 <dt>status</dt>
5174 <dd class="description">Status code</dd>
5175 </dl>
5176 <h4 class="returnvalue">Return Value</h4>
5177 <p class="description">1 on success, 0 on failure</p>
5178 <h4 class="discussion">Discussion</h4>
5179 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5180 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.
5181
5182 </p>
5183 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetString">ippSetString</a></h3>
5184 <p class="description">Set a string value in an attribute.</p>
5185 <p class="code">
5186 int ippSetString (<br />
5187 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
5188 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br />
5189 &#160;&#160;&#160;&#160;int element,<br />
5190 &#160;&#160;&#160;&#160;const char *strvalue<br />
5191 );</p>
5192 <h4 class="parameters">Parameters</h4>
5193 <dl>
5194 <dt>ipp</dt>
5195 <dd class="description">IPP message</dd>
5196 <dt>attr</dt>
5197 <dd class="description">IPP attribute</dd>
5198 <dt>element</dt>
5199 <dd class="description">Value number (0-based)</dd>
5200 <dt>strvalue</dt>
5201 <dd class="description">String value</dd>
5202 </dl>
5203 <h4 class="returnvalue">Return Value</h4>
5204 <p class="description">1 on success, 0 on failure</p>
5205 <h4 class="discussion">Discussion</h4>
5206 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5207 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>
5208 <br>
5209 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
5210 <br>
5211 The <code>element</code> parameter specifies which value to set from 0 to
5212 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
5213
5214 </p>
5215 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippSetStringf">ippSetStringf</a></h3>
5216 <p class="description">Set a formatted string value of an attribute.</p>
5217 <p class="code">
5218 int ippSetStringf (<br />
5219 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
5220 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br />
5221 &#160;&#160;&#160;&#160;int element,<br />
5222 &#160;&#160;&#160;&#160;const char *format,<br />
5223 &#160;&#160;&#160;&#160;...<br />
5224 );</p>
5225 <h4 class="parameters">Parameters</h4>
5226 <dl>
5227 <dt>ipp</dt>
5228 <dd class="description">IPP message</dd>
5229 <dt>attr</dt>
5230 <dd class="description">IPP attribute</dd>
5231 <dt>element</dt>
5232 <dd class="description">Value number (0-based)</dd>
5233 <dt>format</dt>
5234 <dd class="description">Printf-style format string</dd>
5235 <dt>...</dt>
5236 <dd class="description">Additional arguments as needed</dd>
5237 </dl>
5238 <h4 class="returnvalue">Return Value</h4>
5239 <p class="description">1 on success, 0 on failure</p>
5240 <h4 class="discussion">Discussion</h4>
5241 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5242 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>
5243 <br>
5244 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
5245 <br>
5246 The <code>element</code> parameter specifies which value to set from 0 to
5247 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.<br>
5248 <br>
5249 The <code>format</code> parameter uses formatting characters compatible with the
5250 printf family of standard functions. Additional arguments follow it as
5251 needed. The formatted string is truncated as needed to the maximum length of
5252 the corresponding value type.
5253
5254 </p>
5255 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippSetStringfv">ippSetStringfv</a></h3>
5256 <p class="description">Set a formatted string value of an attribute.</p>
5257 <p class="code">
5258 int ippSetStringfv (<br />
5259 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
5260 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br />
5261 &#160;&#160;&#160;&#160;int element,<br />
5262 &#160;&#160;&#160;&#160;const char *format,<br />
5263 &#160;&#160;&#160;&#160;va_list ap<br />
5264 );</p>
5265 <h4 class="parameters">Parameters</h4>
5266 <dl>
5267 <dt>ipp</dt>
5268 <dd class="description">IPP message</dd>
5269 <dt>attr</dt>
5270 <dd class="description">IPP attribute</dd>
5271 <dt>element</dt>
5272 <dd class="description">Value number (0-based)</dd>
5273 <dt>format</dt>
5274 <dd class="description">Printf-style format string</dd>
5275 <dt>ap</dt>
5276 <dd class="description">Pointer to additional arguments</dd>
5277 </dl>
5278 <h4 class="returnvalue">Return Value</h4>
5279 <p class="description">1 on success, 0 on failure</p>
5280 <h4 class="discussion">Discussion</h4>
5281 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5282 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>
5283 <br>
5284 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
5285 <br>
5286 The <code>element</code> parameter specifies which value to set from 0 to
5287 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.<br>
5288 <br>
5289 The <code>format</code> parameter uses formatting characters compatible with the
5290 printf family of standard functions. Additional arguments follow it as
5291 needed. The formatted string is truncated as needed to the maximum length of
5292 the corresponding value type.
5293
5294 </p>
5295 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetValueTag">ippSetValueTag</a></h3>
5296 <p class="description">Set the value tag of an attribute.</p>
5297 <p class="code">
5298 int ippSetValueTag (<br />
5299 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
5300 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br />
5301 &#160;&#160;&#160;&#160;ipp_tag_t value_tag<br />
5302 );</p>
5303 <h4 class="parameters">Parameters</h4>
5304 <dl>
5305 <dt>ipp</dt>
5306 <dd class="description">IPP message</dd>
5307 <dt>attr</dt>
5308 <dd class="description">IPP attribute</dd>
5309 <dt>value_tag</dt>
5310 <dd class="description">Value tag</dd>
5311 </dl>
5312 <h4 class="returnvalue">Return Value</h4>
5313 <p class="description">1 on success, 0 on failure</p>
5314 <h4 class="discussion">Discussion</h4>
5315 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5316 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>
5317 <br>
5318 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
5319 <br>
5320 Integer (<code>IPP_TAG_INTEGER</code>) values can be promoted to rangeOfInteger
5321 (<code>IPP_TAG_RANGE</code>) values, the various string tags can be promoted to name
5322 (<code>IPP_TAG_NAME</code>) or nameWithLanguage (<code>IPP_TAG_NAMELANG</code>) values, text
5323 (<code>IPP_TAG_TEXT</code>) values can be promoted to textWithLanguage
5324 (<code>IPP_TAG_TEXTLANG</code>) values, and all values can be demoted to the various
5325 out-of-band value tags such as no-value (<code>IPP_TAG_NOVALUE</code>). All other changes
5326 will be rejected.<br>
5327 <br>
5328 Promoting a string attribute to nameWithLanguage or textWithLanguage adds the language
5329 code in the &quot;attributes-natural-language&quot; attribute or, if not present, the language
5330 code for the current locale.
5331
5332 </p>
5333 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetVersion">ippSetVersion</a></h3>
5334 <p class="description">Set the version number in an IPP message.</p>
5335 <p class="code">
5336 int ippSetVersion (<br />
5337 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br />
5338 &#160;&#160;&#160;&#160;int major,<br />
5339 &#160;&#160;&#160;&#160;int minor<br />
5340 );</p>
5341 <h4 class="parameters">Parameters</h4>
5342 <dl>
5343 <dt>ipp</dt>
5344 <dd class="description">IPP message</dd>
5345 <dt>major</dt>
5346 <dd class="description">Major version number (major.minor)</dd>
5347 <dt>minor</dt>
5348 <dd class="description">Minor version number (major.minor)</dd>
5349 </dl>
5350 <h4 class="returnvalue">Return Value</h4>
5351 <p class="description">1 on success, 0 on failure</p>
5352 <h4 class="discussion">Discussion</h4>
5353 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5354 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>
5355 <br>
5356 The valid version numbers are currently 1.0, 1.1, 2.0, 2.1, and 2.2.
5357
5358 </p>
5359 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="ippStateString">ippStateString</a></h3>
5360 <p class="description">Return the name corresponding to a state value.</p>
5361 <p class="code">
5362 const char *ippStateString (<br />
5363 &#160;&#160;&#160;&#160;<a href="#ipp_state_t">ipp_state_t</a> state<br />
5364 );</p>
5365 <h4 class="parameters">Parameters</h4>
5366 <dl>
5367 <dt>state</dt>
5368 <dd class="description">State value</dd>
5369 </dl>
5370 <h4 class="returnvalue">Return Value</h4>
5371 <p class="description">State name</p>
5372 <h3 class="function"><span class="info">&#160;CUPS 1.4/macOS 10.6&#160;</span><a id="ippTagString">ippTagString</a></h3>
5373 <p class="description">Return the tag name corresponding to a tag value.</p>
5374 <p class="code">
5375 const char *ippTagString (<br />
5376 &#160;&#160;&#160;&#160;ipp_tag_t tag<br />
5377 );</p>
5378 <h4 class="parameters">Parameters</h4>
5379 <dl>
5380 <dt>tag</dt>
5381 <dd class="description">Tag value</dd>
5382 </dl>
5383 <h4 class="returnvalue">Return Value</h4>
5384 <p class="description">Tag name</p>
5385 <h4 class="discussion">Discussion</h4>
5386 <p class="discussion">The returned names are defined in RFC 2911 and 3382.
5387
5388 </p>
5389 <h3 class="function"><span class="info">&#160;CUPS 1.4/macOS 10.6&#160;</span><a id="ippTagValue">ippTagValue</a></h3>
5390 <p class="description">Return the tag value corresponding to a tag name.</p>
5391 <p class="code">
5392 ipp_tag_t ippTagValue (<br />
5393 &#160;&#160;&#160;&#160;const char *name<br />
5394 );</p>
5395 <h4 class="parameters">Parameters</h4>
5396 <dl>
5397 <dt>name</dt>
5398 <dd class="description">Tag name</dd>
5399 </dl>
5400 <h4 class="returnvalue">Return Value</h4>
5401 <p class="description">Tag value</p>
5402 <h4 class="discussion">Discussion</h4>
5403 <p class="discussion">The tag names are defined in RFC 2911 and 3382.
5404
5405 </p>
5406 <h3 class="function"><a id="ippTimeToDate">ippTimeToDate</a></h3>
5407 <p class="description">Convert from UNIX time to RFC 1903 format.</p>
5408 <p class="code">
5409 const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippTimeToDate (<br />
5410 &#160;&#160;&#160;&#160;time_t t<br />
5411 );</p>
5412 <h4 class="parameters">Parameters</h4>
5413 <dl>
5414 <dt>t</dt>
5415 <dd class="description">UNIX time value</dd>
5416 </dl>
5417 <h4 class="returnvalue">Return Value</h4>
5418 <p class="description">RFC-1903 date/time data</p>
5419 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippValidateAttribute">ippValidateAttribute</a></h3>
5420 <p class="description">Validate the contents of an attribute.</p>
5421 <p class="code">
5422 int ippValidateAttribute (<br />
5423 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br />
5424 );</p>
5425 <h4 class="parameters">Parameters</h4>
5426 <dl>
5427 <dt>attr</dt>
5428 <dd class="description">Attribute</dd>
5429 </dl>
5430 <h4 class="returnvalue">Return Value</h4>
5431 <p class="description">1 if valid, 0 otherwise</p>
5432 <h4 class="discussion">Discussion</h4>
5433 <p class="discussion">This function validates the contents of an attribute based on the name and
5434 value tag. 1 is returned if the attribute is valid, 0 otherwise. On
5435 failure, cupsLastErrorString() is set to a human-readable message.
5436
5437 </p>
5438 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippValidateAttributes">ippValidateAttributes</a></h3>
5439 <p class="description">Validate all attributes in an IPP message.</p>
5440 <p class="code">
5441 int ippValidateAttributes (<br />
5442 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br />
5443 );</p>
5444 <h4 class="parameters">Parameters</h4>
5445 <dl>
5446 <dt>ipp</dt>
5447 <dd class="description">IPP message</dd>
5448 </dl>
5449 <h4 class="returnvalue">Return Value</h4>
5450 <p class="description">1 if valid, 0 otherwise</p>
5451 <h4 class="discussion">Discussion</h4>
5452 <p class="discussion">This function validates the contents of the IPP message, including each
5453 attribute. Like <a href="#ippValidateAttribute"><code>ippValidateAttribute</code></a>, cupsLastErrorString() is set
5454 to a human-readable message on failure.
5455
5456 </p>
5457 <h3 class="function"><a id="ippWrite">ippWrite</a></h3>
5458 <p class="description">Write data for an IPP message to a HTTP connection.</p>
5459 <p class="code">
5460 <a href="#ipp_state_t">ipp_state_t</a> ippWrite (<br />
5461 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br />
5462 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br />
5463 );</p>
5464 <h4 class="parameters">Parameters</h4>
5465 <dl>
5466 <dt>http</dt>
5467 <dd class="description">HTTP connection</dd>
5468 <dt>ipp</dt>
5469 <dd class="description">IPP data</dd>
5470 </dl>
5471 <h4 class="returnvalue">Return Value</h4>
5472 <p class="description">Current state</p>
5473 <h3 class="function"><span class="info">&#160;CUPS 1.1.19/macOS 10.3&#160;</span><a id="ippWriteFile">ippWriteFile</a></h3>
5474 <p class="description">Write data for an IPP message to a file.</p>
5475 <p class="code">
5476 <a href="#ipp_state_t">ipp_state_t</a> ippWriteFile (<br />
5477 &#160;&#160;&#160;&#160;int fd,<br />
5478 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br />
5479 );</p>
5480 <h4 class="parameters">Parameters</h4>
5481 <dl>
5482 <dt>fd</dt>
5483 <dd class="description">HTTP data</dd>
5484 <dt>ipp</dt>
5485 <dd class="description">IPP data</dd>
5486 </dl>
5487 <h4 class="returnvalue">Return Value</h4>
5488 <p class="description">Current state</p>
5489 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="ippWriteIO">ippWriteIO</a></h3>
5490 <p class="description">Write data for an IPP message.</p>
5491 <p class="code">
5492 <a href="#ipp_state_t">ipp_state_t</a> ippWriteIO (<br />
5493 &#160;&#160;&#160;&#160;void *dst,<br />
5494 &#160;&#160;&#160;&#160;<a href="#ipp_iocb_t">ipp_iocb_t</a> cb,<br />
5495 &#160;&#160;&#160;&#160;int blocking,<br />
5496 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *parent,<br />
5497 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br />
5498 );</p>
5499 <h4 class="parameters">Parameters</h4>
5500 <dl>
5501 <dt>dst</dt>
5502 <dd class="description">Destination</dd>
5503 <dt>cb</dt>
5504 <dd class="description">Write callback function</dd>
5505 <dt>blocking</dt>
5506 <dd class="description">Use blocking IO?</dd>
5507 <dt>parent</dt>
5508 <dd class="description">Parent IPP message</dd>
5509 <dt>ipp</dt>
5510 <dd class="description">IPP data</dd>
5511 </dl>
5512 <h4 class="returnvalue">Return Value</h4>
5513 <p class="description">Current state</p>
5514 <h2 class="title"><a id="TYPES">Data Types</a></h2>
5515 <h3 class="typedef"><a id="gss_auth_identity_desc">gss_auth_identity_desc</a></h3>
5516 <p class="description">Local functions...</p>
5517 <p class="code">
5518 typedef struct <a href="#gss_auth_identity">gss_auth_identity</a> gss_auth_identity_desc;
5519 </p>
5520 <h3 class="typedef"><a id="http_addr_t"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span>http_addr_t</a></h3>
5521 <p class="description">Socket address union, which
5522 makes using IPv6 and other
5523 address types easier and
5524 more portable. </p>
5525 <p class="code">
5526 typedef union _http_addr_u / http_addr_t;
5527 </p>
5528 <h3 class="typedef"><a id="http_addrlist_t"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span>http_addrlist_t</a></h3>
5529 <p class="description">Socket address list, which is
5530 used to enumerate all of the
5531 addresses that are associated
5532 with a hostname. </p>
5533 <p class="code">
5534 typedef struct <a href="#http_addrlist_s">http_addrlist_s</a> / http_addrlist_t;
5535 </p>
5536 <h3 class="typedef"><a id="http_auth_t">http_auth_t</a></h3>
5537 <p class="description">HTTP authentication types</p>
5538 <p class="code">
5539 typedef enum <a href="#http_auth_e">http_auth_e</a> http_auth_t;
5540 </p>
5541 <h3 class="typedef"><a id="http_credential_t"><span class="info">&#160;CUPS 1.5/macOS 10.7&#160;</span>http_credential_t</a></h3>
5542 <p class="description">HTTP credential data </p>
5543 <p class="code">
5544 typedef struct <a href="#http_credential_s">http_credential_s</a> http_credential_t;
5545 </p>
5546 <h3 class="typedef"><a id="http_encoding_t">http_encoding_t</a></h3>
5547 <p class="description">HTTP transfer encoding values</p>
5548 <p class="code">
5549 typedef enum <a href="#http_encoding_e">http_encoding_e</a> http_encoding_t;
5550 </p>
5551 <h3 class="typedef"><a id="http_encryption_t">http_encryption_t</a></h3>
5552 <p class="description">HTTP encryption values</p>
5553 <p class="code">
5554 typedef enum <a href="#http_encryption_e">http_encryption_e</a> http_encryption_t;
5555 </p>
5556 <h3 class="typedef"><a id="http_field_t">http_field_t</a></h3>
5557 <p class="description">HTTP field names</p>
5558 <p class="code">
5559 typedef enum <a href="#http_field_e">http_field_e</a> http_field_t;
5560 </p>
5561 <h3 class="typedef"><a id="http_keepalive_t">http_keepalive_t</a></h3>
5562 <p class="description">HTTP keep-alive values</p>
5563 <p class="code">
5564 typedef enum <a href="#http_keepalive_e">http_keepalive_e</a> http_keepalive_t;
5565 </p>
5566 <h3 class="typedef"><a id="http_state_t">http_state_t</a></h3>
5567 <p class="description">HTTP state values; states
5568 are server-oriented...</p>
5569 <p class="code">
5570 typedef enum <a href="#http_state_e">http_state_e</a> http_state_t;
5571 </p>
5572 <h3 class="typedef"><a id="http_t">http_t</a></h3>
5573 <p class="description">HTTP connection type</p>
5574 <p class="code">
5575 typedef struct _http_s http_t;
5576 </p>
5577 <h3 class="typedef"><a id="http_timeout_cb_t"><span class="info">&#160;CUPS 1.5/macOS 10.7&#160;</span>http_timeout_cb_t</a></h3>
5578 <p class="description">HTTP timeout callback </p>
5579 <p class="code">
5580 typedef int (*http_timeout_cb_t)(<a href="#http_t">http_t</a> *http, void *user_data);
5581 </p>
5582 <h3 class="typedef"><a id="http_trust_t"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span>http_trust_t</a></h3>
5583 <p class="description">Level of trust for credentials </p>
5584 <p class="code">
5585 typedef enum <a href="#http_trust_e">http_trust_e</a> http_trust_t;
5586 </p>
5587 <h3 class="typedef"><a id="http_uri_coding_t">http_uri_coding_t</a></h3>
5588 <p class="description">URI en/decode flags</p>
5589 <p class="code">
5590 typedef enum <a href="#http_uri_coding_e">http_uri_coding_e</a> http_uri_coding_t;
5591 </p>
5592 <h3 class="typedef"><a id="http_uri_status_t"><span class="info">&#160;CUPS 1.2&#160;</span>http_uri_status_t</a></h3>
5593 <p class="description">URI separation status </p>
5594 <p class="code">
5595 typedef enum <a href="#http_uri_status_e">http_uri_status_e</a> http_uri_status_t;
5596 </p>
5597 <h3 class="typedef"><a id="http_version_t">http_version_t</a></h3>
5598 <p class="description">HTTP version numbers</p>
5599 <p class="code">
5600 typedef enum <a href="#http_version_e">http_version_e</a> http_version_t;
5601 </p>
5602 <h3 class="typedef"><a id="ipp_attribute_t">ipp_attribute_t</a></h3>
5603 <p class="description">IPP attribute</p>
5604 <p class="code">
5605 typedef struct _ipp_attribute_s ipp_attribute_t;
5606 </p>
5607 <h3 class="typedef"><a id="ipp_copycb_t">ipp_copycb_t</a></h3>
5608 <p class="description">The following structures are PRIVATE starting with CUPS 1.6/macOS 10.8.
5609 Please use the new accessor functions available in CUPS 1.6 and later, as
5610 these definitions will be moved to a private header file in a future release.</p>
5611 <p class="code">
5612 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);
5613 </p>
5614 <h3 class="typedef"><a id="ipp_dstate_t">ipp_dstate_t</a></h3>
5615 <p class="description">Document states</p>
5616 <p class="code">
5617 typedef enum <a href="#ipp_dstate_e">ipp_dstate_e</a> ipp_dstate_t;
5618 </p>
5619 <h3 class="typedef"><a id="ipp_finish_t">ipp_finish_t</a></h3>
5620 <p class="description">Job collation types</p>
5621 <p class="code">
5622 typedef enum <a href="#ipp_finishings_e">ipp_finishings_e</a> ipp_finish_t;
5623 </p>
5624 <h3 class="typedef"><a id="ipp_iocb_t"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span>ipp_iocb_t</a></h3>
5625 <p class="description">IPP IO Callback Function </p>
5626 <p class="code">
5627 typedef ssize_t (*ipp_iocb_t)(void *context, <a href="#ipp_uchar_t">ipp_uchar_t</a> *buffer, size_t bytes);
5628 </p>
5629 <h3 class="typedef"><a id="ipp_jcollate_t">ipp_jcollate_t</a></h3>
5630 <p class="description">Job collation types</p>
5631 <p class="code">
5632 typedef enum <a href="#ipp_jcollate_e">ipp_jcollate_e</a> ipp_jcollate_t;
5633 </p>
5634 <h3 class="typedef"><a id="ipp_orient_t">ipp_orient_t</a></h3>
5635 <p class="description">Orientation values</p>
5636 <p class="code">
5637 typedef enum <a href="#ipp_orient_e">ipp_orient_e</a> ipp_orient_t;
5638 </p>
5639 <h3 class="typedef"><a id="ipp_pstate_t">ipp_pstate_t</a></h3>
5640 <p class="description">Printer states</p>
5641 <p class="code">
5642 typedef enum <a href="#ipp_pstate_e">ipp_pstate_e</a> ipp_pstate_t;
5643 </p>
5644 <h3 class="typedef"><a id="ipp_quality_t">ipp_quality_t</a></h3>
5645 <p class="description">Qualities</p>
5646 <p class="code">
5647 typedef enum <a href="#ipp_quality_e">ipp_quality_e</a> ipp_quality_t;
5648 </p>
5649 <h3 class="typedef"><a id="ipp_res_t">ipp_res_t</a></h3>
5650 <p class="description">Resolution units</p>
5651 <p class="code">
5652 typedef enum <a href="#ipp_res_e">ipp_res_e</a> ipp_res_t;
5653 </p>
5654 <h3 class="typedef"><a id="ipp_state_t">ipp_state_t</a></h3>
5655 <p class="description">IPP states</p>
5656 <p class="code">
5657 typedef enum <a href="#ipp_state_e">ipp_state_e</a> ipp_state_t;
5658 </p>
5659 <h3 class="typedef"><a id="ipp_t">ipp_t</a></h3>
5660 <p class="description">IPP request/response data</p>
5661 <p class="code">
5662 typedef struct _ipp_s ipp_t;
5663 </p>
5664 <h3 class="typedef"><a id="ipp_uchar_t">ipp_uchar_t</a></h3>
5665 <p class="description">Unsigned 8-bit integer/character</p>
5666 <p class="code">
5667 typedef unsigned char ipp_uchar_t;
5668 </p>
5669 <h2 class="title"><a id="STRUCTURES">Structures</a></h2>
5670 <h3 class="struct"><a id="gss_auth_identity">gss_auth_identity</a></h3>
5671 <p class="description">Local functions...</p>
5672 <p class="code">struct gss_auth_identity {<br />
5673 &#160;&#160;&#160;&#160;gss_buffer_t *credentialsRef;<br />
5674 &#160;&#160;&#160;&#160;uint32_t flags;<br />
5675 &#160;&#160;&#160;&#160;char *password;<br />
5676 &#160;&#160;&#160;&#160;char *realm;<br />
5677 &#160;&#160;&#160;&#160;uint32_t type;<br />
5678 &#160;&#160;&#160;&#160;char *username;<br />
5679 };</p>
5680 <h4 class="members">Members</h4>
5681 <dl>
5682 <dt>credentialsRef </dt>
5683 <dt>flags </dt>
5684 <dt>password </dt>
5685 <dt>realm </dt>
5686 <dt>type </dt>
5687 <dt>username </dt>
5688 </dl>
5689 <h3 class="struct"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="http_addrlist_s">http_addrlist_s</a></h3>
5690 <p class="description">Socket address list, which is
5691 used to enumerate all of the
5692 addresses that are associated
5693 with a hostname. </p>
5694 <p class="code">struct http_addrlist_s {<br />
5695 &#160;&#160;&#160;&#160;<a href="#http_addr_t">http_addr_t</a> addr;<br />
5696 &#160;&#160;&#160;&#160;struct <a href="#http_addrlist_s">http_addrlist_s</a> *next;<br />
5697 };</p>
5698 <h4 class="members">Members</h4>
5699 <dl>
5700 <dt>addr </dt>
5701 <dd class="description">Address</dd>
5702 <dt>next </dt>
5703 <dd class="description">Pointer to next address in list</dd>
5704 </dl>
5705 <h3 class="struct"><span class="info">&#160;CUPS 1.5/macOS 10.7&#160;</span><a id="http_credential_s">http_credential_s</a></h3>
5706 <p class="description">HTTP credential data </p>
5707 <p class="code">struct http_credential_s {<br />
5708 &#160;&#160;&#160;&#160;void *data;<br />
5709 &#160;&#160;&#160;&#160;size_t datalen;<br />
5710 };</p>
5711 <h4 class="members">Members</h4>
5712 <dl>
5713 <dt>data </dt>
5714 <dd class="description">Pointer to credential data</dd>
5715 <dt>datalen </dt>
5716 <dd class="description">Credential length</dd>
5717 </dl>
5718 <h3 class="struct"><a id="pollfd">pollfd</a></h3>
5719 <p class="description">User data (unused)</p>
5720 <p class="code">struct pollfd *pollfds, unsigned int num_pollfds, int timeout, void *context) {<br />
5721 &#160;&#160;&#160;&#160;void) context;<br />
5722 &#160;&#160;&#160;&#160;void) timeout;<br />
5723 };</p>
5724 <h4 class="members">Members</h4>
5725 <dl>
5726 <dt>context </dt>
5727 <dt>timeout </dt>
5728 </dl>
5729 <h2 class="title"><a id="ENUMERATIONS">Constants</a></h2>
5730 <h3 class="enumeration"><a id="http_auth_e">http_auth_e</a></h3>
5731 <p class="description">HTTP authentication types</p>
5732 <h4 class="constants">Constants</h4>
5733 <dl>
5734 <dt>HTTP_AUTH_BASIC </dt>
5735 <dd class="description">Basic authentication in use</dd>
5736 <dt>HTTP_AUTH_MD5 </dt>
5737 <dd class="description">Digest authentication in use</dd>
5738 <dt>HTTP_AUTH_MD5_INT </dt>
5739 <dd class="description">Digest authentication in use for body</dd>
5740 <dt>HTTP_AUTH_MD5_SESS </dt>
5741 <dd class="description">MD5-session authentication in use</dd>
5742 <dt>HTTP_AUTH_MD5_SESS_INT </dt>
5743 <dd class="description">MD5-session authentication in use for body</dd>
5744 <dt>HTTP_AUTH_NEGOTIATE <span class="info">&#160;CUPS 1.3/macOS 10.5&#160;</span></dt>
5745 <dd class="description">GSSAPI authentication in use </dd>
5746 <dt>HTTP_AUTH_NONE </dt>
5747 <dd class="description">No authentication in use</dd>
5748 </dl>
5749 <h3 class="enumeration"><a id="http_encoding_e">http_encoding_e</a></h3>
5750 <p class="description">HTTP transfer encoding values</p>
5751 <h4 class="constants">Constants</h4>
5752 <dl>
5753 <dt>HTTP_ENCODING_CHUNKED </dt>
5754 <dd class="description">Data is chunked</dd>
5755 <dt>HTTP_ENCODING_FIELDS </dt>
5756 <dd class="description">Sending HTTP fields</dd>
5757 <dt>HTTP_ENCODING_LENGTH </dt>
5758 <dd class="description">Data is sent with Content-Length</dd>
5759 </dl>
5760 <h3 class="enumeration"><a id="http_encryption_e">http_encryption_e</a></h3>
5761 <p class="description">HTTP encryption values</p>
5762 <h4 class="constants">Constants</h4>
5763 <dl>
5764 <dt>HTTP_ENCRYPTION_ALWAYS </dt>
5765 <dd class="description">Always encrypt (SSL)</dd>
5766 <dt>HTTP_ENCRYPTION_IF_REQUESTED </dt>
5767 <dd class="description">Encrypt if requested (TLS upgrade)</dd>
5768 <dt>HTTP_ENCRYPTION_NEVER </dt>
5769 <dd class="description">Never encrypt</dd>
5770 <dt>HTTP_ENCRYPTION_REQUIRED </dt>
5771 <dd class="description">Encryption is required (TLS upgrade)</dd>
5772 </dl>
5773 <h3 class="enumeration"><a id="http_field_e">http_field_e</a></h3>
5774 <p class="description">HTTP field names</p>
5775 <h4 class="constants">Constants</h4>
5776 <dl>
5777 <dt>HTTP_FIELD_ACCEPT_ENCODING <span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span></dt>
5778 <dd class="description">Accepting-Encoding field </dd>
5779 <dt>HTTP_FIELD_ACCEPT_LANGUAGE </dt>
5780 <dd class="description">Accept-Language field</dd>
5781 <dt>HTTP_FIELD_ACCEPT_RANGES </dt>
5782 <dd class="description">Accept-Ranges field</dd>
5783 <dt>HTTP_FIELD_ALLOW <span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span></dt>
5784 <dd class="description">Allow field </dd>
5785 <dt>HTTP_FIELD_AUTHORIZATION </dt>
5786 <dd class="description">Authorization field</dd>
5787 <dt>HTTP_FIELD_CONNECTION </dt>
5788 <dd class="description">Connection field</dd>
5789 <dt>HTTP_FIELD_CONTENT_ENCODING </dt>
5790 <dd class="description">Content-Encoding field</dd>
5791 <dt>HTTP_FIELD_CONTENT_LANGUAGE </dt>
5792 <dd class="description">Content-Language field</dd>
5793 <dt>HTTP_FIELD_CONTENT_LENGTH </dt>
5794 <dd class="description">Content-Length field</dd>
5795 <dt>HTTP_FIELD_CONTENT_LOCATION </dt>
5796 <dd class="description">Content-Location field</dd>
5797 <dt>HTTP_FIELD_CONTENT_MD5 </dt>
5798 <dd class="description">Content-MD5 field</dd>
5799 <dt>HTTP_FIELD_CONTENT_RANGE </dt>
5800 <dd class="description">Content-Range field</dd>
5801 <dt>HTTP_FIELD_CONTENT_TYPE </dt>
5802 <dd class="description">Content-Type field</dd>
5803 <dt>HTTP_FIELD_CONTENT_VERSION </dt>
5804 <dd class="description">Content-Version field</dd>
5805 <dt>HTTP_FIELD_DATE </dt>
5806 <dd class="description">Date field</dd>
5807 <dt>HTTP_FIELD_HOST </dt>
5808 <dd class="description">Host field</dd>
5809 <dt>HTTP_FIELD_IF_MODIFIED_SINCE </dt>
5810 <dd class="description">If-Modified-Since field</dd>
5811 <dt>HTTP_FIELD_IF_UNMODIFIED_SINCE </dt>
5812 <dd class="description">If-Unmodified-Since field</dd>
5813 <dt>HTTP_FIELD_KEEP_ALIVE </dt>
5814 <dd class="description">Keep-Alive field</dd>
5815 <dt>HTTP_FIELD_LAST_MODIFIED </dt>
5816 <dd class="description">Last-Modified field</dd>
5817 <dt>HTTP_FIELD_LINK </dt>
5818 <dd class="description">Link field</dd>
5819 <dt>HTTP_FIELD_LOCATION </dt>
5820 <dd class="description">Location field</dd>
5821 <dt>HTTP_FIELD_MAX </dt>
5822 <dd class="description">Maximum field index</dd>
5823 <dt>HTTP_FIELD_RANGE </dt>
5824 <dd class="description">Range field</dd>
5825 <dt>HTTP_FIELD_REFERER </dt>
5826 <dd class="description">Referer field</dd>
5827 <dt>HTTP_FIELD_RETRY_AFTER </dt>
5828 <dd class="description">Retry-After field</dd>
5829 <dt>HTTP_FIELD_SERVER <span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span></dt>
5830 <dd class="description">Server field </dd>
5831 <dt>HTTP_FIELD_TRANSFER_ENCODING </dt>
5832 <dd class="description">Transfer-Encoding field</dd>
5833 <dt>HTTP_FIELD_UNKNOWN </dt>
5834 <dd class="description">Unknown field</dd>
5835 <dt>HTTP_FIELD_UPGRADE </dt>
5836 <dd class="description">Upgrade field</dd>
5837 <dt>HTTP_FIELD_USER_AGENT </dt>
5838 <dd class="description">User-Agent field</dd>
5839 <dt>HTTP_FIELD_WWW_AUTHENTICATE </dt>
5840 <dd class="description">WWW-Authenticate field</dd>
5841 </dl>
5842 <h3 class="enumeration"><a id="http_keepalive_e">http_keepalive_e</a></h3>
5843 <p class="description">HTTP keep-alive values</p>
5844 <h4 class="constants">Constants</h4>
5845 <dl>
5846 <dt>HTTP_KEEPALIVE_OFF </dt>
5847 <dd class="description">No keep alive support</dd>
5848 <dt>HTTP_KEEPALIVE_ON </dt>
5849 <dd class="description">Use keep alive</dd>
5850 </dl>
5851 <h3 class="enumeration"><a id="http_state_e">http_state_e</a></h3>
5852 <p class="description">HTTP state values; states
5853 are server-oriented...</p>
5854 <h4 class="constants">Constants</h4>
5855 <dl>
5856 <dt>HTTP_STATE_CONNECT </dt>
5857 <dd class="description">CONNECT command, waiting for blank line</dd>
5858 <dt>HTTP_STATE_DELETE </dt>
5859 <dd class="description">DELETE command, waiting for blank line</dd>
5860 <dt>HTTP_STATE_ERROR </dt>
5861 <dd class="description">Error on socket</dd>
5862 <dt>HTTP_STATE_GET </dt>
5863 <dd class="description">GET command, waiting for blank line</dd>
5864 <dt>HTTP_STATE_GET_SEND </dt>
5865 <dd class="description">GET command, sending data</dd>
5866 <dt>HTTP_STATE_HEAD </dt>
5867 <dd class="description">HEAD command, waiting for blank line</dd>
5868 <dt>HTTP_STATE_OPTIONS </dt>
5869 <dd class="description">OPTIONS command, waiting for blank line</dd>
5870 <dt>HTTP_STATE_POST </dt>
5871 <dd class="description">POST command, waiting for blank line</dd>
5872 <dt>HTTP_STATE_POST_RECV </dt>
5873 <dd class="description">POST command, receiving data</dd>
5874 <dt>HTTP_STATE_POST_SEND </dt>
5875 <dd class="description">POST command, sending data</dd>
5876 <dt>HTTP_STATE_PUT </dt>
5877 <dd class="description">PUT command, waiting for blank line</dd>
5878 <dt>HTTP_STATE_PUT_RECV </dt>
5879 <dd class="description">PUT command, receiving data</dd>
5880 <dt>HTTP_STATE_STATUS </dt>
5881 <dd class="description">Command complete, sending status</dd>
5882 <dt>HTTP_STATE_TRACE </dt>
5883 <dd class="description">TRACE command, waiting for blank line</dd>
5884 <dt>HTTP_STATE_UNKNOWN_METHOD <span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span></dt>
5885 <dd class="description">Unknown request method, waiting for blank line </dd>
5886 <dt>HTTP_STATE_UNKNOWN_VERSION <span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span></dt>
5887 <dd class="description">Unknown request method, waiting for blank line </dd>
5888 <dt>HTTP_STATE_WAITING </dt>
5889 <dd class="description">Waiting for command</dd>
5890 </dl>
5891 <h3 class="enumeration"><a id="http_status_e">http_status_e</a></h3>
5892 <p class="description">HTTP status codes</p>
5893 <h4 class="constants">Constants</h4>
5894 <dl>
5895 <dt>HTTP_STATUS_ACCEPTED </dt>
5896 <dd class="description">DELETE command was successful</dd>
5897 <dt>HTTP_STATUS_BAD_GATEWAY </dt>
5898 <dd class="description">Bad gateway</dd>
5899 <dt>HTTP_STATUS_BAD_REQUEST </dt>
5900 <dd class="description">Bad request</dd>
5901 <dt>HTTP_STATUS_CONFLICT </dt>
5902 <dd class="description">Request is self-conflicting</dd>
5903 <dt>HTTP_STATUS_CONTINUE </dt>
5904 <dd class="description">Everything OK, keep going...</dd>
5905 <dt>HTTP_STATUS_CREATED </dt>
5906 <dd class="description">PUT command was successful</dd>
5907 <dt>HTTP_STATUS_CUPS_AUTHORIZATION_CANCELED <span class="info">&#160;CUPS 1.4&#160;</span></dt>
5908 <dd class="description">User canceled authorization </dd>
5909 <dt>HTTP_STATUS_CUPS_PKI_ERROR <span class="info">&#160;CUPS 1.5/macOS 10.7&#160;</span></dt>
5910 <dd class="description">Error negotiating a secure connection </dd>
5911 <dt>HTTP_STATUS_ERROR </dt>
5912 <dd class="description">An error response from httpXxxx()</dd>
5913 <dt>HTTP_STATUS_EXPECTATION_FAILED </dt>
5914 <dd class="description">The expectation given in an Expect header field was not met</dd>
5915 <dt>HTTP_STATUS_FORBIDDEN </dt>
5916 <dd class="description">Forbidden to access this URI</dd>
5917 <dt>HTTP_STATUS_GATEWAY_TIMEOUT </dt>
5918 <dd class="description">Gateway connection timed out</dd>
5919 <dt>HTTP_STATUS_GONE </dt>
5920 <dd class="description">Server has gone away</dd>
5921 <dt>HTTP_STATUS_LENGTH_REQUIRED </dt>
5922 <dd class="description">A content length or encoding is required</dd>
5923 <dt>HTTP_STATUS_METHOD_NOT_ALLOWED </dt>
5924 <dd class="description">Method is not allowed</dd>
5925 <dt>HTTP_STATUS_MOVED_PERMANENTLY </dt>
5926 <dd class="description">Document has moved permanently</dd>
5927 <dt>HTTP_STATUS_MOVED_TEMPORARILY </dt>
5928 <dd class="description">Document has moved temporarily</dd>
5929 <dt>HTTP_STATUS_MULTIPLE_CHOICES </dt>
5930 <dd class="description">Multiple files match request</dd>
5931 <dt>HTTP_STATUS_NONE <span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span></dt>
5932 <dd class="description">No Expect value </dd>
5933 <dt>HTTP_STATUS_NOT_ACCEPTABLE </dt>
5934 <dd class="description">Not Acceptable</dd>
5935 <dt>HTTP_STATUS_NOT_AUTHORITATIVE </dt>
5936 <dd class="description">Information isn't authoritative</dd>
5937 <dt>HTTP_STATUS_NOT_FOUND </dt>
5938 <dd class="description">URI was not found</dd>
5939 <dt>HTTP_STATUS_NOT_IMPLEMENTED </dt>
5940 <dd class="description">Feature not implemented</dd>
5941 <dt>HTTP_STATUS_NOT_MODIFIED </dt>
5942 <dd class="description">File not modified</dd>
5943 <dt>HTTP_STATUS_NOT_SUPPORTED </dt>
5944 <dd class="description">HTTP version not supported</dd>
5945 <dt>HTTP_STATUS_NO_CONTENT </dt>
5946 <dd class="description">Successful command, no new data</dd>
5947 <dt>HTTP_STATUS_OK </dt>
5948 <dd class="description">OPTIONS/GET/HEAD/POST/TRACE command was successful</dd>
5949 <dt>HTTP_STATUS_PARTIAL_CONTENT </dt>
5950 <dd class="description">Only a partial file was received/sent</dd>
5951 <dt>HTTP_STATUS_PAYMENT_REQUIRED </dt>
5952 <dd class="description">Payment required</dd>
5953 <dt>HTTP_STATUS_PRECONDITION </dt>
5954 <dd class="description">Precondition failed</dd>
5955 <dt>HTTP_STATUS_PROXY_AUTHENTICATION </dt>
5956 <dd class="description">Proxy Authentication is Required</dd>
5957 <dt>HTTP_STATUS_REQUESTED_RANGE </dt>
5958 <dd class="description">The requested range is not satisfiable</dd>
5959 <dt>HTTP_STATUS_REQUEST_TIMEOUT </dt>
5960 <dd class="description">Request timed out</dd>
5961 <dt>HTTP_STATUS_REQUEST_TOO_LARGE </dt>
5962 <dd class="description">Request entity too large</dd>
5963 <dt>HTTP_STATUS_RESET_CONTENT </dt>
5964 <dd class="description">Content was reset/recreated</dd>
5965 <dt>HTTP_STATUS_SEE_OTHER </dt>
5966 <dd class="description">See this other link...</dd>
5967 <dt>HTTP_STATUS_SERVER_ERROR </dt>
5968 <dd class="description">Internal server error</dd>
5969 <dt>HTTP_STATUS_SERVICE_UNAVAILABLE </dt>
5970 <dd class="description">Service is unavailable</dd>
5971 <dt>HTTP_STATUS_SWITCHING_PROTOCOLS </dt>
5972 <dd class="description">HTTP upgrade to TLS/SSL</dd>
5973 <dt>HTTP_STATUS_UNAUTHORIZED </dt>
5974 <dd class="description">Unauthorized to access host</dd>
5975 <dt>HTTP_STATUS_UNSUPPORTED_MEDIATYPE </dt>
5976 <dd class="description">The requested media type is unsupported</dd>
5977 <dt>HTTP_STATUS_UPGRADE_REQUIRED </dt>
5978 <dd class="description">Upgrade to SSL/TLS required</dd>
5979 <dt>HTTP_STATUS_URI_TOO_LONG </dt>
5980 <dd class="description">URI too long</dd>
5981 <dt>HTTP_STATUS_USE_PROXY </dt>
5982 <dd class="description">Must use a proxy to access this URI</dd>
5983 </dl>
5984 <h3 class="enumeration"><a id="http_trust_e"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span>http_trust_e</a></h3>
5985 <p class="description">Level of trust for credentials </p>
5986 <h4 class="constants">Constants</h4>
5987 <dl>
5988 <dt>HTTP_TRUST_CHANGED </dt>
5989 <dd class="description">Credentials have changed</dd>
5990 <dt>HTTP_TRUST_EXPIRED </dt>
5991 <dd class="description">Credentials are expired</dd>
5992 <dt>HTTP_TRUST_INVALID </dt>
5993 <dd class="description">Credentials are invalid</dd>
5994 <dt>HTTP_TRUST_OK </dt>
5995 <dd class="description">Credentials are OK/trusted</dd>
5996 <dt>HTTP_TRUST_RENEWED </dt>
5997 <dd class="description">Credentials have been renewed</dd>
5998 <dt>HTTP_TRUST_UNKNOWN </dt>
5999 <dd class="description">Credentials are unknown/new</dd>
6000 </dl>
6001 <h3 class="enumeration"><a id="http_uri_coding_e">http_uri_coding_e</a></h3>
6002 <p class="description">URI en/decode flags</p>
6003 <h4 class="constants">Constants</h4>
6004 <dl>
6005 <dt>HTTP_URI_CODING_ALL </dt>
6006 <dd class="description">En/decode everything</dd>
6007 <dt>HTTP_URI_CODING_HOSTNAME </dt>
6008 <dd class="description">En/decode the hostname portion</dd>
6009 <dt>HTTP_URI_CODING_MOST </dt>
6010 <dd class="description">En/decode all but the query</dd>
6011 <dt>HTTP_URI_CODING_NONE </dt>
6012 <dd class="description">Don't en/decode anything</dd>
6013 <dt>HTTP_URI_CODING_QUERY </dt>
6014 <dd class="description">En/decode the query portion</dd>
6015 <dt>HTTP_URI_CODING_RESOURCE </dt>
6016 <dd class="description">En/decode the resource portion</dd>
6017 <dt>HTTP_URI_CODING_RFC6874 </dt>
6018 <dd class="description">Use RFC 6874 address format</dd>
6019 <dt>HTTP_URI_CODING_USERNAME </dt>
6020 <dd class="description">En/decode the username portion</dd>
6021 </dl>
6022 <h3 class="enumeration"><a id="http_uri_status_e"><span class="info">&#160;CUPS 1.2&#160;</span>http_uri_status_e</a></h3>
6023 <p class="description">URI separation status </p>
6024 <h4 class="constants">Constants</h4>
6025 <dl>
6026 <dt>HTTP_URI_STATUS_BAD_ARGUMENTS </dt>
6027 <dd class="description">Bad arguments to function (error)</dd>
6028 <dt>HTTP_URI_STATUS_BAD_HOSTNAME </dt>
6029 <dd class="description">Bad hostname in URI (error)</dd>
6030 <dt>HTTP_URI_STATUS_BAD_PORT </dt>
6031 <dd class="description">Bad port number in URI (error)</dd>
6032 <dt>HTTP_URI_STATUS_BAD_RESOURCE </dt>
6033 <dd class="description">Bad resource in URI (error)</dd>
6034 <dt>HTTP_URI_STATUS_BAD_SCHEME </dt>
6035 <dd class="description">Bad scheme in URI (error)</dd>
6036 <dt>HTTP_URI_STATUS_BAD_URI </dt>
6037 <dd class="description">Bad/empty URI (error)</dd>
6038 <dt>HTTP_URI_STATUS_BAD_USERNAME </dt>
6039 <dd class="description">Bad username in URI (error)</dd>
6040 <dt>HTTP_URI_STATUS_MISSING_RESOURCE </dt>
6041 <dd class="description">Missing resource in URI (warning)</dd>
6042 <dt>HTTP_URI_STATUS_MISSING_SCHEME </dt>
6043 <dd class="description">Missing scheme in URI (warning)</dd>
6044 <dt>HTTP_URI_STATUS_OK </dt>
6045 <dd class="description">URI decoded OK</dd>
6046 <dt>HTTP_URI_STATUS_OVERFLOW </dt>
6047 <dd class="description">URI buffer for httpAssembleURI is too small</dd>
6048 <dt>HTTP_URI_STATUS_UNKNOWN_SCHEME </dt>
6049 <dd class="description">Unknown scheme in URI (warning)</dd>
6050 </dl>
6051 <h3 class="enumeration"><a id="http_version_e">http_version_e</a></h3>
6052 <p class="description">HTTP version numbers</p>
6053 <h4 class="constants">Constants</h4>
6054 <dl>
6055 <dt>HTTP_VERSION_0_9 </dt>
6056 <dd class="description">HTTP/0.9</dd>
6057 <dt>HTTP_VERSION_1_0 </dt>
6058 <dd class="description">HTTP/1.0</dd>
6059 <dt>HTTP_VERSION_1_1 </dt>
6060 <dd class="description">HTTP/1.1</dd>
6061 </dl>
6062 <h3 class="enumeration"><a id="ipp_dstate_e">ipp_dstate_e</a></h3>
6063 <p class="description">Document states</p>
6064 <h4 class="constants">Constants</h4>
6065 <dl>
6066 <dt>IPP_DOCUMENT_ABORTED </dt>
6067 <dd class="description">Document is aborted</dd>
6068 <dt>IPP_DOCUMENT_CANCELED </dt>
6069 <dd class="description">Document is canceled</dd>
6070 <dt>IPP_DOCUMENT_COMPLETED </dt>
6071 <dd class="description">Document is completed</dd>
6072 <dt>IPP_DOCUMENT_PENDING </dt>
6073 <dd class="description">Document is pending</dd>
6074 <dt>IPP_DOCUMENT_PROCESSING </dt>
6075 <dd class="description">Document is processing</dd>
6076 </dl>
6077 <h3 class="enumeration"><a id="ipp_finishings_e">ipp_finishings_e</a></h3>
6078 <p class="description">Finishings</p>
6079 <h4 class="constants">Constants</h4>
6080 <dl>
6081 <dt>IPP_FINISHINGS_BALE </dt>
6082 <dd class="description">Bale (any type)</dd>
6083 <dt>IPP_FINISHINGS_BIND </dt>
6084 <dd class="description">Bind</dd>
6085 <dt>IPP_FINISHINGS_BIND_BOTTOM </dt>
6086 <dd class="description">Bind on bottom</dd>
6087 <dt>IPP_FINISHINGS_BIND_LEFT </dt>
6088 <dd class="description">Bind on left</dd>
6089 <dt>IPP_FINISHINGS_BIND_RIGHT </dt>
6090 <dd class="description">Bind on right</dd>
6091 <dt>IPP_FINISHINGS_BIND_TOP </dt>
6092 <dd class="description">Bind on top</dd>
6093 <dt>IPP_FINISHINGS_BOOKLET_MAKER </dt>
6094 <dd class="description">Fold to make booklet</dd>
6095 <dt>IPP_FINISHINGS_COAT </dt>
6096 <dd class="description">Apply protective liquid or powder coating</dd>
6097 <dt>IPP_FINISHINGS_COVER </dt>
6098 <dd class="description">Add cover</dd>
6099 <dt>IPP_FINISHINGS_CUPS_FOLD_ACCORDIAN </dt>
6100 <dd class="description">Accordian-fold the paper vertically into four sections</dd>
6101 <dt>IPP_FINISHINGS_CUPS_FOLD_DOUBLE_GATE </dt>
6102 <dd class="description">Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically</dd>
6103 <dt>IPP_FINISHINGS_CUPS_FOLD_GATE </dt>
6104 <dd class="description">Fold the top and bottom quarters of the paper towards the midline</dd>
6105 <dt>IPP_FINISHINGS_CUPS_FOLD_HALF </dt>
6106 <dd class="description">Fold the paper in half vertically</dd>
6107 <dt>IPP_FINISHINGS_CUPS_FOLD_HALF_Z </dt>
6108 <dd class="description">Fold the paper in half horizontally, then Z-fold the paper vertically</dd>
6109 <dt>IPP_FINISHINGS_CUPS_FOLD_LEFT_GATE </dt>
6110 <dd class="description">Fold the top quarter of the paper towards the midline</dd>
6111 <dt>IPP_FINISHINGS_CUPS_FOLD_LETTER </dt>
6112 <dd class="description">Fold the paper into three sections vertically; sometimes also known as a C fold</dd>
6113 <dt>IPP_FINISHINGS_CUPS_FOLD_PARALLEL </dt>
6114 <dd class="description">Fold the paper in half vertically two times, yielding four sections</dd>
6115 <dt>IPP_FINISHINGS_CUPS_FOLD_POSTER </dt>
6116 <dd class="description">Fold the paper in half horizontally and vertically; sometimes also called a cross fold</dd>
6117 <dt>IPP_FINISHINGS_CUPS_FOLD_RIGHT_GATE </dt>
6118 <dd class="description">Fold the bottom quarter of the paper towards the midline</dd>
6119 <dt>IPP_FINISHINGS_CUPS_FOLD_Z </dt>
6120 <dd class="description">Fold the paper vertically into three sections, forming a Z</dd>
6121 <dt>IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_LEFT </dt>
6122 <dd class="description">Punch 1 hole bottom left</dd>
6123 <dt>IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_RIGHT </dt>
6124 <dd class="description">Punch 1 hole bottom right</dd>
6125 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_BOTTOM </dt>
6126 <dd class="description">Punch 2 holes bottom edge</dd>
6127 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_LEFT </dt>
6128 <dd class="description">Punch 2 holes left side</dd>
6129 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_RIGHT </dt>
6130 <dd class="description">Punch 2 holes right side</dd>
6131 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_TOP </dt>
6132 <dd class="description">Punch 2 holes top edge</dd>
6133 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_BOTTOM </dt>
6134 <dd class="description">Punch 4 holes bottom edge</dd>
6135 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_LEFT </dt>
6136 <dd class="description">Punch 4 holes left side</dd>
6137 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_RIGHT </dt>
6138 <dd class="description">Punch 4 holes right side</dd>
6139 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_TOP </dt>
6140 <dd class="description">Punch 4 holes top edge</dd>
6141 <dt>IPP_FINISHINGS_CUPS_PUNCH_TOP_LEFT </dt>
6142 <dd class="description">Punch 1 hole top left</dd>
6143 <dt>IPP_FINISHINGS_CUPS_PUNCH_TOP_RIGHT </dt>
6144 <dd class="description">Punch 1 hole top right</dd>
6145 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_BOTTOM </dt>
6146 <dd class="description">Punch 3 holes bottom edge</dd>
6147 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_LEFT </dt>
6148 <dd class="description">Punch 3 holes left side</dd>
6149 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_RIGHT </dt>
6150 <dd class="description">Punch 3 holes right side</dd>
6151 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_TOP </dt>
6152 <dd class="description">Punch 3 holes top edge</dd>
6153 <dt>IPP_FINISHINGS_EDGE_STITCH </dt>
6154 <dd class="description">Stitch along any side</dd>
6155 <dt>IPP_FINISHINGS_EDGE_STITCH_BOTTOM </dt>
6156 <dd class="description">Stitch along bottom edge</dd>
6157 <dt>IPP_FINISHINGS_EDGE_STITCH_LEFT </dt>
6158 <dd class="description">Stitch along left side</dd>
6159 <dt>IPP_FINISHINGS_EDGE_STITCH_RIGHT </dt>
6160 <dd class="description">Stitch along right side</dd>
6161 <dt>IPP_FINISHINGS_EDGE_STITCH_TOP </dt>
6162 <dd class="description">Stitch along top edge</dd>
6163 <dt>IPP_FINISHINGS_FOLD </dt>
6164 <dd class="description">Fold (any type)</dd>
6165 <dt>IPP_FINISHINGS_FOLD_ACCORDIAN </dt>
6166 <dd class="description">Accordian-fold the paper vertically into four sections</dd>
6167 <dt>IPP_FINISHINGS_FOLD_DOUBLE_GATE </dt>
6168 <dd class="description">Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically</dd>
6169 <dt>IPP_FINISHINGS_FOLD_ENGINEERING_Z </dt>
6170 <dd class="description">Fold the paper vertically into two small sections and one larger, forming an elongated Z</dd>
6171 <dt>IPP_FINISHINGS_FOLD_GATE </dt>
6172 <dd class="description">Fold the top and bottom quarters of the paper towards the midline</dd>
6173 <dt>IPP_FINISHINGS_FOLD_HALF </dt>
6174 <dd class="description">Fold the paper in half vertically</dd>
6175 <dt>IPP_FINISHINGS_FOLD_HALF_Z </dt>
6176 <dd class="description">Fold the paper in half horizontally, then Z-fold the paper vertically</dd>
6177 <dt>IPP_FINISHINGS_FOLD_LEFT_GATE </dt>
6178 <dd class="description">Fold the top quarter of the paper towards the midline</dd>
6179 <dt>IPP_FINISHINGS_FOLD_LETTER </dt>
6180 <dd class="description">Fold the paper into three sections vertically; sometimes also known as a C fold</dd>
6181 <dt>IPP_FINISHINGS_FOLD_PARALLEL </dt>
6182 <dd class="description">Fold the paper in half vertically two times, yielding four sections</dd>
6183 <dt>IPP_FINISHINGS_FOLD_POSTER </dt>
6184 <dd class="description">Fold the paper in half horizontally and vertically; sometimes also called a cross fold</dd>
6185 <dt>IPP_FINISHINGS_FOLD_RIGHT_GATE </dt>
6186 <dd class="description">Fold the bottom quarter of the paper towards the midline</dd>
6187 <dt>IPP_FINISHINGS_FOLD_Z </dt>
6188 <dd class="description">Fold the paper vertically into three sections, forming a Z</dd>
6189 <dt>IPP_FINISHINGS_JOG_OFFSET </dt>
6190 <dd class="description">Offset for binding (any type)</dd>
6191 <dt>IPP_FINISHINGS_LAMINATE </dt>
6192 <dd class="description">Apply protective (solid) material</dd>
6193 <dt>IPP_FINISHINGS_NONE </dt>
6194 <dd class="description">No finishing</dd>
6195 <dt>IPP_FINISHINGS_PUNCH </dt>
6196 <dd class="description">Punch (any location/count)</dd>
6197 <dt>IPP_FINISHINGS_PUNCH_BOTTOM_LEFT </dt>
6198 <dd class="description">Punch 1 hole bottom left</dd>
6199 <dt>IPP_FINISHINGS_PUNCH_BOTTOM_RIGHT </dt>
6200 <dd class="description">Punch 1 hole bottom right</dd>
6201 <dt>IPP_FINISHINGS_PUNCH_DUAL_BOTTOM </dt>
6202 <dd class="description">Punch 2 holes bottom edge</dd>
6203 <dt>IPP_FINISHINGS_PUNCH_DUAL_LEFT </dt>
6204 <dd class="description">Punch 2 holes left side</dd>
6205 <dt>IPP_FINISHINGS_PUNCH_DUAL_RIGHT </dt>
6206 <dd class="description">Punch 2 holes right side</dd>
6207 <dt>IPP_FINISHINGS_PUNCH_DUAL_TOP </dt>
6208 <dd class="description">Punch 2 holes top edge</dd>
6209 <dt>IPP_FINISHINGS_PUNCH_MULTIPLE_BOTTOM </dt>
6210 <dd class="description">Pucnh multiple holes bottom edge</dd>
6211 <dt>IPP_FINISHINGS_PUNCH_MULTIPLE_LEFT </dt>
6212 <dd class="description">Pucnh multiple holes left side</dd>
6213 <dt>IPP_FINISHINGS_PUNCH_MULTIPLE_RIGHT </dt>
6214 <dd class="description">Pucnh multiple holes right side</dd>
6215 <dt>IPP_FINISHINGS_PUNCH_MULTIPLE_TOP </dt>
6216 <dd class="description">Pucnh multiple holes top edge</dd>
6217 <dt>IPP_FINISHINGS_PUNCH_QUAD_BOTTOM </dt>
6218 <dd class="description">Punch 4 holes bottom edge</dd>
6219 <dt>IPP_FINISHINGS_PUNCH_QUAD_LEFT </dt>
6220 <dd class="description">Punch 4 holes left side</dd>
6221 <dt>IPP_FINISHINGS_PUNCH_QUAD_RIGHT </dt>
6222 <dd class="description">Punch 4 holes right side</dd>
6223 <dt>IPP_FINISHINGS_PUNCH_QUAD_TOP </dt>
6224 <dd class="description">Punch 4 holes top edge</dd>
6225 <dt>IPP_FINISHINGS_PUNCH_TOP_LEFT </dt>
6226 <dd class="description">Punch 1 hole top left</dd>
6227 <dt>IPP_FINISHINGS_PUNCH_TOP_RIGHT </dt>
6228 <dd class="description">Punch 1 hole top right</dd>
6229 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_BOTTOM </dt>
6230 <dd class="description">Punch 3 holes bottom edge</dd>
6231 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_LEFT </dt>
6232 <dd class="description">Punch 3 holes left side</dd>
6233 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_RIGHT </dt>
6234 <dd class="description">Punch 3 holes right side</dd>
6235 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_TOP </dt>
6236 <dd class="description">Punch 3 holes top edge</dd>
6237 <dt>IPP_FINISHINGS_SADDLE_STITCH </dt>
6238 <dd class="description">Staple interior</dd>
6239 <dt>IPP_FINISHINGS_STAPLE </dt>
6240 <dd class="description">Staple (any location)</dd>
6241 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_LEFT </dt>
6242 <dd class="description">Staple bottom left corner</dd>
6243 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT </dt>
6244 <dd class="description">Staple bottom right corner</dd>
6245 <dt>IPP_FINISHINGS_STAPLE_DUAL_BOTTOM </dt>
6246 <dd class="description">Two staples on bottom</dd>
6247 <dt>IPP_FINISHINGS_STAPLE_DUAL_LEFT </dt>
6248 <dd class="description">Two staples on left</dd>
6249 <dt>IPP_FINISHINGS_STAPLE_DUAL_RIGHT </dt>
6250 <dd class="description">Two staples on right</dd>
6251 <dt>IPP_FINISHINGS_STAPLE_DUAL_TOP </dt>
6252 <dd class="description">Two staples on top</dd>
6253 <dt>IPP_FINISHINGS_STAPLE_TOP_LEFT </dt>
6254 <dd class="description">Staple top left corner</dd>
6255 <dt>IPP_FINISHINGS_STAPLE_TOP_RIGHT </dt>
6256 <dd class="description">Staple top right corner</dd>
6257 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_BOTTOM </dt>
6258 <dd class="description">Three staples on bottom</dd>
6259 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_LEFT </dt>
6260 <dd class="description">Three staples on left</dd>
6261 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_RIGHT </dt>
6262 <dd class="description">Three staples on right</dd>
6263 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_TOP </dt>
6264 <dd class="description">Three staples on top</dd>
6265 <dt>IPP_FINISHINGS_TRIM </dt>
6266 <dd class="description">Trim (any type)</dd>
6267 <dt>IPP_FINISHINGS_TRIM_AFTER_COPIES </dt>
6268 <dd class="description">Trim output after each copy</dd>
6269 <dt>IPP_FINISHINGS_TRIM_AFTER_DOCUMENTS </dt>
6270 <dd class="description">Trim output after each document</dd>
6271 <dt>IPP_FINISHINGS_TRIM_AFTER_JOB </dt>
6272 <dd class="description">Trim output after job</dd>
6273 <dt>IPP_FINISHINGS_TRIM_AFTER_PAGES </dt>
6274 <dd class="description">Trim output after each page</dd>
6275 </dl>
6276 <h3 class="enumeration"><a id="ipp_jcollate_e">ipp_jcollate_e</a></h3>
6277 <p class="description">Job collation types</p>
6278 <h4 class="constants">Constants</h4>
6279 <dl>
6280 <dt>IPP_JCOLLATE_COLLATED_DOCUMENTS </dt>
6281 <dt>IPP_JCOLLATE_UNCOLLATED_DOCUMENTS </dt>
6282 <dt>IPP_JCOLLATE_UNCOLLATED_SHEETS </dt>
6283 </dl>
6284 <h3 class="enumeration"><a id="ipp_jstate_e">ipp_jstate_e</a></h3>
6285 <p class="description">Job states</p>
6286 <h4 class="constants">Constants</h4>
6287 <dl>
6288 <dt>IPP_JSTATE_ABORTED </dt>
6289 <dd class="description">Job has aborted due to error</dd>
6290 <dt>IPP_JSTATE_CANCELED </dt>
6291 <dd class="description">Job has been canceled</dd>
6292 <dt>IPP_JSTATE_COMPLETED </dt>
6293 <dd class="description">Job has completed successfully</dd>
6294 <dt>IPP_JSTATE_HELD </dt>
6295 <dd class="description">Job is held for printing</dd>
6296 <dt>IPP_JSTATE_PENDING </dt>
6297 <dd class="description">Job is waiting to be printed</dd>
6298 <dt>IPP_JSTATE_PROCESSING </dt>
6299 <dd class="description">Job is currently printing</dd>
6300 <dt>IPP_JSTATE_STOPPED </dt>
6301 <dd class="description">Job has been stopped</dd>
6302 </dl>
6303 <h3 class="enumeration"><a id="ipp_op_e">ipp_op_e</a></h3>
6304 <p class="description">IPP operations</p>
6305 <h4 class="constants">Constants</h4>
6306 <dl>
6307 <dt>IPP_OP_ACKNOWLEDGE_DOCUMENT </dt>
6308 <dd class="description">Acknowledge-Document</dd>
6309 <dt>IPP_OP_ACKNOWLEDGE_IDENTIFY_PRINTER </dt>
6310 <dd class="description">Acknowledge-Identify-Printer</dd>
6311 <dt>IPP_OP_ACKNOWLEDGE_JOB </dt>
6312 <dd class="description">Acknowledge-Job</dd>
6313 <dt>IPP_OP_ACTIVATE_PRINTER </dt>
6314 <dd class="description">Start a printer</dd>
6315 <dt>IPP_OP_ADD_DOCUMENT_IMAGES </dt>
6316 <dd class="description">Add-Document-Images</dd>
6317 <dt>IPP_OP_CANCEL_CURRENT_JOB </dt>
6318 <dd class="description">Cancel the current job</dd>
6319 <dt>IPP_OP_CANCEL_DOCUMENT </dt>
6320 <dd class="description">Cancel-Document</dd>
6321 <dt>IPP_OP_CANCEL_JOB </dt>
6322 <dd class="description">Cancel a job</dd>
6323 <dt>IPP_OP_CANCEL_JOBS </dt>
6324 <dd class="description">Cancel-Jobs</dd>
6325 <dt>IPP_OP_CANCEL_MY_JOBS </dt>
6326 <dd class="description">Cancel-My-Jobs</dd>
6327 <dt>IPP_OP_CANCEL_SUBSCRIPTION <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></dt>
6328 <dd class="description">Cancel a subscription </dd>
6329 <dt>IPP_OP_CLOSE_JOB </dt>
6330 <dd class="description">Close-Job</dd>
6331 <dt>IPP_OP_CREATE_JOB </dt>
6332 <dd class="description">Create an empty print job</dd>
6333 <dt>IPP_OP_CREATE_JOB_SUBSCRIPTIONS <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></dt>
6334 <dd class="description">Create one of more job subscriptions </dd>
6335 <dt>IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></dt>
6336 <dd class="description">Create one or more printer subscriptions </dd>
6337 <dt>IPP_OP_CUPS_ACCEPT_JOBS </dt>
6338 <dd class="description">Accept new jobs on a printer</dd>
6339 <dt>IPP_OP_CUPS_ADD_MODIFY_CLASS </dt>
6340 <dd class="description">Add or modify a class</dd>
6341 <dt>IPP_OP_CUPS_ADD_MODIFY_PRINTER </dt>
6342 <dd class="description">Add or modify a printer</dd>
6343 <dt>IPP_OP_CUPS_AUTHENTICATE_JOB <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></dt>
6344 <dd class="description">Authenticate a job </dd>
6345 <dt>IPP_OP_CUPS_CREATE_LOCAL_PRINTER <span class="info">&#160;CUPS 2.2&#160;</span></dt>
6346 <dd class="description">Create a local (temporary) printer <dt>IPP_OP_CUPS_DELETE_CLASS </dt>
6347 <dd class="description">Delete a class</dd>
6348 <dt>IPP_OP_CUPS_DELETE_PRINTER </dt>
6349 <dd class="description">Delete a printer</dd>
6350 <dt>IPP_OP_CUPS_GET_CLASSES <span class="info">&#160;DEPRECATED&#160;</span></dt>
6351 <dd class="description">Get a list of classes </dd>
6352 <dt>IPP_OP_CUPS_GET_DEFAULT </dt>
6353 <dd class="description">Get the default printer</dd>
6354 <dt>IPP_OP_CUPS_GET_DEVICES <span class="info">&#160;DEPRECATED&#160;</span></dt>
6355 <dd class="description">Get a list of supported devices </dd>
6356 <dt>IPP_OP_CUPS_GET_DOCUMENT <span class="info">&#160;CUPS 1.4/macOS 10.6&#160;</span></dt>
6357 <dd class="description">Get a document file </dd>
6358 <dt>IPP_OP_CUPS_GET_PPD <span class="info">&#160;DEPRECATED&#160;</span></dt>
6359 <dd class="description">Get a PPD file </dd>
6360 <dt>IPP_OP_CUPS_GET_PPDS <span class="info">&#160;DEPRECATED&#160;</span></dt>
6361 <dd class="description">Get a list of supported drivers </dd>
6362 <dt>IPP_OP_CUPS_GET_PRINTERS </dt>
6363 <dd class="description">Get a list of printers and/or classes</dd>
6364 <dt>IPP_OP_CUPS_INVALID </dt>
6365 <dd class="description">Invalid operation name for <a href="#ippOpValue"><code>ippOpValue</code></a></dd>
6366 <dt>IPP_OP_CUPS_MOVE_JOB </dt>
6367 <dd class="description">Move a job to a different printer</dd>
6368 <dt>IPP_OP_CUPS_REJECT_JOBS </dt>
6369 <dd class="description">Reject new jobs on a printer</dd>
6370 <dt>IPP_OP_CUPS_SET_DEFAULT </dt>
6371 <dd class="description">Set the default printer</dd>
6372 <dt>IPP_OP_DEACTIVATE_PRINTER </dt>
6373 <dd class="description">Stop a printer</dd>
6374 <dt>IPP_OP_DELETE_DOCUMENT </dt>
6375 <dd class="description">Delete-Document</dd>
6376 <dt>IPP_OP_DEREGISTER_OUTPUT_DEVICE </dt>
6377 <dd class="description">Deregister-Output-Device</dd>
6378 <dt>IPP_OP_DISABLE_PRINTER </dt>
6379 <dd class="description">Stop a printer</dd>
6380 <dt>IPP_OP_ENABLE_PRINTER </dt>
6381 <dd class="description">Start a printer</dd>
6382 <dt>IPP_OP_FETCH_DOCUMENT </dt>
6383 <dd class="description">Fetch-Document</dd>
6384 <dt>IPP_OP_FETCH_JOB </dt>
6385 <dd class="description">Fetch-Job</dd>
6386 <dt>IPP_OP_GET_DOCUMENTS </dt>
6387 <dd class="description">Get-Documents</dd>
6388 <dt>IPP_OP_GET_DOCUMENT_ATTRIBUTES </dt>
6389 <dd class="description">Get-Document-Attributes</dd>
6390 <dt>IPP_OP_GET_JOBS </dt>
6391 <dd class="description">Get a list of jobs</dd>
6392 <dt>IPP_OP_GET_JOB_ATTRIBUTES </dt>
6393 <dd class="description">Get job attributes</dd>
6394 <dt>IPP_OP_GET_NEXT_DOCUMENT_DATA </dt>
6395 <dd class="description">Get-Next-Document-Data</dd>
6396 <dt>IPP_OP_GET_NOTIFICATIONS <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></dt>
6397 <dd class="description">Get notification events </dd>
6398 <dt>IPP_OP_GET_OUTPUT_DEVICE_ATTRIBUTES </dt>
6399 <dd class="description">Get-Output-Device-Attributes</dd>
6400 <dt>IPP_OP_GET_PRINTER_ATTRIBUTES </dt>
6401 <dd class="description">Get printer attributes</dd>
6402 <dt>IPP_OP_GET_PRINTER_SUPPORTED_VALUES </dt>
6403 <dd class="description">Get supported attribute values</dd>
6404 <dt>IPP_OP_GET_SUBSCRIPTIONS <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></dt>
6405 <dd class="description">Get list of subscriptions </dd>
6406 <dt>IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></dt>
6407 <dd class="description">Get subscription attributes </dd>
6408 <dt>IPP_OP_HOLD_JOB </dt>
6409 <dd class="description">Hold a job for printing</dd>
6410 <dt>IPP_OP_HOLD_NEW_JOBS </dt>
6411 <dd class="description">Hold new jobs</dd>
6412 <dt>IPP_OP_IDENTIFY_PRINTER </dt>
6413 <dd class="description">Identify-Printer</dd>
6414 <dt>IPP_OP_PAUSE_PRINTER </dt>
6415 <dd class="description">Stop a printer</dd>
6416 <dt>IPP_OP_PAUSE_PRINTER_AFTER_CURRENT_JOB </dt>
6417 <dd class="description">Stop printer after the current job</dd>
6418 <dt>IPP_OP_PRINT_JOB </dt>
6419 <dd class="description">Print a single file</dd>
6420 <dt>IPP_OP_PRINT_URI </dt>
6421 <dd class="description">Print a single URL</dd>
6422 <dt>IPP_OP_PROMOTE_JOB </dt>
6423 <dd class="description">Promote a job to print sooner</dd>
6424 <dt>IPP_OP_PURGE_JOBS </dt>
6425 <dd class="description">Cancel all jobs</dd>
6426 <dt>IPP_OP_RELEASE_HELD_NEW_JOBS </dt>
6427 <dd class="description">Release new jobs</dd>
6428 <dt>IPP_OP_RELEASE_JOB </dt>
6429 <dd class="description">Release a job for printing</dd>
6430 <dt>IPP_OP_RENEW_SUBSCRIPTION <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></dt>
6431 <dd class="description">Renew a printer subscription </dd>
6432 <dt>IPP_OP_REPROCESS_JOB </dt>
6433 <dd class="description">Reprint a job</dd>
6434 <dt>IPP_OP_RESTART_JOB </dt>
6435 <dd class="description">Reprint a job</dd>
6436 <dt>IPP_OP_RESTART_PRINTER </dt>
6437 <dd class="description">Restart a printer</dd>
6438 <dt>IPP_OP_RESUBMIT_JOB </dt>
6439 <dd class="description">Resubmit-Job</dd>
6440 <dt>IPP_OP_RESUME_JOB </dt>
6441 <dd class="description">Resume the current job</dd>
6442 <dt>IPP_OP_RESUME_PRINTER </dt>
6443 <dd class="description">Start a printer</dd>
6444 <dt>IPP_OP_SCHEDULE_JOB_AFTER </dt>
6445 <dd class="description">Schedule a job to print after another</dd>
6446 <dt>IPP_OP_SEND_DOCUMENT </dt>
6447 <dd class="description">Add a file to a job</dd>
6448 <dt>IPP_OP_SEND_URI </dt>
6449 <dd class="description">Add a URL to a job</dd>
6450 <dt>IPP_OP_SET_DOCUMENT_ATTRIBUTES </dt>
6451 <dd class="description">Set-Document-Attributes</dd>
6452 <dt>IPP_OP_SET_JOB_ATTRIBUTES </dt>
6453 <dd class="description">Set job attributes</dd>
6454 <dt>IPP_OP_SET_PRINTER_ATTRIBUTES </dt>
6455 <dd class="description">Set printer attributes</dd>
6456 <dt>IPP_OP_SHUTDOWN_PRINTER </dt>
6457 <dd class="description">Turn a printer off</dd>
6458 <dt>IPP_OP_STARTUP_PRINTER </dt>
6459 <dd class="description">Turn a printer on</dd>
6460 <dt>IPP_OP_SUSPEND_CURRENT_JOB </dt>
6461 <dd class="description">Suspend the current job</dd>
6462 <dt>IPP_OP_UPDATE_ACTIVE_JOBS </dt>
6463 <dd class="description">Update-Active-Jobs</dd>
6464 <dt>IPP_OP_UPDATE_DOCUMENT_STATUS </dt>
6465 <dd class="description">Update-Document-Status</dd>
6466 <dt>IPP_OP_UPDATE_JOB_STATUS </dt>
6467 <dd class="description">Update-Job-Status</dd>
6468 <dt>IPP_OP_UPDATE_OUTPUT_DEVICE_ATTRIBUTES </dt>
6469 <dd class="description">Update-Output-Device-Attributes</dd>
6470 <dt>IPP_OP_VALIDATE_DOCUMENT </dt>
6471 <dd class="description">Validate-Document</dd>
6472 <dt>IPP_OP_VALIDATE_JOB </dt>
6473 <dd class="description">Validate job options</dd>
6474 </dl>
6475 <h3 class="enumeration"><a id="ipp_orient_e">ipp_orient_e</a></h3>
6476 <p class="description">Orientation values</p>
6477 <h4 class="constants">Constants</h4>
6478 <dl>
6479 <dt>IPP_ORIENT_LANDSCAPE </dt>
6480 <dd class="description">90 degrees counter-clockwise</dd>
6481 <dt>IPP_ORIENT_NONE </dt>
6482 <dd class="description">No rotation</dd>
6483 <dt>IPP_ORIENT_PORTRAIT </dt>
6484 <dd class="description">No rotation</dd>
6485 <dt>IPP_ORIENT_REVERSE_LANDSCAPE </dt>
6486 <dd class="description">90 degrees clockwise</dd>
6487 <dt>IPP_ORIENT_REVERSE_PORTRAIT </dt>
6488 <dd class="description">180 degrees</dd>
6489 </dl>
6490 <h3 class="enumeration"><a id="ipp_pstate_e">ipp_pstate_e</a></h3>
6491 <p class="description">Printer states</p>
6492 <h4 class="constants">Constants</h4>
6493 <dl>
6494 <dt>IPP_PSTATE_IDLE </dt>
6495 <dd class="description">Printer is idle</dd>
6496 <dt>IPP_PSTATE_PROCESSING </dt>
6497 <dd class="description">Printer is working</dd>
6498 <dt>IPP_PSTATE_STOPPED </dt>
6499 <dd class="description">Printer is stopped</dd>
6500 </dl>
6501 <h3 class="enumeration"><a id="ipp_quality_e">ipp_quality_e</a></h3>
6502 <p class="description">Qualities</p>
6503 <h4 class="constants">Constants</h4>
6504 <dl>
6505 <dt>IPP_QUALITY_DRAFT </dt>
6506 <dd class="description">Draft quality</dd>
6507 <dt>IPP_QUALITY_HIGH </dt>
6508 <dd class="description">High quality</dd>
6509 <dt>IPP_QUALITY_NORMAL </dt>
6510 <dd class="description">Normal quality</dd>
6511 </dl>
6512 <h3 class="enumeration"><a id="ipp_res_e">ipp_res_e</a></h3>
6513 <p class="description">Resolution units</p>
6514 <h4 class="constants">Constants</h4>
6515 <dl>
6516 <dt>IPP_RES_PER_CM </dt>
6517 <dd class="description">Pixels per centimeter</dd>
6518 <dt>IPP_RES_PER_INCH </dt>
6519 <dd class="description">Pixels per inch</dd>
6520 </dl>
6521 <h3 class="enumeration"><a id="ipp_state_e">ipp_state_e</a></h3>
6522 <p class="description">IPP states</p>
6523 <h4 class="constants">Constants</h4>
6524 <dl>
6525 <dt>IPP_STATE_ATTRIBUTE </dt>
6526 <dd class="description">One or more attributes need to be sent/received</dd>
6527 <dt>IPP_STATE_DATA </dt>
6528 <dd class="description">IPP request data needs to be sent/received</dd>
6529 <dt>IPP_STATE_ERROR </dt>
6530 <dd class="description">An error occurred</dd>
6531 <dt>IPP_STATE_HEADER </dt>
6532 <dd class="description">The request header needs to be sent/received</dd>
6533 <dt>IPP_STATE_IDLE </dt>
6534 <dd class="description">Nothing is happening/request completed</dd>
6535 </dl>
6536 <h3 class="enumeration"><a id="ipp_status_e">ipp_status_e</a></h3>
6537 <p class="description">IPP status codes</p>
6538 <h4 class="constants">Constants</h4>
6539 <dl>
6540 <dt>IPP_STATUS_CUPS_INVALID </dt>
6541 <dd class="description">Invalid status name for <a href="#ippErrorValue"><code>ippErrorValue</code></a></dd>
6542 <dt>IPP_STATUS_CUPS_SEE_OTHER </dt>
6543 <dd class="description">cups-see-other</dd>
6544 <dt>IPP_STATUS_ERROR_ACCOUNT_AUTHORIZATION_FAILED </dt>
6545 <dd class="description">client-error-account-authorization-failed</dd>
6546 <dt>IPP_STATUS_ERROR_ACCOUNT_CLOSED </dt>
6547 <dd class="description">client-error-account-closed</dd>
6548 <dt>IPP_STATUS_ERROR_ACCOUNT_INFO_NEEDED </dt>
6549 <dd class="description">client-error-account-info-needed</dd>
6550 <dt>IPP_STATUS_ERROR_ACCOUNT_LIMIT_REACHED </dt>
6551 <dd class="description">client-error-account-limit-reached</dd>
6552 <dt>IPP_STATUS_ERROR_ATTRIBUTES_NOT_SETTABLE </dt>
6553 <dd class="description">client-error-attributes-not-settable</dd>
6554 <dt>IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES </dt>
6555 <dd class="description">client-error-attributes-or-values-not-supported</dd>
6556 <dt>IPP_STATUS_ERROR_BAD_REQUEST </dt>
6557 <dd class="description">client-error-bad-request</dd>
6558 <dt>IPP_STATUS_ERROR_BUSY </dt>
6559 <dd class="description">server-error-busy</dd>
6560 <dt>IPP_STATUS_ERROR_CHARSET </dt>
6561 <dd class="description">client-error-charset-not-supported</dd>
6562 <dt>IPP_STATUS_ERROR_COMPRESSION_ERROR </dt>
6563 <dd class="description">client-error-compression-error</dd>
6564 <dt>IPP_STATUS_ERROR_COMPRESSION_NOT_SUPPORTED </dt>
6565 <dd class="description">client-error-compression-not-supported</dd>
6566 <dt>IPP_STATUS_ERROR_CONFLICTING </dt>
6567 <dd class="description">client-error-conflicting-attributes</dd>
6568 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED <span class="info">&#160;DEPRECATED&#160;</span></dt>
6569 <dd class="description">cups-error-account-authorization-failed </dd>
6570 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED </dt>
6571 <dd class="description">cups-error-account-closed @deprecate@</dd>
6572 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED <span class="info">&#160;DEPRECATED&#160;</span></dt>
6573 <dd class="description">cups-error-account-info-needed </dd>
6574 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_LIMIT_REACHED <span class="info">&#160;DEPRECATED&#160;</span></dt>
6575 <dd class="description">cups-error-account-limit-reached </dd>
6576 <dt>IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED <span class="info">&#160;CUPS 1.5/macOS 10.7&#160;</span></dt>
6577 <dd class="description">cups-authentication-canceled - Authentication canceled by user </dd>
6578 <dt>IPP_STATUS_ERROR_CUPS_PKI <span class="info">&#160;CUPS 1.5/macOS 10.7&#160;</span></dt>
6579 <dd class="description">cups-pki-error - Error negotiating a secure connection </dd>
6580 <dt>IPP_STATUS_ERROR_CUPS_UPGRADE_REQUIRED </dt>
6581 <dd class="description">cups-upgrade-required - TLS upgrade required</dd>
6582 <dt>IPP_STATUS_ERROR_DEVICE </dt>
6583 <dd class="description">server-error-device-error</dd>
6584 <dt>IPP_STATUS_ERROR_DOCUMENT_ACCESS </dt>
6585 <dd class="description">client-error-document-access-error</dd>
6586 <dt>IPP_STATUS_ERROR_DOCUMENT_FORMAT_ERROR </dt>
6587 <dd class="description">client-error-document-format-error</dd>
6588 <dt>IPP_STATUS_ERROR_DOCUMENT_FORMAT_NOT_SUPPORTED </dt>
6589 <dd class="description">client-error-document-format-not-supported</dd>
6590 <dt>IPP_STATUS_ERROR_DOCUMENT_PASSWORD </dt>
6591 <dd class="description">client-error-document-password-error</dd>
6592 <dt>IPP_STATUS_ERROR_DOCUMENT_PERMISSION </dt>
6593 <dd class="description">client-error-document-permission-error</dd>
6594 <dt>IPP_STATUS_ERROR_DOCUMENT_SECURITY </dt>
6595 <dd class="description">client-error-document-security-error</dd>
6596 <dt>IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE </dt>
6597 <dd class="description">client-error-document-unprintable-error</dd>
6598 <dt>IPP_STATUS_ERROR_FORBIDDEN </dt>
6599 <dd class="description">client-error-forbidden</dd>
6600 <dt>IPP_STATUS_ERROR_GONE </dt>
6601 <dd class="description">client-error-gone</dd>
6602 <dt>IPP_STATUS_ERROR_IGNORED_ALL_SUBSCRIPTIONS </dt>
6603 <dd class="description">client-error-ignored-all-subscriptions</dd>
6604 <dt>IPP_STATUS_ERROR_INTERNAL </dt>
6605 <dd class="description">server-error-internal-error</dd>
6606 <dt>IPP_STATUS_ERROR_JOB_CANCELED </dt>
6607 <dd class="description">server-error-job-canceled</dd>
6608 <dt>IPP_STATUS_ERROR_MULTIPLE_JOBS_NOT_SUPPORTED </dt>
6609 <dd class="description">server-error-multiple-document-jobs-not-supported</dd>
6610 <dt>IPP_STATUS_ERROR_NOT_ACCEPTING_JOBS </dt>
6611 <dd class="description">server-error-not-accepting-jobs</dd>
6612 <dt>IPP_STATUS_ERROR_NOT_AUTHENTICATED </dt>
6613 <dd class="description">client-error-not-authenticated</dd>
6614 <dt>IPP_STATUS_ERROR_NOT_AUTHORIZED </dt>
6615 <dd class="description">client-error-not-authorized</dd>
6616 <dt>IPP_STATUS_ERROR_NOT_FETCHABLE </dt>
6617 <dd class="description">client-error-not-fetchable</dd>
6618 <dt>IPP_STATUS_ERROR_NOT_FOUND </dt>
6619 <dd class="description">client-error-not-found</dd>
6620 <dt>IPP_STATUS_ERROR_NOT_POSSIBLE </dt>
6621 <dd class="description">client-error-not-possible</dd>
6622 <dt>IPP_STATUS_ERROR_OPERATION_NOT_SUPPORTED </dt>
6623 <dd class="description">server-error-operation-not-supported</dd>
6624 <dt>IPP_STATUS_ERROR_PRINTER_IS_DEACTIVATED </dt>
6625 <dd class="description">server-error-printer-is-deactivated</dd>
6626 <dt>IPP_STATUS_ERROR_REQUEST_ENTITY </dt>
6627 <dd class="description">client-error-request-entity-too-large</dd>
6628 <dt>IPP_STATUS_ERROR_REQUEST_VALUE </dt>
6629 <dd class="description">client-error-request-value-too-long</dd>
6630 <dt>IPP_STATUS_ERROR_SERVICE_UNAVAILABLE </dt>
6631 <dd class="description">server-error-service-unavailable</dd>
6632 <dt>IPP_STATUS_ERROR_TEMPORARY </dt>
6633 <dd class="description">server-error-temporary-error</dd>
6634 <dt>IPP_STATUS_ERROR_TIMEOUT </dt>
6635 <dd class="description">client-error-timeout</dd>
6636 <dt>IPP_STATUS_ERROR_TOO_MANY_DOCUMENTS </dt>
6637 <dd class="description">server-error-too-many-documents</dd>
6638 <dt>IPP_STATUS_ERROR_TOO_MANY_JOBS </dt>
6639 <dd class="description">server-error-too-many-jobs</dd>
6640 <dt>IPP_STATUS_ERROR_TOO_MANY_SUBSCRIPTIONS </dt>
6641 <dd class="description">client-error-too-many-subscriptions</dd>
6642 <dt>IPP_STATUS_ERROR_URI_SCHEME </dt>
6643 <dd class="description">client-error-uri-scheme-not-supported</dd>
6644 <dt>IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED </dt>
6645 <dd class="description">server-error-version-not-supported</dd>
6646 <dt>IPP_STATUS_OK </dt>
6647 <dd class="description">successful-ok</dd>
6648 <dt>IPP_STATUS_OK_CONFLICTING </dt>
6649 <dd class="description">successful-ok-conflicting-attributes</dd>
6650 <dt>IPP_STATUS_OK_EVENTS_COMPLETE </dt>
6651 <dd class="description">successful-ok-events-complete</dd>
6652 <dt>IPP_STATUS_OK_IGNORED_OR_SUBSTITUTED </dt>
6653 <dd class="description">successful-ok-ignored-or-substituted-attributes</dd>
6654 <dt>IPP_STATUS_OK_IGNORED_SUBSCRIPTIONS </dt>
6655 <dd class="description">successful-ok-ignored-subscriptions</dd>
6656 <dt>IPP_STATUS_OK_TOO_MANY_EVENTS </dt>
6657 <dd class="description">successful-ok-too-many-events</dd>
6658 </dl>
6659 <h3 class="enumeration"><a id="ipp_tag_e">ipp_tag_e</a></h3>
6660 <p class="description">Format tags for attributes</p>
6661 <h4 class="constants">Constants</h4>
6662 <dl>
6663 <dt>IPP_TAG_ADMINDEFINE </dt>
6664 <dd class="description">Admin-defined value</dd>
6665 <dt>IPP_TAG_BEGIN_COLLECTION </dt>
6666 <dd class="description">Beginning of collection value</dd>
6667 <dt>IPP_TAG_BOOLEAN </dt>
6668 <dd class="description">Boolean value</dd>
6669 <dt>IPP_TAG_CHARSET </dt>
6670 <dd class="description">Character set value</dd>
6671 <dt>IPP_TAG_CUPS_INVALID </dt>
6672 <dd class="description">Invalid tag name for <a href="#ippTagValue"><code>ippTagValue</code></a></dd>
6673 <dt>IPP_TAG_DATE </dt>
6674 <dd class="description">Date/time value</dd>
6675 <dt>IPP_TAG_DEFAULT </dt>
6676 <dd class="description">Default value</dd>
6677 <dt>IPP_TAG_DELETEATTR </dt>
6678 <dd class="description">Delete-attribute value</dd>
6679 <dt>IPP_TAG_DOCUMENT </dt>
6680 <dd class="description">Document group</dd>
6681 <dt>IPP_TAG_END </dt>
6682 <dd class="description">End-of-attributes</dd>
6683 <dt>IPP_TAG_END_COLLECTION </dt>
6684 <dd class="description">End of collection value</dd>
6685 <dt>IPP_TAG_ENUM </dt>
6686 <dd class="description">Enumeration value</dd>
6687 <dt>IPP_TAG_EVENT_NOTIFICATION </dt>
6688 <dd class="description">Event group</dd>
6689 <dt>IPP_TAG_EXTENSION </dt>
6690 <dd class="description">Extension point for 32-bit tags</dd>
6691 <dt>IPP_TAG_INTEGER </dt>
6692 <dd class="description">Integer value</dd>
6693 <dt>IPP_TAG_JOB </dt>
6694 <dd class="description">Job group</dd>
6695 <dt>IPP_TAG_KEYWORD </dt>
6696 <dd class="description">Keyword value</dd>
6697 <dt>IPP_TAG_LANGUAGE </dt>
6698 <dd class="description">Language value</dd>
6699 <dt>IPP_TAG_MEMBERNAME </dt>
6700 <dd class="description">Collection member name value</dd>
6701 <dt>IPP_TAG_MIMETYPE </dt>
6702 <dd class="description">MIME media type value</dd>
6703 <dt>IPP_TAG_NAME </dt>
6704 <dd class="description">Name value</dd>
6705 <dt>IPP_TAG_NAMELANG </dt>
6706 <dd class="description">Name-with-language value</dd>
6707 <dt>IPP_TAG_NOTSETTABLE </dt>
6708 <dd class="description">Not-settable value</dd>
6709 <dt>IPP_TAG_NOVALUE </dt>
6710 <dd class="description">No-value value</dd>
6711 <dt>IPP_TAG_OPERATION </dt>
6712 <dd class="description">Operation group</dd>
6713 <dt>IPP_TAG_PRINTER </dt>
6714 <dd class="description">Printer group</dd>
6715 <dt>IPP_TAG_RANGE </dt>
6716 <dd class="description">Range value</dd>
6717 <dt>IPP_TAG_RESOLUTION </dt>
6718 <dd class="description">Resolution value</dd>
6719 <dt>IPP_TAG_STRING </dt>
6720 <dd class="description">Octet string value</dd>
6721 <dt>IPP_TAG_SUBSCRIPTION </dt>
6722 <dd class="description">Subscription group</dd>
6723 <dt>IPP_TAG_TEXT </dt>
6724 <dd class="description">Text value</dd>
6725 <dt>IPP_TAG_TEXTLANG </dt>
6726 <dd class="description">Text-with-language value</dd>
6727 <dt>IPP_TAG_UNKNOWN </dt>
6728 <dd class="description">Unknown value</dd>
6729 <dt>IPP_TAG_UNSUPPORTED_GROUP </dt>
6730 <dd class="description">Unsupported attributes group</dd>
6731 <dt>IPP_TAG_UNSUPPORTED_VALUE </dt>
6732 <dd class="description">Unsupported value</dd>
6733 <dt>IPP_TAG_URI </dt>
6734 <dd class="description">URI value</dd>
6735 <dt>IPP_TAG_URISCHEME </dt>
6736 <dd class="description">URI scheme value</dd>
6737 <dt>IPP_TAG_ZERO </dt>
6738 <dd class="description">Zero tag - used for separators</dd>
6739 </dl>
6740 </div>
6741 </body>
6742 </html>