3 <!-- SECTION: Programming -->
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 © 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;
42 border: solid thin black;
51 div.contents ul.contents {
55 border-bottom: solid 2px gray;
65 border-bottom: solid 2px gray;
68 border-bottom: solid 2px gray;
80 border-bottom: solid 2px gray;
83 border-bottom: solid 2px gray;
86 border-bottom: solid 2px gray;
90 h1, h2, h3, h4, h5, h6 {
91 page-break-inside: avoid;
94 border: solid thin gray;
95 box-shadow: 3px 3px 5px rgba(0,0,0,0.5);
97 page-break-inside: avoid;
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;
105 -webkit-hyphens: manual;
106 page-break-inside: avoid;
108 p.code, pre, ul.code li {
115 text-decoration: none;
119 border: solid thin black;
126 h3 span.info, h4 span.info {
130 ul.code, ul.contents, ul.subcontents {
131 list-style-type: none;
141 ul.contents li ul.code, ul.contents li ul.subcontents {
152 margin-bottom: 0.5em;
157 border-bottom: solid 2px black;
160 border-bottom: solid 2px black;
165 <h1 class=
"title">CUPS Programming Manual
</h1>
166 <p>Michael R Sweet
</p>
167 <p>Copyright
© 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>
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>
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>
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>
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>
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>
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>
538 <h2><a id=
"introduction">Introduction
</a></h2>
539 <p>CUPS provides the
"cups
" library to talk to the different parts of CUPS and with Internet Printing Protocol (IPP) printers. The
"cups
" library functions are accessed by including the
<code><cups/cups.h
></code> header.
</p>
540 <p>CUPS is based on the Internet Printing Protocol (
"IPP
"), 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
"cups
" library:
</p>
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>
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 (
"print four copies, two-sided on A4 media, and staple each copy
") 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
<stdio.h
>
557 #include
<cups/cups.h
>
559 int print_dest(void *user_data, unsigned flags, cups_dest_t *dest)
561 if (dest-
>instance)
562 printf(
"%s/%s\n
", dest-
>name, dest-
>instance);
571 cupsEnumDests(CUPS_DEST_FLAGS_NONE,
1000, NULL,
0,
0, print_dest, NULL);
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
"firstcups
". 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
"libcups
" 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`
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>
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)
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
"printer-type
" 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>
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
&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>
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,
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>
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>
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
640 my_dest_cb(my_user_data_t *user_data, unsigned flags,
643 if (flags
& CUPS_DEST_FLAGS_REMOVED)
646 * Remove destination from array...
649 user_data-
>num_dests =
650 cupsRemoveDest(dest-
>name, dest-
>instance,
651 user_data-
>num_dests,
652 &(user_data-
>dests));
657 * Add destination to array...
660 user_data-
>num_dests =
661 cupsCopyDest(dest, user_data-
>num_dests,
662 &(user_data-
>dests));
669 my_get_dests(cups_ptype_t type, cups_ptype_t mask,
672 my_user_data_t user_data = {
0, NULL };
674 if (!cupsEnumDests(CUPS_DEST_FLAGS_NONE,
1000, NULL, type,
675 mask, (cups_dest_cb_t)my_dest_cb,
679 * An error occurred, free all of the destinations and
683 cupsFreeDests(user_data.num_dests, user_dasta.dests);
691 * Return the destination array...
694 *dests = user_data.dests;
696 return (user_data.num_dests);
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>
702 <li>"auth-info-required
": The type of authentication required for printing to this destination:
"none
",
"username,password
",
"domain,username,password
", or
"negotiate
" (Kerberos).
</li>
703 <li>"printer-info
": The human-readable description of the destination such as
"My Laser Printer
".
</li>
704 <li>"printer-is-accepting-jobs
":
"true
" if the destination is accepting new jobs,
"false
" otherwise.
</li>
705 <li>"printer-is-shared
":
"true
" if the destination is being shared with other computers,
"false
" otherwise.
</li>
706 <li>"printer-location
": The human-readable location of the destination such as
"Lab
4".
</li>
707 <li>"printer-make-and-model
": The human-readable make and model of the destination such as
"ExampleCorp LaserPrinter
4000 Series
".
</li>
708 <li>"printer-state
":
"3" if the destination is idle,
"4" if the destination is printing a job, and
"5" if the destination is stopped.
</li>
709 <li>"printer-state-change-time
": The UNIX time when the destination entered the current state.
</li>
710 <li>"printer-state-reasons
": Additional comma-delimited state keywords for the destination such as
"media-tray-empty-error
" and
"toner-low-warning
".
</li>
711 <li>"printer-type
": The
<code>cups_ptype_t
</code> value associated with the destination.
</li>
712 <li>"printer-uri-supported
": The URI associated with the destination; if not set, this destination was discovered but is not yet setup as a local printer.
</li>
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(
"printer-make-and-model
",
716 dest-
>num_options,
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);
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>
729 cupsCheckDestSupported(http_t *http, cups_dest_t *dest,
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>
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>
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,
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,
758 if (cupsCheckDestSupported(CUPS_HTTP_DEFAULT, dest, info,
759 CUPS_FINISHINGS, NULL))
761 ipp_attribute_t *finishings =
762 cupsFindDestSupported(CUPS_HTTP_DEFAULT, dest, info,
764 int i, count = ippGetCount(finishings);
766 puts(
"finishings supported:
");
767 for (i =
0; i
< count; i ++)
768 printf(
" %d\n
", ippGetInteger(finishings, i));
771 puts(
"finishings not supported.
");
773 <p>The
"job-creation-attributes
" 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 "job-creation-attributes
");
777 int i, count = ippGetCount(attrs);
779 for (i =
0; i
< count; i ++)
780 puts(ippGetString(attrs, i, NULL));
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,
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-
>num_options,
793 ipp_attribute_t *def_attr =
794 cupsFindDestDefault(CUPS_HTTP_DEFAULT, dest, info,
797 if (def_value != NULL)
799 printf(
"Default finishings: %s\n
", def_value);
803 int i, count = ippGetCount(def_attr);
805 printf(
"Default finishings: %d
",
806 ippGetInteger(def_attr,
0));
807 for (i =
1; i
< count; i ++)
808 printf(
",%d
", ippGetInteger(def_attr, i));
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);
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,
824 if (ready_finishings != NULL)
826 int i, count = ippGetCount(ready_finishings);
828 puts(
"finishings ready:
");
829 for (i =
0; i
< count; i ++)
830 printf(
" %d\n
", ippGetInteger(ready_finishings, i));
833 puts(
"no finishings are ready.
");
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
841 int bottom, left, right, top;
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>
847 cupsGetDestMediaByName(http_t *http, cups_dest_t *dest,
850 unsigned flags, cups_size_t *size);
853 cupsGetDestMediaBySize(http_t *http, cups_dest_t *dest,
855 int width, int length,
856 unsigned flags, cups_size_t *size);
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>
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
"ready
" media.
</li>
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;
870 if (cupsGetDestMediaByName(CUPS_HTTP_DEFAULT, dest, info,
872 CUPS_MEDIA_FLAGS_DUPLEX,
&size))
874 puts(
"Margins for duplex US Letter:
");
875 printf(
" Bottom: %
.2fin\n
", size.bottom /
2540.0);
876 printf(
" Left: %
.2fin\n
", size.left /
2540.0);
877 printf(
" Right: %
.2fin\n
", size.right /
2540.0);
878 printf(
" Top: %
.2fin\n
", size.top /
2540.0);
881 puts(
"Margins for duplex US Letter are not available.
");
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>
885 cupsGetDestMediaByIndex(http_t *http, cups_dest_t *dest,
886 cups_dinfo_t *dinfo, int n,
887 unsigned flags, cups_size_t *size);
890 cupsGetDestMediaCount(http_t *http, cups_dest_t *dest,
891 cups_dinfo_t *dinfo, unsigned flags);
893 <p>For example, the following code prints the list of ready media and corresponding margins:
</p>
894 <pre><code>cups_size_t size;
896 int count = cupsGetDestMediaCount(CUPS_HTTP_DEFAULT,
898 CUPS_MEDIA_FLAGS_READY);
900 for (i =
0; i
< count; i ++)
902 if (cupsGetDestMediaByIndex(CUPS_HTTP_DEFAULT, dest, info,
903 i, CUPS_MEDIA_FLAGS_READY,
906 printf(
"%s:\n
", size.name);
907 printf(
" Width: %
.2fin\n
", size.width /
2540.0);
908 printf(
" Length: %
.2fin\n
", size.length /
2540.0);
909 printf(
" Bottom: %
.2fin\n
", size.bottom /
2540.0);
910 printf(
" Left: %
.2fin\n
", size.left /
2540.0);
911 printf(
" Right: %
.2fin\n
", size.right /
2540.0);
912 printf(
" Top: %
.2fin\n
", size.top /
2540.0);
916 <p>Finally, the
<code>cupsGetDestMediaDefault
</code> function returns the default media size:
</p>
918 cupsGetDestMediaDefault(http_t *http, cups_dest_t *dest,
919 cups_dinfo_t *dinfo, unsigned flags,
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,
930 cupsLocalizeDestOption(http_t *http, cups_dest_t *dest,
935 cupsLocalizeDestValue(http_t *http, cups_dest_t *dest,
937 const char *option, const char *value);
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);
947 <p>The
<code>title
</code> argument specifies a name for the print job such as
"My Document
". 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;
952 cups_option_t *options = NULL;
954 num_options = cupsAddOption(CUPS_COPIES,
"42",
955 num_options,
&options);
956 num_options = cupsAddOption(CUPS_MEDIA, CUPS_MEDIA_LETTER,
957 num_options,
&options);
958 num_options = cupsAddOption(CUPS_SIDES,
959 CUPS_SIDES_TWO_SIDED_PORTRAIT,
960 num_options,
&options);
962 if (cupsCreateDestJob(CUPS_HTTP_DEFAULT, dest, info,
963 &job_id,
"My Document
", num_options,
964 options) == IPP_STATUS_OK)
965 printf(
"Created job: %d\n
", job_id);
967 printf(
"Unable to create job: %s\n
",
968 cupsLastErrorString());
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,
977 cups_option_t *options,
981 cupsWriteRequestData(http_t *http, const char *buffer,
985 cupsFinishDestDocument(http_t *http, cups_dest_t *dest,
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>
990 <li><code>CUPS_FORMAT_JPEG
</code>:
"image/jpeg
"</li>
991 <li><code>CUPS_FORMAT_PDF
</code>:
"application/pdf
"</li>
992 <li><code>CUPS_FORMAT_POSTSCRIPT
</code>:
"application/postscript
"</li>
993 <li><code>CUPS_FORMAT_TEXT
</code>:
"text/plain
"</li>
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(
"filename.pdf
",
"rb
");
1001 if (cupsStartDestDocument(CUPS_HTTP_DEFAULT, dest, info,
1002 job_id,
"filename.pdf
",
0, NULL,
1003 1) == HTTP_STATUS_CONTINUE)
1005 while ((bytes = fread(buffer,
1, sizeof(buffer), fp))
> 0)
1006 if (cupsWriteRequestData(CUPS_HTTP_DEFAULT, buffer,
1007 bytes) != HTTP_STATUS_CONTINUE)
1010 if (cupsFinishDestDocument(CUPS_HTTP_DEFAULT, dest,
1011 info) == IPP_STATUS_OK)
1012 puts(
"Document send succeeded.
");
1014 printf(
"Document send failed: %s\n
",
1015 cupsLastErrorString());
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>
1024 int cupsAddDest (
<br>
1025     const char *name,
<br>
1026     const char *instance,
<br>
1027     int num_dests,
<br>
1028     <a href=
"#cups_dest_t">cups_dest_t
</a> **dests
<br>
1030 <h4 class=
"parameters">Parameters
</h4>
1033 <dd class=
"description">Destination name
</dd>
1035 <dd class=
"description">Instance name or
<code>NULL
</code> for none/primary
</dd>
1037 <dd class=
"description">Number of destinations
</dd>
1039 <dd class=
"description">Destinations
</dd>
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>
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>
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"> CUPS
2.2.4 </span><a id=
"cupsAddIntegerOption">cupsAddIntegerOption
</a></h3>
1055 <p class=
"description">Add an integer option to an option array.
</p>
1057 int cupsAddIntegerOption (
<br>
1058     const char *name,
<br>
1059     int value,
<br>
1060     int num_options,
<br>
1061     <a href=
"#cups_option_t">cups_option_t
</a> **options
<br>
1063 <h4 class=
"parameters">Parameters
</h4>
1066 <dd class=
"description">Name of option
</dd>
1068 <dd class=
"description">Value of option
</dd>
1069 <dt>num_options
</dt>
1070 <dd class=
"description">Number of options
</dd>
1072 <dd class=
"description">Pointer to options
</dd>
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 "num_options
" parameter.
1081 <h3 class=
"function"><a id=
"cupsAddOption">cupsAddOption
</a></h3>
1082 <p class=
"description">Add an option to an option array.
</p>
1084 int cupsAddOption (
<br>
1085     const char *name,
<br>
1086     const char *value,
<br>
1087     int num_options,
<br>
1088     <a href=
"#cups_option_t">cups_option_t
</a> **options
<br>
1090 <h4 class=
"parameters">Parameters
</h4>
1093 <dd class=
"description">Name of option
</dd>
1095 <dd class=
"description">Value of option
</dd>
1096 <dt>num_options
</dt>
1097 <dd class=
"description">Number of options
</dd>
1099 <dd class=
"description">Pointer to options
</dd>
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 "num_options
" parameter.
</p>
1106 <h3 class=
"function"><a id=
"cupsCancelDestJob">cupsCancelDestJob
</a></h3>
1107 <p class=
"description">Include necessary headers...
</p>
1109 ipp_status_t cupsCancelDestJob (
<br>
1110     <a href=
"#http_t">http_t
</a> *http,
<br>
1111     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1112     int job_id
<br>
1114 <h4 class=
"parameters">Parameters
</h4>
1117 <dd class=
"description">Connection to destination
</dd>
1119 <dd class=
"description">Destination
</dd>
1121 <dd class=
"description">Job ID
</dd>
1123 <h4 class=
"returnvalue">Return Value
</h4>
1124 <p class=
"description">Cancel a job on a destination.
</p>
1125 <p class=
"discussion">The
"job_id
" is the number returned by cupsCreateDestJob.
<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.
1132 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsCheckDestSupported">cupsCheckDestSupported
</a></h3>
1133 <p class=
"description">Check that the option and value are supported
1134 by the destination.
</p>
1136 int cupsCheckDestSupported (
<br>
1137     <a href=
"#http_t">http_t
</a> *http,
<br>
1138     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1139     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
1140     const char *option,
<br>
1141     const char *value
<br>
1143 <h4 class=
"parameters">Parameters
</h4>
1146 <dd class=
"description">Connection to destination
</dd>
1148 <dd class=
"description">Destination
</dd>
1150 <dd class=
"description">Destination information
</dd>
1152 <dd class=
"description">Option
</dd>
1154 <dd class=
"description">Value
</dd>
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.
1162 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsCloseDestJob">cupsCloseDestJob
</a></h3>
1163 <p class=
"description">Close a job and start printing.
</p>
1165 ipp_status_t cupsCloseDestJob (
<br>
1166     <a href=
"#http_t">http_t
</a> *http,
<br>
1167     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1168     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *info,
<br>
1169     int job_id
<br>
1171 <h4 class=
"parameters">Parameters
</h4>
1174 <dd class=
"description">Connection to destination
</dd>
1176 <dd class=
"description">Destination
</dd>
1178 <dd class=
"description">Destination information
</dd>
1180 <dd class=
"description">Job ID
</dd>
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
"last_document
".
1186 "job_id
" is the job ID returned by cupsCreateDestJob. Returns
<code>IPP_STATUS_OK
</code>
1190 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsConnectDest">cupsConnectDest
</a></h3>
1191 <p class=
"description">Connect to the server for a destination.
</p>
1193 <a href=
"#http_t">http_t
</a> *cupsConnectDest (
<br>
1194     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1195     unsigned flags,
<br>
1196     int msec,
<br>
1197     int *cancel,
<br>
1198     char *resource,
<br>
1199     size_t resourcesize,
<br>
1200     <a href=
"#cups_dest_cb_t">cups_dest_cb_t
</a> cb,
<br>
1201     void *user_data
<br>
1203 <h4 class=
"parameters">Parameters
</h4>
1206 <dd class=
"description">Destination
</dd>
1208 <dd class=
"description">Connection flags
</dd>
1210 <dd class=
"description">Timeout in milliseconds
</dd>
1212 <dd class=
"description">Pointer to
"cancel
" variable
</dd>
1214 <dd class=
"description">Resource buffer
</dd>
1215 <dt>resourcesize
</dt>
1216 <dd class=
"description">Size of resource buffer
</dd>
1218 <dd class=
"description">Callback function
</dd>
1220 <dd class=
"description">User data pointer
</dd>
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
"cancel
" is non-zero, or the callback function (or block) returns
0,
1229 The caller is responsible for calling httpClose() on the returned object.
1232 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsCopyDest">cupsCopyDest
</a></h3>
1233 <p class=
"description">Copy a destination.
</p>
1235 int cupsCopyDest (
<br>
1236     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1237     int num_dests,
<br>
1238     <a href=
"#cups_dest_t">cups_dest_t
</a> **dests
<br>
1240 <h4 class=
"parameters">Parameters
</h4>
1243 <dd class=
"description">Destination to copy
</dd>
1245 <dd class=
"description">Number of destinations
</dd>
1247 <dd class=
"description">Destination array
</dd>
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).
1257 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsCopyDestConflicts">cupsCopyDestConflicts
</a></h3>
1258 <p class=
"description">Get conflicts and resolutions for a new
1259 option/value pair.
</p>
1261 int cupsCopyDestConflicts (
<br>
1262     <a href=
"#http_t">http_t
</a> *http,
<br>
1263     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1264     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
1265     int num_options,
<br>
1266     <a href=
"#cups_option_t">cups_option_t
</a> *options,
<br>
1267     const char *new_option,
<br>
1268     const char *new_value,
<br>
1269     int *num_conflicts,
<br>
1270     <a href=
"#cups_option_t">cups_option_t
</a> **conflicts,
<br>
1271     int *num_resolved,
<br>
1272     <a href=
"#cups_option_t">cups_option_t
</a> **resolved
<br>
1274 <h4 class=
"parameters">Parameters
</h4>
1277 <dd class=
"description">Connection to destination
</dd>
1279 <dd class=
"description">Destination
</dd>
1281 <dd class=
"description">Destination information
</dd>
1282 <dt>num_options
</dt>
1283 <dd class=
"description">Number of current options
</dd>
1285 <dd class=
"description">Current options
</dd>
1287 <dd class=
"description">New option
</dd>
1289 <dd class=
"description">New value
</dd>
1290 <dt>num_conflicts
</dt>
1291 <dd class=
"description">Number of conflicting options
</dd>
1293 <dd class=
"description">Conflicting options
</dd>
1294 <dt>num_resolved
</dt>
1295 <dd class=
"description">Number of options to resolve
</dd>
1297 <dd class=
"description">Resolved options
</dd>
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">"num_options
" and
"options
" represent the currently selected options by the
1303 user.
"new_option
" and
"new_value
" are the setting the user has just
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>
1309 If
"num_conflicts
" and
"conflicts
" are not
<code>NULL
</code>, they are set to
1310 contain the list of conflicting option/value pairs. Similarly, if
1311 "num_resolved
" and
"resolved
" are not
<code>NULL
</code> they will be set to the
1312 list of changes needed to resolve the conflict.
<br>
1314 If cupsCopyDestConflicts returns
1 but
"num_resolved
" and
"resolved
" are set
1315 to
0 and
<code>NULL
</code>, respectively, then the conflict cannot be resolved.
1318 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsCopyDestInfo">cupsCopyDestInfo
</a></h3>
1319 <p class=
"description">Get the supported values/capabilities for the
1322 <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *cupsCopyDestInfo (
<br>
1323     <a href=
"#http_t">http_t
</a> *http,
<br>
1324     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest
<br>
1326 <h4 class=
"parameters">Parameters
</h4>
1329 <dd class=
"description">Connection to destination
</dd>
1331 <dd class=
"description">Destination
</dd>
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.
1340 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsCreateDestJob">cupsCreateDestJob
</a></h3>
1341 <p class=
"description">Create a job on a destination.
</p>
1343 ipp_status_t cupsCreateDestJob (
<br>
1344     <a href=
"#http_t">http_t
</a> *http,
<br>
1345     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1346     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *info,
<br>
1347     int *job_id,
<br>
1348     const char *title,
<br>
1349     int num_options,
<br>
1350     <a href=
"#cups_option_t">cups_option_t
</a> *options
<br>
1352 <h4 class=
"parameters">Parameters
</h4>
1355 <dd class=
"description">Connection to destination
</dd>
1357 <dd class=
"description">Destination
</dd>
1359 <dd class=
"description">Destination information
</dd>
1361 <dd class=
"description">Job ID or
0 on error
</dd>
1363 <dd class=
"description">Job name
</dd>
1364 <dt>num_options
</dt>
1365 <dd class=
"description">Number of job options
</dd>
1367 <dd class=
"description">Job options
</dd>
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
"job_id
".
1376 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/macOS
10.4 </span><a id=
"cupsDoAuthentication">cupsDoAuthentication
</a></h3>
1377 <p class=
"description">Authenticate a request.
</p>
1379 int cupsDoAuthentication (
<br>
1380     <a href=
"#http_t">http_t
</a> *http,
<br>
1381     const char *method,
<br>
1382     const char *resource
<br>
1384 <h4 class=
"parameters">Parameters
</h4>
1387 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1389 <dd class=
"description">Request method (
"GET
",
"POST
",
"PUT
")
</dd>
1391 <dd class=
"description">Resource path
</dd>
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.
1400 <h3 class=
"function"><a id=
"cupsEncodeOptions">cupsEncodeOptions
</a></h3>
1401 <p class=
"description"></p>
1403 void cupsEncodeOptions (
<br>
1404     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
1405     int num_options,
<br>
1406     <a href=
"#cups_option_t">cups_option_t
</a> *options
<br>
1408 <h4 class=
"parameters">Parameters
</h4>
1411 <dd class=
"description">Request to add to
</dd>
1412 <dt>num_options
</dt>
1413 <dd class=
"description">Number of options
</dd>
1415 <dd class=
"description">Options
</dd>
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
1424 <h3 class=
"function"><a id=
"cupsEncodeOptions2">cupsEncodeOptions2
</a></h3>
1425 <p class=
"description">Add the options in the proper groups
& order...
</p>
1427 void cupsEncodeOptions2 (
<br>
1428     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
1429     int num_options,
<br>
1430     <a href=
"#cups_option_t">cups_option_t
</a> *options,
<br>
1431     ipp_tag_t group_tag
<br>
1433 <h4 class=
"parameters">Parameters
</h4>
1436 <dd class=
"description">Request to add to
</dd>
1437 <dt>num_options
</dt>
1438 <dd class=
"description">Number of options
</dd>
1440 <dd class=
"description">Options
</dd>
1442 <dd class=
"description">Group to encode
</dd>
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.
1451 <h3 class=
"function"><a id=
"cupsEncryption">cupsEncryption
</a></h3>
1452 <p class=
"description">Get the current encryption settings.
</p>
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>
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"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsEnumDests">cupsEnumDests
</a></h3>
1468 <p class=
"description">Enumerate available destinations with a callback function.
</p>
1470 int cupsEnumDests (
<br>
1471     unsigned flags,
<br>
1472     int msec,
<br>
1473     int *cancel,
<br>
1474     <a href=
"#cups_ptype_t">cups_ptype_t
</a> type,
<br>
1475     <a href=
"#cups_ptype_t">cups_ptype_t
</a> mask,
<br>
1476     <a href=
"#cups_dest_cb_t">cups_dest_cb_t
</a> cb,
<br>
1477     void *user_data
<br>
1479 <h4 class=
"parameters">Parameters
</h4>
1482 <dd class=
"description">Enumeration flags
</dd>
1484 <dd class=
"description">Timeout in milliseconds, -
1 for indefinite
</dd>
1486 <dd class=
"description">Pointer to
"cancel
" variable
</dd>
1488 <dd class=
"description">Printer type bits
</dd>
1490 <dd class=
"description">Mask for printer type bits
</dd>
1492 <dd class=
"description">Callback function
</dd>
1494 <dd class=
"description">User data
</dd>
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>
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>
1509 Enumeration happens on the current thread and does not return until all
1510 destinations have been enumerated or the callback function returns
0.
1513 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"cupsFindDestDefault">cupsFindDestDefault
</a></h3>
1514 <p class=
"description">Find the default value(s) for the given option.
</p>
1516 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *cupsFindDestDefault (
<br>
1517     <a href=
"#http_t">http_t
</a> *http,
<br>
1518     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1519     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
1520     const char *option
<br>
1522 <h4 class=
"parameters">Parameters
</h4>
1525 <dd class=
"description">Connection to destination
</dd>
1527 <dd class=
"description">Destination
</dd>
1529 <dd class=
"description">Destination information
</dd>
1531 <dd class=
"description">Option/attribute name
</dd>
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.
1543 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"cupsFindDestReady">cupsFindDestReady
</a></h3>
1544 <p class=
"description">Find the default value(s) for the given option.
</p>
1546 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *cupsFindDestReady (
<br>
1547     <a href=
"#http_t">http_t
</a> *http,
<br>
1548     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1549     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
1550     const char *option
<br>
1552 <h4 class=
"parameters">Parameters
</h4>
1555 <dd class=
"description">Connection to destination
</dd>
1557 <dd class=
"description">Destination
</dd>
1559 <dd class=
"description">Destination information
</dd>
1561 <dd class=
"description">Option/attribute name
</dd>
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.
1573 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"cupsFindDestSupported">cupsFindDestSupported
</a></h3>
1574 <p class=
"description">Find the default value(s) for the given option.
</p>
1576 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *cupsFindDestSupported (
<br>
1577     <a href=
"#http_t">http_t
</a> *http,
<br>
1578     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1579     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
1580     const char *option
<br>
1582 <h4 class=
"parameters">Parameters
</h4>
1585 <dd class=
"description">Connection to destination
</dd>
1587 <dd class=
"description">Destination
</dd>
1589 <dd class=
"description">Destination information
</dd>
1591 <dd class=
"description">Option/attribute name
</dd>
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.
1603 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsFinishDestDocument">cupsFinishDestDocument
</a></h3>
1604 <p class=
"description">Finish the current document.
</p>
1606 ipp_status_t cupsFinishDestDocument (
<br>
1607     <a href=
"#http_t">http_t
</a> *http,
<br>
1608     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1609     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *info
<br>
1611 <h4 class=
"parameters">Parameters
</h4>
1614 <dd class=
"description">Connection to destination
</dd>
1616 <dd class=
"description">Destination
</dd>
1618 <dd class=
"description">Destination information
</dd>
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.
1626 <h3 class=
"function"><a id=
"cupsFreeDestInfo">cupsFreeDestInfo
</a></h3>
1627 <p class=
"description">Find and return the attribute...
</p>
1629 void cupsFreeDestInfo (
<br>
1630     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo
<br>
1632 <h4 class=
"parameters">Parameters
</h4>
1635 <dd class=
"description">Destination information
</dd>
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>
1643 void cupsFreeDests (
<br>
1644     int num_dests,
<br>
1645     <a href=
"#cups_dest_t">cups_dest_t
</a> *dests
<br>
1647 <h4 class=
"parameters">Parameters
</h4>
1650 <dd class=
"description">Number of destinations
</dd>
1652 <dd class=
"description">Destinations
</dd>
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>
1659 void cupsFreeJobs (
<br>
1660     int num_jobs,
<br>
1661     <a href=
"#cups_job_t">cups_job_t
</a> *jobs
<br>
1663 <h4 class=
"parameters">Parameters
</h4>
1666 <dd class=
"description">Number of jobs
</dd>
1668 <dd class=
"description">Jobs
</dd>
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>
1675 void cupsFreeOptions (
<br>
1676     int num_options,
<br>
1677     <a href=
"#cups_option_t">cups_option_t
</a> *options
<br>
1679 <h4 class=
"parameters">Parameters
</h4>
1681 <dt>num_options
</dt>
1682 <dd class=
"description">Number of options
</dd>
1684 <dd class=
"description">Pointer to options
</dd>
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>
1691 <a href=
"#cups_dest_t">cups_dest_t
</a> *cupsGetDest (
<br>
1692     const char *name,
<br>
1693     const char *instance,
<br>
1694     int num_dests,
<br>
1695     <a href=
"#cups_dest_t">cups_dest_t
</a> *dests
<br>
1697 <h4 class=
"parameters">Parameters
</h4>
1700 <dd class=
"description">Destination name or
<code>NULL
</code> for the default destination
</dd>
1702 <dd class=
"description">Instance name or
<code>NULL
</code></dd>
1704 <dd class=
"description">Number of destinations
</dd>
1706 <dd class=
"description">Destinations
</dd>
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"> CUPS
1.7/macOS
10.9 </span><a id=
"cupsGetDestMediaByIndex">cupsGetDestMediaByIndex
</a></h3>
1714 <p class=
"description">Get a media name, dimension, and margins for a
1717 int cupsGetDestMediaByIndex (
<br>
1718     <a href=
"#http_t">http_t
</a> *http,
<br>
1719     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1720     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
1721     int n,
<br>
1722     unsigned flags,
<br>
1723     <a href=
"#cups_size_t">cups_size_t
</a> *size
<br>
1725 <h4 class=
"parameters">Parameters
</h4>
1728 <dd class=
"description">Connection to destination
</dd>
1730 <dd class=
"description">Destination
</dd>
1732 <dd class=
"description">Destination information
</dd>
1734 <dd class=
"description">Media size number (
0-based)
</dd>
1736 <dd class=
"description">Media flags
</dd>
1738 <dd class=
"description">Media size information
</dd>
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.
1748 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsGetDestMediaByName">cupsGetDestMediaByName
</a></h3>
1749 <p class=
"description">Get media names, dimensions, and margins.
</p>
1751 int cupsGetDestMediaByName (
<br>
1752     <a href=
"#http_t">http_t
</a> *http,
<br>
1753     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1754     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
1755     const char *media,
<br>
1756     unsigned flags,
<br>
1757     <a href=
"#cups_size_t">cups_size_t
</a> *size
<br>
1759 <h4 class=
"parameters">Parameters
</h4>
1762 <dd class=
"description">Connection to destination
</dd>
1764 <dd class=
"description">Destination
</dd>
1766 <dd class=
"description">Destination information
</dd>
1768 <dd class=
"description">Media name
</dd>
1770 <dd class=
"description">Media matching flags
</dd>
1772 <dd class=
"description">Media size information
</dd>
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
"media
" string is a PWG media name.
"Flags
" provides some matching
1778 guidance (multiple flags can be combined):
<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
"ready
" media.
<br>
1787 The matching result (if any) is returned in the
"cups_size_t
" structure.
<br>
1789 Returns
1 when there is a match and
0 if there is not a match.
1792 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsGetDestMediaBySize">cupsGetDestMediaBySize
</a></h3>
1793 <p class=
"description">Get media names, dimensions, and margins.
</p>
1795 int cupsGetDestMediaBySize (
<br>
1796     <a href=
"#http_t">http_t
</a> *http,
<br>
1797     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1798     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
1799     int width,
<br>
1800     int length,
<br>
1801     unsigned flags,
<br>
1802     <a href=
"#cups_size_t">cups_size_t
</a> *size
<br>
1804 <h4 class=
"parameters">Parameters
</h4>
1807 <dd class=
"description">Connection to destination
</dd>
1809 <dd class=
"description">Destination
</dd>
1811 <dd class=
"description">Destination information
</dd>
1813 <dd class=
"description">Media width in hundredths of
1816 <dd class=
"description">Media length in hundredths of
1819 <dd class=
"description">Media matching flags
</dd>
1821 <dd class=
"description">Media size information
</dd>
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">"Width
" and
"length
" are the dimensions in hundredths of millimeters.
1827 "Flags
" provides some matching guidance (multiple flags can be combined):
<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
"ready
" media.
<br>
1836 The matching result (if any) is returned in the
"cups_size_t
" structure.
<br>
1838 Returns
1 when there is a match and
0 if there is not a match.
1841 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"cupsGetDestMediaCount">cupsGetDestMediaCount
</a></h3>
1842 <p class=
"description">Get the number of sizes supported by a
1845 int cupsGetDestMediaCount (
<br>
1846     <a href=
"#http_t">http_t
</a> *http,
<br>
1847     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1848     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
1849     unsigned flags
<br>
1851 <h4 class=
"parameters">Parameters
</h4>
1854 <dd class=
"description">Connection to destination
</dd>
1856 <dd class=
"description">Destination
</dd>
1858 <dd class=
"description">Destination information
</dd>
1860 <dd class=
"description">Media flags
</dd>
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.
1870 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"cupsGetDestMediaDefault">cupsGetDestMediaDefault
</a></h3>
1871 <p class=
"description">Get the default size for a destination.
</p>
1873 int cupsGetDestMediaDefault (
<br>
1874     <a href=
"#http_t">http_t
</a> *http,
<br>
1875     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1876     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
1877     unsigned flags,
<br>
1878     <a href=
"#cups_size_t">cups_size_t
</a> *size
<br>
1880 <h4 class=
"parameters">Parameters
</h4>
1883 <dd class=
"description">Connection to destination
</dd>
1885 <dd class=
"description">Destination
</dd>
1887 <dd class=
"description">Destination information
</dd>
1889 <dd class=
"description">Media flags
</dd>
1891 <dd class=
"description">Media size information
</dd>
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.
1901 <h3 class=
"function"><span class=
"info"> CUPS
2.0/macOS
10.10 </span><a id=
"cupsGetDestWithURI">cupsGetDestWithURI
</a></h3>
1902 <p class=
"description">Get a destination associated with a URI.
</p>
1904 <a href=
"#cups_dest_t">cups_dest_t
</a> *cupsGetDestWithURI (
<br>
1905     const char *name,
<br>
1906     const char *uri
<br>
1908 <h4 class=
"parameters">Parameters
</h4>
1911 <dd class=
"description">Desired printer name or
<code>NULL
</code></dd>
1913 <dd class=
"description">URI for the printer
</dd>
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">"name
" is the desired name for the printer. If
<code>NULL
</code>, a name will be
1919 created using the URI.
<br>
1921 "uri
" is the
"ipp
" or
"ipps
" URI for the printer.
1924 <h3 class=
"function"><span class=
"info"> 2.2.4 </span><a id=
"cupsGetIntegerOption">cupsGetIntegerOption
</a></h3>
1925 <p class=
"description">Get an integer option value.
</p>
1927 int cupsGetIntegerOption (
<br>
1928     const char *name,
<br>
1929     int num_options,
<br>
1930     <a href=
"#cups_option_t">cups_option_t
</a> *options
<br>
1932 <h4 class=
"parameters">Parameters
</h4>
1935 <dd class=
"description">Name of option
</dd>
1936 <dt>num_options
</dt>
1937 <dd class=
"description">Number of options
</dd>
1939 <dd class=
"description">Options
</dd>
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
"int
" type.
1948 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/macOS
10.4 </span><a id=
"cupsGetJobs2">cupsGetJobs2
</a></h3>
1949 <p class=
"description">Get the jobs from the specified server.
</p>
1951 int cupsGetJobs2 (
<br>
1952     <a href=
"#http_t">http_t
</a> *http,
<br>
1953     <a href=
"#cups_job_t">cups_job_t
</a> **jobs,
<br>
1954     const char *name,
<br>
1955     int myjobs,
<br>
1956     int whichjobs
<br>
1958 <h4 class=
"parameters">Parameters
</h4>
1961 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1963 <dd class=
"description">Job data
</dd>
1965 <dd class=
"description"><code>NULL
</code> = all destinations, otherwise show jobs for named destination
</dd>
1967 <dd class=
"description">0 = all users,
1 = mine
</dd>
1969 <dd class=
"description"><code>CUPS_WHICHJOBS_ALL
</code>,
<code>CUPS_WHICHJOBS_ACTIVE
</code>, or
<code>CUPS_WHICHJOBS_COMPLETED
</code></dd>
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
"whichjobs
" 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.
1980 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"cupsGetNamedDest">cupsGetNamedDest
</a></h3>
1981 <p class=
"description">Get options for the named destination.
</p>
1983 <a href=
"#cups_dest_t">cups_dest_t
</a> *cupsGetNamedDest (
<br>
1984     <a href=
"#http_t">http_t
</a> *http,
<br>
1985     const char *name,
<br>
1986     const char *instance
<br>
1988 <h4 class=
"parameters">Parameters
</h4>
1991 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1993 <dd class=
"description">Destination name or
<code>NULL
</code> for the default destination
</dd>
1995 <dd class=
"description">Instance name or
<code>NULL
</code></dd>
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>
2006 If
"http
" is
<code>CUPS_HTTP_DEFAULT
</code>, the connection to the default print
2007 server will be used.
<br>
2009 If
"name
" is
<code>NULL
</code>, the default printer for the current user will be
2012 The returned destination must be freed using
<a href=
"#cupsFreeDests"><code>cupsFreeDests
</code></a> with a
2013 "num_dests
" value of
1.
2016 <h3 class=
"function"><a id=
"cupsGetOption">cupsGetOption
</a></h3>
2017 <p class=
"description">Get an option value.
</p>
2019 const char *cupsGetOption (
<br>
2020     const char *name,
<br>
2021     int num_options,
<br>
2022     <a href=
"#cups_option_t">cups_option_t
</a> *options
<br>
2024 <h4 class=
"parameters">Parameters
</h4>
2027 <dd class=
"description">Name of option
</dd>
2028 <dt>num_options
</dt>
2029 <dd class=
"description">Number of options
</dd>
2031 <dd class=
"description">Options
</dd>
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"> CUPS
1.4/macOS
10.6 </span><a id=
"cupsGetPassword2">cupsGetPassword2
</a></h3>
2036 <p class=
"description">Get a password from the user using the advanced
2037 password callback.
</p>
2039 const char *cupsGetPassword2 (
<br>
2040     const char *prompt,
<br>
2041     <a href=
"#http_t">http_t
</a> *http,
<br>
2042     const char *method,
<br>
2043     const char *resource
<br>
2045 <h4 class=
"parameters">Parameters
</h4>
2048 <dd class=
"description">Prompt string
</dd>
2050 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
2052 <dd class=
"description">Request method (
"GET
",
"POST
",
"PUT
")
</dd>
2054 <dd class=
"description">Resource path
</dd>
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>
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.
2068 <h3 class=
"function"><a id=
"cupsLangDefault">cupsLangDefault
</a></h3>
2069 <p class=
"description">Return the default language.
</p>
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>
2078 const char *cupsLangEncoding (
<br>
2079     <a href=
"#cups_lang_t">cups_lang_t
</a> *lang
<br>
2081 <h4 class=
"parameters">Parameters
</h4>
2084 <dd class=
"description">Language data
</dd>
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>
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>
2097 void cupsLangFree (
<br>
2098     <a href=
"#cups_lang_t">cups_lang_t
</a> *lang
<br>
2100 <h4 class=
"parameters">Parameters
</h4>
2103 <dd class=
"description">Language to free
</dd>
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>
2111 <a href=
"#cups_lang_t">cups_lang_t
</a> *cupsLangGet (
<br>
2112     const char *language
<br>
2114 <h4 class=
"parameters">Parameters
</h4>
2117 <dd class=
"description">Language or locale
</dd>
2119 <h4 class=
"returnvalue">Return Value
</h4>
2120 <p class=
"description">Language data
</p>
2121 <h3 class=
"function"><span class=
"info"> CUPS
2.0/macOS
10.10 </span><a id=
"cupsLocalizeDestMedia">cupsLocalizeDestMedia
</a></h3>
2122 <p class=
"description">Get the localized string for a destination media
2125 const char *cupsLocalizeDestMedia (
<br>
2126     <a href=
"#http_t">http_t
</a> *http,
<br>
2127     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
2128     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
2129     unsigned flags,
<br>
2130     <a href=
"#cups_size_t">cups_size_t
</a> *size
<br>
2132 <h4 class=
"parameters">Parameters
</h4>
2135 <dd class=
"description">Connection to destination
</dd>
2137 <dd class=
"description">Destination
</dd>
2139 <dd class=
"description">Destination information
</dd>
2141 <dd class=
"description">Media flags
</dd>
2143 <dd class=
"description">Media size
</dd>
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.
2152 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsLocalizeDestOption">cupsLocalizeDestOption
</a></h3>
2153 <p class=
"description">Get the localized string for a destination
2156 const char *cupsLocalizeDestOption (
<br>
2157     <a href=
"#http_t">http_t
</a> *http,
<br>
2158     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
2159     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
2160     const char *option
<br>
2162 <h4 class=
"parameters">Parameters
</h4>
2165 <dd class=
"description">Connection to destination
</dd>
2167 <dd class=
"description">Destination
</dd>
2169 <dd class=
"description">Destination information
</dd>
2171 <dd class=
"description">Option to localize
</dd>
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.
2180 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsLocalizeDestValue">cupsLocalizeDestValue
</a></h3>
2181 <p class=
"description">Get the localized string for a destination
2182 option+value pair.
</p>
2184 const char *cupsLocalizeDestValue (
<br>
2185     <a href=
"#http_t">http_t
</a> *http,
<br>
2186     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
2187     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
2188     const char *option,
<br>
2189     const char *value
<br>
2191 <h4 class=
"parameters">Parameters
</h4>
2194 <dd class=
"description">Connection to destination
</dd>
2196 <dd class=
"description">Destination
</dd>
2198 <dd class=
"description">Destination information
</dd>
2200 <dd class=
"description">Option to localize
</dd>
2202 <dd class=
"description">Value to localize
</dd>
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.
2211 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"cupsMakeServerCredentials">cupsMakeServerCredentials
</a></h3>
2212 <p class=
"description">Make a self-signed certificate and private key pair.
</p>
2214 int cupsMakeServerCredentials (
<br>
2215     const char *path,
<br>
2216     const char *common_name,
<br>
2217     int num_alt_names,
<br>
2218     const char **alt_names,
<br>
2219     time_t expiration_date
<br>
2221 <h4 class=
"parameters">Parameters
</h4>
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>
2230 <dd class=
"description">Subject Alternate Names
</dd>
2231 <dt>expiration_date
</dt>
2232 <dd class=
"description">Expiration date
</dd>
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"> CUPS
1.2/macOS
10.5 </span><a id=
"cupsNotifySubject">cupsNotifySubject
</a></h3>
2237 <p class=
"description">Return the subject for the given notification message.
</p>
2239 char *cupsNotifySubject (
<br>
2240     <a href=
"#cups_lang_t">cups_lang_t
</a> *lang,
<br>
2241     <a href=
"#ipp_t">ipp_t
</a> *event
<br>
2243 <h4 class=
"parameters">Parameters
</h4>
2246 <dd class=
"description">Language data
</dd>
2248 <dd class=
"description">Event data
</dd>
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>.
2256 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"cupsNotifyText">cupsNotifyText
</a></h3>
2257 <p class=
"description">Return the text for the given notification message.
</p>
2259 char *cupsNotifyText (
<br>
2260     <a href=
"#cups_lang_t">cups_lang_t
</a> *lang,
<br>
2261     <a href=
"#ipp_t">ipp_t
</a> *event
<br>
2263 <h4 class=
"parameters">Parameters
</h4>
2266 <dd class=
"description">Language data
</dd>
2268 <dd class=
"description">Event data
</dd>
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>.
2276 <h3 class=
"function"><a id=
"cupsParseOptions">cupsParseOptions
</a></h3>
2277 <p class=
"description">Parse options from a command-line argument.
</p>
2279 int cupsParseOptions (
<br>
2280     const char *arg,
<br>
2281     int num_options,
<br>
2282     <a href=
"#cups_option_t">cups_option_t
</a> **options
<br>
2284 <h4 class=
"parameters">Parameters
</h4>
2287 <dd class=
"description">Argument to parse
</dd>
2288 <dt>num_options
</dt>
2289 <dd class=
"description">Number of options
</dd>
2291 <dd class=
"description">Options found
</dd>
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 (
"name={a=... b=... c=...}
") 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"> CUPS
1.3/macOS
10.5 </span><a id=
"cupsRemoveDest">cupsRemoveDest
</a></h3>
2302 <p class=
"description">Remove a destination from the destination list.
</p>
2304 int cupsRemoveDest (
<br>
2305     const char *name,
<br>
2306     const char *instance,
<br>
2307     int num_dests,
<br>
2308     <a href=
"#cups_dest_t">cups_dest_t
</a> **dests
<br>
2310 <h4 class=
"parameters">Parameters
</h4>
2313 <dd class=
"description">Destination name
</dd>
2315 <dd class=
"description">Instance name or
<code>NULL
</code></dd>
2317 <dd class=
"description">Number of destinations
</dd>
2319 <dd class=
"description">Destinations
</dd>
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.
2330 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"cupsRemoveOption">cupsRemoveOption
</a></h3>
2331 <p class=
"description">Remove an option from an option array.
</p>
2333 int cupsRemoveOption (
<br>
2334     const char *name,
<br>
2335     int num_options,
<br>
2336     <a href=
"#cups_option_t">cups_option_t
</a> **options
<br>
2338 <h4 class=
"parameters">Parameters
</h4>
2341 <dd class=
"description">Option name
</dd>
2342 <dt>num_options
</dt>
2343 <dd class=
"description">Current number of options
</dd>
2345 <dd class=
"description">Options
</dd>
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>
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
"localhost
" or a domain socket
2361 The returned value can be a fully-qualified hostname, a numeric IPv4 or IPv6
2362 address, or a domain socket pathname.
<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>
2371 void cupsSetClientCertCB (
<br>
2372     <a href=
"#cups_client_cert_cb_t">cups_client_cert_cb_t
</a> cb,
<br>
2373     void *user_data
<br>
2375 <h4 class=
"parameters">Parameters
</h4>
2378 <dd class=
"description">Callback function
</dd>
2380 <dd class=
"description">User data pointer
</dd>
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>
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.
2391 <h3 class=
"function"><span class=
"info"> CUPS
1.5/macOS
10.7 </span><a id=
"cupsSetCredentials">cupsSetCredentials
</a></h3>
2392 <p class=
"description">Set the default credentials to be used for SSL/TLS
2395 int cupsSetCredentials (
<br>
2396     cups_array_t *credentials
<br>
2398 <h4 class=
"parameters">Parameters
</h4>
2400 <dt>credentials
</dt>
2401 <dd class=
"description">Array of credentials
</dd>
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.
2411 <h3 class=
"function"><a id=
"cupsSetDefaultDest">cupsSetDefaultDest
</a></h3>
2412 <p class=
"description">Remove the destination from the array...
</p>
2414 void cupsSetDefaultDest (
<br>
2415     const char *name,
<br>
2416     const char *instance,
<br>
2417     int num_dests,
<br>
2418     <a href=
"#cups_dest_t">cups_dest_t
</a> *dests
<br>
2420 <h4 class=
"parameters">Parameters
</h4>
2423 <dd class=
"description">Destination name
</dd>
2425 <dd class=
"description">Instance name or
<code>NULL
</code></dd>
2427 <dd class=
"description">Number of destinations
</dd>
2429 <dd class=
"description">Destinations
</dd>
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
"is_default
" flag for the matching
2438 void cupsSetDests (
<br>
2439     int num_dests,
<br>
2440     <a href=
"#cups_dest_t">cups_dest_t
</a> *dests
<br>
2442 <h4 class=
"parameters">Parameters
</h4>
2445 <dd class=
"description">Number of destinations
</dd>
2447 <dd class=
"description">Destinations
</dd>
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"> CUPS
1.1.21/macOS
10.4 </span><a id=
"cupsSetDests2">cupsSetDests2
</a></h3>
2454 <p class=
"description">Save the list of destinations for the specified server.
</p>
2456 int cupsSetDests2 (
<br>
2457     <a href=
"#http_t">http_t
</a> *http,
<br>
2458     int num_dests,
<br>
2459     <a href=
"#cups_dest_t">cups_dest_t
</a> *dests
<br>
2461 <h4 class=
"parameters">Parameters
</h4>
2464 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
2466 <dd class=
"description">Number of destinations
</dd>
2468 <dd class=
"description">Destinations
</dd>
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.
2477 <h3 class=
"function"><a id=
"cupsSetEncryption">cupsSetEncryption
</a></h3>
2478 <p class=
"description">Pointer to library globals
</p>
2480 void cupsSetEncryption (
<br>
2481     <a href=
"#http_encryption_t">http_encryption_t
</a> e
<br>
2483 <h4 class=
"parameters">Parameters
</h4>
2486 <dd class=
"description">New encryption preference
</dd>
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>
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>
2501 void cupsSetPasswordCB (
<br>
2502     <a href=
"#cups_password_cb_t">cups_password_cb_t
</a> cb
<br>
2504 <h4 class=
"parameters">Parameters
</h4>
2507 <dd class=
"description">Callback function
</dd>
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>
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.
2521 <h3 class=
"function"><a id=
"cupsSetPasswordCB2">cupsSetPasswordCB2
</a></h3>
2522 <p class=
"description">Pointer to library globals
</p>
2524 void cupsSetPasswordCB2 (
<br>
2525     <a href=
"#cups_password_cb2_t">cups_password_cb2_t
</a> cb,
<br>
2526     void *user_data
<br>
2528 <h4 class=
"parameters">Parameters
</h4>
2531 <dd class=
"description">Callback function
</dd>
2533 <dd class=
"description">User data pointer
</dd>
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>
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.
2547 <h3 class=
"function"><a id=
"cupsSetServer">cupsSetServer
</a></h3>
2548 <p class=
"description">Pointer to library globals
</p>
2550 void cupsSetServer (
<br>
2551     const char *server
<br>
2553 <h4 class=
"parameters">Parameters
</h4>
2556 <dd class=
"description">Server name
</dd>
2558 <h4 class=
"returnvalue">Return Value
</h4>
2559 <p class=
"description">Set the default server name and port.
</p>
2560 <p class=
"discussion">The
"server
" 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.
"hostname:
8631". Pass
<code>NULL
</code> to restore the
2564 default server name and port.
<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>
2572 void cupsSetServerCertCB (
<br>
2573     <a href=
"#cups_server_cert_cb_t">cups_server_cert_cb_t
</a> cb,
<br>
2574     void *user_data
<br>
2576 <h4 class=
"parameters">Parameters
</h4>
2579 <dd class=
"description">Callback function
</dd>
2581 <dd class=
"description">User data pointer
</dd>
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>
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.
2592 <h3 class=
"function"><span class=
"info"> CUPS
2.0/macOS
10.10 </span><a id=
"cupsSetServerCredentials">cupsSetServerCredentials
</a></h3>
2593 <p class=
"description">Set the default server credentials.
</p>
2595 int cupsSetServerCredentials (
<br>
2596     const char *path,
<br>
2597     const char *common_name,
<br>
2598     int auto_create
<br>
2600 <h4 class=
"parameters">Parameters
</h4>
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>
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.
2616 <h3 class=
"function"><a id=
"cupsSetUser">cupsSetUser
</a></h3>
2617 <p class=
"description">Pointer to library globals
</p>
2619 void cupsSetUser (
<br>
2620     const char *user
<br>
2622 <h4 class=
"parameters">Parameters
</h4>
2625 <dd class=
"description">User name
</dd>
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>
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>
2637 void cupsSetUserAgent (
<br>
2638     const char *user_agent
<br>
2640 <h4 class=
"parameters">Parameters
</h4>
2643 <dd class=
"description">User-Agent string or
<code>NULL
</code></dd>
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.
2651 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsStartDestDocument">cupsStartDestDocument
</a></h3>
2652 <p class=
"description">Start a new document.
</p>
2654 http_status_t cupsStartDestDocument (
<br>
2655     <a href=
"#http_t">http_t
</a> *http,
<br>
2656     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
2657     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *info,
<br>
2658     int job_id,
<br>
2659     const char *docname,
<br>
2660     const char *format,
<br>
2661     int num_options,
<br>
2662     <a href=
"#cups_option_t">cups_option_t
</a> *options,
<br>
2663     int last_document
<br>
2665 <h4 class=
"parameters">Parameters
</h4>
2668 <dd class=
"description">Connection to destination
</dd>
2670 <dd class=
"description">Destination
</dd>
2672 <dd class=
"description">Destination information
</dd>
2674 <dd class=
"description">Job ID
</dd>
2676 <dd class=
"description">Document name
</dd>
2678 <dd class=
"description">Document format
</dd>
2679 <dt>num_options
</dt>
2680 <dd class=
"description">Number of document options
</dd>
2682 <dd class=
"description">Document options
</dd>
2683 <dt>last_document
</dt>
2684 <dd class=
"description">1 if this is the last document
</dd>
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">"job_id
" is the job ID returned by cupsCreateDestJob.
"docname
" is the name
2690 of the document/file being printed,
"format
" is the MIME media type for the
2691 document (see CUPS_FORMAT_xxx constants), and
"num_options
" and
"options
"
2692 are the options do be applied to the document.
"last_document
" should be
1
2693 if this is the last document to be submitted in the job. Returns
2694 <code>HTTP_CONTINUE
</code> on success.
2697 <h3 class=
"function"><a id=
"cupsUser">cupsUser
</a></h3>
2698 <p class=
"description">Return the current user's name.
</p>
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"> CUPS
1.7/macOS
10.9 </span><a id=
"cupsUserAgent">cupsUserAgent
</a></h3>
2709 <p class=
"description">Return the default HTTP User-Agent string.
</p>
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"> CUPS
1.7/macOS
10.9 </span><a id=
"httpAcceptConnection">httpAcceptConnection
</a></h3>
2715 <p class=
"description">Accept a new HTTP client connection from the
2716 specified listening socket.
</p>
2718 <a href=
"#http_t">http_t
</a> *httpAcceptConnection (
<br>
2719     int fd,
<br>
2720     int blocking
<br>
2722 <h4 class=
"parameters">Parameters
</h4>
2725 <dd class=
"description">Listen socket file descriptor
</dd>
2727 <dd class=
"description">1 if the connection should be
2728 blocking,
0 otherwise
</dd>
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"> CUPS
1.5/macOS
10.7 </span><a id=
"httpAddCredential">httpAddCredential
</a></h3>
2733 <p class=
"description">Allocates and adds a single credential to an array.
</p>
2735 int httpAddCredential (
<br>
2736     cups_array_t *credentials,
<br>
2737     const void *data,
<br>
2738     size_t datalen
<br>
2740 <h4 class=
"parameters">Parameters
</h4>
2742 <dt>credentials
</dt>
2743 <dd class=
"description">Credentials array
</dd>
2745 <dd class=
"description">PEM-encoded X
.509 data
</dd>
2747 <dd class=
"description">Length of data
</dd>
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.
2755 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAddrAny">httpAddrAny
</a></h3>
2756 <p class=
"description">Check for the
"any
" address.
</p>
2758 int httpAddrAny (
<br>
2759     const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
2761 <h4 class=
"parameters">Parameters
</h4>
2764 <dd class=
"description">Address to check
</dd>
2766 <h4 class=
"returnvalue">Return Value
</h4>
2767 <p class=
"description">1 if
"any
",
0 otherwise
</p>
2768 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </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>
2772 int httpAddrClose (
<br>
2773     <a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
2774     int fd
<br>
2776 <h4 class=
"parameters">Parameters
</h4>
2779 <dd class=
"description">Listen address or
<code>NULL
</code></dd>
2781 <dd class=
"description">Socket file descriptor
</dd>
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.
2791 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </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>
2795 <a href=
"#http_addrlist_t">http_addrlist_t
</a> *httpAddrConnect2 (
<br>
2796     <a href=
"#http_addrlist_t">http_addrlist_t
</a> *addrlist,
<br>
2797     int *sock,
<br>
2798     int msec,
<br>
2799     int *cancel
<br>
2801 <h4 class=
"parameters">Parameters
</h4>
2804 <dd class=
"description">List of potential addresses
</dd>
2806 <dd class=
"description">Socket
</dd>
2808 <dd class=
"description">Timeout in milliseconds
</dd>
2810 <dd class=
"description">Pointer to
"cancel
" variable
</dd>
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"> CUPS
1.7/macOS
10.9 </span><a id=
"httpAddrCopyList">httpAddrCopyList
</a></h3>
2815 <p class=
"description">Copy an address list.
</p>
2817 <a href=
"#http_addrlist_t">http_addrlist_t
</a> *httpAddrCopyList (
<br>
2818     <a href=
"#http_addrlist_t">http_addrlist_t
</a> *src
<br>
2820 <h4 class=
"parameters">Parameters
</h4>
2823 <dd class=
"description">Source address list
</dd>
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"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAddrEqual">httpAddrEqual
</a></h3>
2828 <p class=
"description">Compare two addresses.
</p>
2830 int httpAddrEqual (
<br>
2831     const
<a href=
"#http_addr_t">http_addr_t
</a> *addr1,
<br>
2832     const
<a href=
"#http_addr_t">http_addr_t
</a> *addr2
<br>
2834 <h4 class=
"parameters">Parameters
</h4>
2837 <dd class=
"description">First address
</dd>
2839 <dd class=
"description">Second address
</dd>
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>
2846 int httpAddrFamily (
<br>
2847     <a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
2849 <h4 class=
"parameters">Parameters
</h4>
2852 <dd class=
"description">Address
</dd>
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>
2859 void httpAddrFreeList (
<br>
2860     <a href=
"#http_addrlist_t">http_addrlist_t
</a> *addrlist
<br>
2862 <h4 class=
"parameters">Parameters
</h4>
2865 <dd class=
"description">Address list to free
</dd>
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"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAddrGetList">httpAddrGetList
</a></h3>
2871 <p class=
"description">Get a list of addresses for a hostname.
</p>
2873 <a href=
"#http_addrlist_t">http_addrlist_t
</a> *httpAddrGetList (
<br>
2874     const char *hostname,
<br>
2875     int family,
<br>
2876     const char *service
<br>
2878 <h4 class=
"parameters">Parameters
</h4>
2881 <dd class=
"description">Hostname, IP address, or NULL for passive listen address
</dd>
2883 <dd class=
"description">Address family or AF_UNSPEC
</dd>
2885 <dd class=
"description">Service name or port number
</dd>
2887 <h4 class=
"returnvalue">Return Value
</h4>
2888 <p class=
"description">List of addresses or NULL
</p>
2889 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAddrLength">httpAddrLength
</a></h3>
2890 <p class=
"description">Return the length of the address in bytes.
</p>
2892 int httpAddrLength (
<br>
2893     const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
2895 <h4 class=
"parameters">Parameters
</h4>
2898 <dd class=
"description">Address
</dd>
2900 <h4 class=
"returnvalue">Return Value
</h4>
2901 <p class=
"description">Length in bytes
</p>
2902 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpAddrListen">httpAddrListen
</a></h3>
2903 <p class=
"description">Create a listening socket bound to the specified
2904 address and port.
</p>
2906 int httpAddrListen (
<br>
2907     <a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
2908     int port
<br>
2910 <h4 class=
"parameters">Parameters
</h4>
2913 <dd class=
"description">Address to bind to
</dd>
2915 <dd class=
"description">Port number to bind to
</dd>
2917 <h4 class=
"returnvalue">Return Value
</h4>
2918 <p class=
"description">Socket or -
1 on error
</p>
2919 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAddrLocalhost">httpAddrLocalhost
</a></h3>
2920 <p class=
"description">Check for the local loopback address.
</p>
2922 int httpAddrLocalhost (
<br>
2923     const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
2925 <h4 class=
"parameters">Parameters
</h4>
2928 <dd class=
"description">Address to check
</dd>
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"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAddrLookup">httpAddrLookup
</a></h3>
2933 <p class=
"description">Lookup the hostname associated with the address.
</p>
2935 char *httpAddrLookup (
<br>
2936     const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
2937     char *name,
<br>
2938     int namelen
<br>
2940 <h4 class=
"parameters">Parameters
</h4>
2943 <dd class=
"description">Address to lookup
</dd>
2945 <dd class=
"description">Host name buffer
</dd>
2947 <dd class=
"description">Size of name buffer
</dd>
2949 <h4 class=
"returnvalue">Return Value
</h4>
2950 <p class=
"description">Host name
</p>
2951 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpAddrPort">httpAddrPort
</a></h3>
2952 <p class=
"description">Get the port number associated with an address.
</p>
2954 int httpAddrPort (
<br>
2955     <a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
2957 <h4 class=
"parameters">Parameters
</h4>
2960 <dd class=
"description">Address
</dd>
2962 <h4 class=
"returnvalue">Return Value
</h4>
2963 <p class=
"description">Port number
</p>
2964 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAddrString">httpAddrString
</a></h3>
2965 <p class=
"description">Convert an address to a numeric string.
</p>
2967 char *httpAddrString (
<br>
2968     const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
2969     char *s,
<br>
2970     int slen
<br>
2972 <h4 class=
"parameters">Parameters
</h4>
2975 <dd class=
"description">Address to convert
</dd>
2977 <dd class=
"description">String buffer
</dd>
2979 <dd class=
"description">Length of string
</dd>
2981 <h4 class=
"returnvalue">Return Value
</h4>
2982 <p class=
"description">Numeric address string
</p>
2983 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAssembleURI">httpAssembleURI
</a></h3>
2984 <p class=
"description">Assemble a uniform resource identifier from its
2987 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpAssembleURI (
<br>
2988     <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> encoding,
<br>
2989     char *uri,
<br>
2990     int urilen,
<br>
2991     const char *scheme,
<br>
2992     const char *username,
<br>
2993     const char *host,
<br>
2994     int port,
<br>
2995     const char *resource
<br>
2997 <h4 class=
"parameters">Parameters
</h4>
3000 <dd class=
"description">Encoding flags
</dd>
3002 <dd class=
"description">URI buffer
</dd>
3004 <dd class=
"description">Size of URI buffer
</dd>
3006 <dd class=
"description">Scheme name
</dd>
3008 <dd class=
"description">Username
</dd>
3010 <dd class=
"description">Hostname or address
</dd>
3012 <dd class=
"description">Port number
</dd>
3014 <dd class=
"description">Resource
</dd>
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
"encoding
" argument. You should use this function in
3021 place of traditional string functions whenever you need to create a
3025 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </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>
3029 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpAssembleURIf (
<br>
3030     <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> encoding,
<br>
3031     char *uri,
<br>
3032     int urilen,
<br>
3033     const char *scheme,
<br>
3034     const char *username,
<br>
3035     const char *host,
<br>
3036     int port,
<br>
3037     const char *resourcef,
<br>
3038     ...
<br>
3040 <h4 class=
"parameters">Parameters
</h4>
3043 <dd class=
"description">Encoding flags
</dd>
3045 <dd class=
"description">URI buffer
</dd>
3047 <dd class=
"description">Size of URI buffer
</dd>
3049 <dd class=
"description">Scheme name
</dd>
3051 <dd class=
"description">Username
</dd>
3053 <dd class=
"description">Hostname or address
</dd>
3055 <dd class=
"description">Port number
</dd>
3057 <dd class=
"description">Printf-style resource
</dd>
3059 <dd class=
"description">Additional arguments as needed
</dd>
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
"resourcef
" and escapes reserved characters in the URI
3066 depending on the value of the
"encoding
" argument. You should use
3067 this function in place of traditional string functions whenever
3068 you need to create a URI string.
3071 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpAssembleUUID">httpAssembleUUID
</a></h3>
3072 <p class=
"description">Assemble a name-based UUID URN conforming to RFC
4122.
</p>
3074 char *httpAssembleUUID (
<br>
3075     const char *server,
<br>
3076     int port,
<br>
3077     const char *name,
<br>
3078     int number,
<br>
3079     char *buffer,
<br>
3080     size_t bufsize
<br>
3082 <h4 class=
"parameters">Parameters
</h4>
3085 <dd class=
"description">Server name
</dd>
3087 <dd class=
"description">Port number
</dd>
3089 <dd class=
"description">Object name or NULL
</dd>
3091 <dd class=
"description">Object number or
0</dd>
3093 <dd class=
"description">String buffer
</dd>
3095 <dd class=
"description">Size of buffer
</dd>
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>
3104 The buffer needs to be at least
46 bytes in size.
3107 <h3 class=
"function"><a id=
"httpBlocking">httpBlocking
</a></h3>
3108 <p class=
"description">Credential data
</p>
3110 void httpBlocking (
<br>
3111     <a href=
"#http_t">http_t
</a> *http,
<br>
3112     int b
<br>
3114 <h4 class=
"parameters">Parameters
</h4>
3117 <dd class=
"description">HTTP connection
</dd>
3119 <dd class=
"description">1 = blocking,
0 = non-blocking
</dd>
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>
3127     <a href=
"#http_t">http_t
</a> *http
<br>
3129 <h4 class=
"parameters">Parameters
</h4>
3132 <dd class=
"description">HTTP connection
</dd>
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>
3139 void httpClearCookie (
<br>
3140     <a href=
"#http_t">http_t
</a> *http
<br>
3142 <h4 class=
"parameters">Parameters
</h4>
3145 <dd class=
"description">HTTP connection
</dd>
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>
3153 void httpClearFields (
<br>
3154     <a href=
"#http_t">http_t
</a> *http
<br>
3156 <h4 class=
"parameters">Parameters
</h4>
3159 <dd class=
"description">HTTP connection
</dd>
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>
3166 void httpClose (
<br>
3167     <a href=
"#http_t">http_t
</a> *http
<br>
3169 <h4 class=
"parameters">Parameters
</h4>
3172 <dd class=
"description">HTTP connection
</dd>
3174 <h4 class=
"returnvalue">Return Value
</h4>
3175 <p class=
"description">Close an HTTP connection.
</p>
3176 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpCompareCredentials">httpCompareCredentials
</a></h3>
3177 <p class=
"description">Compare two sets of X
.509 credentials.
</p>
3179 int httpCompareCredentials (
<br>
3180     cups_array_t *cred1,
<br>
3181     cups_array_t *cred2
<br>
3183 <h4 class=
"parameters">Parameters
</h4>
3186 <dd class=
"description">First set of X
.509 credentials
</dd>
3188 <dd class=
"description">Second set of X
.509 credentials
</dd>
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"> CUPS
1.7/macOS
10.9 </span><a id=
"httpConnect2">httpConnect2
</a></h3>
3193 <p class=
"description">Connect to a HTTP server.
</p>
3195 <a href=
"#http_t">http_t
</a> *httpConnect2 (
<br>
3196     const char *host,
<br>
3197     int port,
<br>
3198     <a href=
"#http_addrlist_t">http_addrlist_t
</a> *addrlist,
<br>
3199     int family,
<br>
3200     <a href=
"#http_encryption_t">http_encryption_t
</a> encryption,
<br>
3201     int blocking,
<br>
3202     int msec,
<br>
3203     int *cancel
<br>
3205 <h4 class=
"parameters">Parameters
</h4>
3208 <dd class=
"description">Host to connect to
</dd>
3210 <dd class=
"description">Port number
</dd>
3212 <dd class=
"description">List of addresses or NULL to lookup
</dd>
3214 <dd class=
"description">Address family to use or
<code>AF_UNSPEC
</code> for any
</dd>
3216 <dd class=
"description">Type of encryption to use
</dd>
3218 <dd class=
"description">1 for blocking connection,
0 for non-blocking
</dd>
3220 <dd class=
"description">Connection timeout in milliseconds,
0 means don't connect
</dd>
3222 <dd class=
"description">Pointer to
"cancel
" variable
</dd>
3224 <h4 class=
"returnvalue">Return Value
</h4>
3225 <p class=
"description">New HTTP connection
</p>
3226 <h3 class=
"function"><span class=
"info"> CUPS
1.5/macOS
10.7 </span><a id=
"httpCopyCredentials">httpCopyCredentials
</a></h3>
3227 <p class=
"description">Copy the credentials associated with the peer in
3228 an encrypted connection.
</p>
3230 int httpCopyCredentials (
<br>
3231     <a href=
"#http_t">http_t
</a> *http,
<br>
3232     cups_array_t **credentials
<br>
3234 <h4 class=
"parameters">Parameters
</h4>
3237 <dd class=
"description">Connection to server
</dd>
3238 <dt>credentials
</dt>
3239 <dd class=
"description">Array of credentials
</dd>
3241 <h4 class=
"returnvalue">Return Value
</h4>
3242 <p class=
"description">Status of call (
0 = success)
</p>
3243 <h3 class=
"function"><span class=
"info"> CUPS
2.0/macOS
10.10 </span><a id=
"httpCredentialsAreValidForName">httpCredentialsAreValidForName
</a></h3>
3244 <p class=
"description">Return whether the credentials are valid for the given name.
</p>
3246 int httpCredentialsAreValidForName (
<br>
3247     cups_array_t *credentials,
<br>
3248     const char *common_name
<br>
3250 <h4 class=
"parameters">Parameters
</h4>
3252 <dt>credentials
</dt>
3253 <dd class=
"description">Credentials
</dd>
3254 <dt>common_name
</dt>
3255 <dd class=
"description">Name to check
</dd>
3257 <h4 class=
"returnvalue">Return Value
</h4>
3258 <p class=
"description">1 if valid,
0 otherwise
</p>
3259 <h3 class=
"function"><span class=
"info"> CUPS
2.0/macOS
10.10 </span><a id=
"httpCredentialsGetExpiration">httpCredentialsGetExpiration
</a></h3>
3260 <p class=
"description">Return the expiration date of the credentials.
</p>
3262 time_t httpCredentialsGetExpiration (
<br>
3263     cups_array_t *credentials
<br>
3265 <h4 class=
"parameters">Parameters
</h4>
3267 <dt>credentials
</dt>
3268 <dd class=
"description">Credentials
</dd>
3270 <h4 class=
"returnvalue">Return Value
</h4>
3271 <p class=
"description">Expiration date of credentials
</p>
3272 <h3 class=
"function"><span class=
"info"> CUPS
2.0/macOS
10.10 </span><a id=
"httpCredentialsGetTrust">httpCredentialsGetTrust
</a></h3>
3273 <p class=
"description">Return the trust of credentials.
</p>
3275 <a href=
"#http_trust_t">http_trust_t
</a> httpCredentialsGetTrust (
<br>
3276     cups_array_t *credentials,
<br>
3277     const char *common_name
<br>
3279 <h4 class=
"parameters">Parameters
</h4>
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>
3286 <h4 class=
"returnvalue">Return Value
</h4>
3287 <p class=
"description">Level of trust
</p>
3288 <h3 class=
"function"><span class=
"info"> CUPS
2.0/macOS
10.10 </span><a id=
"httpCredentialsString">httpCredentialsString
</a></h3>
3289 <p class=
"description">Return a string representing the credentials.
</p>
3291 size_t httpCredentialsString (
<br>
3292     cups_array_t *credentials,
<br>
3293     char *buffer,
<br>
3294     size_t bufsize
<br>
3296 <h4 class=
"parameters">Parameters
</h4>
3298 <dt>credentials
</dt>
3299 <dd class=
"description">Credentials
</dd>
3301 <dd class=
"description">Buffer or
<code>NULL
</code></dd>
3303 <dd class=
"description">Size of buffer
</dd>
3305 <h4 class=
"returnvalue">Return Value
</h4>
3306 <p class=
"description">Total size of credentials string
</p>
3307 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/macOS
10.4 </span><a id=
"httpDecode64_2">httpDecode64_2
</a></h3>
3308 <p class=
"description">Base64-decode a string.
</p>
3310 char *httpDecode64_2 (
<br>
3311     char *out,
<br>
3312     int *outlen,
<br>
3313     const char *in
<br>
3315 <h4 class=
"parameters">Parameters
</h4>
3318 <dd class=
"description">String to write to
</dd>
3320 <dd class=
"description">Size of output string
</dd>
3322 <dd class=
"description">String to read from
</dd>
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>
3329 int httpDelete (
<br>
3330     <a href=
"#http_t">http_t
</a> *http,
<br>
3331     const char *uri
<br>
3333 <h4 class=
"parameters">Parameters
</h4>
3336 <dd class=
"description">HTTP connection
</dd>
3338 <dd class=
"description">URI to delete
</dd>
3340 <h4 class=
"returnvalue">Return Value
</h4>
3341 <p class=
"description">Status of call (
0 = success)
</p>
3342 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/macOS
10.4 </span><a id=
"httpEncode64_2">httpEncode64_2
</a></h3>
3343 <p class=
"description">Base64-encode a string.
</p>
3345 char *httpEncode64_2 (
<br>
3346     char *out,
<br>
3347     int outlen,
<br>
3348     const char *in,
<br>
3349     int inlen
<br>
3351 <h4 class=
"parameters">Parameters
</h4>
3354 <dd class=
"description">String to write to
</dd>
3356 <dd class=
"description">Size of output string
</dd>
3358 <dd class=
"description">String to read from
</dd>
3360 <dd class=
"description">Size of input string
</dd>
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>
3367 int httpEncryption (
<br>
3368     <a href=
"#http_t">http_t
</a> *http,
<br>
3369     <a href=
"#http_encryption_t">http_encryption_t
</a> e
<br>
3371 <h4 class=
"parameters">Parameters
</h4>
3374 <dd class=
"description">HTTP connection
</dd>
3376 <dd class=
"description">New encryption preference
</dd>
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>
3384     <a href=
"#http_t">http_t
</a> *http
<br>
3386 <h4 class=
"parameters">Parameters
</h4>
3389 <dd class=
"description">HTTP connection
</dd>
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
3397 <a href=
"#http_field_t">http_field_t
</a> httpFieldValue (
<br>
3398     const char *name
<br>
3400 <h4 class=
"parameters">Parameters
</h4>
3403 <dd class=
"description">String name
</dd>
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>
3410 void httpFlush (
<br>
3411     <a href=
"#http_t">http_t
</a> *http
<br>
3413 <h4 class=
"parameters">Parameters
</h4>
3416 <dd class=
"description">HTTP connection
</dd>
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"> CUPS
1.2/macOS
10.5 </span><a id=
"httpFlushWrite">httpFlushWrite
</a></h3>
3421 <p class=
"description">Flush data in write buffer.
</p>
3423 int httpFlushWrite (
<br>
3424     <a href=
"#http_t">http_t
</a> *http
<br>
3426 <h4 class=
"parameters">Parameters
</h4>
3429 <dd class=
"description">HTTP connection
</dd>
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>
3436 void httpFreeCredentials (
<br>
3437     cups_array_t *credentials
<br>
3439 <h4 class=
"parameters">Parameters
</h4>
3441 <dt>credentials
</dt>
3442 <dd class=
"description">Array of credentials
</dd>
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>
3450     <a href=
"#http_t">http_t
</a> *http,
<br>
3451     const char *uri
<br>
3453 <h4 class=
"parameters">Parameters
</h4>
3456 <dd class=
"description">HTTP connection
</dd>
3458 <dd class=
"description">URI to get
</dd>
3460 <h4 class=
"returnvalue">Return Value
</h4>
3461 <p class=
"description">Status of call (
0 = success)
</p>
3462 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpGetActivity">httpGetActivity
</a></h3>
3463 <p class=
"description">Get the most recent activity for a connection.
</p>
3465 time_t httpGetActivity (
<br>
3466     <a href=
"#http_t">http_t
</a> *http
<br>
3468 <h4 class=
"parameters">Parameters
</h4>
3471 <dd class=
"description">HTTP connection
</dd>
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.
3479 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpGetAddress">httpGetAddress
</a></h3>
3480 <p class=
"description">Get the address of the connected peer of a connection.
</p>
3482 <a href=
"#http_addr_t">http_addr_t
</a> *httpGetAddress (
<br>
3483     <a href=
"#http_t">http_t
</a> *http
<br>
3485 <h4 class=
"parameters">Parameters
</h4>
3488 <dd class=
"description">HTTP connection
</dd>
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.
3496 <h3 class=
"function"><span class=
"info"> CUPS
1.3/macOS
10.5 </span><a id=
"httpGetAuthString">httpGetAuthString
</a></h3>
3497 <p class=
"description">Get the current authorization string.
</p>
3499 char *httpGetAuthString (
<br>
3500     <a href=
"#http_t">http_t
</a> *http
<br>
3502 <h4 class=
"parameters">Parameters
</h4>
3505 <dd class=
"description">HTTP connection
</dd>
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
3516 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpGetBlocking">httpGetBlocking
</a></h3>
3517 <p class=
"description">Get the blocking/non-block state of a connection.
</p>
3519 int httpGetBlocking (
<br>
3520     <a href=
"#http_t">http_t
</a> *http
<br>
3522 <h4 class=
"parameters">Parameters
</h4>
3525 <dd class=
"description">HTTP connection
</dd>
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"> CUPS
1.7/macOS
10.9 </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>
3533 const char *httpGetContentEncoding (
<br>
3534     <a href=
"#http_t">http_t
</a> *http
<br>
3536 <h4 class=
"parameters">Parameters
</h4>
3539 <dd class=
"description">HTTP connection
</dd>
3541 <h4 class=
"returnvalue">Return Value
</h4>
3542 <p class=
"description">Content-Coding value or
3543 <code>NULL
</code> for the identity
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.
3552 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"httpGetCookie">httpGetCookie
</a></h3>
3553 <p class=
"description">Get any cookie data from the response.
</p>
3555 const char *httpGetCookie (
<br>
3556     <a href=
"#http_t">http_t
</a> *http
<br>
3558 <h4 class=
"parameters">Parameters
</h4>
3561 <dd class=
"description">HTTP connection
</dd>
3563 <h4 class=
"returnvalue">Return Value
</h4>
3564 <p class=
"description">Cookie data or NULL
</p>
3565 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpGetDateString2">httpGetDateString2
</a></h3>
3566 <p class=
"description">Get a formatted date/time string from a time value.
</p>
3568 const char *httpGetDateString2 (
<br>
3569     time_t t,
<br>
3570     char *s,
<br>
3571     int slen
<br>
3573 <h4 class=
"parameters">Parameters
</h4>
3576 <dd class=
"description">UNIX time
</dd>
3578 <dd class=
"description">String buffer
</dd>
3580 <dd class=
"description">Size of string buffer
</dd>
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>
3587 time_t httpGetDateTime (
<br>
3588     const char *s
<br>
3590 <h4 class=
"parameters">Parameters
</h4>
3593 <dd class=
"description">Date/time string
</dd>
3595 <h4 class=
"returnvalue">Return Value
</h4>
3596 <p class=
"description">UNIX time
</p>
3597 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpGetEncryption">httpGetEncryption
</a></h3>
3598 <p class=
"description">Get the current encryption mode of a connection.
</p>
3600 <a href=
"#http_encryption_t">http_encryption_t
</a> httpGetEncryption (
<br>
3601     <a href=
"#http_t">http_t
</a> *http
<br>
3603 <h4 class=
"parameters">Parameters
</h4>
3606 <dd class=
"description">HTTP connection
</dd>
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
3616 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpGetExpect">httpGetExpect
</a></h3>
3617 <p class=
"description">Get the value of the Expect header, if any.
</p>
3619 http_status_t httpGetExpect (
<br>
3620     <a href=
"#http_t">http_t
</a> *http
<br>
3622 <h4 class=
"parameters">Parameters
</h4>
3625 <dd class=
"description">HTTP connection
</dd>
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>.
3634 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpGetFd">httpGetFd
</a></h3>
3635 <p class=
"description">Get the file descriptor associated with a connection.
</p>
3638     <a href=
"#http_t">http_t
</a> *http
<br>
3640 <h4 class=
"parameters">Parameters
</h4>
3643 <dd class=
"description">HTTP connection
</dd>
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>
3650 const char *httpGetField (
<br>
3651     <a href=
"#http_t">http_t
</a> *http,
<br>
3652     <a href=
"#http_field_t">http_field_t
</a> field
<br>
3654 <h4 class=
"parameters">Parameters
</h4>
3657 <dd class=
"description">HTTP connection
</dd>
3659 <dd class=
"description">Field to get
</dd>
3661 <h4 class=
"returnvalue">Return Value
</h4>
3662 <p class=
"description">Field value
</p>
3663 <h3 class=
"function"><span class=
"info"> DEPRECATED
 </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>
3667 struct hostent *httpGetHostByName (
<br>
3668     const char *name
<br>
3670 <h4 class=
"parameters">Parameters
</h4>
3673 <dd class=
"description">Hostname or IP address
</dd>
3675 <h4 class=
"returnvalue">Return Value
</h4>
3676 <p class=
"description">Host entry
</p>
3677 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpGetHostname">httpGetHostname
</a></h3>
3678 <p class=
"description">Get the FQDN for the connection or local system.
</p>
3680 const char *httpGetHostname (
<br>
3681     <a href=
"#http_t">http_t
</a> *http,
<br>
3682     char *s,
<br>
3683     int slen
<br>
3685 <h4 class=
"parameters">Parameters
</h4>
3688 <dd class=
"description">HTTP connection or NULL
</dd>
3690 <dd class=
"description">String buffer for name
</dd>
3692 <dd class=
"description">Size of buffer
</dd>
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
"http
" 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.
3704 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpGetKeepAlive">httpGetKeepAlive
</a></h3>
3705 <p class=
"description">Get the current Keep-Alive state of the connection.
</p>
3707 <a href=
"#http_keepalive_t">http_keepalive_t
</a> httpGetKeepAlive (
<br>
3708     <a href=
"#http_t">http_t
</a> *http
<br>
3710 <h4 class=
"parameters">Parameters
</h4>
3713 <dd class=
"description">HTTP connection
</dd>
3715 <h4 class=
"returnvalue">Return Value
</h4>
3716 <p class=
"description">Keep-Alive state
</p>
3717 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </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>
3721 off_t httpGetLength2 (
<br>
3722     <a href=
"#http_t">http_t
</a> *http
<br>
3724 <h4 class=
"parameters">Parameters
</h4>
3727 <dd class=
"description">HTTP connection
</dd>
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.
3736 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpGetPending">httpGetPending
</a></h3>
3737 <p class=
"description">Get the number of bytes that are buffered for writing.
</p>
3739 size_t httpGetPending (
<br>
3740     <a href=
"#http_t">http_t
</a> *http
<br>
3742 <h4 class=
"parameters">Parameters
</h4>
3745 <dd class=
"description">HTTP connection
</dd>
3747 <h4 class=
"returnvalue">Return Value
</h4>
3748 <p class=
"description">Number of bytes buffered
</p>
3749 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpGetReady">httpGetReady
</a></h3>
3750 <p class=
"description">Get the number of bytes that can be read without blocking.
</p>
3752 size_t httpGetReady (
<br>
3753     <a href=
"#http_t">http_t
</a> *http
<br>
3755 <h4 class=
"parameters">Parameters
</h4>
3758 <dd class=
"description">HTTP connection
</dd>
3760 <h4 class=
"returnvalue">Return Value
</h4>
3761 <p class=
"description">Number of bytes available
</p>
3762 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </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>
3766 size_t httpGetRemaining (
<br>
3767     <a href=
"#http_t">http_t
</a> *http
<br>
3769 <h4 class=
"parameters">Parameters
</h4>
3772 <dd class=
"description">HTTP connection
</dd>
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.
3781 <h3 class=
"function"><a id=
"httpGetState">httpGetState
</a></h3>
3782 <p class=
"description">Get the current state of the HTTP request.
</p>
3784 <a href=
"#http_state_t">http_state_t
</a> httpGetState (
<br>
3785     <a href=
"#http_t">http_t
</a> *http
<br>
3787 <h4 class=
"parameters">Parameters
</h4>
3790 <dd class=
"description">HTTP connection
</dd>
3792 <h4 class=
"returnvalue">Return Value
</h4>
3793 <p class=
"description">HTTP state
</p>
3794 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpGetStatus">httpGetStatus
</a></h3>
3795 <p class=
"description">Get the status of the last HTTP request.
</p>
3797 http_status_t httpGetStatus (
<br>
3798     <a href=
"#http_t">http_t
</a> *http
<br>
3800 <h4 class=
"parameters">Parameters
</h4>
3803 <dd class=
"description">HTTP connection
</dd>
3805 <h4 class=
"returnvalue">Return Value
</h4>
3806 <p class=
"description">HTTP status
</p>
3807 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpGetSubField2">httpGetSubField2
</a></h3>
3808 <p class=
"description">Get a sub-field value.
</p>
3810 char *httpGetSubField2 (
<br>
3811     <a href=
"#http_t">http_t
</a> *http,
<br>
3812     <a href=
"#http_field_t">http_field_t
</a> field,
<br>
3813     const char *name,
<br>
3814     char *value,
<br>
3815     int valuelen
<br>
3817 <h4 class=
"parameters">Parameters
</h4>
3820 <dd class=
"description">HTTP connection
</dd>
3822 <dd class=
"description">Field index
</dd>
3824 <dd class=
"description">Name of sub-field
</dd>
3826 <dd class=
"description">Value string
</dd>
3828 <dd class=
"description">Size of value buffer
</dd>
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>
3835 <a href=
"#http_version_t">http_version_t
</a> httpGetVersion (
<br>
3836     <a href=
"#http_t">http_t
</a> *http
<br>
3838 <h4 class=
"parameters">Parameters
</h4>
3841 <dd class=
"description">HTTP connection
</dd>
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>
3848 char *httpGets (
<br>
3849     char *line,
<br>
3850     int length,
<br>
3851     <a href=
"#http_t">http_t
</a> *http
<br>
3853 <h4 class=
"parameters">Parameters
</h4>
3856 <dd class=
"description">Line to read into
</dd>
3858 <dd class=
"description">Max length of buffer
</dd>
3860 <dd class=
"description">HTTP connection
</dd>
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>
3868     <a href=
"#http_t">http_t
</a> *http,
<br>
3869     const char *uri
<br>
3871 <h4 class=
"parameters">Parameters
</h4>
3874 <dd class=
"description">HTTP connection
</dd>
3876 <dd class=
"description">URI for head
</dd>
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>
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"> CUPS
2.0/OS
10.10 </span><a id=
"httpIsChunked">httpIsChunked
</a></h3>
3888 <p class=
"description">Report whether a message body is chunked.
</p>
3890 int httpIsChunked (
<br>
3891     <a href=
"#http_t">http_t
</a> *http
<br>
3893 <h4 class=
"parameters">Parameters
</h4>
3896 <dd class=
"description">HTTP connection
</dd>
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.
3905 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpIsEncrypted">httpIsEncrypted
</a></h3>
3906 <p class=
"description">Report whether a connection is encrypted.
</p>
3908 int httpIsEncrypted (
<br>
3909     <a href=
"#http_t">http_t
</a> *http
<br>
3911 <h4 class=
"parameters">Parameters
</h4>
3914 <dd class=
"description">HTTP connection
</dd>
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.
3922 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpLoadCredentials">httpLoadCredentials
</a></h3>
3923 <p class=
"description">Load X
.509 credentials from a keychain file.
</p>
3925 int httpLoadCredentials (
<br>
3926     const char *path,
<br>
3927     cups_array_t **credentials,
<br>
3928     const char *common_name
<br>
3930 <h4 class=
"parameters">Parameters
</h4>
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>
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>
3944 int httpOptions (
<br>
3945     <a href=
"#http_t">http_t
</a> *http,
<br>
3946     const char *uri
<br>
3948 <h4 class=
"parameters">Parameters
</h4>
3951 <dd class=
"description">HTTP connection
</dd>
3953 <dd class=
"description">URI for options
</dd>
3955 <h4 class=
"returnvalue">Return Value
</h4>
3956 <p class=
"description">Status of call (
0 = success)
</p>
3957 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpPeek">httpPeek
</a></h3>
3958 <p class=
"description">Peek at data from a HTTP connection.
</p>
3960 ssize_t httpPeek (
<br>
3961     <a href=
"#http_t">http_t
</a> *http,
<br>
3962     char *buffer,
<br>
3963     size_t length
<br>
3965 <h4 class=
"parameters">Parameters
</h4>
3968 <dd class=
"description">HTTP connection
</dd>
3970 <dd class=
"description">Buffer for data
</dd>
3972 <dd class=
"description">Maximum number of bytes
</dd>
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>
3981 For non-blocking connections the usual timeouts apply.
3984 <h3 class=
"function"><a id=
"httpPost">httpPost
</a></h3>
3985 <p class=
"description">Send a POST request to the server.
</p>
3988     <a href=
"#http_t">http_t
</a> *http,
<br>
3989     const char *uri
<br>
3991 <h4 class=
"parameters">Parameters
</h4>
3994 <dd class=
"description">HTTP connection
</dd>
3996 <dd class=
"description">URI for post
</dd>
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>
4004     <a href=
"#http_t">http_t
</a> *http,
<br>
4005     const char *uri
<br>
4007 <h4 class=
"parameters">Parameters
</h4>
4010 <dd class=
"description">HTTP connection
</dd>
4012 <dd class=
"description">URI to put
</dd>
4014 <h4 class=
"returnvalue">Return Value
</h4>
4015 <p class=
"description">Status of call (
0 = success)
</p>
4016 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpRead2">httpRead2
</a></h3>
4017 <p class=
"description">Read data from a HTTP connection.
</p>
4019 ssize_t httpRead2 (
<br>
4020     <a href=
"#http_t">http_t
</a> *http,
<br>
4021     char *buffer,
<br>
4022     size_t length
<br>
4024 <h4 class=
"parameters">Parameters
</h4>
4027 <dd class=
"description">HTTP connection
</dd>
4029 <dd class=
"description">Buffer for data
</dd>
4031 <dd class=
"description">Maximum number of bytes
</dd>
4033 <h4 class=
"returnvalue">Return Value
</h4>
4034 <p class=
"description">Number of bytes read
</p>
4035 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpReadRequest">httpReadRequest
</a></h3>
4036 <p class=
"description">Read a HTTP request from a connection.
</p>
4038 <a href=
"#http_state_t">http_state_t
</a> httpReadRequest (
<br>
4039     <a href=
"#http_t">http_t
</a> *http,
<br>
4040     char *uri,
<br>
4041     size_t urilen
<br>
4043 <h4 class=
"parameters">Parameters
</h4>
4046 <dd class=
"description">HTTP connection
</dd>
4048 <dd class=
"description">URI buffer
</dd>
4050 <dd class=
"description">Size of URI buffer
</dd>
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
4058 int httpReconnect2 (
<br>
4059     <a href=
"#http_t">http_t
</a> *http,
<br>
4060     int msec,
<br>
4061     int *cancel
<br>
4063 <h4 class=
"parameters">Parameters
</h4>
4066 <dd class=
"description">HTTP connection
</dd>
4068 <dd class=
"description">Timeout in milliseconds
</dd>
4070 <dd class=
"description">Pointer to
"cancel
" variable
</dd>
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"> CUPS
2.0/OS
10.10 </span><a id=
"httpResolveHostname">httpResolveHostname
</a></h3>
4075 <p class=
"description">Resolve the hostname of the HTTP connection
4078 const char *httpResolveHostname (
<br>
4079     <a href=
"#http_t">http_t
</a> *http,
<br>
4080     char *buffer,
<br>
4081     size_t bufsize
<br>
4083 <h4 class=
"parameters">Parameters
</h4>
4086 <dd class=
"description">HTTP connection
</dd>
4088 <dd class=
"description">Hostname buffer
</dd>
4090 <dd class=
"description">Size of buffer
</dd>
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"> CUPS
2.0/OS
10.10 </span><a id=
"httpSaveCredentials">httpSaveCredentials
</a></h3>
4095 <p class=
"description">Save X
.509 credentials to a keychain file.
</p>
4097 int httpSaveCredentials (
<br>
4098     const char *path,
<br>
4099     cups_array_t *credentials,
<br>
4100     const char *common_name
<br>
4102 <h4 class=
"parameters">Parameters
</h4>
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>
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>
4116 void httpSeparate (
<br>
4117     const char *uri,
<br>
4118     char *scheme,
<br>
4119     char *username,
<br>
4120     char *host,
<br>
4121     int *port,
<br>
4122     char *resource
<br>
4124 <h4 class=
"parameters">Parameters
</h4>
4127 <dd class=
"description">Universal Resource Identifier
</dd>
4129 <dd class=
"description">Scheme [
32] (http, https, etc.)
</dd>
4131 <dd class=
"description">Username [
1024]
</dd>
4133 <dd class=
"description">Hostname [
1024]
</dd>
4135 <dd class=
"description">Port number to use
</dd>
4137 <dd class=
"description">Resource/filename [
1024]
</dd>
4139 <h4 class=
"returnvalue">Return Value
</h4>
4140 <p class=
"description">Separate a Universal Resource Identifier into its
4142 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
4145 <h3 class=
"function"><a id=
"httpSeparate2">httpSeparate2
</a></h3>
4146 <p class=
"description">Resource/filename [
1024]
</p>
4148 void httpSeparate2 (
<br>
4149     const char *uri,
<br>
4150     char *scheme,
<br>
4151     int schemelen,
<br>
4152     char *username,
<br>
4153     int usernamelen,
<br>
4154     char *host,
<br>
4155     int hostlen,
<br>
4156     int *port,
<br>
4157     char *resource,
<br>
4158     int resourcelen
<br>
4160 <h4 class=
"parameters">Parameters
</h4>
4163 <dd class=
"description">Universal Resource Identifier
</dd>
4165 <dd class=
"description">Scheme (http, https, etc.)
</dd>
4167 <dd class=
"description">Size of scheme buffer
</dd>
4169 <dd class=
"description">Username
</dd>
4170 <dt>usernamelen
</dt>
4171 <dd class=
"description">Size of username buffer
</dd>
4173 <dd class=
"description">Hostname
</dd>
4175 <dd class=
"description">Size of hostname buffer
</dd>
4177 <dd class=
"description">Port number to use
</dd>
4179 <dd class=
"description">Resource/filename
</dd>
4180 <dt>resourcelen
</dt>
4181 <dd class=
"description">Size of resource buffer
</dd>
4183 <h4 class=
"returnvalue">Return Value
</h4>
4184 <p class=
"description">Separate a Universal Resource Identifier into its
4186 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
4190 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpSeparateURI">httpSeparateURI
</a></h3>
4191 <p class=
"description">Separate a Universal Resource Identifier into its
4194 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpSeparateURI (
<br>
4195     <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> decoding,
<br>
4196     const char *uri,
<br>
4197     char *scheme,
<br>
4198     int schemelen,
<br>
4199     char *username,
<br>
4200     int usernamelen,
<br>
4201     char *host,
<br>
4202     int hostlen,
<br>
4203     int *port,
<br>
4204     char *resource,
<br>
4205     int resourcelen
<br>
4207 <h4 class=
"parameters">Parameters
</h4>
4210 <dd class=
"description">Decoding flags
</dd>
4212 <dd class=
"description">Universal Resource Identifier
</dd>
4214 <dd class=
"description">Scheme (http, https, etc.)
</dd>
4216 <dd class=
"description">Size of scheme buffer
</dd>
4218 <dd class=
"description">Username
</dd>
4219 <dt>usernamelen
</dt>
4220 <dd class=
"description">Size of username buffer
</dd>
4222 <dd class=
"description">Hostname
</dd>
4224 <dd class=
"description">Size of hostname buffer
</dd>
4226 <dd class=
"description">Port number to use
</dd>
4228 <dd class=
"description">Resource/filename
</dd>
4229 <dt>resourcelen
</dt>
4230 <dd class=
"description">Size of resource buffer
</dd>
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>
4237 void httpSetAuthString (
<br>
4238     <a href=
"#http_t">http_t
</a> *http,
<br>
4239     const char *scheme,
<br>
4240     const char *data
<br>
4242 <h4 class=
"parameters">Parameters
</h4>
4245 <dd class=
"description">HTTP connection
</dd>
4247 <dd class=
"description">Auth scheme (NULL to clear it)
</dd>
4249 <dd class=
"description">Auth data (NULL for none)
</dd>
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().
4259 <h3 class=
"function"><a id=
"httpSetCookie">httpSetCookie
</a></h3>
4260 <p class=
"description">Array of credentials
</p>
4262 void httpSetCookie (
<br>
4263     <a href=
"#http_t">http_t
</a> *http,
<br>
4264     const char *cookie
<br>
4266 <h4 class=
"parameters">Parameters
</h4>
4269 <dd class=
"description">Connection
</dd>
4271 <dd class=
"description">Cookie string
</dd>
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"> CUPS
1.5/macOS
10.7 </span><a id=
"httpSetCredentials">httpSetCredentials
</a></h3>
4277 <p class=
"description">Set the credentials associated with an encrypted
4280 int httpSetCredentials (
<br>
4281     <a href=
"#http_t">http_t
</a> *http,
<br>
4282     cups_array_t *credentials
<br>
4284 <h4 class=
"parameters">Parameters
</h4>
4287 <dd class=
"description">HTTP connection
</dd>
4288 <dt>credentials
</dt>
4289 <dd class=
"description">Array of credentials
</dd>
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>
4296 void httpSetDefaultField (
<br>
4297     <a href=
"#http_t">http_t
</a> *http,
<br>
4298     <a href=
"#http_field_t">http_field_t
</a> field,
<br>
4299     const char *value
<br>
4301 <h4 class=
"parameters">Parameters
</h4>
4304 <dd class=
"description">HTTP connection
</dd>
4306 <dd class=
"description">Field index
</dd>
4308 <dd class=
"description">Value
</dd>
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.
4316 <h3 class=
"function"><a id=
"httpSetExpect">httpSetExpect
</a></h3>
4317 <p class=
"description">Value
</p>
4319 void httpSetExpect (
<br>
4320     <a href=
"#http_t">http_t
</a> *http,
<br>
4321     http_status_t expect
<br>
4323 <h4 class=
"parameters">Parameters
</h4>
4326 <dd class=
"description">HTTP connection
</dd>
4328 <dd class=
"description">HTTP status to expect
4329 (
<code>HTTP_STATUS_CONTINUE
</code>)
</dd>
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
"expect
"
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>
4341 void httpSetField (
<br>
4342     <a href=
"#http_t">http_t
</a> *http,
<br>
4343     <a href=
"#http_field_t">http_field_t
</a> field,
<br>
4344     const char *value
<br>
4346 <h4 class=
"parameters">Parameters
</h4>
4349 <dd class=
"description">HTTP connection
</dd>
4351 <dd class=
"description">Field index
</dd>
4353 <dd class=
"description">Value
</dd>
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>
4360 void httpSetKeepAlive (
<br>
4361     <a href=
"#http_t">http_t
</a> *http,
<br>
4362     <a href=
"#http_keepalive_t">http_keepalive_t
</a> keep_alive
<br>
4364 <h4 class=
"parameters">Parameters
</h4>
4367 <dd class=
"description">HTTP connection
</dd>
4369 <dd class=
"description">New Keep-Alive value
</dd>
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>
4377 void httpSetLength (
<br>
4378     <a href=
"#http_t">http_t
</a> *http,
<br>
4379     size_t length
<br>
4381 <h4 class=
"parameters">Parameters
</h4>
4384 <dd class=
"description">HTTP connection
</dd>
4386 <dd class=
"description">Length (
0 for chunked)
</dd>
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>
4394 void httpSetTimeout (
<br>
4395     <a href=
"#http_t">http_t
</a> *http,
<br>
4396     double timeout,
<br>
4397     <a href=
"#http_timeout_cb_t">http_timeout_cb_t
</a> cb,
<br>
4398     void *user_data
<br>
4400 <h4 class=
"parameters">Parameters
</h4>
4403 <dd class=
"description">HTTP connection
</dd>
4405 <dd class=
"description">Number of seconds for timeout,
4406 must be greater than
0</dd>
4408 <dd class=
"description">Callback function or NULL
</dd>
4410 <dd class=
"description">User data pointer
</dd>
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.
4418 <h3 class=
"function"><a id=
"httpShutdown">httpShutdown
</a></h3>
4419 <p class=
"description">User data pointer
</p>
4421 void httpShutdown (
<br>
4422     <a href=
"#http_t">http_t
</a> *http
<br>
4424 <h4 class=
"parameters">Parameters
</h4>
4427 <dd class=
"description">HTTP connection
</dd>
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"> CUPS
2.0/OS
10.10 </span><a id=
"httpStateString">httpStateString
</a></h3>
4433 <p class=
"description">Return the string describing a HTTP state value.
</p>
4435 const char *httpStateString (
<br>
4436     <a href=
"#http_state_t">http_state_t
</a> state
<br>
4438 <h4 class=
"parameters">Parameters
</h4>
4441 <dd class=
"description">HTTP state value
</dd>
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>
4448 const char *httpStatus (
<br>
4449     http_status_t status
<br>
4451 <h4 class=
"parameters">Parameters
</h4>
4454 <dd class=
"description">HTTP status code
</dd>
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>
4465     <a href=
"#http_t">http_t
</a> *http,
<br>
4466     const char *uri
<br>
4468 <h4 class=
"parameters">Parameters
</h4>
4471 <dd class=
"description">HTTP connection
</dd>
4473 <dd class=
"description">URI for trace
</dd>
4475 <h4 class=
"returnvalue">Return Value
</h4>
4476 <p class=
"description">Status of call (
0 = success)
</p>
4477 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpURIStatusString">httpURIStatusString
</a></h3>
4478 <p class=
"description">Return a string describing a URI status code.
</p>
4480 const char *httpURIStatusString (
<br>
4481     <a href=
"#http_uri_status_t">http_uri_status_t
</a> status
<br>
4483 <h4 class=
"parameters">Parameters
</h4>
4486 <dd class=
"description">URI status code
</dd>
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>
4493 http_status_t httpUpdate (
<br>
4494     <a href=
"#http_t">http_t
</a> *http
<br>
4496 <h4 class=
"parameters">Parameters
</h4>
4499 <dd class=
"description">HTTP connection
</dd>
4501 <h4 class=
"returnvalue">Return Value
</h4>
4502 <p class=
"description">HTTP status
</p>
4503 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"httpWait">httpWait
</a></h3>
4504 <p class=
"description">Wait for data available on a connection.
</p>
4507     <a href=
"#http_t">http_t
</a> *http,
<br>
4508     int msec
<br>
4510 <h4 class=
"parameters">Parameters
</h4>
4513 <dd class=
"description">HTTP connection
</dd>
4515 <dd class=
"description">Milliseconds to wait
</dd>
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"> CUPS
1.2/macOS
10.5 </span><a id=
"httpWrite2">httpWrite2
</a></h3>
4520 <p class=
"description">Write data to a HTTP connection.
</p>
4522 ssize_t httpWrite2 (
<br>
4523     <a href=
"#http_t">http_t
</a> *http,
<br>
4524     const char *buffer,
<br>
4525     size_t length
<br>
4527 <h4 class=
"parameters">Parameters
</h4>
4530 <dd class=
"description">HTTP connection
</dd>
4532 <dd class=
"description">Buffer for data
</dd>
4534 <dd class=
"description">Number of bytes to write
</dd>
4536 <h4 class=
"returnvalue">Return Value
</h4>
4537 <p class=
"description">Number of bytes written
</p>
4538 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpWriteResponse">httpWriteResponse
</a></h3>
4539 <p class=
"description">Write a HTTP response to a client connection.
</p>
4541 int httpWriteResponse (
<br>
4542     <a href=
"#http_t">http_t
</a> *http,
<br>
4543     http_status_t status
<br>
4545 <h4 class=
"parameters">Parameters
</h4>
4548 <dd class=
"description">HTTP connection
</dd>
4550 <dd class=
"description">Status code
</dd>
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>
4557 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBoolean (
<br>
4558     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4559     ipp_tag_t group,
<br>
4560     const char *name,
<br>
4561     char value
<br>
4563 <h4 class=
"parameters">Parameters
</h4>
4566 <dd class=
"description">IPP message
</dd>
4568 <dd class=
"description">IPP group
</dd>
4570 <dd class=
"description">Name of attribute
</dd>
4572 <dd class=
"description">Value of attribute
</dd>
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>
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>
4588 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBooleans (
<br>
4589     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4590     ipp_tag_t group,
<br>
4591     const char *name,
<br>
4592     int num_values,
<br>
4593     const char *values
<br>
4595 <h4 class=
"parameters">Parameters
</h4>
4598 <dd class=
"description">IPP message
</dd>
4600 <dd class=
"description">IPP group
</dd>
4602 <dd class=
"description">Name of attribute
</dd>
4604 <dd class=
"description">Number of values
</dd>
4606 <dd class=
"description">Values
</dd>
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>
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"> CUPS
1.1.19/macOS
10.3 </span><a id=
"ippAddCollection">ippAddCollection
</a></h3>
4620 <p class=
"description">Add a collection value.
</p>
4622 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollection (
<br>
4623     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4624     ipp_tag_t group,
<br>
4625     const char *name,
<br>
4626     <a href=
"#ipp_t">ipp_t
</a> *value
<br>
4628 <h4 class=
"parameters">Parameters
</h4>
4631 <dd class=
"description">IPP message
</dd>
4633 <dd class=
"description">IPP group
</dd>
4635 <dd class=
"description">Name of attribute
</dd>
4637 <dd class=
"description">Value
</dd>
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>
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>).
4652 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"ippAddCollections">ippAddCollections
</a></h3>
4653 <p class=
"description">Add an array of collection values.
</p>
4655 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollections (
<br>
4656     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4657     ipp_tag_t group,
<br>
4658     const char *name,
<br>
4659     int num_values,
<br>
4660     const
<a href=
"#ipp_t">ipp_t
</a> **values
<br>
4662 <h4 class=
"parameters">Parameters
</h4>
4665 <dd class=
"description">IPP message
</dd>
4667 <dd class=
"description">IPP group
</dd>
4669 <dd class=
"description">Name of attribute
</dd>
4671 <dd class=
"description">Number of values
</dd>
4673 <dd class=
"description">Values
</dd>
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>
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>).
4688 <h3 class=
"function"><a id=
"ippAddDate">ippAddDate
</a></h3>
4689 <p class=
"description">Add a date attribute to an IPP message.
</p>
4691 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddDate (
<br>
4692     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4693     ipp_tag_t group,
<br>
4694     const char *name,
<br>
4695     const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *value
<br>
4697 <h4 class=
"parameters">Parameters
</h4>
4700 <dd class=
"description">IPP message
</dd>
4702 <dd class=
"description">IPP group
</dd>
4704 <dd class=
"description">Name of attribute
</dd>
4706 <dd class=
"description">Value
</dd>
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>
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>
4722 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddInteger (
<br>
4723     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4724     ipp_tag_t group,
<br>
4725     ipp_tag_t value_tag,
<br>
4726     const char *name,
<br>
4727     int value
<br>
4729 <h4 class=
"parameters">Parameters
</h4>
4732 <dd class=
"description">IPP message
</dd>
4734 <dd class=
"description">IPP group
</dd>
4736 <dd class=
"description">Type of attribute
</dd>
4738 <dd class=
"description">Name of attribute
</dd>
4740 <dd class=
"description">Value of attribute
</dd>
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>
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>
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>
4759 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddIntegers (
<br>
4760     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4761     ipp_tag_t group,
<br>
4762     ipp_tag_t value_tag,
<br>
4763     const char *name,
<br>
4764     int num_values,
<br>
4765     const int *values
<br>
4767 <h4 class=
"parameters">Parameters
</h4>
4770 <dd class=
"description">IPP message
</dd>
4772 <dd class=
"description">IPP group
</dd>
4774 <dd class=
"description">Type of attribute
</dd>
4776 <dd class=
"description">Name of attribute
</dd>
4778 <dd class=
"description">Number of values
</dd>
4780 <dd class=
"description">Values
</dd>
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>
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>
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"> CUPS
1.2/macOS
10.5 </span><a id=
"ippAddOctetString">ippAddOctetString
</a></h3>
4797 <p class=
"description">Add an octetString value to an IPP message.
</p>
4799 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddOctetString (
<br>
4800     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4801     ipp_tag_t group,
<br>
4802     const char *name,
<br>
4803     const void *data,
<br>
4804     int datalen
<br>
4806 <h4 class=
"parameters">Parameters
</h4>
4809 <dd class=
"description">IPP message
</dd>
4811 <dd class=
"description">IPP group
</dd>
4813 <dd class=
"description">Name of attribute
</dd>
4815 <dd class=
"description">octetString data
</dd>
4817 <dd class=
"description">Length of data in bytes
</dd>
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>
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>).
4832 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippAddOutOfBand">ippAddOutOfBand
</a></h3>
4833 <p class=
"description">Add an out-of-band value to an IPP message.
</p>
4835 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddOutOfBand (
<br>
4836     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4837     ipp_tag_t group,
<br>
4838     ipp_tag_t value_tag,
<br>
4839     const char *name
<br>
4841 <h4 class=
"parameters">Parameters
</h4>
4844 <dd class=
"description">IPP message
</dd>
4846 <dd class=
"description">IPP group
</dd>
4848 <dd class=
"description">Type of attribute
</dd>
4850 <dd class=
"description">Name of attribute
</dd>
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>
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>
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>).
4871 <h3 class=
"function"><a id=
"ippAddRange">ippAddRange
</a></h3>
4872 <p class=
"description">Add a range of values to an IPP message.
</p>
4874 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRange (
<br>
4875     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4876     ipp_tag_t group,
<br>
4877     const char *name,
<br>
4878     int lower,
<br>
4879     int upper
<br>
4881 <h4 class=
"parameters">Parameters
</h4>
4884 <dd class=
"description">IPP message
</dd>
4886 <dd class=
"description">IPP group
</dd>
4888 <dd class=
"description">Name of attribute
</dd>
4890 <dd class=
"description">Lower value
</dd>
4892 <dd class=
"description">Upper value
</dd>
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>
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>
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>
4910 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRanges (
<br>
4911     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4912     ipp_tag_t group,
<br>
4913     const char *name,
<br>
4914     int num_values,
<br>
4915     const int *lower,
<br>
4916     const int *upper
<br>
4918 <h4 class=
"parameters">Parameters
</h4>
4921 <dd class=
"description">IPP message
</dd>
4923 <dd class=
"description">IPP group
</dd>
4925 <dd class=
"description">Name of attribute
</dd>
4927 <dd class=
"description">Number of values
</dd>
4929 <dd class=
"description">Lower values
</dd>
4931 <dd class=
"description">Upper values
</dd>
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>
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>
4947 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolution (
<br>
4948     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4949     ipp_tag_t group,
<br>
4950     const char *name,
<br>
4951     <a href=
"#ipp_res_t">ipp_res_t
</a> units,
<br>
4952     int xres,
<br>
4953     int yres
<br>
4955 <h4 class=
"parameters">Parameters
</h4>
4958 <dd class=
"description">IPP message
</dd>
4960 <dd class=
"description">IPP group
</dd>
4962 <dd class=
"description">Name of attribute
</dd>
4964 <dd class=
"description">Units for resolution
</dd>
4966 <dd class=
"description">X resolution
</dd>
4968 <dd class=
"description">Y resolution
</dd>
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>
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>
4984 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolutions (
<br>
4985     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4986     ipp_tag_t group,
<br>
4987     const char *name,
<br>
4988     int num_values,
<br>
4989     <a href=
"#ipp_res_t">ipp_res_t
</a> units,
<br>
4990     const int *xres,
<br>
4991     const int *yres
<br>
4993 <h4 class=
"parameters">Parameters
</h4>
4996 <dd class=
"description">IPP message
</dd>
4998 <dd class=
"description">IPP group
</dd>
5000 <dd class=
"description">Name of attribute
</dd>
5002 <dd class=
"description">Number of values
</dd>
5004 <dd class=
"description">Units for resolution
</dd>
5006 <dd class=
"description">X resolutions
</dd>
5008 <dd class=
"description">Y resolutions
</dd>
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>
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>
5024 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddSeparator (
<br>
5025     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5027 <h4 class=
"parameters">Parameters
</h4>
5030 <dd class=
"description">IPP message
</dd>
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>
5040 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddString (
<br>
5041     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5042     ipp_tag_t group,
<br>
5043     ipp_tag_t value_tag,
<br>
5044     const char *name,
<br>
5045     const char *language,
<br>
5046     const char *value
<br>
5048 <h4 class=
"parameters">Parameters
</h4>
5051 <dd class=
"description">IPP message
</dd>
5053 <dd class=
"description">IPP group
</dd>
5055 <dd class=
"description">Type of attribute
</dd>
5057 <dd class=
"description">Name of attribute
</dd>
5059 <dd class=
"description">Language code
</dd>
5061 <dd class=
"description">Value
</dd>
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>
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>
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>
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"> CUPS
1.7/macOS
10.9 </span><a id=
"ippAddStringf">ippAddStringf
</a></h3>
5085 <p class=
"description">Add a formatted string to an IPP message.
</p>
5087 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddStringf (
<br>
5088     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5089     ipp_tag_t group,
<br>
5090     ipp_tag_t value_tag,
<br>
5091     const char *name,
<br>
5092     const char *language,
<br>
5093     const char *format,
<br>
5094     ...
<br>
5096 <h4 class=
"parameters">Parameters
</h4>
5099 <dd class=
"description">IPP message
</dd>
5101 <dd class=
"description">IPP group
</dd>
5103 <dd class=
"description">Type of attribute
</dd>
5105 <dd class=
"description">Name of attribute
</dd>
5107 <dd class=
"description">Language code (
<code>NULL
</code> for default)
</dd>
5109 <dd class=
"description">Printf-style format string
</dd>
5111 <dd class=
"description">Additional arguments as needed
</dd>
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>
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>
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>
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
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.
5143 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippAddStringfv">ippAddStringfv
</a></h3>
5144 <p class=
"description">Add a formatted string to an IPP message.
</p>
5146 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddStringfv (
<br>
5147     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5148     ipp_tag_t group,
<br>
5149     ipp_tag_t value_tag,
<br>
5150     const char *name,
<br>
5151     const char *language,
<br>
5152     const char *format,
<br>
5153     va_list ap
<br>
5155 <h4 class=
"parameters">Parameters
</h4>
5158 <dd class=
"description">IPP message
</dd>
5160 <dd class=
"description">IPP group
</dd>
5162 <dd class=
"description">Type of attribute
</dd>
5164 <dd class=
"description">Name of attribute
</dd>
5166 <dd class=
"description">Language code (
<code>NULL
</code> for default)
</dd>
5168 <dd class=
"description">Printf-style format string
</dd>
5170 <dd class=
"description">Additional arguments
</dd>
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>
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>
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>
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
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.
5202 <h3 class=
"function"><a id=
"ippAddStrings">ippAddStrings
</a></h3>
5203 <p class=
"description">Add language-encoded strings to an IPP message.
</p>
5205 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddStrings (
<br>
5206     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5207     ipp_tag_t group,
<br>
5208     ipp_tag_t value_tag,
<br>
5209     const char *name,
<br>
5210     int num_values,
<br>
5211     const char *language,
<br>
5212     const char *const *values
<br>
5214 <h4 class=
"parameters">Parameters
</h4>
5217 <dd class=
"description">IPP message
</dd>
5219 <dd class=
"description">IPP group
</dd>
5221 <dd class=
"description">Type of attribute
</dd>
5223 <dd class=
"description">Name of attribute
</dd>
5225 <dd class=
"description">Number of values
</dd>
5227 <dd class=
"description">Language code (
<code>NULL
</code> for default)
</dd>
5229 <dd class=
"description">Values
</dd>
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>
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>
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>
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"> CUPS
1.6/macOS
10.8 </span><a id=
"ippAttributeString">ippAttributeString
</a></h3>
5253 <p class=
"description">Convert the attribute's value to a string.
</p>
5255 size_t ippAttributeString (
<br>
5256     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
5257     char *buffer,
<br>
5258     size_t bufsize
<br>
5260 <h4 class=
"parameters">Parameters
</h4>
5263 <dd class=
"description">Attribute
</dd>
5265 <dd class=
"description">String buffer or NULL
</dd>
5267 <dd class=
"description">Size of string buffer
</dd>
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.
5277 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </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>
5281 int ippContainsInteger (
<br>
5282     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
5283     int value
<br>
5285 <h4 class=
"parameters">Parameters
</h4>
5288 <dd class=
"description">Attribute
</dd>
5290 <dd class=
"description">Integer/enum value
</dd>
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
5300 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippContainsString">ippContainsString
</a></h3>
5301 <p class=
"description">Determine whether an attribute contains the
5302 specified string value.
</p>
5304 int ippContainsString (
<br>
5305     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
5306     const char *value
<br>
5308 <h4 class=
"parameters">Parameters
</h4>
5311 <dd class=
"description">Attribute
</dd>
5313 <dd class=
"description">String value
</dd>
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.
5322 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippCopyAttribute">ippCopyAttribute
</a></h3>
5323 <p class=
"description">Copy an attribute.
</p>
5325 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippCopyAttribute (
<br>
5326     <a href=
"#ipp_t">ipp_t
</a> *dst,
<br>
5327     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *srcattr,
<br>
5328     int quickcopy
<br>
5330 <h4 class=
"parameters">Parameters
</h4>
5333 <dd class=
"description">Destination IPP message
</dd>
5335 <dd class=
"description">Attribute to copy
</dd>
5337 <dd class=
"description">1 for a referenced copy,
0 for normal
</dd>
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
"shallow
" 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.
5348 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippCopyAttributes">ippCopyAttributes
</a></h3>
5349 <p class=
"description">Copy attributes from one IPP message to another.
</p>
5351 int ippCopyAttributes (
<br>
5352     <a href=
"#ipp_t">ipp_t
</a> *dst,
<br>
5353     <a href=
"#ipp_t">ipp_t
</a> *src,
<br>
5354     int quickcopy,
<br>
5355     <a href=
"#ipp_copycb_t">ipp_copycb_t
</a> cb,
<br>
5356     void *context
<br>
5358 <h4 class=
"parameters">Parameters
</h4>
5361 <dd class=
"description">Destination IPP message
</dd>
5363 <dd class=
"description">Source IPP message
</dd>
5365 <dd class=
"description">1 for a referenced copy,
0 for normal
</dd>
5367 <dd class=
"description">Copy callback or
<code>NULL
</code> for none
</dd>
5369 <dd class=
"description">Context pointer
</dd>
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
"shallow
"
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>
5379 The
<code>cb
</code> and
<code>context
</code> parameters provide a generic way to
"filter
" 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
5385 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </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>
5389 cups_array_t *ippCreateRequestedArray (
<br>
5390     <a href=
"#ipp_t">ipp_t
</a> *request
<br>
5392 <h4 class=
"parameters">Parameters
</h4>
5395 <dd class=
"description">IPP request
</dd>
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
"requested-attribute
" values supplied in an IPP request. All IANA-
5402 registered values are supported in addition to the CUPS IPP extension
5405 The
<code>request
</code> parameter specifies the request message that was read from
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.
5414 <h3 class=
"function"><a id=
"ippDateToTime">ippDateToTime
</a></h3>
5415 <p class=
"description">Convert from RFC
1903 Date/Time format to UNIX time
5418 time_t ippDateToTime (
<br>
5419     const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *date
<br>
5421 <h4 class=
"parameters">Parameters
</h4>
5424 <dd class=
"description">RFC
1903 date info
</dd>
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>
5431 void ippDelete (
<br>
5432     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5434 <h4 class=
"parameters">Parameters
</h4>
5437 <dd class=
"description">IPP message
</dd>
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
5444 0-
1 Year (
0 to
65535)
5449 6 Seconds (
0 to
60,
60 =
"leap second
")
5450 7 Deciseconds (
0 to
9)
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>
5457 void ippDeleteAttribute (
<br>
5458     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5459     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
5461 <h4 class=
"parameters">Parameters
</h4>
5464 <dd class=
"description">IPP message
</dd>
5466 <dd class=
"description">Attribute to delete
</dd>
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"> CUPS
1.6/macOS
10.8 </span><a id=
"ippDeleteValues">ippDeleteValues
</a></h3>
5472 <p class=
"description">Delete values in an attribute.
</p>
5474 int ippDeleteValues (
<br>
5475     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5476     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
5477     int element,
<br>
5478     int count
<br>
5480 <h4 class=
"parameters">Parameters
</h4>
5483 <dd class=
"description">IPP message
</dd>
5485 <dd class=
"description">Attribute
</dd>
5487 <dd class=
"description">Index of first value to delete (
0-based)
</dd>
5489 <dd class=
"description">Number of values to delete
</dd>
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>
5497 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5499 Deleting all values in an attribute deletes the attribute.
5502 <h3 class=
"function"><a id=
"ippEnumString">ippEnumString
</a></h3>
5503 <p class=
"description">Return a string corresponding to the enum value.
</p>
5505 const char *ippEnumString (
<br>
5506     const char *attrname,
<br>
5507     int enumvalue
<br>
5509 <h4 class=
"parameters">Parameters
</h4>
5512 <dd class=
"description">Attribute name
</dd>
5514 <dd class=
"description">Enum value
</dd>
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>
5521 int ippEnumValue (
<br>
5522     const char *attrname,
<br>
5523     const char *enumstring
<br>
5525 <h4 class=
"parameters">Parameters
</h4>
5528 <dd class=
"description">Attribute name
</dd>
5530 <dd class=
"description">Enum string
</dd>
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>
5537 const char *ippErrorString (
<br>
5538     ipp_status_t error
<br>
5540 <h4 class=
"parameters">Parameters
</h4>
5543 <dd class=
"description">Error status
</dd>
5545 <h4 class=
"returnvalue">Return Value
</h4>
5546 <p class=
"description">Text string
</p>
5547 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ippErrorValue">ippErrorValue
</a></h3>
5548 <p class=
"description">Return a status code for the given name.
</p>
5550 ipp_status_t ippErrorValue (
<br>
5551     const char *name
<br>
5553 <h4 class=
"parameters">Parameters
</h4>
5556 <dd class=
"description">Name
</dd>
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>
5563 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindAttribute (
<br>
5564     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5565     const char *name,
<br>
5566     ipp_tag_t type
<br>
5568 <h4 class=
"parameters">Parameters
</h4>
5571 <dd class=
"description">IPP message
</dd>
5573 <dd class=
"description">Name of attribute
</dd>
5575 <dd class=
"description">Type of attribute
</dd>
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 "media-col/media-size
".
</p>
5583 <h3 class=
"function"><a id=
"ippFindNextAttribute">ippFindNextAttribute
</a></h3>
5584 <p class=
"description">Find the next named attribute in a request.
</p>
5586 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindNextAttribute (
<br>
5587     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5588     const char *name,
<br>
5589     ipp_tag_t type
<br>
5591 <h4 class=
"parameters">Parameters
</h4>
5594 <dd class=
"description">IPP message
</dd>
5596 <dd class=
"description">Name of attribute
</dd>
5598 <dd class=
"description">Type of attribute
</dd>
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 "media-col/media-size
".
</p>
5606 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippFirstAttribute">ippFirstAttribute
</a></h3>
5607 <p class=
"description">Return the first attribute in the message.
</p>
5609 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFirstAttribute (
<br>
5610     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5612 <h4 class=
"parameters">Parameters
</h4>
5615 <dd class=
"description">IPP message
</dd>
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"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetBoolean">ippGetBoolean
</a></h3>
5620 <p class=
"description">Get a boolean value for an attribute.
</p>
5622 int ippGetBoolean (
<br>
5623     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
5624     int element
<br>
5626 <h4 class=
"parameters">Parameters
</h4>
5629 <dd class=
"description">IPP attribute
</dd>
5631 <dd class=
"description">Value number (
0-based)
</dd>
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.
5640 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetCollection">ippGetCollection
</a></h3>
5641 <p class=
"description">Get a collection value for an attribute.
</p>
5643 <a href=
"#ipp_t">ipp_t
</a> *ippGetCollection (
<br>
5644     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
5645     int element
<br>
5647 <h4 class=
"parameters">Parameters
</h4>
5650 <dd class=
"description">IPP attribute
</dd>
5652 <dd class=
"description">Value number (
0-based)
</dd>
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.
5661 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetCount">ippGetCount
</a></h3>
5662 <p class=
"description">Get the number of values in an attribute.
</p>
5664 int ippGetCount (
<br>
5665     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
5667 <h4 class=
"parameters">Parameters
</h4>
5670 <dd class=
"description">IPP attribute
</dd>
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"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetDate">ippGetDate
</a></h3>
5675 <p class=
"description">Get a date value for an attribute.
</p>
5677 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *ippGetDate (
<br>
5678     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
5679     int element
<br>
5681 <h4 class=
"parameters">Parameters
</h4>
5684 <dd class=
"description">IPP attribute
</dd>
5686 <dd class=
"description">Value number (
0-based)
</dd>
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.
5695 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetGroupTag">ippGetGroupTag
</a></h3>
5696 <p class=
"description">Get the group associated with an attribute.
</p>
5698 ipp_tag_t ippGetGroupTag (
<br>
5699     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
5701 <h4 class=
"parameters">Parameters
</h4>
5704 <dd class=
"description">IPP attribute
</dd>
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"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetInteger">ippGetInteger
</a></h3>
5709 <p class=
"description">Get the integer/enum value for an attribute.
</p>
5711 int ippGetInteger (
<br>
5712     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
5713     int element
<br>
5715 <h4 class=
"parameters">Parameters
</h4>
5718 <dd class=
"description">IPP attribute
</dd>
5720 <dd class=
"description">Value number (
0-based)
</dd>
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.
5729 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetName">ippGetName
</a></h3>
5730 <p class=
"description">Get the attribute name.
</p>
5732 const char *ippGetName (
<br>
5733     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
5735 <h4 class=
"parameters">Parameters
</h4>
5738 <dd class=
"description">IPP attribute
</dd>
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"> CUPS
1.7/macOS
10.9 </span><a id=
"ippGetOctetString">ippGetOctetString
</a></h3>
5743 <p class=
"description">Get an octetString value from an IPP attribute.
</p>
5745 void *ippGetOctetString (
<br>
5746     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
5747     int element,
<br>
5748     int *datalen
<br>
5750 <h4 class=
"parameters">Parameters
</h4>
5753 <dd class=
"description">IPP attribute
</dd>
5755 <dd class=
"description">Value number (
0-based)
</dd>
5757 <dd class=
"description">Length of octetString data
</dd>
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.
5766 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetOperation">ippGetOperation
</a></h3>
5767 <p class=
"description">Get the operation ID in an IPP message.
</p>
5769 ipp_op_t ippGetOperation (
<br>
5770     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5772 <h4 class=
"parameters">Parameters
</h4>
5775 <dd class=
"description">IPP request message
</dd>
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"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetRange">ippGetRange
</a></h3>
5780 <p class=
"description">Get a rangeOfInteger value from an attribute.
</p>
5782 int ippGetRange (
<br>
5783     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
5784     int element,
<br>
5785     int *uppervalue
<br>
5787 <h4 class=
"parameters">Parameters
</h4>
5790 <dd class=
"description">IPP attribute
</dd>
5792 <dd class=
"description">Value number (
0-based)
</dd>
5794 <dd class=
"description">Upper value of range
</dd>
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.
5803 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetRequestId">ippGetRequestId
</a></h3>
5804 <p class=
"description">Get the request ID from an IPP message.
</p>
5806 int ippGetRequestId (
<br>
5807     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5809 <h4 class=
"parameters">Parameters
</h4>
5812 <dd class=
"description">IPP message
</dd>
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"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetResolution">ippGetResolution
</a></h3>
5817 <p class=
"description">Get a resolution value for an attribute.
</p>
5819 int ippGetResolution (
<br>
5820     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
5821     int element,
<br>
5822     int *yres,
<br>
5823     <a href=
"#ipp_res_t">ipp_res_t
</a> *units
<br>
5825 <h4 class=
"parameters">Parameters
</h4>
5828 <dd class=
"description">IPP attribute
</dd>
5830 <dd class=
"description">Value number (
0-based)
</dd>
5832 <dd class=
"description">Vertical/feed resolution
</dd>
5834 <dd class=
"description">Units for resolution
</dd>
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.
5843 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetState">ippGetState
</a></h3>
5844 <p class=
"description">Get the IPP message state.
</p>
5846 <a href=
"#ipp_state_t">ipp_state_t
</a> ippGetState (
<br>
5847     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5849 <h4 class=
"parameters">Parameters
</h4>
5852 <dd class=
"description">IPP message
</dd>
5854 <h4 class=
"returnvalue">Return Value
</h4>
5855 <p class=
"description">IPP message state value
</p>
5856 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetStatusCode">ippGetStatusCode
</a></h3>
5857 <p class=
"description">Get the status code from an IPP response or event message.
</p>
5859 ipp_status_t ippGetStatusCode (
<br>
5860     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5862 <h4 class=
"parameters">Parameters
</h4>
5865 <dd class=
"description">IPP response or event message
</dd>
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>
5872 const char *ippGetString (
<br>
5873     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
5874     int element,
<br>
5875     const char **language
<br>
5877 <h4 class=
"parameters">Parameters
</h4>
5880 <dd class=
"description">IPP attribute
</dd>
5882 <dd class=
"description">Value number (
0-based)
</dd>
5884 <dd class=
"description">Language code (
<code>NULL
</code> for don't care)
</dd>
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.
5892 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetValueTag">ippGetValueTag
</a></h3>
5893 <p class=
"description">Get the value tag for an attribute.
</p>
5895 ipp_tag_t ippGetValueTag (
<br>
5896     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
5898 <h4 class=
"parameters">Parameters
</h4>
5901 <dd class=
"description">IPP attribute
</dd>
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"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetVersion">ippGetVersion
</a></h3>
5906 <p class=
"description">Get the major and minor version number from an IPP message.
</p>
5908 int ippGetVersion (
<br>
5909     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5910     int *minor
<br>
5912 <h4 class=
"parameters">Parameters
</h4>
5915 <dd class=
"description">IPP message
</dd>
5917 <dd class=
"description">Minor version number or
<code>NULL
</code></dd>
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>
5924 size_t ippLength (
<br>
5925     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5927 <h4 class=
"parameters">Parameters
</h4>
5930 <dd class=
"description">IPP message
</dd>
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>
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"> CUPS
1.2/macOS
10.5 </span><a id=
"ippNewRequest">ippNewRequest
</a></h3>
5941 <p class=
"description">Allocate a new IPP request message.
</p>
5943 <a href=
"#ipp_t">ipp_t
</a> *ippNewRequest (
<br>
5944     ipp_op_t op
<br>
5946 <h4 class=
"parameters">Parameters
</h4>
5949 <dd class=
"description">Operation code
</dd>
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.
5959 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippNewResponse">ippNewResponse
</a></h3>
5960 <p class=
"description">Allocate a new IPP response message.
</p>
5962 <a href=
"#ipp_t">ipp_t
</a> *ippNewResponse (
<br>
5963     <a href=
"#ipp_t">ipp_t
</a> *request
<br>
5965 <h4 class=
"parameters">Parameters
</h4>
5968 <dd class=
"description">IPP request message
</dd>
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 "utf-
8" and a value derived from the current locale are substituted,
5981 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippNextAttribute">ippNextAttribute
</a></h3>
5982 <p class=
"description">Return the next attribute in the message.
</p>
5984 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippNextAttribute (
<br>
5985     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5987 <h4 class=
"parameters">Parameters
</h4>
5990 <dd class=
"description">IPP message
</dd>
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"> CUPS
1.2/macOS
10.5 </span><a id=
"ippOpString">ippOpString
</a></h3>
5995 <p class=
"description">Return a name for the given operation id.
</p>
5997 const char *ippOpString (
<br>
5998     ipp_op_t op
<br>
6000 <h4 class=
"parameters">Parameters
</h4>
6003 <dd class=
"description">Operation ID
</dd>
6005 <h4 class=
"returnvalue">Return Value
</h4>
6006 <p class=
"description">Name
</p>
6007 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ippOpValue">ippOpValue
</a></h3>
6008 <p class=
"description">Return an operation id for the given name.
</p>
6010 ipp_op_t ippOpValue (
<br>
6011     const char *name
<br>
6013 <h4 class=
"parameters">Parameters
</h4>
6016 <dd class=
"description">Textual name
</dd>
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>
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>
6029 <a href=
"#ipp_state_t">ipp_state_t
</a> ippRead (
<br>
6030     <a href=
"#http_t">http_t
</a> *http,
<br>
6031     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
6033 <h4 class=
"parameters">Parameters
</h4>
6036 <dd class=
"description">HTTP connection
</dd>
6038 <dd class=
"description">IPP data
</dd>
6040 <h4 class=
"returnvalue">Return Value
</h4>
6041 <p class=
"description">Current state
</p>
6042 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"ippReadFile">ippReadFile
</a></h3>
6043 <p class=
"description">Read data for an IPP message from a file.
</p>
6045 <a href=
"#ipp_state_t">ipp_state_t
</a> ippReadFile (
<br>
6046     int fd,
<br>
6047     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
6049 <h4 class=
"parameters">Parameters
</h4>
6052 <dd class=
"description">HTTP data
</dd>
6054 <dd class=
"description">IPP data
</dd>
6056 <h4 class=
"returnvalue">Return Value
</h4>
6057 <p class=
"description">Current state
</p>
6058 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ippReadIO">ippReadIO
</a></h3>
6059 <p class=
"description">Read data for an IPP message.
</p>
6061 <a href=
"#ipp_state_t">ipp_state_t
</a> ippReadIO (
<br>
6062     void *src,
<br>
6063     <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br>
6064     int blocking,
<br>
6065     <a href=
"#ipp_t">ipp_t
</a> *parent,
<br>
6066     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
6068 <h4 class=
"parameters">Parameters
</h4>
6071 <dd class=
"description">Data source
</dd>
6073 <dd class=
"description">Read callback function
</dd>
6075 <dd class=
"description">Use blocking IO?
</dd>
6077 <dd class=
"description">Parent request, if any
</dd>
6079 <dd class=
"description">IPP data
</dd>
6081 <h4 class=
"returnvalue">Return Value
</h4>
6082 <p class=
"description">Current state
</p>
6083 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetBoolean">ippSetBoolean
</a></h3>
6084 <p class=
"description">Set a boolean value in an attribute.
</p>
6086 int ippSetBoolean (
<br>
6087     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6088     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6089     int element,
<br>
6090     int boolvalue
<br>
6092 <h4 class=
"parameters">Parameters
</h4>
6095 <dd class=
"description">IPP message
</dd>
6097 <dd class=
"description">IPP attribute
</dd>
6099 <dd class=
"description">Value number (
0-based)
</dd>
6101 <dd class=
"description">Boolean value
</dd>
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>
6109 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<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>.
6115 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetCollection">ippSetCollection
</a></h3>
6116 <p class=
"description">Set a collection value in an attribute.
</p>
6118 int ippSetCollection (
<br>
6119     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6120     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6121     int element,
<br>
6122     <a href=
"#ipp_t">ipp_t
</a> *colvalue
<br>
6124 <h4 class=
"parameters">Parameters
</h4>
6127 <dd class=
"description">IPP message
</dd>
6129 <dd class=
"description">IPP attribute
</dd>
6131 <dd class=
"description">Value number (
0-based)
</dd>
6133 <dd class=
"description">Collection value
</dd>
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>
6141 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<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>.
6147 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetDate">ippSetDate
</a></h3>
6148 <p class=
"description">Set a date value in an attribute.
</p>
6150 int ippSetDate (
<br>
6151     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6152     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6153     int element,
<br>
6154     const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *datevalue
<br>
6156 <h4 class=
"parameters">Parameters
</h4>
6159 <dd class=
"description">IPP message
</dd>
6161 <dd class=
"description">IPP attribute
</dd>
6163 <dd class=
"description">Value number (
0-based)
</dd>
6165 <dd class=
"description">Date value
</dd>
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>
6173 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<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>.
6179 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetGroupTag">ippSetGroupTag
</a></h3>
6180 <p class=
"description">Set the group tag of an attribute.
</p>
6182 int ippSetGroupTag (
<br>
6183     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6184     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6185     ipp_tag_t group_tag
<br>
6187 <h4 class=
"parameters">Parameters
</h4>
6190 <dd class=
"description">IPP message
</dd>
6192 <dd class=
"description">Attribute
</dd>
6194 <dd class=
"description">Group tag
</dd>
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>
6202 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<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>).
6211 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetInteger">ippSetInteger
</a></h3>
6212 <p class=
"description">Set an integer or enum value in an attribute.
</p>
6214 int ippSetInteger (
<br>
6215     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6216     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6217     int element,
<br>
6218     int intvalue
<br>
6220 <h4 class=
"parameters">Parameters
</h4>
6223 <dd class=
"description">IPP message
</dd>
6225 <dd class=
"description">IPP attribute
</dd>
6227 <dd class=
"description">Value number (
0-based)
</dd>
6229 <dd class=
"description">Integer/enum value
</dd>
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>
6237 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<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>.
6243 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetName">ippSetName
</a></h3>
6244 <p class=
"description">Set the name of an attribute.
</p>
6246 int ippSetName (
<br>
6247     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6248     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6249     const char *name
<br>
6251 <h4 class=
"parameters">Parameters
</h4>
6254 <dd class=
"description">IPP message
</dd>
6256 <dd class=
"description">IPP attribute
</dd>
6258 <dd class=
"description">Attribute name
</dd>
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>
6266 The
<code>attr
</code> parameter may be modified as a result of setting the value.
6269 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippSetOctetString">ippSetOctetString
</a></h3>
6270 <p class=
"description">Set an octetString value in an IPP attribute.
</p>
6272 int ippSetOctetString (
<br>
6273     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6274     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6275     int element,
<br>
6276     const void *data,
<br>
6277     int datalen
<br>
6279 <h4 class=
"parameters">Parameters
</h4>
6282 <dd class=
"description">IPP message
</dd>
6284 <dd class=
"description">IPP attribute
</dd>
6286 <dd class=
"description">Value number (
0-based)
</dd>
6288 <dd class=
"description">Pointer to octetString data
</dd>
6290 <dd class=
"description">Length of octetString data
</dd>
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>
6298 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<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>.
6304 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetOperation">ippSetOperation
</a></h3>
6305 <p class=
"description">Set the operation ID in an IPP request message.
</p>
6307 int ippSetOperation (
<br>
6308     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6309     ipp_op_t op
<br>
6311 <h4 class=
"parameters">Parameters
</h4>
6314 <dd class=
"description">IPP request message
</dd>
6316 <dd class=
"description">Operation ID
</dd>
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.
6325 <h3 class=
"function"><a id=
"ippSetPort">ippSetPort
</a></h3>
6326 <p class=
"description">Pointer to library globals
</p>
6328 void ippSetPort (
<br>
6329     int p
<br>
6331 <h4 class=
"parameters">Parameters
</h4>
6334 <dd class=
"description">Port number to use
</dd>
6336 <h4 class=
"returnvalue">Return Value
</h4>
6337 <p class=
"description">Set the default port number.
</p>
6338 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetRange">ippSetRange
</a></h3>
6339 <p class=
"description">Set a rangeOfInteger value in an attribute.
</p>
6341 int ippSetRange (
<br>
6342     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6343     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6344     int element,
<br>
6345     int lowervalue,
<br>
6346     int uppervalue
<br>
6348 <h4 class=
"parameters">Parameters
</h4>
6351 <dd class=
"description">IPP message
</dd>
6353 <dd class=
"description">IPP attribute
</dd>
6355 <dd class=
"description">Value number (
0-based)
</dd>
6357 <dd class=
"description">Lower bound for range
</dd>
6359 <dd class=
"description">Upper bound for range
</dd>
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>
6367 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<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>.
6373 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetRequestId">ippSetRequestId
</a></h3>
6374 <p class=
"description">Set the request ID in an IPP message.
</p>
6376 int ippSetRequestId (
<br>
6377     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6378     int request_id
<br>
6380 <h4 class=
"parameters">Parameters
</h4>
6383 <dd class=
"description">IPP message
</dd>
6385 <dd class=
"description">Request ID
</dd>
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>
6393 The
<code>request_id
</code> parameter must be greater than
0.
6396 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetResolution">ippSetResolution
</a></h3>
6397 <p class=
"description">Set a resolution value in an attribute.
</p>
6399 int ippSetResolution (
<br>
6400     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6401     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6402     int element,
<br>
6403     <a href=
"#ipp_res_t">ipp_res_t
</a> unitsvalue,
<br>
6404     int xresvalue,
<br>
6405     int yresvalue
<br>
6407 <h4 class=
"parameters">Parameters
</h4>
6410 <dd class=
"description">IPP message
</dd>
6412 <dd class=
"description">IPP attribute
</dd>
6414 <dd class=
"description">Value number (
0-based)
</dd>
6416 <dd class=
"description">Resolution units
</dd>
6418 <dd class=
"description">Horizontal/cross feed resolution
</dd>
6420 <dd class=
"description">Vertical/feed resolution
</dd>
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>
6428 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<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>.
6434 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetState">ippSetState
</a></h3>
6435 <p class=
"description">Set the current state of the IPP message.
</p>
6437 int ippSetState (
<br>
6438     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6439     <a href=
"#ipp_state_t">ipp_state_t
</a> state
<br>
6441 <h4 class=
"parameters">Parameters
</h4>
6444 <dd class=
"description">IPP message
</dd>
6446 <dd class=
"description">IPP state value
</dd>
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"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetStatusCode">ippSetStatusCode
</a></h3>
6451 <p class=
"description">Set the status code in an IPP response or event message.
</p>
6453 int ippSetStatusCode (
<br>
6454     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6455     ipp_status_t status
<br>
6457 <h4 class=
"parameters">Parameters
</h4>
6460 <dd class=
"description">IPP response or event message
</dd>
6462 <dd class=
"description">Status code
</dd>
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.
6471 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetString">ippSetString
</a></h3>
6472 <p class=
"description">Set a string value in an attribute.
</p>
6474 int ippSetString (
<br>
6475     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6476     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6477     int element,
<br>
6478     const char *strvalue
<br>
6480 <h4 class=
"parameters">Parameters
</h4>
6483 <dd class=
"description">IPP message
</dd>
6485 <dd class=
"description">IPP attribute
</dd>
6487 <dd class=
"description">Value number (
0-based)
</dd>
6489 <dd class=
"description">String value
</dd>
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>
6497 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<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>.
6503 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippSetStringf">ippSetStringf
</a></h3>
6504 <p class=
"description">Set a formatted string value of an attribute.
</p>
6506 int ippSetStringf (
<br>
6507     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6508     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6509     int element,
<br>
6510     const char *format,
<br>
6511     ...
<br>
6513 <h4 class=
"parameters">Parameters
</h4>
6516 <dd class=
"description">IPP message
</dd>
6518 <dd class=
"description">IPP attribute
</dd>
6520 <dd class=
"description">Value number (
0-based)
</dd>
6522 <dd class=
"description">Printf-style format string
</dd>
6524 <dd class=
"description">Additional arguments as needed
</dd>
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>
6532 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<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>
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.
6543 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippSetStringfv">ippSetStringfv
</a></h3>
6544 <p class=
"description">Set a formatted string value of an attribute.
</p>
6546 int ippSetStringfv (
<br>
6547     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6548     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6549     int element,
<br>
6550     const char *format,
<br>
6551     va_list ap
<br>
6553 <h4 class=
"parameters">Parameters
</h4>
6556 <dd class=
"description">IPP message
</dd>
6558 <dd class=
"description">IPP attribute
</dd>
6560 <dd class=
"description">Value number (
0-based)
</dd>
6562 <dd class=
"description">Printf-style format string
</dd>
6564 <dd class=
"description">Pointer to additional arguments
</dd>
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>
6572 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<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>
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.
6583 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetValueTag">ippSetValueTag
</a></h3>
6584 <p class=
"description">Set the value tag of an attribute.
</p>
6586 int ippSetValueTag (
<br>
6587     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6588     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6589     ipp_tag_t value_tag
<br>
6591 <h4 class=
"parameters">Parameters
</h4>
6594 <dd class=
"description">IPP message
</dd>
6596 <dd class=
"description">IPP attribute
</dd>
6598 <dd class=
"description">Value tag
</dd>
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>
6606 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<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>
6616 Promoting a string attribute to nameWithLanguage or textWithLanguage adds the language
6617 code in the
"attributes-natural-language
" attribute or, if not present, the language
6618 code for the current locale.
6621 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetVersion">ippSetVersion
</a></h3>
6622 <p class=
"description">Set the version number in an IPP message.
</p>
6624 int ippSetVersion (
<br>
6625     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6626     int major,
<br>
6627     int minor
<br>
6629 <h4 class=
"parameters">Parameters
</h4>
6632 <dd class=
"description">IPP message
</dd>
6634 <dd class=
"description">Major version number (major.minor)
</dd>
6636 <dd class=
"description">Minor version number (major.minor)
</dd>
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>
6644 The valid version numbers are currently
1.0,
1.1,
2.0,
2.1, and
2.2.
6647 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"ippStateString">ippStateString
</a></h3>
6648 <p class=
"description">Return the name corresponding to a state value.
</p>
6650 const char *ippStateString (
<br>
6651     <a href=
"#ipp_state_t">ipp_state_t
</a> state
<br>
6653 <h4 class=
"parameters">Parameters
</h4>
6656 <dd class=
"description">State value
</dd>
6658 <h4 class=
"returnvalue">Return Value
</h4>
6659 <p class=
"description">State name
</p>
6660 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"ippTagString">ippTagString
</a></h3>
6661 <p class=
"description">Return the tag name corresponding to a tag value.
</p>
6663 const char *ippTagString (
<br>
6664     ipp_tag_t tag
<br>
6666 <h4 class=
"parameters">Parameters
</h4>
6669 <dd class=
"description">Tag value
</dd>
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.
6677 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"ippTagValue">ippTagValue
</a></h3>
6678 <p class=
"description">Return the tag value corresponding to a tag name.
</p>
6680 ipp_tag_t ippTagValue (
<br>
6681     const char *name
<br>
6683 <h4 class=
"parameters">Parameters
</h4>
6686 <dd class=
"description">Tag name
</dd>
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.
6694 <h3 class=
"function"><a id=
"ippTimeToDate">ippTimeToDate
</a></h3>
6695 <p class=
"description">Convert from UNIX time to RFC
1903 format.
</p>
6697 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *ippTimeToDate (
<br>
6698     time_t t
<br>
6700 <h4 class=
"parameters">Parameters
</h4>
6703 <dd class=
"description">UNIX time value
</dd>
6705 <h4 class=
"returnvalue">Return Value
</h4>
6706 <p class=
"description">RFC-
1903 date/time data
</p>
6707 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippValidateAttribute">ippValidateAttribute
</a></h3>
6708 <p class=
"description">Validate the contents of an attribute.
</p>
6710 int ippValidateAttribute (
<br>
6711     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
6713 <h4 class=
"parameters">Parameters
</h4>
6716 <dd class=
"description">Attribute
</dd>
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.
6726 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippValidateAttributes">ippValidateAttributes
</a></h3>
6727 <p class=
"description">Validate all attributes in an IPP message.
</p>
6729 int ippValidateAttributes (
<br>
6730     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
6732 <h4 class=
"parameters">Parameters
</h4>
6735 <dd class=
"description">IPP message
</dd>
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.
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>
6748 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWrite (
<br>
6749     <a href=
"#http_t">http_t
</a> *http,
<br>
6750     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
6752 <h4 class=
"parameters">Parameters
</h4>
6755 <dd class=
"description">HTTP connection
</dd>
6757 <dd class=
"description">IPP data
</dd>
6759 <h4 class=
"returnvalue">Return Value
</h4>
6760 <p class=
"description">Current state
</p>
6761 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"ippWriteFile">ippWriteFile
</a></h3>
6762 <p class=
"description">Write data for an IPP message to a file.
</p>
6764 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWriteFile (
<br>
6765     int fd,
<br>
6766     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
6768 <h4 class=
"parameters">Parameters
</h4>
6771 <dd class=
"description">HTTP data
</dd>
6773 <dd class=
"description">IPP data
</dd>
6775 <h4 class=
"returnvalue">Return Value
</h4>
6776 <p class=
"description">Current state
</p>
6777 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ippWriteIO">ippWriteIO
</a></h3>
6778 <p class=
"description">Write data for an IPP message.
</p>
6780 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWriteIO (
<br>
6781     void *dst,
<br>
6782     <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br>
6783     int blocking,
<br>
6784     <a href=
"#ipp_t">ipp_t
</a> *parent,
<br>
6785     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
6787 <h4 class=
"parameters">Parameters
</h4>
6790 <dd class=
"description">Destination
</dd>
6792 <dd class=
"description">Write callback function
</dd>
6794 <dd class=
"description">Use blocking IO?
</dd>
6796 <dd class=
"description">Parent IPP message
</dd>
6798 <dd class=
"description">IPP data
</dd>
6800 <h4 class=
"returnvalue">Return Value
</h4>
6801 <p class=
"description">Current state
</p>
6802 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"pwgFormatSizeName">pwgFormatSizeName
</a></h3>
6803 <p class=
"description">Generate a PWG self-describing media size name.
</p>
6805 int pwgFormatSizeName (
<br>
6806     char *keyword,
<br>
6807     size_t keysize,
<br>
6808     const char *prefix,
<br>
6809     const char *name,
<br>
6810     int width,
<br>
6811     int length,
<br>
6812     const char *units
<br>
6814 <h4 class=
"parameters">Parameters
</h4>
6817 <dd class=
"description">Keyword buffer
</dd>
6819 <dd class=
"description">Size of keyword buffer
</dd>
6821 <dd class=
"description">Prefix for PWG size or
<code>NULL
</code> for automatic
</dd>
6823 <dd class=
"description">Size name or
<code>NULL
</code></dd>
6825 <dd class=
"description">Width of page in
2540ths
</dd>
6827 <dd class=
"description">Length of page in
2540ths
</dd>
6829 <dd class=
"description">Units -
"in
",
"mm
", or
<code>NULL
</code> for automatic
</dd>
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 "prefix_name_WIDTHxLENGTHunits
". The prefix is typically
"custom
" or
"roll
"
6836 for user-supplied sizes but can also be
"disc
",
"iso
",
"jis
",
"jpn
",
"na
",
6837 "oe
",
"om
",
"prc
", or
"roc
". A value of
<code>NULL
</code> automatically chooses
6838 "oe
" or
"om
" depending on the units.
<br>
6840 The size name may only contain lowercase letters, numbers,
"-
", and
".
". If
6841 <code>NULL
</code> is passed, the size name will contain the formatted dimensions.
<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 (
"in
") or millimeters (
"mm
")
6850 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"pwgInitSize">pwgInitSize
</a></h3>
6851 <p class=
"description">Initialize a pwg_size_t structure using IPP Job Template
6854 int pwgInitSize (
<br>
6855     <a href=
"#pwg_size_t">pwg_size_t
</a> *size,
<br>
6856     <a href=
"#ipp_t">ipp_t
</a> *job,
<br>
6857     int *margins_set
<br>
6859 <h4 class=
"parameters">Parameters
</h4>
6862 <dd class=
"description">Size to initialize
</dd>
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>
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
"media
" or
6872 "media-col
" 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>
6875 The
"margins_set
" variable is initialized to
1 if any
"media-xxx-margin
"
6876 member attribute was specified in the
"media-col
" Job Template attribute,
6877 otherwise it is initialized to
0.
6880 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"pwgMediaForLegacy">pwgMediaForLegacy
</a></h3>
6881 <p class=
"description">Find a PWG media size by ISO/IPP legacy name.
</p>
6883 <a href=
"#pwg_media_t">pwg_media_t
</a> *pwgMediaForLegacy (
<br>
6884     const char *legacy
<br>
6886 <h4 class=
"parameters">Parameters
</h4>
6889 <dd class=
"description">Legacy size name
</dd>
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
"name
" argument specifies the legacy ISO media size name, for example
6895 "iso-a4
" or
"na-letter
".
6898 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"pwgMediaForPPD">pwgMediaForPPD
</a></h3>
6899 <p class=
"description">Find a PWG media size by Adobe PPD name.
</p>
6901 <a href=
"#pwg_media_t">pwg_media_t
</a> *pwgMediaForPPD (
<br>
6902     const char *ppd
<br>
6904 <h4 class=
"parameters">Parameters
</h4>
6907 <dd class=
"description">PPD size name
</dd>
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
"ppd
" argument specifies an Adobe page size name as defined in Table B
.1
6913 of the Adobe PostScript Printer Description File Format Specification Version
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
"Custom.WIDTHxLENGTH[units]
" or
6919 "WIDTHxLENGTH[units]
".
6922 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"pwgMediaForPWG">pwgMediaForPWG
</a></h3>
6923 <p class=
"description">Find a PWG media size by
5101.1 self-describing name.
</p>
6925 <a href=
"#pwg_media_t">pwg_media_t
</a> *pwgMediaForPWG (
<br>
6926     const char *pwg
<br>
6928 <h4 class=
"parameters">Parameters
</h4>
6931 <dd class=
"description">PWG size name
</dd>
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
"pwg
" argument specifies a self-describing media size name of the form
6937 "prefix_name_WIDTHxLENGTHunits
" as defined in PWG
5101.1.
<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
6944 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"pwgMediaForSize">pwgMediaForSize
</a></h3>
6945 <p class=
"description">Get the PWG media size for the given dimensions.
</p>
6947 <a href=
"#pwg_media_t">pwg_media_t
</a> *pwgMediaForSize (
<br>
6948     int width,
<br>
6949     int length
<br>
6951 <h4 class=
"parameters">Parameters
</h4>
6954 <dd class=
"description">Width in hundredths of millimeters
</dd>
6956 <dd class=
"description">Length in hundredths of millimeters
</dd>
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
"width
" and
"length
" are in hundredths of millimeters, equivalent to
6962 1/
100000th of a meter or
1/
2540th of an inch.
<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
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"> CUPS
1.5/macOS
10.7 </span>cups_client_cert_cb_t
</a></h3>
6971 <p class=
"description">Client credentials callback
6974 typedef int(*)(http_t *http, void *tls, cups_array_t *distinguished_names, void *user_data)cups_client_cert_cb_t;
6976 <h3 class=
"typedef"><a id=
"cups_dest_cb_t"><span class=
"info"> CUPS
1.6/macOS
10.8 </span>cups_dest_cb_t
</a></h3>
6977 <p class=
"description">Destination enumeration callback
6980 typedef int(*)(void *user_data, unsigned flags,
<a href=
"#cups_dest_t">cups_dest_t
</a> *dest)cups_dest_cb_t;
6982 <h3 class=
"typedef"><a id=
"cups_dest_t">cups_dest_t
</a></h3>
6983 <p class=
"description">Destination
</p>
6985 typedef struct
<a href=
"#cups_dest_s">cups_dest_s
</a> cups_dest_t;
6987 <h3 class=
"typedef"><a id=
"cups_dinfo_t"><span class=
"info"> CUPS
1.6/macOS
10.8 </span>cups_dinfo_t
</a></h3>
6988 <p class=
"description">Destination capability and status
6991 typedef struct _cups_dinfo_s cups_dinfo_t;
6993 <h3 class=
"typedef"><a id=
"cups_encoding_t">cups_encoding_t
</a></h3>
6994 <p class=
"description">Language Encodings
</p>
6996 typedef enum
<a href=
"#cups_encoding_e">cups_encoding_e
</a> cups_encoding_t;
6998 <h3 class=
"typedef"><a id=
"cups_job_t">cups_job_t
</a></h3>
6999 <p class=
"description">Job
</p>
7001 typedef struct
<a href=
"#cups_job_s">cups_job_s
</a> cups_job_t;
7003 <h3 class=
"typedef"><a id=
"cups_lang_t">cups_lang_t
</a></h3>
7004 <p class=
"description">Language Cache Structure
</p>
7006 typedef struct
<a href=
"#cups_lang_s">cups_lang_s
</a> cups_lang_t;
7008 <h3 class=
"typedef"><a id=
"cups_option_t">cups_option_t
</a></h3>
7009 <p class=
"description">Printer Options
</p>
7011 typedef struct
<a href=
"#cups_option_s">cups_option_s
</a> cups_option_t;
7013 <h3 class=
"typedef"><a id=
"cups_password_cb2_t"><span class=
"info"> CUPS
1.4/macOS
10.6 </span>cups_password_cb2_t
</a></h3>
7014 <p class=
"description">New password callback
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;
7019 <h3 class=
"typedef"><a id=
"cups_ptype_t">cups_ptype_t
</a></h3>
7020 <p class=
"description">Printer type/capability bits
</p>
7022 typedef unsigned cups_ptype_t;
7024 <h3 class=
"typedef"><a id=
"cups_server_cert_cb_t"><span class=
"info"> CUPS
1.5/macOS
10.7 </span>cups_server_cert_cb_t
</a></h3>
7025 <p class=
"description">Server credentials callback
7028 typedef int(*)(http_t *http, void *tls, cups_array_t *certs, void *user_data)cups_server_cert_cb_t;
7030 <h3 class=
"typedef"><a id=
"cups_size_t"><span class=
"info"> CUPS
1.6/macOS
10.8 </span>cups_size_t
</a></h3>
7031 <p class=
"description">Media Size
</p>
7033 typedef struct
<a href=
"#cups_size_s">cups_size_s
</a> cups_size_t;
7035 <h3 class=
"typedef"><a id=
"http_addr_t"><span class=
"info"> CUPS
1.2/macOS
10.5 </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
7041 typedef union _http_addr_u / http_addr_t;
7043 <h3 class=
"typedef"><a id=
"http_addrlist_t"><span class=
"info"> CUPS
1.2/macOS
10.5 </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>
7049 typedef struct
<a href=
"#http_addrlist_s">http_addrlist_s
</a> / http_addrlist_t;
7051 <h3 class=
"typedef"><a id=
"http_auth_t">http_auth_t
</a></h3>
7052 <p class=
"description">HTTP authentication types
</p>
7054 typedef enum
<a href=
"#http_auth_e">http_auth_e
</a> http_auth_t;
7056 <h3 class=
"typedef"><a id=
"http_credential_t"><span class=
"info"> CUPS
1.5/macOS
10.7 </span>http_credential_t
</a></h3>
7057 <p class=
"description">HTTP credential data
</p>
7059 typedef struct
<a href=
"#http_credential_s">http_credential_s
</a> http_credential_t;
7061 <h3 class=
"typedef"><a id=
"http_encoding_t">http_encoding_t
</a></h3>
7062 <p class=
"description">HTTP transfer encoding values
</p>
7064 typedef enum
<a href=
"#http_encoding_e">http_encoding_e
</a> http_encoding_t;
7066 <h3 class=
"typedef"><a id=
"http_encryption_t">http_encryption_t
</a></h3>
7067 <p class=
"description">HTTP encryption values
</p>
7069 typedef enum
<a href=
"#http_encryption_e">http_encryption_e
</a> http_encryption_t;
7071 <h3 class=
"typedef"><a id=
"http_field_t">http_field_t
</a></h3>
7072 <p class=
"description">HTTP field names
</p>
7074 typedef enum
<a href=
"#http_field_e">http_field_e
</a> http_field_t;
7076 <h3 class=
"typedef"><a id=
"http_keepalive_t">http_keepalive_t
</a></h3>
7077 <p class=
"description">HTTP keep-alive values
</p>
7079 typedef enum
<a href=
"#http_keepalive_e">http_keepalive_e
</a> http_keepalive_t;
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>
7085 typedef enum
<a href=
"#http_state_e">http_state_e
</a> http_state_t;
7087 <h3 class=
"typedef"><a id=
"http_t">http_t
</a></h3>
7088 <p class=
"description">HTTP connection type
</p>
7090 typedef struct _http_s http_t;
7092 <h3 class=
"typedef"><a id=
"http_timeout_cb_t"><span class=
"info"> CUPS
1.5/macOS
10.7 </span>http_timeout_cb_t
</a></h3>
7093 <p class=
"description">HTTP timeout callback
</p>
7095 typedef int(*)(http_t *http, void *user_data)http_timeout_cb_t;
7097 <h3 class=
"typedef"><a id=
"http_trust_t"><span class=
"info"> CUPS
2.0/OS
10.10 </span>http_trust_t
</a></h3>
7098 <p class=
"description">Level of trust for credentials
</p>
7100 typedef enum
<a href=
"#http_trust_e">http_trust_e
</a> http_trust_t;
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>
7105 typedef enum
<a href=
"#http_uri_coding_e">http_uri_coding_e
</a> http_uri_coding_t;
7107 <h3 class=
"typedef"><a id=
"http_uri_status_t"><span class=
"info"> CUPS
1.2 </span>http_uri_status_t
</a></h3>
7108 <p class=
"description">URI separation status
</p>
7110 typedef enum
<a href=
"#http_uri_status_e">http_uri_status_e
</a> http_uri_status_t;
7112 <h3 class=
"typedef"><a id=
"http_version_t">http_version_t
</a></h3>
7113 <p class=
"description">HTTP version numbers
</p>
7115 typedef enum
<a href=
"#http_version_e">http_version_e
</a> http_version_t;
7117 <h3 class=
"typedef"><a id=
"ipp_attribute_t">ipp_attribute_t
</a></h3>
7118 <p class=
"description">IPP attribute
</p>
7120 typedef struct _ipp_attribute_s ipp_attribute_t;
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>
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;
7129 <h3 class=
"typedef"><a id=
"ipp_dstate_t">ipp_dstate_t
</a></h3>
7130 <p class=
"description">Document states
</p>
7132 typedef enum
<a href=
"#ipp_dstate_e">ipp_dstate_e
</a> ipp_dstate_t;
7134 <h3 class=
"typedef"><a id=
"ipp_finish_t">ipp_finish_t
</a></h3>
7135 <p class=
"description">Job collation types
</p>
7137 typedef enum
<a href=
"#ipp_finishings_e">ipp_finishings_e
</a> ipp_finish_t;
7139 <h3 class=
"typedef"><a id=
"ipp_iocb_t"><span class=
"info"> CUPS
1.2/macOS
10.5 </span>ipp_iocb_t
</a></h3>
7140 <p class=
"description">IPP IO Callback Function
</p>
7142 typedef ssize_t(*)(void *context,
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *buffer, size_t bytes) ipp_iocb_t;
7144 <h3 class=
"typedef"><a id=
"ipp_jcollate_t">ipp_jcollate_t
</a></h3>
7145 <p class=
"description">Job collation types
</p>
7147 typedef enum
<a href=
"#ipp_jcollate_e">ipp_jcollate_e
</a> ipp_jcollate_t;
7149 <h3 class=
"typedef"><a id=
"ipp_orient_t">ipp_orient_t
</a></h3>
7150 <p class=
"description">Orientation values
</p>
7152 typedef enum
<a href=
"#ipp_orient_e">ipp_orient_e
</a> ipp_orient_t;
7154 <h3 class=
"typedef"><a id=
"ipp_pstate_t">ipp_pstate_t
</a></h3>
7155 <p class=
"description">Printer states
</p>
7157 typedef enum
<a href=
"#ipp_pstate_e">ipp_pstate_e
</a> ipp_pstate_t;
7159 <h3 class=
"typedef"><a id=
"ipp_quality_t">ipp_quality_t
</a></h3>
7160 <p class=
"description">Qualities
</p>
7162 typedef enum
<a href=
"#ipp_quality_e">ipp_quality_e
</a> ipp_quality_t;
7164 <h3 class=
"typedef"><a id=
"ipp_res_t">ipp_res_t
</a></h3>
7165 <p class=
"description">Resolution units
</p>
7167 typedef enum
<a href=
"#ipp_res_e">ipp_res_e
</a> ipp_res_t;
7169 <h3 class=
"typedef"><a id=
"ipp_state_t">ipp_state_t
</a></h3>
7170 <p class=
"description">IPP states
</p>
7172 typedef enum
<a href=
"#ipp_state_e">ipp_state_e
</a> ipp_state_t;
7174 <h3 class=
"typedef"><a id=
"ipp_t">ipp_t
</a></h3>
7175 <p class=
"description">IPP request/response data
</p>
7177 typedef struct _ipp_s ipp_t;
7179 <h3 class=
"typedef"><a id=
"ipp_uchar_t">ipp_uchar_t
</a></h3>
7180 <p class=
"description">Unsigned
8-bit integer/character
</p>
7182 typedef unsigned char ipp_uchar_t;
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>
7187 typedef struct
<a href=
"#pwg_map_s">pwg_map_s
</a> pwg_map_t;
7189 <h3 class=
"typedef"><a id=
"pwg_media_t">pwg_media_t
</a></h3>
7190 <p class=
"description">Common media size data
</p>
7192 typedef struct
<a href=
"#pwg_media_s">pwg_media_s
</a> pwg_media_t;
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>
7197 typedef struct
<a href=
"#pwg_size_s">pwg_size_s
</a> pwg_size_t;
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     char *name, *instance;
<br>
7204     int is_default;
<br>
7205     int num_options;
<br>
7206     <a href=
"#cups_option_t">cups_option_t
</a> *options;
<br>
7208 <h4 class=
"members">Members
</h4>
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>
7217 <dd class=
"description">Options
</dd>
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     time_t completed_time;
<br>
7223     time_t creation_time;
<br>
7224     char *dest;
<br>
7225     char *format;
<br>
7226     int id;
<br>
7227     int priority;
<br>
7228     time_t processing_time;
<br>
7229     int size;
<br>
7230     ipp_jstate_t state;
<br>
7231     char *title;
<br>
7232     char *user;
<br>
7234 <h4 class=
"members">Members
</h4>
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>
7241 <dd class=
"description">Printer or class name
</dd>
7243 <dd class=
"description">Document format
</dd>
7245 <dd class=
"description">The job ID
</dd>
7247 <dd class=
"description">Priority (
1-
100)
</dd>
7248 <dt>processing_time
</dt>
7249 <dd class=
"description">Time the job was processed
</dd>
7251 <dd class=
"description">Size in kilobytes
</dd>
7253 <dd class=
"description">Job state
</dd>
7255 <dd class=
"description">Title/job name
</dd>
7257 <dd class=
"description">User that submitted the job
</dd>
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     <a href=
"#cups_encoding_t">cups_encoding_t
</a> encoding;
<br>
7263     char language[
16];
<br>
7264     struct
<a href=
"#cups_lang_s">cups_lang_s
</a> *next;
<br>
7265     int used;
<br>
7267 <h4 class=
"members">Members
</h4>
7270 <dd class=
"description">Text encoding
</dd>
7271 <dt>language[
16]
</dt>
7272 <dd class=
"description">Language/locale name
</dd>
7274 <dd class=
"description">Next language in cache
</dd>
7276 <dd class=
"description">Number of times this entry has been used.
</dd>
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     char *name;
<br>
7282     char *value;
<br>
7284 <h4 class=
"members">Members
</h4>
7287 <dd class=
"description">Name of option
</dd>
7289 <dd class=
"description">Value of option
</dd>
7291 <h3 class=
"struct"><span class=
"info"> CUPS
1.6/macOS
10.8 </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     char media[
128];
<br>
7295     int width, length, bottom, left, right, top;
<br>
7297 <h4 class=
"members">Members
</h4>
7299 <dt>media[
128]
</dt>
7300 <dd class=
"description">Media name to use
</dd>
7302 <dd class=
"description">Top margin in hundredths of
7305 <h3 class=
"struct"><span class=
"info"> CUPS
1.2/macOS
10.5 </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     <a href=
"#http_addr_t">http_addr_t
</a> addr;
<br>
7312     struct
<a href=
"#http_addrlist_s">http_addrlist_s
</a> *next;
<br>
7314 <h4 class=
"members">Members
</h4>
7317 <dd class=
"description">Address
</dd>
7319 <dd class=
"description">Pointer to next address in list
</dd>
7321 <h3 class=
"struct"><span class=
"info"> CUPS
1.5/macOS
10.7 </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     void *data;
<br>
7325     size_t datalen;
<br>
7327 <h4 class=
"members">Members
</h4>
7330 <dd class=
"description">Pointer to credential data
</dd>
7332 <dd class=
"description">Credential length
</dd>
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     char *pwg, *ppd;
<br>
7339 <h4 class=
"members">Members
</h4>
7342 <dd class=
"description">PPD option keyword
</dd>
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     int width, length;
<br>
7348     const char *pwg, *legacy, *ppd;
<br>
7350 <h4 class=
"members">Members
</h4>
7353 <dd class=
"description">Length in
2540ths
</dd>
7355 <dd class=
"description">Standard Adobe PPD name
</dd>
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     <a href=
"#pwg_map_t">pwg_map_t
</a> map;
<br>
7361     int width, length, left, bottom, right, top;
<br>
7363 <h4 class=
"members">Members
</h4>
7366 <dd class=
"description">Map element
</dd>
7368 <dd class=
"description">Top margin in
2540ths
</dd>
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>
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>
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>
7456 <h3 class=
"enumeration"><a id=
"cups_ptype_e">cups_ptype_e
</a></h3>
7457 <p class=
"description">Printer type/capability bit
7459 <h4 class=
"constants">Constants
</h4>
7461 <dt>CUPS_PRINTER_3D
<span class=
"info"> DEPRECATED
 </span></dt>
7462 <dd class=
"description">Printer with
3D capabilities
</dd>
7463 <dt>CUPS_PRINTER_AUTHENTICATED
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
7464 <dd class=
"description">Printer requires authentication
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
&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"> CUPS
1.2/macOS
10.5 </span></dt>
7477 <dd class=
"description">Printer supports maintenance commands
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"> DEPRECATED
 </span></dt>
7486 <dd class=
"description">Delete printer
7488 <dt>CUPS_PRINTER_DISCOVERED
<span class=
"info"> CUPS
1.2/macOS
10.5 </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"> CUPS
1.4/macOS
10.6 </span></dt>
7501 <dd class=
"description">Printer with scanning capabilities
7503 <dt>CUPS_PRINTER_NOT_SHARED
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
7504 <dd class=
"description">Printer is not shared
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"> CUPS
1.4/macOS
10.6 </span></dt>
7513 <dd class=
"description">Scanner-only device
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>
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>
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"> CUPS
1.3/macOS
10.5 </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>
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>
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>
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>
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>
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>
7571 <dt>HTTP_FIELD_ACCEPT_ENCODING
<span class=
"info"> CUPS
1.7/macOS
10.9 </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"> CUPS
1.7/macOS
10.9 </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"> CUPS
1.7/macOS
10.9 </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>
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>
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>
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>
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"> CUPS
1.7/macOS
10.9 </span></dt>
7679 <dd class=
"description">Unknown request method, waiting for blank line
</dd>
7680 <dt>HTTP_STATE_UNKNOWN_VERSION
<span class=
"info"> CUPS
1.7/macOS
10.9 </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>
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>
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"> CUPS
1.4 </span></dt>
7702 <dd class=
"description">User canceled authorization
</dd>
7703 <dt>HTTP_STATUS_CUPS_PKI_ERROR
<span class=
"info"> CUPS
1.5/macOS
10.7 </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"> CUPS
1.7/macOS
10.9 </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>
7778 <h3 class=
"enumeration"><a id=
"http_trust_e"><span class=
"info"> CUPS
2.0/OS
10.10 </span>http_trust_e
</a></h3>
7779 <p class=
"description">Level of trust for credentials
</p>
7780 <h4 class=
"constants">Constants
</h4>
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>
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>
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>
7816 <h3 class=
"enumeration"><a id=
"http_uri_status_e"><span class=
"info"> CUPS
1.2 </span>http_uri_status_e
</a></h3>
7817 <p class=
"description">URI separation status
</p>
7818 <h4 class=
"constants">Constants
</h4>
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>
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>
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>
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>
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>
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>
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>
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>
8074 <dt>IPP_JCOLLATE_COLLATED_DOCUMENTS
</dt>
8075 <dt>IPP_JCOLLATE_UNCOLLATED_DOCUMENTS
</dt>
8076 <dt>IPP_JCOLLATE_UNCOLLATED_SHEETS
</dt>
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>
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>
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>
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"> CUPS
1.2/macOS
10.5 </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"> CUPS
1.2/macOS
10.5 </span></dt>
8128 <dd class=
"description">Create one of more job subscriptions
</dd>
8129 <dt>IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS
<span class=
"info"> CUPS
1.2/macOS
10.5 </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"> CUPS
1.2/macOS
10.5 </span></dt>
8138 <dd class=
"description">Authenticate a job
</dd>
8139 <dt>IPP_OP_CUPS_CREATE_LOCAL_PRINTER
<span class=
"info"> CUPS
2.2 </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"> DEPRECATED
 </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"> DEPRECATED
 </span></dt>
8150 <dd class=
"description">Get a list of supported devices
</dd>
8151 <dt>IPP_OP_CUPS_GET_DOCUMENT
<span class=
"info"> CUPS
1.4/macOS
10.6 </span></dt>
8152 <dd class=
"description">Get a document file
</dd>
8153 <dt>IPP_OP_CUPS_GET_PPD
<span class=
"info"> DEPRECATED
 </span></dt>
8154 <dd class=
"description">Get a PPD file
</dd>
8155 <dt>IPP_OP_CUPS_GET_PPDS
<span class=
"info"> DEPRECATED
 </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"> CUPS
1.2/macOS
10.5 </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"> CUPS
1.2/macOS
10.5 </span></dt>
8200 <dd class=
"description">Get list of subscriptions
</dd>
8201 <dt>IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES
<span class=
"info"> CUPS
1.2/macOS
10.5 </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"> CUPS
1.2/macOS
10.5 </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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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"> DEPRECATED
 </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"> DEPRECATED
 </span></dt>
8368 <dd class=
"description">cups-error-account-info-needed
</dd>
8369 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_LIMIT_REACHED
<span class=
"info"> DEPRECATED
 </span></dt>
8370 <dd class=
"description">cups-error-account-limit-reached
</dd>
8371 <dt>IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED
<span class=
"info"> CUPS
1.5/macOS
10.7 </span></dt>
8372 <dd class=
"description">cups-authentication-canceled - Authentication canceled by user
</dd>
8373 <dt>IPP_STATUS_ERROR_CUPS_PKI
<span class=
"info"> CUPS
1.5/macOS
10.7 </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>
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>
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>