3 <!-- SECTION: Programming -->
5 <title>HTTP and IPP APIs
</title>
6 <meta name=
"keywords" content=
"Programming">
7 <meta http-equiv=
"Content-Type" content=
"text/html;charset=utf-8">
8 <meta name=
"creator" content=
"Mini-XML v2.11">
9 <meta name=
"author" content=
"Unknown">
10 <meta name=
"copyright" content=
"Unknown">
11 <style type=
"text/css"><!--
13 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
16 H1, H2, H3, H4, H5, H6, P, TD, TH {
17 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
21 font-family: monaco, courier, monospace;
26 font-family: monaco, courier, monospace;
30 border: dotted thin #7f7f7f;
58 border: dotted thin #999999;
63 PRE.command EM, PRE.example EM {
64 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
68 font-family: monaco, courier, monospace;
79 border: solid thin #999999;
90 -moz-border-radius: 10px;
95 text-decoration: none;
98 A:link:hover, A:visited:hover, A:active {
99 text-decoration: underline;
106 TR.data, TD.data, TR.data TD {
109 border-bottom: solid 1pt #999999;
113 border-bottom: solid 1pt #999999;
120 border: solid thin #999999;
121 border-collapse: collapse;
137 border: solid thin #cccccc;
144 border-bottom: solid thin #999999;
153 caption-side: bottom;
177 border: thin solid black;
185 H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
194 border-bottom: solid 2pt #000000;
197 DIV.indent, TABLE.indent {
205 border-collapse: collapse;
208 TABLE.indent TD, TABLE.indent TH {
213 border-collapse: collapse;
221 border-bottom: solid thin #cccccc;
226 vertical-align: bottom;
235 border-bottom: solid thin #eeeeee;
240 TABLE.list TR:nth-child(even) {
244 TABLE.list TR:nth-child(odd) {
263 font-family: monaco, courier, monospace;
267 border: solid thin #999999;
268 border-collapse: collapse;
273 DIV.summary TABLE TD, DIV.summary TABLE TH {
274 border: solid thin #999999;
280 DIV.summary TABLE THEAD TH {
284 /* API documentation styles... */
291 div.body h3, div.body h4, div.body h5 {
292 margin-bottom: 0.5em;
295 .class, .enumeration, .function, .struct, .typedef, .union {
296 border-bottom: solid thin #999999;
303 code, p.code, pre, ul.code li {
304 font-family: monaco, courier, monospace;
307 ul.code, ul.contents, ul.subcontents {
308 list-style-type: none;
318 ul.contents li ul.code, ul.contents li ul.subcontents {
331 margin-bottom: 0.5em;
334 /* This is just for the HTML files generated with the framedhelp target */
337 border: solid thin black;
346 div.contents ul.contents {
349 div.contents ul.subcontents li {
357 HTTP and IPP API header for CUPS.
359 Copyright 2007-2016 by Apple Inc.
360 Copyright 1997-2006 by Easy Software Products, all rights reserved.
362 These coded instructions, statements, and computer programs are the
363 property of Apple Inc. and are protected by Federal copyright
364 law. Distribution and use rights are outlined in the file "LICENSE.txt"
365 which should have been included with this file. If this file is
366 file is missing or damaged, see the license at "http://www.cups.org/".
369 <h1 class='title'
>HTTP and IPP APIs
</h1>
371 <div class='summary'
><table summary='General Information'
>
387 <td>Programming:
<a href='api-overview.html'
>Introduction to CUPS Programming
</a><br>
388 Programming:
<a href='api-cups.html'
>CUPS API
</a><br>
389 References:
<a href='spec-ipp.html'
>CUPS Implementation of IPP
</a></td>
393 <div class=
"contents">
394 <h2 class=
"title">Contents
</h2>
395 <ul class=
"contents">
396 <li><a href=
"#OVERVIEW">Overview
</a><ul class=
"subcontents">
397 <li><a href=
"#CREATING_URI_STRINGS">Creating URI Strings
</a></li>
398 <li><a href=
"#SENDING_REQUESTS_WITH_FILES">Sending Requests with Files
</a></li>
399 <li><a href=
"#ASYNCHRONOUS_REQUEST_PROCESSING">Asynchronous Request Processing
</a></li>
401 <li><a href=
"#FUNCTIONS">Functions
</a><ul class=
"subcontents">
402 <li><a href=
"#cupsDoAuthentication">cupsDoAuthentication
</a></li>
403 <li><a href=
"#cupsDoFileRequest">cupsDoFileRequest
</a></li>
404 <li><a href=
"#cupsDoIORequest">cupsDoIORequest
</a></li>
405 <li><a href=
"#cupsDoRequest">cupsDoRequest
</a></li>
406 <li><a href=
"#cupsEncodeOptions">cupsEncodeOptions
</a></li>
407 <li><a href=
"#cupsEncodeOptions2">cupsEncodeOptions2
</a></li>
408 <li><a href=
"#cupsGetDevices">cupsGetDevices
</a></li>
409 <li><a href=
"#cupsGetFd">cupsGetFd
</a></li>
410 <li><a href=
"#cupsGetFile">cupsGetFile
</a></li>
411 <li><a href=
"#cupsGetResponse">cupsGetResponse
</a></li>
412 <li><a href=
"#cupsLastError">cupsLastError
</a></li>
413 <li><a href=
"#cupsLastErrorString">cupsLastErrorString
</a></li>
414 <li><a href=
"#cupsPutFd">cupsPutFd
</a></li>
415 <li><a href=
"#cupsPutFile">cupsPutFile
</a></li>
416 <li><a href=
"#cupsReadResponseData">cupsReadResponseData
</a></li>
417 <li><a href=
"#cupsSendRequest">cupsSendRequest
</a></li>
418 <li><a href=
"#cupsWriteRequestData">cupsWriteRequestData
</a></li>
419 <li><a href=
"#httpAcceptConnection">httpAcceptConnection
</a></li>
420 <li><a href=
"#httpAddCredential">httpAddCredential
</a></li>
421 <li><a href=
"#httpAddrAny">httpAddrAny
</a></li>
422 <li><a href=
"#httpAddrClose">httpAddrClose
</a></li>
423 <li><a href=
"#httpAddrEqual">httpAddrEqual
</a></li>
424 <li><a href=
"#httpAddrFamily">httpAddrFamily
</a></li>
425 <li><a href=
"#httpAddrLength">httpAddrLength
</a></li>
426 <li><a href=
"#httpAddrListen">httpAddrListen
</a></li>
427 <li><a href=
"#httpAddrLocalhost">httpAddrLocalhost
</a></li>
428 <li><a href=
"#httpAddrLookup">httpAddrLookup
</a></li>
429 <li><a href=
"#httpAddrPort">httpAddrPort
</a></li>
430 <li><a href=
"#httpAddrString">httpAddrString
</a></li>
431 <li><a href=
"#httpAssembleURI">httpAssembleURI
</a></li>
432 <li><a href=
"#httpAssembleURIf">httpAssembleURIf
</a></li>
433 <li><a href=
"#httpAssembleUUID">httpAssembleUUID
</a></li>
434 <li><a href=
"#httpBlocking">httpBlocking
</a></li>
435 <li><a href=
"#httpCheck">httpCheck
</a></li>
436 <li><a href=
"#httpClearCookie">httpClearCookie
</a></li>
437 <li><a href=
"#httpClearFields">httpClearFields
</a></li>
438 <li><a href=
"#httpClose">httpClose
</a></li>
439 <li><a href=
"#httpCompareCredentials">httpCompareCredentials
</a></li>
440 <li><a href=
"#httpConnect">httpConnect
</a></li>
441 <li><a href=
"#httpConnect2">httpConnect2
</a></li>
442 <li><a href=
"#httpConnectEncrypt">httpConnectEncrypt
</a></li>
443 <li><a href=
"#httpDecode64">httpDecode64
</a></li>
444 <li><a href=
"#httpDecode64_2">httpDecode64_2
</a></li>
445 <li><a href=
"#httpDelete">httpDelete
</a></li>
446 <li><a href=
"#httpEncode64">httpEncode64
</a></li>
447 <li><a href=
"#httpEncode64_2">httpEncode64_2
</a></li>
448 <li><a href=
"#httpEncryption">httpEncryption
</a></li>
449 <li><a href=
"#httpError">httpError
</a></li>
450 <li><a href=
"#httpFieldValue">httpFieldValue
</a></li>
451 <li><a href=
"#httpFlush">httpFlush
</a></li>
452 <li><a href=
"#httpFlushWrite">httpFlushWrite
</a></li>
453 <li><a href=
"#httpFreeCredentials">httpFreeCredentials
</a></li>
454 <li><a href=
"#httpGet">httpGet
</a></li>
455 <li><a href=
"#httpGetActivity">httpGetActivity
</a></li>
456 <li><a href=
"#httpGetAddress">httpGetAddress
</a></li>
457 <li><a href=
"#httpGetAuthString">httpGetAuthString
</a></li>
458 <li><a href=
"#httpGetBlocking">httpGetBlocking
</a></li>
459 <li><a href=
"#httpGetContentEncoding">httpGetContentEncoding
</a></li>
460 <li><a href=
"#httpGetCookie">httpGetCookie
</a></li>
461 <li><a href=
"#httpGetDateString">httpGetDateString
</a></li>
462 <li><a href=
"#httpGetDateString2">httpGetDateString2
</a></li>
463 <li><a href=
"#httpGetDateTime">httpGetDateTime
</a></li>
464 <li><a href=
"#httpGetEncryption">httpGetEncryption
</a></li>
465 <li><a href=
"#httpGetExpect">httpGetExpect
</a></li>
466 <li><a href=
"#httpGetFd">httpGetFd
</a></li>
467 <li><a href=
"#httpGetField">httpGetField
</a></li>
468 <li><a href=
"#httpGetHostByName">httpGetHostByName
</a></li>
469 <li><a href=
"#httpGetHostname">httpGetHostname
</a></li>
470 <li><a href=
"#httpGetKeepAlive">httpGetKeepAlive
</a></li>
471 <li><a href=
"#httpGetLength">httpGetLength
</a></li>
472 <li><a href=
"#httpGetLength2">httpGetLength2
</a></li>
473 <li><a href=
"#httpGetPending">httpGetPending
</a></li>
474 <li><a href=
"#httpGetReady">httpGetReady
</a></li>
475 <li><a href=
"#httpGetRemaining">httpGetRemaining
</a></li>
476 <li><a href=
"#httpGetState">httpGetState
</a></li>
477 <li><a href=
"#httpGetStatus">httpGetStatus
</a></li>
478 <li><a href=
"#httpGetSubField">httpGetSubField
</a></li>
479 <li><a href=
"#httpGetSubField2">httpGetSubField2
</a></li>
480 <li><a href=
"#httpGetVersion">httpGetVersion
</a></li>
481 <li><a href=
"#httpGets">httpGets
</a></li>
482 <li><a href=
"#httpHead">httpHead
</a></li>
483 <li><a href=
"#httpInitialize">httpInitialize
</a></li>
484 <li><a href=
"#httpIsChunked">httpIsChunked
</a></li>
485 <li><a href=
"#httpIsEncrypted">httpIsEncrypted
</a></li>
486 <li><a href=
"#httpMD5">httpMD5
</a></li>
487 <li><a href=
"#httpMD5Final">httpMD5Final
</a></li>
488 <li><a href=
"#httpMD5String">httpMD5String
</a></li>
489 <li><a href=
"#httpOptions">httpOptions
</a></li>
490 <li><a href=
"#httpPeek">httpPeek
</a></li>
491 <li><a href=
"#httpPost">httpPost
</a></li>
492 <li><a href=
"#httpPut">httpPut
</a></li>
493 <li><a href=
"#httpRead">httpRead
</a></li>
494 <li><a href=
"#httpRead2">httpRead2
</a></li>
495 <li><a href=
"#httpReadRequest">httpReadRequest
</a></li>
496 <li><a href=
"#httpReconnect">httpReconnect
</a></li>
497 <li><a href=
"#httpReconnect2">httpReconnect2
</a></li>
498 <li><a href=
"#httpResolveHostname">httpResolveHostname
</a></li>
499 <li><a href=
"#httpSeparate">httpSeparate
</a></li>
500 <li><a href=
"#httpSeparate2">httpSeparate2
</a></li>
501 <li><a href=
"#httpSeparateURI">httpSeparateURI
</a></li>
502 <li><a href=
"#httpSetAuthString">httpSetAuthString
</a></li>
503 <li><a href=
"#httpSetCookie">httpSetCookie
</a></li>
504 <li><a href=
"#httpSetCredentials">httpSetCredentials
</a></li>
505 <li><a href=
"#httpSetDefaultField">httpSetDefaultField
</a></li>
506 <li><a href=
"#httpSetExpect">httpSetExpect
</a></li>
507 <li><a href=
"#httpSetField">httpSetField
</a></li>
508 <li><a href=
"#httpSetKeepAlive">httpSetKeepAlive
</a></li>
509 <li><a href=
"#httpSetLength">httpSetLength
</a></li>
510 <li><a href=
"#httpSetTimeout">httpSetTimeout
</a></li>
511 <li><a href=
"#httpShutdown">httpShutdown
</a></li>
512 <li><a href=
"#httpStateString">httpStateString
</a></li>
513 <li><a href=
"#httpStatus">httpStatus
</a></li>
514 <li><a href=
"#httpTrace">httpTrace
</a></li>
515 <li><a href=
"#httpURIStatusString">httpURIStatusString
</a></li>
516 <li><a href=
"#httpUpdate">httpUpdate
</a></li>
517 <li><a href=
"#httpWait">httpWait
</a></li>
518 <li><a href=
"#httpWrite">httpWrite
</a></li>
519 <li><a href=
"#httpWrite2">httpWrite2
</a></li>
520 <li><a href=
"#httpWriteResponse">httpWriteResponse
</a></li>
521 <li><a href=
"#ippAddBoolean">ippAddBoolean
</a></li>
522 <li><a href=
"#ippAddBooleans">ippAddBooleans
</a></li>
523 <li><a href=
"#ippAddCollection">ippAddCollection
</a></li>
524 <li><a href=
"#ippAddCollections">ippAddCollections
</a></li>
525 <li><a href=
"#ippAddDate">ippAddDate
</a></li>
526 <li><a href=
"#ippAddInteger">ippAddInteger
</a></li>
527 <li><a href=
"#ippAddIntegers">ippAddIntegers
</a></li>
528 <li><a href=
"#ippAddOctetString">ippAddOctetString
</a></li>
529 <li><a href=
"#ippAddOutOfBand">ippAddOutOfBand
</a></li>
530 <li><a href=
"#ippAddRange">ippAddRange
</a></li>
531 <li><a href=
"#ippAddRanges">ippAddRanges
</a></li>
532 <li><a href=
"#ippAddResolution">ippAddResolution
</a></li>
533 <li><a href=
"#ippAddResolutions">ippAddResolutions
</a></li>
534 <li><a href=
"#ippAddSeparator">ippAddSeparator
</a></li>
535 <li><a href=
"#ippAddString">ippAddString
</a></li>
536 <li><a href=
"#ippAddStringf">ippAddStringf
</a></li>
537 <li><a href=
"#ippAddStringfv">ippAddStringfv
</a></li>
538 <li><a href=
"#ippAddStrings">ippAddStrings
</a></li>
539 <li><a href=
"#ippAttributeString">ippAttributeString
</a></li>
540 <li><a href=
"#ippContainsInteger">ippContainsInteger
</a></li>
541 <li><a href=
"#ippContainsString">ippContainsString
</a></li>
542 <li><a href=
"#ippCopyAttribute">ippCopyAttribute
</a></li>
543 <li><a href=
"#ippCopyAttributes">ippCopyAttributes
</a></li>
544 <li><a href=
"#ippCreateRequestedArray">ippCreateRequestedArray
</a></li>
545 <li><a href=
"#ippDateToTime">ippDateToTime
</a></li>
546 <li><a href=
"#ippDelete">ippDelete
</a></li>
547 <li><a href=
"#ippDeleteAttribute">ippDeleteAttribute
</a></li>
548 <li><a href=
"#ippDeleteValues">ippDeleteValues
</a></li>
549 <li><a href=
"#ippEnumString">ippEnumString
</a></li>
550 <li><a href=
"#ippEnumValue">ippEnumValue
</a></li>
551 <li><a href=
"#ippErrorString">ippErrorString
</a></li>
552 <li><a href=
"#ippErrorValue">ippErrorValue
</a></li>
553 <li><a href=
"#ippFindAttribute">ippFindAttribute
</a></li>
554 <li><a href=
"#ippFindNextAttribute">ippFindNextAttribute
</a></li>
555 <li><a href=
"#ippFirstAttribute">ippFirstAttribute
</a></li>
556 <li><a href=
"#ippGetBoolean">ippGetBoolean
</a></li>
557 <li><a href=
"#ippGetCollection">ippGetCollection
</a></li>
558 <li><a href=
"#ippGetCount">ippGetCount
</a></li>
559 <li><a href=
"#ippGetDate">ippGetDate
</a></li>
560 <li><a href=
"#ippGetGroupTag">ippGetGroupTag
</a></li>
561 <li><a href=
"#ippGetInteger">ippGetInteger
</a></li>
562 <li><a href=
"#ippGetName">ippGetName
</a></li>
563 <li><a href=
"#ippGetOctetString">ippGetOctetString
</a></li>
564 <li><a href=
"#ippGetOperation">ippGetOperation
</a></li>
565 <li><a href=
"#ippGetRange">ippGetRange
</a></li>
566 <li><a href=
"#ippGetRequestId">ippGetRequestId
</a></li>
567 <li><a href=
"#ippGetResolution">ippGetResolution
</a></li>
568 <li><a href=
"#ippGetState">ippGetState
</a></li>
569 <li><a href=
"#ippGetStatusCode">ippGetStatusCode
</a></li>
570 <li><a href=
"#ippGetString">ippGetString
</a></li>
571 <li><a href=
"#ippGetValueTag">ippGetValueTag
</a></li>
572 <li><a href=
"#ippGetVersion">ippGetVersion
</a></li>
573 <li><a href=
"#ippLength">ippLength
</a></li>
574 <li><a href=
"#ippNew">ippNew
</a></li>
575 <li><a href=
"#ippNewRequest">ippNewRequest
</a></li>
576 <li><a href=
"#ippNewResponse">ippNewResponse
</a></li>
577 <li><a href=
"#ippNextAttribute">ippNextAttribute
</a></li>
578 <li><a href=
"#ippOpString">ippOpString
</a></li>
579 <li><a href=
"#ippOpValue">ippOpValue
</a></li>
580 <li><a href=
"#ippPort">ippPort
</a></li>
581 <li><a href=
"#ippRead">ippRead
</a></li>
582 <li><a href=
"#ippReadFile">ippReadFile
</a></li>
583 <li><a href=
"#ippReadIO">ippReadIO
</a></li>
584 <li><a href=
"#ippSetBoolean">ippSetBoolean
</a></li>
585 <li><a href=
"#ippSetCollection">ippSetCollection
</a></li>
586 <li><a href=
"#ippSetDate">ippSetDate
</a></li>
587 <li><a href=
"#ippSetGroupTag">ippSetGroupTag
</a></li>
588 <li><a href=
"#ippSetInteger">ippSetInteger
</a></li>
589 <li><a href=
"#ippSetName">ippSetName
</a></li>
590 <li><a href=
"#ippSetOctetString">ippSetOctetString
</a></li>
591 <li><a href=
"#ippSetOperation">ippSetOperation
</a></li>
592 <li><a href=
"#ippSetPort">ippSetPort
</a></li>
593 <li><a href=
"#ippSetRange">ippSetRange
</a></li>
594 <li><a href=
"#ippSetRequestId">ippSetRequestId
</a></li>
595 <li><a href=
"#ippSetResolution">ippSetResolution
</a></li>
596 <li><a href=
"#ippSetState">ippSetState
</a></li>
597 <li><a href=
"#ippSetStatusCode">ippSetStatusCode
</a></li>
598 <li><a href=
"#ippSetString">ippSetString
</a></li>
599 <li><a href=
"#ippSetStringf">ippSetStringf
</a></li>
600 <li><a href=
"#ippSetStringfv">ippSetStringfv
</a></li>
601 <li><a href=
"#ippSetValueTag">ippSetValueTag
</a></li>
602 <li><a href=
"#ippSetVersion">ippSetVersion
</a></li>
603 <li><a href=
"#ippStateString">ippStateString
</a></li>
604 <li><a href=
"#ippTagString">ippTagString
</a></li>
605 <li><a href=
"#ippTagValue">ippTagValue
</a></li>
606 <li><a href=
"#ippTimeToDate">ippTimeToDate
</a></li>
607 <li><a href=
"#ippValidateAttribute">ippValidateAttribute
</a></li>
608 <li><a href=
"#ippValidateAttributes">ippValidateAttributes
</a></li>
609 <li><a href=
"#ippWrite">ippWrite
</a></li>
610 <li><a href=
"#ippWriteFile">ippWriteFile
</a></li>
611 <li><a href=
"#ippWriteIO">ippWriteIO
</a></li>
613 <li><a href=
"#TYPES">Data Types
</a><ul class=
"subcontents">
614 <li><a href=
"#gss_auth_identity_desc">gss_auth_identity_desc
</a></li>
615 <li><a href=
"#http_addr_t">http_addr_t
</a></li>
616 <li><a href=
"#http_addrlist_t">http_addrlist_t
</a></li>
617 <li><a href=
"#http_auth_t">http_auth_t
</a></li>
618 <li><a href=
"#http_credential_t">http_credential_t
</a></li>
619 <li><a href=
"#http_encoding_t">http_encoding_t
</a></li>
620 <li><a href=
"#http_encryption_t">http_encryption_t
</a></li>
621 <li><a href=
"#http_field_t">http_field_t
</a></li>
622 <li><a href=
"#http_keepalive_t">http_keepalive_t
</a></li>
623 <li><a href=
"#http_state_t">http_state_t
</a></li>
624 <li><a href=
"#http_t">http_t
</a></li>
625 <li><a href=
"#http_timeout_cb_t">http_timeout_cb_t
</a></li>
626 <li><a href=
"#http_trust_t">http_trust_t
</a></li>
627 <li><a href=
"#http_uri_coding_t">http_uri_coding_t
</a></li>
628 <li><a href=
"#http_uri_status_t">http_uri_status_t
</a></li>
629 <li><a href=
"#http_version_t">http_version_t
</a></li>
630 <li><a href=
"#ipp_attribute_t">ipp_attribute_t
</a></li>
631 <li><a href=
"#ipp_copycb_t">ipp_copycb_t
</a></li>
632 <li><a href=
"#ipp_dstate_t">ipp_dstate_t
</a></li>
633 <li><a href=
"#ipp_finish_t">ipp_finish_t
</a></li>
634 <li><a href=
"#ipp_iocb_t">ipp_iocb_t
</a></li>
635 <li><a href=
"#ipp_jcollate_t">ipp_jcollate_t
</a></li>
636 <li><a href=
"#ipp_orient_t">ipp_orient_t
</a></li>
637 <li><a href=
"#ipp_pstate_t">ipp_pstate_t
</a></li>
638 <li><a href=
"#ipp_quality_t">ipp_quality_t
</a></li>
639 <li><a href=
"#ipp_res_t">ipp_res_t
</a></li>
640 <li><a href=
"#ipp_state_t">ipp_state_t
</a></li>
641 <li><a href=
"#ipp_t">ipp_t
</a></li>
642 <li><a href=
"#ipp_uchar_t">ipp_uchar_t
</a></li>
644 <li><a href=
"#STRUCTURES">Structures
</a><ul class=
"subcontents">
645 <li><a href=
"#gss_auth_identity">gss_auth_identity
</a></li>
646 <li><a href=
"#http_addrlist_s">http_addrlist_s
</a></li>
647 <li><a href=
"#http_credential_s">http_credential_s
</a></li>
648 <li><a href=
"#pollfd">pollfd
</a></li>
650 <li><a href=
"#ENUMERATIONS">Enumerations
</a><ul class=
"subcontents">
651 <li><a href=
"#http_auth_e">http_auth_e
</a></li>
652 <li><a href=
"#http_encoding_e">http_encoding_e
</a></li>
653 <li><a href=
"#http_encryption_e">http_encryption_e
</a></li>
654 <li><a href=
"#http_field_e">http_field_e
</a></li>
655 <li><a href=
"#http_keepalive_e">http_keepalive_e
</a></li>
656 <li><a href=
"#http_state_e">http_state_e
</a></li>
657 <li><a href=
"#http_status_e">http_status_e
</a></li>
658 <li><a href=
"#http_trust_e">http_trust_e
</a></li>
659 <li><a href=
"#http_uri_coding_e">http_uri_coding_e
</a></li>
660 <li><a href=
"#http_uri_status_e">http_uri_status_e
</a></li>
661 <li><a href=
"#http_version_e">http_version_e
</a></li>
662 <li><a href=
"#ipp_dstate_e">ipp_dstate_e
</a></li>
663 <li><a href=
"#ipp_finishings_e">ipp_finishings_e
</a></li>
664 <li><a href=
"#ipp_jcollate_e">ipp_jcollate_e
</a></li>
665 <li><a href=
"#ipp_jstate_e">ipp_jstate_e
</a></li>
666 <li><a href=
"#ipp_op_e">ipp_op_e
</a></li>
667 <li><a href=
"#ipp_orient_e">ipp_orient_e
</a></li>
668 <li><a href=
"#ipp_pstate_e">ipp_pstate_e
</a></li>
669 <li><a href=
"#ipp_quality_e">ipp_quality_e
</a></li>
670 <li><a href=
"#ipp_res_e">ipp_res_e
</a></li>
671 <li><a href=
"#ipp_state_e">ipp_state_e
</a></li>
672 <li><a href=
"#ipp_status_e">ipp_status_e
</a></li>
673 <li><a href=
"#ipp_tag_e">ipp_tag_e
</a></li>
679 HTTP and IPP API introduction for CUPS.
681 Copyright 2007-2012 by Apple Inc.
682 Copyright 1997-2006 by Easy Software Products, all rights reserved.
684 These coded instructions, statements, and computer programs are the
685 property of Apple Inc. and are protected by Federal copyright
686 law. Distribution and use rights are outlined in the file "LICENSE.txt"
687 which should have been included with this file. If this file is
688 file is missing or damaged, see the license at "http://www.cups.org/".
691 <h2 class='title'
><a name='OVERVIEW'
>Overview
</a></h2>
693 <p>The CUPS HTTP and IPP APIs provide low-level access to the HTTP and IPP
694 protocols and CUPS scheduler. They are typically used by monitoring and
695 administration programs to perform specific functions not supported by the
696 high-level CUPS API functions.
</p>
698 <p>The HTTP APIs use an opaque structure called
699 <a href='#http_t'
><code>http_t
</code></a> to manage connections to
700 a particular HTTP or IPP server. The
701 <a href='#httpConnectEncrypt'
><code>httpConnectEncrypt
</code></a> function is
702 used to create an instance of this structure for a particular server.
703 The constant
<code>CUPS_HTTP_DEFAULT
</code> can be used with all of the
704 <code>cups
</code> functions to refer to the default CUPS server - the functions
705 create a per-thread
<a href='#http_t'
><code>http_t
</code></a> as needed.
</p>
707 <p>The IPP APIs use two opaque structures for requests (messages sent to the CUPS scheduler) and responses (messages sent back to your application from the scheduler). The
<a href='#ipp_t'
><code>ipp_t
</code></a> type holds a complete request or response and is allocated using the
<a href='#ippNew'
><code>ippNew
</code></a> or
<a href='#ippNewRequest'
><code>ippNewRequest
</code></a> functions and freed using the
<a href='#ippDelete'
><code>ippDelete
</code></a> function.
</p>
709 <p>The second opaque structure is called
<a href='#ipp_attribute_t'
><code>ipp_attribute_t
</code></a> and holds a single IPP attribute which consists of a group tag (
<a href='#ippGetGroupTag'
><code>ippGetGroupTag
</code></a>), a value type tag (
<a href='#ippGetValueTag'
><code>ippGetValueTag
</code></a>), the attribute name (
<a href='#ippGetName'
><code>ippGetName
</code></a>), and
1 or more values (
<a href='#ippGetCount'
><code>ippGetCount
</code></a>,
<a href='#ippGetBoolean'
><code>ippGetBoolean
</code></a>,
<a href='#ippGetCollection'
><code>ippGetCollection
</code></a>,
<a href='#ippGetDate'
><code>ippGetDate
</code></a>,
<a href='#ippGetInteger'
><code>ippGetInteger
</code></a>,
<a href='#ippGetRange'
><code>ippGetRange
</code></a>,
<a href='#ippGetResolution'
><code>ippGetResolution
</code></a>, and
<a href='#ippGetString'
><code>ippGetString
</code></a>). Attributes are added to an
<a href='#ipp_t'
><code>ipp_t
</code></a> pointer using one of the
<code>ippAdd
</code> functions. For example, use
<a href='#ippAddString'
><code>ippAddString
</code></a> to add the
"printer-uri" and
"requesting-user-name" string attributes to a request:
</p>
711 <pre class='example'
>
712 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_GET_JOBS);
714 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri",
715 NULL,
"ipp://localhost/printers/");
716 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
720 <p>Once you have created an IPP request, use the
<code>cups
</code> functions to send the request to and read the response from the server. For example, the
<a href='#cupsDoRequest'
><code>cupsDoRequest
</code></a> function can be used for simple query operations that do not involve files:
</p>
722 <pre class='example'
>
723 #include
<cups/cups.h
>
726 <a href='#ipp_t'
>ipp_t
</a> *
<a name='get_jobs'
>get_jobs
</a>(void)
728 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_GET_JOBS);
730 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri",
731 NULL,
"ipp://localhost/printers/");
732 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
735 return (
<a href='#cupsDoRequest'
>cupsDoRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/"));
739 <p>The
<a href='#cupsDoRequest'
><code>cupsDoRequest
</code></a> function frees the request and returns an IPP response or
<code>NULL
</code> pointer if the request could not be sent to the server. Once you have a response from the server, you can either use the
<a href='#ippFindAttribute'
><code>ippFindAttribute
</code></a> and
<a href='#ippFindNextAttribute'
><code>ippFindNextAttribute
</code></a> functions to find specific attributes, for example:
</p>
741 <pre class='example'
>
742 <a href='#ipp_t'
>ipp_t
</a> *response;
743 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
745 attr =
<a href='#ippFindAttribute'
>ippFindAttribute
</a>(response,
"printer-state", IPP_TAG_ENUM);
748 <p>You can also walk the list of attributes with a simple
<code>for
</code> loop like this:
</p>
750 <pre class='example'
>
751 <a href='#ipp_t'
>ipp_t
</a> *response;
752 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
754 for (attr =
<a href='#ippFirstAttribute'
>ippFirstAttribute
</a>(response); attr != NULL; attr =
<a href='#ippNextAttribute'
>ippNextAttribute
</a>(response))
755 if (ippGetName(attr) == NULL)
756 puts(
"--SEPARATOR--");
758 puts(ippGetName(attr));
761 <p>The
<code>for
</code> loop approach is normally used when collecting attributes for multiple objects (jobs, printers, etc.) in a response. Attributes with
<code>NULL
</code> names indicate a separator between the attributes of each object. For example, the following code will list the jobs returned from our previous
<a href='#get_jobs'
><code>get_jobs
</code></a> example code:
</p>
763 <pre class='example'
>
764 <a href='#ipp_t'
>ipp_t
</a> *response =
<a href='#get_jobs'
>get_jobs
</a>();
766 if (response != NULL)
768 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
769 const char *attrname;
771 const char *job_name = NULL;
772 const char *job_originating_user_name = NULL;
774 puts(
"Job ID Owner Title");
775 puts(
"------ ---------------- ---------------------------------");
777 for (attr =
<a href='#ippFirstAttribute'
>ippFirstAttribute
</a>(response); attr != NULL; attr =
<a href='#ippNextAttribute'
>ippNextAttribute
</a>(response))
779 /* Attributes without names are separators between jobs */
780 attrname = ippGetName(attr);
781 if (attrname == NULL)
785 if (job_name == NULL)
786 job_name =
"(withheld)";
788 if (job_originating_user_name == NULL)
789 job_originating_user_name =
"(withheld)";
791 printf(
"%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
796 job_originating_user_name = NULL;
799 else if (!strcmp(attrname,
"job-id")
&& ippGetValueTag(attr) == IPP_TAG_INTEGER)
800 job_id = ippGetInteger(attr,
0);
801 else if (!strcmp(attrname,
"job-name")
&& ippGetValueTag(attr) == IPP_TAG_NAME)
802 job_name = ippGetString(attr,
0, NULL);
803 else if (!strcmp(attrname,
"job-originating-user-name")
&&
804 ippGetValueTag(attr) == IPP_TAG_NAME)
805 job_originating_user_name = ippGetString(attr,
0, NULL);
810 if (job_name == NULL)
811 job_name =
"(withheld)";
813 if (job_originating_user_name == NULL)
814 job_originating_user_name =
"(withheld)";
816 printf(
"%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
821 <h3><a name='CREATING_URI_STRINGS'
>Creating URI Strings
</a></h3>
823 <p>To ensure proper encoding, the
824 <a href='#httpAssembleURIf'
><code>httpAssembleURIf
</code></a> function must be
825 used to format a
"printer-uri" string for all printer-based requests:
</p>
827 <pre class='example'
>
828 const char *name =
"Foo";
830 <a href='#ipp_t'
>ipp_t
</a> *request;
832 <a href='#httpAssembleURIf'
>httpAssembleURIf
</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri),
"ipp", NULL, cupsServer(),
833 ippPort(),
"/printers/%s", name);
834 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
837 <h3><a name='SENDING_REQUESTS_WITH_FILES'
>Sending Requests with Files
</a></h3>
839 <p>The
<a href='#cupsDoFileRequest'
><code>cupsDoFileRequest
</code></a> and
840 <a href='#cupsDoIORequest'
><code>cupsDoIORequest
</code></a> functions are
841 used for requests involving files. The
842 <a href='#cupsDoFileRequest'
><code>cupsDoFileRequest
</code></a> function
843 attaches the named file to a request and is typically used when sending a print
844 file or changing a printer's PPD file:
</p>
846 <pre class='example'
>
847 const char *filename =
"/usr/share/cups/data/testprint.ps";
848 const char *name =
"Foo";
851 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_PRINT_JOB);
852 <a href='#ipp_t'
>ipp_t
</a> *response;
854 /* Use httpAssembleURIf for the printer-uri string */
855 <a href='#httpAssembleURIf'
>httpAssembleURIf
</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri),
"ipp", NULL, cupsServer(),
856 ippPort(),
"/printers/%s", name);
857 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
858 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
860 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"job-name",
861 NULL,
"testprint.ps");
863 /* Use snprintf for the resource path */
864 snprintf(resource, sizeof(resource),
"/printers/%s", name);
866 response =
<a href='#cupsDoFileRequest'
>cupsDoFileRequest
</a>(CUPS_HTTP_DEFAULT, request, resource, filename);
869 <p>The
<a href='#cupsDoIORequest'
><code>cupsDoIORequest
</code></a> function
870 optionally attaches a file to the request and optionally saves a file in the
871 response from the server. It is used when using a pipe for the request
872 attachment or when using a request that returns a file, currently only
873 <code>CUPS_GET_DOCUMENT
</code> and
<code>CUPS_GET_PPD
</code>. For example,
874 the following code will download the PPD file for the sample HP LaserJet
877 <pre class='example'
>
880 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
881 <a href='#ipp_t'
>ipp_t
</a> *response;
883 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
884 NULL,
"laserjet.ppd");
886 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
888 response =
<a href='#cupsDoIORequest'
>cupsDoIORequest
</a>(CUPS_HTTP_DEFAULT, request,
"/", -
1, tempfd);
891 <p>The example passes
<code>-
1</code> for the input file descriptor to specify
892 that no file is to be attached to the request. The PPD file attached to the
893 response is written to the temporary file descriptor we created using the
894 <code>cupsTempFd
</code> function.
</p>
896 <h3><a name='ASYNCHRONOUS_REQUEST_PROCESSING'
>Asynchronous Request Processing
</a></h3>
898 <p>The
<a href='#cupsSendRequest'
><code>cupsSendRequest
</code></a> and
899 <a href='#cupsGetResponse'
><code>cupsGetResponse
</code></a> support
900 asynchronous communications with the server. Unlike the other request
901 functions, the IPP request is not automatically freed, so remember to
902 free your request with the
<a href='#ippDelete'
><code>ippDelete
</code></a>
905 <p>File data is attached to the request using the
906 <a href='#cupsWriteRequestData'
><code>cupsWriteRequestData
</code></a>
907 function, while file data returned from the server is read using the
908 <a href='#cupsReadResponseData'
><code>cupsReadResponseData
</code></a>
909 function. We can rewrite the previous
<code>CUPS_GET_PPD
</code> example
910 to use the asynchronous functions quite easily:
</p>
912 <pre class='example'
>
915 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
916 <a href='#ipp_t'
>ipp_t
</a> *response;
918 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
919 NULL,
"laserjet.ppd");
921 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
923 if (
<a href='#cupsSendRequest'
>cupsSendRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/") == HTTP_CONTINUE)
925 response =
<a href='#cupsGetResponse'
>cupsGetResponse
</a>(CUPS_HTTP_DEFAULT,
"/");
927 if (response != NULL)
932 while ((bytes =
<a href='#cupsReadResponseData'
>cupsReadResponseData
</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer)))
> 0)
933 write(tempfd, buffer, bytes);
937 /* Free the request! */
938 <a href='#ippDelete'
>ippDelete
</a>(request);
941 <p>The
<a href='#cupsSendRequest'
><code>cupsSendRequest
</code></a> function
942 returns the initial HTTP request status, typically either
943 <code>HTTP_CONTINUE
</code> or
<code>HTTP_UNAUTHORIZED
</code>. The latter status
944 is returned when the request requires authentication of some sort. The
945 <a href='#cupsDoAuthentication'
><code>cupsDoAuthentication
</code></a> function
946 must be called when your see
<code>HTTP_UNAUTHORIZED
</code> and the request
947 re-sent. We can add authentication support to our example code by using a
948 <code>do ... while
</code> loop:
</p>
950 <pre class='example'
>
953 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
954 <a href='#ipp_t'
>ipp_t
</a> *response;
955 http_status_t status;
957 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
958 NULL,
"laserjet.ppd");
960 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
962 /* Loop for authentication */
965 status =
<a href='#cupsSendRequest'
>cupsSendRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/");
967 if (status == HTTP_UNAUTHORIZED)
969 /* Try to authenticate, break out of the loop if that fails */
970 if (
<a href='#cupsDoAuthentication'
>cupsDoAuthentication
</a>(CUPS_HTTP_DEFAULT,
"POST",
"/"))
974 while (status != HTTP_CONTINUE
&& status != HTTP_UNAUTHORIZED);
976 if (status == HTTP_CONTINUE)
978 response =
<a href='#cupsGetResponse'
>cupsGetResponse
</a>(CUPS_HTTP_DEFAULT,
"/");
980 if (response != NULL)
985 while ((bytes =
<a href='#cupsReadResponseData'
>cupsReadResponseData
</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer)))
> 0)
986 write(tempfd, buffer, bytes);
990 /* Free the request! */
991 <a href='#ippDelete'
>ippDelete
</a>(request);
993 <h2 class=
"title"><a id=
"FUNCTIONS">Functions
</a></h2>
994 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/macOS
10.4 </span><a id=
"cupsDoAuthentication">cupsDoAuthentication
</a></h3>
995 <p class=
"description">Authenticate a request.
</p>
997 int cupsDoAuthentication (
<br />
998     <a href=
"#http_t">http_t
</a> *http,
<br />
999     const char *method,
<br />
1000     const char *resource
<br />
1002 <h4 class=
"parameters">Parameters
</h4>
1005 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1007 <dd class=
"description">Request method (
"GET
",
"POST
",
"PUT
")
</dd>
1009 <dd class=
"description">Resource path
</dd>
1011 <h4 class=
"returnvalue">Return Value
</h4>
1012 <p class=
"description">0 on success, -
1 on error
</p>
1013 <h4 class=
"discussion">Discussion
</h4>
1014 <p class=
"discussion">This function should be called in response to a
<code>HTTP_STATUS_UNAUTHORIZED
</code>
1015 status, prior to resubmitting your request.
1018 <h3 class=
"function"><a id=
"cupsDoFileRequest">cupsDoFileRequest
</a></h3>
1019 <p class=
"description">Do an IPP request with a file.
</p>
1021 <a href=
"#ipp_t">ipp_t
</a> *cupsDoFileRequest (
<br />
1022     <a href=
"#http_t">http_t
</a> *http,
<br />
1023     <a href=
"#ipp_t">ipp_t
</a> *request,
<br />
1024     const char *resource,
<br />
1025     const char *filename
<br />
1027 <h4 class=
"parameters">Parameters
</h4>
1030 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1032 <dd class=
"description">IPP request
</dd>
1034 <dd class=
"description">HTTP resource for POST
</dd>
1036 <dd class=
"description">File to send or
<code>NULL
</code> for none
</dd>
1038 <h4 class=
"returnvalue">Return Value
</h4>
1039 <p class=
"description">Response data
</p>
1040 <h4 class=
"discussion">Discussion
</h4>
1041 <p class=
"discussion">This function sends the IPP request and attached file to the specified
1042 server, retrying and authenticating as necessary. The request is freed with
1043 <a href=
"#ippDelete"><code>ippDelete
</code></a>.
</p>
1044 <h3 class=
"function"><span class=
"info"> CUPS
1.3/macOS
10.5 </span><a id=
"cupsDoIORequest">cupsDoIORequest
</a></h3>
1045 <p class=
"description">Do an IPP request with file descriptors.
</p>
1047 <a href=
"#ipp_t">ipp_t
</a> *cupsDoIORequest (
<br />
1048     <a href=
"#http_t">http_t
</a> *http,
<br />
1049     <a href=
"#ipp_t">ipp_t
</a> *request,
<br />
1050     const char *resource,
<br />
1051     int infile,
<br />
1052     int outfile
<br />
1054 <h4 class=
"parameters">Parameters
</h4>
1057 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1059 <dd class=
"description">IPP request
</dd>
1061 <dd class=
"description">HTTP resource for POST
</dd>
1063 <dd class=
"description">File to read from or -
1 for none
</dd>
1065 <dd class=
"description">File to write to or -
1 for none
</dd>
1067 <h4 class=
"returnvalue">Return Value
</h4>
1068 <p class=
"description">Response data
</p>
1069 <h4 class=
"discussion">Discussion
</h4>
1070 <p class=
"discussion">This function sends the IPP request with the optional input file
"infile
" to
1071 the specified server, retrying and authenticating as necessary. The request
1072 is freed with
<a href=
"#ippDelete"><code>ippDelete
</code></a>.
<br>
1074 If
"infile
" is a valid file descriptor,
<code>cupsDoIORequest
</code> copies
1075 all of the data from the file after the IPP request message.
<br>
1077 If
"outfile
" is a valid file descriptor,
<code>cupsDoIORequest
</code> copies
1078 all of the data after the IPP response message to the file.
1081 <h3 class=
"function"><a id=
"cupsDoRequest">cupsDoRequest
</a></h3>
1082 <p class=
"description">Do an IPP request.
</p>
1084 <a href=
"#ipp_t">ipp_t
</a> *cupsDoRequest (
<br />
1085     <a href=
"#http_t">http_t
</a> *http,
<br />
1086     <a href=
"#ipp_t">ipp_t
</a> *request,
<br />
1087     const char *resource
<br />
1089 <h4 class=
"parameters">Parameters
</h4>
1092 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1094 <dd class=
"description">IPP request
</dd>
1096 <dd class=
"description">HTTP resource for POST
</dd>
1098 <h4 class=
"returnvalue">Return Value
</h4>
1099 <p class=
"description">Response data
</p>
1100 <h4 class=
"discussion">Discussion
</h4>
1101 <p class=
"discussion">This function sends the IPP request to the specified server, retrying
1102 and authenticating as necessary. The request is freed with
<a href=
"#ippDelete"><code>ippDelete
</code></a>.
</p>
1103 <h3 class=
"function"><a id=
"cupsEncodeOptions">cupsEncodeOptions
</a></h3>
1104 <p class=
"description">Encode printer options into IPP attributes.
</p>
1106 void cupsEncodeOptions (
<br />
1107     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
1108     int num_options,
<br />
1109     cups_option_t *options
<br />
1111 <h4 class=
"parameters">Parameters
</h4>
1114 <dd class=
"description">Request to add to
</dd>
1115 <dt>num_options
</dt>
1116 <dd class=
"description">Number of options
</dd>
1118 <dd class=
"description">Options
</dd>
1120 <h4 class=
"discussion">Discussion
</h4>
1121 <p class=
"discussion">This function adds operation, job, and then subscription attributes,
1122 in that order. Use the cupsEncodeOptions2() function to add attributes
1123 for a single group.
</p>
1124 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"cupsEncodeOptions2">cupsEncodeOptions2
</a></h3>
1125 <p class=
"description">Encode printer options into IPP attributes for a group.
</p>
1127 void cupsEncodeOptions2 (
<br />
1128     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
1129     int num_options,
<br />
1130     cups_option_t *options,
<br />
1131     ipp_tag_t group_tag
<br />
1133 <h4 class=
"parameters">Parameters
</h4>
1136 <dd class=
"description">Request to add to
</dd>
1137 <dt>num_options
</dt>
1138 <dd class=
"description">Number of options
</dd>
1140 <dd class=
"description">Options
</dd>
1142 <dd class=
"description">Group to encode
</dd>
1144 <h4 class=
"discussion">Discussion
</h4>
1145 <p class=
"discussion">This function only adds attributes for a single group. Call this
1146 function multiple times for each group, or use cupsEncodeOptions()
1147 to add the standard groups.
1150 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"cupsGetDevices">cupsGetDevices
</a></h3>
1151 <p class=
"description">Get available printer devices.
</p>
1153 ipp_status_t cupsGetDevices (
<br />
1154     <a href=
"#http_t">http_t
</a> *http,
<br />
1155     int timeout,
<br />
1156     const char *include_schemes,
<br />
1157     const char *exclude_schemes,
<br />
1158     cups_device_cb_t callback,
<br />
1159     void *user_data
<br />
1161 <h4 class=
"parameters">Parameters
</h4>
1164 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1166 <dd class=
"description">Timeout in seconds or
<code>CUPS_TIMEOUT_DEFAULT
</code></dd>
1167 <dt>include_schemes
</dt>
1168 <dd class=
"description">Comma-separated URI schemes to include or
<code>CUPS_INCLUDE_ALL
</code></dd>
1169 <dt>exclude_schemes
</dt>
1170 <dd class=
"description">Comma-separated URI schemes to exclude or
<code>CUPS_EXCLUDE_NONE
</code></dd>
1172 <dd class=
"description">Callback function
</dd>
1174 <dd class=
"description">User data pointer
</dd>
1176 <h4 class=
"returnvalue">Return Value
</h4>
1177 <p class=
"description">Request status -
<code>IPP_OK
</code> on success.
</p>
1178 <h4 class=
"discussion">Discussion
</h4>
1179 <p class=
"discussion">This function sends a CUPS-Get-Devices request and streams the discovered
1180 devices to the specified callback function. The
"timeout
" parameter controls
1181 how long the request lasts, while the
"include_schemes
" and
"exclude_schemes
"
1182 parameters provide comma-delimited lists of backends to include or omit from
1183 the request respectively.
1186 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/macOS
10.4 </span><a id=
"cupsGetFd">cupsGetFd
</a></h3>
1187 <p class=
"description">Get a file from the server.
</p>
1189 http_status_t cupsGetFd (
<br />
1190     <a href=
"#http_t">http_t
</a> *http,
<br />
1191     const char *resource,
<br />
1192     int fd
<br />
1194 <h4 class=
"parameters">Parameters
</h4>
1197 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1199 <dd class=
"description">Resource name
</dd>
1201 <dd class=
"description">File descriptor
</dd>
1203 <h4 class=
"returnvalue">Return Value
</h4>
1204 <p class=
"description">HTTP status
</p>
1205 <h4 class=
"discussion">Discussion
</h4>
1206 <p class=
"discussion">This function returns
<code>HTTP_STATUS_OK
</code> when the file is successfully retrieved.
1209 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/macOS
10.4 </span><a id=
"cupsGetFile">cupsGetFile
</a></h3>
1210 <p class=
"description">Get a file from the server.
</p>
1212 http_status_t cupsGetFile (
<br />
1213     <a href=
"#http_t">http_t
</a> *http,
<br />
1214     const char *resource,
<br />
1215     const char *filename
<br />
1217 <h4 class=
"parameters">Parameters
</h4>
1220 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1222 <dd class=
"description">Resource name
</dd>
1224 <dd class=
"description">Filename
</dd>
1226 <h4 class=
"returnvalue">Return Value
</h4>
1227 <p class=
"description">HTTP status
</p>
1228 <h4 class=
"discussion">Discussion
</h4>
1229 <p class=
"discussion">This function returns
<code>HTTP_STATUS_OK
</code> when the file is successfully retrieved.
1232 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"cupsGetResponse">cupsGetResponse
</a></h3>
1233 <p class=
"description">Get a response to an IPP request.
</p>
1235 <a href=
"#ipp_t">ipp_t
</a> *cupsGetResponse (
<br />
1236     <a href=
"#http_t">http_t
</a> *http,
<br />
1237     const char *resource
<br />
1239 <h4 class=
"parameters">Parameters
</h4>
1242 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1244 <dd class=
"description">HTTP resource for POST
</dd>
1246 <h4 class=
"returnvalue">Return Value
</h4>
1247 <p class=
"description">Response or
<code>NULL
</code> on HTTP error
</p>
1248 <h4 class=
"discussion">Discussion
</h4>
1249 <p class=
"discussion">Use this function to get the response for an IPP request sent using
1250 <a href=
"#cupsSendRequest"><code>cupsSendRequest
</code></a>. For requests that return additional data, use
1251 <a href=
"#cupsReadResponseData"><code>cupsReadResponseData
</code></a> after getting a successful response,
1252 otherwise call
<a href=
"#httpFlush"><code>httpFlush
</code></a> to complete the response processing.
1255 <h3 class=
"function"><a id=
"cupsLastError">cupsLastError
</a></h3>
1256 <p class=
"description">Return the last IPP status code received on the current
1259 ipp_status_t cupsLastError (void);
</p>
1260 <h4 class=
"returnvalue">Return Value
</h4>
1261 <p class=
"description">IPP status code from last request
</p>
1262 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"cupsLastErrorString">cupsLastErrorString
</a></h3>
1263 <p class=
"description">Return the last IPP status-message received on the
1266 const char *cupsLastErrorString (void);
</p>
1267 <h4 class=
"returnvalue">Return Value
</h4>
1268 <p class=
"description">status-message text from last request
</p>
1269 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/macOS
10.4 </span><a id=
"cupsPutFd">cupsPutFd
</a></h3>
1270 <p class=
"description">Put a file on the server.
</p>
1272 http_status_t cupsPutFd (
<br />
1273     <a href=
"#http_t">http_t
</a> *http,
<br />
1274     const char *resource,
<br />
1275     int fd
<br />
1277 <h4 class=
"parameters">Parameters
</h4>
1280 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1282 <dd class=
"description">Resource name
</dd>
1284 <dd class=
"description">File descriptor
</dd>
1286 <h4 class=
"returnvalue">Return Value
</h4>
1287 <p class=
"description">HTTP status
</p>
1288 <h4 class=
"discussion">Discussion
</h4>
1289 <p class=
"discussion">This function returns
<code>HTTP_STATUS_CREATED
</code> when the file is stored
1293 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/macOS
10.4 </span><a id=
"cupsPutFile">cupsPutFile
</a></h3>
1294 <p class=
"description">Put a file on the server.
</p>
1296 http_status_t cupsPutFile (
<br />
1297     <a href=
"#http_t">http_t
</a> *http,
<br />
1298     const char *resource,
<br />
1299     const char *filename
<br />
1301 <h4 class=
"parameters">Parameters
</h4>
1304 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1306 <dd class=
"description">Resource name
</dd>
1308 <dd class=
"description">Filename
</dd>
1310 <h4 class=
"returnvalue">Return Value
</h4>
1311 <p class=
"description">HTTP status
</p>
1312 <h4 class=
"discussion">Discussion
</h4>
1313 <p class=
"discussion">This function returns
<code>HTTP_CREATED
</code> when the file is stored
1317 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"cupsReadResponseData">cupsReadResponseData
</a></h3>
1318 <p class=
"description">Read additional data after the IPP response.
</p>
1320 ssize_t cupsReadResponseData (
<br />
1321     <a href=
"#http_t">http_t
</a> *http,
<br />
1322     char *buffer,
<br />
1323     size_t length
<br />
1325 <h4 class=
"parameters">Parameters
</h4>
1328 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1330 <dd class=
"description">Buffer to use
</dd>
1332 <dd class=
"description">Number of bytes to read
</dd>
1334 <h4 class=
"returnvalue">Return Value
</h4>
1335 <p class=
"description">Bytes read,
0 on EOF, -
1 on error
</p>
1336 <h4 class=
"discussion">Discussion
</h4>
1337 <p class=
"discussion">This function is used after
<a href=
"#cupsGetResponse"><code>cupsGetResponse
</code></a> to read the PPD or document
1338 files from
<code>CUPS_GET_PPD
</code> and
<code>CUPS_GET_DOCUMENT
</code> requests,
1342 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"cupsSendRequest">cupsSendRequest
</a></h3>
1343 <p class=
"description">Send an IPP request.
</p>
1345 http_status_t cupsSendRequest (
<br />
1346     <a href=
"#http_t">http_t
</a> *http,
<br />
1347     <a href=
"#ipp_t">ipp_t
</a> *request,
<br />
1348     const char *resource,
<br />
1349     size_t length
<br />
1351 <h4 class=
"parameters">Parameters
</h4>
1354 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1356 <dd class=
"description">IPP request
</dd>
1358 <dd class=
"description">Resource path
</dd>
1360 <dd class=
"description">Length of data to follow or
<code>CUPS_LENGTH_VARIABLE
</code></dd>
1362 <h4 class=
"returnvalue">Return Value
</h4>
1363 <p class=
"description">Initial HTTP status
</p>
1364 <h4 class=
"discussion">Discussion
</h4>
1365 <p class=
"discussion">Use
<a href=
"#cupsWriteRequestData"><code>cupsWriteRequestData
</code></a> to write any additional data (document, PPD
1366 file, etc.) for the request,
<a href=
"#cupsGetResponse"><code>cupsGetResponse
</code></a> to get the IPP response,
1367 and
<a href=
"#cupsReadResponseData"><code>cupsReadResponseData
</code></a> to read any additional data following the
1368 response. Only one request can be sent/queued at a time per
<code>http_t
</code>
1371 Returns the initial HTTP status code, which will be
<code>HTTP_STATUS_CONTINUE
</code>
1372 on a successful send of the request.
<br>
1374 Note: Unlike
<a href=
"#cupsDoFileRequest"><code>cupsDoFileRequest
</code></a>,
<a href=
"#cupsDoIORequest"><code>cupsDoIORequest
</code></a>, and
1375 <a href=
"#cupsDoRequest"><code>cupsDoRequest
</code></a>, the request is NOT freed with
<a href=
"#ippDelete"><code>ippDelete
</code></a>.
1378 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"cupsWriteRequestData">cupsWriteRequestData
</a></h3>
1379 <p class=
"description">Write additional data after an IPP request.
</p>
1381 http_status_t cupsWriteRequestData (
<br />
1382     <a href=
"#http_t">http_t
</a> *http,
<br />
1383     const char *buffer,
<br />
1384     size_t length
<br />
1386 <h4 class=
"parameters">Parameters
</h4>
1389 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1391 <dd class=
"description">Bytes to write
</dd>
1393 <dd class=
"description">Number of bytes to write
</dd>
1395 <h4 class=
"returnvalue">Return Value
</h4>
1396 <p class=
"description"><code>HTTP_STATUS_CONTINUE
</code> if OK or HTTP status on error
</p>
1397 <h4 class=
"discussion">Discussion
</h4>
1398 <p class=
"discussion">This function is used after
<a href=
"#cupsSendRequest"><code>cupsSendRequest
</code></a> to provide a PPD and
1399 after
<a href=
"#cupsStartDocument"><code>cupsStartDocument
</code></a> to provide a document file.
1402 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpAcceptConnection">httpAcceptConnection
</a></h3>
1403 <p class=
"description">Accept a new HTTP client connection from the
1404 specified listening socket.
</p>
1406 <a href=
"#http_t">http_t
</a> *httpAcceptConnection (
<br />
1407     int fd,
<br />
1408     int blocking
<br />
1410 <h4 class=
"parameters">Parameters
</h4>
1413 <dd class=
"description">Listen socket file descriptor
</dd>
1415 <dd class=
"description">1 if the connection should be
1416 blocking,
0 otherwise
</dd>
1418 <h4 class=
"returnvalue">Return Value
</h4>
1419 <p class=
"description">HTTP connection or
<code>NULL
</code></p>
1420 <h3 class=
"function"><span class=
"info"> CUPS
1.5/macOS
10.7 </span><a id=
"httpAddCredential">httpAddCredential
</a></h3>
1421 <p class=
"description">Allocates and adds a single credential to an array.
</p>
1423 int httpAddCredential (
<br />
1424     cups_array_t *credentials,
<br />
1425     const void *data,
<br />
1426     size_t datalen
<br />
1428 <h4 class=
"parameters">Parameters
</h4>
1430 <dt>credentials
</dt>
1431 <dd class=
"description">Credentials array
</dd>
1433 <dd class=
"description">PEM-encoded X
.509 data
</dd>
1435 <dd class=
"description">Length of data
</dd>
1437 <h4 class=
"returnvalue">Return Value
</h4>
1438 <p class=
"description">0 on success, -
1 on error
</p>
1439 <h4 class=
"discussion">Discussion
</h4>
1440 <p class=
"discussion">Use
<code>cupsArrayNew(NULL, NULL)
</code> to create a credentials array.
1443 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAddrAny">httpAddrAny
</a></h3>
1444 <p class=
"description">Check for the
"any
" address.
</p>
1446 int httpAddrAny (
<br />
1447     const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br />
1449 <h4 class=
"parameters">Parameters
</h4>
1452 <dd class=
"description">Address to check
</dd>
1454 <h4 class=
"returnvalue">Return Value
</h4>
1455 <p class=
"description">1 if
"any
",
0 otherwise
</p>
1456 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpAddrClose">httpAddrClose
</a></h3>
1457 <p class=
"description">Close a socket created by
<a href=
"#httpAddrConnect"><code>httpAddrConnect
</code></a> or
1458 <a href=
"#httpAddrListen"><code>httpAddrListen
</code></a>.
</p>
1460 int httpAddrClose (
<br />
1461     <a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br />
1462     int fd
<br />
1464 <h4 class=
"parameters">Parameters
</h4>
1467 <dd class=
"description">Listen address or
<code>NULL
</code></dd>
1469 <dd class=
"description">Socket file descriptor
</dd>
1471 <h4 class=
"returnvalue">Return Value
</h4>
1472 <p class=
"description">0 on success, -
1 on failure
</p>
1473 <h4 class=
"discussion">Discussion
</h4>
1474 <p class=
"discussion">Pass
<code>NULL
</code> for sockets created with
<a href=
"#httpAddrConnect"><code>httpAddrConnect
</code></a> and the
1475 listen address for sockets created with
<a href=
"#httpAddrListen"><code>httpAddrListen
</code></a>. This will
1476 ensure that domain sockets are removed when closed.
1479 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAddrEqual">httpAddrEqual
</a></h3>
1480 <p class=
"description">Compare two addresses.
</p>
1482 int httpAddrEqual (
<br />
1483     const
<a href=
"#http_addr_t">http_addr_t
</a> *addr1,
<br />
1484     const
<a href=
"#http_addr_t">http_addr_t
</a> *addr2
<br />
1486 <h4 class=
"parameters">Parameters
</h4>
1489 <dd class=
"description">First address
</dd>
1491 <dd class=
"description">Second address
</dd>
1493 <h4 class=
"returnvalue">Return Value
</h4>
1494 <p class=
"description">1 if equal,
0 if not
</p>
1495 <h3 class=
"function"><a id=
"httpAddrFamily">httpAddrFamily
</a></h3>
1496 <p class=
"description">Get the address family of an address.
</p>
1498 int httpAddrFamily (
<br />
1499     <a href=
"#http_addr_t">http_addr_t
</a> *addr
<br />
1501 <h4 class=
"parameters">Parameters
</h4>
1504 <dd class=
"description">Address
</dd>
1506 <h4 class=
"returnvalue">Return Value
</h4>
1507 <p class=
"description">Address family
</p>
1508 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAddrLength">httpAddrLength
</a></h3>
1509 <p class=
"description">Return the length of the address in bytes.
</p>
1511 int httpAddrLength (
<br />
1512     const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br />
1514 <h4 class=
"parameters">Parameters
</h4>
1517 <dd class=
"description">Address
</dd>
1519 <h4 class=
"returnvalue">Return Value
</h4>
1520 <p class=
"description">Length in bytes
</p>
1521 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpAddrListen">httpAddrListen
</a></h3>
1522 <p class=
"description">Create a listening socket bound to the specified
1523 address and port.
</p>
1525 int httpAddrListen (
<br />
1526     <a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br />
1527     int port
<br />
1529 <h4 class=
"parameters">Parameters
</h4>
1532 <dd class=
"description">Address to bind to
</dd>
1534 <dd class=
"description">Port number to bind to
</dd>
1536 <h4 class=
"returnvalue">Return Value
</h4>
1537 <p class=
"description">Socket or -
1 on error
</p>
1538 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAddrLocalhost">httpAddrLocalhost
</a></h3>
1539 <p class=
"description">Check for the local loopback address.
</p>
1541 int httpAddrLocalhost (
<br />
1542     const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br />
1544 <h4 class=
"parameters">Parameters
</h4>
1547 <dd class=
"description">Address to check
</dd>
1549 <h4 class=
"returnvalue">Return Value
</h4>
1550 <p class=
"description">1 if local host,
0 otherwise
</p>
1551 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAddrLookup">httpAddrLookup
</a></h3>
1552 <p class=
"description">Lookup the hostname associated with the address.
</p>
1554 char *httpAddrLookup (
<br />
1555     const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br />
1556     char *name,
<br />
1557     int namelen
<br />
1559 <h4 class=
"parameters">Parameters
</h4>
1562 <dd class=
"description">Address to lookup
</dd>
1564 <dd class=
"description">Host name buffer
</dd>
1566 <dd class=
"description">Size of name buffer
</dd>
1568 <h4 class=
"returnvalue">Return Value
</h4>
1569 <p class=
"description">Host name
</p>
1570 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpAddrPort">httpAddrPort
</a></h3>
1571 <p class=
"description">Get the port number associated with an address.
</p>
1573 int httpAddrPort (
<br />
1574     <a href=
"#http_addr_t">http_addr_t
</a> *addr
<br />
1576 <h4 class=
"parameters">Parameters
</h4>
1579 <dd class=
"description">Address
</dd>
1581 <h4 class=
"returnvalue">Return Value
</h4>
1582 <p class=
"description">Port number
</p>
1583 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAddrString">httpAddrString
</a></h3>
1584 <p class=
"description">Convert an address to a numeric string.
</p>
1586 char *httpAddrString (
<br />
1587     const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br />
1588     char *s,
<br />
1589     int slen
<br />
1591 <h4 class=
"parameters">Parameters
</h4>
1594 <dd class=
"description">Address to convert
</dd>
1596 <dd class=
"description">String buffer
</dd>
1598 <dd class=
"description">Length of string
</dd>
1600 <h4 class=
"returnvalue">Return Value
</h4>
1601 <p class=
"description">Numeric address string
</p>
1602 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAssembleURI">httpAssembleURI
</a></h3>
1603 <p class=
"description">Assemble a uniform resource identifier from its
1606 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpAssembleURI (
<br />
1607     <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> encoding,
<br />
1608     char *uri,
<br />
1609     int urilen,
<br />
1610     const char *scheme,
<br />
1611     const char *username,
<br />
1612     const char *host,
<br />
1613     int port,
<br />
1614     const char *resource
<br />
1616 <h4 class=
"parameters">Parameters
</h4>
1619 <dd class=
"description">Encoding flags
</dd>
1621 <dd class=
"description">URI buffer
</dd>
1623 <dd class=
"description">Size of URI buffer
</dd>
1625 <dd class=
"description">Scheme name
</dd>
1627 <dd class=
"description">Username
</dd>
1629 <dd class=
"description">Hostname or address
</dd>
1631 <dd class=
"description">Port number
</dd>
1633 <dd class=
"description">Resource
</dd>
1635 <h4 class=
"returnvalue">Return Value
</h4>
1636 <p class=
"description">URI status
</p>
1637 <h4 class=
"discussion">Discussion
</h4>
1638 <p class=
"discussion">This function escapes reserved characters in the URI depending on the
1639 value of the
"encoding
" argument. You should use this function in
1640 place of traditional string functions whenever you need to create a
1644 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpAssembleURIf">httpAssembleURIf
</a></h3>
1645 <p class=
"description">Assemble a uniform resource identifier from its
1646 components with a formatted resource.
</p>
1648 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpAssembleURIf (
<br />
1649     <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> encoding,
<br />
1650     char *uri,
<br />
1651     int urilen,
<br />
1652     const char *scheme,
<br />
1653     const char *username,
<br />
1654     const char *host,
<br />
1655     int port,
<br />
1656     const char *resourcef,
<br />
1657     ...
<br />
1659 <h4 class=
"parameters">Parameters
</h4>
1662 <dd class=
"description">Encoding flags
</dd>
1664 <dd class=
"description">URI buffer
</dd>
1666 <dd class=
"description">Size of URI buffer
</dd>
1668 <dd class=
"description">Scheme name
</dd>
1670 <dd class=
"description">Username
</dd>
1672 <dd class=
"description">Hostname or address
</dd>
1674 <dd class=
"description">Port number
</dd>
1676 <dd class=
"description">Printf-style resource
</dd>
1678 <dd class=
"description">Additional arguments as needed
</dd>
1680 <h4 class=
"returnvalue">Return Value
</h4>
1681 <p class=
"description">URI status
</p>
1682 <h4 class=
"discussion">Discussion
</h4>
1683 <p class=
"discussion">This function creates a formatted version of the resource string
1684 argument
"resourcef
" and escapes reserved characters in the URI
1685 depending on the value of the
"encoding
" argument. You should use
1686 this function in place of traditional string functions whenever
1687 you need to create a URI string.
1690 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpAssembleUUID">httpAssembleUUID
</a></h3>
1691 <p class=
"description">Assemble a name-based UUID URN conforming to RFC
4122.
</p>
1693 char *httpAssembleUUID (
<br />
1694     const char *server,
<br />
1695     int port,
<br />
1696     const char *name,
<br />
1697     int number,
<br />
1698     char *buffer,
<br />
1699     size_t bufsize
<br />
1701 <h4 class=
"parameters">Parameters
</h4>
1704 <dd class=
"description">Server name
</dd>
1706 <dd class=
"description">Port number
</dd>
1708 <dd class=
"description">Object name or NULL
</dd>
1710 <dd class=
"description">Object number or
0</dd>
1712 <dd class=
"description">String buffer
</dd>
1714 <dd class=
"description">Size of buffer
</dd>
1716 <h4 class=
"returnvalue">Return Value
</h4>
1717 <p class=
"description">UUID string
</p>
1718 <h4 class=
"discussion">Discussion
</h4>
1719 <p class=
"discussion">This function creates a unique
128-bit identifying number using the server
1720 name, port number, random data, and optionally an object name and/or object
1721 number. The result is formatted as a UUID URN as defined in RFC
4122.
<br>
1723 The buffer needs to be at least
46 bytes in size.
1726 <h3 class=
"function"><a id=
"httpBlocking">httpBlocking
</a></h3>
1727 <p class=
"description">Set blocking/non-blocking behavior on a connection.
</p>
1729 void httpBlocking (
<br />
1730     <a href=
"#http_t">http_t
</a> *http,
<br />
1731     int b
<br />
1733 <h4 class=
"parameters">Parameters
</h4>
1736 <dd class=
"description">HTTP connection
</dd>
1738 <dd class=
"description">1 = blocking,
0 = non-blocking
</dd>
1740 <h3 class=
"function"><a id=
"httpCheck">httpCheck
</a></h3>
1741 <p class=
"description">Check to see if there is a pending response from the server.
</p>
1743 int httpCheck (
<br />
1744     <a href=
"#http_t">http_t
</a> *http
<br />
1746 <h4 class=
"parameters">Parameters
</h4>
1749 <dd class=
"description">HTTP connection
</dd>
1751 <h4 class=
"returnvalue">Return Value
</h4>
1752 <p class=
"description">0 = no data,
1 = data available
</p>
1753 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"httpClearCookie">httpClearCookie
</a></h3>
1754 <p class=
"description">Clear the cookie value(s).
</p>
1756 void httpClearCookie (
<br />
1757     <a href=
"#http_t">http_t
</a> *http
<br />
1759 <h4 class=
"parameters">Parameters
</h4>
1762 <dd class=
"description">HTTP connection
</dd>
1764 <h3 class=
"function"><a id=
"httpClearFields">httpClearFields
</a></h3>
1765 <p class=
"description">Clear HTTP request fields.
</p>
1767 void httpClearFields (
<br />
1768     <a href=
"#http_t">http_t
</a> *http
<br />
1770 <h4 class=
"parameters">Parameters
</h4>
1773 <dd class=
"description">HTTP connection
</dd>
1775 <h3 class=
"function"><a id=
"httpClose">httpClose
</a></h3>
1776 <p class=
"description">Close an HTTP connection.
</p>
1778 void httpClose (
<br />
1779     <a href=
"#http_t">http_t
</a> *http
<br />
1781 <h4 class=
"parameters">Parameters
</h4>
1784 <dd class=
"description">HTTP connection
</dd>
1786 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpCompareCredentials">httpCompareCredentials
</a></h3>
1787 <p class=
"description">Compare two sets of X
.509 credentials.
</p>
1789 int httpCompareCredentials (
<br />
1790     cups_array_t *cred1,
<br />
1791     cups_array_t *cred2
<br />
1793 <h4 class=
"parameters">Parameters
</h4>
1796 <dd class=
"description">First set of X
.509 credentials
</dd>
1798 <dd class=
"description">Second set of X
.509 credentials
</dd>
1800 <h4 class=
"returnvalue">Return Value
</h4>
1801 <p class=
"description">1 if they match,
0 if they do not
</p>
1802 <h3 class=
"function"><span class=
"info"> DEPRECATED
 </span><a id=
"httpConnect">httpConnect
</a></h3>
1803 <p class=
"description">Connect to a HTTP server.
</p>
1805 <a href=
"#http_t">http_t
</a> *httpConnect (
<br />
1806     const char *host,
<br />
1807     int port
<br />
1809 <h4 class=
"parameters">Parameters
</h4>
1812 <dd class=
"description">Host to connect to
</dd>
1814 <dd class=
"description">Port number
</dd>
1816 <h4 class=
"returnvalue">Return Value
</h4>
1817 <p class=
"description">New HTTP connection
</p>
1818 <h4 class=
"discussion">Discussion
</h4>
1819 <p class=
"discussion">This function is deprecated - use
<a href=
"#httpConnect2"><code>httpConnect2
</code></a> instead.
1822 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpConnect2">httpConnect2
</a></h3>
1823 <p class=
"description">Connect to a HTTP server.
</p>
1825 <a href=
"#http_t">http_t
</a> *httpConnect2 (
<br />
1826     const char *host,
<br />
1827     int port,
<br />
1828     <a href=
"#http_addrlist_t">http_addrlist_t
</a> *addrlist,
<br />
1829     int family,
<br />
1830     <a href=
"#http_encryption_t">http_encryption_t
</a> encryption,
<br />
1831     int blocking,
<br />
1832     int msec,
<br />
1833     int *cancel
<br />
1835 <h4 class=
"parameters">Parameters
</h4>
1838 <dd class=
"description">Host to connect to
</dd>
1840 <dd class=
"description">Port number
</dd>
1842 <dd class=
"description">List of addresses or NULL to lookup
</dd>
1844 <dd class=
"description">Address family to use or
<code>AF_UNSPEC
</code> for any
</dd>
1846 <dd class=
"description">Type of encryption to use
</dd>
1848 <dd class=
"description">1 for blocking connection,
0 for non-blocking
</dd>
1850 <dd class=
"description">Connection timeout in milliseconds,
0 means don't connect
</dd>
1852 <dd class=
"description">Pointer to
"cancel
" variable
</dd>
1854 <h4 class=
"returnvalue">Return Value
</h4>
1855 <p class=
"description">New HTTP connection
</p>
1856 <h3 class=
"function"><span class=
"info"> DEPRECATED
 </span><a id=
"httpConnectEncrypt">httpConnectEncrypt
</a></h3>
1857 <p class=
"description">Connect to a HTTP server using encryption.
</p>
1859 <a href=
"#http_t">http_t
</a> *httpConnectEncrypt (
<br />
1860     const char *host,
<br />
1861     int port,
<br />
1862     <a href=
"#http_encryption_t">http_encryption_t
</a> encryption
<br />
1864 <h4 class=
"parameters">Parameters
</h4>
1867 <dd class=
"description">Host to connect to
</dd>
1869 <dd class=
"description">Port number
</dd>
1871 <dd class=
"description">Type of encryption to use
</dd>
1873 <h4 class=
"returnvalue">Return Value
</h4>
1874 <p class=
"description">New HTTP connection
</p>
1875 <h4 class=
"discussion">Discussion
</h4>
1876 <p class=
"discussion">This function is now deprecated. Please use the
<a href=
"#httpConnect2"><code>httpConnect2
</code></a> function
1880 <h3 class=
"function"><span class=
"info"> DEPRECATED
 </span><a id=
"httpDecode64">httpDecode64
</a></h3>
1881 <p class=
"description">Base64-decode a string.
</p>
1883 char *httpDecode64 (
<br />
1884     char *out,
<br />
1885     const char *in
<br />
1887 <h4 class=
"parameters">Parameters
</h4>
1890 <dd class=
"description">String to write to
</dd>
1892 <dd class=
"description">String to read from
</dd>
1894 <h4 class=
"returnvalue">Return Value
</h4>
1895 <p class=
"description">Decoded string
</p>
1896 <h4 class=
"discussion">Discussion
</h4>
1897 <p class=
"discussion">This function is deprecated. Use the httpDecode64_2() function instead
1898 which provides buffer length arguments.
1901 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/macOS
10.4 </span><a id=
"httpDecode64_2">httpDecode64_2
</a></h3>
1902 <p class=
"description">Base64-decode a string.
</p>
1904 char *httpDecode64_2 (
<br />
1905     char *out,
<br />
1906     int *outlen,
<br />
1907     const char *in
<br />
1909 <h4 class=
"parameters">Parameters
</h4>
1912 <dd class=
"description">String to write to
</dd>
1914 <dd class=
"description">Size of output string
</dd>
1916 <dd class=
"description">String to read from
</dd>
1918 <h4 class=
"returnvalue">Return Value
</h4>
1919 <p class=
"description">Decoded string
</p>
1920 <h3 class=
"function"><a id=
"httpDelete">httpDelete
</a></h3>
1921 <p class=
"description">Send a DELETE request to the server.
</p>
1923 int httpDelete (
<br />
1924     <a href=
"#http_t">http_t
</a> *http,
<br />
1925     const char *uri
<br />
1927 <h4 class=
"parameters">Parameters
</h4>
1930 <dd class=
"description">HTTP connection
</dd>
1932 <dd class=
"description">URI to delete
</dd>
1934 <h4 class=
"returnvalue">Return Value
</h4>
1935 <p class=
"description">Status of call (
0 = success)
</p>
1936 <h3 class=
"function"><span class=
"info"> DEPRECATED
 </span><a id=
"httpEncode64">httpEncode64
</a></h3>
1937 <p class=
"description">Base64-encode a string.
</p>
1939 char *httpEncode64 (
<br />
1940     char *out,
<br />
1941     const char *in
<br />
1943 <h4 class=
"parameters">Parameters
</h4>
1946 <dd class=
"description">String to write to
</dd>
1948 <dd class=
"description">String to read from
</dd>
1950 <h4 class=
"returnvalue">Return Value
</h4>
1951 <p class=
"description">Encoded string
</p>
1952 <h4 class=
"discussion">Discussion
</h4>
1953 <p class=
"discussion">This function is deprecated. Use the httpEncode64_2() function instead
1954 which provides buffer length arguments.
1957 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/macOS
10.4 </span><a id=
"httpEncode64_2">httpEncode64_2
</a></h3>
1958 <p class=
"description">Base64-encode a string.
</p>
1960 char *httpEncode64_2 (
<br />
1961     char *out,
<br />
1962     int outlen,
<br />
1963     const char *in,
<br />
1964     int inlen
<br />
1966 <h4 class=
"parameters">Parameters
</h4>
1969 <dd class=
"description">String to write to
</dd>
1971 <dd class=
"description">Size of output string
</dd>
1973 <dd class=
"description">String to read from
</dd>
1975 <dd class=
"description">Size of input string
</dd>
1977 <h4 class=
"returnvalue">Return Value
</h4>
1978 <p class=
"description">Encoded string
</p>
1979 <h3 class=
"function"><a id=
"httpEncryption">httpEncryption
</a></h3>
1980 <p class=
"description">Set the required encryption on the link.
</p>
1982 int httpEncryption (
<br />
1983     <a href=
"#http_t">http_t
</a> *http,
<br />
1984     <a href=
"#http_encryption_t">http_encryption_t
</a> e
<br />
1986 <h4 class=
"parameters">Parameters
</h4>
1989 <dd class=
"description">HTTP connection
</dd>
1991 <dd class=
"description">New encryption preference
</dd>
1993 <h4 class=
"returnvalue">Return Value
</h4>
1994 <p class=
"description">-
1 on error,
0 on success
</p>
1995 <h3 class=
"function"><a id=
"httpError">httpError
</a></h3>
1996 <p class=
"description">Get the last error on a connection.
</p>
1998 int httpError (
<br />
1999     <a href=
"#http_t">http_t
</a> *http
<br />
2001 <h4 class=
"parameters">Parameters
</h4>
2004 <dd class=
"description">HTTP connection
</dd>
2006 <h4 class=
"returnvalue">Return Value
</h4>
2007 <p class=
"description">Error code (errno) value
</p>
2008 <h3 class=
"function"><a id=
"httpFieldValue">httpFieldValue
</a></h3>
2009 <p class=
"description">Return the HTTP field enumeration value for a field
2012 <a href=
"#http_field_t">http_field_t
</a> httpFieldValue (
<br />
2013     const char *name
<br />
2015 <h4 class=
"parameters">Parameters
</h4>
2018 <dd class=
"description">String name
</dd>
2020 <h4 class=
"returnvalue">Return Value
</h4>
2021 <p class=
"description">Field index
</p>
2022 <h3 class=
"function"><a id=
"httpFlush">httpFlush
</a></h3>
2023 <p class=
"description">Flush data from a HTTP connection.
</p>
2025 void httpFlush (
<br />
2026     <a href=
"#http_t">http_t
</a> *http
<br />
2028 <h4 class=
"parameters">Parameters
</h4>
2031 <dd class=
"description">HTTP connection
</dd>
2033 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpFlushWrite">httpFlushWrite
</a></h3>
2034 <p class=
"description">Flush data in write buffer.
</p>
2036 int httpFlushWrite (
<br />
2037     <a href=
"#http_t">http_t
</a> *http
<br />
2039 <h4 class=
"parameters">Parameters
</h4>
2042 <dd class=
"description">HTTP connection
</dd>
2044 <h4 class=
"returnvalue">Return Value
</h4>
2045 <p class=
"description">Bytes written or -
1 on error
</p>
2046 <h3 class=
"function"><a id=
"httpFreeCredentials">httpFreeCredentials
</a></h3>
2047 <p class=
"description">Free an array of credentials.
</p>
2049 void httpFreeCredentials (
<br />
2050     cups_array_t *credentials
<br />
2052 <h4 class=
"parameters">Parameters
</h4>
2054 <dt>credentials
</dt>
2055 <dd class=
"description">Array of credentials
</dd>
2057 <h3 class=
"function"><a id=
"httpGet">httpGet
</a></h3>
2058 <p class=
"description">Send a GET request to the server.
</p>
2061     <a href=
"#http_t">http_t
</a> *http,
<br />
2062     const char *uri
<br />
2064 <h4 class=
"parameters">Parameters
</h4>
2067 <dd class=
"description">HTTP connection
</dd>
2069 <dd class=
"description">URI to get
</dd>
2071 <h4 class=
"returnvalue">Return Value
</h4>
2072 <p class=
"description">Status of call (
0 = success)
</p>
2073 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpGetActivity">httpGetActivity
</a></h3>
2074 <p class=
"description">Get the most recent activity for a connection.
</p>
2076 time_t httpGetActivity (
<br />
2077     <a href=
"#http_t">http_t
</a> *http
<br />
2079 <h4 class=
"parameters">Parameters
</h4>
2082 <dd class=
"description">HTTP connection
</dd>
2084 <h4 class=
"returnvalue">Return Value
</h4>
2085 <p class=
"description">Time of last read or write
</p>
2086 <h4 class=
"discussion">Discussion
</h4>
2087 <p class=
"discussion">The return value is the UNIX time of the last read or write.
2090 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpGetAddress">httpGetAddress
</a></h3>
2091 <p class=
"description">Get the address of the connected peer of a connection.
</p>
2093 <a href=
"#http_addr_t">http_addr_t
</a> *httpGetAddress (
<br />
2094     <a href=
"#http_t">http_t
</a> *http
<br />
2096 <h4 class=
"parameters">Parameters
</h4>
2099 <dd class=
"description">HTTP connection
</dd>
2101 <h4 class=
"returnvalue">Return Value
</h4>
2102 <p class=
"description">Connected address or
<code>NULL
</code></p>
2103 <h4 class=
"discussion">Discussion
</h4>
2104 <p class=
"discussion">Returns
<code>NULL
</code> if the socket is currently unconnected.
2107 <h3 class=
"function"><span class=
"info"> CUPS
1.3/macOS
10.5 </span><a id=
"httpGetAuthString">httpGetAuthString
</a></h3>
2108 <p class=
"description">Get the current authorization string.
</p>
2110 char *httpGetAuthString (
<br />
2111     <a href=
"#http_t">http_t
</a> *http
<br />
2113 <h4 class=
"parameters">Parameters
</h4>
2116 <dd class=
"description">HTTP connection
</dd>
2118 <h4 class=
"returnvalue">Return Value
</h4>
2119 <p class=
"description">Authorization string
</p>
2120 <h4 class=
"discussion">Discussion
</h4>
2121 <p class=
"discussion">The authorization string is set by cupsDoAuthentication() and
2122 httpSetAuthString(). Use httpGetAuthString() to retrieve the
2123 string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
2127 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpGetBlocking">httpGetBlocking
</a></h3>
2128 <p class=
"description">Get the blocking/non-block state of a connection.
</p>
2130 int httpGetBlocking (
<br />
2131     <a href=
"#http_t">http_t
</a> *http
<br />
2133 <h4 class=
"parameters">Parameters
</h4>
2136 <dd class=
"description">HTTP connection
</dd>
2138 <h4 class=
"returnvalue">Return Value
</h4>
2139 <p class=
"description">1 if blocking,
0 if non-blocking
</p>
2140 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpGetContentEncoding">httpGetContentEncoding
</a></h3>
2141 <p class=
"description">Get a common content encoding, if any, between
2142 the client and server.
</p>
2144 const char *httpGetContentEncoding (
<br />
2145     <a href=
"#http_t">http_t
</a> *http
<br />
2147 <h4 class=
"parameters">Parameters
</h4>
2150 <dd class=
"description">HTTP connection
</dd>
2152 <h4 class=
"returnvalue">Return Value
</h4>
2153 <p class=
"description">Content-Coding value or
2154 <code>NULL
</code> for the identity
2156 <h4 class=
"discussion">Discussion
</h4>
2157 <p class=
"discussion">This function uses the value of the Accepts-Encoding HTTP header and must be
2158 called after receiving a response from the server or a request from the
2159 client. The value returned can be use in subsequent requests (for clients)
2160 or in the response (for servers) in order to compress the content stream.
2163 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"httpGetCookie">httpGetCookie
</a></h3>
2164 <p class=
"description">Get any cookie data from the response.
</p>
2166 const char *httpGetCookie (
<br />
2167     <a href=
"#http_t">http_t
</a> *http
<br />
2169 <h4 class=
"parameters">Parameters
</h4>
2172 <dd class=
"description">HTTP connection
</dd>
2174 <h4 class=
"returnvalue">Return Value
</h4>
2175 <p class=
"description">Cookie data or NULL
</p>
2176 <h3 class=
"function"><span class=
"info"> DEPRECATED
 </span><a id=
"httpGetDateString">httpGetDateString
</a></h3>
2177 <p class=
"description">Get a formatted date/time string from a time value.
</p>
2179 const char *httpGetDateString (
<br />
2180     time_t t
<br />
2182 <h4 class=
"parameters">Parameters
</h4>
2185 <dd class=
"description">UNIX time
</dd>
2187 <h4 class=
"returnvalue">Return Value
</h4>
2188 <p class=
"description">Date/time string
</p>
2189 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpGetDateString2">httpGetDateString2
</a></h3>
2190 <p class=
"description">Get a formatted date/time string from a time value.
</p>
2192 const char *httpGetDateString2 (
<br />
2193     time_t t,
<br />
2194     char *s,
<br />
2195     int slen
<br />
2197 <h4 class=
"parameters">Parameters
</h4>
2200 <dd class=
"description">UNIX time
</dd>
2202 <dd class=
"description">String buffer
</dd>
2204 <dd class=
"description">Size of string buffer
</dd>
2206 <h4 class=
"returnvalue">Return Value
</h4>
2207 <p class=
"description">Date/time string
</p>
2208 <h3 class=
"function"><a id=
"httpGetDateTime">httpGetDateTime
</a></h3>
2209 <p class=
"description">Get a time value from a formatted date/time string.
</p>
2211 time_t httpGetDateTime (
<br />
2212     const char *s
<br />
2214 <h4 class=
"parameters">Parameters
</h4>
2217 <dd class=
"description">Date/time string
</dd>
2219 <h4 class=
"returnvalue">Return Value
</h4>
2220 <p class=
"description">UNIX time
</p>
2221 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpGetEncryption">httpGetEncryption
</a></h3>
2222 <p class=
"description">Get the current encryption mode of a connection.
</p>
2224 <a href=
"#http_encryption_t">http_encryption_t
</a> httpGetEncryption (
<br />
2225     <a href=
"#http_t">http_t
</a> *http
<br />
2227 <h4 class=
"parameters">Parameters
</h4>
2230 <dd class=
"description">HTTP connection
</dd>
2232 <h4 class=
"returnvalue">Return Value
</h4>
2233 <p class=
"description">Current encryption mode
</p>
2234 <h4 class=
"discussion">Discussion
</h4>
2235 <p class=
"discussion">This function returns the encryption mode for the connection. Use the
2236 <a href=
"#httpIsEncrypted"><code>httpIsEncrypted
</code></a> function to determine whether a TLS session has
2240 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpGetExpect">httpGetExpect
</a></h3>
2241 <p class=
"description">Get the value of the Expect header, if any.
</p>
2243 http_status_t httpGetExpect (
<br />
2244     <a href=
"#http_t">http_t
</a> *http
<br />
2246 <h4 class=
"parameters">Parameters
</h4>
2249 <dd class=
"description">HTTP connection
</dd>
2251 <h4 class=
"returnvalue">Return Value
</h4>
2252 <p class=
"description">Expect: status, if any
</p>
2253 <h4 class=
"discussion">Discussion
</h4>
2254 <p class=
"discussion">Returns
<code>HTTP_STATUS_NONE
</code> if there is no Expect header, otherwise
2255 returns the expected HTTP status code, typically
<code>HTTP_STATUS_CONTINUE
</code>.
2258 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpGetFd">httpGetFd
</a></h3>
2259 <p class=
"description">Get the file descriptor associated with a connection.
</p>
2261 int httpGetFd (
<br />
2262     <a href=
"#http_t">http_t
</a> *http
<br />
2264 <h4 class=
"parameters">Parameters
</h4>
2267 <dd class=
"description">HTTP connection
</dd>
2269 <h4 class=
"returnvalue">Return Value
</h4>
2270 <p class=
"description">File descriptor or -
1 if none
</p>
2271 <h3 class=
"function"><a id=
"httpGetField">httpGetField
</a></h3>
2272 <p class=
"description">Get a field value from a request/response.
</p>
2274 const char *httpGetField (
<br />
2275     <a href=
"#http_t">http_t
</a> *http,
<br />
2276     <a href=
"#http_field_t">http_field_t
</a> field
<br />
2278 <h4 class=
"parameters">Parameters
</h4>
2281 <dd class=
"description">HTTP connection
</dd>
2283 <dd class=
"description">Field to get
</dd>
2285 <h4 class=
"returnvalue">Return Value
</h4>
2286 <p class=
"description">Field value
</p>
2287 <h3 class=
"function"><span class=
"info"> DEPRECATED
 </span><a id=
"httpGetHostByName">httpGetHostByName
</a></h3>
2288 <p class=
"description">Lookup a hostname or IPv4 address, and return
2289 address records for the specified name.
</p>
2291 struct hostent *httpGetHostByName (
<br />
2292     const char *name
<br />
2294 <h4 class=
"parameters">Parameters
</h4>
2297 <dd class=
"description">Hostname or IP address
</dd>
2299 <h4 class=
"returnvalue">Return Value
</h4>
2300 <p class=
"description">Host entry
</p>
2301 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpGetHostname">httpGetHostname
</a></h3>
2302 <p class=
"description">Get the FQDN for the connection or local system.
</p>
2304 const char *httpGetHostname (
<br />
2305     <a href=
"#http_t">http_t
</a> *http,
<br />
2306     char *s,
<br />
2307     int slen
<br />
2309 <h4 class=
"parameters">Parameters
</h4>
2312 <dd class=
"description">HTTP connection or NULL
</dd>
2314 <dd class=
"description">String buffer for name
</dd>
2316 <dd class=
"description">Size of buffer
</dd>
2318 <h4 class=
"returnvalue">Return Value
</h4>
2319 <p class=
"description">FQDN for connection or system
</p>
2320 <h4 class=
"discussion">Discussion
</h4>
2321 <p class=
"discussion">When
"http
" points to a connected socket, return the hostname or
2322 address that was used in the call to httpConnect() or httpConnectEncrypt(),
2323 or the address of the client for the connection from httpAcceptConnection().
2324 Otherwise, return the FQDN for the local system using both gethostname()
2325 and gethostbyname() to get the local hostname with domain.
2328 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpGetKeepAlive">httpGetKeepAlive
</a></h3>
2329 <p class=
"description">Get the current Keep-Alive state of the connection.
</p>
2331 <a href=
"#http_keepalive_t">http_keepalive_t
</a> httpGetKeepAlive (
<br />
2332     <a href=
"#http_t">http_t
</a> *http
<br />
2334 <h4 class=
"parameters">Parameters
</h4>
2337 <dd class=
"description">HTTP connection
</dd>
2339 <h4 class=
"returnvalue">Return Value
</h4>
2340 <p class=
"description">Keep-Alive state
</p>
2341 <h3 class=
"function"><span class=
"info"> DEPRECATED
 </span><a id=
"httpGetLength">httpGetLength
</a></h3>
2342 <p class=
"description">Get the amount of data remaining from the
2343 content-length or transfer-encoding fields.
</p>
2345 int httpGetLength (
<br />
2346     <a href=
"#http_t">http_t
</a> *http
<br />
2348 <h4 class=
"parameters">Parameters
</h4>
2351 <dd class=
"description">HTTP connection
</dd>
2353 <h4 class=
"returnvalue">Return Value
</h4>
2354 <p class=
"description">Content length
</p>
2355 <h4 class=
"discussion">Discussion
</h4>
2356 <p class=
"discussion">This function is deprecated and will not return lengths larger than
2357 2^
31 -
1; use httpGetLength2() instead.
2360 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpGetLength2">httpGetLength2
</a></h3>
2361 <p class=
"description">Get the amount of data remaining from the
2362 content-length or transfer-encoding fields.
</p>
2364 off_t httpGetLength2 (
<br />
2365     <a href=
"#http_t">http_t
</a> *http
<br />
2367 <h4 class=
"parameters">Parameters
</h4>
2370 <dd class=
"description">HTTP connection
</dd>
2372 <h4 class=
"returnvalue">Return Value
</h4>
2373 <p class=
"description">Content length
</p>
2374 <h4 class=
"discussion">Discussion
</h4>
2375 <p class=
"discussion">This function returns the complete content length, even for
2376 content larger than
2^
31 -
1.
2379 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpGetPending">httpGetPending
</a></h3>
2380 <p class=
"description">Get the number of bytes that are buffered for writing.
</p>
2382 size_t httpGetPending (
<br />
2383     <a href=
"#http_t">http_t
</a> *http
<br />
2385 <h4 class=
"parameters">Parameters
</h4>
2388 <dd class=
"description">HTTP connection
</dd>
2390 <h4 class=
"returnvalue">Return Value
</h4>
2391 <p class=
"description">Number of bytes buffered
</p>
2392 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpGetReady">httpGetReady
</a></h3>
2393 <p class=
"description">Get the number of bytes that can be read without blocking.
</p>
2395 size_t httpGetReady (
<br />
2396     <a href=
"#http_t">http_t
</a> *http
<br />
2398 <h4 class=
"parameters">Parameters
</h4>
2401 <dd class=
"description">HTTP connection
</dd>
2403 <h4 class=
"returnvalue">Return Value
</h4>
2404 <p class=
"description">Number of bytes available
</p>
2405 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpGetRemaining">httpGetRemaining
</a></h3>
2406 <p class=
"description">Get the number of remaining bytes in the message
2407 body or current chunk.
</p>
2409 size_t httpGetRemaining (
<br />
2410     <a href=
"#http_t">http_t
</a> *http
<br />
2412 <h4 class=
"parameters">Parameters
</h4>
2415 <dd class=
"description">HTTP connection
</dd>
2417 <h4 class=
"returnvalue">Return Value
</h4>
2418 <p class=
"description">Remaining bytes
</p>
2419 <h4 class=
"discussion">Discussion
</h4>
2420 <p class=
"discussion">The
<a href=
"#httpIsChunked"><code>httpIsChunked
</code></a> function can be used to determine whether the
2421 message body is chunked or fixed-length.
2424 <h3 class=
"function"><a id=
"httpGetState">httpGetState
</a></h3>
2425 <p class=
"description">Get the current state of the HTTP request.
</p>
2427 <a href=
"#http_state_t">http_state_t
</a> httpGetState (
<br />
2428     <a href=
"#http_t">http_t
</a> *http
<br />
2430 <h4 class=
"parameters">Parameters
</h4>
2433 <dd class=
"description">HTTP connection
</dd>
2435 <h4 class=
"returnvalue">Return Value
</h4>
2436 <p class=
"description">HTTP state
</p>
2437 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpGetStatus">httpGetStatus
</a></h3>
2438 <p class=
"description">Get the status of the last HTTP request.
</p>
2440 http_status_t httpGetStatus (
<br />
2441     <a href=
"#http_t">http_t
</a> *http
<br />
2443 <h4 class=
"parameters">Parameters
</h4>
2446 <dd class=
"description">HTTP connection
</dd>
2448 <h4 class=
"returnvalue">Return Value
</h4>
2449 <p class=
"description">HTTP status
</p>
2450 <h3 class=
"function"><span class=
"info"> DEPRECATED
 </span><a id=
"httpGetSubField">httpGetSubField
</a></h3>
2451 <p class=
"description">Get a sub-field value.
</p>
2453 char *httpGetSubField (
<br />
2454     <a href=
"#http_t">http_t
</a> *http,
<br />
2455     <a href=
"#http_field_t">http_field_t
</a> field,
<br />
2456     const char *name,
<br />
2457     char *value
<br />
2459 <h4 class=
"parameters">Parameters
</h4>
2462 <dd class=
"description">HTTP connection
</dd>
2464 <dd class=
"description">Field index
</dd>
2466 <dd class=
"description">Name of sub-field
</dd>
2468 <dd class=
"description">Value string
</dd>
2470 <h4 class=
"returnvalue">Return Value
</h4>
2471 <p class=
"description">Value or NULL
</p>
2472 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpGetSubField2">httpGetSubField2
</a></h3>
2473 <p class=
"description">Get a sub-field value.
</p>
2475 char *httpGetSubField2 (
<br />
2476     <a href=
"#http_t">http_t
</a> *http,
<br />
2477     <a href=
"#http_field_t">http_field_t
</a> field,
<br />
2478     const char *name,
<br />
2479     char *value,
<br />
2480     int valuelen
<br />
2482 <h4 class=
"parameters">Parameters
</h4>
2485 <dd class=
"description">HTTP connection
</dd>
2487 <dd class=
"description">Field index
</dd>
2489 <dd class=
"description">Name of sub-field
</dd>
2491 <dd class=
"description">Value string
</dd>
2493 <dd class=
"description">Size of value buffer
</dd>
2495 <h4 class=
"returnvalue">Return Value
</h4>
2496 <p class=
"description">Value or NULL
</p>
2497 <h3 class=
"function"><a id=
"httpGetVersion">httpGetVersion
</a></h3>
2498 <p class=
"description">Get the HTTP version at the other end.
</p>
2500 <a href=
"#http_version_t">http_version_t
</a> httpGetVersion (
<br />
2501     <a href=
"#http_t">http_t
</a> *http
<br />
2503 <h4 class=
"parameters">Parameters
</h4>
2506 <dd class=
"description">HTTP connection
</dd>
2508 <h4 class=
"returnvalue">Return Value
</h4>
2509 <p class=
"description">Version number
</p>
2510 <h3 class=
"function"><a id=
"httpGets">httpGets
</a></h3>
2511 <p class=
"description">Get a line of text from a HTTP connection.
</p>
2513 char *httpGets (
<br />
2514     char *line,
<br />
2515     int length,
<br />
2516     <a href=
"#http_t">http_t
</a> *http
<br />
2518 <h4 class=
"parameters">Parameters
</h4>
2521 <dd class=
"description">Line to read into
</dd>
2523 <dd class=
"description">Max length of buffer
</dd>
2525 <dd class=
"description">HTTP connection
</dd>
2527 <h4 class=
"returnvalue">Return Value
</h4>
2528 <p class=
"description">Line or NULL
</p>
2529 <h3 class=
"function"><a id=
"httpHead">httpHead
</a></h3>
2530 <p class=
"description">Send a HEAD request to the server.
</p>
2532 int httpHead (
<br />
2533     <a href=
"#http_t">http_t
</a> *http,
<br />
2534     const char *uri
<br />
2536 <h4 class=
"parameters">Parameters
</h4>
2539 <dd class=
"description">HTTP connection
</dd>
2541 <dd class=
"description">URI for head
</dd>
2543 <h4 class=
"returnvalue">Return Value
</h4>
2544 <p class=
"description">Status of call (
0 = success)
</p>
2545 <h3 class=
"function"><a id=
"httpInitialize">httpInitialize
</a></h3>
2546 <p class=
"description">Initialize the HTTP interface library and set the
2547 default HTTP proxy (if any).
</p>
2549 void httpInitialize (void);
</p>
2550 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpIsChunked">httpIsChunked
</a></h3>
2551 <p class=
"description">Report whether a message body is chunked.
</p>
2553 int httpIsChunked (
<br />
2554     <a href=
"#http_t">http_t
</a> *http
<br />
2556 <h4 class=
"parameters">Parameters
</h4>
2559 <dd class=
"description">HTTP connection
</dd>
2561 <h4 class=
"returnvalue">Return Value
</h4>
2562 <p class=
"description">1 if chunked,
0 if not
</p>
2563 <h4 class=
"discussion">Discussion
</h4>
2564 <p class=
"discussion">This function returns non-zero if the message body is composed of
2565 variable-length chunks.
2568 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpIsEncrypted">httpIsEncrypted
</a></h3>
2569 <p class=
"description">Report whether a connection is encrypted.
</p>
2571 int httpIsEncrypted (
<br />
2572     <a href=
"#http_t">http_t
</a> *http
<br />
2574 <h4 class=
"parameters">Parameters
</h4>
2577 <dd class=
"description">HTTP connection
</dd>
2579 <h4 class=
"returnvalue">Return Value
</h4>
2580 <p class=
"description">1 if encrypted,
0 if not
</p>
2581 <h4 class=
"discussion">Discussion
</h4>
2582 <p class=
"discussion">This function returns non-zero if the connection is currently encrypted.
2585 <h3 class=
"function"><a id=
"httpMD5">httpMD5
</a></h3>
2586 <p class=
"description">Compute the MD5 sum of the username:group:password.
</p>
2588 char *httpMD5 (
<br />
2589     const char *username,
<br />
2590     const char *realm,
<br />
2591     const char *passwd,
<br />
2592     char md5[
33]
<br />
2594 <h4 class=
"parameters">Parameters
</h4>
2597 <dd class=
"description">User name
</dd>
2599 <dd class=
"description">Realm name
</dd>
2601 <dd class=
"description">Password string
</dd>
2603 <dd class=
"description">MD5 string
</dd>
2605 <h4 class=
"returnvalue">Return Value
</h4>
2606 <p class=
"description">MD5 sum
</p>
2607 <h3 class=
"function"><a id=
"httpMD5Final">httpMD5Final
</a></h3>
2608 <p class=
"description">Combine the MD5 sum of the username, group, and password
2609 with the server-supplied nonce value, method, and
2612 char *httpMD5Final (
<br />
2613     const char *nonce,
<br />
2614     const char *method,
<br />
2615     const char *resource,
<br />
2616     char md5[
33]
<br />
2618 <h4 class=
"parameters">Parameters
</h4>
2621 <dd class=
"description">Server nonce value
</dd>
2623 <dd class=
"description">METHOD (GET, POST, etc.)
</dd>
2625 <dd class=
"description">Resource path
</dd>
2627 <dd class=
"description">MD5 sum
</dd>
2629 <h4 class=
"returnvalue">Return Value
</h4>
2630 <p class=
"description">New sum
</p>
2631 <h3 class=
"function"><a id=
"httpMD5String">httpMD5String
</a></h3>
2632 <p class=
"description">Convert an MD5 sum to a character string.
</p>
2634 char *httpMD5String (
<br />
2635     const unsigned char *sum,
<br />
2636     char md5[
33]
<br />
2638 <h4 class=
"parameters">Parameters
</h4>
2641 <dd class=
"description">MD5 sum data
</dd>
2643 <dd class=
"description">MD5 sum in hex
</dd>
2645 <h4 class=
"returnvalue">Return Value
</h4>
2646 <p class=
"description">MD5 sum in hex
</p>
2647 <h3 class=
"function"><a id=
"httpOptions">httpOptions
</a></h3>
2648 <p class=
"description">Send an OPTIONS request to the server.
</p>
2650 int httpOptions (
<br />
2651     <a href=
"#http_t">http_t
</a> *http,
<br />
2652     const char *uri
<br />
2654 <h4 class=
"parameters">Parameters
</h4>
2657 <dd class=
"description">HTTP connection
</dd>
2659 <dd class=
"description">URI for options
</dd>
2661 <h4 class=
"returnvalue">Return Value
</h4>
2662 <p class=
"description">Status of call (
0 = success)
</p>
2663 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpPeek">httpPeek
</a></h3>
2664 <p class=
"description">Peek at data from a HTTP connection.
</p>
2666 ssize_t httpPeek (
<br />
2667     <a href=
"#http_t">http_t
</a> *http,
<br />
2668     char *buffer,
<br />
2669     size_t length
<br />
2671 <h4 class=
"parameters">Parameters
</h4>
2674 <dd class=
"description">HTTP connection
</dd>
2676 <dd class=
"description">Buffer for data
</dd>
2678 <dd class=
"description">Maximum number of bytes
</dd>
2680 <h4 class=
"returnvalue">Return Value
</h4>
2681 <p class=
"description">Number of bytes copied
</p>
2682 <h4 class=
"discussion">Discussion
</h4>
2683 <p class=
"discussion">This function copies available data from the given HTTP connection, reading
2684 a buffer as needed. The data is still available for reading using
2685 <a href=
"#httpRead"><code>httpRead
</code></a> or
<a href=
"#httpRead2"><code>httpRead2
</code></a>.
<br>
2687 For non-blocking connections the usual timeouts apply.
2690 <h3 class=
"function"><a id=
"httpPost">httpPost
</a></h3>
2691 <p class=
"description">Send a POST request to the server.
</p>
2693 int httpPost (
<br />
2694     <a href=
"#http_t">http_t
</a> *http,
<br />
2695     const char *uri
<br />
2697 <h4 class=
"parameters">Parameters
</h4>
2700 <dd class=
"description">HTTP connection
</dd>
2702 <dd class=
"description">URI for post
</dd>
2704 <h4 class=
"returnvalue">Return Value
</h4>
2705 <p class=
"description">Status of call (
0 = success)
</p>
2706 <h3 class=
"function"><a id=
"httpPut">httpPut
</a></h3>
2707 <p class=
"description">Send a PUT request to the server.
</p>
2710     <a href=
"#http_t">http_t
</a> *http,
<br />
2711     const char *uri
<br />
2713 <h4 class=
"parameters">Parameters
</h4>
2716 <dd class=
"description">HTTP connection
</dd>
2718 <dd class=
"description">URI to put
</dd>
2720 <h4 class=
"returnvalue">Return Value
</h4>
2721 <p class=
"description">Status of call (
0 = success)
</p>
2722 <h3 class=
"function"><span class=
"info"> DEPRECATED
 </span><a id=
"httpRead">httpRead
</a></h3>
2723 <p class=
"description">Read data from a HTTP connection.
</p>
2725 int httpRead (
<br />
2726     <a href=
"#http_t">http_t
</a> *http,
<br />
2727     char *buffer,
<br />
2728     int length
<br />
2730 <h4 class=
"parameters">Parameters
</h4>
2733 <dd class=
"description">HTTP connection
</dd>
2735 <dd class=
"description">Buffer for data
</dd>
2737 <dd class=
"description">Maximum number of bytes
</dd>
2739 <h4 class=
"returnvalue">Return Value
</h4>
2740 <p class=
"description">Number of bytes read
</p>
2741 <h4 class=
"discussion">Discussion
</h4>
2742 <p class=
"discussion">This function is deprecated. Use the httpRead2() function which can
2743 read more than
2GB of data.
2746 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpRead2">httpRead2
</a></h3>
2747 <p class=
"description">Read data from a HTTP connection.
</p>
2749 ssize_t httpRead2 (
<br />
2750     <a href=
"#http_t">http_t
</a> *http,
<br />
2751     char *buffer,
<br />
2752     size_t length
<br />
2754 <h4 class=
"parameters">Parameters
</h4>
2757 <dd class=
"description">HTTP connection
</dd>
2759 <dd class=
"description">Buffer for data
</dd>
2761 <dd class=
"description">Maximum number of bytes
</dd>
2763 <h4 class=
"returnvalue">Return Value
</h4>
2764 <p class=
"description">Number of bytes read
</p>
2765 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpReadRequest">httpReadRequest
</a></h3>
2766 <p class=
"description">Read a HTTP request from a connection.
</p>
2768 <a href=
"#http_state_t">http_state_t
</a> httpReadRequest (
<br />
2769     <a href=
"#http_t">http_t
</a> *http,
<br />
2770     char *uri,
<br />
2771     size_t urilen
<br />
2773 <h4 class=
"parameters">Parameters
</h4>
2776 <dd class=
"description">HTTP connection
</dd>
2778 <dd class=
"description">URI buffer
</dd>
2780 <dd class=
"description">Size of URI buffer
</dd>
2782 <h4 class=
"returnvalue">Return Value
</h4>
2783 <p class=
"description">New state of connection
</p>
2784 <h3 class=
"function"><span class=
"info"> DEPRECATED
 </span><a id=
"httpReconnect">httpReconnect
</a></h3>
2785 <p class=
"description">Reconnect to a HTTP server.
</p>
2787 int httpReconnect (
<br />
2788     <a href=
"#http_t">http_t
</a> *http
<br />
2790 <h4 class=
"parameters">Parameters
</h4>
2793 <dd class=
"description">HTTP connection
</dd>
2795 <h4 class=
"returnvalue">Return Value
</h4>
2796 <p class=
"description">0 on success, non-zero on failure
</p>
2797 <h4 class=
"discussion">Discussion
</h4>
2798 <p class=
"discussion">This function is deprecated. Please use the
<a href=
"#httpReconnect2"><code>httpReconnect2
</code></a> function
2802 <h3 class=
"function"><a id=
"httpReconnect2">httpReconnect2
</a></h3>
2803 <p class=
"description">Reconnect to a HTTP server with timeout and optional
2806 int httpReconnect2 (
<br />
2807     <a href=
"#http_t">http_t
</a> *http,
<br />
2808     int msec,
<br />
2809     int *cancel
<br />
2811 <h4 class=
"parameters">Parameters
</h4>
2814 <dd class=
"description">HTTP connection
</dd>
2816 <dd class=
"description">Timeout in milliseconds
</dd>
2818 <dd class=
"description">Pointer to
"cancel
" variable
</dd>
2820 <h4 class=
"returnvalue">Return Value
</h4>
2821 <p class=
"description">0 on success, non-zero on failure
</p>
2822 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpResolveHostname">httpResolveHostname
</a></h3>
2823 <p class=
"description">Resolve the hostname of the HTTP connection
2826 const char *httpResolveHostname (
<br />
2827     <a href=
"#http_t">http_t
</a> *http,
<br />
2828     char *buffer,
<br />
2829     size_t bufsize
<br />
2831 <h4 class=
"parameters">Parameters
</h4>
2834 <dd class=
"description">HTTP connection
</dd>
2836 <dd class=
"description">Hostname buffer
</dd>
2838 <dd class=
"description">Size of buffer
</dd>
2840 <h4 class=
"returnvalue">Return Value
</h4>
2841 <p class=
"description">Resolved hostname or
<code>NULL
</code></p>
2842 <h3 class=
"function"><span class=
"info"> DEPRECATED
 </span><a id=
"httpSeparate">httpSeparate
</a></h3>
2843 <p class=
"description">Separate a Universal Resource Identifier into its
2846 void httpSeparate (
<br />
2847     const char *uri,
<br />
2848     char *scheme,
<br />
2849     char *username,
<br />
2850     char *host,
<br />
2851     int *port,
<br />
2852     char *resource
<br />
2854 <h4 class=
"parameters">Parameters
</h4>
2857 <dd class=
"description">Universal Resource Identifier
</dd>
2859 <dd class=
"description">Scheme [
32] (http, https, etc.)
</dd>
2861 <dd class=
"description">Username [
1024]
</dd>
2863 <dd class=
"description">Hostname [
1024]
</dd>
2865 <dd class=
"description">Port number to use
</dd>
2867 <dd class=
"description">Resource/filename [
1024]
</dd>
2869 <h4 class=
"discussion">Discussion
</h4>
2870 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
2873 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/macOS
10.4 </span><a id=
"httpSeparate2">httpSeparate2
</a></h3>
2874 <p class=
"description">Separate a Universal Resource Identifier into its
2877 void httpSeparate2 (
<br />
2878     const char *uri,
<br />
2879     char *scheme,
<br />
2880     int schemelen,
<br />
2881     char *username,
<br />
2882     int usernamelen,
<br />
2883     char *host,
<br />
2884     int hostlen,
<br />
2885     int *port,
<br />
2886     char *resource,
<br />
2887     int resourcelen
<br />
2889 <h4 class=
"parameters">Parameters
</h4>
2892 <dd class=
"description">Universal Resource Identifier
</dd>
2894 <dd class=
"description">Scheme (http, https, etc.)
</dd>
2896 <dd class=
"description">Size of scheme buffer
</dd>
2898 <dd class=
"description">Username
</dd>
2899 <dt>usernamelen
</dt>
2900 <dd class=
"description">Size of username buffer
</dd>
2902 <dd class=
"description">Hostname
</dd>
2904 <dd class=
"description">Size of hostname buffer
</dd>
2906 <dd class=
"description">Port number to use
</dd>
2908 <dd class=
"description">Resource/filename
</dd>
2909 <dt>resourcelen
</dt>
2910 <dd class=
"description">Size of resource buffer
</dd>
2912 <h4 class=
"discussion">Discussion
</h4>
2913 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
2917 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpSeparateURI">httpSeparateURI
</a></h3>
2918 <p class=
"description">Separate a Universal Resource Identifier into its
2921 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpSeparateURI (
<br />
2922     <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> decoding,
<br />
2923     const char *uri,
<br />
2924     char *scheme,
<br />
2925     int schemelen,
<br />
2926     char *username,
<br />
2927     int usernamelen,
<br />
2928     char *host,
<br />
2929     int hostlen,
<br />
2930     int *port,
<br />
2931     char *resource,
<br />
2932     int resourcelen
<br />
2934 <h4 class=
"parameters">Parameters
</h4>
2937 <dd class=
"description">Decoding flags
</dd>
2939 <dd class=
"description">Universal Resource Identifier
</dd>
2941 <dd class=
"description">Scheme (http, https, etc.)
</dd>
2943 <dd class=
"description">Size of scheme buffer
</dd>
2945 <dd class=
"description">Username
</dd>
2946 <dt>usernamelen
</dt>
2947 <dd class=
"description">Size of username buffer
</dd>
2949 <dd class=
"description">Hostname
</dd>
2951 <dd class=
"description">Size of hostname buffer
</dd>
2953 <dd class=
"description">Port number to use
</dd>
2955 <dd class=
"description">Resource/filename
</dd>
2956 <dt>resourcelen
</dt>
2957 <dd class=
"description">Size of resource buffer
</dd>
2959 <h4 class=
"returnvalue">Return Value
</h4>
2960 <p class=
"description">Result of separation
</p>
2961 <h3 class=
"function"><span class=
"info"> CUPS
1.3/macOS
10.5 </span><a id=
"httpSetAuthString">httpSetAuthString
</a></h3>
2962 <p class=
"description">Set the current authorization string.
</p>
2964 void httpSetAuthString (
<br />
2965     <a href=
"#http_t">http_t
</a> *http,
<br />
2966     const char *scheme,
<br />
2967     const char *data
<br />
2969 <h4 class=
"parameters">Parameters
</h4>
2972 <dd class=
"description">HTTP connection
</dd>
2974 <dd class=
"description">Auth scheme (NULL to clear it)
</dd>
2976 <dd class=
"description">Auth data (NULL for none)
</dd>
2978 <h4 class=
"discussion">Discussion
</h4>
2979 <p class=
"discussion">This function just stores a copy of the current authorization string in
2980 the HTTP connection object. You must still call httpSetField() to set
2981 HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
2982 httpHead(), httpOptions(), httpPost, or httpPut().
2985 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"httpSetCookie">httpSetCookie
</a></h3>
2986 <p class=
"description">Set the cookie value(s).
</p>
2988 void httpSetCookie (
<br />
2989     <a href=
"#http_t">http_t
</a> *http,
<br />
2990     const char *cookie
<br />
2992 <h4 class=
"parameters">Parameters
</h4>
2995 <dd class=
"description">Connection
</dd>
2997 <dd class=
"description">Cookie string
</dd>
2999 <h3 class=
"function"><span class=
"info"> CUPS
1.5/macOS
10.7 </span><a id=
"httpSetCredentials">httpSetCredentials
</a></h3>
3000 <p class=
"description">Set the credentials associated with an encrypted
3003 int httpSetCredentials (
<br />
3004     <a href=
"#http_t">http_t
</a> *http,
<br />
3005     cups_array_t *credentials
<br />
3007 <h4 class=
"parameters">Parameters
</h4>
3010 <dd class=
"description">HTTP connection
</dd>
3011 <dt>credentials
</dt>
3012 <dd class=
"description">Array of credentials
</dd>
3014 <h4 class=
"returnvalue">Return Value
</h4>
3015 <p class=
"description">Status of call (
0 = success)
</p>
3016 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpSetDefaultField">httpSetDefaultField
</a></h3>
3017 <p class=
"description">Set the default value of an HTTP header.
</p>
3019 void httpSetDefaultField (
<br />
3020     <a href=
"#http_t">http_t
</a> *http,
<br />
3021     <a href=
"#http_field_t">http_field_t
</a> field,
<br />
3022     const char *value
<br />
3024 <h4 class=
"parameters">Parameters
</h4>
3027 <dd class=
"description">HTTP connection
</dd>
3029 <dd class=
"description">Field index
</dd>
3031 <dd class=
"description">Value
</dd>
3033 <h4 class=
"discussion">Discussion
</h4>
3034 <p class=
"discussion">Currently only
<code>HTTP_FIELD_ACCEPT_ENCODING
</code>,
<code>HTTP_FIELD_SERVER
</code>,
3035 and
<code>HTTP_FIELD_USER_AGENT
</code> can be set.
3038 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpSetExpect">httpSetExpect
</a></h3>
3039 <p class=
"description">Set the Expect: header in a request.
</p>
3041 void httpSetExpect (
<br />
3042     <a href=
"#http_t">http_t
</a> *http,
<br />
3043     http_status_t expect
<br />
3045 <h4 class=
"parameters">Parameters
</h4>
3048 <dd class=
"description">HTTP connection
</dd>
3050 <dd class=
"description">HTTP status to expect
3051 (
<code>HTTP_STATUS_CONTINUE
</code>)
</dd>
3053 <h4 class=
"discussion">Discussion
</h4>
3054 <p class=
"discussion">Currently only
<code>HTTP_STATUS_CONTINUE
</code> is supported for the
"expect
"
3058 <h3 class=
"function"><a id=
"httpSetField">httpSetField
</a></h3>
3059 <p class=
"description">Set the value of an HTTP header.
</p>
3061 void httpSetField (
<br />
3062     <a href=
"#http_t">http_t
</a> *http,
<br />
3063     <a href=
"#http_field_t">http_field_t
</a> field,
<br />
3064     const char *value
<br />
3066 <h4 class=
"parameters">Parameters
</h4>
3069 <dd class=
"description">HTTP connection
</dd>
3071 <dd class=
"description">Field index
</dd>
3073 <dd class=
"description">Value
</dd>
3075 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpSetKeepAlive">httpSetKeepAlive
</a></h3>
3076 <p class=
"description">Set the current Keep-Alive state of a connection.
</p>
3078 void httpSetKeepAlive (
<br />
3079     <a href=
"#http_t">http_t
</a> *http,
<br />
3080     <a href=
"#http_keepalive_t">http_keepalive_t
</a> keep_alive
<br />
3082 <h4 class=
"parameters">Parameters
</h4>
3085 <dd class=
"description">HTTP connection
</dd>
3087 <dd class=
"description">New Keep-Alive value
</dd>
3089 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpSetLength">httpSetLength
</a></h3>
3090 <p class=
"description">Set the content-length and content-encoding.
</p>
3092 void httpSetLength (
<br />
3093     <a href=
"#http_t">http_t
</a> *http,
<br />
3094     size_t length
<br />
3096 <h4 class=
"parameters">Parameters
</h4>
3099 <dd class=
"description">HTTP connection
</dd>
3101 <dd class=
"description">Length (
0 for chunked)
</dd>
3103 <h3 class=
"function"><span class=
"info"> CUPS
1.5/macOS
10.7 </span><a id=
"httpSetTimeout">httpSetTimeout
</a></h3>
3104 <p class=
"description">Set read/write timeouts and an optional callback.
</p>
3106 void httpSetTimeout (
<br />
3107     <a href=
"#http_t">http_t
</a> *http,
<br />
3108     double timeout,
<br />
3109     <a href=
"#http_timeout_cb_t">http_timeout_cb_t
</a> cb,
<br />
3110     void *user_data
<br />
3112 <h4 class=
"parameters">Parameters
</h4>
3115 <dd class=
"description">HTTP connection
</dd>
3117 <dd class=
"description">Number of seconds for timeout,
3118 must be greater than
0</dd>
3120 <dd class=
"description">Callback function or NULL
</dd>
3122 <dd class=
"description">User data pointer
</dd>
3124 <h4 class=
"discussion">Discussion
</h4>
3125 <p class=
"discussion">The optional timeout callback receives both the HTTP connection and a user
3126 data pointer and must return
1 to continue or
0 to error (time) out.
3129 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpShutdown">httpShutdown
</a></h3>
3130 <p class=
"description">Shutdown one side of an HTTP connection.
</p>
3132 void httpShutdown (
<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 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpStateString">httpStateString
</a></h3>
3141 <p class=
"description">Return the string describing a HTTP state value.
</p>
3143 const char *httpStateString (
<br />
3144     <a href=
"#http_state_t">http_state_t
</a> state
<br />
3146 <h4 class=
"parameters">Parameters
</h4>
3149 <dd class=
"description">HTTP state value
</dd>
3151 <h4 class=
"returnvalue">Return Value
</h4>
3152 <p class=
"description">State string
</p>
3153 <h3 class=
"function"><a id=
"httpStatus">httpStatus
</a></h3>
3154 <p class=
"description">Return a short string describing a HTTP status code.
</p>
3156 const char *httpStatus (
<br />
3157     http_status_t status
<br />
3159 <h4 class=
"parameters">Parameters
</h4>
3162 <dd class=
"description">HTTP status code
</dd>
3164 <h4 class=
"returnvalue">Return Value
</h4>
3165 <p class=
"description">Localized status string
</p>
3166 <h4 class=
"discussion">Discussion
</h4>
3167 <p class=
"discussion">The returned string is localized to the current POSIX locale and is based
3168 on the status strings defined in RFC
2616.
</p>
3169 <h3 class=
"function"><a id=
"httpTrace">httpTrace
</a></h3>
3170 <p class=
"description">Send an TRACE request to the server.
</p>
3172 int httpTrace (
<br />
3173     <a href=
"#http_t">http_t
</a> *http,
<br />
3174     const char *uri
<br />
3176 <h4 class=
"parameters">Parameters
</h4>
3179 <dd class=
"description">HTTP connection
</dd>
3181 <dd class=
"description">URI for trace
</dd>
3183 <h4 class=
"returnvalue">Return Value
</h4>
3184 <p class=
"description">Status of call (
0 = success)
</p>
3185 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"httpURIStatusString">httpURIStatusString
</a></h3>
3186 <p class=
"description">Return a string describing a URI status code.
</p>
3188 const char *httpURIStatusString (
<br />
3189     <a href=
"#http_uri_status_t">http_uri_status_t
</a> status
<br />
3191 <h4 class=
"parameters">Parameters
</h4>
3194 <dd class=
"description">URI status code
</dd>
3196 <h4 class=
"returnvalue">Return Value
</h4>
3197 <p class=
"description">Localized status string
</p>
3198 <h3 class=
"function"><a id=
"httpUpdate">httpUpdate
</a></h3>
3199 <p class=
"description">Update the current HTTP state for incoming data.
</p>
3201 http_status_t httpUpdate (
<br />
3202     <a href=
"#http_t">http_t
</a> *http
<br />
3204 <h4 class=
"parameters">Parameters
</h4>
3207 <dd class=
"description">HTTP connection
</dd>
3209 <h4 class=
"returnvalue">Return Value
</h4>
3210 <p class=
"description">HTTP status
</p>
3211 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"httpWait">httpWait
</a></h3>
3212 <p class=
"description">Wait for data available on a connection.
</p>
3214 int httpWait (
<br />
3215     <a href=
"#http_t">http_t
</a> *http,
<br />
3216     int msec
<br />
3218 <h4 class=
"parameters">Parameters
</h4>
3221 <dd class=
"description">HTTP connection
</dd>
3223 <dd class=
"description">Milliseconds to wait
</dd>
3225 <h4 class=
"returnvalue">Return Value
</h4>
3226 <p class=
"description">1 if data is available,
0 otherwise
</p>
3227 <h3 class=
"function"><span class=
"info"> DEPRECATED
 </span><a id=
"httpWrite">httpWrite
</a></h3>
3228 <p class=
"description">Write data to a HTTP connection.
</p>
3230 int httpWrite (
<br />
3231     <a href=
"#http_t">http_t
</a> *http,
<br />
3232     const char *buffer,
<br />
3233     int length
<br />
3235 <h4 class=
"parameters">Parameters
</h4>
3238 <dd class=
"description">HTTP connection
</dd>
3240 <dd class=
"description">Buffer for data
</dd>
3242 <dd class=
"description">Number of bytes to write
</dd>
3244 <h4 class=
"returnvalue">Return Value
</h4>
3245 <p class=
"description">Number of bytes written
</p>
3246 <h4 class=
"discussion">Discussion
</h4>
3247 <p class=
"discussion">This function is deprecated. Use the httpWrite2() function which can
3248 write more than
2GB of data.
3251 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"httpWrite2">httpWrite2
</a></h3>
3252 <p class=
"description">Write data to a HTTP connection.
</p>
3254 ssize_t httpWrite2 (
<br />
3255     <a href=
"#http_t">http_t
</a> *http,
<br />
3256     const char *buffer,
<br />
3257     size_t length
<br />
3259 <h4 class=
"parameters">Parameters
</h4>
3262 <dd class=
"description">HTTP connection
</dd>
3264 <dd class=
"description">Buffer for data
</dd>
3266 <dd class=
"description">Number of bytes to write
</dd>
3268 <h4 class=
"returnvalue">Return Value
</h4>
3269 <p class=
"description">Number of bytes written
</p>
3270 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"httpWriteResponse">httpWriteResponse
</a></h3>
3271 <p class=
"description">Write a HTTP response to a client connection.
</p>
3273 int httpWriteResponse (
<br />
3274     <a href=
"#http_t">http_t
</a> *http,
<br />
3275     http_status_t status
<br />
3277 <h4 class=
"parameters">Parameters
</h4>
3280 <dd class=
"description">HTTP connection
</dd>
3282 <dd class=
"description">Status code
</dd>
3284 <h4 class=
"returnvalue">Return Value
</h4>
3285 <p class=
"description">0 on success, -
1 on error
</p>
3286 <h3 class=
"function"><a id=
"ippAddBoolean">ippAddBoolean
</a></h3>
3287 <p class=
"description">Add a boolean attribute to an IPP message.
</p>
3289 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBoolean (
<br />
3290     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
3291     ipp_tag_t group,
<br />
3292     const char *name,
<br />
3293     char value
<br />
3295 <h4 class=
"parameters">Parameters
</h4>
3298 <dd class=
"description">IPP message
</dd>
3300 <dd class=
"description">IPP group
</dd>
3302 <dd class=
"description">Name of attribute
</dd>
3304 <dd class=
"description">Value of attribute
</dd>
3306 <h4 class=
"returnvalue">Return Value
</h4>
3307 <p class=
"description">New attribute
</p>
3308 <h4 class=
"discussion">Discussion
</h4>
3309 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3310 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
3312 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3313 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3314 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3315 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3316 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3317 <h3 class=
"function"><a id=
"ippAddBooleans">ippAddBooleans
</a></h3>
3318 <p class=
"description">Add an array of boolean values.
</p>
3320 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBooleans (
<br />
3321     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
3322     ipp_tag_t group,
<br />
3323     const char *name,
<br />
3324     int num_values,
<br />
3325     const char *values
<br />
3327 <h4 class=
"parameters">Parameters
</h4>
3330 <dd class=
"description">IPP message
</dd>
3332 <dd class=
"description">IPP group
</dd>
3334 <dd class=
"description">Name of attribute
</dd>
3336 <dd class=
"description">Number of values
</dd>
3338 <dd class=
"description">Values
</dd>
3340 <h4 class=
"returnvalue">Return Value
</h4>
3341 <p class=
"description">New attribute
</p>
3342 <h4 class=
"discussion">Discussion
</h4>
3343 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3344 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
3346 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3347 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3348 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3349 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3350 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3351 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"ippAddCollection">ippAddCollection
</a></h3>
3352 <p class=
"description">Add a collection value.
</p>
3354 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollection (
<br />
3355     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
3356     ipp_tag_t group,
<br />
3357     const char *name,
<br />
3358     <a href=
"#ipp_t">ipp_t
</a> *value
<br />
3360 <h4 class=
"parameters">Parameters
</h4>
3363 <dd class=
"description">IPP message
</dd>
3365 <dd class=
"description">IPP group
</dd>
3367 <dd class=
"description">Name of attribute
</dd>
3369 <dd class=
"description">Value
</dd>
3371 <h4 class=
"returnvalue">Return Value
</h4>
3372 <p class=
"description">New attribute
</p>
3373 <h4 class=
"discussion">Discussion
</h4>
3374 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3375 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
3377 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3378 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3379 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3380 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3381 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
3384 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"ippAddCollections">ippAddCollections
</a></h3>
3385 <p class=
"description">Add an array of collection values.
</p>
3387 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollections (
<br />
3388     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
3389     ipp_tag_t group,
<br />
3390     const char *name,
<br />
3391     int num_values,
<br />
3392     const
<a href=
"#ipp_t">ipp_t
</a> **values
<br />
3394 <h4 class=
"parameters">Parameters
</h4>
3397 <dd class=
"description">IPP message
</dd>
3399 <dd class=
"description">IPP group
</dd>
3401 <dd class=
"description">Name of attribute
</dd>
3403 <dd class=
"description">Number of values
</dd>
3405 <dd class=
"description">Values
</dd>
3407 <h4 class=
"returnvalue">Return Value
</h4>
3408 <p class=
"description">New attribute
</p>
3409 <h4 class=
"discussion">Discussion
</h4>
3410 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3411 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
3413 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3414 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3415 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3416 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3417 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
3420 <h3 class=
"function"><a id=
"ippAddDate">ippAddDate
</a></h3>
3421 <p class=
"description">Add a date attribute to an IPP message.
</p>
3423 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddDate (
<br />
3424     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
3425     ipp_tag_t group,
<br />
3426     const char *name,
<br />
3427     const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *value
<br />
3429 <h4 class=
"parameters">Parameters
</h4>
3432 <dd class=
"description">IPP message
</dd>
3434 <dd class=
"description">IPP group
</dd>
3436 <dd class=
"description">Name of attribute
</dd>
3438 <dd class=
"description">Value
</dd>
3440 <h4 class=
"returnvalue">Return Value
</h4>
3441 <p class=
"description">New attribute
</p>
3442 <h4 class=
"discussion">Discussion
</h4>
3443 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3444 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
3446 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3447 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3448 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3449 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3450 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3451 <h3 class=
"function"><a id=
"ippAddInteger">ippAddInteger
</a></h3>
3452 <p class=
"description">Add a integer attribute to an IPP message.
</p>
3454 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddInteger (
<br />
3455     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
3456     ipp_tag_t group,
<br />
3457     ipp_tag_t value_tag,
<br />
3458     const char *name,
<br />
3459     int value
<br />
3461 <h4 class=
"parameters">Parameters
</h4>
3464 <dd class=
"description">IPP message
</dd>
3466 <dd class=
"description">IPP group
</dd>
3468 <dd class=
"description">Type of attribute
</dd>
3470 <dd class=
"description">Name of attribute
</dd>
3472 <dd class=
"description">Value of attribute
</dd>
3474 <h4 class=
"returnvalue">Return Value
</h4>
3475 <p class=
"description">New attribute
</p>
3476 <h4 class=
"discussion">Discussion
</h4>
3477 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3478 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
3480 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3481 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3482 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3483 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3484 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3486 Supported values include enum (
<code>IPP_TAG_ENUM
</code>) and integer
3487 (
<code>IPP_TAG_INTEGER
</code>).
</p>
3488 <h3 class=
"function"><a id=
"ippAddIntegers">ippAddIntegers
</a></h3>
3489 <p class=
"description">Add an array of integer values.
</p>
3491 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddIntegers (
<br />
3492     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
3493     ipp_tag_t group,
<br />
3494     ipp_tag_t value_tag,
<br />
3495     const char *name,
<br />
3496     int num_values,
<br />
3497     const int *values
<br />
3499 <h4 class=
"parameters">Parameters
</h4>
3502 <dd class=
"description">IPP message
</dd>
3504 <dd class=
"description">IPP group
</dd>
3506 <dd class=
"description">Type of attribute
</dd>
3508 <dd class=
"description">Name of attribute
</dd>
3510 <dd class=
"description">Number of values
</dd>
3512 <dd class=
"description">Values
</dd>
3514 <h4 class=
"returnvalue">Return Value
</h4>
3515 <p class=
"description">New attribute
</p>
3516 <h4 class=
"discussion">Discussion
</h4>
3517 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3518 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
3520 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3521 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3522 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3523 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3524 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3526 Supported values include enum (
<code>IPP_TAG_ENUM
</code>) and integer
3527 (
<code>IPP_TAG_INTEGER
</code>).
</p>
3528 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ippAddOctetString">ippAddOctetString
</a></h3>
3529 <p class=
"description">Add an octetString value to an IPP message.
</p>
3531 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddOctetString (
<br />
3532     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
3533     ipp_tag_t group,
<br />
3534     const char *name,
<br />
3535     const void *data,
<br />
3536     int datalen
<br />
3538 <h4 class=
"parameters">Parameters
</h4>
3541 <dd class=
"description">IPP message
</dd>
3543 <dd class=
"description">IPP group
</dd>
3545 <dd class=
"description">Name of attribute
</dd>
3547 <dd class=
"description">octetString data
</dd>
3549 <dd class=
"description">Length of data in bytes
</dd>
3551 <h4 class=
"returnvalue">Return Value
</h4>
3552 <p class=
"description">New attribute
</p>
3553 <h4 class=
"discussion">Discussion
</h4>
3554 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3555 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
3557 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3558 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3559 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3560 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3561 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
3564 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippAddOutOfBand">ippAddOutOfBand
</a></h3>
3565 <p class=
"description">Add an out-of-band value to an IPP message.
</p>
3567 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddOutOfBand (
<br />
3568     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
3569     ipp_tag_t group,
<br />
3570     ipp_tag_t value_tag,
<br />
3571     const char *name
<br />
3573 <h4 class=
"parameters">Parameters
</h4>
3576 <dd class=
"description">IPP message
</dd>
3578 <dd class=
"description">IPP group
</dd>
3580 <dd class=
"description">Type of attribute
</dd>
3582 <dd class=
"description">Name of attribute
</dd>
3584 <h4 class=
"returnvalue">Return Value
</h4>
3585 <p class=
"description">New attribute
</p>
3586 <h4 class=
"discussion">Discussion
</h4>
3587 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3588 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
3590 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3591 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3592 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3593 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3594 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3596 Supported out-of-band values include unsupported-value
3597 (
<code>IPP_TAG_UNSUPPORTED_VALUE
</code>), default (
<code>IPP_TAG_DEFAULT
</code>), unknown
3598 (
<code>IPP_TAG_UNKNOWN
</code>), no-value (
<code>IPP_TAG_NOVALUE
</code>), not-settable
3599 (
<code>IPP_TAG_NOTSETTABLE
</code>), delete-attribute (
<code>IPP_TAG_DELETEATTR
</code>), and
3600 admin-define (
<code>IPP_TAG_ADMINDEFINE
</code>).
3603 <h3 class=
"function"><a id=
"ippAddRange">ippAddRange
</a></h3>
3604 <p class=
"description">Add a range of values to an IPP message.
</p>
3606 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRange (
<br />
3607     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
3608     ipp_tag_t group,
<br />
3609     const char *name,
<br />
3610     int lower,
<br />
3611     int upper
<br />
3613 <h4 class=
"parameters">Parameters
</h4>
3616 <dd class=
"description">IPP message
</dd>
3618 <dd class=
"description">IPP group
</dd>
3620 <dd class=
"description">Name of attribute
</dd>
3622 <dd class=
"description">Lower value
</dd>
3624 <dd class=
"description">Upper value
</dd>
3626 <h4 class=
"returnvalue">Return Value
</h4>
3627 <p class=
"description">New attribute
</p>
3628 <h4 class=
"discussion">Discussion
</h4>
3629 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3630 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
3632 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3633 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3634 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3635 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3636 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3638 The
<code>lower
</code> parameter must be less than or equal to the
<code>upper
</code> parameter.
</p>
3639 <h3 class=
"function"><a id=
"ippAddRanges">ippAddRanges
</a></h3>
3640 <p class=
"description">Add ranges of values to an IPP message.
</p>
3642 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRanges (
<br />
3643     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
3644     ipp_tag_t group,
<br />
3645     const char *name,
<br />
3646     int num_values,
<br />
3647     const int *lower,
<br />
3648     const int *upper
<br />
3650 <h4 class=
"parameters">Parameters
</h4>
3653 <dd class=
"description">IPP message
</dd>
3655 <dd class=
"description">IPP group
</dd>
3657 <dd class=
"description">Name of attribute
</dd>
3659 <dd class=
"description">Number of values
</dd>
3661 <dd class=
"description">Lower values
</dd>
3663 <dd class=
"description">Upper values
</dd>
3665 <h4 class=
"returnvalue">Return Value
</h4>
3666 <p class=
"description">New attribute
</p>
3667 <h4 class=
"discussion">Discussion
</h4>
3668 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3669 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
3671 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3672 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3673 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3674 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3675 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3676 <h3 class=
"function"><a id=
"ippAddResolution">ippAddResolution
</a></h3>
3677 <p class=
"description">Add a resolution value to an IPP message.
</p>
3679 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolution (
<br />
3680     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
3681     ipp_tag_t group,
<br />
3682     const char *name,
<br />
3683     <a href=
"#ipp_res_t">ipp_res_t
</a> units,
<br />
3684     int xres,
<br />
3685     int yres
<br />
3687 <h4 class=
"parameters">Parameters
</h4>
3690 <dd class=
"description">IPP message
</dd>
3692 <dd class=
"description">IPP group
</dd>
3694 <dd class=
"description">Name of attribute
</dd>
3696 <dd class=
"description">Units for resolution
</dd>
3698 <dd class=
"description">X resolution
</dd>
3700 <dd class=
"description">Y resolution
</dd>
3702 <h4 class=
"returnvalue">Return Value
</h4>
3703 <p class=
"description">New attribute
</p>
3704 <h4 class=
"discussion">Discussion
</h4>
3705 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3706 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
3708 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3709 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3710 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3711 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3712 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3713 <h3 class=
"function"><a id=
"ippAddResolutions">ippAddResolutions
</a></h3>
3714 <p class=
"description">Add resolution values to an IPP message.
</p>
3716 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolutions (
<br />
3717     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
3718     ipp_tag_t group,
<br />
3719     const char *name,
<br />
3720     int num_values,
<br />
3721     <a href=
"#ipp_res_t">ipp_res_t
</a> units,
<br />
3722     const int *xres,
<br />
3723     const int *yres
<br />
3725 <h4 class=
"parameters">Parameters
</h4>
3728 <dd class=
"description">IPP message
</dd>
3730 <dd class=
"description">IPP group
</dd>
3732 <dd class=
"description">Name of attribute
</dd>
3734 <dd class=
"description">Number of values
</dd>
3736 <dd class=
"description">Units for resolution
</dd>
3738 <dd class=
"description">X resolutions
</dd>
3740 <dd class=
"description">Y resolutions
</dd>
3742 <h4 class=
"returnvalue">Return Value
</h4>
3743 <p class=
"description">New attribute
</p>
3744 <h4 class=
"discussion">Discussion
</h4>
3745 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3746 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
3748 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3749 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3750 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3751 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3752 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3753 <h3 class=
"function"><a id=
"ippAddSeparator">ippAddSeparator
</a></h3>
3754 <p class=
"description">Add a group separator to an IPP message.
</p>
3756 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddSeparator (
<br />
3757     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br />
3759 <h4 class=
"parameters">Parameters
</h4>
3762 <dd class=
"description">IPP message
</dd>
3764 <h4 class=
"returnvalue">Return Value
</h4>
3765 <p class=
"description">New attribute
</p>
3766 <h4 class=
"discussion">Discussion
</h4>
3767 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3768 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
</p>
3769 <h3 class=
"function"><a id=
"ippAddString">ippAddString
</a></h3>
3770 <p class=
"description">Add a language-encoded string to an IPP message.
</p>
3772 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddString (
<br />
3773     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
3774     ipp_tag_t group,
<br />
3775     ipp_tag_t value_tag,
<br />
3776     const char *name,
<br />
3777     const char *language,
<br />
3778     const char *value
<br />
3780 <h4 class=
"parameters">Parameters
</h4>
3783 <dd class=
"description">IPP message
</dd>
3785 <dd class=
"description">IPP group
</dd>
3787 <dd class=
"description">Type of attribute
</dd>
3789 <dd class=
"description">Name of attribute
</dd>
3791 <dd class=
"description">Language code
</dd>
3793 <dd class=
"description">Value
</dd>
3795 <h4 class=
"returnvalue">Return Value
</h4>
3796 <p class=
"description">New attribute
</p>
3797 <h4 class=
"discussion">Discussion
</h4>
3798 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3799 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
3801 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3802 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3803 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3804 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3805 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3807 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
3808 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
3809 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
3810 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
3811 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
3812 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
3814 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage and
3815 textWithLanguage string values and must be
<code>NULL
</code> for all other string values.
</p>
3816 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippAddStringf">ippAddStringf
</a></h3>
3817 <p class=
"description">Add a formatted string to an IPP message.
</p>
3819 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddStringf (
<br />
3820     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
3821     ipp_tag_t group,
<br />
3822     ipp_tag_t value_tag,
<br />
3823     const char *name,
<br />
3824     const char *language,
<br />
3825     const char *format,
<br />
3826     ...
<br />
3828 <h4 class=
"parameters">Parameters
</h4>
3831 <dd class=
"description">IPP message
</dd>
3833 <dd class=
"description">IPP group
</dd>
3835 <dd class=
"description">Type of attribute
</dd>
3837 <dd class=
"description">Name of attribute
</dd>
3839 <dd class=
"description">Language code (
<code>NULL
</code> for default)
</dd>
3841 <dd class=
"description">Printf-style format string
</dd>
3843 <dd class=
"description">Additional arguments as needed
</dd>
3845 <h4 class=
"returnvalue">Return Value
</h4>
3846 <p class=
"description">New attribute
</p>
3847 <h4 class=
"discussion">Discussion
</h4>
3848 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3849 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
3851 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3852 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document
3853 (
<code>IPP_TAG_DOCUMENT
</code>), event notification
3854 (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation (
<code>IPP_TAG_OPERATION
</code>),
3855 printer (
<code>IPP_TAG_PRINTER
</code>), subscription (
<code>IPP_TAG_SUBSCRIPTION
</code>),
3856 or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3858 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
3859 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
3860 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
3861 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
3862 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
3863 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
3865 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage
3866 and textWithLanguage string values and must be
<code>NULL
</code> for all other
3869 The
<code>format
</code> parameter uses formatting characters compatible with the
3870 printf family of standard functions. Additional arguments follow it as
3871 needed. The formatted string is truncated as needed to the maximum length of
3872 the corresponding value type.
3875 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippAddStringfv">ippAddStringfv
</a></h3>
3876 <p class=
"description">Add a formatted string to an IPP message.
</p>
3878 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddStringfv (
<br />
3879     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
3880     ipp_tag_t group,
<br />
3881     ipp_tag_t value_tag,
<br />
3882     const char *name,
<br />
3883     const char *language,
<br />
3884     const char *format,
<br />
3885     va_list ap
<br />
3887 <h4 class=
"parameters">Parameters
</h4>
3890 <dd class=
"description">IPP message
</dd>
3892 <dd class=
"description">IPP group
</dd>
3894 <dd class=
"description">Type of attribute
</dd>
3896 <dd class=
"description">Name of attribute
</dd>
3898 <dd class=
"description">Language code (
<code>NULL
</code> for default)
</dd>
3900 <dd class=
"description">Printf-style format string
</dd>
3902 <dd class=
"description">Additional arguments
</dd>
3904 <h4 class=
"returnvalue">Return Value
</h4>
3905 <p class=
"description">New attribute
</p>
3906 <h4 class=
"discussion">Discussion
</h4>
3907 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3908 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
3910 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3911 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document
3912 (
<code>IPP_TAG_DOCUMENT
</code>), event notification
3913 (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation (
<code>IPP_TAG_OPERATION
</code>),
3914 printer (
<code>IPP_TAG_PRINTER
</code>), subscription (
<code>IPP_TAG_SUBSCRIPTION
</code>),
3915 or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3917 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
3918 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
3919 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
3920 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
3921 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
3922 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
3924 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage
3925 and textWithLanguage string values and must be
<code>NULL
</code> for all other
3928 The
<code>format
</code> parameter uses formatting characters compatible with the
3929 printf family of standard functions. Additional arguments are passed in the
3930 stdarg pointer
<code>ap
</code>. The formatted string is truncated as needed to the
3931 maximum length of the corresponding value type.
3934 <h3 class=
"function"><a id=
"ippAddStrings">ippAddStrings
</a></h3>
3935 <p class=
"description">Add language-encoded strings to an IPP message.
</p>
3937 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddStrings (
<br />
3938     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
3939     ipp_tag_t group,
<br />
3940     ipp_tag_t value_tag,
<br />
3941     const char *name,
<br />
3942     int num_values,
<br />
3943     const char *language,
<br />
3944     const char *const *values
<br />
3946 <h4 class=
"parameters">Parameters
</h4>
3949 <dd class=
"description">IPP message
</dd>
3951 <dd class=
"description">IPP group
</dd>
3953 <dd class=
"description">Type of attribute
</dd>
3955 <dd class=
"description">Name of attribute
</dd>
3957 <dd class=
"description">Number of values
</dd>
3959 <dd class=
"description">Language code (
<code>NULL
</code> for default)
</dd>
3961 <dd class=
"description">Values
</dd>
3963 <h4 class=
"returnvalue">Return Value
</h4>
3964 <p class=
"description">New attribute
</p>
3965 <h4 class=
"discussion">Discussion
</h4>
3966 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3967 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
3969 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3970 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3971 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3972 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3973 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3975 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
3976 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
3977 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
3978 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
3979 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
3980 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
3982 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage and
3983 textWithLanguage string values and must be
<code>NULL
</code> for all other string values.
</p>
3984 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippAttributeString">ippAttributeString
</a></h3>
3985 <p class=
"description">Convert the attribute's value to a string.
</p>
3987 size_t ippAttributeString (
<br />
3988     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br />
3989     char *buffer,
<br />
3990     size_t bufsize
<br />
3992 <h4 class=
"parameters">Parameters
</h4>
3995 <dd class=
"description">Attribute
</dd>
3997 <dd class=
"description">String buffer or NULL
</dd>
3999 <dd class=
"description">Size of string buffer
</dd>
4001 <h4 class=
"returnvalue">Return Value
</h4>
4002 <p class=
"description">Number of bytes less nul
</p>
4003 <h4 class=
"discussion">Discussion
</h4>
4004 <p class=
"discussion">Returns the number of bytes that would be written, not including the
4005 trailing nul. The buffer pointer can be NULL to get the required length,
4006 just like (v)snprintf.
4009 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippContainsInteger">ippContainsInteger
</a></h3>
4010 <p class=
"description">Determine whether an attribute contains the
4011 specified value or is within the list of ranges.
</p>
4013 int ippContainsInteger (
<br />
4014     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br />
4015     int value
<br />
4017 <h4 class=
"parameters">Parameters
</h4>
4020 <dd class=
"description">Attribute
</dd>
4022 <dd class=
"description">Integer/enum value
</dd>
4024 <h4 class=
"returnvalue">Return Value
</h4>
4025 <p class=
"description">1 on a match,
0 on no match
</p>
4026 <h4 class=
"discussion">Discussion
</h4>
4027 <p class=
"discussion">Returns non-zero when the attribute contains either a matching integer or
4028 enum value, or the value falls within one of the rangeOfInteger values for
4032 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippContainsString">ippContainsString
</a></h3>
4033 <p class=
"description">Determine whether an attribute contains the
4034 specified string value.
</p>
4036 int ippContainsString (
<br />
4037     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br />
4038     const char *value
<br />
4040 <h4 class=
"parameters">Parameters
</h4>
4043 <dd class=
"description">Attribute
</dd>
4045 <dd class=
"description">String value
</dd>
4047 <h4 class=
"returnvalue">Return Value
</h4>
4048 <p class=
"description">1 on a match,
0 on no match
</p>
4049 <h4 class=
"discussion">Discussion
</h4>
4050 <p class=
"discussion">Returns non-zero when the attribute contains a matching charset, keyword,
4051 language, mimeMediaType, name, text, URI, or URI scheme value.
4054 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippCopyAttribute">ippCopyAttribute
</a></h3>
4055 <p class=
"description">Copy an attribute.
</p>
4057 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippCopyAttribute (
<br />
4058     <a href=
"#ipp_t">ipp_t
</a> *dst,
<br />
4059     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *srcattr,
<br />
4060     int quickcopy
<br />
4062 <h4 class=
"parameters">Parameters
</h4>
4065 <dd class=
"description">Destination IPP message
</dd>
4067 <dd class=
"description">Attribute to copy
</dd>
4069 <dd class=
"description">1 for a referenced copy,
0 for normal
</dd>
4071 <h4 class=
"returnvalue">Return Value
</h4>
4072 <p class=
"description">New attribute
</p>
4073 <h4 class=
"discussion">Discussion
</h4>
4074 <p class=
"discussion">The specified attribute,
<code>attr
</code>, is copied to the destination IPP message.
4075 When
<code>quickcopy
</code> is non-zero, a
"shallow
" reference copy of the attribute is
4076 created - this should only be done as long as the original source IPP message will
4077 not be freed for the life of the destination.
4080 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippCopyAttributes">ippCopyAttributes
</a></h3>
4081 <p class=
"description">Copy attributes from one IPP message to another.
</p>
4083 int ippCopyAttributes (
<br />
4084     <a href=
"#ipp_t">ipp_t
</a> *dst,
<br />
4085     <a href=
"#ipp_t">ipp_t
</a> *src,
<br />
4086     int quickcopy,
<br />
4087     <a href=
"#ipp_copycb_t">ipp_copycb_t
</a> cb,
<br />
4088     void *context
<br />
4090 <h4 class=
"parameters">Parameters
</h4>
4093 <dd class=
"description">Destination IPP message
</dd>
4095 <dd class=
"description">Source IPP message
</dd>
4097 <dd class=
"description">1 for a referenced copy,
0 for normal
</dd>
4099 <dd class=
"description">Copy callback or
<code>NULL
</code> for none
</dd>
4101 <dd class=
"description">Context pointer
</dd>
4103 <h4 class=
"returnvalue">Return Value
</h4>
4104 <p class=
"description">1 on success,
0 on error
</p>
4105 <h4 class=
"discussion">Discussion
</h4>
4106 <p class=
"discussion">Zero or more attributes are copied from the source IPP message,
<code>src
</code>, to the
4107 destination IPP message,
<code>dst
</code>. When
<code>quickcopy
</code> is non-zero, a
"shallow
"
4108 reference copy of the attribute is created - this should only be done as long as the
4109 original source IPP message will not be freed for the life of the destination.
<br>
4111 The
<code>cb
</code> and
<code>context
</code> parameters provide a generic way to
"filter
" the
4112 attributes that are copied - the function must return
1 to copy the attribute or
4113 0 to skip it. The function may also choose to do a partial copy of the source attribute
4117 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippCreateRequestedArray">ippCreateRequestedArray
</a></h3>
4118 <p class=
"description">Create a CUPS array of attribute names from the
4119 given requested-attributes attribute.
</p>
4121 cups_array_t *ippCreateRequestedArray (
<br />
4122     <a href=
"#ipp_t">ipp_t
</a> *request
<br />
4124 <h4 class=
"parameters">Parameters
</h4>
4127 <dd class=
"description">IPP request
</dd>
4129 <h4 class=
"returnvalue">Return Value
</h4>
4130 <p class=
"description">CUPS array or
<code>NULL
</code> if all
</p>
4131 <h4 class=
"discussion">Discussion
</h4>
4132 <p class=
"discussion">This function creates a (sorted) CUPS array of attribute names matching the
4133 list of
"requested-attribute
" values supplied in an IPP request. All IANA-
4134 registered values are supported in addition to the CUPS IPP extension
4137 The
<code>request
</code> parameter specifies the request message that was read from
4140 <code>NULL
</code> is returned if all attributes should be returned. Otherwise, the
4141 result is a sorted array of attribute names, where
<code>cupsArrayFind(array,
4142 "attribute-name")
</code> will return a non-NULL pointer. The array must be freed
4143 using the
<code>cupsArrayDelete
</code> function.
4146 <h3 class=
"function"><a id=
"ippDateToTime">ippDateToTime
</a></h3>
4147 <p class=
"description">Convert from RFC
1903 Date/Time format to UNIX time
4150 time_t ippDateToTime (
<br />
4151     const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *date
<br />
4153 <h4 class=
"parameters">Parameters
</h4>
4156 <dd class=
"description">RFC
1903 date info
</dd>
4158 <h4 class=
"returnvalue">Return Value
</h4>
4159 <p class=
"description">UNIX time value
</p>
4160 <h3 class=
"function"><a id=
"ippDelete">ippDelete
</a></h3>
4161 <p class=
"description">Delete an IPP message.
</p>
4163 void ippDelete (
<br />
4164     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br />
4166 <h4 class=
"parameters">Parameters
</h4>
4169 <dd class=
"description">IPP message
</dd>
4171 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"ippDeleteAttribute">ippDeleteAttribute
</a></h3>
4172 <p class=
"description">Delete a single attribute in an IPP message.
</p>
4174 void ippDeleteAttribute (
<br />
4175     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
4176     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br />
4178 <h4 class=
"parameters">Parameters
</h4>
4181 <dd class=
"description">IPP message
</dd>
4183 <dd class=
"description">Attribute to delete
</dd>
4185 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippDeleteValues">ippDeleteValues
</a></h3>
4186 <p class=
"description">Delete values in an attribute.
</p>
4188 int ippDeleteValues (
<br />
4189     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
4190     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br />
4191     int element,
<br />
4192     int count
<br />
4194 <h4 class=
"parameters">Parameters
</h4>
4197 <dd class=
"description">IPP message
</dd>
4199 <dd class=
"description">Attribute
</dd>
4201 <dd class=
"description">Index of first value to delete (
0-based)
</dd>
4203 <dd class=
"description">Number of values to delete
</dd>
4205 <h4 class=
"returnvalue">Return Value
</h4>
4206 <p class=
"description">1 on success,
0 on failure
</p>
4207 <h4 class=
"discussion">Discussion
</h4>
4208 <p class=
"discussion">The
<code>element
</code> parameter specifies the first value to delete, starting at
4209 0. It must be less than the number of values returned by
<a href=
"#ippGetCount"><code>ippGetCount
</code></a>.
<br>
4211 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4213 Deleting all values in an attribute deletes the attribute.
4216 <h3 class=
"function"><a id=
"ippEnumString">ippEnumString
</a></h3>
4217 <p class=
"description">Return a string corresponding to the enum value.
</p>
4219 const char *ippEnumString (
<br />
4220     const char *attrname,
<br />
4221     int enumvalue
<br />
4223 <h4 class=
"parameters">Parameters
</h4>
4226 <dd class=
"description">Attribute name
</dd>
4228 <dd class=
"description">Enum value
</dd>
4230 <h4 class=
"returnvalue">Return Value
</h4>
4231 <p class=
"description">Enum string
</p>
4232 <h3 class=
"function"><a id=
"ippEnumValue">ippEnumValue
</a></h3>
4233 <p class=
"description">Return the value associated with a given enum string.
</p>
4235 int ippEnumValue (
<br />
4236     const char *attrname,
<br />
4237     const char *enumstring
<br />
4239 <h4 class=
"parameters">Parameters
</h4>
4242 <dd class=
"description">Attribute name
</dd>
4244 <dd class=
"description">Enum string
</dd>
4246 <h4 class=
"returnvalue">Return Value
</h4>
4247 <p class=
"description">Enum value or -
1 if unknown
</p>
4248 <h3 class=
"function"><a id=
"ippErrorString">ippErrorString
</a></h3>
4249 <p class=
"description">Return a name for the given status code.
</p>
4251 const char *ippErrorString (
<br />
4252     ipp_status_t error
<br />
4254 <h4 class=
"parameters">Parameters
</h4>
4257 <dd class=
"description">Error status
</dd>
4259 <h4 class=
"returnvalue">Return Value
</h4>
4260 <p class=
"description">Text string
</p>
4261 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ippErrorValue">ippErrorValue
</a></h3>
4262 <p class=
"description">Return a status code for the given name.
</p>
4264 ipp_status_t ippErrorValue (
<br />
4265     const char *name
<br />
4267 <h4 class=
"parameters">Parameters
</h4>
4270 <dd class=
"description">Name
</dd>
4272 <h4 class=
"returnvalue">Return Value
</h4>
4273 <p class=
"description">IPP status code
</p>
4274 <h3 class=
"function"><a id=
"ippFindAttribute">ippFindAttribute
</a></h3>
4275 <p class=
"description">Find a named attribute in a request.
</p>
4277 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindAttribute (
<br />
4278     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
4279     const char *name,
<br />
4280     ipp_tag_t type
<br />
4282 <h4 class=
"parameters">Parameters
</h4>
4285 <dd class=
"description">IPP message
</dd>
4287 <dd class=
"description">Name of attribute
</dd>
4289 <dd class=
"description">Type of attribute
</dd>
4291 <h4 class=
"returnvalue">Return Value
</h4>
4292 <p class=
"description">Matching attribute
</p>
4293 <h4 class=
"discussion">Discussion
</h4>
4294 <p class=
"discussion">Starting with CUPS
2.0, the attribute name can contain a hierarchical list
4295 of attribute and member names separated by slashes, for example
4296 "media-col/media-size
".
</p>
4297 <h3 class=
"function"><a id=
"ippFindNextAttribute">ippFindNextAttribute
</a></h3>
4298 <p class=
"description">Find the next named attribute in a request.
</p>
4300 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindNextAttribute (
<br />
4301     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
4302     const char *name,
<br />
4303     ipp_tag_t type
<br />
4305 <h4 class=
"parameters">Parameters
</h4>
4308 <dd class=
"description">IPP message
</dd>
4310 <dd class=
"description">Name of attribute
</dd>
4312 <dd class=
"description">Type of attribute
</dd>
4314 <h4 class=
"returnvalue">Return Value
</h4>
4315 <p class=
"description">Matching attribute
</p>
4316 <h4 class=
"discussion">Discussion
</h4>
4317 <p class=
"discussion">Starting with CUPS
2.0, the attribute name can contain a hierarchical list
4318 of attribute and member names separated by slashes, for example
4319 "media-col/media-size
".
</p>
4320 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippFirstAttribute">ippFirstAttribute
</a></h3>
4321 <p class=
"description">Return the first attribute in the message.
</p>
4323 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFirstAttribute (
<br />
4324     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br />
4326 <h4 class=
"parameters">Parameters
</h4>
4329 <dd class=
"description">IPP message
</dd>
4331 <h4 class=
"returnvalue">Return Value
</h4>
4332 <p class=
"description">First attribute or
<code>NULL
</code> if none
</p>
4333 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetBoolean">ippGetBoolean
</a></h3>
4334 <p class=
"description">Get a boolean value for an attribute.
</p>
4336 int ippGetBoolean (
<br />
4337     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br />
4338     int element
<br />
4340 <h4 class=
"parameters">Parameters
</h4>
4343 <dd class=
"description">IPP attribute
</dd>
4345 <dd class=
"description">Value number (
0-based)
</dd>
4347 <h4 class=
"returnvalue">Return Value
</h4>
4348 <p class=
"description">Boolean value or
0 on error
</p>
4349 <h4 class=
"discussion">Discussion
</h4>
4350 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4351 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4354 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetCollection">ippGetCollection
</a></h3>
4355 <p class=
"description">Get a collection value for an attribute.
</p>
4357 <a href=
"#ipp_t">ipp_t
</a> *ippGetCollection (
<br />
4358     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br />
4359     int element
<br />
4361 <h4 class=
"parameters">Parameters
</h4>
4364 <dd class=
"description">IPP attribute
</dd>
4366 <dd class=
"description">Value number (
0-based)
</dd>
4368 <h4 class=
"returnvalue">Return Value
</h4>
4369 <p class=
"description">Collection value or
<code>NULL
</code> on error
</p>
4370 <h4 class=
"discussion">Discussion
</h4>
4371 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4372 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4375 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetCount">ippGetCount
</a></h3>
4376 <p class=
"description">Get the number of values in an attribute.
</p>
4378 int ippGetCount (
<br />
4379     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br />
4381 <h4 class=
"parameters">Parameters
</h4>
4384 <dd class=
"description">IPP attribute
</dd>
4386 <h4 class=
"returnvalue">Return Value
</h4>
4387 <p class=
"description">Number of values or
0 on error
</p>
4388 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetDate">ippGetDate
</a></h3>
4389 <p class=
"description">Get a date value for an attribute.
</p>
4391 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *ippGetDate (
<br />
4392     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br />
4393     int element
<br />
4395 <h4 class=
"parameters">Parameters
</h4>
4398 <dd class=
"description">IPP attribute
</dd>
4400 <dd class=
"description">Value number (
0-based)
</dd>
4402 <h4 class=
"returnvalue">Return Value
</h4>
4403 <p class=
"description">Date value or
<code>NULL
</code></p>
4404 <h4 class=
"discussion">Discussion
</h4>
4405 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4406 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4409 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetGroupTag">ippGetGroupTag
</a></h3>
4410 <p class=
"description">Get the group associated with an attribute.
</p>
4412 ipp_tag_t ippGetGroupTag (
<br />
4413     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br />
4415 <h4 class=
"parameters">Parameters
</h4>
4418 <dd class=
"description">IPP attribute
</dd>
4420 <h4 class=
"returnvalue">Return Value
</h4>
4421 <p class=
"description">Group tag or
<code>IPP_TAG_ZERO
</code> on error
</p>
4422 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetInteger">ippGetInteger
</a></h3>
4423 <p class=
"description">Get the integer/enum value for an attribute.
</p>
4425 int ippGetInteger (
<br />
4426     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br />
4427     int element
<br />
4429 <h4 class=
"parameters">Parameters
</h4>
4432 <dd class=
"description">IPP attribute
</dd>
4434 <dd class=
"description">Value number (
0-based)
</dd>
4436 <h4 class=
"returnvalue">Return Value
</h4>
4437 <p class=
"description">Value or
0 on error
</p>
4438 <h4 class=
"discussion">Discussion
</h4>
4439 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4440 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4443 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetName">ippGetName
</a></h3>
4444 <p class=
"description">Get the attribute name.
</p>
4446 const char *ippGetName (
<br />
4447     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br />
4449 <h4 class=
"parameters">Parameters
</h4>
4452 <dd class=
"description">IPP attribute
</dd>
4454 <h4 class=
"returnvalue">Return Value
</h4>
4455 <p class=
"description">Attribute name or
<code>NULL
</code> for separators
</p>
4456 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippGetOctetString">ippGetOctetString
</a></h3>
4457 <p class=
"description">Get an octetString value from an IPP attribute.
</p>
4459 void *ippGetOctetString (
<br />
4460     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br />
4461     int element,
<br />
4462     int *datalen
<br />
4464 <h4 class=
"parameters">Parameters
</h4>
4467 <dd class=
"description">IPP attribute
</dd>
4469 <dd class=
"description">Value number (
0-based)
</dd>
4471 <dd class=
"description">Length of octetString data
</dd>
4473 <h4 class=
"returnvalue">Return Value
</h4>
4474 <p class=
"description">Pointer to octetString data
</p>
4475 <h4 class=
"discussion">Discussion
</h4>
4476 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4477 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4480 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetOperation">ippGetOperation
</a></h3>
4481 <p class=
"description">Get the operation ID in an IPP message.
</p>
4483 ipp_op_t ippGetOperation (
<br />
4484     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br />
4486 <h4 class=
"parameters">Parameters
</h4>
4489 <dd class=
"description">IPP request message
</dd>
4491 <h4 class=
"returnvalue">Return Value
</h4>
4492 <p class=
"description">Operation ID or
0 on error
</p>
4493 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetRange">ippGetRange
</a></h3>
4494 <p class=
"description">Get a rangeOfInteger value from an attribute.
</p>
4496 int ippGetRange (
<br />
4497     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br />
4498     int element,
<br />
4499     int *uppervalue
<br />
4501 <h4 class=
"parameters">Parameters
</h4>
4504 <dd class=
"description">IPP attribute
</dd>
4506 <dd class=
"description">Value number (
0-based)
</dd>
4508 <dd class=
"description">Upper value of range
</dd>
4510 <h4 class=
"returnvalue">Return Value
</h4>
4511 <p class=
"description">Lower value of range or
0</p>
4512 <h4 class=
"discussion">Discussion
</h4>
4513 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4514 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4517 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetRequestId">ippGetRequestId
</a></h3>
4518 <p class=
"description">Get the request ID from an IPP message.
</p>
4520 int ippGetRequestId (
<br />
4521     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br />
4523 <h4 class=
"parameters">Parameters
</h4>
4526 <dd class=
"description">IPP message
</dd>
4528 <h4 class=
"returnvalue">Return Value
</h4>
4529 <p class=
"description">Request ID or
0 on error
</p>
4530 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetResolution">ippGetResolution
</a></h3>
4531 <p class=
"description">Get a resolution value for an attribute.
</p>
4533 int ippGetResolution (
<br />
4534     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br />
4535     int element,
<br />
4536     int *yres,
<br />
4537     <a href=
"#ipp_res_t">ipp_res_t
</a> *units
<br />
4539 <h4 class=
"parameters">Parameters
</h4>
4542 <dd class=
"description">IPP attribute
</dd>
4544 <dd class=
"description">Value number (
0-based)
</dd>
4546 <dd class=
"description">Vertical/feed resolution
</dd>
4548 <dd class=
"description">Units for resolution
</dd>
4550 <h4 class=
"returnvalue">Return Value
</h4>
4551 <p class=
"description">Horizontal/cross feed resolution or
0</p>
4552 <h4 class=
"discussion">Discussion
</h4>
4553 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4554 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4557 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetState">ippGetState
</a></h3>
4558 <p class=
"description">Get the IPP message state.
</p>
4560 <a href=
"#ipp_state_t">ipp_state_t
</a> ippGetState (
<br />
4561     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br />
4563 <h4 class=
"parameters">Parameters
</h4>
4566 <dd class=
"description">IPP message
</dd>
4568 <h4 class=
"returnvalue">Return Value
</h4>
4569 <p class=
"description">IPP message state value
</p>
4570 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetStatusCode">ippGetStatusCode
</a></h3>
4571 <p class=
"description">Get the status code from an IPP response or event message.
</p>
4573 ipp_status_t ippGetStatusCode (
<br />
4574     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br />
4576 <h4 class=
"parameters">Parameters
</h4>
4579 <dd class=
"description">IPP response or event message
</dd>
4581 <h4 class=
"returnvalue">Return Value
</h4>
4582 <p class=
"description">Status code in IPP message
</p>
4583 <h3 class=
"function"><a id=
"ippGetString">ippGetString
</a></h3>
4584 <p class=
"description">Return the value...
</p>
4586 const char *ippGetString (
<br />
4587     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br />
4588     int element,
<br />
4589     const char **language
<br />
4591 <h4 class=
"parameters">Parameters
</h4>
4594 <dd class=
"description">IPP attribute
</dd>
4596 <dd class=
"description">Value number (
0-based)
</dd>
4598 <dd class=
"description">Language code (
<code>NULL
</code> for don't care)
</dd>
4600 <h4 class=
"returnvalue">Return Value
</h4>
4601 <p class=
"description">Get the string and optionally the language code for an attribute.
</p>
4602 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4603 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4606 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetValueTag">ippGetValueTag
</a></h3>
4607 <p class=
"description">Get the value tag for an attribute.
</p>
4609 ipp_tag_t ippGetValueTag (
<br />
4610     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br />
4612 <h4 class=
"parameters">Parameters
</h4>
4615 <dd class=
"description">IPP attribute
</dd>
4617 <h4 class=
"returnvalue">Return Value
</h4>
4618 <p class=
"description">Value tag or
<code>IPP_TAG_ZERO
</code> on error
</p>
4619 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippGetVersion">ippGetVersion
</a></h3>
4620 <p class=
"description">Get the major and minor version number from an IPP message.
</p>
4622 int ippGetVersion (
<br />
4623     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
4624     int *minor
<br />
4626 <h4 class=
"parameters">Parameters
</h4>
4629 <dd class=
"description">IPP message
</dd>
4631 <dd class=
"description">Minor version number or
<code>NULL
</code></dd>
4633 <h4 class=
"returnvalue">Return Value
</h4>
4634 <p class=
"description">Major version number or
0 on error
</p>
4635 <h3 class=
"function"><a id=
"ippLength">ippLength
</a></h3>
4636 <p class=
"description">Compute the length of an IPP message.
</p>
4638 size_t ippLength (
<br />
4639     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br />
4641 <h4 class=
"parameters">Parameters
</h4>
4644 <dd class=
"description">IPP message
</dd>
4646 <h4 class=
"returnvalue">Return Value
</h4>
4647 <p class=
"description">Size of IPP message
</p>
4648 <h3 class=
"function"><a id=
"ippNew">ippNew
</a></h3>
4649 <p class=
"description">Allocate a new IPP message.
</p>
4651 <a href=
"#ipp_t">ipp_t
</a> *ippNew (void);
</p>
4652 <h4 class=
"returnvalue">Return Value
</h4>
4653 <p class=
"description">New IPP message
</p>
4654 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ippNewRequest">ippNewRequest
</a></h3>
4655 <p class=
"description">Allocate a new IPP request message.
</p>
4657 <a href=
"#ipp_t">ipp_t
</a> *ippNewRequest (
<br />
4658     ipp_op_t op
<br />
4660 <h4 class=
"parameters">Parameters
</h4>
4663 <dd class=
"description">Operation code
</dd>
4665 <h4 class=
"returnvalue">Return Value
</h4>
4666 <p class=
"description">IPP request message
</p>
4667 <h4 class=
"discussion">Discussion
</h4>
4668 <p class=
"discussion">The new request message is initialized with the attributes-charset and
4669 attributes-natural-language attributes added. The
4670 attributes-natural-language value is derived from the current locale.
4673 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippNewResponse">ippNewResponse
</a></h3>
4674 <p class=
"description">Allocate a new IPP response message.
</p>
4676 <a href=
"#ipp_t">ipp_t
</a> *ippNewResponse (
<br />
4677     <a href=
"#ipp_t">ipp_t
</a> *request
<br />
4679 <h4 class=
"parameters">Parameters
</h4>
4682 <dd class=
"description">IPP request message
</dd>
4684 <h4 class=
"returnvalue">Return Value
</h4>
4685 <p class=
"description">IPP response message
</p>
4686 <h4 class=
"discussion">Discussion
</h4>
4687 <p class=
"discussion">The new response message is initialized with the same version-number,
4688 request-id, attributes-charset, and attributes-natural-language as the
4689 provided request message. If the attributes-charset or
4690 attributes-natural-language attributes are missing from the request,
4691 "utf-
8" and a value derived from the current locale are substituted,
4695 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippNextAttribute">ippNextAttribute
</a></h3>
4696 <p class=
"description">Return the next attribute in the message.
</p>
4698 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippNextAttribute (
<br />
4699     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br />
4701 <h4 class=
"parameters">Parameters
</h4>
4704 <dd class=
"description">IPP message
</dd>
4706 <h4 class=
"returnvalue">Return Value
</h4>
4707 <p class=
"description">Next attribute or
<code>NULL
</code> if none
</p>
4708 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ippOpString">ippOpString
</a></h3>
4709 <p class=
"description">Return a name for the given operation id.
</p>
4711 const char *ippOpString (
<br />
4712     ipp_op_t op
<br />
4714 <h4 class=
"parameters">Parameters
</h4>
4717 <dd class=
"description">Operation ID
</dd>
4719 <h4 class=
"returnvalue">Return Value
</h4>
4720 <p class=
"description">Name
</p>
4721 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ippOpValue">ippOpValue
</a></h3>
4722 <p class=
"description">Return an operation id for the given name.
</p>
4724 ipp_op_t ippOpValue (
<br />
4725     const char *name
<br />
4727 <h4 class=
"parameters">Parameters
</h4>
4730 <dd class=
"description">Textual name
</dd>
4732 <h4 class=
"returnvalue">Return Value
</h4>
4733 <p class=
"description">Operation ID
</p>
4734 <h3 class=
"function"><a id=
"ippPort">ippPort
</a></h3>
4735 <p class=
"description">Return the default IPP port number.
</p>
4737 int ippPort (void);
</p>
4738 <h4 class=
"returnvalue">Return Value
</h4>
4739 <p class=
"description">Port number
</p>
4740 <h3 class=
"function"><a id=
"ippRead">ippRead
</a></h3>
4741 <p class=
"description">Read data for an IPP message from a HTTP connection.
</p>
4743 <a href=
"#ipp_state_t">ipp_state_t
</a> ippRead (
<br />
4744     <a href=
"#http_t">http_t
</a> *http,
<br />
4745     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br />
4747 <h4 class=
"parameters">Parameters
</h4>
4750 <dd class=
"description">HTTP connection
</dd>
4752 <dd class=
"description">IPP data
</dd>
4754 <h4 class=
"returnvalue">Return Value
</h4>
4755 <p class=
"description">Current state
</p>
4756 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"ippReadFile">ippReadFile
</a></h3>
4757 <p class=
"description">Read data for an IPP message from a file.
</p>
4759 <a href=
"#ipp_state_t">ipp_state_t
</a> ippReadFile (
<br />
4760     int fd,
<br />
4761     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br />
4763 <h4 class=
"parameters">Parameters
</h4>
4766 <dd class=
"description">HTTP data
</dd>
4768 <dd class=
"description">IPP data
</dd>
4770 <h4 class=
"returnvalue">Return Value
</h4>
4771 <p class=
"description">Current state
</p>
4772 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ippReadIO">ippReadIO
</a></h3>
4773 <p class=
"description">Read data for an IPP message.
</p>
4775 <a href=
"#ipp_state_t">ipp_state_t
</a> ippReadIO (
<br />
4776     void *src,
<br />
4777     <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br />
4778     int blocking,
<br />
4779     <a href=
"#ipp_t">ipp_t
</a> *parent,
<br />
4780     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br />
4782 <h4 class=
"parameters">Parameters
</h4>
4785 <dd class=
"description">Data source
</dd>
4787 <dd class=
"description">Read callback function
</dd>
4789 <dd class=
"description">Use blocking IO?
</dd>
4791 <dd class=
"description">Parent request, if any
</dd>
4793 <dd class=
"description">IPP data
</dd>
4795 <h4 class=
"returnvalue">Return Value
</h4>
4796 <p class=
"description">Current state
</p>
4797 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetBoolean">ippSetBoolean
</a></h3>
4798 <p class=
"description">Set a boolean value in an attribute.
</p>
4800 int ippSetBoolean (
<br />
4801     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
4802     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br />
4803     int element,
<br />
4804     int boolvalue
<br />
4806 <h4 class=
"parameters">Parameters
</h4>
4809 <dd class=
"description">IPP message
</dd>
4811 <dd class=
"description">IPP attribute
</dd>
4813 <dd class=
"description">Value number (
0-based)
</dd>
4815 <dd class=
"description">Boolean value
</dd>
4817 <h4 class=
"returnvalue">Return Value
</h4>
4818 <p class=
"description">1 on success,
0 on failure
</p>
4819 <h4 class=
"discussion">Discussion
</h4>
4820 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4821 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
4823 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4825 The
<code>element
</code> parameter specifies which value to set from
0 to
4826 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4829 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetCollection">ippSetCollection
</a></h3>
4830 <p class=
"description">Set a collection value in an attribute.
</p>
4832 int ippSetCollection (
<br />
4833     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
4834     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br />
4835     int element,
<br />
4836     <a href=
"#ipp_t">ipp_t
</a> *colvalue
<br />
4838 <h4 class=
"parameters">Parameters
</h4>
4841 <dd class=
"description">IPP message
</dd>
4843 <dd class=
"description">IPP attribute
</dd>
4845 <dd class=
"description">Value number (
0-based)
</dd>
4847 <dd class=
"description">Collection value
</dd>
4849 <h4 class=
"returnvalue">Return Value
</h4>
4850 <p class=
"description">1 on success,
0 on failure
</p>
4851 <h4 class=
"discussion">Discussion
</h4>
4852 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4853 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
4855 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4857 The
<code>element
</code> parameter specifies which value to set from
0 to
4858 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4861 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetDate">ippSetDate
</a></h3>
4862 <p class=
"description">Set a date value in an attribute.
</p>
4864 int ippSetDate (
<br />
4865     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
4866     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br />
4867     int element,
<br />
4868     const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *datevalue
<br />
4870 <h4 class=
"parameters">Parameters
</h4>
4873 <dd class=
"description">IPP message
</dd>
4875 <dd class=
"description">IPP attribute
</dd>
4877 <dd class=
"description">Value number (
0-based)
</dd>
4879 <dd class=
"description">Date value
</dd>
4881 <h4 class=
"returnvalue">Return Value
</h4>
4882 <p class=
"description">1 on success,
0 on failure
</p>
4883 <h4 class=
"discussion">Discussion
</h4>
4884 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4885 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
4887 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4889 The
<code>element
</code> parameter specifies which value to set from
0 to
4890 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4893 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetGroupTag">ippSetGroupTag
</a></h3>
4894 <p class=
"description">Set the group tag of an attribute.
</p>
4896 int ippSetGroupTag (
<br />
4897     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
4898     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br />
4899     ipp_tag_t group_tag
<br />
4901 <h4 class=
"parameters">Parameters
</h4>
4904 <dd class=
"description">IPP message
</dd>
4906 <dd class=
"description">Attribute
</dd>
4908 <dd class=
"description">Group tag
</dd>
4910 <h4 class=
"returnvalue">Return Value
</h4>
4911 <p class=
"description">1 on success,
0 on failure
</p>
4912 <h4 class=
"discussion">Discussion
</h4>
4913 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4914 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
4916 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<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>).
4925 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetInteger">ippSetInteger
</a></h3>
4926 <p class=
"description">Set an integer or enum value in an attribute.
</p>
4928 int ippSetInteger (
<br />
4929     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
4930     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br />
4931     int element,
<br />
4932     int intvalue
<br />
4934 <h4 class=
"parameters">Parameters
</h4>
4937 <dd class=
"description">IPP message
</dd>
4939 <dd class=
"description">IPP attribute
</dd>
4941 <dd class=
"description">Value number (
0-based)
</dd>
4943 <dd class=
"description">Integer/enum value
</dd>
4945 <h4 class=
"returnvalue">Return Value
</h4>
4946 <p class=
"description">1 on success,
0 on failure
</p>
4947 <h4 class=
"discussion">Discussion
</h4>
4948 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4949 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
4951 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4953 The
<code>element
</code> parameter specifies which value to set from
0 to
4954 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4957 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetName">ippSetName
</a></h3>
4958 <p class=
"description">Set the name of an attribute.
</p>
4960 int ippSetName (
<br />
4961     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
4962     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br />
4963     const char *name
<br />
4965 <h4 class=
"parameters">Parameters
</h4>
4968 <dd class=
"description">IPP message
</dd>
4970 <dd class=
"description">IPP attribute
</dd>
4972 <dd class=
"description">Attribute name
</dd>
4974 <h4 class=
"returnvalue">Return Value
</h4>
4975 <p class=
"description">1 on success,
0 on failure
</p>
4976 <h4 class=
"discussion">Discussion
</h4>
4977 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4978 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
4980 The
<code>attr
</code> parameter may be modified as a result of setting the value.
4983 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippSetOctetString">ippSetOctetString
</a></h3>
4984 <p class=
"description">Set an octetString value in an IPP attribute.
</p>
4986 int ippSetOctetString (
<br />
4987     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
4988     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br />
4989     int element,
<br />
4990     const void *data,
<br />
4991     int datalen
<br />
4993 <h4 class=
"parameters">Parameters
</h4>
4996 <dd class=
"description">IPP message
</dd>
4998 <dd class=
"description">IPP attribute
</dd>
5000 <dd class=
"description">Value number (
0-based)
</dd>
5002 <dd class=
"description">Pointer to octetString data
</dd>
5004 <dd class=
"description">Length of octetString data
</dd>
5006 <h4 class=
"returnvalue">Return Value
</h4>
5007 <p class=
"description">1 on success,
0 on failure
</p>
5008 <h4 class=
"discussion">Discussion
</h4>
5009 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5010 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
5012 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5014 The
<code>element
</code> parameter specifies which value to set from
0 to
5015 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
5018 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetOperation">ippSetOperation
</a></h3>
5019 <p class=
"description">Set the operation ID in an IPP request message.
</p>
5021 int ippSetOperation (
<br />
5022     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
5023     ipp_op_t op
<br />
5025 <h4 class=
"parameters">Parameters
</h4>
5028 <dd class=
"description">IPP request message
</dd>
5030 <dd class=
"description">Operation ID
</dd>
5032 <h4 class=
"returnvalue">Return Value
</h4>
5033 <p class=
"description">1 on success,
0 on failure
</p>
5034 <h4 class=
"discussion">Discussion
</h4>
5035 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5036 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
5039 <h3 class=
"function"><a id=
"ippSetPort">ippSetPort
</a></h3>
5040 <p class=
"description">Set the default port number.
</p>
5042 void ippSetPort (
<br />
5043     int p
<br />
5045 <h4 class=
"parameters">Parameters
</h4>
5048 <dd class=
"description">Port number to use
</dd>
5050 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetRange">ippSetRange
</a></h3>
5051 <p class=
"description">Set a rangeOfInteger value in an attribute.
</p>
5053 int ippSetRange (
<br />
5054     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
5055     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br />
5056     int element,
<br />
5057     int lowervalue,
<br />
5058     int uppervalue
<br />
5060 <h4 class=
"parameters">Parameters
</h4>
5063 <dd class=
"description">IPP message
</dd>
5065 <dd class=
"description">IPP attribute
</dd>
5067 <dd class=
"description">Value number (
0-based)
</dd>
5069 <dd class=
"description">Lower bound for range
</dd>
5071 <dd class=
"description">Upper bound for range
</dd>
5073 <h4 class=
"returnvalue">Return Value
</h4>
5074 <p class=
"description">1 on success,
0 on failure
</p>
5075 <h4 class=
"discussion">Discussion
</h4>
5076 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5077 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
5079 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5081 The
<code>element
</code> parameter specifies which value to set from
0 to
5082 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
5085 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetRequestId">ippSetRequestId
</a></h3>
5086 <p class=
"description">Set the request ID in an IPP message.
</p>
5088 int ippSetRequestId (
<br />
5089     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
5090     int request_id
<br />
5092 <h4 class=
"parameters">Parameters
</h4>
5095 <dd class=
"description">IPP message
</dd>
5097 <dd class=
"description">Request ID
</dd>
5099 <h4 class=
"returnvalue">Return Value
</h4>
5100 <p class=
"description">1 on success,
0 on failure
</p>
5101 <h4 class=
"discussion">Discussion
</h4>
5102 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5103 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
5105 The
<code>request_id
</code> parameter must be greater than
0.
5108 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetResolution">ippSetResolution
</a></h3>
5109 <p class=
"description">Set a resolution value in an attribute.
</p>
5111 int ippSetResolution (
<br />
5112     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
5113     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br />
5114     int element,
<br />
5115     <a href=
"#ipp_res_t">ipp_res_t
</a> unitsvalue,
<br />
5116     int xresvalue,
<br />
5117     int yresvalue
<br />
5119 <h4 class=
"parameters">Parameters
</h4>
5122 <dd class=
"description">IPP message
</dd>
5124 <dd class=
"description">IPP attribute
</dd>
5126 <dd class=
"description">Value number (
0-based)
</dd>
5128 <dd class=
"description">Resolution units
</dd>
5130 <dd class=
"description">Horizontal/cross feed resolution
</dd>
5132 <dd class=
"description">Vertical/feed resolution
</dd>
5134 <h4 class=
"returnvalue">Return Value
</h4>
5135 <p class=
"description">1 on success,
0 on failure
</p>
5136 <h4 class=
"discussion">Discussion
</h4>
5137 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5138 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
5140 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5142 The
<code>element
</code> parameter specifies which value to set from
0 to
5143 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
5146 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetState">ippSetState
</a></h3>
5147 <p class=
"description">Set the current state of the IPP message.
</p>
5149 int ippSetState (
<br />
5150     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
5151     <a href=
"#ipp_state_t">ipp_state_t
</a> state
<br />
5153 <h4 class=
"parameters">Parameters
</h4>
5156 <dd class=
"description">IPP message
</dd>
5158 <dd class=
"description">IPP state value
</dd>
5160 <h4 class=
"returnvalue">Return Value
</h4>
5161 <p class=
"description">1 on success,
0 on failure
</p>
5162 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetStatusCode">ippSetStatusCode
</a></h3>
5163 <p class=
"description">Set the status code in an IPP response or event message.
</p>
5165 int ippSetStatusCode (
<br />
5166     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
5167     ipp_status_t status
<br />
5169 <h4 class=
"parameters">Parameters
</h4>
5172 <dd class=
"description">IPP response or event message
</dd>
5174 <dd class=
"description">Status code
</dd>
5176 <h4 class=
"returnvalue">Return Value
</h4>
5177 <p class=
"description">1 on success,
0 on failure
</p>
5178 <h4 class=
"discussion">Discussion
</h4>
5179 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5180 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
5183 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetString">ippSetString
</a></h3>
5184 <p class=
"description">Set a string value in an attribute.
</p>
5186 int ippSetString (
<br />
5187     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
5188     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br />
5189     int element,
<br />
5190     const char *strvalue
<br />
5192 <h4 class=
"parameters">Parameters
</h4>
5195 <dd class=
"description">IPP message
</dd>
5197 <dd class=
"description">IPP attribute
</dd>
5199 <dd class=
"description">Value number (
0-based)
</dd>
5201 <dd class=
"description">String value
</dd>
5203 <h4 class=
"returnvalue">Return Value
</h4>
5204 <p class=
"description">1 on success,
0 on failure
</p>
5205 <h4 class=
"discussion">Discussion
</h4>
5206 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5207 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
5209 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5211 The
<code>element
</code> parameter specifies which value to set from
0 to
5212 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
5215 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippSetStringf">ippSetStringf
</a></h3>
5216 <p class=
"description">Set a formatted string value of an attribute.
</p>
5218 int ippSetStringf (
<br />
5219     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
5220     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br />
5221     int element,
<br />
5222     const char *format,
<br />
5223     ...
<br />
5225 <h4 class=
"parameters">Parameters
</h4>
5228 <dd class=
"description">IPP message
</dd>
5230 <dd class=
"description">IPP attribute
</dd>
5232 <dd class=
"description">Value number (
0-based)
</dd>
5234 <dd class=
"description">Printf-style format string
</dd>
5236 <dd class=
"description">Additional arguments as needed
</dd>
5238 <h4 class=
"returnvalue">Return Value
</h4>
5239 <p class=
"description">1 on success,
0 on failure
</p>
5240 <h4 class=
"discussion">Discussion
</h4>
5241 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5242 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
5244 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5246 The
<code>element
</code> parameter specifies which value to set from
0 to
5247 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
<br>
5249 The
<code>format
</code> parameter uses formatting characters compatible with the
5250 printf family of standard functions. Additional arguments follow it as
5251 needed. The formatted string is truncated as needed to the maximum length of
5252 the corresponding value type.
5255 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippSetStringfv">ippSetStringfv
</a></h3>
5256 <p class=
"description">Set a formatted string value of an attribute.
</p>
5258 int ippSetStringfv (
<br />
5259     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
5260     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br />
5261     int element,
<br />
5262     const char *format,
<br />
5263     va_list ap
<br />
5265 <h4 class=
"parameters">Parameters
</h4>
5268 <dd class=
"description">IPP message
</dd>
5270 <dd class=
"description">IPP attribute
</dd>
5272 <dd class=
"description">Value number (
0-based)
</dd>
5274 <dd class=
"description">Printf-style format string
</dd>
5276 <dd class=
"description">Pointer to additional arguments
</dd>
5278 <h4 class=
"returnvalue">Return Value
</h4>
5279 <p class=
"description">1 on success,
0 on failure
</p>
5280 <h4 class=
"discussion">Discussion
</h4>
5281 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5282 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
5284 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5286 The
<code>element
</code> parameter specifies which value to set from
0 to
5287 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
<br>
5289 The
<code>format
</code> parameter uses formatting characters compatible with the
5290 printf family of standard functions. Additional arguments follow it as
5291 needed. The formatted string is truncated as needed to the maximum length of
5292 the corresponding value type.
5295 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetValueTag">ippSetValueTag
</a></h3>
5296 <p class=
"description">Set the value tag of an attribute.
</p>
5298 int ippSetValueTag (
<br />
5299     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
5300     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br />
5301     ipp_tag_t value_tag
<br />
5303 <h4 class=
"parameters">Parameters
</h4>
5306 <dd class=
"description">IPP message
</dd>
5308 <dd class=
"description">IPP attribute
</dd>
5310 <dd class=
"description">Value tag
</dd>
5312 <h4 class=
"returnvalue">Return Value
</h4>
5313 <p class=
"description">1 on success,
0 on failure
</p>
5314 <h4 class=
"discussion">Discussion
</h4>
5315 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5316 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
5318 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5320 Integer (
<code>IPP_TAG_INTEGER
</code>) values can be promoted to rangeOfInteger
5321 (
<code>IPP_TAG_RANGE
</code>) values, the various string tags can be promoted to name
5322 (
<code>IPP_TAG_NAME
</code>) or nameWithLanguage (
<code>IPP_TAG_NAMELANG
</code>) values, text
5323 (
<code>IPP_TAG_TEXT
</code>) values can be promoted to textWithLanguage
5324 (
<code>IPP_TAG_TEXTLANG
</code>) values, and all values can be demoted to the various
5325 out-of-band value tags such as no-value (
<code>IPP_TAG_NOVALUE
</code>). All other changes
5326 will be rejected.
<br>
5328 Promoting a string attribute to nameWithLanguage or textWithLanguage adds the language
5329 code in the
"attributes-natural-language
" attribute or, if not present, the language
5330 code for the current locale.
5333 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a id=
"ippSetVersion">ippSetVersion
</a></h3>
5334 <p class=
"description">Set the version number in an IPP message.
</p>
5336 int ippSetVersion (
<br />
5337     <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br />
5338     int major,
<br />
5339     int minor
<br />
5341 <h4 class=
"parameters">Parameters
</h4>
5344 <dd class=
"description">IPP message
</dd>
5346 <dd class=
"description">Major version number (major.minor)
</dd>
5348 <dd class=
"description">Minor version number (major.minor)
</dd>
5350 <h4 class=
"returnvalue">Return Value
</h4>
5351 <p class=
"description">1 on success,
0 on failure
</p>
5352 <h4 class=
"discussion">Discussion
</h4>
5353 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5354 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
5356 The valid version numbers are currently
1.0,
1.1,
2.0,
2.1, and
2.2.
5359 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a id=
"ippStateString">ippStateString
</a></h3>
5360 <p class=
"description">Return the name corresponding to a state value.
</p>
5362 const char *ippStateString (
<br />
5363     <a href=
"#ipp_state_t">ipp_state_t
</a> state
<br />
5365 <h4 class=
"parameters">Parameters
</h4>
5368 <dd class=
"description">State value
</dd>
5370 <h4 class=
"returnvalue">Return Value
</h4>
5371 <p class=
"description">State name
</p>
5372 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"ippTagString">ippTagString
</a></h3>
5373 <p class=
"description">Return the tag name corresponding to a tag value.
</p>
5375 const char *ippTagString (
<br />
5376     ipp_tag_t tag
<br />
5378 <h4 class=
"parameters">Parameters
</h4>
5381 <dd class=
"description">Tag value
</dd>
5383 <h4 class=
"returnvalue">Return Value
</h4>
5384 <p class=
"description">Tag name
</p>
5385 <h4 class=
"discussion">Discussion
</h4>
5386 <p class=
"discussion">The returned names are defined in RFC
2911 and
3382.
5389 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a id=
"ippTagValue">ippTagValue
</a></h3>
5390 <p class=
"description">Return the tag value corresponding to a tag name.
</p>
5392 ipp_tag_t ippTagValue (
<br />
5393     const char *name
<br />
5395 <h4 class=
"parameters">Parameters
</h4>
5398 <dd class=
"description">Tag name
</dd>
5400 <h4 class=
"returnvalue">Return Value
</h4>
5401 <p class=
"description">Tag value
</p>
5402 <h4 class=
"discussion">Discussion
</h4>
5403 <p class=
"discussion">The tag names are defined in RFC
2911 and
3382.
5406 <h3 class=
"function"><a id=
"ippTimeToDate">ippTimeToDate
</a></h3>
5407 <p class=
"description">Convert from UNIX time to RFC
1903 format.
</p>
5409 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *ippTimeToDate (
<br />
5410     time_t t
<br />
5412 <h4 class=
"parameters">Parameters
</h4>
5415 <dd class=
"description">UNIX time value
</dd>
5417 <h4 class=
"returnvalue">Return Value
</h4>
5418 <p class=
"description">RFC-
1903 date/time data
</p>
5419 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippValidateAttribute">ippValidateAttribute
</a></h3>
5420 <p class=
"description">Validate the contents of an attribute.
</p>
5422 int ippValidateAttribute (
<br />
5423     <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br />
5425 <h4 class=
"parameters">Parameters
</h4>
5428 <dd class=
"description">Attribute
</dd>
5430 <h4 class=
"returnvalue">Return Value
</h4>
5431 <p class=
"description">1 if valid,
0 otherwise
</p>
5432 <h4 class=
"discussion">Discussion
</h4>
5433 <p class=
"discussion">This function validates the contents of an attribute based on the name and
5434 value tag.
1 is returned if the attribute is valid,
0 otherwise. On
5435 failure, cupsLastErrorString() is set to a human-readable message.
5438 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a id=
"ippValidateAttributes">ippValidateAttributes
</a></h3>
5439 <p class=
"description">Validate all attributes in an IPP message.
</p>
5441 int ippValidateAttributes (
<br />
5442     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br />
5444 <h4 class=
"parameters">Parameters
</h4>
5447 <dd class=
"description">IPP message
</dd>
5449 <h4 class=
"returnvalue">Return Value
</h4>
5450 <p class=
"description">1 if valid,
0 otherwise
</p>
5451 <h4 class=
"discussion">Discussion
</h4>
5452 <p class=
"discussion">This function validates the contents of the IPP message, including each
5453 attribute. Like
<a href=
"#ippValidateAttribute"><code>ippValidateAttribute
</code></a>, cupsLastErrorString() is set
5454 to a human-readable message on failure.
5457 <h3 class=
"function"><a id=
"ippWrite">ippWrite
</a></h3>
5458 <p class=
"description">Write data for an IPP message to a HTTP connection.
</p>
5460 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWrite (
<br />
5461     <a href=
"#http_t">http_t
</a> *http,
<br />
5462     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br />
5464 <h4 class=
"parameters">Parameters
</h4>
5467 <dd class=
"description">HTTP connection
</dd>
5469 <dd class=
"description">IPP data
</dd>
5471 <h4 class=
"returnvalue">Return Value
</h4>
5472 <p class=
"description">Current state
</p>
5473 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a id=
"ippWriteFile">ippWriteFile
</a></h3>
5474 <p class=
"description">Write data for an IPP message to a file.
</p>
5476 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWriteFile (
<br />
5477     int fd,
<br />
5478     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br />
5480 <h4 class=
"parameters">Parameters
</h4>
5483 <dd class=
"description">HTTP data
</dd>
5485 <dd class=
"description">IPP data
</dd>
5487 <h4 class=
"returnvalue">Return Value
</h4>
5488 <p class=
"description">Current state
</p>
5489 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"ippWriteIO">ippWriteIO
</a></h3>
5490 <p class=
"description">Write data for an IPP message.
</p>
5492 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWriteIO (
<br />
5493     void *dst,
<br />
5494     <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br />
5495     int blocking,
<br />
5496     <a href=
"#ipp_t">ipp_t
</a> *parent,
<br />
5497     <a href=
"#ipp_t">ipp_t
</a> *ipp
<br />
5499 <h4 class=
"parameters">Parameters
</h4>
5502 <dd class=
"description">Destination
</dd>
5504 <dd class=
"description">Write callback function
</dd>
5506 <dd class=
"description">Use blocking IO?
</dd>
5508 <dd class=
"description">Parent IPP message
</dd>
5510 <dd class=
"description">IPP data
</dd>
5512 <h4 class=
"returnvalue">Return Value
</h4>
5513 <p class=
"description">Current state
</p>
5514 <h2 class=
"title"><a id=
"TYPES">Data Types
</a></h2>
5515 <h3 class=
"typedef"><a id=
"gss_auth_identity_desc">gss_auth_identity_desc
</a></h3>
5516 <p class=
"description">Local functions...
</p>
5518 typedef struct
<a href=
"#gss_auth_identity">gss_auth_identity
</a> gss_auth_identity_desc;
5520 <h3 class=
"typedef"><a id=
"http_addr_t"><span class=
"info"> CUPS
1.2/macOS
10.5 </span>http_addr_t
</a></h3>
5521 <p class=
"description">Socket address union, which
5522 makes using IPv6 and other
5523 address types easier and
5526 typedef union _http_addr_u / http_addr_t;
5528 <h3 class=
"typedef"><a id=
"http_addrlist_t"><span class=
"info"> CUPS
1.2/macOS
10.5 </span>http_addrlist_t
</a></h3>
5529 <p class=
"description">Socket address list, which is
5530 used to enumerate all of the
5531 addresses that are associated
5532 with a hostname.
</p>
5534 typedef struct
<a href=
"#http_addrlist_s">http_addrlist_s
</a> / http_addrlist_t;
5536 <h3 class=
"typedef"><a id=
"http_auth_t">http_auth_t
</a></h3>
5537 <p class=
"description">HTTP authentication types
</p>
5539 typedef enum
<a href=
"#http_auth_e">http_auth_e
</a> http_auth_t;
5541 <h3 class=
"typedef"><a id=
"http_credential_t"><span class=
"info"> CUPS
1.5/macOS
10.7 </span>http_credential_t
</a></h3>
5542 <p class=
"description">HTTP credential data
</p>
5544 typedef struct
<a href=
"#http_credential_s">http_credential_s
</a> http_credential_t;
5546 <h3 class=
"typedef"><a id=
"http_encoding_t">http_encoding_t
</a></h3>
5547 <p class=
"description">HTTP transfer encoding values
</p>
5549 typedef enum
<a href=
"#http_encoding_e">http_encoding_e
</a> http_encoding_t;
5551 <h3 class=
"typedef"><a id=
"http_encryption_t">http_encryption_t
</a></h3>
5552 <p class=
"description">HTTP encryption values
</p>
5554 typedef enum
<a href=
"#http_encryption_e">http_encryption_e
</a> http_encryption_t;
5556 <h3 class=
"typedef"><a id=
"http_field_t">http_field_t
</a></h3>
5557 <p class=
"description">HTTP field names
</p>
5559 typedef enum
<a href=
"#http_field_e">http_field_e
</a> http_field_t;
5561 <h3 class=
"typedef"><a id=
"http_keepalive_t">http_keepalive_t
</a></h3>
5562 <p class=
"description">HTTP keep-alive values
</p>
5564 typedef enum
<a href=
"#http_keepalive_e">http_keepalive_e
</a> http_keepalive_t;
5566 <h3 class=
"typedef"><a id=
"http_state_t">http_state_t
</a></h3>
5567 <p class=
"description">HTTP state values; states
5568 are server-oriented...
</p>
5570 typedef enum
<a href=
"#http_state_e">http_state_e
</a> http_state_t;
5572 <h3 class=
"typedef"><a id=
"http_t">http_t
</a></h3>
5573 <p class=
"description">HTTP connection type
</p>
5575 typedef struct _http_s http_t;
5577 <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>
5578 <p class=
"description">HTTP timeout callback
</p>
5580 typedef int (*http_timeout_cb_t)(
<a href=
"#http_t">http_t
</a> *http, void *user_data);
5582 <h3 class=
"typedef"><a id=
"http_trust_t"><span class=
"info"> CUPS
2.0/OS
10.10 </span>http_trust_t
</a></h3>
5583 <p class=
"description">Level of trust for credentials
</p>
5585 typedef enum
<a href=
"#http_trust_e">http_trust_e
</a> http_trust_t;
5587 <h3 class=
"typedef"><a id=
"http_uri_coding_t">http_uri_coding_t
</a></h3>
5588 <p class=
"description">URI en/decode flags
</p>
5590 typedef enum
<a href=
"#http_uri_coding_e">http_uri_coding_e
</a> http_uri_coding_t;
5592 <h3 class=
"typedef"><a id=
"http_uri_status_t"><span class=
"info"> CUPS
1.2 </span>http_uri_status_t
</a></h3>
5593 <p class=
"description">URI separation status
</p>
5595 typedef enum
<a href=
"#http_uri_status_e">http_uri_status_e
</a> http_uri_status_t;
5597 <h3 class=
"typedef"><a id=
"http_version_t">http_version_t
</a></h3>
5598 <p class=
"description">HTTP version numbers
</p>
5600 typedef enum
<a href=
"#http_version_e">http_version_e
</a> http_version_t;
5602 <h3 class=
"typedef"><a id=
"ipp_attribute_t">ipp_attribute_t
</a></h3>
5603 <p class=
"description">IPP attribute
</p>
5605 typedef struct _ipp_attribute_s ipp_attribute_t;
5607 <h3 class=
"typedef"><a id=
"ipp_copycb_t">ipp_copycb_t
</a></h3>
5608 <p class=
"description">The following structures are PRIVATE starting with CUPS
1.6/macOS
10.8.
5609 Please use the new accessor functions available in CUPS
1.6 and later, as
5610 these definitions will be moved to a private header file in a future release.
</p>
5612 typedef int (*ipp_copycb_t)(void *context,
<a href=
"#ipp_t">ipp_t
</a> *dst,
<a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr);
5614 <h3 class=
"typedef"><a id=
"ipp_dstate_t">ipp_dstate_t
</a></h3>
5615 <p class=
"description">Document states
</p>
5617 typedef enum
<a href=
"#ipp_dstate_e">ipp_dstate_e
</a> ipp_dstate_t;
5619 <h3 class=
"typedef"><a id=
"ipp_finish_t">ipp_finish_t
</a></h3>
5620 <p class=
"description">Job collation types
</p>
5622 typedef enum
<a href=
"#ipp_finishings_e">ipp_finishings_e
</a> ipp_finish_t;
5624 <h3 class=
"typedef"><a id=
"ipp_iocb_t"><span class=
"info"> CUPS
1.2/macOS
10.5 </span>ipp_iocb_t
</a></h3>
5625 <p class=
"description">IPP IO Callback Function
</p>
5627 typedef ssize_t (*ipp_iocb_t)(void *context,
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *buffer, size_t bytes);
5629 <h3 class=
"typedef"><a id=
"ipp_jcollate_t">ipp_jcollate_t
</a></h3>
5630 <p class=
"description">Job collation types
</p>
5632 typedef enum
<a href=
"#ipp_jcollate_e">ipp_jcollate_e
</a> ipp_jcollate_t;
5634 <h3 class=
"typedef"><a id=
"ipp_orient_t">ipp_orient_t
</a></h3>
5635 <p class=
"description">Orientation values
</p>
5637 typedef enum
<a href=
"#ipp_orient_e">ipp_orient_e
</a> ipp_orient_t;
5639 <h3 class=
"typedef"><a id=
"ipp_pstate_t">ipp_pstate_t
</a></h3>
5640 <p class=
"description">Printer states
</p>
5642 typedef enum
<a href=
"#ipp_pstate_e">ipp_pstate_e
</a> ipp_pstate_t;
5644 <h3 class=
"typedef"><a id=
"ipp_quality_t">ipp_quality_t
</a></h3>
5645 <p class=
"description">Qualities
</p>
5647 typedef enum
<a href=
"#ipp_quality_e">ipp_quality_e
</a> ipp_quality_t;
5649 <h3 class=
"typedef"><a id=
"ipp_res_t">ipp_res_t
</a></h3>
5650 <p class=
"description">Resolution units
</p>
5652 typedef enum
<a href=
"#ipp_res_e">ipp_res_e
</a> ipp_res_t;
5654 <h3 class=
"typedef"><a id=
"ipp_state_t">ipp_state_t
</a></h3>
5655 <p class=
"description">IPP states
</p>
5657 typedef enum
<a href=
"#ipp_state_e">ipp_state_e
</a> ipp_state_t;
5659 <h3 class=
"typedef"><a id=
"ipp_t">ipp_t
</a></h3>
5660 <p class=
"description">IPP request/response data
</p>
5662 typedef struct _ipp_s ipp_t;
5664 <h3 class=
"typedef"><a id=
"ipp_uchar_t">ipp_uchar_t
</a></h3>
5665 <p class=
"description">Unsigned
8-bit integer/character
</p>
5667 typedef unsigned char ipp_uchar_t;
5669 <h2 class=
"title"><a id=
"STRUCTURES">Structures
</a></h2>
5670 <h3 class=
"struct"><a id=
"gss_auth_identity">gss_auth_identity
</a></h3>
5671 <p class=
"description">Local functions...
</p>
5672 <p class=
"code">struct gss_auth_identity {
<br />
5673     gss_buffer_t *credentialsRef;
<br />
5674     uint32_t flags;
<br />
5675     char *password;
<br />
5676     char *realm;
<br />
5677     uint32_t type;
<br />
5678     char *username;
<br />
5680 <h4 class=
"members">Members
</h4>
5682 <dt>credentialsRef
</dt>
5689 <h3 class=
"struct"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a id=
"http_addrlist_s">http_addrlist_s
</a></h3>
5690 <p class=
"description">Socket address list, which is
5691 used to enumerate all of the
5692 addresses that are associated
5693 with a hostname.
</p>
5694 <p class=
"code">struct http_addrlist_s {
<br />
5695     <a href=
"#http_addr_t">http_addr_t
</a> addr;
<br />
5696     struct
<a href=
"#http_addrlist_s">http_addrlist_s
</a> *next;
<br />
5698 <h4 class=
"members">Members
</h4>
5701 <dd class=
"description">Address
</dd>
5703 <dd class=
"description">Pointer to next address in list
</dd>
5705 <h3 class=
"struct"><span class=
"info"> CUPS
1.5/macOS
10.7 </span><a id=
"http_credential_s">http_credential_s
</a></h3>
5706 <p class=
"description">HTTP credential data
</p>
5707 <p class=
"code">struct http_credential_s {
<br />
5708     void *data;
<br />
5709     size_t datalen;
<br />
5711 <h4 class=
"members">Members
</h4>
5714 <dd class=
"description">Pointer to credential data
</dd>
5716 <dd class=
"description">Credential length
</dd>
5718 <h3 class=
"struct"><a id=
"pollfd">pollfd
</a></h3>
5719 <p class=
"description">User data (unused)
</p>
5720 <p class=
"code">struct pollfd *pollfds, unsigned int num_pollfds, int timeout, void *context) {
<br />
5721     void) context;
<br />
5722     void) timeout;
<br />
5724 <h4 class=
"members">Members
</h4>
5729 <h2 class=
"title"><a id=
"ENUMERATIONS">Constants
</a></h2>
5730 <h3 class=
"enumeration"><a id=
"http_auth_e">http_auth_e
</a></h3>
5731 <p class=
"description">HTTP authentication types
</p>
5732 <h4 class=
"constants">Constants
</h4>
5734 <dt>HTTP_AUTH_BASIC
</dt>
5735 <dd class=
"description">Basic authentication in use
</dd>
5736 <dt>HTTP_AUTH_MD5
</dt>
5737 <dd class=
"description">Digest authentication in use
</dd>
5738 <dt>HTTP_AUTH_MD5_INT
</dt>
5739 <dd class=
"description">Digest authentication in use for body
</dd>
5740 <dt>HTTP_AUTH_MD5_SESS
</dt>
5741 <dd class=
"description">MD5-session authentication in use
</dd>
5742 <dt>HTTP_AUTH_MD5_SESS_INT
</dt>
5743 <dd class=
"description">MD5-session authentication in use for body
</dd>
5744 <dt>HTTP_AUTH_NEGOTIATE
<span class=
"info"> CUPS
1.3/macOS
10.5 </span></dt>
5745 <dd class=
"description">GSSAPI authentication in use
</dd>
5746 <dt>HTTP_AUTH_NONE
</dt>
5747 <dd class=
"description">No authentication in use
</dd>
5749 <h3 class=
"enumeration"><a id=
"http_encoding_e">http_encoding_e
</a></h3>
5750 <p class=
"description">HTTP transfer encoding values
</p>
5751 <h4 class=
"constants">Constants
</h4>
5753 <dt>HTTP_ENCODING_CHUNKED
</dt>
5754 <dd class=
"description">Data is chunked
</dd>
5755 <dt>HTTP_ENCODING_FIELDS
</dt>
5756 <dd class=
"description">Sending HTTP fields
</dd>
5757 <dt>HTTP_ENCODING_LENGTH
</dt>
5758 <dd class=
"description">Data is sent with Content-Length
</dd>
5760 <h3 class=
"enumeration"><a id=
"http_encryption_e">http_encryption_e
</a></h3>
5761 <p class=
"description">HTTP encryption values
</p>
5762 <h4 class=
"constants">Constants
</h4>
5764 <dt>HTTP_ENCRYPTION_ALWAYS
</dt>
5765 <dd class=
"description">Always encrypt (SSL)
</dd>
5766 <dt>HTTP_ENCRYPTION_IF_REQUESTED
</dt>
5767 <dd class=
"description">Encrypt if requested (TLS upgrade)
</dd>
5768 <dt>HTTP_ENCRYPTION_NEVER
</dt>
5769 <dd class=
"description">Never encrypt
</dd>
5770 <dt>HTTP_ENCRYPTION_REQUIRED
</dt>
5771 <dd class=
"description">Encryption is required (TLS upgrade)
</dd>
5773 <h3 class=
"enumeration"><a id=
"http_field_e">http_field_e
</a></h3>
5774 <p class=
"description">HTTP field names
</p>
5775 <h4 class=
"constants">Constants
</h4>
5777 <dt>HTTP_FIELD_ACCEPT_ENCODING
<span class=
"info"> CUPS
1.7/macOS
10.9 </span></dt>
5778 <dd class=
"description">Accepting-Encoding field
</dd>
5779 <dt>HTTP_FIELD_ACCEPT_LANGUAGE
</dt>
5780 <dd class=
"description">Accept-Language field
</dd>
5781 <dt>HTTP_FIELD_ACCEPT_RANGES
</dt>
5782 <dd class=
"description">Accept-Ranges field
</dd>
5783 <dt>HTTP_FIELD_ALLOW
<span class=
"info"> CUPS
1.7/macOS
10.9 </span></dt>
5784 <dd class=
"description">Allow field
</dd>
5785 <dt>HTTP_FIELD_AUTHORIZATION
</dt>
5786 <dd class=
"description">Authorization field
</dd>
5787 <dt>HTTP_FIELD_CONNECTION
</dt>
5788 <dd class=
"description">Connection field
</dd>
5789 <dt>HTTP_FIELD_CONTENT_ENCODING
</dt>
5790 <dd class=
"description">Content-Encoding field
</dd>
5791 <dt>HTTP_FIELD_CONTENT_LANGUAGE
</dt>
5792 <dd class=
"description">Content-Language field
</dd>
5793 <dt>HTTP_FIELD_CONTENT_LENGTH
</dt>
5794 <dd class=
"description">Content-Length field
</dd>
5795 <dt>HTTP_FIELD_CONTENT_LOCATION
</dt>
5796 <dd class=
"description">Content-Location field
</dd>
5797 <dt>HTTP_FIELD_CONTENT_MD5
</dt>
5798 <dd class=
"description">Content-MD5 field
</dd>
5799 <dt>HTTP_FIELD_CONTENT_RANGE
</dt>
5800 <dd class=
"description">Content-Range field
</dd>
5801 <dt>HTTP_FIELD_CONTENT_TYPE
</dt>
5802 <dd class=
"description">Content-Type field
</dd>
5803 <dt>HTTP_FIELD_CONTENT_VERSION
</dt>
5804 <dd class=
"description">Content-Version field
</dd>
5805 <dt>HTTP_FIELD_DATE
</dt>
5806 <dd class=
"description">Date field
</dd>
5807 <dt>HTTP_FIELD_HOST
</dt>
5808 <dd class=
"description">Host field
</dd>
5809 <dt>HTTP_FIELD_IF_MODIFIED_SINCE
</dt>
5810 <dd class=
"description">If-Modified-Since field
</dd>
5811 <dt>HTTP_FIELD_IF_UNMODIFIED_SINCE
</dt>
5812 <dd class=
"description">If-Unmodified-Since field
</dd>
5813 <dt>HTTP_FIELD_KEEP_ALIVE
</dt>
5814 <dd class=
"description">Keep-Alive field
</dd>
5815 <dt>HTTP_FIELD_LAST_MODIFIED
</dt>
5816 <dd class=
"description">Last-Modified field
</dd>
5817 <dt>HTTP_FIELD_LINK
</dt>
5818 <dd class=
"description">Link field
</dd>
5819 <dt>HTTP_FIELD_LOCATION
</dt>
5820 <dd class=
"description">Location field
</dd>
5821 <dt>HTTP_FIELD_MAX
</dt>
5822 <dd class=
"description">Maximum field index
</dd>
5823 <dt>HTTP_FIELD_RANGE
</dt>
5824 <dd class=
"description">Range field
</dd>
5825 <dt>HTTP_FIELD_REFERER
</dt>
5826 <dd class=
"description">Referer field
</dd>
5827 <dt>HTTP_FIELD_RETRY_AFTER
</dt>
5828 <dd class=
"description">Retry-After field
</dd>
5829 <dt>HTTP_FIELD_SERVER
<span class=
"info"> CUPS
1.7/macOS
10.9 </span></dt>
5830 <dd class=
"description">Server field
</dd>
5831 <dt>HTTP_FIELD_TRANSFER_ENCODING
</dt>
5832 <dd class=
"description">Transfer-Encoding field
</dd>
5833 <dt>HTTP_FIELD_UNKNOWN
</dt>
5834 <dd class=
"description">Unknown field
</dd>
5835 <dt>HTTP_FIELD_UPGRADE
</dt>
5836 <dd class=
"description">Upgrade field
</dd>
5837 <dt>HTTP_FIELD_USER_AGENT
</dt>
5838 <dd class=
"description">User-Agent field
</dd>
5839 <dt>HTTP_FIELD_WWW_AUTHENTICATE
</dt>
5840 <dd class=
"description">WWW-Authenticate field
</dd>
5842 <h3 class=
"enumeration"><a id=
"http_keepalive_e">http_keepalive_e
</a></h3>
5843 <p class=
"description">HTTP keep-alive values
</p>
5844 <h4 class=
"constants">Constants
</h4>
5846 <dt>HTTP_KEEPALIVE_OFF
</dt>
5847 <dd class=
"description">No keep alive support
</dd>
5848 <dt>HTTP_KEEPALIVE_ON
</dt>
5849 <dd class=
"description">Use keep alive
</dd>
5851 <h3 class=
"enumeration"><a id=
"http_state_e">http_state_e
</a></h3>
5852 <p class=
"description">HTTP state values; states
5853 are server-oriented...
</p>
5854 <h4 class=
"constants">Constants
</h4>
5856 <dt>HTTP_STATE_CONNECT
</dt>
5857 <dd class=
"description">CONNECT command, waiting for blank line
</dd>
5858 <dt>HTTP_STATE_DELETE
</dt>
5859 <dd class=
"description">DELETE command, waiting for blank line
</dd>
5860 <dt>HTTP_STATE_ERROR
</dt>
5861 <dd class=
"description">Error on socket
</dd>
5862 <dt>HTTP_STATE_GET
</dt>
5863 <dd class=
"description">GET command, waiting for blank line
</dd>
5864 <dt>HTTP_STATE_GET_SEND
</dt>
5865 <dd class=
"description">GET command, sending data
</dd>
5866 <dt>HTTP_STATE_HEAD
</dt>
5867 <dd class=
"description">HEAD command, waiting for blank line
</dd>
5868 <dt>HTTP_STATE_OPTIONS
</dt>
5869 <dd class=
"description">OPTIONS command, waiting for blank line
</dd>
5870 <dt>HTTP_STATE_POST
</dt>
5871 <dd class=
"description">POST command, waiting for blank line
</dd>
5872 <dt>HTTP_STATE_POST_RECV
</dt>
5873 <dd class=
"description">POST command, receiving data
</dd>
5874 <dt>HTTP_STATE_POST_SEND
</dt>
5875 <dd class=
"description">POST command, sending data
</dd>
5876 <dt>HTTP_STATE_PUT
</dt>
5877 <dd class=
"description">PUT command, waiting for blank line
</dd>
5878 <dt>HTTP_STATE_PUT_RECV
</dt>
5879 <dd class=
"description">PUT command, receiving data
</dd>
5880 <dt>HTTP_STATE_STATUS
</dt>
5881 <dd class=
"description">Command complete, sending status
</dd>
5882 <dt>HTTP_STATE_TRACE
</dt>
5883 <dd class=
"description">TRACE command, waiting for blank line
</dd>
5884 <dt>HTTP_STATE_UNKNOWN_METHOD
<span class=
"info"> CUPS
1.7/macOS
10.9 </span></dt>
5885 <dd class=
"description">Unknown request method, waiting for blank line
</dd>
5886 <dt>HTTP_STATE_UNKNOWN_VERSION
<span class=
"info"> CUPS
1.7/macOS
10.9 </span></dt>
5887 <dd class=
"description">Unknown request method, waiting for blank line
</dd>
5888 <dt>HTTP_STATE_WAITING
</dt>
5889 <dd class=
"description">Waiting for command
</dd>
5891 <h3 class=
"enumeration"><a id=
"http_status_e">http_status_e
</a></h3>
5892 <p class=
"description">HTTP status codes
</p>
5893 <h4 class=
"constants">Constants
</h4>
5895 <dt>HTTP_STATUS_ACCEPTED
</dt>
5896 <dd class=
"description">DELETE command was successful
</dd>
5897 <dt>HTTP_STATUS_BAD_GATEWAY
</dt>
5898 <dd class=
"description">Bad gateway
</dd>
5899 <dt>HTTP_STATUS_BAD_REQUEST
</dt>
5900 <dd class=
"description">Bad request
</dd>
5901 <dt>HTTP_STATUS_CONFLICT
</dt>
5902 <dd class=
"description">Request is self-conflicting
</dd>
5903 <dt>HTTP_STATUS_CONTINUE
</dt>
5904 <dd class=
"description">Everything OK, keep going...
</dd>
5905 <dt>HTTP_STATUS_CREATED
</dt>
5906 <dd class=
"description">PUT command was successful
</dd>
5907 <dt>HTTP_STATUS_CUPS_AUTHORIZATION_CANCELED
<span class=
"info"> CUPS
1.4 </span></dt>
5908 <dd class=
"description">User canceled authorization
</dd>
5909 <dt>HTTP_STATUS_CUPS_PKI_ERROR
<span class=
"info"> CUPS
1.5/macOS
10.7 </span></dt>
5910 <dd class=
"description">Error negotiating a secure connection
</dd>
5911 <dt>HTTP_STATUS_ERROR
</dt>
5912 <dd class=
"description">An error response from httpXxxx()
</dd>
5913 <dt>HTTP_STATUS_EXPECTATION_FAILED
</dt>
5914 <dd class=
"description">The expectation given in an Expect header field was not met
</dd>
5915 <dt>HTTP_STATUS_FORBIDDEN
</dt>
5916 <dd class=
"description">Forbidden to access this URI
</dd>
5917 <dt>HTTP_STATUS_GATEWAY_TIMEOUT
</dt>
5918 <dd class=
"description">Gateway connection timed out
</dd>
5919 <dt>HTTP_STATUS_GONE
</dt>
5920 <dd class=
"description">Server has gone away
</dd>
5921 <dt>HTTP_STATUS_LENGTH_REQUIRED
</dt>
5922 <dd class=
"description">A content length or encoding is required
</dd>
5923 <dt>HTTP_STATUS_METHOD_NOT_ALLOWED
</dt>
5924 <dd class=
"description">Method is not allowed
</dd>
5925 <dt>HTTP_STATUS_MOVED_PERMANENTLY
</dt>
5926 <dd class=
"description">Document has moved permanently
</dd>
5927 <dt>HTTP_STATUS_MOVED_TEMPORARILY
</dt>
5928 <dd class=
"description">Document has moved temporarily
</dd>
5929 <dt>HTTP_STATUS_MULTIPLE_CHOICES
</dt>
5930 <dd class=
"description">Multiple files match request
</dd>
5931 <dt>HTTP_STATUS_NONE
<span class=
"info"> CUPS
1.7/macOS
10.9 </span></dt>
5932 <dd class=
"description">No Expect value
</dd>
5933 <dt>HTTP_STATUS_NOT_ACCEPTABLE
</dt>
5934 <dd class=
"description">Not Acceptable
</dd>
5935 <dt>HTTP_STATUS_NOT_AUTHORITATIVE
</dt>
5936 <dd class=
"description">Information isn't authoritative
</dd>
5937 <dt>HTTP_STATUS_NOT_FOUND
</dt>
5938 <dd class=
"description">URI was not found
</dd>
5939 <dt>HTTP_STATUS_NOT_IMPLEMENTED
</dt>
5940 <dd class=
"description">Feature not implemented
</dd>
5941 <dt>HTTP_STATUS_NOT_MODIFIED
</dt>
5942 <dd class=
"description">File not modified
</dd>
5943 <dt>HTTP_STATUS_NOT_SUPPORTED
</dt>
5944 <dd class=
"description">HTTP version not supported
</dd>
5945 <dt>HTTP_STATUS_NO_CONTENT
</dt>
5946 <dd class=
"description">Successful command, no new data
</dd>
5947 <dt>HTTP_STATUS_OK
</dt>
5948 <dd class=
"description">OPTIONS/GET/HEAD/POST/TRACE command was successful
</dd>
5949 <dt>HTTP_STATUS_PARTIAL_CONTENT
</dt>
5950 <dd class=
"description">Only a partial file was received/sent
</dd>
5951 <dt>HTTP_STATUS_PAYMENT_REQUIRED
</dt>
5952 <dd class=
"description">Payment required
</dd>
5953 <dt>HTTP_STATUS_PRECONDITION
</dt>
5954 <dd class=
"description">Precondition failed
</dd>
5955 <dt>HTTP_STATUS_PROXY_AUTHENTICATION
</dt>
5956 <dd class=
"description">Proxy Authentication is Required
</dd>
5957 <dt>HTTP_STATUS_REQUESTED_RANGE
</dt>
5958 <dd class=
"description">The requested range is not satisfiable
</dd>
5959 <dt>HTTP_STATUS_REQUEST_TIMEOUT
</dt>
5960 <dd class=
"description">Request timed out
</dd>
5961 <dt>HTTP_STATUS_REQUEST_TOO_LARGE
</dt>
5962 <dd class=
"description">Request entity too large
</dd>
5963 <dt>HTTP_STATUS_RESET_CONTENT
</dt>
5964 <dd class=
"description">Content was reset/recreated
</dd>
5965 <dt>HTTP_STATUS_SEE_OTHER
</dt>
5966 <dd class=
"description">See this other link...
</dd>
5967 <dt>HTTP_STATUS_SERVER_ERROR
</dt>
5968 <dd class=
"description">Internal server error
</dd>
5969 <dt>HTTP_STATUS_SERVICE_UNAVAILABLE
</dt>
5970 <dd class=
"description">Service is unavailable
</dd>
5971 <dt>HTTP_STATUS_SWITCHING_PROTOCOLS
</dt>
5972 <dd class=
"description">HTTP upgrade to TLS/SSL
</dd>
5973 <dt>HTTP_STATUS_UNAUTHORIZED
</dt>
5974 <dd class=
"description">Unauthorized to access host
</dd>
5975 <dt>HTTP_STATUS_UNSUPPORTED_MEDIATYPE
</dt>
5976 <dd class=
"description">The requested media type is unsupported
</dd>
5977 <dt>HTTP_STATUS_UPGRADE_REQUIRED
</dt>
5978 <dd class=
"description">Upgrade to SSL/TLS required
</dd>
5979 <dt>HTTP_STATUS_URI_TOO_LONG
</dt>
5980 <dd class=
"description">URI too long
</dd>
5981 <dt>HTTP_STATUS_USE_PROXY
</dt>
5982 <dd class=
"description">Must use a proxy to access this URI
</dd>
5984 <h3 class=
"enumeration"><a id=
"http_trust_e"><span class=
"info"> CUPS
2.0/OS
10.10 </span>http_trust_e
</a></h3>
5985 <p class=
"description">Level of trust for credentials
</p>
5986 <h4 class=
"constants">Constants
</h4>
5988 <dt>HTTP_TRUST_CHANGED
</dt>
5989 <dd class=
"description">Credentials have changed
</dd>
5990 <dt>HTTP_TRUST_EXPIRED
</dt>
5991 <dd class=
"description">Credentials are expired
</dd>
5992 <dt>HTTP_TRUST_INVALID
</dt>
5993 <dd class=
"description">Credentials are invalid
</dd>
5994 <dt>HTTP_TRUST_OK
</dt>
5995 <dd class=
"description">Credentials are OK/trusted
</dd>
5996 <dt>HTTP_TRUST_RENEWED
</dt>
5997 <dd class=
"description">Credentials have been renewed
</dd>
5998 <dt>HTTP_TRUST_UNKNOWN
</dt>
5999 <dd class=
"description">Credentials are unknown/new
</dd>
6001 <h3 class=
"enumeration"><a id=
"http_uri_coding_e">http_uri_coding_e
</a></h3>
6002 <p class=
"description">URI en/decode flags
</p>
6003 <h4 class=
"constants">Constants
</h4>
6005 <dt>HTTP_URI_CODING_ALL
</dt>
6006 <dd class=
"description">En/decode everything
</dd>
6007 <dt>HTTP_URI_CODING_HOSTNAME
</dt>
6008 <dd class=
"description">En/decode the hostname portion
</dd>
6009 <dt>HTTP_URI_CODING_MOST
</dt>
6010 <dd class=
"description">En/decode all but the query
</dd>
6011 <dt>HTTP_URI_CODING_NONE
</dt>
6012 <dd class=
"description">Don't en/decode anything
</dd>
6013 <dt>HTTP_URI_CODING_QUERY
</dt>
6014 <dd class=
"description">En/decode the query portion
</dd>
6015 <dt>HTTP_URI_CODING_RESOURCE
</dt>
6016 <dd class=
"description">En/decode the resource portion
</dd>
6017 <dt>HTTP_URI_CODING_RFC6874
</dt>
6018 <dd class=
"description">Use RFC
6874 address format
</dd>
6019 <dt>HTTP_URI_CODING_USERNAME
</dt>
6020 <dd class=
"description">En/decode the username portion
</dd>
6022 <h3 class=
"enumeration"><a id=
"http_uri_status_e"><span class=
"info"> CUPS
1.2 </span>http_uri_status_e
</a></h3>
6023 <p class=
"description">URI separation status
</p>
6024 <h4 class=
"constants">Constants
</h4>
6026 <dt>HTTP_URI_STATUS_BAD_ARGUMENTS
</dt>
6027 <dd class=
"description">Bad arguments to function (error)
</dd>
6028 <dt>HTTP_URI_STATUS_BAD_HOSTNAME
</dt>
6029 <dd class=
"description">Bad hostname in URI (error)
</dd>
6030 <dt>HTTP_URI_STATUS_BAD_PORT
</dt>
6031 <dd class=
"description">Bad port number in URI (error)
</dd>
6032 <dt>HTTP_URI_STATUS_BAD_RESOURCE
</dt>
6033 <dd class=
"description">Bad resource in URI (error)
</dd>
6034 <dt>HTTP_URI_STATUS_BAD_SCHEME
</dt>
6035 <dd class=
"description">Bad scheme in URI (error)
</dd>
6036 <dt>HTTP_URI_STATUS_BAD_URI
</dt>
6037 <dd class=
"description">Bad/empty URI (error)
</dd>
6038 <dt>HTTP_URI_STATUS_BAD_USERNAME
</dt>
6039 <dd class=
"description">Bad username in URI (error)
</dd>
6040 <dt>HTTP_URI_STATUS_MISSING_RESOURCE
</dt>
6041 <dd class=
"description">Missing resource in URI (warning)
</dd>
6042 <dt>HTTP_URI_STATUS_MISSING_SCHEME
</dt>
6043 <dd class=
"description">Missing scheme in URI (warning)
</dd>
6044 <dt>HTTP_URI_STATUS_OK
</dt>
6045 <dd class=
"description">URI decoded OK
</dd>
6046 <dt>HTTP_URI_STATUS_OVERFLOW
</dt>
6047 <dd class=
"description">URI buffer for httpAssembleURI is too small
</dd>
6048 <dt>HTTP_URI_STATUS_UNKNOWN_SCHEME
</dt>
6049 <dd class=
"description">Unknown scheme in URI (warning)
</dd>
6051 <h3 class=
"enumeration"><a id=
"http_version_e">http_version_e
</a></h3>
6052 <p class=
"description">HTTP version numbers
</p>
6053 <h4 class=
"constants">Constants
</h4>
6055 <dt>HTTP_VERSION_0_9
</dt>
6056 <dd class=
"description">HTTP/
0.9</dd>
6057 <dt>HTTP_VERSION_1_0
</dt>
6058 <dd class=
"description">HTTP/
1.0</dd>
6059 <dt>HTTP_VERSION_1_1
</dt>
6060 <dd class=
"description">HTTP/
1.1</dd>
6062 <h3 class=
"enumeration"><a id=
"ipp_dstate_e">ipp_dstate_e
</a></h3>
6063 <p class=
"description">Document states
</p>
6064 <h4 class=
"constants">Constants
</h4>
6066 <dt>IPP_DOCUMENT_ABORTED
</dt>
6067 <dd class=
"description">Document is aborted
</dd>
6068 <dt>IPP_DOCUMENT_CANCELED
</dt>
6069 <dd class=
"description">Document is canceled
</dd>
6070 <dt>IPP_DOCUMENT_COMPLETED
</dt>
6071 <dd class=
"description">Document is completed
</dd>
6072 <dt>IPP_DOCUMENT_PENDING
</dt>
6073 <dd class=
"description">Document is pending
</dd>
6074 <dt>IPP_DOCUMENT_PROCESSING
</dt>
6075 <dd class=
"description">Document is processing
</dd>
6077 <h3 class=
"enumeration"><a id=
"ipp_finishings_e">ipp_finishings_e
</a></h3>
6078 <p class=
"description">Finishings
</p>
6079 <h4 class=
"constants">Constants
</h4>
6081 <dt>IPP_FINISHINGS_BALE
</dt>
6082 <dd class=
"description">Bale (any type)
</dd>
6083 <dt>IPP_FINISHINGS_BIND
</dt>
6084 <dd class=
"description">Bind
</dd>
6085 <dt>IPP_FINISHINGS_BIND_BOTTOM
</dt>
6086 <dd class=
"description">Bind on bottom
</dd>
6087 <dt>IPP_FINISHINGS_BIND_LEFT
</dt>
6088 <dd class=
"description">Bind on left
</dd>
6089 <dt>IPP_FINISHINGS_BIND_RIGHT
</dt>
6090 <dd class=
"description">Bind on right
</dd>
6091 <dt>IPP_FINISHINGS_BIND_TOP
</dt>
6092 <dd class=
"description">Bind on top
</dd>
6093 <dt>IPP_FINISHINGS_BOOKLET_MAKER
</dt>
6094 <dd class=
"description">Fold to make booklet
</dd>
6095 <dt>IPP_FINISHINGS_COAT
</dt>
6096 <dd class=
"description">Apply protective liquid or powder coating
</dd>
6097 <dt>IPP_FINISHINGS_COVER
</dt>
6098 <dd class=
"description">Add cover
</dd>
6099 <dt>IPP_FINISHINGS_CUPS_FOLD_ACCORDIAN
</dt>
6100 <dd class=
"description">Accordian-fold the paper vertically into four sections
</dd>
6101 <dt>IPP_FINISHINGS_CUPS_FOLD_DOUBLE_GATE
</dt>
6102 <dd class=
"description">Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically
</dd>
6103 <dt>IPP_FINISHINGS_CUPS_FOLD_GATE
</dt>
6104 <dd class=
"description">Fold the top and bottom quarters of the paper towards the midline
</dd>
6105 <dt>IPP_FINISHINGS_CUPS_FOLD_HALF
</dt>
6106 <dd class=
"description">Fold the paper in half vertically
</dd>
6107 <dt>IPP_FINISHINGS_CUPS_FOLD_HALF_Z
</dt>
6108 <dd class=
"description">Fold the paper in half horizontally, then Z-fold the paper vertically
</dd>
6109 <dt>IPP_FINISHINGS_CUPS_FOLD_LEFT_GATE
</dt>
6110 <dd class=
"description">Fold the top quarter of the paper towards the midline
</dd>
6111 <dt>IPP_FINISHINGS_CUPS_FOLD_LETTER
</dt>
6112 <dd class=
"description">Fold the paper into three sections vertically; sometimes also known as a C fold
</dd>
6113 <dt>IPP_FINISHINGS_CUPS_FOLD_PARALLEL
</dt>
6114 <dd class=
"description">Fold the paper in half vertically two times, yielding four sections
</dd>
6115 <dt>IPP_FINISHINGS_CUPS_FOLD_POSTER
</dt>
6116 <dd class=
"description">Fold the paper in half horizontally and vertically; sometimes also called a cross fold
</dd>
6117 <dt>IPP_FINISHINGS_CUPS_FOLD_RIGHT_GATE
</dt>
6118 <dd class=
"description">Fold the bottom quarter of the paper towards the midline
</dd>
6119 <dt>IPP_FINISHINGS_CUPS_FOLD_Z
</dt>
6120 <dd class=
"description">Fold the paper vertically into three sections, forming a Z
</dd>
6121 <dt>IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_LEFT
</dt>
6122 <dd class=
"description">Punch
1 hole bottom left
</dd>
6123 <dt>IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_RIGHT
</dt>
6124 <dd class=
"description">Punch
1 hole bottom right
</dd>
6125 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_BOTTOM
</dt>
6126 <dd class=
"description">Punch
2 holes bottom edge
</dd>
6127 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_LEFT
</dt>
6128 <dd class=
"description">Punch
2 holes left side
</dd>
6129 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_RIGHT
</dt>
6130 <dd class=
"description">Punch
2 holes right side
</dd>
6131 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_TOP
</dt>
6132 <dd class=
"description">Punch
2 holes top edge
</dd>
6133 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_BOTTOM
</dt>
6134 <dd class=
"description">Punch
4 holes bottom edge
</dd>
6135 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_LEFT
</dt>
6136 <dd class=
"description">Punch
4 holes left side
</dd>
6137 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_RIGHT
</dt>
6138 <dd class=
"description">Punch
4 holes right side
</dd>
6139 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_TOP
</dt>
6140 <dd class=
"description">Punch
4 holes top edge
</dd>
6141 <dt>IPP_FINISHINGS_CUPS_PUNCH_TOP_LEFT
</dt>
6142 <dd class=
"description">Punch
1 hole top left
</dd>
6143 <dt>IPP_FINISHINGS_CUPS_PUNCH_TOP_RIGHT
</dt>
6144 <dd class=
"description">Punch
1 hole top right
</dd>
6145 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_BOTTOM
</dt>
6146 <dd class=
"description">Punch
3 holes bottom edge
</dd>
6147 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_LEFT
</dt>
6148 <dd class=
"description">Punch
3 holes left side
</dd>
6149 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_RIGHT
</dt>
6150 <dd class=
"description">Punch
3 holes right side
</dd>
6151 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_TOP
</dt>
6152 <dd class=
"description">Punch
3 holes top edge
</dd>
6153 <dt>IPP_FINISHINGS_EDGE_STITCH
</dt>
6154 <dd class=
"description">Stitch along any side
</dd>
6155 <dt>IPP_FINISHINGS_EDGE_STITCH_BOTTOM
</dt>
6156 <dd class=
"description">Stitch along bottom edge
</dd>
6157 <dt>IPP_FINISHINGS_EDGE_STITCH_LEFT
</dt>
6158 <dd class=
"description">Stitch along left side
</dd>
6159 <dt>IPP_FINISHINGS_EDGE_STITCH_RIGHT
</dt>
6160 <dd class=
"description">Stitch along right side
</dd>
6161 <dt>IPP_FINISHINGS_EDGE_STITCH_TOP
</dt>
6162 <dd class=
"description">Stitch along top edge
</dd>
6163 <dt>IPP_FINISHINGS_FOLD
</dt>
6164 <dd class=
"description">Fold (any type)
</dd>
6165 <dt>IPP_FINISHINGS_FOLD_ACCORDIAN
</dt>
6166 <dd class=
"description">Accordian-fold the paper vertically into four sections
</dd>
6167 <dt>IPP_FINISHINGS_FOLD_DOUBLE_GATE
</dt>
6168 <dd class=
"description">Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically
</dd>
6169 <dt>IPP_FINISHINGS_FOLD_ENGINEERING_Z
</dt>
6170 <dd class=
"description">Fold the paper vertically into two small sections and one larger, forming an elongated Z
</dd>
6171 <dt>IPP_FINISHINGS_FOLD_GATE
</dt>
6172 <dd class=
"description">Fold the top and bottom quarters of the paper towards the midline
</dd>
6173 <dt>IPP_FINISHINGS_FOLD_HALF
</dt>
6174 <dd class=
"description">Fold the paper in half vertically
</dd>
6175 <dt>IPP_FINISHINGS_FOLD_HALF_Z
</dt>
6176 <dd class=
"description">Fold the paper in half horizontally, then Z-fold the paper vertically
</dd>
6177 <dt>IPP_FINISHINGS_FOLD_LEFT_GATE
</dt>
6178 <dd class=
"description">Fold the top quarter of the paper towards the midline
</dd>
6179 <dt>IPP_FINISHINGS_FOLD_LETTER
</dt>
6180 <dd class=
"description">Fold the paper into three sections vertically; sometimes also known as a C fold
</dd>
6181 <dt>IPP_FINISHINGS_FOLD_PARALLEL
</dt>
6182 <dd class=
"description">Fold the paper in half vertically two times, yielding four sections
</dd>
6183 <dt>IPP_FINISHINGS_FOLD_POSTER
</dt>
6184 <dd class=
"description">Fold the paper in half horizontally and vertically; sometimes also called a cross fold
</dd>
6185 <dt>IPP_FINISHINGS_FOLD_RIGHT_GATE
</dt>
6186 <dd class=
"description">Fold the bottom quarter of the paper towards the midline
</dd>
6187 <dt>IPP_FINISHINGS_FOLD_Z
</dt>
6188 <dd class=
"description">Fold the paper vertically into three sections, forming a Z
</dd>
6189 <dt>IPP_FINISHINGS_JOG_OFFSET
</dt>
6190 <dd class=
"description">Offset for binding (any type)
</dd>
6191 <dt>IPP_FINISHINGS_LAMINATE
</dt>
6192 <dd class=
"description">Apply protective (solid) material
</dd>
6193 <dt>IPP_FINISHINGS_NONE
</dt>
6194 <dd class=
"description">No finishing
</dd>
6195 <dt>IPP_FINISHINGS_PUNCH
</dt>
6196 <dd class=
"description">Punch (any location/count)
</dd>
6197 <dt>IPP_FINISHINGS_PUNCH_BOTTOM_LEFT
</dt>
6198 <dd class=
"description">Punch
1 hole bottom left
</dd>
6199 <dt>IPP_FINISHINGS_PUNCH_BOTTOM_RIGHT
</dt>
6200 <dd class=
"description">Punch
1 hole bottom right
</dd>
6201 <dt>IPP_FINISHINGS_PUNCH_DUAL_BOTTOM
</dt>
6202 <dd class=
"description">Punch
2 holes bottom edge
</dd>
6203 <dt>IPP_FINISHINGS_PUNCH_DUAL_LEFT
</dt>
6204 <dd class=
"description">Punch
2 holes left side
</dd>
6205 <dt>IPP_FINISHINGS_PUNCH_DUAL_RIGHT
</dt>
6206 <dd class=
"description">Punch
2 holes right side
</dd>
6207 <dt>IPP_FINISHINGS_PUNCH_DUAL_TOP
</dt>
6208 <dd class=
"description">Punch
2 holes top edge
</dd>
6209 <dt>IPP_FINISHINGS_PUNCH_MULTIPLE_BOTTOM
</dt>
6210 <dd class=
"description">Pucnh multiple holes bottom edge
</dd>
6211 <dt>IPP_FINISHINGS_PUNCH_MULTIPLE_LEFT
</dt>
6212 <dd class=
"description">Pucnh multiple holes left side
</dd>
6213 <dt>IPP_FINISHINGS_PUNCH_MULTIPLE_RIGHT
</dt>
6214 <dd class=
"description">Pucnh multiple holes right side
</dd>
6215 <dt>IPP_FINISHINGS_PUNCH_MULTIPLE_TOP
</dt>
6216 <dd class=
"description">Pucnh multiple holes top edge
</dd>
6217 <dt>IPP_FINISHINGS_PUNCH_QUAD_BOTTOM
</dt>
6218 <dd class=
"description">Punch
4 holes bottom edge
</dd>
6219 <dt>IPP_FINISHINGS_PUNCH_QUAD_LEFT
</dt>
6220 <dd class=
"description">Punch
4 holes left side
</dd>
6221 <dt>IPP_FINISHINGS_PUNCH_QUAD_RIGHT
</dt>
6222 <dd class=
"description">Punch
4 holes right side
</dd>
6223 <dt>IPP_FINISHINGS_PUNCH_QUAD_TOP
</dt>
6224 <dd class=
"description">Punch
4 holes top edge
</dd>
6225 <dt>IPP_FINISHINGS_PUNCH_TOP_LEFT
</dt>
6226 <dd class=
"description">Punch
1 hole top left
</dd>
6227 <dt>IPP_FINISHINGS_PUNCH_TOP_RIGHT
</dt>
6228 <dd class=
"description">Punch
1 hole top right
</dd>
6229 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_BOTTOM
</dt>
6230 <dd class=
"description">Punch
3 holes bottom edge
</dd>
6231 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_LEFT
</dt>
6232 <dd class=
"description">Punch
3 holes left side
</dd>
6233 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_RIGHT
</dt>
6234 <dd class=
"description">Punch
3 holes right side
</dd>
6235 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_TOP
</dt>
6236 <dd class=
"description">Punch
3 holes top edge
</dd>
6237 <dt>IPP_FINISHINGS_SADDLE_STITCH
</dt>
6238 <dd class=
"description">Staple interior
</dd>
6239 <dt>IPP_FINISHINGS_STAPLE
</dt>
6240 <dd class=
"description">Staple (any location)
</dd>
6241 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_LEFT
</dt>
6242 <dd class=
"description">Staple bottom left corner
</dd>
6243 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT
</dt>
6244 <dd class=
"description">Staple bottom right corner
</dd>
6245 <dt>IPP_FINISHINGS_STAPLE_DUAL_BOTTOM
</dt>
6246 <dd class=
"description">Two staples on bottom
</dd>
6247 <dt>IPP_FINISHINGS_STAPLE_DUAL_LEFT
</dt>
6248 <dd class=
"description">Two staples on left
</dd>
6249 <dt>IPP_FINISHINGS_STAPLE_DUAL_RIGHT
</dt>
6250 <dd class=
"description">Two staples on right
</dd>
6251 <dt>IPP_FINISHINGS_STAPLE_DUAL_TOP
</dt>
6252 <dd class=
"description">Two staples on top
</dd>
6253 <dt>IPP_FINISHINGS_STAPLE_TOP_LEFT
</dt>
6254 <dd class=
"description">Staple top left corner
</dd>
6255 <dt>IPP_FINISHINGS_STAPLE_TOP_RIGHT
</dt>
6256 <dd class=
"description">Staple top right corner
</dd>
6257 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_BOTTOM
</dt>
6258 <dd class=
"description">Three staples on bottom
</dd>
6259 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_LEFT
</dt>
6260 <dd class=
"description">Three staples on left
</dd>
6261 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_RIGHT
</dt>
6262 <dd class=
"description">Three staples on right
</dd>
6263 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_TOP
</dt>
6264 <dd class=
"description">Three staples on top
</dd>
6265 <dt>IPP_FINISHINGS_TRIM
</dt>
6266 <dd class=
"description">Trim (any type)
</dd>
6267 <dt>IPP_FINISHINGS_TRIM_AFTER_COPIES
</dt>
6268 <dd class=
"description">Trim output after each copy
</dd>
6269 <dt>IPP_FINISHINGS_TRIM_AFTER_DOCUMENTS
</dt>
6270 <dd class=
"description">Trim output after each document
</dd>
6271 <dt>IPP_FINISHINGS_TRIM_AFTER_JOB
</dt>
6272 <dd class=
"description">Trim output after job
</dd>
6273 <dt>IPP_FINISHINGS_TRIM_AFTER_PAGES
</dt>
6274 <dd class=
"description">Trim output after each page
</dd>
6276 <h3 class=
"enumeration"><a id=
"ipp_jcollate_e">ipp_jcollate_e
</a></h3>
6277 <p class=
"description">Job collation types
</p>
6278 <h4 class=
"constants">Constants
</h4>
6280 <dt>IPP_JCOLLATE_COLLATED_DOCUMENTS
</dt>
6281 <dt>IPP_JCOLLATE_UNCOLLATED_DOCUMENTS
</dt>
6282 <dt>IPP_JCOLLATE_UNCOLLATED_SHEETS
</dt>
6284 <h3 class=
"enumeration"><a id=
"ipp_jstate_e">ipp_jstate_e
</a></h3>
6285 <p class=
"description">Job states
</p>
6286 <h4 class=
"constants">Constants
</h4>
6288 <dt>IPP_JSTATE_ABORTED
</dt>
6289 <dd class=
"description">Job has aborted due to error
</dd>
6290 <dt>IPP_JSTATE_CANCELED
</dt>
6291 <dd class=
"description">Job has been canceled
</dd>
6292 <dt>IPP_JSTATE_COMPLETED
</dt>
6293 <dd class=
"description">Job has completed successfully
</dd>
6294 <dt>IPP_JSTATE_HELD
</dt>
6295 <dd class=
"description">Job is held for printing
</dd>
6296 <dt>IPP_JSTATE_PENDING
</dt>
6297 <dd class=
"description">Job is waiting to be printed
</dd>
6298 <dt>IPP_JSTATE_PROCESSING
</dt>
6299 <dd class=
"description">Job is currently printing
</dd>
6300 <dt>IPP_JSTATE_STOPPED
</dt>
6301 <dd class=
"description">Job has been stopped
</dd>
6303 <h3 class=
"enumeration"><a id=
"ipp_op_e">ipp_op_e
</a></h3>
6304 <p class=
"description">IPP operations
</p>
6305 <h4 class=
"constants">Constants
</h4>
6307 <dt>IPP_OP_ACKNOWLEDGE_DOCUMENT
</dt>
6308 <dd class=
"description">Acknowledge-Document
</dd>
6309 <dt>IPP_OP_ACKNOWLEDGE_IDENTIFY_PRINTER
</dt>
6310 <dd class=
"description">Acknowledge-Identify-Printer
</dd>
6311 <dt>IPP_OP_ACKNOWLEDGE_JOB
</dt>
6312 <dd class=
"description">Acknowledge-Job
</dd>
6313 <dt>IPP_OP_ACTIVATE_PRINTER
</dt>
6314 <dd class=
"description">Start a printer
</dd>
6315 <dt>IPP_OP_ADD_DOCUMENT_IMAGES
</dt>
6316 <dd class=
"description">Add-Document-Images
</dd>
6317 <dt>IPP_OP_CANCEL_CURRENT_JOB
</dt>
6318 <dd class=
"description">Cancel the current job
</dd>
6319 <dt>IPP_OP_CANCEL_DOCUMENT
</dt>
6320 <dd class=
"description">Cancel-Document
</dd>
6321 <dt>IPP_OP_CANCEL_JOB
</dt>
6322 <dd class=
"description">Cancel a job
</dd>
6323 <dt>IPP_OP_CANCEL_JOBS
</dt>
6324 <dd class=
"description">Cancel-Jobs
</dd>
6325 <dt>IPP_OP_CANCEL_MY_JOBS
</dt>
6326 <dd class=
"description">Cancel-My-Jobs
</dd>
6327 <dt>IPP_OP_CANCEL_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
6328 <dd class=
"description">Cancel a subscription
</dd>
6329 <dt>IPP_OP_CLOSE_JOB
</dt>
6330 <dd class=
"description">Close-Job
</dd>
6331 <dt>IPP_OP_CREATE_JOB
</dt>
6332 <dd class=
"description">Create an empty print job
</dd>
6333 <dt>IPP_OP_CREATE_JOB_SUBSCRIPTIONS
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
6334 <dd class=
"description">Create one of more job subscriptions
</dd>
6335 <dt>IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
6336 <dd class=
"description">Create one or more printer subscriptions
</dd>
6337 <dt>IPP_OP_CUPS_ACCEPT_JOBS
</dt>
6338 <dd class=
"description">Accept new jobs on a printer
</dd>
6339 <dt>IPP_OP_CUPS_ADD_MODIFY_CLASS
</dt>
6340 <dd class=
"description">Add or modify a class
</dd>
6341 <dt>IPP_OP_CUPS_ADD_MODIFY_PRINTER
</dt>
6342 <dd class=
"description">Add or modify a printer
</dd>
6343 <dt>IPP_OP_CUPS_AUTHENTICATE_JOB
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
6344 <dd class=
"description">Authenticate a job
</dd>
6345 <dt>IPP_OP_CUPS_CREATE_LOCAL_PRINTER
<span class=
"info"> CUPS
2.2 </span></dt>
6346 <dd class=
"description">Create a local (temporary) printer
<dt>IPP_OP_CUPS_DELETE_CLASS
</dt>
6347 <dd class=
"description">Delete a class
</dd>
6348 <dt>IPP_OP_CUPS_DELETE_PRINTER
</dt>
6349 <dd class=
"description">Delete a printer
</dd>
6350 <dt>IPP_OP_CUPS_GET_CLASSES
<span class=
"info"> DEPRECATED
 </span></dt>
6351 <dd class=
"description">Get a list of classes
</dd>
6352 <dt>IPP_OP_CUPS_GET_DEFAULT
</dt>
6353 <dd class=
"description">Get the default printer
</dd>
6354 <dt>IPP_OP_CUPS_GET_DEVICES
<span class=
"info"> DEPRECATED
 </span></dt>
6355 <dd class=
"description">Get a list of supported devices
</dd>
6356 <dt>IPP_OP_CUPS_GET_DOCUMENT
<span class=
"info"> CUPS
1.4/macOS
10.6 </span></dt>
6357 <dd class=
"description">Get a document file
</dd>
6358 <dt>IPP_OP_CUPS_GET_PPD
<span class=
"info"> DEPRECATED
 </span></dt>
6359 <dd class=
"description">Get a PPD file
</dd>
6360 <dt>IPP_OP_CUPS_GET_PPDS
<span class=
"info"> DEPRECATED
 </span></dt>
6361 <dd class=
"description">Get a list of supported drivers
</dd>
6362 <dt>IPP_OP_CUPS_GET_PRINTERS
</dt>
6363 <dd class=
"description">Get a list of printers and/or classes
</dd>
6364 <dt>IPP_OP_CUPS_INVALID
</dt>
6365 <dd class=
"description">Invalid operation name for
<a href=
"#ippOpValue"><code>ippOpValue
</code></a></dd>
6366 <dt>IPP_OP_CUPS_MOVE_JOB
</dt>
6367 <dd class=
"description">Move a job to a different printer
</dd>
6368 <dt>IPP_OP_CUPS_REJECT_JOBS
</dt>
6369 <dd class=
"description">Reject new jobs on a printer
</dd>
6370 <dt>IPP_OP_CUPS_SET_DEFAULT
</dt>
6371 <dd class=
"description">Set the default printer
</dd>
6372 <dt>IPP_OP_DEACTIVATE_PRINTER
</dt>
6373 <dd class=
"description">Stop a printer
</dd>
6374 <dt>IPP_OP_DELETE_DOCUMENT
</dt>
6375 <dd class=
"description">Delete-Document
</dd>
6376 <dt>IPP_OP_DEREGISTER_OUTPUT_DEVICE
</dt>
6377 <dd class=
"description">Deregister-Output-Device
</dd>
6378 <dt>IPP_OP_DISABLE_PRINTER
</dt>
6379 <dd class=
"description">Stop a printer
</dd>
6380 <dt>IPP_OP_ENABLE_PRINTER
</dt>
6381 <dd class=
"description">Start a printer
</dd>
6382 <dt>IPP_OP_FETCH_DOCUMENT
</dt>
6383 <dd class=
"description">Fetch-Document
</dd>
6384 <dt>IPP_OP_FETCH_JOB
</dt>
6385 <dd class=
"description">Fetch-Job
</dd>
6386 <dt>IPP_OP_GET_DOCUMENTS
</dt>
6387 <dd class=
"description">Get-Documents
</dd>
6388 <dt>IPP_OP_GET_DOCUMENT_ATTRIBUTES
</dt>
6389 <dd class=
"description">Get-Document-Attributes
</dd>
6390 <dt>IPP_OP_GET_JOBS
</dt>
6391 <dd class=
"description">Get a list of jobs
</dd>
6392 <dt>IPP_OP_GET_JOB_ATTRIBUTES
</dt>
6393 <dd class=
"description">Get job attributes
</dd>
6394 <dt>IPP_OP_GET_NEXT_DOCUMENT_DATA
</dt>
6395 <dd class=
"description">Get-Next-Document-Data
</dd>
6396 <dt>IPP_OP_GET_NOTIFICATIONS
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
6397 <dd class=
"description">Get notification events
</dd>
6398 <dt>IPP_OP_GET_OUTPUT_DEVICE_ATTRIBUTES
</dt>
6399 <dd class=
"description">Get-Output-Device-Attributes
</dd>
6400 <dt>IPP_OP_GET_PRINTER_ATTRIBUTES
</dt>
6401 <dd class=
"description">Get printer attributes
</dd>
6402 <dt>IPP_OP_GET_PRINTER_SUPPORTED_VALUES
</dt>
6403 <dd class=
"description">Get supported attribute values
</dd>
6404 <dt>IPP_OP_GET_SUBSCRIPTIONS
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
6405 <dd class=
"description">Get list of subscriptions
</dd>
6406 <dt>IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
6407 <dd class=
"description">Get subscription attributes
</dd>
6408 <dt>IPP_OP_HOLD_JOB
</dt>
6409 <dd class=
"description">Hold a job for printing
</dd>
6410 <dt>IPP_OP_HOLD_NEW_JOBS
</dt>
6411 <dd class=
"description">Hold new jobs
</dd>
6412 <dt>IPP_OP_IDENTIFY_PRINTER
</dt>
6413 <dd class=
"description">Identify-Printer
</dd>
6414 <dt>IPP_OP_PAUSE_PRINTER
</dt>
6415 <dd class=
"description">Stop a printer
</dd>
6416 <dt>IPP_OP_PAUSE_PRINTER_AFTER_CURRENT_JOB
</dt>
6417 <dd class=
"description">Stop printer after the current job
</dd>
6418 <dt>IPP_OP_PRINT_JOB
</dt>
6419 <dd class=
"description">Print a single file
</dd>
6420 <dt>IPP_OP_PRINT_URI
</dt>
6421 <dd class=
"description">Print a single URL
</dd>
6422 <dt>IPP_OP_PROMOTE_JOB
</dt>
6423 <dd class=
"description">Promote a job to print sooner
</dd>
6424 <dt>IPP_OP_PURGE_JOBS
</dt>
6425 <dd class=
"description">Cancel all jobs
</dd>
6426 <dt>IPP_OP_RELEASE_HELD_NEW_JOBS
</dt>
6427 <dd class=
"description">Release new jobs
</dd>
6428 <dt>IPP_OP_RELEASE_JOB
</dt>
6429 <dd class=
"description">Release a job for printing
</dd>
6430 <dt>IPP_OP_RENEW_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
6431 <dd class=
"description">Renew a printer subscription
</dd>
6432 <dt>IPP_OP_REPROCESS_JOB
</dt>
6433 <dd class=
"description">Reprint a job
</dd>
6434 <dt>IPP_OP_RESTART_JOB
</dt>
6435 <dd class=
"description">Reprint a job
</dd>
6436 <dt>IPP_OP_RESTART_PRINTER
</dt>
6437 <dd class=
"description">Restart a printer
</dd>
6438 <dt>IPP_OP_RESUBMIT_JOB
</dt>
6439 <dd class=
"description">Resubmit-Job
</dd>
6440 <dt>IPP_OP_RESUME_JOB
</dt>
6441 <dd class=
"description">Resume the current job
</dd>
6442 <dt>IPP_OP_RESUME_PRINTER
</dt>
6443 <dd class=
"description">Start a printer
</dd>
6444 <dt>IPP_OP_SCHEDULE_JOB_AFTER
</dt>
6445 <dd class=
"description">Schedule a job to print after another
</dd>
6446 <dt>IPP_OP_SEND_DOCUMENT
</dt>
6447 <dd class=
"description">Add a file to a job
</dd>
6448 <dt>IPP_OP_SEND_URI
</dt>
6449 <dd class=
"description">Add a URL to a job
</dd>
6450 <dt>IPP_OP_SET_DOCUMENT_ATTRIBUTES
</dt>
6451 <dd class=
"description">Set-Document-Attributes
</dd>
6452 <dt>IPP_OP_SET_JOB_ATTRIBUTES
</dt>
6453 <dd class=
"description">Set job attributes
</dd>
6454 <dt>IPP_OP_SET_PRINTER_ATTRIBUTES
</dt>
6455 <dd class=
"description">Set printer attributes
</dd>
6456 <dt>IPP_OP_SHUTDOWN_PRINTER
</dt>
6457 <dd class=
"description">Turn a printer off
</dd>
6458 <dt>IPP_OP_STARTUP_PRINTER
</dt>
6459 <dd class=
"description">Turn a printer on
</dd>
6460 <dt>IPP_OP_SUSPEND_CURRENT_JOB
</dt>
6461 <dd class=
"description">Suspend the current job
</dd>
6462 <dt>IPP_OP_UPDATE_ACTIVE_JOBS
</dt>
6463 <dd class=
"description">Update-Active-Jobs
</dd>
6464 <dt>IPP_OP_UPDATE_DOCUMENT_STATUS
</dt>
6465 <dd class=
"description">Update-Document-Status
</dd>
6466 <dt>IPP_OP_UPDATE_JOB_STATUS
</dt>
6467 <dd class=
"description">Update-Job-Status
</dd>
6468 <dt>IPP_OP_UPDATE_OUTPUT_DEVICE_ATTRIBUTES
</dt>
6469 <dd class=
"description">Update-Output-Device-Attributes
</dd>
6470 <dt>IPP_OP_VALIDATE_DOCUMENT
</dt>
6471 <dd class=
"description">Validate-Document
</dd>
6472 <dt>IPP_OP_VALIDATE_JOB
</dt>
6473 <dd class=
"description">Validate job options
</dd>
6475 <h3 class=
"enumeration"><a id=
"ipp_orient_e">ipp_orient_e
</a></h3>
6476 <p class=
"description">Orientation values
</p>
6477 <h4 class=
"constants">Constants
</h4>
6479 <dt>IPP_ORIENT_LANDSCAPE
</dt>
6480 <dd class=
"description">90 degrees counter-clockwise
</dd>
6481 <dt>IPP_ORIENT_NONE
</dt>
6482 <dd class=
"description">No rotation
</dd>
6483 <dt>IPP_ORIENT_PORTRAIT
</dt>
6484 <dd class=
"description">No rotation
</dd>
6485 <dt>IPP_ORIENT_REVERSE_LANDSCAPE
</dt>
6486 <dd class=
"description">90 degrees clockwise
</dd>
6487 <dt>IPP_ORIENT_REVERSE_PORTRAIT
</dt>
6488 <dd class=
"description">180 degrees
</dd>
6490 <h3 class=
"enumeration"><a id=
"ipp_pstate_e">ipp_pstate_e
</a></h3>
6491 <p class=
"description">Printer states
</p>
6492 <h4 class=
"constants">Constants
</h4>
6494 <dt>IPP_PSTATE_IDLE
</dt>
6495 <dd class=
"description">Printer is idle
</dd>
6496 <dt>IPP_PSTATE_PROCESSING
</dt>
6497 <dd class=
"description">Printer is working
</dd>
6498 <dt>IPP_PSTATE_STOPPED
</dt>
6499 <dd class=
"description">Printer is stopped
</dd>
6501 <h3 class=
"enumeration"><a id=
"ipp_quality_e">ipp_quality_e
</a></h3>
6502 <p class=
"description">Qualities
</p>
6503 <h4 class=
"constants">Constants
</h4>
6505 <dt>IPP_QUALITY_DRAFT
</dt>
6506 <dd class=
"description">Draft quality
</dd>
6507 <dt>IPP_QUALITY_HIGH
</dt>
6508 <dd class=
"description">High quality
</dd>
6509 <dt>IPP_QUALITY_NORMAL
</dt>
6510 <dd class=
"description">Normal quality
</dd>
6512 <h3 class=
"enumeration"><a id=
"ipp_res_e">ipp_res_e
</a></h3>
6513 <p class=
"description">Resolution units
</p>
6514 <h4 class=
"constants">Constants
</h4>
6516 <dt>IPP_RES_PER_CM
</dt>
6517 <dd class=
"description">Pixels per centimeter
</dd>
6518 <dt>IPP_RES_PER_INCH
</dt>
6519 <dd class=
"description">Pixels per inch
</dd>
6521 <h3 class=
"enumeration"><a id=
"ipp_state_e">ipp_state_e
</a></h3>
6522 <p class=
"description">IPP states
</p>
6523 <h4 class=
"constants">Constants
</h4>
6525 <dt>IPP_STATE_ATTRIBUTE
</dt>
6526 <dd class=
"description">One or more attributes need to be sent/received
</dd>
6527 <dt>IPP_STATE_DATA
</dt>
6528 <dd class=
"description">IPP request data needs to be sent/received
</dd>
6529 <dt>IPP_STATE_ERROR
</dt>
6530 <dd class=
"description">An error occurred
</dd>
6531 <dt>IPP_STATE_HEADER
</dt>
6532 <dd class=
"description">The request header needs to be sent/received
</dd>
6533 <dt>IPP_STATE_IDLE
</dt>
6534 <dd class=
"description">Nothing is happening/request completed
</dd>
6536 <h3 class=
"enumeration"><a id=
"ipp_status_e">ipp_status_e
</a></h3>
6537 <p class=
"description">IPP status codes
</p>
6538 <h4 class=
"constants">Constants
</h4>
6540 <dt>IPP_STATUS_CUPS_INVALID
</dt>
6541 <dd class=
"description">Invalid status name for
<a href=
"#ippErrorValue"><code>ippErrorValue
</code></a></dd>
6542 <dt>IPP_STATUS_CUPS_SEE_OTHER
</dt>
6543 <dd class=
"description">cups-see-other
</dd>
6544 <dt>IPP_STATUS_ERROR_ACCOUNT_AUTHORIZATION_FAILED
</dt>
6545 <dd class=
"description">client-error-account-authorization-failed
</dd>
6546 <dt>IPP_STATUS_ERROR_ACCOUNT_CLOSED
</dt>
6547 <dd class=
"description">client-error-account-closed
</dd>
6548 <dt>IPP_STATUS_ERROR_ACCOUNT_INFO_NEEDED
</dt>
6549 <dd class=
"description">client-error-account-info-needed
</dd>
6550 <dt>IPP_STATUS_ERROR_ACCOUNT_LIMIT_REACHED
</dt>
6551 <dd class=
"description">client-error-account-limit-reached
</dd>
6552 <dt>IPP_STATUS_ERROR_ATTRIBUTES_NOT_SETTABLE
</dt>
6553 <dd class=
"description">client-error-attributes-not-settable
</dd>
6554 <dt>IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES
</dt>
6555 <dd class=
"description">client-error-attributes-or-values-not-supported
</dd>
6556 <dt>IPP_STATUS_ERROR_BAD_REQUEST
</dt>
6557 <dd class=
"description">client-error-bad-request
</dd>
6558 <dt>IPP_STATUS_ERROR_BUSY
</dt>
6559 <dd class=
"description">server-error-busy
</dd>
6560 <dt>IPP_STATUS_ERROR_CHARSET
</dt>
6561 <dd class=
"description">client-error-charset-not-supported
</dd>
6562 <dt>IPP_STATUS_ERROR_COMPRESSION_ERROR
</dt>
6563 <dd class=
"description">client-error-compression-error
</dd>
6564 <dt>IPP_STATUS_ERROR_COMPRESSION_NOT_SUPPORTED
</dt>
6565 <dd class=
"description">client-error-compression-not-supported
</dd>
6566 <dt>IPP_STATUS_ERROR_CONFLICTING
</dt>
6567 <dd class=
"description">client-error-conflicting-attributes
</dd>
6568 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED
<span class=
"info"> DEPRECATED
 </span></dt>
6569 <dd class=
"description">cups-error-account-authorization-failed
</dd>
6570 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED
</dt>
6571 <dd class=
"description">cups-error-account-closed @deprecate@
</dd>
6572 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED
<span class=
"info"> DEPRECATED
 </span></dt>
6573 <dd class=
"description">cups-error-account-info-needed
</dd>
6574 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_LIMIT_REACHED
<span class=
"info"> DEPRECATED
 </span></dt>
6575 <dd class=
"description">cups-error-account-limit-reached
</dd>
6576 <dt>IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED
<span class=
"info"> CUPS
1.5/macOS
10.7 </span></dt>
6577 <dd class=
"description">cups-authentication-canceled - Authentication canceled by user
</dd>
6578 <dt>IPP_STATUS_ERROR_CUPS_PKI
<span class=
"info"> CUPS
1.5/macOS
10.7 </span></dt>
6579 <dd class=
"description">cups-pki-error - Error negotiating a secure connection
</dd>
6580 <dt>IPP_STATUS_ERROR_CUPS_UPGRADE_REQUIRED
</dt>
6581 <dd class=
"description">cups-upgrade-required - TLS upgrade required
</dd>
6582 <dt>IPP_STATUS_ERROR_DEVICE
</dt>
6583 <dd class=
"description">server-error-device-error
</dd>
6584 <dt>IPP_STATUS_ERROR_DOCUMENT_ACCESS
</dt>
6585 <dd class=
"description">client-error-document-access-error
</dd>
6586 <dt>IPP_STATUS_ERROR_DOCUMENT_FORMAT_ERROR
</dt>
6587 <dd class=
"description">client-error-document-format-error
</dd>
6588 <dt>IPP_STATUS_ERROR_DOCUMENT_FORMAT_NOT_SUPPORTED
</dt>
6589 <dd class=
"description">client-error-document-format-not-supported
</dd>
6590 <dt>IPP_STATUS_ERROR_DOCUMENT_PASSWORD
</dt>
6591 <dd class=
"description">client-error-document-password-error
</dd>
6592 <dt>IPP_STATUS_ERROR_DOCUMENT_PERMISSION
</dt>
6593 <dd class=
"description">client-error-document-permission-error
</dd>
6594 <dt>IPP_STATUS_ERROR_DOCUMENT_SECURITY
</dt>
6595 <dd class=
"description">client-error-document-security-error
</dd>
6596 <dt>IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE
</dt>
6597 <dd class=
"description">client-error-document-unprintable-error
</dd>
6598 <dt>IPP_STATUS_ERROR_FORBIDDEN
</dt>
6599 <dd class=
"description">client-error-forbidden
</dd>
6600 <dt>IPP_STATUS_ERROR_GONE
</dt>
6601 <dd class=
"description">client-error-gone
</dd>
6602 <dt>IPP_STATUS_ERROR_IGNORED_ALL_SUBSCRIPTIONS
</dt>
6603 <dd class=
"description">client-error-ignored-all-subscriptions
</dd>
6604 <dt>IPP_STATUS_ERROR_INTERNAL
</dt>
6605 <dd class=
"description">server-error-internal-error
</dd>
6606 <dt>IPP_STATUS_ERROR_JOB_CANCELED
</dt>
6607 <dd class=
"description">server-error-job-canceled
</dd>
6608 <dt>IPP_STATUS_ERROR_MULTIPLE_JOBS_NOT_SUPPORTED
</dt>
6609 <dd class=
"description">server-error-multiple-document-jobs-not-supported
</dd>
6610 <dt>IPP_STATUS_ERROR_NOT_ACCEPTING_JOBS
</dt>
6611 <dd class=
"description">server-error-not-accepting-jobs
</dd>
6612 <dt>IPP_STATUS_ERROR_NOT_AUTHENTICATED
</dt>
6613 <dd class=
"description">client-error-not-authenticated
</dd>
6614 <dt>IPP_STATUS_ERROR_NOT_AUTHORIZED
</dt>
6615 <dd class=
"description">client-error-not-authorized
</dd>
6616 <dt>IPP_STATUS_ERROR_NOT_FETCHABLE
</dt>
6617 <dd class=
"description">client-error-not-fetchable
</dd>
6618 <dt>IPP_STATUS_ERROR_NOT_FOUND
</dt>
6619 <dd class=
"description">client-error-not-found
</dd>
6620 <dt>IPP_STATUS_ERROR_NOT_POSSIBLE
</dt>
6621 <dd class=
"description">client-error-not-possible
</dd>
6622 <dt>IPP_STATUS_ERROR_OPERATION_NOT_SUPPORTED
</dt>
6623 <dd class=
"description">server-error-operation-not-supported
</dd>
6624 <dt>IPP_STATUS_ERROR_PRINTER_IS_DEACTIVATED
</dt>
6625 <dd class=
"description">server-error-printer-is-deactivated
</dd>
6626 <dt>IPP_STATUS_ERROR_REQUEST_ENTITY
</dt>
6627 <dd class=
"description">client-error-request-entity-too-large
</dd>
6628 <dt>IPP_STATUS_ERROR_REQUEST_VALUE
</dt>
6629 <dd class=
"description">client-error-request-value-too-long
</dd>
6630 <dt>IPP_STATUS_ERROR_SERVICE_UNAVAILABLE
</dt>
6631 <dd class=
"description">server-error-service-unavailable
</dd>
6632 <dt>IPP_STATUS_ERROR_TEMPORARY
</dt>
6633 <dd class=
"description">server-error-temporary-error
</dd>
6634 <dt>IPP_STATUS_ERROR_TIMEOUT
</dt>
6635 <dd class=
"description">client-error-timeout
</dd>
6636 <dt>IPP_STATUS_ERROR_TOO_MANY_DOCUMENTS
</dt>
6637 <dd class=
"description">server-error-too-many-documents
</dd>
6638 <dt>IPP_STATUS_ERROR_TOO_MANY_JOBS
</dt>
6639 <dd class=
"description">server-error-too-many-jobs
</dd>
6640 <dt>IPP_STATUS_ERROR_TOO_MANY_SUBSCRIPTIONS
</dt>
6641 <dd class=
"description">client-error-too-many-subscriptions
</dd>
6642 <dt>IPP_STATUS_ERROR_URI_SCHEME
</dt>
6643 <dd class=
"description">client-error-uri-scheme-not-supported
</dd>
6644 <dt>IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED
</dt>
6645 <dd class=
"description">server-error-version-not-supported
</dd>
6646 <dt>IPP_STATUS_OK
</dt>
6647 <dd class=
"description">successful-ok
</dd>
6648 <dt>IPP_STATUS_OK_CONFLICTING
</dt>
6649 <dd class=
"description">successful-ok-conflicting-attributes
</dd>
6650 <dt>IPP_STATUS_OK_EVENTS_COMPLETE
</dt>
6651 <dd class=
"description">successful-ok-events-complete
</dd>
6652 <dt>IPP_STATUS_OK_IGNORED_OR_SUBSTITUTED
</dt>
6653 <dd class=
"description">successful-ok-ignored-or-substituted-attributes
</dd>
6654 <dt>IPP_STATUS_OK_IGNORED_SUBSCRIPTIONS
</dt>
6655 <dd class=
"description">successful-ok-ignored-subscriptions
</dd>
6656 <dt>IPP_STATUS_OK_TOO_MANY_EVENTS
</dt>
6657 <dd class=
"description">successful-ok-too-many-events
</dd>
6659 <h3 class=
"enumeration"><a id=
"ipp_tag_e">ipp_tag_e
</a></h3>
6660 <p class=
"description">Format tags for attributes
</p>
6661 <h4 class=
"constants">Constants
</h4>
6663 <dt>IPP_TAG_ADMINDEFINE
</dt>
6664 <dd class=
"description">Admin-defined value
</dd>
6665 <dt>IPP_TAG_BEGIN_COLLECTION
</dt>
6666 <dd class=
"description">Beginning of collection value
</dd>
6667 <dt>IPP_TAG_BOOLEAN
</dt>
6668 <dd class=
"description">Boolean value
</dd>
6669 <dt>IPP_TAG_CHARSET
</dt>
6670 <dd class=
"description">Character set value
</dd>
6671 <dt>IPP_TAG_CUPS_INVALID
</dt>
6672 <dd class=
"description">Invalid tag name for
<a href=
"#ippTagValue"><code>ippTagValue
</code></a></dd>
6673 <dt>IPP_TAG_DATE
</dt>
6674 <dd class=
"description">Date/time value
</dd>
6675 <dt>IPP_TAG_DEFAULT
</dt>
6676 <dd class=
"description">Default value
</dd>
6677 <dt>IPP_TAG_DELETEATTR
</dt>
6678 <dd class=
"description">Delete-attribute value
</dd>
6679 <dt>IPP_TAG_DOCUMENT
</dt>
6680 <dd class=
"description">Document group
</dd>
6681 <dt>IPP_TAG_END
</dt>
6682 <dd class=
"description">End-of-attributes
</dd>
6683 <dt>IPP_TAG_END_COLLECTION
</dt>
6684 <dd class=
"description">End of collection value
</dd>
6685 <dt>IPP_TAG_ENUM
</dt>
6686 <dd class=
"description">Enumeration value
</dd>
6687 <dt>IPP_TAG_EVENT_NOTIFICATION
</dt>
6688 <dd class=
"description">Event group
</dd>
6689 <dt>IPP_TAG_EXTENSION
</dt>
6690 <dd class=
"description">Extension point for
32-bit tags
</dd>
6691 <dt>IPP_TAG_INTEGER
</dt>
6692 <dd class=
"description">Integer value
</dd>
6693 <dt>IPP_TAG_JOB
</dt>
6694 <dd class=
"description">Job group
</dd>
6695 <dt>IPP_TAG_KEYWORD
</dt>
6696 <dd class=
"description">Keyword value
</dd>
6697 <dt>IPP_TAG_LANGUAGE
</dt>
6698 <dd class=
"description">Language value
</dd>
6699 <dt>IPP_TAG_MEMBERNAME
</dt>
6700 <dd class=
"description">Collection member name value
</dd>
6701 <dt>IPP_TAG_MIMETYPE
</dt>
6702 <dd class=
"description">MIME media type value
</dd>
6703 <dt>IPP_TAG_NAME
</dt>
6704 <dd class=
"description">Name value
</dd>
6705 <dt>IPP_TAG_NAMELANG
</dt>
6706 <dd class=
"description">Name-with-language value
</dd>
6707 <dt>IPP_TAG_NOTSETTABLE
</dt>
6708 <dd class=
"description">Not-settable value
</dd>
6709 <dt>IPP_TAG_NOVALUE
</dt>
6710 <dd class=
"description">No-value value
</dd>
6711 <dt>IPP_TAG_OPERATION
</dt>
6712 <dd class=
"description">Operation group
</dd>
6713 <dt>IPP_TAG_PRINTER
</dt>
6714 <dd class=
"description">Printer group
</dd>
6715 <dt>IPP_TAG_RANGE
</dt>
6716 <dd class=
"description">Range value
</dd>
6717 <dt>IPP_TAG_RESOLUTION
</dt>
6718 <dd class=
"description">Resolution value
</dd>
6719 <dt>IPP_TAG_STRING
</dt>
6720 <dd class=
"description">Octet string value
</dd>
6721 <dt>IPP_TAG_SUBSCRIPTION
</dt>
6722 <dd class=
"description">Subscription group
</dd>
6723 <dt>IPP_TAG_TEXT
</dt>
6724 <dd class=
"description">Text value
</dd>
6725 <dt>IPP_TAG_TEXTLANG
</dt>
6726 <dd class=
"description">Text-with-language value
</dd>
6727 <dt>IPP_TAG_UNKNOWN
</dt>
6728 <dd class=
"description">Unknown value
</dd>
6729 <dt>IPP_TAG_UNSUPPORTED_GROUP
</dt>
6730 <dd class=
"description">Unsupported attributes group
</dd>
6731 <dt>IPP_TAG_UNSUPPORTED_VALUE
</dt>
6732 <dd class=
"description">Unsupported value
</dd>
6733 <dt>IPP_TAG_URI
</dt>
6734 <dd class=
"description">URI value
</dd>
6735 <dt>IPP_TAG_URISCHEME
</dt>
6736 <dd class=
"description">URI scheme value
</dd>
6737 <dt>IPP_TAG_ZERO
</dt>
6738 <dd class=
"description">Zero tag - used for separators
</dd>