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>
442 <li><a href=
"#TYPES">Data Types
</a><ul class=
"subcontents">
443 <li><a href=
"#cups_client_cert_cb_t">cups_client_cert_cb_t
</a></li>
444 <li><a href=
"#cups_dest_cb_t">cups_dest_cb_t
</a></li>
445 <li><a href=
"#cups_dest_t">cups_dest_t
</a></li>
446 <li><a href=
"#cups_dinfo_t">cups_dinfo_t
</a></li>
447 <li><a href=
"#cups_job_t">cups_job_t
</a></li>
448 <li><a href=
"#cups_lang_t">cups_lang_t
</a></li>
449 <li><a href=
"#cups_option_t">cups_option_t
</a></li>
450 <li><a href=
"#cups_password_cb2_t">cups_password_cb2_t
</a></li>
451 <li><a href=
"#cups_ptype_t">cups_ptype_t
</a></li>
452 <li><a href=
"#cups_server_cert_cb_t">cups_server_cert_cb_t
</a></li>
453 <li><a href=
"#cups_size_t">cups_size_t
</a></li>
454 <li><a href=
"#http_addr_t">http_addr_t
</a></li>
455 <li><a href=
"#http_encoding_t">http_encoding_t
</a></li>
456 <li><a href=
"#http_encryption_t">http_encryption_t
</a></li>
457 <li><a href=
"#http_field_t">http_field_t
</a></li>
458 <li><a href=
"#http_keepalive_t">http_keepalive_t
</a></li>
459 <li><a href=
"#http_state_t">http_state_t
</a></li>
460 <li><a href=
"#http_t">http_t
</a></li>
461 <li><a href=
"#http_timeout_cb_t">http_timeout_cb_t
</a></li>
462 <li><a href=
"#http_trust_t">http_trust_t
</a></li>
463 <li><a href=
"#http_uri_coding_t">http_uri_coding_t
</a></li>
464 <li><a href=
"#http_uri_status_t">http_uri_status_t
</a></li>
465 <li><a href=
"#ipp_attribute_t">ipp_attribute_t
</a></li>
466 <li><a href=
"#ipp_copycb_t">ipp_copycb_t
</a></li>
467 <li><a href=
"#ipp_iocb_t">ipp_iocb_t
</a></li>
468 <li><a href=
"#ipp_orient_t">ipp_orient_t
</a></li>
469 <li><a href=
"#ipp_pstate_t">ipp_pstate_t
</a></li>
470 <li><a href=
"#ipp_quality_t">ipp_quality_t
</a></li>
471 <li><a href=
"#ipp_res_t">ipp_res_t
</a></li>
472 <li><a href=
"#ipp_state_t">ipp_state_t
</a></li>
473 <li><a href=
"#ipp_t">ipp_t
</a></li>
474 <li><a href=
"#ipp_uchar_t">ipp_uchar_t
</a></li>
476 <li><a href=
"#STRUCTURES">Structures
</a><ul class=
"subcontents">
477 <li><a href=
"#cups_dest_s">cups_dest_s
</a></li>
478 <li><a href=
"#cups_job_s">cups_job_s
</a></li>
479 <li><a href=
"#cups_lang_s">cups_lang_s
</a></li>
480 <li><a href=
"#cups_option_s">cups_option_s
</a></li>
481 <li><a href=
"#cups_size_s">cups_size_s
</a></li>
483 <li><a href=
"#ENUMERATIONS">Enumerations
</a><ul class=
"subcontents">
484 <li><a href=
"#cups_ptype_e">cups_ptype_e
</a></li>
485 <li><a href=
"#http_encoding_e">http_encoding_e
</a></li>
486 <li><a href=
"#http_encryption_e">http_encryption_e
</a></li>
487 <li><a href=
"#http_field_e">http_field_e
</a></li>
488 <li><a href=
"#http_keepalive_e">http_keepalive_e
</a></li>
489 <li><a href=
"#http_state_e">http_state_e
</a></li>
490 <li><a href=
"#http_status_e">http_status_e
</a></li>
491 <li><a href=
"#http_trust_e">http_trust_e
</a></li>
492 <li><a href=
"#http_uri_coding_e">http_uri_coding_e
</a></li>
493 <li><a href=
"#http_uri_status_e">http_uri_status_e
</a></li>
494 <li><a href=
"#ipp_finishings_e">ipp_finishings_e
</a></li>
495 <li><a href=
"#ipp_jstate_e">ipp_jstate_e
</a></li>
496 <li><a href=
"#ipp_op_e">ipp_op_e
</a></li>
497 <li><a href=
"#ipp_orient_e">ipp_orient_e
</a></li>
498 <li><a href=
"#ipp_pstate_e">ipp_pstate_e
</a></li>
499 <li><a href=
"#ipp_quality_e">ipp_quality_e
</a></li>
500 <li><a href=
"#ipp_res_e">ipp_res_e
</a></li>
501 <li><a href=
"#ipp_state_e">ipp_state_e
</a></li>
502 <li><a href=
"#ipp_status_e">ipp_status_e
</a></li>
503 <li><a href=
"#ipp_tag_e">ipp_tag_e
</a></li>
509 <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>
511 <h2><a id=
"introduction">Introduction
</a></h2>
512 <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>
513 <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>
514 <h3><a id=
"guidelines">Guidelines
</a></h3>
515 <p>When writing software that uses the
"cups
" library:
</p>
517 <li>Do not use undocumented or deprecated APIs,
</li>
518 <li>Do not rely on pre-configured printers,
</li>
519 <li>Do not assume that printers support specific features or formats, and
</li>
520 <li>Do not rely on implementation details (PPDs, etc.)
</li>
522 <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>
523 <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>
524 <h3><a id=
"terms-used-in-this-document">Terms Used in This Document
</a></h3>
525 <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>
526 <h3><a id=
"compiling-programs-that-use-the-cups-api">Compiling Programs That Use the CUPS API
</a></h3>
527 <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>
528 <p>The following simple program lists the available destinations:
</p>
529 <pre><code>#include
<stdio.h
>
530 #include
<cups/cups.h
>
532 int print_dest(void *user_data, unsigned flags, cups_dest_t *dest)
534 if (dest-
>instance)
535 printf(
"%s/%s\n
", dest-
>name, dest-
>instance);
544 cupsEnumDests(CUPS_DEST_FLAGS_NONE,
1000, NULL,
0,
0, print_dest, NULL);
549 <h4><a id=
"compiling-with-xcode">Compiling with Xcode
</a></h4>
550 <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>
551 <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>
552 <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>
553 <h4><a id=
"compiling-with-gcc">Compiling with GCC
</a></h4>
554 <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>
555 <pre><code>gcc -o simple `cups-config --cflags` simple.c `cups-config --libs`
558 <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>
559 <h2><a id=
"working-with-destinations">Working with Destinations
</a></h2>
560 <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>
561 <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>
562 <h3><a id=
"finding-available-destinations">Finding Available Destinations
</a></h3>
563 <p>The
<code>cupsEnumDests
</code> function finds all of the available destinations:
</p>
565 cupsEnumDests(unsigned flags, int msec, int *cancel,
566 cups_ptype_t type, cups_ptype_t mask,
567 cups_dest_cb_t cb, void *user_data)
569 <p>The
<code>flags
</code> argument specifies enumeration options, which at present must be
<code>CUPS_DEST_FLAGS_NONE
</code>.
</p>
570 <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>
571 <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>
572 <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>
574 <li><code>CUPS_PRINTER_CLASS
</code>: A collection of destinations.
</li>
575 <li><code>CUPS_PRINTER_FAX
</code>: A facsimile device.
</li>
576 <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>
577 <li><code>CUPS_PRINTER_REMOTE
</code>: A remote (shared) printer or class.
</li>
578 <li><code>CUPS_PRINTER_DISCOVERED
</code>: An available network printer or class.
</li>
579 <li><code>CUPS_PRINTER_BW
</code>: Can do B
&W printing.
</li>
580 <li><code>CUPS_PRINTER_COLOR
</code>: Can do color printing.
</li>
581 <li><code>CUPS_PRINTER_DUPLEX
</code>: Can do two-sided printing.
</li>
582 <li><code>CUPS_PRINTER_STAPLE
</code>: Can staple output.
</li>
583 <li><code>CUPS_PRINTER_COLLATE
</code>: Can quickly collate copies.
</li>
584 <li><code>CUPS_PRINTER_PUNCH
</code>: Can punch output.
</li>
585 <li><code>CUPS_PRINTER_COVER
</code>: Can cover output.
</li>
586 <li><code>CUPS_PRINTER_BIND
</code>: Can bind output.
</li>
587 <li><code>CUPS_PRINTER_SORT
</code>: Can sort output (mailboxes, etc.)
</li>
588 <li><code>CUPS_PRINTER_SMALL
</code>: Can print on Letter/Legal/A4-size media.
</li>
589 <li><code>CUPS_PRINTER_MEDIUM
</code>: Can print on Tabloid/B/C/A3/A2-size media.
</li>
590 <li><code>CUPS_PRINTER_LARGE
</code>: Can print on D/E/A1/A0-size media.
</li>
591 <li><code>CUPS_PRINTER_VARIABLE
</code>: Can print on rolls and custom-size media.
</li>
593 <p>The
<code>cb
</code> argument specifies a function to call for every destination that is found:
</p>
594 <pre><code>typedef int (*cups_dest_cb_t)(void *user_data,
598 <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>
600 <li><code>CUPS_DEST_FLAGS_MORE
</code>: There are more destinations coming.
</li>
601 <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>
602 <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>
604 <p>The callback function returns
0 to stop enumeration or
1 to continue.
</p>
606 <p>Note that the callback function will likely be called multiple times for the same destination, so it is up to the caller to suppress any duplicate destinations.
</p>
608 <p>The following example shows how to use
<code>cupsEnumDests
</code> to get a filtered array of destinations:
</p>
609 <pre><code>typedef struct
616 my_dest_cb(my_user_data_t *user_data, unsigned flags,
619 if (flags
& CUPS_DEST_FLAGS_REMOVED)
622 * Remove destination from array...
625 user_data-
>num_dests =
626 cupsRemoveDest(dest-
>name, dest-
>instance,
627 user_data-
>num_dests,
628 &(user_data-
>dests));
633 * Add destination to array...
636 user_data-
>num_dests =
637 cupsCopyDest(dest, user_data-
>num_dests,
638 &(user_data-
>dests));
645 my_get_dests(cups_ptype_t type, cups_ptype_t mask,
648 my_user_data_t user_data = {
0, NULL };
650 if (!cupsEnumDests(CUPS_DEST_FLAGS_NONE,
1000, NULL, type,
651 mask, (cups_dest_cb_t)my_dest_cb,
655 * An error occurred, free all of the destinations and
659 cupsFreeDests(user_data.num_dests, user_dasta.dests);
667 * Return the destination array...
670 *dests = user_data.dests;
672 return (user_data.num_dests);
675 <h3><a id=
"basic-destination-information">Basic Destination Information
</a></h3>
676 <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>
678 <li>"auth-info-required
": The type of authentication required for printing to this destination:
"none
",
"username,password
",
"domain,username,password
", or
"negotiate
" (Kerberos).
</li>
679 <li>"printer-info
": The human-readable description of the destination such as
"My Laser Printer
".
</li>
680 <li>"printer-is-accepting-jobs
":
"true
" if the destination is accepting new jobs,
"false
" otherwise.
</li>
681 <li>"printer-is-shared
":
"true
" if the destination is being shared with other computers,
"false
" otherwise.
</li>
682 <li>"printer-location
": The human-readable location of the destination such as
"Lab
4".
</li>
683 <li>"printer-make-and-model
": The human-readable make and model of the destination such as
"ExampleCorp LaserPrinter
4000 Series
".
</li>
684 <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>
685 <li>"printer-state-change-time
": The UNIX time when the destination entered the current state.
</li>
686 <li>"printer-state-reasons
": Additional comma-delimited state keywords for the destination such as
"media-tray-empty-error
" and
"toner-low-warning
".
</li>
687 <li>"printer-type
": The
<code>cups_ptype_t
</code> value associated with the destination.
</li>
688 <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>
690 <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>
691 <pre><code>const char *model = cupsGetOption(
"printer-make-and-model
",
692 dest-
>num_options,
695 <h3><a id=
"detailed-destination-information">Detailed Destination Information
</a></h3>
696 <p>Once a destination has been chosen, the
<code>cupsCopyDestInfo
</code> function can be used to gather detailed information about the destination:
</p>
697 <pre><code>cups_dinfo_t *
698 cupsCopyDestInfo(http_t *http, cups_dest_t *dest);
700 <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>
701 <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>
702 <h4><a id=
"getting-supported-options-and-values">Getting Supported Options and Values
</a></h4>
703 <p>The
<code>cupsCheckDestSupported
</code> function can be used to test whether a particular option or option and value is supported:
</p>
705 cupsCheckDestSupported(http_t *http, cups_dest_t *dest,
710 <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>
712 <li><code>CUPS_COPIES
</code>: Controls the number of copies that are produced.
</li>
713 <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>
714 <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>
715 <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>
716 <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>
717 <li><code>CUPS_NUMBER_UP
</code>: Controls the number of document pages that are placed on each media side.
</li>
718 <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>
719 <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>
720 <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>
721 <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>
723 <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>
724 <p>The
<code>cupsFindDestSupported
</code> function returns the IPP attribute containing the supported values for a given option:
</p>
725 <pre><code> ipp_attribute_t *
726 cupsFindDestSupported(http_t *http, cups_dest_t *dest,
730 <p>For example, the following code prints the supported finishing processes for a destination, if any, to the standard output:
</p>
731 <pre><code>cups_dinfo_t *info = cupsCopyDestInfo(CUPS_HTTP_DEFAULT,
734 if (cupsCheckDestSupported(CUPS_HTTP_DEFAULT, dest, info,
735 CUPS_FINISHINGS, NULL))
737 ipp_attribute_t *finishings =
738 cupsFindDestSupported(CUPS_HTTP_DEFAULT, dest, info,
740 int i, count = ippGetCount(finishings);
742 puts(
"finishings supported:
");
743 for (i =
0; i
< count; i ++)
744 printf(
" %d\n
", ippGetInteger(finishings, i));
747 puts(
"finishings not supported.
");
749 <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>
750 <pre><code>ipp_attribute_t *attrs =
751 cupsFindDestSupported(CUPS_HTTP_DEFAULT, dest, info,
752 "job-creation-attributes
");
753 int i, count = ippGetCount(attrs);
755 for (i =
0; i
< count; i ++)
756 puts(ippGetString(attrs, i, NULL));
758 <h4><a id=
"getting-default-values">Getting Default Values
</a></h4>
759 <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>
760 <pre><code>ipp_attribute_t *
761 cupsFindDestDefault(http_t *http, cups_dest_t *dest,
765 <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>
766 <pre><code>const char *def_value =
767 cupsGetOption(CUPS_FINISHINGS, dest-
>num_options,
769 ipp_attribute_t *def_attr =
770 cupsFindDestDefault(CUPS_HTTP_DEFAULT, dest, info,
773 if (def_value != NULL)
775 printf(
"Default finishings: %s\n
", def_value);
779 int i, count = ippGetCount(def_attr);
781 printf(
"Default finishings: %d
",
782 ippGetInteger(def_attr,
0));
783 for (i =
1; i
< count; i ++)
784 printf(
",%d
", ippGetInteger(def_attr, i));
788 <h4><a id=
"getting-ready-loaded-values">Getting Ready (Loaded) Values
</a></h4>
789 <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>
790 <p>The
<code>cupsFindDestReady
</code> function finds the IPP attribute containing the ready values for a given option:
</p>
791 <pre><code>ipp_attribute_t *
792 cupsFindDestReady(http_t *http, cups_dest_t *dest,
793 cups_dinfo_t *dinfo, const char *option);
795 <p>For example, the following code lists the ready finishing processes:
</p>
796 <pre><code>ipp_attribute_t *ready_finishings =
797 cupsFindDestReady(CUPS_HTTP_DEFAULT, dest, info,
800 if (ready_finishings != NULL)
802 int i, count = ippGetCount(ready_finishings);
804 puts(
"finishings ready:
");
805 for (i =
0; i
< count; i ++)
806 printf(
" %d\n
", ippGetInteger(ready_finishings, i));
809 puts(
"no finishings are ready.
");
811 <h4><a id=
"media-size-options">Media Size Options
</a></h4>
812 <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>
813 <pre><code>typedef struct cups_size_s
817 int bottom, left, right, top;
820 <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>
821 <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>
823 cupsGetDestMediaByName(http_t *http, cups_dest_t *dest,
826 unsigned flags, cups_size_t *size);
829 cupsGetDestMediaBySize(http_t *http, cups_dest_t *dest,
831 int width, int length,
832 unsigned flags, cups_size_t *size);
834 <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>
836 <li><code>CUPS_MEDIA_FLAGS_DEFAULT
</code>: Find the closest size supported by the printer.
</li>
837 <li><code>CUPS_MEDIA_FLAGS_BORDERLESS
</code>: Find a borderless size.
</li>
838 <li><code>CUPS_MEDIA_FLAGS_DUPLEX
</code>: Find a size compatible with two-sided printing.
</li>
839 <li><code>CUPS_MEDIA_FLAGS_EXACT
</code>: Find an exact match for the size.
</li>
840 <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>
842 <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>
843 <p>For example, the following code prints the margins for two-sided printing on US Letter media:
</p>
844 <pre><code>cups_size_t size;
846 if (cupsGetDestMediaByName(CUPS_HTTP_DEFAULT, dest, info,
848 CUPS_MEDIA_FLAGS_DUPLEX,
&size))
850 puts(
"Margins for duplex US Letter:
");
851 printf(
" Bottom: %
.2fin\n
", size.bottom /
2540.0);
852 printf(
" Left: %
.2fin\n
", size.left /
2540.0);
853 printf(
" Right: %
.2fin\n
", size.right /
2540.0);
854 printf(
" Top: %
.2fin\n
", size.top /
2540.0);
857 puts(
"Margins for duplex US Letter are not available.
");
859 <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>
861 cupsGetDestMediaByIndex(http_t *http, cups_dest_t *dest,
862 cups_dinfo_t *dinfo, int n,
863 unsigned flags, cups_size_t *size);
866 cupsGetDestMediaCount(http_t *http, cups_dest_t *dest,
867 cups_dinfo_t *dinfo, unsigned flags);
869 <p>For example, the following code prints the list of ready media and corresponding margins:
</p>
870 <pre><code>cups_size_t size;
872 int count = cupsGetDestMediaCount(CUPS_HTTP_DEFAULT,
874 CUPS_MEDIA_FLAGS_READY);
876 for (i =
0; i
< count; i ++)
878 if (cupsGetDestMediaByIndex(CUPS_HTTP_DEFAULT, dest, info,
879 i, CUPS_MEDIA_FLAGS_READY,
882 printf(
"%s:\n
", size.name);
883 printf(
" Width: %
.2fin\n
", size.width /
2540.0);
884 printf(
" Length: %
.2fin\n
", size.length /
2540.0);
885 printf(
" Bottom: %
.2fin\n
", size.bottom /
2540.0);
886 printf(
" Left: %
.2fin\n
", size.left /
2540.0);
887 printf(
" Right: %
.2fin\n
", size.right /
2540.0);
888 printf(
" Top: %
.2fin\n
", size.top /
2540.0);
892 <p>Finally, the
<code>cupsGetDestMediaDefault
</code> function returns the default media size:
</p>
894 cupsGetDestMediaDefault(http_t *http, cups_dest_t *dest,
895 cups_dinfo_t *dinfo, unsigned flags,
898 <h4><a id=
"localizing-options-and-values">Localizing Options and Values
</a></h4>
899 <p>CUPS provides three functions to get localized versions of options and values:
<code>cupsLocalizeDestMedia
</code>,
<code>cupsLocalizeDestOption
</code>, and
<code>cupsLocalizeDestValue
</code>:
</p>
900 <pre><code>const char *
901 cupsLocalizeDestMedia(http_t *http, cups_dest_t *dest,
902 cups_dinfo_t *info, unsigned flags,
906 cupsLocalizeDestOption(http_t *http, cups_dest_t *dest,
911 cupsLocalizeDestValue(http_t *http, cups_dest_t *dest,
913 const char *option, const char *value);
915 <h3><a id=
"submitting-a-print-job">Submitting a Print Job
</a></h3>
916 <p>Once you are ready to submit a print job, you create a job using the
<code>cupsCreateDestJob
</code> function:
</p>
917 <pre><code>ipp_status_t
918 cupsCreateDestJob(http_t *http, cups_dest_t *dest,
919 cups_dinfo_t *info, int *job_id,
920 const char *title, int num_options,
921 cups_option_t *options);
923 <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>
924 <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>
925 <p>For example, the following code creates a new job that will print
42 copies of a two-sided US Letter document:
</p>
926 <pre><code>int job_id =
0;
928 cups_option_t *options = NULL;
930 num_options = cupsAddOption(CUPS_COPIES,
"42",
931 num_options,
&options);
932 num_options = cupsAddOption(CUPS_MEDIA, CUPS_MEDIA_LETTER,
933 num_options,
&options);
934 num_options = cupsAddOption(CUPS_SIDES,
935 CUPS_SIDES_TWO_SIDED_PORTRAIT,
936 num_options,
&options);
938 if (cupsCreateDestJob(CUPS_HTTP_DEFAULT, dest, info,
939 &job_id,
"My Document
", num_options,
940 options) == IPP_STATUS_OK)
941 printf(
"Created job: %d\n
", job_id);
943 printf(
"Unable to create job: %s\n
",
944 cupsLastErrorString());
946 <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>
947 <pre><code>http_status_t
948 cupsStartDestDocument(http_t *http, cups_dest_t *dest,
949 cups_dinfo_t *info, int job_id,
953 cups_option_t *options,
957 cupsWriteRequestData(http_t *http, const char *buffer,
961 cupsFinishDestDocument(http_t *http, cups_dest_t *dest,
964 <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>
966 <li><code>CUPS_FORMAT_JPEG
</code>:
"image/jpeg
"</li>
967 <li><code>CUPS_FORMAT_PDF
</code>:
"application/pdf
"</li>
968 <li><code>CUPS_FORMAT_POSTSCRIPT
</code>:
"application/postscript
"</li>
969 <li><code>CUPS_FORMAT_TEXT
</code>:
"text/plain
"</li>
971 <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>
972 <p>For example, the following code submits a PDF file to the job that was just created:
</p>
973 <pre><code>FILE *fp = fopen(
"filename.pdf
",
"rb
");
977 if (cupsStartDestDocument(CUPS_HTTP_DEFAULT, dest, info,
978 job_id,
"filename.pdf
",
0, NULL,
979 1) == HTTP_STATUS_CONTINUE)
981 while ((bytes = fread(buffer,
1, sizeof(buffer), fp))
> 0)
982 if (cupsWriteRequestData(CUPS_HTTP_DEFAULT, buffer,
983 bytes) != HTTP_STATUS_CONTINUE)
986 if (cupsFinishDestDocument(CUPS_HTTP_DEFAULT, dest,
987 info) == IPP_STATUS_OK)
988 puts(
"Document send succeeded.
");
990 printf(
"Document send failed: %s\n
",
991 cupsLastErrorString());
996 <h2 class=
"title"><a id=
"FUNCTIONS">Functions
</a></h2>
997 <h3 class=
"function"><a id=
"cupsAddDest">cupsAddDest
</a></h3>
998 <p class=
"description">Add a destination to the list of destinations.
</p>
1000 int cupsAddDest (
<br>
1001     const char *name,
<br>
1002     const char *instance,
<br>
1003     int num_dests,
<br>
1004     <a href=
"#cups_dest_t">cups_dest_t
</a> **dests
<br>
1006 <h4 class=
"parameters">Parameters
</h4>
1009 <dd class=
"description">Destination name
</dd>
1011 <dd class=
"description">Instance name or
<code>NULL
</code> for none/primary
</dd>
1013 <dd class=
"description">Number of destinations
</dd>
1015 <dd class=
"description">Destinations
</dd>
1017 <h4 class=
"returnvalue">Return Value
</h4>
1018 <p class=
"description">New number of destinations
</p>
1019 <h4 class=
"discussion">Discussion
</h4>
1020 <p class=
"discussion">This function cannot be used to add a new class or printer queue,
1021 it only adds a new container of saved options for the named
1022 destination or instance.
<br>
1024 If the named destination already exists, the destination list is
1025 returned unchanged. Adding a new instance of a destination creates
1026 a copy of that destination's options.
<br>
1028 Use the
<a href=
"#cupsSaveDests"><code>cupsSaveDests
</code></a> function to save the updated list of
1029 destinations to the user's lpoptions file.
</p>
1030 <h3 class=
"function"><span class=
"info"> CUPS
2.2.4 </span><a id=
"cupsAddIntegerOption">cupsAddIntegerOption
</a></h3>
1031 <p class=
"description">Add an integer option to an option array.
</p>
1033 int cupsAddIntegerOption (
<br>
1034     const char *name,
<br>
1035     int value,
<br>
1036     int num_options,
<br>
1037     <a href=
"#cups_option_t">cups_option_t
</a> **options
<br>
1039 <h4 class=
"parameters">Parameters
</h4>
1042 <dd class=
"description">Name of option
</dd>
1044 <dd class=
"description">Value of option
</dd>
1045 <dt>num_options
</dt>
1046 <dd class=
"description">Number of options
</dd>
1048 <dd class=
"description">Pointer to options
</dd>
1050 <h4 class=
"returnvalue">Return Value
</h4>
1051 <p class=
"description">Number of options
</p>
1052 <h4 class=
"discussion">Discussion
</h4>
1053 <p class=
"discussion">New option arrays can be initialized simply by passing
0 for the
1054 "num_options
" parameter.
1057 <h3 class=
"function"><a id=
"cupsAddOption">cupsAddOption
</a></h3>
1058 <p class=
"description">Add an option to an option array.
</p>
1060 int cupsAddOption (
<br>
1061     const char *name,
<br>
1062     const char *value,
<br>
1063     int num_options,
<br>
1064     <a href=
"#cups_option_t">cups_option_t
</a> **options
<br>
1066 <h4 class=
"parameters">Parameters
</h4>
1069 <dd class=
"description">Name of option
</dd>
1071 <dd class=
"description">Value of option
</dd>
1072 <dt>num_options
</dt>
1073 <dd class=
"description">Number of options
</dd>
1075 <dd class=
"description">Pointer to options
</dd>
1077 <h4 class=
"returnvalue">Return Value
</h4>
1078 <p class=
"description">Number of options
</p>
1079 <h4 class=
"discussion">Discussion
</h4>
1080 <p class=
"discussion">New option arrays can be initialized simply by passing
0 for the
1081 "num_options
" parameter.
</p>
1082 <h3 class=
"function"><a id=
"cupsCancelDestJob">cupsCancelDestJob
</a></h3>
1083 <p class=
"description">Include necessary headers...
</p>
1085 ipp_status_t cupsCancelDestJob (
<br>
1086     <a href=
"#http_t">http_t
</a> *http,
<br>
1087     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1088     int job_id
<br>
1090 <h4 class=
"parameters">Parameters
</h4>
1093 <dd class=
"description">Connection to destination
</dd>
1095 <dd class=
"description">Destination
</dd>
1097 <dd class=
"description">Job ID
</dd>
1099 <h4 class=
"returnvalue">Return Value
</h4>
1100 <p class=
"description">Cancel a job on a destination.
</p>
1101 <p class=
"discussion">The
"job_id
" is the number returned by cupsCreateDestJob.
<br>
1103 Returns
<code>IPP_STATUS_OK
</code> on success and
1104 <code>IPP_STATUS_ERRPR_NOT_AUTHORIZED
</code> or
1105 <code>IPP_STATUS_ERROR_FORBIDDEN
</code> on failure.
1108 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsCheckDestSupported">cupsCheckDestSupported
</a></h3>
1109 <p class=
"description">Check that the option and value are supported
1110 by the destination.
</p>
1112 int cupsCheckDestSupported (
<br>
1113     <a href=
"#http_t">http_t
</a> *http,
<br>
1114     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1115     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
1116     const char *option,
<br>
1117     const char *value
<br>
1119 <h4 class=
"parameters">Parameters
</h4>
1122 <dd class=
"description">Connection to destination
</dd>
1124 <dd class=
"description">Destination
</dd>
1126 <dd class=
"description">Destination information
</dd>
1128 <dd class=
"description">Option
</dd>
1130 <dd class=
"description">Value
</dd>
1132 <h4 class=
"returnvalue">Return Value
</h4>
1133 <p class=
"description">1 if supported,
0 otherwise
</p>
1134 <h4 class=
"discussion">Discussion
</h4>
1135 <p class=
"discussion">Returns
1 if supported,
0 otherwise.
1138 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsCloseDestJob">cupsCloseDestJob
</a></h3>
1139 <p class=
"description">Close a job and start printing.
</p>
1141 ipp_status_t cupsCloseDestJob (
<br>
1142     <a href=
"#http_t">http_t
</a> *http,
<br>
1143     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1144     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *info,
<br>
1145     int job_id
<br>
1147 <h4 class=
"parameters">Parameters
</h4>
1150 <dd class=
"description">Connection to destination
</dd>
1152 <dd class=
"description">Destination
</dd>
1154 <dd class=
"description">Destination information
</dd>
1156 <dd class=
"description">Job ID
</dd>
1158 <h4 class=
"returnvalue">Return Value
</h4>
1159 <p class=
"description">IPP status code
</p>
1160 <h4 class=
"discussion">Discussion
</h4>
1161 <p class=
"discussion">Use when the last call to cupsStartDocument passed
0 for
"last_document
".
1162 "job_id
" is the job ID returned by cupsCreateDestJob. Returns
<code>IPP_STATUS_OK
</code>
1166 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsConnectDest">cupsConnectDest
</a></h3>
1167 <p class=
"description">Connect to the server for a destination.
</p>
1169 <a href=
"#http_t">http_t
</a> *cupsConnectDest (
<br>
1170     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1171     unsigned flags,
<br>
1172     int msec,
<br>
1173     int *cancel,
<br>
1174     char *resource,
<br>
1175     size_t resourcesize,
<br>
1176     <a href=
"#cups_dest_cb_t">cups_dest_cb_t
</a> cb,
<br>
1177     void *user_data
<br>
1179 <h4 class=
"parameters">Parameters
</h4>
1182 <dd class=
"description">Destination
</dd>
1184 <dd class=
"description">Connection flags
</dd>
1186 <dd class=
"description">Timeout in milliseconds
</dd>
1188 <dd class=
"description">Pointer to
"cancel
" variable
</dd>
1190 <dd class=
"description">Resource buffer
</dd>
1191 <dt>resourcesize
</dt>
1192 <dd class=
"description">Size of resource buffer
</dd>
1194 <dd class=
"description">Callback function
</dd>
1196 <dd class=
"description">User data pointer
</dd>
1198 <h4 class=
"returnvalue">Return Value
</h4>
1199 <p class=
"description">Connection to server or
<code>NULL
</code></p>
1200 <h4 class=
"discussion">Discussion
</h4>
1201 <p class=
"discussion">Connect to the destination, returning a new http_t connection object and
1202 optionally the resource path to use for the destination. These calls will
1203 block until a connection is made, the timeout expires, the integer pointed
1204 to by
"cancel
" is non-zero, or the callback function (or block) returns
0,
1205 The caller is responsible for calling httpClose() on the returned object.
1208 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsCopyDest">cupsCopyDest
</a></h3>
1209 <p class=
"description">Copy a destination.
</p>
1211 int cupsCopyDest (
<br>
1212     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1213     int num_dests,
<br>
1214     <a href=
"#cups_dest_t">cups_dest_t
</a> **dests
<br>
1216 <h4 class=
"parameters">Parameters
</h4>
1219 <dd class=
"description">Destination to copy
</dd>
1221 <dd class=
"description">Number of destinations
</dd>
1223 <dd class=
"description">Destination array
</dd>
1225 <h4 class=
"returnvalue">Return Value
</h4>
1226 <p class=
"description">New number of destinations
</p>
1227 <h4 class=
"discussion">Discussion
</h4>
1228 <p class=
"discussion">Make a copy of the destination to an array of destinations (or just a single
1229 copy) - for use with the cupsEnumDests* functions. The caller is responsible
1230 for calling cupsFreeDests() on the returned object(s).
1233 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsCopyDestConflicts">cupsCopyDestConflicts
</a></h3>
1234 <p class=
"description">Get conflicts and resolutions for a new
1235 option/value pair.
</p>
1237 int cupsCopyDestConflicts (
<br>
1238     <a href=
"#http_t">http_t
</a> *http,
<br>
1239     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1240     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
1241     int num_options,
<br>
1242     <a href=
"#cups_option_t">cups_option_t
</a> *options,
<br>
1243     const char *new_option,
<br>
1244     const char *new_value,
<br>
1245     int *num_conflicts,
<br>
1246     <a href=
"#cups_option_t">cups_option_t
</a> **conflicts,
<br>
1247     int *num_resolved,
<br>
1248     <a href=
"#cups_option_t">cups_option_t
</a> **resolved
<br>
1250 <h4 class=
"parameters">Parameters
</h4>
1253 <dd class=
"description">Connection to destination
</dd>
1255 <dd class=
"description">Destination
</dd>
1257 <dd class=
"description">Destination information
</dd>
1258 <dt>num_options
</dt>
1259 <dd class=
"description">Number of current options
</dd>
1261 <dd class=
"description">Current options
</dd>
1263 <dd class=
"description">New option
</dd>
1265 <dd class=
"description">New value
</dd>
1266 <dt>num_conflicts
</dt>
1267 <dd class=
"description">Number of conflicting options
</dd>
1269 <dd class=
"description">Conflicting options
</dd>
1270 <dt>num_resolved
</dt>
1271 <dd class=
"description">Number of options to resolve
</dd>
1273 <dd class=
"description">Resolved options
</dd>
1275 <h4 class=
"returnvalue">Return Value
</h4>
1276 <p class=
"description">1 if there is a conflict,
0 if none, -
1 on error
</p>
1277 <h4 class=
"discussion">Discussion
</h4>
1278 <p class=
"discussion">"num_options
" and
"options
" represent the currently selected options by the
1279 user.
"new_option
" and
"new_value
" are the setting the user has just
1282 Returns
1 if there is a conflict,
0 if there are no conflicts, and -
1 if
1283 there was an unrecoverable error such as a resolver loop.
<br>
1285 If
"num_conflicts
" and
"conflicts
" are not
<code>NULL
</code>, they are set to
1286 contain the list of conflicting option/value pairs. Similarly, if
1287 "num_resolved
" and
"resolved
" are not
<code>NULL
</code> they will be set to the
1288 list of changes needed to resolve the conflict.
<br>
1290 If cupsCopyDestConflicts returns
1 but
"num_resolved
" and
"resolved
" are set
1291 to
0 and
<code>NULL
</code>, respectively, then the conflict cannot be resolved.
1294 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsCopyDestInfo">cupsCopyDestInfo
</a></h3>
1295 <p class=
"description">Get the supported values/capabilities for the
1298 <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *cupsCopyDestInfo (
<br>
1299     <a href=
"#http_t">http_t
</a> *http,
<br>
1300     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest
<br>
1302 <h4 class=
"parameters">Parameters
</h4>
1305 <dd class=
"description">Connection to destination
</dd>
1307 <dd class=
"description">Destination
</dd>
1309 <h4 class=
"returnvalue">Return Value
</h4>
1310 <p class=
"description">Destination information
</p>
1311 <h4 class=
"discussion">Discussion
</h4>
1312 <p class=
"discussion">The caller is responsible for calling
<a href=
"#cupsFreeDestInfo"><code>cupsFreeDestInfo
</code></a> on the return
1313 value.
<code>NULL
</code> is returned on error.
1316 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsCreateDestJob">cupsCreateDestJob
</a></h3>
1317 <p class=
"description">Create a job on a destination.
</p>
1319 ipp_status_t cupsCreateDestJob (
<br>
1320     <a href=
"#http_t">http_t
</a> *http,
<br>
1321     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1322     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *info,
<br>
1323     int *job_id,
<br>
1324     const char *title,
<br>
1325     int num_options,
<br>
1326     <a href=
"#cups_option_t">cups_option_t
</a> *options
<br>
1328 <h4 class=
"parameters">Parameters
</h4>
1331 <dd class=
"description">Connection to destination
</dd>
1333 <dd class=
"description">Destination
</dd>
1335 <dd class=
"description">Destination information
</dd>
1337 <dd class=
"description">Job ID or
0 on error
</dd>
1339 <dd class=
"description">Job name
</dd>
1340 <dt>num_options
</dt>
1341 <dd class=
"description">Number of job options
</dd>
1343 <dd class=
"description">Job options
</dd>
1345 <h4 class=
"returnvalue">Return Value
</h4>
1346 <p class=
"description">IPP status code
</p>
1347 <h4 class=
"discussion">Discussion
</h4>
1348 <p class=
"discussion">Returns
<code>IPP_STATUS_OK
</code> or
<code>IPP_STATUS_OK_SUBST
</code> on success, saving the job ID
1349 in the variable pointed to by
"job_id
".
1352 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/macOS
10.4 </span><a id=
"cupsDoAuthentication">cupsDoAuthentication
</a></h3>
1353 <p class=
"description">Authenticate a request.
</p>
1355 int cupsDoAuthentication (
<br>
1356     <a href=
"#http_t">http_t
</a> *http,
<br>
1357     const char *method,
<br>
1358     const char *resource
<br>
1360 <h4 class=
"parameters">Parameters
</h4>
1363 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1365 <dd class=
"description">Request method (
"GET
",
"POST
",
"PUT
")
</dd>
1367 <dd class=
"description">Resource path
</dd>
1369 <h4 class=
"returnvalue">Return Value
</h4>
1370 <p class=
"description">0 on success, -
1 on error
</p>
1371 <h4 class=
"discussion">Discussion
</h4>
1372 <p class=
"discussion">This function should be called in response to a
<code>HTTP_STATUS_UNAUTHORIZED
</code>
1373 status, prior to resubmitting your request.
1376 <h3 class=
"function"><a id=
"cupsEncodeOptions">cupsEncodeOptions
</a></h3>
1377 <p class=
"description"></p>
1379 void cupsEncodeOptions (
<br>
1380     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
1381     int num_options,
<br>
1382     <a href=
"#cups_option_t">cups_option_t
</a> *options
<br>
1384 <h4 class=
"parameters">Parameters
</h4>
1387 <dd class=
"description">Request to add to
</dd>
1388 <dt>num_options
</dt>
1389 <dd class=
"description">Number of options
</dd>
1391 <dd class=
"description">Options
</dd>
1393 <h4 class=
"returnvalue">Return Value
</h4>
1394 <p class=
"description">Encode printer options into IPP attributes.
</p>
1395 <p class=
"discussion">This function adds operation, job, and then subscription attributes,
1396 in that order. Use the cupsEncodeOptions2() function to add attributes
1400 <h3 class=
"function"><a id=
"cupsEncodeOptions2">cupsEncodeOptions2
</a></h3>
1401 <p class=
"description">Add the options in the proper groups
& order...
</p>
1403 void cupsEncodeOptions2 (
<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>
1407     ipp_tag_t group_tag
<br>
1409 <h4 class=
"parameters">Parameters
</h4>
1412 <dd class=
"description">Request to add to
</dd>
1413 <dt>num_options
</dt>
1414 <dd class=
"description">Number of options
</dd>
1416 <dd class=
"description">Options
</dd>
1418 <dd class=
"description">Group to encode
</dd>
1420 <h4 class=
"returnvalue">Return Value
</h4>
1421 <p class=
"description">Encode printer options into IPP attributes for a group.
</p>
1422 <p class=
"discussion">This function only adds attributes for a single group. Call this
1423 function multiple times for each group, or use cupsEncodeOptions()
1424 to add the standard groups.
1427 <h3 class=
"function"><a id=
"cupsEncryption">cupsEncryption
</a></h3>
1428 <p class=
"description">Get the current encryption settings.
</p>
1430 <a href=
"#http_encryption_t">http_encryption_t
</a> cupsEncryption (void);
</p>
1431 <h4 class=
"returnvalue">Return Value
</h4>
1432 <p class=
"description">Encryption settings
</p>
1433 <h4 class=
"discussion">Discussion
</h4>
1434 <p class=
"discussion">The default encryption setting comes from the CUPS_ENCRYPTION
1435 environment variable, then the ~/.cups/client.conf file, and finally the
1436 /etc/cups/client.conf file. If not set, the default is
1437 <code>HTTP_ENCRYPTION_IF_REQUESTED
</code>.
<br>
1439 Note: The current encryption setting is tracked separately for each thread
1440 in a program. Multi-threaded programs that override the setting via the
1441 <a href=
"#cupsSetEncryption"><code>cupsSetEncryption
</code></a> function need to do so in each thread for the same
1442 setting to be used.
</p>
1443 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsEnumDests">cupsEnumDests
</a></h3>
1444 <p class=
"description">Enumerate available destinations with a callback function.
</p>
1446 int cupsEnumDests (
<br>
1447     unsigned flags,
<br>
1448     int msec,
<br>
1449     int *cancel,
<br>
1450     <a href=
"#cups_ptype_t">cups_ptype_t
</a> type,
<br>
1451     <a href=
"#cups_ptype_t">cups_ptype_t
</a> mask,
<br>
1452     <a href=
"#cups_dest_cb_t">cups_dest_cb_t
</a> cb,
<br>
1453     void *user_data
<br>
1455 <h4 class=
"parameters">Parameters
</h4>
1458 <dd class=
"description">Enumeration flags
</dd>
1460 <dd class=
"description">Timeout in milliseconds, -
1 for indefinite
</dd>
1462 <dd class=
"description">Pointer to
"cancel
" variable
</dd>
1464 <dd class=
"description">Printer type bits
</dd>
1466 <dd class=
"description">Mask for printer type bits
</dd>
1468 <dd class=
"description">Callback function
</dd>
1470 <dd class=
"description">User data
</dd>
1472 <h4 class=
"returnvalue">Return Value
</h4>
1473 <p class=
"description">1 on success,
0 on failure
</p>
1474 <h4 class=
"discussion">Discussion
</h4>
1475 <p class=
"discussion">Destinations are enumerated from one or more sources. The callback function
1476 receives the
<code>user_data
</code> pointer and the destination pointer which can
1477 be used as input to the
<a href=
"#cupsCopyDest"><code>cupsCopyDest
</code></a> function. The function must
1478 return
1 to continue enumeration or
0 to stop.
<br>
1480 The
<code>type
</code> and
<code>mask
</code> arguments allow the caller to filter the
1481 destinations that are enumerated. Passing
0 for both will enumerate all
1482 printers. The constant
<code>CUPS_PRINTER_DISCOVERED
</code> is used to filter on
1483 destinations that are available but have not yet been added locally.
<br>
1485 Enumeration happens on the current thread and does not return until all
1486 destinations have been enumerated or the callback function returns
0.
<br>
1488 Note: The callback function will likely receive multiple updates for the same
1489 destinations - it is up to the caller to suppress any duplicate destinations.
1492 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"cupsFindDestDefault">cupsFindDestDefault
</a></h3>
1493 <p class=
"description">Find the default value(s) for the given option.
</p>
1495 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *cupsFindDestDefault (
<br>
1496     <a href=
"#http_t">http_t
</a> *http,
<br>
1497     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1498     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
1499     const char *option
<br>
1501 <h4 class=
"parameters">Parameters
</h4>
1504 <dd class=
"description">Connection to destination
</dd>
1506 <dd class=
"description">Destination
</dd>
1508 <dd class=
"description">Destination information
</dd>
1510 <dd class=
"description">Option/attribute name
</dd>
1512 <h4 class=
"returnvalue">Return Value
</h4>
1513 <p class=
"description">Default attribute or
<code>NULL
</code> for none
</p>
1514 <h4 class=
"discussion">Discussion
</h4>
1515 <p class=
"discussion">The returned value is an IPP attribute. Use the
<code>ippGetBoolean
</code>,
1516 <code>ippGetCollection
</code>,
<code>ippGetCount
</code>,
<code>ippGetDate
</code>,
1517 <code>ippGetInteger
</code>,
<code>ippGetOctetString
</code>,
<code>ippGetRange
</code>,
1518 <code>ippGetResolution
</code>,
<code>ippGetString
</code>, and
<code>ippGetValueTag
</code>
1519 functions to inspect the default value(s) as needed.
1522 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"cupsFindDestReady">cupsFindDestReady
</a></h3>
1523 <p class=
"description">Find the default value(s) for the given option.
</p>
1525 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *cupsFindDestReady (
<br>
1526     <a href=
"#http_t">http_t
</a> *http,
<br>
1527     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1528     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
1529     const char *option
<br>
1531 <h4 class=
"parameters">Parameters
</h4>
1534 <dd class=
"description">Connection to destination
</dd>
1536 <dd class=
"description">Destination
</dd>
1538 <dd class=
"description">Destination information
</dd>
1540 <dd class=
"description">Option/attribute name
</dd>
1542 <h4 class=
"returnvalue">Return Value
</h4>
1543 <p class=
"description">Default attribute or
<code>NULL
</code> for none
</p>
1544 <h4 class=
"discussion">Discussion
</h4>
1545 <p class=
"discussion">The returned value is an IPP attribute. Use the
<code>ippGetBoolean
</code>,
1546 <code>ippGetCollection
</code>,
<code>ippGetCount
</code>,
<code>ippGetDate
</code>,
1547 <code>ippGetInteger
</code>,
<code>ippGetOctetString
</code>,
<code>ippGetRange
</code>,
1548 <code>ippGetResolution
</code>,
<code>ippGetString
</code>, and
<code>ippGetValueTag
</code>
1549 functions to inspect the default value(s) as needed.
1552 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"cupsFindDestSupported">cupsFindDestSupported
</a></h3>
1553 <p class=
"description">Find the default value(s) for the given option.
</p>
1555 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *cupsFindDestSupported (
<br>
1556     <a href=
"#http_t">http_t
</a> *http,
<br>
1557     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1558     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
1559     const char *option
<br>
1561 <h4 class=
"parameters">Parameters
</h4>
1564 <dd class=
"description">Connection to destination
</dd>
1566 <dd class=
"description">Destination
</dd>
1568 <dd class=
"description">Destination information
</dd>
1570 <dd class=
"description">Option/attribute name
</dd>
1572 <h4 class=
"returnvalue">Return Value
</h4>
1573 <p class=
"description">Default attribute or
<code>NULL
</code> for none
</p>
1574 <h4 class=
"discussion">Discussion
</h4>
1575 <p class=
"discussion">The returned value is an IPP attribute. Use the
<code>ippGetBoolean
</code>,
1576 <code>ippGetCollection
</code>,
<code>ippGetCount
</code>,
<code>ippGetDate
</code>,
1577 <code>ippGetInteger
</code>,
<code>ippGetOctetString
</code>,
<code>ippGetRange
</code>,
1578 <code>ippGetResolution
</code>,
<code>ippGetString
</code>, and
<code>ippGetValueTag
</code>
1579 functions to inspect the default value(s) as needed.
1582 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsFinishDestDocument">cupsFinishDestDocument
</a></h3>
1583 <p class=
"description">Finish the current document.
</p>
1585 ipp_status_t cupsFinishDestDocument (
<br>
1586     <a href=
"#http_t">http_t
</a> *http,
<br>
1587     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1588     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *info
<br>
1590 <h4 class=
"parameters">Parameters
</h4>
1593 <dd class=
"description">Connection to destination
</dd>
1595 <dd class=
"description">Destination
</dd>
1597 <dd class=
"description">Destination information
</dd>
1599 <h4 class=
"returnvalue">Return Value
</h4>
1600 <p class=
"description">Status of document submission
</p>
1601 <h4 class=
"discussion">Discussion
</h4>
1602 <p class=
"discussion">Returns
<code>IPP_STATUS_OK
</code> or
<code>IPP_STATUS_OK_SUBST
</code> on success.
1605 <h3 class=
"function"><a id=
"cupsFreeDestInfo">cupsFreeDestInfo
</a></h3>
1606 <p class=
"description">Find and return the attribute...
</p>
1608 void cupsFreeDestInfo (
<br>
1609     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo
<br>
1611 <h4 class=
"parameters">Parameters
</h4>
1614 <dd class=
"description">Destination information
</dd>
1616 <h4 class=
"returnvalue">Return Value
</h4>
1617 <p class=
"description">Free destination information obtained using
1618 <a href=
"#cupsCopyDestInfo"><code>cupsCopyDestInfo
</code></a>.
</p>
1619 <h3 class=
"function"><a id=
"cupsFreeDests">cupsFreeDests
</a></h3>
1620 <p class=
"description">Block
</p>
1622 void cupsFreeDests (
<br>
1623     int num_dests,
<br>
1624     <a href=
"#cups_dest_t">cups_dest_t
</a> *dests
<br>
1626 <h4 class=
"parameters">Parameters
</h4>
1629 <dd class=
"description">Number of destinations
</dd>
1631 <dd class=
"description">Destinations
</dd>
1633 <h4 class=
"returnvalue">Return Value
</h4>
1634 <p class=
"description">Free the memory used by the list of destinations.
</p>
1635 <h3 class=
"function"><a id=
"cupsFreeJobs">cupsFreeJobs
</a></h3>
1636 <p class=
"description">Printer resource
</p>
1638 void cupsFreeJobs (
<br>
1639     int num_jobs,
<br>
1640     <a href=
"#cups_job_t">cups_job_t
</a> *jobs
<br>
1642 <h4 class=
"parameters">Parameters
</h4>
1645 <dd class=
"description">Number of jobs
</dd>
1647 <dd class=
"description">Jobs
</dd>
1649 <h4 class=
"returnvalue">Return Value
</h4>
1650 <p class=
"description">Free memory used by job data.
</p>
1651 <h3 class=
"function"><a id=
"cupsFreeOptions">cupsFreeOptions
</a></h3>
1652 <p class=
"description">Match found; free the old value...
</p>
1654 void cupsFreeOptions (
<br>
1655     int num_options,
<br>
1656     <a href=
"#cups_option_t">cups_option_t
</a> *options
<br>
1658 <h4 class=
"parameters">Parameters
</h4>
1660 <dt>num_options
</dt>
1661 <dd class=
"description">Number of options
</dd>
1663 <dd class=
"description">Pointer to options
</dd>
1665 <h4 class=
"returnvalue">Return Value
</h4>
1666 <p class=
"description">Free all memory used by options.
</p>
1667 <h3 class=
"function"><a id=
"cupsGetDest">cupsGetDest
</a></h3>
1668 <p class=
"description">Get the named destination from the list.
</p>
1670 <a href=
"#cups_dest_t">cups_dest_t
</a> *cupsGetDest (
<br>
1671     const char *name,
<br>
1672     const char *instance,
<br>
1673     int num_dests,
<br>
1674     <a href=
"#cups_dest_t">cups_dest_t
</a> *dests
<br>
1676 <h4 class=
"parameters">Parameters
</h4>
1679 <dd class=
"description">Destination name or
<code>NULL
</code> for the default destination
</dd>
1681 <dd class=
"description">Instance name or
<code>NULL
</code></dd>
1683 <dd class=
"description">Number of destinations
</dd>
1685 <dd class=
"description">Destinations
</dd>
1687 <h4 class=
"returnvalue">Return Value
</h4>
1688 <p class=
"description">Destination pointer or
<code>NULL
</code></p>
1689 <h4 class=
"discussion">Discussion
</h4>
1690 <p class=
"discussion">Use the
<a href=
"#cupsGetDests"><code>cupsGetDests
</code></a> or
<a href=
"#cupsGetDests2"><code>cupsGetDests2
</code></a> functions to get a
1691 list of supported destinations for the current user.
</p>
1692 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"cupsGetDestMediaByIndex">cupsGetDestMediaByIndex
</a></h3>
1693 <p class=
"description">Get a media name, dimension, and margins for a
1696 int cupsGetDestMediaByIndex (
<br>
1697     <a href=
"#http_t">http_t
</a> *http,
<br>
1698     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1699     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
1700     int n,
<br>
1701     unsigned flags,
<br>
1702     <a href=
"#cups_size_t">cups_size_t
</a> *size
<br>
1704 <h4 class=
"parameters">Parameters
</h4>
1707 <dd class=
"description">Connection to destination
</dd>
1709 <dd class=
"description">Destination
</dd>
1711 <dd class=
"description">Destination information
</dd>
1713 <dd class=
"description">Media size number (
0-based)
</dd>
1715 <dd class=
"description">Media flags
</dd>
1717 <dd class=
"description">Media size information
</dd>
1719 <h4 class=
"returnvalue">Return Value
</h4>
1720 <p class=
"description">1 on success,
0 on failure
</p>
1721 <h4 class=
"discussion">Discussion
</h4>
1722 <p class=
"discussion">The
<code>flags
</code> parameter determines which set of media are indexed. For
1723 example, passing
<code>CUPS_MEDIA_FLAGS_BORDERLESS
</code> will get the Nth
1724 borderless size supported by the printer.
1727 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsGetDestMediaByName">cupsGetDestMediaByName
</a></h3>
1728 <p class=
"description">Get media names, dimensions, and margins.
</p>
1730 int cupsGetDestMediaByName (
<br>
1731     <a href=
"#http_t">http_t
</a> *http,
<br>
1732     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1733     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
1734     const char *media,
<br>
1735     unsigned flags,
<br>
1736     <a href=
"#cups_size_t">cups_size_t
</a> *size
<br>
1738 <h4 class=
"parameters">Parameters
</h4>
1741 <dd class=
"description">Connection to destination
</dd>
1743 <dd class=
"description">Destination
</dd>
1745 <dd class=
"description">Destination information
</dd>
1747 <dd class=
"description">Media name
</dd>
1749 <dd class=
"description">Media matching flags
</dd>
1751 <dd class=
"description">Media size information
</dd>
1753 <h4 class=
"returnvalue">Return Value
</h4>
1754 <p class=
"description">1 on match,
0 on failure
</p>
1755 <h4 class=
"discussion">Discussion
</h4>
1756 <p class=
"discussion">The
"media
" string is a PWG media name.
"Flags
" provides some matching
1757 guidance (multiple flags can be combined):
<br>
1759 CUPS_MEDIA_FLAGS_DEFAULT = find the closest size supported by the printer,
1760 CUPS_MEDIA_FLAGS_BORDERLESS = find a borderless size,
1761 CUPS_MEDIA_FLAGS_DUPLEX = find a size compatible with
2-sided printing,
1762 CUPS_MEDIA_FLAGS_EXACT = find an exact match for the size, and
1763 CUPS_MEDIA_FLAGS_READY = if the printer supports media sensing, find the
1764 size amongst the
"ready
" media.
<br>
1766 The matching result (if any) is returned in the
"cups_size_t
" structure.
<br>
1768 Returns
1 when there is a match and
0 if there is not a match.
1771 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsGetDestMediaBySize">cupsGetDestMediaBySize
</a></h3>
1772 <p class=
"description">Get media names, dimensions, and margins.
</p>
1774 int cupsGetDestMediaBySize (
<br>
1775     <a href=
"#http_t">http_t
</a> *http,
<br>
1776     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1777     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
1778     int width,
<br>
1779     int length,
<br>
1780     unsigned flags,
<br>
1781     <a href=
"#cups_size_t">cups_size_t
</a> *size
<br>
1783 <h4 class=
"parameters">Parameters
</h4>
1786 <dd class=
"description">Connection to destination
</dd>
1788 <dd class=
"description">Destination
</dd>
1790 <dd class=
"description">Destination information
</dd>
1792 <dd class=
"description">Media width in hundredths of
1795 <dd class=
"description">Media length in hundredths of
1798 <dd class=
"description">Media matching flags
</dd>
1800 <dd class=
"description">Media size information
</dd>
1802 <h4 class=
"returnvalue">Return Value
</h4>
1803 <p class=
"description">1 on match,
0 on failure
</p>
1804 <h4 class=
"discussion">Discussion
</h4>
1805 <p class=
"discussion">"Width
" and
"length
" are the dimensions in hundredths of millimeters.
1806 "Flags
" provides some matching guidance (multiple flags can be combined):
<br>
1808 CUPS_MEDIA_FLAGS_DEFAULT = find the closest size supported by the printer,
1809 CUPS_MEDIA_FLAGS_BORDERLESS = find a borderless size,
1810 CUPS_MEDIA_FLAGS_DUPLEX = find a size compatible with
2-sided printing,
1811 CUPS_MEDIA_FLAGS_EXACT = find an exact match for the size, and
1812 CUPS_MEDIA_FLAGS_READY = if the printer supports media sensing, find the
1813 size amongst the
"ready
" media.
<br>
1815 The matching result (if any) is returned in the
"cups_size_t
" structure.
<br>
1817 Returns
1 when there is a match and
0 if there is not a match.
1820 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"cupsGetDestMediaCount">cupsGetDestMediaCount
</a></h3>
1821 <p class=
"description">Get the number of sizes supported by a
1824 int cupsGetDestMediaCount (
<br>
1825     <a href=
"#http_t">http_t
</a> *http,
<br>
1826     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1827     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
1828     unsigned flags
<br>
1830 <h4 class=
"parameters">Parameters
</h4>
1833 <dd class=
"description">Connection to destination
</dd>
1835 <dd class=
"description">Destination
</dd>
1837 <dd class=
"description">Destination information
</dd>
1839 <dd class=
"description">Media flags
</dd>
1841 <h4 class=
"returnvalue">Return Value
</h4>
1842 <p class=
"description">Number of sizes
</p>
1843 <h4 class=
"discussion">Discussion
</h4>
1844 <p class=
"discussion">The
<code>flags
</code> parameter determines the set of media sizes that are
1845 counted. For example, passing
<code>CUPS_MEDIA_FLAGS_BORDERLESS
</code> will return
1846 the number of borderless sizes.
1849 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"cupsGetDestMediaDefault">cupsGetDestMediaDefault
</a></h3>
1850 <p class=
"description">Get the default size for a destination.
</p>
1852 int cupsGetDestMediaDefault (
<br>
1853     <a href=
"#http_t">http_t
</a> *http,
<br>
1854     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
1855     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
1856     unsigned flags,
<br>
1857     <a href=
"#cups_size_t">cups_size_t
</a> *size
<br>
1859 <h4 class=
"parameters">Parameters
</h4>
1862 <dd class=
"description">Connection to destination
</dd>
1864 <dd class=
"description">Destination
</dd>
1866 <dd class=
"description">Destination information
</dd>
1868 <dd class=
"description">Media flags
</dd>
1870 <dd class=
"description">Media size information
</dd>
1872 <h4 class=
"returnvalue">Return Value
</h4>
1873 <p class=
"description">1 on success,
0 on failure
</p>
1874 <h4 class=
"discussion">Discussion
</h4>
1875 <p class=
"discussion">The
<code>flags
</code> parameter determines which default size is returned. For
1876 example, passing
<code>CUPS_MEDIA_FLAGS_BORDERLESS
</code> will return the default
1877 borderless size, typically US Letter or A4, but sometimes
4x6 photo media.
1880 <h3 class=
"function"><span class=
"info"> CUPS
2.0/macOS
10.10 </span><a id=
"cupsGetDestWithURI">cupsGetDestWithURI
</a></h3>
1881 <p class=
"description">Get a destination associated with a URI.
</p>
1883 <a href=
"#cups_dest_t">cups_dest_t
</a> *cupsGetDestWithURI (
<br>
1884     const char *name,
<br>
1885     const char *uri
<br>
1887 <h4 class=
"parameters">Parameters
</h4>
1890 <dd class=
"description">Desired printer name or
<code>NULL
</code></dd>
1892 <dd class=
"description">URI for the printer
</dd>
1894 <h4 class=
"returnvalue">Return Value
</h4>
1895 <p class=
"description">Destination or
<code>NULL
</code></p>
1896 <h4 class=
"discussion">Discussion
</h4>
1897 <p class=
"discussion">"name
" is the desired name for the printer. If
<code>NULL
</code>, a name will be
1898 created using the URI.
<br>
1900 "uri
" is the
"ipp
" or
"ipps
" URI for the printer.
1903 <h3 class=
"function"><span class=
"info"> 2.2.4 </span><a id=
"cupsGetIntegerOption">cupsGetIntegerOption
</a></h3>
1904 <p class=
"description">Get an integer option value.
</p>
1906 int cupsGetIntegerOption (
<br>
1907     const char *name,
<br>
1908     int num_options,
<br>
1909     <a href=
"#cups_option_t">cups_option_t
</a> *options
<br>
1911 <h4 class=
"parameters">Parameters
</h4>
1914 <dd class=
"description">Name of option
</dd>
1915 <dt>num_options
</dt>
1916 <dd class=
"description">Number of options
</dd>
1918 <dd class=
"description">Options
</dd>
1920 <h4 class=
"returnvalue">Return Value
</h4>
1921 <p class=
"description">Option value or
<code>INT_MIN
</code></p>
1922 <h4 class=
"discussion">Discussion
</h4>
1923 <p class=
"discussion">INT_MIN is returned when the option does not exist, is not an integer, or
1924 exceeds the range of values for the
"int
" type.
1927 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/macOS
10.4 </span><a id=
"cupsGetJobs2">cupsGetJobs2
</a></h3>
1928 <p class=
"description">Get the jobs from the specified server.
</p>
1930 int cupsGetJobs2 (
<br>
1931     <a href=
"#http_t">http_t
</a> *http,
<br>
1932     <a href=
"#cups_job_t">cups_job_t
</a> **jobs,
<br>
1933     const char *name,
<br>
1934     int myjobs,
<br>
1935     int whichjobs
<br>
1937 <h4 class=
"parameters">Parameters
</h4>
1940 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1942 <dd class=
"description">Job data
</dd>
1944 <dd class=
"description"><code>NULL
</code> = all destinations, otherwise show jobs for named destination
</dd>
1946 <dd class=
"description">0 = all users,
1 = mine
</dd>
1948 <dd class=
"description"><code>CUPS_WHICHJOBS_ALL
</code>,
<code>CUPS_WHICHJOBS_ACTIVE
</code>, or
<code>CUPS_WHICHJOBS_COMPLETED
</code></dd>
1950 <h4 class=
"returnvalue">Return Value
</h4>
1951 <p class=
"description">Number of jobs
</p>
1952 <h4 class=
"discussion">Discussion
</h4>
1953 <p class=
"discussion">A
"whichjobs
" value of
<code>CUPS_WHICHJOBS_ALL
</code> returns all jobs regardless
1954 of state, while
<code>CUPS_WHICHJOBS_ACTIVE
</code> returns jobs that are
1955 pending, processing, or held and
<code>CUPS_WHICHJOBS_COMPLETED
</code> returns
1956 jobs that are stopped, canceled, aborted, or completed.
1959 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"cupsGetNamedDest">cupsGetNamedDest
</a></h3>
1960 <p class=
"description">Get options for the named destination.
</p>
1962 <a href=
"#cups_dest_t">cups_dest_t
</a> *cupsGetNamedDest (
<br>
1963     <a href=
"#http_t">http_t
</a> *http,
<br>
1964     const char *name,
<br>
1965     const char *instance
<br>
1967 <h4 class=
"parameters">Parameters
</h4>
1970 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1972 <dd class=
"description">Destination name or
<code>NULL
</code> for the default destination
</dd>
1974 <dd class=
"description">Instance name or
<code>NULL
</code></dd>
1976 <h4 class=
"returnvalue">Return Value
</h4>
1977 <p class=
"description">Destination or
<code>NULL
</code></p>
1978 <h4 class=
"discussion">Discussion
</h4>
1979 <p class=
"discussion">This function is optimized for retrieving a single destination and should
1980 be used instead of
<a href=
"#cupsGetDests"><code>cupsGetDests
</code></a> and
<a href=
"#cupsGetDest"><code>cupsGetDest
</code></a> when you either
1981 know the name of the destination or want to print to the default destination.
1982 If
<code>NULL
</code> is returned, the destination does not exist or there is no
1983 default destination.
<br>
1985 If
"http
" is
<code>CUPS_HTTP_DEFAULT
</code>, the connection to the default print
1986 server will be used.
<br>
1988 If
"name
" is
<code>NULL
</code>, the default printer for the current user will be
1991 The returned destination must be freed using
<a href=
"#cupsFreeDests"><code>cupsFreeDests
</code></a> with a
1992 "num_dests
" value of
1.
1995 <h3 class=
"function"><a id=
"cupsGetOption">cupsGetOption
</a></h3>
1996 <p class=
"description">Get an option value.
</p>
1998 const char *cupsGetOption (
<br>
1999     const char *name,
<br>
2000     int num_options,
<br>
2001     <a href=
"#cups_option_t">cups_option_t
</a> *options
<br>
2003 <h4 class=
"parameters">Parameters
</h4>
2006 <dd class=
"description">Name of option
</dd>
2007 <dt>num_options
</dt>
2008 <dd class=
"description">Number of options
</dd>
2010 <dd class=
"description">Options
</dd>
2012 <h4 class=
"returnvalue">Return Value
</h4>
2013 <p class=
"description">Option value or
<code>NULL
</code></p>
2014 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"cupsGetPassword2">cupsGetPassword2
</a></h3>
2015 <p class=
"description">Get a password from the user using the advanced
2016 password callback.
</p>
2018 const char *cupsGetPassword2 (
<br>
2019     const char *prompt,
<br>
2020     <a href=
"#http_t">http_t
</a> *http,
<br>
2021     const char *method,
<br>
2022     const char *resource
<br>
2024 <h4 class=
"parameters">Parameters
</h4>
2027 <dd class=
"description">Prompt string
</dd>
2029 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
2031 <dd class=
"description">Request method (
"GET
",
"POST
",
"PUT
")
</dd>
2033 <dd class=
"description">Resource path
</dd>
2035 <h4 class=
"returnvalue">Return Value
</h4>
2036 <p class=
"description">Password
</p>
2037 <h4 class=
"discussion">Discussion
</h4>
2038 <p class=
"discussion">Uses the current password callback function. Returns
<code>NULL
</code> if the
2039 user does not provide a password.
<br>
2041 Note: The current password callback function is tracked separately for each
2042 thread in a program. Multi-threaded programs that override the setting via
2043 the
<a href=
"#cupsSetPasswordCB"><code>cupsSetPasswordCB
</code></a> or
<a href=
"#cupsSetPasswordCB2"><code>cupsSetPasswordCB2
</code></a> functions need to
2044 do so in each thread for the same function to be used.
2047 <h3 class=
"function"><a id=
"cupsLangDefault">cupsLangDefault
</a></h3>
2048 <p class=
"description">Return the default language.
</p>
2050 <a href=
"#cups_lang_t">cups_lang_t
</a> *cupsLangDefault (void);
</p>
2051 <h4 class=
"returnvalue">Return Value
</h4>
2052 <p class=
"description">Language data
</p>
2053 <h3 class=
"function"><a id=
"cupsLangEncoding">cupsLangEncoding
</a></h3>
2054 <p class=
"description">Return the character encoding (us-ascii, etc.)
2055 for the given language.
</p>
2057 const char *cupsLangEncoding (
<br>
2058     <a href=
"#cups_lang_t">cups_lang_t
</a> *lang
<br>
2060 <h4 class=
"parameters">Parameters
</h4>
2063 <dd class=
"description">Language data
</dd>
2065 <h4 class=
"returnvalue">Return Value
</h4>
2066 <p class=
"description">Character encoding
</p>
2067 <h3 class=
"function"><a id=
"cupsLangFlush">cupsLangFlush
</a></h3>
2068 <p class=
"description">Language data
</p>
2070 void cupsLangFlush (void);
</p>
2071 <h4 class=
"returnvalue">Return Value
</h4>
2072 <p class=
"description">Flush all language data out of the cache.
</p>
2073 <h3 class=
"function"><a id=
"cupsLangFree">cupsLangFree
</a></h3>
2074 <p class=
"description">Then free the language structure itself...
</p>
2076 void cupsLangFree (
<br>
2077     <a href=
"#cups_lang_t">cups_lang_t
</a> *lang
<br>
2079 <h4 class=
"parameters">Parameters
</h4>
2082 <dd class=
"description">Language to free
</dd>
2084 <h4 class=
"returnvalue">Return Value
</h4>
2085 <p class=
"description">Free language data.
</p>
2086 <p class=
"discussion">This does not actually free anything; use
<a href=
"#cupsLangFlush"><code>cupsLangFlush
</code></a> for that.
</p>
2087 <h3 class=
"function"><a id=
"cupsLangGet">cupsLangGet
</a></h3>
2088 <p class=
"description">Get a language.
</p>
2090 <a href=
"#cups_lang_t">cups_lang_t
</a> *cupsLangGet (
<br>
2091     const char *language
<br>
2093 <h4 class=
"parameters">Parameters
</h4>
2096 <dd class=
"description">Language or locale
</dd>
2098 <h4 class=
"returnvalue">Return Value
</h4>
2099 <p class=
"description">Language data
</p>
2100 <h3 class=
"function"><span class=
"info"> CUPS
2.0/macOS
10.10 </span><a id=
"cupsLocalizeDestMedia">cupsLocalizeDestMedia
</a></h3>
2101 <p class=
"description">Get the localized string for a destination media
2104 const char *cupsLocalizeDestMedia (
<br>
2105     <a href=
"#http_t">http_t
</a> *http,
<br>
2106     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
2107     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
2108     unsigned flags,
<br>
2109     <a href=
"#cups_size_t">cups_size_t
</a> *size
<br>
2111 <h4 class=
"parameters">Parameters
</h4>
2114 <dd class=
"description">Connection to destination
</dd>
2116 <dd class=
"description">Destination
</dd>
2118 <dd class=
"description">Destination information
</dd>
2120 <dd class=
"description">Media flags
</dd>
2122 <dd class=
"description">Media size
</dd>
2124 <h4 class=
"returnvalue">Return Value
</h4>
2125 <p class=
"description">Localized string
</p>
2126 <h4 class=
"discussion">Discussion
</h4>
2127 <p class=
"discussion">The returned string is stored in the destination information and will become
2128 invalid if the destination information is deleted.
2131 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsLocalizeDestOption">cupsLocalizeDestOption
</a></h3>
2132 <p class=
"description">Get the localized string for a destination
2135 const char *cupsLocalizeDestOption (
<br>
2136     <a href=
"#http_t">http_t
</a> *http,
<br>
2137     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
2138     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
2139     const char *option
<br>
2141 <h4 class=
"parameters">Parameters
</h4>
2144 <dd class=
"description">Connection to destination
</dd>
2146 <dd class=
"description">Destination
</dd>
2148 <dd class=
"description">Destination information
</dd>
2150 <dd class=
"description">Option to localize
</dd>
2152 <h4 class=
"returnvalue">Return Value
</h4>
2153 <p class=
"description">Localized string
</p>
2154 <h4 class=
"discussion">Discussion
</h4>
2155 <p class=
"discussion">The returned string is stored in the destination information and will become
2156 invalid if the destination information is deleted.
2159 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsLocalizeDestValue">cupsLocalizeDestValue
</a></h3>
2160 <p class=
"description">Get the localized string for a destination
2161 option+value pair.
</p>
2163 const char *cupsLocalizeDestValue (
<br>
2164     <a href=
"#http_t">http_t
</a> *http,
<br>
2165     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
2166     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *dinfo,
<br>
2167     const char *option,
<br>
2168     const char *value
<br>
2170 <h4 class=
"parameters">Parameters
</h4>
2173 <dd class=
"description">Connection to destination
</dd>
2175 <dd class=
"description">Destination
</dd>
2177 <dd class=
"description">Destination information
</dd>
2179 <dd class=
"description">Option to localize
</dd>
2181 <dd class=
"description">Value to localize
</dd>
2183 <h4 class=
"returnvalue">Return Value
</h4>
2184 <p class=
"description">Localized string
</p>
2185 <h4 class=
"discussion">Discussion
</h4>
2186 <p class=
"discussion">The returned string is stored in the destination information and will become
2187 invalid if the destination information is deleted.
2190 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"cupsMakeServerCredentials">cupsMakeServerCredentials
</a></h3>
2191 <p class=
"description">Make a self-signed certificate and private key pair.
</p>
2193 int cupsMakeServerCredentials (
<br>
2194     const char *path,
<br>
2195     const char *common_name,
<br>
2196     int num_alt_names,
<br>
2197     const char **alt_names,
<br>
2198     time_t expiration_date
<br>
2200 <h4 class=
"parameters">Parameters
</h4>
2203 <dd class=
"description">Keychain path or
<code>NULL
</code> for default
</dd>
2204 <dt>common_name
</dt>
2205 <dd class=
"description">Common name
</dd>
2206 <dt>num_alt_names
</dt>
2207 <dd class=
"description">Number of subject alternate names
</dd>
2209 <dd class=
"description">Subject Alternate Names
</dd>
2210 <dt>expiration_date
</dt>
2211 <dd class=
"description">Expiration date
</dd>
2213 <h4 class=
"returnvalue">Return Value
</h4>
2214 <p class=
"description">1 on success,
0 on failure
</p>
2215 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"cupsNotifySubject">cupsNotifySubject
</a></h3>
2216 <p class=
"description">Return the subject for the given notification message.
</p>
2218 char *cupsNotifySubject (
<br>
2219     <a href=
"#cups_lang_t">cups_lang_t
</a> *lang,
<br>
2220     <a href=
"#ipp_t">ipp_t
</a> *event
<br>
2222 <h4 class=
"parameters">Parameters
</h4>
2225 <dd class=
"description">Language data
</dd>
2227 <dd class=
"description">Event data
</dd>
2229 <h4 class=
"returnvalue">Return Value
</h4>
2230 <p class=
"description">Subject string or
<code>NULL
</code></p>
2231 <h4 class=
"discussion">Discussion
</h4>
2232 <p class=
"discussion">The returned string must be freed by the caller using
<code>free
</code>.
2235 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"cupsNotifyText">cupsNotifyText
</a></h3>
2236 <p class=
"description">Return the text for the given notification message.
</p>
2238 char *cupsNotifyText (
<br>
2239     <a href=
"#cups_lang_t">cups_lang_t
</a> *lang,
<br>
2240     <a href=
"#ipp_t">ipp_t
</a> *event
<br>
2242 <h4 class=
"parameters">Parameters
</h4>
2245 <dd class=
"description">Language data
</dd>
2247 <dd class=
"description">Event data
</dd>
2249 <h4 class=
"returnvalue">Return Value
</h4>
2250 <p class=
"description">Message text or
<code>NULL
</code></p>
2251 <h4 class=
"discussion">Discussion
</h4>
2252 <p class=
"discussion">The returned string must be freed by the caller using
<code>free
</code>.
2255 <h3 class=
"function"><a id=
"cupsParseOptions">cupsParseOptions
</a></h3>
2256 <p class=
"description">Parse options from a command-line argument.
</p>
2258 int cupsParseOptions (
<br>
2259     const char *arg,
<br>
2260     int num_options,
<br>
2261     <a href=
"#cups_option_t">cups_option_t
</a> **options
<br>
2263 <h4 class=
"parameters">Parameters
</h4>
2266 <dd class=
"description">Argument to parse
</dd>
2267 <dt>num_options
</dt>
2268 <dd class=
"description">Number of options
</dd>
2270 <dd class=
"description">Options found
</dd>
2272 <h4 class=
"returnvalue">Return Value
</h4>
2273 <p class=
"description">Number of options found
</p>
2274 <h4 class=
"discussion">Discussion
</h4>
2275 <p class=
"discussion">This function converts space-delimited name/value pairs according
2276 to the PAPI text option ABNF specification. Collection values
2277 (
"name={a=... b=... c=...}
") are stored with the curley brackets
2278 intact - use
<code>cupsParseOptions
</code> on the value to extract the
2279 collection attributes.
</p>
2280 <h3 class=
"function"><span class=
"info"> CUPS
1.3/macOS
10.5 </span><a id=
"cupsRemoveDest">cupsRemoveDest
</a></h3>
2281 <p class=
"description">Remove a destination from the destination list.
</p>
2283 int cupsRemoveDest (
<br>
2284     const char *name,
<br>
2285     const char *instance,
<br>
2286     int num_dests,
<br>
2287     <a href=
"#cups_dest_t">cups_dest_t
</a> **dests
<br>
2289 <h4 class=
"parameters">Parameters
</h4>
2292 <dd class=
"description">Destination name
</dd>
2294 <dd class=
"description">Instance name or
<code>NULL
</code></dd>
2296 <dd class=
"description">Number of destinations
</dd>
2298 <dd class=
"description">Destinations
</dd>
2300 <h4 class=
"returnvalue">Return Value
</h4>
2301 <p class=
"description">New number of destinations
</p>
2302 <h4 class=
"discussion">Discussion
</h4>
2303 <p class=
"discussion">Removing a destination/instance does not delete the class or printer
2304 queue, merely the lpoptions for that destination/instance. Use the
2305 <a href=
"#cupsSetDests"><code>cupsSetDests
</code></a> or
<a href=
"#cupsSetDests2"><code>cupsSetDests2
</code></a> functions to save the new
2306 options for the user.
2309 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"cupsRemoveOption">cupsRemoveOption
</a></h3>
2310 <p class=
"description">Remove an option from an option array.
</p>
2312 int cupsRemoveOption (
<br>
2313     const char *name,
<br>
2314     int num_options,
<br>
2315     <a href=
"#cups_option_t">cups_option_t
</a> **options
<br>
2317 <h4 class=
"parameters">Parameters
</h4>
2320 <dd class=
"description">Option name
</dd>
2321 <dt>num_options
</dt>
2322 <dd class=
"description">Current number of options
</dd>
2324 <dd class=
"description">Options
</dd>
2326 <h4 class=
"returnvalue">Return Value
</h4>
2327 <p class=
"description">New number of options
</p>
2328 <h3 class=
"function"><a id=
"cupsServer">cupsServer
</a></h3>
2329 <p class=
"description">Return the hostname/address of the current server.
</p>
2331 const char *cupsServer (void);
</p>
2332 <h4 class=
"returnvalue">Return Value
</h4>
2333 <p class=
"description">Server name
</p>
2334 <h4 class=
"discussion">Discussion
</h4>
2335 <p class=
"discussion">The default server comes from the CUPS_SERVER environment variable, then the
2336 ~/.cups/client.conf file, and finally the /etc/cups/client.conf file. If not
2337 set, the default is the local system - either
"localhost
" or a domain socket
2340 The returned value can be a fully-qualified hostname, a numeric IPv4 or IPv6
2341 address, or a domain socket pathname.
<br>
2343 Note: The current server is tracked separately for each thread in a program.
2344 Multi-threaded programs that override the server via the
2345 <a href=
"#cupsSetServer"><code>cupsSetServer
</code></a> function need to do so in each thread for the same
2346 server to be used.
</p>
2347 <h3 class=
"function"><a id=
"cupsSetClientCertCB">cupsSetClientCertCB
</a></h3>
2348 <p class=
"description">Pointer to library globals
</p>
2350 void cupsSetClientCertCB (
<br>
2351     <a href=
"#cups_client_cert_cb_t">cups_client_cert_cb_t
</a> cb,
<br>
2352     void *user_data
<br>
2354 <h4 class=
"parameters">Parameters
</h4>
2357 <dd class=
"description">Callback function
</dd>
2359 <dd class=
"description">User data pointer
</dd>
2361 <h4 class=
"returnvalue">Return Value
</h4>
2362 <p class=
"description">Set the client certificate callback.
</p>
2363 <p class=
"discussion">Pass
<code>NULL
</code> to restore the default callback.
<br>
2365 Note: The current certificate callback is tracked separately for each thread
2366 in a program. Multi-threaded programs that override the callback need to do
2367 so in each thread for the same callback to be used.
2370 <h3 class=
"function"><span class=
"info"> CUPS
1.5/macOS
10.7 </span><a id=
"cupsSetCredentials">cupsSetCredentials
</a></h3>
2371 <p class=
"description">Set the default credentials to be used for SSL/TLS
2374 int cupsSetCredentials (
<br>
2375     cups_array_t *credentials
<br>
2377 <h4 class=
"parameters">Parameters
</h4>
2379 <dt>credentials
</dt>
2380 <dd class=
"description">Array of credentials
</dd>
2382 <h4 class=
"returnvalue">Return Value
</h4>
2383 <p class=
"description">Status of call (
0 = success)
</p>
2384 <h4 class=
"discussion">Discussion
</h4>
2385 <p class=
"discussion">Note: The default credentials are tracked separately for each thread in a
2386 program. Multi-threaded programs that override the setting need to do so in
2387 each thread for the same setting to be used.
2390 <h3 class=
"function"><a id=
"cupsSetDefaultDest">cupsSetDefaultDest
</a></h3>
2391 <p class=
"description">Remove the destination from the array...
</p>
2393 void cupsSetDefaultDest (
<br>
2394     const char *name,
<br>
2395     const char *instance,
<br>
2396     int num_dests,
<br>
2397     <a href=
"#cups_dest_t">cups_dest_t
</a> *dests
<br>
2399 <h4 class=
"parameters">Parameters
</h4>
2402 <dd class=
"description">Destination name
</dd>
2404 <dd class=
"description">Instance name or
<code>NULL
</code></dd>
2406 <dd class=
"description">Number of destinations
</dd>
2408 <dd class=
"description">Destinations
</dd>
2410 <h4 class=
"returnvalue">Return Value
</h4>
2411 <p class=
"description">Set the default destination.
</p>
2412 <p class=
"discussion"></p>
2413 <h3 class=
"function"><a id=
"cupsSetDests">cupsSetDests
</a></h3>
2414 <p class=
"description">Loop through the array and set the
"is_default
" flag for the matching
2417 void cupsSetDests (
<br>
2418     int num_dests,
<br>
2419     <a href=
"#cups_dest_t">cups_dest_t
</a> *dests
<br>
2421 <h4 class=
"parameters">Parameters
</h4>
2424 <dd class=
"description">Number of destinations
</dd>
2426 <dd class=
"description">Destinations
</dd>
2428 <h4 class=
"returnvalue">Return Value
</h4>
2429 <p class=
"description">Save the list of destinations for the default server.
</p>
2430 <p class=
"discussion">This function saves the destinations to /etc/cups/lpoptions when run
2431 as root and ~/.cups/lpoptions when run as a normal user.
</p>
2432 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/macOS
10.4 </span><a id=
"cupsSetDests2">cupsSetDests2
</a></h3>
2433 <p class=
"description">Save the list of destinations for the specified server.
</p>
2435 int cupsSetDests2 (
<br>
2436     <a href=
"#http_t">http_t
</a> *http,
<br>
2437     int num_dests,
<br>
2438     <a href=
"#cups_dest_t">cups_dest_t
</a> *dests
<br>
2440 <h4 class=
"parameters">Parameters
</h4>
2443 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
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">0 on success, -
1 on error
</p>
2451 <h4 class=
"discussion">Discussion
</h4>
2452 <p class=
"discussion">This function saves the destinations to /etc/cups/lpoptions when run
2453 as root and ~/.cups/lpoptions when run as a normal user.
2456 <h3 class=
"function"><a id=
"cupsSetEncryption">cupsSetEncryption
</a></h3>
2457 <p class=
"description">Pointer to library globals
</p>
2459 void cupsSetEncryption (
<br>
2460     <a href=
"#http_encryption_t">http_encryption_t
</a> e
<br>
2462 <h4 class=
"parameters">Parameters
</h4>
2465 <dd class=
"description">New encryption preference
</dd>
2467 <h4 class=
"returnvalue">Return Value
</h4>
2468 <p class=
"description">Set the encryption preference.
</p>
2469 <p class=
"discussion">The default encryption setting comes from the CUPS_ENCRYPTION
2470 environment variable, then the ~/.cups/client.conf file, and finally the
2471 /etc/cups/client.conf file. If not set, the default is
2472 <code>HTTP_ENCRYPTION_IF_REQUESTED
</code>.
<br>
2474 Note: The current encryption setting is tracked separately for each thread
2475 in a program. Multi-threaded programs that override the setting need to do
2476 so in each thread for the same setting to be used.
</p>
2477 <h3 class=
"function"><a id=
"cupsSetPasswordCB">cupsSetPasswordCB
</a></h3>
2478 <p class=
"description">Pointer to library globals
</p>
2480 void cupsSetPasswordCB (
<br>
2481     <a href=
"#cups_password_cb_t">cups_password_cb_t
</a> cb
<br>
2483 <h4 class=
"parameters">Parameters
</h4>
2486 <dd class=
"description">Callback function
</dd>
2488 <h4 class=
"returnvalue">Return Value
</h4>
2489 <p class=
"description">Set the password callback for CUPS.
</p>
2490 <p class=
"discussion">Pass
<code>NULL
</code> to restore the default (console) password callback, which
2491 reads the password from the console. Programs should call either this
2492 function or
<a href=
"#cupsSetPasswordCB2"><code>cupsSetPasswordCB2
</code></a>, as only one callback can be registered
2493 by a program per thread.
<br>
2495 Note: The current password callback is tracked separately for each thread
2496 in a program. Multi-threaded programs that override the callback need to do
2497 so in each thread for the same callback to be used.
2500 <h3 class=
"function"><a id=
"cupsSetPasswordCB2">cupsSetPasswordCB2
</a></h3>
2501 <p class=
"description">Pointer to library globals
</p>
2503 void cupsSetPasswordCB2 (
<br>
2504     <a href=
"#cups_password_cb2_t">cups_password_cb2_t
</a> cb,
<br>
2505     void *user_data
<br>
2507 <h4 class=
"parameters">Parameters
</h4>
2510 <dd class=
"description">Callback function
</dd>
2512 <dd class=
"description">User data pointer
</dd>
2514 <h4 class=
"returnvalue">Return Value
</h4>
2515 <p class=
"description">Set the advanced password callback for CUPS.
</p>
2516 <p class=
"discussion">Pass
<code>NULL
</code> to restore the default (console) password callback, which
2517 reads the password from the console. Programs should call either this
2518 function or
<a href=
"#cupsSetPasswordCB2"><code>cupsSetPasswordCB2
</code></a>, as only one callback can be registered
2519 by a program per thread.
<br>
2521 Note: The current password callback is tracked separately for each thread
2522 in a program. Multi-threaded programs that override the callback need to do
2523 so in each thread for the same callback to be used.
2526 <h3 class=
"function"><a id=
"cupsSetServer">cupsSetServer
</a></h3>
2527 <p class=
"description">Pointer to library globals
</p>
2529 void cupsSetServer (
<br>
2530     const char *server
<br>
2532 <h4 class=
"parameters">Parameters
</h4>
2535 <dd class=
"description">Server name
</dd>
2537 <h4 class=
"returnvalue">Return Value
</h4>
2538 <p class=
"description">Set the default server name and port.
</p>
2539 <p class=
"discussion">The
"server
" string can be a fully-qualified hostname, a numeric
2540 IPv4 or IPv6 address, or a domain socket pathname. Hostnames and numeric IP
2541 addresses can be optionally followed by a colon and port number to override
2542 the default port
631, e.g.
"hostname:
8631". Pass
<code>NULL
</code> to restore the
2543 default server name and port.
<br>
2545 Note: The current server is tracked separately for each thread in a program.
2546 Multi-threaded programs that override the server need to do so in each
2547 thread for the same server to be used.
</p>
2548 <h3 class=
"function"><a id=
"cupsSetServerCertCB">cupsSetServerCertCB
</a></h3>
2549 <p class=
"description">Pointer to library globals
</p>
2551 void cupsSetServerCertCB (
<br>
2552     <a href=
"#cups_server_cert_cb_t">cups_server_cert_cb_t
</a> cb,
<br>
2553     void *user_data
<br>
2555 <h4 class=
"parameters">Parameters
</h4>
2558 <dd class=
"description">Callback function
</dd>
2560 <dd class=
"description">User data pointer
</dd>
2562 <h4 class=
"returnvalue">Return Value
</h4>
2563 <p class=
"description">Set the server certificate callback.
</p>
2564 <p class=
"discussion">Pass
<code>NULL
</code> to restore the default callback.
<br>
2566 Note: The current credentials callback is tracked separately for each thread
2567 in a program. Multi-threaded programs that override the callback need to do
2568 so in each thread for the same callback to be used.
2571 <h3 class=
"function"><span class=
"info"> CUPS
2.0/macOS
10.10 </span><a id=
"cupsSetServerCredentials">cupsSetServerCredentials
</a></h3>
2572 <p class=
"description">Set the default server credentials.
</p>
2574 int cupsSetServerCredentials (
<br>
2575     const char *path,
<br>
2576     const char *common_name,
<br>
2577     int auto_create
<br>
2579 <h4 class=
"parameters">Parameters
</h4>
2582 <dd class=
"description">Keychain path or
<code>NULL
</code> for default
</dd>
2583 <dt>common_name
</dt>
2584 <dd class=
"description">Default common name for server
</dd>
2585 <dt>auto_create
</dt>
2586 <dd class=
"description">1 = automatically create self-signed certificates
</dd>
2588 <h4 class=
"returnvalue">Return Value
</h4>
2589 <p class=
"description">1 on success,
0 on failure
</p>
2590 <h4 class=
"discussion">Discussion
</h4>
2591 <p class=
"discussion">Note: The server credentials are used by all threads in the running process.
2592 This function is threadsafe.
2595 <h3 class=
"function"><a id=
"cupsSetUser">cupsSetUser
</a></h3>
2596 <p class=
"description">Pointer to library globals
</p>
2598 void cupsSetUser (
<br>
2599     const char *user
<br>
2601 <h4 class=
"parameters">Parameters
</h4>
2604 <dd class=
"description">User name
</dd>
2606 <h4 class=
"returnvalue">Return Value
</h4>
2607 <p class=
"description">Set the default user name.
</p>
2608 <p class=
"discussion">Pass
<code>NULL
</code> to restore the default user name.
<br>
2610 Note: The current user name is tracked separately for each thread in a
2611 program. Multi-threaded programs that override the user name need to do so
2612 in each thread for the same user name to be used.
</p>
2613 <h3 class=
"function"><a id=
"cupsSetUserAgent">cupsSetUserAgent
</a></h3>
2614 <p class=
"description">Pointer to library globals
</p>
2616 void cupsSetUserAgent (
<br>
2617     const char *user_agent
<br>
2619 <h4 class=
"parameters">Parameters
</h4>
2622 <dd class=
"description">User-Agent string or
<code>NULL
</code></dd>
2624 <h4 class=
"returnvalue">Return Value
</h4>
2625 <p class=
"description">Set the default HTTP User-Agent string.
</p>
2626 <p class=
"discussion">Setting the string to NULL forces the default value containing the CUPS
2627 version, IPP version, and operating system version and architecture.
2630 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cupsStartDestDocument">cupsStartDestDocument
</a></h3>
2631 <p class=
"description">Start a new document.
</p>
2633 http_status_t cupsStartDestDocument (
<br>
2634     <a href=
"#http_t">http_t
</a> *http,
<br>
2635     <a href=
"#cups_dest_t">cups_dest_t
</a> *dest,
<br>
2636     <a href=
"#cups_dinfo_t">cups_dinfo_t
</a> *info,
<br>
2637     int job_id,
<br>
2638     const char *docname,
<br>
2639     const char *format,
<br>
2640     int num_options,
<br>
2641     <a href=
"#cups_option_t">cups_option_t
</a> *options,
<br>
2642     int last_document
<br>
2644 <h4 class=
"parameters">Parameters
</h4>
2647 <dd class=
"description">Connection to destination
</dd>
2649 <dd class=
"description">Destination
</dd>
2651 <dd class=
"description">Destination information
</dd>
2653 <dd class=
"description">Job ID
</dd>
2655 <dd class=
"description">Document name
</dd>
2657 <dd class=
"description">Document format
</dd>
2658 <dt>num_options
</dt>
2659 <dd class=
"description">Number of document options
</dd>
2661 <dd class=
"description">Document options
</dd>
2662 <dt>last_document
</dt>
2663 <dd class=
"description">1 if this is the last document
</dd>
2665 <h4 class=
"returnvalue">Return Value
</h4>
2666 <p class=
"description">Status of document creation
</p>
2667 <h4 class=
"discussion">Discussion
</h4>
2668 <p class=
"discussion">"job_id
" is the job ID returned by cupsCreateDestJob.
"docname
" is the name
2669 of the document/file being printed,
"format
" is the MIME media type for the
2670 document (see CUPS_FORMAT_xxx constants), and
"num_options
" and
"options
"
2671 are the options do be applied to the document.
"last_document
" should be
1
2672 if this is the last document to be submitted in the job. Returns
2673 <code>HTTP_CONTINUE
</code> on success.
2676 <h3 class=
"function"><a id=
"cupsUser">cupsUser
</a></h3>
2677 <p class=
"description">Return the current user's name.
</p>
2679 const char *cupsUser (void);
</p>
2680 <h4 class=
"returnvalue">Return Value
</h4>
2681 <p class=
"description">User name
</p>
2682 <h4 class=
"discussion">Discussion
</h4>
2683 <p class=
"discussion">Note: The current user name is tracked separately for each thread in a
2684 program. Multi-threaded programs that override the user name with the
2685 <a href=
"#cupsSetUser"><code>cupsSetUser
</code></a> function need to do so in each thread for the same user
2686 name to be used.
</p>
2687 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"cupsUserAgent">cupsUserAgent
</a></h3>
2688 <p class=
"description">Return the default HTTP User-Agent string.
</p>
2690 const char *cupsUserAgent (void);
</p>
2691 <h4 class=
"returnvalue">Return Value
</h4>
2692 <p class=
"description">User-Agent string
</p>
2693 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpAcceptConnection">httpAcceptConnection
</a></h3>
2694 <p class=
"description">Accept a new HTTP client connection from the
2695 specified listening socket.
</p>
2697 <a href=
"#http_t">http_t
</a> *httpAcceptConnection (
<br>
2698     int fd,
<br>
2699     int blocking
<br>
2701 <h4 class=
"parameters">Parameters
</h4>
2704 <dd class=
"description">Listen socket file descriptor
</dd>
2706 <dd class=
"description">1 if the connection should be
2707 blocking,
0 otherwise
</dd>
2709 <h4 class=
"returnvalue">Return Value
</h4>
2710 <p class=
"description">HTTP connection or
<code>NULL
</code></p>
2711 <h3 class=
"function"><span class=
"info"> CUPS
1.5/macOS
10.7 </span><a id=
"httpAddCredential">httpAddCredential
</a></h3>
2712 <p class=
"description">Allocates and adds a single credential to an array.
</p>
2714 int httpAddCredential (
<br>
2715     cups_array_t *credentials,
<br>
2716     const void *data,
<br>
2717     size_t datalen
<br>
2719 <h4 class=
"parameters">Parameters
</h4>
2721 <dt>credentials
</dt>
2722 <dd class=
"description">Credentials array
</dd>
2724 <dd class=
"description">PEM-encoded X
.509 data
</dd>
2726 <dd class=
"description">Length of data
</dd>
2728 <h4 class=
"returnvalue">Return Value
</h4>
2729 <p class=
"description">0 on success, -
1 on error
</p>
2730 <h4 class=
"discussion">Discussion
</h4>
2731 <p class=
"discussion">Use
<code>cupsArrayNew(NULL, NULL)
</code> to create a credentials array.
2734 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAddrAny">httpAddrAny
</a></h3>
2735 <p class=
"description">Check for the
"any
" address.
</p>
2737 int httpAddrAny (
<br>
2738     const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
2740 <h4 class=
"parameters">Parameters
</h4>
2743 <dd class=
"description">Address to check
</dd>
2745 <h4 class=
"returnvalue">Return Value
</h4>
2746 <p class=
"description">1 if
"any
",
0 otherwise
</p>
2747 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpAddrClose">httpAddrClose
</a></h3>
2748 <p class=
"description">Close a socket created by
<a href=
"#httpAddrConnect"><code>httpAddrConnect
</code></a> or
2749 <a href=
"#httpAddrListen"><code>httpAddrListen
</code></a>.
</p>
2751 int httpAddrClose (
<br>
2752     <a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
2753     int fd
<br>
2755 <h4 class=
"parameters">Parameters
</h4>
2758 <dd class=
"description">Listen address or
<code>NULL
</code></dd>
2760 <dd class=
"description">Socket file descriptor
</dd>
2762 <h4 class=
"returnvalue">Return Value
</h4>
2763 <p class=
"description">0 on success, -
1 on failure
</p>
2764 <h4 class=
"discussion">Discussion
</h4>
2765 <p class=
"discussion">Pass
<code>NULL
</code> for sockets created with
<a href=
"#httpAddrConnect"><code>httpAddrConnect
</code></a> and the
2766 listen address for sockets created with
<a href=
"#httpAddrListen"><code>httpAddrListen
</code></a>. This will
2767 ensure that domain sockets are removed when closed.
2770 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpAddrConnect2">httpAddrConnect2
</a></h3>
2771 <p class=
"description">Connect to any of the addresses in the list with a
2772 timeout and optional cancel.
</p>
2774 <a href=
"#http_addrlist_t">http_addrlist_t
</a> *httpAddrConnect2 (
<br>
2775     <a href=
"#http_addrlist_t">http_addrlist_t
</a> *addrlist,
<br>
2776     int *sock,
<br>
2777     int msec,
<br>
2778     int *cancel
<br>
2780 <h4 class=
"parameters">Parameters
</h4>
2783 <dd class=
"description">List of potential addresses
</dd>
2785 <dd class=
"description">Socket
</dd>
2787 <dd class=
"description">Timeout in milliseconds
</dd>
2789 <dd class=
"description">Pointer to
"cancel
" variable
</dd>
2791 <h4 class=
"returnvalue">Return Value
</h4>
2792 <p class=
"description">Connected address or NULL on failure
</p>
2793 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpAddrCopyList">httpAddrCopyList
</a></h3>
2794 <p class=
"description">Copy an address list.
</p>
2796 <a href=
"#http_addrlist_t">http_addrlist_t
</a> *httpAddrCopyList (
<br>
2797     <a href=
"#http_addrlist_t">http_addrlist_t
</a> *src
<br>
2799 <h4 class=
"parameters">Parameters
</h4>
2802 <dd class=
"description">Source address list
</dd>
2804 <h4 class=
"returnvalue">Return Value
</h4>
2805 <p class=
"description">New address list or
<code>NULL
</code> on error
</p>
2806 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAddrEqual">httpAddrEqual
</a></h3>
2807 <p class=
"description">Compare two addresses.
</p>
2809 int httpAddrEqual (
<br>
2810     const
<a href=
"#http_addr_t">http_addr_t
</a> *addr1,
<br>
2811     const
<a href=
"#http_addr_t">http_addr_t
</a> *addr2
<br>
2813 <h4 class=
"parameters">Parameters
</h4>
2816 <dd class=
"description">First address
</dd>
2818 <dd class=
"description">Second address
</dd>
2820 <h4 class=
"returnvalue">Return Value
</h4>
2821 <p class=
"description">1 if equal,
0 if not
</p>
2822 <h3 class=
"function"><a id=
"httpAddrFamily">httpAddrFamily
</a></h3>
2823 <p class=
"description">Get the address family of an address.
</p>
2825 int httpAddrFamily (
<br>
2826     <a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
2828 <h4 class=
"parameters">Parameters
</h4>
2831 <dd class=
"description">Address
</dd>
2833 <h4 class=
"returnvalue">Return Value
</h4>
2834 <p class=
"description">Address family
</p>
2835 <h3 class=
"function"><a id=
"httpAddrFreeList">httpAddrFreeList
</a></h3>
2836 <p class=
"description">Current list entry
</p>
2838 void httpAddrFreeList (
<br>
2839     <a href=
"#http_addrlist_t">http_addrlist_t
</a> *addrlist
<br>
2841 <h4 class=
"parameters">Parameters
</h4>
2844 <dd class=
"description">Address list to free
</dd>
2846 <h4 class=
"returnvalue">Return Value
</h4>
2847 <p class=
"description">Free an address list.
</p>
2848 <p class=
"discussion"></p>
2849 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAddrGetList">httpAddrGetList
</a></h3>
2850 <p class=
"description">Get a list of addresses for a hostname.
</p>
2852 <a href=
"#http_addrlist_t">http_addrlist_t
</a> *httpAddrGetList (
<br>
2853     const char *hostname,
<br>
2854     int family,
<br>
2855     const char *service
<br>
2857 <h4 class=
"parameters">Parameters
</h4>
2860 <dd class=
"description">Hostname, IP address, or NULL for passive listen address
</dd>
2862 <dd class=
"description">Address family or AF_UNSPEC
</dd>
2864 <dd class=
"description">Service name or port number
</dd>
2866 <h4 class=
"returnvalue">Return Value
</h4>
2867 <p class=
"description">List of addresses or NULL
</p>
2868 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAddrLength">httpAddrLength
</a></h3>
2869 <p class=
"description">Return the length of the address in bytes.
</p>
2871 int httpAddrLength (
<br>
2872     const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
2874 <h4 class=
"parameters">Parameters
</h4>
2877 <dd class=
"description">Address
</dd>
2879 <h4 class=
"returnvalue">Return Value
</h4>
2880 <p class=
"description">Length in bytes
</p>
2881 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpAddrListen">httpAddrListen
</a></h3>
2882 <p class=
"description">Create a listening socket bound to the specified
2883 address and port.
</p>
2885 int httpAddrListen (
<br>
2886     <a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
2887     int port
<br>
2889 <h4 class=
"parameters">Parameters
</h4>
2892 <dd class=
"description">Address to bind to
</dd>
2894 <dd class=
"description">Port number to bind to
</dd>
2896 <h4 class=
"returnvalue">Return Value
</h4>
2897 <p class=
"description">Socket or -
1 on error
</p>
2898 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAddrLocalhost">httpAddrLocalhost
</a></h3>
2899 <p class=
"description">Check for the local loopback address.
</p>
2901 int httpAddrLocalhost (
<br>
2902     const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
2904 <h4 class=
"parameters">Parameters
</h4>
2907 <dd class=
"description">Address to check
</dd>
2909 <h4 class=
"returnvalue">Return Value
</h4>
2910 <p class=
"description">1 if local host,
0 otherwise
</p>
2911 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAddrLookup">httpAddrLookup
</a></h3>
2912 <p class=
"description">Lookup the hostname associated with the address.
</p>
2914 char *httpAddrLookup (
<br>
2915     const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
2916     char *name,
<br>
2917     int namelen
<br>
2919 <h4 class=
"parameters">Parameters
</h4>
2922 <dd class=
"description">Address to lookup
</dd>
2924 <dd class=
"description">Host name buffer
</dd>
2926 <dd class=
"description">Size of name buffer
</dd>
2928 <h4 class=
"returnvalue">Return Value
</h4>
2929 <p class=
"description">Host name
</p>
2930 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpAddrPort">httpAddrPort
</a></h3>
2931 <p class=
"description">Get the port number associated with an address.
</p>
2933 int httpAddrPort (
<br>
2934     <a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
2936 <h4 class=
"parameters">Parameters
</h4>
2939 <dd class=
"description">Address
</dd>
2941 <h4 class=
"returnvalue">Return Value
</h4>
2942 <p class=
"description">Port number
</p>
2943 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAddrString">httpAddrString
</a></h3>
2944 <p class=
"description">Convert an address to a numeric string.
</p>
2946 char *httpAddrString (
<br>
2947     const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
2948     char *s,
<br>
2949     int slen
<br>
2951 <h4 class=
"parameters">Parameters
</h4>
2954 <dd class=
"description">Address to convert
</dd>
2956 <dd class=
"description">String buffer
</dd>
2958 <dd class=
"description">Length of string
</dd>
2960 <h4 class=
"returnvalue">Return Value
</h4>
2961 <p class=
"description">Numeric address string
</p>
2962 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAssembleURI">httpAssembleURI
</a></h3>
2963 <p class=
"description">Assemble a uniform resource identifier from its
2966 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpAssembleURI (
<br>
2967     <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> encoding,
<br>
2968     char *uri,
<br>
2969     int urilen,
<br>
2970     const char *scheme,
<br>
2971     const char *username,
<br>
2972     const char *host,
<br>
2973     int port,
<br>
2974     const char *resource
<br>
2976 <h4 class=
"parameters">Parameters
</h4>
2979 <dd class=
"description">Encoding flags
</dd>
2981 <dd class=
"description">URI buffer
</dd>
2983 <dd class=
"description">Size of URI buffer
</dd>
2985 <dd class=
"description">Scheme name
</dd>
2987 <dd class=
"description">Username
</dd>
2989 <dd class=
"description">Hostname or address
</dd>
2991 <dd class=
"description">Port number
</dd>
2993 <dd class=
"description">Resource
</dd>
2995 <h4 class=
"returnvalue">Return Value
</h4>
2996 <p class=
"description">URI status
</p>
2997 <h4 class=
"discussion">Discussion
</h4>
2998 <p class=
"discussion">This function escapes reserved characters in the URI depending on the
2999 value of the
"encoding
" argument. You should use this function in
3000 place of traditional string functions whenever you need to create a
3004 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAssembleURIf">httpAssembleURIf
</a></h3>
3005 <p class=
"description">Assemble a uniform resource identifier from its
3006 components with a formatted resource.
</p>
3008 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpAssembleURIf (
<br>
3009     <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> encoding,
<br>
3010     char *uri,
<br>
3011     int urilen,
<br>
3012     const char *scheme,
<br>
3013     const char *username,
<br>
3014     const char *host,
<br>
3015     int port,
<br>
3016     const char *resourcef,
<br>
3017     ...
<br>
3019 <h4 class=
"parameters">Parameters
</h4>
3022 <dd class=
"description">Encoding flags
</dd>
3024 <dd class=
"description">URI buffer
</dd>
3026 <dd class=
"description">Size of URI buffer
</dd>
3028 <dd class=
"description">Scheme name
</dd>
3030 <dd class=
"description">Username
</dd>
3032 <dd class=
"description">Hostname or address
</dd>
3034 <dd class=
"description">Port number
</dd>
3036 <dd class=
"description">Printf-style resource
</dd>
3038 <dd class=
"description">Additional arguments as needed
</dd>
3040 <h4 class=
"returnvalue">Return Value
</h4>
3041 <p class=
"description">URI status
</p>
3042 <h4 class=
"discussion">Discussion
</h4>
3043 <p class=
"discussion">This function creates a formatted version of the resource string
3044 argument
"resourcef
" and escapes reserved characters in the URI
3045 depending on the value of the
"encoding
" argument. You should use
3046 this function in place of traditional string functions whenever
3047 you need to create a URI string.
3050 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpAssembleUUID">httpAssembleUUID
</a></h3>
3051 <p class=
"description">Assemble a name-based UUID URN conforming to RFC
4122.
</p>
3053 char *httpAssembleUUID (
<br>
3054     const char *server,
<br>
3055     int port,
<br>
3056     const char *name,
<br>
3057     int number,
<br>
3058     char *buffer,
<br>
3059     size_t bufsize
<br>
3061 <h4 class=
"parameters">Parameters
</h4>
3064 <dd class=
"description">Server name
</dd>
3066 <dd class=
"description">Port number
</dd>
3068 <dd class=
"description">Object name or NULL
</dd>
3070 <dd class=
"description">Object number or
0</dd>
3072 <dd class=
"description">String buffer
</dd>
3074 <dd class=
"description">Size of buffer
</dd>
3076 <h4 class=
"returnvalue">Return Value
</h4>
3077 <p class=
"description">UUID string
</p>
3078 <h4 class=
"discussion">Discussion
</h4>
3079 <p class=
"discussion">This function creates a unique
128-bit identifying number using the server
3080 name, port number, random data, and optionally an object name and/or object
3081 number. The result is formatted as a UUID URN as defined in RFC
4122.
<br>
3083 The buffer needs to be at least
46 bytes in size.
3086 <h3 class=
"function"><a id=
"httpBlocking">httpBlocking
</a></h3>
3087 <p class=
"description">Credential data
</p>
3089 void httpBlocking (
<br>
3090     <a href=
"#http_t">http_t
</a> *http,
<br>
3091     int b
<br>
3093 <h4 class=
"parameters">Parameters
</h4>
3096 <dd class=
"description">HTTP connection
</dd>
3098 <dd class=
"description">1 = blocking,
0 = non-blocking
</dd>
3100 <h4 class=
"returnvalue">Return Value
</h4>
3101 <p class=
"description">Set blocking/non-blocking behavior on a connection.
</p>
3102 <h3 class=
"function"><a id=
"httpCheck">httpCheck
</a></h3>
3103 <p class=
"description">Check to see if there is a pending response from the server.
</p>
3106     <a href=
"#http_t">http_t
</a> *http
<br>
3108 <h4 class=
"parameters">Parameters
</h4>
3111 <dd class=
"description">HTTP connection
</dd>
3113 <h4 class=
"returnvalue">Return Value
</h4>
3114 <p class=
"description">0 = no data,
1 = data available
</p>
3115 <h3 class=
"function"><a id=
"httpClearCookie">httpClearCookie
</a></h3>
3116 <p class=
"description">HTTP connection
</p>
3118 void httpClearCookie (
<br>
3119     <a href=
"#http_t">http_t
</a> *http
<br>
3121 <h4 class=
"parameters">Parameters
</h4>
3124 <dd class=
"description">HTTP connection
</dd>
3126 <h4 class=
"returnvalue">Return Value
</h4>
3127 <p class=
"description">Clear the cookie value(s).
</p>
3128 <p class=
"discussion"></p>
3129 <h3 class=
"function"><a id=
"httpClearFields">httpClearFields
</a></h3>
3130 <p class=
"description">HTTP connection
</p>
3132 void httpClearFields (
<br>
3133     <a href=
"#http_t">http_t
</a> *http
<br>
3135 <h4 class=
"parameters">Parameters
</h4>
3138 <dd class=
"description">HTTP connection
</dd>
3140 <h4 class=
"returnvalue">Return Value
</h4>
3141 <p class=
"description">Clear HTTP request fields.
</p>
3142 <h3 class=
"function"><a id=
"httpClose">httpClose
</a></h3>
3143 <p class=
"description">HTTP connection
</p>
3145 void httpClose (
<br>
3146     <a href=
"#http_t">http_t
</a> *http
<br>
3148 <h4 class=
"parameters">Parameters
</h4>
3151 <dd class=
"description">HTTP connection
</dd>
3153 <h4 class=
"returnvalue">Return Value
</h4>
3154 <p class=
"description">Close an HTTP connection.
</p>
3155 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpCompareCredentials">httpCompareCredentials
</a></h3>
3156 <p class=
"description">Compare two sets of X
.509 credentials.
</p>
3158 int httpCompareCredentials (
<br>
3159     cups_array_t *cred1,
<br>
3160     cups_array_t *cred2
<br>
3162 <h4 class=
"parameters">Parameters
</h4>
3165 <dd class=
"description">First set of X
.509 credentials
</dd>
3167 <dd class=
"description">Second set of X
.509 credentials
</dd>
3169 <h4 class=
"returnvalue">Return Value
</h4>
3170 <p class=
"description">1 if they match,
0 if they do not
</p>
3171 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpConnect2">httpConnect2
</a></h3>
3172 <p class=
"description">Connect to a HTTP server.
</p>
3174 <a href=
"#http_t">http_t
</a> *httpConnect2 (
<br>
3175     const char *host,
<br>
3176     int port,
<br>
3177     <a href=
"#http_addrlist_t">http_addrlist_t
</a> *addrlist,
<br>
3178     int family,
<br>
3179     <a href=
"#http_encryption_t">http_encryption_t
</a> encryption,
<br>
3180     int blocking,
<br>
3181     int msec,
<br>
3182     int *cancel
<br>
3184 <h4 class=
"parameters">Parameters
</h4>
3187 <dd class=
"description">Host to connect to
</dd>
3189 <dd class=
"description">Port number
</dd>
3191 <dd class=
"description">List of addresses or NULL to lookup
</dd>
3193 <dd class=
"description">Address family to use or
<code>AF_UNSPEC
</code> for any
</dd>
3195 <dd class=
"description">Type of encryption to use
</dd>
3197 <dd class=
"description">1 for blocking connection,
0 for non-blocking
</dd>
3199 <dd class=
"description">Connection timeout in milliseconds,
0 means don't connect
</dd>
3201 <dd class=
"description">Pointer to
"cancel
" variable
</dd>
3203 <h4 class=
"returnvalue">Return Value
</h4>
3204 <p class=
"description">New HTTP connection
</p>
3205 <h3 class=
"function"><span class=
"info"> CUPS
1.5/macOS
10.7 </span><a id=
"httpCopyCredentials">httpCopyCredentials
</a></h3>
3206 <p class=
"description">Copy the credentials associated with the peer in
3207 an encrypted connection.
</p>
3209 int httpCopyCredentials (
<br>
3210     <a href=
"#http_t">http_t
</a> *http,
<br>
3211     cups_array_t **credentials
<br>
3213 <h4 class=
"parameters">Parameters
</h4>
3216 <dd class=
"description">Connection to server
</dd>
3217 <dt>credentials
</dt>
3218 <dd class=
"description">Array of credentials
</dd>
3220 <h4 class=
"returnvalue">Return Value
</h4>
3221 <p class=
"description">Status of call (
0 = success)
</p>
3222 <h3 class=
"function"><span class=
"info"> CUPS
2.0/macOS
10.10 </span><a id=
"httpCredentialsAreValidForName">httpCredentialsAreValidForName
</a></h3>
3223 <p class=
"description">Return whether the credentials are valid for the given name.
</p>
3225 int httpCredentialsAreValidForName (
<br>
3226     cups_array_t *credentials,
<br>
3227     const char *common_name
<br>
3229 <h4 class=
"parameters">Parameters
</h4>
3231 <dt>credentials
</dt>
3232 <dd class=
"description">Credentials
</dd>
3233 <dt>common_name
</dt>
3234 <dd class=
"description">Name to check
</dd>
3236 <h4 class=
"returnvalue">Return Value
</h4>
3237 <p class=
"description">1 if valid,
0 otherwise
</p>
3238 <h3 class=
"function"><span class=
"info"> CUPS
2.0/macOS
10.10 </span><a id=
"httpCredentialsGetExpiration">httpCredentialsGetExpiration
</a></h3>
3239 <p class=
"description">Return the expiration date of the credentials.
</p>
3241 time_t httpCredentialsGetExpiration (
<br>
3242     cups_array_t *credentials
<br>
3244 <h4 class=
"parameters">Parameters
</h4>
3246 <dt>credentials
</dt>
3247 <dd class=
"description">Credentials
</dd>
3249 <h4 class=
"returnvalue">Return Value
</h4>
3250 <p class=
"description">Expiration date of credentials
</p>
3251 <h3 class=
"function"><span class=
"info"> CUPS
2.0/macOS
10.10 </span><a id=
"httpCredentialsGetTrust">httpCredentialsGetTrust
</a></h3>
3252 <p class=
"description">Return the trust of credentials.
</p>
3254 <a href=
"#http_trust_t">http_trust_t
</a> httpCredentialsGetTrust (
<br>
3255     cups_array_t *credentials,
<br>
3256     const char *common_name
<br>
3258 <h4 class=
"parameters">Parameters
</h4>
3260 <dt>credentials
</dt>
3261 <dd class=
"description">Credentials
</dd>
3262 <dt>common_name
</dt>
3263 <dd class=
"description">Common name for trust lookup
</dd>
3265 <h4 class=
"returnvalue">Return Value
</h4>
3266 <p class=
"description">Level of trust
</p>
3267 <h3 class=
"function"><span class=
"info"> CUPS
2.0/macOS
10.10 </span><a id=
"httpCredentialsString">httpCredentialsString
</a></h3>
3268 <p class=
"description">Return a string representing the credentials.
</p>
3270 size_t httpCredentialsString (
<br>
3271     cups_array_t *credentials,
<br>
3272     char *buffer,
<br>
3273     size_t bufsize
<br>
3275 <h4 class=
"parameters">Parameters
</h4>
3277 <dt>credentials
</dt>
3278 <dd class=
"description">Credentials
</dd>
3280 <dd class=
"description">Buffer or
<code>NULL
</code></dd>
3282 <dd class=
"description">Size of buffer
</dd>
3284 <h4 class=
"returnvalue">Return Value
</h4>
3285 <p class=
"description">Total size of credentials string
</p>
3286 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/macOS
10.4 </span><a id=
"httpDecode64_2">httpDecode64_2
</a></h3>
3287 <p class=
"description">Base64-decode a string.
</p>
3289 char *httpDecode64_2 (
<br>
3290     char *out,
<br>
3291     int *outlen,
<br>
3292     const char *in
<br>
3294 <h4 class=
"parameters">Parameters
</h4>
3297 <dd class=
"description">String to write to
</dd>
3299 <dd class=
"description">Size of output string
</dd>
3301 <dd class=
"description">String to read from
</dd>
3303 <h4 class=
"returnvalue">Return Value
</h4>
3304 <p class=
"description">Decoded string
</p>
3305 <h3 class=
"function"><a id=
"httpDelete">httpDelete
</a></h3>
3306 <p class=
"description">Send a DELETE request to the server.
</p>
3308 int httpDelete (
<br>
3309     <a href=
"#http_t">http_t
</a> *http,
<br>
3310     const char *uri
<br>
3312 <h4 class=
"parameters">Parameters
</h4>
3315 <dd class=
"description">HTTP connection
</dd>
3317 <dd class=
"description">URI to delete
</dd>
3319 <h4 class=
"returnvalue">Return Value
</h4>
3320 <p class=
"description">Status of call (
0 = success)
</p>
3321 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/macOS
10.4 </span><a id=
"httpEncode64_2">httpEncode64_2
</a></h3>
3322 <p class=
"description">Base64-encode a string.
</p>
3324 char *httpEncode64_2 (
<br>
3325     char *out,
<br>
3326     int outlen,
<br>
3327     const char *in,
<br>
3328     int inlen
<br>
3330 <h4 class=
"parameters">Parameters
</h4>
3333 <dd class=
"description">String to write to
</dd>
3335 <dd class=
"description">Size of output string
</dd>
3337 <dd class=
"description">String to read from
</dd>
3339 <dd class=
"description">Size of input string
</dd>
3341 <h4 class=
"returnvalue">Return Value
</h4>
3342 <p class=
"description">Encoded string
</p>
3343 <h3 class=
"function"><a id=
"httpEncryption">httpEncryption
</a></h3>
3344 <p class=
"description">Set the required encryption on the link.
</p>
3346 int httpEncryption (
<br>
3347     <a href=
"#http_t">http_t
</a> *http,
<br>
3348     <a href=
"#http_encryption_t">http_encryption_t
</a> e
<br>
3350 <h4 class=
"parameters">Parameters
</h4>
3353 <dd class=
"description">HTTP connection
</dd>
3355 <dd class=
"description">New encryption preference
</dd>
3357 <h4 class=
"returnvalue">Return Value
</h4>
3358 <p class=
"description">-
1 on error,
0 on success
</p>
3359 <h3 class=
"function"><a id=
"httpError">httpError
</a></h3>
3360 <p class=
"description">Get the last error on a connection.
</p>
3363     <a href=
"#http_t">http_t
</a> *http
<br>
3365 <h4 class=
"parameters">Parameters
</h4>
3368 <dd class=
"description">HTTP connection
</dd>
3370 <h4 class=
"returnvalue">Return Value
</h4>
3371 <p class=
"description">Error code (errno) value
</p>
3372 <h3 class=
"function"><a id=
"httpFieldValue">httpFieldValue
</a></h3>
3373 <p class=
"description">Return the HTTP field enumeration value for a field
3376 <a href=
"#http_field_t">http_field_t
</a> httpFieldValue (
<br>
3377     const char *name
<br>
3379 <h4 class=
"parameters">Parameters
</h4>
3382 <dd class=
"description">String name
</dd>
3384 <h4 class=
"returnvalue">Return Value
</h4>
3385 <p class=
"description">Field index
</p>
3386 <h3 class=
"function"><a id=
"httpFlush">httpFlush
</a></h3>
3387 <p class=
"description">Looping var
</p>
3389 void httpFlush (
<br>
3390     <a href=
"#http_t">http_t
</a> *http
<br>
3392 <h4 class=
"parameters">Parameters
</h4>
3395 <dd class=
"description">HTTP connection
</dd>
3397 <h4 class=
"returnvalue">Return Value
</h4>
3398 <p class=
"description">Flush data from a HTTP connection.
</p>
3399 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpFlushWrite">httpFlushWrite
</a></h3>
3400 <p class=
"description">Flush data in write buffer.
</p>
3402 int httpFlushWrite (
<br>
3403     <a href=
"#http_t">http_t
</a> *http
<br>
3405 <h4 class=
"parameters">Parameters
</h4>
3408 <dd class=
"description">HTTP connection
</dd>
3410 <h4 class=
"returnvalue">Return Value
</h4>
3411 <p class=
"description">Bytes written or -
1 on error
</p>
3412 <h3 class=
"function"><a id=
"httpFreeCredentials">httpFreeCredentials
</a></h3>
3413 <p class=
"description">Bytes written
</p>
3415 void httpFreeCredentials (
<br>
3416     cups_array_t *credentials
<br>
3418 <h4 class=
"parameters">Parameters
</h4>
3420 <dt>credentials
</dt>
3421 <dd class=
"description">Array of credentials
</dd>
3423 <h4 class=
"returnvalue">Return Value
</h4>
3424 <p class=
"description">Free an array of credentials.
</p>
3425 <h3 class=
"function"><a id=
"httpGet">httpGet
</a></h3>
3426 <p class=
"description">Send a GET request to the server.
</p>
3429     <a href=
"#http_t">http_t
</a> *http,
<br>
3430     const char *uri
<br>
3432 <h4 class=
"parameters">Parameters
</h4>
3435 <dd class=
"description">HTTP connection
</dd>
3437 <dd class=
"description">URI to get
</dd>
3439 <h4 class=
"returnvalue">Return Value
</h4>
3440 <p class=
"description">Status of call (
0 = success)
</p>
3441 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpGetActivity">httpGetActivity
</a></h3>
3442 <p class=
"description">Get the most recent activity for a connection.
</p>
3444 time_t httpGetActivity (
<br>
3445     <a href=
"#http_t">http_t
</a> *http
<br>
3447 <h4 class=
"parameters">Parameters
</h4>
3450 <dd class=
"description">HTTP connection
</dd>
3452 <h4 class=
"returnvalue">Return Value
</h4>
3453 <p class=
"description">Time of last read or write
</p>
3454 <h4 class=
"discussion">Discussion
</h4>
3455 <p class=
"discussion">The return value is the UNIX time of the last read or write.
3458 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpGetAddress">httpGetAddress
</a></h3>
3459 <p class=
"description">Get the address of the connected peer of a connection.
</p>
3461 <a href=
"#http_addr_t">http_addr_t
</a> *httpGetAddress (
<br>
3462     <a href=
"#http_t">http_t
</a> *http
<br>
3464 <h4 class=
"parameters">Parameters
</h4>
3467 <dd class=
"description">HTTP connection
</dd>
3469 <h4 class=
"returnvalue">Return Value
</h4>
3470 <p class=
"description">Connected address or
<code>NULL
</code></p>
3471 <h4 class=
"discussion">Discussion
</h4>
3472 <p class=
"discussion">Returns
<code>NULL
</code> if the socket is currently unconnected.
3475 <h3 class=
"function"><span class=
"info"> CUPS
1.3/macOS
10.5 </span><a id=
"httpGetAuthString">httpGetAuthString
</a></h3>
3476 <p class=
"description">Get the current authorization string.
</p>
3478 char *httpGetAuthString (
<br>
3479     <a href=
"#http_t">http_t
</a> *http
<br>
3481 <h4 class=
"parameters">Parameters
</h4>
3484 <dd class=
"description">HTTP connection
</dd>
3486 <h4 class=
"returnvalue">Return Value
</h4>
3487 <p class=
"description">Authorization string
</p>
3488 <h4 class=
"discussion">Discussion
</h4>
3489 <p class=
"discussion">The authorization string is set by cupsDoAuthentication() and
3490 httpSetAuthString(). Use httpGetAuthString() to retrieve the
3491 string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
3495 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpGetBlocking">httpGetBlocking
</a></h3>
3496 <p class=
"description">Get the blocking/non-block state of a connection.
</p>
3498 int httpGetBlocking (
<br>
3499     <a href=
"#http_t">http_t
</a> *http
<br>
3501 <h4 class=
"parameters">Parameters
</h4>
3504 <dd class=
"description">HTTP connection
</dd>
3506 <h4 class=
"returnvalue">Return Value
</h4>
3507 <p class=
"description">1 if blocking,
0 if non-blocking
</p>
3508 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpGetContentEncoding">httpGetContentEncoding
</a></h3>
3509 <p class=
"description">Get a common content encoding, if any, between
3510 the client and server.
</p>
3512 const char *httpGetContentEncoding (
<br>
3513     <a href=
"#http_t">http_t
</a> *http
<br>
3515 <h4 class=
"parameters">Parameters
</h4>
3518 <dd class=
"description">HTTP connection
</dd>
3520 <h4 class=
"returnvalue">Return Value
</h4>
3521 <p class=
"description">Content-Coding value or
3522 <code>NULL
</code> for the identity
3524 <h4 class=
"discussion">Discussion
</h4>
3525 <p class=
"discussion">This function uses the value of the Accepts-Encoding HTTP header and must be
3526 called after receiving a response from the server or a request from the
3527 client. The value returned can be use in subsequent requests (for clients)
3528 or in the response (for servers) in order to compress the content stream.
3531 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"httpGetCookie">httpGetCookie
</a></h3>
3532 <p class=
"description">Get any cookie data from the response.
</p>
3534 const char *httpGetCookie (
<br>
3535     <a href=
"#http_t">http_t
</a> *http
<br>
3537 <h4 class=
"parameters">Parameters
</h4>
3540 <dd class=
"description">HTTP connection
</dd>
3542 <h4 class=
"returnvalue">Return Value
</h4>
3543 <p class=
"description">Cookie data or NULL
</p>
3544 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpGetDateString2">httpGetDateString2
</a></h3>
3545 <p class=
"description">Get a formatted date/time string from a time value.
</p>
3547 const char *httpGetDateString2 (
<br>
3548     time_t t,
<br>
3549     char *s,
<br>
3550     int slen
<br>
3552 <h4 class=
"parameters">Parameters
</h4>
3555 <dd class=
"description">UNIX time
</dd>
3557 <dd class=
"description">String buffer
</dd>
3559 <dd class=
"description">Size of string buffer
</dd>
3561 <h4 class=
"returnvalue">Return Value
</h4>
3562 <p class=
"description">Date/time string
</p>
3563 <h3 class=
"function"><a id=
"httpGetDateTime">httpGetDateTime
</a></h3>
3564 <p class=
"description">Get a time value from a formatted date/time string.
</p>
3566 time_t httpGetDateTime (
<br>
3567     const char *s
<br>
3569 <h4 class=
"parameters">Parameters
</h4>
3572 <dd class=
"description">Date/time string
</dd>
3574 <h4 class=
"returnvalue">Return Value
</h4>
3575 <p class=
"description">UNIX time
</p>
3576 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpGetEncryption">httpGetEncryption
</a></h3>
3577 <p class=
"description">Get the current encryption mode of a connection.
</p>
3579 <a href=
"#http_encryption_t">http_encryption_t
</a> httpGetEncryption (
<br>
3580     <a href=
"#http_t">http_t
</a> *http
<br>
3582 <h4 class=
"parameters">Parameters
</h4>
3585 <dd class=
"description">HTTP connection
</dd>
3587 <h4 class=
"returnvalue">Return Value
</h4>
3588 <p class=
"description">Current encryption mode
</p>
3589 <h4 class=
"discussion">Discussion
</h4>
3590 <p class=
"discussion">This function returns the encryption mode for the connection. Use the
3591 <a href=
"#httpIsEncrypted"><code>httpIsEncrypted
</code></a> function to determine whether a TLS session has
3595 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpGetExpect">httpGetExpect
</a></h3>
3596 <p class=
"description">Get the value of the Expect header, if any.
</p>
3598 http_status_t httpGetExpect (
<br>
3599     <a href=
"#http_t">http_t
</a> *http
<br>
3601 <h4 class=
"parameters">Parameters
</h4>
3604 <dd class=
"description">HTTP connection
</dd>
3606 <h4 class=
"returnvalue">Return Value
</h4>
3607 <p class=
"description">Expect: status, if any
</p>
3608 <h4 class=
"discussion">Discussion
</h4>
3609 <p class=
"discussion">Returns
<code>HTTP_STATUS_NONE
</code> if there is no Expect header, otherwise
3610 returns the expected HTTP status code, typically
<code>HTTP_STATUS_CONTINUE
</code>.
3613 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpGetFd">httpGetFd
</a></h3>
3614 <p class=
"description">Get the file descriptor associated with a connection.
</p>
3617     <a href=
"#http_t">http_t
</a> *http
<br>
3619 <h4 class=
"parameters">Parameters
</h4>
3622 <dd class=
"description">HTTP connection
</dd>
3624 <h4 class=
"returnvalue">Return Value
</h4>
3625 <p class=
"description">File descriptor or -
1 if none
</p>
3626 <h3 class=
"function"><a id=
"httpGetField">httpGetField
</a></h3>
3627 <p class=
"description">Get a field value from a request/response.
</p>
3629 const char *httpGetField (
<br>
3630     <a href=
"#http_t">http_t
</a> *http,
<br>
3631     <a href=
"#http_field_t">http_field_t
</a> field
<br>
3633 <h4 class=
"parameters">Parameters
</h4>
3636 <dd class=
"description">HTTP connection
</dd>
3638 <dd class=
"description">Field to get
</dd>
3640 <h4 class=
"returnvalue">Return Value
</h4>
3641 <p class=
"description">Field value
</p>
3642 <h3 class=
"function"><span class=
"info"> DEPRECATED
 </span><a id=
"httpGetHostByName">httpGetHostByName
</a></h3>
3643 <p class=
"description">Lookup a hostname or IPv4 address, and return
3644 address records for the specified name.
</p>
3646 struct hostent *httpGetHostByName (
<br>
3647     const char *name
<br>
3649 <h4 class=
"parameters">Parameters
</h4>
3652 <dd class=
"description">Hostname or IP address
</dd>
3654 <h4 class=
"returnvalue">Return Value
</h4>
3655 <p class=
"description">Host entry
</p>
3656 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpGetHostname">httpGetHostname
</a></h3>
3657 <p class=
"description">Get the FQDN for the connection or local system.
</p>
3659 const char *httpGetHostname (
<br>
3660     <a href=
"#http_t">http_t
</a> *http,
<br>
3661     char *s,
<br>
3662     int slen
<br>
3664 <h4 class=
"parameters">Parameters
</h4>
3667 <dd class=
"description">HTTP connection or NULL
</dd>
3669 <dd class=
"description">String buffer for name
</dd>
3671 <dd class=
"description">Size of buffer
</dd>
3673 <h4 class=
"returnvalue">Return Value
</h4>
3674 <p class=
"description">FQDN for connection or system
</p>
3675 <h4 class=
"discussion">Discussion
</h4>
3676 <p class=
"discussion">When
"http
" points to a connected socket, return the hostname or
3677 address that was used in the call to httpConnect() or httpConnectEncrypt(),
3678 or the address of the client for the connection from httpAcceptConnection().
3679 Otherwise, return the FQDN for the local system using both gethostname()
3680 and gethostbyname() to get the local hostname with domain.
3683 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpGetKeepAlive">httpGetKeepAlive
</a></h3>
3684 <p class=
"description">Get the current Keep-Alive state of the connection.
</p>
3686 <a href=
"#http_keepalive_t">http_keepalive_t
</a> httpGetKeepAlive (
<br>
3687     <a href=
"#http_t">http_t
</a> *http
<br>
3689 <h4 class=
"parameters">Parameters
</h4>
3692 <dd class=
"description">HTTP connection
</dd>
3694 <h4 class=
"returnvalue">Return Value
</h4>
3695 <p class=
"description">Keep-Alive state
</p>
3696 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpGetLength2">httpGetLength2
</a></h3>
3697 <p class=
"description">Get the amount of data remaining from the
3698 content-length or transfer-encoding fields.
</p>
3700 off_t httpGetLength2 (
<br>
3701     <a href=
"#http_t">http_t
</a> *http
<br>
3703 <h4 class=
"parameters">Parameters
</h4>
3706 <dd class=
"description">HTTP connection
</dd>
3708 <h4 class=
"returnvalue">Return Value
</h4>
3709 <p class=
"description">Content length
</p>
3710 <h4 class=
"discussion">Discussion
</h4>
3711 <p class=
"discussion">This function returns the complete content length, even for
3712 content larger than
2^
31 -
1.
3715 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpGetPending">httpGetPending
</a></h3>
3716 <p class=
"description">Get the number of bytes that are buffered for writing.
</p>
3718 size_t httpGetPending (
<br>
3719     <a href=
"#http_t">http_t
</a> *http
<br>
3721 <h4 class=
"parameters">Parameters
</h4>
3724 <dd class=
"description">HTTP connection
</dd>
3726 <h4 class=
"returnvalue">Return Value
</h4>
3727 <p class=
"description">Number of bytes buffered
</p>
3728 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpGetReady">httpGetReady
</a></h3>
3729 <p class=
"description">Get the number of bytes that can be read without blocking.
</p>
3731 size_t httpGetReady (
<br>
3732     <a href=
"#http_t">http_t
</a> *http
<br>
3734 <h4 class=
"parameters">Parameters
</h4>
3737 <dd class=
"description">HTTP connection
</dd>
3739 <h4 class=
"returnvalue">Return Value
</h4>
3740 <p class=
"description">Number of bytes available
</p>
3741 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpGetRemaining">httpGetRemaining
</a></h3>
3742 <p class=
"description">Get the number of remaining bytes in the message
3743 body or current chunk.
</p>
3745 size_t httpGetRemaining (
<br>
3746     <a href=
"#http_t">http_t
</a> *http
<br>
3748 <h4 class=
"parameters">Parameters
</h4>
3751 <dd class=
"description">HTTP connection
</dd>
3753 <h4 class=
"returnvalue">Return Value
</h4>
3754 <p class=
"description">Remaining bytes
</p>
3755 <h4 class=
"discussion">Discussion
</h4>
3756 <p class=
"discussion">The
<a href=
"#httpIsChunked"><code>httpIsChunked
</code></a> function can be used to determine whether the
3757 message body is chunked or fixed-length.
3760 <h3 class=
"function"><a id=
"httpGetState">httpGetState
</a></h3>
3761 <p class=
"description">Get the current state of the HTTP request.
</p>
3763 <a href=
"#http_state_t">http_state_t
</a> httpGetState (
<br>
3764     <a href=
"#http_t">http_t
</a> *http
<br>
3766 <h4 class=
"parameters">Parameters
</h4>
3769 <dd class=
"description">HTTP connection
</dd>
3771 <h4 class=
"returnvalue">Return Value
</h4>
3772 <p class=
"description">HTTP state
</p>
3773 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpGetStatus">httpGetStatus
</a></h3>
3774 <p class=
"description">Get the status of the last HTTP request.
</p>
3776 http_status_t httpGetStatus (
<br>
3777     <a href=
"#http_t">http_t
</a> *http
<br>
3779 <h4 class=
"parameters">Parameters
</h4>
3782 <dd class=
"description">HTTP connection
</dd>
3784 <h4 class=
"returnvalue">Return Value
</h4>
3785 <p class=
"description">HTTP status
</p>
3786 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpGetSubField2">httpGetSubField2
</a></h3>
3787 <p class=
"description">Get a sub-field value.
</p>
3789 char *httpGetSubField2 (
<br>
3790     <a href=
"#http_t">http_t
</a> *http,
<br>
3791     <a href=
"#http_field_t">http_field_t
</a> field,
<br>
3792     const char *name,
<br>
3793     char *value,
<br>
3794     int valuelen
<br>
3796 <h4 class=
"parameters">Parameters
</h4>
3799 <dd class=
"description">HTTP connection
</dd>
3801 <dd class=
"description">Field index
</dd>
3803 <dd class=
"description">Name of sub-field
</dd>
3805 <dd class=
"description">Value string
</dd>
3807 <dd class=
"description">Size of value buffer
</dd>
3809 <h4 class=
"returnvalue">Return Value
</h4>
3810 <p class=
"description">Value or NULL
</p>
3811 <h3 class=
"function"><a id=
"httpGetVersion">httpGetVersion
</a></h3>
3812 <p class=
"description">Get the HTTP version at the other end.
</p>
3814 <a href=
"#http_version_t">http_version_t
</a> httpGetVersion (
<br>
3815     <a href=
"#http_t">http_t
</a> *http
<br>
3817 <h4 class=
"parameters">Parameters
</h4>
3820 <dd class=
"description">HTTP connection
</dd>
3822 <h4 class=
"returnvalue">Return Value
</h4>
3823 <p class=
"description">Version number
</p>
3824 <h3 class=
"function"><a id=
"httpGets">httpGets
</a></h3>
3825 <p class=
"description">Get a line of text from a HTTP connection.
</p>
3827 char *httpGets (
<br>
3828     char *line,
<br>
3829     int length,
<br>
3830     <a href=
"#http_t">http_t
</a> *http
<br>
3832 <h4 class=
"parameters">Parameters
</h4>
3835 <dd class=
"description">Line to read into
</dd>
3837 <dd class=
"description">Max length of buffer
</dd>
3839 <dd class=
"description">HTTP connection
</dd>
3841 <h4 class=
"returnvalue">Return Value
</h4>
3842 <p class=
"description">Line or NULL
</p>
3843 <h3 class=
"function"><a id=
"httpHead">httpHead
</a></h3>
3844 <p class=
"description">Send a HEAD request to the server.
</p>
3847     <a href=
"#http_t">http_t
</a> *http,
<br>
3848     const char *uri
<br>
3850 <h4 class=
"parameters">Parameters
</h4>
3853 <dd class=
"description">HTTP connection
</dd>
3855 <dd class=
"description">URI for head
</dd>
3857 <h4 class=
"returnvalue">Return Value
</h4>
3858 <p class=
"description">Status of call (
0 = success)
</p>
3859 <h3 class=
"function"><a id=
"httpInitialize">httpInitialize
</a></h3>
3860 <p class=
"description">URI for head
</p>
3862 void httpInitialize (void);
</p>
3863 <h4 class=
"returnvalue">Return Value
</h4>
3864 <p class=
"description">Initialize the HTTP interface library and set the
3865 default HTTP proxy (if any).
</p>
3866 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpIsChunked">httpIsChunked
</a></h3>
3867 <p class=
"description">Report whether a message body is chunked.
</p>
3869 int httpIsChunked (
<br>
3870     <a href=
"#http_t">http_t
</a> *http
<br>
3872 <h4 class=
"parameters">Parameters
</h4>
3875 <dd class=
"description">HTTP connection
</dd>
3877 <h4 class=
"returnvalue">Return Value
</h4>
3878 <p class=
"description">1 if chunked,
0 if not
</p>
3879 <h4 class=
"discussion">Discussion
</h4>
3880 <p class=
"discussion">This function returns non-zero if the message body is composed of
3881 variable-length chunks.
3884 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpIsEncrypted">httpIsEncrypted
</a></h3>
3885 <p class=
"description">Report whether a connection is encrypted.
</p>
3887 int httpIsEncrypted (
<br>
3888     <a href=
"#http_t">http_t
</a> *http
<br>
3890 <h4 class=
"parameters">Parameters
</h4>
3893 <dd class=
"description">HTTP connection
</dd>
3895 <h4 class=
"returnvalue">Return Value
</h4>
3896 <p class=
"description">1 if encrypted,
0 if not
</p>
3897 <h4 class=
"discussion">Discussion
</h4>
3898 <p class=
"discussion">This function returns non-zero if the connection is currently encrypted.
3901 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpLoadCredentials">httpLoadCredentials
</a></h3>
3902 <p class=
"description">Load X
.509 credentials from a keychain file.
</p>
3904 int httpLoadCredentials (
<br>
3905     const char *path,
<br>
3906     cups_array_t **credentials,
<br>
3907     const char *common_name
<br>
3909 <h4 class=
"parameters">Parameters
</h4>
3912 <dd class=
"description">Keychain path or
<code>NULL
</code> for default
</dd>
3913 <dt>credentials
</dt>
3914 <dd class=
"description">Credentials
</dd>
3915 <dt>common_name
</dt>
3916 <dd class=
"description">Common name for credentials
</dd>
3918 <h4 class=
"returnvalue">Return Value
</h4>
3919 <p class=
"description">0 on success, -
1 on error
</p>
3920 <h3 class=
"function"><a id=
"httpOptions">httpOptions
</a></h3>
3921 <p class=
"description">Send an OPTIONS request to the server.
</p>
3923 int httpOptions (
<br>
3924     <a href=
"#http_t">http_t
</a> *http,
<br>
3925     const char *uri
<br>
3927 <h4 class=
"parameters">Parameters
</h4>
3930 <dd class=
"description">HTTP connection
</dd>
3932 <dd class=
"description">URI for options
</dd>
3934 <h4 class=
"returnvalue">Return Value
</h4>
3935 <p class=
"description">Status of call (
0 = success)
</p>
3936 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpPeek">httpPeek
</a></h3>
3937 <p class=
"description">Peek at data from a HTTP connection.
</p>
3939 ssize_t httpPeek (
<br>
3940     <a href=
"#http_t">http_t
</a> *http,
<br>
3941     char *buffer,
<br>
3942     size_t length
<br>
3944 <h4 class=
"parameters">Parameters
</h4>
3947 <dd class=
"description">HTTP connection
</dd>
3949 <dd class=
"description">Buffer for data
</dd>
3951 <dd class=
"description">Maximum number of bytes
</dd>
3953 <h4 class=
"returnvalue">Return Value
</h4>
3954 <p class=
"description">Number of bytes copied
</p>
3955 <h4 class=
"discussion">Discussion
</h4>
3956 <p class=
"discussion">This function copies available data from the given HTTP connection, reading
3957 a buffer as needed. The data is still available for reading using
3958 <a href=
"#httpRead"><code>httpRead
</code></a> or
<a href=
"#httpRead2"><code>httpRead2
</code></a>.
<br>
3960 For non-blocking connections the usual timeouts apply.
3963 <h3 class=
"function"><a id=
"httpPost">httpPost
</a></h3>
3964 <p class=
"description">Send a POST request to the server.
</p>
3967     <a href=
"#http_t">http_t
</a> *http,
<br>
3968     const char *uri
<br>
3970 <h4 class=
"parameters">Parameters
</h4>
3973 <dd class=
"description">HTTP connection
</dd>
3975 <dd class=
"description">URI for post
</dd>
3977 <h4 class=
"returnvalue">Return Value
</h4>
3978 <p class=
"description">Status of call (
0 = success)
</p>
3979 <h3 class=
"function"><a id=
"httpPut">httpPut
</a></h3>
3980 <p class=
"description">Send a PUT request to the server.
</p>
3983     <a href=
"#http_t">http_t
</a> *http,
<br>
3984     const char *uri
<br>
3986 <h4 class=
"parameters">Parameters
</h4>
3989 <dd class=
"description">HTTP connection
</dd>
3991 <dd class=
"description">URI to put
</dd>
3993 <h4 class=
"returnvalue">Return Value
</h4>
3994 <p class=
"description">Status of call (
0 = success)
</p>
3995 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpRead2">httpRead2
</a></h3>
3996 <p class=
"description">Read data from a HTTP connection.
</p>
3998 ssize_t httpRead2 (
<br>
3999     <a href=
"#http_t">http_t
</a> *http,
<br>
4000     char *buffer,
<br>
4001     size_t length
<br>
4003 <h4 class=
"parameters">Parameters
</h4>
4006 <dd class=
"description">HTTP connection
</dd>
4008 <dd class=
"description">Buffer for data
</dd>
4010 <dd class=
"description">Maximum number of bytes
</dd>
4012 <h4 class=
"returnvalue">Return Value
</h4>
4013 <p class=
"description">Number of bytes read
</p>
4014 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpReadRequest">httpReadRequest
</a></h3>
4015 <p class=
"description">Read a HTTP request from a connection.
</p>
4017 <a href=
"#http_state_t">http_state_t
</a> httpReadRequest (
<br>
4018     <a href=
"#http_t">http_t
</a> *http,
<br>
4019     char *uri,
<br>
4020     size_t urilen
<br>
4022 <h4 class=
"parameters">Parameters
</h4>
4025 <dd class=
"description">HTTP connection
</dd>
4027 <dd class=
"description">URI buffer
</dd>
4029 <dd class=
"description">Size of URI buffer
</dd>
4031 <h4 class=
"returnvalue">Return Value
</h4>
4032 <p class=
"description">New state of connection
</p>
4033 <h3 class=
"function"><a id=
"httpReconnect2">httpReconnect2
</a></h3>
4034 <p class=
"description">Reconnect to a HTTP server with timeout and optional
4037 int httpReconnect2 (
<br>
4038     <a href=
"#http_t">http_t
</a> *http,
<br>
4039     int msec,
<br>
4040     int *cancel
<br>
4042 <h4 class=
"parameters">Parameters
</h4>
4045 <dd class=
"description">HTTP connection
</dd>
4047 <dd class=
"description">Timeout in milliseconds
</dd>
4049 <dd class=
"description">Pointer to
"cancel
" variable
</dd>
4051 <h4 class=
"returnvalue">Return Value
</h4>
4052 <p class=
"description">0 on success, non-zero on failure
</p>
4053 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpResolveHostname">httpResolveHostname
</a></h3>
4054 <p class=
"description">Resolve the hostname of the HTTP connection
4057 const char *httpResolveHostname (
<br>
4058     <a href=
"#http_t">http_t
</a> *http,
<br>
4059     char *buffer,
<br>
4060     size_t bufsize
<br>
4062 <h4 class=
"parameters">Parameters
</h4>
4065 <dd class=
"description">HTTP connection
</dd>
4067 <dd class=
"description">Hostname buffer
</dd>
4069 <dd class=
"description">Size of buffer
</dd>
4071 <h4 class=
"returnvalue">Return Value
</h4>
4072 <p class=
"description">Resolved hostname or
<code>NULL
</code></p>
4073 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpSaveCredentials">httpSaveCredentials
</a></h3>
4074 <p class=
"description">Save X
.509 credentials to a keychain file.
</p>
4076 int httpSaveCredentials (
<br>
4077     const char *path,
<br>
4078     cups_array_t *credentials,
<br>
4079     const char *common_name
<br>
4081 <h4 class=
"parameters">Parameters
</h4>
4084 <dd class=
"description">Keychain path or
<code>NULL
</code> for default
</dd>
4085 <dt>credentials
</dt>
4086 <dd class=
"description">Credentials
</dd>
4087 <dt>common_name
</dt>
4088 <dd class=
"description">Common name for credentials
</dd>
4090 <h4 class=
"returnvalue">Return Value
</h4>
4091 <p class=
"description">-
1 on error,
0 on success
</p>
4092 <h3 class=
"function"><a id=
"httpSeparate">httpSeparate
</a></h3>
4093 <p class=
"description">+
400 year days
</p>
4095 void httpSeparate (
<br>
4096     const char *uri,
<br>
4097     char *scheme,
<br>
4098     char *username,
<br>
4099     char *host,
<br>
4100     int *port,
<br>
4101     char *resource
<br>
4103 <h4 class=
"parameters">Parameters
</h4>
4106 <dd class=
"description">Universal Resource Identifier
</dd>
4108 <dd class=
"description">Scheme [
32] (http, https, etc.)
</dd>
4110 <dd class=
"description">Username [
1024]
</dd>
4112 <dd class=
"description">Hostname [
1024]
</dd>
4114 <dd class=
"description">Port number to use
</dd>
4116 <dd class=
"description">Resource/filename [
1024]
</dd>
4118 <h4 class=
"returnvalue">Return Value
</h4>
4119 <p class=
"description">Separate a Universal Resource Identifier into its
4121 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
4124 <h3 class=
"function"><a id=
"httpSeparate2">httpSeparate2
</a></h3>
4125 <p class=
"description">Resource/filename [
1024]
</p>
4127 void httpSeparate2 (
<br>
4128     const char *uri,
<br>
4129     char *scheme,
<br>
4130     int schemelen,
<br>
4131     char *username,
<br>
4132     int usernamelen,
<br>
4133     char *host,
<br>
4134     int hostlen,
<br>
4135     int *port,
<br>
4136     char *resource,
<br>
4137     int resourcelen
<br>
4139 <h4 class=
"parameters">Parameters
</h4>
4142 <dd class=
"description">Universal Resource Identifier
</dd>
4144 <dd class=
"description">Scheme (http, https, etc.)
</dd>
4146 <dd class=
"description">Size of scheme buffer
</dd>
4148 <dd class=
"description">Username
</dd>
4149 <dt>usernamelen
</dt>
4150 <dd class=
"description">Size of username buffer
</dd>
4152 <dd class=
"description">Hostname
</dd>
4154 <dd class=
"description">Size of hostname buffer
</dd>
4156 <dd class=
"description">Port number to use
</dd>
4158 <dd class=
"description">Resource/filename
</dd>
4159 <dt>resourcelen
</dt>
4160 <dd class=
"description">Size of resource buffer
</dd>
4162 <h4 class=
"returnvalue">Return Value
</h4>
4163 <p class=
"description">Separate a Universal Resource Identifier into its
4165 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
4169 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpSeparateURI">httpSeparateURI
</a></h3>
4170 <p class=
"description">Separate a Universal Resource Identifier into its
4173 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpSeparateURI (
<br>
4174     <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> decoding,
<br>
4175     const char *uri,
<br>
4176     char *scheme,
<br>
4177     int schemelen,
<br>
4178     char *username,
<br>
4179     int usernamelen,
<br>
4180     char *host,
<br>
4181     int hostlen,
<br>
4182     int *port,
<br>
4183     char *resource,
<br>
4184     int resourcelen
<br>
4186 <h4 class=
"parameters">Parameters
</h4>
4189 <dd class=
"description">Decoding flags
</dd>
4191 <dd class=
"description">Universal Resource Identifier
</dd>
4193 <dd class=
"description">Scheme (http, https, etc.)
</dd>
4195 <dd class=
"description">Size of scheme buffer
</dd>
4197 <dd class=
"description">Username
</dd>
4198 <dt>usernamelen
</dt>
4199 <dd class=
"description">Size of username buffer
</dd>
4201 <dd class=
"description">Hostname
</dd>
4203 <dd class=
"description">Size of hostname buffer
</dd>
4205 <dd class=
"description">Port number to use
</dd>
4207 <dd class=
"description">Resource/filename
</dd>
4208 <dt>resourcelen
</dt>
4209 <dd class=
"description">Size of resource buffer
</dd>
4211 <h4 class=
"returnvalue">Return Value
</h4>
4212 <p class=
"description">Result of separation
</p>
4213 <h3 class=
"function"><a id=
"httpSetAuthString">httpSetAuthString
</a></h3>
4214 <p class=
"description">Always do encryption via SSL.
</p>
4216 void httpSetAuthString (
<br>
4217     <a href=
"#http_t">http_t
</a> *http,
<br>
4218     const char *scheme,
<br>
4219     const char *data
<br>
4221 <h4 class=
"parameters">Parameters
</h4>
4224 <dd class=
"description">HTTP connection
</dd>
4226 <dd class=
"description">Auth scheme (NULL to clear it)
</dd>
4228 <dd class=
"description">Auth data (NULL for none)
</dd>
4230 <h4 class=
"returnvalue">Return Value
</h4>
4231 <p class=
"description">Set the current authorization string.
</p>
4232 <p class=
"discussion">This function just stores a copy of the current authorization string in
4233 the HTTP connection object. You must still call httpSetField() to set
4234 HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
4235 httpHead(), httpOptions(), httpPost, or httpPut().
4238 <h3 class=
"function"><a id=
"httpSetCookie">httpSetCookie
</a></h3>
4239 <p class=
"description">Array of credentials
</p>
4241 void httpSetCookie (
<br>
4242     <a href=
"#http_t">http_t
</a> *http,
<br>
4243     const char *cookie
<br>
4245 <h4 class=
"parameters">Parameters
</h4>
4248 <dd class=
"description">Connection
</dd>
4250 <dd class=
"description">Cookie string
</dd>
4252 <h4 class=
"returnvalue">Return Value
</h4>
4253 <p class=
"description">Set the cookie value(s).
</p>
4254 <p class=
"discussion"></p>
4255 <h3 class=
"function"><span class=
"info"> CUPS
1.5/macOS
10.7 </span><a id=
"httpSetCredentials">httpSetCredentials
</a></h3>
4256 <p class=
"description">Set the credentials associated with an encrypted
4259 int httpSetCredentials (
<br>
4260     <a href=
"#http_t">http_t
</a> *http,
<br>
4261     cups_array_t *credentials
<br>
4263 <h4 class=
"parameters">Parameters
</h4>
4266 <dd class=
"description">HTTP connection
</dd>
4267 <dt>credentials
</dt>
4268 <dd class=
"description">Array of credentials
</dd>
4270 <h4 class=
"returnvalue">Return Value
</h4>
4271 <p class=
"description">Status of call (
0 = success)
</p>
4272 <h3 class=
"function"><a id=
"httpSetDefaultField">httpSetDefaultField
</a></h3>
4273 <p class=
"description">Cookie string
</p>
4275 void httpSetDefaultField (
<br>
4276     <a href=
"#http_t">http_t
</a> *http,
<br>
4277     <a href=
"#http_field_t">http_field_t
</a> field,
<br>
4278     const char *value
<br>
4280 <h4 class=
"parameters">Parameters
</h4>
4283 <dd class=
"description">HTTP connection
</dd>
4285 <dd class=
"description">Field index
</dd>
4287 <dd class=
"description">Value
</dd>
4289 <h4 class=
"returnvalue">Return Value
</h4>
4290 <p class=
"description">Set the default value of an HTTP header.
</p>
4291 <p class=
"discussion">Currently only
<code>HTTP_FIELD_ACCEPT_ENCODING
</code>,
<code>HTTP_FIELD_SERVER
</code>,
4292 and
<code>HTTP_FIELD_USER_AGENT
</code> can be set.
4295 <h3 class=
"function"><a id=
"httpSetExpect">httpSetExpect
</a></h3>
4296 <p class=
"description">Value
</p>
4298 void httpSetExpect (
<br>
4299     <a href=
"#http_t">http_t
</a> *http,
<br>
4300     http_status_t expect
<br>
4302 <h4 class=
"parameters">Parameters
</h4>
4305 <dd class=
"description">HTTP connection
</dd>
4307 <dd class=
"description">HTTP status to expect
4308 (
<code>HTTP_STATUS_CONTINUE
</code>)
</dd>
4310 <h4 class=
"returnvalue">Return Value
</h4>
4311 <p class=
"description">Set the Expect: header in a request.
</p>
4312 <p class=
"discussion">Currently only
<code>HTTP_STATUS_CONTINUE
</code> is supported for the
"expect
"
4316 <h3 class=
"function"><a id=
"httpSetField">httpSetField
</a></h3>
4317 <p class=
"description">HTTP status to expect
4318 (
<code>HTTP_STATUS_CONTINUE
</code>)
</p>
4320 void httpSetField (
<br>
4321     <a href=
"#http_t">http_t
</a> *http,
<br>
4322     <a href=
"#http_field_t">http_field_t
</a> field,
<br>
4323     const char *value
<br>
4325 <h4 class=
"parameters">Parameters
</h4>
4328 <dd class=
"description">HTTP connection
</dd>
4330 <dd class=
"description">Field index
</dd>
4332 <dd class=
"description">Value
</dd>
4334 <h4 class=
"returnvalue">Return Value
</h4>
4335 <p class=
"description">Set the value of an HTTP header.
</p>
4336 <h3 class=
"function"><a id=
"httpSetKeepAlive">httpSetKeepAlive
</a></h3>
4337 <p class=
"description">Check for a trailing dot on the hostname...
</p>
4339 void httpSetKeepAlive (
<br>
4340     <a href=
"#http_t">http_t
</a> *http,
<br>
4341     <a href=
"#http_keepalive_t">http_keepalive_t
</a> keep_alive
<br>
4343 <h4 class=
"parameters">Parameters
</h4>
4346 <dd class=
"description">HTTP connection
</dd>
4348 <dd class=
"description">New Keep-Alive value
</dd>
4350 <h4 class=
"returnvalue">Return Value
</h4>
4351 <p class=
"description">Set the current Keep-Alive state of a connection.
</p>
4352 <p class=
"discussion"></p>
4353 <h3 class=
"function"><a id=
"httpSetLength">httpSetLength
</a></h3>
4354 <p class=
"description">New Keep-Alive value
</p>
4356 void httpSetLength (
<br>
4357     <a href=
"#http_t">http_t
</a> *http,
<br>
4358     size_t length
<br>
4360 <h4 class=
"parameters">Parameters
</h4>
4363 <dd class=
"description">HTTP connection
</dd>
4365 <dd class=
"description">Length (
0 for chunked)
</dd>
4367 <h4 class=
"returnvalue">Return Value
</h4>
4368 <p class=
"description">Set the content-length and content-encoding.
</p>
4369 <p class=
"discussion"></p>
4370 <h3 class=
"function"><a id=
"httpSetTimeout">httpSetTimeout
</a></h3>
4371 <p class=
"description">Length (
0 for chunked)
</p>
4373 void httpSetTimeout (
<br>
4374     <a href=
"#http_t">http_t
</a> *http,
<br>
4375     double timeout,
<br>
4376     <a href=
"#http_timeout_cb_t">http_timeout_cb_t
</a> cb,
<br>
4377     void *user_data
<br>
4379 <h4 class=
"parameters">Parameters
</h4>
4382 <dd class=
"description">HTTP connection
</dd>
4384 <dd class=
"description">Number of seconds for timeout,
4385 must be greater than
0</dd>
4387 <dd class=
"description">Callback function or NULL
</dd>
4389 <dd class=
"description">User data pointer
</dd>
4391 <h4 class=
"returnvalue">Return Value
</h4>
4392 <p class=
"description">Set read/write timeouts and an optional callback.
</p>
4393 <p class=
"discussion">The optional timeout callback receives both the HTTP connection and a user
4394 data pointer and must return
1 to continue or
0 to error (time) out.
4397 <h3 class=
"function"><a id=
"httpShutdown">httpShutdown
</a></h3>
4398 <p class=
"description">User data pointer
</p>
4400 void httpShutdown (
<br>
4401     <a href=
"#http_t">http_t
</a> *http
<br>
4403 <h4 class=
"parameters">Parameters
</h4>
4406 <dd class=
"description">HTTP connection
</dd>
4408 <h4 class=
"returnvalue">Return Value
</h4>
4409 <p class=
"description">Shutdown one side of an HTTP connection.
</p>
4410 <p class=
"discussion"></p>
4411 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpStateString">httpStateString
</a></h3>
4412 <p class=
"description">Return the string describing a HTTP state value.
</p>
4414 const char *httpStateString (
<br>
4415     <a href=
"#http_state_t">http_state_t
</a> state
<br>
4417 <h4 class=
"parameters">Parameters
</h4>
4420 <dd class=
"description">HTTP state value
</dd>
4422 <h4 class=
"returnvalue">Return Value
</h4>
4423 <p class=
"description">State string
</p>
4424 <h3 class=
"function"><a id=
"httpStatus">httpStatus
</a></h3>
4425 <p class=
"description">Return a short string describing a HTTP status code.
</p>
4427 const char *httpStatus (
<br>
4428     http_status_t status
<br>
4430 <h4 class=
"parameters">Parameters
</h4>
4433 <dd class=
"description">HTTP status code
</dd>
4435 <h4 class=
"returnvalue">Return Value
</h4>
4436 <p class=
"description">Localized status string
</p>
4437 <h4 class=
"discussion">Discussion
</h4>
4438 <p class=
"discussion">The returned string is localized to the current POSIX locale and is based
4439 on the status strings defined in RFC
2616.
</p>
4440 <h3 class=
"function"><a id=
"httpTrace">httpTrace
</a></h3>
4441 <p class=
"description">Send an TRACE request to the server.
</p>
4444     <a href=
"#http_t">http_t
</a> *http,
<br>
4445     const char *uri
<br>
4447 <h4 class=
"parameters">Parameters
</h4>
4450 <dd class=
"description">HTTP connection
</dd>
4452 <dd class=
"description">URI for trace
</dd>
4454 <h4 class=
"returnvalue">Return Value
</h4>
4455 <p class=
"description">Status of call (
0 = success)
</p>
4456 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpURIStatusString">httpURIStatusString
</a></h3>
4457 <p class=
"description">Return a string describing a URI status code.
</p>
4459 const char *httpURIStatusString (
<br>
4460     <a href=
"#http_uri_status_t">http_uri_status_t
</a> status
<br>
4462 <h4 class=
"parameters">Parameters
</h4>
4465 <dd class=
"description">URI status code
</dd>
4467 <h4 class=
"returnvalue">Return Value
</h4>
4468 <p class=
"description">Localized status string
</p>
4469 <h3 class=
"function"><a id=
"httpUpdate">httpUpdate
</a></h3>
4470 <p class=
"description">Update the current HTTP state for incoming data.
</p>
4472 http_status_t httpUpdate (
<br>
4473     <a href=
"#http_t">http_t
</a> *http
<br>
4475 <h4 class=
"parameters">Parameters
</h4>
4478 <dd class=
"description">HTTP connection
</dd>
4480 <h4 class=
"returnvalue">Return Value
</h4>
4481 <p class=
"description">HTTP status
</p>
4482 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"httpWait">httpWait
</a></h3>
4483 <p class=
"description">Wait for data available on a connection.
</p>
4486     <a href=
"#http_t">http_t
</a> *http,
<br>
4487     int msec
<br>
4489 <h4 class=
"parameters">Parameters
</h4>
4492 <dd class=
"description">HTTP connection
</dd>
4494 <dd class=
"description">Milliseconds to wait
</dd>
4496 <h4 class=
"returnvalue">Return Value
</h4>
4497 <p class=
"description">1 if data is available,
0 otherwise
</p>
4498 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpWrite2">httpWrite2
</a></h3>
4499 <p class=
"description">Write data to a HTTP connection.
</p>
4501 ssize_t httpWrite2 (
<br>
4502     <a href=
"#http_t">http_t
</a> *http,
<br>
4503     const char *buffer,
<br>
4504     size_t length
<br>
4506 <h4 class=
"parameters">Parameters
</h4>
4509 <dd class=
"description">HTTP connection
</dd>
4511 <dd class=
"description">Buffer for data
</dd>
4513 <dd class=
"description">Number of bytes to write
</dd>
4515 <h4 class=
"returnvalue">Return Value
</h4>
4516 <p class=
"description">Number of bytes written
</p>
4517 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpWriteResponse">httpWriteResponse
</a></h3>
4518 <p class=
"description">Write a HTTP response to a client connection.
</p>
4520 int httpWriteResponse (
<br>
4521     <a href=
"#http_t">http_t
</a> *http,
<br>
4522     http_status_t status
<br>
4524 <h4 class=
"parameters">Parameters
</h4>
4527 <dd class=
"description">HTTP connection
</dd>
4529 <dd class=
"description">Status code
</dd>
4531 <h4 class=
"returnvalue">Return Value
</h4>
4532 <p class=
"description">0 on success, -
1 on error
</p>
4533 <h3 class=
"function"><a id=
"ippAddBoolean">ippAddBoolean
</a></h3>
4534 <p class=
"description">Add a boolean attribute to an IPP message.
</p>
4536 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBoolean (
<br>
4537     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4538     ipp_tag_t group,
<br>
4539     const char *name,
<br>
4540     char value
<br>
4542 <h4 class=
"parameters">Parameters
</h4>
4545 <dd class=
"description">IPP message
</dd>
4547 <dd class=
"description">IPP group
</dd>
4549 <dd class=
"description">Name of attribute
</dd>
4551 <dd class=
"description">Value of attribute
</dd>
4553 <h4 class=
"returnvalue">Return Value
</h4>
4554 <p class=
"description">New attribute
</p>
4555 <h4 class=
"discussion">Discussion
</h4>
4556 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4557 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>
4559 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
4560 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
4561 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
4562 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
4563 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
4564 <h3 class=
"function"><a id=
"ippAddBooleans">ippAddBooleans
</a></h3>
4565 <p class=
"description">Add an array of boolean values.
</p>
4567 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBooleans (
<br>
4568     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4569     ipp_tag_t group,
<br>
4570     const char *name,
<br>
4571     int num_values,
<br>
4572     const char *values
<br>
4574 <h4 class=
"parameters">Parameters
</h4>
4577 <dd class=
"description">IPP message
</dd>
4579 <dd class=
"description">IPP group
</dd>
4581 <dd class=
"description">Name of attribute
</dd>
4583 <dd class=
"description">Number of values
</dd>
4585 <dd class=
"description">Values
</dd>
4587 <h4 class=
"returnvalue">Return Value
</h4>
4588 <p class=
"description">New attribute
</p>
4589 <h4 class=
"discussion">Discussion
</h4>
4590 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4591 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>
4593 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
4594 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
4595 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
4596 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
4597 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
4598 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"ippAddCollection">ippAddCollection
</a></h3>
4599 <p class=
"description">Add a collection value.
</p>
4601 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollection (
<br>
4602     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4603     ipp_tag_t group,
<br>
4604     const char *name,
<br>
4605     <a href=
"#ipp_t">ipp_t
</a> *value
<br>
4607 <h4 class=
"parameters">Parameters
</h4>
4610 <dd class=
"description">IPP message
</dd>
4612 <dd class=
"description">IPP group
</dd>
4614 <dd class=
"description">Name of attribute
</dd>
4616 <dd class=
"description">Value
</dd>
4618 <h4 class=
"returnvalue">Return Value
</h4>
4619 <p class=
"description">New attribute
</p>
4620 <h4 class=
"discussion">Discussion
</h4>
4621 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4622 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>
4624 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
4625 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
4626 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
4627 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
4628 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
4631 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"ippAddCollections">ippAddCollections
</a></h3>
4632 <p class=
"description">Add an array of collection values.
</p>
4634 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollections (
<br>
4635     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4636     ipp_tag_t group,
<br>
4637     const char *name,
<br>
4638     int num_values,
<br>
4639     const
<a href=
"#ipp_t">ipp_t
</a> **values
<br>
4641 <h4 class=
"parameters">Parameters
</h4>
4644 <dd class=
"description">IPP message
</dd>
4646 <dd class=
"description">IPP group
</dd>
4648 <dd class=
"description">Name of attribute
</dd>
4650 <dd class=
"description">Number of values
</dd>
4652 <dd class=
"description">Values
</dd>
4654 <h4 class=
"returnvalue">Return Value
</h4>
4655 <p class=
"description">New attribute
</p>
4656 <h4 class=
"discussion">Discussion
</h4>
4657 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4658 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>
4660 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
4661 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
4662 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
4663 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
4664 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
4667 <h3 class=
"function"><a id=
"ippAddDate">ippAddDate
</a></h3>
4668 <p class=
"description">Add a date attribute to an IPP message.
</p>
4670 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddDate (
<br>
4671     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4672     ipp_tag_t group,
<br>
4673     const char *name,
<br>
4674     const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *value
<br>
4676 <h4 class=
"parameters">Parameters
</h4>
4679 <dd class=
"description">IPP message
</dd>
4681 <dd class=
"description">IPP group
</dd>
4683 <dd class=
"description">Name of attribute
</dd>
4685 <dd class=
"description">Value
</dd>
4687 <h4 class=
"returnvalue">Return Value
</h4>
4688 <p class=
"description">New attribute
</p>
4689 <h4 class=
"discussion">Discussion
</h4>
4690 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4691 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>
4693 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
4694 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
4695 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
4696 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
4697 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
4698 <h3 class=
"function"><a id=
"ippAddInteger">ippAddInteger
</a></h3>
4699 <p class=
"description">Add a integer attribute to an IPP message.
</p>
4701 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddInteger (
<br>
4702     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4703     ipp_tag_t group,
<br>
4704     ipp_tag_t value_tag,
<br>
4705     const char *name,
<br>
4706     int value
<br>
4708 <h4 class=
"parameters">Parameters
</h4>
4711 <dd class=
"description">IPP message
</dd>
4713 <dd class=
"description">IPP group
</dd>
4715 <dd class=
"description">Type of attribute
</dd>
4717 <dd class=
"description">Name of attribute
</dd>
4719 <dd class=
"description">Value of attribute
</dd>
4721 <h4 class=
"returnvalue">Return Value
</h4>
4722 <p class=
"description">New attribute
</p>
4723 <h4 class=
"discussion">Discussion
</h4>
4724 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4725 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>
4727 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
4728 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
4729 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
4730 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
4731 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
4733 Supported values include enum (
<code>IPP_TAG_ENUM
</code>) and integer
4734 (
<code>IPP_TAG_INTEGER
</code>).
</p>
4735 <h3 class=
"function"><a id=
"ippAddIntegers">ippAddIntegers
</a></h3>
4736 <p class=
"description">Add an array of integer values.
</p>
4738 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddIntegers (
<br>
4739     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4740     ipp_tag_t group,
<br>
4741     ipp_tag_t value_tag,
<br>
4742     const char *name,
<br>
4743     int num_values,
<br>
4744     const int *values
<br>
4746 <h4 class=
"parameters">Parameters
</h4>
4749 <dd class=
"description">IPP message
</dd>
4751 <dd class=
"description">IPP group
</dd>
4753 <dd class=
"description">Type of attribute
</dd>
4755 <dd class=
"description">Name of attribute
</dd>
4757 <dd class=
"description">Number of values
</dd>
4759 <dd class=
"description">Values
</dd>
4761 <h4 class=
"returnvalue">Return Value
</h4>
4762 <p class=
"description">New attribute
</p>
4763 <h4 class=
"discussion">Discussion
</h4>
4764 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4765 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>
4767 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
4768 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
4769 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
4770 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
4771 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
4773 Supported values include enum (
<code>IPP_TAG_ENUM
</code>) and integer
4774 (
<code>IPP_TAG_INTEGER
</code>).
</p>
4775 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ippAddOctetString">ippAddOctetString
</a></h3>
4776 <p class=
"description">Add an octetString value to an IPP message.
</p>
4778 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddOctetString (
<br>
4779     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4780     ipp_tag_t group,
<br>
4781     const char *name,
<br>
4782     const void *data,
<br>
4783     int datalen
<br>
4785 <h4 class=
"parameters">Parameters
</h4>
4788 <dd class=
"description">IPP message
</dd>
4790 <dd class=
"description">IPP group
</dd>
4792 <dd class=
"description">Name of attribute
</dd>
4794 <dd class=
"description">octetString data
</dd>
4796 <dd class=
"description">Length of data in bytes
</dd>
4798 <h4 class=
"returnvalue">Return Value
</h4>
4799 <p class=
"description">New attribute
</p>
4800 <h4 class=
"discussion">Discussion
</h4>
4801 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4802 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>
4804 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
4805 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
4806 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
4807 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
4808 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
4811 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippAddOutOfBand">ippAddOutOfBand
</a></h3>
4812 <p class=
"description">Add an out-of-band value to an IPP message.
</p>
4814 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddOutOfBand (
<br>
4815     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4816     ipp_tag_t group,
<br>
4817     ipp_tag_t value_tag,
<br>
4818     const char *name
<br>
4820 <h4 class=
"parameters">Parameters
</h4>
4823 <dd class=
"description">IPP message
</dd>
4825 <dd class=
"description">IPP group
</dd>
4827 <dd class=
"description">Type of attribute
</dd>
4829 <dd class=
"description">Name of attribute
</dd>
4831 <h4 class=
"returnvalue">Return Value
</h4>
4832 <p class=
"description">New attribute
</p>
4833 <h4 class=
"discussion">Discussion
</h4>
4834 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4835 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>
4837 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
4838 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
4839 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
4840 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
4841 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
4843 Supported out-of-band values include unsupported-value
4844 (
<code>IPP_TAG_UNSUPPORTED_VALUE
</code>), default (
<code>IPP_TAG_DEFAULT
</code>), unknown
4845 (
<code>IPP_TAG_UNKNOWN
</code>), no-value (
<code>IPP_TAG_NOVALUE
</code>), not-settable
4846 (
<code>IPP_TAG_NOTSETTABLE
</code>), delete-attribute (
<code>IPP_TAG_DELETEATTR
</code>), and
4847 admin-define (
<code>IPP_TAG_ADMINDEFINE
</code>).
4850 <h3 class=
"function"><a id=
"ippAddRange">ippAddRange
</a></h3>
4851 <p class=
"description">Add a range of values to an IPP message.
</p>
4853 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRange (
<br>
4854     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4855     ipp_tag_t group,
<br>
4856     const char *name,
<br>
4857     int lower,
<br>
4858     int upper
<br>
4860 <h4 class=
"parameters">Parameters
</h4>
4863 <dd class=
"description">IPP message
</dd>
4865 <dd class=
"description">IPP group
</dd>
4867 <dd class=
"description">Name of attribute
</dd>
4869 <dd class=
"description">Lower value
</dd>
4871 <dd class=
"description">Upper value
</dd>
4873 <h4 class=
"returnvalue">Return Value
</h4>
4874 <p class=
"description">New attribute
</p>
4875 <h4 class=
"discussion">Discussion
</h4>
4876 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4877 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>
4879 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
4880 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
4881 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
4882 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
4883 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
4885 The
<code>lower
</code> parameter must be less than or equal to the
<code>upper
</code> parameter.
</p>
4886 <h3 class=
"function"><a id=
"ippAddRanges">ippAddRanges
</a></h3>
4887 <p class=
"description">Add ranges of values to an IPP message.
</p>
4889 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRanges (
<br>
4890     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4891     ipp_tag_t group,
<br>
4892     const char *name,
<br>
4893     int num_values,
<br>
4894     const int *lower,
<br>
4895     const int *upper
<br>
4897 <h4 class=
"parameters">Parameters
</h4>
4900 <dd class=
"description">IPP message
</dd>
4902 <dd class=
"description">IPP group
</dd>
4904 <dd class=
"description">Name of attribute
</dd>
4906 <dd class=
"description">Number of values
</dd>
4908 <dd class=
"description">Lower values
</dd>
4910 <dd class=
"description">Upper values
</dd>
4912 <h4 class=
"returnvalue">Return Value
</h4>
4913 <p class=
"description">New attribute
</p>
4914 <h4 class=
"discussion">Discussion
</h4>
4915 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4916 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>
4918 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
4919 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
4920 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
4921 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
4922 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
4923 <h3 class=
"function"><a id=
"ippAddResolution">ippAddResolution
</a></h3>
4924 <p class=
"description">Add a resolution value to an IPP message.
</p>
4926 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolution (
<br>
4927     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4928     ipp_tag_t group,
<br>
4929     const char *name,
<br>
4930     <a href=
"#ipp_res_t">ipp_res_t
</a> units,
<br>
4931     int xres,
<br>
4932     int yres
<br>
4934 <h4 class=
"parameters">Parameters
</h4>
4937 <dd class=
"description">IPP message
</dd>
4939 <dd class=
"description">IPP group
</dd>
4941 <dd class=
"description">Name of attribute
</dd>
4943 <dd class=
"description">Units for resolution
</dd>
4945 <dd class=
"description">X resolution
</dd>
4947 <dd class=
"description">Y resolution
</dd>
4949 <h4 class=
"returnvalue">Return Value
</h4>
4950 <p class=
"description">New attribute
</p>
4951 <h4 class=
"discussion">Discussion
</h4>
4952 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4953 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>
4955 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
4956 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
4957 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
4958 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
4959 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
4960 <h3 class=
"function"><a id=
"ippAddResolutions">ippAddResolutions
</a></h3>
4961 <p class=
"description">Add resolution values to an IPP message.
</p>
4963 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolutions (
<br>
4964     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4965     ipp_tag_t group,
<br>
4966     const char *name,
<br>
4967     int num_values,
<br>
4968     <a href=
"#ipp_res_t">ipp_res_t
</a> units,
<br>
4969     const int *xres,
<br>
4970     const int *yres
<br>
4972 <h4 class=
"parameters">Parameters
</h4>
4975 <dd class=
"description">IPP message
</dd>
4977 <dd class=
"description">IPP group
</dd>
4979 <dd class=
"description">Name of attribute
</dd>
4981 <dd class=
"description">Number of values
</dd>
4983 <dd class=
"description">Units for resolution
</dd>
4985 <dd class=
"description">X resolutions
</dd>
4987 <dd class=
"description">Y resolutions
</dd>
4989 <h4 class=
"returnvalue">Return Value
</h4>
4990 <p class=
"description">New attribute
</p>
4991 <h4 class=
"discussion">Discussion
</h4>
4992 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4993 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
4995 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
4996 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
4997 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
4998 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
4999 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
5000 <h3 class=
"function"><a id=
"ippAddSeparator">ippAddSeparator
</a></h3>
5001 <p class=
"description">Add a group separator to an IPP message.
</p>
5003 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddSeparator (
<br>
5004     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5006 <h4 class=
"parameters">Parameters
</h4>
5009 <dd class=
"description">IPP message
</dd>
5011 <h4 class=
"returnvalue">Return Value
</h4>
5012 <p class=
"description">New attribute
</p>
5013 <h4 class=
"discussion">Discussion
</h4>
5014 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5015 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>
5016 <h3 class=
"function"><a id=
"ippAddString">ippAddString
</a></h3>
5017 <p class=
"description">Add a language-encoded string to an IPP message.
</p>
5019 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddString (
<br>
5020     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5021     ipp_tag_t group,
<br>
5022     ipp_tag_t value_tag,
<br>
5023     const char *name,
<br>
5024     const char *language,
<br>
5025     const char *value
<br>
5027 <h4 class=
"parameters">Parameters
</h4>
5030 <dd class=
"description">IPP message
</dd>
5032 <dd class=
"description">IPP group
</dd>
5034 <dd class=
"description">Type of attribute
</dd>
5036 <dd class=
"description">Name of attribute
</dd>
5038 <dd class=
"description">Language code
</dd>
5040 <dd class=
"description">Value
</dd>
5042 <h4 class=
"returnvalue">Return Value
</h4>
5043 <p class=
"description">New attribute
</p>
5044 <h4 class=
"discussion">Discussion
</h4>
5045 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5046 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>
5048 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
5049 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
5050 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
5051 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
5052 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
5054 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
5055 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
5056 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
5057 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
5058 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
5059 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
5061 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage and
5062 textWithLanguage string values and must be
<code>NULL
</code> for all other string values.
</p>
5063 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippAddStringf">ippAddStringf
</a></h3>
5064 <p class=
"description">Add a formatted string to an IPP message.
</p>
5066 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddStringf (
<br>
5067     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5068     ipp_tag_t group,
<br>
5069     ipp_tag_t value_tag,
<br>
5070     const char *name,
<br>
5071     const char *language,
<br>
5072     const char *format,
<br>
5073     ...
<br>
5075 <h4 class=
"parameters">Parameters
</h4>
5078 <dd class=
"description">IPP message
</dd>
5080 <dd class=
"description">IPP group
</dd>
5082 <dd class=
"description">Type of attribute
</dd>
5084 <dd class=
"description">Name of attribute
</dd>
5086 <dd class=
"description">Language code (
<code>NULL
</code> for default)
</dd>
5088 <dd class=
"description">Printf-style format string
</dd>
5090 <dd class=
"description">Additional arguments as needed
</dd>
5092 <h4 class=
"returnvalue">Return Value
</h4>
5093 <p class=
"description">New attribute
</p>
5094 <h4 class=
"discussion">Discussion
</h4>
5095 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5096 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>
5098 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
5099 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document
5100 (
<code>IPP_TAG_DOCUMENT
</code>), event notification
5101 (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation (
<code>IPP_TAG_OPERATION
</code>),
5102 printer (
<code>IPP_TAG_PRINTER
</code>), subscription (
<code>IPP_TAG_SUBSCRIPTION
</code>),
5103 or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
5105 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
5106 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
5107 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
5108 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
5109 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
5110 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
5112 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage
5113 and textWithLanguage string values and must be
<code>NULL
</code> for all other
5116 The
<code>format
</code> parameter uses formatting characters compatible with the
5117 printf family of standard functions. Additional arguments follow it as
5118 needed. The formatted string is truncated as needed to the maximum length of
5119 the corresponding value type.
5122 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippAddStringfv">ippAddStringfv
</a></h3>
5123 <p class=
"description">Add a formatted string to an IPP message.
</p>
5125 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddStringfv (
<br>
5126     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5127     ipp_tag_t group,
<br>
5128     ipp_tag_t value_tag,
<br>
5129     const char *name,
<br>
5130     const char *language,
<br>
5131     const char *format,
<br>
5132     va_list ap
<br>
5134 <h4 class=
"parameters">Parameters
</h4>
5137 <dd class=
"description">IPP message
</dd>
5139 <dd class=
"description">IPP group
</dd>
5141 <dd class=
"description">Type of attribute
</dd>
5143 <dd class=
"description">Name of attribute
</dd>
5145 <dd class=
"description">Language code (
<code>NULL
</code> for default)
</dd>
5147 <dd class=
"description">Printf-style format string
</dd>
5149 <dd class=
"description">Additional arguments
</dd>
5151 <h4 class=
"returnvalue">Return Value
</h4>
5152 <p class=
"description">New attribute
</p>
5153 <h4 class=
"discussion">Discussion
</h4>
5154 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5155 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>
5157 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
5158 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document
5159 (
<code>IPP_TAG_DOCUMENT
</code>), event notification
5160 (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation (
<code>IPP_TAG_OPERATION
</code>),
5161 printer (
<code>IPP_TAG_PRINTER
</code>), subscription (
<code>IPP_TAG_SUBSCRIPTION
</code>),
5162 or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
5164 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
5165 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
5166 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
5167 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
5168 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
5169 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
5171 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage
5172 and textWithLanguage string values and must be
<code>NULL
</code> for all other
5175 The
<code>format
</code> parameter uses formatting characters compatible with the
5176 printf family of standard functions. Additional arguments are passed in the
5177 stdarg pointer
<code>ap
</code>. The formatted string is truncated as needed to the
5178 maximum length of the corresponding value type.
5181 <h3 class=
"function"><a id=
"ippAddStrings">ippAddStrings
</a></h3>
5182 <p class=
"description">Add language-encoded strings to an IPP message.
</p>
5184 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddStrings (
<br>
5185     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5186     ipp_tag_t group,
<br>
5187     ipp_tag_t value_tag,
<br>
5188     const char *name,
<br>
5189     int num_values,
<br>
5190     const char *language,
<br>
5191     const char *const *values
<br>
5193 <h4 class=
"parameters">Parameters
</h4>
5196 <dd class=
"description">IPP message
</dd>
5198 <dd class=
"description">IPP group
</dd>
5200 <dd class=
"description">Type of attribute
</dd>
5202 <dd class=
"description">Name of attribute
</dd>
5204 <dd class=
"description">Number of values
</dd>
5206 <dd class=
"description">Language code (
<code>NULL
</code> for default)
</dd>
5208 <dd class=
"description">Values
</dd>
5210 <h4 class=
"returnvalue">Return Value
</h4>
5211 <p class=
"description">New attribute
</p>
5212 <h4 class=
"discussion">Discussion
</h4>
5213 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5214 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>
5216 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
5217 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
5218 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
5219 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
5220 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
5222 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
5223 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
5224 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
5225 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
5226 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
5227 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
5229 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage and
5230 textWithLanguage string values and must be
<code>NULL
</code> for all other string values.
</p>
5231 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippAttributeString">ippAttributeString
</a></h3>
5232 <p class=
"description">Convert the attribute's value to a string.
</p>
5234 size_t ippAttributeString (
<br>
5235     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
5236     char *buffer,
<br>
5237     size_t bufsize
<br>
5239 <h4 class=
"parameters">Parameters
</h4>
5242 <dd class=
"description">Attribute
</dd>
5244 <dd class=
"description">String buffer or NULL
</dd>
5246 <dd class=
"description">Size of string buffer
</dd>
5248 <h4 class=
"returnvalue">Return Value
</h4>
5249 <p class=
"description">Number of bytes less nul
</p>
5250 <h4 class=
"discussion">Discussion
</h4>
5251 <p class=
"discussion">Returns the number of bytes that would be written, not including the
5252 trailing nul. The buffer pointer can be NULL to get the required length,
5253 just like (v)snprintf.
5256 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippContainsInteger">ippContainsInteger
</a></h3>
5257 <p class=
"description">Determine whether an attribute contains the
5258 specified value or is within the list of ranges.
</p>
5260 int ippContainsInteger (
<br>
5261     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
5262     int value
<br>
5264 <h4 class=
"parameters">Parameters
</h4>
5267 <dd class=
"description">Attribute
</dd>
5269 <dd class=
"description">Integer/enum value
</dd>
5271 <h4 class=
"returnvalue">Return Value
</h4>
5272 <p class=
"description">1 on a match,
0 on no match
</p>
5273 <h4 class=
"discussion">Discussion
</h4>
5274 <p class=
"discussion">Returns non-zero when the attribute contains either a matching integer or
5275 enum value, or the value falls within one of the rangeOfInteger values for
5279 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippContainsString">ippContainsString
</a></h3>
5280 <p class=
"description">Determine whether an attribute contains the
5281 specified string value.
</p>
5283 int ippContainsString (
<br>
5284     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
5285     const char *value
<br>
5287 <h4 class=
"parameters">Parameters
</h4>
5290 <dd class=
"description">Attribute
</dd>
5292 <dd class=
"description">String value
</dd>
5294 <h4 class=
"returnvalue">Return Value
</h4>
5295 <p class=
"description">1 on a match,
0 on no match
</p>
5296 <h4 class=
"discussion">Discussion
</h4>
5297 <p class=
"discussion">Returns non-zero when the attribute contains a matching charset, keyword,
5298 language, mimeMediaType, name, text, URI, or URI scheme value.
5301 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippCopyAttribute">ippCopyAttribute
</a></h3>
5302 <p class=
"description">Copy an attribute.
</p>
5304 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippCopyAttribute (
<br>
5305     <a href=
"#ipp_t">ipp_t
</a> *dst,
<br>
5306     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *srcattr,
<br>
5307     int quickcopy
<br>
5309 <h4 class=
"parameters">Parameters
</h4>
5312 <dd class=
"description">Destination IPP message
</dd>
5314 <dd class=
"description">Attribute to copy
</dd>
5316 <dd class=
"description">1 for a referenced copy,
0 for normal
</dd>
5318 <h4 class=
"returnvalue">Return Value
</h4>
5319 <p class=
"description">New attribute
</p>
5320 <h4 class=
"discussion">Discussion
</h4>
5321 <p class=
"discussion">The specified attribute,
<code>attr
</code>, is copied to the destination IPP message.
5322 When
<code>quickcopy
</code> is non-zero, a
"shallow
" reference copy of the attribute is
5323 created - this should only be done as long as the original source IPP message will
5324 not be freed for the life of the destination.
5327 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippCopyAttributes">ippCopyAttributes
</a></h3>
5328 <p class=
"description">Copy attributes from one IPP message to another.
</p>
5330 int ippCopyAttributes (
<br>
5331     <a href=
"#ipp_t">ipp_t
</a> *dst,
<br>
5332     <a href=
"#ipp_t">ipp_t
</a> *src,
<br>
5333     int quickcopy,
<br>
5334     <a href=
"#ipp_copycb_t">ipp_copycb_t
</a> cb,
<br>
5335     void *context
<br>
5337 <h4 class=
"parameters">Parameters
</h4>
5340 <dd class=
"description">Destination IPP message
</dd>
5342 <dd class=
"description">Source IPP message
</dd>
5344 <dd class=
"description">1 for a referenced copy,
0 for normal
</dd>
5346 <dd class=
"description">Copy callback or
<code>NULL
</code> for none
</dd>
5348 <dd class=
"description">Context pointer
</dd>
5350 <h4 class=
"returnvalue">Return Value
</h4>
5351 <p class=
"description">1 on success,
0 on error
</p>
5352 <h4 class=
"discussion">Discussion
</h4>
5353 <p class=
"discussion">Zero or more attributes are copied from the source IPP message,
<code>src
</code>, to the
5354 destination IPP message,
<code>dst
</code>. When
<code>quickcopy
</code> is non-zero, a
"shallow
"
5355 reference copy of the attribute is created - this should only be done as long as the
5356 original source IPP message will not be freed for the life of the destination.
<br>
5358 The
<code>cb
</code> and
<code>context
</code> parameters provide a generic way to
"filter
" the
5359 attributes that are copied - the function must return
1 to copy the attribute or
5360 0 to skip it. The function may also choose to do a partial copy of the source attribute
5364 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippCreateRequestedArray">ippCreateRequestedArray
</a></h3>
5365 <p class=
"description">Create a CUPS array of attribute names from the
5366 given requested-attributes attribute.
</p>
5368 cups_array_t *ippCreateRequestedArray (
<br>
5369     <a href=
"#ipp_t">ipp_t
</a> *request
<br>
5371 <h4 class=
"parameters">Parameters
</h4>
5374 <dd class=
"description">IPP request
</dd>
5376 <h4 class=
"returnvalue">Return Value
</h4>
5377 <p class=
"description">CUPS array or
<code>NULL
</code> if all
</p>
5378 <h4 class=
"discussion">Discussion
</h4>
5379 <p class=
"discussion">This function creates a (sorted) CUPS array of attribute names matching the
5380 list of
"requested-attribute
" values supplied in an IPP request. All IANA-
5381 registered values are supported in addition to the CUPS IPP extension
5384 The
<code>request
</code> parameter specifies the request message that was read from
5387 <code>NULL
</code> is returned if all attributes should be returned. Otherwise, the
5388 result is a sorted array of attribute names, where
<code>cupsArrayFind(array,
5389 "attribute-name")
</code> will return a non-NULL pointer. The array must be freed
5390 using the
<code>cupsArrayDelete
</code> function.
5393 <h3 class=
"function"><a id=
"ippDateToTime">ippDateToTime
</a></h3>
5394 <p class=
"description">Convert from RFC
1903 Date/Time format to UNIX time
5397 time_t ippDateToTime (
<br>
5398     const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *date
<br>
5400 <h4 class=
"parameters">Parameters
</h4>
5403 <dd class=
"description">RFC
1903 date info
</dd>
5405 <h4 class=
"returnvalue">Return Value
</h4>
5406 <p class=
"description">UNIX time value
</p>
5407 <h3 class=
"function"><a id=
"ippDelete">ippDelete
</a></h3>
5408 <p class=
"description">RFC-
1903 date/time format is:
</p>
5410 void ippDelete (
<br>
5411     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5413 <h4 class=
"parameters">Parameters
</h4>
5416 <dd class=
"description">IPP message
</dd>
5418 <h4 class=
"returnvalue">Return Value
</h4>
5419 <p class=
"description">Delete an IPP message.
</p>
5420 <h4 class=
"discussion">Discussion
</h4>
5421 <p class=
"discussion">Byte(s) Description
5423 0-
1 Year (
0 to
65535)
5428 6 Seconds (
0 to
60,
60 =
"leap second
")
5429 7 Deciseconds (
0 to
9)
5431 9 UTC hours (
0 to
11)
5432 10 UTC minutes (
0 to
59)
</p>
5433 <h3 class=
"function"><a id=
"ippDeleteAttribute">ippDeleteAttribute
</a></h3>
5434 <p class=
"description">Next attribute
</p>
5436 void ippDeleteAttribute (
<br>
5437     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5438     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
5440 <h4 class=
"parameters">Parameters
</h4>
5443 <dd class=
"description">IPP message
</dd>
5445 <dd class=
"description">Attribute to delete
</dd>
5447 <h4 class=
"returnvalue">Return Value
</h4>
5448 <p class=
"description">Delete a single attribute in an IPP message.
</p>
5449 <p class=
"discussion"></p>
5450 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippDeleteValues">ippDeleteValues
</a></h3>
5451 <p class=
"description">Delete values in an attribute.
</p>
5453 int ippDeleteValues (
<br>
5454     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5455     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
5456     int element,
<br>
5457     int count
<br>
5459 <h4 class=
"parameters">Parameters
</h4>
5462 <dd class=
"description">IPP message
</dd>
5464 <dd class=
"description">Attribute
</dd>
5466 <dd class=
"description">Index of first value to delete (
0-based)
</dd>
5468 <dd class=
"description">Number of values to delete
</dd>
5470 <h4 class=
"returnvalue">Return Value
</h4>
5471 <p class=
"description">1 on success,
0 on failure
</p>
5472 <h4 class=
"discussion">Discussion
</h4>
5473 <p class=
"discussion">The
<code>element
</code> parameter specifies the first value to delete, starting at
5474 0. It must be less than the number of values returned by
<a href=
"#ippGetCount"><code>ippGetCount
</code></a>.
<br>
5476 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5478 Deleting all values in an attribute deletes the attribute.
5481 <h3 class=
"function"><a id=
"ippEnumString">ippEnumString
</a></h3>
5482 <p class=
"description">Return a string corresponding to the enum value.
</p>
5484 const char *ippEnumString (
<br>
5485     const char *attrname,
<br>
5486     int enumvalue
<br>
5488 <h4 class=
"parameters">Parameters
</h4>
5491 <dd class=
"description">Attribute name
</dd>
5493 <dd class=
"description">Enum value
</dd>
5495 <h4 class=
"returnvalue">Return Value
</h4>
5496 <p class=
"description">Enum string
</p>
5497 <h3 class=
"function"><a id=
"ippEnumValue">ippEnumValue
</a></h3>
5498 <p class=
"description">Return the value associated with a given enum string.
</p>
5500 int ippEnumValue (
<br>
5501     const char *attrname,
<br>
5502     const char *enumstring
<br>
5504 <h4 class=
"parameters">Parameters
</h4>
5507 <dd class=
"description">Attribute name
</dd>
5509 <dd class=
"description">Enum string
</dd>
5511 <h4 class=
"returnvalue">Return Value
</h4>
5512 <p class=
"description">Enum value or -
1 if unknown
</p>
5513 <h3 class=
"function"><a id=
"ippErrorString">ippErrorString
</a></h3>
5514 <p class=
"description">Return a name for the given status code.
</p>
5516 const char *ippErrorString (
<br>
5517     ipp_status_t error
<br>
5519 <h4 class=
"parameters">Parameters
</h4>
5522 <dd class=
"description">Error status
</dd>
5524 <h4 class=
"returnvalue">Return Value
</h4>
5525 <p class=
"description">Text string
</p>
5526 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ippErrorValue">ippErrorValue
</a></h3>
5527 <p class=
"description">Return a status code for the given name.
</p>
5529 ipp_status_t ippErrorValue (
<br>
5530     const char *name
<br>
5532 <h4 class=
"parameters">Parameters
</h4>
5535 <dd class=
"description">Name
</dd>
5537 <h4 class=
"returnvalue">Return Value
</h4>
5538 <p class=
"description">IPP status code
</p>
5539 <h3 class=
"function"><a id=
"ippFindAttribute">ippFindAttribute
</a></h3>
5540 <p class=
"description">Find a named attribute in a request.
</p>
5542 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindAttribute (
<br>
5543     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5544     const char *name,
<br>
5545     ipp_tag_t type
<br>
5547 <h4 class=
"parameters">Parameters
</h4>
5550 <dd class=
"description">IPP message
</dd>
5552 <dd class=
"description">Name of attribute
</dd>
5554 <dd class=
"description">Type of attribute
</dd>
5556 <h4 class=
"returnvalue">Return Value
</h4>
5557 <p class=
"description">Matching attribute
</p>
5558 <h4 class=
"discussion">Discussion
</h4>
5559 <p class=
"discussion">Starting with CUPS
2.0, the attribute name can contain a hierarchical list
5560 of attribute and member names separated by slashes, for example
5561 "media-col/media-size
".
</p>
5562 <h3 class=
"function"><a id=
"ippFindNextAttribute">ippFindNextAttribute
</a></h3>
5563 <p class=
"description">Find the next named attribute in a request.
</p>
5565 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindNextAttribute (
<br>
5566     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5567     const char *name,
<br>
5568     ipp_tag_t type
<br>
5570 <h4 class=
"parameters">Parameters
</h4>
5573 <dd class=
"description">IPP message
</dd>
5575 <dd class=
"description">Name of attribute
</dd>
5577 <dd class=
"description">Type of attribute
</dd>
5579 <h4 class=
"returnvalue">Return Value
</h4>
5580 <p class=
"description">Matching attribute
</p>
5581 <h4 class=
"discussion">Discussion
</h4>
5582 <p class=
"discussion">Starting with CUPS
2.0, the attribute name can contain a hierarchical list
5583 of attribute and member names separated by slashes, for example
5584 "media-col/media-size
".
</p>
5585 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippFirstAttribute">ippFirstAttribute
</a></h3>
5586 <p class=
"description">Return the first attribute in the message.
</p>
5588 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFirstAttribute (
<br>
5589     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5591 <h4 class=
"parameters">Parameters
</h4>
5594 <dd class=
"description">IPP message
</dd>
5596 <h4 class=
"returnvalue">Return Value
</h4>
5597 <p class=
"description">First attribute or
<code>NULL
</code> if none
</p>
5598 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetBoolean">ippGetBoolean
</a></h3>
5599 <p class=
"description">Get a boolean value for an attribute.
</p>
5601 int ippGetBoolean (
<br>
5602     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
5603     int element
<br>
5605 <h4 class=
"parameters">Parameters
</h4>
5608 <dd class=
"description">IPP attribute
</dd>
5610 <dd class=
"description">Value number (
0-based)
</dd>
5612 <h4 class=
"returnvalue">Return Value
</h4>
5613 <p class=
"description">Boolean value or
0 on error
</p>
5614 <h4 class=
"discussion">Discussion
</h4>
5615 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
5616 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
5619 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetCollection">ippGetCollection
</a></h3>
5620 <p class=
"description">Get a collection value for an attribute.
</p>
5622 <a href=
"#ipp_t">ipp_t
</a> *ippGetCollection (
<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">Collection value or
<code>NULL
</code> 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=
"ippGetCount">ippGetCount
</a></h3>
5641 <p class=
"description">Get the number of values in an attribute.
</p>
5643 int ippGetCount (
<br>
5644     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
5646 <h4 class=
"parameters">Parameters
</h4>
5649 <dd class=
"description">IPP attribute
</dd>
5651 <h4 class=
"returnvalue">Return Value
</h4>
5652 <p class=
"description">Number of values or
0 on error
</p>
5653 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetDate">ippGetDate
</a></h3>
5654 <p class=
"description">Get a date value for an attribute.
</p>
5656 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *ippGetDate (
<br>
5657     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
5658     int element
<br>
5660 <h4 class=
"parameters">Parameters
</h4>
5663 <dd class=
"description">IPP attribute
</dd>
5665 <dd class=
"description">Value number (
0-based)
</dd>
5667 <h4 class=
"returnvalue">Return Value
</h4>
5668 <p class=
"description">Date value or
<code>NULL
</code></p>
5669 <h4 class=
"discussion">Discussion
</h4>
5670 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
5671 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
5674 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetGroupTag">ippGetGroupTag
</a></h3>
5675 <p class=
"description">Get the group associated with an attribute.
</p>
5677 ipp_tag_t ippGetGroupTag (
<br>
5678     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
5680 <h4 class=
"parameters">Parameters
</h4>
5683 <dd class=
"description">IPP attribute
</dd>
5685 <h4 class=
"returnvalue">Return Value
</h4>
5686 <p class=
"description">Group tag or
<code>IPP_TAG_ZERO
</code> on error
</p>
5687 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetInteger">ippGetInteger
</a></h3>
5688 <p class=
"description">Get the integer/enum value for an attribute.
</p>
5690 int ippGetInteger (
<br>
5691     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
5692     int element
<br>
5694 <h4 class=
"parameters">Parameters
</h4>
5697 <dd class=
"description">IPP attribute
</dd>
5699 <dd class=
"description">Value number (
0-based)
</dd>
5701 <h4 class=
"returnvalue">Return Value
</h4>
5702 <p class=
"description">Value or
0 on error
</p>
5703 <h4 class=
"discussion">Discussion
</h4>
5704 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
5705 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
5708 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetName">ippGetName
</a></h3>
5709 <p class=
"description">Get the attribute name.
</p>
5711 const char *ippGetName (
<br>
5712     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
5714 <h4 class=
"parameters">Parameters
</h4>
5717 <dd class=
"description">IPP attribute
</dd>
5719 <h4 class=
"returnvalue">Return Value
</h4>
5720 <p class=
"description">Attribute name or
<code>NULL
</code> for separators
</p>
5721 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippGetOctetString">ippGetOctetString
</a></h3>
5722 <p class=
"description">Get an octetString value from an IPP attribute.
</p>
5724 void *ippGetOctetString (
<br>
5725     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
5726     int element,
<br>
5727     int *datalen
<br>
5729 <h4 class=
"parameters">Parameters
</h4>
5732 <dd class=
"description">IPP attribute
</dd>
5734 <dd class=
"description">Value number (
0-based)
</dd>
5736 <dd class=
"description">Length of octetString data
</dd>
5738 <h4 class=
"returnvalue">Return Value
</h4>
5739 <p class=
"description">Pointer to octetString data
</p>
5740 <h4 class=
"discussion">Discussion
</h4>
5741 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
5742 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
5745 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetOperation">ippGetOperation
</a></h3>
5746 <p class=
"description">Get the operation ID in an IPP message.
</p>
5748 ipp_op_t ippGetOperation (
<br>
5749     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5751 <h4 class=
"parameters">Parameters
</h4>
5754 <dd class=
"description">IPP request message
</dd>
5756 <h4 class=
"returnvalue">Return Value
</h4>
5757 <p class=
"description">Operation ID or
0 on error
</p>
5758 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetRange">ippGetRange
</a></h3>
5759 <p class=
"description">Get a rangeOfInteger value from an attribute.
</p>
5761 int ippGetRange (
<br>
5762     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
5763     int element,
<br>
5764     int *uppervalue
<br>
5766 <h4 class=
"parameters">Parameters
</h4>
5769 <dd class=
"description">IPP attribute
</dd>
5771 <dd class=
"description">Value number (
0-based)
</dd>
5773 <dd class=
"description">Upper value of range
</dd>
5775 <h4 class=
"returnvalue">Return Value
</h4>
5776 <p class=
"description">Lower value of range or
0</p>
5777 <h4 class=
"discussion">Discussion
</h4>
5778 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
5779 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
5782 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetRequestId">ippGetRequestId
</a></h3>
5783 <p class=
"description">Get the request ID from an IPP message.
</p>
5785 int ippGetRequestId (
<br>
5786     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5788 <h4 class=
"parameters">Parameters
</h4>
5791 <dd class=
"description">IPP message
</dd>
5793 <h4 class=
"returnvalue">Return Value
</h4>
5794 <p class=
"description">Request ID or
0 on error
</p>
5795 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetResolution">ippGetResolution
</a></h3>
5796 <p class=
"description">Get a resolution value for an attribute.
</p>
5798 int ippGetResolution (
<br>
5799     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
5800     int element,
<br>
5801     int *yres,
<br>
5802     <a href=
"#ipp_res_t">ipp_res_t
</a> *units
<br>
5804 <h4 class=
"parameters">Parameters
</h4>
5807 <dd class=
"description">IPP attribute
</dd>
5809 <dd class=
"description">Value number (
0-based)
</dd>
5811 <dd class=
"description">Vertical/feed resolution
</dd>
5813 <dd class=
"description">Units for resolution
</dd>
5815 <h4 class=
"returnvalue">Return Value
</h4>
5816 <p class=
"description">Horizontal/cross feed resolution or
0</p>
5817 <h4 class=
"discussion">Discussion
</h4>
5818 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
5819 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
5822 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetState">ippGetState
</a></h3>
5823 <p class=
"description">Get the IPP message state.
</p>
5825 <a href=
"#ipp_state_t">ipp_state_t
</a> ippGetState (
<br>
5826     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5828 <h4 class=
"parameters">Parameters
</h4>
5831 <dd class=
"description">IPP message
</dd>
5833 <h4 class=
"returnvalue">Return Value
</h4>
5834 <p class=
"description">IPP message state value
</p>
5835 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetStatusCode">ippGetStatusCode
</a></h3>
5836 <p class=
"description">Get the status code from an IPP response or event message.
</p>
5838 ipp_status_t ippGetStatusCode (
<br>
5839     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5841 <h4 class=
"parameters">Parameters
</h4>
5844 <dd class=
"description">IPP response or event message
</dd>
5846 <h4 class=
"returnvalue">Return Value
</h4>
5847 <p class=
"description">Status code in IPP message
</p>
5848 <h3 class=
"function"><a id=
"ippGetString">ippGetString
</a></h3>
5849 <p class=
"description">Return the value...
</p>
5851 const char *ippGetString (
<br>
5852     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
5853     int element,
<br>
5854     const char **language
<br>
5856 <h4 class=
"parameters">Parameters
</h4>
5859 <dd class=
"description">IPP attribute
</dd>
5861 <dd class=
"description">Value number (
0-based)
</dd>
5863 <dd class=
"description">Language code (
<code>NULL
</code> for don't care)
</dd>
5865 <h4 class=
"returnvalue">Return Value
</h4>
5866 <p class=
"description">Get the string and optionally the language code for an attribute.
</p>
5867 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
5868 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
5871 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetValueTag">ippGetValueTag
</a></h3>
5872 <p class=
"description">Get the value tag for an attribute.
</p>
5874 ipp_tag_t ippGetValueTag (
<br>
5875     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
5877 <h4 class=
"parameters">Parameters
</h4>
5880 <dd class=
"description">IPP attribute
</dd>
5882 <h4 class=
"returnvalue">Return Value
</h4>
5883 <p class=
"description">Value tag or
<code>IPP_TAG_ZERO
</code> on error
</p>
5884 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetVersion">ippGetVersion
</a></h3>
5885 <p class=
"description">Get the major and minor version number from an IPP message.
</p>
5887 int ippGetVersion (
<br>
5888     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5889     int *minor
<br>
5891 <h4 class=
"parameters">Parameters
</h4>
5894 <dd class=
"description">IPP message
</dd>
5896 <dd class=
"description">Minor version number or
<code>NULL
</code></dd>
5898 <h4 class=
"returnvalue">Return Value
</h4>
5899 <p class=
"description">Major version number or
0 on error
</p>
5900 <h3 class=
"function"><a id=
"ippLength">ippLength
</a></h3>
5901 <p class=
"description">Compute the length of an IPP message.
</p>
5903 size_t ippLength (
<br>
5904     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5906 <h4 class=
"parameters">Parameters
</h4>
5909 <dd class=
"description">IPP message
</dd>
5911 <h4 class=
"returnvalue">Return Value
</h4>
5912 <p class=
"description">Size of IPP message
</p>
5913 <h3 class=
"function"><a id=
"ippNew">ippNew
</a></h3>
5914 <p class=
"description">Allocate a new IPP message.
</p>
5916 <a href=
"#ipp_t">ipp_t
</a> *ippNew (void);
</p>
5917 <h4 class=
"returnvalue">Return Value
</h4>
5918 <p class=
"description">New IPP message
</p>
5919 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ippNewRequest">ippNewRequest
</a></h3>
5920 <p class=
"description">Allocate a new IPP request message.
</p>
5922 <a href=
"#ipp_t">ipp_t
</a> *ippNewRequest (
<br>
5923     ipp_op_t op
<br>
5925 <h4 class=
"parameters">Parameters
</h4>
5928 <dd class=
"description">Operation code
</dd>
5930 <h4 class=
"returnvalue">Return Value
</h4>
5931 <p class=
"description">IPP request message
</p>
5932 <h4 class=
"discussion">Discussion
</h4>
5933 <p class=
"discussion">The new request message is initialized with the attributes-charset and
5934 attributes-natural-language attributes added. The
5935 attributes-natural-language value is derived from the current locale.
5938 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippNewResponse">ippNewResponse
</a></h3>
5939 <p class=
"description">Allocate a new IPP response message.
</p>
5941 <a href=
"#ipp_t">ipp_t
</a> *ippNewResponse (
<br>
5942     <a href=
"#ipp_t">ipp_t
</a> *request
<br>
5944 <h4 class=
"parameters">Parameters
</h4>
5947 <dd class=
"description">IPP request message
</dd>
5949 <h4 class=
"returnvalue">Return Value
</h4>
5950 <p class=
"description">IPP response message
</p>
5951 <h4 class=
"discussion">Discussion
</h4>
5952 <p class=
"discussion">The new response message is initialized with the same version-number,
5953 request-id, attributes-charset, and attributes-natural-language as the
5954 provided request message. If the attributes-charset or
5955 attributes-natural-language attributes are missing from the request,
5956 "utf-
8" and a value derived from the current locale are substituted,
5960 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippNextAttribute">ippNextAttribute
</a></h3>
5961 <p class=
"description">Return the next attribute in the message.
</p>
5963 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippNextAttribute (
<br>
5964     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5966 <h4 class=
"parameters">Parameters
</h4>
5969 <dd class=
"description">IPP message
</dd>
5971 <h4 class=
"returnvalue">Return Value
</h4>
5972 <p class=
"description">Next attribute or
<code>NULL
</code> if none
</p>
5973 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ippOpString">ippOpString
</a></h3>
5974 <p class=
"description">Return a name for the given operation id.
</p>
5976 const char *ippOpString (
<br>
5977     ipp_op_t op
<br>
5979 <h4 class=
"parameters">Parameters
</h4>
5982 <dd class=
"description">Operation ID
</dd>
5984 <h4 class=
"returnvalue">Return Value
</h4>
5985 <p class=
"description">Name
</p>
5986 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ippOpValue">ippOpValue
</a></h3>
5987 <p class=
"description">Return an operation id for the given name.
</p>
5989 ipp_op_t ippOpValue (
<br>
5990     const char *name
<br>
5992 <h4 class=
"parameters">Parameters
</h4>
5995 <dd class=
"description">Textual name
</dd>
5997 <h4 class=
"returnvalue">Return Value
</h4>
5998 <p class=
"description">Operation ID
</p>
5999 <h3 class=
"function"><a id=
"ippPort">ippPort
</a></h3>
6000 <p class=
"description">Return the default IPP port number.
</p>
6002 int ippPort (void);
</p>
6003 <h4 class=
"returnvalue">Return Value
</h4>
6004 <p class=
"description">Port number
</p>
6005 <h3 class=
"function"><a id=
"ippRead">ippRead
</a></h3>
6006 <p class=
"description">Read data for an IPP message from a HTTP connection.
</p>
6008 <a href=
"#ipp_state_t">ipp_state_t
</a> ippRead (
<br>
6009     <a href=
"#http_t">http_t
</a> *http,
<br>
6010     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
6012 <h4 class=
"parameters">Parameters
</h4>
6015 <dd class=
"description">HTTP connection
</dd>
6017 <dd class=
"description">IPP data
</dd>
6019 <h4 class=
"returnvalue">Return Value
</h4>
6020 <p class=
"description">Current state
</p>
6021 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"ippReadFile">ippReadFile
</a></h3>
6022 <p class=
"description">Read data for an IPP message from a file.
</p>
6024 <a href=
"#ipp_state_t">ipp_state_t
</a> ippReadFile (
<br>
6025     int fd,
<br>
6026     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
6028 <h4 class=
"parameters">Parameters
</h4>
6031 <dd class=
"description">HTTP data
</dd>
6033 <dd class=
"description">IPP data
</dd>
6035 <h4 class=
"returnvalue">Return Value
</h4>
6036 <p class=
"description">Current state
</p>
6037 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ippReadIO">ippReadIO
</a></h3>
6038 <p class=
"description">Read data for an IPP message.
</p>
6040 <a href=
"#ipp_state_t">ipp_state_t
</a> ippReadIO (
<br>
6041     void *src,
<br>
6042     <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br>
6043     int blocking,
<br>
6044     <a href=
"#ipp_t">ipp_t
</a> *parent,
<br>
6045     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
6047 <h4 class=
"parameters">Parameters
</h4>
6050 <dd class=
"description">Data source
</dd>
6052 <dd class=
"description">Read callback function
</dd>
6054 <dd class=
"description">Use blocking IO?
</dd>
6056 <dd class=
"description">Parent request, if any
</dd>
6058 <dd class=
"description">IPP data
</dd>
6060 <h4 class=
"returnvalue">Return Value
</h4>
6061 <p class=
"description">Current state
</p>
6062 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetBoolean">ippSetBoolean
</a></h3>
6063 <p class=
"description">Set a boolean value in an attribute.
</p>
6065 int ippSetBoolean (
<br>
6066     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6067     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6068     int element,
<br>
6069     int boolvalue
<br>
6071 <h4 class=
"parameters">Parameters
</h4>
6074 <dd class=
"description">IPP message
</dd>
6076 <dd class=
"description">IPP attribute
</dd>
6078 <dd class=
"description">Value number (
0-based)
</dd>
6080 <dd class=
"description">Boolean value
</dd>
6082 <h4 class=
"returnvalue">Return Value
</h4>
6083 <p class=
"description">1 on success,
0 on failure
</p>
6084 <h4 class=
"discussion">Discussion
</h4>
6085 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
6086 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>
6088 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
6090 The
<code>element
</code> parameter specifies which value to set from
0 to
6091 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
6094 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetCollection">ippSetCollection
</a></h3>
6095 <p class=
"description">Set a collection value in an attribute.
</p>
6097 int ippSetCollection (
<br>
6098     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6099     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6100     int element,
<br>
6101     <a href=
"#ipp_t">ipp_t
</a> *colvalue
<br>
6103 <h4 class=
"parameters">Parameters
</h4>
6106 <dd class=
"description">IPP message
</dd>
6108 <dd class=
"description">IPP attribute
</dd>
6110 <dd class=
"description">Value number (
0-based)
</dd>
6112 <dd class=
"description">Collection value
</dd>
6114 <h4 class=
"returnvalue">Return Value
</h4>
6115 <p class=
"description">1 on success,
0 on failure
</p>
6116 <h4 class=
"discussion">Discussion
</h4>
6117 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
6118 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>
6120 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
6122 The
<code>element
</code> parameter specifies which value to set from
0 to
6123 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
6126 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetDate">ippSetDate
</a></h3>
6127 <p class=
"description">Set a date value in an attribute.
</p>
6129 int ippSetDate (
<br>
6130     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6131     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6132     int element,
<br>
6133     const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *datevalue
<br>
6135 <h4 class=
"parameters">Parameters
</h4>
6138 <dd class=
"description">IPP message
</dd>
6140 <dd class=
"description">IPP attribute
</dd>
6142 <dd class=
"description">Value number (
0-based)
</dd>
6144 <dd class=
"description">Date value
</dd>
6146 <h4 class=
"returnvalue">Return Value
</h4>
6147 <p class=
"description">1 on success,
0 on failure
</p>
6148 <h4 class=
"discussion">Discussion
</h4>
6149 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
6150 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>
6152 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
6154 The
<code>element
</code> parameter specifies which value to set from
0 to
6155 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
6158 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetGroupTag">ippSetGroupTag
</a></h3>
6159 <p class=
"description">Set the group tag of an attribute.
</p>
6161 int ippSetGroupTag (
<br>
6162     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6163     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6164     ipp_tag_t group_tag
<br>
6166 <h4 class=
"parameters">Parameters
</h4>
6169 <dd class=
"description">IPP message
</dd>
6171 <dd class=
"description">Attribute
</dd>
6173 <dd class=
"description">Group tag
</dd>
6175 <h4 class=
"returnvalue">Return Value
</h4>
6176 <p class=
"description">1 on success,
0 on failure
</p>
6177 <h4 class=
"discussion">Discussion
</h4>
6178 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
6179 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>
6181 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
6183 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
6184 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
6185 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
6186 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
6187 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
6190 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetInteger">ippSetInteger
</a></h3>
6191 <p class=
"description">Set an integer or enum value in an attribute.
</p>
6193 int ippSetInteger (
<br>
6194     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6195     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6196     int element,
<br>
6197     int intvalue
<br>
6199 <h4 class=
"parameters">Parameters
</h4>
6202 <dd class=
"description">IPP message
</dd>
6204 <dd class=
"description">IPP attribute
</dd>
6206 <dd class=
"description">Value number (
0-based)
</dd>
6208 <dd class=
"description">Integer/enum value
</dd>
6210 <h4 class=
"returnvalue">Return Value
</h4>
6211 <p class=
"description">1 on success,
0 on failure
</p>
6212 <h4 class=
"discussion">Discussion
</h4>
6213 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
6214 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>
6216 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
6218 The
<code>element
</code> parameter specifies which value to set from
0 to
6219 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
6222 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetName">ippSetName
</a></h3>
6223 <p class=
"description">Set the name of an attribute.
</p>
6225 int ippSetName (
<br>
6226     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6227     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6228     const char *name
<br>
6230 <h4 class=
"parameters">Parameters
</h4>
6233 <dd class=
"description">IPP message
</dd>
6235 <dd class=
"description">IPP attribute
</dd>
6237 <dd class=
"description">Attribute name
</dd>
6239 <h4 class=
"returnvalue">Return Value
</h4>
6240 <p class=
"description">1 on success,
0 on failure
</p>
6241 <h4 class=
"discussion">Discussion
</h4>
6242 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
6243 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>
6245 The
<code>attr
</code> parameter may be modified as a result of setting the value.
6248 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippSetOctetString">ippSetOctetString
</a></h3>
6249 <p class=
"description">Set an octetString value in an IPP attribute.
</p>
6251 int ippSetOctetString (
<br>
6252     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6253     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6254     int element,
<br>
6255     const void *data,
<br>
6256     int datalen
<br>
6258 <h4 class=
"parameters">Parameters
</h4>
6261 <dd class=
"description">IPP message
</dd>
6263 <dd class=
"description">IPP attribute
</dd>
6265 <dd class=
"description">Value number (
0-based)
</dd>
6267 <dd class=
"description">Pointer to octetString data
</dd>
6269 <dd class=
"description">Length of octetString data
</dd>
6271 <h4 class=
"returnvalue">Return Value
</h4>
6272 <p class=
"description">1 on success,
0 on failure
</p>
6273 <h4 class=
"discussion">Discussion
</h4>
6274 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
6275 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>
6277 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
6279 The
<code>element
</code> parameter specifies which value to set from
0 to
6280 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
6283 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetOperation">ippSetOperation
</a></h3>
6284 <p class=
"description">Set the operation ID in an IPP request message.
</p>
6286 int ippSetOperation (
<br>
6287     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6288     ipp_op_t op
<br>
6290 <h4 class=
"parameters">Parameters
</h4>
6293 <dd class=
"description">IPP request message
</dd>
6295 <dd class=
"description">Operation ID
</dd>
6297 <h4 class=
"returnvalue">Return Value
</h4>
6298 <p class=
"description">1 on success,
0 on failure
</p>
6299 <h4 class=
"discussion">Discussion
</h4>
6300 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
6301 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
6304 <h3 class=
"function"><a id=
"ippSetPort">ippSetPort
</a></h3>
6305 <p class=
"description">Pointer to library globals
</p>
6307 void ippSetPort (
<br>
6308     int p
<br>
6310 <h4 class=
"parameters">Parameters
</h4>
6313 <dd class=
"description">Port number to use
</dd>
6315 <h4 class=
"returnvalue">Return Value
</h4>
6316 <p class=
"description">Set the default port number.
</p>
6317 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetRange">ippSetRange
</a></h3>
6318 <p class=
"description">Set a rangeOfInteger value in an attribute.
</p>
6320 int ippSetRange (
<br>
6321     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6322     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6323     int element,
<br>
6324     int lowervalue,
<br>
6325     int uppervalue
<br>
6327 <h4 class=
"parameters">Parameters
</h4>
6330 <dd class=
"description">IPP message
</dd>
6332 <dd class=
"description">IPP attribute
</dd>
6334 <dd class=
"description">Value number (
0-based)
</dd>
6336 <dd class=
"description">Lower bound for range
</dd>
6338 <dd class=
"description">Upper bound for range
</dd>
6340 <h4 class=
"returnvalue">Return Value
</h4>
6341 <p class=
"description">1 on success,
0 on failure
</p>
6342 <h4 class=
"discussion">Discussion
</h4>
6343 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
6344 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>
6346 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
6348 The
<code>element
</code> parameter specifies which value to set from
0 to
6349 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
6352 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetRequestId">ippSetRequestId
</a></h3>
6353 <p class=
"description">Set the request ID in an IPP message.
</p>
6355 int ippSetRequestId (
<br>
6356     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6357     int request_id
<br>
6359 <h4 class=
"parameters">Parameters
</h4>
6362 <dd class=
"description">IPP message
</dd>
6364 <dd class=
"description">Request ID
</dd>
6366 <h4 class=
"returnvalue">Return Value
</h4>
6367 <p class=
"description">1 on success,
0 on failure
</p>
6368 <h4 class=
"discussion">Discussion
</h4>
6369 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
6370 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>
6372 The
<code>request_id
</code> parameter must be greater than
0.
6375 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetResolution">ippSetResolution
</a></h3>
6376 <p class=
"description">Set a resolution value in an attribute.
</p>
6378 int ippSetResolution (
<br>
6379     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6380     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6381     int element,
<br>
6382     <a href=
"#ipp_res_t">ipp_res_t
</a> unitsvalue,
<br>
6383     int xresvalue,
<br>
6384     int yresvalue
<br>
6386 <h4 class=
"parameters">Parameters
</h4>
6389 <dd class=
"description">IPP message
</dd>
6391 <dd class=
"description">IPP attribute
</dd>
6393 <dd class=
"description">Value number (
0-based)
</dd>
6395 <dd class=
"description">Resolution units
</dd>
6397 <dd class=
"description">Horizontal/cross feed resolution
</dd>
6399 <dd class=
"description">Vertical/feed resolution
</dd>
6401 <h4 class=
"returnvalue">Return Value
</h4>
6402 <p class=
"description">1 on success,
0 on failure
</p>
6403 <h4 class=
"discussion">Discussion
</h4>
6404 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
6405 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>
6407 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
6409 The
<code>element
</code> parameter specifies which value to set from
0 to
6410 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
6413 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetState">ippSetState
</a></h3>
6414 <p class=
"description">Set the current state of the IPP message.
</p>
6416 int ippSetState (
<br>
6417     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6418     <a href=
"#ipp_state_t">ipp_state_t
</a> state
<br>
6420 <h4 class=
"parameters">Parameters
</h4>
6423 <dd class=
"description">IPP message
</dd>
6425 <dd class=
"description">IPP state value
</dd>
6427 <h4 class=
"returnvalue">Return Value
</h4>
6428 <p class=
"description">1 on success,
0 on failure
</p>
6429 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetStatusCode">ippSetStatusCode
</a></h3>
6430 <p class=
"description">Set the status code in an IPP response or event message.
</p>
6432 int ippSetStatusCode (
<br>
6433     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6434     ipp_status_t status
<br>
6436 <h4 class=
"parameters">Parameters
</h4>
6439 <dd class=
"description">IPP response or event message
</dd>
6441 <dd class=
"description">Status code
</dd>
6443 <h4 class=
"returnvalue">Return Value
</h4>
6444 <p class=
"description">1 on success,
0 on failure
</p>
6445 <h4 class=
"discussion">Discussion
</h4>
6446 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
6447 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
6450 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetString">ippSetString
</a></h3>
6451 <p class=
"description">Set a string value in an attribute.
</p>
6453 int ippSetString (
<br>
6454     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6455     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6456     int element,
<br>
6457     const char *strvalue
<br>
6459 <h4 class=
"parameters">Parameters
</h4>
6462 <dd class=
"description">IPP message
</dd>
6464 <dd class=
"description">IPP attribute
</dd>
6466 <dd class=
"description">Value number (
0-based)
</dd>
6468 <dd class=
"description">String value
</dd>
6470 <h4 class=
"returnvalue">Return Value
</h4>
6471 <p class=
"description">1 on success,
0 on failure
</p>
6472 <h4 class=
"discussion">Discussion
</h4>
6473 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
6474 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>
6476 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
6478 The
<code>element
</code> parameter specifies which value to set from
0 to
6479 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
6482 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippSetStringf">ippSetStringf
</a></h3>
6483 <p class=
"description">Set a formatted string value of an attribute.
</p>
6485 int ippSetStringf (
<br>
6486     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6487     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6488     int element,
<br>
6489     const char *format,
<br>
6490     ...
<br>
6492 <h4 class=
"parameters">Parameters
</h4>
6495 <dd class=
"description">IPP message
</dd>
6497 <dd class=
"description">IPP attribute
</dd>
6499 <dd class=
"description">Value number (
0-based)
</dd>
6501 <dd class=
"description">Printf-style format string
</dd>
6503 <dd class=
"description">Additional arguments as needed
</dd>
6505 <h4 class=
"returnvalue">Return Value
</h4>
6506 <p class=
"description">1 on success,
0 on failure
</p>
6507 <h4 class=
"discussion">Discussion
</h4>
6508 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
6509 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>
6511 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
6513 The
<code>element
</code> parameter specifies which value to set from
0 to
6514 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
<br>
6516 The
<code>format
</code> parameter uses formatting characters compatible with the
6517 printf family of standard functions. Additional arguments follow it as
6518 needed. The formatted string is truncated as needed to the maximum length of
6519 the corresponding value type.
6522 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippSetStringfv">ippSetStringfv
</a></h3>
6523 <p class=
"description">Set a formatted string value of an attribute.
</p>
6525 int ippSetStringfv (
<br>
6526     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6527     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6528     int element,
<br>
6529     const char *format,
<br>
6530     va_list ap
<br>
6532 <h4 class=
"parameters">Parameters
</h4>
6535 <dd class=
"description">IPP message
</dd>
6537 <dd class=
"description">IPP attribute
</dd>
6539 <dd class=
"description">Value number (
0-based)
</dd>
6541 <dd class=
"description">Printf-style format string
</dd>
6543 <dd class=
"description">Pointer to additional arguments
</dd>
6545 <h4 class=
"returnvalue">Return Value
</h4>
6546 <p class=
"description">1 on success,
0 on failure
</p>
6547 <h4 class=
"discussion">Discussion
</h4>
6548 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
6549 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>
6551 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
6553 The
<code>element
</code> parameter specifies which value to set from
0 to
6554 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
<br>
6556 The
<code>format
</code> parameter uses formatting characters compatible with the
6557 printf family of standard functions. Additional arguments follow it as
6558 needed. The formatted string is truncated as needed to the maximum length of
6559 the corresponding value type.
6562 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetValueTag">ippSetValueTag
</a></h3>
6563 <p class=
"description">Set the value tag of an attribute.
</p>
6565 int ippSetValueTag (
<br>
6566     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6567     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
6568     ipp_tag_t value_tag
<br>
6570 <h4 class=
"parameters">Parameters
</h4>
6573 <dd class=
"description">IPP message
</dd>
6575 <dd class=
"description">IPP attribute
</dd>
6577 <dd class=
"description">Value tag
</dd>
6579 <h4 class=
"returnvalue">Return Value
</h4>
6580 <p class=
"description">1 on success,
0 on failure
</p>
6581 <h4 class=
"discussion">Discussion
</h4>
6582 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
6583 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>
6585 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
6587 Integer (
<code>IPP_TAG_INTEGER
</code>) values can be promoted to rangeOfInteger
6588 (
<code>IPP_TAG_RANGE
</code>) values, the various string tags can be promoted to name
6589 (
<code>IPP_TAG_NAME
</code>) or nameWithLanguage (
<code>IPP_TAG_NAMELANG
</code>) values, text
6590 (
<code>IPP_TAG_TEXT
</code>) values can be promoted to textWithLanguage
6591 (
<code>IPP_TAG_TEXTLANG
</code>) values, and all values can be demoted to the various
6592 out-of-band value tags such as no-value (
<code>IPP_TAG_NOVALUE
</code>). All other changes
6593 will be rejected.
<br>
6595 Promoting a string attribute to nameWithLanguage or textWithLanguage adds the language
6596 code in the
"attributes-natural-language
" attribute or, if not present, the language
6597 code for the current locale.
6600 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetVersion">ippSetVersion
</a></h3>
6601 <p class=
"description">Set the version number in an IPP message.
</p>
6603 int ippSetVersion (
<br>
6604     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
6605     int major,
<br>
6606     int minor
<br>
6608 <h4 class=
"parameters">Parameters
</h4>
6611 <dd class=
"description">IPP message
</dd>
6613 <dd class=
"description">Major version number (major.minor)
</dd>
6615 <dd class=
"description">Minor version number (major.minor)
</dd>
6617 <h4 class=
"returnvalue">Return Value
</h4>
6618 <p class=
"description">1 on success,
0 on failure
</p>
6619 <h4 class=
"discussion">Discussion
</h4>
6620 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
6621 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>
6623 The valid version numbers are currently
1.0,
1.1,
2.0,
2.1, and
2.2.
6626 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"ippStateString">ippStateString
</a></h3>
6627 <p class=
"description">Return the name corresponding to a state value.
</p>
6629 const char *ippStateString (
<br>
6630     <a href=
"#ipp_state_t">ipp_state_t
</a> state
<br>
6632 <h4 class=
"parameters">Parameters
</h4>
6635 <dd class=
"description">State value
</dd>
6637 <h4 class=
"returnvalue">Return Value
</h4>
6638 <p class=
"description">State name
</p>
6639 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"ippTagString">ippTagString
</a></h3>
6640 <p class=
"description">Return the tag name corresponding to a tag value.
</p>
6642 const char *ippTagString (
<br>
6643     ipp_tag_t tag
<br>
6645 <h4 class=
"parameters">Parameters
</h4>
6648 <dd class=
"description">Tag value
</dd>
6650 <h4 class=
"returnvalue">Return Value
</h4>
6651 <p class=
"description">Tag name
</p>
6652 <h4 class=
"discussion">Discussion
</h4>
6653 <p class=
"discussion">The returned names are defined in RFC
2911 and
3382.
6656 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"ippTagValue">ippTagValue
</a></h3>
6657 <p class=
"description">Return the tag value corresponding to a tag name.
</p>
6659 ipp_tag_t ippTagValue (
<br>
6660     const char *name
<br>
6662 <h4 class=
"parameters">Parameters
</h4>
6665 <dd class=
"description">Tag name
</dd>
6667 <h4 class=
"returnvalue">Return Value
</h4>
6668 <p class=
"description">Tag value
</p>
6669 <h4 class=
"discussion">Discussion
</h4>
6670 <p class=
"discussion">The tag names are defined in RFC
2911 and
3382.
6673 <h3 class=
"function"><a id=
"ippTimeToDate">ippTimeToDate
</a></h3>
6674 <p class=
"description">Convert from UNIX time to RFC
1903 format.
</p>
6676 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *ippTimeToDate (
<br>
6677     time_t t
<br>
6679 <h4 class=
"parameters">Parameters
</h4>
6682 <dd class=
"description">UNIX time value
</dd>
6684 <h4 class=
"returnvalue">Return Value
</h4>
6685 <p class=
"description">RFC-
1903 date/time data
</p>
6686 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippValidateAttribute">ippValidateAttribute
</a></h3>
6687 <p class=
"description">Validate the contents of an attribute.
</p>
6689 int ippValidateAttribute (
<br>
6690     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
6692 <h4 class=
"parameters">Parameters
</h4>
6695 <dd class=
"description">Attribute
</dd>
6697 <h4 class=
"returnvalue">Return Value
</h4>
6698 <p class=
"description">1 if valid,
0 otherwise
</p>
6699 <h4 class=
"discussion">Discussion
</h4>
6700 <p class=
"discussion">This function validates the contents of an attribute based on the name and
6701 value tag.
1 is returned if the attribute is valid,
0 otherwise. On
6702 failure, cupsLastErrorString() is set to a human-readable message.
6705 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippValidateAttributes">ippValidateAttributes
</a></h3>
6706 <p class=
"description">Validate all attributes in an IPP message.
</p>
6708 int ippValidateAttributes (
<br>
6709     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
6711 <h4 class=
"parameters">Parameters
</h4>
6714 <dd class=
"description">IPP message
</dd>
6716 <h4 class=
"returnvalue">Return Value
</h4>
6717 <p class=
"description">1 if valid,
0 otherwise
</p>
6718 <h4 class=
"discussion">Discussion
</h4>
6719 <p class=
"discussion">This function validates the contents of the IPP message, including each
6720 attribute. Like
<a href=
"#ippValidateAttribute"><code>ippValidateAttribute
</code></a>, cupsLastErrorString() is set
6721 to a human-readable message on failure.
6724 <h3 class=
"function"><a id=
"ippWrite">ippWrite
</a></h3>
6725 <p class=
"description">Write data for an IPP message to a HTTP connection.
</p>
6727 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWrite (
<br>
6728     <a href=
"#http_t">http_t
</a> *http,
<br>
6729     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
6731 <h4 class=
"parameters">Parameters
</h4>
6734 <dd class=
"description">HTTP connection
</dd>
6736 <dd class=
"description">IPP data
</dd>
6738 <h4 class=
"returnvalue">Return Value
</h4>
6739 <p class=
"description">Current state
</p>
6740 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"ippWriteFile">ippWriteFile
</a></h3>
6741 <p class=
"description">Write data for an IPP message to a file.
</p>
6743 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWriteFile (
<br>
6744     int fd,
<br>
6745     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
6747 <h4 class=
"parameters">Parameters
</h4>
6750 <dd class=
"description">HTTP data
</dd>
6752 <dd class=
"description">IPP data
</dd>
6754 <h4 class=
"returnvalue">Return Value
</h4>
6755 <p class=
"description">Current state
</p>
6756 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ippWriteIO">ippWriteIO
</a></h3>
6757 <p class=
"description">Write data for an IPP message.
</p>
6759 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWriteIO (
<br>
6760     void *dst,
<br>
6761     <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br>
6762     int blocking,
<br>
6763     <a href=
"#ipp_t">ipp_t
</a> *parent,
<br>
6764     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
6766 <h4 class=
"parameters">Parameters
</h4>
6769 <dd class=
"description">Destination
</dd>
6771 <dd class=
"description">Write callback function
</dd>
6773 <dd class=
"description">Use blocking IO?
</dd>
6775 <dd class=
"description">Parent IPP message
</dd>
6777 <dd class=
"description">IPP data
</dd>
6779 <h4 class=
"returnvalue">Return Value
</h4>
6780 <p class=
"description">Current state
</p>
6781 <h2 class=
"title"><a id=
"TYPES">Data Types
</a></h2>
6782 <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>
6783 <p class=
"description">Client credentials callback
6786 typedef int(*)(http_t *http, void *tls, cups_array_t *distinguished_names, void *user_data)cups_client_cert_cb_t;
6788 <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>
6789 <p class=
"description">Destination enumeration callback
6792 typedef int(*)(void *user_data, unsigned flags,
<a href=
"#cups_dest_t">cups_dest_t
</a> *dest)cups_dest_cb_t;
6794 <h3 class=
"typedef"><a id=
"cups_dest_t">cups_dest_t
</a></h3>
6795 <p class=
"description">Destination
</p>
6797 typedef struct
<a href=
"#cups_dest_s">cups_dest_s
</a> cups_dest_t;
6799 <h3 class=
"typedef"><a id=
"cups_dinfo_t"><span class=
"info"> CUPS
1.6/macOS
10.8 </span>cups_dinfo_t
</a></h3>
6800 <p class=
"description">Destination capability and status
6803 typedef struct _cups_dinfo_s cups_dinfo_t;
6805 <h3 class=
"typedef"><a id=
"cups_job_t">cups_job_t
</a></h3>
6806 <p class=
"description">Job
</p>
6808 typedef struct
<a href=
"#cups_job_s">cups_job_s
</a> cups_job_t;
6810 <h3 class=
"typedef"><a id=
"cups_lang_t">cups_lang_t
</a></h3>
6811 <p class=
"description">Language Cache Structure
</p>
6813 typedef struct
<a href=
"#cups_lang_s">cups_lang_s
</a> cups_lang_t;
6815 <h3 class=
"typedef"><a id=
"cups_option_t">cups_option_t
</a></h3>
6816 <p class=
"description">Printer Options
</p>
6818 typedef struct
<a href=
"#cups_option_s">cups_option_s
</a> cups_option_t;
6820 <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>
6821 <p class=
"description">New password callback
6824 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;
6826 <h3 class=
"typedef"><a id=
"cups_ptype_t">cups_ptype_t
</a></h3>
6827 <p class=
"description">Printer type/capability bits
</p>
6829 typedef unsigned cups_ptype_t;
6831 <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>
6832 <p class=
"description">Server credentials callback
6835 typedef int(*)(http_t *http, void *tls, cups_array_t *certs, void *user_data)cups_server_cert_cb_t;
6837 <h3 class=
"typedef"><a id=
"cups_size_t"><span class=
"info"> CUPS
1.6/macOS
10.8 </span>cups_size_t
</a></h3>
6838 <p class=
"description">Media Size
</p>
6840 typedef struct
<a href=
"#cups_size_s">cups_size_s
</a> cups_size_t;
6842 <h3 class=
"typedef"><a id=
"http_addr_t"><span class=
"info"> CUPS
1.2/macOS
10.5 </span>http_addr_t
</a></h3>
6843 <p class=
"description">Socket address union, which
6844 makes using IPv6 and other
6845 address types easier and
6848 typedef union _http_addr_u / http_addr_t;
6850 <h3 class=
"typedef"><a id=
"http_encoding_t">http_encoding_t
</a></h3>
6851 <p class=
"description">HTTP transfer encoding values
</p>
6853 typedef enum
<a href=
"#http_encoding_e">http_encoding_e
</a> http_encoding_t;
6855 <h3 class=
"typedef"><a id=
"http_encryption_t">http_encryption_t
</a></h3>
6856 <p class=
"description">HTTP encryption values
</p>
6858 typedef enum
<a href=
"#http_encryption_e">http_encryption_e
</a> http_encryption_t;
6860 <h3 class=
"typedef"><a id=
"http_field_t">http_field_t
</a></h3>
6861 <p class=
"description">HTTP field names
</p>
6863 typedef enum
<a href=
"#http_field_e">http_field_e
</a> http_field_t;
6865 <h3 class=
"typedef"><a id=
"http_keepalive_t">http_keepalive_t
</a></h3>
6866 <p class=
"description">HTTP keep-alive values
</p>
6868 typedef enum
<a href=
"#http_keepalive_e">http_keepalive_e
</a> http_keepalive_t;
6870 <h3 class=
"typedef"><a id=
"http_state_t">http_state_t
</a></h3>
6871 <p class=
"description">HTTP state values; states
6872 are server-oriented...
</p>
6874 typedef enum
<a href=
"#http_state_e">http_state_e
</a> http_state_t;
6876 <h3 class=
"typedef"><a id=
"http_t">http_t
</a></h3>
6877 <p class=
"description">HTTP connection type
</p>
6879 typedef struct _http_s http_t;
6881 <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>
6882 <p class=
"description">HTTP timeout callback
</p>
6884 typedef int(*)(http_t *http, void *user_data)http_timeout_cb_t;
6886 <h3 class=
"typedef"><a id=
"http_trust_t"><span class=
"info"> CUPS
2.0/OS
10.10 </span>http_trust_t
</a></h3>
6887 <p class=
"description">Level of trust for credentials
</p>
6889 typedef enum
<a href=
"#http_trust_e">http_trust_e
</a> http_trust_t;
6891 <h3 class=
"typedef"><a id=
"http_uri_coding_t">http_uri_coding_t
</a></h3>
6892 <p class=
"description">URI en/decode flags
</p>
6894 typedef enum
<a href=
"#http_uri_coding_e">http_uri_coding_e
</a> http_uri_coding_t;
6896 <h3 class=
"typedef"><a id=
"http_uri_status_t"><span class=
"info"> CUPS
1.2 </span>http_uri_status_t
</a></h3>
6897 <p class=
"description">URI separation status
</p>
6899 typedef enum
<a href=
"#http_uri_status_e">http_uri_status_e
</a> http_uri_status_t;
6901 <h3 class=
"typedef"><a id=
"ipp_attribute_t">ipp_attribute_t
</a></h3>
6902 <p class=
"description">IPP attribute
</p>
6904 typedef struct _ipp_attribute_s ipp_attribute_t;
6906 <h3 class=
"typedef"><a id=
"ipp_copycb_t">ipp_copycb_t
</a></h3>
6907 <p class=
"description">The following structures are PRIVATE starting with CUPS
1.6/macOS
10.8.
6908 Please use the new accessor functions available in CUPS
1.6 and later, as
6909 these definitions will be moved to a private header file in a future release.
</p>
6911 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;
6913 <h3 class=
"typedef"><a id=
"ipp_iocb_t"><span class=
"info"> CUPS
1.2/macOS
10.5 </span>ipp_iocb_t
</a></h3>
6914 <p class=
"description">IPP IO Callback Function
</p>
6916 typedef ssize_t(*)(void *context,
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *buffer, size_t bytes) ipp_iocb_t;
6918 <h3 class=
"typedef"><a id=
"ipp_orient_t">ipp_orient_t
</a></h3>
6919 <p class=
"description">Orientation values
</p>
6921 typedef enum
<a href=
"#ipp_orient_e">ipp_orient_e
</a> ipp_orient_t;
6923 <h3 class=
"typedef"><a id=
"ipp_pstate_t">ipp_pstate_t
</a></h3>
6924 <p class=
"description">Printer states
</p>
6926 typedef enum
<a href=
"#ipp_pstate_e">ipp_pstate_e
</a> ipp_pstate_t;
6928 <h3 class=
"typedef"><a id=
"ipp_quality_t">ipp_quality_t
</a></h3>
6929 <p class=
"description">Qualities
</p>
6931 typedef enum
<a href=
"#ipp_quality_e">ipp_quality_e
</a> ipp_quality_t;
6933 <h3 class=
"typedef"><a id=
"ipp_res_t">ipp_res_t
</a></h3>
6934 <p class=
"description">Resolution units
</p>
6936 typedef enum
<a href=
"#ipp_res_e">ipp_res_e
</a> ipp_res_t;
6938 <h3 class=
"typedef"><a id=
"ipp_state_t">ipp_state_t
</a></h3>
6939 <p class=
"description">IPP states
</p>
6941 typedef enum
<a href=
"#ipp_state_e">ipp_state_e
</a> ipp_state_t;
6943 <h3 class=
"typedef"><a id=
"ipp_t">ipp_t
</a></h3>
6944 <p class=
"description">IPP request/response data
</p>
6946 typedef struct _ipp_s ipp_t;
6948 <h3 class=
"typedef"><a id=
"ipp_uchar_t">ipp_uchar_t
</a></h3>
6949 <p class=
"description">Unsigned
8-bit integer/character
</p>
6951 typedef unsigned char ipp_uchar_t;
6953 <h2 class=
"title"><a id=
"STRUCTURES">Structures
</a></h2>
6954 <h3 class=
"struct"><a id=
"cups_dest_s">cups_dest_s
</a></h3>
6955 <p class=
"description">Destination
</p>
6956 <p class=
"code">struct cups_dest_s {
<br>
6957     char *name, *instance;
<br>
6958     int is_default;
<br>
6959     int num_options;
<br>
6960     <a href=
"#cups_option_t">cups_option_t
</a> *options;
<br>
6962 <h4 class=
"members">Members
</h4>
6965 <dd class=
"description">Local instance name or NULL
</dd>
6966 <dt>is_default
</dt>
6967 <dd class=
"description">Is this printer the default?
</dd>
6968 <dt>num_options
</dt>
6969 <dd class=
"description">Number of options
</dd>
6971 <dd class=
"description">Options
</dd>
6973 <h3 class=
"struct"><a id=
"cups_job_s">cups_job_s
</a></h3>
6974 <p class=
"description">Job
</p>
6975 <p class=
"code">struct cups_job_s {
<br>
6976     time_t completed_time;
<br>
6977     time_t creation_time;
<br>
6978     char *dest;
<br>
6979     char *format;
<br>
6980     int id;
<br>
6981     int priority;
<br>
6982     time_t processing_time;
<br>
6983     int size;
<br>
6984     ipp_jstate_t state;
<br>
6985     char *title;
<br>
6986     char *user;
<br>
6988 <h4 class=
"members">Members
</h4>
6990 <dt>completed_time
</dt>
6991 <dd class=
"description">Time the job was completed
</dd>
6992 <dt>creation_time
</dt>
6993 <dd class=
"description">Time the job was created
</dd>
6995 <dd class=
"description">Printer or class name
</dd>
6997 <dd class=
"description">Document format
</dd>
6999 <dd class=
"description">The job ID
</dd>
7001 <dd class=
"description">Priority (
1-
100)
</dd>
7002 <dt>processing_time
</dt>
7003 <dd class=
"description">Time the job was processed
</dd>
7005 <dd class=
"description">Size in kilobytes
</dd>
7007 <dd class=
"description">Job state
</dd>
7009 <dd class=
"description">Title/job name
</dd>
7011 <dd class=
"description">User that submitted the job
</dd>
7013 <h3 class=
"struct"><a id=
"cups_lang_s">cups_lang_s
</a></h3>
7014 <p class=
"description">Language Cache Structure
</p>
7015 <p class=
"code">struct cups_lang_s {
<br>
7016     <a href=
"#cups_encoding_t">cups_encoding_t
</a> encoding;
<br>
7017     char language[
16];
<br>
7018     struct
<a href=
"#cups_lang_s">cups_lang_s
</a> *next;
<br>
7019     int used;
<br>
7021 <h4 class=
"members">Members
</h4>
7024 <dd class=
"description">Text encoding
</dd>
7025 <dt>language[
16]
</dt>
7026 <dd class=
"description">Language/locale name
</dd>
7028 <dd class=
"description">Next language in cache
</dd>
7030 <dd class=
"description">Number of times this entry has been used.
</dd>
7032 <h3 class=
"struct"><a id=
"cups_option_s">cups_option_s
</a></h3>
7033 <p class=
"description">Printer Options
</p>
7034 <p class=
"code">struct cups_option_s {
<br>
7035     char *name;
<br>
7036     char *value;
<br>
7038 <h4 class=
"members">Members
</h4>
7041 <dd class=
"description">Name of option
</dd>
7043 <dd class=
"description">Value of option
</dd>
7045 <h3 class=
"struct"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"cups_size_s">cups_size_s
</a></h3>
7046 <p class=
"description">Media Size
</p>
7047 <p class=
"code">struct cups_size_s {
<br>
7048     char media[
128];
<br>
7049     int width, length, bottom, left, right, top;
<br>
7051 <h4 class=
"members">Members
</h4>
7053 <dt>media[
128]
</dt>
7054 <dd class=
"description">Media name to use
</dd>
7056 <dd class=
"description">Top margin in hundredths of
7059 <h2 class=
"title"><a id=
"ENUMERATIONS">Constants
</a></h2>
7060 <h3 class=
"enumeration"><a id=
"cups_ptype_e">cups_ptype_e
</a></h3>
7061 <p class=
"description">Printer type/capability bit
7063 <h4 class=
"constants">Constants
</h4>
7065 <dt>CUPS_PRINTER_AUTHENTICATED
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
7066 <dd class=
"description">Printer requires authentication
7068 <dt>CUPS_PRINTER_BIND
</dt>
7069 <dd class=
"description">Can bind output
</dd>
7070 <dt>CUPS_PRINTER_BW
</dt>
7071 <dd class=
"description">Can do B
&W printing
</dd>
7072 <dt>CUPS_PRINTER_CLASS
</dt>
7073 <dd class=
"description">Printer class
</dd>
7074 <dt>CUPS_PRINTER_COLLATE
</dt>
7075 <dd class=
"description">Can quickly collate copies
</dd>
7076 <dt>CUPS_PRINTER_COLOR
</dt>
7077 <dd class=
"description">Can do color printing
</dd>
7078 <dt>CUPS_PRINTER_COMMANDS
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
7079 <dd class=
"description">Printer supports maintenance commands
7081 <dt>CUPS_PRINTER_COPIES
</dt>
7082 <dd class=
"description">Can do copies in hardware
</dd>
7083 <dt>CUPS_PRINTER_COVER
</dt>
7084 <dd class=
"description">Can cover output
</dd>
7085 <dt>CUPS_PRINTER_DEFAULT
</dt>
7086 <dd class=
"description">Default printer on network
</dd>
7087 <dt>CUPS_PRINTER_DISCOVERED
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
7088 <dd class=
"description">Printer was discovered
</dd>
7089 <dt>CUPS_PRINTER_DUPLEX
</dt>
7090 <dd class=
"description">Can do two-sided printing
</dd>
7091 <dt>CUPS_PRINTER_FAX
</dt>
7092 <dd class=
"description">Fax queue
</dd>
7093 <dt>CUPS_PRINTER_LARGE
</dt>
7094 <dd class=
"description">Can print on D/E/A1/A0-size media
</dd>
7095 <dt>CUPS_PRINTER_LOCAL
</dt>
7096 <dd class=
"description">Local printer or class
</dd>
7097 <dt>CUPS_PRINTER_MEDIUM
</dt>
7098 <dd class=
"description">Can print on Tabloid/B/C/A3/A2-size media
</dd>
7099 <dt>CUPS_PRINTER_NOT_SHARED
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
7100 <dd class=
"description">Printer is not shared
7102 <dt>CUPS_PRINTER_PUNCH
</dt>
7103 <dd class=
"description">Can punch output
</dd>
7104 <dt>CUPS_PRINTER_REJECTING
</dt>
7105 <dd class=
"description">Printer is rejecting jobs
</dd>
7106 <dt>CUPS_PRINTER_REMOTE
</dt>
7107 <dd class=
"description">Remote printer or class
</dd>
7108 <dt>CUPS_PRINTER_SMALL
</dt>
7109 <dd class=
"description">Can print on Letter/Legal/A4-size media
</dd>
7110 <dt>CUPS_PRINTER_SORT
</dt>
7111 <dd class=
"description">Can sort output
</dd>
7112 <dt>CUPS_PRINTER_STAPLE
</dt>
7113 <dd class=
"description">Can staple output
</dd>
7114 <dt>CUPS_PRINTER_VARIABLE
</dt>
7115 <dd class=
"description">Can print on rolls and custom-size media
</dd>
7117 <h3 class=
"enumeration"><a id=
"http_encoding_e">http_encoding_e
</a></h3>
7118 <p class=
"description">HTTP transfer encoding values
</p>
7119 <h4 class=
"constants">Constants
</h4>
7121 <dt>HTTP_ENCODING_CHUNKED
</dt>
7122 <dd class=
"description">Data is chunked
</dd>
7123 <dt>HTTP_ENCODING_FIELDS
</dt>
7124 <dd class=
"description">Sending HTTP fields
</dd>
7125 <dt>HTTP_ENCODING_LENGTH
</dt>
7126 <dd class=
"description">Data is sent with Content-Length
</dd>
7128 <h3 class=
"enumeration"><a id=
"http_encryption_e">http_encryption_e
</a></h3>
7129 <p class=
"description">HTTP encryption values
</p>
7130 <h4 class=
"constants">Constants
</h4>
7132 <dt>HTTP_ENCRYPTION_ALWAYS
</dt>
7133 <dd class=
"description">Always encrypt (SSL)
</dd>
7134 <dt>HTTP_ENCRYPTION_IF_REQUESTED
</dt>
7135 <dd class=
"description">Encrypt if requested (TLS upgrade)
</dd>
7136 <dt>HTTP_ENCRYPTION_NEVER
</dt>
7137 <dd class=
"description">Never encrypt
</dd>
7138 <dt>HTTP_ENCRYPTION_REQUIRED
</dt>
7139 <dd class=
"description">Encryption is required (TLS upgrade)
</dd>
7141 <h3 class=
"enumeration"><a id=
"http_field_e">http_field_e
</a></h3>
7142 <p class=
"description">HTTP field names
</p>
7143 <h4 class=
"constants">Constants
</h4>
7145 <dt>HTTP_FIELD_ACCEPT_ENCODING
<span class=
"info"> CUPS
1.7/macOS
10.9 </span></dt>
7146 <dd class=
"description">Accepting-Encoding field
</dd>
7147 <dt>HTTP_FIELD_ACCEPT_LANGUAGE
</dt>
7148 <dd class=
"description">Accept-Language field
</dd>
7149 <dt>HTTP_FIELD_ACCEPT_RANGES
</dt>
7150 <dd class=
"description">Accept-Ranges field
</dd>
7151 <dt>HTTP_FIELD_ALLOW
<span class=
"info"> CUPS
1.7/macOS
10.9 </span></dt>
7152 <dd class=
"description">Allow field
</dd>
7153 <dt>HTTP_FIELD_AUTHORIZATION
</dt>
7154 <dd class=
"description">Authorization field
</dd>
7155 <dt>HTTP_FIELD_CONNECTION
</dt>
7156 <dd class=
"description">Connection field
</dd>
7157 <dt>HTTP_FIELD_CONTENT_ENCODING
</dt>
7158 <dd class=
"description">Content-Encoding field
</dd>
7159 <dt>HTTP_FIELD_CONTENT_LANGUAGE
</dt>
7160 <dd class=
"description">Content-Language field
</dd>
7161 <dt>HTTP_FIELD_CONTENT_LENGTH
</dt>
7162 <dd class=
"description">Content-Length field
</dd>
7163 <dt>HTTP_FIELD_CONTENT_LOCATION
</dt>
7164 <dd class=
"description">Content-Location field
</dd>
7165 <dt>HTTP_FIELD_CONTENT_MD5
</dt>
7166 <dd class=
"description">Content-MD5 field
</dd>
7167 <dt>HTTP_FIELD_CONTENT_RANGE
</dt>
7168 <dd class=
"description">Content-Range field
</dd>
7169 <dt>HTTP_FIELD_CONTENT_TYPE
</dt>
7170 <dd class=
"description">Content-Type field
</dd>
7171 <dt>HTTP_FIELD_CONTENT_VERSION
</dt>
7172 <dd class=
"description">Content-Version field
</dd>
7173 <dt>HTTP_FIELD_DATE
</dt>
7174 <dd class=
"description">Date field
</dd>
7175 <dt>HTTP_FIELD_HOST
</dt>
7176 <dd class=
"description">Host field
</dd>
7177 <dt>HTTP_FIELD_IF_MODIFIED_SINCE
</dt>
7178 <dd class=
"description">If-Modified-Since field
</dd>
7179 <dt>HTTP_FIELD_IF_UNMODIFIED_SINCE
</dt>
7180 <dd class=
"description">If-Unmodified-Since field
</dd>
7181 <dt>HTTP_FIELD_KEEP_ALIVE
</dt>
7182 <dd class=
"description">Keep-Alive field
</dd>
7183 <dt>HTTP_FIELD_LAST_MODIFIED
</dt>
7184 <dd class=
"description">Last-Modified field
</dd>
7185 <dt>HTTP_FIELD_LINK
</dt>
7186 <dd class=
"description">Link field
</dd>
7187 <dt>HTTP_FIELD_LOCATION
</dt>
7188 <dd class=
"description">Location field
</dd>
7189 <dt>HTTP_FIELD_MAX
</dt>
7190 <dd class=
"description">Maximum field index
</dd>
7191 <dt>HTTP_FIELD_RANGE
</dt>
7192 <dd class=
"description">Range field
</dd>
7193 <dt>HTTP_FIELD_REFERER
</dt>
7194 <dd class=
"description">Referer field
</dd>
7195 <dt>HTTP_FIELD_RETRY_AFTER
</dt>
7196 <dd class=
"description">Retry-After field
</dd>
7197 <dt>HTTP_FIELD_SERVER
<span class=
"info"> CUPS
1.7/macOS
10.9 </span></dt>
7198 <dd class=
"description">Server field
</dd>
7199 <dt>HTTP_FIELD_TRANSFER_ENCODING
</dt>
7200 <dd class=
"description">Transfer-Encoding field
</dd>
7201 <dt>HTTP_FIELD_UNKNOWN
</dt>
7202 <dd class=
"description">Unknown field
</dd>
7203 <dt>HTTP_FIELD_UPGRADE
</dt>
7204 <dd class=
"description">Upgrade field
</dd>
7205 <dt>HTTP_FIELD_USER_AGENT
</dt>
7206 <dd class=
"description">User-Agent field
</dd>
7207 <dt>HTTP_FIELD_WWW_AUTHENTICATE
</dt>
7208 <dd class=
"description">WWW-Authenticate field
</dd>
7210 <h3 class=
"enumeration"><a id=
"http_keepalive_e">http_keepalive_e
</a></h3>
7211 <p class=
"description">HTTP keep-alive values
</p>
7212 <h4 class=
"constants">Constants
</h4>
7214 <dt>HTTP_KEEPALIVE_OFF
</dt>
7215 <dd class=
"description">No keep alive support
</dd>
7216 <dt>HTTP_KEEPALIVE_ON
</dt>
7217 <dd class=
"description">Use keep alive
</dd>
7219 <h3 class=
"enumeration"><a id=
"http_state_e">http_state_e
</a></h3>
7220 <p class=
"description">HTTP state values; states
7221 are server-oriented...
</p>
7222 <h4 class=
"constants">Constants
</h4>
7224 <dt>HTTP_STATE_CONNECT
</dt>
7225 <dd class=
"description">CONNECT command, waiting for blank line
</dd>
7226 <dt>HTTP_STATE_DELETE
</dt>
7227 <dd class=
"description">DELETE command, waiting for blank line
</dd>
7228 <dt>HTTP_STATE_ERROR
</dt>
7229 <dd class=
"description">Error on socket
</dd>
7230 <dt>HTTP_STATE_GET
</dt>
7231 <dd class=
"description">GET command, waiting for blank line
</dd>
7232 <dt>HTTP_STATE_GET_SEND
</dt>
7233 <dd class=
"description">GET command, sending data
</dd>
7234 <dt>HTTP_STATE_HEAD
</dt>
7235 <dd class=
"description">HEAD command, waiting for blank line
</dd>
7236 <dt>HTTP_STATE_OPTIONS
</dt>
7237 <dd class=
"description">OPTIONS command, waiting for blank line
</dd>
7238 <dt>HTTP_STATE_POST
</dt>
7239 <dd class=
"description">POST command, waiting for blank line
</dd>
7240 <dt>HTTP_STATE_POST_RECV
</dt>
7241 <dd class=
"description">POST command, receiving data
</dd>
7242 <dt>HTTP_STATE_POST_SEND
</dt>
7243 <dd class=
"description">POST command, sending data
</dd>
7244 <dt>HTTP_STATE_PUT
</dt>
7245 <dd class=
"description">PUT command, waiting for blank line
</dd>
7246 <dt>HTTP_STATE_PUT_RECV
</dt>
7247 <dd class=
"description">PUT command, receiving data
</dd>
7248 <dt>HTTP_STATE_STATUS
</dt>
7249 <dd class=
"description">Command complete, sending status
</dd>
7250 <dt>HTTP_STATE_TRACE
</dt>
7251 <dd class=
"description">TRACE command, waiting for blank line
</dd>
7252 <dt>HTTP_STATE_UNKNOWN_METHOD
<span class=
"info"> CUPS
1.7/macOS
10.9 </span></dt>
7253 <dd class=
"description">Unknown request method, waiting for blank line
</dd>
7254 <dt>HTTP_STATE_UNKNOWN_VERSION
<span class=
"info"> CUPS
1.7/macOS
10.9 </span></dt>
7255 <dd class=
"description">Unknown request method, waiting for blank line
</dd>
7256 <dt>HTTP_STATE_WAITING
</dt>
7257 <dd class=
"description">Waiting for command
</dd>
7259 <h3 class=
"enumeration"><a id=
"http_status_e">http_status_e
</a></h3>
7260 <p class=
"description">HTTP status codes
</p>
7261 <h4 class=
"constants">Constants
</h4>
7263 <dt>HTTP_STATUS_ACCEPTED
</dt>
7264 <dd class=
"description">DELETE command was successful
</dd>
7265 <dt>HTTP_STATUS_BAD_GATEWAY
</dt>
7266 <dd class=
"description">Bad gateway
</dd>
7267 <dt>HTTP_STATUS_BAD_REQUEST
</dt>
7268 <dd class=
"description">Bad request
</dd>
7269 <dt>HTTP_STATUS_CONFLICT
</dt>
7270 <dd class=
"description">Request is self-conflicting
</dd>
7271 <dt>HTTP_STATUS_CONTINUE
</dt>
7272 <dd class=
"description">Everything OK, keep going...
</dd>
7273 <dt>HTTP_STATUS_CREATED
</dt>
7274 <dd class=
"description">PUT command was successful
</dd>
7275 <dt>HTTP_STATUS_CUPS_AUTHORIZATION_CANCELED
<span class=
"info"> CUPS
1.4 </span></dt>
7276 <dd class=
"description">User canceled authorization
</dd>
7277 <dt>HTTP_STATUS_CUPS_PKI_ERROR
<span class=
"info"> CUPS
1.5/macOS
10.7 </span></dt>
7278 <dd class=
"description">Error negotiating a secure connection
</dd>
7279 <dt>HTTP_STATUS_ERROR
</dt>
7280 <dd class=
"description">An error response from httpXxxx()
</dd>
7281 <dt>HTTP_STATUS_EXPECTATION_FAILED
</dt>
7282 <dd class=
"description">The expectation given in an Expect header field was not met
</dd>
7283 <dt>HTTP_STATUS_FORBIDDEN
</dt>
7284 <dd class=
"description">Forbidden to access this URI
</dd>
7285 <dt>HTTP_STATUS_GATEWAY_TIMEOUT
</dt>
7286 <dd class=
"description">Gateway connection timed out
</dd>
7287 <dt>HTTP_STATUS_GONE
</dt>
7288 <dd class=
"description">Server has gone away
</dd>
7289 <dt>HTTP_STATUS_LENGTH_REQUIRED
</dt>
7290 <dd class=
"description">A content length or encoding is required
</dd>
7291 <dt>HTTP_STATUS_METHOD_NOT_ALLOWED
</dt>
7292 <dd class=
"description">Method is not allowed
</dd>
7293 <dt>HTTP_STATUS_MOVED_PERMANENTLY
</dt>
7294 <dd class=
"description">Document has moved permanently
</dd>
7295 <dt>HTTP_STATUS_MOVED_TEMPORARILY
</dt>
7296 <dd class=
"description">Document has moved temporarily
</dd>
7297 <dt>HTTP_STATUS_MULTIPLE_CHOICES
</dt>
7298 <dd class=
"description">Multiple files match request
</dd>
7299 <dt>HTTP_STATUS_NONE
<span class=
"info"> CUPS
1.7/macOS
10.9 </span></dt>
7300 <dd class=
"description">No Expect value
</dd>
7301 <dt>HTTP_STATUS_NOT_ACCEPTABLE
</dt>
7302 <dd class=
"description">Not Acceptable
</dd>
7303 <dt>HTTP_STATUS_NOT_AUTHORITATIVE
</dt>
7304 <dd class=
"description">Information isn't authoritative
</dd>
7305 <dt>HTTP_STATUS_NOT_FOUND
</dt>
7306 <dd class=
"description">URI was not found
</dd>
7307 <dt>HTTP_STATUS_NOT_IMPLEMENTED
</dt>
7308 <dd class=
"description">Feature not implemented
</dd>
7309 <dt>HTTP_STATUS_NOT_MODIFIED
</dt>
7310 <dd class=
"description">File not modified
</dd>
7311 <dt>HTTP_STATUS_NOT_SUPPORTED
</dt>
7312 <dd class=
"description">HTTP version not supported
</dd>
7313 <dt>HTTP_STATUS_NO_CONTENT
</dt>
7314 <dd class=
"description">Successful command, no new data
</dd>
7315 <dt>HTTP_STATUS_OK
</dt>
7316 <dd class=
"description">OPTIONS/GET/HEAD/POST/TRACE command was successful
</dd>
7317 <dt>HTTP_STATUS_PARTIAL_CONTENT
</dt>
7318 <dd class=
"description">Only a partial file was received/sent
</dd>
7319 <dt>HTTP_STATUS_PAYMENT_REQUIRED
</dt>
7320 <dd class=
"description">Payment required
</dd>
7321 <dt>HTTP_STATUS_PRECONDITION
</dt>
7322 <dd class=
"description">Precondition failed
</dd>
7323 <dt>HTTP_STATUS_PROXY_AUTHENTICATION
</dt>
7324 <dd class=
"description">Proxy Authentication is Required
</dd>
7325 <dt>HTTP_STATUS_REQUESTED_RANGE
</dt>
7326 <dd class=
"description">The requested range is not satisfiable
</dd>
7327 <dt>HTTP_STATUS_REQUEST_TIMEOUT
</dt>
7328 <dd class=
"description">Request timed out
</dd>
7329 <dt>HTTP_STATUS_REQUEST_TOO_LARGE
</dt>
7330 <dd class=
"description">Request entity too large
</dd>
7331 <dt>HTTP_STATUS_RESET_CONTENT
</dt>
7332 <dd class=
"description">Content was reset/recreated
</dd>
7333 <dt>HTTP_STATUS_SEE_OTHER
</dt>
7334 <dd class=
"description">See this other link...
</dd>
7335 <dt>HTTP_STATUS_SERVER_ERROR
</dt>
7336 <dd class=
"description">Internal server error
</dd>
7337 <dt>HTTP_STATUS_SERVICE_UNAVAILABLE
</dt>
7338 <dd class=
"description">Service is unavailable
</dd>
7339 <dt>HTTP_STATUS_SWITCHING_PROTOCOLS
</dt>
7340 <dd class=
"description">HTTP upgrade to TLS/SSL
</dd>
7341 <dt>HTTP_STATUS_UNAUTHORIZED
</dt>
7342 <dd class=
"description">Unauthorized to access host
</dd>
7343 <dt>HTTP_STATUS_UNSUPPORTED_MEDIATYPE
</dt>
7344 <dd class=
"description">The requested media type is unsupported
</dd>
7345 <dt>HTTP_STATUS_UPGRADE_REQUIRED
</dt>
7346 <dd class=
"description">Upgrade to SSL/TLS required
</dd>
7347 <dt>HTTP_STATUS_URI_TOO_LONG
</dt>
7348 <dd class=
"description">URI too long
</dd>
7349 <dt>HTTP_STATUS_USE_PROXY
</dt>
7350 <dd class=
"description">Must use a proxy to access this URI
</dd>
7352 <h3 class=
"enumeration"><a id=
"http_trust_e"><span class=
"info"> CUPS
2.0/OS
10.10 </span>http_trust_e
</a></h3>
7353 <p class=
"description">Level of trust for credentials
</p>
7354 <h4 class=
"constants">Constants
</h4>
7356 <dt>HTTP_TRUST_CHANGED
</dt>
7357 <dd class=
"description">Credentials have changed
</dd>
7358 <dt>HTTP_TRUST_EXPIRED
</dt>
7359 <dd class=
"description">Credentials are expired
</dd>
7360 <dt>HTTP_TRUST_INVALID
</dt>
7361 <dd class=
"description">Credentials are invalid
</dd>
7362 <dt>HTTP_TRUST_OK
</dt>
7363 <dd class=
"description">Credentials are OK/trusted
</dd>
7364 <dt>HTTP_TRUST_RENEWED
</dt>
7365 <dd class=
"description">Credentials have been renewed
</dd>
7366 <dt>HTTP_TRUST_UNKNOWN
</dt>
7367 <dd class=
"description">Credentials are unknown/new
</dd>
7369 <h3 class=
"enumeration"><a id=
"http_uri_coding_e">http_uri_coding_e
</a></h3>
7370 <p class=
"description">URI en/decode flags
</p>
7371 <h4 class=
"constants">Constants
</h4>
7373 <dt>HTTP_URI_CODING_ALL
</dt>
7374 <dd class=
"description">En/decode everything
</dd>
7375 <dt>HTTP_URI_CODING_HOSTNAME
</dt>
7376 <dd class=
"description">En/decode the hostname portion
</dd>
7377 <dt>HTTP_URI_CODING_MOST
</dt>
7378 <dd class=
"description">En/decode all but the query
</dd>
7379 <dt>HTTP_URI_CODING_NONE
</dt>
7380 <dd class=
"description">Don't en/decode anything
</dd>
7381 <dt>HTTP_URI_CODING_QUERY
</dt>
7382 <dd class=
"description">En/decode the query portion
</dd>
7383 <dt>HTTP_URI_CODING_RESOURCE
</dt>
7384 <dd class=
"description">En/decode the resource portion
</dd>
7385 <dt>HTTP_URI_CODING_RFC6874
</dt>
7386 <dd class=
"description">Use RFC
6874 address format
</dd>
7387 <dt>HTTP_URI_CODING_USERNAME
</dt>
7388 <dd class=
"description">En/decode the username portion
</dd>
7390 <h3 class=
"enumeration"><a id=
"http_uri_status_e"><span class=
"info"> CUPS
1.2 </span>http_uri_status_e
</a></h3>
7391 <p class=
"description">URI separation status
</p>
7392 <h4 class=
"constants">Constants
</h4>
7394 <dt>HTTP_URI_STATUS_BAD_ARGUMENTS
</dt>
7395 <dd class=
"description">Bad arguments to function (error)
</dd>
7396 <dt>HTTP_URI_STATUS_BAD_HOSTNAME
</dt>
7397 <dd class=
"description">Bad hostname in URI (error)
</dd>
7398 <dt>HTTP_URI_STATUS_BAD_PORT
</dt>
7399 <dd class=
"description">Bad port number in URI (error)
</dd>
7400 <dt>HTTP_URI_STATUS_BAD_RESOURCE
</dt>
7401 <dd class=
"description">Bad resource in URI (error)
</dd>
7402 <dt>HTTP_URI_STATUS_BAD_SCHEME
</dt>
7403 <dd class=
"description">Bad scheme in URI (error)
</dd>
7404 <dt>HTTP_URI_STATUS_BAD_URI
</dt>
7405 <dd class=
"description">Bad/empty URI (error)
</dd>
7406 <dt>HTTP_URI_STATUS_BAD_USERNAME
</dt>
7407 <dd class=
"description">Bad username in URI (error)
</dd>
7408 <dt>HTTP_URI_STATUS_MISSING_RESOURCE
</dt>
7409 <dd class=
"description">Missing resource in URI (warning)
</dd>
7410 <dt>HTTP_URI_STATUS_MISSING_SCHEME
</dt>
7411 <dd class=
"description">Missing scheme in URI (warning)
</dd>
7412 <dt>HTTP_URI_STATUS_OK
</dt>
7413 <dd class=
"description">URI decoded OK
</dd>
7414 <dt>HTTP_URI_STATUS_OVERFLOW
</dt>
7415 <dd class=
"description">URI buffer for httpAssembleURI is too small
</dd>
7416 <dt>HTTP_URI_STATUS_UNKNOWN_SCHEME
</dt>
7417 <dd class=
"description">Unknown scheme in URI (warning)
</dd>
7419 <h3 class=
"enumeration"><a id=
"ipp_finishings_e">ipp_finishings_e
</a></h3>
7420 <p class=
"description">Finishings values
</p>
7421 <h4 class=
"constants">Constants
</h4>
7423 <dt>IPP_FINISHINGS_BALE
</dt>
7424 <dd class=
"description">Bale (any type)
</dd>
7425 <dt>IPP_FINISHINGS_BIND
</dt>
7426 <dd class=
"description">Bind
</dd>
7427 <dt>IPP_FINISHINGS_BIND_BOTTOM
</dt>
7428 <dd class=
"description">Bind on bottom
</dd>
7429 <dt>IPP_FINISHINGS_BIND_LEFT
</dt>
7430 <dd class=
"description">Bind on left
</dd>
7431 <dt>IPP_FINISHINGS_BIND_RIGHT
</dt>
7432 <dd class=
"description">Bind on right
</dd>
7433 <dt>IPP_FINISHINGS_BIND_TOP
</dt>
7434 <dd class=
"description">Bind on top
</dd>
7435 <dt>IPP_FINISHINGS_BOOKLET_MAKER
</dt>
7436 <dd class=
"description">Fold to make booklet
</dd>
7437 <dt>IPP_FINISHINGS_COAT
</dt>
7438 <dd class=
"description">Apply protective liquid or powder coating
</dd>
7439 <dt>IPP_FINISHINGS_COVER
</dt>
7440 <dd class=
"description">Add cover
</dd>
7441 <dt>IPP_FINISHINGS_EDGE_STITCH
</dt>
7442 <dd class=
"description">Stitch along any side
</dd>
7443 <dt>IPP_FINISHINGS_EDGE_STITCH_BOTTOM
</dt>
7444 <dd class=
"description">Stitch along bottom edge
</dd>
7445 <dt>IPP_FINISHINGS_EDGE_STITCH_LEFT
</dt>
7446 <dd class=
"description">Stitch along left side
</dd>
7447 <dt>IPP_FINISHINGS_EDGE_STITCH_RIGHT
</dt>
7448 <dd class=
"description">Stitch along right side
</dd>
7449 <dt>IPP_FINISHINGS_EDGE_STITCH_TOP
</dt>
7450 <dd class=
"description">Stitch along top edge
</dd>
7451 <dt>IPP_FINISHINGS_FOLD
</dt>
7452 <dd class=
"description">Fold (any type)
</dd>
7453 <dt>IPP_FINISHINGS_FOLD_ACCORDIAN
</dt>
7454 <dd class=
"description">Accordian-fold the paper vertically into four sections
</dd>
7455 <dt>IPP_FINISHINGS_FOLD_DOUBLE_GATE
</dt>
7456 <dd class=
"description">Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically
</dd>
7457 <dt>IPP_FINISHINGS_FOLD_ENGINEERING_Z
</dt>
7458 <dd class=
"description">Fold the paper vertically into two small sections and one larger, forming an elongated Z
</dd>
7459 <dt>IPP_FINISHINGS_FOLD_GATE
</dt>
7460 <dd class=
"description">Fold the top and bottom quarters of the paper towards the midline
</dd>
7461 <dt>IPP_FINISHINGS_FOLD_HALF
</dt>
7462 <dd class=
"description">Fold the paper in half vertically
</dd>
7463 <dt>IPP_FINISHINGS_FOLD_HALF_Z
</dt>
7464 <dd class=
"description">Fold the paper in half horizontally, then Z-fold the paper vertically
</dd>
7465 <dt>IPP_FINISHINGS_FOLD_LEFT_GATE
</dt>
7466 <dd class=
"description">Fold the top quarter of the paper towards the midline
</dd>
7467 <dt>IPP_FINISHINGS_FOLD_LETTER
</dt>
7468 <dd class=
"description">Fold the paper into three sections vertically; sometimes also known as a C fold
</dd>
7469 <dt>IPP_FINISHINGS_FOLD_PARALLEL
</dt>
7470 <dd class=
"description">Fold the paper in half vertically two times, yielding four sections
</dd>
7471 <dt>IPP_FINISHINGS_FOLD_POSTER
</dt>
7472 <dd class=
"description">Fold the paper in half horizontally and vertically; sometimes also called a cross fold
</dd>
7473 <dt>IPP_FINISHINGS_FOLD_RIGHT_GATE
</dt>
7474 <dd class=
"description">Fold the bottom quarter of the paper towards the midline
</dd>
7475 <dt>IPP_FINISHINGS_FOLD_Z
</dt>
7476 <dd class=
"description">Fold the paper vertically into three sections, forming a Z
</dd>
7477 <dt>IPP_FINISHINGS_JOG_OFFSET
</dt>
7478 <dd class=
"description">Offset for binding (any type)
</dd>
7479 <dt>IPP_FINISHINGS_LAMINATE
</dt>
7480 <dd class=
"description">Apply protective (solid) material
</dd>
7481 <dt>IPP_FINISHINGS_NONE
</dt>
7482 <dd class=
"description">No finishing
</dd>
7483 <dt>IPP_FINISHINGS_PUNCH
</dt>
7484 <dd class=
"description">Punch (any location/count)
</dd>
7485 <dt>IPP_FINISHINGS_PUNCH_BOTTOM_LEFT
</dt>
7486 <dd class=
"description">Punch
1 hole bottom left
</dd>
7487 <dt>IPP_FINISHINGS_PUNCH_BOTTOM_RIGHT
</dt>
7488 <dd class=
"description">Punch
1 hole bottom right
</dd>
7489 <dt>IPP_FINISHINGS_PUNCH_DUAL_BOTTOM
</dt>
7490 <dd class=
"description">Punch
2 holes bottom edge
</dd>
7491 <dt>IPP_FINISHINGS_PUNCH_DUAL_LEFT
</dt>
7492 <dd class=
"description">Punch
2 holes left side
</dd>
7493 <dt>IPP_FINISHINGS_PUNCH_DUAL_RIGHT
</dt>
7494 <dd class=
"description">Punch
2 holes right side
</dd>
7495 <dt>IPP_FINISHINGS_PUNCH_DUAL_TOP
</dt>
7496 <dd class=
"description">Punch
2 holes top edge
</dd>
7497 <dt>IPP_FINISHINGS_PUNCH_MULTIPLE_BOTTOM
</dt>
7498 <dd class=
"description">Pucnh multiple holes bottom edge
</dd>
7499 <dt>IPP_FINISHINGS_PUNCH_MULTIPLE_LEFT
</dt>
7500 <dd class=
"description">Pucnh multiple holes left side
</dd>
7501 <dt>IPP_FINISHINGS_PUNCH_MULTIPLE_RIGHT
</dt>
7502 <dd class=
"description">Pucnh multiple holes right side
</dd>
7503 <dt>IPP_FINISHINGS_PUNCH_MULTIPLE_TOP
</dt>
7504 <dd class=
"description">Pucnh multiple holes top edge
</dd>
7505 <dt>IPP_FINISHINGS_PUNCH_QUAD_BOTTOM
</dt>
7506 <dd class=
"description">Punch
4 holes bottom edge
</dd>
7507 <dt>IPP_FINISHINGS_PUNCH_QUAD_LEFT
</dt>
7508 <dd class=
"description">Punch
4 holes left side
</dd>
7509 <dt>IPP_FINISHINGS_PUNCH_QUAD_RIGHT
</dt>
7510 <dd class=
"description">Punch
4 holes right side
</dd>
7511 <dt>IPP_FINISHINGS_PUNCH_QUAD_TOP
</dt>
7512 <dd class=
"description">Punch
4 holes top edge
</dd>
7513 <dt>IPP_FINISHINGS_PUNCH_TOP_LEFT
</dt>
7514 <dd class=
"description">Punch
1 hole top left
</dd>
7515 <dt>IPP_FINISHINGS_PUNCH_TOP_RIGHT
</dt>
7516 <dd class=
"description">Punch
1 hole top right
</dd>
7517 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_BOTTOM
</dt>
7518 <dd class=
"description">Punch
3 holes bottom edge
</dd>
7519 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_LEFT
</dt>
7520 <dd class=
"description">Punch
3 holes left side
</dd>
7521 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_RIGHT
</dt>
7522 <dd class=
"description">Punch
3 holes right side
</dd>
7523 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_TOP
</dt>
7524 <dd class=
"description">Punch
3 holes top edge
</dd>
7525 <dt>IPP_FINISHINGS_SADDLE_STITCH
</dt>
7526 <dd class=
"description">Staple interior
</dd>
7527 <dt>IPP_FINISHINGS_STAPLE
</dt>
7528 <dd class=
"description">Staple (any location/method)
</dd>
7529 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_LEFT
</dt>
7530 <dd class=
"description">Staple bottom left corner
</dd>
7531 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT
</dt>
7532 <dd class=
"description">Staple bottom right corner
</dd>
7533 <dt>IPP_FINISHINGS_STAPLE_DUAL_BOTTOM
</dt>
7534 <dd class=
"description">Two staples on bottom
</dd>
7535 <dt>IPP_FINISHINGS_STAPLE_DUAL_LEFT
</dt>
7536 <dd class=
"description">Two staples on left
</dd>
7537 <dt>IPP_FINISHINGS_STAPLE_DUAL_RIGHT
</dt>
7538 <dd class=
"description">Two staples on right
</dd>
7539 <dt>IPP_FINISHINGS_STAPLE_DUAL_TOP
</dt>
7540 <dd class=
"description">Two staples on top
</dd>
7541 <dt>IPP_FINISHINGS_STAPLE_TOP_LEFT
</dt>
7542 <dd class=
"description">Staple top left corner
</dd>
7543 <dt>IPP_FINISHINGS_STAPLE_TOP_RIGHT
</dt>
7544 <dd class=
"description">Staple top right corner
</dd>
7545 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_BOTTOM
</dt>
7546 <dd class=
"description">Three staples on bottom
</dd>
7547 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_LEFT
</dt>
7548 <dd class=
"description">Three staples on left
</dd>
7549 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_RIGHT
</dt>
7550 <dd class=
"description">Three staples on right
</dd>
7551 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_TOP
</dt>
7552 <dd class=
"description">Three staples on top
</dd>
7553 <dt>IPP_FINISHINGS_TRIM
</dt>
7554 <dd class=
"description">Trim (any type)
</dd>
7555 <dt>IPP_FINISHINGS_TRIM_AFTER_COPIES
</dt>
7556 <dd class=
"description">Trim output after each copy
</dd>
7557 <dt>IPP_FINISHINGS_TRIM_AFTER_DOCUMENTS
</dt>
7558 <dd class=
"description">Trim output after each document
</dd>
7559 <dt>IPP_FINISHINGS_TRIM_AFTER_JOB
</dt>
7560 <dd class=
"description">Trim output after job
</dd>
7561 <dt>IPP_FINISHINGS_TRIM_AFTER_PAGES
</dt>
7562 <dd class=
"description">Trim output after each page
</dd>
7564 <h3 class=
"enumeration"><a id=
"ipp_jstate_e">ipp_jstate_e
</a></h3>
7565 <p class=
"description">Job states
</p>
7566 <h4 class=
"constants">Constants
</h4>
7568 <dt>IPP_JSTATE_ABORTED
</dt>
7569 <dd class=
"description">Job has aborted due to error
</dd>
7570 <dt>IPP_JSTATE_CANCELED
</dt>
7571 <dd class=
"description">Job has been canceled
</dd>
7572 <dt>IPP_JSTATE_COMPLETED
</dt>
7573 <dd class=
"description">Job has completed successfully
</dd>
7574 <dt>IPP_JSTATE_HELD
</dt>
7575 <dd class=
"description">Job is held for printing
</dd>
7576 <dt>IPP_JSTATE_PENDING
</dt>
7577 <dd class=
"description">Job is waiting to be printed
</dd>
7578 <dt>IPP_JSTATE_PROCESSING
</dt>
7579 <dd class=
"description">Job is currently printing
</dd>
7580 <dt>IPP_JSTATE_STOPPED
</dt>
7581 <dd class=
"description">Job has been stopped
</dd>
7583 <h3 class=
"enumeration"><a id=
"ipp_op_e">ipp_op_e
</a></h3>
7584 <p class=
"description">IPP operations
</p>
7585 <h4 class=
"constants">Constants
</h4>
7587 <dt>IPP_OP_CANCEL_CURRENT_JOB
</dt>
7588 <dd class=
"description">Cancel-Current-Job: Cancel the current job
</dd>
7589 <dt>IPP_OP_CANCEL_JOB
</dt>
7590 <dd class=
"description">Cancel-Job: Cancel a job
</dd>
7591 <dt>IPP_OP_CANCEL_JOBS
</dt>
7592 <dd class=
"description">Cancel-Jobs: Cancel all jobs (administrative)
</dd>
7593 <dt>IPP_OP_CANCEL_MY_JOBS
</dt>
7594 <dd class=
"description">Cancel-My-Jobs: Cancel a user's jobs
</dd>
7595 <dt>IPP_OP_CANCEL_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
7596 <dd class=
"description">Cancel-Subscription: Cancel a subscription
</dd>
7597 <dt>IPP_OP_CLOSE_JOB
</dt>
7598 <dd class=
"description">Close-Job: Close a job and start printing
</dd>
7599 <dt>IPP_OP_CREATE_JOB
</dt>
7600 <dd class=
"description">Create-Job: Create an empty print job
</dd>
7601 <dt>IPP_OP_CREATE_JOB_SUBSCRIPTIONS
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
7602 <dd class=
"description">Create-Job-Subscriptions: Create one of more job subscriptions
</dd>
7603 <dt>IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
7604 <dd class=
"description">Create-Printer-Subscriptions: Create one or more printer subscriptions
</dd>
7605 <dt>IPP_OP_CUPS_ADD_MODIFY_CLASS
</dt>
7606 <dd class=
"description">CUPS-Add-Modify-Class: Add or modify a class
</dd>
7607 <dt>IPP_OP_CUPS_ADD_MODIFY_PRINTER
</dt>
7608 <dd class=
"description">CUPS-Add-Modify-Printer: Add or modify a printer
</dd>
7609 <dt>IPP_OP_CUPS_AUTHENTICATE_JOB
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
7610 <dd class=
"description">CUPS-Authenticate-Job: Authenticate a job
</dd>
7611 <dt>IPP_OP_CUPS_CREATE_LOCAL_PRINTER
<span class=
"info"> CUPS
2.2 </span></dt>
7612 <dd class=
"description">CUPS-Create-Local-Printer: Create a local (temporary) printer
</dd>
7613 <dt>IPP_OP_CUPS_DELETE_CLASS
</dt>
7614 <dd class=
"description">CUPS-Delete-Class: Delete a class
</dd>
7615 <dt>IPP_OP_CUPS_DELETE_PRINTER
</dt>
7616 <dd class=
"description">CUPS-Delete-Printer: Delete a printer
</dd>
7617 <dt>IPP_OP_CUPS_GET_DEFAULT
</dt>
7618 <dd class=
"description">CUPS-Get-Default: Get the default printer
</dd>
7619 <dt>IPP_OP_CUPS_GET_DEVICES
<span class=
"info"> DEPRECATED
 </span></dt>
7620 <dd class=
"description">CUPS-Get-Devices: Get a list of supported devices
</dd>
7621 <dt>IPP_OP_CUPS_GET_DOCUMENT
<span class=
"info"> CUPS
1.4/macOS
10.6 </span></dt>
7622 <dd class=
"description">CUPS-Get-Document: Get a document file
</dd>
7623 <dt>IPP_OP_CUPS_GET_PPD
<span class=
"info"> DEPRECATED
 </span></dt>
7624 <dd class=
"description">CUPS-Get-PPD: Get a PPD file
</dd>
7625 <dt>IPP_OP_CUPS_GET_PPDS
<span class=
"info"> DEPRECATED
 </span></dt>
7626 <dd class=
"description">CUPS-Get-PPDs: Get a list of supported drivers
</dd>
7627 <dt>IPP_OP_CUPS_GET_PRINTERS
</dt>
7628 <dd class=
"description">CUPS-Get-Printers: Get a list of printers and/or classes
</dd>
7629 <dt>IPP_OP_CUPS_INVALID
</dt>
7630 <dd class=
"description">Invalid operation name for
<a href=
"#ippOpValue"><code>ippOpValue
</code></a></dd>
7631 <dt>IPP_OP_CUPS_MOVE_JOB
</dt>
7632 <dd class=
"description">CUPS-Move-Job: Move a job to a different printer
</dd>
7633 <dt>IPP_OP_CUPS_SET_DEFAULT
</dt>
7634 <dd class=
"description">CUPS-Set-Default: Set the default printer
</dd>
7635 <dt>IPP_OP_DISABLE_PRINTER
</dt>
7636 <dd class=
"description">Disable-Printer: Reject new jobs for a printer
</dd>
7637 <dt>IPP_OP_ENABLE_PRINTER
</dt>
7638 <dd class=
"description">Enable-Printer: Accept new jobs for a printer
</dd>
7639 <dt>IPP_OP_GET_JOBS
</dt>
7640 <dd class=
"description">Get-Jobs: Get a list of jobs
</dd>
7641 <dt>IPP_OP_GET_JOB_ATTRIBUTES
</dt>
7642 <dd class=
"description">Get-Job-Attribute: Get information about a job
</dd>
7643 <dt>IPP_OP_GET_NOTIFICATIONS
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
7644 <dd class=
"description">Get-Notifications: Get notification events
</dd>
7645 <dt>IPP_OP_GET_PRINTER_ATTRIBUTES
</dt>
7646 <dd class=
"description">Get-Printer-Attributes: Get information about a printer
</dd>
7647 <dt>IPP_OP_GET_PRINTER_SUPPORTED_VALUES
</dt>
7648 <dd class=
"description">Get-Printer-Supported-Values: Get supported values
</dd>
7649 <dt>IPP_OP_GET_SUBSCRIPTIONS
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
7650 <dd class=
"description">Get-Subscriptions: Get list of subscriptions
</dd>
7651 <dt>IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
7652 <dd class=
"description">Get-Subscription-Attributes: Get subscription information
</dd>
7653 <dt>IPP_OP_HOLD_JOB
</dt>
7654 <dd class=
"description">Hold-Job: Hold a job for printing
</dd>
7655 <dt>IPP_OP_HOLD_NEW_JOBS
</dt>
7656 <dd class=
"description">Hold-New-Jobs: Hold new jobs
</dd>
7657 <dt>IPP_OP_IDENTIFY_PRINTER
</dt>
7658 <dd class=
"description">Identify-Printer: Make the printer beep, flash, or display a message for identification
</dd>
7659 <dt>IPP_OP_PAUSE_PRINTER
</dt>
7660 <dd class=
"description">Pause-Printer: Stop a printer
</dd>
7661 <dt>IPP_OP_PAUSE_PRINTER_AFTER_CURRENT_JOB
</dt>
7662 <dd class=
"description">Pause-Printer-After-Current-Job: Stop printer after the current job
</dd>
7663 <dt>IPP_OP_PRINT_JOB
</dt>
7664 <dd class=
"description">Print-Job: Print a single file
</dd>
7665 <dt>IPP_OP_PROMOTE_JOB
</dt>
7666 <dd class=
"description">Promote-Job: Promote a job to print sooner
</dd>
7667 <dt>IPP_OP_RELEASE_HELD_NEW_JOBS
</dt>
7668 <dd class=
"description">Release-Held-New-Jobs: Release new jobs that were previously held
</dd>
7669 <dt>IPP_OP_RELEASE_JOB
</dt>
7670 <dd class=
"description">Release-Job: Release a job for printing
</dd>
7671 <dt>IPP_OP_RENEW_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
7672 <dd class=
"description">Renew-Subscription: Renew a printer subscription
</dd>
7673 <dt>IPP_OP_RESTART_JOB
<span class=
"info"> DEPRECATED
 </span></dt>
7674 <dd class=
"description">Restart-Job: Reprint a job
</dd>
7675 <dt>IPP_OP_RESUME_JOB
</dt>
7676 <dd class=
"description">Resume-Job: Resume the current job
</dd>
7677 <dt>IPP_OP_RESUME_PRINTER
</dt>
7678 <dd class=
"description">Resume-Printer: Start a printer
</dd>
7679 <dt>IPP_OP_SCHEDULE_JOB_AFTER
</dt>
7680 <dd class=
"description">Schedule-Job-After: Schedule a job to print after another
</dd>
7681 <dt>IPP_OP_SEND_DOCUMENT
</dt>
7682 <dd class=
"description">Send-Document: Add a file to a job
</dd>
7683 <dt>IPP_OP_SET_JOB_ATTRIBUTES
</dt>
7684 <dd class=
"description">Set-Job-Attributes: Set job values
</dd>
7685 <dt>IPP_OP_SET_PRINTER_ATTRIBUTES
</dt>
7686 <dd class=
"description">Set-Printer-Attributes: Set printer values
</dd>
7687 <dt>IPP_OP_SUSPEND_CURRENT_JOB
</dt>
7688 <dd class=
"description">Suspend-Current-Job: Suspend the current job
</dd>
7689 <dt>IPP_OP_VALIDATE_JOB
</dt>
7690 <dd class=
"description">Validate-Job: Validate job values prior to submission
</dd>
7692 <h3 class=
"enumeration"><a id=
"ipp_orient_e">ipp_orient_e
</a></h3>
7693 <p class=
"description">Orientation values
</p>
7694 <h4 class=
"constants">Constants
</h4>
7696 <dt>IPP_ORIENT_LANDSCAPE
</dt>
7697 <dd class=
"description">90 degrees counter-clockwise
</dd>
7698 <dt>IPP_ORIENT_NONE
</dt>
7699 <dd class=
"description">No rotation
</dd>
7700 <dt>IPP_ORIENT_PORTRAIT
</dt>
7701 <dd class=
"description">No rotation
</dd>
7702 <dt>IPP_ORIENT_REVERSE_LANDSCAPE
</dt>
7703 <dd class=
"description">90 degrees clockwise
</dd>
7704 <dt>IPP_ORIENT_REVERSE_PORTRAIT
</dt>
7705 <dd class=
"description">180 degrees
</dd>
7707 <h3 class=
"enumeration"><a id=
"ipp_pstate_e">ipp_pstate_e
</a></h3>
7708 <p class=
"description">Printer states
</p>
7709 <h4 class=
"constants">Constants
</h4>
7711 <dt>IPP_PSTATE_IDLE
</dt>
7712 <dd class=
"description">Printer is idle
</dd>
7713 <dt>IPP_PSTATE_PROCESSING
</dt>
7714 <dd class=
"description">Printer is working
</dd>
7715 <dt>IPP_PSTATE_STOPPED
</dt>
7716 <dd class=
"description">Printer is stopped
</dd>
7718 <h3 class=
"enumeration"><a id=
"ipp_quality_e">ipp_quality_e
</a></h3>
7719 <p class=
"description">Qualities
</p>
7720 <h4 class=
"constants">Constants
</h4>
7722 <dt>IPP_QUALITY_DRAFT
</dt>
7723 <dd class=
"description">Draft quality
</dd>
7724 <dt>IPP_QUALITY_HIGH
</dt>
7725 <dd class=
"description">High quality
</dd>
7726 <dt>IPP_QUALITY_NORMAL
</dt>
7727 <dd class=
"description">Normal quality
</dd>
7729 <h3 class=
"enumeration"><a id=
"ipp_res_e">ipp_res_e
</a></h3>
7730 <p class=
"description">Resolution units
</p>
7731 <h4 class=
"constants">Constants
</h4>
7733 <dt>IPP_RES_PER_CM
</dt>
7734 <dd class=
"description">Pixels per centimeter
</dd>
7735 <dt>IPP_RES_PER_INCH
</dt>
7736 <dd class=
"description">Pixels per inch
</dd>
7738 <h3 class=
"enumeration"><a id=
"ipp_state_e">ipp_state_e
</a></h3>
7739 <p class=
"description">IPP states
</p>
7740 <h4 class=
"constants">Constants
</h4>
7742 <dt>IPP_STATE_ATTRIBUTE
</dt>
7743 <dd class=
"description">One or more attributes need to be sent/received
</dd>
7744 <dt>IPP_STATE_DATA
</dt>
7745 <dd class=
"description">IPP request data needs to be sent/received
</dd>
7746 <dt>IPP_STATE_ERROR
</dt>
7747 <dd class=
"description">An error occurred
</dd>
7748 <dt>IPP_STATE_HEADER
</dt>
7749 <dd class=
"description">The request header needs to be sent/received
</dd>
7750 <dt>IPP_STATE_IDLE
</dt>
7751 <dd class=
"description">Nothing is happening/request completed
</dd>
7753 <h3 class=
"enumeration"><a id=
"ipp_status_e">ipp_status_e
</a></h3>
7754 <p class=
"description">IPP status codes
</p>
7755 <h4 class=
"constants">Constants
</h4>
7757 <dt>IPP_STATUS_CUPS_INVALID
</dt>
7758 <dd class=
"description">Invalid status name for
<a href=
"#ippErrorValue"><code>ippErrorValue
</code></a></dd>
7759 <dt>IPP_STATUS_ERROR_ACCOUNT_AUTHORIZATION_FAILED
</dt>
7760 <dd class=
"description">client-error-account-authorization-failed
</dd>
7761 <dt>IPP_STATUS_ERROR_ACCOUNT_CLOSED
</dt>
7762 <dd class=
"description">client-error-account-closed
</dd>
7763 <dt>IPP_STATUS_ERROR_ACCOUNT_INFO_NEEDED
</dt>
7764 <dd class=
"description">client-error-account-info-needed
</dd>
7765 <dt>IPP_STATUS_ERROR_ACCOUNT_LIMIT_REACHED
</dt>
7766 <dd class=
"description">client-error-account-limit-reached
</dd>
7767 <dt>IPP_STATUS_ERROR_ATTRIBUTES_NOT_SETTABLE
</dt>
7768 <dd class=
"description">client-error-attributes-not-settable
</dd>
7769 <dt>IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES
</dt>
7770 <dd class=
"description">client-error-attributes-or-values-not-supported
</dd>
7771 <dt>IPP_STATUS_ERROR_BAD_REQUEST
</dt>
7772 <dd class=
"description">client-error-bad-request
</dd>
7773 <dt>IPP_STATUS_ERROR_BUSY
</dt>
7774 <dd class=
"description">server-error-busy
</dd>
7775 <dt>IPP_STATUS_ERROR_CHARSET
</dt>
7776 <dd class=
"description">client-error-charset-not-supported
</dd>
7777 <dt>IPP_STATUS_ERROR_COMPRESSION_ERROR
</dt>
7778 <dd class=
"description">client-error-compression-error
</dd>
7779 <dt>IPP_STATUS_ERROR_COMPRESSION_NOT_SUPPORTED
</dt>
7780 <dd class=
"description">client-error-compression-not-supported
</dd>
7781 <dt>IPP_STATUS_ERROR_CONFLICTING
</dt>
7782 <dd class=
"description">client-error-conflicting-attributes
</dd>
7783 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED
<span class=
"info"> DEPRECATED
 </span></dt>
7784 <dd class=
"description">cups-error-account-authorization-failed
</dd>
7785 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED
</dt>
7786 <dd class=
"description">cups-error-account-closed @deprecate@
</dd>
7787 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED
<span class=
"info"> DEPRECATED
 </span></dt>
7788 <dd class=
"description">cups-error-account-info-needed
</dd>
7789 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_LIMIT_REACHED
<span class=
"info"> DEPRECATED
 </span></dt>
7790 <dd class=
"description">cups-error-account-limit-reached
</dd>
7791 <dt>IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED
<span class=
"info"> CUPS
1.5/macOS
10.7 </span></dt>
7792 <dd class=
"description">cups-authentication-canceled - Authentication canceled by user
</dd>
7793 <dt>IPP_STATUS_ERROR_CUPS_PKI
<span class=
"info"> CUPS
1.5/macOS
10.7 </span></dt>
7794 <dd class=
"description">cups-pki-error - Error negotiating a secure connection
</dd>
7795 <dt>IPP_STATUS_ERROR_CUPS_UPGRADE_REQUIRED
<span class=
"info"> CUPS
1.5/macOS
10.7 </span></dt>
7796 <dd class=
"description">cups-upgrade-required - TLS upgrade required
</dd>
7797 <dt>IPP_STATUS_ERROR_DEVICE
</dt>
7798 <dd class=
"description">server-error-device-error
</dd>
7799 <dt>IPP_STATUS_ERROR_DOCUMENT_ACCESS
</dt>
7800 <dd class=
"description">client-error-document-access-error
</dd>
7801 <dt>IPP_STATUS_ERROR_DOCUMENT_FORMAT_ERROR
</dt>
7802 <dd class=
"description">client-error-document-format-error
</dd>
7803 <dt>IPP_STATUS_ERROR_DOCUMENT_FORMAT_NOT_SUPPORTED
</dt>
7804 <dd class=
"description">client-error-document-format-not-supported
</dd>
7805 <dt>IPP_STATUS_ERROR_DOCUMENT_PASSWORD
</dt>
7806 <dd class=
"description">client-error-document-password-error
</dd>
7807 <dt>IPP_STATUS_ERROR_DOCUMENT_PERMISSION
</dt>
7808 <dd class=
"description">client-error-document-permission-error
</dd>
7809 <dt>IPP_STATUS_ERROR_DOCUMENT_SECURITY
</dt>
7810 <dd class=
"description">client-error-document-security-error
</dd>
7811 <dt>IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE
</dt>
7812 <dd class=
"description">client-error-document-unprintable-error
</dd>
7813 <dt>IPP_STATUS_ERROR_FORBIDDEN
</dt>
7814 <dd class=
"description">client-error-forbidden
</dd>
7815 <dt>IPP_STATUS_ERROR_GONE
</dt>
7816 <dd class=
"description">client-error-gone
</dd>
7817 <dt>IPP_STATUS_ERROR_IGNORED_ALL_SUBSCRIPTIONS
</dt>
7818 <dd class=
"description">client-error-ignored-all-subscriptions
</dd>
7819 <dt>IPP_STATUS_ERROR_INTERNAL
</dt>
7820 <dd class=
"description">server-error-internal-error
</dd>
7821 <dt>IPP_STATUS_ERROR_JOB_CANCELED
</dt>
7822 <dd class=
"description">server-error-job-canceled
</dd>
7823 <dt>IPP_STATUS_ERROR_MULTIPLE_JOBS_NOT_SUPPORTED
</dt>
7824 <dd class=
"description">server-error-multiple-document-jobs-not-supported
</dd>
7825 <dt>IPP_STATUS_ERROR_NOT_ACCEPTING_JOBS
</dt>
7826 <dd class=
"description">server-error-not-accepting-jobs
</dd>
7827 <dt>IPP_STATUS_ERROR_NOT_AUTHENTICATED
</dt>
7828 <dd class=
"description">client-error-not-authenticated
</dd>
7829 <dt>IPP_STATUS_ERROR_NOT_AUTHORIZED
</dt>
7830 <dd class=
"description">client-error-not-authorized
</dd>
7831 <dt>IPP_STATUS_ERROR_NOT_FETCHABLE
</dt>
7832 <dd class=
"description">client-error-not-fetchable
</dd>
7833 <dt>IPP_STATUS_ERROR_NOT_FOUND
</dt>
7834 <dd class=
"description">client-error-not-found
</dd>
7835 <dt>IPP_STATUS_ERROR_NOT_POSSIBLE
</dt>
7836 <dd class=
"description">client-error-not-possible
</dd>
7837 <dt>IPP_STATUS_ERROR_OPERATION_NOT_SUPPORTED
</dt>
7838 <dd class=
"description">server-error-operation-not-supported
</dd>
7839 <dt>IPP_STATUS_ERROR_PRINTER_IS_DEACTIVATED
</dt>
7840 <dd class=
"description">server-error-printer-is-deactivated
</dd>
7841 <dt>IPP_STATUS_ERROR_REQUEST_ENTITY
</dt>
7842 <dd class=
"description">client-error-request-entity-too-large
</dd>
7843 <dt>IPP_STATUS_ERROR_REQUEST_VALUE
</dt>
7844 <dd class=
"description">client-error-request-value-too-long
</dd>
7845 <dt>IPP_STATUS_ERROR_SERVICE_UNAVAILABLE
</dt>
7846 <dd class=
"description">server-error-service-unavailable
</dd>
7847 <dt>IPP_STATUS_ERROR_TEMPORARY
</dt>
7848 <dd class=
"description">server-error-temporary-error
</dd>
7849 <dt>IPP_STATUS_ERROR_TIMEOUT
</dt>
7850 <dd class=
"description">client-error-timeout
</dd>
7851 <dt>IPP_STATUS_ERROR_TOO_MANY_DOCUMENTS
</dt>
7852 <dd class=
"description">server-error-too-many-documents
</dd>
7853 <dt>IPP_STATUS_ERROR_TOO_MANY_JOBS
</dt>
7854 <dd class=
"description">server-error-too-many-jobs
</dd>
7855 <dt>IPP_STATUS_ERROR_TOO_MANY_SUBSCRIPTIONS
</dt>
7856 <dd class=
"description">client-error-too-many-subscriptions
</dd>
7857 <dt>IPP_STATUS_ERROR_URI_SCHEME
</dt>
7858 <dd class=
"description">client-error-uri-scheme-not-supported
</dd>
7859 <dt>IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED
</dt>
7860 <dd class=
"description">server-error-version-not-supported
</dd>
7861 <dt>IPP_STATUS_OK
</dt>
7862 <dd class=
"description">successful-ok
</dd>
7863 <dt>IPP_STATUS_OK_CONFLICTING
</dt>
7864 <dd class=
"description">successful-ok-conflicting-attributes
</dd>
7865 <dt>IPP_STATUS_OK_EVENTS_COMPLETE
</dt>
7866 <dd class=
"description">successful-ok-events-complete
</dd>
7867 <dt>IPP_STATUS_OK_IGNORED_OR_SUBSTITUTED
</dt>
7868 <dd class=
"description">successful-ok-ignored-or-substituted-attributes
</dd>
7869 <dt>IPP_STATUS_OK_IGNORED_SUBSCRIPTIONS
</dt>
7870 <dd class=
"description">successful-ok-ignored-subscriptions
</dd>
7871 <dt>IPP_STATUS_OK_TOO_MANY_EVENTS
</dt>
7872 <dd class=
"description">successful-ok-too-many-events
</dd>
7874 <h3 class=
"enumeration"><a id=
"ipp_tag_e">ipp_tag_e
</a></h3>
7875 <p class=
"description">Format tags for attributes
</p>
7876 <h4 class=
"constants">Constants
</h4>
7878 <dt>IPP_TAG_ADMINDEFINE
</dt>
7879 <dd class=
"description">Admin-defined value
</dd>
7880 <dt>IPP_TAG_BOOLEAN
</dt>
7881 <dd class=
"description">Boolean value
</dd>
7882 <dt>IPP_TAG_CHARSET
</dt>
7883 <dd class=
"description">Character set value
</dd>
7884 <dt>IPP_TAG_CUPS_INVALID
</dt>
7885 <dd class=
"description">Invalid tag name for
<a href=
"#ippTagValue"><code>ippTagValue
</code></a></dd>
7886 <dt>IPP_TAG_DATE
</dt>
7887 <dd class=
"description">Date/time value
</dd>
7888 <dt>IPP_TAG_DEFAULT
</dt>
7889 <dd class=
"description">Default value
</dd>
7890 <dt>IPP_TAG_DELETEATTR
</dt>
7891 <dd class=
"description">Delete-attribute value
</dd>
7892 <dt>IPP_TAG_END
</dt>
7893 <dd class=
"description">End-of-attributes
</dd>
7894 <dt>IPP_TAG_ENUM
</dt>
7895 <dd class=
"description">Enumeration value
</dd>
7896 <dt>IPP_TAG_EVENT_NOTIFICATION
</dt>
7897 <dd class=
"description">Event group
</dd>
7898 <dt>IPP_TAG_INTEGER
</dt>
7899 <dd class=
"description">Integer value
</dd>
7900 <dt>IPP_TAG_JOB
</dt>
7901 <dd class=
"description">Job group
</dd>
7902 <dt>IPP_TAG_KEYWORD
</dt>
7903 <dd class=
"description">Keyword value
</dd>
7904 <dt>IPP_TAG_LANGUAGE
</dt>
7905 <dd class=
"description">Language value
</dd>
7906 <dt>IPP_TAG_MIMETYPE
</dt>
7907 <dd class=
"description">MIME media type value
</dd>
7908 <dt>IPP_TAG_NAME
</dt>
7909 <dd class=
"description">Name value
</dd>
7910 <dt>IPP_TAG_NAMELANG
</dt>
7911 <dd class=
"description">Name-with-language value
</dd>
7912 <dt>IPP_TAG_NOTSETTABLE
</dt>
7913 <dd class=
"description">Not-settable value
</dd>
7914 <dt>IPP_TAG_NOVALUE
</dt>
7915 <dd class=
"description">No-value value
</dd>
7916 <dt>IPP_TAG_OPERATION
</dt>
7917 <dd class=
"description">Operation group
</dd>
7918 <dt>IPP_TAG_PRINTER
</dt>
7919 <dd class=
"description">Printer group
</dd>
7920 <dt>IPP_TAG_RANGE
</dt>
7921 <dd class=
"description">Range value
</dd>
7922 <dt>IPP_TAG_RESOLUTION
</dt>
7923 <dd class=
"description">Resolution value
</dd>
7924 <dt>IPP_TAG_STRING
</dt>
7925 <dd class=
"description">Octet string value
</dd>
7926 <dt>IPP_TAG_SUBSCRIPTION
</dt>
7927 <dd class=
"description">Subscription group
</dd>
7928 <dt>IPP_TAG_TEXT
</dt>
7929 <dd class=
"description">Text value
</dd>
7930 <dt>IPP_TAG_TEXTLANG
</dt>
7931 <dd class=
"description">Text-with-language value
</dd>
7932 <dt>IPP_TAG_UNKNOWN
</dt>
7933 <dd class=
"description">Unknown value
</dd>
7934 <dt>IPP_TAG_UNSUPPORTED_GROUP
</dt>
7935 <dd class=
"description">Unsupported attributes group
</dd>
7936 <dt>IPP_TAG_UNSUPPORTED_VALUE
</dt>
7937 <dd class=
"description">Unsupported value
</dd>
7938 <dt>IPP_TAG_URI
</dt>
7939 <dd class=
"description">URI value
</dd>
7940 <dt>IPP_TAG_URISCHEME
</dt>
7941 <dd class=
"description">URI scheme value
</dd>
7942 <dt>IPP_TAG_ZERO
</dt>
7943 <dd class=
"description">Zero tag - used for separators
</dd>