]> git.ipfire.org Git - thirdparty/cups.git/blob - doc/help/cupspm.html
Documentation updates.
[thirdparty/cups.git] / doc / help / cupspm.html
1 <!doctype html>
2 <html>
3 <!-- SECTION: Programming -->
4 <head>
5 <title>CUPS Programming Manual</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="Michael R Sweet">
10 <meta name="copyright" content="Copyright &#xa9; 2007-2017 by Apple Inc. All Rights Reserved.">
11 <meta name="version" content="2.2.4">
12 <style type="text/css"><!--
13 body, p, h1, h2, h3, h4 {
14 font-family: sans-serif;
15 }
16 div.body h1 {
17 font-size: 250%;
18 font-weight: bold;
19 margin: 0;
20 }
21 div.body h2 {
22 font-size: 250%;
23 margin-top: 1.5em;
24 }
25 div.body h3 {
26 font-size: 150%;
27 margin-bottom: 0.5em;
28 margin-top: 1.5em;
29 }
30 div.body h4 {
31 font-size: 110%;
32 margin-bottom: 0.5em;
33 margin-top: 1.5em;
34 }
35 div.body h5 {
36 font-size: 100%;
37 margin-bottom: 0.5em;
38 margin-top: 1.5em;
39 }
40 div.contents {
41 background: #e8e8e8;
42 border: solid thin black;
43 padding: 10px;
44 }
45 div.contents h1 {
46 font-size: 110%;
47 }
48 div.contents h2 {
49 font-size: 100%;
50 }
51 div.contents ul.contents {
52 font-size: 80%;
53 }
54 .class {
55 border-bottom: solid 2px gray;
56 }
57 .constants {
58 }
59 .description {
60 margin-top: 0.5em;
61 }
62 .discussion {
63 }
64 .enumeration {
65 border-bottom: solid 2px gray;
66 }
67 .function {
68 border-bottom: solid 2px gray;
69 margin-bottom: 0;
70 }
71 .members {
72 }
73 .method {
74 }
75 .parameters {
76 }
77 .returnvalue {
78 }
79 .struct {
80 border-bottom: solid 2px gray;
81 }
82 .typedef {
83 border-bottom: solid 2px gray;
84 }
85 .union {
86 border-bottom: solid 2px gray;
87 }
88 .variable {
89 }
90 h1, h2, h3, h4, h5, h6 {
91 page-break-inside: avoid;
92 }
93 blockquote {
94 border: solid thin gray;
95 box-shadow: 3px 3px 5px rgba(0,0,0,0.5);
96 padding: 0px 10px;
97 page-break-inside: avoid;
98 }
99 p code, li code, p.code, pre, ul.code li {
100 background: rgba(127,127,127,0.1);
101 border: thin dotted gray;
102 font-family: monospace;
103 font-size: 90%;
104 hyphens: manual;
105 -webkit-hyphens: manual;
106 page-break-inside: avoid;
107 }
108 p.code, pre, ul.code li {
109 padding: 10px;
110 }
111 p code, li code {
112 padding: 2px 5px;
113 }
114 a:link, a:visited {
115 text-decoration: none;
116 }
117 span.info {
118 background: black;
119 border: solid thin black;
120 color: white;
121 font-size: 80%;
122 font-style: italic;
123 font-weight: bold;
124 white-space: nowrap;
125 }
126 h3 span.info, h4 span.info {
127 float: right;
128 font-size: 100%;
129 }
130 ul.code, ul.contents, ul.subcontents {
131 list-style-type: none;
132 margin: 0;
133 padding-left: 0;
134 }
135 ul.code li {
136 margin: 0;
137 }
138 ul.contents > li {
139 margin-top: 1em;
140 }
141 ul.contents li ul.code, ul.contents li ul.subcontents {
142 padding-left: 2em;
143 }
144 div.body dl {
145 margin-top: 0;
146 }
147 div.body dt {
148 font-style: italic;
149 margin-top: 0;
150 }
151 div.body dd {
152 margin-bottom: 0.5em;
153 }
154 h1.title {
155 }
156 h2.title {
157 border-bottom: solid 2px black;
158 }
159 h3.title {
160 border-bottom: solid 2px black;
161 }
162 --></style>
163 </head>
164 <body>
165 <h1 class="title">CUPS Programming Manual</h1>
166 <p>Michael R Sweet</p>
167 <p>Copyright &#xa9; 2007-2017 by Apple Inc. All Rights Reserved.</p>
168 <div class="contents">
169 <h2 class="title">Contents</h2>
170 <ul class="contents">
171 <li><a href="#introduction">Introduction</a><ul class="subcontents">
172 <li><a href="#guidelines">Guidelines</a></li>
173 <li><a href="#terms-used-in-this-document">Terms Used in This Document</a></li>
174 <li><a href="#compiling-programs-that-use-the-cups-api">Compiling Programs That Use the CUPS API</a></li>
175 </ul></li>
176 <li><a href="#working-with-destinations">Working with Destinations</a><ul class="subcontents">
177 <li><a href="#finding-available-destinations">Finding Available Destinations</a></li>
178 <li><a href="#basic-destination-information">Basic Destination Information</a></li>
179 <li><a href="#detailed-destination-information">Detailed Destination Information</a></li>
180 <li><a href="#submitting-a-print-job">Submitting a Print Job</a></li>
181 </ul></li>
182 <li><a href="#FUNCTIONS">Functions</a><ul class="subcontents">
183 <li><a href="#cupsAddDest">cupsAddDest</a></li>
184 <li><a href="#cupsAddIntegerOption">cupsAddIntegerOption</a></li>
185 <li><a href="#cupsAddOption">cupsAddOption</a></li>
186 <li><a href="#cupsCancelDestJob">cupsCancelDestJob</a></li>
187 <li><a href="#cupsCheckDestSupported">cupsCheckDestSupported</a></li>
188 <li><a href="#cupsCloseDestJob">cupsCloseDestJob</a></li>
189 <li><a href="#cupsConnectDest">cupsConnectDest</a></li>
190 <li><a href="#cupsCopyDest">cupsCopyDest</a></li>
191 <li><a href="#cupsCopyDestConflicts">cupsCopyDestConflicts</a></li>
192 <li><a href="#cupsCopyDestInfo">cupsCopyDestInfo</a></li>
193 <li><a href="#cupsCreateDestJob">cupsCreateDestJob</a></li>
194 <li><a href="#cupsDoAuthentication">cupsDoAuthentication</a></li>
195 <li><a href="#cupsEncodeOptions">cupsEncodeOptions</a></li>
196 <li><a href="#cupsEncodeOptions2">cupsEncodeOptions2</a></li>
197 <li><a href="#cupsEncryption">cupsEncryption</a></li>
198 <li><a href="#cupsEnumDests">cupsEnumDests</a></li>
199 <li><a href="#cupsFindDestDefault">cupsFindDestDefault</a></li>
200 <li><a href="#cupsFindDestReady">cupsFindDestReady</a></li>
201 <li><a href="#cupsFindDestSupported">cupsFindDestSupported</a></li>
202 <li><a href="#cupsFinishDestDocument">cupsFinishDestDocument</a></li>
203 <li><a href="#cupsFreeDestInfo">cupsFreeDestInfo</a></li>
204 <li><a href="#cupsFreeDests">cupsFreeDests</a></li>
205 <li><a href="#cupsFreeJobs">cupsFreeJobs</a></li>
206 <li><a href="#cupsFreeOptions">cupsFreeOptions</a></li>
207 <li><a href="#cupsGetDest">cupsGetDest</a></li>
208 <li><a href="#cupsGetDestMediaByIndex">cupsGetDestMediaByIndex</a></li>
209 <li><a href="#cupsGetDestMediaByName">cupsGetDestMediaByName</a></li>
210 <li><a href="#cupsGetDestMediaBySize">cupsGetDestMediaBySize</a></li>
211 <li><a href="#cupsGetDestMediaCount">cupsGetDestMediaCount</a></li>
212 <li><a href="#cupsGetDestMediaDefault">cupsGetDestMediaDefault</a></li>
213 <li><a href="#cupsGetDestWithURI">cupsGetDestWithURI</a></li>
214 <li><a href="#cupsGetIntegerOption">cupsGetIntegerOption</a></li>
215 <li><a href="#cupsGetJobs2">cupsGetJobs2</a></li>
216 <li><a href="#cupsGetNamedDest">cupsGetNamedDest</a></li>
217 <li><a href="#cupsGetOption">cupsGetOption</a></li>
218 <li><a href="#cupsGetPassword2">cupsGetPassword2</a></li>
219 <li><a href="#cupsLangDefault">cupsLangDefault</a></li>
220 <li><a href="#cupsLangEncoding">cupsLangEncoding</a></li>
221 <li><a href="#cupsLangFlush">cupsLangFlush</a></li>
222 <li><a href="#cupsLangFree">cupsLangFree</a></li>
223 <li><a href="#cupsLangGet">cupsLangGet</a></li>
224 <li><a href="#cupsLocalizeDestMedia">cupsLocalizeDestMedia</a></li>
225 <li><a href="#cupsLocalizeDestOption">cupsLocalizeDestOption</a></li>
226 <li><a href="#cupsLocalizeDestValue">cupsLocalizeDestValue</a></li>
227 <li><a href="#cupsMakeServerCredentials">cupsMakeServerCredentials</a></li>
228 <li><a href="#cupsNotifySubject">cupsNotifySubject</a></li>
229 <li><a href="#cupsNotifyText">cupsNotifyText</a></li>
230 <li><a href="#cupsParseOptions">cupsParseOptions</a></li>
231 <li><a href="#cupsRemoveDest">cupsRemoveDest</a></li>
232 <li><a href="#cupsRemoveOption">cupsRemoveOption</a></li>
233 <li><a href="#cupsServer">cupsServer</a></li>
234 <li><a href="#cupsSetClientCertCB">cupsSetClientCertCB</a></li>
235 <li><a href="#cupsSetCredentials">cupsSetCredentials</a></li>
236 <li><a href="#cupsSetDefaultDest">cupsSetDefaultDest</a></li>
237 <li><a href="#cupsSetDests">cupsSetDests</a></li>
238 <li><a href="#cupsSetDests2">cupsSetDests2</a></li>
239 <li><a href="#cupsSetEncryption">cupsSetEncryption</a></li>
240 <li><a href="#cupsSetPasswordCB">cupsSetPasswordCB</a></li>
241 <li><a href="#cupsSetPasswordCB2">cupsSetPasswordCB2</a></li>
242 <li><a href="#cupsSetServer">cupsSetServer</a></li>
243 <li><a href="#cupsSetServerCertCB">cupsSetServerCertCB</a></li>
244 <li><a href="#cupsSetServerCredentials">cupsSetServerCredentials</a></li>
245 <li><a href="#cupsSetUser">cupsSetUser</a></li>
246 <li><a href="#cupsSetUserAgent">cupsSetUserAgent</a></li>
247 <li><a href="#cupsStartDestDocument">cupsStartDestDocument</a></li>
248 <li><a href="#cupsUser">cupsUser</a></li>
249 <li><a href="#cupsUserAgent">cupsUserAgent</a></li>
250 <li><a href="#httpAcceptConnection">httpAcceptConnection</a></li>
251 <li><a href="#httpAddCredential">httpAddCredential</a></li>
252 <li><a href="#httpAddrAny">httpAddrAny</a></li>
253 <li><a href="#httpAddrClose">httpAddrClose</a></li>
254 <li><a href="#httpAddrConnect2">httpAddrConnect2</a></li>
255 <li><a href="#httpAddrCopyList">httpAddrCopyList</a></li>
256 <li><a href="#httpAddrEqual">httpAddrEqual</a></li>
257 <li><a href="#httpAddrFamily">httpAddrFamily</a></li>
258 <li><a href="#httpAddrFreeList">httpAddrFreeList</a></li>
259 <li><a href="#httpAddrGetList">httpAddrGetList</a></li>
260 <li><a href="#httpAddrLength">httpAddrLength</a></li>
261 <li><a href="#httpAddrListen">httpAddrListen</a></li>
262 <li><a href="#httpAddrLocalhost">httpAddrLocalhost</a></li>
263 <li><a href="#httpAddrLookup">httpAddrLookup</a></li>
264 <li><a href="#httpAddrPort">httpAddrPort</a></li>
265 <li><a href="#httpAddrString">httpAddrString</a></li>
266 <li><a href="#httpAssembleURI">httpAssembleURI</a></li>
267 <li><a href="#httpAssembleURIf">httpAssembleURIf</a></li>
268 <li><a href="#httpAssembleUUID">httpAssembleUUID</a></li>
269 <li><a href="#httpBlocking">httpBlocking</a></li>
270 <li><a href="#httpCheck">httpCheck</a></li>
271 <li><a href="#httpClearCookie">httpClearCookie</a></li>
272 <li><a href="#httpClearFields">httpClearFields</a></li>
273 <li><a href="#httpClose">httpClose</a></li>
274 <li><a href="#httpCompareCredentials">httpCompareCredentials</a></li>
275 <li><a href="#httpConnect2">httpConnect2</a></li>
276 <li><a href="#httpCopyCredentials">httpCopyCredentials</a></li>
277 <li><a href="#httpCredentialsAreValidForName">httpCredentialsAreValidForName</a></li>
278 <li><a href="#httpCredentialsGetExpiration">httpCredentialsGetExpiration</a></li>
279 <li><a href="#httpCredentialsGetTrust">httpCredentialsGetTrust</a></li>
280 <li><a href="#httpCredentialsString">httpCredentialsString</a></li>
281 <li><a href="#httpDecode64_2">httpDecode64_2</a></li>
282 <li><a href="#httpDelete">httpDelete</a></li>
283 <li><a href="#httpEncode64_2">httpEncode64_2</a></li>
284 <li><a href="#httpEncryption">httpEncryption</a></li>
285 <li><a href="#httpError">httpError</a></li>
286 <li><a href="#httpFieldValue">httpFieldValue</a></li>
287 <li><a href="#httpFlush">httpFlush</a></li>
288 <li><a href="#httpFlushWrite">httpFlushWrite</a></li>
289 <li><a href="#httpFreeCredentials">httpFreeCredentials</a></li>
290 <li><a href="#httpGet">httpGet</a></li>
291 <li><a href="#httpGetActivity">httpGetActivity</a></li>
292 <li><a href="#httpGetAddress">httpGetAddress</a></li>
293 <li><a href="#httpGetAuthString">httpGetAuthString</a></li>
294 <li><a href="#httpGetBlocking">httpGetBlocking</a></li>
295 <li><a href="#httpGetContentEncoding">httpGetContentEncoding</a></li>
296 <li><a href="#httpGetCookie">httpGetCookie</a></li>
297 <li><a href="#httpGetDateString2">httpGetDateString2</a></li>
298 <li><a href="#httpGetDateTime">httpGetDateTime</a></li>
299 <li><a href="#httpGetEncryption">httpGetEncryption</a></li>
300 <li><a href="#httpGetExpect">httpGetExpect</a></li>
301 <li><a href="#httpGetFd">httpGetFd</a></li>
302 <li><a href="#httpGetField">httpGetField</a></li>
303 <li><a href="#httpGetHostByName">httpGetHostByName</a></li>
304 <li><a href="#httpGetHostname">httpGetHostname</a></li>
305 <li><a href="#httpGetKeepAlive">httpGetKeepAlive</a></li>
306 <li><a href="#httpGetLength2">httpGetLength2</a></li>
307 <li><a href="#httpGetPending">httpGetPending</a></li>
308 <li><a href="#httpGetReady">httpGetReady</a></li>
309 <li><a href="#httpGetRemaining">httpGetRemaining</a></li>
310 <li><a href="#httpGetState">httpGetState</a></li>
311 <li><a href="#httpGetStatus">httpGetStatus</a></li>
312 <li><a href="#httpGetSubField2">httpGetSubField2</a></li>
313 <li><a href="#httpGetVersion">httpGetVersion</a></li>
314 <li><a href="#httpGets">httpGets</a></li>
315 <li><a href="#httpHead">httpHead</a></li>
316 <li><a href="#httpInitialize">httpInitialize</a></li>
317 <li><a href="#httpIsChunked">httpIsChunked</a></li>
318 <li><a href="#httpIsEncrypted">httpIsEncrypted</a></li>
319 <li><a href="#httpLoadCredentials">httpLoadCredentials</a></li>
320 <li><a href="#httpOptions">httpOptions</a></li>
321 <li><a href="#httpPeek">httpPeek</a></li>
322 <li><a href="#httpPost">httpPost</a></li>
323 <li><a href="#httpPut">httpPut</a></li>
324 <li><a href="#httpRead2">httpRead2</a></li>
325 <li><a href="#httpReadRequest">httpReadRequest</a></li>
326 <li><a href="#httpReconnect2">httpReconnect2</a></li>
327 <li><a href="#httpResolveHostname">httpResolveHostname</a></li>
328 <li><a href="#httpSaveCredentials">httpSaveCredentials</a></li>
329 <li><a href="#httpSeparate">httpSeparate</a></li>
330 <li><a href="#httpSeparate2">httpSeparate2</a></li>
331 <li><a href="#httpSeparateURI">httpSeparateURI</a></li>
332 <li><a href="#httpSetAuthString">httpSetAuthString</a></li>
333 <li><a href="#httpSetCookie">httpSetCookie</a></li>
334 <li><a href="#httpSetCredentials">httpSetCredentials</a></li>
335 <li><a href="#httpSetDefaultField">httpSetDefaultField</a></li>
336 <li><a href="#httpSetExpect">httpSetExpect</a></li>
337 <li><a href="#httpSetField">httpSetField</a></li>
338 <li><a href="#httpSetKeepAlive">httpSetKeepAlive</a></li>
339 <li><a href="#httpSetLength">httpSetLength</a></li>
340 <li><a href="#httpSetTimeout">httpSetTimeout</a></li>
341 <li><a href="#httpShutdown">httpShutdown</a></li>
342 <li><a href="#httpStateString">httpStateString</a></li>
343 <li><a href="#httpStatus">httpStatus</a></li>
344 <li><a href="#httpTrace">httpTrace</a></li>
345 <li><a href="#httpURIStatusString">httpURIStatusString</a></li>
346 <li><a href="#httpUpdate">httpUpdate</a></li>
347 <li><a href="#httpWait">httpWait</a></li>
348 <li><a href="#httpWrite2">httpWrite2</a></li>
349 <li><a href="#httpWriteResponse">httpWriteResponse</a></li>
350 <li><a href="#ippAddBoolean">ippAddBoolean</a></li>
351 <li><a href="#ippAddBooleans">ippAddBooleans</a></li>
352 <li><a href="#ippAddCollection">ippAddCollection</a></li>
353 <li><a href="#ippAddCollections">ippAddCollections</a></li>
354 <li><a href="#ippAddDate">ippAddDate</a></li>
355 <li><a href="#ippAddInteger">ippAddInteger</a></li>
356 <li><a href="#ippAddIntegers">ippAddIntegers</a></li>
357 <li><a href="#ippAddOctetString">ippAddOctetString</a></li>
358 <li><a href="#ippAddOutOfBand">ippAddOutOfBand</a></li>
359 <li><a href="#ippAddRange">ippAddRange</a></li>
360 <li><a href="#ippAddRanges">ippAddRanges</a></li>
361 <li><a href="#ippAddResolution">ippAddResolution</a></li>
362 <li><a href="#ippAddResolutions">ippAddResolutions</a></li>
363 <li><a href="#ippAddSeparator">ippAddSeparator</a></li>
364 <li><a href="#ippAddString">ippAddString</a></li>
365 <li><a href="#ippAddStringf">ippAddStringf</a></li>
366 <li><a href="#ippAddStringfv">ippAddStringfv</a></li>
367 <li><a href="#ippAddStrings">ippAddStrings</a></li>
368 <li><a href="#ippAttributeString">ippAttributeString</a></li>
369 <li><a href="#ippContainsInteger">ippContainsInteger</a></li>
370 <li><a href="#ippContainsString">ippContainsString</a></li>
371 <li><a href="#ippCopyAttribute">ippCopyAttribute</a></li>
372 <li><a href="#ippCopyAttributes">ippCopyAttributes</a></li>
373 <li><a href="#ippCreateRequestedArray">ippCreateRequestedArray</a></li>
374 <li><a href="#ippDateToTime">ippDateToTime</a></li>
375 <li><a href="#ippDelete">ippDelete</a></li>
376 <li><a href="#ippDeleteAttribute">ippDeleteAttribute</a></li>
377 <li><a href="#ippDeleteValues">ippDeleteValues</a></li>
378 <li><a href="#ippEnumString">ippEnumString</a></li>
379 <li><a href="#ippEnumValue">ippEnumValue</a></li>
380 <li><a href="#ippErrorString">ippErrorString</a></li>
381 <li><a href="#ippErrorValue">ippErrorValue</a></li>
382 <li><a href="#ippFindAttribute">ippFindAttribute</a></li>
383 <li><a href="#ippFindNextAttribute">ippFindNextAttribute</a></li>
384 <li><a href="#ippFirstAttribute">ippFirstAttribute</a></li>
385 <li><a href="#ippGetBoolean">ippGetBoolean</a></li>
386 <li><a href="#ippGetCollection">ippGetCollection</a></li>
387 <li><a href="#ippGetCount">ippGetCount</a></li>
388 <li><a href="#ippGetDate">ippGetDate</a></li>
389 <li><a href="#ippGetGroupTag">ippGetGroupTag</a></li>
390 <li><a href="#ippGetInteger">ippGetInteger</a></li>
391 <li><a href="#ippGetName">ippGetName</a></li>
392 <li><a href="#ippGetOctetString">ippGetOctetString</a></li>
393 <li><a href="#ippGetOperation">ippGetOperation</a></li>
394 <li><a href="#ippGetRange">ippGetRange</a></li>
395 <li><a href="#ippGetRequestId">ippGetRequestId</a></li>
396 <li><a href="#ippGetResolution">ippGetResolution</a></li>
397 <li><a href="#ippGetState">ippGetState</a></li>
398 <li><a href="#ippGetStatusCode">ippGetStatusCode</a></li>
399 <li><a href="#ippGetString">ippGetString</a></li>
400 <li><a href="#ippGetValueTag">ippGetValueTag</a></li>
401 <li><a href="#ippGetVersion">ippGetVersion</a></li>
402 <li><a href="#ippLength">ippLength</a></li>
403 <li><a href="#ippNew">ippNew</a></li>
404 <li><a href="#ippNewRequest">ippNewRequest</a></li>
405 <li><a href="#ippNewResponse">ippNewResponse</a></li>
406 <li><a href="#ippNextAttribute">ippNextAttribute</a></li>
407 <li><a href="#ippOpString">ippOpString</a></li>
408 <li><a href="#ippOpValue">ippOpValue</a></li>
409 <li><a href="#ippPort">ippPort</a></li>
410 <li><a href="#ippRead">ippRead</a></li>
411 <li><a href="#ippReadFile">ippReadFile</a></li>
412 <li><a href="#ippReadIO">ippReadIO</a></li>
413 <li><a href="#ippSetBoolean">ippSetBoolean</a></li>
414 <li><a href="#ippSetCollection">ippSetCollection</a></li>
415 <li><a href="#ippSetDate">ippSetDate</a></li>
416 <li><a href="#ippSetGroupTag">ippSetGroupTag</a></li>
417 <li><a href="#ippSetInteger">ippSetInteger</a></li>
418 <li><a href="#ippSetName">ippSetName</a></li>
419 <li><a href="#ippSetOctetString">ippSetOctetString</a></li>
420 <li><a href="#ippSetOperation">ippSetOperation</a></li>
421 <li><a href="#ippSetPort">ippSetPort</a></li>
422 <li><a href="#ippSetRange">ippSetRange</a></li>
423 <li><a href="#ippSetRequestId">ippSetRequestId</a></li>
424 <li><a href="#ippSetResolution">ippSetResolution</a></li>
425 <li><a href="#ippSetState">ippSetState</a></li>
426 <li><a href="#ippSetStatusCode">ippSetStatusCode</a></li>
427 <li><a href="#ippSetString">ippSetString</a></li>
428 <li><a href="#ippSetStringf">ippSetStringf</a></li>
429 <li><a href="#ippSetStringfv">ippSetStringfv</a></li>
430 <li><a href="#ippSetValueTag">ippSetValueTag</a></li>
431 <li><a href="#ippSetVersion">ippSetVersion</a></li>
432 <li><a href="#ippStateString">ippStateString</a></li>
433 <li><a href="#ippTagString">ippTagString</a></li>
434 <li><a href="#ippTagValue">ippTagValue</a></li>
435 <li><a href="#ippTimeToDate">ippTimeToDate</a></li>
436 <li><a href="#ippValidateAttribute">ippValidateAttribute</a></li>
437 <li><a href="#ippValidateAttributes">ippValidateAttributes</a></li>
438 <li><a href="#ippWrite">ippWrite</a></li>
439 <li><a href="#ippWriteFile">ippWriteFile</a></li>
440 <li><a href="#ippWriteIO">ippWriteIO</a></li>
441 <li><a href="#pwgFormatSizeName">pwgFormatSizeName</a></li>
442 <li><a href="#pwgInitSize">pwgInitSize</a></li>
443 <li><a href="#pwgMediaForLegacy">pwgMediaForLegacy</a></li>
444 <li><a href="#pwgMediaForPPD">pwgMediaForPPD</a></li>
445 <li><a href="#pwgMediaForPWG">pwgMediaForPWG</a></li>
446 <li><a href="#pwgMediaForSize">pwgMediaForSize</a></li>
447 </ul></li>
448 <li><a href="#TYPES">Data Types</a><ul class="subcontents">
449 <li><a href="#cups_client_cert_cb_t">cups_client_cert_cb_t</a></li>
450 <li><a href="#cups_dest_cb_t">cups_dest_cb_t</a></li>
451 <li><a href="#cups_dest_t">cups_dest_t</a></li>
452 <li><a href="#cups_dinfo_t">cups_dinfo_t</a></li>
453 <li><a href="#cups_encoding_t">cups_encoding_t</a></li>
454 <li><a href="#cups_job_t">cups_job_t</a></li>
455 <li><a href="#cups_lang_t">cups_lang_t</a></li>
456 <li><a href="#cups_option_t">cups_option_t</a></li>
457 <li><a href="#cups_password_cb2_t">cups_password_cb2_t</a></li>
458 <li><a href="#cups_ptype_t">cups_ptype_t</a></li>
459 <li><a href="#cups_server_cert_cb_t">cups_server_cert_cb_t</a></li>
460 <li><a href="#cups_size_t">cups_size_t</a></li>
461 <li><a href="#http_addr_t">http_addr_t</a></li>
462 <li><a href="#http_addrlist_t">http_addrlist_t</a></li>
463 <li><a href="#http_auth_t">http_auth_t</a></li>
464 <li><a href="#http_credential_t">http_credential_t</a></li>
465 <li><a href="#http_encoding_t">http_encoding_t</a></li>
466 <li><a href="#http_encryption_t">http_encryption_t</a></li>
467 <li><a href="#http_field_t">http_field_t</a></li>
468 <li><a href="#http_keepalive_t">http_keepalive_t</a></li>
469 <li><a href="#http_state_t">http_state_t</a></li>
470 <li><a href="#http_t">http_t</a></li>
471 <li><a href="#http_timeout_cb_t">http_timeout_cb_t</a></li>
472 <li><a href="#http_trust_t">http_trust_t</a></li>
473 <li><a href="#http_uri_coding_t">http_uri_coding_t</a></li>
474 <li><a href="#http_uri_status_t">http_uri_status_t</a></li>
475 <li><a href="#http_version_t">http_version_t</a></li>
476 <li><a href="#ipp_attribute_t">ipp_attribute_t</a></li>
477 <li><a href="#ipp_copycb_t">ipp_copycb_t</a></li>
478 <li><a href="#ipp_dstate_t">ipp_dstate_t</a></li>
479 <li><a href="#ipp_finish_t">ipp_finish_t</a></li>
480 <li><a href="#ipp_iocb_t">ipp_iocb_t</a></li>
481 <li><a href="#ipp_jcollate_t">ipp_jcollate_t</a></li>
482 <li><a href="#ipp_orient_t">ipp_orient_t</a></li>
483 <li><a href="#ipp_pstate_t">ipp_pstate_t</a></li>
484 <li><a href="#ipp_quality_t">ipp_quality_t</a></li>
485 <li><a href="#ipp_res_t">ipp_res_t</a></li>
486 <li><a href="#ipp_state_t">ipp_state_t</a></li>
487 <li><a href="#ipp_t">ipp_t</a></li>
488 <li><a href="#ipp_uchar_t">ipp_uchar_t</a></li>
489 <li><a href="#pwg_map_t">pwg_map_t</a></li>
490 <li><a href="#pwg_media_t">pwg_media_t</a></li>
491 <li><a href="#pwg_size_t">pwg_size_t</a></li>
492 </ul></li>
493 <li><a href="#STRUCTURES">Structures</a><ul class="subcontents">
494 <li><a href="#cups_dest_s">cups_dest_s</a></li>
495 <li><a href="#cups_job_s">cups_job_s</a></li>
496 <li><a href="#cups_lang_s">cups_lang_s</a></li>
497 <li><a href="#cups_option_s">cups_option_s</a></li>
498 <li><a href="#cups_size_s">cups_size_s</a></li>
499 <li><a href="#http_addrlist_s">http_addrlist_s</a></li>
500 <li><a href="#http_credential_s">http_credential_s</a></li>
501 <li><a href="#pwg_map_s">pwg_map_s</a></li>
502 <li><a href="#pwg_media_s">pwg_media_s</a></li>
503 <li><a href="#pwg_size_s">pwg_size_s</a></li>
504 </ul></li>
505 <li><a href="#ENUMERATIONS">Enumerations</a><ul class="subcontents">
506 <li><a href="#cups_encoding_e">cups_encoding_e</a></li>
507 <li><a href="#cups_ptype_e">cups_ptype_e</a></li>
508 <li><a href="#http_auth_e">http_auth_e</a></li>
509 <li><a href="#http_encoding_e">http_encoding_e</a></li>
510 <li><a href="#http_encryption_e">http_encryption_e</a></li>
511 <li><a href="#http_field_e">http_field_e</a></li>
512 <li><a href="#http_keepalive_e">http_keepalive_e</a></li>
513 <li><a href="#http_state_e">http_state_e</a></li>
514 <li><a href="#http_status_e">http_status_e</a></li>
515 <li><a href="#http_trust_e">http_trust_e</a></li>
516 <li><a href="#http_uri_coding_e">http_uri_coding_e</a></li>
517 <li><a href="#http_uri_status_e">http_uri_status_e</a></li>
518 <li><a href="#http_version_e">http_version_e</a></li>
519 <li><a href="#ipp_dstate_e">ipp_dstate_e</a></li>
520 <li><a href="#ipp_finishings_e">ipp_finishings_e</a></li>
521 <li><a href="#ipp_jcollate_e">ipp_jcollate_e</a></li>
522 <li><a href="#ipp_jstate_e">ipp_jstate_e</a></li>
523 <li><a href="#ipp_op_e">ipp_op_e</a></li>
524 <li><a href="#ipp_orient_e">ipp_orient_e</a></li>
525 <li><a href="#ipp_pstate_e">ipp_pstate_e</a></li>
526 <li><a href="#ipp_quality_e">ipp_quality_e</a></li>
527 <li><a href="#ipp_res_e">ipp_res_e</a></li>
528 <li><a href="#ipp_state_e">ipp_state_e</a></li>
529 <li><a href="#ipp_status_e">ipp_status_e</a></li>
530 <li><a href="#ipp_tag_e">ipp_tag_e</a></li>
531 </ul></li>
532 </ul>
533 </div>
534 <div class="body">
535 <blockquote>
536 <p>Note: This document is under active development and is incomplete, with a goal completing it prior to releasing CUPS 2.2.4. Please <a href="https://github.com/apple/cups/issues">file issues on Github</a> to provide any feedback.</p>
537 </blockquote>
538 <h2><a id="introduction">Introduction</a></h2>
539 <p>CUPS provides the &quot;cups&quot; library to talk to the different parts of CUPS and with Internet Printing Protocol (IPP) printers. The &quot;cups&quot; library functions are accessed by including the <code>&lt;cups/cups.h&gt;</code> header.</p>
540 <p>CUPS is based on the Internet Printing Protocol (&quot;IPP&quot;), which allows clients (applications) to communicate with a server (the scheduler, printers, etc.) to get a list of destinations, send print jobs, and so forth. You identify which server you want to communicate with using a pointer to the opaque structure <code>http_t</code>. The <code>CUPS_HTTP_DEFAULT</code> constant can be used when you want to talk to the CUPS scheduler.</p>
541 <h3><a id="guidelines">Guidelines</a></h3>
542 <p>When writing software that uses the &quot;cups&quot; library:</p>
543 <ul>
544 <li>Do not use undocumented or deprecated APIs,</li>
545 <li>Do not rely on pre-configured printers,</li>
546 <li>Do not assume that printers support specific features or formats, and</li>
547 <li>Do not rely on implementation details (PPDs, etc.)</li>
548 </ul>
549 <p>CUPS is designed to insulate users and developers from the implementation details of printers and file formats. The goal is to allow an application to supply a print file in a standard format with the user intent (&quot;print four copies, two-sided on A4 media, and staple each copy&quot;) and have the printing system manage the printer communication and format conversion needed.</p>
550 <p>Similarly, printer and job management applications can use standard query operations to obtain the status information in a common, generic form and use standard management operations to control the state of those printers and jobs.</p>
551 <h3><a id="terms-used-in-this-document">Terms Used in This Document</a></h3>
552 <p>A <em>Destination</em> is a printer or print queue that accepts print jobs. A <em>Print</em> <em>Job</em> is one or more documents that are processed by a destination using options supplied when creating the job. A <em>Document</em> is a file (JPEG image, PDF file, etc.) suitable for printing. An <em>Option</em> controls some aspect of printing, such as the media used. <em>Media</em> is the sheets or roll that is printed on. An <em>Attribute</em> is an option encoded for an Internet Printing Protocol (IPP) request.</p>
553 <h3><a id="compiling-programs-that-use-the-cups-api">Compiling Programs That Use the CUPS API</a></h3>
554 <p>The CUPS libraries can be used from any C, C++, or Objective C program. The method of compiling against the libraries varies depending on the operating system and installation of CUPS. The following sections show how to compile a simple program (shown below) in two common environments.</p>
555 <p>The following simple program lists the available destinations:</p>
556 <pre><code>#include &lt;stdio.h&gt;
557 #include &lt;cups/cups.h&gt;
558
559 int print_dest(void *user_data, unsigned flags, cups_dest_t *dest)
560 {
561 if (dest-&gt;instance)
562 printf(&quot;%s/%s\n&quot;, dest-&gt;name, dest-&gt;instance);
563 else
564 puts(dest-&gt;name);
565
566 return (1);
567 }
568
569 int main(void)
570 {
571 cupsEnumDests(CUPS_DEST_FLAGS_NONE, 1000, NULL, 0, 0, print_dest, NULL);
572
573 return (0);
574 }
575 </code></pre>
576 <h4><a id="compiling-with-xcode">Compiling with Xcode</a></h4>
577 <p>In Xcode, choose <em>New</em> <em>Project...</em> from the <em>File</em> menu (or press SHIFT+CMD+N), then select the <em>Command</em> <em>Line</em> <em>Tool</em> under the macOS Application project type. Click <em>Next</em> and enter a name for the project, for example &quot;firstcups&quot;. Click <em>Next</em> and choose a project directory. The click <em>Next</em> to create the project.</p>
578 <p>In the project window, click on the <em>Build</em> <em>Phases</em> group and expand the <em>Link</em> <em>Binary</em> <em>with</em> <em>Libraries</em> section. Click <em>+</em>, type &quot;libcups&quot; to show the library, and then double-click on <code>libcups.tbd</code>.</p>
579 <p>Finally, click on the <code>main.c</code> file in the sidebar and copy the example program to the file. Build and run (CMD+R) to see the list of destinations.</p>
580 <h4><a id="compiling-with-gcc">Compiling with GCC</a></h4>
581 <p>From the command-line, create a file called <code>sample.c</code> using your favorite editor, copy the example to this file, and save. Then run the following command to compile it with GCC and run it:</p>
582 <pre><code>gcc -o simple `cups-config --cflags` simple.c `cups-config --libs`
583 ./simple
584 </code></pre>
585 <p>The <code>cups-config</code> command provides the compiler flags (<code>cups-config --cflags</code>) and libraries (<code>cups-config --libs</code>) needed for the local system.</p>
586 <h2><a id="working-with-destinations">Working with Destinations</a></h2>
587 <p>Destinations, which in CUPS represent individual printers or classes (collections or pools) of printers, are represented by the <code>cups_dest_t</code> structure which includes the name (<code>name</code>), instance (<code>instance</code>, saved options/settings), whether the destination is the default for the user (<code>is_default</code>), and the options and basic information associated with that destination (<code>num_options</code> and <code>options</code>).</p>
588 <p>Historically destinations have been manually maintained by the administrator of a system or network, but CUPS also supports dynamic discovery of destinations on the current network.</p>
589 <h3><a id="finding-available-destinations">Finding Available Destinations</a></h3>
590 <p>The <code>cupsEnumDests</code> function finds all of the available destinations:</p>
591 <pre><code> int
592 cupsEnumDests(unsigned flags, int msec, int *cancel,
593 cups_ptype_t type, cups_ptype_t mask,
594 cups_dest_cb_t cb, void *user_data)
595 </code></pre>
596 <p>The <code>flags</code> argument specifies enumeration options, which at present must be <code>CUPS_DEST_FLAGS_NONE</code>.</p>
597 <p>The <code>msec</code> argument specifies the maximum amount of time that should be used for enumeration in milliseconds - interactive applications should keep this value to 5000 or less when run on the main thread.</p>
598 <p>The <code>cancel</code> argument points to an integer variable that, when set to a non-zero value, will cause enumeration to stop as soon as possible. It can be <code>NULL</code> if not needed.</p>
599 <p>The <code>type</code> and <code>mask</code> arguments are bitfields that allow the caller to filter the destinations based on categories and/or capabilities. The destination's &quot;printer-type&quot; value is masked by the <code>mask</code> value and compared to the <code>type</code> value when filtering. For example, to only enumerate destinations that are hosted on the local system, pass <code>CUPS_PRINTER_LOCAL</code> for the <code>type</code> argument and <code>CUPS_PRINTER_DISCOVERED</code> for the <code>mask</code> argument. The following constants can be used for filtering:</p>
600 <ul>
601 <li><code>CUPS_PRINTER_CLASS</code>: A collection of destinations.</li>
602 <li><code>CUPS_PRINTER_FAX</code>: A facsimile device.</li>
603 <li><code>CUPS_PRINTER_LOCAL</code>: A local printer or class. This constant has the value 0 (no bits set) and is only used for the <code>type</code> argument and is paired with the <code>CUPS_PRINTER_REMOTE</code> or <code>CUPS_PRINTER_DISCOVERED</code> constant passed in the <code>mask</code> argument.</li>
604 <li><code>CUPS_PRINTER_REMOTE</code>: A remote (shared) printer or class.</li>
605 <li><code>CUPS_PRINTER_DISCOVERED</code>: An available network printer or class.</li>
606 <li><code>CUPS_PRINTER_BW</code>: Can do B&amp;W printing.</li>
607 <li><code>CUPS_PRINTER_COLOR</code>: Can do color printing.</li>
608 <li><code>CUPS_PRINTER_DUPLEX</code>: Can do two-sided printing.</li>
609 <li><code>CUPS_PRINTER_STAPLE</code>: Can staple output.</li>
610 <li><code>CUPS_PRINTER_COLLATE</code>: Can quickly collate copies.</li>
611 <li><code>CUPS_PRINTER_PUNCH</code>: Can punch output.</li>
612 <li><code>CUPS_PRINTER_COVER</code>: Can cover output.</li>
613 <li><code>CUPS_PRINTER_BIND</code>: Can bind output.</li>
614 <li><code>CUPS_PRINTER_SORT</code>: Can sort output (mailboxes, etc.)</li>
615 <li><code>CUPS_PRINTER_SMALL</code>: Can print on Letter/Legal/A4-size media.</li>
616 <li><code>CUPS_PRINTER_MEDIUM</code>: Can print on Tabloid/B/C/A3/A2-size media.</li>
617 <li><code>CUPS_PRINTER_LARGE</code>: Can print on D/E/A1/A0-size media.</li>
618 <li><code>CUPS_PRINTER_VARIABLE</code>: Can print on rolls and custom-size media.</li>
619 </ul>
620 <p>The <code>cb</code> argument specifies a function to call for every destination that is found:</p>
621 <pre><code>typedef int (*cups_dest_cb_t)(void *user_data,
622 unsigned flags,
623 cups_dest_t *dest);
624 </code></pre>
625 <p>The callback function receives a copy of the <code>user_data</code> argument along with a bitfield (<code>flags</code>) and the destination that was found. The <code>flags</code> argument can have any of the following constant (bit) values set:</p>
626 <ul>
627 <li><code>CUPS_DEST_FLAGS_MORE</code>: There are more destinations coming.</li>
628 <li><code>CUPS_DEST_FLAGS_REMOVED</code>: The destination has gone away and should be removed from the list of destinations a user can select.</li>
629 <li><code>CUPS_DEST_FLAGS_ERROR</code>: An error occurred. The reason for the error can be found by calling the <code>cupsLastError</code> and/or <code>cupsLastErrorString</code> functions.</li>
630 </ul>
631 <p>The callback function returns 0 to stop enumeration or 1 to continue.</p>
632 <p>The following example shows how to use <code>cupsEnumDests</code> to get a filtered array of destinations:</p>
633 <pre><code>typedef struct
634 {
635 int num_dests;
636 cups_dest_t *dests;
637 } my_user_data_t;
638
639 int
640 my_dest_cb(my_user_data_t *user_data, unsigned flags,
641 cups_dest_t *dest)
642 {
643 if (flags &amp; CUPS_DEST_FLAGS_REMOVED)
644 {
645 /*
646 * Remove destination from array...
647 */
648
649 user_data-&gt;num_dests =
650 cupsRemoveDest(dest-&gt;name, dest-&gt;instance,
651 user_data-&gt;num_dests,
652 &amp;(user_data-&gt;dests));
653 }
654 else
655 {
656 /*
657 * Add destination to array...
658 */
659
660 user_data-&gt;num_dests =
661 cupsCopyDest(dest, user_data-&gt;num_dests,
662 &amp;(user_data-&gt;dests));
663 }
664
665 return (1);
666 }
667
668 int
669 my_get_dests(cups_ptype_t type, cups_ptype_t mask,
670 cups_dest_t **dests)
671 {
672 my_user_data_t user_data = { 0, NULL };
673
674 if (!cupsEnumDests(CUPS_DEST_FLAGS_NONE, 1000, NULL, type,
675 mask, (cups_dest_cb_t)my_dest_cb,
676 &amp;user_data))
677 {
678 /*
679 * An error occurred, free all of the destinations and
680 * return...
681 */
682
683 cupsFreeDests(user_data.num_dests, user_dasta.dests);
684
685 *dests = NULL;
686
687 return (0);
688 }
689
690 /*
691 * Return the destination array...
692 */
693
694 *dests = user_data.dests;
695
696 return (user_data.num_dests);
697 }
698 </code></pre>
699 <h3><a id="basic-destination-information">Basic Destination Information</a></h3>
700 <p>The <code>num_options</code> and <code>options</code> members of the <code>cups_dest_t</code> structure provide basic attributes about the destination in addition to the user default options and values for that destination. The following names are predefined for various destination attributes:</p>
701 <ul>
702 <li>&quot;auth-info-required&quot;: The type of authentication required for printing to this destination: &quot;none&quot;, &quot;username,password&quot;, &quot;domain,username,password&quot;, or &quot;negotiate&quot; (Kerberos).</li>
703 <li>&quot;printer-info&quot;: The human-readable description of the destination such as &quot;My Laser Printer&quot;.</li>
704 <li>&quot;printer-is-accepting-jobs&quot;: &quot;true&quot; if the destination is accepting new jobs, &quot;false&quot; otherwise.</li>
705 <li>&quot;printer-is-shared&quot;: &quot;true&quot; if the destination is being shared with other computers, &quot;false&quot; otherwise.</li>
706 <li>&quot;printer-location&quot;: The human-readable location of the destination such as &quot;Lab 4&quot;.</li>
707 <li>&quot;printer-make-and-model&quot;: The human-readable make and model of the destination such as &quot;ExampleCorp LaserPrinter 4000 Series&quot;.</li>
708 <li>&quot;printer-state&quot;: &quot;3&quot; if the destination is idle, &quot;4&quot; if the destination is printing a job, and &quot;5&quot; if the destination is stopped.</li>
709 <li>&quot;printer-state-change-time&quot;: The UNIX time when the destination entered the current state.</li>
710 <li>&quot;printer-state-reasons&quot;: Additional comma-delimited state keywords for the destination such as &quot;media-tray-empty-error&quot; and &quot;toner-low-warning&quot;.</li>
711 <li>&quot;printer-type&quot;: The <code>cups_ptype_t</code> value associated with the destination.</li>
712 <li>&quot;printer-uri-supported&quot;: The URI associated with the destination; if not set, this destination was discovered but is not yet setup as a local printer.</li>
713 </ul>
714 <p>Use the <code>cupsGetOption</code> function to retrieve the value. For example, the following code gets the make and model of a destination:</p>
715 <pre><code>const char *model = cupsGetOption(&quot;printer-make-and-model&quot;,
716 dest-&gt;num_options,
717 dest-&gt;options);
718 </code></pre>
719 <h3><a id="detailed-destination-information">Detailed Destination Information</a></h3>
720 <p>Once a destination has been chosen, the <code>cupsCopyDestInfo</code> function can be used to gather detailed information about the destination:</p>
721 <pre><code>cups_dinfo_t *
722 cupsCopyDestInfo(http_t *http, cups_dest_t *dest);
723 </code></pre>
724 <p>The <code>http</code> argument specifies a connection to the CUPS scheduler and is typically the constant <code>CUPS_HTTP_DEFAULT</code>. The <code>dest</code> argument specifies the destination to query.</p>
725 <p>The <code>cups_dinfo_t</code> structure that is returned contains a snapshot of the supported options and their supported, ready, and default values. It also can report constraints between different options and values, and recommend changes to resolve those constraints.</p>
726 <h4><a id="getting-supported-options-and-values">Getting Supported Options and Values</a></h4>
727 <p>The <code>cupsCheckDestSupported</code> function can be used to test whether a particular option or option and value is supported:</p>
728 <pre><code>int
729 cupsCheckDestSupported(http_t *http, cups_dest_t *dest,
730 cups_dinfo_t *info,
731 const char *option,
732 const char *value);
733 </code></pre>
734 <p>The <code>option</code> argument specifies the name of the option to check. The following constants can be used to check the various standard options:</p>
735 <ul>
736 <li><code>CUPS_COPIES</code>: Controls the number of copies that are produced.</li>
737 <li><code>CUPS_FINISHINGS</code>: A comma-delimited list of integer constants that control the finishing processes that are applied to the job, including stapling, punching, and folding.</li>
738 <li><code>CUPS_MEDIA</code>: Controls the media size that is used, typically one of the following: <code>CUPS_MEDIA_3X5</code>, <code>CUPS_MEDIA_4X6</code>, <code>CUPS_MEDIA_5X7</code>, <code>CUPS_MEDIA_8X10</code>, <code>CUPS_MEDIA_A3</code>, <code>CUPS_MEDIA_A4</code>, <code>CUPS_MEDIA_A5</code>, <code>CUPS_MEDIA_A6</code>, <code>CUPS_MEDIA_ENV10</code>, <code>CUPS_MEDIA_ENVDL</code>, <code>CUPS_MEDIA_LEGAL</code>, <code>CUPS_MEDIA_LETTER</code>, <code>CUPS_MEDIA_PHOTO_L</code>, <code>CUPS_MEDIA_SUPERBA3</code>, or <code>CUPS_MEDIA_TABLOID</code>.</li>
739 <li><code>CUPS_MEDIA_SOURCE</code>: Controls where the media is pulled from, typically either <code>CUPS_MEDIA_SOURCE_AUTO</code> or <code>CUPS_MEDIA_SOURCE_MANUAL</code>.</li>
740 <li><code>CUPS_MEDIA_TYPE</code>: Controls the type of media that is used, typically one of the following: <code>CUPS_MEDIA_TYPE_AUTO</code>, <code>CUPS_MEDIA_TYPE_ENVELOPE</code>, <code>CUPS_MEDIA_TYPE_LABELS</code>, <code>CUPS_MEDIA_TYPE_LETTERHEAD</code>, <code>CUPS_MEDIA_TYPE_PHOTO</code>, <code>CUPS_MEDIA_TYPE_PHOTO_GLOSSY</code>, <code>CUPS_MEDIA_TYPE_PHOTO_MATTE</code>, <code>CUPS_MEDIA_TYPE_PLAIN</code>, or <code>CUPS_MEDIA_TYPE_TRANSPARENCY</code>.</li>
741 <li><code>CUPS_NUMBER_UP</code>: Controls the number of document pages that are placed on each media side.</li>
742 <li><code>CUPS_ORIENTATION</code>: Controls the orientation of document pages placed on the media: <code>CUPS_ORIENTATION_PORTRAIT</code> or <code>CUPS_ORIENTATION_LANDSCAPE</code>.</li>
743 <li><code>CUPS_PRINT_COLOR_MODE</code>: Controls whether the output is in color (<code>CUPS_PRINT_COLOR_MODE_COLOR</code>), grayscale (<code>CUPS_PRINT_COLOR_MODE_MONOCHROME</code>), or either (<code>CUPS_PRINT_COLOR_MODE_AUTO</code>).</li>
744 <li><code>CUPS_PRINT_QUALITY</code>: Controls the generate quality of the output: <code>CUPS_PRINT_QUALITY_DRAFT</code>, <code>CUPS_PRINT_QUALITY_NORMAL</code>, or <code>CUPS_PRINT_QUALITY_HIGH</code>.</li>
745 <li><code>CUPS_SIDES</code>: Controls whether prints are placed on one or both sides of the media: <code>CUPS_SIDES_ONE_SIDED</code>, <code>CUPS_SIDES_TWO_SIDED_PORTRAIT</code>, or <code>CUPS_SIDES_TWO_SIDED_LANDSCAPE</code>.</li>
746 </ul>
747 <p>If the <code>value</code> argument is <code>NULL</code>, the <code>cupsCheckDestSupported</code> function returns whether the option is supported by the destination. Otherwise, the function returns whether the specified value of the option is supported.</p>
748 <p>The <code>cupsFindDestSupported</code> function returns the IPP attribute containing the supported values for a given option:</p>
749 <pre><code> ipp_attribute_t *
750 cupsFindDestSupported(http_t *http, cups_dest_t *dest,
751 cups_dinfo_t *dinfo,
752 const char *option);
753 </code></pre>
754 <p>For example, the following code prints the supported finishing processes for a destination, if any, to the standard output:</p>
755 <pre><code>cups_dinfo_t *info = cupsCopyDestInfo(CUPS_HTTP_DEFAULT,
756 dest);
757
758 if (cupsCheckDestSupported(CUPS_HTTP_DEFAULT, dest, info,
759 CUPS_FINISHINGS, NULL))
760 {
761 ipp_attribute_t *finishings =
762 cupsFindDestSupported(CUPS_HTTP_DEFAULT, dest, info,
763 CUPS_FINISHINGS);
764 int i, count = ippGetCount(finishings);
765
766 puts(&quot;finishings supported:&quot;);
767 for (i = 0; i &lt; count; i ++)
768 printf(&quot; %d\n&quot;, ippGetInteger(finishings, i));
769 }
770 else
771 puts(&quot;finishings not supported.&quot;);
772 </code></pre>
773 <p>The &quot;job-creation-attributes&quot; option can be queried to get a list of supported options. For example, the following code prints the list of supported options to the standard output:</p>
774 <pre><code>ipp_attribute_t *attrs =
775 cupsFindDestSupported(CUPS_HTTP_DEFAULT, dest, info,
776 &quot;job-creation-attributes&quot;);
777 int i, count = ippGetCount(attrs);
778
779 for (i = 0; i &lt; count; i ++)
780 puts(ippGetString(attrs, i, NULL));
781 </code></pre>
782 <h4><a id="getting-default-values">Getting Default Values</a></h4>
783 <p>There are two sets of default values - user defaults that are available via the <code>num_options</code> and <code>options</code> members of the <code>cups_dest_t</code> structure, and destination defaults that available via the <code>cups_dinfo_t</code> structure and the <code>cupsFindDestDefault</code> function which returns the IPP attribute containing the default value(s) for a given option:</p>
784 <pre><code>ipp_attribute_t *
785 cupsFindDestDefault(http_t *http, cups_dest_t *dest,
786 cups_dinfo_t *dinfo,
787 const char *option);
788 </code></pre>
789 <p>The user defaults from <code>cupsGetOption</code> should always take preference over the destination defaults. For example, the following code prints the default finishings value(s) to the standard output:</p>
790 <pre><code>const char *def_value =
791 cupsGetOption(CUPS_FINISHINGS, dest-&gt;num_options,
792 dest-&gt;options);
793 ipp_attribute_t *def_attr =
794 cupsFindDestDefault(CUPS_HTTP_DEFAULT, dest, info,
795 CUPS_FINISHINGS);
796
797 if (def_value != NULL)
798 {
799 printf(&quot;Default finishings: %s\n&quot;, def_value);
800 }
801 else
802 {
803 int i, count = ippGetCount(def_attr);
804
805 printf(&quot;Default finishings: %d&quot;,
806 ippGetInteger(def_attr, 0));
807 for (i = 1; i &lt; count; i ++)
808 printf(&quot;,%d&quot;, ippGetInteger(def_attr, i));
809 putchar('\n');
810 }
811 </code></pre>
812 <h4><a id="getting-ready-loaded-values">Getting Ready (Loaded) Values</a></h4>
813 <p>The finishings and media options also support queries for the ready, or loaded, values. For example, a printer may have punch and staple finishers installed but be out of staples - the supported values will list both punch and staple finishing processes but the ready values will only list the punch processes. Similarly, a printer may support hundreds of different sizes of media but only have a single size loaded at any given time - the ready values are limited to the media that is actually in the printer.</p>
814 <p>The <code>cupsFindDestReady</code> function finds the IPP attribute containing the ready values for a given option:</p>
815 <pre><code>ipp_attribute_t *
816 cupsFindDestReady(http_t *http, cups_dest_t *dest,
817 cups_dinfo_t *dinfo, const char *option);
818 </code></pre>
819 <p>For example, the following code lists the ready finishing processes:</p>
820 <pre><code>ipp_attribute_t *ready_finishings =
821 cupsFindDestReady(CUPS_HTTP_DEFAULT, dest, info,
822 CUPS_FINISHINGS);
823
824 if (ready_finishings != NULL)
825 {
826 int i, count = ippGetCount(ready_finishings);
827
828 puts(&quot;finishings ready:&quot;);
829 for (i = 0; i &lt; count; i ++)
830 printf(&quot; %d\n&quot;, ippGetInteger(ready_finishings, i));
831 }
832 else
833 puts(&quot;no finishings are ready.&quot;);
834 </code></pre>
835 <h4><a id="media-size-options">Media Size Options</a></h4>
836 <p>CUPS provides functions for querying the dimensions and margins for each of the supported media size options. The <code>cups_size_t</code> structure is used to describe a media size:</p>
837 <pre><code>typedef struct cups_size_s
838 {
839 char media[128];
840 int width, length;
841 int bottom, left, right, top;
842 } cups_size_t;
843 </code></pre>
844 <p>The <code>width</code> and <code>length</code> members specify the dimensions of the media in hundredths of millimeters (1/2540th of an inch). The <code>bottom</code>, <code>left</code>, <code>right</code>, and <code>top</code> members specify the margins of the printable area, also in hundredths of millimeters.</p>
845 <p>The <code>cupsGetDestMediaByName</code> and <code>cupsGetDestMediaBySize</code> functions lookup the media size information using a standard media size name or dimensions in hundredths of millimeters:</p>
846 <pre><code>int
847 cupsGetDestMediaByName(http_t *http, cups_dest_t *dest,
848 cups_dinfo_t *dinfo,
849 const char *media,
850 unsigned flags, cups_size_t *size);
851
852 int
853 cupsGetDestMediaBySize(http_t *http, cups_dest_t *dest,
854 cups_dinfo_t *dinfo,
855 int width, int length,
856 unsigned flags, cups_size_t *size);
857 </code></pre>
858 <p>The <code>media</code>, <code>width</code>, and <code>length</code> arguments specify the size to lookup. The <code>flags</code> argument specifies a bitfield controlling various lookup options:</p>
859 <ul>
860 <li><code>CUPS_MEDIA_FLAGS_DEFAULT</code>: Find the closest size supported by the printer.</li>
861 <li><code>CUPS_MEDIA_FLAGS_BORDERLESS</code>: Find a borderless size.</li>
862 <li><code>CUPS_MEDIA_FLAGS_DUPLEX</code>: Find a size compatible with two-sided printing.</li>
863 <li><code>CUPS_MEDIA_FLAGS_EXACT</code>: Find an exact match for the size.</li>
864 <li><code>CUPS_MEDIA_FLAGS_READY</code>: If the printer supports media sensing or configuration of the media in each tray/source, find the size amongst the &quot;ready&quot; media.</li>
865 </ul>
866 <p>If a matching size is found for the destination, the size information is stored in the structure pointed to by the <code>size</code> argument and 1 is returned. Otherwise 0 is returned.</p>
867 <p>For example, the following code prints the margins for two-sided printing on US Letter media:</p>
868 <pre><code>cups_size_t size;
869
870 if (cupsGetDestMediaByName(CUPS_HTTP_DEFAULT, dest, info,
871 CUPS_MEDIA_LETTER,
872 CUPS_MEDIA_FLAGS_DUPLEX, &amp;size))
873 {
874 puts(&quot;Margins for duplex US Letter:&quot;);
875 printf(&quot; Bottom: %.2fin\n&quot;, size.bottom / 2540.0);
876 printf(&quot; Left: %.2fin\n&quot;, size.left / 2540.0);
877 printf(&quot; Right: %.2fin\n&quot;, size.right / 2540.0);
878 printf(&quot; Top: %.2fin\n&quot;, size.top / 2540.0);
879 }
880 else
881 puts(&quot;Margins for duplex US Letter are not available.&quot;);
882 </code></pre>
883 <p>You can also enumerate all of the sizes that match a given <code>flags</code> value using the <code>cupsGetDestMediaByIndex</code> and <code>cupsGetDestMediaCount</code> functions:</p>
884 <pre><code>int
885 cupsGetDestMediaByIndex(http_t *http, cups_dest_t *dest,
886 cups_dinfo_t *dinfo, int n,
887 unsigned flags, cups_size_t *size);
888
889 int
890 cupsGetDestMediaCount(http_t *http, cups_dest_t *dest,
891 cups_dinfo_t *dinfo, unsigned flags);
892 </code></pre>
893 <p>For example, the following code prints the list of ready media and corresponding margins:</p>
894 <pre><code>cups_size_t size;
895 int i;
896 int count = cupsGetDestMediaCount(CUPS_HTTP_DEFAULT,
897 dest, info,
898 CUPS_MEDIA_FLAGS_READY);
899
900 for (i = 0; i &lt; count; i ++)
901 {
902 if (cupsGetDestMediaByIndex(CUPS_HTTP_DEFAULT, dest, info,
903 i, CUPS_MEDIA_FLAGS_READY,
904 &amp;size))
905 {
906 printf(&quot;%s:\n&quot;, size.name);
907 printf(&quot; Width: %.2fin\n&quot;, size.width / 2540.0);
908 printf(&quot; Length: %.2fin\n&quot;, size.length / 2540.0);
909 printf(&quot; Bottom: %.2fin\n&quot;, size.bottom / 2540.0);
910 printf(&quot; Left: %.2fin\n&quot;, size.left / 2540.0);
911 printf(&quot; Right: %.2fin\n&quot;, size.right / 2540.0);
912 printf(&quot; Top: %.2fin\n&quot;, size.top / 2540.0);
913 }
914 }
915 </code></pre>
916 <p>Finally, the <code>cupsGetDestMediaDefault</code> function returns the default media size:</p>
917 <pre><code>int
918 cupsGetDestMediaDefault(http_t *http, cups_dest_t *dest,
919 cups_dinfo_t *dinfo, unsigned flags,
920 cups_size_t *size);
921 </code></pre>
922 <h4><a id="localizing-options-and-values">Localizing Options and Values</a></h4>
923 <p>CUPS provides three functions to get localized versions of options and values: <code>cupsLocalizeDestMedia</code>, <code>cupsLocalizeDestOption</code>, and <code>cupsLocalizeDestValue</code>:</p>
924 <pre><code>const char *
925 cupsLocalizeDestMedia(http_t *http, cups_dest_t *dest,
926 cups_dinfo_t *info, unsigned flags,
927 cups_size_t *size);
928
929 const char *
930 cupsLocalizeDestOption(http_t *http, cups_dest_t *dest,
931 cups_dinfo_t *info,
932 const char *option);
933
934 const char *
935 cupsLocalizeDestValue(http_t *http, cups_dest_t *dest,
936 cups_dinfo_t *info,
937 const char *option, const char *value);
938 </code></pre>
939 <h3><a id="submitting-a-print-job">Submitting a Print Job</a></h3>
940 <p>Once you are ready to submit a print job, you create a job using the <code>cupsCreateDestJob</code> function:</p>
941 <pre><code>ipp_status_t
942 cupsCreateDestJob(http_t *http, cups_dest_t *dest,
943 cups_dinfo_t *info, int *job_id,
944 const char *title, int num_options,
945 cups_option_t *options);
946 </code></pre>
947 <p>The <code>title</code> argument specifies a name for the print job such as &quot;My Document&quot;. The <code>num_options</code> and <code>options</code> arguments specify the options for the print job which are allocated using the <code>cupsAddOption</code> function.</p>
948 <p>When successful, the job's numeric identifier is stored in the integer pointed to by the <code>job_id</code> argument and <code>IPP_STATUS_OK</code> is returned. Otherwise, an IPP error status is returned.</p>
949 <p>For example, the following code creates a new job that will print 42 copies of a two-sided US Letter document:</p>
950 <pre><code>int job_id = 0;
951 int num_options = 0;
952 cups_option_t *options = NULL;
953
954 num_options = cupsAddOption(CUPS_COPIES, &quot;42&quot;,
955 num_options, &amp;options);
956 num_options = cupsAddOption(CUPS_MEDIA, CUPS_MEDIA_LETTER,
957 num_options, &amp;options);
958 num_options = cupsAddOption(CUPS_SIDES,
959 CUPS_SIDES_TWO_SIDED_PORTRAIT,
960 num_options, &amp;options);
961
962 if (cupsCreateDestJob(CUPS_HTTP_DEFAULT, dest, info,
963 &amp;job_id, &quot;My Document&quot;, num_options,
964 options) == IPP_STATUS_OK)
965 printf(&quot;Created job: %d\n&quot;, job_id);
966 else
967 printf(&quot;Unable to create job: %s\n&quot;,
968 cupsLastErrorString());
969 </code></pre>
970 <p>Once the job is created, you submit documents for the job using the <code>cupsStartDestDocument</code>, <code>cupsWriteRequestData</code>, and <code>cupsFinishDestDocument</code> functions:</p>
971 <pre><code>http_status_t
972 cupsStartDestDocument(http_t *http, cups_dest_t *dest,
973 cups_dinfo_t *info, int job_id,
974 const char *docname,
975 const char *format,
976 int num_options,
977 cups_option_t *options,
978 int last_document);
979
980 http_status_t
981 cupsWriteRequestData(http_t *http, const char *buffer,
982 size_t length);
983
984 ipp_status_t
985 cupsFinishDestDocument(http_t *http, cups_dest_t *dest,
986 cups_dinfo_t *info);
987 </code></pre>
988 <p>The <code>docname</code> argument specifies the name of the document, typically the original filename. The <code>format</code> argument specifies the MIME media type of the document, including the following constants:</p>
989 <ul>
990 <li><code>CUPS_FORMAT_JPEG</code>: &quot;image/jpeg&quot;</li>
991 <li><code>CUPS_FORMAT_PDF</code>: &quot;application/pdf&quot;</li>
992 <li><code>CUPS_FORMAT_POSTSCRIPT</code>: &quot;application/postscript&quot;</li>
993 <li><code>CUPS_FORMAT_TEXT</code>: &quot;text/plain&quot;</li>
994 </ul>
995 <p>The <code>num_options</code> and <code>options</code> arguments specify per-document print options, which at present must be 0 and <code>NULL</code>. The <code>last_document</code> argument specifies whether this is the last document in the job.</p>
996 <p>For example, the following code submits a PDF file to the job that was just created:</p>
997 <pre><code>FILE *fp = fopen(&quot;filename.pdf&quot;, &quot;rb&quot;);
998 size_t bytes;
999 char buffer[65536];
1000
1001 if (cupsStartDestDocument(CUPS_HTTP_DEFAULT, dest, info,
1002 job_id, &quot;filename.pdf&quot;, 0, NULL,
1003 1) == HTTP_STATUS_CONTINUE)
1004 {
1005 while ((bytes = fread(buffer, 1, sizeof(buffer), fp)) &gt; 0)
1006 if (cupsWriteRequestData(CUPS_HTTP_DEFAULT, buffer,
1007 bytes) != HTTP_STATUS_CONTINUE)
1008 break;
1009
1010 if (cupsFinishDestDocument(CUPS_HTTP_DEFAULT, dest,
1011 info) == IPP_STATUS_OK)
1012 puts(&quot;Document send succeeded.&quot;);
1013 else
1014 printf(&quot;Document send failed: %s\n&quot;,
1015 cupsLastErrorString());
1016 }
1017
1018 fclose(fp);
1019 </code></pre>
1020 <h2 class="title"><a id="FUNCTIONS">Functions</a></h2>
1021 <h3 class="function"><a id="cupsAddDest">cupsAddDest</a></h3>
1022 <p class="description">Add a destination to the list of destinations.</p>
1023 <p class="code">
1024 int cupsAddDest (<br>
1025 &#160;&#160;&#160;&#160;const char *name,<br>
1026 &#160;&#160;&#160;&#160;const char *instance,<br>
1027 &#160;&#160;&#160;&#160;int num_dests,<br>
1028 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> **dests<br>
1029 );</p>
1030 <h4 class="parameters">Parameters</h4>
1031 <dl>
1032 <dt>name</dt>
1033 <dd class="description">Destination name</dd>
1034 <dt>instance</dt>
1035 <dd class="description">Instance name or <code>NULL</code> for none/primary</dd>
1036 <dt>num_dests</dt>
1037 <dd class="description">Number of destinations</dd>
1038 <dt>dests</dt>
1039 <dd class="description">Destinations</dd>
1040 </dl>
1041 <h4 class="returnvalue">Return Value</h4>
1042 <p class="description">New number of destinations</p>
1043 <h4 class="discussion">Discussion</h4>
1044 <p class="discussion">This function cannot be used to add a new class or printer queue,
1045 it only adds a new container of saved options for the named
1046 destination or instance.<br>
1047 <br>
1048 If the named destination already exists, the destination list is
1049 returned unchanged. Adding a new instance of a destination creates
1050 a copy of that destination's options.<br>
1051 <br>
1052 Use the <a href="#cupsSaveDests"><code>cupsSaveDests</code></a> function to save the updated list of
1053 destinations to the user's lpoptions file.</p>
1054 <h3 class="function"><span class="info">&#160;CUPS 2.2.4&#160;</span><a id="cupsAddIntegerOption">cupsAddIntegerOption</a></h3>
1055 <p class="description">Add an integer option to an option array.</p>
1056 <p class="code">
1057 int cupsAddIntegerOption (<br>
1058 &#160;&#160;&#160;&#160;const char *name,<br>
1059 &#160;&#160;&#160;&#160;int value,<br>
1060 &#160;&#160;&#160;&#160;int num_options,<br>
1061 &#160;&#160;&#160;&#160;<a href="#cups_option_t">cups_option_t</a> **options<br>
1062 );</p>
1063 <h4 class="parameters">Parameters</h4>
1064 <dl>
1065 <dt>name</dt>
1066 <dd class="description">Name of option</dd>
1067 <dt>value</dt>
1068 <dd class="description">Value of option</dd>
1069 <dt>num_options</dt>
1070 <dd class="description">Number of options</dd>
1071 <dt>options</dt>
1072 <dd class="description">Pointer to options</dd>
1073 </dl>
1074 <h4 class="returnvalue">Return Value</h4>
1075 <p class="description">Number of options</p>
1076 <h4 class="discussion">Discussion</h4>
1077 <p class="discussion">New option arrays can be initialized simply by passing 0 for the
1078 &quot;num_options&quot; parameter.
1079
1080 </p>
1081 <h3 class="function"><a id="cupsAddOption">cupsAddOption</a></h3>
1082 <p class="description">Add an option to an option array.</p>
1083 <p class="code">
1084 int cupsAddOption (<br>
1085 &#160;&#160;&#160;&#160;const char *name,<br>
1086 &#160;&#160;&#160;&#160;const char *value,<br>
1087 &#160;&#160;&#160;&#160;int num_options,<br>
1088 &#160;&#160;&#160;&#160;<a href="#cups_option_t">cups_option_t</a> **options<br>
1089 );</p>
1090 <h4 class="parameters">Parameters</h4>
1091 <dl>
1092 <dt>name</dt>
1093 <dd class="description">Name of option</dd>
1094 <dt>value</dt>
1095 <dd class="description">Value of option</dd>
1096 <dt>num_options</dt>
1097 <dd class="description">Number of options</dd>
1098 <dt>options</dt>
1099 <dd class="description">Pointer to options</dd>
1100 </dl>
1101 <h4 class="returnvalue">Return Value</h4>
1102 <p class="description">Number of options</p>
1103 <h4 class="discussion">Discussion</h4>
1104 <p class="discussion">New option arrays can be initialized simply by passing 0 for the
1105 &quot;num_options&quot; parameter.</p>
1106 <h3 class="function"><a id="cupsCancelDestJob">cupsCancelDestJob</a></h3>
1107 <p class="description">Include necessary headers...</p>
1108 <p class="code">
1109 ipp_status_t cupsCancelDestJob (<br>
1110 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
1111 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
1112 &#160;&#160;&#160;&#160;int job_id<br>
1113 );</p>
1114 <h4 class="parameters">Parameters</h4>
1115 <dl>
1116 <dt>http</dt>
1117 <dd class="description">Connection to destination</dd>
1118 <dt>dest</dt>
1119 <dd class="description">Destination</dd>
1120 <dt>job_id</dt>
1121 <dd class="description">Job ID</dd>
1122 </dl>
1123 <h4 class="returnvalue">Return Value</h4>
1124 <p class="description">Cancel a job on a destination.</p>
1125 <p class="discussion">The &quot;job_id&quot; is the number returned by cupsCreateDestJob.<br>
1126 <br>
1127 Returns <code>IPP_STATUS_OK</code> on success and
1128 <code>IPP_STATUS_ERRPR_NOT_AUTHORIZED</code> or
1129 <code>IPP_STATUS_ERROR_FORBIDDEN</code> on failure.
1130
1131 </p>
1132 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="cupsCheckDestSupported">cupsCheckDestSupported</a></h3>
1133 <p class="description">Check that the option and value are supported
1134 by the destination.</p>
1135 <p class="code">
1136 int cupsCheckDestSupported (<br>
1137 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
1138 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
1139 &#160;&#160;&#160;&#160;<a href="#cups_dinfo_t">cups_dinfo_t</a> *dinfo,<br>
1140 &#160;&#160;&#160;&#160;const char *option,<br>
1141 &#160;&#160;&#160;&#160;const char *value<br>
1142 );</p>
1143 <h4 class="parameters">Parameters</h4>
1144 <dl>
1145 <dt>http</dt>
1146 <dd class="description">Connection to destination</dd>
1147 <dt>dest</dt>
1148 <dd class="description">Destination</dd>
1149 <dt>dinfo</dt>
1150 <dd class="description">Destination information</dd>
1151 <dt>option</dt>
1152 <dd class="description">Option</dd>
1153 <dt>value</dt>
1154 <dd class="description">Value</dd>
1155 </dl>
1156 <h4 class="returnvalue">Return Value</h4>
1157 <p class="description">1 if supported, 0 otherwise</p>
1158 <h4 class="discussion">Discussion</h4>
1159 <p class="discussion">Returns 1 if supported, 0 otherwise.
1160
1161 </p>
1162 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="cupsCloseDestJob">cupsCloseDestJob</a></h3>
1163 <p class="description">Close a job and start printing.</p>
1164 <p class="code">
1165 ipp_status_t cupsCloseDestJob (<br>
1166 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
1167 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
1168 &#160;&#160;&#160;&#160;<a href="#cups_dinfo_t">cups_dinfo_t</a> *info,<br>
1169 &#160;&#160;&#160;&#160;int job_id<br>
1170 );</p>
1171 <h4 class="parameters">Parameters</h4>
1172 <dl>
1173 <dt>http</dt>
1174 <dd class="description">Connection to destination</dd>
1175 <dt>dest</dt>
1176 <dd class="description">Destination</dd>
1177 <dt>info</dt>
1178 <dd class="description">Destination information</dd>
1179 <dt>job_id</dt>
1180 <dd class="description">Job ID</dd>
1181 </dl>
1182 <h4 class="returnvalue">Return Value</h4>
1183 <p class="description">IPP status code</p>
1184 <h4 class="discussion">Discussion</h4>
1185 <p class="discussion">Use when the last call to cupsStartDocument passed 0 for &quot;last_document&quot;.
1186 &quot;job_id&quot; is the job ID returned by cupsCreateDestJob. Returns <code>IPP_STATUS_OK</code>
1187 on success.
1188
1189 </p>
1190 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="cupsConnectDest">cupsConnectDest</a></h3>
1191 <p class="description">Connect to the server for a destination.</p>
1192 <p class="code">
1193 <a href="#http_t">http_t</a> *cupsConnectDest (<br>
1194 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
1195 &#160;&#160;&#160;&#160;unsigned flags,<br>
1196 &#160;&#160;&#160;&#160;int msec,<br>
1197 &#160;&#160;&#160;&#160;int *cancel,<br>
1198 &#160;&#160;&#160;&#160;char *resource,<br>
1199 &#160;&#160;&#160;&#160;size_t resourcesize,<br>
1200 &#160;&#160;&#160;&#160;<a href="#cups_dest_cb_t">cups_dest_cb_t</a> cb,<br>
1201 &#160;&#160;&#160;&#160;void *user_data<br>
1202 );</p>
1203 <h4 class="parameters">Parameters</h4>
1204 <dl>
1205 <dt>dest</dt>
1206 <dd class="description">Destination</dd>
1207 <dt>flags</dt>
1208 <dd class="description">Connection flags</dd>
1209 <dt>msec</dt>
1210 <dd class="description">Timeout in milliseconds</dd>
1211 <dt>cancel</dt>
1212 <dd class="description">Pointer to &quot;cancel&quot; variable</dd>
1213 <dt>resource</dt>
1214 <dd class="description">Resource buffer</dd>
1215 <dt>resourcesize</dt>
1216 <dd class="description">Size of resource buffer</dd>
1217 <dt>cb</dt>
1218 <dd class="description">Callback function</dd>
1219 <dt>user_data</dt>
1220 <dd class="description">User data pointer</dd>
1221 </dl>
1222 <h4 class="returnvalue">Return Value</h4>
1223 <p class="description">Connection to server or <code>NULL</code></p>
1224 <h4 class="discussion">Discussion</h4>
1225 <p class="discussion">Connect to the destination, returning a new http_t connection object and
1226 optionally the resource path to use for the destination. These calls will
1227 block until a connection is made, the timeout expires, the integer pointed
1228 to by &quot;cancel&quot; is non-zero, or the callback function (or block) returns 0,
1229 The caller is responsible for calling httpClose() on the returned object.
1230
1231 </p>
1232 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="cupsCopyDest">cupsCopyDest</a></h3>
1233 <p class="description">Copy a destination.</p>
1234 <p class="code">
1235 int cupsCopyDest (<br>
1236 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
1237 &#160;&#160;&#160;&#160;int num_dests,<br>
1238 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> **dests<br>
1239 );</p>
1240 <h4 class="parameters">Parameters</h4>
1241 <dl>
1242 <dt>dest</dt>
1243 <dd class="description">Destination to copy</dd>
1244 <dt>num_dests</dt>
1245 <dd class="description">Number of destinations</dd>
1246 <dt>dests</dt>
1247 <dd class="description">Destination array</dd>
1248 </dl>
1249 <h4 class="returnvalue">Return Value</h4>
1250 <p class="description">New number of destinations</p>
1251 <h4 class="discussion">Discussion</h4>
1252 <p class="discussion">Make a copy of the destination to an array of destinations (or just a single
1253 copy) - for use with the cupsEnumDests* functions. The caller is responsible
1254 for calling cupsFreeDests() on the returned object(s).
1255
1256 </p>
1257 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="cupsCopyDestConflicts">cupsCopyDestConflicts</a></h3>
1258 <p class="description">Get conflicts and resolutions for a new
1259 option/value pair.</p>
1260 <p class="code">
1261 int cupsCopyDestConflicts (<br>
1262 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
1263 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
1264 &#160;&#160;&#160;&#160;<a href="#cups_dinfo_t">cups_dinfo_t</a> *dinfo,<br>
1265 &#160;&#160;&#160;&#160;int num_options,<br>
1266 &#160;&#160;&#160;&#160;<a href="#cups_option_t">cups_option_t</a> *options,<br>
1267 &#160;&#160;&#160;&#160;const char *new_option,<br>
1268 &#160;&#160;&#160;&#160;const char *new_value,<br>
1269 &#160;&#160;&#160;&#160;int *num_conflicts,<br>
1270 &#160;&#160;&#160;&#160;<a href="#cups_option_t">cups_option_t</a> **conflicts,<br>
1271 &#160;&#160;&#160;&#160;int *num_resolved,<br>
1272 &#160;&#160;&#160;&#160;<a href="#cups_option_t">cups_option_t</a> **resolved<br>
1273 );</p>
1274 <h4 class="parameters">Parameters</h4>
1275 <dl>
1276 <dt>http</dt>
1277 <dd class="description">Connection to destination</dd>
1278 <dt>dest</dt>
1279 <dd class="description">Destination</dd>
1280 <dt>dinfo</dt>
1281 <dd class="description">Destination information</dd>
1282 <dt>num_options</dt>
1283 <dd class="description">Number of current options</dd>
1284 <dt>options</dt>
1285 <dd class="description">Current options</dd>
1286 <dt>new_option</dt>
1287 <dd class="description">New option</dd>
1288 <dt>new_value</dt>
1289 <dd class="description">New value</dd>
1290 <dt>num_conflicts</dt>
1291 <dd class="description">Number of conflicting options</dd>
1292 <dt>conflicts</dt>
1293 <dd class="description">Conflicting options</dd>
1294 <dt>num_resolved</dt>
1295 <dd class="description">Number of options to resolve</dd>
1296 <dt>resolved</dt>
1297 <dd class="description">Resolved options</dd>
1298 </dl>
1299 <h4 class="returnvalue">Return Value</h4>
1300 <p class="description">1 if there is a conflict, 0 if none, -1 on error</p>
1301 <h4 class="discussion">Discussion</h4>
1302 <p class="discussion">&quot;num_options&quot; and &quot;options&quot; represent the currently selected options by the
1303 user. &quot;new_option&quot; and &quot;new_value&quot; are the setting the user has just
1304 changed.<br>
1305 <br>
1306 Returns 1 if there is a conflict, 0 if there are no conflicts, and -1 if
1307 there was an unrecoverable error such as a resolver loop.<br>
1308 <br>
1309 If &quot;num_conflicts&quot; and &quot;conflicts&quot; are not <code>NULL</code>, they are set to
1310 contain the list of conflicting option/value pairs. Similarly, if
1311 &quot;num_resolved&quot; and &quot;resolved&quot; are not <code>NULL</code> they will be set to the
1312 list of changes needed to resolve the conflict.<br>
1313 <br>
1314 If cupsCopyDestConflicts returns 1 but &quot;num_resolved&quot; and &quot;resolved&quot; are set
1315 to 0 and <code>NULL</code>, respectively, then the conflict cannot be resolved.
1316
1317 </p>
1318 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="cupsCopyDestInfo">cupsCopyDestInfo</a></h3>
1319 <p class="description">Get the supported values/capabilities for the
1320 destination.</p>
1321 <p class="code">
1322 <a href="#cups_dinfo_t">cups_dinfo_t</a> *cupsCopyDestInfo (<br>
1323 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
1324 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dest<br>
1325 );</p>
1326 <h4 class="parameters">Parameters</h4>
1327 <dl>
1328 <dt>http</dt>
1329 <dd class="description">Connection to destination</dd>
1330 <dt>dest</dt>
1331 <dd class="description">Destination</dd>
1332 </dl>
1333 <h4 class="returnvalue">Return Value</h4>
1334 <p class="description">Destination information</p>
1335 <h4 class="discussion">Discussion</h4>
1336 <p class="discussion">The caller is responsible for calling <a href="#cupsFreeDestInfo"><code>cupsFreeDestInfo</code></a> on the return
1337 value. <code>NULL</code> is returned on error.
1338
1339 </p>
1340 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="cupsCreateDestJob">cupsCreateDestJob</a></h3>
1341 <p class="description">Create a job on a destination.</p>
1342 <p class="code">
1343 ipp_status_t cupsCreateDestJob (<br>
1344 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
1345 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
1346 &#160;&#160;&#160;&#160;<a href="#cups_dinfo_t">cups_dinfo_t</a> *info,<br>
1347 &#160;&#160;&#160;&#160;int *job_id,<br>
1348 &#160;&#160;&#160;&#160;const char *title,<br>
1349 &#160;&#160;&#160;&#160;int num_options,<br>
1350 &#160;&#160;&#160;&#160;<a href="#cups_option_t">cups_option_t</a> *options<br>
1351 );</p>
1352 <h4 class="parameters">Parameters</h4>
1353 <dl>
1354 <dt>http</dt>
1355 <dd class="description">Connection to destination</dd>
1356 <dt>dest</dt>
1357 <dd class="description">Destination</dd>
1358 <dt>info</dt>
1359 <dd class="description">Destination information</dd>
1360 <dt>job_id</dt>
1361 <dd class="description">Job ID or 0 on error</dd>
1362 <dt>title</dt>
1363 <dd class="description">Job name</dd>
1364 <dt>num_options</dt>
1365 <dd class="description">Number of job options</dd>
1366 <dt>options</dt>
1367 <dd class="description">Job options</dd>
1368 </dl>
1369 <h4 class="returnvalue">Return Value</h4>
1370 <p class="description">IPP status code</p>
1371 <h4 class="discussion">Discussion</h4>
1372 <p class="discussion">Returns <code>IPP_STATUS_OK</code> or <code>IPP_STATUS_OK_SUBST</code> on success, saving the job ID
1373 in the variable pointed to by &quot;job_id&quot;.
1374
1375 </p>
1376 <h3 class="function"><span class="info">&#160;CUPS 1.1.20/macOS 10.4&#160;</span><a id="cupsDoAuthentication">cupsDoAuthentication</a></h3>
1377 <p class="description">Authenticate a request.</p>
1378 <p class="code">
1379 int cupsDoAuthentication (<br>
1380 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
1381 &#160;&#160;&#160;&#160;const char *method,<br>
1382 &#160;&#160;&#160;&#160;const char *resource<br>
1383 );</p>
1384 <h4 class="parameters">Parameters</h4>
1385 <dl>
1386 <dt>http</dt>
1387 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1388 <dt>method</dt>
1389 <dd class="description">Request method (&quot;GET&quot;, &quot;POST&quot;, &quot;PUT&quot;)</dd>
1390 <dt>resource</dt>
1391 <dd class="description">Resource path</dd>
1392 </dl>
1393 <h4 class="returnvalue">Return Value</h4>
1394 <p class="description">0 on success, -1 on error</p>
1395 <h4 class="discussion">Discussion</h4>
1396 <p class="discussion">This function should be called in response to a <code>HTTP_STATUS_UNAUTHORIZED</code>
1397 status, prior to resubmitting your request.
1398
1399 </p>
1400 <h3 class="function"><a id="cupsEncodeOptions">cupsEncodeOptions</a></h3>
1401 <p class="description"></p>
1402 <p class="code">
1403 void cupsEncodeOptions (<br>
1404 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
1405 &#160;&#160;&#160;&#160;int num_options,<br>
1406 &#160;&#160;&#160;&#160;<a href="#cups_option_t">cups_option_t</a> *options<br>
1407 );</p>
1408 <h4 class="parameters">Parameters</h4>
1409 <dl>
1410 <dt>ipp</dt>
1411 <dd class="description">Request to add to</dd>
1412 <dt>num_options</dt>
1413 <dd class="description">Number of options</dd>
1414 <dt>options</dt>
1415 <dd class="description">Options</dd>
1416 </dl>
1417 <h4 class="returnvalue">Return Value</h4>
1418 <p class="description">Encode printer options into IPP attributes.</p>
1419 <p class="discussion">This function adds operation, job, and then subscription attributes,
1420 in that order. Use the cupsEncodeOptions2() function to add attributes
1421 for a single group.
1422
1423 </p>
1424 <h3 class="function"><a id="cupsEncodeOptions2">cupsEncodeOptions2</a></h3>
1425 <p class="description">Add the options in the proper groups &amp; order...</p>
1426 <p class="code">
1427 void cupsEncodeOptions2 (<br>
1428 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
1429 &#160;&#160;&#160;&#160;int num_options,<br>
1430 &#160;&#160;&#160;&#160;<a href="#cups_option_t">cups_option_t</a> *options,<br>
1431 &#160;&#160;&#160;&#160;ipp_tag_t group_tag<br>
1432 );</p>
1433 <h4 class="parameters">Parameters</h4>
1434 <dl>
1435 <dt>ipp</dt>
1436 <dd class="description">Request to add to</dd>
1437 <dt>num_options</dt>
1438 <dd class="description">Number of options</dd>
1439 <dt>options</dt>
1440 <dd class="description">Options</dd>
1441 <dt>group_tag</dt>
1442 <dd class="description">Group to encode</dd>
1443 </dl>
1444 <h4 class="returnvalue">Return Value</h4>
1445 <p class="description">Encode printer options into IPP attributes for a group.</p>
1446 <p class="discussion">This function only adds attributes for a single group. Call this
1447 function multiple times for each group, or use cupsEncodeOptions()
1448 to add the standard groups.
1449
1450 </p>
1451 <h3 class="function"><a id="cupsEncryption">cupsEncryption</a></h3>
1452 <p class="description">Get the current encryption settings.</p>
1453 <p class="code">
1454 <a href="#http_encryption_t">http_encryption_t</a> cupsEncryption (void);</p>
1455 <h4 class="returnvalue">Return Value</h4>
1456 <p class="description">Encryption settings</p>
1457 <h4 class="discussion">Discussion</h4>
1458 <p class="discussion">The default encryption setting comes from the CUPS_ENCRYPTION
1459 environment variable, then the ~/.cups/client.conf file, and finally the
1460 /etc/cups/client.conf file. If not set, the default is
1461 <code>HTTP_ENCRYPTION_IF_REQUESTED</code>.<br>
1462 <br>
1463 Note: The current encryption setting is tracked separately for each thread
1464 in a program. Multi-threaded programs that override the setting via the
1465 <a href="#cupsSetEncryption"><code>cupsSetEncryption</code></a> function need to do so in each thread for the same
1466 setting to be used.</p>
1467 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="cupsEnumDests">cupsEnumDests</a></h3>
1468 <p class="description">Enumerate available destinations with a callback function.</p>
1469 <p class="code">
1470 int cupsEnumDests (<br>
1471 &#160;&#160;&#160;&#160;unsigned flags,<br>
1472 &#160;&#160;&#160;&#160;int msec,<br>
1473 &#160;&#160;&#160;&#160;int *cancel,<br>
1474 &#160;&#160;&#160;&#160;<a href="#cups_ptype_t">cups_ptype_t</a> type,<br>
1475 &#160;&#160;&#160;&#160;<a href="#cups_ptype_t">cups_ptype_t</a> mask,<br>
1476 &#160;&#160;&#160;&#160;<a href="#cups_dest_cb_t">cups_dest_cb_t</a> cb,<br>
1477 &#160;&#160;&#160;&#160;void *user_data<br>
1478 );</p>
1479 <h4 class="parameters">Parameters</h4>
1480 <dl>
1481 <dt>flags</dt>
1482 <dd class="description">Enumeration flags</dd>
1483 <dt>msec</dt>
1484 <dd class="description">Timeout in milliseconds, -1 for indefinite</dd>
1485 <dt>cancel</dt>
1486 <dd class="description">Pointer to &quot;cancel&quot; variable</dd>
1487 <dt>type</dt>
1488 <dd class="description">Printer type bits</dd>
1489 <dt>mask</dt>
1490 <dd class="description">Mask for printer type bits</dd>
1491 <dt>cb</dt>
1492 <dd class="description">Callback function</dd>
1493 <dt>user_data</dt>
1494 <dd class="description">User data</dd>
1495 </dl>
1496 <h4 class="returnvalue">Return Value</h4>
1497 <p class="description">1 on success, 0 on failure</p>
1498 <h4 class="discussion">Discussion</h4>
1499 <p class="discussion">Destinations are enumerated from one or more sources. The callback function
1500 receives the <code>user_data</code> pointer and the destination pointer which can
1501 be used as input to the <a href="#cupsCopyDest"><code>cupsCopyDest</code></a> function. The function must
1502 return 1 to continue enumeration or 0 to stop.<br>
1503 <br>
1504 The <code>type</code> and <code>mask</code> arguments allow the caller to filter the
1505 destinations that are enumerated. Passing 0 for both will enumerate all
1506 printers. The constant <code>CUPS_PRINTER_DISCOVERED</code> is used to filter on
1507 destinations that are available but have not yet been added locally.<br>
1508 <br>
1509 Enumeration happens on the current thread and does not return until all
1510 destinations have been enumerated or the callback function returns 0.
1511
1512 </p>
1513 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="cupsFindDestDefault">cupsFindDestDefault</a></h3>
1514 <p class="description">Find the default value(s) for the given option.</p>
1515 <p class="code">
1516 <a href="#ipp_attribute_t">ipp_attribute_t</a> *cupsFindDestDefault (<br>
1517 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
1518 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
1519 &#160;&#160;&#160;&#160;<a href="#cups_dinfo_t">cups_dinfo_t</a> *dinfo,<br>
1520 &#160;&#160;&#160;&#160;const char *option<br>
1521 );</p>
1522 <h4 class="parameters">Parameters</h4>
1523 <dl>
1524 <dt>http</dt>
1525 <dd class="description">Connection to destination</dd>
1526 <dt>dest</dt>
1527 <dd class="description">Destination</dd>
1528 <dt>dinfo</dt>
1529 <dd class="description">Destination information</dd>
1530 <dt>option</dt>
1531 <dd class="description">Option/attribute name</dd>
1532 </dl>
1533 <h4 class="returnvalue">Return Value</h4>
1534 <p class="description">Default attribute or <code>NULL</code> for none</p>
1535 <h4 class="discussion">Discussion</h4>
1536 <p class="discussion">The returned value is an IPP attribute. Use the <code>ippGetBoolean</code>,
1537 <code>ippGetCollection</code>, <code>ippGetCount</code>, <code>ippGetDate</code>,
1538 <code>ippGetInteger</code>, <code>ippGetOctetString</code>, <code>ippGetRange</code>,
1539 <code>ippGetResolution</code>, <code>ippGetString</code>, and <code>ippGetValueTag</code>
1540 functions to inspect the default value(s) as needed.
1541
1542 </p>
1543 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="cupsFindDestReady">cupsFindDestReady</a></h3>
1544 <p class="description">Find the default value(s) for the given option.</p>
1545 <p class="code">
1546 <a href="#ipp_attribute_t">ipp_attribute_t</a> *cupsFindDestReady (<br>
1547 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
1548 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
1549 &#160;&#160;&#160;&#160;<a href="#cups_dinfo_t">cups_dinfo_t</a> *dinfo,<br>
1550 &#160;&#160;&#160;&#160;const char *option<br>
1551 );</p>
1552 <h4 class="parameters">Parameters</h4>
1553 <dl>
1554 <dt>http</dt>
1555 <dd class="description">Connection to destination</dd>
1556 <dt>dest</dt>
1557 <dd class="description">Destination</dd>
1558 <dt>dinfo</dt>
1559 <dd class="description">Destination information</dd>
1560 <dt>option</dt>
1561 <dd class="description">Option/attribute name</dd>
1562 </dl>
1563 <h4 class="returnvalue">Return Value</h4>
1564 <p class="description">Default attribute or <code>NULL</code> for none</p>
1565 <h4 class="discussion">Discussion</h4>
1566 <p class="discussion">The returned value is an IPP attribute. Use the <code>ippGetBoolean</code>,
1567 <code>ippGetCollection</code>, <code>ippGetCount</code>, <code>ippGetDate</code>,
1568 <code>ippGetInteger</code>, <code>ippGetOctetString</code>, <code>ippGetRange</code>,
1569 <code>ippGetResolution</code>, <code>ippGetString</code>, and <code>ippGetValueTag</code>
1570 functions to inspect the default value(s) as needed.
1571
1572 </p>
1573 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="cupsFindDestSupported">cupsFindDestSupported</a></h3>
1574 <p class="description">Find the default value(s) for the given option.</p>
1575 <p class="code">
1576 <a href="#ipp_attribute_t">ipp_attribute_t</a> *cupsFindDestSupported (<br>
1577 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
1578 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
1579 &#160;&#160;&#160;&#160;<a href="#cups_dinfo_t">cups_dinfo_t</a> *dinfo,<br>
1580 &#160;&#160;&#160;&#160;const char *option<br>
1581 );</p>
1582 <h4 class="parameters">Parameters</h4>
1583 <dl>
1584 <dt>http</dt>
1585 <dd class="description">Connection to destination</dd>
1586 <dt>dest</dt>
1587 <dd class="description">Destination</dd>
1588 <dt>dinfo</dt>
1589 <dd class="description">Destination information</dd>
1590 <dt>option</dt>
1591 <dd class="description">Option/attribute name</dd>
1592 </dl>
1593 <h4 class="returnvalue">Return Value</h4>
1594 <p class="description">Default attribute or <code>NULL</code> for none</p>
1595 <h4 class="discussion">Discussion</h4>
1596 <p class="discussion">The returned value is an IPP attribute. Use the <code>ippGetBoolean</code>,
1597 <code>ippGetCollection</code>, <code>ippGetCount</code>, <code>ippGetDate</code>,
1598 <code>ippGetInteger</code>, <code>ippGetOctetString</code>, <code>ippGetRange</code>,
1599 <code>ippGetResolution</code>, <code>ippGetString</code>, and <code>ippGetValueTag</code>
1600 functions to inspect the default value(s) as needed.
1601
1602 </p>
1603 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="cupsFinishDestDocument">cupsFinishDestDocument</a></h3>
1604 <p class="description">Finish the current document.</p>
1605 <p class="code">
1606 ipp_status_t cupsFinishDestDocument (<br>
1607 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
1608 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
1609 &#160;&#160;&#160;&#160;<a href="#cups_dinfo_t">cups_dinfo_t</a> *info<br>
1610 );</p>
1611 <h4 class="parameters">Parameters</h4>
1612 <dl>
1613 <dt>http</dt>
1614 <dd class="description">Connection to destination</dd>
1615 <dt>dest</dt>
1616 <dd class="description">Destination</dd>
1617 <dt>info</dt>
1618 <dd class="description">Destination information</dd>
1619 </dl>
1620 <h4 class="returnvalue">Return Value</h4>
1621 <p class="description">Status of document submission</p>
1622 <h4 class="discussion">Discussion</h4>
1623 <p class="discussion">Returns <code>IPP_STATUS_OK</code> or <code>IPP_STATUS_OK_SUBST</code> on success.
1624
1625 </p>
1626 <h3 class="function"><a id="cupsFreeDestInfo">cupsFreeDestInfo</a></h3>
1627 <p class="description">Find and return the attribute...</p>
1628 <p class="code">
1629 void cupsFreeDestInfo (<br>
1630 &#160;&#160;&#160;&#160;<a href="#cups_dinfo_t">cups_dinfo_t</a> *dinfo<br>
1631 );</p>
1632 <h4 class="parameters">Parameters</h4>
1633 <dl>
1634 <dt>dinfo</dt>
1635 <dd class="description">Destination information</dd>
1636 </dl>
1637 <h4 class="returnvalue">Return Value</h4>
1638 <p class="description">Free destination information obtained using
1639 <a href="#cupsCopyDestInfo"><code>cupsCopyDestInfo</code></a>.</p>
1640 <h3 class="function"><a id="cupsFreeDests">cupsFreeDests</a></h3>
1641 <p class="description">Block</p>
1642 <p class="code">
1643 void cupsFreeDests (<br>
1644 &#160;&#160;&#160;&#160;int num_dests,<br>
1645 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dests<br>
1646 );</p>
1647 <h4 class="parameters">Parameters</h4>
1648 <dl>
1649 <dt>num_dests</dt>
1650 <dd class="description">Number of destinations</dd>
1651 <dt>dests</dt>
1652 <dd class="description">Destinations</dd>
1653 </dl>
1654 <h4 class="returnvalue">Return Value</h4>
1655 <p class="description">Free the memory used by the list of destinations.</p>
1656 <h3 class="function"><a id="cupsFreeJobs">cupsFreeJobs</a></h3>
1657 <p class="description">Printer resource</p>
1658 <p class="code">
1659 void cupsFreeJobs (<br>
1660 &#160;&#160;&#160;&#160;int num_jobs,<br>
1661 &#160;&#160;&#160;&#160;<a href="#cups_job_t">cups_job_t</a> *jobs<br>
1662 );</p>
1663 <h4 class="parameters">Parameters</h4>
1664 <dl>
1665 <dt>num_jobs</dt>
1666 <dd class="description">Number of jobs</dd>
1667 <dt>jobs</dt>
1668 <dd class="description">Jobs</dd>
1669 </dl>
1670 <h4 class="returnvalue">Return Value</h4>
1671 <p class="description">Free memory used by job data.</p>
1672 <h3 class="function"><a id="cupsFreeOptions">cupsFreeOptions</a></h3>
1673 <p class="description">Match found; free the old value...</p>
1674 <p class="code">
1675 void cupsFreeOptions (<br>
1676 &#160;&#160;&#160;&#160;int num_options,<br>
1677 &#160;&#160;&#160;&#160;<a href="#cups_option_t">cups_option_t</a> *options<br>
1678 );</p>
1679 <h4 class="parameters">Parameters</h4>
1680 <dl>
1681 <dt>num_options</dt>
1682 <dd class="description">Number of options</dd>
1683 <dt>options</dt>
1684 <dd class="description">Pointer to options</dd>
1685 </dl>
1686 <h4 class="returnvalue">Return Value</h4>
1687 <p class="description">Free all memory used by options.</p>
1688 <h3 class="function"><a id="cupsGetDest">cupsGetDest</a></h3>
1689 <p class="description">Get the named destination from the list.</p>
1690 <p class="code">
1691 <a href="#cups_dest_t">cups_dest_t</a> *cupsGetDest (<br>
1692 &#160;&#160;&#160;&#160;const char *name,<br>
1693 &#160;&#160;&#160;&#160;const char *instance,<br>
1694 &#160;&#160;&#160;&#160;int num_dests,<br>
1695 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dests<br>
1696 );</p>
1697 <h4 class="parameters">Parameters</h4>
1698 <dl>
1699 <dt>name</dt>
1700 <dd class="description">Destination name or <code>NULL</code> for the default destination</dd>
1701 <dt>instance</dt>
1702 <dd class="description">Instance name or <code>NULL</code></dd>
1703 <dt>num_dests</dt>
1704 <dd class="description">Number of destinations</dd>
1705 <dt>dests</dt>
1706 <dd class="description">Destinations</dd>
1707 </dl>
1708 <h4 class="returnvalue">Return Value</h4>
1709 <p class="description">Destination pointer or <code>NULL</code></p>
1710 <h4 class="discussion">Discussion</h4>
1711 <p class="discussion">Use the <a href="#cupsGetDests"><code>cupsGetDests</code></a> or <a href="#cupsGetDests2"><code>cupsGetDests2</code></a> functions to get a
1712 list of supported destinations for the current user.</p>
1713 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="cupsGetDestMediaByIndex">cupsGetDestMediaByIndex</a></h3>
1714 <p class="description">Get a media name, dimension, and margins for a
1715 specific size.</p>
1716 <p class="code">
1717 int cupsGetDestMediaByIndex (<br>
1718 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
1719 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
1720 &#160;&#160;&#160;&#160;<a href="#cups_dinfo_t">cups_dinfo_t</a> *dinfo,<br>
1721 &#160;&#160;&#160;&#160;int n,<br>
1722 &#160;&#160;&#160;&#160;unsigned flags,<br>
1723 &#160;&#160;&#160;&#160;<a href="#cups_size_t">cups_size_t</a> *size<br>
1724 );</p>
1725 <h4 class="parameters">Parameters</h4>
1726 <dl>
1727 <dt>http</dt>
1728 <dd class="description">Connection to destination</dd>
1729 <dt>dest</dt>
1730 <dd class="description">Destination</dd>
1731 <dt>dinfo</dt>
1732 <dd class="description">Destination information</dd>
1733 <dt>n</dt>
1734 <dd class="description">Media size number (0-based)</dd>
1735 <dt>flags</dt>
1736 <dd class="description">Media flags</dd>
1737 <dt>size</dt>
1738 <dd class="description">Media size information</dd>
1739 </dl>
1740 <h4 class="returnvalue">Return Value</h4>
1741 <p class="description">1 on success, 0 on failure</p>
1742 <h4 class="discussion">Discussion</h4>
1743 <p class="discussion">The <code>flags</code> parameter determines which set of media are indexed. For
1744 example, passing <code>CUPS_MEDIA_FLAGS_BORDERLESS</code> will get the Nth
1745 borderless size supported by the printer.
1746
1747 </p>
1748 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="cupsGetDestMediaByName">cupsGetDestMediaByName</a></h3>
1749 <p class="description">Get media names, dimensions, and margins.</p>
1750 <p class="code">
1751 int cupsGetDestMediaByName (<br>
1752 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
1753 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
1754 &#160;&#160;&#160;&#160;<a href="#cups_dinfo_t">cups_dinfo_t</a> *dinfo,<br>
1755 &#160;&#160;&#160;&#160;const char *media,<br>
1756 &#160;&#160;&#160;&#160;unsigned flags,<br>
1757 &#160;&#160;&#160;&#160;<a href="#cups_size_t">cups_size_t</a> *size<br>
1758 );</p>
1759 <h4 class="parameters">Parameters</h4>
1760 <dl>
1761 <dt>http</dt>
1762 <dd class="description">Connection to destination</dd>
1763 <dt>dest</dt>
1764 <dd class="description">Destination</dd>
1765 <dt>dinfo</dt>
1766 <dd class="description">Destination information</dd>
1767 <dt>media</dt>
1768 <dd class="description">Media name</dd>
1769 <dt>flags</dt>
1770 <dd class="description">Media matching flags</dd>
1771 <dt>size</dt>
1772 <dd class="description">Media size information</dd>
1773 </dl>
1774 <h4 class="returnvalue">Return Value</h4>
1775 <p class="description">1 on match, 0 on failure</p>
1776 <h4 class="discussion">Discussion</h4>
1777 <p class="discussion">The &quot;media&quot; string is a PWG media name. &quot;Flags&quot; provides some matching
1778 guidance (multiple flags can be combined):<br>
1779 <br>
1780 CUPS_MEDIA_FLAGS_DEFAULT = find the closest size supported by the printer,
1781 CUPS_MEDIA_FLAGS_BORDERLESS = find a borderless size,
1782 CUPS_MEDIA_FLAGS_DUPLEX = find a size compatible with 2-sided printing,
1783 CUPS_MEDIA_FLAGS_EXACT = find an exact match for the size, and
1784 CUPS_MEDIA_FLAGS_READY = if the printer supports media sensing, find the
1785 size amongst the &quot;ready&quot; media.<br>
1786 <br>
1787 The matching result (if any) is returned in the &quot;cups_size_t&quot; structure.<br>
1788 <br>
1789 Returns 1 when there is a match and 0 if there is not a match.
1790
1791 </p>
1792 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="cupsGetDestMediaBySize">cupsGetDestMediaBySize</a></h3>
1793 <p class="description">Get media names, dimensions, and margins.</p>
1794 <p class="code">
1795 int cupsGetDestMediaBySize (<br>
1796 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
1797 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
1798 &#160;&#160;&#160;&#160;<a href="#cups_dinfo_t">cups_dinfo_t</a> *dinfo,<br>
1799 &#160;&#160;&#160;&#160;int width,<br>
1800 &#160;&#160;&#160;&#160;int length,<br>
1801 &#160;&#160;&#160;&#160;unsigned flags,<br>
1802 &#160;&#160;&#160;&#160;<a href="#cups_size_t">cups_size_t</a> *size<br>
1803 );</p>
1804 <h4 class="parameters">Parameters</h4>
1805 <dl>
1806 <dt>http</dt>
1807 <dd class="description">Connection to destination</dd>
1808 <dt>dest</dt>
1809 <dd class="description">Destination</dd>
1810 <dt>dinfo</dt>
1811 <dd class="description">Destination information</dd>
1812 <dt>width</dt>
1813 <dd class="description">Media width in hundredths of
1814 of millimeters</dd>
1815 <dt>length</dt>
1816 <dd class="description">Media length in hundredths of
1817 of millimeters</dd>
1818 <dt>flags</dt>
1819 <dd class="description">Media matching flags</dd>
1820 <dt>size</dt>
1821 <dd class="description">Media size information</dd>
1822 </dl>
1823 <h4 class="returnvalue">Return Value</h4>
1824 <p class="description">1 on match, 0 on failure</p>
1825 <h4 class="discussion">Discussion</h4>
1826 <p class="discussion">&quot;Width&quot; and &quot;length&quot; are the dimensions in hundredths of millimeters.
1827 &quot;Flags&quot; provides some matching guidance (multiple flags can be combined):<br>
1828 <br>
1829 CUPS_MEDIA_FLAGS_DEFAULT = find the closest size supported by the printer,
1830 CUPS_MEDIA_FLAGS_BORDERLESS = find a borderless size,
1831 CUPS_MEDIA_FLAGS_DUPLEX = find a size compatible with 2-sided printing,
1832 CUPS_MEDIA_FLAGS_EXACT = find an exact match for the size, and
1833 CUPS_MEDIA_FLAGS_READY = if the printer supports media sensing, find the
1834 size amongst the &quot;ready&quot; media.<br>
1835 <br>
1836 The matching result (if any) is returned in the &quot;cups_size_t&quot; structure.<br>
1837 <br>
1838 Returns 1 when there is a match and 0 if there is not a match.
1839
1840 </p>
1841 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="cupsGetDestMediaCount">cupsGetDestMediaCount</a></h3>
1842 <p class="description">Get the number of sizes supported by a
1843 destination.</p>
1844 <p class="code">
1845 int cupsGetDestMediaCount (<br>
1846 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
1847 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
1848 &#160;&#160;&#160;&#160;<a href="#cups_dinfo_t">cups_dinfo_t</a> *dinfo,<br>
1849 &#160;&#160;&#160;&#160;unsigned flags<br>
1850 );</p>
1851 <h4 class="parameters">Parameters</h4>
1852 <dl>
1853 <dt>http</dt>
1854 <dd class="description">Connection to destination</dd>
1855 <dt>dest</dt>
1856 <dd class="description">Destination</dd>
1857 <dt>dinfo</dt>
1858 <dd class="description">Destination information</dd>
1859 <dt>flags</dt>
1860 <dd class="description">Media flags</dd>
1861 </dl>
1862 <h4 class="returnvalue">Return Value</h4>
1863 <p class="description">Number of sizes</p>
1864 <h4 class="discussion">Discussion</h4>
1865 <p class="discussion">The <code>flags</code> parameter determines the set of media sizes that are
1866 counted. For example, passing <code>CUPS_MEDIA_FLAGS_BORDERLESS</code> will return
1867 the number of borderless sizes.
1868
1869 </p>
1870 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="cupsGetDestMediaDefault">cupsGetDestMediaDefault</a></h3>
1871 <p class="description">Get the default size for a destination.</p>
1872 <p class="code">
1873 int cupsGetDestMediaDefault (<br>
1874 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
1875 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
1876 &#160;&#160;&#160;&#160;<a href="#cups_dinfo_t">cups_dinfo_t</a> *dinfo,<br>
1877 &#160;&#160;&#160;&#160;unsigned flags,<br>
1878 &#160;&#160;&#160;&#160;<a href="#cups_size_t">cups_size_t</a> *size<br>
1879 );</p>
1880 <h4 class="parameters">Parameters</h4>
1881 <dl>
1882 <dt>http</dt>
1883 <dd class="description">Connection to destination</dd>
1884 <dt>dest</dt>
1885 <dd class="description">Destination</dd>
1886 <dt>dinfo</dt>
1887 <dd class="description">Destination information</dd>
1888 <dt>flags</dt>
1889 <dd class="description">Media flags</dd>
1890 <dt>size</dt>
1891 <dd class="description">Media size information</dd>
1892 </dl>
1893 <h4 class="returnvalue">Return Value</h4>
1894 <p class="description">1 on success, 0 on failure</p>
1895 <h4 class="discussion">Discussion</h4>
1896 <p class="discussion">The <code>flags</code> parameter determines which default size is returned. For
1897 example, passing <code>CUPS_MEDIA_FLAGS_BORDERLESS</code> will return the default
1898 borderless size, typically US Letter or A4, but sometimes 4x6 photo media.
1899
1900 </p>
1901 <h3 class="function"><span class="info">&#160;CUPS 2.0/macOS 10.10&#160;</span><a id="cupsGetDestWithURI">cupsGetDestWithURI</a></h3>
1902 <p class="description">Get a destination associated with a URI.</p>
1903 <p class="code">
1904 <a href="#cups_dest_t">cups_dest_t</a> *cupsGetDestWithURI (<br>
1905 &#160;&#160;&#160;&#160;const char *name,<br>
1906 &#160;&#160;&#160;&#160;const char *uri<br>
1907 );</p>
1908 <h4 class="parameters">Parameters</h4>
1909 <dl>
1910 <dt>name</dt>
1911 <dd class="description">Desired printer name or <code>NULL</code></dd>
1912 <dt>uri</dt>
1913 <dd class="description">URI for the printer</dd>
1914 </dl>
1915 <h4 class="returnvalue">Return Value</h4>
1916 <p class="description">Destination or <code>NULL</code></p>
1917 <h4 class="discussion">Discussion</h4>
1918 <p class="discussion">&quot;name&quot; is the desired name for the printer. If <code>NULL</code>, a name will be
1919 created using the URI.<br>
1920 <br>
1921 &quot;uri&quot; is the &quot;ipp&quot; or &quot;ipps&quot; URI for the printer.
1922
1923 </p>
1924 <h3 class="function"><span class="info">&#160;2.2.4&#160;</span><a id="cupsGetIntegerOption">cupsGetIntegerOption</a></h3>
1925 <p class="description">Get an integer option value.</p>
1926 <p class="code">
1927 int cupsGetIntegerOption (<br>
1928 &#160;&#160;&#160;&#160;const char *name,<br>
1929 &#160;&#160;&#160;&#160;int num_options,<br>
1930 &#160;&#160;&#160;&#160;<a href="#cups_option_t">cups_option_t</a> *options<br>
1931 );</p>
1932 <h4 class="parameters">Parameters</h4>
1933 <dl>
1934 <dt>name</dt>
1935 <dd class="description">Name of option</dd>
1936 <dt>num_options</dt>
1937 <dd class="description">Number of options</dd>
1938 <dt>options</dt>
1939 <dd class="description">Options</dd>
1940 </dl>
1941 <h4 class="returnvalue">Return Value</h4>
1942 <p class="description">Option value or <code>INT_MIN</code></p>
1943 <h4 class="discussion">Discussion</h4>
1944 <p class="discussion">INT_MIN is returned when the option does not exist, is not an integer, or
1945 exceeds the range of values for the &quot;int&quot; type.
1946
1947 </p>
1948 <h3 class="function"><span class="info">&#160;CUPS 1.1.21/macOS 10.4&#160;</span><a id="cupsGetJobs2">cupsGetJobs2</a></h3>
1949 <p class="description">Get the jobs from the specified server.</p>
1950 <p class="code">
1951 int cupsGetJobs2 (<br>
1952 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
1953 &#160;&#160;&#160;&#160;<a href="#cups_job_t">cups_job_t</a> **jobs,<br>
1954 &#160;&#160;&#160;&#160;const char *name,<br>
1955 &#160;&#160;&#160;&#160;int myjobs,<br>
1956 &#160;&#160;&#160;&#160;int whichjobs<br>
1957 );</p>
1958 <h4 class="parameters">Parameters</h4>
1959 <dl>
1960 <dt>http</dt>
1961 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1962 <dt>jobs</dt>
1963 <dd class="description">Job data</dd>
1964 <dt>name</dt>
1965 <dd class="description"><code>NULL</code> = all destinations, otherwise show jobs for named destination</dd>
1966 <dt>myjobs</dt>
1967 <dd class="description">0 = all users, 1 = mine</dd>
1968 <dt>whichjobs</dt>
1969 <dd class="description"><code>CUPS_WHICHJOBS_ALL</code>, <code>CUPS_WHICHJOBS_ACTIVE</code>, or <code>CUPS_WHICHJOBS_COMPLETED</code></dd>
1970 </dl>
1971 <h4 class="returnvalue">Return Value</h4>
1972 <p class="description">Number of jobs</p>
1973 <h4 class="discussion">Discussion</h4>
1974 <p class="discussion">A &quot;whichjobs&quot; value of <code>CUPS_WHICHJOBS_ALL</code> returns all jobs regardless
1975 of state, while <code>CUPS_WHICHJOBS_ACTIVE</code> returns jobs that are
1976 pending, processing, or held and <code>CUPS_WHICHJOBS_COMPLETED</code> returns
1977 jobs that are stopped, canceled, aborted, or completed.
1978
1979 </p>
1980 <h3 class="function"><span class="info">&#160;CUPS 1.4/macOS 10.6&#160;</span><a id="cupsGetNamedDest">cupsGetNamedDest</a></h3>
1981 <p class="description">Get options for the named destination.</p>
1982 <p class="code">
1983 <a href="#cups_dest_t">cups_dest_t</a> *cupsGetNamedDest (<br>
1984 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
1985 &#160;&#160;&#160;&#160;const char *name,<br>
1986 &#160;&#160;&#160;&#160;const char *instance<br>
1987 );</p>
1988 <h4 class="parameters">Parameters</h4>
1989 <dl>
1990 <dt>http</dt>
1991 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1992 <dt>name</dt>
1993 <dd class="description">Destination name or <code>NULL</code> for the default destination</dd>
1994 <dt>instance</dt>
1995 <dd class="description">Instance name or <code>NULL</code></dd>
1996 </dl>
1997 <h4 class="returnvalue">Return Value</h4>
1998 <p class="description">Destination or <code>NULL</code></p>
1999 <h4 class="discussion">Discussion</h4>
2000 <p class="discussion">This function is optimized for retrieving a single destination and should
2001 be used instead of <a href="#cupsGetDests"><code>cupsGetDests</code></a> and <a href="#cupsGetDest"><code>cupsGetDest</code></a> when you either
2002 know the name of the destination or want to print to the default destination.
2003 If <code>NULL</code> is returned, the destination does not exist or there is no
2004 default destination.<br>
2005 <br>
2006 If &quot;http&quot; is <code>CUPS_HTTP_DEFAULT</code>, the connection to the default print
2007 server will be used.<br>
2008 <br>
2009 If &quot;name&quot; is <code>NULL</code>, the default printer for the current user will be
2010 returned.<br>
2011 <br>
2012 The returned destination must be freed using <a href="#cupsFreeDests"><code>cupsFreeDests</code></a> with a
2013 &quot;num_dests&quot; value of 1.
2014
2015 </p>
2016 <h3 class="function"><a id="cupsGetOption">cupsGetOption</a></h3>
2017 <p class="description">Get an option value.</p>
2018 <p class="code">
2019 const char *cupsGetOption (<br>
2020 &#160;&#160;&#160;&#160;const char *name,<br>
2021 &#160;&#160;&#160;&#160;int num_options,<br>
2022 &#160;&#160;&#160;&#160;<a href="#cups_option_t">cups_option_t</a> *options<br>
2023 );</p>
2024 <h4 class="parameters">Parameters</h4>
2025 <dl>
2026 <dt>name</dt>
2027 <dd class="description">Name of option</dd>
2028 <dt>num_options</dt>
2029 <dd class="description">Number of options</dd>
2030 <dt>options</dt>
2031 <dd class="description">Options</dd>
2032 </dl>
2033 <h4 class="returnvalue">Return Value</h4>
2034 <p class="description">Option value or <code>NULL</code></p>
2035 <h3 class="function"><span class="info">&#160;CUPS 1.4/macOS 10.6&#160;</span><a id="cupsGetPassword2">cupsGetPassword2</a></h3>
2036 <p class="description">Get a password from the user using the advanced
2037 password callback.</p>
2038 <p class="code">
2039 const char *cupsGetPassword2 (<br>
2040 &#160;&#160;&#160;&#160;const char *prompt,<br>
2041 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
2042 &#160;&#160;&#160;&#160;const char *method,<br>
2043 &#160;&#160;&#160;&#160;const char *resource<br>
2044 );</p>
2045 <h4 class="parameters">Parameters</h4>
2046 <dl>
2047 <dt>prompt</dt>
2048 <dd class="description">Prompt string</dd>
2049 <dt>http</dt>
2050 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
2051 <dt>method</dt>
2052 <dd class="description">Request method (&quot;GET&quot;, &quot;POST&quot;, &quot;PUT&quot;)</dd>
2053 <dt>resource</dt>
2054 <dd class="description">Resource path</dd>
2055 </dl>
2056 <h4 class="returnvalue">Return Value</h4>
2057 <p class="description">Password</p>
2058 <h4 class="discussion">Discussion</h4>
2059 <p class="discussion">Uses the current password callback function. Returns <code>NULL</code> if the
2060 user does not provide a password.<br>
2061 <br>
2062 Note: The current password callback function is tracked separately for each
2063 thread in a program. Multi-threaded programs that override the setting via
2064 the <a href="#cupsSetPasswordCB"><code>cupsSetPasswordCB</code></a> or <a href="#cupsSetPasswordCB2"><code>cupsSetPasswordCB2</code></a> functions need to
2065 do so in each thread for the same function to be used.
2066
2067 </p>
2068 <h3 class="function"><a id="cupsLangDefault">cupsLangDefault</a></h3>
2069 <p class="description">Return the default language.</p>
2070 <p class="code">
2071 <a href="#cups_lang_t">cups_lang_t</a> *cupsLangDefault (void);</p>
2072 <h4 class="returnvalue">Return Value</h4>
2073 <p class="description">Language data</p>
2074 <h3 class="function"><a id="cupsLangEncoding">cupsLangEncoding</a></h3>
2075 <p class="description">Return the character encoding (us-ascii, etc.)
2076 for the given language.</p>
2077 <p class="code">
2078 const char *cupsLangEncoding (<br>
2079 &#160;&#160;&#160;&#160;<a href="#cups_lang_t">cups_lang_t</a> *lang<br>
2080 );</p>
2081 <h4 class="parameters">Parameters</h4>
2082 <dl>
2083 <dt>lang</dt>
2084 <dd class="description">Language data</dd>
2085 </dl>
2086 <h4 class="returnvalue">Return Value</h4>
2087 <p class="description">Character encoding</p>
2088 <h3 class="function"><a id="cupsLangFlush">cupsLangFlush</a></h3>
2089 <p class="description">Language data</p>
2090 <p class="code">
2091 void cupsLangFlush (void);</p>
2092 <h4 class="returnvalue">Return Value</h4>
2093 <p class="description">Flush all language data out of the cache.</p>
2094 <h3 class="function"><a id="cupsLangFree">cupsLangFree</a></h3>
2095 <p class="description">Then free the language structure itself...</p>
2096 <p class="code">
2097 void cupsLangFree (<br>
2098 &#160;&#160;&#160;&#160;<a href="#cups_lang_t">cups_lang_t</a> *lang<br>
2099 );</p>
2100 <h4 class="parameters">Parameters</h4>
2101 <dl>
2102 <dt>lang</dt>
2103 <dd class="description">Language to free</dd>
2104 </dl>
2105 <h4 class="returnvalue">Return Value</h4>
2106 <p class="description">Free language data.</p>
2107 <p class="discussion">This does not actually free anything; use <a href="#cupsLangFlush"><code>cupsLangFlush</code></a> for that.</p>
2108 <h3 class="function"><a id="cupsLangGet">cupsLangGet</a></h3>
2109 <p class="description">Get a language.</p>
2110 <p class="code">
2111 <a href="#cups_lang_t">cups_lang_t</a> *cupsLangGet (<br>
2112 &#160;&#160;&#160;&#160;const char *language<br>
2113 );</p>
2114 <h4 class="parameters">Parameters</h4>
2115 <dl>
2116 <dt>language</dt>
2117 <dd class="description">Language or locale</dd>
2118 </dl>
2119 <h4 class="returnvalue">Return Value</h4>
2120 <p class="description">Language data</p>
2121 <h3 class="function"><span class="info">&#160;CUPS 2.0/macOS 10.10&#160;</span><a id="cupsLocalizeDestMedia">cupsLocalizeDestMedia</a></h3>
2122 <p class="description">Get the localized string for a destination media
2123 size.</p>
2124 <p class="code">
2125 const char *cupsLocalizeDestMedia (<br>
2126 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
2127 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
2128 &#160;&#160;&#160;&#160;<a href="#cups_dinfo_t">cups_dinfo_t</a> *dinfo,<br>
2129 &#160;&#160;&#160;&#160;unsigned flags,<br>
2130 &#160;&#160;&#160;&#160;<a href="#cups_size_t">cups_size_t</a> *size<br>
2131 );</p>
2132 <h4 class="parameters">Parameters</h4>
2133 <dl>
2134 <dt>http</dt>
2135 <dd class="description">Connection to destination</dd>
2136 <dt>dest</dt>
2137 <dd class="description">Destination</dd>
2138 <dt>dinfo</dt>
2139 <dd class="description">Destination information</dd>
2140 <dt>flags</dt>
2141 <dd class="description">Media flags</dd>
2142 <dt>size</dt>
2143 <dd class="description">Media size</dd>
2144 </dl>
2145 <h4 class="returnvalue">Return Value</h4>
2146 <p class="description">Localized string</p>
2147 <h4 class="discussion">Discussion</h4>
2148 <p class="discussion">The returned string is stored in the destination information and will become
2149 invalid if the destination information is deleted.
2150
2151 </p>
2152 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="cupsLocalizeDestOption">cupsLocalizeDestOption</a></h3>
2153 <p class="description">Get the localized string for a destination
2154 option.</p>
2155 <p class="code">
2156 const char *cupsLocalizeDestOption (<br>
2157 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
2158 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
2159 &#160;&#160;&#160;&#160;<a href="#cups_dinfo_t">cups_dinfo_t</a> *dinfo,<br>
2160 &#160;&#160;&#160;&#160;const char *option<br>
2161 );</p>
2162 <h4 class="parameters">Parameters</h4>
2163 <dl>
2164 <dt>http</dt>
2165 <dd class="description">Connection to destination</dd>
2166 <dt>dest</dt>
2167 <dd class="description">Destination</dd>
2168 <dt>dinfo</dt>
2169 <dd class="description">Destination information</dd>
2170 <dt>option</dt>
2171 <dd class="description">Option to localize</dd>
2172 </dl>
2173 <h4 class="returnvalue">Return Value</h4>
2174 <p class="description">Localized string</p>
2175 <h4 class="discussion">Discussion</h4>
2176 <p class="discussion">The returned string is stored in the destination information and will become
2177 invalid if the destination information is deleted.
2178
2179 </p>
2180 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="cupsLocalizeDestValue">cupsLocalizeDestValue</a></h3>
2181 <p class="description">Get the localized string for a destination
2182 option+value pair.</p>
2183 <p class="code">
2184 const char *cupsLocalizeDestValue (<br>
2185 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
2186 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
2187 &#160;&#160;&#160;&#160;<a href="#cups_dinfo_t">cups_dinfo_t</a> *dinfo,<br>
2188 &#160;&#160;&#160;&#160;const char *option,<br>
2189 &#160;&#160;&#160;&#160;const char *value<br>
2190 );</p>
2191 <h4 class="parameters">Parameters</h4>
2192 <dl>
2193 <dt>http</dt>
2194 <dd class="description">Connection to destination</dd>
2195 <dt>dest</dt>
2196 <dd class="description">Destination</dd>
2197 <dt>dinfo</dt>
2198 <dd class="description">Destination information</dd>
2199 <dt>option</dt>
2200 <dd class="description">Option to localize</dd>
2201 <dt>value</dt>
2202 <dd class="description">Value to localize</dd>
2203 </dl>
2204 <h4 class="returnvalue">Return Value</h4>
2205 <p class="description">Localized string</p>
2206 <h4 class="discussion">Discussion</h4>
2207 <p class="discussion">The returned string is stored in the destination information and will become
2208 invalid if the destination information is deleted.
2209
2210 </p>
2211 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="cupsMakeServerCredentials">cupsMakeServerCredentials</a></h3>
2212 <p class="description">Make a self-signed certificate and private key pair.</p>
2213 <p class="code">
2214 int cupsMakeServerCredentials (<br>
2215 &#160;&#160;&#160;&#160;const char *path,<br>
2216 &#160;&#160;&#160;&#160;const char *common_name,<br>
2217 &#160;&#160;&#160;&#160;int num_alt_names,<br>
2218 &#160;&#160;&#160;&#160;const char **alt_names,<br>
2219 &#160;&#160;&#160;&#160;time_t expiration_date<br>
2220 );</p>
2221 <h4 class="parameters">Parameters</h4>
2222 <dl>
2223 <dt>path</dt>
2224 <dd class="description">Keychain path or <code>NULL</code> for default</dd>
2225 <dt>common_name</dt>
2226 <dd class="description">Common name</dd>
2227 <dt>num_alt_names</dt>
2228 <dd class="description">Number of subject alternate names</dd>
2229 <dt>alt_names</dt>
2230 <dd class="description">Subject Alternate Names</dd>
2231 <dt>expiration_date</dt>
2232 <dd class="description">Expiration date</dd>
2233 </dl>
2234 <h4 class="returnvalue">Return Value</h4>
2235 <p class="description">1 on success, 0 on failure</p>
2236 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="cupsNotifySubject">cupsNotifySubject</a></h3>
2237 <p class="description">Return the subject for the given notification message.</p>
2238 <p class="code">
2239 char *cupsNotifySubject (<br>
2240 &#160;&#160;&#160;&#160;<a href="#cups_lang_t">cups_lang_t</a> *lang,<br>
2241 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *event<br>
2242 );</p>
2243 <h4 class="parameters">Parameters</h4>
2244 <dl>
2245 <dt>lang</dt>
2246 <dd class="description">Language data</dd>
2247 <dt>event</dt>
2248 <dd class="description">Event data</dd>
2249 </dl>
2250 <h4 class="returnvalue">Return Value</h4>
2251 <p class="description">Subject string or <code>NULL</code></p>
2252 <h4 class="discussion">Discussion</h4>
2253 <p class="discussion">The returned string must be freed by the caller using <code>free</code>.
2254
2255 </p>
2256 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="cupsNotifyText">cupsNotifyText</a></h3>
2257 <p class="description">Return the text for the given notification message.</p>
2258 <p class="code">
2259 char *cupsNotifyText (<br>
2260 &#160;&#160;&#160;&#160;<a href="#cups_lang_t">cups_lang_t</a> *lang,<br>
2261 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *event<br>
2262 );</p>
2263 <h4 class="parameters">Parameters</h4>
2264 <dl>
2265 <dt>lang</dt>
2266 <dd class="description">Language data</dd>
2267 <dt>event</dt>
2268 <dd class="description">Event data</dd>
2269 </dl>
2270 <h4 class="returnvalue">Return Value</h4>
2271 <p class="description">Message text or <code>NULL</code></p>
2272 <h4 class="discussion">Discussion</h4>
2273 <p class="discussion">The returned string must be freed by the caller using <code>free</code>.
2274
2275 </p>
2276 <h3 class="function"><a id="cupsParseOptions">cupsParseOptions</a></h3>
2277 <p class="description">Parse options from a command-line argument.</p>
2278 <p class="code">
2279 int cupsParseOptions (<br>
2280 &#160;&#160;&#160;&#160;const char *arg,<br>
2281 &#160;&#160;&#160;&#160;int num_options,<br>
2282 &#160;&#160;&#160;&#160;<a href="#cups_option_t">cups_option_t</a> **options<br>
2283 );</p>
2284 <h4 class="parameters">Parameters</h4>
2285 <dl>
2286 <dt>arg</dt>
2287 <dd class="description">Argument to parse</dd>
2288 <dt>num_options</dt>
2289 <dd class="description">Number of options</dd>
2290 <dt>options</dt>
2291 <dd class="description">Options found</dd>
2292 </dl>
2293 <h4 class="returnvalue">Return Value</h4>
2294 <p class="description">Number of options found</p>
2295 <h4 class="discussion">Discussion</h4>
2296 <p class="discussion">This function converts space-delimited name/value pairs according
2297 to the PAPI text option ABNF specification. Collection values
2298 (&quot;name={a=... b=... c=...}&quot;) are stored with the curley brackets
2299 intact - use <code>cupsParseOptions</code> on the value to extract the
2300 collection attributes.</p>
2301 <h3 class="function"><span class="info">&#160;CUPS 1.3/macOS 10.5&#160;</span><a id="cupsRemoveDest">cupsRemoveDest</a></h3>
2302 <p class="description">Remove a destination from the destination list.</p>
2303 <p class="code">
2304 int cupsRemoveDest (<br>
2305 &#160;&#160;&#160;&#160;const char *name,<br>
2306 &#160;&#160;&#160;&#160;const char *instance,<br>
2307 &#160;&#160;&#160;&#160;int num_dests,<br>
2308 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> **dests<br>
2309 );</p>
2310 <h4 class="parameters">Parameters</h4>
2311 <dl>
2312 <dt>name</dt>
2313 <dd class="description">Destination name</dd>
2314 <dt>instance</dt>
2315 <dd class="description">Instance name or <code>NULL</code></dd>
2316 <dt>num_dests</dt>
2317 <dd class="description">Number of destinations</dd>
2318 <dt>dests</dt>
2319 <dd class="description">Destinations</dd>
2320 </dl>
2321 <h4 class="returnvalue">Return Value</h4>
2322 <p class="description">New number of destinations</p>
2323 <h4 class="discussion">Discussion</h4>
2324 <p class="discussion">Removing a destination/instance does not delete the class or printer
2325 queue, merely the lpoptions for that destination/instance. Use the
2326 <a href="#cupsSetDests"><code>cupsSetDests</code></a> or <a href="#cupsSetDests2"><code>cupsSetDests2</code></a> functions to save the new
2327 options for the user.
2328
2329 </p>
2330 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="cupsRemoveOption">cupsRemoveOption</a></h3>
2331 <p class="description">Remove an option from an option array.</p>
2332 <p class="code">
2333 int cupsRemoveOption (<br>
2334 &#160;&#160;&#160;&#160;const char *name,<br>
2335 &#160;&#160;&#160;&#160;int num_options,<br>
2336 &#160;&#160;&#160;&#160;<a href="#cups_option_t">cups_option_t</a> **options<br>
2337 );</p>
2338 <h4 class="parameters">Parameters</h4>
2339 <dl>
2340 <dt>name</dt>
2341 <dd class="description">Option name</dd>
2342 <dt>num_options</dt>
2343 <dd class="description">Current number of options</dd>
2344 <dt>options</dt>
2345 <dd class="description">Options</dd>
2346 </dl>
2347 <h4 class="returnvalue">Return Value</h4>
2348 <p class="description">New number of options</p>
2349 <h3 class="function"><a id="cupsServer">cupsServer</a></h3>
2350 <p class="description">Return the hostname/address of the current server.</p>
2351 <p class="code">
2352 const char *cupsServer (void);</p>
2353 <h4 class="returnvalue">Return Value</h4>
2354 <p class="description">Server name</p>
2355 <h4 class="discussion">Discussion</h4>
2356 <p class="discussion">The default server comes from the CUPS_SERVER environment variable, then the
2357 ~/.cups/client.conf file, and finally the /etc/cups/client.conf file. If not
2358 set, the default is the local system - either &quot;localhost&quot; or a domain socket
2359 path.<br>
2360 <br>
2361 The returned value can be a fully-qualified hostname, a numeric IPv4 or IPv6
2362 address, or a domain socket pathname.<br>
2363 <br>
2364 Note: The current server is tracked separately for each thread in a program.
2365 Multi-threaded programs that override the server via the
2366 <a href="#cupsSetServer"><code>cupsSetServer</code></a> function need to do so in each thread for the same
2367 server to be used.</p>
2368 <h3 class="function"><a id="cupsSetClientCertCB">cupsSetClientCertCB</a></h3>
2369 <p class="description">Pointer to library globals</p>
2370 <p class="code">
2371 void cupsSetClientCertCB (<br>
2372 &#160;&#160;&#160;&#160;<a href="#cups_client_cert_cb_t">cups_client_cert_cb_t</a> cb,<br>
2373 &#160;&#160;&#160;&#160;void *user_data<br>
2374 );</p>
2375 <h4 class="parameters">Parameters</h4>
2376 <dl>
2377 <dt>cb</dt>
2378 <dd class="description">Callback function</dd>
2379 <dt>user_data</dt>
2380 <dd class="description">User data pointer</dd>
2381 </dl>
2382 <h4 class="returnvalue">Return Value</h4>
2383 <p class="description">Set the client certificate callback.</p>
2384 <p class="discussion">Pass <code>NULL</code> to restore the default callback.<br>
2385 <br>
2386 Note: The current certificate callback is tracked separately for each thread
2387 in a program. Multi-threaded programs that override the callback need to do
2388 so in each thread for the same callback to be used.
2389
2390 </p>
2391 <h3 class="function"><span class="info">&#160;CUPS 1.5/macOS 10.7&#160;</span><a id="cupsSetCredentials">cupsSetCredentials</a></h3>
2392 <p class="description">Set the default credentials to be used for SSL/TLS
2393 connections.</p>
2394 <p class="code">
2395 int cupsSetCredentials (<br>
2396 &#160;&#160;&#160;&#160;cups_array_t *credentials<br>
2397 );</p>
2398 <h4 class="parameters">Parameters</h4>
2399 <dl>
2400 <dt>credentials</dt>
2401 <dd class="description">Array of credentials</dd>
2402 </dl>
2403 <h4 class="returnvalue">Return Value</h4>
2404 <p class="description">Status of call (0 = success)</p>
2405 <h4 class="discussion">Discussion</h4>
2406 <p class="discussion">Note: The default credentials are tracked separately for each thread in a
2407 program. Multi-threaded programs that override the setting need to do so in
2408 each thread for the same setting to be used.
2409
2410 </p>
2411 <h3 class="function"><a id="cupsSetDefaultDest">cupsSetDefaultDest</a></h3>
2412 <p class="description">Remove the destination from the array...</p>
2413 <p class="code">
2414 void cupsSetDefaultDest (<br>
2415 &#160;&#160;&#160;&#160;const char *name,<br>
2416 &#160;&#160;&#160;&#160;const char *instance,<br>
2417 &#160;&#160;&#160;&#160;int num_dests,<br>
2418 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dests<br>
2419 );</p>
2420 <h4 class="parameters">Parameters</h4>
2421 <dl>
2422 <dt>name</dt>
2423 <dd class="description">Destination name</dd>
2424 <dt>instance</dt>
2425 <dd class="description">Instance name or <code>NULL</code></dd>
2426 <dt>num_dests</dt>
2427 <dd class="description">Number of destinations</dd>
2428 <dt>dests</dt>
2429 <dd class="description">Destinations</dd>
2430 </dl>
2431 <h4 class="returnvalue">Return Value</h4>
2432 <p class="description">Set the default destination.</p>
2433 <p class="discussion"></p>
2434 <h3 class="function"><a id="cupsSetDests">cupsSetDests</a></h3>
2435 <p class="description">Loop through the array and set the &quot;is_default&quot; flag for the matching
2436 destination...</p>
2437 <p class="code">
2438 void cupsSetDests (<br>
2439 &#160;&#160;&#160;&#160;int num_dests,<br>
2440 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dests<br>
2441 );</p>
2442 <h4 class="parameters">Parameters</h4>
2443 <dl>
2444 <dt>num_dests</dt>
2445 <dd class="description">Number of destinations</dd>
2446 <dt>dests</dt>
2447 <dd class="description">Destinations</dd>
2448 </dl>
2449 <h4 class="returnvalue">Return Value</h4>
2450 <p class="description">Save the list of destinations for the default server.</p>
2451 <p class="discussion">This function saves the destinations to /etc/cups/lpoptions when run
2452 as root and ~/.cups/lpoptions when run as a normal user.</p>
2453 <h3 class="function"><span class="info">&#160;CUPS 1.1.21/macOS 10.4&#160;</span><a id="cupsSetDests2">cupsSetDests2</a></h3>
2454 <p class="description">Save the list of destinations for the specified server.</p>
2455 <p class="code">
2456 int cupsSetDests2 (<br>
2457 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
2458 &#160;&#160;&#160;&#160;int num_dests,<br>
2459 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dests<br>
2460 );</p>
2461 <h4 class="parameters">Parameters</h4>
2462 <dl>
2463 <dt>http</dt>
2464 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
2465 <dt>num_dests</dt>
2466 <dd class="description">Number of destinations</dd>
2467 <dt>dests</dt>
2468 <dd class="description">Destinations</dd>
2469 </dl>
2470 <h4 class="returnvalue">Return Value</h4>
2471 <p class="description">0 on success, -1 on error</p>
2472 <h4 class="discussion">Discussion</h4>
2473 <p class="discussion">This function saves the destinations to /etc/cups/lpoptions when run
2474 as root and ~/.cups/lpoptions when run as a normal user.
2475
2476 </p>
2477 <h3 class="function"><a id="cupsSetEncryption">cupsSetEncryption</a></h3>
2478 <p class="description">Pointer to library globals</p>
2479 <p class="code">
2480 void cupsSetEncryption (<br>
2481 &#160;&#160;&#160;&#160;<a href="#http_encryption_t">http_encryption_t</a> e<br>
2482 );</p>
2483 <h4 class="parameters">Parameters</h4>
2484 <dl>
2485 <dt>e</dt>
2486 <dd class="description">New encryption preference</dd>
2487 </dl>
2488 <h4 class="returnvalue">Return Value</h4>
2489 <p class="description">Set the encryption preference.</p>
2490 <p class="discussion">The default encryption setting comes from the CUPS_ENCRYPTION
2491 environment variable, then the ~/.cups/client.conf file, and finally the
2492 /etc/cups/client.conf file. If not set, the default is
2493 <code>HTTP_ENCRYPTION_IF_REQUESTED</code>.<br>
2494 <br>
2495 Note: The current encryption setting is tracked separately for each thread
2496 in a program. Multi-threaded programs that override the setting need to do
2497 so in each thread for the same setting to be used.</p>
2498 <h3 class="function"><a id="cupsSetPasswordCB">cupsSetPasswordCB</a></h3>
2499 <p class="description">Pointer to library globals</p>
2500 <p class="code">
2501 void cupsSetPasswordCB (<br>
2502 &#160;&#160;&#160;&#160;<a href="#cups_password_cb_t">cups_password_cb_t</a> cb<br>
2503 );</p>
2504 <h4 class="parameters">Parameters</h4>
2505 <dl>
2506 <dt>cb</dt>
2507 <dd class="description">Callback function</dd>
2508 </dl>
2509 <h4 class="returnvalue">Return Value</h4>
2510 <p class="description">Set the password callback for CUPS.</p>
2511 <p class="discussion">Pass <code>NULL</code> to restore the default (console) password callback, which
2512 reads the password from the console. Programs should call either this
2513 function or <a href="#cupsSetPasswordCB2"><code>cupsSetPasswordCB2</code></a>, as only one callback can be registered
2514 by a program per thread.<br>
2515 <br>
2516 Note: The current password callback is tracked separately for each thread
2517 in a program. Multi-threaded programs that override the callback need to do
2518 so in each thread for the same callback to be used.
2519
2520 </p>
2521 <h3 class="function"><a id="cupsSetPasswordCB2">cupsSetPasswordCB2</a></h3>
2522 <p class="description">Pointer to library globals</p>
2523 <p class="code">
2524 void cupsSetPasswordCB2 (<br>
2525 &#160;&#160;&#160;&#160;<a href="#cups_password_cb2_t">cups_password_cb2_t</a> cb,<br>
2526 &#160;&#160;&#160;&#160;void *user_data<br>
2527 );</p>
2528 <h4 class="parameters">Parameters</h4>
2529 <dl>
2530 <dt>cb</dt>
2531 <dd class="description">Callback function</dd>
2532 <dt>user_data</dt>
2533 <dd class="description">User data pointer</dd>
2534 </dl>
2535 <h4 class="returnvalue">Return Value</h4>
2536 <p class="description">Set the advanced password callback for CUPS.</p>
2537 <p class="discussion">Pass <code>NULL</code> to restore the default (console) password callback, which
2538 reads the password from the console. Programs should call either this
2539 function or <a href="#cupsSetPasswordCB2"><code>cupsSetPasswordCB2</code></a>, as only one callback can be registered
2540 by a program per thread.<br>
2541 <br>
2542 Note: The current password callback is tracked separately for each thread
2543 in a program. Multi-threaded programs that override the callback need to do
2544 so in each thread for the same callback to be used.
2545
2546 </p>
2547 <h3 class="function"><a id="cupsSetServer">cupsSetServer</a></h3>
2548 <p class="description">Pointer to library globals</p>
2549 <p class="code">
2550 void cupsSetServer (<br>
2551 &#160;&#160;&#160;&#160;const char *server<br>
2552 );</p>
2553 <h4 class="parameters">Parameters</h4>
2554 <dl>
2555 <dt>server</dt>
2556 <dd class="description">Server name</dd>
2557 </dl>
2558 <h4 class="returnvalue">Return Value</h4>
2559 <p class="description">Set the default server name and port.</p>
2560 <p class="discussion">The &quot;server&quot; string can be a fully-qualified hostname, a numeric
2561 IPv4 or IPv6 address, or a domain socket pathname. Hostnames and numeric IP
2562 addresses can be optionally followed by a colon and port number to override
2563 the default port 631, e.g. &quot;hostname:8631&quot;. Pass <code>NULL</code> to restore the
2564 default server name and port.<br>
2565 <br>
2566 Note: The current server is tracked separately for each thread in a program.
2567 Multi-threaded programs that override the server need to do so in each
2568 thread for the same server to be used.</p>
2569 <h3 class="function"><a id="cupsSetServerCertCB">cupsSetServerCertCB</a></h3>
2570 <p class="description">Pointer to library globals</p>
2571 <p class="code">
2572 void cupsSetServerCertCB (<br>
2573 &#160;&#160;&#160;&#160;<a href="#cups_server_cert_cb_t">cups_server_cert_cb_t</a> cb,<br>
2574 &#160;&#160;&#160;&#160;void *user_data<br>
2575 );</p>
2576 <h4 class="parameters">Parameters</h4>
2577 <dl>
2578 <dt>cb</dt>
2579 <dd class="description">Callback function</dd>
2580 <dt>user_data</dt>
2581 <dd class="description">User data pointer</dd>
2582 </dl>
2583 <h4 class="returnvalue">Return Value</h4>
2584 <p class="description">Set the server certificate callback.</p>
2585 <p class="discussion">Pass <code>NULL</code> to restore the default callback.<br>
2586 <br>
2587 Note: The current credentials callback is tracked separately for each thread
2588 in a program. Multi-threaded programs that override the callback need to do
2589 so in each thread for the same callback to be used.
2590
2591 </p>
2592 <h3 class="function"><span class="info">&#160;CUPS 2.0/macOS 10.10&#160;</span><a id="cupsSetServerCredentials">cupsSetServerCredentials</a></h3>
2593 <p class="description">Set the default server credentials.</p>
2594 <p class="code">
2595 int cupsSetServerCredentials (<br>
2596 &#160;&#160;&#160;&#160;const char *path,<br>
2597 &#160;&#160;&#160;&#160;const char *common_name,<br>
2598 &#160;&#160;&#160;&#160;int auto_create<br>
2599 );</p>
2600 <h4 class="parameters">Parameters</h4>
2601 <dl>
2602 <dt>path</dt>
2603 <dd class="description">Keychain path or <code>NULL</code> for default</dd>
2604 <dt>common_name</dt>
2605 <dd class="description">Default common name for server</dd>
2606 <dt>auto_create</dt>
2607 <dd class="description">1 = automatically create self-signed certificates</dd>
2608 </dl>
2609 <h4 class="returnvalue">Return Value</h4>
2610 <p class="description">1 on success, 0 on failure</p>
2611 <h4 class="discussion">Discussion</h4>
2612 <p class="discussion">Note: The server credentials are used by all threads in the running process.
2613 This function is threadsafe.
2614
2615 </p>
2616 <h3 class="function"><a id="cupsSetUser">cupsSetUser</a></h3>
2617 <p class="description">Pointer to library globals</p>
2618 <p class="code">
2619 void cupsSetUser (<br>
2620 &#160;&#160;&#160;&#160;const char *user<br>
2621 );</p>
2622 <h4 class="parameters">Parameters</h4>
2623 <dl>
2624 <dt>user</dt>
2625 <dd class="description">User name</dd>
2626 </dl>
2627 <h4 class="returnvalue">Return Value</h4>
2628 <p class="description">Set the default user name.</p>
2629 <p class="discussion">Pass <code>NULL</code> to restore the default user name.<br>
2630 <br>
2631 Note: The current user name is tracked separately for each thread in a
2632 program. Multi-threaded programs that override the user name need to do so
2633 in each thread for the same user name to be used.</p>
2634 <h3 class="function"><a id="cupsSetUserAgent">cupsSetUserAgent</a></h3>
2635 <p class="description">Pointer to library globals</p>
2636 <p class="code">
2637 void cupsSetUserAgent (<br>
2638 &#160;&#160;&#160;&#160;const char *user_agent<br>
2639 );</p>
2640 <h4 class="parameters">Parameters</h4>
2641 <dl>
2642 <dt>user_agent</dt>
2643 <dd class="description">User-Agent string or <code>NULL</code></dd>
2644 </dl>
2645 <h4 class="returnvalue">Return Value</h4>
2646 <p class="description">Set the default HTTP User-Agent string.</p>
2647 <p class="discussion">Setting the string to NULL forces the default value containing the CUPS
2648 version, IPP version, and operating system version and architecture.
2649
2650 </p>
2651 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="cupsStartDestDocument">cupsStartDestDocument</a></h3>
2652 <p class="description">Start a new document.</p>
2653 <p class="code">
2654 http_status_t cupsStartDestDocument (<br>
2655 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
2656 &#160;&#160;&#160;&#160;<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
2657 &#160;&#160;&#160;&#160;<a href="#cups_dinfo_t">cups_dinfo_t</a> *info,<br>
2658 &#160;&#160;&#160;&#160;int job_id,<br>
2659 &#160;&#160;&#160;&#160;const char *docname,<br>
2660 &#160;&#160;&#160;&#160;const char *format,<br>
2661 &#160;&#160;&#160;&#160;int num_options,<br>
2662 &#160;&#160;&#160;&#160;<a href="#cups_option_t">cups_option_t</a> *options,<br>
2663 &#160;&#160;&#160;&#160;int last_document<br>
2664 );</p>
2665 <h4 class="parameters">Parameters</h4>
2666 <dl>
2667 <dt>http</dt>
2668 <dd class="description">Connection to destination</dd>
2669 <dt>dest</dt>
2670 <dd class="description">Destination</dd>
2671 <dt>info</dt>
2672 <dd class="description">Destination information</dd>
2673 <dt>job_id</dt>
2674 <dd class="description">Job ID</dd>
2675 <dt>docname</dt>
2676 <dd class="description">Document name</dd>
2677 <dt>format</dt>
2678 <dd class="description">Document format</dd>
2679 <dt>num_options</dt>
2680 <dd class="description">Number of document options</dd>
2681 <dt>options</dt>
2682 <dd class="description">Document options</dd>
2683 <dt>last_document</dt>
2684 <dd class="description">1 if this is the last document</dd>
2685 </dl>
2686 <h4 class="returnvalue">Return Value</h4>
2687 <p class="description">Status of document creation</p>
2688 <h4 class="discussion">Discussion</h4>
2689 <p class="discussion">&quot;job_id&quot; is the job ID returned by cupsCreateDestJob. &quot;docname&quot; is the name
2690 of the document/file being printed, &quot;format&quot; is the MIME media type for the
2691 document (see CUPS_FORMAT_xxx constants), and &quot;num_options&quot; and &quot;options&quot;
2692 are the options do be applied to the document. &quot;last_document&quot; should be 1
2693 if this is the last document to be submitted in the job. Returns
2694 <code>HTTP_CONTINUE</code> on success.
2695
2696 </p>
2697 <h3 class="function"><a id="cupsUser">cupsUser</a></h3>
2698 <p class="description">Return the current user's name.</p>
2699 <p class="code">
2700 const char *cupsUser (void);</p>
2701 <h4 class="returnvalue">Return Value</h4>
2702 <p class="description">User name</p>
2703 <h4 class="discussion">Discussion</h4>
2704 <p class="discussion">Note: The current user name is tracked separately for each thread in a
2705 program. Multi-threaded programs that override the user name with the
2706 <a href="#cupsSetUser"><code>cupsSetUser</code></a> function need to do so in each thread for the same user
2707 name to be used.</p>
2708 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="cupsUserAgent">cupsUserAgent</a></h3>
2709 <p class="description">Return the default HTTP User-Agent string.</p>
2710 <p class="code">
2711 const char *cupsUserAgent (void);</p>
2712 <h4 class="returnvalue">Return Value</h4>
2713 <p class="description">User-Agent string</p>
2714 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpAcceptConnection">httpAcceptConnection</a></h3>
2715 <p class="description">Accept a new HTTP client connection from the
2716 specified listening socket.</p>
2717 <p class="code">
2718 <a href="#http_t">http_t</a> *httpAcceptConnection (<br>
2719 &#160;&#160;&#160;&#160;int fd,<br>
2720 &#160;&#160;&#160;&#160;int blocking<br>
2721 );</p>
2722 <h4 class="parameters">Parameters</h4>
2723 <dl>
2724 <dt>fd</dt>
2725 <dd class="description">Listen socket file descriptor</dd>
2726 <dt>blocking</dt>
2727 <dd class="description">1 if the connection should be
2728 blocking, 0 otherwise</dd>
2729 </dl>
2730 <h4 class="returnvalue">Return Value</h4>
2731 <p class="description">HTTP connection or <code>NULL</code></p>
2732 <h3 class="function"><span class="info">&#160;CUPS 1.5/macOS 10.7&#160;</span><a id="httpAddCredential">httpAddCredential</a></h3>
2733 <p class="description">Allocates and adds a single credential to an array.</p>
2734 <p class="code">
2735 int httpAddCredential (<br>
2736 &#160;&#160;&#160;&#160;cups_array_t *credentials,<br>
2737 &#160;&#160;&#160;&#160;const void *data,<br>
2738 &#160;&#160;&#160;&#160;size_t datalen<br>
2739 );</p>
2740 <h4 class="parameters">Parameters</h4>
2741 <dl>
2742 <dt>credentials</dt>
2743 <dd class="description">Credentials array</dd>
2744 <dt>data</dt>
2745 <dd class="description">PEM-encoded X.509 data</dd>
2746 <dt>datalen</dt>
2747 <dd class="description">Length of data</dd>
2748 </dl>
2749 <h4 class="returnvalue">Return Value</h4>
2750 <p class="description">0 on success, -1 on error</p>
2751 <h4 class="discussion">Discussion</h4>
2752 <p class="discussion">Use <code>cupsArrayNew(NULL, NULL)</code> to create a credentials array.
2753
2754 </p>
2755 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpAddrAny">httpAddrAny</a></h3>
2756 <p class="description">Check for the &quot;any&quot; address.</p>
2757 <p class="code">
2758 int httpAddrAny (<br>
2759 &#160;&#160;&#160;&#160;const <a href="#http_addr_t">http_addr_t</a> *addr<br>
2760 );</p>
2761 <h4 class="parameters">Parameters</h4>
2762 <dl>
2763 <dt>addr</dt>
2764 <dd class="description">Address to check</dd>
2765 </dl>
2766 <h4 class="returnvalue">Return Value</h4>
2767 <p class="description">1 if &quot;any&quot;, 0 otherwise</p>
2768 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpAddrClose">httpAddrClose</a></h3>
2769 <p class="description">Close a socket created by <a href="#httpAddrConnect"><code>httpAddrConnect</code></a> or
2770 <a href="#httpAddrListen"><code>httpAddrListen</code></a>.</p>
2771 <p class="code">
2772 int httpAddrClose (<br>
2773 &#160;&#160;&#160;&#160;<a href="#http_addr_t">http_addr_t</a> *addr,<br>
2774 &#160;&#160;&#160;&#160;int fd<br>
2775 );</p>
2776 <h4 class="parameters">Parameters</h4>
2777 <dl>
2778 <dt>addr</dt>
2779 <dd class="description">Listen address or <code>NULL</code></dd>
2780 <dt>fd</dt>
2781 <dd class="description">Socket file descriptor</dd>
2782 </dl>
2783 <h4 class="returnvalue">Return Value</h4>
2784 <p class="description">0 on success, -1 on failure</p>
2785 <h4 class="discussion">Discussion</h4>
2786 <p class="discussion">Pass <code>NULL</code> for sockets created with <a href="#httpAddrConnect"><code>httpAddrConnect</code></a> and the
2787 listen address for sockets created with <a href="#httpAddrListen"><code>httpAddrListen</code></a>. This will
2788 ensure that domain sockets are removed when closed.
2789
2790 </p>
2791 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpAddrConnect2">httpAddrConnect2</a></h3>
2792 <p class="description">Connect to any of the addresses in the list with a
2793 timeout and optional cancel.</p>
2794 <p class="code">
2795 <a href="#http_addrlist_t">http_addrlist_t</a> *httpAddrConnect2 (<br>
2796 &#160;&#160;&#160;&#160;<a href="#http_addrlist_t">http_addrlist_t</a> *addrlist,<br>
2797 &#160;&#160;&#160;&#160;int *sock,<br>
2798 &#160;&#160;&#160;&#160;int msec,<br>
2799 &#160;&#160;&#160;&#160;int *cancel<br>
2800 );</p>
2801 <h4 class="parameters">Parameters</h4>
2802 <dl>
2803 <dt>addrlist</dt>
2804 <dd class="description">List of potential addresses</dd>
2805 <dt>sock</dt>
2806 <dd class="description">Socket</dd>
2807 <dt>msec</dt>
2808 <dd class="description">Timeout in milliseconds</dd>
2809 <dt>cancel</dt>
2810 <dd class="description">Pointer to &quot;cancel&quot; variable</dd>
2811 </dl>
2812 <h4 class="returnvalue">Return Value</h4>
2813 <p class="description">Connected address or NULL on failure</p>
2814 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpAddrCopyList">httpAddrCopyList</a></h3>
2815 <p class="description">Copy an address list.</p>
2816 <p class="code">
2817 <a href="#http_addrlist_t">http_addrlist_t</a> *httpAddrCopyList (<br>
2818 &#160;&#160;&#160;&#160;<a href="#http_addrlist_t">http_addrlist_t</a> *src<br>
2819 );</p>
2820 <h4 class="parameters">Parameters</h4>
2821 <dl>
2822 <dt>src</dt>
2823 <dd class="description">Source address list</dd>
2824 </dl>
2825 <h4 class="returnvalue">Return Value</h4>
2826 <p class="description">New address list or <code>NULL</code> on error</p>
2827 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpAddrEqual">httpAddrEqual</a></h3>
2828 <p class="description">Compare two addresses.</p>
2829 <p class="code">
2830 int httpAddrEqual (<br>
2831 &#160;&#160;&#160;&#160;const <a href="#http_addr_t">http_addr_t</a> *addr1,<br>
2832 &#160;&#160;&#160;&#160;const <a href="#http_addr_t">http_addr_t</a> *addr2<br>
2833 );</p>
2834 <h4 class="parameters">Parameters</h4>
2835 <dl>
2836 <dt>addr1</dt>
2837 <dd class="description">First address</dd>
2838 <dt>addr2</dt>
2839 <dd class="description">Second address</dd>
2840 </dl>
2841 <h4 class="returnvalue">Return Value</h4>
2842 <p class="description">1 if equal, 0 if not</p>
2843 <h3 class="function"><a id="httpAddrFamily">httpAddrFamily</a></h3>
2844 <p class="description">Get the address family of an address.</p>
2845 <p class="code">
2846 int httpAddrFamily (<br>
2847 &#160;&#160;&#160;&#160;<a href="#http_addr_t">http_addr_t</a> *addr<br>
2848 );</p>
2849 <h4 class="parameters">Parameters</h4>
2850 <dl>
2851 <dt>addr</dt>
2852 <dd class="description">Address</dd>
2853 </dl>
2854 <h4 class="returnvalue">Return Value</h4>
2855 <p class="description">Address family</p>
2856 <h3 class="function"><a id="httpAddrFreeList">httpAddrFreeList</a></h3>
2857 <p class="description">Current list entry</p>
2858 <p class="code">
2859 void httpAddrFreeList (<br>
2860 &#160;&#160;&#160;&#160;<a href="#http_addrlist_t">http_addrlist_t</a> *addrlist<br>
2861 );</p>
2862 <h4 class="parameters">Parameters</h4>
2863 <dl>
2864 <dt>addrlist</dt>
2865 <dd class="description">Address list to free</dd>
2866 </dl>
2867 <h4 class="returnvalue">Return Value</h4>
2868 <p class="description">Free an address list.</p>
2869 <p class="discussion"></p>
2870 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpAddrGetList">httpAddrGetList</a></h3>
2871 <p class="description">Get a list of addresses for a hostname.</p>
2872 <p class="code">
2873 <a href="#http_addrlist_t">http_addrlist_t</a> *httpAddrGetList (<br>
2874 &#160;&#160;&#160;&#160;const char *hostname,<br>
2875 &#160;&#160;&#160;&#160;int family,<br>
2876 &#160;&#160;&#160;&#160;const char *service<br>
2877 );</p>
2878 <h4 class="parameters">Parameters</h4>
2879 <dl>
2880 <dt>hostname</dt>
2881 <dd class="description">Hostname, IP address, or NULL for passive listen address</dd>
2882 <dt>family</dt>
2883 <dd class="description">Address family or AF_UNSPEC</dd>
2884 <dt>service</dt>
2885 <dd class="description">Service name or port number</dd>
2886 </dl>
2887 <h4 class="returnvalue">Return Value</h4>
2888 <p class="description">List of addresses or NULL</p>
2889 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpAddrLength">httpAddrLength</a></h3>
2890 <p class="description">Return the length of the address in bytes.</p>
2891 <p class="code">
2892 int httpAddrLength (<br>
2893 &#160;&#160;&#160;&#160;const <a href="#http_addr_t">http_addr_t</a> *addr<br>
2894 );</p>
2895 <h4 class="parameters">Parameters</h4>
2896 <dl>
2897 <dt>addr</dt>
2898 <dd class="description">Address</dd>
2899 </dl>
2900 <h4 class="returnvalue">Return Value</h4>
2901 <p class="description">Length in bytes</p>
2902 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpAddrListen">httpAddrListen</a></h3>
2903 <p class="description">Create a listening socket bound to the specified
2904 address and port.</p>
2905 <p class="code">
2906 int httpAddrListen (<br>
2907 &#160;&#160;&#160;&#160;<a href="#http_addr_t">http_addr_t</a> *addr,<br>
2908 &#160;&#160;&#160;&#160;int port<br>
2909 );</p>
2910 <h4 class="parameters">Parameters</h4>
2911 <dl>
2912 <dt>addr</dt>
2913 <dd class="description">Address to bind to</dd>
2914 <dt>port</dt>
2915 <dd class="description">Port number to bind to</dd>
2916 </dl>
2917 <h4 class="returnvalue">Return Value</h4>
2918 <p class="description">Socket or -1 on error</p>
2919 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpAddrLocalhost">httpAddrLocalhost</a></h3>
2920 <p class="description">Check for the local loopback address.</p>
2921 <p class="code">
2922 int httpAddrLocalhost (<br>
2923 &#160;&#160;&#160;&#160;const <a href="#http_addr_t">http_addr_t</a> *addr<br>
2924 );</p>
2925 <h4 class="parameters">Parameters</h4>
2926 <dl>
2927 <dt>addr</dt>
2928 <dd class="description">Address to check</dd>
2929 </dl>
2930 <h4 class="returnvalue">Return Value</h4>
2931 <p class="description">1 if local host, 0 otherwise</p>
2932 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpAddrLookup">httpAddrLookup</a></h3>
2933 <p class="description">Lookup the hostname associated with the address.</p>
2934 <p class="code">
2935 char *httpAddrLookup (<br>
2936 &#160;&#160;&#160;&#160;const <a href="#http_addr_t">http_addr_t</a> *addr,<br>
2937 &#160;&#160;&#160;&#160;char *name,<br>
2938 &#160;&#160;&#160;&#160;int namelen<br>
2939 );</p>
2940 <h4 class="parameters">Parameters</h4>
2941 <dl>
2942 <dt>addr</dt>
2943 <dd class="description">Address to lookup</dd>
2944 <dt>name</dt>
2945 <dd class="description">Host name buffer</dd>
2946 <dt>namelen</dt>
2947 <dd class="description">Size of name buffer</dd>
2948 </dl>
2949 <h4 class="returnvalue">Return Value</h4>
2950 <p class="description">Host name</p>
2951 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpAddrPort">httpAddrPort</a></h3>
2952 <p class="description">Get the port number associated with an address.</p>
2953 <p class="code">
2954 int httpAddrPort (<br>
2955 &#160;&#160;&#160;&#160;<a href="#http_addr_t">http_addr_t</a> *addr<br>
2956 );</p>
2957 <h4 class="parameters">Parameters</h4>
2958 <dl>
2959 <dt>addr</dt>
2960 <dd class="description">Address</dd>
2961 </dl>
2962 <h4 class="returnvalue">Return Value</h4>
2963 <p class="description">Port number</p>
2964 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpAddrString">httpAddrString</a></h3>
2965 <p class="description">Convert an address to a numeric string.</p>
2966 <p class="code">
2967 char *httpAddrString (<br>
2968 &#160;&#160;&#160;&#160;const <a href="#http_addr_t">http_addr_t</a> *addr,<br>
2969 &#160;&#160;&#160;&#160;char *s,<br>
2970 &#160;&#160;&#160;&#160;int slen<br>
2971 );</p>
2972 <h4 class="parameters">Parameters</h4>
2973 <dl>
2974 <dt>addr</dt>
2975 <dd class="description">Address to convert</dd>
2976 <dt>s</dt>
2977 <dd class="description">String buffer</dd>
2978 <dt>slen</dt>
2979 <dd class="description">Length of string</dd>
2980 </dl>
2981 <h4 class="returnvalue">Return Value</h4>
2982 <p class="description">Numeric address string</p>
2983 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpAssembleURI">httpAssembleURI</a></h3>
2984 <p class="description">Assemble a uniform resource identifier from its
2985 components.</p>
2986 <p class="code">
2987 <a href="#http_uri_status_t">http_uri_status_t</a> httpAssembleURI (<br>
2988 &#160;&#160;&#160;&#160;<a href="#http_uri_coding_t">http_uri_coding_t</a> encoding,<br>
2989 &#160;&#160;&#160;&#160;char *uri,<br>
2990 &#160;&#160;&#160;&#160;int urilen,<br>
2991 &#160;&#160;&#160;&#160;const char *scheme,<br>
2992 &#160;&#160;&#160;&#160;const char *username,<br>
2993 &#160;&#160;&#160;&#160;const char *host,<br>
2994 &#160;&#160;&#160;&#160;int port,<br>
2995 &#160;&#160;&#160;&#160;const char *resource<br>
2996 );</p>
2997 <h4 class="parameters">Parameters</h4>
2998 <dl>
2999 <dt>encoding</dt>
3000 <dd class="description">Encoding flags</dd>
3001 <dt>uri</dt>
3002 <dd class="description">URI buffer</dd>
3003 <dt>urilen</dt>
3004 <dd class="description">Size of URI buffer</dd>
3005 <dt>scheme</dt>
3006 <dd class="description">Scheme name</dd>
3007 <dt>username</dt>
3008 <dd class="description">Username</dd>
3009 <dt>host</dt>
3010 <dd class="description">Hostname or address</dd>
3011 <dt>port</dt>
3012 <dd class="description">Port number</dd>
3013 <dt>resource</dt>
3014 <dd class="description">Resource</dd>
3015 </dl>
3016 <h4 class="returnvalue">Return Value</h4>
3017 <p class="description">URI status</p>
3018 <h4 class="discussion">Discussion</h4>
3019 <p class="discussion">This function escapes reserved characters in the URI depending on the
3020 value of the &quot;encoding&quot; argument. You should use this function in
3021 place of traditional string functions whenever you need to create a
3022 URI string.
3023
3024 </p>
3025 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpAssembleURIf">httpAssembleURIf</a></h3>
3026 <p class="description">Assemble a uniform resource identifier from its
3027 components with a formatted resource.</p>
3028 <p class="code">
3029 <a href="#http_uri_status_t">http_uri_status_t</a> httpAssembleURIf (<br>
3030 &#160;&#160;&#160;&#160;<a href="#http_uri_coding_t">http_uri_coding_t</a> encoding,<br>
3031 &#160;&#160;&#160;&#160;char *uri,<br>
3032 &#160;&#160;&#160;&#160;int urilen,<br>
3033 &#160;&#160;&#160;&#160;const char *scheme,<br>
3034 &#160;&#160;&#160;&#160;const char *username,<br>
3035 &#160;&#160;&#160;&#160;const char *host,<br>
3036 &#160;&#160;&#160;&#160;int port,<br>
3037 &#160;&#160;&#160;&#160;const char *resourcef,<br>
3038 &#160;&#160;&#160;&#160;...<br>
3039 );</p>
3040 <h4 class="parameters">Parameters</h4>
3041 <dl>
3042 <dt>encoding</dt>
3043 <dd class="description">Encoding flags</dd>
3044 <dt>uri</dt>
3045 <dd class="description">URI buffer</dd>
3046 <dt>urilen</dt>
3047 <dd class="description">Size of URI buffer</dd>
3048 <dt>scheme</dt>
3049 <dd class="description">Scheme name</dd>
3050 <dt>username</dt>
3051 <dd class="description">Username</dd>
3052 <dt>host</dt>
3053 <dd class="description">Hostname or address</dd>
3054 <dt>port</dt>
3055 <dd class="description">Port number</dd>
3056 <dt>resourcef</dt>
3057 <dd class="description">Printf-style resource</dd>
3058 <dt>...</dt>
3059 <dd class="description">Additional arguments as needed</dd>
3060 </dl>
3061 <h4 class="returnvalue">Return Value</h4>
3062 <p class="description">URI status</p>
3063 <h4 class="discussion">Discussion</h4>
3064 <p class="discussion">This function creates a formatted version of the resource string
3065 argument &quot;resourcef&quot; and escapes reserved characters in the URI
3066 depending on the value of the &quot;encoding&quot; argument. You should use
3067 this function in place of traditional string functions whenever
3068 you need to create a URI string.
3069
3070 </p>
3071 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpAssembleUUID">httpAssembleUUID</a></h3>
3072 <p class="description">Assemble a name-based UUID URN conforming to RFC 4122.</p>
3073 <p class="code">
3074 char *httpAssembleUUID (<br>
3075 &#160;&#160;&#160;&#160;const char *server,<br>
3076 &#160;&#160;&#160;&#160;int port,<br>
3077 &#160;&#160;&#160;&#160;const char *name,<br>
3078 &#160;&#160;&#160;&#160;int number,<br>
3079 &#160;&#160;&#160;&#160;char *buffer,<br>
3080 &#160;&#160;&#160;&#160;size_t bufsize<br>
3081 );</p>
3082 <h4 class="parameters">Parameters</h4>
3083 <dl>
3084 <dt>server</dt>
3085 <dd class="description">Server name</dd>
3086 <dt>port</dt>
3087 <dd class="description">Port number</dd>
3088 <dt>name</dt>
3089 <dd class="description">Object name or NULL</dd>
3090 <dt>number</dt>
3091 <dd class="description">Object number or 0</dd>
3092 <dt>buffer</dt>
3093 <dd class="description">String buffer</dd>
3094 <dt>bufsize</dt>
3095 <dd class="description">Size of buffer</dd>
3096 </dl>
3097 <h4 class="returnvalue">Return Value</h4>
3098 <p class="description">UUID string</p>
3099 <h4 class="discussion">Discussion</h4>
3100 <p class="discussion">This function creates a unique 128-bit identifying number using the server
3101 name, port number, random data, and optionally an object name and/or object
3102 number. The result is formatted as a UUID URN as defined in RFC 4122.<br>
3103 <br>
3104 The buffer needs to be at least 46 bytes in size.
3105
3106 </p>
3107 <h3 class="function"><a id="httpBlocking">httpBlocking</a></h3>
3108 <p class="description">Credential data</p>
3109 <p class="code">
3110 void httpBlocking (<br>
3111 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
3112 &#160;&#160;&#160;&#160;int b<br>
3113 );</p>
3114 <h4 class="parameters">Parameters</h4>
3115 <dl>
3116 <dt>http</dt>
3117 <dd class="description">HTTP connection</dd>
3118 <dt>b</dt>
3119 <dd class="description">1 = blocking, 0 = non-blocking</dd>
3120 </dl>
3121 <h4 class="returnvalue">Return Value</h4>
3122 <p class="description">Set blocking/non-blocking behavior on a connection.</p>
3123 <h3 class="function"><a id="httpCheck">httpCheck</a></h3>
3124 <p class="description">Check to see if there is a pending response from the server.</p>
3125 <p class="code">
3126 int httpCheck (<br>
3127 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3128 );</p>
3129 <h4 class="parameters">Parameters</h4>
3130 <dl>
3131 <dt>http</dt>
3132 <dd class="description">HTTP connection</dd>
3133 </dl>
3134 <h4 class="returnvalue">Return Value</h4>
3135 <p class="description">0 = no data, 1 = data available</p>
3136 <h3 class="function"><a id="httpClearCookie">httpClearCookie</a></h3>
3137 <p class="description">HTTP connection</p>
3138 <p class="code">
3139 void httpClearCookie (<br>
3140 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3141 );</p>
3142 <h4 class="parameters">Parameters</h4>
3143 <dl>
3144 <dt>http</dt>
3145 <dd class="description">HTTP connection</dd>
3146 </dl>
3147 <h4 class="returnvalue">Return Value</h4>
3148 <p class="description">Clear the cookie value(s).</p>
3149 <p class="discussion"></p>
3150 <h3 class="function"><a id="httpClearFields">httpClearFields</a></h3>
3151 <p class="description">HTTP connection</p>
3152 <p class="code">
3153 void httpClearFields (<br>
3154 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3155 );</p>
3156 <h4 class="parameters">Parameters</h4>
3157 <dl>
3158 <dt>http</dt>
3159 <dd class="description">HTTP connection</dd>
3160 </dl>
3161 <h4 class="returnvalue">Return Value</h4>
3162 <p class="description">Clear HTTP request fields.</p>
3163 <h3 class="function"><a id="httpClose">httpClose</a></h3>
3164 <p class="description">HTTP connection</p>
3165 <p class="code">
3166 void httpClose (<br>
3167 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3168 );</p>
3169 <h4 class="parameters">Parameters</h4>
3170 <dl>
3171 <dt>http</dt>
3172 <dd class="description">HTTP connection</dd>
3173 </dl>
3174 <h4 class="returnvalue">Return Value</h4>
3175 <p class="description">Close an HTTP connection.</p>
3176 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpCompareCredentials">httpCompareCredentials</a></h3>
3177 <p class="description">Compare two sets of X.509 credentials.</p>
3178 <p class="code">
3179 int httpCompareCredentials (<br>
3180 &#160;&#160;&#160;&#160;cups_array_t *cred1,<br>
3181 &#160;&#160;&#160;&#160;cups_array_t *cred2<br>
3182 );</p>
3183 <h4 class="parameters">Parameters</h4>
3184 <dl>
3185 <dt>cred1</dt>
3186 <dd class="description">First set of X.509 credentials</dd>
3187 <dt>cred2</dt>
3188 <dd class="description">Second set of X.509 credentials</dd>
3189 </dl>
3190 <h4 class="returnvalue">Return Value</h4>
3191 <p class="description">1 if they match, 0 if they do not</p>
3192 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpConnect2">httpConnect2</a></h3>
3193 <p class="description">Connect to a HTTP server.</p>
3194 <p class="code">
3195 <a href="#http_t">http_t</a> *httpConnect2 (<br>
3196 &#160;&#160;&#160;&#160;const char *host,<br>
3197 &#160;&#160;&#160;&#160;int port,<br>
3198 &#160;&#160;&#160;&#160;<a href="#http_addrlist_t">http_addrlist_t</a> *addrlist,<br>
3199 &#160;&#160;&#160;&#160;int family,<br>
3200 &#160;&#160;&#160;&#160;<a href="#http_encryption_t">http_encryption_t</a> encryption,<br>
3201 &#160;&#160;&#160;&#160;int blocking,<br>
3202 &#160;&#160;&#160;&#160;int msec,<br>
3203 &#160;&#160;&#160;&#160;int *cancel<br>
3204 );</p>
3205 <h4 class="parameters">Parameters</h4>
3206 <dl>
3207 <dt>host</dt>
3208 <dd class="description">Host to connect to</dd>
3209 <dt>port</dt>
3210 <dd class="description">Port number</dd>
3211 <dt>addrlist</dt>
3212 <dd class="description">List of addresses or NULL to lookup</dd>
3213 <dt>family</dt>
3214 <dd class="description">Address family to use or <code>AF_UNSPEC</code> for any</dd>
3215 <dt>encryption</dt>
3216 <dd class="description">Type of encryption to use</dd>
3217 <dt>blocking</dt>
3218 <dd class="description">1 for blocking connection, 0 for non-blocking</dd>
3219 <dt>msec</dt>
3220 <dd class="description">Connection timeout in milliseconds, 0 means don't connect</dd>
3221 <dt>cancel</dt>
3222 <dd class="description">Pointer to &quot;cancel&quot; variable</dd>
3223 </dl>
3224 <h4 class="returnvalue">Return Value</h4>
3225 <p class="description">New HTTP connection</p>
3226 <h3 class="function"><span class="info">&#160;CUPS 1.5/macOS 10.7&#160;</span><a id="httpCopyCredentials">httpCopyCredentials</a></h3>
3227 <p class="description">Copy the credentials associated with the peer in
3228 an encrypted connection.</p>
3229 <p class="code">
3230 int httpCopyCredentials (<br>
3231 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
3232 &#160;&#160;&#160;&#160;cups_array_t **credentials<br>
3233 );</p>
3234 <h4 class="parameters">Parameters</h4>
3235 <dl>
3236 <dt>http</dt>
3237 <dd class="description">Connection to server</dd>
3238 <dt>credentials</dt>
3239 <dd class="description">Array of credentials</dd>
3240 </dl>
3241 <h4 class="returnvalue">Return Value</h4>
3242 <p class="description">Status of call (0 = success)</p>
3243 <h3 class="function"><span class="info">&#160;CUPS 2.0/macOS 10.10&#160;</span><a id="httpCredentialsAreValidForName">httpCredentialsAreValidForName</a></h3>
3244 <p class="description">Return whether the credentials are valid for the given name.</p>
3245 <p class="code">
3246 int httpCredentialsAreValidForName (<br>
3247 &#160;&#160;&#160;&#160;cups_array_t *credentials,<br>
3248 &#160;&#160;&#160;&#160;const char *common_name<br>
3249 );</p>
3250 <h4 class="parameters">Parameters</h4>
3251 <dl>
3252 <dt>credentials</dt>
3253 <dd class="description">Credentials</dd>
3254 <dt>common_name</dt>
3255 <dd class="description">Name to check</dd>
3256 </dl>
3257 <h4 class="returnvalue">Return Value</h4>
3258 <p class="description">1 if valid, 0 otherwise</p>
3259 <h3 class="function"><span class="info">&#160;CUPS 2.0/macOS 10.10&#160;</span><a id="httpCredentialsGetExpiration">httpCredentialsGetExpiration</a></h3>
3260 <p class="description">Return the expiration date of the credentials.</p>
3261 <p class="code">
3262 time_t httpCredentialsGetExpiration (<br>
3263 &#160;&#160;&#160;&#160;cups_array_t *credentials<br>
3264 );</p>
3265 <h4 class="parameters">Parameters</h4>
3266 <dl>
3267 <dt>credentials</dt>
3268 <dd class="description">Credentials</dd>
3269 </dl>
3270 <h4 class="returnvalue">Return Value</h4>
3271 <p class="description">Expiration date of credentials</p>
3272 <h3 class="function"><span class="info">&#160;CUPS 2.0/macOS 10.10&#160;</span><a id="httpCredentialsGetTrust">httpCredentialsGetTrust</a></h3>
3273 <p class="description">Return the trust of credentials.</p>
3274 <p class="code">
3275 <a href="#http_trust_t">http_trust_t</a> httpCredentialsGetTrust (<br>
3276 &#160;&#160;&#160;&#160;cups_array_t *credentials,<br>
3277 &#160;&#160;&#160;&#160;const char *common_name<br>
3278 );</p>
3279 <h4 class="parameters">Parameters</h4>
3280 <dl>
3281 <dt>credentials</dt>
3282 <dd class="description">Credentials</dd>
3283 <dt>common_name</dt>
3284 <dd class="description">Common name for trust lookup</dd>
3285 </dl>
3286 <h4 class="returnvalue">Return Value</h4>
3287 <p class="description">Level of trust</p>
3288 <h3 class="function"><span class="info">&#160;CUPS 2.0/macOS 10.10&#160;</span><a id="httpCredentialsString">httpCredentialsString</a></h3>
3289 <p class="description">Return a string representing the credentials.</p>
3290 <p class="code">
3291 size_t httpCredentialsString (<br>
3292 &#160;&#160;&#160;&#160;cups_array_t *credentials,<br>
3293 &#160;&#160;&#160;&#160;char *buffer,<br>
3294 &#160;&#160;&#160;&#160;size_t bufsize<br>
3295 );</p>
3296 <h4 class="parameters">Parameters</h4>
3297 <dl>
3298 <dt>credentials</dt>
3299 <dd class="description">Credentials</dd>
3300 <dt>buffer</dt>
3301 <dd class="description">Buffer or <code>NULL</code></dd>
3302 <dt>bufsize</dt>
3303 <dd class="description">Size of buffer</dd>
3304 </dl>
3305 <h4 class="returnvalue">Return Value</h4>
3306 <p class="description">Total size of credentials string</p>
3307 <h3 class="function"><span class="info">&#160;CUPS 1.1.21/macOS 10.4&#160;</span><a id="httpDecode64_2">httpDecode64_2</a></h3>
3308 <p class="description">Base64-decode a string.</p>
3309 <p class="code">
3310 char *httpDecode64_2 (<br>
3311 &#160;&#160;&#160;&#160;char *out,<br>
3312 &#160;&#160;&#160;&#160;int *outlen,<br>
3313 &#160;&#160;&#160;&#160;const char *in<br>
3314 );</p>
3315 <h4 class="parameters">Parameters</h4>
3316 <dl>
3317 <dt>out</dt>
3318 <dd class="description">String to write to</dd>
3319 <dt>outlen</dt>
3320 <dd class="description">Size of output string</dd>
3321 <dt>in</dt>
3322 <dd class="description">String to read from</dd>
3323 </dl>
3324 <h4 class="returnvalue">Return Value</h4>
3325 <p class="description">Decoded string</p>
3326 <h3 class="function"><a id="httpDelete">httpDelete</a></h3>
3327 <p class="description">Send a DELETE request to the server.</p>
3328 <p class="code">
3329 int httpDelete (<br>
3330 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
3331 &#160;&#160;&#160;&#160;const char *uri<br>
3332 );</p>
3333 <h4 class="parameters">Parameters</h4>
3334 <dl>
3335 <dt>http</dt>
3336 <dd class="description">HTTP connection</dd>
3337 <dt>uri</dt>
3338 <dd class="description">URI to delete</dd>
3339 </dl>
3340 <h4 class="returnvalue">Return Value</h4>
3341 <p class="description">Status of call (0 = success)</p>
3342 <h3 class="function"><span class="info">&#160;CUPS 1.1.21/macOS 10.4&#160;</span><a id="httpEncode64_2">httpEncode64_2</a></h3>
3343 <p class="description">Base64-encode a string.</p>
3344 <p class="code">
3345 char *httpEncode64_2 (<br>
3346 &#160;&#160;&#160;&#160;char *out,<br>
3347 &#160;&#160;&#160;&#160;int outlen,<br>
3348 &#160;&#160;&#160;&#160;const char *in,<br>
3349 &#160;&#160;&#160;&#160;int inlen<br>
3350 );</p>
3351 <h4 class="parameters">Parameters</h4>
3352 <dl>
3353 <dt>out</dt>
3354 <dd class="description">String to write to</dd>
3355 <dt>outlen</dt>
3356 <dd class="description">Size of output string</dd>
3357 <dt>in</dt>
3358 <dd class="description">String to read from</dd>
3359 <dt>inlen</dt>
3360 <dd class="description">Size of input string</dd>
3361 </dl>
3362 <h4 class="returnvalue">Return Value</h4>
3363 <p class="description">Encoded string</p>
3364 <h3 class="function"><a id="httpEncryption">httpEncryption</a></h3>
3365 <p class="description">Set the required encryption on the link.</p>
3366 <p class="code">
3367 int httpEncryption (<br>
3368 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
3369 &#160;&#160;&#160;&#160;<a href="#http_encryption_t">http_encryption_t</a> e<br>
3370 );</p>
3371 <h4 class="parameters">Parameters</h4>
3372 <dl>
3373 <dt>http</dt>
3374 <dd class="description">HTTP connection</dd>
3375 <dt>e</dt>
3376 <dd class="description">New encryption preference</dd>
3377 </dl>
3378 <h4 class="returnvalue">Return Value</h4>
3379 <p class="description">-1 on error, 0 on success</p>
3380 <h3 class="function"><a id="httpError">httpError</a></h3>
3381 <p class="description">Get the last error on a connection.</p>
3382 <p class="code">
3383 int httpError (<br>
3384 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3385 );</p>
3386 <h4 class="parameters">Parameters</h4>
3387 <dl>
3388 <dt>http</dt>
3389 <dd class="description">HTTP connection</dd>
3390 </dl>
3391 <h4 class="returnvalue">Return Value</h4>
3392 <p class="description">Error code (errno) value</p>
3393 <h3 class="function"><a id="httpFieldValue">httpFieldValue</a></h3>
3394 <p class="description">Return the HTTP field enumeration value for a field
3395 name.</p>
3396 <p class="code">
3397 <a href="#http_field_t">http_field_t</a> httpFieldValue (<br>
3398 &#160;&#160;&#160;&#160;const char *name<br>
3399 );</p>
3400 <h4 class="parameters">Parameters</h4>
3401 <dl>
3402 <dt>name</dt>
3403 <dd class="description">String name</dd>
3404 </dl>
3405 <h4 class="returnvalue">Return Value</h4>
3406 <p class="description">Field index</p>
3407 <h3 class="function"><a id="httpFlush">httpFlush</a></h3>
3408 <p class="description">Looping var</p>
3409 <p class="code">
3410 void httpFlush (<br>
3411 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3412 );</p>
3413 <h4 class="parameters">Parameters</h4>
3414 <dl>
3415 <dt>http</dt>
3416 <dd class="description">HTTP connection</dd>
3417 </dl>
3418 <h4 class="returnvalue">Return Value</h4>
3419 <p class="description">Flush data from a HTTP connection.</p>
3420 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpFlushWrite">httpFlushWrite</a></h3>
3421 <p class="description">Flush data in write buffer.</p>
3422 <p class="code">
3423 int httpFlushWrite (<br>
3424 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3425 );</p>
3426 <h4 class="parameters">Parameters</h4>
3427 <dl>
3428 <dt>http</dt>
3429 <dd class="description">HTTP connection</dd>
3430 </dl>
3431 <h4 class="returnvalue">Return Value</h4>
3432 <p class="description">Bytes written or -1 on error</p>
3433 <h3 class="function"><a id="httpFreeCredentials">httpFreeCredentials</a></h3>
3434 <p class="description">Bytes written</p>
3435 <p class="code">
3436 void httpFreeCredentials (<br>
3437 &#160;&#160;&#160;&#160;cups_array_t *credentials<br>
3438 );</p>
3439 <h4 class="parameters">Parameters</h4>
3440 <dl>
3441 <dt>credentials</dt>
3442 <dd class="description">Array of credentials</dd>
3443 </dl>
3444 <h4 class="returnvalue">Return Value</h4>
3445 <p class="description">Free an array of credentials.</p>
3446 <h3 class="function"><a id="httpGet">httpGet</a></h3>
3447 <p class="description">Send a GET request to the server.</p>
3448 <p class="code">
3449 int httpGet (<br>
3450 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
3451 &#160;&#160;&#160;&#160;const char *uri<br>
3452 );</p>
3453 <h4 class="parameters">Parameters</h4>
3454 <dl>
3455 <dt>http</dt>
3456 <dd class="description">HTTP connection</dd>
3457 <dt>uri</dt>
3458 <dd class="description">URI to get</dd>
3459 </dl>
3460 <h4 class="returnvalue">Return Value</h4>
3461 <p class="description">Status of call (0 = success)</p>
3462 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpGetActivity">httpGetActivity</a></h3>
3463 <p class="description">Get the most recent activity for a connection.</p>
3464 <p class="code">
3465 time_t httpGetActivity (<br>
3466 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3467 );</p>
3468 <h4 class="parameters">Parameters</h4>
3469 <dl>
3470 <dt>http</dt>
3471 <dd class="description">HTTP connection</dd>
3472 </dl>
3473 <h4 class="returnvalue">Return Value</h4>
3474 <p class="description">Time of last read or write</p>
3475 <h4 class="discussion">Discussion</h4>
3476 <p class="discussion">The return value is the UNIX time of the last read or write.
3477
3478 </p>
3479 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpGetAddress">httpGetAddress</a></h3>
3480 <p class="description">Get the address of the connected peer of a connection.</p>
3481 <p class="code">
3482 <a href="#http_addr_t">http_addr_t</a> *httpGetAddress (<br>
3483 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3484 );</p>
3485 <h4 class="parameters">Parameters</h4>
3486 <dl>
3487 <dt>http</dt>
3488 <dd class="description">HTTP connection</dd>
3489 </dl>
3490 <h4 class="returnvalue">Return Value</h4>
3491 <p class="description">Connected address or <code>NULL</code></p>
3492 <h4 class="discussion">Discussion</h4>
3493 <p class="discussion">Returns <code>NULL</code> if the socket is currently unconnected.
3494
3495 </p>
3496 <h3 class="function"><span class="info">&#160;CUPS 1.3/macOS 10.5&#160;</span><a id="httpGetAuthString">httpGetAuthString</a></h3>
3497 <p class="description">Get the current authorization string.</p>
3498 <p class="code">
3499 char *httpGetAuthString (<br>
3500 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3501 );</p>
3502 <h4 class="parameters">Parameters</h4>
3503 <dl>
3504 <dt>http</dt>
3505 <dd class="description">HTTP connection</dd>
3506 </dl>
3507 <h4 class="returnvalue">Return Value</h4>
3508 <p class="description">Authorization string</p>
3509 <h4 class="discussion">Discussion</h4>
3510 <p class="discussion">The authorization string is set by cupsDoAuthentication() and
3511 httpSetAuthString(). Use httpGetAuthString() to retrieve the
3512 string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
3513 value.
3514
3515 </p>
3516 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpGetBlocking">httpGetBlocking</a></h3>
3517 <p class="description">Get the blocking/non-block state of a connection.</p>
3518 <p class="code">
3519 int httpGetBlocking (<br>
3520 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3521 );</p>
3522 <h4 class="parameters">Parameters</h4>
3523 <dl>
3524 <dt>http</dt>
3525 <dd class="description">HTTP connection</dd>
3526 </dl>
3527 <h4 class="returnvalue">Return Value</h4>
3528 <p class="description">1 if blocking, 0 if non-blocking</p>
3529 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpGetContentEncoding">httpGetContentEncoding</a></h3>
3530 <p class="description">Get a common content encoding, if any, between
3531 the client and server.</p>
3532 <p class="code">
3533 const char *httpGetContentEncoding (<br>
3534 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3535 );</p>
3536 <h4 class="parameters">Parameters</h4>
3537 <dl>
3538 <dt>http</dt>
3539 <dd class="description">HTTP connection</dd>
3540 </dl>
3541 <h4 class="returnvalue">Return Value</h4>
3542 <p class="description">Content-Coding value or
3543 <code>NULL</code> for the identity
3544 coding.</p>
3545 <h4 class="discussion">Discussion</h4>
3546 <p class="discussion">This function uses the value of the Accepts-Encoding HTTP header and must be
3547 called after receiving a response from the server or a request from the
3548 client. The value returned can be use in subsequent requests (for clients)
3549 or in the response (for servers) in order to compress the content stream.
3550
3551 </p>
3552 <h3 class="function"><span class="info">&#160;CUPS 1.1.19/macOS 10.3&#160;</span><a id="httpGetCookie">httpGetCookie</a></h3>
3553 <p class="description">Get any cookie data from the response.</p>
3554 <p class="code">
3555 const char *httpGetCookie (<br>
3556 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3557 );</p>
3558 <h4 class="parameters">Parameters</h4>
3559 <dl>
3560 <dt>http</dt>
3561 <dd class="description">HTTP connection</dd>
3562 </dl>
3563 <h4 class="returnvalue">Return Value</h4>
3564 <p class="description">Cookie data or NULL</p>
3565 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpGetDateString2">httpGetDateString2</a></h3>
3566 <p class="description">Get a formatted date/time string from a time value.</p>
3567 <p class="code">
3568 const char *httpGetDateString2 (<br>
3569 &#160;&#160;&#160;&#160;time_t t,<br>
3570 &#160;&#160;&#160;&#160;char *s,<br>
3571 &#160;&#160;&#160;&#160;int slen<br>
3572 );</p>
3573 <h4 class="parameters">Parameters</h4>
3574 <dl>
3575 <dt>t</dt>
3576 <dd class="description">UNIX time</dd>
3577 <dt>s</dt>
3578 <dd class="description">String buffer</dd>
3579 <dt>slen</dt>
3580 <dd class="description">Size of string buffer</dd>
3581 </dl>
3582 <h4 class="returnvalue">Return Value</h4>
3583 <p class="description">Date/time string</p>
3584 <h3 class="function"><a id="httpGetDateTime">httpGetDateTime</a></h3>
3585 <p class="description">Get a time value from a formatted date/time string.</p>
3586 <p class="code">
3587 time_t httpGetDateTime (<br>
3588 &#160;&#160;&#160;&#160;const char *s<br>
3589 );</p>
3590 <h4 class="parameters">Parameters</h4>
3591 <dl>
3592 <dt>s</dt>
3593 <dd class="description">Date/time string</dd>
3594 </dl>
3595 <h4 class="returnvalue">Return Value</h4>
3596 <p class="description">UNIX time</p>
3597 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpGetEncryption">httpGetEncryption</a></h3>
3598 <p class="description">Get the current encryption mode of a connection.</p>
3599 <p class="code">
3600 <a href="#http_encryption_t">http_encryption_t</a> httpGetEncryption (<br>
3601 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3602 );</p>
3603 <h4 class="parameters">Parameters</h4>
3604 <dl>
3605 <dt>http</dt>
3606 <dd class="description">HTTP connection</dd>
3607 </dl>
3608 <h4 class="returnvalue">Return Value</h4>
3609 <p class="description">Current encryption mode</p>
3610 <h4 class="discussion">Discussion</h4>
3611 <p class="discussion">This function returns the encryption mode for the connection. Use the
3612 <a href="#httpIsEncrypted"><code>httpIsEncrypted</code></a> function to determine whether a TLS session has
3613 been established.
3614
3615 </p>
3616 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpGetExpect">httpGetExpect</a></h3>
3617 <p class="description">Get the value of the Expect header, if any.</p>
3618 <p class="code">
3619 http_status_t httpGetExpect (<br>
3620 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3621 );</p>
3622 <h4 class="parameters">Parameters</h4>
3623 <dl>
3624 <dt>http</dt>
3625 <dd class="description">HTTP connection</dd>
3626 </dl>
3627 <h4 class="returnvalue">Return Value</h4>
3628 <p class="description">Expect: status, if any</p>
3629 <h4 class="discussion">Discussion</h4>
3630 <p class="discussion">Returns <code>HTTP_STATUS_NONE</code> if there is no Expect header, otherwise
3631 returns the expected HTTP status code, typically <code>HTTP_STATUS_CONTINUE</code>.
3632
3633 </p>
3634 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpGetFd">httpGetFd</a></h3>
3635 <p class="description">Get the file descriptor associated with a connection.</p>
3636 <p class="code">
3637 int httpGetFd (<br>
3638 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3639 );</p>
3640 <h4 class="parameters">Parameters</h4>
3641 <dl>
3642 <dt>http</dt>
3643 <dd class="description">HTTP connection</dd>
3644 </dl>
3645 <h4 class="returnvalue">Return Value</h4>
3646 <p class="description">File descriptor or -1 if none</p>
3647 <h3 class="function"><a id="httpGetField">httpGetField</a></h3>
3648 <p class="description">Get a field value from a request/response.</p>
3649 <p class="code">
3650 const char *httpGetField (<br>
3651 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
3652 &#160;&#160;&#160;&#160;<a href="#http_field_t">http_field_t</a> field<br>
3653 );</p>
3654 <h4 class="parameters">Parameters</h4>
3655 <dl>
3656 <dt>http</dt>
3657 <dd class="description">HTTP connection</dd>
3658 <dt>field</dt>
3659 <dd class="description">Field to get</dd>
3660 </dl>
3661 <h4 class="returnvalue">Return Value</h4>
3662 <p class="description">Field value</p>
3663 <h3 class="function"><span class="info">&#160;DEPRECATED&#160;</span><a id="httpGetHostByName">httpGetHostByName</a></h3>
3664 <p class="description">Lookup a hostname or IPv4 address, and return
3665 address records for the specified name.</p>
3666 <p class="code">
3667 struct hostent *httpGetHostByName (<br>
3668 &#160;&#160;&#160;&#160;const char *name<br>
3669 );</p>
3670 <h4 class="parameters">Parameters</h4>
3671 <dl>
3672 <dt>name</dt>
3673 <dd class="description">Hostname or IP address</dd>
3674 </dl>
3675 <h4 class="returnvalue">Return Value</h4>
3676 <p class="description">Host entry</p>
3677 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpGetHostname">httpGetHostname</a></h3>
3678 <p class="description">Get the FQDN for the connection or local system.</p>
3679 <p class="code">
3680 const char *httpGetHostname (<br>
3681 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
3682 &#160;&#160;&#160;&#160;char *s,<br>
3683 &#160;&#160;&#160;&#160;int slen<br>
3684 );</p>
3685 <h4 class="parameters">Parameters</h4>
3686 <dl>
3687 <dt>http</dt>
3688 <dd class="description">HTTP connection or NULL</dd>
3689 <dt>s</dt>
3690 <dd class="description">String buffer for name</dd>
3691 <dt>slen</dt>
3692 <dd class="description">Size of buffer</dd>
3693 </dl>
3694 <h4 class="returnvalue">Return Value</h4>
3695 <p class="description">FQDN for connection or system</p>
3696 <h4 class="discussion">Discussion</h4>
3697 <p class="discussion">When &quot;http&quot; points to a connected socket, return the hostname or
3698 address that was used in the call to httpConnect() or httpConnectEncrypt(),
3699 or the address of the client for the connection from httpAcceptConnection().
3700 Otherwise, return the FQDN for the local system using both gethostname()
3701 and gethostbyname() to get the local hostname with domain.
3702
3703 </p>
3704 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpGetKeepAlive">httpGetKeepAlive</a></h3>
3705 <p class="description">Get the current Keep-Alive state of the connection.</p>
3706 <p class="code">
3707 <a href="#http_keepalive_t">http_keepalive_t</a> httpGetKeepAlive (<br>
3708 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3709 );</p>
3710 <h4 class="parameters">Parameters</h4>
3711 <dl>
3712 <dt>http</dt>
3713 <dd class="description">HTTP connection</dd>
3714 </dl>
3715 <h4 class="returnvalue">Return Value</h4>
3716 <p class="description">Keep-Alive state</p>
3717 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpGetLength2">httpGetLength2</a></h3>
3718 <p class="description">Get the amount of data remaining from the
3719 content-length or transfer-encoding fields.</p>
3720 <p class="code">
3721 off_t httpGetLength2 (<br>
3722 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3723 );</p>
3724 <h4 class="parameters">Parameters</h4>
3725 <dl>
3726 <dt>http</dt>
3727 <dd class="description">HTTP connection</dd>
3728 </dl>
3729 <h4 class="returnvalue">Return Value</h4>
3730 <p class="description">Content length</p>
3731 <h4 class="discussion">Discussion</h4>
3732 <p class="discussion">This function returns the complete content length, even for
3733 content larger than 2^31 - 1.
3734
3735 </p>
3736 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpGetPending">httpGetPending</a></h3>
3737 <p class="description">Get the number of bytes that are buffered for writing.</p>
3738 <p class="code">
3739 size_t httpGetPending (<br>
3740 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3741 );</p>
3742 <h4 class="parameters">Parameters</h4>
3743 <dl>
3744 <dt>http</dt>
3745 <dd class="description">HTTP connection</dd>
3746 </dl>
3747 <h4 class="returnvalue">Return Value</h4>
3748 <p class="description">Number of bytes buffered</p>
3749 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpGetReady">httpGetReady</a></h3>
3750 <p class="description">Get the number of bytes that can be read without blocking.</p>
3751 <p class="code">
3752 size_t httpGetReady (<br>
3753 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3754 );</p>
3755 <h4 class="parameters">Parameters</h4>
3756 <dl>
3757 <dt>http</dt>
3758 <dd class="description">HTTP connection</dd>
3759 </dl>
3760 <h4 class="returnvalue">Return Value</h4>
3761 <p class="description">Number of bytes available</p>
3762 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpGetRemaining">httpGetRemaining</a></h3>
3763 <p class="description">Get the number of remaining bytes in the message
3764 body or current chunk.</p>
3765 <p class="code">
3766 size_t httpGetRemaining (<br>
3767 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3768 );</p>
3769 <h4 class="parameters">Parameters</h4>
3770 <dl>
3771 <dt>http</dt>
3772 <dd class="description">HTTP connection</dd>
3773 </dl>
3774 <h4 class="returnvalue">Return Value</h4>
3775 <p class="description">Remaining bytes</p>
3776 <h4 class="discussion">Discussion</h4>
3777 <p class="discussion">The <a href="#httpIsChunked"><code>httpIsChunked</code></a> function can be used to determine whether the
3778 message body is chunked or fixed-length.
3779
3780 </p>
3781 <h3 class="function"><a id="httpGetState">httpGetState</a></h3>
3782 <p class="description">Get the current state of the HTTP request.</p>
3783 <p class="code">
3784 <a href="#http_state_t">http_state_t</a> httpGetState (<br>
3785 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3786 );</p>
3787 <h4 class="parameters">Parameters</h4>
3788 <dl>
3789 <dt>http</dt>
3790 <dd class="description">HTTP connection</dd>
3791 </dl>
3792 <h4 class="returnvalue">Return Value</h4>
3793 <p class="description">HTTP state</p>
3794 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpGetStatus">httpGetStatus</a></h3>
3795 <p class="description">Get the status of the last HTTP request.</p>
3796 <p class="code">
3797 http_status_t httpGetStatus (<br>
3798 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3799 );</p>
3800 <h4 class="parameters">Parameters</h4>
3801 <dl>
3802 <dt>http</dt>
3803 <dd class="description">HTTP connection</dd>
3804 </dl>
3805 <h4 class="returnvalue">Return Value</h4>
3806 <p class="description">HTTP status</p>
3807 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpGetSubField2">httpGetSubField2</a></h3>
3808 <p class="description">Get a sub-field value.</p>
3809 <p class="code">
3810 char *httpGetSubField2 (<br>
3811 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
3812 &#160;&#160;&#160;&#160;<a href="#http_field_t">http_field_t</a> field,<br>
3813 &#160;&#160;&#160;&#160;const char *name,<br>
3814 &#160;&#160;&#160;&#160;char *value,<br>
3815 &#160;&#160;&#160;&#160;int valuelen<br>
3816 );</p>
3817 <h4 class="parameters">Parameters</h4>
3818 <dl>
3819 <dt>http</dt>
3820 <dd class="description">HTTP connection</dd>
3821 <dt>field</dt>
3822 <dd class="description">Field index</dd>
3823 <dt>name</dt>
3824 <dd class="description">Name of sub-field</dd>
3825 <dt>value</dt>
3826 <dd class="description">Value string</dd>
3827 <dt>valuelen</dt>
3828 <dd class="description">Size of value buffer</dd>
3829 </dl>
3830 <h4 class="returnvalue">Return Value</h4>
3831 <p class="description">Value or NULL</p>
3832 <h3 class="function"><a id="httpGetVersion">httpGetVersion</a></h3>
3833 <p class="description">Get the HTTP version at the other end.</p>
3834 <p class="code">
3835 <a href="#http_version_t">http_version_t</a> httpGetVersion (<br>
3836 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3837 );</p>
3838 <h4 class="parameters">Parameters</h4>
3839 <dl>
3840 <dt>http</dt>
3841 <dd class="description">HTTP connection</dd>
3842 </dl>
3843 <h4 class="returnvalue">Return Value</h4>
3844 <p class="description">Version number</p>
3845 <h3 class="function"><a id="httpGets">httpGets</a></h3>
3846 <p class="description">Get a line of text from a HTTP connection.</p>
3847 <p class="code">
3848 char *httpGets (<br>
3849 &#160;&#160;&#160;&#160;char *line,<br>
3850 &#160;&#160;&#160;&#160;int length,<br>
3851 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3852 );</p>
3853 <h4 class="parameters">Parameters</h4>
3854 <dl>
3855 <dt>line</dt>
3856 <dd class="description">Line to read into</dd>
3857 <dt>length</dt>
3858 <dd class="description">Max length of buffer</dd>
3859 <dt>http</dt>
3860 <dd class="description">HTTP connection</dd>
3861 </dl>
3862 <h4 class="returnvalue">Return Value</h4>
3863 <p class="description">Line or NULL</p>
3864 <h3 class="function"><a id="httpHead">httpHead</a></h3>
3865 <p class="description">Send a HEAD request to the server.</p>
3866 <p class="code">
3867 int httpHead (<br>
3868 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
3869 &#160;&#160;&#160;&#160;const char *uri<br>
3870 );</p>
3871 <h4 class="parameters">Parameters</h4>
3872 <dl>
3873 <dt>http</dt>
3874 <dd class="description">HTTP connection</dd>
3875 <dt>uri</dt>
3876 <dd class="description">URI for head</dd>
3877 </dl>
3878 <h4 class="returnvalue">Return Value</h4>
3879 <p class="description">Status of call (0 = success)</p>
3880 <h3 class="function"><a id="httpInitialize">httpInitialize</a></h3>
3881 <p class="description">URI for head</p>
3882 <p class="code">
3883 void httpInitialize (void);</p>
3884 <h4 class="returnvalue">Return Value</h4>
3885 <p class="description">Initialize the HTTP interface library and set the
3886 default HTTP proxy (if any).</p>
3887 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpIsChunked">httpIsChunked</a></h3>
3888 <p class="description">Report whether a message body is chunked.</p>
3889 <p class="code">
3890 int httpIsChunked (<br>
3891 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3892 );</p>
3893 <h4 class="parameters">Parameters</h4>
3894 <dl>
3895 <dt>http</dt>
3896 <dd class="description">HTTP connection</dd>
3897 </dl>
3898 <h4 class="returnvalue">Return Value</h4>
3899 <p class="description">1 if chunked, 0 if not</p>
3900 <h4 class="discussion">Discussion</h4>
3901 <p class="discussion">This function returns non-zero if the message body is composed of
3902 variable-length chunks.
3903
3904 </p>
3905 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpIsEncrypted">httpIsEncrypted</a></h3>
3906 <p class="description">Report whether a connection is encrypted.</p>
3907 <p class="code">
3908 int httpIsEncrypted (<br>
3909 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
3910 );</p>
3911 <h4 class="parameters">Parameters</h4>
3912 <dl>
3913 <dt>http</dt>
3914 <dd class="description">HTTP connection</dd>
3915 </dl>
3916 <h4 class="returnvalue">Return Value</h4>
3917 <p class="description">1 if encrypted, 0 if not</p>
3918 <h4 class="discussion">Discussion</h4>
3919 <p class="discussion">This function returns non-zero if the connection is currently encrypted.
3920
3921 </p>
3922 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpLoadCredentials">httpLoadCredentials</a></h3>
3923 <p class="description">Load X.509 credentials from a keychain file.</p>
3924 <p class="code">
3925 int httpLoadCredentials (<br>
3926 &#160;&#160;&#160;&#160;const char *path,<br>
3927 &#160;&#160;&#160;&#160;cups_array_t **credentials,<br>
3928 &#160;&#160;&#160;&#160;const char *common_name<br>
3929 );</p>
3930 <h4 class="parameters">Parameters</h4>
3931 <dl>
3932 <dt>path</dt>
3933 <dd class="description">Keychain path or <code>NULL</code> for default</dd>
3934 <dt>credentials</dt>
3935 <dd class="description">Credentials</dd>
3936 <dt>common_name</dt>
3937 <dd class="description">Common name for credentials</dd>
3938 </dl>
3939 <h4 class="returnvalue">Return Value</h4>
3940 <p class="description">0 on success, -1 on error</p>
3941 <h3 class="function"><a id="httpOptions">httpOptions</a></h3>
3942 <p class="description">Send an OPTIONS request to the server.</p>
3943 <p class="code">
3944 int httpOptions (<br>
3945 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
3946 &#160;&#160;&#160;&#160;const char *uri<br>
3947 );</p>
3948 <h4 class="parameters">Parameters</h4>
3949 <dl>
3950 <dt>http</dt>
3951 <dd class="description">HTTP connection</dd>
3952 <dt>uri</dt>
3953 <dd class="description">URI for options</dd>
3954 </dl>
3955 <h4 class="returnvalue">Return Value</h4>
3956 <p class="description">Status of call (0 = success)</p>
3957 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpPeek">httpPeek</a></h3>
3958 <p class="description">Peek at data from a HTTP connection.</p>
3959 <p class="code">
3960 ssize_t httpPeek (<br>
3961 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
3962 &#160;&#160;&#160;&#160;char *buffer,<br>
3963 &#160;&#160;&#160;&#160;size_t length<br>
3964 );</p>
3965 <h4 class="parameters">Parameters</h4>
3966 <dl>
3967 <dt>http</dt>
3968 <dd class="description">HTTP connection</dd>
3969 <dt>buffer</dt>
3970 <dd class="description">Buffer for data</dd>
3971 <dt>length</dt>
3972 <dd class="description">Maximum number of bytes</dd>
3973 </dl>
3974 <h4 class="returnvalue">Return Value</h4>
3975 <p class="description">Number of bytes copied</p>
3976 <h4 class="discussion">Discussion</h4>
3977 <p class="discussion">This function copies available data from the given HTTP connection, reading
3978 a buffer as needed. The data is still available for reading using
3979 <a href="#httpRead"><code>httpRead</code></a> or <a href="#httpRead2"><code>httpRead2</code></a>.<br>
3980 <br>
3981 For non-blocking connections the usual timeouts apply.
3982
3983 </p>
3984 <h3 class="function"><a id="httpPost">httpPost</a></h3>
3985 <p class="description">Send a POST request to the server.</p>
3986 <p class="code">
3987 int httpPost (<br>
3988 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
3989 &#160;&#160;&#160;&#160;const char *uri<br>
3990 );</p>
3991 <h4 class="parameters">Parameters</h4>
3992 <dl>
3993 <dt>http</dt>
3994 <dd class="description">HTTP connection</dd>
3995 <dt>uri</dt>
3996 <dd class="description">URI for post</dd>
3997 </dl>
3998 <h4 class="returnvalue">Return Value</h4>
3999 <p class="description">Status of call (0 = success)</p>
4000 <h3 class="function"><a id="httpPut">httpPut</a></h3>
4001 <p class="description">Send a PUT request to the server.</p>
4002 <p class="code">
4003 int httpPut (<br>
4004 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
4005 &#160;&#160;&#160;&#160;const char *uri<br>
4006 );</p>
4007 <h4 class="parameters">Parameters</h4>
4008 <dl>
4009 <dt>http</dt>
4010 <dd class="description">HTTP connection</dd>
4011 <dt>uri</dt>
4012 <dd class="description">URI to put</dd>
4013 </dl>
4014 <h4 class="returnvalue">Return Value</h4>
4015 <p class="description">Status of call (0 = success)</p>
4016 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpRead2">httpRead2</a></h3>
4017 <p class="description">Read data from a HTTP connection.</p>
4018 <p class="code">
4019 ssize_t httpRead2 (<br>
4020 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
4021 &#160;&#160;&#160;&#160;char *buffer,<br>
4022 &#160;&#160;&#160;&#160;size_t length<br>
4023 );</p>
4024 <h4 class="parameters">Parameters</h4>
4025 <dl>
4026 <dt>http</dt>
4027 <dd class="description">HTTP connection</dd>
4028 <dt>buffer</dt>
4029 <dd class="description">Buffer for data</dd>
4030 <dt>length</dt>
4031 <dd class="description">Maximum number of bytes</dd>
4032 </dl>
4033 <h4 class="returnvalue">Return Value</h4>
4034 <p class="description">Number of bytes read</p>
4035 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpReadRequest">httpReadRequest</a></h3>
4036 <p class="description">Read a HTTP request from a connection.</p>
4037 <p class="code">
4038 <a href="#http_state_t">http_state_t</a> httpReadRequest (<br>
4039 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
4040 &#160;&#160;&#160;&#160;char *uri,<br>
4041 &#160;&#160;&#160;&#160;size_t urilen<br>
4042 );</p>
4043 <h4 class="parameters">Parameters</h4>
4044 <dl>
4045 <dt>http</dt>
4046 <dd class="description">HTTP connection</dd>
4047 <dt>uri</dt>
4048 <dd class="description">URI buffer</dd>
4049 <dt>urilen</dt>
4050 <dd class="description">Size of URI buffer</dd>
4051 </dl>
4052 <h4 class="returnvalue">Return Value</h4>
4053 <p class="description">New state of connection</p>
4054 <h3 class="function"><a id="httpReconnect2">httpReconnect2</a></h3>
4055 <p class="description">Reconnect to a HTTP server with timeout and optional
4056 cancel.</p>
4057 <p class="code">
4058 int httpReconnect2 (<br>
4059 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
4060 &#160;&#160;&#160;&#160;int msec,<br>
4061 &#160;&#160;&#160;&#160;int *cancel<br>
4062 );</p>
4063 <h4 class="parameters">Parameters</h4>
4064 <dl>
4065 <dt>http</dt>
4066 <dd class="description">HTTP connection</dd>
4067 <dt>msec</dt>
4068 <dd class="description">Timeout in milliseconds</dd>
4069 <dt>cancel</dt>
4070 <dd class="description">Pointer to &quot;cancel&quot; variable</dd>
4071 </dl>
4072 <h4 class="returnvalue">Return Value</h4>
4073 <p class="description">0 on success, non-zero on failure</p>
4074 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpResolveHostname">httpResolveHostname</a></h3>
4075 <p class="description">Resolve the hostname of the HTTP connection
4076 address.</p>
4077 <p class="code">
4078 const char *httpResolveHostname (<br>
4079 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
4080 &#160;&#160;&#160;&#160;char *buffer,<br>
4081 &#160;&#160;&#160;&#160;size_t bufsize<br>
4082 );</p>
4083 <h4 class="parameters">Parameters</h4>
4084 <dl>
4085 <dt>http</dt>
4086 <dd class="description">HTTP connection</dd>
4087 <dt>buffer</dt>
4088 <dd class="description">Hostname buffer</dd>
4089 <dt>bufsize</dt>
4090 <dd class="description">Size of buffer</dd>
4091 </dl>
4092 <h4 class="returnvalue">Return Value</h4>
4093 <p class="description">Resolved hostname or <code>NULL</code></p>
4094 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpSaveCredentials">httpSaveCredentials</a></h3>
4095 <p class="description">Save X.509 credentials to a keychain file.</p>
4096 <p class="code">
4097 int httpSaveCredentials (<br>
4098 &#160;&#160;&#160;&#160;const char *path,<br>
4099 &#160;&#160;&#160;&#160;cups_array_t *credentials,<br>
4100 &#160;&#160;&#160;&#160;const char *common_name<br>
4101 );</p>
4102 <h4 class="parameters">Parameters</h4>
4103 <dl>
4104 <dt>path</dt>
4105 <dd class="description">Keychain path or <code>NULL</code> for default</dd>
4106 <dt>credentials</dt>
4107 <dd class="description">Credentials</dd>
4108 <dt>common_name</dt>
4109 <dd class="description">Common name for credentials</dd>
4110 </dl>
4111 <h4 class="returnvalue">Return Value</h4>
4112 <p class="description">-1 on error, 0 on success</p>
4113 <h3 class="function"><a id="httpSeparate">httpSeparate</a></h3>
4114 <p class="description">+ 400 year days</p>
4115 <p class="code">
4116 void httpSeparate (<br>
4117 &#160;&#160;&#160;&#160;const char *uri,<br>
4118 &#160;&#160;&#160;&#160;char *scheme,<br>
4119 &#160;&#160;&#160;&#160;char *username,<br>
4120 &#160;&#160;&#160;&#160;char *host,<br>
4121 &#160;&#160;&#160;&#160;int *port,<br>
4122 &#160;&#160;&#160;&#160;char *resource<br>
4123 );</p>
4124 <h4 class="parameters">Parameters</h4>
4125 <dl>
4126 <dt>uri</dt>
4127 <dd class="description">Universal Resource Identifier</dd>
4128 <dt>scheme</dt>
4129 <dd class="description">Scheme [32] (http, https, etc.)</dd>
4130 <dt>username</dt>
4131 <dd class="description">Username [1024]</dd>
4132 <dt>host</dt>
4133 <dd class="description">Hostname [1024]</dd>
4134 <dt>port</dt>
4135 <dd class="description">Port number to use</dd>
4136 <dt>resource</dt>
4137 <dd class="description">Resource/filename [1024]</dd>
4138 </dl>
4139 <h4 class="returnvalue">Return Value</h4>
4140 <p class="description">Separate a Universal Resource Identifier into its
4141 components.</p>
4142 <p class="discussion">This function is deprecated; use the httpSeparateURI() function instead.
4143
4144 </p>
4145 <h3 class="function"><a id="httpSeparate2">httpSeparate2</a></h3>
4146 <p class="description">Resource/filename [1024]</p>
4147 <p class="code">
4148 void httpSeparate2 (<br>
4149 &#160;&#160;&#160;&#160;const char *uri,<br>
4150 &#160;&#160;&#160;&#160;char *scheme,<br>
4151 &#160;&#160;&#160;&#160;int schemelen,<br>
4152 &#160;&#160;&#160;&#160;char *username,<br>
4153 &#160;&#160;&#160;&#160;int usernamelen,<br>
4154 &#160;&#160;&#160;&#160;char *host,<br>
4155 &#160;&#160;&#160;&#160;int hostlen,<br>
4156 &#160;&#160;&#160;&#160;int *port,<br>
4157 &#160;&#160;&#160;&#160;char *resource,<br>
4158 &#160;&#160;&#160;&#160;int resourcelen<br>
4159 );</p>
4160 <h4 class="parameters">Parameters</h4>
4161 <dl>
4162 <dt>uri</dt>
4163 <dd class="description">Universal Resource Identifier</dd>
4164 <dt>scheme</dt>
4165 <dd class="description">Scheme (http, https, etc.)</dd>
4166 <dt>schemelen</dt>
4167 <dd class="description">Size of scheme buffer</dd>
4168 <dt>username</dt>
4169 <dd class="description">Username</dd>
4170 <dt>usernamelen</dt>
4171 <dd class="description">Size of username buffer</dd>
4172 <dt>host</dt>
4173 <dd class="description">Hostname</dd>
4174 <dt>hostlen</dt>
4175 <dd class="description">Size of hostname buffer</dd>
4176 <dt>port</dt>
4177 <dd class="description">Port number to use</dd>
4178 <dt>resource</dt>
4179 <dd class="description">Resource/filename</dd>
4180 <dt>resourcelen</dt>
4181 <dd class="description">Size of resource buffer</dd>
4182 </dl>
4183 <h4 class="returnvalue">Return Value</h4>
4184 <p class="description">Separate a Universal Resource Identifier into its
4185 components.</p>
4186 <p class="discussion">This function is deprecated; use the httpSeparateURI() function instead.
4187
4188
4189 </p>
4190 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpSeparateURI">httpSeparateURI</a></h3>
4191 <p class="description">Separate a Universal Resource Identifier into its
4192 components.</p>
4193 <p class="code">
4194 <a href="#http_uri_status_t">http_uri_status_t</a> httpSeparateURI (<br>
4195 &#160;&#160;&#160;&#160;<a href="#http_uri_coding_t">http_uri_coding_t</a> decoding,<br>
4196 &#160;&#160;&#160;&#160;const char *uri,<br>
4197 &#160;&#160;&#160;&#160;char *scheme,<br>
4198 &#160;&#160;&#160;&#160;int schemelen,<br>
4199 &#160;&#160;&#160;&#160;char *username,<br>
4200 &#160;&#160;&#160;&#160;int usernamelen,<br>
4201 &#160;&#160;&#160;&#160;char *host,<br>
4202 &#160;&#160;&#160;&#160;int hostlen,<br>
4203 &#160;&#160;&#160;&#160;int *port,<br>
4204 &#160;&#160;&#160;&#160;char *resource,<br>
4205 &#160;&#160;&#160;&#160;int resourcelen<br>
4206 );</p>
4207 <h4 class="parameters">Parameters</h4>
4208 <dl>
4209 <dt>decoding</dt>
4210 <dd class="description">Decoding flags</dd>
4211 <dt>uri</dt>
4212 <dd class="description">Universal Resource Identifier</dd>
4213 <dt>scheme</dt>
4214 <dd class="description">Scheme (http, https, etc.)</dd>
4215 <dt>schemelen</dt>
4216 <dd class="description">Size of scheme buffer</dd>
4217 <dt>username</dt>
4218 <dd class="description">Username</dd>
4219 <dt>usernamelen</dt>
4220 <dd class="description">Size of username buffer</dd>
4221 <dt>host</dt>
4222 <dd class="description">Hostname</dd>
4223 <dt>hostlen</dt>
4224 <dd class="description">Size of hostname buffer</dd>
4225 <dt>port</dt>
4226 <dd class="description">Port number to use</dd>
4227 <dt>resource</dt>
4228 <dd class="description">Resource/filename</dd>
4229 <dt>resourcelen</dt>
4230 <dd class="description">Size of resource buffer</dd>
4231 </dl>
4232 <h4 class="returnvalue">Return Value</h4>
4233 <p class="description">Result of separation</p>
4234 <h3 class="function"><a id="httpSetAuthString">httpSetAuthString</a></h3>
4235 <p class="description">Always do encryption via SSL.</p>
4236 <p class="code">
4237 void httpSetAuthString (<br>
4238 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
4239 &#160;&#160;&#160;&#160;const char *scheme,<br>
4240 &#160;&#160;&#160;&#160;const char *data<br>
4241 );</p>
4242 <h4 class="parameters">Parameters</h4>
4243 <dl>
4244 <dt>http</dt>
4245 <dd class="description">HTTP connection</dd>
4246 <dt>scheme</dt>
4247 <dd class="description">Auth scheme (NULL to clear it)</dd>
4248 <dt>data</dt>
4249 <dd class="description">Auth data (NULL for none)</dd>
4250 </dl>
4251 <h4 class="returnvalue">Return Value</h4>
4252 <p class="description">Set the current authorization string.</p>
4253 <p class="discussion">This function just stores a copy of the current authorization string in
4254 the HTTP connection object. You must still call httpSetField() to set
4255 HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
4256 httpHead(), httpOptions(), httpPost, or httpPut().
4257
4258 </p>
4259 <h3 class="function"><a id="httpSetCookie">httpSetCookie</a></h3>
4260 <p class="description">Array of credentials</p>
4261 <p class="code">
4262 void httpSetCookie (<br>
4263 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
4264 &#160;&#160;&#160;&#160;const char *cookie<br>
4265 );</p>
4266 <h4 class="parameters">Parameters</h4>
4267 <dl>
4268 <dt>http</dt>
4269 <dd class="description">Connection</dd>
4270 <dt>cookie</dt>
4271 <dd class="description">Cookie string</dd>
4272 </dl>
4273 <h4 class="returnvalue">Return Value</h4>
4274 <p class="description">Set the cookie value(s).</p>
4275 <p class="discussion"></p>
4276 <h3 class="function"><span class="info">&#160;CUPS 1.5/macOS 10.7&#160;</span><a id="httpSetCredentials">httpSetCredentials</a></h3>
4277 <p class="description">Set the credentials associated with an encrypted
4278 connection.</p>
4279 <p class="code">
4280 int httpSetCredentials (<br>
4281 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
4282 &#160;&#160;&#160;&#160;cups_array_t *credentials<br>
4283 );</p>
4284 <h4 class="parameters">Parameters</h4>
4285 <dl>
4286 <dt>http</dt>
4287 <dd class="description">HTTP connection</dd>
4288 <dt>credentials</dt>
4289 <dd class="description">Array of credentials</dd>
4290 </dl>
4291 <h4 class="returnvalue">Return Value</h4>
4292 <p class="description">Status of call (0 = success)</p>
4293 <h3 class="function"><a id="httpSetDefaultField">httpSetDefaultField</a></h3>
4294 <p class="description">Cookie string</p>
4295 <p class="code">
4296 void httpSetDefaultField (<br>
4297 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
4298 &#160;&#160;&#160;&#160;<a href="#http_field_t">http_field_t</a> field,<br>
4299 &#160;&#160;&#160;&#160;const char *value<br>
4300 );</p>
4301 <h4 class="parameters">Parameters</h4>
4302 <dl>
4303 <dt>http</dt>
4304 <dd class="description">HTTP connection</dd>
4305 <dt>field</dt>
4306 <dd class="description">Field index</dd>
4307 <dt>value</dt>
4308 <dd class="description">Value</dd>
4309 </dl>
4310 <h4 class="returnvalue">Return Value</h4>
4311 <p class="description">Set the default value of an HTTP header.</p>
4312 <p class="discussion">Currently only <code>HTTP_FIELD_ACCEPT_ENCODING</code>, <code>HTTP_FIELD_SERVER</code>,
4313 and <code>HTTP_FIELD_USER_AGENT</code> can be set.
4314
4315 </p>
4316 <h3 class="function"><a id="httpSetExpect">httpSetExpect</a></h3>
4317 <p class="description">Value</p>
4318 <p class="code">
4319 void httpSetExpect (<br>
4320 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
4321 &#160;&#160;&#160;&#160;http_status_t expect<br>
4322 );</p>
4323 <h4 class="parameters">Parameters</h4>
4324 <dl>
4325 <dt>http</dt>
4326 <dd class="description">HTTP connection</dd>
4327 <dt>expect</dt>
4328 <dd class="description">HTTP status to expect
4329 (<code>HTTP_STATUS_CONTINUE</code>)</dd>
4330 </dl>
4331 <h4 class="returnvalue">Return Value</h4>
4332 <p class="description">Set the Expect: header in a request.</p>
4333 <p class="discussion">Currently only <code>HTTP_STATUS_CONTINUE</code> is supported for the &quot;expect&quot;
4334 argument.
4335
4336 </p>
4337 <h3 class="function"><a id="httpSetField">httpSetField</a></h3>
4338 <p class="description">HTTP status to expect
4339 (<code>HTTP_STATUS_CONTINUE</code>)</p>
4340 <p class="code">
4341 void httpSetField (<br>
4342 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
4343 &#160;&#160;&#160;&#160;<a href="#http_field_t">http_field_t</a> field,<br>
4344 &#160;&#160;&#160;&#160;const char *value<br>
4345 );</p>
4346 <h4 class="parameters">Parameters</h4>
4347 <dl>
4348 <dt>http</dt>
4349 <dd class="description">HTTP connection</dd>
4350 <dt>field</dt>
4351 <dd class="description">Field index</dd>
4352 <dt>value</dt>
4353 <dd class="description">Value</dd>
4354 </dl>
4355 <h4 class="returnvalue">Return Value</h4>
4356 <p class="description">Set the value of an HTTP header.</p>
4357 <h3 class="function"><a id="httpSetKeepAlive">httpSetKeepAlive</a></h3>
4358 <p class="description">Check for a trailing dot on the hostname...</p>
4359 <p class="code">
4360 void httpSetKeepAlive (<br>
4361 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
4362 &#160;&#160;&#160;&#160;<a href="#http_keepalive_t">http_keepalive_t</a> keep_alive<br>
4363 );</p>
4364 <h4 class="parameters">Parameters</h4>
4365 <dl>
4366 <dt>http</dt>
4367 <dd class="description">HTTP connection</dd>
4368 <dt>keep_alive</dt>
4369 <dd class="description">New Keep-Alive value</dd>
4370 </dl>
4371 <h4 class="returnvalue">Return Value</h4>
4372 <p class="description">Set the current Keep-Alive state of a connection.</p>
4373 <p class="discussion"></p>
4374 <h3 class="function"><a id="httpSetLength">httpSetLength</a></h3>
4375 <p class="description">New Keep-Alive value</p>
4376 <p class="code">
4377 void httpSetLength (<br>
4378 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
4379 &#160;&#160;&#160;&#160;size_t length<br>
4380 );</p>
4381 <h4 class="parameters">Parameters</h4>
4382 <dl>
4383 <dt>http</dt>
4384 <dd class="description">HTTP connection</dd>
4385 <dt>length</dt>
4386 <dd class="description">Length (0 for chunked)</dd>
4387 </dl>
4388 <h4 class="returnvalue">Return Value</h4>
4389 <p class="description">Set the content-length and content-encoding.</p>
4390 <p class="discussion"></p>
4391 <h3 class="function"><a id="httpSetTimeout">httpSetTimeout</a></h3>
4392 <p class="description">Length (0 for chunked)</p>
4393 <p class="code">
4394 void httpSetTimeout (<br>
4395 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
4396 &#160;&#160;&#160;&#160;double timeout,<br>
4397 &#160;&#160;&#160;&#160;<a href="#http_timeout_cb_t">http_timeout_cb_t</a> cb,<br>
4398 &#160;&#160;&#160;&#160;void *user_data<br>
4399 );</p>
4400 <h4 class="parameters">Parameters</h4>
4401 <dl>
4402 <dt>http</dt>
4403 <dd class="description">HTTP connection</dd>
4404 <dt>timeout</dt>
4405 <dd class="description">Number of seconds for timeout,
4406 must be greater than 0</dd>
4407 <dt>cb</dt>
4408 <dd class="description">Callback function or NULL</dd>
4409 <dt>user_data</dt>
4410 <dd class="description">User data pointer</dd>
4411 </dl>
4412 <h4 class="returnvalue">Return Value</h4>
4413 <p class="description">Set read/write timeouts and an optional callback.</p>
4414 <p class="discussion">The optional timeout callback receives both the HTTP connection and a user
4415 data pointer and must return 1 to continue or 0 to error (time) out.
4416
4417 </p>
4418 <h3 class="function"><a id="httpShutdown">httpShutdown</a></h3>
4419 <p class="description">User data pointer</p>
4420 <p class="code">
4421 void httpShutdown (<br>
4422 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
4423 );</p>
4424 <h4 class="parameters">Parameters</h4>
4425 <dl>
4426 <dt>http</dt>
4427 <dd class="description">HTTP connection</dd>
4428 </dl>
4429 <h4 class="returnvalue">Return Value</h4>
4430 <p class="description">Shutdown one side of an HTTP connection.</p>
4431 <p class="discussion"></p>
4432 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpStateString">httpStateString</a></h3>
4433 <p class="description">Return the string describing a HTTP state value.</p>
4434 <p class="code">
4435 const char *httpStateString (<br>
4436 &#160;&#160;&#160;&#160;<a href="#http_state_t">http_state_t</a> state<br>
4437 );</p>
4438 <h4 class="parameters">Parameters</h4>
4439 <dl>
4440 <dt>state</dt>
4441 <dd class="description">HTTP state value</dd>
4442 </dl>
4443 <h4 class="returnvalue">Return Value</h4>
4444 <p class="description">State string</p>
4445 <h3 class="function"><a id="httpStatus">httpStatus</a></h3>
4446 <p class="description">Return a short string describing a HTTP status code.</p>
4447 <p class="code">
4448 const char *httpStatus (<br>
4449 &#160;&#160;&#160;&#160;http_status_t status<br>
4450 );</p>
4451 <h4 class="parameters">Parameters</h4>
4452 <dl>
4453 <dt>status</dt>
4454 <dd class="description">HTTP status code</dd>
4455 </dl>
4456 <h4 class="returnvalue">Return Value</h4>
4457 <p class="description">Localized status string</p>
4458 <h4 class="discussion">Discussion</h4>
4459 <p class="discussion">The returned string is localized to the current POSIX locale and is based
4460 on the status strings defined in RFC 2616.</p>
4461 <h3 class="function"><a id="httpTrace">httpTrace</a></h3>
4462 <p class="description">Send an TRACE request to the server.</p>
4463 <p class="code">
4464 int httpTrace (<br>
4465 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
4466 &#160;&#160;&#160;&#160;const char *uri<br>
4467 );</p>
4468 <h4 class="parameters">Parameters</h4>
4469 <dl>
4470 <dt>http</dt>
4471 <dd class="description">HTTP connection</dd>
4472 <dt>uri</dt>
4473 <dd class="description">URI for trace</dd>
4474 </dl>
4475 <h4 class="returnvalue">Return Value</h4>
4476 <p class="description">Status of call (0 = success)</p>
4477 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="httpURIStatusString">httpURIStatusString</a></h3>
4478 <p class="description">Return a string describing a URI status code.</p>
4479 <p class="code">
4480 const char *httpURIStatusString (<br>
4481 &#160;&#160;&#160;&#160;<a href="#http_uri_status_t">http_uri_status_t</a> status<br>
4482 );</p>
4483 <h4 class="parameters">Parameters</h4>
4484 <dl>
4485 <dt>status</dt>
4486 <dd class="description">URI status code</dd>
4487 </dl>
4488 <h4 class="returnvalue">Return Value</h4>
4489 <p class="description">Localized status string</p>
4490 <h3 class="function"><a id="httpUpdate">httpUpdate</a></h3>
4491 <p class="description">Update the current HTTP state for incoming data.</p>
4492 <p class="code">
4493 http_status_t httpUpdate (<br>
4494 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http<br>
4495 );</p>
4496 <h4 class="parameters">Parameters</h4>
4497 <dl>
4498 <dt>http</dt>
4499 <dd class="description">HTTP connection</dd>
4500 </dl>
4501 <h4 class="returnvalue">Return Value</h4>
4502 <p class="description">HTTP status</p>
4503 <h3 class="function"><span class="info">&#160;CUPS 1.1.19/macOS 10.3&#160;</span><a id="httpWait">httpWait</a></h3>
4504 <p class="description">Wait for data available on a connection.</p>
4505 <p class="code">
4506 int httpWait (<br>
4507 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
4508 &#160;&#160;&#160;&#160;int msec<br>
4509 );</p>
4510 <h4 class="parameters">Parameters</h4>
4511 <dl>
4512 <dt>http</dt>
4513 <dd class="description">HTTP connection</dd>
4514 <dt>msec</dt>
4515 <dd class="description">Milliseconds to wait</dd>
4516 </dl>
4517 <h4 class="returnvalue">Return Value</h4>
4518 <p class="description">1 if data is available, 0 otherwise</p>
4519 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="httpWrite2">httpWrite2</a></h3>
4520 <p class="description">Write data to a HTTP connection.</p>
4521 <p class="code">
4522 ssize_t httpWrite2 (<br>
4523 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
4524 &#160;&#160;&#160;&#160;const char *buffer,<br>
4525 &#160;&#160;&#160;&#160;size_t length<br>
4526 );</p>
4527 <h4 class="parameters">Parameters</h4>
4528 <dl>
4529 <dt>http</dt>
4530 <dd class="description">HTTP connection</dd>
4531 <dt>buffer</dt>
4532 <dd class="description">Buffer for data</dd>
4533 <dt>length</dt>
4534 <dd class="description">Number of bytes to write</dd>
4535 </dl>
4536 <h4 class="returnvalue">Return Value</h4>
4537 <p class="description">Number of bytes written</p>
4538 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="httpWriteResponse">httpWriteResponse</a></h3>
4539 <p class="description">Write a HTTP response to a client connection.</p>
4540 <p class="code">
4541 int httpWriteResponse (<br>
4542 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
4543 &#160;&#160;&#160;&#160;http_status_t status<br>
4544 );</p>
4545 <h4 class="parameters">Parameters</h4>
4546 <dl>
4547 <dt>http</dt>
4548 <dd class="description">HTTP connection</dd>
4549 <dt>status</dt>
4550 <dd class="description">Status code</dd>
4551 </dl>
4552 <h4 class="returnvalue">Return Value</h4>
4553 <p class="description">0 on success, -1 on error</p>
4554 <h3 class="function"><a id="ippAddBoolean">ippAddBoolean</a></h3>
4555 <p class="description">Add a boolean attribute to an IPP message.</p>
4556 <p class="code">
4557 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddBoolean (<br>
4558 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4559 &#160;&#160;&#160;&#160;ipp_tag_t group,<br>
4560 &#160;&#160;&#160;&#160;const char *name,<br>
4561 &#160;&#160;&#160;&#160;char value<br>
4562 );</p>
4563 <h4 class="parameters">Parameters</h4>
4564 <dl>
4565 <dt>ipp</dt>
4566 <dd class="description">IPP message</dd>
4567 <dt>group</dt>
4568 <dd class="description">IPP group</dd>
4569 <dt>name</dt>
4570 <dd class="description">Name of attribute</dd>
4571 <dt>value</dt>
4572 <dd class="description">Value of attribute</dd>
4573 </dl>
4574 <h4 class="returnvalue">Return Value</h4>
4575 <p class="description">New attribute</p>
4576 <h4 class="discussion">Discussion</h4>
4577 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4578 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>
4579 <br>
4580 The <code>group</code> parameter specifies the IPP attribute group tag: none
4581 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
4582 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
4583 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
4584 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
4585 <h3 class="function"><a id="ippAddBooleans">ippAddBooleans</a></h3>
4586 <p class="description">Add an array of boolean values.</p>
4587 <p class="code">
4588 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddBooleans (<br>
4589 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4590 &#160;&#160;&#160;&#160;ipp_tag_t group,<br>
4591 &#160;&#160;&#160;&#160;const char *name,<br>
4592 &#160;&#160;&#160;&#160;int num_values,<br>
4593 &#160;&#160;&#160;&#160;const char *values<br>
4594 );</p>
4595 <h4 class="parameters">Parameters</h4>
4596 <dl>
4597 <dt>ipp</dt>
4598 <dd class="description">IPP message</dd>
4599 <dt>group</dt>
4600 <dd class="description">IPP group</dd>
4601 <dt>name</dt>
4602 <dd class="description">Name of attribute</dd>
4603 <dt>num_values</dt>
4604 <dd class="description">Number of values</dd>
4605 <dt>values</dt>
4606 <dd class="description">Values</dd>
4607 </dl>
4608 <h4 class="returnvalue">Return Value</h4>
4609 <p class="description">New attribute</p>
4610 <h4 class="discussion">Discussion</h4>
4611 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4612 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>
4613 <br>
4614 The <code>group</code> parameter specifies the IPP attribute group tag: none
4615 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
4616 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
4617 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
4618 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
4619 <h3 class="function"><span class="info">&#160;CUPS 1.1.19/macOS 10.3&#160;</span><a id="ippAddCollection">ippAddCollection</a></h3>
4620 <p class="description">Add a collection value.</p>
4621 <p class="code">
4622 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddCollection (<br>
4623 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4624 &#160;&#160;&#160;&#160;ipp_tag_t group,<br>
4625 &#160;&#160;&#160;&#160;const char *name,<br>
4626 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *value<br>
4627 );</p>
4628 <h4 class="parameters">Parameters</h4>
4629 <dl>
4630 <dt>ipp</dt>
4631 <dd class="description">IPP message</dd>
4632 <dt>group</dt>
4633 <dd class="description">IPP group</dd>
4634 <dt>name</dt>
4635 <dd class="description">Name of attribute</dd>
4636 <dt>value</dt>
4637 <dd class="description">Value</dd>
4638 </dl>
4639 <h4 class="returnvalue">Return Value</h4>
4640 <p class="description">New attribute</p>
4641 <h4 class="discussion">Discussion</h4>
4642 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4643 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>
4644 <br>
4645 The <code>group</code> parameter specifies the IPP attribute group tag: none
4646 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
4647 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
4648 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
4649 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).
4650
4651 </p>
4652 <h3 class="function"><span class="info">&#160;CUPS 1.1.19/macOS 10.3&#160;</span><a id="ippAddCollections">ippAddCollections</a></h3>
4653 <p class="description">Add an array of collection values.</p>
4654 <p class="code">
4655 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddCollections (<br>
4656 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4657 &#160;&#160;&#160;&#160;ipp_tag_t group,<br>
4658 &#160;&#160;&#160;&#160;const char *name,<br>
4659 &#160;&#160;&#160;&#160;int num_values,<br>
4660 &#160;&#160;&#160;&#160;const <a href="#ipp_t">ipp_t</a> **values<br>
4661 );</p>
4662 <h4 class="parameters">Parameters</h4>
4663 <dl>
4664 <dt>ipp</dt>
4665 <dd class="description">IPP message</dd>
4666 <dt>group</dt>
4667 <dd class="description">IPP group</dd>
4668 <dt>name</dt>
4669 <dd class="description">Name of attribute</dd>
4670 <dt>num_values</dt>
4671 <dd class="description">Number of values</dd>
4672 <dt>values</dt>
4673 <dd class="description">Values</dd>
4674 </dl>
4675 <h4 class="returnvalue">Return Value</h4>
4676 <p class="description">New attribute</p>
4677 <h4 class="discussion">Discussion</h4>
4678 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4679 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>
4680 <br>
4681 The <code>group</code> parameter specifies the IPP attribute group tag: none
4682 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
4683 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
4684 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
4685 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).
4686
4687 </p>
4688 <h3 class="function"><a id="ippAddDate">ippAddDate</a></h3>
4689 <p class="description">Add a date attribute to an IPP message.</p>
4690 <p class="code">
4691 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddDate (<br>
4692 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4693 &#160;&#160;&#160;&#160;ipp_tag_t group,<br>
4694 &#160;&#160;&#160;&#160;const char *name,<br>
4695 &#160;&#160;&#160;&#160;const <a href="#ipp_uchar_t">ipp_uchar_t</a> *value<br>
4696 );</p>
4697 <h4 class="parameters">Parameters</h4>
4698 <dl>
4699 <dt>ipp</dt>
4700 <dd class="description">IPP message</dd>
4701 <dt>group</dt>
4702 <dd class="description">IPP group</dd>
4703 <dt>name</dt>
4704 <dd class="description">Name of attribute</dd>
4705 <dt>value</dt>
4706 <dd class="description">Value</dd>
4707 </dl>
4708 <h4 class="returnvalue">Return Value</h4>
4709 <p class="description">New attribute</p>
4710 <h4 class="discussion">Discussion</h4>
4711 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4712 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>
4713 <br>
4714 The <code>group</code> parameter specifies the IPP attribute group tag: none
4715 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
4716 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
4717 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
4718 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
4719 <h3 class="function"><a id="ippAddInteger">ippAddInteger</a></h3>
4720 <p class="description">Add a integer attribute to an IPP message.</p>
4721 <p class="code">
4722 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddInteger (<br>
4723 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4724 &#160;&#160;&#160;&#160;ipp_tag_t group,<br>
4725 &#160;&#160;&#160;&#160;ipp_tag_t value_tag,<br>
4726 &#160;&#160;&#160;&#160;const char *name,<br>
4727 &#160;&#160;&#160;&#160;int value<br>
4728 );</p>
4729 <h4 class="parameters">Parameters</h4>
4730 <dl>
4731 <dt>ipp</dt>
4732 <dd class="description">IPP message</dd>
4733 <dt>group</dt>
4734 <dd class="description">IPP group</dd>
4735 <dt>value_tag</dt>
4736 <dd class="description">Type of attribute</dd>
4737 <dt>name</dt>
4738 <dd class="description">Name of attribute</dd>
4739 <dt>value</dt>
4740 <dd class="description">Value of attribute</dd>
4741 </dl>
4742 <h4 class="returnvalue">Return Value</h4>
4743 <p class="description">New attribute</p>
4744 <h4 class="discussion">Discussion</h4>
4745 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4746 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>
4747 <br>
4748 The <code>group</code> parameter specifies the IPP attribute group tag: none
4749 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
4750 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
4751 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
4752 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
4753 <br>
4754 Supported values include enum (<code>IPP_TAG_ENUM</code>) and integer
4755 (<code>IPP_TAG_INTEGER</code>).</p>
4756 <h3 class="function"><a id="ippAddIntegers">ippAddIntegers</a></h3>
4757 <p class="description">Add an array of integer values.</p>
4758 <p class="code">
4759 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddIntegers (<br>
4760 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4761 &#160;&#160;&#160;&#160;ipp_tag_t group,<br>
4762 &#160;&#160;&#160;&#160;ipp_tag_t value_tag,<br>
4763 &#160;&#160;&#160;&#160;const char *name,<br>
4764 &#160;&#160;&#160;&#160;int num_values,<br>
4765 &#160;&#160;&#160;&#160;const int *values<br>
4766 );</p>
4767 <h4 class="parameters">Parameters</h4>
4768 <dl>
4769 <dt>ipp</dt>
4770 <dd class="description">IPP message</dd>
4771 <dt>group</dt>
4772 <dd class="description">IPP group</dd>
4773 <dt>value_tag</dt>
4774 <dd class="description">Type of attribute</dd>
4775 <dt>name</dt>
4776 <dd class="description">Name of attribute</dd>
4777 <dt>num_values</dt>
4778 <dd class="description">Number of values</dd>
4779 <dt>values</dt>
4780 <dd class="description">Values</dd>
4781 </dl>
4782 <h4 class="returnvalue">Return Value</h4>
4783 <p class="description">New attribute</p>
4784 <h4 class="discussion">Discussion</h4>
4785 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4786 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>
4787 <br>
4788 The <code>group</code> parameter specifies the IPP attribute group tag: none
4789 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
4790 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
4791 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
4792 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
4793 <br>
4794 Supported values include enum (<code>IPP_TAG_ENUM</code>) and integer
4795 (<code>IPP_TAG_INTEGER</code>).</p>
4796 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="ippAddOctetString">ippAddOctetString</a></h3>
4797 <p class="description">Add an octetString value to an IPP message.</p>
4798 <p class="code">
4799 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddOctetString (<br>
4800 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4801 &#160;&#160;&#160;&#160;ipp_tag_t group,<br>
4802 &#160;&#160;&#160;&#160;const char *name,<br>
4803 &#160;&#160;&#160;&#160;const void *data,<br>
4804 &#160;&#160;&#160;&#160;int datalen<br>
4805 );</p>
4806 <h4 class="parameters">Parameters</h4>
4807 <dl>
4808 <dt>ipp</dt>
4809 <dd class="description">IPP message</dd>
4810 <dt>group</dt>
4811 <dd class="description">IPP group</dd>
4812 <dt>name</dt>
4813 <dd class="description">Name of attribute</dd>
4814 <dt>data</dt>
4815 <dd class="description">octetString data</dd>
4816 <dt>datalen</dt>
4817 <dd class="description">Length of data in bytes</dd>
4818 </dl>
4819 <h4 class="returnvalue">Return Value</h4>
4820 <p class="description">New attribute</p>
4821 <h4 class="discussion">Discussion</h4>
4822 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4823 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>
4824 <br>
4825 The <code>group</code> parameter specifies the IPP attribute group tag: none
4826 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
4827 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
4828 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
4829 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).
4830
4831 </p>
4832 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippAddOutOfBand">ippAddOutOfBand</a></h3>
4833 <p class="description">Add an out-of-band value to an IPP message.</p>
4834 <p class="code">
4835 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddOutOfBand (<br>
4836 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4837 &#160;&#160;&#160;&#160;ipp_tag_t group,<br>
4838 &#160;&#160;&#160;&#160;ipp_tag_t value_tag,<br>
4839 &#160;&#160;&#160;&#160;const char *name<br>
4840 );</p>
4841 <h4 class="parameters">Parameters</h4>
4842 <dl>
4843 <dt>ipp</dt>
4844 <dd class="description">IPP message</dd>
4845 <dt>group</dt>
4846 <dd class="description">IPP group</dd>
4847 <dt>value_tag</dt>
4848 <dd class="description">Type of attribute</dd>
4849 <dt>name</dt>
4850 <dd class="description">Name of attribute</dd>
4851 </dl>
4852 <h4 class="returnvalue">Return Value</h4>
4853 <p class="description">New attribute</p>
4854 <h4 class="discussion">Discussion</h4>
4855 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4856 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>
4857 <br>
4858 The <code>group</code> parameter specifies the IPP attribute group tag: none
4859 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
4860 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
4861 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
4862 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
4863 <br>
4864 Supported out-of-band values include unsupported-value
4865 (<code>IPP_TAG_UNSUPPORTED_VALUE</code>), default (<code>IPP_TAG_DEFAULT</code>), unknown
4866 (<code>IPP_TAG_UNKNOWN</code>), no-value (<code>IPP_TAG_NOVALUE</code>), not-settable
4867 (<code>IPP_TAG_NOTSETTABLE</code>), delete-attribute (<code>IPP_TAG_DELETEATTR</code>), and
4868 admin-define (<code>IPP_TAG_ADMINDEFINE</code>).
4869
4870 </p>
4871 <h3 class="function"><a id="ippAddRange">ippAddRange</a></h3>
4872 <p class="description">Add a range of values to an IPP message.</p>
4873 <p class="code">
4874 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddRange (<br>
4875 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4876 &#160;&#160;&#160;&#160;ipp_tag_t group,<br>
4877 &#160;&#160;&#160;&#160;const char *name,<br>
4878 &#160;&#160;&#160;&#160;int lower,<br>
4879 &#160;&#160;&#160;&#160;int upper<br>
4880 );</p>
4881 <h4 class="parameters">Parameters</h4>
4882 <dl>
4883 <dt>ipp</dt>
4884 <dd class="description">IPP message</dd>
4885 <dt>group</dt>
4886 <dd class="description">IPP group</dd>
4887 <dt>name</dt>
4888 <dd class="description">Name of attribute</dd>
4889 <dt>lower</dt>
4890 <dd class="description">Lower value</dd>
4891 <dt>upper</dt>
4892 <dd class="description">Upper value</dd>
4893 </dl>
4894 <h4 class="returnvalue">Return Value</h4>
4895 <p class="description">New attribute</p>
4896 <h4 class="discussion">Discussion</h4>
4897 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4898 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>
4899 <br>
4900 The <code>group</code> parameter specifies the IPP attribute group tag: none
4901 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
4902 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
4903 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
4904 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
4905 <br>
4906 The <code>lower</code> parameter must be less than or equal to the <code>upper</code> parameter.</p>
4907 <h3 class="function"><a id="ippAddRanges">ippAddRanges</a></h3>
4908 <p class="description">Add ranges of values to an IPP message.</p>
4909 <p class="code">
4910 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddRanges (<br>
4911 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4912 &#160;&#160;&#160;&#160;ipp_tag_t group,<br>
4913 &#160;&#160;&#160;&#160;const char *name,<br>
4914 &#160;&#160;&#160;&#160;int num_values,<br>
4915 &#160;&#160;&#160;&#160;const int *lower,<br>
4916 &#160;&#160;&#160;&#160;const int *upper<br>
4917 );</p>
4918 <h4 class="parameters">Parameters</h4>
4919 <dl>
4920 <dt>ipp</dt>
4921 <dd class="description">IPP message</dd>
4922 <dt>group</dt>
4923 <dd class="description">IPP group</dd>
4924 <dt>name</dt>
4925 <dd class="description">Name of attribute</dd>
4926 <dt>num_values</dt>
4927 <dd class="description">Number of values</dd>
4928 <dt>lower</dt>
4929 <dd class="description">Lower values</dd>
4930 <dt>upper</dt>
4931 <dd class="description">Upper values</dd>
4932 </dl>
4933 <h4 class="returnvalue">Return Value</h4>
4934 <p class="description">New attribute</p>
4935 <h4 class="discussion">Discussion</h4>
4936 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4937 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>
4938 <br>
4939 The <code>group</code> parameter specifies the IPP attribute group tag: none
4940 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
4941 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
4942 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
4943 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
4944 <h3 class="function"><a id="ippAddResolution">ippAddResolution</a></h3>
4945 <p class="description">Add a resolution value to an IPP message.</p>
4946 <p class="code">
4947 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddResolution (<br>
4948 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4949 &#160;&#160;&#160;&#160;ipp_tag_t group,<br>
4950 &#160;&#160;&#160;&#160;const char *name,<br>
4951 &#160;&#160;&#160;&#160;<a href="#ipp_res_t">ipp_res_t</a> units,<br>
4952 &#160;&#160;&#160;&#160;int xres,<br>
4953 &#160;&#160;&#160;&#160;int yres<br>
4954 );</p>
4955 <h4 class="parameters">Parameters</h4>
4956 <dl>
4957 <dt>ipp</dt>
4958 <dd class="description">IPP message</dd>
4959 <dt>group</dt>
4960 <dd class="description">IPP group</dd>
4961 <dt>name</dt>
4962 <dd class="description">Name of attribute</dd>
4963 <dt>units</dt>
4964 <dd class="description">Units for resolution</dd>
4965 <dt>xres</dt>
4966 <dd class="description">X resolution</dd>
4967 <dt>yres</dt>
4968 <dd class="description">Y resolution</dd>
4969 </dl>
4970 <h4 class="returnvalue">Return Value</h4>
4971 <p class="description">New attribute</p>
4972 <h4 class="discussion">Discussion</h4>
4973 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4974 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>
4975 <br>
4976 The <code>group</code> parameter specifies the IPP attribute group tag: none
4977 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
4978 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
4979 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
4980 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
4981 <h3 class="function"><a id="ippAddResolutions">ippAddResolutions</a></h3>
4982 <p class="description">Add resolution values to an IPP message.</p>
4983 <p class="code">
4984 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddResolutions (<br>
4985 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4986 &#160;&#160;&#160;&#160;ipp_tag_t group,<br>
4987 &#160;&#160;&#160;&#160;const char *name,<br>
4988 &#160;&#160;&#160;&#160;int num_values,<br>
4989 &#160;&#160;&#160;&#160;<a href="#ipp_res_t">ipp_res_t</a> units,<br>
4990 &#160;&#160;&#160;&#160;const int *xres,<br>
4991 &#160;&#160;&#160;&#160;const int *yres<br>
4992 );</p>
4993 <h4 class="parameters">Parameters</h4>
4994 <dl>
4995 <dt>ipp</dt>
4996 <dd class="description">IPP message</dd>
4997 <dt>group</dt>
4998 <dd class="description">IPP group</dd>
4999 <dt>name</dt>
5000 <dd class="description">Name of attribute</dd>
5001 <dt>num_values</dt>
5002 <dd class="description">Number of values</dd>
5003 <dt>units</dt>
5004 <dd class="description">Units for resolution</dd>
5005 <dt>xres</dt>
5006 <dd class="description">X resolutions</dd>
5007 <dt>yres</dt>
5008 <dd class="description">Y resolutions</dd>
5009 </dl>
5010 <h4 class="returnvalue">Return Value</h4>
5011 <p class="description">New attribute</p>
5012 <h4 class="discussion">Discussion</h4>
5013 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5014 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>
5015 <br>
5016 The <code>group</code> parameter specifies the IPP attribute group tag: none
5017 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
5018 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
5019 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
5020 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
5021 <h3 class="function"><a id="ippAddSeparator">ippAddSeparator</a></h3>
5022 <p class="description">Add a group separator to an IPP message.</p>
5023 <p class="code">
5024 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddSeparator (<br>
5025 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br>
5026 );</p>
5027 <h4 class="parameters">Parameters</h4>
5028 <dl>
5029 <dt>ipp</dt>
5030 <dd class="description">IPP message</dd>
5031 </dl>
5032 <h4 class="returnvalue">Return Value</h4>
5033 <p class="description">New attribute</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.</p>
5037 <h3 class="function"><a id="ippAddString">ippAddString</a></h3>
5038 <p class="description">Add a language-encoded string to an IPP message.</p>
5039 <p class="code">
5040 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddString (<br>
5041 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
5042 &#160;&#160;&#160;&#160;ipp_tag_t group,<br>
5043 &#160;&#160;&#160;&#160;ipp_tag_t value_tag,<br>
5044 &#160;&#160;&#160;&#160;const char *name,<br>
5045 &#160;&#160;&#160;&#160;const char *language,<br>
5046 &#160;&#160;&#160;&#160;const char *value<br>
5047 );</p>
5048 <h4 class="parameters">Parameters</h4>
5049 <dl>
5050 <dt>ipp</dt>
5051 <dd class="description">IPP message</dd>
5052 <dt>group</dt>
5053 <dd class="description">IPP group</dd>
5054 <dt>value_tag</dt>
5055 <dd class="description">Type of attribute</dd>
5056 <dt>name</dt>
5057 <dd class="description">Name of attribute</dd>
5058 <dt>language</dt>
5059 <dd class="description">Language code</dd>
5060 <dt>value</dt>
5061 <dd class="description">Value</dd>
5062 </dl>
5063 <h4 class="returnvalue">Return Value</h4>
5064 <p class="description">New attribute</p>
5065 <h4 class="discussion">Discussion</h4>
5066 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5067 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>
5068 <br>
5069 The <code>group</code> parameter specifies the IPP attribute group tag: none
5070 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
5071 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
5072 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
5073 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
5074 <br>
5075 Supported string values include charset (<code>IPP_TAG_CHARSET</code>), keyword
5076 (<code>IPP_TAG_KEYWORD</code>), language (<code>IPP_TAG_LANGUAGE</code>), mimeMediaType
5077 (<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code>), nameWithLanguage
5078 (<code>IPP_TAG_NAMELANG), text (</code>code IPP_TAG_TEXT@), textWithLanguage
5079 (<code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), and uriScheme
5080 (<code>IPP_TAG_URISCHEME</code>).<br>
5081 <br>
5082 The <code>language</code> parameter must be non-<code>NULL</code> for nameWithLanguage and
5083 textWithLanguage string values and must be <code>NULL</code> for all other string values.</p>
5084 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippAddStringf">ippAddStringf</a></h3>
5085 <p class="description">Add a formatted string to an IPP message.</p>
5086 <p class="code">
5087 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddStringf (<br>
5088 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
5089 &#160;&#160;&#160;&#160;ipp_tag_t group,<br>
5090 &#160;&#160;&#160;&#160;ipp_tag_t value_tag,<br>
5091 &#160;&#160;&#160;&#160;const char *name,<br>
5092 &#160;&#160;&#160;&#160;const char *language,<br>
5093 &#160;&#160;&#160;&#160;const char *format,<br>
5094 &#160;&#160;&#160;&#160;...<br>
5095 );</p>
5096 <h4 class="parameters">Parameters</h4>
5097 <dl>
5098 <dt>ipp</dt>
5099 <dd class="description">IPP message</dd>
5100 <dt>group</dt>
5101 <dd class="description">IPP group</dd>
5102 <dt>value_tag</dt>
5103 <dd class="description">Type of attribute</dd>
5104 <dt>name</dt>
5105 <dd class="description">Name of attribute</dd>
5106 <dt>language</dt>
5107 <dd class="description">Language code (<code>NULL</code> for default)</dd>
5108 <dt>format</dt>
5109 <dd class="description">Printf-style format string</dd>
5110 <dt>...</dt>
5111 <dd class="description">Additional arguments as needed</dd>
5112 </dl>
5113 <h4 class="returnvalue">Return Value</h4>
5114 <p class="description">New attribute</p>
5115 <h4 class="discussion">Discussion</h4>
5116 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5117 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>
5118 <br>
5119 The <code>group</code> parameter specifies the IPP attribute group tag: none
5120 (<code>IPP_TAG_ZERO</code>, for member attributes), document
5121 (<code>IPP_TAG_DOCUMENT</code>), event notification
5122 (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation (<code>IPP_TAG_OPERATION</code>),
5123 printer (<code>IPP_TAG_PRINTER</code>), subscription (<code>IPP_TAG_SUBSCRIPTION</code>),
5124 or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
5125 <br>
5126 Supported string values include charset (<code>IPP_TAG_CHARSET</code>), keyword
5127 (<code>IPP_TAG_KEYWORD</code>), language (<code>IPP_TAG_LANGUAGE</code>), mimeMediaType
5128 (<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code>), nameWithLanguage
5129 (<code>IPP_TAG_NAMELANG), text (</code>code IPP_TAG_TEXT@), textWithLanguage
5130 (<code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), and uriScheme
5131 (<code>IPP_TAG_URISCHEME</code>).<br>
5132 <br>
5133 The <code>language</code> parameter must be non-<code>NULL</code> for nameWithLanguage
5134 and textWithLanguage string values and must be <code>NULL</code> for all other
5135 string values.<br>
5136 <br>
5137 The <code>format</code> parameter uses formatting characters compatible with the
5138 printf family of standard functions. Additional arguments follow it as
5139 needed. The formatted string is truncated as needed to the maximum length of
5140 the corresponding value type.
5141
5142 </p>
5143 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippAddStringfv">ippAddStringfv</a></h3>
5144 <p class="description">Add a formatted string to an IPP message.</p>
5145 <p class="code">
5146 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddStringfv (<br>
5147 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
5148 &#160;&#160;&#160;&#160;ipp_tag_t group,<br>
5149 &#160;&#160;&#160;&#160;ipp_tag_t value_tag,<br>
5150 &#160;&#160;&#160;&#160;const char *name,<br>
5151 &#160;&#160;&#160;&#160;const char *language,<br>
5152 &#160;&#160;&#160;&#160;const char *format,<br>
5153 &#160;&#160;&#160;&#160;va_list ap<br>
5154 );</p>
5155 <h4 class="parameters">Parameters</h4>
5156 <dl>
5157 <dt>ipp</dt>
5158 <dd class="description">IPP message</dd>
5159 <dt>group</dt>
5160 <dd class="description">IPP group</dd>
5161 <dt>value_tag</dt>
5162 <dd class="description">Type of attribute</dd>
5163 <dt>name</dt>
5164 <dd class="description">Name of attribute</dd>
5165 <dt>language</dt>
5166 <dd class="description">Language code (<code>NULL</code> for default)</dd>
5167 <dt>format</dt>
5168 <dd class="description">Printf-style format string</dd>
5169 <dt>ap</dt>
5170 <dd class="description">Additional arguments</dd>
5171 </dl>
5172 <h4 class="returnvalue">Return Value</h4>
5173 <p class="description">New attribute</p>
5174 <h4 class="discussion">Discussion</h4>
5175 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5176 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>
5177 <br>
5178 The <code>group</code> parameter specifies the IPP attribute group tag: none
5179 (<code>IPP_TAG_ZERO</code>, for member attributes), document
5180 (<code>IPP_TAG_DOCUMENT</code>), event notification
5181 (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation (<code>IPP_TAG_OPERATION</code>),
5182 printer (<code>IPP_TAG_PRINTER</code>), subscription (<code>IPP_TAG_SUBSCRIPTION</code>),
5183 or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
5184 <br>
5185 Supported string values include charset (<code>IPP_TAG_CHARSET</code>), keyword
5186 (<code>IPP_TAG_KEYWORD</code>), language (<code>IPP_TAG_LANGUAGE</code>), mimeMediaType
5187 (<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code>), nameWithLanguage
5188 (<code>IPP_TAG_NAMELANG), text (</code>code IPP_TAG_TEXT@), textWithLanguage
5189 (<code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), and uriScheme
5190 (<code>IPP_TAG_URISCHEME</code>).<br>
5191 <br>
5192 The <code>language</code> parameter must be non-<code>NULL</code> for nameWithLanguage
5193 and textWithLanguage string values and must be <code>NULL</code> for all other
5194 string values.<br>
5195 <br>
5196 The <code>format</code> parameter uses formatting characters compatible with the
5197 printf family of standard functions. Additional arguments are passed in the
5198 stdarg pointer <code>ap</code>. The formatted string is truncated as needed to the
5199 maximum length of the corresponding value type.
5200
5201 </p>
5202 <h3 class="function"><a id="ippAddStrings">ippAddStrings</a></h3>
5203 <p class="description">Add language-encoded strings to an IPP message.</p>
5204 <p class="code">
5205 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddStrings (<br>
5206 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
5207 &#160;&#160;&#160;&#160;ipp_tag_t group,<br>
5208 &#160;&#160;&#160;&#160;ipp_tag_t value_tag,<br>
5209 &#160;&#160;&#160;&#160;const char *name,<br>
5210 &#160;&#160;&#160;&#160;int num_values,<br>
5211 &#160;&#160;&#160;&#160;const char *language,<br>
5212 &#160;&#160;&#160;&#160;const char *const *values<br>
5213 );</p>
5214 <h4 class="parameters">Parameters</h4>
5215 <dl>
5216 <dt>ipp</dt>
5217 <dd class="description">IPP message</dd>
5218 <dt>group</dt>
5219 <dd class="description">IPP group</dd>
5220 <dt>value_tag</dt>
5221 <dd class="description">Type of attribute</dd>
5222 <dt>name</dt>
5223 <dd class="description">Name of attribute</dd>
5224 <dt>num_values</dt>
5225 <dd class="description">Number of values</dd>
5226 <dt>language</dt>
5227 <dd class="description">Language code (<code>NULL</code> for default)</dd>
5228 <dt>values</dt>
5229 <dd class="description">Values</dd>
5230 </dl>
5231 <h4 class="returnvalue">Return Value</h4>
5232 <p class="description">New attribute</p>
5233 <h4 class="discussion">Discussion</h4>
5234 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5235 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>
5236 <br>
5237 The <code>group</code> parameter specifies the IPP attribute group tag: none
5238 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
5239 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
5240 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
5241 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
5242 <br>
5243 Supported string values include charset (<code>IPP_TAG_CHARSET</code>), keyword
5244 (<code>IPP_TAG_KEYWORD</code>), language (<code>IPP_TAG_LANGUAGE</code>), mimeMediaType
5245 (<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code>), nameWithLanguage
5246 (<code>IPP_TAG_NAMELANG), text (</code>code IPP_TAG_TEXT@), textWithLanguage
5247 (<code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), and uriScheme
5248 (<code>IPP_TAG_URISCHEME</code>).<br>
5249 <br>
5250 The <code>language</code> parameter must be non-<code>NULL</code> for nameWithLanguage and
5251 textWithLanguage string values and must be <code>NULL</code> for all other string values.</p>
5252 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippAttributeString">ippAttributeString</a></h3>
5253 <p class="description">Convert the attribute's value to a string.</p>
5254 <p class="code">
5255 size_t ippAttributeString (<br>
5256 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
5257 &#160;&#160;&#160;&#160;char *buffer,<br>
5258 &#160;&#160;&#160;&#160;size_t bufsize<br>
5259 );</p>
5260 <h4 class="parameters">Parameters</h4>
5261 <dl>
5262 <dt>attr</dt>
5263 <dd class="description">Attribute</dd>
5264 <dt>buffer</dt>
5265 <dd class="description">String buffer or NULL</dd>
5266 <dt>bufsize</dt>
5267 <dd class="description">Size of string buffer</dd>
5268 </dl>
5269 <h4 class="returnvalue">Return Value</h4>
5270 <p class="description">Number of bytes less nul</p>
5271 <h4 class="discussion">Discussion</h4>
5272 <p class="discussion">Returns the number of bytes that would be written, not including the
5273 trailing nul. The buffer pointer can be NULL to get the required length,
5274 just like (v)snprintf.
5275
5276 </p>
5277 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippContainsInteger">ippContainsInteger</a></h3>
5278 <p class="description">Determine whether an attribute contains the
5279 specified value or is within the list of ranges.</p>
5280 <p class="code">
5281 int ippContainsInteger (<br>
5282 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
5283 &#160;&#160;&#160;&#160;int value<br>
5284 );</p>
5285 <h4 class="parameters">Parameters</h4>
5286 <dl>
5287 <dt>attr</dt>
5288 <dd class="description">Attribute</dd>
5289 <dt>value</dt>
5290 <dd class="description">Integer/enum value</dd>
5291 </dl>
5292 <h4 class="returnvalue">Return Value</h4>
5293 <p class="description">1 on a match, 0 on no match</p>
5294 <h4 class="discussion">Discussion</h4>
5295 <p class="discussion">Returns non-zero when the attribute contains either a matching integer or
5296 enum value, or the value falls within one of the rangeOfInteger values for
5297 the attribute.
5298
5299 </p>
5300 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippContainsString">ippContainsString</a></h3>
5301 <p class="description">Determine whether an attribute contains the
5302 specified string value.</p>
5303 <p class="code">
5304 int ippContainsString (<br>
5305 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
5306 &#160;&#160;&#160;&#160;const char *value<br>
5307 );</p>
5308 <h4 class="parameters">Parameters</h4>
5309 <dl>
5310 <dt>attr</dt>
5311 <dd class="description">Attribute</dd>
5312 <dt>value</dt>
5313 <dd class="description">String value</dd>
5314 </dl>
5315 <h4 class="returnvalue">Return Value</h4>
5316 <p class="description">1 on a match, 0 on no match</p>
5317 <h4 class="discussion">Discussion</h4>
5318 <p class="discussion">Returns non-zero when the attribute contains a matching charset, keyword,
5319 language, mimeMediaType, name, text, URI, or URI scheme value.
5320
5321 </p>
5322 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippCopyAttribute">ippCopyAttribute</a></h3>
5323 <p class="description">Copy an attribute.</p>
5324 <p class="code">
5325 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippCopyAttribute (<br>
5326 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *dst,<br>
5327 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *srcattr,<br>
5328 &#160;&#160;&#160;&#160;int quickcopy<br>
5329 );</p>
5330 <h4 class="parameters">Parameters</h4>
5331 <dl>
5332 <dt>dst</dt>
5333 <dd class="description">Destination IPP message</dd>
5334 <dt>srcattr</dt>
5335 <dd class="description">Attribute to copy</dd>
5336 <dt>quickcopy</dt>
5337 <dd class="description">1 for a referenced copy, 0 for normal</dd>
5338 </dl>
5339 <h4 class="returnvalue">Return Value</h4>
5340 <p class="description">New attribute</p>
5341 <h4 class="discussion">Discussion</h4>
5342 <p class="discussion">The specified attribute, <code>attr</code>, is copied to the destination IPP message.
5343 When <code>quickcopy</code> is non-zero, a &quot;shallow&quot; reference copy of the attribute is
5344 created - this should only be done as long as the original source IPP message will
5345 not be freed for the life of the destination.
5346
5347 </p>
5348 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippCopyAttributes">ippCopyAttributes</a></h3>
5349 <p class="description">Copy attributes from one IPP message to another.</p>
5350 <p class="code">
5351 int ippCopyAttributes (<br>
5352 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *dst,<br>
5353 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *src,<br>
5354 &#160;&#160;&#160;&#160;int quickcopy,<br>
5355 &#160;&#160;&#160;&#160;<a href="#ipp_copycb_t">ipp_copycb_t</a> cb,<br>
5356 &#160;&#160;&#160;&#160;void *context<br>
5357 );</p>
5358 <h4 class="parameters">Parameters</h4>
5359 <dl>
5360 <dt>dst</dt>
5361 <dd class="description">Destination IPP message</dd>
5362 <dt>src</dt>
5363 <dd class="description">Source IPP message</dd>
5364 <dt>quickcopy</dt>
5365 <dd class="description">1 for a referenced copy, 0 for normal</dd>
5366 <dt>cb</dt>
5367 <dd class="description">Copy callback or <code>NULL</code> for none</dd>
5368 <dt>context</dt>
5369 <dd class="description">Context pointer</dd>
5370 </dl>
5371 <h4 class="returnvalue">Return Value</h4>
5372 <p class="description">1 on success, 0 on error</p>
5373 <h4 class="discussion">Discussion</h4>
5374 <p class="discussion">Zero or more attributes are copied from the source IPP message, <code>src</code>, to the
5375 destination IPP message, <code>dst</code>. When <code>quickcopy</code> is non-zero, a &quot;shallow&quot;
5376 reference copy of the attribute is created - this should only be done as long as the
5377 original source IPP message will not be freed for the life of the destination.<br>
5378 <br>
5379 The <code>cb</code> and <code>context</code> parameters provide a generic way to &quot;filter&quot; the
5380 attributes that are copied - the function must return 1 to copy the attribute or
5381 0 to skip it. The function may also choose to do a partial copy of the source attribute
5382 itself.
5383
5384 </p>
5385 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippCreateRequestedArray">ippCreateRequestedArray</a></h3>
5386 <p class="description">Create a CUPS array of attribute names from the
5387 given requested-attributes attribute.</p>
5388 <p class="code">
5389 cups_array_t *ippCreateRequestedArray (<br>
5390 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *request<br>
5391 );</p>
5392 <h4 class="parameters">Parameters</h4>
5393 <dl>
5394 <dt>request</dt>
5395 <dd class="description">IPP request</dd>
5396 </dl>
5397 <h4 class="returnvalue">Return Value</h4>
5398 <p class="description">CUPS array or <code>NULL</code> if all</p>
5399 <h4 class="discussion">Discussion</h4>
5400 <p class="discussion">This function creates a (sorted) CUPS array of attribute names matching the
5401 list of &quot;requested-attribute&quot; values supplied in an IPP request. All IANA-
5402 registered values are supported in addition to the CUPS IPP extension
5403 attributes.<br>
5404 <br>
5405 The <code>request</code> parameter specifies the request message that was read from
5406 the client.
5407
5408 <code>NULL</code> is returned if all attributes should be returned. Otherwise, the
5409 result is a sorted array of attribute names, where <code>cupsArrayFind(array,
5410 "attribute-name")</code> will return a non-NULL pointer. The array must be freed
5411 using the <code>cupsArrayDelete</code> function.
5412
5413 </p>
5414 <h3 class="function"><a id="ippDateToTime">ippDateToTime</a></h3>
5415 <p class="description">Convert from RFC 1903 Date/Time format to UNIX time
5416 in seconds.</p>
5417 <p class="code">
5418 time_t ippDateToTime (<br>
5419 &#160;&#160;&#160;&#160;const <a href="#ipp_uchar_t">ipp_uchar_t</a> *date<br>
5420 );</p>
5421 <h4 class="parameters">Parameters</h4>
5422 <dl>
5423 <dt>date</dt>
5424 <dd class="description">RFC 1903 date info</dd>
5425 </dl>
5426 <h4 class="returnvalue">Return Value</h4>
5427 <p class="description">UNIX time value</p>
5428 <h3 class="function"><a id="ippDelete">ippDelete</a></h3>
5429 <p class="description">RFC-1903 date/time format is:</p>
5430 <p class="code">
5431 void ippDelete (<br>
5432 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br>
5433 );</p>
5434 <h4 class="parameters">Parameters</h4>
5435 <dl>
5436 <dt>ipp</dt>
5437 <dd class="description">IPP message</dd>
5438 </dl>
5439 <h4 class="returnvalue">Return Value</h4>
5440 <p class="description">Delete an IPP message.</p>
5441 <h4 class="discussion">Discussion</h4>
5442 <p class="discussion">Byte(s) Description
5443 ------- -----------
5444 0-1 Year (0 to 65535)
5445 2 Month (1 to 12)
5446 3 Day (1 to 31)
5447 4 Hours (0 to 23)
5448 5 Minutes (0 to 59)
5449 6 Seconds (0 to 60, 60 = &quot;leap second&quot;)
5450 7 Deciseconds (0 to 9)
5451 8 +/- UTC
5452 9 UTC hours (0 to 11)
5453 10 UTC minutes (0 to 59)</p>
5454 <h3 class="function"><a id="ippDeleteAttribute">ippDeleteAttribute</a></h3>
5455 <p class="description">Next attribute</p>
5456 <p class="code">
5457 void ippDeleteAttribute (<br>
5458 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
5459 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br>
5460 );</p>
5461 <h4 class="parameters">Parameters</h4>
5462 <dl>
5463 <dt>ipp</dt>
5464 <dd class="description">IPP message</dd>
5465 <dt>attr</dt>
5466 <dd class="description">Attribute to delete</dd>
5467 </dl>
5468 <h4 class="returnvalue">Return Value</h4>
5469 <p class="description">Delete a single attribute in an IPP message.</p>
5470 <p class="discussion"></p>
5471 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippDeleteValues">ippDeleteValues</a></h3>
5472 <p class="description">Delete values in an attribute.</p>
5473 <p class="code">
5474 int ippDeleteValues (<br>
5475 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
5476 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
5477 &#160;&#160;&#160;&#160;int element,<br>
5478 &#160;&#160;&#160;&#160;int count<br>
5479 );</p>
5480 <h4 class="parameters">Parameters</h4>
5481 <dl>
5482 <dt>ipp</dt>
5483 <dd class="description">IPP message</dd>
5484 <dt>attr</dt>
5485 <dd class="description">Attribute</dd>
5486 <dt>element</dt>
5487 <dd class="description">Index of first value to delete (0-based)</dd>
5488 <dt>count</dt>
5489 <dd class="description">Number of values to delete</dd>
5490 </dl>
5491 <h4 class="returnvalue">Return Value</h4>
5492 <p class="description">1 on success, 0 on failure</p>
5493 <h4 class="discussion">Discussion</h4>
5494 <p class="discussion">The <code>element</code> parameter specifies the first value to delete, starting at
5495 0. It must be less than the number of values returned by <a href="#ippGetCount"><code>ippGetCount</code></a>.<br>
5496 <br>
5497 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
5498 <br>
5499 Deleting all values in an attribute deletes the attribute.
5500
5501 </p>
5502 <h3 class="function"><a id="ippEnumString">ippEnumString</a></h3>
5503 <p class="description">Return a string corresponding to the enum value.</p>
5504 <p class="code">
5505 const char *ippEnumString (<br>
5506 &#160;&#160;&#160;&#160;const char *attrname,<br>
5507 &#160;&#160;&#160;&#160;int enumvalue<br>
5508 );</p>
5509 <h4 class="parameters">Parameters</h4>
5510 <dl>
5511 <dt>attrname</dt>
5512 <dd class="description">Attribute name</dd>
5513 <dt>enumvalue</dt>
5514 <dd class="description">Enum value</dd>
5515 </dl>
5516 <h4 class="returnvalue">Return Value</h4>
5517 <p class="description">Enum string</p>
5518 <h3 class="function"><a id="ippEnumValue">ippEnumValue</a></h3>
5519 <p class="description">Return the value associated with a given enum string.</p>
5520 <p class="code">
5521 int ippEnumValue (<br>
5522 &#160;&#160;&#160;&#160;const char *attrname,<br>
5523 &#160;&#160;&#160;&#160;const char *enumstring<br>
5524 );</p>
5525 <h4 class="parameters">Parameters</h4>
5526 <dl>
5527 <dt>attrname</dt>
5528 <dd class="description">Attribute name</dd>
5529 <dt>enumstring</dt>
5530 <dd class="description">Enum string</dd>
5531 </dl>
5532 <h4 class="returnvalue">Return Value</h4>
5533 <p class="description">Enum value or -1 if unknown</p>
5534 <h3 class="function"><a id="ippErrorString">ippErrorString</a></h3>
5535 <p class="description">Return a name for the given status code.</p>
5536 <p class="code">
5537 const char *ippErrorString (<br>
5538 &#160;&#160;&#160;&#160;ipp_status_t error<br>
5539 );</p>
5540 <h4 class="parameters">Parameters</h4>
5541 <dl>
5542 <dt>error</dt>
5543 <dd class="description">Error status</dd>
5544 </dl>
5545 <h4 class="returnvalue">Return Value</h4>
5546 <p class="description">Text string</p>
5547 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="ippErrorValue">ippErrorValue</a></h3>
5548 <p class="description">Return a status code for the given name.</p>
5549 <p class="code">
5550 ipp_status_t ippErrorValue (<br>
5551 &#160;&#160;&#160;&#160;const char *name<br>
5552 );</p>
5553 <h4 class="parameters">Parameters</h4>
5554 <dl>
5555 <dt>name</dt>
5556 <dd class="description">Name</dd>
5557 </dl>
5558 <h4 class="returnvalue">Return Value</h4>
5559 <p class="description">IPP status code</p>
5560 <h3 class="function"><a id="ippFindAttribute">ippFindAttribute</a></h3>
5561 <p class="description">Find a named attribute in a request.</p>
5562 <p class="code">
5563 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippFindAttribute (<br>
5564 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
5565 &#160;&#160;&#160;&#160;const char *name,<br>
5566 &#160;&#160;&#160;&#160;ipp_tag_t type<br>
5567 );</p>
5568 <h4 class="parameters">Parameters</h4>
5569 <dl>
5570 <dt>ipp</dt>
5571 <dd class="description">IPP message</dd>
5572 <dt>name</dt>
5573 <dd class="description">Name of attribute</dd>
5574 <dt>type</dt>
5575 <dd class="description">Type of attribute</dd>
5576 </dl>
5577 <h4 class="returnvalue">Return Value</h4>
5578 <p class="description">Matching attribute</p>
5579 <h4 class="discussion">Discussion</h4>
5580 <p class="discussion">Starting with CUPS 2.0, the attribute name can contain a hierarchical list
5581 of attribute and member names separated by slashes, for example
5582 &quot;media-col/media-size&quot;.</p>
5583 <h3 class="function"><a id="ippFindNextAttribute">ippFindNextAttribute</a></h3>
5584 <p class="description">Find the next named attribute in a request.</p>
5585 <p class="code">
5586 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippFindNextAttribute (<br>
5587 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
5588 &#160;&#160;&#160;&#160;const char *name,<br>
5589 &#160;&#160;&#160;&#160;ipp_tag_t type<br>
5590 );</p>
5591 <h4 class="parameters">Parameters</h4>
5592 <dl>
5593 <dt>ipp</dt>
5594 <dd class="description">IPP message</dd>
5595 <dt>name</dt>
5596 <dd class="description">Name of attribute</dd>
5597 <dt>type</dt>
5598 <dd class="description">Type of attribute</dd>
5599 </dl>
5600 <h4 class="returnvalue">Return Value</h4>
5601 <p class="description">Matching attribute</p>
5602 <h4 class="discussion">Discussion</h4>
5603 <p class="discussion">Starting with CUPS 2.0, the attribute name can contain a hierarchical list
5604 of attribute and member names separated by slashes, for example
5605 &quot;media-col/media-size&quot;.</p>
5606 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippFirstAttribute">ippFirstAttribute</a></h3>
5607 <p class="description">Return the first attribute in the message.</p>
5608 <p class="code">
5609 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippFirstAttribute (<br>
5610 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br>
5611 );</p>
5612 <h4 class="parameters">Parameters</h4>
5613 <dl>
5614 <dt>ipp</dt>
5615 <dd class="description">IPP message</dd>
5616 </dl>
5617 <h4 class="returnvalue">Return Value</h4>
5618 <p class="description">First attribute or <code>NULL</code> if none</p>
5619 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetBoolean">ippGetBoolean</a></h3>
5620 <p class="description">Get a boolean value for an attribute.</p>
5621 <p class="code">
5622 int ippGetBoolean (<br>
5623 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
5624 &#160;&#160;&#160;&#160;int element<br>
5625 );</p>
5626 <h4 class="parameters">Parameters</h4>
5627 <dl>
5628 <dt>attr</dt>
5629 <dd class="description">IPP attribute</dd>
5630 <dt>element</dt>
5631 <dd class="description">Value number (0-based)</dd>
5632 </dl>
5633 <h4 class="returnvalue">Return Value</h4>
5634 <p class="description">Boolean value or 0 on error</p>
5635 <h4 class="discussion">Discussion</h4>
5636 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
5637 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
5638
5639 </p>
5640 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetCollection">ippGetCollection</a></h3>
5641 <p class="description">Get a collection value for an attribute.</p>
5642 <p class="code">
5643 <a href="#ipp_t">ipp_t</a> *ippGetCollection (<br>
5644 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
5645 &#160;&#160;&#160;&#160;int element<br>
5646 );</p>
5647 <h4 class="parameters">Parameters</h4>
5648 <dl>
5649 <dt>attr</dt>
5650 <dd class="description">IPP attribute</dd>
5651 <dt>element</dt>
5652 <dd class="description">Value number (0-based)</dd>
5653 </dl>
5654 <h4 class="returnvalue">Return Value</h4>
5655 <p class="description">Collection value or <code>NULL</code> on error</p>
5656 <h4 class="discussion">Discussion</h4>
5657 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
5658 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
5659
5660 </p>
5661 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetCount">ippGetCount</a></h3>
5662 <p class="description">Get the number of values in an attribute.</p>
5663 <p class="code">
5664 int ippGetCount (<br>
5665 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br>
5666 );</p>
5667 <h4 class="parameters">Parameters</h4>
5668 <dl>
5669 <dt>attr</dt>
5670 <dd class="description">IPP attribute</dd>
5671 </dl>
5672 <h4 class="returnvalue">Return Value</h4>
5673 <p class="description">Number of values or 0 on error</p>
5674 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetDate">ippGetDate</a></h3>
5675 <p class="description">Get a date value for an attribute.</p>
5676 <p class="code">
5677 const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippGetDate (<br>
5678 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
5679 &#160;&#160;&#160;&#160;int element<br>
5680 );</p>
5681 <h4 class="parameters">Parameters</h4>
5682 <dl>
5683 <dt>attr</dt>
5684 <dd class="description">IPP attribute</dd>
5685 <dt>element</dt>
5686 <dd class="description">Value number (0-based)</dd>
5687 </dl>
5688 <h4 class="returnvalue">Return Value</h4>
5689 <p class="description">Date value or <code>NULL</code></p>
5690 <h4 class="discussion">Discussion</h4>
5691 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
5692 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
5693
5694 </p>
5695 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetGroupTag">ippGetGroupTag</a></h3>
5696 <p class="description">Get the group associated with an attribute.</p>
5697 <p class="code">
5698 ipp_tag_t ippGetGroupTag (<br>
5699 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br>
5700 );</p>
5701 <h4 class="parameters">Parameters</h4>
5702 <dl>
5703 <dt>attr</dt>
5704 <dd class="description">IPP attribute</dd>
5705 </dl>
5706 <h4 class="returnvalue">Return Value</h4>
5707 <p class="description">Group tag or <code>IPP_TAG_ZERO</code> on error</p>
5708 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetInteger">ippGetInteger</a></h3>
5709 <p class="description">Get the integer/enum value for an attribute.</p>
5710 <p class="code">
5711 int ippGetInteger (<br>
5712 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
5713 &#160;&#160;&#160;&#160;int element<br>
5714 );</p>
5715 <h4 class="parameters">Parameters</h4>
5716 <dl>
5717 <dt>attr</dt>
5718 <dd class="description">IPP attribute</dd>
5719 <dt>element</dt>
5720 <dd class="description">Value number (0-based)</dd>
5721 </dl>
5722 <h4 class="returnvalue">Return Value</h4>
5723 <p class="description">Value or 0 on error</p>
5724 <h4 class="discussion">Discussion</h4>
5725 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
5726 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
5727
5728 </p>
5729 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetName">ippGetName</a></h3>
5730 <p class="description">Get the attribute name.</p>
5731 <p class="code">
5732 const char *ippGetName (<br>
5733 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br>
5734 );</p>
5735 <h4 class="parameters">Parameters</h4>
5736 <dl>
5737 <dt>attr</dt>
5738 <dd class="description">IPP attribute</dd>
5739 </dl>
5740 <h4 class="returnvalue">Return Value</h4>
5741 <p class="description">Attribute name or <code>NULL</code> for separators</p>
5742 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippGetOctetString">ippGetOctetString</a></h3>
5743 <p class="description">Get an octetString value from an IPP attribute.</p>
5744 <p class="code">
5745 void *ippGetOctetString (<br>
5746 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
5747 &#160;&#160;&#160;&#160;int element,<br>
5748 &#160;&#160;&#160;&#160;int *datalen<br>
5749 );</p>
5750 <h4 class="parameters">Parameters</h4>
5751 <dl>
5752 <dt>attr</dt>
5753 <dd class="description">IPP attribute</dd>
5754 <dt>element</dt>
5755 <dd class="description">Value number (0-based)</dd>
5756 <dt>datalen</dt>
5757 <dd class="description">Length of octetString data</dd>
5758 </dl>
5759 <h4 class="returnvalue">Return Value</h4>
5760 <p class="description">Pointer to octetString data</p>
5761 <h4 class="discussion">Discussion</h4>
5762 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
5763 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
5764
5765 </p>
5766 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetOperation">ippGetOperation</a></h3>
5767 <p class="description">Get the operation ID in an IPP message.</p>
5768 <p class="code">
5769 ipp_op_t ippGetOperation (<br>
5770 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br>
5771 );</p>
5772 <h4 class="parameters">Parameters</h4>
5773 <dl>
5774 <dt>ipp</dt>
5775 <dd class="description">IPP request message</dd>
5776 </dl>
5777 <h4 class="returnvalue">Return Value</h4>
5778 <p class="description">Operation ID or 0 on error</p>
5779 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetRange">ippGetRange</a></h3>
5780 <p class="description">Get a rangeOfInteger value from an attribute.</p>
5781 <p class="code">
5782 int ippGetRange (<br>
5783 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
5784 &#160;&#160;&#160;&#160;int element,<br>
5785 &#160;&#160;&#160;&#160;int *uppervalue<br>
5786 );</p>
5787 <h4 class="parameters">Parameters</h4>
5788 <dl>
5789 <dt>attr</dt>
5790 <dd class="description">IPP attribute</dd>
5791 <dt>element</dt>
5792 <dd class="description">Value number (0-based)</dd>
5793 <dt>uppervalue</dt>
5794 <dd class="description">Upper value of range</dd>
5795 </dl>
5796 <h4 class="returnvalue">Return Value</h4>
5797 <p class="description">Lower value of range or 0</p>
5798 <h4 class="discussion">Discussion</h4>
5799 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
5800 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
5801
5802 </p>
5803 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetRequestId">ippGetRequestId</a></h3>
5804 <p class="description">Get the request ID from an IPP message.</p>
5805 <p class="code">
5806 int ippGetRequestId (<br>
5807 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br>
5808 );</p>
5809 <h4 class="parameters">Parameters</h4>
5810 <dl>
5811 <dt>ipp</dt>
5812 <dd class="description">IPP message</dd>
5813 </dl>
5814 <h4 class="returnvalue">Return Value</h4>
5815 <p class="description">Request ID or 0 on error</p>
5816 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetResolution">ippGetResolution</a></h3>
5817 <p class="description">Get a resolution value for an attribute.</p>
5818 <p class="code">
5819 int ippGetResolution (<br>
5820 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
5821 &#160;&#160;&#160;&#160;int element,<br>
5822 &#160;&#160;&#160;&#160;int *yres,<br>
5823 &#160;&#160;&#160;&#160;<a href="#ipp_res_t">ipp_res_t</a> *units<br>
5824 );</p>
5825 <h4 class="parameters">Parameters</h4>
5826 <dl>
5827 <dt>attr</dt>
5828 <dd class="description">IPP attribute</dd>
5829 <dt>element</dt>
5830 <dd class="description">Value number (0-based)</dd>
5831 <dt>yres</dt>
5832 <dd class="description">Vertical/feed resolution</dd>
5833 <dt>units</dt>
5834 <dd class="description">Units for resolution</dd>
5835 </dl>
5836 <h4 class="returnvalue">Return Value</h4>
5837 <p class="description">Horizontal/cross feed resolution or 0</p>
5838 <h4 class="discussion">Discussion</h4>
5839 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
5840 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
5841
5842 </p>
5843 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetState">ippGetState</a></h3>
5844 <p class="description">Get the IPP message state.</p>
5845 <p class="code">
5846 <a href="#ipp_state_t">ipp_state_t</a> ippGetState (<br>
5847 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br>
5848 );</p>
5849 <h4 class="parameters">Parameters</h4>
5850 <dl>
5851 <dt>ipp</dt>
5852 <dd class="description">IPP message</dd>
5853 </dl>
5854 <h4 class="returnvalue">Return Value</h4>
5855 <p class="description">IPP message state value</p>
5856 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetStatusCode">ippGetStatusCode</a></h3>
5857 <p class="description">Get the status code from an IPP response or event message.</p>
5858 <p class="code">
5859 ipp_status_t ippGetStatusCode (<br>
5860 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br>
5861 );</p>
5862 <h4 class="parameters">Parameters</h4>
5863 <dl>
5864 <dt>ipp</dt>
5865 <dd class="description">IPP response or event message</dd>
5866 </dl>
5867 <h4 class="returnvalue">Return Value</h4>
5868 <p class="description">Status code in IPP message</p>
5869 <h3 class="function"><a id="ippGetString">ippGetString</a></h3>
5870 <p class="description">Return the value...</p>
5871 <p class="code">
5872 const char *ippGetString (<br>
5873 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
5874 &#160;&#160;&#160;&#160;int element,<br>
5875 &#160;&#160;&#160;&#160;const char **language<br>
5876 );</p>
5877 <h4 class="parameters">Parameters</h4>
5878 <dl>
5879 <dt>attr</dt>
5880 <dd class="description">IPP attribute</dd>
5881 <dt>element</dt>
5882 <dd class="description">Value number (0-based)</dd>
5883 <dt>language</dt>
5884 <dd class="description">Language code (<code>NULL</code> for don't care)</dd>
5885 </dl>
5886 <h4 class="returnvalue">Return Value</h4>
5887 <p class="description">Get the string and optionally the language code for an attribute.</p>
5888 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
5889 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
5890
5891 </p>
5892 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetValueTag">ippGetValueTag</a></h3>
5893 <p class="description">Get the value tag for an attribute.</p>
5894 <p class="code">
5895 ipp_tag_t ippGetValueTag (<br>
5896 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br>
5897 );</p>
5898 <h4 class="parameters">Parameters</h4>
5899 <dl>
5900 <dt>attr</dt>
5901 <dd class="description">IPP attribute</dd>
5902 </dl>
5903 <h4 class="returnvalue">Return Value</h4>
5904 <p class="description">Value tag or <code>IPP_TAG_ZERO</code> on error</p>
5905 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippGetVersion">ippGetVersion</a></h3>
5906 <p class="description">Get the major and minor version number from an IPP message.</p>
5907 <p class="code">
5908 int ippGetVersion (<br>
5909 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
5910 &#160;&#160;&#160;&#160;int *minor<br>
5911 );</p>
5912 <h4 class="parameters">Parameters</h4>
5913 <dl>
5914 <dt>ipp</dt>
5915 <dd class="description">IPP message</dd>
5916 <dt>minor</dt>
5917 <dd class="description">Minor version number or <code>NULL</code></dd>
5918 </dl>
5919 <h4 class="returnvalue">Return Value</h4>
5920 <p class="description">Major version number or 0 on error</p>
5921 <h3 class="function"><a id="ippLength">ippLength</a></h3>
5922 <p class="description">Compute the length of an IPP message.</p>
5923 <p class="code">
5924 size_t ippLength (<br>
5925 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br>
5926 );</p>
5927 <h4 class="parameters">Parameters</h4>
5928 <dl>
5929 <dt>ipp</dt>
5930 <dd class="description">IPP message</dd>
5931 </dl>
5932 <h4 class="returnvalue">Return Value</h4>
5933 <p class="description">Size of IPP message</p>
5934 <h3 class="function"><a id="ippNew">ippNew</a></h3>
5935 <p class="description">Allocate a new IPP message.</p>
5936 <p class="code">
5937 <a href="#ipp_t">ipp_t</a> *ippNew (void);</p>
5938 <h4 class="returnvalue">Return Value</h4>
5939 <p class="description">New IPP message</p>
5940 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="ippNewRequest">ippNewRequest</a></h3>
5941 <p class="description">Allocate a new IPP request message.</p>
5942 <p class="code">
5943 <a href="#ipp_t">ipp_t</a> *ippNewRequest (<br>
5944 &#160;&#160;&#160;&#160;ipp_op_t op<br>
5945 );</p>
5946 <h4 class="parameters">Parameters</h4>
5947 <dl>
5948 <dt>op</dt>
5949 <dd class="description">Operation code</dd>
5950 </dl>
5951 <h4 class="returnvalue">Return Value</h4>
5952 <p class="description">IPP request message</p>
5953 <h4 class="discussion">Discussion</h4>
5954 <p class="discussion">The new request message is initialized with the attributes-charset and
5955 attributes-natural-language attributes added. The
5956 attributes-natural-language value is derived from the current locale.
5957
5958 </p>
5959 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippNewResponse">ippNewResponse</a></h3>
5960 <p class="description">Allocate a new IPP response message.</p>
5961 <p class="code">
5962 <a href="#ipp_t">ipp_t</a> *ippNewResponse (<br>
5963 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *request<br>
5964 );</p>
5965 <h4 class="parameters">Parameters</h4>
5966 <dl>
5967 <dt>request</dt>
5968 <dd class="description">IPP request message</dd>
5969 </dl>
5970 <h4 class="returnvalue">Return Value</h4>
5971 <p class="description">IPP response message</p>
5972 <h4 class="discussion">Discussion</h4>
5973 <p class="discussion">The new response message is initialized with the same version-number,
5974 request-id, attributes-charset, and attributes-natural-language as the
5975 provided request message. If the attributes-charset or
5976 attributes-natural-language attributes are missing from the request,
5977 &quot;utf-8&quot; and a value derived from the current locale are substituted,
5978 respectively.
5979
5980 </p>
5981 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippNextAttribute">ippNextAttribute</a></h3>
5982 <p class="description">Return the next attribute in the message.</p>
5983 <p class="code">
5984 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippNextAttribute (<br>
5985 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br>
5986 );</p>
5987 <h4 class="parameters">Parameters</h4>
5988 <dl>
5989 <dt>ipp</dt>
5990 <dd class="description">IPP message</dd>
5991 </dl>
5992 <h4 class="returnvalue">Return Value</h4>
5993 <p class="description">Next attribute or <code>NULL</code> if none</p>
5994 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="ippOpString">ippOpString</a></h3>
5995 <p class="description">Return a name for the given operation id.</p>
5996 <p class="code">
5997 const char *ippOpString (<br>
5998 &#160;&#160;&#160;&#160;ipp_op_t op<br>
5999 );</p>
6000 <h4 class="parameters">Parameters</h4>
6001 <dl>
6002 <dt>op</dt>
6003 <dd class="description">Operation ID</dd>
6004 </dl>
6005 <h4 class="returnvalue">Return Value</h4>
6006 <p class="description">Name</p>
6007 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="ippOpValue">ippOpValue</a></h3>
6008 <p class="description">Return an operation id for the given name.</p>
6009 <p class="code">
6010 ipp_op_t ippOpValue (<br>
6011 &#160;&#160;&#160;&#160;const char *name<br>
6012 );</p>
6013 <h4 class="parameters">Parameters</h4>
6014 <dl>
6015 <dt>name</dt>
6016 <dd class="description">Textual name</dd>
6017 </dl>
6018 <h4 class="returnvalue">Return Value</h4>
6019 <p class="description">Operation ID</p>
6020 <h3 class="function"><a id="ippPort">ippPort</a></h3>
6021 <p class="description">Return the default IPP port number.</p>
6022 <p class="code">
6023 int ippPort (void);</p>
6024 <h4 class="returnvalue">Return Value</h4>
6025 <p class="description">Port number</p>
6026 <h3 class="function"><a id="ippRead">ippRead</a></h3>
6027 <p class="description">Read data for an IPP message from a HTTP connection.</p>
6028 <p class="code">
6029 <a href="#ipp_state_t">ipp_state_t</a> ippRead (<br>
6030 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
6031 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br>
6032 );</p>
6033 <h4 class="parameters">Parameters</h4>
6034 <dl>
6035 <dt>http</dt>
6036 <dd class="description">HTTP connection</dd>
6037 <dt>ipp</dt>
6038 <dd class="description">IPP data</dd>
6039 </dl>
6040 <h4 class="returnvalue">Return Value</h4>
6041 <p class="description">Current state</p>
6042 <h3 class="function"><span class="info">&#160;CUPS 1.1.19/macOS 10.3&#160;</span><a id="ippReadFile">ippReadFile</a></h3>
6043 <p class="description">Read data for an IPP message from a file.</p>
6044 <p class="code">
6045 <a href="#ipp_state_t">ipp_state_t</a> ippReadFile (<br>
6046 &#160;&#160;&#160;&#160;int fd,<br>
6047 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br>
6048 );</p>
6049 <h4 class="parameters">Parameters</h4>
6050 <dl>
6051 <dt>fd</dt>
6052 <dd class="description">HTTP data</dd>
6053 <dt>ipp</dt>
6054 <dd class="description">IPP data</dd>
6055 </dl>
6056 <h4 class="returnvalue">Return Value</h4>
6057 <p class="description">Current state</p>
6058 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="ippReadIO">ippReadIO</a></h3>
6059 <p class="description">Read data for an IPP message.</p>
6060 <p class="code">
6061 <a href="#ipp_state_t">ipp_state_t</a> ippReadIO (<br>
6062 &#160;&#160;&#160;&#160;void *src,<br>
6063 &#160;&#160;&#160;&#160;<a href="#ipp_iocb_t">ipp_iocb_t</a> cb,<br>
6064 &#160;&#160;&#160;&#160;int blocking,<br>
6065 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *parent,<br>
6066 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br>
6067 );</p>
6068 <h4 class="parameters">Parameters</h4>
6069 <dl>
6070 <dt>src</dt>
6071 <dd class="description">Data source</dd>
6072 <dt>cb</dt>
6073 <dd class="description">Read callback function</dd>
6074 <dt>blocking</dt>
6075 <dd class="description">Use blocking IO?</dd>
6076 <dt>parent</dt>
6077 <dd class="description">Parent request, if any</dd>
6078 <dt>ipp</dt>
6079 <dd class="description">IPP data</dd>
6080 </dl>
6081 <h4 class="returnvalue">Return Value</h4>
6082 <p class="description">Current state</p>
6083 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetBoolean">ippSetBoolean</a></h3>
6084 <p class="description">Set a boolean value in an attribute.</p>
6085 <p class="code">
6086 int ippSetBoolean (<br>
6087 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
6088 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
6089 &#160;&#160;&#160;&#160;int element,<br>
6090 &#160;&#160;&#160;&#160;int boolvalue<br>
6091 );</p>
6092 <h4 class="parameters">Parameters</h4>
6093 <dl>
6094 <dt>ipp</dt>
6095 <dd class="description">IPP message</dd>
6096 <dt>attr</dt>
6097 <dd class="description">IPP attribute</dd>
6098 <dt>element</dt>
6099 <dd class="description">Value number (0-based)</dd>
6100 <dt>boolvalue</dt>
6101 <dd class="description">Boolean value</dd>
6102 </dl>
6103 <h4 class="returnvalue">Return Value</h4>
6104 <p class="description">1 on success, 0 on failure</p>
6105 <h4 class="discussion">Discussion</h4>
6106 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
6107 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>
6108 <br>
6109 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
6110 <br>
6111 The <code>element</code> parameter specifies which value to set from 0 to
6112 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
6113
6114 </p>
6115 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetCollection">ippSetCollection</a></h3>
6116 <p class="description">Set a collection value in an attribute.</p>
6117 <p class="code">
6118 int ippSetCollection (<br>
6119 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
6120 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
6121 &#160;&#160;&#160;&#160;int element,<br>
6122 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *colvalue<br>
6123 );</p>
6124 <h4 class="parameters">Parameters</h4>
6125 <dl>
6126 <dt>ipp</dt>
6127 <dd class="description">IPP message</dd>
6128 <dt>attr</dt>
6129 <dd class="description">IPP attribute</dd>
6130 <dt>element</dt>
6131 <dd class="description">Value number (0-based)</dd>
6132 <dt>colvalue</dt>
6133 <dd class="description">Collection value</dd>
6134 </dl>
6135 <h4 class="returnvalue">Return Value</h4>
6136 <p class="description">1 on success, 0 on failure</p>
6137 <h4 class="discussion">Discussion</h4>
6138 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
6139 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>
6140 <br>
6141 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
6142 <br>
6143 The <code>element</code> parameter specifies which value to set from 0 to
6144 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
6145
6146 </p>
6147 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetDate">ippSetDate</a></h3>
6148 <p class="description">Set a date value in an attribute.</p>
6149 <p class="code">
6150 int ippSetDate (<br>
6151 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
6152 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
6153 &#160;&#160;&#160;&#160;int element,<br>
6154 &#160;&#160;&#160;&#160;const <a href="#ipp_uchar_t">ipp_uchar_t</a> *datevalue<br>
6155 );</p>
6156 <h4 class="parameters">Parameters</h4>
6157 <dl>
6158 <dt>ipp</dt>
6159 <dd class="description">IPP message</dd>
6160 <dt>attr</dt>
6161 <dd class="description">IPP attribute</dd>
6162 <dt>element</dt>
6163 <dd class="description">Value number (0-based)</dd>
6164 <dt>datevalue</dt>
6165 <dd class="description">Date value</dd>
6166 </dl>
6167 <h4 class="returnvalue">Return Value</h4>
6168 <p class="description">1 on success, 0 on failure</p>
6169 <h4 class="discussion">Discussion</h4>
6170 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
6171 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>
6172 <br>
6173 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
6174 <br>
6175 The <code>element</code> parameter specifies which value to set from 0 to
6176 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
6177
6178 </p>
6179 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetGroupTag">ippSetGroupTag</a></h3>
6180 <p class="description">Set the group tag of an attribute.</p>
6181 <p class="code">
6182 int ippSetGroupTag (<br>
6183 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
6184 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
6185 &#160;&#160;&#160;&#160;ipp_tag_t group_tag<br>
6186 );</p>
6187 <h4 class="parameters">Parameters</h4>
6188 <dl>
6189 <dt>ipp</dt>
6190 <dd class="description">IPP message</dd>
6191 <dt>attr</dt>
6192 <dd class="description">Attribute</dd>
6193 <dt>group_tag</dt>
6194 <dd class="description">Group tag</dd>
6195 </dl>
6196 <h4 class="returnvalue">Return Value</h4>
6197 <p class="description">1 on success, 0 on failure</p>
6198 <h4 class="discussion">Discussion</h4>
6199 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
6200 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>
6201 <br>
6202 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
6203 <br>
6204 The <code>group</code> parameter specifies the IPP attribute group tag: none
6205 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
6206 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
6207 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
6208 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).
6209
6210 </p>
6211 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetInteger">ippSetInteger</a></h3>
6212 <p class="description">Set an integer or enum value in an attribute.</p>
6213 <p class="code">
6214 int ippSetInteger (<br>
6215 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
6216 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
6217 &#160;&#160;&#160;&#160;int element,<br>
6218 &#160;&#160;&#160;&#160;int intvalue<br>
6219 );</p>
6220 <h4 class="parameters">Parameters</h4>
6221 <dl>
6222 <dt>ipp</dt>
6223 <dd class="description">IPP message</dd>
6224 <dt>attr</dt>
6225 <dd class="description">IPP attribute</dd>
6226 <dt>element</dt>
6227 <dd class="description">Value number (0-based)</dd>
6228 <dt>intvalue</dt>
6229 <dd class="description">Integer/enum value</dd>
6230 </dl>
6231 <h4 class="returnvalue">Return Value</h4>
6232 <p class="description">1 on success, 0 on failure</p>
6233 <h4 class="discussion">Discussion</h4>
6234 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
6235 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>
6236 <br>
6237 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
6238 <br>
6239 The <code>element</code> parameter specifies which value to set from 0 to
6240 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
6241
6242 </p>
6243 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetName">ippSetName</a></h3>
6244 <p class="description">Set the name of an attribute.</p>
6245 <p class="code">
6246 int ippSetName (<br>
6247 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
6248 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
6249 &#160;&#160;&#160;&#160;const char *name<br>
6250 );</p>
6251 <h4 class="parameters">Parameters</h4>
6252 <dl>
6253 <dt>ipp</dt>
6254 <dd class="description">IPP message</dd>
6255 <dt>attr</dt>
6256 <dd class="description">IPP attribute</dd>
6257 <dt>name</dt>
6258 <dd class="description">Attribute name</dd>
6259 </dl>
6260 <h4 class="returnvalue">Return Value</h4>
6261 <p class="description">1 on success, 0 on failure</p>
6262 <h4 class="discussion">Discussion</h4>
6263 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
6264 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>
6265 <br>
6266 The <code>attr</code> parameter may be modified as a result of setting the value.
6267
6268 </p>
6269 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippSetOctetString">ippSetOctetString</a></h3>
6270 <p class="description">Set an octetString value in an IPP attribute.</p>
6271 <p class="code">
6272 int ippSetOctetString (<br>
6273 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
6274 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
6275 &#160;&#160;&#160;&#160;int element,<br>
6276 &#160;&#160;&#160;&#160;const void *data,<br>
6277 &#160;&#160;&#160;&#160;int datalen<br>
6278 );</p>
6279 <h4 class="parameters">Parameters</h4>
6280 <dl>
6281 <dt>ipp</dt>
6282 <dd class="description">IPP message</dd>
6283 <dt>attr</dt>
6284 <dd class="description">IPP attribute</dd>
6285 <dt>element</dt>
6286 <dd class="description">Value number (0-based)</dd>
6287 <dt>data</dt>
6288 <dd class="description">Pointer to octetString data</dd>
6289 <dt>datalen</dt>
6290 <dd class="description">Length of octetString data</dd>
6291 </dl>
6292 <h4 class="returnvalue">Return Value</h4>
6293 <p class="description">1 on success, 0 on failure</p>
6294 <h4 class="discussion">Discussion</h4>
6295 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
6296 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>
6297 <br>
6298 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
6299 <br>
6300 The <code>element</code> parameter specifies which value to set from 0 to
6301 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
6302
6303 </p>
6304 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetOperation">ippSetOperation</a></h3>
6305 <p class="description">Set the operation ID in an IPP request message.</p>
6306 <p class="code">
6307 int ippSetOperation (<br>
6308 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
6309 &#160;&#160;&#160;&#160;ipp_op_t op<br>
6310 );</p>
6311 <h4 class="parameters">Parameters</h4>
6312 <dl>
6313 <dt>ipp</dt>
6314 <dd class="description">IPP request message</dd>
6315 <dt>op</dt>
6316 <dd class="description">Operation ID</dd>
6317 </dl>
6318 <h4 class="returnvalue">Return Value</h4>
6319 <p class="description">1 on success, 0 on failure</p>
6320 <h4 class="discussion">Discussion</h4>
6321 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
6322 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.
6323
6324 </p>
6325 <h3 class="function"><a id="ippSetPort">ippSetPort</a></h3>
6326 <p class="description">Pointer to library globals</p>
6327 <p class="code">
6328 void ippSetPort (<br>
6329 &#160;&#160;&#160;&#160;int p<br>
6330 );</p>
6331 <h4 class="parameters">Parameters</h4>
6332 <dl>
6333 <dt>p</dt>
6334 <dd class="description">Port number to use</dd>
6335 </dl>
6336 <h4 class="returnvalue">Return Value</h4>
6337 <p class="description">Set the default port number.</p>
6338 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetRange">ippSetRange</a></h3>
6339 <p class="description">Set a rangeOfInteger value in an attribute.</p>
6340 <p class="code">
6341 int ippSetRange (<br>
6342 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
6343 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
6344 &#160;&#160;&#160;&#160;int element,<br>
6345 &#160;&#160;&#160;&#160;int lowervalue,<br>
6346 &#160;&#160;&#160;&#160;int uppervalue<br>
6347 );</p>
6348 <h4 class="parameters">Parameters</h4>
6349 <dl>
6350 <dt>ipp</dt>
6351 <dd class="description">IPP message</dd>
6352 <dt>attr</dt>
6353 <dd class="description">IPP attribute</dd>
6354 <dt>element</dt>
6355 <dd class="description">Value number (0-based)</dd>
6356 <dt>lowervalue</dt>
6357 <dd class="description">Lower bound for range</dd>
6358 <dt>uppervalue</dt>
6359 <dd class="description">Upper bound for range</dd>
6360 </dl>
6361 <h4 class="returnvalue">Return Value</h4>
6362 <p class="description">1 on success, 0 on failure</p>
6363 <h4 class="discussion">Discussion</h4>
6364 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
6365 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>
6366 <br>
6367 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
6368 <br>
6369 The <code>element</code> parameter specifies which value to set from 0 to
6370 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
6371
6372 </p>
6373 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetRequestId">ippSetRequestId</a></h3>
6374 <p class="description">Set the request ID in an IPP message.</p>
6375 <p class="code">
6376 int ippSetRequestId (<br>
6377 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
6378 &#160;&#160;&#160;&#160;int request_id<br>
6379 );</p>
6380 <h4 class="parameters">Parameters</h4>
6381 <dl>
6382 <dt>ipp</dt>
6383 <dd class="description">IPP message</dd>
6384 <dt>request_id</dt>
6385 <dd class="description">Request ID</dd>
6386 </dl>
6387 <h4 class="returnvalue">Return Value</h4>
6388 <p class="description">1 on success, 0 on failure</p>
6389 <h4 class="discussion">Discussion</h4>
6390 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
6391 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>
6392 <br>
6393 The <code>request_id</code> parameter must be greater than 0.
6394
6395 </p>
6396 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetResolution">ippSetResolution</a></h3>
6397 <p class="description">Set a resolution value in an attribute.</p>
6398 <p class="code">
6399 int ippSetResolution (<br>
6400 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
6401 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
6402 &#160;&#160;&#160;&#160;int element,<br>
6403 &#160;&#160;&#160;&#160;<a href="#ipp_res_t">ipp_res_t</a> unitsvalue,<br>
6404 &#160;&#160;&#160;&#160;int xresvalue,<br>
6405 &#160;&#160;&#160;&#160;int yresvalue<br>
6406 );</p>
6407 <h4 class="parameters">Parameters</h4>
6408 <dl>
6409 <dt>ipp</dt>
6410 <dd class="description">IPP message</dd>
6411 <dt>attr</dt>
6412 <dd class="description">IPP attribute</dd>
6413 <dt>element</dt>
6414 <dd class="description">Value number (0-based)</dd>
6415 <dt>unitsvalue</dt>
6416 <dd class="description">Resolution units</dd>
6417 <dt>xresvalue</dt>
6418 <dd class="description">Horizontal/cross feed resolution</dd>
6419 <dt>yresvalue</dt>
6420 <dd class="description">Vertical/feed resolution</dd>
6421 </dl>
6422 <h4 class="returnvalue">Return Value</h4>
6423 <p class="description">1 on success, 0 on failure</p>
6424 <h4 class="discussion">Discussion</h4>
6425 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
6426 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>
6427 <br>
6428 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
6429 <br>
6430 The <code>element</code> parameter specifies which value to set from 0 to
6431 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
6432
6433 </p>
6434 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetState">ippSetState</a></h3>
6435 <p class="description">Set the current state of the IPP message.</p>
6436 <p class="code">
6437 int ippSetState (<br>
6438 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
6439 &#160;&#160;&#160;&#160;<a href="#ipp_state_t">ipp_state_t</a> state<br>
6440 );</p>
6441 <h4 class="parameters">Parameters</h4>
6442 <dl>
6443 <dt>ipp</dt>
6444 <dd class="description">IPP message</dd>
6445 <dt>state</dt>
6446 <dd class="description">IPP state value</dd>
6447 </dl>
6448 <h4 class="returnvalue">Return Value</h4>
6449 <p class="description">1 on success, 0 on failure</p>
6450 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetStatusCode">ippSetStatusCode</a></h3>
6451 <p class="description">Set the status code in an IPP response or event message.</p>
6452 <p class="code">
6453 int ippSetStatusCode (<br>
6454 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
6455 &#160;&#160;&#160;&#160;ipp_status_t status<br>
6456 );</p>
6457 <h4 class="parameters">Parameters</h4>
6458 <dl>
6459 <dt>ipp</dt>
6460 <dd class="description">IPP response or event message</dd>
6461 <dt>status</dt>
6462 <dd class="description">Status code</dd>
6463 </dl>
6464 <h4 class="returnvalue">Return Value</h4>
6465 <p class="description">1 on success, 0 on failure</p>
6466 <h4 class="discussion">Discussion</h4>
6467 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
6468 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.
6469
6470 </p>
6471 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetString">ippSetString</a></h3>
6472 <p class="description">Set a string value in an attribute.</p>
6473 <p class="code">
6474 int ippSetString (<br>
6475 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
6476 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
6477 &#160;&#160;&#160;&#160;int element,<br>
6478 &#160;&#160;&#160;&#160;const char *strvalue<br>
6479 );</p>
6480 <h4 class="parameters">Parameters</h4>
6481 <dl>
6482 <dt>ipp</dt>
6483 <dd class="description">IPP message</dd>
6484 <dt>attr</dt>
6485 <dd class="description">IPP attribute</dd>
6486 <dt>element</dt>
6487 <dd class="description">Value number (0-based)</dd>
6488 <dt>strvalue</dt>
6489 <dd class="description">String value</dd>
6490 </dl>
6491 <h4 class="returnvalue">Return Value</h4>
6492 <p class="description">1 on success, 0 on failure</p>
6493 <h4 class="discussion">Discussion</h4>
6494 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
6495 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>
6496 <br>
6497 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
6498 <br>
6499 The <code>element</code> parameter specifies which value to set from 0 to
6500 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
6501
6502 </p>
6503 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippSetStringf">ippSetStringf</a></h3>
6504 <p class="description">Set a formatted string value of an attribute.</p>
6505 <p class="code">
6506 int ippSetStringf (<br>
6507 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
6508 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
6509 &#160;&#160;&#160;&#160;int element,<br>
6510 &#160;&#160;&#160;&#160;const char *format,<br>
6511 &#160;&#160;&#160;&#160;...<br>
6512 );</p>
6513 <h4 class="parameters">Parameters</h4>
6514 <dl>
6515 <dt>ipp</dt>
6516 <dd class="description">IPP message</dd>
6517 <dt>attr</dt>
6518 <dd class="description">IPP attribute</dd>
6519 <dt>element</dt>
6520 <dd class="description">Value number (0-based)</dd>
6521 <dt>format</dt>
6522 <dd class="description">Printf-style format string</dd>
6523 <dt>...</dt>
6524 <dd class="description">Additional arguments as needed</dd>
6525 </dl>
6526 <h4 class="returnvalue">Return Value</h4>
6527 <p class="description">1 on success, 0 on failure</p>
6528 <h4 class="discussion">Discussion</h4>
6529 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
6530 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>
6531 <br>
6532 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
6533 <br>
6534 The <code>element</code> parameter specifies which value to set from 0 to
6535 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.<br>
6536 <br>
6537 The <code>format</code> parameter uses formatting characters compatible with the
6538 printf family of standard functions. Additional arguments follow it as
6539 needed. The formatted string is truncated as needed to the maximum length of
6540 the corresponding value type.
6541
6542 </p>
6543 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippSetStringfv">ippSetStringfv</a></h3>
6544 <p class="description">Set a formatted string value of an attribute.</p>
6545 <p class="code">
6546 int ippSetStringfv (<br>
6547 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
6548 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
6549 &#160;&#160;&#160;&#160;int element,<br>
6550 &#160;&#160;&#160;&#160;const char *format,<br>
6551 &#160;&#160;&#160;&#160;va_list ap<br>
6552 );</p>
6553 <h4 class="parameters">Parameters</h4>
6554 <dl>
6555 <dt>ipp</dt>
6556 <dd class="description">IPP message</dd>
6557 <dt>attr</dt>
6558 <dd class="description">IPP attribute</dd>
6559 <dt>element</dt>
6560 <dd class="description">Value number (0-based)</dd>
6561 <dt>format</dt>
6562 <dd class="description">Printf-style format string</dd>
6563 <dt>ap</dt>
6564 <dd class="description">Pointer to additional arguments</dd>
6565 </dl>
6566 <h4 class="returnvalue">Return Value</h4>
6567 <p class="description">1 on success, 0 on failure</p>
6568 <h4 class="discussion">Discussion</h4>
6569 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
6570 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>
6571 <br>
6572 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
6573 <br>
6574 The <code>element</code> parameter specifies which value to set from 0 to
6575 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.<br>
6576 <br>
6577 The <code>format</code> parameter uses formatting characters compatible with the
6578 printf family of standard functions. Additional arguments follow it as
6579 needed. The formatted string is truncated as needed to the maximum length of
6580 the corresponding value type.
6581
6582 </p>
6583 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetValueTag">ippSetValueTag</a></h3>
6584 <p class="description">Set the value tag of an attribute.</p>
6585 <p class="code">
6586 int ippSetValueTag (<br>
6587 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
6588 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
6589 &#160;&#160;&#160;&#160;ipp_tag_t value_tag<br>
6590 );</p>
6591 <h4 class="parameters">Parameters</h4>
6592 <dl>
6593 <dt>ipp</dt>
6594 <dd class="description">IPP message</dd>
6595 <dt>attr</dt>
6596 <dd class="description">IPP attribute</dd>
6597 <dt>value_tag</dt>
6598 <dd class="description">Value tag</dd>
6599 </dl>
6600 <h4 class="returnvalue">Return Value</h4>
6601 <p class="description">1 on success, 0 on failure</p>
6602 <h4 class="discussion">Discussion</h4>
6603 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
6604 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>
6605 <br>
6606 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
6607 <br>
6608 Integer (<code>IPP_TAG_INTEGER</code>) values can be promoted to rangeOfInteger
6609 (<code>IPP_TAG_RANGE</code>) values, the various string tags can be promoted to name
6610 (<code>IPP_TAG_NAME</code>) or nameWithLanguage (<code>IPP_TAG_NAMELANG</code>) values, text
6611 (<code>IPP_TAG_TEXT</code>) values can be promoted to textWithLanguage
6612 (<code>IPP_TAG_TEXTLANG</code>) values, and all values can be demoted to the various
6613 out-of-band value tags such as no-value (<code>IPP_TAG_NOVALUE</code>). All other changes
6614 will be rejected.<br>
6615 <br>
6616 Promoting a string attribute to nameWithLanguage or textWithLanguage adds the language
6617 code in the &quot;attributes-natural-language&quot; attribute or, if not present, the language
6618 code for the current locale.
6619
6620 </p>
6621 <h3 class="function"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="ippSetVersion">ippSetVersion</a></h3>
6622 <p class="description">Set the version number in an IPP message.</p>
6623 <p class="code">
6624 int ippSetVersion (<br>
6625 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp,<br>
6626 &#160;&#160;&#160;&#160;int major,<br>
6627 &#160;&#160;&#160;&#160;int minor<br>
6628 );</p>
6629 <h4 class="parameters">Parameters</h4>
6630 <dl>
6631 <dt>ipp</dt>
6632 <dd class="description">IPP message</dd>
6633 <dt>major</dt>
6634 <dd class="description">Major version number (major.minor)</dd>
6635 <dt>minor</dt>
6636 <dd class="description">Minor version number (major.minor)</dd>
6637 </dl>
6638 <h4 class="returnvalue">Return Value</h4>
6639 <p class="description">1 on success, 0 on failure</p>
6640 <h4 class="discussion">Discussion</h4>
6641 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
6642 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>
6643 <br>
6644 The valid version numbers are currently 1.0, 1.1, 2.0, 2.1, and 2.2.
6645
6646 </p>
6647 <h3 class="function"><span class="info">&#160;CUPS 2.0/OS 10.10&#160;</span><a id="ippStateString">ippStateString</a></h3>
6648 <p class="description">Return the name corresponding to a state value.</p>
6649 <p class="code">
6650 const char *ippStateString (<br>
6651 &#160;&#160;&#160;&#160;<a href="#ipp_state_t">ipp_state_t</a> state<br>
6652 );</p>
6653 <h4 class="parameters">Parameters</h4>
6654 <dl>
6655 <dt>state</dt>
6656 <dd class="description">State value</dd>
6657 </dl>
6658 <h4 class="returnvalue">Return Value</h4>
6659 <p class="description">State name</p>
6660 <h3 class="function"><span class="info">&#160;CUPS 1.4/macOS 10.6&#160;</span><a id="ippTagString">ippTagString</a></h3>
6661 <p class="description">Return the tag name corresponding to a tag value.</p>
6662 <p class="code">
6663 const char *ippTagString (<br>
6664 &#160;&#160;&#160;&#160;ipp_tag_t tag<br>
6665 );</p>
6666 <h4 class="parameters">Parameters</h4>
6667 <dl>
6668 <dt>tag</dt>
6669 <dd class="description">Tag value</dd>
6670 </dl>
6671 <h4 class="returnvalue">Return Value</h4>
6672 <p class="description">Tag name</p>
6673 <h4 class="discussion">Discussion</h4>
6674 <p class="discussion">The returned names are defined in RFC 2911 and 3382.
6675
6676 </p>
6677 <h3 class="function"><span class="info">&#160;CUPS 1.4/macOS 10.6&#160;</span><a id="ippTagValue">ippTagValue</a></h3>
6678 <p class="description">Return the tag value corresponding to a tag name.</p>
6679 <p class="code">
6680 ipp_tag_t ippTagValue (<br>
6681 &#160;&#160;&#160;&#160;const char *name<br>
6682 );</p>
6683 <h4 class="parameters">Parameters</h4>
6684 <dl>
6685 <dt>name</dt>
6686 <dd class="description">Tag name</dd>
6687 </dl>
6688 <h4 class="returnvalue">Return Value</h4>
6689 <p class="description">Tag value</p>
6690 <h4 class="discussion">Discussion</h4>
6691 <p class="discussion">The tag names are defined in RFC 2911 and 3382.
6692
6693 </p>
6694 <h3 class="function"><a id="ippTimeToDate">ippTimeToDate</a></h3>
6695 <p class="description">Convert from UNIX time to RFC 1903 format.</p>
6696 <p class="code">
6697 const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippTimeToDate (<br>
6698 &#160;&#160;&#160;&#160;time_t t<br>
6699 );</p>
6700 <h4 class="parameters">Parameters</h4>
6701 <dl>
6702 <dt>t</dt>
6703 <dd class="description">UNIX time value</dd>
6704 </dl>
6705 <h4 class="returnvalue">Return Value</h4>
6706 <p class="description">RFC-1903 date/time data</p>
6707 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippValidateAttribute">ippValidateAttribute</a></h3>
6708 <p class="description">Validate the contents of an attribute.</p>
6709 <p class="code">
6710 int ippValidateAttribute (<br>
6711 &#160;&#160;&#160;&#160;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br>
6712 );</p>
6713 <h4 class="parameters">Parameters</h4>
6714 <dl>
6715 <dt>attr</dt>
6716 <dd class="description">Attribute</dd>
6717 </dl>
6718 <h4 class="returnvalue">Return Value</h4>
6719 <p class="description">1 if valid, 0 otherwise</p>
6720 <h4 class="discussion">Discussion</h4>
6721 <p class="discussion">This function validates the contents of an attribute based on the name and
6722 value tag. 1 is returned if the attribute is valid, 0 otherwise. On
6723 failure, cupsLastErrorString() is set to a human-readable message.
6724
6725 </p>
6726 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="ippValidateAttributes">ippValidateAttributes</a></h3>
6727 <p class="description">Validate all attributes in an IPP message.</p>
6728 <p class="code">
6729 int ippValidateAttributes (<br>
6730 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br>
6731 );</p>
6732 <h4 class="parameters">Parameters</h4>
6733 <dl>
6734 <dt>ipp</dt>
6735 <dd class="description">IPP message</dd>
6736 </dl>
6737 <h4 class="returnvalue">Return Value</h4>
6738 <p class="description">1 if valid, 0 otherwise</p>
6739 <h4 class="discussion">Discussion</h4>
6740 <p class="discussion">This function validates the contents of the IPP message, including each
6741 attribute. Like <a href="#ippValidateAttribute"><code>ippValidateAttribute</code></a>, cupsLastErrorString() is set
6742 to a human-readable message on failure.
6743
6744 </p>
6745 <h3 class="function"><a id="ippWrite">ippWrite</a></h3>
6746 <p class="description">Write data for an IPP message to a HTTP connection.</p>
6747 <p class="code">
6748 <a href="#ipp_state_t">ipp_state_t</a> ippWrite (<br>
6749 &#160;&#160;&#160;&#160;<a href="#http_t">http_t</a> *http,<br>
6750 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br>
6751 );</p>
6752 <h4 class="parameters">Parameters</h4>
6753 <dl>
6754 <dt>http</dt>
6755 <dd class="description">HTTP connection</dd>
6756 <dt>ipp</dt>
6757 <dd class="description">IPP data</dd>
6758 </dl>
6759 <h4 class="returnvalue">Return Value</h4>
6760 <p class="description">Current state</p>
6761 <h3 class="function"><span class="info">&#160;CUPS 1.1.19/macOS 10.3&#160;</span><a id="ippWriteFile">ippWriteFile</a></h3>
6762 <p class="description">Write data for an IPP message to a file.</p>
6763 <p class="code">
6764 <a href="#ipp_state_t">ipp_state_t</a> ippWriteFile (<br>
6765 &#160;&#160;&#160;&#160;int fd,<br>
6766 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br>
6767 );</p>
6768 <h4 class="parameters">Parameters</h4>
6769 <dl>
6770 <dt>fd</dt>
6771 <dd class="description">HTTP data</dd>
6772 <dt>ipp</dt>
6773 <dd class="description">IPP data</dd>
6774 </dl>
6775 <h4 class="returnvalue">Return Value</h4>
6776 <p class="description">Current state</p>
6777 <h3 class="function"><span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span><a id="ippWriteIO">ippWriteIO</a></h3>
6778 <p class="description">Write data for an IPP message.</p>
6779 <p class="code">
6780 <a href="#ipp_state_t">ipp_state_t</a> ippWriteIO (<br>
6781 &#160;&#160;&#160;&#160;void *dst,<br>
6782 &#160;&#160;&#160;&#160;<a href="#ipp_iocb_t">ipp_iocb_t</a> cb,<br>
6783 &#160;&#160;&#160;&#160;int blocking,<br>
6784 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *parent,<br>
6785 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *ipp<br>
6786 );</p>
6787 <h4 class="parameters">Parameters</h4>
6788 <dl>
6789 <dt>dst</dt>
6790 <dd class="description">Destination</dd>
6791 <dt>cb</dt>
6792 <dd class="description">Write callback function</dd>
6793 <dt>blocking</dt>
6794 <dd class="description">Use blocking IO?</dd>
6795 <dt>parent</dt>
6796 <dd class="description">Parent IPP message</dd>
6797 <dt>ipp</dt>
6798 <dd class="description">IPP data</dd>
6799 </dl>
6800 <h4 class="returnvalue">Return Value</h4>
6801 <p class="description">Current state</p>
6802 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="pwgFormatSizeName">pwgFormatSizeName</a></h3>
6803 <p class="description">Generate a PWG self-describing media size name.</p>
6804 <p class="code">
6805 int pwgFormatSizeName (<br>
6806 &#160;&#160;&#160;&#160;char *keyword,<br>
6807 &#160;&#160;&#160;&#160;size_t keysize,<br>
6808 &#160;&#160;&#160;&#160;const char *prefix,<br>
6809 &#160;&#160;&#160;&#160;const char *name,<br>
6810 &#160;&#160;&#160;&#160;int width,<br>
6811 &#160;&#160;&#160;&#160;int length,<br>
6812 &#160;&#160;&#160;&#160;const char *units<br>
6813 );</p>
6814 <h4 class="parameters">Parameters</h4>
6815 <dl>
6816 <dt>keyword</dt>
6817 <dd class="description">Keyword buffer</dd>
6818 <dt>keysize</dt>
6819 <dd class="description">Size of keyword buffer</dd>
6820 <dt>prefix</dt>
6821 <dd class="description">Prefix for PWG size or <code>NULL</code> for automatic</dd>
6822 <dt>name</dt>
6823 <dd class="description">Size name or <code>NULL</code></dd>
6824 <dt>width</dt>
6825 <dd class="description">Width of page in 2540ths</dd>
6826 <dt>length</dt>
6827 <dd class="description">Length of page in 2540ths</dd>
6828 <dt>units</dt>
6829 <dd class="description">Units - &quot;in&quot;, &quot;mm&quot;, or <code>NULL</code> for automatic</dd>
6830 </dl>
6831 <h4 class="returnvalue">Return Value</h4>
6832 <p class="description">1 on success, 0 on failure</p>
6833 <h4 class="discussion">Discussion</h4>
6834 <p class="discussion">This function generates a PWG self-describing media size name of the form
6835 &quot;prefix_name_WIDTHxLENGTHunits&quot;. The prefix is typically &quot;custom&quot; or &quot;roll&quot;
6836 for user-supplied sizes but can also be &quot;disc&quot;, &quot;iso&quot;, &quot;jis&quot;, &quot;jpn&quot;, &quot;na&quot;,
6837 &quot;oe&quot;, &quot;om&quot;, &quot;prc&quot;, or &quot;roc&quot;. A value of <code>NULL</code> automatically chooses
6838 &quot;oe&quot; or &quot;om&quot; depending on the units.<br>
6839 <br>
6840 The size name may only contain lowercase letters, numbers, &quot;-&quot;, and &quot;.&quot;. If
6841 <code>NULL</code> is passed, the size name will contain the formatted dimensions.<br>
6842 <br>
6843 The width and length are specified in hundredths of millimeters, equivalent
6844 to 1/100000th of a meter or 1/2540th of an inch. The width, length, and
6845 units used for the generated size name are calculated automatically if the
6846 units string is <code>NULL</code>, otherwise inches (&quot;in&quot;) or millimeters (&quot;mm&quot;)
6847 are used.
6848
6849 </p>
6850 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="pwgInitSize">pwgInitSize</a></h3>
6851 <p class="description">Initialize a pwg_size_t structure using IPP Job Template
6852 attributes.</p>
6853 <p class="code">
6854 int pwgInitSize (<br>
6855 &#160;&#160;&#160;&#160;<a href="#pwg_size_t">pwg_size_t</a> *size,<br>
6856 &#160;&#160;&#160;&#160;<a href="#ipp_t">ipp_t</a> *job,<br>
6857 &#160;&#160;&#160;&#160;int *margins_set<br>
6858 );</p>
6859 <h4 class="parameters">Parameters</h4>
6860 <dl>
6861 <dt>size</dt>
6862 <dd class="description">Size to initialize</dd>
6863 <dt>job</dt>
6864 <dd class="description">Job template attributes</dd>
6865 <dt>margins_set</dt>
6866 <dd class="description">1 if margins were set, 0 otherwise</dd>
6867 </dl>
6868 <h4 class="returnvalue">Return Value</h4>
6869 <p class="description">1 if size was initialized, 0 otherwise</p>
6870 <h4 class="discussion">Discussion</h4>
6871 <p class="discussion">This function initializes a pwg_size_t structure from an IPP &quot;media&quot; or
6872 &quot;media-col&quot; attribute in the specified IPP message. 0 is returned if neither
6873 attribute is found in the message or the values are not valid.<br>
6874 <br>
6875 The &quot;margins_set&quot; variable is initialized to 1 if any &quot;media-xxx-margin&quot;
6876 member attribute was specified in the &quot;media-col&quot; Job Template attribute,
6877 otherwise it is initialized to 0.
6878
6879 </p>
6880 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="pwgMediaForLegacy">pwgMediaForLegacy</a></h3>
6881 <p class="description">Find a PWG media size by ISO/IPP legacy name.</p>
6882 <p class="code">
6883 <a href="#pwg_media_t">pwg_media_t</a> *pwgMediaForLegacy (<br>
6884 &#160;&#160;&#160;&#160;const char *legacy<br>
6885 );</p>
6886 <h4 class="parameters">Parameters</h4>
6887 <dl>
6888 <dt>legacy</dt>
6889 <dd class="description">Legacy size name</dd>
6890 </dl>
6891 <h4 class="returnvalue">Return Value</h4>
6892 <p class="description">Matching size or NULL</p>
6893 <h4 class="discussion">Discussion</h4>
6894 <p class="discussion">The &quot;name&quot; argument specifies the legacy ISO media size name, for example
6895 &quot;iso-a4&quot; or &quot;na-letter&quot;.
6896
6897 </p>
6898 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="pwgMediaForPPD">pwgMediaForPPD</a></h3>
6899 <p class="description">Find a PWG media size by Adobe PPD name.</p>
6900 <p class="code">
6901 <a href="#pwg_media_t">pwg_media_t</a> *pwgMediaForPPD (<br>
6902 &#160;&#160;&#160;&#160;const char *ppd<br>
6903 );</p>
6904 <h4 class="parameters">Parameters</h4>
6905 <dl>
6906 <dt>ppd</dt>
6907 <dd class="description">PPD size name</dd>
6908 </dl>
6909 <h4 class="returnvalue">Return Value</h4>
6910 <p class="description">Matching size or NULL</p>
6911 <h4 class="discussion">Discussion</h4>
6912 <p class="discussion">The &quot;ppd&quot; argument specifies an Adobe page size name as defined in Table B.1
6913 of the Adobe PostScript Printer Description File Format Specification Version
6914 4.3.<br>
6915 <br>
6916 If the name is non-standard, the returned PWG media size is stored in
6917 thread-local storage and is overwritten by each call to the function in the
6918 thread. Custom names can be of the form &quot;Custom.WIDTHxLENGTH[units]&quot; or
6919 &quot;WIDTHxLENGTH[units]&quot;.
6920
6921 </p>
6922 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="pwgMediaForPWG">pwgMediaForPWG</a></h3>
6923 <p class="description">Find a PWG media size by 5101.1 self-describing name.</p>
6924 <p class="code">
6925 <a href="#pwg_media_t">pwg_media_t</a> *pwgMediaForPWG (<br>
6926 &#160;&#160;&#160;&#160;const char *pwg<br>
6927 );</p>
6928 <h4 class="parameters">Parameters</h4>
6929 <dl>
6930 <dt>pwg</dt>
6931 <dd class="description">PWG size name</dd>
6932 </dl>
6933 <h4 class="returnvalue">Return Value</h4>
6934 <p class="description">Matching size or NULL</p>
6935 <h4 class="discussion">Discussion</h4>
6936 <p class="discussion">The &quot;pwg&quot; argument specifies a self-describing media size name of the form
6937 &quot;prefix_name_WIDTHxLENGTHunits&quot; as defined in PWG 5101.1.<br>
6938 <br>
6939 If the name is non-standard, the returned PWG media size is stored in
6940 thread-local storage and is overwritten by each call to the function in the
6941 thread.
6942
6943 </p>
6944 <h3 class="function"><span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span><a id="pwgMediaForSize">pwgMediaForSize</a></h3>
6945 <p class="description">Get the PWG media size for the given dimensions.</p>
6946 <p class="code">
6947 <a href="#pwg_media_t">pwg_media_t</a> *pwgMediaForSize (<br>
6948 &#160;&#160;&#160;&#160;int width,<br>
6949 &#160;&#160;&#160;&#160;int length<br>
6950 );</p>
6951 <h4 class="parameters">Parameters</h4>
6952 <dl>
6953 <dt>width</dt>
6954 <dd class="description">Width in hundredths of millimeters</dd>
6955 <dt>length</dt>
6956 <dd class="description">Length in hundredths of millimeters</dd>
6957 </dl>
6958 <h4 class="returnvalue">Return Value</h4>
6959 <p class="description">PWG media name</p>
6960 <h4 class="discussion">Discussion</h4>
6961 <p class="discussion">The &quot;width&quot; and &quot;length&quot; are in hundredths of millimeters, equivalent to
6962 1/100000th of a meter or 1/2540th of an inch.<br>
6963 <br>
6964 If the dimensions are non-standard, the returned PWG media size is stored in
6965 thread-local storage and is overwritten by each call to the function in the
6966 thread.
6967
6968 </p>
6969 <h2 class="title"><a id="TYPES">Data Types</a></h2>
6970 <h3 class="typedef"><a id="cups_client_cert_cb_t"><span class="info">&#160;CUPS 1.5/macOS 10.7&#160;</span>cups_client_cert_cb_t</a></h3>
6971 <p class="description">Client credentials callback
6972 </p>
6973 <p class="code">
6974 typedef int(*)(http_t *http, void *tls, cups_array_t *distinguished_names, void *user_data)cups_client_cert_cb_t;
6975 </p>
6976 <h3 class="typedef"><a id="cups_dest_cb_t"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span>cups_dest_cb_t</a></h3>
6977 <p class="description">Destination enumeration callback
6978 </p>
6979 <p class="code">
6980 typedef int(*)(void *user_data, unsigned flags, <a href="#cups_dest_t">cups_dest_t</a> *dest)cups_dest_cb_t;
6981 </p>
6982 <h3 class="typedef"><a id="cups_dest_t">cups_dest_t</a></h3>
6983 <p class="description">Destination</p>
6984 <p class="code">
6985 typedef struct <a href="#cups_dest_s">cups_dest_s</a> cups_dest_t;
6986 </p>
6987 <h3 class="typedef"><a id="cups_dinfo_t"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span>cups_dinfo_t</a></h3>
6988 <p class="description">Destination capability and status
6989 information </p>
6990 <p class="code">
6991 typedef struct _cups_dinfo_s cups_dinfo_t;
6992 </p>
6993 <h3 class="typedef"><a id="cups_encoding_t">cups_encoding_t</a></h3>
6994 <p class="description">Language Encodings</p>
6995 <p class="code">
6996 typedef enum <a href="#cups_encoding_e">cups_encoding_e</a> cups_encoding_t;
6997 </p>
6998 <h3 class="typedef"><a id="cups_job_t">cups_job_t</a></h3>
6999 <p class="description">Job</p>
7000 <p class="code">
7001 typedef struct <a href="#cups_job_s">cups_job_s</a> cups_job_t;
7002 </p>
7003 <h3 class="typedef"><a id="cups_lang_t">cups_lang_t</a></h3>
7004 <p class="description">Language Cache Structure</p>
7005 <p class="code">
7006 typedef struct <a href="#cups_lang_s">cups_lang_s</a> cups_lang_t;
7007 </p>
7008 <h3 class="typedef"><a id="cups_option_t">cups_option_t</a></h3>
7009 <p class="description">Printer Options</p>
7010 <p class="code">
7011 typedef struct <a href="#cups_option_s">cups_option_s</a> cups_option_t;
7012 </p>
7013 <h3 class="typedef"><a id="cups_password_cb2_t"><span class="info">&#160;CUPS 1.4/macOS 10.6&#160;</span>cups_password_cb2_t</a></h3>
7014 <p class="description">New password callback
7015 </p>
7016 <p class="code">
7017 typedef const char *(*)(const char *prompt, <a href="#http_t">http_t</a> *http, const char *method, const char *resource, void *user_data)cups_password_cb2_t;
7018 </p>
7019 <h3 class="typedef"><a id="cups_ptype_t">cups_ptype_t</a></h3>
7020 <p class="description">Printer type/capability bits</p>
7021 <p class="code">
7022 typedef unsigned cups_ptype_t;
7023 </p>
7024 <h3 class="typedef"><a id="cups_server_cert_cb_t"><span class="info">&#160;CUPS 1.5/macOS 10.7&#160;</span>cups_server_cert_cb_t</a></h3>
7025 <p class="description">Server credentials callback
7026 </p>
7027 <p class="code">
7028 typedef int(*)(http_t *http, void *tls, cups_array_t *certs, void *user_data)cups_server_cert_cb_t;
7029 </p>
7030 <h3 class="typedef"><a id="cups_size_t"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span>cups_size_t</a></h3>
7031 <p class="description">Media Size </p>
7032 <p class="code">
7033 typedef struct <a href="#cups_size_s">cups_size_s</a> cups_size_t;
7034 </p>
7035 <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>
7036 <p class="description">Socket address union, which
7037 makes using IPv6 and other
7038 address types easier and
7039 more portable. </p>
7040 <p class="code">
7041 typedef union _http_addr_u / http_addr_t;
7042 </p>
7043 <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>
7044 <p class="description">Socket address list, which is
7045 used to enumerate all of the
7046 addresses that are associated
7047 with a hostname. </p>
7048 <p class="code">
7049 typedef struct <a href="#http_addrlist_s">http_addrlist_s</a> / http_addrlist_t;
7050 </p>
7051 <h3 class="typedef"><a id="http_auth_t">http_auth_t</a></h3>
7052 <p class="description">HTTP authentication types</p>
7053 <p class="code">
7054 typedef enum <a href="#http_auth_e">http_auth_e</a> http_auth_t;
7055 </p>
7056 <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>
7057 <p class="description">HTTP credential data </p>
7058 <p class="code">
7059 typedef struct <a href="#http_credential_s">http_credential_s</a> http_credential_t;
7060 </p>
7061 <h3 class="typedef"><a id="http_encoding_t">http_encoding_t</a></h3>
7062 <p class="description">HTTP transfer encoding values</p>
7063 <p class="code">
7064 typedef enum <a href="#http_encoding_e">http_encoding_e</a> http_encoding_t;
7065 </p>
7066 <h3 class="typedef"><a id="http_encryption_t">http_encryption_t</a></h3>
7067 <p class="description">HTTP encryption values</p>
7068 <p class="code">
7069 typedef enum <a href="#http_encryption_e">http_encryption_e</a> http_encryption_t;
7070 </p>
7071 <h3 class="typedef"><a id="http_field_t">http_field_t</a></h3>
7072 <p class="description">HTTP field names</p>
7073 <p class="code">
7074 typedef enum <a href="#http_field_e">http_field_e</a> http_field_t;
7075 </p>
7076 <h3 class="typedef"><a id="http_keepalive_t">http_keepalive_t</a></h3>
7077 <p class="description">HTTP keep-alive values</p>
7078 <p class="code">
7079 typedef enum <a href="#http_keepalive_e">http_keepalive_e</a> http_keepalive_t;
7080 </p>
7081 <h3 class="typedef"><a id="http_state_t">http_state_t</a></h3>
7082 <p class="description">HTTP state values; states
7083 are server-oriented...</p>
7084 <p class="code">
7085 typedef enum <a href="#http_state_e">http_state_e</a> http_state_t;
7086 </p>
7087 <h3 class="typedef"><a id="http_t">http_t</a></h3>
7088 <p class="description">HTTP connection type</p>
7089 <p class="code">
7090 typedef struct _http_s http_t;
7091 </p>
7092 <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>
7093 <p class="description">HTTP timeout callback </p>
7094 <p class="code">
7095 typedef int(*)(http_t *http, void *user_data)http_timeout_cb_t;
7096 </p>
7097 <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>
7098 <p class="description">Level of trust for credentials </p>
7099 <p class="code">
7100 typedef enum <a href="#http_trust_e">http_trust_e</a> http_trust_t;
7101 </p>
7102 <h3 class="typedef"><a id="http_uri_coding_t">http_uri_coding_t</a></h3>
7103 <p class="description">URI en/decode flags</p>
7104 <p class="code">
7105 typedef enum <a href="#http_uri_coding_e">http_uri_coding_e</a> http_uri_coding_t;
7106 </p>
7107 <h3 class="typedef"><a id="http_uri_status_t"><span class="info">&#160;CUPS 1.2&#160;</span>http_uri_status_t</a></h3>
7108 <p class="description">URI separation status </p>
7109 <p class="code">
7110 typedef enum <a href="#http_uri_status_e">http_uri_status_e</a> http_uri_status_t;
7111 </p>
7112 <h3 class="typedef"><a id="http_version_t">http_version_t</a></h3>
7113 <p class="description">HTTP version numbers</p>
7114 <p class="code">
7115 typedef enum <a href="#http_version_e">http_version_e</a> http_version_t;
7116 </p>
7117 <h3 class="typedef"><a id="ipp_attribute_t">ipp_attribute_t</a></h3>
7118 <p class="description">IPP attribute</p>
7119 <p class="code">
7120 typedef struct _ipp_attribute_s ipp_attribute_t;
7121 </p>
7122 <h3 class="typedef"><a id="ipp_copycb_t">ipp_copycb_t</a></h3>
7123 <p class="description">The following structures are PRIVATE starting with CUPS 1.6/macOS 10.8.
7124 Please use the new accessor functions available in CUPS 1.6 and later, as
7125 these definitions will be moved to a private header file in a future release.</p>
7126 <p class="code">
7127 typedef int(*)(void *context, <a href="#ipp_t">ipp_t</a> *dst, <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr)ipp_copycb_t;
7128 </p>
7129 <h3 class="typedef"><a id="ipp_dstate_t">ipp_dstate_t</a></h3>
7130 <p class="description">Document states</p>
7131 <p class="code">
7132 typedef enum <a href="#ipp_dstate_e">ipp_dstate_e</a> ipp_dstate_t;
7133 </p>
7134 <h3 class="typedef"><a id="ipp_finish_t">ipp_finish_t</a></h3>
7135 <p class="description">Job collation types</p>
7136 <p class="code">
7137 typedef enum <a href="#ipp_finishings_e">ipp_finishings_e</a> ipp_finish_t;
7138 </p>
7139 <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>
7140 <p class="description">IPP IO Callback Function </p>
7141 <p class="code">
7142 typedef ssize_t(*)(void *context, <a href="#ipp_uchar_t">ipp_uchar_t</a> *buffer, size_t bytes) ipp_iocb_t;
7143 </p>
7144 <h3 class="typedef"><a id="ipp_jcollate_t">ipp_jcollate_t</a></h3>
7145 <p class="description">Job collation types</p>
7146 <p class="code">
7147 typedef enum <a href="#ipp_jcollate_e">ipp_jcollate_e</a> ipp_jcollate_t;
7148 </p>
7149 <h3 class="typedef"><a id="ipp_orient_t">ipp_orient_t</a></h3>
7150 <p class="description">Orientation values</p>
7151 <p class="code">
7152 typedef enum <a href="#ipp_orient_e">ipp_orient_e</a> ipp_orient_t;
7153 </p>
7154 <h3 class="typedef"><a id="ipp_pstate_t">ipp_pstate_t</a></h3>
7155 <p class="description">Printer states</p>
7156 <p class="code">
7157 typedef enum <a href="#ipp_pstate_e">ipp_pstate_e</a> ipp_pstate_t;
7158 </p>
7159 <h3 class="typedef"><a id="ipp_quality_t">ipp_quality_t</a></h3>
7160 <p class="description">Qualities</p>
7161 <p class="code">
7162 typedef enum <a href="#ipp_quality_e">ipp_quality_e</a> ipp_quality_t;
7163 </p>
7164 <h3 class="typedef"><a id="ipp_res_t">ipp_res_t</a></h3>
7165 <p class="description">Resolution units</p>
7166 <p class="code">
7167 typedef enum <a href="#ipp_res_e">ipp_res_e</a> ipp_res_t;
7168 </p>
7169 <h3 class="typedef"><a id="ipp_state_t">ipp_state_t</a></h3>
7170 <p class="description">IPP states</p>
7171 <p class="code">
7172 typedef enum <a href="#ipp_state_e">ipp_state_e</a> ipp_state_t;
7173 </p>
7174 <h3 class="typedef"><a id="ipp_t">ipp_t</a></h3>
7175 <p class="description">IPP request/response data</p>
7176 <p class="code">
7177 typedef struct _ipp_s ipp_t;
7178 </p>
7179 <h3 class="typedef"><a id="ipp_uchar_t">ipp_uchar_t</a></h3>
7180 <p class="description">Unsigned 8-bit integer/character</p>
7181 <p class="code">
7182 typedef unsigned char ipp_uchar_t;
7183 </p>
7184 <h3 class="typedef"><a id="pwg_map_t">pwg_map_t</a></h3>
7185 <p class="description">Map element - PPD to/from PWG</p>
7186 <p class="code">
7187 typedef struct <a href="#pwg_map_s">pwg_map_s</a> pwg_map_t;
7188 </p>
7189 <h3 class="typedef"><a id="pwg_media_t">pwg_media_t</a></h3>
7190 <p class="description">Common media size data</p>
7191 <p class="code">
7192 typedef struct <a href="#pwg_media_s">pwg_media_s</a> pwg_media_t;
7193 </p>
7194 <h3 class="typedef"><a id="pwg_size_t">pwg_size_t</a></h3>
7195 <p class="description">Size element - PPD to/from PWG</p>
7196 <p class="code">
7197 typedef struct <a href="#pwg_size_s">pwg_size_s</a> pwg_size_t;
7198 </p>
7199 <h2 class="title"><a id="STRUCTURES">Structures</a></h2>
7200 <h3 class="struct"><a id="cups_dest_s">cups_dest_s</a></h3>
7201 <p class="description">Destination</p>
7202 <p class="code">struct cups_dest_s {<br>
7203 &#160;&#160;&#160;&#160;char *name, *instance;<br>
7204 &#160;&#160;&#160;&#160;int is_default;<br>
7205 &#160;&#160;&#160;&#160;int num_options;<br>
7206 &#160;&#160;&#160;&#160;<a href="#cups_option_t">cups_option_t</a> *options;<br>
7207 };</p>
7208 <h4 class="members">Members</h4>
7209 <dl>
7210 <dt>instance </dt>
7211 <dd class="description">Local instance name or NULL</dd>
7212 <dt>is_default </dt>
7213 <dd class="description">Is this printer the default?</dd>
7214 <dt>num_options </dt>
7215 <dd class="description">Number of options</dd>
7216 <dt>options </dt>
7217 <dd class="description">Options</dd>
7218 </dl>
7219 <h3 class="struct"><a id="cups_job_s">cups_job_s</a></h3>
7220 <p class="description">Job</p>
7221 <p class="code">struct cups_job_s {<br>
7222 &#160;&#160;&#160;&#160;time_t completed_time;<br>
7223 &#160;&#160;&#160;&#160;time_t creation_time;<br>
7224 &#160;&#160;&#160;&#160;char *dest;<br>
7225 &#160;&#160;&#160;&#160;char *format;<br>
7226 &#160;&#160;&#160;&#160;int id;<br>
7227 &#160;&#160;&#160;&#160;int priority;<br>
7228 &#160;&#160;&#160;&#160;time_t processing_time;<br>
7229 &#160;&#160;&#160;&#160;int size;<br>
7230 &#160;&#160;&#160;&#160;ipp_jstate_t state;<br>
7231 &#160;&#160;&#160;&#160;char *title;<br>
7232 &#160;&#160;&#160;&#160;char *user;<br>
7233 };</p>
7234 <h4 class="members">Members</h4>
7235 <dl>
7236 <dt>completed_time </dt>
7237 <dd class="description">Time the job was completed</dd>
7238 <dt>creation_time </dt>
7239 <dd class="description">Time the job was created</dd>
7240 <dt>dest </dt>
7241 <dd class="description">Printer or class name</dd>
7242 <dt>format </dt>
7243 <dd class="description">Document format</dd>
7244 <dt>id </dt>
7245 <dd class="description">The job ID</dd>
7246 <dt>priority </dt>
7247 <dd class="description">Priority (1-100)</dd>
7248 <dt>processing_time </dt>
7249 <dd class="description">Time the job was processed</dd>
7250 <dt>size </dt>
7251 <dd class="description">Size in kilobytes</dd>
7252 <dt>state </dt>
7253 <dd class="description">Job state</dd>
7254 <dt>title </dt>
7255 <dd class="description">Title/job name</dd>
7256 <dt>user </dt>
7257 <dd class="description">User that submitted the job</dd>
7258 </dl>
7259 <h3 class="struct"><a id="cups_lang_s">cups_lang_s</a></h3>
7260 <p class="description">Language Cache Structure</p>
7261 <p class="code">struct cups_lang_s {<br>
7262 &#160;&#160;&#160;&#160;<a href="#cups_encoding_t">cups_encoding_t</a> encoding;<br>
7263 &#160;&#160;&#160;&#160;char language[16];<br>
7264 &#160;&#160;&#160;&#160;struct <a href="#cups_lang_s">cups_lang_s</a> *next;<br>
7265 &#160;&#160;&#160;&#160;int used;<br>
7266 };</p>
7267 <h4 class="members">Members</h4>
7268 <dl>
7269 <dt>encoding </dt>
7270 <dd class="description">Text encoding</dd>
7271 <dt>language[16] </dt>
7272 <dd class="description">Language/locale name</dd>
7273 <dt>next </dt>
7274 <dd class="description">Next language in cache</dd>
7275 <dt>used </dt>
7276 <dd class="description">Number of times this entry has been used.</dd>
7277 </dl>
7278 <h3 class="struct"><a id="cups_option_s">cups_option_s</a></h3>
7279 <p class="description">Printer Options</p>
7280 <p class="code">struct cups_option_s {<br>
7281 &#160;&#160;&#160;&#160;char *name;<br>
7282 &#160;&#160;&#160;&#160;char *value;<br>
7283 };</p>
7284 <h4 class="members">Members</h4>
7285 <dl>
7286 <dt>name </dt>
7287 <dd class="description">Name of option</dd>
7288 <dt>value </dt>
7289 <dd class="description">Value of option</dd>
7290 </dl>
7291 <h3 class="struct"><span class="info">&#160;CUPS 1.6/macOS 10.8&#160;</span><a id="cups_size_s">cups_size_s</a></h3>
7292 <p class="description">Media Size </p>
7293 <p class="code">struct cups_size_s {<br>
7294 &#160;&#160;&#160;&#160;char media[128];<br>
7295 &#160;&#160;&#160;&#160;int width, length, bottom, left, right, top;<br>
7296 };</p>
7297 <h4 class="members">Members</h4>
7298 <dl>
7299 <dt>media[128] </dt>
7300 <dd class="description">Media name to use</dd>
7301 <dt>top </dt>
7302 <dd class="description">Top margin in hundredths of
7303 millimeters</dd>
7304 </dl>
7305 <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>
7306 <p class="description">Socket address list, which is
7307 used to enumerate all of the
7308 addresses that are associated
7309 with a hostname. </p>
7310 <p class="code">struct http_addrlist_s {<br>
7311 &#160;&#160;&#160;&#160;<a href="#http_addr_t">http_addr_t</a> addr;<br>
7312 &#160;&#160;&#160;&#160;struct <a href="#http_addrlist_s">http_addrlist_s</a> *next;<br>
7313 };</p>
7314 <h4 class="members">Members</h4>
7315 <dl>
7316 <dt>addr </dt>
7317 <dd class="description">Address</dd>
7318 <dt>next </dt>
7319 <dd class="description">Pointer to next address in list</dd>
7320 </dl>
7321 <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>
7322 <p class="description">HTTP credential data </p>
7323 <p class="code">struct http_credential_s {<br>
7324 &#160;&#160;&#160;&#160;void *data;<br>
7325 &#160;&#160;&#160;&#160;size_t datalen;<br>
7326 };</p>
7327 <h4 class="members">Members</h4>
7328 <dl>
7329 <dt>data </dt>
7330 <dd class="description">Pointer to credential data</dd>
7331 <dt>datalen </dt>
7332 <dd class="description">Credential length</dd>
7333 </dl>
7334 <h3 class="struct"><a id="pwg_map_s">pwg_map_s</a></h3>
7335 <p class="description">Map element - PPD to/from PWG</p>
7336 <p class="code">struct pwg_map_s {<br>
7337 &#160;&#160;&#160;&#160;char *pwg, *ppd;<br>
7338 };</p>
7339 <h4 class="members">Members</h4>
7340 <dl>
7341 <dt>ppd </dt>
7342 <dd class="description">PPD option keyword</dd>
7343 </dl>
7344 <h3 class="struct"><a id="pwg_media_s">pwg_media_s</a></h3>
7345 <p class="description">Common media size data</p>
7346 <p class="code">struct pwg_media_s {<br>
7347 &#160;&#160;&#160;&#160;int width, length;<br>
7348 &#160;&#160;&#160;&#160;const char *pwg, *legacy, *ppd;<br>
7349 };</p>
7350 <h4 class="members">Members</h4>
7351 <dl>
7352 <dt>length </dt>
7353 <dd class="description">Length in 2540ths</dd>
7354 <dt>ppd </dt>
7355 <dd class="description">Standard Adobe PPD name</dd>
7356 </dl>
7357 <h3 class="struct"><a id="pwg_size_s">pwg_size_s</a></h3>
7358 <p class="description">Size element - PPD to/from PWG</p>
7359 <p class="code">struct pwg_size_s {<br>
7360 &#160;&#160;&#160;&#160;<a href="#pwg_map_t">pwg_map_t</a> map;<br>
7361 &#160;&#160;&#160;&#160;int width, length, left, bottom, right, top;<br>
7362 };</p>
7363 <h4 class="members">Members</h4>
7364 <dl>
7365 <dt>map </dt>
7366 <dd class="description">Map element</dd>
7367 <dt>top </dt>
7368 <dd class="description">Top margin in 2540ths</dd>
7369 </dl>
7370 <h2 class="title"><a id="ENUMERATIONS">Constants</a></h2>
7371 <h3 class="enumeration"><a id="cups_encoding_e">cups_encoding_e</a></h3>
7372 <p class="description">Language Encodings</p>
7373 <h4 class="constants">Constants</h4>
7374 <dl>
7375 <dt>CUPS_EUC_CN </dt>
7376 <dd class="description">EUC Simplified Chinese</dd>
7377 <dt>CUPS_EUC_JP </dt>
7378 <dd class="description">EUC Japanese</dd>
7379 <dt>CUPS_EUC_KR </dt>
7380 <dd class="description">EUC Korean</dd>
7381 <dt>CUPS_EUC_TW </dt>
7382 <dd class="description">EUC Traditional Chinese</dd>
7383 <dt>CUPS_ISO8859_1 </dt>
7384 <dd class="description">ISO-8859-1</dd>
7385 <dt>CUPS_ISO8859_10 </dt>
7386 <dd class="description">ISO-8859-10</dd>
7387 <dt>CUPS_ISO8859_11 </dt>
7388 <dd class="description">ISO-8859-11</dd>
7389 <dt>CUPS_ISO8859_13 </dt>
7390 <dd class="description">ISO-8859-13</dd>
7391 <dt>CUPS_ISO8859_14 </dt>
7392 <dd class="description">ISO-8859-14</dd>
7393 <dt>CUPS_ISO8859_15 </dt>
7394 <dd class="description">ISO-8859-15</dd>
7395 <dt>CUPS_ISO8859_16 </dt>
7396 <dd class="description">ISO-8859-16</dd>
7397 <dt>CUPS_ISO8859_2 </dt>
7398 <dd class="description">ISO-8859-2</dd>
7399 <dt>CUPS_ISO8859_3 </dt>
7400 <dd class="description">ISO-8859-3</dd>
7401 <dt>CUPS_ISO8859_4 </dt>
7402 <dd class="description">ISO-8859-4</dd>
7403 <dt>CUPS_ISO8859_5 </dt>
7404 <dd class="description">ISO-8859-5</dd>
7405 <dt>CUPS_ISO8859_6 </dt>
7406 <dd class="description">ISO-8859-6</dd>
7407 <dt>CUPS_ISO8859_7 </dt>
7408 <dd class="description">ISO-8859-7</dd>
7409 <dt>CUPS_ISO8859_8 </dt>
7410 <dd class="description">ISO-8859-8</dd>
7411 <dt>CUPS_ISO8859_9 </dt>
7412 <dd class="description">ISO-8859-9</dd>
7413 <dt>CUPS_JIS_X0213 </dt>
7414 <dd class="description">JIS X0213 aka Shift JIS</dd>
7415 <dt>CUPS_KOI8_R </dt>
7416 <dd class="description">KOI-8-R</dd>
7417 <dt>CUPS_KOI8_U </dt>
7418 <dd class="description">KOI-8-U</dd>
7419 <dt>CUPS_MAC_ROMAN </dt>
7420 <dd class="description">MacRoman</dd>
7421 <dt>CUPS_US_ASCII </dt>
7422 <dd class="description">US ASCII</dd>
7423 <dt>CUPS_UTF8 </dt>
7424 <dd class="description">UTF-8</dd>
7425 <dt>CUPS_WINDOWS_1250 </dt>
7426 <dd class="description">CP-1250</dd>
7427 <dt>CUPS_WINDOWS_1251 </dt>
7428 <dd class="description">CP-1251</dd>
7429 <dt>CUPS_WINDOWS_1252 </dt>
7430 <dd class="description">CP-1252</dd>
7431 <dt>CUPS_WINDOWS_1253 </dt>
7432 <dd class="description">CP-1253</dd>
7433 <dt>CUPS_WINDOWS_1254 </dt>
7434 <dd class="description">CP-1254</dd>
7435 <dt>CUPS_WINDOWS_1255 </dt>
7436 <dd class="description">CP-1255</dd>
7437 <dt>CUPS_WINDOWS_1256 </dt>
7438 <dd class="description">CP-1256</dd>
7439 <dt>CUPS_WINDOWS_1257 </dt>
7440 <dd class="description">CP-1257</dd>
7441 <dt>CUPS_WINDOWS_1258 </dt>
7442 <dd class="description">CP-1258</dd>
7443 <dt>CUPS_WINDOWS_1361 </dt>
7444 <dd class="description">Korean Johab</dd>
7445 <dt>CUPS_WINDOWS_874 </dt>
7446 <dd class="description">CP-874</dd>
7447 <dt>CUPS_WINDOWS_932 </dt>
7448 <dd class="description">Japanese JIS X0208-1990</dd>
7449 <dt>CUPS_WINDOWS_936 </dt>
7450 <dd class="description">Simplified Chinese GB 2312-80</dd>
7451 <dt>CUPS_WINDOWS_949 </dt>
7452 <dd class="description">Korean KS C5601-1992</dd>
7453 <dt>CUPS_WINDOWS_950 </dt>
7454 <dd class="description">Traditional Chinese Big Five</dd>
7455 </dl>
7456 <h3 class="enumeration"><a id="cups_ptype_e">cups_ptype_e</a></h3>
7457 <p class="description">Printer type/capability bit
7458 constants</p>
7459 <h4 class="constants">Constants</h4>
7460 <dl>
7461 <dt>CUPS_PRINTER_3D <span class="info">&#160;DEPRECATED&#160;</span></dt>
7462 <dd class="description">Printer with 3D capabilities </dd>
7463 <dt>CUPS_PRINTER_AUTHENTICATED <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></dt>
7464 <dd class="description">Printer requires authentication
7465 </dd>
7466 <dt>CUPS_PRINTER_BIND </dt>
7467 <dd class="description">Can bind output</dd>
7468 <dt>CUPS_PRINTER_BW </dt>
7469 <dd class="description">Can do B&amp;W printing</dd>
7470 <dt>CUPS_PRINTER_CLASS </dt>
7471 <dd class="description">Printer class</dd>
7472 <dt>CUPS_PRINTER_COLLATE </dt>
7473 <dd class="description">Can quickly collate copies</dd>
7474 <dt>CUPS_PRINTER_COLOR </dt>
7475 <dd class="description">Can do color printing</dd>
7476 <dt>CUPS_PRINTER_COMMANDS <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></dt>
7477 <dd class="description">Printer supports maintenance commands
7478 </dd>
7479 <dt>CUPS_PRINTER_COPIES </dt>
7480 <dd class="description">Can do copies in hardware</dd>
7481 <dt>CUPS_PRINTER_COVER </dt>
7482 <dd class="description">Can cover output</dd>
7483 <dt>CUPS_PRINTER_DEFAULT </dt>
7484 <dd class="description">Default printer on network</dd>
7485 <dt>CUPS_PRINTER_DELETE <span class="info">&#160;DEPRECATED&#160;</span></dt>
7486 <dd class="description">Delete printer
7487 </dd>
7488 <dt>CUPS_PRINTER_DISCOVERED <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></dt>
7489 <dd class="description">Printer was discovered </dd>
7490 <dt>CUPS_PRINTER_DUPLEX </dt>
7491 <dd class="description">Can do two-sided printing</dd>
7492 <dt>CUPS_PRINTER_FAX </dt>
7493 <dd class="description">Fax queue</dd>
7494 <dt>CUPS_PRINTER_LARGE </dt>
7495 <dd class="description">Can print on D/E/A1/A0-size media</dd>
7496 <dt>CUPS_PRINTER_LOCAL </dt>
7497 <dd class="description">Local printer or class</dd>
7498 <dt>CUPS_PRINTER_MEDIUM </dt>
7499 <dd class="description">Can print on Tabloid/B/C/A3/A2-size media</dd>
7500 <dt>CUPS_PRINTER_MFP <span class="info">&#160;CUPS 1.4/macOS 10.6&#160;</span></dt>
7501 <dd class="description">Printer with scanning capabilities
7502 </dd>
7503 <dt>CUPS_PRINTER_NOT_SHARED <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></dt>
7504 <dd class="description">Printer is not shared
7505 </dd>
7506 <dt>CUPS_PRINTER_PUNCH </dt>
7507 <dd class="description">Can punch output</dd>
7508 <dt>CUPS_PRINTER_REJECTING </dt>
7509 <dd class="description">Printer is rejecting jobs</dd>
7510 <dt>CUPS_PRINTER_REMOTE </dt>
7511 <dd class="description">Remote printer or class</dd>
7512 <dt>CUPS_PRINTER_SCANNER <span class="info">&#160;CUPS 1.4/macOS 10.6&#160;</span></dt>
7513 <dd class="description">Scanner-only device
7514 </dd>
7515 <dt>CUPS_PRINTER_SMALL </dt>
7516 <dd class="description">Can print on Letter/Legal/A4-size media</dd>
7517 <dt>CUPS_PRINTER_SORT </dt>
7518 <dd class="description">Can sort output</dd>
7519 <dt>CUPS_PRINTER_STAPLE </dt>
7520 <dd class="description">Can staple output</dd>
7521 <dt>CUPS_PRINTER_VARIABLE </dt>
7522 <dd class="description">Can print on rolls and custom-size media</dd>
7523 </dl>
7524 <h3 class="enumeration"><a id="http_auth_e">http_auth_e</a></h3>
7525 <p class="description">HTTP authentication types</p>
7526 <h4 class="constants">Constants</h4>
7527 <dl>
7528 <dt>HTTP_AUTH_BASIC </dt>
7529 <dd class="description">Basic authentication in use</dd>
7530 <dt>HTTP_AUTH_MD5 </dt>
7531 <dd class="description">Digest authentication in use</dd>
7532 <dt>HTTP_AUTH_MD5_INT </dt>
7533 <dd class="description">Digest authentication in use for body</dd>
7534 <dt>HTTP_AUTH_MD5_SESS </dt>
7535 <dd class="description">MD5-session authentication in use</dd>
7536 <dt>HTTP_AUTH_MD5_SESS_INT </dt>
7537 <dd class="description">MD5-session authentication in use for body</dd>
7538 <dt>HTTP_AUTH_NEGOTIATE <span class="info">&#160;CUPS 1.3/macOS 10.5&#160;</span></dt>
7539 <dd class="description">GSSAPI authentication in use </dd>
7540 <dt>HTTP_AUTH_NONE </dt>
7541 <dd class="description">No authentication in use</dd>
7542 </dl>
7543 <h3 class="enumeration"><a id="http_encoding_e">http_encoding_e</a></h3>
7544 <p class="description">HTTP transfer encoding values</p>
7545 <h4 class="constants">Constants</h4>
7546 <dl>
7547 <dt>HTTP_ENCODING_CHUNKED </dt>
7548 <dd class="description">Data is chunked</dd>
7549 <dt>HTTP_ENCODING_FIELDS </dt>
7550 <dd class="description">Sending HTTP fields</dd>
7551 <dt>HTTP_ENCODING_LENGTH </dt>
7552 <dd class="description">Data is sent with Content-Length</dd>
7553 </dl>
7554 <h3 class="enumeration"><a id="http_encryption_e">http_encryption_e</a></h3>
7555 <p class="description">HTTP encryption values</p>
7556 <h4 class="constants">Constants</h4>
7557 <dl>
7558 <dt>HTTP_ENCRYPTION_ALWAYS </dt>
7559 <dd class="description">Always encrypt (SSL)</dd>
7560 <dt>HTTP_ENCRYPTION_IF_REQUESTED </dt>
7561 <dd class="description">Encrypt if requested (TLS upgrade)</dd>
7562 <dt>HTTP_ENCRYPTION_NEVER </dt>
7563 <dd class="description">Never encrypt</dd>
7564 <dt>HTTP_ENCRYPTION_REQUIRED </dt>
7565 <dd class="description">Encryption is required (TLS upgrade)</dd>
7566 </dl>
7567 <h3 class="enumeration"><a id="http_field_e">http_field_e</a></h3>
7568 <p class="description">HTTP field names</p>
7569 <h4 class="constants">Constants</h4>
7570 <dl>
7571 <dt>HTTP_FIELD_ACCEPT_ENCODING <span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span></dt>
7572 <dd class="description">Accepting-Encoding field </dd>
7573 <dt>HTTP_FIELD_ACCEPT_LANGUAGE </dt>
7574 <dd class="description">Accept-Language field</dd>
7575 <dt>HTTP_FIELD_ACCEPT_RANGES </dt>
7576 <dd class="description">Accept-Ranges field</dd>
7577 <dt>HTTP_FIELD_ALLOW <span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span></dt>
7578 <dd class="description">Allow field </dd>
7579 <dt>HTTP_FIELD_AUTHORIZATION </dt>
7580 <dd class="description">Authorization field</dd>
7581 <dt>HTTP_FIELD_CONNECTION </dt>
7582 <dd class="description">Connection field</dd>
7583 <dt>HTTP_FIELD_CONTENT_ENCODING </dt>
7584 <dd class="description">Content-Encoding field</dd>
7585 <dt>HTTP_FIELD_CONTENT_LANGUAGE </dt>
7586 <dd class="description">Content-Language field</dd>
7587 <dt>HTTP_FIELD_CONTENT_LENGTH </dt>
7588 <dd class="description">Content-Length field</dd>
7589 <dt>HTTP_FIELD_CONTENT_LOCATION </dt>
7590 <dd class="description">Content-Location field</dd>
7591 <dt>HTTP_FIELD_CONTENT_MD5 </dt>
7592 <dd class="description">Content-MD5 field</dd>
7593 <dt>HTTP_FIELD_CONTENT_RANGE </dt>
7594 <dd class="description">Content-Range field</dd>
7595 <dt>HTTP_FIELD_CONTENT_TYPE </dt>
7596 <dd class="description">Content-Type field</dd>
7597 <dt>HTTP_FIELD_CONTENT_VERSION </dt>
7598 <dd class="description">Content-Version field</dd>
7599 <dt>HTTP_FIELD_DATE </dt>
7600 <dd class="description">Date field</dd>
7601 <dt>HTTP_FIELD_HOST </dt>
7602 <dd class="description">Host field</dd>
7603 <dt>HTTP_FIELD_IF_MODIFIED_SINCE </dt>
7604 <dd class="description">If-Modified-Since field</dd>
7605 <dt>HTTP_FIELD_IF_UNMODIFIED_SINCE </dt>
7606 <dd class="description">If-Unmodified-Since field</dd>
7607 <dt>HTTP_FIELD_KEEP_ALIVE </dt>
7608 <dd class="description">Keep-Alive field</dd>
7609 <dt>HTTP_FIELD_LAST_MODIFIED </dt>
7610 <dd class="description">Last-Modified field</dd>
7611 <dt>HTTP_FIELD_LINK </dt>
7612 <dd class="description">Link field</dd>
7613 <dt>HTTP_FIELD_LOCATION </dt>
7614 <dd class="description">Location field</dd>
7615 <dt>HTTP_FIELD_MAX </dt>
7616 <dd class="description">Maximum field index</dd>
7617 <dt>HTTP_FIELD_RANGE </dt>
7618 <dd class="description">Range field</dd>
7619 <dt>HTTP_FIELD_REFERER </dt>
7620 <dd class="description">Referer field</dd>
7621 <dt>HTTP_FIELD_RETRY_AFTER </dt>
7622 <dd class="description">Retry-After field</dd>
7623 <dt>HTTP_FIELD_SERVER <span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span></dt>
7624 <dd class="description">Server field </dd>
7625 <dt>HTTP_FIELD_TRANSFER_ENCODING </dt>
7626 <dd class="description">Transfer-Encoding field</dd>
7627 <dt>HTTP_FIELD_UNKNOWN </dt>
7628 <dd class="description">Unknown field</dd>
7629 <dt>HTTP_FIELD_UPGRADE </dt>
7630 <dd class="description">Upgrade field</dd>
7631 <dt>HTTP_FIELD_USER_AGENT </dt>
7632 <dd class="description">User-Agent field</dd>
7633 <dt>HTTP_FIELD_WWW_AUTHENTICATE </dt>
7634 <dd class="description">WWW-Authenticate field</dd>
7635 </dl>
7636 <h3 class="enumeration"><a id="http_keepalive_e">http_keepalive_e</a></h3>
7637 <p class="description">HTTP keep-alive values</p>
7638 <h4 class="constants">Constants</h4>
7639 <dl>
7640 <dt>HTTP_KEEPALIVE_OFF </dt>
7641 <dd class="description">No keep alive support</dd>
7642 <dt>HTTP_KEEPALIVE_ON </dt>
7643 <dd class="description">Use keep alive</dd>
7644 </dl>
7645 <h3 class="enumeration"><a id="http_state_e">http_state_e</a></h3>
7646 <p class="description">HTTP state values; states
7647 are server-oriented...</p>
7648 <h4 class="constants">Constants</h4>
7649 <dl>
7650 <dt>HTTP_STATE_CONNECT </dt>
7651 <dd class="description">CONNECT command, waiting for blank line</dd>
7652 <dt>HTTP_STATE_DELETE </dt>
7653 <dd class="description">DELETE command, waiting for blank line</dd>
7654 <dt>HTTP_STATE_ERROR </dt>
7655 <dd class="description">Error on socket</dd>
7656 <dt>HTTP_STATE_GET </dt>
7657 <dd class="description">GET command, waiting for blank line</dd>
7658 <dt>HTTP_STATE_GET_SEND </dt>
7659 <dd class="description">GET command, sending data</dd>
7660 <dt>HTTP_STATE_HEAD </dt>
7661 <dd class="description">HEAD command, waiting for blank line</dd>
7662 <dt>HTTP_STATE_OPTIONS </dt>
7663 <dd class="description">OPTIONS command, waiting for blank line</dd>
7664 <dt>HTTP_STATE_POST </dt>
7665 <dd class="description">POST command, waiting for blank line</dd>
7666 <dt>HTTP_STATE_POST_RECV </dt>
7667 <dd class="description">POST command, receiving data</dd>
7668 <dt>HTTP_STATE_POST_SEND </dt>
7669 <dd class="description">POST command, sending data</dd>
7670 <dt>HTTP_STATE_PUT </dt>
7671 <dd class="description">PUT command, waiting for blank line</dd>
7672 <dt>HTTP_STATE_PUT_RECV </dt>
7673 <dd class="description">PUT command, receiving data</dd>
7674 <dt>HTTP_STATE_STATUS </dt>
7675 <dd class="description">Command complete, sending status</dd>
7676 <dt>HTTP_STATE_TRACE </dt>
7677 <dd class="description">TRACE command, waiting for blank line</dd>
7678 <dt>HTTP_STATE_UNKNOWN_METHOD <span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span></dt>
7679 <dd class="description">Unknown request method, waiting for blank line </dd>
7680 <dt>HTTP_STATE_UNKNOWN_VERSION <span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span></dt>
7681 <dd class="description">Unknown request method, waiting for blank line </dd>
7682 <dt>HTTP_STATE_WAITING </dt>
7683 <dd class="description">Waiting for command</dd>
7684 </dl>
7685 <h3 class="enumeration"><a id="http_status_e">http_status_e</a></h3>
7686 <p class="description">HTTP status codes</p>
7687 <h4 class="constants">Constants</h4>
7688 <dl>
7689 <dt>HTTP_STATUS_ACCEPTED </dt>
7690 <dd class="description">DELETE command was successful</dd>
7691 <dt>HTTP_STATUS_BAD_GATEWAY </dt>
7692 <dd class="description">Bad gateway</dd>
7693 <dt>HTTP_STATUS_BAD_REQUEST </dt>
7694 <dd class="description">Bad request</dd>
7695 <dt>HTTP_STATUS_CONFLICT </dt>
7696 <dd class="description">Request is self-conflicting</dd>
7697 <dt>HTTP_STATUS_CONTINUE </dt>
7698 <dd class="description">Everything OK, keep going...</dd>
7699 <dt>HTTP_STATUS_CREATED </dt>
7700 <dd class="description">PUT command was successful</dd>
7701 <dt>HTTP_STATUS_CUPS_AUTHORIZATION_CANCELED <span class="info">&#160;CUPS 1.4&#160;</span></dt>
7702 <dd class="description">User canceled authorization </dd>
7703 <dt>HTTP_STATUS_CUPS_PKI_ERROR <span class="info">&#160;CUPS 1.5/macOS 10.7&#160;</span></dt>
7704 <dd class="description">Error negotiating a secure connection </dd>
7705 <dt>HTTP_STATUS_ERROR </dt>
7706 <dd class="description">An error response from httpXxxx()</dd>
7707 <dt>HTTP_STATUS_EXPECTATION_FAILED </dt>
7708 <dd class="description">The expectation given in an Expect header field was not met</dd>
7709 <dt>HTTP_STATUS_FORBIDDEN </dt>
7710 <dd class="description">Forbidden to access this URI</dd>
7711 <dt>HTTP_STATUS_GATEWAY_TIMEOUT </dt>
7712 <dd class="description">Gateway connection timed out</dd>
7713 <dt>HTTP_STATUS_GONE </dt>
7714 <dd class="description">Server has gone away</dd>
7715 <dt>HTTP_STATUS_LENGTH_REQUIRED </dt>
7716 <dd class="description">A content length or encoding is required</dd>
7717 <dt>HTTP_STATUS_METHOD_NOT_ALLOWED </dt>
7718 <dd class="description">Method is not allowed</dd>
7719 <dt>HTTP_STATUS_MOVED_PERMANENTLY </dt>
7720 <dd class="description">Document has moved permanently</dd>
7721 <dt>HTTP_STATUS_MOVED_TEMPORARILY </dt>
7722 <dd class="description">Document has moved temporarily</dd>
7723 <dt>HTTP_STATUS_MULTIPLE_CHOICES </dt>
7724 <dd class="description">Multiple files match request</dd>
7725 <dt>HTTP_STATUS_NONE <span class="info">&#160;CUPS 1.7/macOS 10.9&#160;</span></dt>
7726 <dd class="description">No Expect value </dd>
7727 <dt>HTTP_STATUS_NOT_ACCEPTABLE </dt>
7728 <dd class="description">Not Acceptable</dd>
7729 <dt>HTTP_STATUS_NOT_AUTHORITATIVE </dt>
7730 <dd class="description">Information isn't authoritative</dd>
7731 <dt>HTTP_STATUS_NOT_FOUND </dt>
7732 <dd class="description">URI was not found</dd>
7733 <dt>HTTP_STATUS_NOT_IMPLEMENTED </dt>
7734 <dd class="description">Feature not implemented</dd>
7735 <dt>HTTP_STATUS_NOT_MODIFIED </dt>
7736 <dd class="description">File not modified</dd>
7737 <dt>HTTP_STATUS_NOT_SUPPORTED </dt>
7738 <dd class="description">HTTP version not supported</dd>
7739 <dt>HTTP_STATUS_NO_CONTENT </dt>
7740 <dd class="description">Successful command, no new data</dd>
7741 <dt>HTTP_STATUS_OK </dt>
7742 <dd class="description">OPTIONS/GET/HEAD/POST/TRACE command was successful</dd>
7743 <dt>HTTP_STATUS_PARTIAL_CONTENT </dt>
7744 <dd class="description">Only a partial file was received/sent</dd>
7745 <dt>HTTP_STATUS_PAYMENT_REQUIRED </dt>
7746 <dd class="description">Payment required</dd>
7747 <dt>HTTP_STATUS_PRECONDITION </dt>
7748 <dd class="description">Precondition failed</dd>
7749 <dt>HTTP_STATUS_PROXY_AUTHENTICATION </dt>
7750 <dd class="description">Proxy Authentication is Required</dd>
7751 <dt>HTTP_STATUS_REQUESTED_RANGE </dt>
7752 <dd class="description">The requested range is not satisfiable</dd>
7753 <dt>HTTP_STATUS_REQUEST_TIMEOUT </dt>
7754 <dd class="description">Request timed out</dd>
7755 <dt>HTTP_STATUS_REQUEST_TOO_LARGE </dt>
7756 <dd class="description">Request entity too large</dd>
7757 <dt>HTTP_STATUS_RESET_CONTENT </dt>
7758 <dd class="description">Content was reset/recreated</dd>
7759 <dt>HTTP_STATUS_SEE_OTHER </dt>
7760 <dd class="description">See this other link...</dd>
7761 <dt>HTTP_STATUS_SERVER_ERROR </dt>
7762 <dd class="description">Internal server error</dd>
7763 <dt>HTTP_STATUS_SERVICE_UNAVAILABLE </dt>
7764 <dd class="description">Service is unavailable</dd>
7765 <dt>HTTP_STATUS_SWITCHING_PROTOCOLS </dt>
7766 <dd class="description">HTTP upgrade to TLS/SSL</dd>
7767 <dt>HTTP_STATUS_UNAUTHORIZED </dt>
7768 <dd class="description">Unauthorized to access host</dd>
7769 <dt>HTTP_STATUS_UNSUPPORTED_MEDIATYPE </dt>
7770 <dd class="description">The requested media type is unsupported</dd>
7771 <dt>HTTP_STATUS_UPGRADE_REQUIRED </dt>
7772 <dd class="description">Upgrade to SSL/TLS required</dd>
7773 <dt>HTTP_STATUS_URI_TOO_LONG </dt>
7774 <dd class="description">URI too long</dd>
7775 <dt>HTTP_STATUS_USE_PROXY </dt>
7776 <dd class="description">Must use a proxy to access this URI</dd>
7777 </dl>
7778 <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>
7779 <p class="description">Level of trust for credentials </p>
7780 <h4 class="constants">Constants</h4>
7781 <dl>
7782 <dt>HTTP_TRUST_CHANGED </dt>
7783 <dd class="description">Credentials have changed</dd>
7784 <dt>HTTP_TRUST_EXPIRED </dt>
7785 <dd class="description">Credentials are expired</dd>
7786 <dt>HTTP_TRUST_INVALID </dt>
7787 <dd class="description">Credentials are invalid</dd>
7788 <dt>HTTP_TRUST_OK </dt>
7789 <dd class="description">Credentials are OK/trusted</dd>
7790 <dt>HTTP_TRUST_RENEWED </dt>
7791 <dd class="description">Credentials have been renewed</dd>
7792 <dt>HTTP_TRUST_UNKNOWN </dt>
7793 <dd class="description">Credentials are unknown/new</dd>
7794 </dl>
7795 <h3 class="enumeration"><a id="http_uri_coding_e">http_uri_coding_e</a></h3>
7796 <p class="description">URI en/decode flags</p>
7797 <h4 class="constants">Constants</h4>
7798 <dl>
7799 <dt>HTTP_URI_CODING_ALL </dt>
7800 <dd class="description">En/decode everything</dd>
7801 <dt>HTTP_URI_CODING_HOSTNAME </dt>
7802 <dd class="description">En/decode the hostname portion</dd>
7803 <dt>HTTP_URI_CODING_MOST </dt>
7804 <dd class="description">En/decode all but the query</dd>
7805 <dt>HTTP_URI_CODING_NONE </dt>
7806 <dd class="description">Don't en/decode anything</dd>
7807 <dt>HTTP_URI_CODING_QUERY </dt>
7808 <dd class="description">En/decode the query portion</dd>
7809 <dt>HTTP_URI_CODING_RESOURCE </dt>
7810 <dd class="description">En/decode the resource portion</dd>
7811 <dt>HTTP_URI_CODING_RFC6874 </dt>
7812 <dd class="description">Use RFC 6874 address format</dd>
7813 <dt>HTTP_URI_CODING_USERNAME </dt>
7814 <dd class="description">En/decode the username portion</dd>
7815 </dl>
7816 <h3 class="enumeration"><a id="http_uri_status_e"><span class="info">&#160;CUPS 1.2&#160;</span>http_uri_status_e</a></h3>
7817 <p class="description">URI separation status </p>
7818 <h4 class="constants">Constants</h4>
7819 <dl>
7820 <dt>HTTP_URI_STATUS_BAD_ARGUMENTS </dt>
7821 <dd class="description">Bad arguments to function (error)</dd>
7822 <dt>HTTP_URI_STATUS_BAD_HOSTNAME </dt>
7823 <dd class="description">Bad hostname in URI (error)</dd>
7824 <dt>HTTP_URI_STATUS_BAD_PORT </dt>
7825 <dd class="description">Bad port number in URI (error)</dd>
7826 <dt>HTTP_URI_STATUS_BAD_RESOURCE </dt>
7827 <dd class="description">Bad resource in URI (error)</dd>
7828 <dt>HTTP_URI_STATUS_BAD_SCHEME </dt>
7829 <dd class="description">Bad scheme in URI (error)</dd>
7830 <dt>HTTP_URI_STATUS_BAD_URI </dt>
7831 <dd class="description">Bad/empty URI (error)</dd>
7832 <dt>HTTP_URI_STATUS_BAD_USERNAME </dt>
7833 <dd class="description">Bad username in URI (error)</dd>
7834 <dt>HTTP_URI_STATUS_MISSING_RESOURCE </dt>
7835 <dd class="description">Missing resource in URI (warning)</dd>
7836 <dt>HTTP_URI_STATUS_MISSING_SCHEME </dt>
7837 <dd class="description">Missing scheme in URI (warning)</dd>
7838 <dt>HTTP_URI_STATUS_OK </dt>
7839 <dd class="description">URI decoded OK</dd>
7840 <dt>HTTP_URI_STATUS_OVERFLOW </dt>
7841 <dd class="description">URI buffer for httpAssembleURI is too small</dd>
7842 <dt>HTTP_URI_STATUS_UNKNOWN_SCHEME </dt>
7843 <dd class="description">Unknown scheme in URI (warning)</dd>
7844 </dl>
7845 <h3 class="enumeration"><a id="http_version_e">http_version_e</a></h3>
7846 <p class="description">HTTP version numbers</p>
7847 <h4 class="constants">Constants</h4>
7848 <dl>
7849 <dt>HTTP_VERSION_0_9 </dt>
7850 <dd class="description">HTTP/0.9</dd>
7851 <dt>HTTP_VERSION_1_0 </dt>
7852 <dd class="description">HTTP/1.0</dd>
7853 <dt>HTTP_VERSION_1_1 </dt>
7854 <dd class="description">HTTP/1.1</dd>
7855 </dl>
7856 <h3 class="enumeration"><a id="ipp_dstate_e">ipp_dstate_e</a></h3>
7857 <p class="description">Document states</p>
7858 <h4 class="constants">Constants</h4>
7859 <dl>
7860 <dt>IPP_DOCUMENT_ABORTED </dt>
7861 <dd class="description">Document is aborted</dd>
7862 <dt>IPP_DOCUMENT_CANCELED </dt>
7863 <dd class="description">Document is canceled</dd>
7864 <dt>IPP_DOCUMENT_COMPLETED </dt>
7865 <dd class="description">Document is completed</dd>
7866 <dt>IPP_DOCUMENT_PENDING </dt>
7867 <dd class="description">Document is pending</dd>
7868 <dt>IPP_DOCUMENT_PROCESSING </dt>
7869 <dd class="description">Document is processing</dd>
7870 </dl>
7871 <h3 class="enumeration"><a id="ipp_finishings_e">ipp_finishings_e</a></h3>
7872 <p class="description">Finishings</p>
7873 <h4 class="constants">Constants</h4>
7874 <dl>
7875 <dt>IPP_FINISHINGS_BALE </dt>
7876 <dd class="description">Bale (any type)</dd>
7877 <dt>IPP_FINISHINGS_BIND </dt>
7878 <dd class="description">Bind</dd>
7879 <dt>IPP_FINISHINGS_BIND_BOTTOM </dt>
7880 <dd class="description">Bind on bottom</dd>
7881 <dt>IPP_FINISHINGS_BIND_LEFT </dt>
7882 <dd class="description">Bind on left</dd>
7883 <dt>IPP_FINISHINGS_BIND_RIGHT </dt>
7884 <dd class="description">Bind on right</dd>
7885 <dt>IPP_FINISHINGS_BIND_TOP </dt>
7886 <dd class="description">Bind on top</dd>
7887 <dt>IPP_FINISHINGS_BOOKLET_MAKER </dt>
7888 <dd class="description">Fold to make booklet</dd>
7889 <dt>IPP_FINISHINGS_COAT </dt>
7890 <dd class="description">Apply protective liquid or powder coating</dd>
7891 <dt>IPP_FINISHINGS_COVER </dt>
7892 <dd class="description">Add cover</dd>
7893 <dt>IPP_FINISHINGS_CUPS_FOLD_ACCORDIAN </dt>
7894 <dd class="description">Accordian-fold the paper vertically into four sections</dd>
7895 <dt>IPP_FINISHINGS_CUPS_FOLD_DOUBLE_GATE </dt>
7896 <dd class="description">Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically</dd>
7897 <dt>IPP_FINISHINGS_CUPS_FOLD_GATE </dt>
7898 <dd class="description">Fold the top and bottom quarters of the paper towards the midline</dd>
7899 <dt>IPP_FINISHINGS_CUPS_FOLD_HALF </dt>
7900 <dd class="description">Fold the paper in half vertically</dd>
7901 <dt>IPP_FINISHINGS_CUPS_FOLD_HALF_Z </dt>
7902 <dd class="description">Fold the paper in half horizontally, then Z-fold the paper vertically</dd>
7903 <dt>IPP_FINISHINGS_CUPS_FOLD_LEFT_GATE </dt>
7904 <dd class="description">Fold the top quarter of the paper towards the midline</dd>
7905 <dt>IPP_FINISHINGS_CUPS_FOLD_LETTER </dt>
7906 <dd class="description">Fold the paper into three sections vertically; sometimes also known as a C fold</dd>
7907 <dt>IPP_FINISHINGS_CUPS_FOLD_PARALLEL </dt>
7908 <dd class="description">Fold the paper in half vertically two times, yielding four sections</dd>
7909 <dt>IPP_FINISHINGS_CUPS_FOLD_POSTER </dt>
7910 <dd class="description">Fold the paper in half horizontally and vertically; sometimes also called a cross fold</dd>
7911 <dt>IPP_FINISHINGS_CUPS_FOLD_RIGHT_GATE </dt>
7912 <dd class="description">Fold the bottom quarter of the paper towards the midline</dd>
7913 <dt>IPP_FINISHINGS_CUPS_FOLD_Z </dt>
7914 <dd class="description">Fold the paper vertically into three sections, forming a Z</dd>
7915 <dt>IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_LEFT </dt>
7916 <dd class="description">Punch 1 hole bottom left</dd>
7917 <dt>IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_RIGHT </dt>
7918 <dd class="description">Punch 1 hole bottom right</dd>
7919 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_BOTTOM </dt>
7920 <dd class="description">Punch 2 holes bottom edge</dd>
7921 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_LEFT </dt>
7922 <dd class="description">Punch 2 holes left side</dd>
7923 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_RIGHT </dt>
7924 <dd class="description">Punch 2 holes right side</dd>
7925 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_TOP </dt>
7926 <dd class="description">Punch 2 holes top edge</dd>
7927 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_BOTTOM </dt>
7928 <dd class="description">Punch 4 holes bottom edge</dd>
7929 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_LEFT </dt>
7930 <dd class="description">Punch 4 holes left side</dd>
7931 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_RIGHT </dt>
7932 <dd class="description">Punch 4 holes right side</dd>
7933 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_TOP </dt>
7934 <dd class="description">Punch 4 holes top edge</dd>
7935 <dt>IPP_FINISHINGS_CUPS_PUNCH_TOP_LEFT </dt>
7936 <dd class="description">Punch 1 hole top left</dd>
7937 <dt>IPP_FINISHINGS_CUPS_PUNCH_TOP_RIGHT </dt>
7938 <dd class="description">Punch 1 hole top right</dd>
7939 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_BOTTOM </dt>
7940 <dd class="description">Punch 3 holes bottom edge</dd>
7941 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_LEFT </dt>
7942 <dd class="description">Punch 3 holes left side</dd>
7943 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_RIGHT </dt>
7944 <dd class="description">Punch 3 holes right side</dd>
7945 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_TOP </dt>
7946 <dd class="description">Punch 3 holes top edge</dd>
7947 <dt>IPP_FINISHINGS_EDGE_STITCH </dt>
7948 <dd class="description">Stitch along any side</dd>
7949 <dt>IPP_FINISHINGS_EDGE_STITCH_BOTTOM </dt>
7950 <dd class="description">Stitch along bottom edge</dd>
7951 <dt>IPP_FINISHINGS_EDGE_STITCH_LEFT </dt>
7952 <dd class="description">Stitch along left side</dd>
7953 <dt>IPP_FINISHINGS_EDGE_STITCH_RIGHT </dt>
7954 <dd class="description">Stitch along right side</dd>
7955 <dt>IPP_FINISHINGS_EDGE_STITCH_TOP </dt>
7956 <dd class="description">Stitch along top edge</dd>
7957 <dt>IPP_FINISHINGS_FOLD </dt>
7958 <dd class="description">Fold (any type)</dd>
7959 <dt>IPP_FINISHINGS_FOLD_ACCORDIAN </dt>
7960 <dd class="description">Accordian-fold the paper vertically into four sections</dd>
7961 <dt>IPP_FINISHINGS_FOLD_DOUBLE_GATE </dt>
7962 <dd class="description">Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically</dd>
7963 <dt>IPP_FINISHINGS_FOLD_ENGINEERING_Z </dt>
7964 <dd class="description">Fold the paper vertically into two small sections and one larger, forming an elongated Z</dd>
7965 <dt>IPP_FINISHINGS_FOLD_GATE </dt>
7966 <dd class="description">Fold the top and bottom quarters of the paper towards the midline</dd>
7967 <dt>IPP_FINISHINGS_FOLD_HALF </dt>
7968 <dd class="description">Fold the paper in half vertically</dd>
7969 <dt>IPP_FINISHINGS_FOLD_HALF_Z </dt>
7970 <dd class="description">Fold the paper in half horizontally, then Z-fold the paper vertically</dd>
7971 <dt>IPP_FINISHINGS_FOLD_LEFT_GATE </dt>
7972 <dd class="description">Fold the top quarter of the paper towards the midline</dd>
7973 <dt>IPP_FINISHINGS_FOLD_LETTER </dt>
7974 <dd class="description">Fold the paper into three sections vertically; sometimes also known as a C fold</dd>
7975 <dt>IPP_FINISHINGS_FOLD_PARALLEL </dt>
7976 <dd class="description">Fold the paper in half vertically two times, yielding four sections</dd>
7977 <dt>IPP_FINISHINGS_FOLD_POSTER </dt>
7978 <dd class="description">Fold the paper in half horizontally and vertically; sometimes also called a cross fold</dd>
7979 <dt>IPP_FINISHINGS_FOLD_RIGHT_GATE </dt>
7980 <dd class="description">Fold the bottom quarter of the paper towards the midline</dd>
7981 <dt>IPP_FINISHINGS_FOLD_Z </dt>
7982 <dd class="description">Fold the paper vertically into three sections, forming a Z</dd>
7983 <dt>IPP_FINISHINGS_JOG_OFFSET </dt>
7984 <dd class="description">Offset for binding (any type)</dd>
7985 <dt>IPP_FINISHINGS_LAMINATE </dt>
7986 <dd class="description">Apply protective (solid) material</dd>
7987 <dt>IPP_FINISHINGS_NONE </dt>
7988 <dd class="description">No finishing</dd>
7989 <dt>IPP_FINISHINGS_PUNCH </dt>
7990 <dd class="description">Punch (any location/count)</dd>
7991 <dt>IPP_FINISHINGS_PUNCH_BOTTOM_LEFT </dt>
7992 <dd class="description">Punch 1 hole bottom left</dd>
7993 <dt>IPP_FINISHINGS_PUNCH_BOTTOM_RIGHT </dt>
7994 <dd class="description">Punch 1 hole bottom right</dd>
7995 <dt>IPP_FINISHINGS_PUNCH_DUAL_BOTTOM </dt>
7996 <dd class="description">Punch 2 holes bottom edge</dd>
7997 <dt>IPP_FINISHINGS_PUNCH_DUAL_LEFT </dt>
7998 <dd class="description">Punch 2 holes left side</dd>
7999 <dt>IPP_FINISHINGS_PUNCH_DUAL_RIGHT </dt>
8000 <dd class="description">Punch 2 holes right side</dd>
8001 <dt>IPP_FINISHINGS_PUNCH_DUAL_TOP </dt>
8002 <dd class="description">Punch 2 holes top edge</dd>
8003 <dt>IPP_FINISHINGS_PUNCH_MULTIPLE_BOTTOM </dt>
8004 <dd class="description">Pucnh multiple holes bottom edge</dd>
8005 <dt>IPP_FINISHINGS_PUNCH_MULTIPLE_LEFT </dt>
8006 <dd class="description">Pucnh multiple holes left side</dd>
8007 <dt>IPP_FINISHINGS_PUNCH_MULTIPLE_RIGHT </dt>
8008 <dd class="description">Pucnh multiple holes right side</dd>
8009 <dt>IPP_FINISHINGS_PUNCH_MULTIPLE_TOP </dt>
8010 <dd class="description">Pucnh multiple holes top edge</dd>
8011 <dt>IPP_FINISHINGS_PUNCH_QUAD_BOTTOM </dt>
8012 <dd class="description">Punch 4 holes bottom edge</dd>
8013 <dt>IPP_FINISHINGS_PUNCH_QUAD_LEFT </dt>
8014 <dd class="description">Punch 4 holes left side</dd>
8015 <dt>IPP_FINISHINGS_PUNCH_QUAD_RIGHT </dt>
8016 <dd class="description">Punch 4 holes right side</dd>
8017 <dt>IPP_FINISHINGS_PUNCH_QUAD_TOP </dt>
8018 <dd class="description">Punch 4 holes top edge</dd>
8019 <dt>IPP_FINISHINGS_PUNCH_TOP_LEFT </dt>
8020 <dd class="description">Punch 1 hole top left</dd>
8021 <dt>IPP_FINISHINGS_PUNCH_TOP_RIGHT </dt>
8022 <dd class="description">Punch 1 hole top right</dd>
8023 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_BOTTOM </dt>
8024 <dd class="description">Punch 3 holes bottom edge</dd>
8025 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_LEFT </dt>
8026 <dd class="description">Punch 3 holes left side</dd>
8027 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_RIGHT </dt>
8028 <dd class="description">Punch 3 holes right side</dd>
8029 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_TOP </dt>
8030 <dd class="description">Punch 3 holes top edge</dd>
8031 <dt>IPP_FINISHINGS_SADDLE_STITCH </dt>
8032 <dd class="description">Staple interior</dd>
8033 <dt>IPP_FINISHINGS_STAPLE </dt>
8034 <dd class="description">Staple (any location)</dd>
8035 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_LEFT </dt>
8036 <dd class="description">Staple bottom left corner</dd>
8037 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT </dt>
8038 <dd class="description">Staple bottom right corner</dd>
8039 <dt>IPP_FINISHINGS_STAPLE_DUAL_BOTTOM </dt>
8040 <dd class="description">Two staples on bottom</dd>
8041 <dt>IPP_FINISHINGS_STAPLE_DUAL_LEFT </dt>
8042 <dd class="description">Two staples on left</dd>
8043 <dt>IPP_FINISHINGS_STAPLE_DUAL_RIGHT </dt>
8044 <dd class="description">Two staples on right</dd>
8045 <dt>IPP_FINISHINGS_STAPLE_DUAL_TOP </dt>
8046 <dd class="description">Two staples on top</dd>
8047 <dt>IPP_FINISHINGS_STAPLE_TOP_LEFT </dt>
8048 <dd class="description">Staple top left corner</dd>
8049 <dt>IPP_FINISHINGS_STAPLE_TOP_RIGHT </dt>
8050 <dd class="description">Staple top right corner</dd>
8051 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_BOTTOM </dt>
8052 <dd class="description">Three staples on bottom</dd>
8053 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_LEFT </dt>
8054 <dd class="description">Three staples on left</dd>
8055 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_RIGHT </dt>
8056 <dd class="description">Three staples on right</dd>
8057 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_TOP </dt>
8058 <dd class="description">Three staples on top</dd>
8059 <dt>IPP_FINISHINGS_TRIM </dt>
8060 <dd class="description">Trim (any type)</dd>
8061 <dt>IPP_FINISHINGS_TRIM_AFTER_COPIES </dt>
8062 <dd class="description">Trim output after each copy</dd>
8063 <dt>IPP_FINISHINGS_TRIM_AFTER_DOCUMENTS </dt>
8064 <dd class="description">Trim output after each document</dd>
8065 <dt>IPP_FINISHINGS_TRIM_AFTER_JOB </dt>
8066 <dd class="description">Trim output after job</dd>
8067 <dt>IPP_FINISHINGS_TRIM_AFTER_PAGES </dt>
8068 <dd class="description">Trim output after each page</dd>
8069 </dl>
8070 <h3 class="enumeration"><a id="ipp_jcollate_e">ipp_jcollate_e</a></h3>
8071 <p class="description">Job collation types</p>
8072 <h4 class="constants">Constants</h4>
8073 <dl>
8074 <dt>IPP_JCOLLATE_COLLATED_DOCUMENTS </dt>
8075 <dt>IPP_JCOLLATE_UNCOLLATED_DOCUMENTS </dt>
8076 <dt>IPP_JCOLLATE_UNCOLLATED_SHEETS </dt>
8077 </dl>
8078 <h3 class="enumeration"><a id="ipp_jstate_e">ipp_jstate_e</a></h3>
8079 <p class="description">Job states</p>
8080 <h4 class="constants">Constants</h4>
8081 <dl>
8082 <dt>IPP_JSTATE_ABORTED </dt>
8083 <dd class="description">Job has aborted due to error</dd>
8084 <dt>IPP_JSTATE_CANCELED </dt>
8085 <dd class="description">Job has been canceled</dd>
8086 <dt>IPP_JSTATE_COMPLETED </dt>
8087 <dd class="description">Job has completed successfully</dd>
8088 <dt>IPP_JSTATE_HELD </dt>
8089 <dd class="description">Job is held for printing</dd>
8090 <dt>IPP_JSTATE_PENDING </dt>
8091 <dd class="description">Job is waiting to be printed</dd>
8092 <dt>IPP_JSTATE_PROCESSING </dt>
8093 <dd class="description">Job is currently printing</dd>
8094 <dt>IPP_JSTATE_STOPPED </dt>
8095 <dd class="description">Job has been stopped</dd>
8096 </dl>
8097 <h3 class="enumeration"><a id="ipp_op_e">ipp_op_e</a></h3>
8098 <p class="description">IPP operations</p>
8099 <h4 class="constants">Constants</h4>
8100 <dl>
8101 <dt>IPP_OP_ACKNOWLEDGE_DOCUMENT </dt>
8102 <dd class="description">Acknowledge-Document</dd>
8103 <dt>IPP_OP_ACKNOWLEDGE_IDENTIFY_PRINTER </dt>
8104 <dd class="description">Acknowledge-Identify-Printer</dd>
8105 <dt>IPP_OP_ACKNOWLEDGE_JOB </dt>
8106 <dd class="description">Acknowledge-Job</dd>
8107 <dt>IPP_OP_ACTIVATE_PRINTER </dt>
8108 <dd class="description">Start a printer</dd>
8109 <dt>IPP_OP_ADD_DOCUMENT_IMAGES </dt>
8110 <dd class="description">Add-Document-Images</dd>
8111 <dt>IPP_OP_CANCEL_CURRENT_JOB </dt>
8112 <dd class="description">Cancel the current job</dd>
8113 <dt>IPP_OP_CANCEL_DOCUMENT </dt>
8114 <dd class="description">Cancel-Document</dd>
8115 <dt>IPP_OP_CANCEL_JOB </dt>
8116 <dd class="description">Cancel a job</dd>
8117 <dt>IPP_OP_CANCEL_JOBS </dt>
8118 <dd class="description">Cancel-Jobs</dd>
8119 <dt>IPP_OP_CANCEL_MY_JOBS </dt>
8120 <dd class="description">Cancel-My-Jobs</dd>
8121 <dt>IPP_OP_CANCEL_SUBSCRIPTION <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></dt>
8122 <dd class="description">Cancel a subscription </dd>
8123 <dt>IPP_OP_CLOSE_JOB </dt>
8124 <dd class="description">Close-Job</dd>
8125 <dt>IPP_OP_CREATE_JOB </dt>
8126 <dd class="description">Create an empty print job</dd>
8127 <dt>IPP_OP_CREATE_JOB_SUBSCRIPTIONS <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></dt>
8128 <dd class="description">Create one of more job subscriptions </dd>
8129 <dt>IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></dt>
8130 <dd class="description">Create one or more printer subscriptions </dd>
8131 <dt>IPP_OP_CUPS_ACCEPT_JOBS </dt>
8132 <dd class="description">Accept new jobs on a printer</dd>
8133 <dt>IPP_OP_CUPS_ADD_MODIFY_CLASS </dt>
8134 <dd class="description">Add or modify a class</dd>
8135 <dt>IPP_OP_CUPS_ADD_MODIFY_PRINTER </dt>
8136 <dd class="description">Add or modify a printer</dd>
8137 <dt>IPP_OP_CUPS_AUTHENTICATE_JOB <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></dt>
8138 <dd class="description">Authenticate a job </dd>
8139 <dt>IPP_OP_CUPS_CREATE_LOCAL_PRINTER <span class="info">&#160;CUPS 2.2&#160;</span></dt>
8140 <dd class="description">Create a local (temporary) printer </dd>
8141 <dt>IPP_OP_CUPS_DELETE_CLASS </dt>
8142 <dd class="description">Delete a class</dd>
8143 <dt>IPP_OP_CUPS_DELETE_PRINTER </dt>
8144 <dd class="description">Delete a printer</dd>
8145 <dt>IPP_OP_CUPS_GET_CLASSES <span class="info">&#160;DEPRECATED&#160;</span></dt>
8146 <dd class="description">Get a list of classes </dd>
8147 <dt>IPP_OP_CUPS_GET_DEFAULT </dt>
8148 <dd class="description">Get the default printer</dd>
8149 <dt>IPP_OP_CUPS_GET_DEVICES <span class="info">&#160;DEPRECATED&#160;</span></dt>
8150 <dd class="description">Get a list of supported devices </dd>
8151 <dt>IPP_OP_CUPS_GET_DOCUMENT <span class="info">&#160;CUPS 1.4/macOS 10.6&#160;</span></dt>
8152 <dd class="description">Get a document file </dd>
8153 <dt>IPP_OP_CUPS_GET_PPD <span class="info">&#160;DEPRECATED&#160;</span></dt>
8154 <dd class="description">Get a PPD file </dd>
8155 <dt>IPP_OP_CUPS_GET_PPDS <span class="info">&#160;DEPRECATED&#160;</span></dt>
8156 <dd class="description">Get a list of supported drivers </dd>
8157 <dt>IPP_OP_CUPS_GET_PRINTERS </dt>
8158 <dd class="description">Get a list of printers and/or classes</dd>
8159 <dt>IPP_OP_CUPS_INVALID </dt>
8160 <dd class="description">Invalid operation name for <a href="#ippOpValue"><code>ippOpValue</code></a></dd>
8161 <dt>IPP_OP_CUPS_MOVE_JOB </dt>
8162 <dd class="description">Move a job to a different printer</dd>
8163 <dt>IPP_OP_CUPS_REJECT_JOBS </dt>
8164 <dd class="description">Reject new jobs on a printer</dd>
8165 <dt>IPP_OP_CUPS_SET_DEFAULT </dt>
8166 <dd class="description">Set the default printer</dd>
8167 <dt>IPP_OP_DEACTIVATE_PRINTER </dt>
8168 <dd class="description">Stop a printer</dd>
8169 <dt>IPP_OP_DELETE_DOCUMENT </dt>
8170 <dd class="description">Delete-Document</dd>
8171 <dt>IPP_OP_DEREGISTER_OUTPUT_DEVICE </dt>
8172 <dd class="description">Deregister-Output-Device</dd>
8173 <dt>IPP_OP_DISABLE_PRINTER </dt>
8174 <dd class="description">Stop a printer</dd>
8175 <dt>IPP_OP_ENABLE_PRINTER </dt>
8176 <dd class="description">Start a printer</dd>
8177 <dt>IPP_OP_FETCH_DOCUMENT </dt>
8178 <dd class="description">Fetch-Document</dd>
8179 <dt>IPP_OP_FETCH_JOB </dt>
8180 <dd class="description">Fetch-Job</dd>
8181 <dt>IPP_OP_GET_DOCUMENTS </dt>
8182 <dd class="description">Get-Documents</dd>
8183 <dt>IPP_OP_GET_DOCUMENT_ATTRIBUTES </dt>
8184 <dd class="description">Get-Document-Attributes</dd>
8185 <dt>IPP_OP_GET_JOBS </dt>
8186 <dd class="description">Get a list of jobs</dd>
8187 <dt>IPP_OP_GET_JOB_ATTRIBUTES </dt>
8188 <dd class="description">Get job attributes</dd>
8189 <dt>IPP_OP_GET_NEXT_DOCUMENT_DATA </dt>
8190 <dd class="description">Get-Next-Document-Data</dd>
8191 <dt>IPP_OP_GET_NOTIFICATIONS <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></dt>
8192 <dd class="description">Get notification events </dd>
8193 <dt>IPP_OP_GET_OUTPUT_DEVICE_ATTRIBUTES </dt>
8194 <dd class="description">Get-Output-Device-Attributes</dd>
8195 <dt>IPP_OP_GET_PRINTER_ATTRIBUTES </dt>
8196 <dd class="description">Get printer attributes</dd>
8197 <dt>IPP_OP_GET_PRINTER_SUPPORTED_VALUES </dt>
8198 <dd class="description">Get supported attribute values</dd>
8199 <dt>IPP_OP_GET_SUBSCRIPTIONS <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></dt>
8200 <dd class="description">Get list of subscriptions </dd>
8201 <dt>IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></dt>
8202 <dd class="description">Get subscription attributes </dd>
8203 <dt>IPP_OP_HOLD_JOB </dt>
8204 <dd class="description">Hold a job for printing</dd>
8205 <dt>IPP_OP_HOLD_NEW_JOBS </dt>
8206 <dd class="description">Hold new jobs</dd>
8207 <dt>IPP_OP_IDENTIFY_PRINTER </dt>
8208 <dd class="description">Identify-Printer</dd>
8209 <dt>IPP_OP_PAUSE_PRINTER </dt>
8210 <dd class="description">Stop a printer</dd>
8211 <dt>IPP_OP_PAUSE_PRINTER_AFTER_CURRENT_JOB </dt>
8212 <dd class="description">Stop printer after the current job</dd>
8213 <dt>IPP_OP_PRINT_JOB </dt>
8214 <dd class="description">Print a single file</dd>
8215 <dt>IPP_OP_PRINT_URI </dt>
8216 <dd class="description">Print a single URL</dd>
8217 <dt>IPP_OP_PROMOTE_JOB </dt>
8218 <dd class="description">Promote a job to print sooner</dd>
8219 <dt>IPP_OP_PURGE_JOBS </dt>
8220 <dd class="description">Cancel all jobs</dd>
8221 <dt>IPP_OP_RELEASE_HELD_NEW_JOBS </dt>
8222 <dd class="description">Release new jobs</dd>
8223 <dt>IPP_OP_RELEASE_JOB </dt>
8224 <dd class="description">Release a job for printing</dd>
8225 <dt>IPP_OP_RENEW_SUBSCRIPTION <span class="info">&#160;CUPS 1.2/macOS 10.5&#160;</span></dt>
8226 <dd class="description">Renew a printer subscription </dd>
8227 <dt>IPP_OP_REPROCESS_JOB </dt>
8228 <dd class="description">Reprint a job</dd>
8229 <dt>IPP_OP_RESTART_JOB </dt>
8230 <dd class="description">Reprint a job</dd>
8231 <dt>IPP_OP_RESTART_PRINTER </dt>
8232 <dd class="description">Restart a printer</dd>
8233 <dt>IPP_OP_RESUBMIT_JOB </dt>
8234 <dd class="description">Resubmit-Job</dd>
8235 <dt>IPP_OP_RESUME_JOB </dt>
8236 <dd class="description">Resume the current job</dd>
8237 <dt>IPP_OP_RESUME_PRINTER </dt>
8238 <dd class="description">Start a printer</dd>
8239 <dt>IPP_OP_SCHEDULE_JOB_AFTER </dt>
8240 <dd class="description">Schedule a job to print after another</dd>
8241 <dt>IPP_OP_SEND_DOCUMENT </dt>
8242 <dd class="description">Add a file to a job</dd>
8243 <dt>IPP_OP_SEND_URI </dt>
8244 <dd class="description">Add a URL to a job</dd>
8245 <dt>IPP_OP_SET_DOCUMENT_ATTRIBUTES </dt>
8246 <dd class="description">Set-Document-Attributes</dd>
8247 <dt>IPP_OP_SET_JOB_ATTRIBUTES </dt>
8248 <dd class="description">Set job attributes</dd>
8249 <dt>IPP_OP_SET_PRINTER_ATTRIBUTES </dt>
8250 <dd class="description">Set printer attributes</dd>
8251 <dt>IPP_OP_SHUTDOWN_PRINTER </dt>
8252 <dd class="description">Turn a printer off</dd>
8253 <dt>IPP_OP_STARTUP_PRINTER </dt>
8254 <dd class="description">Turn a printer on</dd>
8255 <dt>IPP_OP_SUSPEND_CURRENT_JOB </dt>
8256 <dd class="description">Suspend the current job</dd>
8257 <dt>IPP_OP_UPDATE_ACTIVE_JOBS </dt>
8258 <dd class="description">Update-Active-Jobs</dd>
8259 <dt>IPP_OP_UPDATE_DOCUMENT_STATUS </dt>
8260 <dd class="description">Update-Document-Status</dd>
8261 <dt>IPP_OP_UPDATE_JOB_STATUS </dt>
8262 <dd class="description">Update-Job-Status</dd>
8263 <dt>IPP_OP_UPDATE_OUTPUT_DEVICE_ATTRIBUTES </dt>
8264 <dd class="description">Update-Output-Device-Attributes</dd>
8265 <dt>IPP_OP_VALIDATE_DOCUMENT </dt>
8266 <dd class="description">Validate-Document</dd>
8267 <dt>IPP_OP_VALIDATE_JOB </dt>
8268 <dd class="description">Validate job options</dd>
8269 </dl>
8270 <h3 class="enumeration"><a id="ipp_orient_e">ipp_orient_e</a></h3>
8271 <p class="description">Orientation values</p>
8272 <h4 class="constants">Constants</h4>
8273 <dl>
8274 <dt>IPP_ORIENT_LANDSCAPE </dt>
8275 <dd class="description">90 degrees counter-clockwise</dd>
8276 <dt>IPP_ORIENT_NONE </dt>
8277 <dd class="description">No rotation</dd>
8278 <dt>IPP_ORIENT_PORTRAIT </dt>
8279 <dd class="description">No rotation</dd>
8280 <dt>IPP_ORIENT_REVERSE_LANDSCAPE </dt>
8281 <dd class="description">90 degrees clockwise</dd>
8282 <dt>IPP_ORIENT_REVERSE_PORTRAIT </dt>
8283 <dd class="description">180 degrees</dd>
8284 </dl>
8285 <h3 class="enumeration"><a id="ipp_pstate_e">ipp_pstate_e</a></h3>
8286 <p class="description">Printer states</p>
8287 <h4 class="constants">Constants</h4>
8288 <dl>
8289 <dt>IPP_PSTATE_IDLE </dt>
8290 <dd class="description">Printer is idle</dd>
8291 <dt>IPP_PSTATE_PROCESSING </dt>
8292 <dd class="description">Printer is working</dd>
8293 <dt>IPP_PSTATE_STOPPED </dt>
8294 <dd class="description">Printer is stopped</dd>
8295 </dl>
8296 <h3 class="enumeration"><a id="ipp_quality_e">ipp_quality_e</a></h3>
8297 <p class="description">Qualities</p>
8298 <h4 class="constants">Constants</h4>
8299 <dl>
8300 <dt>IPP_QUALITY_DRAFT </dt>
8301 <dd class="description">Draft quality</dd>
8302 <dt>IPP_QUALITY_HIGH </dt>
8303 <dd class="description">High quality</dd>
8304 <dt>IPP_QUALITY_NORMAL </dt>
8305 <dd class="description">Normal quality</dd>
8306 </dl>
8307 <h3 class="enumeration"><a id="ipp_res_e">ipp_res_e</a></h3>
8308 <p class="description">Resolution units</p>
8309 <h4 class="constants">Constants</h4>
8310 <dl>
8311 <dt>IPP_RES_PER_CM </dt>
8312 <dd class="description">Pixels per centimeter</dd>
8313 <dt>IPP_RES_PER_INCH </dt>
8314 <dd class="description">Pixels per inch</dd>
8315 </dl>
8316 <h3 class="enumeration"><a id="ipp_state_e">ipp_state_e</a></h3>
8317 <p class="description">IPP states</p>
8318 <h4 class="constants">Constants</h4>
8319 <dl>
8320 <dt>IPP_STATE_ATTRIBUTE </dt>
8321 <dd class="description">One or more attributes need to be sent/received</dd>
8322 <dt>IPP_STATE_DATA </dt>
8323 <dd class="description">IPP request data needs to be sent/received</dd>
8324 <dt>IPP_STATE_ERROR </dt>
8325 <dd class="description">An error occurred</dd>
8326 <dt>IPP_STATE_HEADER </dt>
8327 <dd class="description">The request header needs to be sent/received</dd>
8328 <dt>IPP_STATE_IDLE </dt>
8329 <dd class="description">Nothing is happening/request completed</dd>
8330 </dl>
8331 <h3 class="enumeration"><a id="ipp_status_e">ipp_status_e</a></h3>
8332 <p class="description">IPP status codes</p>
8333 <h4 class="constants">Constants</h4>
8334 <dl>
8335 <dt>IPP_STATUS_CUPS_INVALID </dt>
8336 <dd class="description">Invalid status name for <a href="#ippErrorValue"><code>ippErrorValue</code></a></dd>
8337 <dt>IPP_STATUS_CUPS_SEE_OTHER </dt>
8338 <dd class="description">cups-see-other</dd>
8339 <dt>IPP_STATUS_ERROR_ACCOUNT_AUTHORIZATION_FAILED </dt>
8340 <dd class="description">client-error-account-authorization-failed</dd>
8341 <dt>IPP_STATUS_ERROR_ACCOUNT_CLOSED </dt>
8342 <dd class="description">client-error-account-closed</dd>
8343 <dt>IPP_STATUS_ERROR_ACCOUNT_INFO_NEEDED </dt>
8344 <dd class="description">client-error-account-info-needed</dd>
8345 <dt>IPP_STATUS_ERROR_ACCOUNT_LIMIT_REACHED </dt>
8346 <dd class="description">client-error-account-limit-reached</dd>
8347 <dt>IPP_STATUS_ERROR_ATTRIBUTES_NOT_SETTABLE </dt>
8348 <dd class="description">client-error-attributes-not-settable</dd>
8349 <dt>IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES </dt>
8350 <dd class="description">client-error-attributes-or-values-not-supported</dd>
8351 <dt>IPP_STATUS_ERROR_BAD_REQUEST </dt>
8352 <dd class="description">client-error-bad-request</dd>
8353 <dt>IPP_STATUS_ERROR_BUSY </dt>
8354 <dd class="description">server-error-busy</dd>
8355 <dt>IPP_STATUS_ERROR_CHARSET </dt>
8356 <dd class="description">client-error-charset-not-supported</dd>
8357 <dt>IPP_STATUS_ERROR_COMPRESSION_ERROR </dt>
8358 <dd class="description">client-error-compression-error</dd>
8359 <dt>IPP_STATUS_ERROR_COMPRESSION_NOT_SUPPORTED </dt>
8360 <dd class="description">client-error-compression-not-supported</dd>
8361 <dt>IPP_STATUS_ERROR_CONFLICTING </dt>
8362 <dd class="description">client-error-conflicting-attributes</dd>
8363 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED <span class="info">&#160;DEPRECATED&#160;</span></dt>
8364 <dd class="description">cups-error-account-authorization-failed </dd>
8365 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED </dt>
8366 <dd class="description">cups-error-account-closed @deprecate@</dd>
8367 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED <span class="info">&#160;DEPRECATED&#160;</span></dt>
8368 <dd class="description">cups-error-account-info-needed </dd>
8369 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_LIMIT_REACHED <span class="info">&#160;DEPRECATED&#160;</span></dt>
8370 <dd class="description">cups-error-account-limit-reached </dd>
8371 <dt>IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED <span class="info">&#160;CUPS 1.5/macOS 10.7&#160;</span></dt>
8372 <dd class="description">cups-authentication-canceled - Authentication canceled by user </dd>
8373 <dt>IPP_STATUS_ERROR_CUPS_PKI <span class="info">&#160;CUPS 1.5/macOS 10.7&#160;</span></dt>
8374 <dd class="description">cups-pki-error - Error negotiating a secure connection </dd>
8375 <dt>IPP_STATUS_ERROR_CUPS_UPGRADE_REQUIRED </dt>
8376 <dd class="description">cups-upgrade-required - TLS upgrade required</dd>
8377 <dt>IPP_STATUS_ERROR_DEVICE </dt>
8378 <dd class="description">server-error-device-error</dd>
8379 <dt>IPP_STATUS_ERROR_DOCUMENT_ACCESS </dt>
8380 <dd class="description">client-error-document-access-error</dd>
8381 <dt>IPP_STATUS_ERROR_DOCUMENT_FORMAT_ERROR </dt>
8382 <dd class="description">client-error-document-format-error</dd>
8383 <dt>IPP_STATUS_ERROR_DOCUMENT_FORMAT_NOT_SUPPORTED </dt>
8384 <dd class="description">client-error-document-format-not-supported</dd>
8385 <dt>IPP_STATUS_ERROR_DOCUMENT_PASSWORD </dt>
8386 <dd class="description">client-error-document-password-error</dd>
8387 <dt>IPP_STATUS_ERROR_DOCUMENT_PERMISSION </dt>
8388 <dd class="description">client-error-document-permission-error</dd>
8389 <dt>IPP_STATUS_ERROR_DOCUMENT_SECURITY </dt>
8390 <dd class="description">client-error-document-security-error</dd>
8391 <dt>IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE </dt>
8392 <dd class="description">client-error-document-unprintable-error</dd>
8393 <dt>IPP_STATUS_ERROR_FORBIDDEN </dt>
8394 <dd class="description">client-error-forbidden</dd>
8395 <dt>IPP_STATUS_ERROR_GONE </dt>
8396 <dd class="description">client-error-gone</dd>
8397 <dt>IPP_STATUS_ERROR_IGNORED_ALL_SUBSCRIPTIONS </dt>
8398 <dd class="description">client-error-ignored-all-subscriptions</dd>
8399 <dt>IPP_STATUS_ERROR_INTERNAL </dt>
8400 <dd class="description">server-error-internal-error</dd>
8401 <dt>IPP_STATUS_ERROR_JOB_CANCELED </dt>
8402 <dd class="description">server-error-job-canceled</dd>
8403 <dt>IPP_STATUS_ERROR_MULTIPLE_JOBS_NOT_SUPPORTED </dt>
8404 <dd class="description">server-error-multiple-document-jobs-not-supported</dd>
8405 <dt>IPP_STATUS_ERROR_NOT_ACCEPTING_JOBS </dt>
8406 <dd class="description">server-error-not-accepting-jobs</dd>
8407 <dt>IPP_STATUS_ERROR_NOT_AUTHENTICATED </dt>
8408 <dd class="description">client-error-not-authenticated</dd>
8409 <dt>IPP_STATUS_ERROR_NOT_AUTHORIZED </dt>
8410 <dd class="description">client-error-not-authorized</dd>
8411 <dt>IPP_STATUS_ERROR_NOT_FETCHABLE </dt>
8412 <dd class="description">client-error-not-fetchable</dd>
8413 <dt>IPP_STATUS_ERROR_NOT_FOUND </dt>
8414 <dd class="description">client-error-not-found</dd>
8415 <dt>IPP_STATUS_ERROR_NOT_POSSIBLE </dt>
8416 <dd class="description">client-error-not-possible</dd>
8417 <dt>IPP_STATUS_ERROR_OPERATION_NOT_SUPPORTED </dt>
8418 <dd class="description">server-error-operation-not-supported</dd>
8419 <dt>IPP_STATUS_ERROR_PRINTER_IS_DEACTIVATED </dt>
8420 <dd class="description">server-error-printer-is-deactivated</dd>
8421 <dt>IPP_STATUS_ERROR_REQUEST_ENTITY </dt>
8422 <dd class="description">client-error-request-entity-too-large</dd>
8423 <dt>IPP_STATUS_ERROR_REQUEST_VALUE </dt>
8424 <dd class="description">client-error-request-value-too-long</dd>
8425 <dt>IPP_STATUS_ERROR_SERVICE_UNAVAILABLE </dt>
8426 <dd class="description">server-error-service-unavailable</dd>
8427 <dt>IPP_STATUS_ERROR_TEMPORARY </dt>
8428 <dd class="description">server-error-temporary-error</dd>
8429 <dt>IPP_STATUS_ERROR_TIMEOUT </dt>
8430 <dd class="description">client-error-timeout</dd>
8431 <dt>IPP_STATUS_ERROR_TOO_MANY_DOCUMENTS </dt>
8432 <dd class="description">server-error-too-many-documents</dd>
8433 <dt>IPP_STATUS_ERROR_TOO_MANY_JOBS </dt>
8434 <dd class="description">server-error-too-many-jobs</dd>
8435 <dt>IPP_STATUS_ERROR_TOO_MANY_SUBSCRIPTIONS </dt>
8436 <dd class="description">client-error-too-many-subscriptions</dd>
8437 <dt>IPP_STATUS_ERROR_URI_SCHEME </dt>
8438 <dd class="description">client-error-uri-scheme-not-supported</dd>
8439 <dt>IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED </dt>
8440 <dd class="description">server-error-version-not-supported</dd>
8441 <dt>IPP_STATUS_OK </dt>
8442 <dd class="description">successful-ok</dd>
8443 <dt>IPP_STATUS_OK_CONFLICTING </dt>
8444 <dd class="description">successful-ok-conflicting-attributes</dd>
8445 <dt>IPP_STATUS_OK_EVENTS_COMPLETE </dt>
8446 <dd class="description">successful-ok-events-complete</dd>
8447 <dt>IPP_STATUS_OK_IGNORED_OR_SUBSTITUTED </dt>
8448 <dd class="description">successful-ok-ignored-or-substituted-attributes</dd>
8449 <dt>IPP_STATUS_OK_IGNORED_SUBSCRIPTIONS </dt>
8450 <dd class="description">successful-ok-ignored-subscriptions</dd>
8451 <dt>IPP_STATUS_OK_TOO_MANY_EVENTS </dt>
8452 <dd class="description">successful-ok-too-many-events</dd>
8453 </dl>
8454 <h3 class="enumeration"><a id="ipp_tag_e">ipp_tag_e</a></h3>
8455 <p class="description">Format tags for attributes</p>
8456 <h4 class="constants">Constants</h4>
8457 <dl>
8458 <dt>IPP_TAG_ADMINDEFINE </dt>
8459 <dd class="description">Admin-defined value</dd>
8460 <dt>IPP_TAG_BEGIN_COLLECTION </dt>
8461 <dd class="description">Beginning of collection value</dd>
8462 <dt>IPP_TAG_BOOLEAN </dt>
8463 <dd class="description">Boolean value</dd>
8464 <dt>IPP_TAG_CHARSET </dt>
8465 <dd class="description">Character set value</dd>
8466 <dt>IPP_TAG_CUPS_INVALID </dt>
8467 <dd class="description">Invalid tag name for <a href="#ippTagValue"><code>ippTagValue</code></a></dd>
8468 <dt>IPP_TAG_DATE </dt>
8469 <dd class="description">Date/time value</dd>
8470 <dt>IPP_TAG_DEFAULT </dt>
8471 <dd class="description">Default value</dd>
8472 <dt>IPP_TAG_DELETEATTR </dt>
8473 <dd class="description">Delete-attribute value</dd>
8474 <dt>IPP_TAG_DOCUMENT </dt>
8475 <dd class="description">Document group</dd>
8476 <dt>IPP_TAG_END </dt>
8477 <dd class="description">End-of-attributes</dd>
8478 <dt>IPP_TAG_END_COLLECTION </dt>
8479 <dd class="description">End of collection value</dd>
8480 <dt>IPP_TAG_ENUM </dt>
8481 <dd class="description">Enumeration value</dd>
8482 <dt>IPP_TAG_EVENT_NOTIFICATION </dt>
8483 <dd class="description">Event group</dd>
8484 <dt>IPP_TAG_EXTENSION </dt>
8485 <dd class="description">Extension point for 32-bit tags</dd>
8486 <dt>IPP_TAG_INTEGER </dt>
8487 <dd class="description">Integer value</dd>
8488 <dt>IPP_TAG_JOB </dt>
8489 <dd class="description">Job group</dd>
8490 <dt>IPP_TAG_KEYWORD </dt>
8491 <dd class="description">Keyword value</dd>
8492 <dt>IPP_TAG_LANGUAGE </dt>
8493 <dd class="description">Language value</dd>
8494 <dt>IPP_TAG_MEMBERNAME </dt>
8495 <dd class="description">Collection member name value</dd>
8496 <dt>IPP_TAG_MIMETYPE </dt>
8497 <dd class="description">MIME media type value</dd>
8498 <dt>IPP_TAG_NAME </dt>
8499 <dd class="description">Name value</dd>
8500 <dt>IPP_TAG_NAMELANG </dt>
8501 <dd class="description">Name-with-language value</dd>
8502 <dt>IPP_TAG_NOTSETTABLE </dt>
8503 <dd class="description">Not-settable value</dd>
8504 <dt>IPP_TAG_NOVALUE </dt>
8505 <dd class="description">No-value value</dd>
8506 <dt>IPP_TAG_OPERATION </dt>
8507 <dd class="description">Operation group</dd>
8508 <dt>IPP_TAG_PRINTER </dt>
8509 <dd class="description">Printer group</dd>
8510 <dt>IPP_TAG_RANGE </dt>
8511 <dd class="description">Range value</dd>
8512 <dt>IPP_TAG_RESOLUTION </dt>
8513 <dd class="description">Resolution value</dd>
8514 <dt>IPP_TAG_STRING </dt>
8515 <dd class="description">Octet string value</dd>
8516 <dt>IPP_TAG_SUBSCRIPTION </dt>
8517 <dd class="description">Subscription group</dd>
8518 <dt>IPP_TAG_TEXT </dt>
8519 <dd class="description">Text value</dd>
8520 <dt>IPP_TAG_TEXTLANG </dt>
8521 <dd class="description">Text-with-language value</dd>
8522 <dt>IPP_TAG_UNKNOWN </dt>
8523 <dd class="description">Unknown value</dd>
8524 <dt>IPP_TAG_UNSUPPORTED_GROUP </dt>
8525 <dd class="description">Unsupported attributes group</dd>
8526 <dt>IPP_TAG_UNSUPPORTED_VALUE </dt>
8527 <dd class="description">Unsupported value</dd>
8528 <dt>IPP_TAG_URI </dt>
8529 <dd class="description">URI value</dd>
8530 <dt>IPP_TAG_URISCHEME </dt>
8531 <dd class="description">URI scheme value</dd>
8532 <dt>IPP_TAG_ZERO </dt>
8533 <dd class="description">Zero tag - used for separators</dd>
8534 </dl>
8535 </div>
8536 </body>
8537 </html>