1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
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.7">
9 <style type=
"text/css"><!--
11 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
14 H1, H2, H3, H4, H5, H6, P, TD, TH {
15 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
19 font-family: monaco, courier, monospace;
24 font-family: monaco, courier, monospace;
28 border: dotted thin #7f7f7f;
56 border: dotted thin #999999;
61 PRE.command EM, PRE.example EM {
62 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
66 font-family: monaco, courier, monospace;
77 border: solid thin #999999;
88 -moz-border-radius: 10px;
93 text-decoration: none;
96 A:link:hover, A:visited:hover, A:active {
97 text-decoration: underline;
104 TR.data, TD.data, TR.data TD {
107 border-bottom: solid 1pt #999999;
111 border-bottom: solid 1pt #999999;
118 border: solid thin #999999;
119 border-collapse: collapse;
135 border: solid thin #cccccc;
142 border-bottom: solid thin #999999;
151 caption-side: bottom;
175 border: thin solid black;
183 H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
192 border-bottom: solid 2pt #000000;
195 DIV.indent, TABLE.indent {
203 border-collapse: collapse;
206 TABLE.indent TD, TABLE.indent TH {
211 border-collapse: collapse;
219 border-bottom: solid thin #cccccc;
224 vertical-align: bottom;
233 border-bottom: solid thin #eeeeee;
238 TABLE.list TR:nth-child(even) {
242 TABLE.list TR:nth-child(odd) {
261 font-family: monaco, courier, monospace;
265 border: solid thin #999999;
266 border-collapse: collapse;
271 DIV.summary TABLE TD, DIV.summary TABLE TH {
272 border: solid thin #999999;
278 DIV.summary TABLE THEAD TH {
282 /* API documentation styles... */
289 div.body h3, div.body h4, div.body h5 {
290 margin-bottom: 0.5em;
293 .class, .enumeration, .function, .struct, .typedef, .union {
294 border-bottom: solid thin #999999;
301 code, p.code, pre, ul.code li {
302 font-family: monaco, courier, monospace;
305 ul.code, ul.contents, ul.subcontents {
306 list-style-type: none;
316 ul.contents li ul.code, ul.contents li ul.subcontents {
329 margin-bottom: 0.5em;
332 /* This is just for the HTML files generated with the framedhelp target */
335 border: solid thin black;
344 div.contents ul.contents {
347 div.contents ul.subcontents li {
356 HTTP and IPP API header for CUPS.
358 Copyright 2007-2016 by Apple Inc.
359 Copyright 1997-2006 by Easy Software Products, all rights reserved.
361 These coded instructions, statements, and computer programs are the
362 property of Apple Inc. and are protected by Federal copyright
363 law. Distribution and use rights are outlined in the file "LICENSE.txt"
364 which should have been included with this file. If this file is
365 file is missing or damaged, see the license at "http://www.cups.org/".
368 <h1 class='title'
>HTTP and IPP APIs
</h1>
370 <div class='summary'
><table summary='General Information'
>
386 <td>Programming:
<a href='api-overview.html'
>Introduction to CUPS Programming
</a><br>
387 Programming:
<a href='api-cups.html'
>CUPS API
</a><br>
388 References:
<a href='spec-ipp.html'
>CUPS Implementation of IPP
</a></td>
392 <h2 class=
"title">Contents
</h2>
393 <ul class=
"contents">
394 <li><a href=
"#OVERVIEW">Overview
</a><ul class=
"subcontents">
395 <li><a href=
"#CREATING_URI_STRINGS">Creating URI Strings
</a></li>
396 <li><a href=
"#SENDING_REQUESTS_WITH_FILES">Sending Requests with Files
</a></li>
397 <li><a href=
"#ASYNCHRONOUS_REQUEST_PROCESSING">Asynchronous Request Processing
</a></li>
399 <li><a href=
"#FUNCTIONS">Functions
</a><ul class=
"code">
400 <li><a href=
"#cupsDoAuthentication" title=
"Authenticate a request.">cupsDoAuthentication
</a></li>
401 <li><a href=
"#cupsDoFileRequest" title=
"Do an IPP request with a file.">cupsDoFileRequest
</a></li>
402 <li><a href=
"#cupsDoIORequest" title=
"Do an IPP request with file descriptors.">cupsDoIORequest
</a></li>
403 <li><a href=
"#cupsDoRequest" title=
"Do an IPP request.">cupsDoRequest
</a></li>
404 <li><a href=
"#cupsEncodeOptions" title=
"Encode printer options into IPP attributes.">cupsEncodeOptions
</a></li>
405 <li><a href=
"#cupsEncodeOptions2" title=
"Encode printer options into IPP attributes for a group.">cupsEncodeOptions2
</a></li>
406 <li><a href=
"#cupsGetDevices" title=
"Get available printer devices.">cupsGetDevices
</a></li>
407 <li><a href=
"#cupsGetFd" title=
"Get a file from the server.">cupsGetFd
</a></li>
408 <li><a href=
"#cupsGetFile" title=
"Get a file from the server.">cupsGetFile
</a></li>
409 <li><a href=
"#cupsGetResponse" title=
"Get a response to an IPP request.">cupsGetResponse
</a></li>
410 <li><a href=
"#cupsLastError" title=
"Return the last IPP status code received on the current
411 thread.">cupsLastError
</a></li>
412 <li><a href=
"#cupsLastErrorString" title=
"Return the last IPP status-message received on the
413 current thread.">cupsLastErrorString
</a></li>
414 <li><a href=
"#cupsPutFd" title=
"Put a file on the server.">cupsPutFd
</a></li>
415 <li><a href=
"#cupsPutFile" title=
"Put a file on the server.">cupsPutFile
</a></li>
416 <li><a href=
"#cupsReadResponseData" title=
"Read additional data after the IPP response.">cupsReadResponseData
</a></li>
417 <li><a href=
"#cupsSendRequest" title=
"Send an IPP request.">cupsSendRequest
</a></li>
418 <li><a href=
"#cupsWriteRequestData" title=
"Write additional data after an IPP request.">cupsWriteRequestData
</a></li>
419 <li><a href=
"#httpAcceptConnection" title=
"Accept a new HTTP client connection from the
420 specified listening socket.">httpAcceptConnection
</a></li>
421 <li><a href=
"#httpAddCredential" title=
"Allocates and adds a single credential to an array.">httpAddCredential
</a></li>
422 <li><a href=
"#httpAddrAny" title=
"Check for the "any" address.">httpAddrAny
</a></li>
423 <li><a href=
"#httpAddrClose" title=
"Close a socket created by httpAddrConnect or
424 httpAddrListen.">httpAddrClose
</a></li>
425 <li><a href=
"#httpAddrEqual" title=
"Compare two addresses.">httpAddrEqual
</a></li>
426 <li><a href=
"#httpAddrFamily" title=
"Get the address family of an address.">httpAddrFamily
</a></li>
427 <li><a href=
"#httpAddrLength" title=
"Return the length of the address in bytes.">httpAddrLength
</a></li>
428 <li><a href=
"#httpAddrListen" title=
"Create a listening socket bound to the specified
429 address and port.">httpAddrListen
</a></li>
430 <li><a href=
"#httpAddrLocalhost" title=
"Check for the local loopback address.">httpAddrLocalhost
</a></li>
431 <li><a href=
"#httpAddrLookup" title=
"Lookup the hostname associated with the address.">httpAddrLookup
</a></li>
432 <li><a href=
"#httpAddrPort" title=
"Get the port number associated with an address.">httpAddrPort
</a></li>
433 <li><a href=
"#httpAddrString" title=
"Convert an address to a numeric string.">httpAddrString
</a></li>
434 <li><a href=
"#httpAssembleURI" title=
"Assemble a uniform resource identifier from its
435 components.">httpAssembleURI
</a></li>
436 <li><a href=
"#httpAssembleURIf" title=
"Assemble a uniform resource identifier from its
437 components with a formatted resource.">httpAssembleURIf
</a></li>
438 <li><a href=
"#httpAssembleUUID" title=
"Assemble a name-based UUID URN conforming to RFC 4122.">httpAssembleUUID
</a></li>
439 <li><a href=
"#httpBlocking" title=
"Set blocking/non-blocking behavior on a connection.">httpBlocking
</a></li>
440 <li><a href=
"#httpCheck" title=
"Check to see if there is a pending response from the server.">httpCheck
</a></li>
441 <li><a href=
"#httpClearCookie" title=
"Clear the cookie value(s).">httpClearCookie
</a></li>
442 <li><a href=
"#httpClearFields" title=
"Clear HTTP request fields.">httpClearFields
</a></li>
443 <li><a href=
"#httpClose" title=
"Close an HTTP connection.">httpClose
</a></li>
444 <li><a href=
"#httpCompareCredentials" title=
"Compare two sets of X.509 credentials.">httpCompareCredentials
</a></li>
445 <li><a href=
"#httpConnect" title=
"Connect to a HTTP server.">httpConnect
</a></li>
446 <li><a href=
"#httpConnect2" title=
"Connect to a HTTP server.">httpConnect2
</a></li>
447 <li><a href=
"#httpConnectEncrypt" title=
"Connect to a HTTP server using encryption.">httpConnectEncrypt
</a></li>
448 <li><a href=
"#httpDecode64" title=
"Base64-decode a string.">httpDecode64
</a></li>
449 <li><a href=
"#httpDecode64_2" title=
"Base64-decode a string.">httpDecode64_2
</a></li>
450 <li><a href=
"#httpDelete" title=
"Send a DELETE request to the server.">httpDelete
</a></li>
451 <li><a href=
"#httpEncode64" title=
"Base64-encode a string.">httpEncode64
</a></li>
452 <li><a href=
"#httpEncode64_2" title=
"Base64-encode a string.">httpEncode64_2
</a></li>
453 <li><a href=
"#httpEncryption" title=
"Set the required encryption on the link.">httpEncryption
</a></li>
454 <li><a href=
"#httpError" title=
"Get the last error on a connection.">httpError
</a></li>
455 <li><a href=
"#httpFieldValue" title=
"Return the HTTP field enumeration value for a field
456 name.">httpFieldValue
</a></li>
457 <li><a href=
"#httpFlush" title=
"Flush data from a HTTP connection.">httpFlush
</a></li>
458 <li><a href=
"#httpFlushWrite" title=
"Flush data in write buffer.">httpFlushWrite
</a></li>
459 <li><a href=
"#httpFreeCredentials" title=
"Free an array of credentials.">httpFreeCredentials
</a></li>
460 <li><a href=
"#httpGet" title=
"Send a GET request to the server.">httpGet
</a></li>
461 <li><a href=
"#httpGetActivity" title=
"Get the most recent activity for a connection.">httpGetActivity
</a></li>
462 <li><a href=
"#httpGetAddress" title=
"Get the address of the connected peer of a connection.">httpGetAddress
</a></li>
463 <li><a href=
"#httpGetAuthString" title=
"Get the current authorization string.">httpGetAuthString
</a></li>
464 <li><a href=
"#httpGetBlocking" title=
"Get the blocking/non-block state of a connection.">httpGetBlocking
</a></li>
465 <li><a href=
"#httpGetContentEncoding" title=
"Get a common content encoding, if any, between
466 the client and server.">httpGetContentEncoding
</a></li>
467 <li><a href=
"#httpGetCookie" title=
"Get any cookie data from the response.">httpGetCookie
</a></li>
468 <li><a href=
"#httpGetDateString" title=
"Get a formatted date/time string from a time value.">httpGetDateString
</a></li>
469 <li><a href=
"#httpGetDateString2" title=
"Get a formatted date/time string from a time value.">httpGetDateString2
</a></li>
470 <li><a href=
"#httpGetDateTime" title=
"Get a time value from a formatted date/time string.">httpGetDateTime
</a></li>
471 <li><a href=
"#httpGetEncryption" title=
"Get the current encryption mode of a connection.">httpGetEncryption
</a></li>
472 <li><a href=
"#httpGetExpect" title=
"Get the value of the Expect header, if any.">httpGetExpect
</a></li>
473 <li><a href=
"#httpGetFd" title=
"Get the file descriptor associated with a connection.">httpGetFd
</a></li>
474 <li><a href=
"#httpGetField" title=
"Get a field value from a request/response.">httpGetField
</a></li>
475 <li><a href=
"#httpGetHostByName" title=
"Lookup a hostname or IPv4 address, and return
476 address records for the specified name.">httpGetHostByName
</a></li>
477 <li><a href=
"#httpGetHostname" title=
"Get the FQDN for the connection or local system.">httpGetHostname
</a></li>
478 <li><a href=
"#httpGetKeepAlive" title=
"Get the current Keep-Alive state of the connection.">httpGetKeepAlive
</a></li>
479 <li><a href=
"#httpGetLength" title=
"Get the amount of data remaining from the
480 content-length or transfer-encoding fields.">httpGetLength
</a></li>
481 <li><a href=
"#httpGetLength2" title=
"Get the amount of data remaining from the
482 content-length or transfer-encoding fields.">httpGetLength2
</a></li>
483 <li><a href=
"#httpGetPending" title=
"Get the number of bytes that are buffered for writing.">httpGetPending
</a></li>
484 <li><a href=
"#httpGetReady" title=
"Get the number of bytes that can be read without blocking.">httpGetReady
</a></li>
485 <li><a href=
"#httpGetRemaining" title=
"Get the number of remaining bytes in the message
486 body or current chunk.">httpGetRemaining
</a></li>
487 <li><a href=
"#httpGetState" title=
"Get the current state of the HTTP request.">httpGetState
</a></li>
488 <li><a href=
"#httpGetStatus" title=
"Get the status of the last HTTP request.">httpGetStatus
</a></li>
489 <li><a href=
"#httpGetSubField" title=
"Get a sub-field value.">httpGetSubField
</a></li>
490 <li><a href=
"#httpGetSubField2" title=
"Get a sub-field value.">httpGetSubField2
</a></li>
491 <li><a href=
"#httpGetVersion" title=
"Get the HTTP version at the other end.">httpGetVersion
</a></li>
492 <li><a href=
"#httpGets" title=
"Get a line of text from a HTTP connection.">httpGets
</a></li>
493 <li><a href=
"#httpHead" title=
"Send a HEAD request to the server.">httpHead
</a></li>
494 <li><a href=
"#httpInitialize" title=
"Initialize the HTTP interface library and set the
495 default HTTP proxy (if any).">httpInitialize
</a></li>
496 <li><a href=
"#httpIsChunked" title=
"Report whether a message body is chunked.">httpIsChunked
</a></li>
497 <li><a href=
"#httpIsEncrypted" title=
"Report whether a connection is encrypted.">httpIsEncrypted
</a></li>
498 <li><a href=
"#httpMD5" title=
"Compute the MD5 sum of the username:group:password.">httpMD5
</a></li>
499 <li><a href=
"#httpMD5Final" title=
"Combine the MD5 sum of the username, group, and password
500 with the server-supplied nonce value, method, and
501 request-uri.">httpMD5Final
</a></li>
502 <li><a href=
"#httpMD5String" title=
"Convert an MD5 sum to a character string.">httpMD5String
</a></li>
503 <li><a href=
"#httpOptions" title=
"Send an OPTIONS request to the server.">httpOptions
</a></li>
504 <li><a href=
"#httpPeek" title=
"Peek at data from a HTTP connection.">httpPeek
</a></li>
505 <li><a href=
"#httpPost" title=
"Send a POST request to the server.">httpPost
</a></li>
506 <li><a href=
"#httpPut" title=
"Send a PUT request to the server.">httpPut
</a></li>
507 <li><a href=
"#httpRead" title=
"Read data from a HTTP connection.">httpRead
</a></li>
508 <li><a href=
"#httpRead2" title=
"Read data from a HTTP connection.">httpRead2
</a></li>
509 <li><a href=
"#httpReadRequest" title=
"Read a HTTP request from a connection.">httpReadRequest
</a></li>
510 <li><a href=
"#httpReconnect" title=
"Reconnect to a HTTP server.">httpReconnect
</a></li>
511 <li><a href=
"#httpReconnect2" title=
"Reconnect to a HTTP server with timeout and optional
512 cancel.">httpReconnect2
</a></li>
513 <li><a href=
"#httpResolveHostname" title=
"Resolve the hostname of the HTTP connection
514 address.">httpResolveHostname
</a></li>
515 <li><a href=
"#httpSeparate" title=
"Separate a Universal Resource Identifier into its
516 components.">httpSeparate
</a></li>
517 <li><a href=
"#httpSeparate2" title=
"Separate a Universal Resource Identifier into its
518 components.">httpSeparate2
</a></li>
519 <li><a href=
"#httpSeparateURI" title=
"Separate a Universal Resource Identifier into its
520 components.">httpSeparateURI
</a></li>
521 <li><a href=
"#httpSetAuthString" title=
"Set the current authorization string.">httpSetAuthString
</a></li>
522 <li><a href=
"#httpSetCookie" title=
"Set the cookie value(s).">httpSetCookie
</a></li>
523 <li><a href=
"#httpSetCredentials" title=
"Set the credentials associated with an encrypted
524 connection.">httpSetCredentials
</a></li>
525 <li><a href=
"#httpSetDefaultField" title=
"Set the default value of an HTTP header.">httpSetDefaultField
</a></li>
526 <li><a href=
"#httpSetExpect" title=
"Set the Expect: header in a request.">httpSetExpect
</a></li>
527 <li><a href=
"#httpSetField" title=
"Set the value of an HTTP header.">httpSetField
</a></li>
528 <li><a href=
"#httpSetKeepAlive" title=
"Set the current Keep-Alive state of a connection.">httpSetKeepAlive
</a></li>
529 <li><a href=
"#httpSetLength" title=
"Set the content-length and content-encoding.">httpSetLength
</a></li>
530 <li><a href=
"#httpSetTimeout" title=
"Set read/write timeouts and an optional callback.">httpSetTimeout
</a></li>
531 <li><a href=
"#httpShutdown" title=
"Shutdown one side of an HTTP connection.">httpShutdown
</a></li>
532 <li><a href=
"#httpStateString" title=
"Return the string describing a HTTP state value.">httpStateString
</a></li>
533 <li><a href=
"#httpStatus" title=
"Return a short string describing a HTTP status code.">httpStatus
</a></li>
534 <li><a href=
"#httpTrace" title=
"Send an TRACE request to the server.">httpTrace
</a></li>
535 <li><a href=
"#httpURIStatusString" title=
"Return a string describing a URI status code.">httpURIStatusString
</a></li>
536 <li><a href=
"#httpUpdate" title=
"Update the current HTTP state for incoming data.">httpUpdate
</a></li>
537 <li><a href=
"#httpWait" title=
"Wait for data available on a connection.">httpWait
</a></li>
538 <li><a href=
"#httpWrite" title=
"Write data to a HTTP connection.">httpWrite
</a></li>
539 <li><a href=
"#httpWrite2" title=
"Write data to a HTTP connection.">httpWrite2
</a></li>
540 <li><a href=
"#httpWriteResponse" title=
"Write a HTTP response to a client connection.">httpWriteResponse
</a></li>
541 <li><a href=
"#ippAddBoolean" title=
"Add a boolean attribute to an IPP message.">ippAddBoolean
</a></li>
542 <li><a href=
"#ippAddBooleans" title=
"Add an array of boolean values.">ippAddBooleans
</a></li>
543 <li><a href=
"#ippAddCollection" title=
"Add a collection value.">ippAddCollection
</a></li>
544 <li><a href=
"#ippAddCollections" title=
"Add an array of collection values.">ippAddCollections
</a></li>
545 <li><a href=
"#ippAddDate" title=
"Add a date attribute to an IPP message.">ippAddDate
</a></li>
546 <li><a href=
"#ippAddInteger" title=
"Add a integer attribute to an IPP message.">ippAddInteger
</a></li>
547 <li><a href=
"#ippAddIntegers" title=
"Add an array of integer values.">ippAddIntegers
</a></li>
548 <li><a href=
"#ippAddOctetString" title=
"Add an octetString value to an IPP message.">ippAddOctetString
</a></li>
549 <li><a href=
"#ippAddOutOfBand" title=
"Add an out-of-band value to an IPP message.">ippAddOutOfBand
</a></li>
550 <li><a href=
"#ippAddRange" title=
"Add a range of values to an IPP message.">ippAddRange
</a></li>
551 <li><a href=
"#ippAddRanges" title=
"Add ranges of values to an IPP message.">ippAddRanges
</a></li>
552 <li><a href=
"#ippAddResolution" title=
"Add a resolution value to an IPP message.">ippAddResolution
</a></li>
553 <li><a href=
"#ippAddResolutions" title=
"Add resolution values to an IPP message.">ippAddResolutions
</a></li>
554 <li><a href=
"#ippAddSeparator" title=
"Add a group separator to an IPP message.">ippAddSeparator
</a></li>
555 <li><a href=
"#ippAddString" title=
"Add a language-encoded string to an IPP message.">ippAddString
</a></li>
556 <li><a href=
"#ippAddStringf" title=
"Add a formatted string to an IPP message.">ippAddStringf
</a></li>
557 <li><a href=
"#ippAddStringfv" title=
"Add a formatted string to an IPP message.">ippAddStringfv
</a></li>
558 <li><a href=
"#ippAddStrings" title=
"Add language-encoded strings to an IPP message.">ippAddStrings
</a></li>
559 <li><a href=
"#ippAttributeString" title=
"Convert the attribute's value to a string.">ippAttributeString
</a></li>
560 <li><a href=
"#ippContainsInteger" title=
"Determine whether an attribute contains the
561 specified value or is within the list of ranges.">ippContainsInteger
</a></li>
562 <li><a href=
"#ippContainsString" title=
"Determine whether an attribute contains the
563 specified string value.">ippContainsString
</a></li>
564 <li><a href=
"#ippCopyAttribute" title=
"Copy an attribute.">ippCopyAttribute
</a></li>
565 <li><a href=
"#ippCopyAttributes" title=
"Copy attributes from one IPP message to another.">ippCopyAttributes
</a></li>
566 <li><a href=
"#ippCreateRequestedArray" title=
"Create a CUPS array of attribute names from the
567 given requested-attributes attribute.">ippCreateRequestedArray
</a></li>
568 <li><a href=
"#ippDateToTime" title=
"Convert from RFC 1903 Date/Time format to UNIX time
569 in seconds.">ippDateToTime
</a></li>
570 <li><a href=
"#ippDelete" title=
"Delete an IPP message.">ippDelete
</a></li>
571 <li><a href=
"#ippDeleteAttribute" title=
"Delete a single attribute in an IPP message.">ippDeleteAttribute
</a></li>
572 <li><a href=
"#ippDeleteValues" title=
"Delete values in an attribute.">ippDeleteValues
</a></li>
573 <li><a href=
"#ippEnumString" title=
"Return a string corresponding to the enum value.">ippEnumString
</a></li>
574 <li><a href=
"#ippEnumValue" title=
"Return the value associated with a given enum string.">ippEnumValue
</a></li>
575 <li><a href=
"#ippErrorString" title=
"Return a name for the given status code.">ippErrorString
</a></li>
576 <li><a href=
"#ippErrorValue" title=
"Return a status code for the given name.">ippErrorValue
</a></li>
577 <li><a href=
"#ippFindAttribute" title=
"Find a named attribute in a request.">ippFindAttribute
</a></li>
578 <li><a href=
"#ippFindNextAttribute" title=
"Find the next named attribute in a request.">ippFindNextAttribute
</a></li>
579 <li><a href=
"#ippFirstAttribute" title=
"Return the first attribute in the message.">ippFirstAttribute
</a></li>
580 <li><a href=
"#ippGetBoolean" title=
"Get a boolean value for an attribute.">ippGetBoolean
</a></li>
581 <li><a href=
"#ippGetCollection" title=
"Get a collection value for an attribute.">ippGetCollection
</a></li>
582 <li><a href=
"#ippGetCount" title=
"Get the number of values in an attribute.">ippGetCount
</a></li>
583 <li><a href=
"#ippGetDate" title=
"Get a date value for an attribute.">ippGetDate
</a></li>
584 <li><a href=
"#ippGetGroupTag" title=
"Get the group associated with an attribute.">ippGetGroupTag
</a></li>
585 <li><a href=
"#ippGetInteger" title=
"Get the integer/enum value for an attribute.">ippGetInteger
</a></li>
586 <li><a href=
"#ippGetName" title=
"Get the attribute name.">ippGetName
</a></li>
587 <li><a href=
"#ippGetOctetString" title=
"Get an octetString value from an IPP attribute.">ippGetOctetString
</a></li>
588 <li><a href=
"#ippGetOperation" title=
"Get the operation ID in an IPP message.">ippGetOperation
</a></li>
589 <li><a href=
"#ippGetRange" title=
"Get a rangeOfInteger value from an attribute.">ippGetRange
</a></li>
590 <li><a href=
"#ippGetRequestId" title=
"Get the request ID from an IPP message.">ippGetRequestId
</a></li>
591 <li><a href=
"#ippGetResolution" title=
"Get a resolution value for an attribute.">ippGetResolution
</a></li>
592 <li><a href=
"#ippGetState" title=
"Get the IPP message state.">ippGetState
</a></li>
593 <li><a href=
"#ippGetStatusCode" title=
"Get the status code from an IPP response or event message.">ippGetStatusCode
</a></li>
594 <li><a href=
"#ippGetString" title=
"Return the value...">ippGetString
</a></li>
595 <li><a href=
"#ippGetValueTag" title=
"Get the value tag for an attribute.">ippGetValueTag
</a></li>
596 <li><a href=
"#ippGetVersion" title=
"Get the major and minor version number from an IPP message.">ippGetVersion
</a></li>
597 <li><a href=
"#ippLength" title=
"Compute the length of an IPP message.">ippLength
</a></li>
598 <li><a href=
"#ippNew" title=
"Allocate a new IPP message.">ippNew
</a></li>
599 <li><a href=
"#ippNewRequest" title=
"Allocate a new IPP request message.">ippNewRequest
</a></li>
600 <li><a href=
"#ippNewResponse" title=
"Allocate a new IPP response message.">ippNewResponse
</a></li>
601 <li><a href=
"#ippNextAttribute" title=
"Return the next attribute in the message.">ippNextAttribute
</a></li>
602 <li><a href=
"#ippOpString" title=
"Return a name for the given operation id.">ippOpString
</a></li>
603 <li><a href=
"#ippOpValue" title=
"Return an operation id for the given name.">ippOpValue
</a></li>
604 <li><a href=
"#ippPort" title=
"Return the default IPP port number.">ippPort
</a></li>
605 <li><a href=
"#ippRead" title=
"Read data for an IPP message from a HTTP connection.">ippRead
</a></li>
606 <li><a href=
"#ippReadFile" title=
"Read data for an IPP message from a file.">ippReadFile
</a></li>
607 <li><a href=
"#ippReadIO" title=
"Read data for an IPP message.">ippReadIO
</a></li>
608 <li><a href=
"#ippSetBoolean" title=
"Set a boolean value in an attribute.">ippSetBoolean
</a></li>
609 <li><a href=
"#ippSetCollection" title=
"Set a collection value in an attribute.">ippSetCollection
</a></li>
610 <li><a href=
"#ippSetDate" title=
"Set a date value in an attribute.">ippSetDate
</a></li>
611 <li><a href=
"#ippSetGroupTag" title=
"Set the group tag of an attribute.">ippSetGroupTag
</a></li>
612 <li><a href=
"#ippSetInteger" title=
"Set an integer or enum value in an attribute.">ippSetInteger
</a></li>
613 <li><a href=
"#ippSetName" title=
"Set the name of an attribute.">ippSetName
</a></li>
614 <li><a href=
"#ippSetOctetString" title=
"Set an octetString value in an IPP attribute.">ippSetOctetString
</a></li>
615 <li><a href=
"#ippSetOperation" title=
"Set the operation ID in an IPP request message.">ippSetOperation
</a></li>
616 <li><a href=
"#ippSetPort" title=
"Set the default port number.">ippSetPort
</a></li>
617 <li><a href=
"#ippSetRange" title=
"Set a rangeOfInteger value in an attribute.">ippSetRange
</a></li>
618 <li><a href=
"#ippSetRequestId" title=
"Set the request ID in an IPP message.">ippSetRequestId
</a></li>
619 <li><a href=
"#ippSetResolution" title=
"Set a resolution value in an attribute.">ippSetResolution
</a></li>
620 <li><a href=
"#ippSetState" title=
"Set the current state of the IPP message.">ippSetState
</a></li>
621 <li><a href=
"#ippSetStatusCode" title=
"Set the status code in an IPP response or event message.">ippSetStatusCode
</a></li>
622 <li><a href=
"#ippSetString" title=
"Set a string value in an attribute.">ippSetString
</a></li>
623 <li><a href=
"#ippSetStringf" title=
"Set a formatted string value of an attribute.">ippSetStringf
</a></li>
624 <li><a href=
"#ippSetStringfv" title=
"Set a formatted string value of an attribute.">ippSetStringfv
</a></li>
625 <li><a href=
"#ippSetValueTag" title=
"Set the value tag of an attribute.">ippSetValueTag
</a></li>
626 <li><a href=
"#ippSetVersion" title=
"Set the version number in an IPP message.">ippSetVersion
</a></li>
627 <li><a href=
"#ippStateString" title=
"Return the name corresponding to a state value.">ippStateString
</a></li>
628 <li><a href=
"#ippTagString" title=
"Return the tag name corresponding to a tag value.">ippTagString
</a></li>
629 <li><a href=
"#ippTagValue" title=
"Return the tag value corresponding to a tag name.">ippTagValue
</a></li>
630 <li><a href=
"#ippTimeToDate" title=
"Convert from UNIX time to RFC 1903 format.">ippTimeToDate
</a></li>
631 <li><a href=
"#ippValidateAttribute" title=
"Validate the contents of an attribute.">ippValidateAttribute
</a></li>
632 <li><a href=
"#ippValidateAttributes" title=
"Validate all attributes in an IPP message.">ippValidateAttributes
</a></li>
633 <li><a href=
"#ippWrite" title=
"Write data for an IPP message to a HTTP connection.">ippWrite
</a></li>
634 <li><a href=
"#ippWriteFile" title=
"Write data for an IPP message to a file.">ippWriteFile
</a></li>
635 <li><a href=
"#ippWriteIO" title=
"Write data for an IPP message.">ippWriteIO
</a></li>
637 <li><a href=
"#TYPES">Data Types
</a><ul class=
"code">
638 <li><a href=
"#gss_auth_identity_desc" title=
"Local functions...">gss_auth_identity_desc
</a></li>
639 <li><a href=
"#http_addr_t" title=
"Socket address union, which
640 makes using IPv6 and other
641 address types easier and
642 more portable. ">http_addr_t
</a></li>
643 <li><a href=
"#http_addrlist_t" title=
"Socket address list, which is
644 used to enumerate all of the
645 addresses that are associated
646 with a hostname. ">http_addrlist_t
</a></li>
647 <li><a href=
"#http_auth_t" title=
"HTTP authentication types">http_auth_t
</a></li>
648 <li><a href=
"#http_credential_t" title=
"HTTP credential data ">http_credential_t
</a></li>
649 <li><a href=
"#http_encoding_t" title=
"HTTP transfer encoding values">http_encoding_t
</a></li>
650 <li><a href=
"#http_encryption_t" title=
"HTTP encryption values">http_encryption_t
</a></li>
651 <li><a href=
"#http_field_t" title=
"HTTP field names">http_field_t
</a></li>
652 <li><a href=
"#http_keepalive_t" title=
"HTTP keep-alive values">http_keepalive_t
</a></li>
653 <li><a href=
"#http_state_t" title=
"HTTP state values; states
654 are server-oriented...">http_state_t
</a></li>
655 <li><a href=
"#http_t" title=
"HTTP connection type">http_t
</a></li>
656 <li><a href=
"#http_timeout_cb_t" title=
"HTTP timeout callback ">http_timeout_cb_t
</a></li>
657 <li><a href=
"#http_trust_t" title=
"Level of trust for credentials ">http_trust_t
</a></li>
658 <li><a href=
"#http_uri_coding_t" title=
"URI en/decode flags">http_uri_coding_t
</a></li>
659 <li><a href=
"#http_uri_status_t" title=
"URI separation status ">http_uri_status_t
</a></li>
660 <li><a href=
"#http_version_t" title=
"HTTP version numbers">http_version_t
</a></li>
661 <li><a href=
"#ipp_attribute_t" title=
"IPP attribute">ipp_attribute_t
</a></li>
662 <li><a href=
"#ipp_copycb_t" title=
"The following structures are PRIVATE starting with CUPS 1.6/macOS 10.8.
663 Please use the new accessor functions available in CUPS 1.6 and later, as
664 these definitions will be moved to a private header file in a future release.">ipp_copycb_t
</a></li>
665 <li><a href=
"#ipp_dstate_t" title=
"Document states">ipp_dstate_t
</a></li>
666 <li><a href=
"#ipp_finish_t" title=
"Job collation types">ipp_finish_t
</a></li>
667 <li><a href=
"#ipp_iocb_t" title=
"IPP IO Callback Function ">ipp_iocb_t
</a></li>
668 <li><a href=
"#ipp_jcollate_t" title=
"Job collation types">ipp_jcollate_t
</a></li>
669 <li><a href=
"#ipp_orient_t" title=
"Orientation values">ipp_orient_t
</a></li>
670 <li><a href=
"#ipp_pstate_t" title=
"Printer states">ipp_pstate_t
</a></li>
671 <li><a href=
"#ipp_quality_t" title=
"Qualities">ipp_quality_t
</a></li>
672 <li><a href=
"#ipp_res_t" title=
"Resolution units">ipp_res_t
</a></li>
673 <li><a href=
"#ipp_state_t" title=
"IPP states">ipp_state_t
</a></li>
674 <li><a href=
"#ipp_t" title=
"IPP request/response data">ipp_t
</a></li>
675 <li><a href=
"#ipp_uchar_t" title=
"Unsigned 8-bit integer/character">ipp_uchar_t
</a></li>
677 <li><a href=
"#STRUCTURES">Structures
</a><ul class=
"code">
678 <li><a href=
"#gss_auth_identity" title=
"Local functions...">gss_auth_identity
</a></li>
679 <li><a href=
"#http_addrlist_s" title=
"Socket address list, which is
680 used to enumerate all of the
681 addresses that are associated
682 with a hostname. ">http_addrlist_s
</a></li>
683 <li><a href=
"#http_credential_s" title=
"HTTP credential data ">http_credential_s
</a></li>
684 <li><a href=
"#pollfd" title=
"User data (unused)">pollfd
</a></li>
686 <li><a href=
"#ENUMERATIONS">Constants
</a><ul class=
"code">
687 <li><a href=
"#http_auth_e" title=
"HTTP authentication types">http_auth_e
</a></li>
688 <li><a href=
"#http_encoding_e" title=
"HTTP transfer encoding values">http_encoding_e
</a></li>
689 <li><a href=
"#http_encryption_e" title=
"HTTP encryption values">http_encryption_e
</a></li>
690 <li><a href=
"#http_field_e" title=
"HTTP field names">http_field_e
</a></li>
691 <li><a href=
"#http_keepalive_e" title=
"HTTP keep-alive values">http_keepalive_e
</a></li>
692 <li><a href=
"#http_state_e" title=
"HTTP state values; states
693 are server-oriented...">http_state_e
</a></li>
694 <li><a href=
"#http_status_e" title=
"HTTP status codes">http_status_e
</a></li>
695 <li><a href=
"#http_trust_e" title=
"Level of trust for credentials ">http_trust_e
</a></li>
696 <li><a href=
"#http_uri_coding_e" title=
"URI en/decode flags">http_uri_coding_e
</a></li>
697 <li><a href=
"#http_uri_status_e" title=
"URI separation status ">http_uri_status_e
</a></li>
698 <li><a href=
"#http_version_e" title=
"HTTP version numbers">http_version_e
</a></li>
699 <li><a href=
"#ipp_dstate_e" title=
"Document states">ipp_dstate_e
</a></li>
700 <li><a href=
"#ipp_finishings_e" title=
"Finishings">ipp_finishings_e
</a></li>
701 <li><a href=
"#ipp_jcollate_e" title=
"Job collation types">ipp_jcollate_e
</a></li>
702 <li><a href=
"#ipp_jstate_e" title=
"Job states">ipp_jstate_e
</a></li>
703 <li><a href=
"#ipp_op_e" title=
"IPP operations">ipp_op_e
</a></li>
704 <li><a href=
"#ipp_orient_e" title=
"Orientation values">ipp_orient_e
</a></li>
705 <li><a href=
"#ipp_pstate_e" title=
"Printer states">ipp_pstate_e
</a></li>
706 <li><a href=
"#ipp_quality_e" title=
"Qualities">ipp_quality_e
</a></li>
707 <li><a href=
"#ipp_res_e" title=
"Resolution units">ipp_res_e
</a></li>
708 <li><a href=
"#ipp_state_e" title=
"IPP states">ipp_state_e
</a></li>
709 <li><a href=
"#ipp_status_e" title=
"IPP status codes">ipp_status_e
</a></li>
710 <li><a href=
"#ipp_tag_e" title=
"Format tags for attributes">ipp_tag_e
</a></li>
714 HTTP and IPP API introduction for CUPS.
716 Copyright 2007-2012 by Apple Inc.
717 Copyright 1997-2006 by Easy Software Products, all rights reserved.
719 These coded instructions, statements, and computer programs are the
720 property of Apple Inc. and are protected by Federal copyright
721 law. Distribution and use rights are outlined in the file "LICENSE.txt"
722 which should have been included with this file. If this file is
723 file is missing or damaged, see the license at "http://www.cups.org/".
726 <h2 class='title'
><a name='OVERVIEW'
>Overview
</a></h2>
728 <p>The CUPS HTTP and IPP APIs provide low-level access to the HTTP and IPP
729 protocols and CUPS scheduler. They are typically used by monitoring and
730 administration programs to perform specific functions not supported by the
731 high-level CUPS API functions.
</p>
733 <p>The HTTP APIs use an opaque structure called
734 <a href='#http_t'
><code>http_t
</code></a> to manage connections to
735 a particular HTTP or IPP server. The
736 <a href='#httpConnectEncrypt'
><code>httpConnectEncrypt
</code></a> function is
737 used to create an instance of this structure for a particular server.
738 The constant
<code>CUPS_HTTP_DEFAULT
</code> can be used with all of the
739 <code>cups
</code> functions to refer to the default CUPS server - the functions
740 create a per-thread
<a href='#http_t'
><code>http_t
</code></a> as needed.
</p>
742 <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>
744 <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>
746 <pre class='example'
>
747 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_GET_JOBS);
749 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri",
750 NULL,
"ipp://localhost/printers/");
751 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
755 <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>
757 <pre class='example'
>
758 #include
<cups/cups.h
>
761 <a href='#ipp_t'
>ipp_t
</a> *
<a name='get_jobs'
>get_jobs
</a>(void)
763 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_GET_JOBS);
765 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri",
766 NULL,
"ipp://localhost/printers/");
767 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
770 return (
<a href='#cupsDoRequest'
>cupsDoRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/"));
774 <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>
776 <pre class='example'
>
777 <a href='#ipp_t'
>ipp_t
</a> *response;
778 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
780 attr =
<a href='#ippFindAttribute'
>ippFindAttribute
</a>(response,
"printer-state", IPP_TAG_ENUM);
783 <p>You can also walk the list of attributes with a simple
<code>for
</code> loop like this:
</p>
785 <pre class='example'
>
786 <a href='#ipp_t'
>ipp_t
</a> *response;
787 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
789 for (attr =
<a href='#ippFirstAttribute'
>ippFirstAttribute
</a>(response); attr != NULL; attr =
<a href='#ippNextAttribute'
>ippNextAttribute
</a>(response))
790 if (ippGetName(attr) == NULL)
791 puts(
"--SEPARATOR--");
793 puts(ippGetName(attr));
796 <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>
798 <pre class='example'
>
799 <a href='#ipp_t'
>ipp_t
</a> *response =
<a href='#get_jobs'
>get_jobs
</a>();
801 if (response != NULL)
803 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
804 const char *attrname;
806 const char *job_name = NULL;
807 const char *job_originating_user_name = NULL;
809 puts(
"Job ID Owner Title");
810 puts(
"------ ---------------- ---------------------------------");
812 for (attr =
<a href='#ippFirstAttribute'
>ippFirstAttribute
</a>(response); attr != NULL; attr =
<a href='#ippNextAttribute'
>ippNextAttribute
</a>(response))
814 /* Attributes without names are separators between jobs */
815 attrname = ippGetName(attr);
816 if (attrname == NULL)
820 if (job_name == NULL)
821 job_name =
"(withheld)";
823 if (job_originating_user_name == NULL)
824 job_originating_user_name =
"(withheld)";
826 printf(
"%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
831 job_originating_user_name = NULL;
834 else if (!strcmp(attrname,
"job-id")
&& ippGetValueTag(attr) == IPP_TAG_INTEGER)
835 job_id = ippGetInteger(attr,
0);
836 else if (!strcmp(attrname,
"job-name")
&& ippGetValueTag(attr) == IPP_TAG_NAME)
837 job_name = ippGetString(attr,
0, NULL);
838 else if (!strcmp(attrname,
"job-originating-user-name")
&&
839 ippGetValueTag(attr) == IPP_TAG_NAME)
840 job_originating_user_name = ippGetString(attr,
0, NULL);
845 if (job_name == NULL)
846 job_name =
"(withheld)";
848 if (job_originating_user_name == NULL)
849 job_originating_user_name =
"(withheld)";
851 printf(
"%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
856 <h3><a name='CREATING_URI_STRINGS'
>Creating URI Strings
</a></h3>
858 <p>To ensure proper encoding, the
859 <a href='#httpAssembleURIf'
><code>httpAssembleURIf
</code></a> function must be
860 used to format a
"printer-uri" string for all printer-based requests:
</p>
862 <pre class='example'
>
863 const char *name =
"Foo";
865 <a href='#ipp_t'
>ipp_t
</a> *request;
867 <a href='#httpAssembleURIf'
>httpAssembleURIf
</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri),
"ipp", NULL, cupsServer(),
868 ippPort(),
"/printers/%s", name);
869 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
872 <h3><a name='SENDING_REQUESTS_WITH_FILES'
>Sending Requests with Files
</a></h3>
874 <p>The
<a href='#cupsDoFileRequest'
><code>cupsDoFileRequest
</code></a> and
875 <a href='#cupsDoIORequest'
><code>cupsDoIORequest
</code></a> functions are
876 used for requests involving files. The
877 <a href='#cupsDoFileRequest'
><code>cupsDoFileRequest
</code></a> function
878 attaches the named file to a request and is typically used when sending a print
879 file or changing a printer's PPD file:
</p>
881 <pre class='example'
>
882 const char *filename =
"/usr/share/cups/data/testprint.ps";
883 const char *name =
"Foo";
886 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_PRINT_JOB);
887 <a href='#ipp_t'
>ipp_t
</a> *response;
889 /* Use httpAssembleURIf for the printer-uri string */
890 <a href='#httpAssembleURIf'
>httpAssembleURIf
</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri),
"ipp", NULL, cupsServer(),
891 ippPort(),
"/printers/%s", name);
892 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
893 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
895 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"job-name",
896 NULL,
"testprint.ps");
898 /* Use snprintf for the resource path */
899 snprintf(resource, sizeof(resource),
"/printers/%s", name);
901 response =
<a href='#cupsDoFileRequest'
>cupsDoFileRequest
</a>(CUPS_HTTP_DEFAULT, request, resource, filename);
904 <p>The
<a href='#cupsDoIORequest'
><code>cupsDoIORequest
</code></a> function
905 optionally attaches a file to the request and optionally saves a file in the
906 response from the server. It is used when using a pipe for the request
907 attachment or when using a request that returns a file, currently only
908 <code>CUPS_GET_DOCUMENT
</code> and
<code>CUPS_GET_PPD
</code>. For example,
909 the following code will download the PPD file for the sample HP LaserJet
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 response =
<a href='#cupsDoIORequest'
>cupsDoIORequest
</a>(CUPS_HTTP_DEFAULT, request,
"/", -
1, tempfd);
926 <p>The example passes
<code>-
1</code> for the input file descriptor to specify
927 that no file is to be attached to the request. The PPD file attached to the
928 response is written to the temporary file descriptor we created using the
929 <code>cupsTempFd
</code> function.
</p>
931 <h3><a name='ASYNCHRONOUS_REQUEST_PROCESSING'
>Asynchronous Request Processing
</a></h3>
933 <p>The
<a href='#cupsSendRequest'
><code>cupsSendRequest
</code></a> and
934 <a href='#cupsGetResponse'
><code>cupsGetResponse
</code></a> support
935 asynchronous communications with the server. Unlike the other request
936 functions, the IPP request is not automatically freed, so remember to
937 free your request with the
<a href='#ippDelete'
><code>ippDelete
</code></a>
940 <p>File data is attached to the request using the
941 <a href='#cupsWriteRequestData'
><code>cupsWriteRequestData
</code></a>
942 function, while file data returned from the server is read using the
943 <a href='#cupsReadResponseData'
><code>cupsReadResponseData
</code></a>
944 function. We can rewrite the previous
<code>CUPS_GET_PPD
</code> example
945 to use the asynchronous functions quite easily:
</p>
947 <pre class='example'
>
950 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
951 <a href='#ipp_t'
>ipp_t
</a> *response;
953 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
954 NULL,
"laserjet.ppd");
956 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
958 if (
<a href='#cupsSendRequest'
>cupsSendRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/") == HTTP_CONTINUE)
960 response =
<a href='#cupsGetResponse'
>cupsGetResponse
</a>(CUPS_HTTP_DEFAULT,
"/");
962 if (response != NULL)
967 while ((bytes =
<a href='#cupsReadResponseData'
>cupsReadResponseData
</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer)))
> 0)
968 write(tempfd, buffer, bytes);
972 /* Free the request! */
973 <a href='#ippDelete'
>ippDelete
</a>(request);
976 <p>The
<a href='#cupsSendRequest'
><code>cupsSendRequest
</code></a> function
977 returns the initial HTTP request status, typically either
978 <code>HTTP_CONTINUE
</code> or
<code>HTTP_UNAUTHORIZED
</code>. The latter status
979 is returned when the request requires authentication of some sort. The
980 <a href='#cupsDoAuthentication'
><code>cupsDoAuthentication
</code></a> function
981 must be called when your see
<code>HTTP_UNAUTHORIZED
</code> and the request
982 re-sent. We can add authentication support to our example code by using a
983 <code>do ... while
</code> loop:
</p>
985 <pre class='example'
>
988 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
989 <a href='#ipp_t'
>ipp_t
</a> *response;
990 http_status_t status;
992 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
993 NULL,
"laserjet.ppd");
995 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
997 /* Loop for authentication */
1000 status =
<a href='#cupsSendRequest'
>cupsSendRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/");
1002 if (status == HTTP_UNAUTHORIZED)
1004 /* Try to authenticate, break out of the loop if that fails */
1005 if (
<a href='#cupsDoAuthentication'
>cupsDoAuthentication
</a>(CUPS_HTTP_DEFAULT,
"POST",
"/"))
1009 while (status != HTTP_CONTINUE
&& status != HTTP_UNAUTHORIZED);
1011 if (status == HTTP_CONTINUE)
1013 response =
<a href='#cupsGetResponse'
>cupsGetResponse
</a>(CUPS_HTTP_DEFAULT,
"/");
1015 if (response != NULL)
1020 while ((bytes =
<a href='#cupsReadResponseData'
>cupsReadResponseData
</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer)))
> 0)
1021 write(tempfd, buffer, bytes);
1025 /* Free the request! */
1026 <a href='#ippDelete'
>ippDelete
</a>(request);
1028 <h2 class=
"title"><a name=
"FUNCTIONS">Functions
</a></h2>
1029 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/macOS
10.4 </span><a name=
"cupsDoAuthentication">cupsDoAuthentication
</a></h3>
1030 <p class=
"description">Authenticate a request.
</p>
1032 int cupsDoAuthentication (
<br>
1033 <a href=
"#http_t">http_t
</a> *http,
<br>
1034 const char *method,
<br>
1035 const char *resource
<br>
1037 <h4 class=
"parameters">Parameters
</h4>
1040 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1042 <dd class=
"description">Request method (
"GET
",
"POST
",
"PUT
")
</dd>
1044 <dd class=
"description">Resource path
</dd>
1046 <h4 class=
"returnvalue">Return Value
</h4>
1047 <p class=
"description">0 on success, -
1 on error
</p>
1048 <h4 class=
"discussion">Discussion
</h4>
1049 <p class=
"discussion">This function should be called in response to a
<code>HTTP_STATUS_UNAUTHORIZED
</code>
1050 status, prior to resubmitting your request.
1053 <h3 class=
"function"><a name=
"cupsDoFileRequest">cupsDoFileRequest
</a></h3>
1054 <p class=
"description">Do an IPP request with a file.
</p>
1056 <a href=
"#ipp_t">ipp_t
</a> *cupsDoFileRequest (
<br>
1057 <a href=
"#http_t">http_t
</a> *http,
<br>
1058 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
1059 const char *resource,
<br>
1060 const char *filename
<br>
1062 <h4 class=
"parameters">Parameters
</h4>
1065 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1067 <dd class=
"description">IPP request
</dd>
1069 <dd class=
"description">HTTP resource for POST
</dd>
1071 <dd class=
"description">File to send or
<code>NULL
</code> for none
</dd>
1073 <h4 class=
"returnvalue">Return Value
</h4>
1074 <p class=
"description">Response data
</p>
1075 <h4 class=
"discussion">Discussion
</h4>
1076 <p class=
"discussion">This function sends the IPP request and attached file to the specified
1077 server, retrying and authenticating as necessary. The request is freed with
1078 <a href=
"#ippDelete"><code>ippDelete
</code></a>.
</p>
1079 <h3 class=
"function"><span class=
"info"> CUPS
1.3/macOS
10.5 </span><a name=
"cupsDoIORequest">cupsDoIORequest
</a></h3>
1080 <p class=
"description">Do an IPP request with file descriptors.
</p>
1082 <a href=
"#ipp_t">ipp_t
</a> *cupsDoIORequest (
<br>
1083 <a href=
"#http_t">http_t
</a> *http,
<br>
1084 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
1085 const char *resource,
<br>
1086 int infile,
<br>
1087 int outfile
<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 <dd class=
"description">File to read from or -
1 for none
</dd>
1100 <dd class=
"description">File to write to or -
1 for none
</dd>
1102 <h4 class=
"returnvalue">Return Value
</h4>
1103 <p class=
"description">Response data
</p>
1104 <h4 class=
"discussion">Discussion
</h4>
1105 <p class=
"discussion">This function sends the IPP request with the optional input file
"infile
" to
1106 the specified server, retrying and authenticating as necessary. The request
1107 is freed with
<a href=
"#ippDelete"><code>ippDelete
</code></a>.
<br>
1109 If
"infile
" is a valid file descriptor,
<code>cupsDoIORequest
</code> copies
1110 all of the data from the file after the IPP request message.
<br>
1112 If
"outfile
" is a valid file descriptor,
<code>cupsDoIORequest
</code> copies
1113 all of the data after the IPP response message to the file.
1116 <h3 class=
"function"><a name=
"cupsDoRequest">cupsDoRequest
</a></h3>
1117 <p class=
"description">Do an IPP request.
</p>
1119 <a href=
"#ipp_t">ipp_t
</a> *cupsDoRequest (
<br>
1120 <a href=
"#http_t">http_t
</a> *http,
<br>
1121 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
1122 const char *resource
<br>
1124 <h4 class=
"parameters">Parameters
</h4>
1127 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1129 <dd class=
"description">IPP request
</dd>
1131 <dd class=
"description">HTTP resource for POST
</dd>
1133 <h4 class=
"returnvalue">Return Value
</h4>
1134 <p class=
"description">Response data
</p>
1135 <h4 class=
"discussion">Discussion
</h4>
1136 <p class=
"discussion">This function sends the IPP request to the specified server, retrying
1137 and authenticating as necessary. The request is freed with
<a href=
"#ippDelete"><code>ippDelete
</code></a>.
</p>
1138 <h3 class=
"function"><a name=
"cupsEncodeOptions">cupsEncodeOptions
</a></h3>
1139 <p class=
"description">Encode printer options into IPP attributes.
</p>
1141 void cupsEncodeOptions (
<br>
1142 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
1143 int num_options,
<br>
1144 cups_option_t *options
<br>
1146 <h4 class=
"parameters">Parameters
</h4>
1149 <dd class=
"description">Request to add to
</dd>
1150 <dt>num_options
</dt>
1151 <dd class=
"description">Number of options
</dd>
1153 <dd class=
"description">Options
</dd>
1155 <h4 class=
"discussion">Discussion
</h4>
1156 <p class=
"discussion">This function adds operation, job, and then subscription attributes,
1157 in that order. Use the cupsEncodeOptions2() function to add attributes
1158 for a single group.
</p>
1159 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"cupsEncodeOptions2">cupsEncodeOptions2
</a></h3>
1160 <p class=
"description">Encode printer options into IPP attributes for a group.
</p>
1162 void cupsEncodeOptions2 (
<br>
1163 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
1164 int num_options,
<br>
1165 cups_option_t *options,
<br>
1166 ipp_tag_t group_tag
<br>
1168 <h4 class=
"parameters">Parameters
</h4>
1171 <dd class=
"description">Request to add to
</dd>
1172 <dt>num_options
</dt>
1173 <dd class=
"description">Number of options
</dd>
1175 <dd class=
"description">Options
</dd>
1177 <dd class=
"description">Group to encode
</dd>
1179 <h4 class=
"discussion">Discussion
</h4>
1180 <p class=
"discussion">This function only adds attributes for a single group. Call this
1181 function multiple times for each group, or use cupsEncodeOptions()
1182 to add the standard groups.
1185 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a name=
"cupsGetDevices">cupsGetDevices
</a></h3>
1186 <p class=
"description">Get available printer devices.
</p>
1188 ipp_status_t cupsGetDevices (
<br>
1189 <a href=
"#http_t">http_t
</a> *http,
<br>
1190 int timeout,
<br>
1191 const char *include_schemes,
<br>
1192 const char *exclude_schemes,
<br>
1193 cups_device_cb_t callback,
<br>
1194 void *user_data
<br>
1196 <h4 class=
"parameters">Parameters
</h4>
1199 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1201 <dd class=
"description">Timeout in seconds or
<code>CUPS_TIMEOUT_DEFAULT
</code></dd>
1202 <dt>include_schemes
</dt>
1203 <dd class=
"description">Comma-separated URI schemes to include or
<code>CUPS_INCLUDE_ALL
</code></dd>
1204 <dt>exclude_schemes
</dt>
1205 <dd class=
"description">Comma-separated URI schemes to exclude or
<code>CUPS_EXCLUDE_NONE
</code></dd>
1207 <dd class=
"description">Callback function
</dd>
1209 <dd class=
"description">User data pointer
</dd>
1211 <h4 class=
"returnvalue">Return Value
</h4>
1212 <p class=
"description">Request status -
<code>IPP_OK
</code> on success.
</p>
1213 <h4 class=
"discussion">Discussion
</h4>
1214 <p class=
"discussion">This function sends a CUPS-Get-Devices request and streams the discovered
1215 devices to the specified callback function. The
"timeout
" parameter controls
1216 how long the request lasts, while the
"include_schemes
" and
"exclude_schemes
"
1217 parameters provide comma-delimited lists of backends to include or omit from
1218 the request respectively.
1221 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/macOS
10.4 </span><a name=
"cupsGetFd">cupsGetFd
</a></h3>
1222 <p class=
"description">Get a file from the server.
</p>
1224 http_status_t cupsGetFd (
<br>
1225 <a href=
"#http_t">http_t
</a> *http,
<br>
1226 const char *resource,
<br>
1227 int fd
<br>
1229 <h4 class=
"parameters">Parameters
</h4>
1232 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1234 <dd class=
"description">Resource name
</dd>
1236 <dd class=
"description">File descriptor
</dd>
1238 <h4 class=
"returnvalue">Return Value
</h4>
1239 <p class=
"description">HTTP status
</p>
1240 <h4 class=
"discussion">Discussion
</h4>
1241 <p class=
"discussion">This function returns
<code>HTTP_STATUS_OK
</code> when the file is successfully retrieved.
1244 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/macOS
10.4 </span><a name=
"cupsGetFile">cupsGetFile
</a></h3>
1245 <p class=
"description">Get a file from the server.
</p>
1247 http_status_t cupsGetFile (
<br>
1248 <a href=
"#http_t">http_t
</a> *http,
<br>
1249 const char *resource,
<br>
1250 const char *filename
<br>
1252 <h4 class=
"parameters">Parameters
</h4>
1255 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1257 <dd class=
"description">Resource name
</dd>
1259 <dd class=
"description">Filename
</dd>
1261 <h4 class=
"returnvalue">Return Value
</h4>
1262 <p class=
"description">HTTP status
</p>
1263 <h4 class=
"discussion">Discussion
</h4>
1264 <p class=
"discussion">This function returns
<code>HTTP_STATUS_OK
</code> when the file is successfully retrieved.
1267 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a name=
"cupsGetResponse">cupsGetResponse
</a></h3>
1268 <p class=
"description">Get a response to an IPP request.
</p>
1270 <a href=
"#ipp_t">ipp_t
</a> *cupsGetResponse (
<br>
1271 <a href=
"#http_t">http_t
</a> *http,
<br>
1272 const char *resource
<br>
1274 <h4 class=
"parameters">Parameters
</h4>
1277 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1279 <dd class=
"description">HTTP resource for POST
</dd>
1281 <h4 class=
"returnvalue">Return Value
</h4>
1282 <p class=
"description">Response or
<code>NULL
</code> on HTTP error
</p>
1283 <h4 class=
"discussion">Discussion
</h4>
1284 <p class=
"discussion">Use this function to get the response for an IPP request sent using
1285 <a href=
"#cupsSendRequest"><code>cupsSendRequest
</code></a>. For requests that return additional data, use
1286 <a href=
"#cupsReadResponseData"><code>cupsReadResponseData
</code></a> after getting a successful response,
1287 otherwise call
<a href=
"#httpFlush"><code>httpFlush
</code></a> to complete the response processing.
1290 <h3 class=
"function"><a name=
"cupsLastError">cupsLastError
</a></h3>
1291 <p class=
"description">Return the last IPP status code received on the current
1294 ipp_status_t cupsLastError (void);
</p>
1295 <h4 class=
"returnvalue">Return Value
</h4>
1296 <p class=
"description">IPP status code from last request
</p>
1297 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"cupsLastErrorString">cupsLastErrorString
</a></h3>
1298 <p class=
"description">Return the last IPP status-message received on the
1301 const char *cupsLastErrorString (void);
</p>
1302 <h4 class=
"returnvalue">Return Value
</h4>
1303 <p class=
"description">status-message text from last request
</p>
1304 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/macOS
10.4 </span><a name=
"cupsPutFd">cupsPutFd
</a></h3>
1305 <p class=
"description">Put a file on the server.
</p>
1307 http_status_t cupsPutFd (
<br>
1308 <a href=
"#http_t">http_t
</a> *http,
<br>
1309 const char *resource,
<br>
1310 int fd
<br>
1312 <h4 class=
"parameters">Parameters
</h4>
1315 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1317 <dd class=
"description">Resource name
</dd>
1319 <dd class=
"description">File descriptor
</dd>
1321 <h4 class=
"returnvalue">Return Value
</h4>
1322 <p class=
"description">HTTP status
</p>
1323 <h4 class=
"discussion">Discussion
</h4>
1324 <p class=
"discussion">This function returns
<code>HTTP_STATUS_CREATED
</code> when the file is stored
1328 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/macOS
10.4 </span><a name=
"cupsPutFile">cupsPutFile
</a></h3>
1329 <p class=
"description">Put a file on the server.
</p>
1331 http_status_t cupsPutFile (
<br>
1332 <a href=
"#http_t">http_t
</a> *http,
<br>
1333 const char *resource,
<br>
1334 const char *filename
<br>
1336 <h4 class=
"parameters">Parameters
</h4>
1339 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1341 <dd class=
"description">Resource name
</dd>
1343 <dd class=
"description">Filename
</dd>
1345 <h4 class=
"returnvalue">Return Value
</h4>
1346 <p class=
"description">HTTP status
</p>
1347 <h4 class=
"discussion">Discussion
</h4>
1348 <p class=
"discussion">This function returns
<code>HTTP_CREATED
</code> when the file is stored
1352 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a name=
"cupsReadResponseData">cupsReadResponseData
</a></h3>
1353 <p class=
"description">Read additional data after the IPP response.
</p>
1355 ssize_t cupsReadResponseData (
<br>
1356 <a href=
"#http_t">http_t
</a> *http,
<br>
1357 char *buffer,
<br>
1358 size_t length
<br>
1360 <h4 class=
"parameters">Parameters
</h4>
1363 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1365 <dd class=
"description">Buffer to use
</dd>
1367 <dd class=
"description">Number of bytes to read
</dd>
1369 <h4 class=
"returnvalue">Return Value
</h4>
1370 <p class=
"description">Bytes read,
0 on EOF, -
1 on error
</p>
1371 <h4 class=
"discussion">Discussion
</h4>
1372 <p class=
"discussion">This function is used after
<a href=
"#cupsGetResponse"><code>cupsGetResponse
</code></a> to read the PPD or document
1373 files from
<code>CUPS_GET_PPD
</code> and
<code>CUPS_GET_DOCUMENT
</code> requests,
1377 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a name=
"cupsSendRequest">cupsSendRequest
</a></h3>
1378 <p class=
"description">Send an IPP request.
</p>
1380 http_status_t cupsSendRequest (
<br>
1381 <a href=
"#http_t">http_t
</a> *http,
<br>
1382 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
1383 const char *resource,
<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">IPP request
</dd>
1393 <dd class=
"description">Resource path
</dd>
1395 <dd class=
"description">Length of data to follow or
<code>CUPS_LENGTH_VARIABLE
</code></dd>
1397 <h4 class=
"returnvalue">Return Value
</h4>
1398 <p class=
"description">Initial HTTP status
</p>
1399 <h4 class=
"discussion">Discussion
</h4>
1400 <p class=
"discussion">Use
<a href=
"#cupsWriteRequestData"><code>cupsWriteRequestData
</code></a> to write any additional data (document, PPD
1401 file, etc.) for the request,
<a href=
"#cupsGetResponse"><code>cupsGetResponse
</code></a> to get the IPP response,
1402 and
<a href=
"#cupsReadResponseData"><code>cupsReadResponseData
</code></a> to read any additional data following the
1403 response. Only one request can be sent/queued at a time per
<code>http_t
</code>
1406 Returns the initial HTTP status code, which will be
<code>HTTP_STATUS_CONTINUE
</code>
1407 on a successful send of the request.
<br>
1409 Note: Unlike
<a href=
"#cupsDoFileRequest"><code>cupsDoFileRequest
</code></a>,
<a href=
"#cupsDoIORequest"><code>cupsDoIORequest
</code></a>, and
1410 <a href=
"#cupsDoRequest"><code>cupsDoRequest
</code></a>, the request is NOT freed with
<a href=
"#ippDelete"><code>ippDelete
</code></a>.
1413 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a name=
"cupsWriteRequestData">cupsWriteRequestData
</a></h3>
1414 <p class=
"description">Write additional data after an IPP request.
</p>
1416 http_status_t cupsWriteRequestData (
<br>
1417 <a href=
"#http_t">http_t
</a> *http,
<br>
1418 const char *buffer,
<br>
1419 size_t length
<br>
1421 <h4 class=
"parameters">Parameters
</h4>
1424 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1426 <dd class=
"description">Bytes to write
</dd>
1428 <dd class=
"description">Number of bytes to write
</dd>
1430 <h4 class=
"returnvalue">Return Value
</h4>
1431 <p class=
"description"><code>HTTP_STATUS_CONTINUE
</code> if OK or HTTP status on error
</p>
1432 <h4 class=
"discussion">Discussion
</h4>
1433 <p class=
"discussion">This function is used after
<a href=
"#cupsSendRequest"><code>cupsSendRequest
</code></a> to provide a PPD and
1434 after
<a href=
"#cupsStartDocument"><code>cupsStartDocument
</code></a> to provide a document file.
1437 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"httpAcceptConnection">httpAcceptConnection
</a></h3>
1438 <p class=
"description">Accept a new HTTP client connection from the
1439 specified listening socket.
</p>
1441 <a href=
"#http_t">http_t
</a> *httpAcceptConnection (
<br>
1442 int fd,
<br>
1443 int blocking
<br>
1445 <h4 class=
"parameters">Parameters
</h4>
1448 <dd class=
"description">Listen socket file descriptor
</dd>
1450 <dd class=
"description">1 if the connection should be
1451 blocking,
0 otherwise
</dd>
1453 <h4 class=
"returnvalue">Return Value
</h4>
1454 <p class=
"description">HTTP connection or
<code>NULL
</code></p>
1455 <h3 class=
"function"><span class=
"info"> CUPS
1.5/macOS
10.7 </span><a name=
"httpAddCredential">httpAddCredential
</a></h3>
1456 <p class=
"description">Allocates and adds a single credential to an array.
</p>
1458 int httpAddCredential (
<br>
1459 cups_array_t *credentials,
<br>
1460 const void *data,
<br>
1461 size_t datalen
<br>
1463 <h4 class=
"parameters">Parameters
</h4>
1465 <dt>credentials
</dt>
1466 <dd class=
"description">Credentials array
</dd>
1468 <dd class=
"description">PEM-encoded X
.509 data
</dd>
1470 <dd class=
"description">Length of data
</dd>
1472 <h4 class=
"returnvalue">Return Value
</h4>
1473 <p class=
"description">0 on success, -
1 on error
</p>
1474 <h4 class=
"discussion">Discussion
</h4>
1475 <p class=
"discussion">Use
<code>cupsArrayNew(NULL, NULL)
</code> to create a credentials array.
1478 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"httpAddrAny">httpAddrAny
</a></h3>
1479 <p class=
"description">Check for the
"any
" address.
</p>
1481 int httpAddrAny (
<br>
1482 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1484 <h4 class=
"parameters">Parameters
</h4>
1487 <dd class=
"description">Address to check
</dd>
1489 <h4 class=
"returnvalue">Return Value
</h4>
1490 <p class=
"description">1 if
"any
",
0 otherwise
</p>
1491 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpAddrClose">httpAddrClose
</a></h3>
1492 <p class=
"description">Close a socket created by
<a href=
"#httpAddrConnect"><code>httpAddrConnect
</code></a> or
1493 <a href=
"#httpAddrListen"><code>httpAddrListen
</code></a>.
</p>
1495 int httpAddrClose (
<br>
1496 <a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
1497 int fd
<br>
1499 <h4 class=
"parameters">Parameters
</h4>
1502 <dd class=
"description">Listen address or
<code>NULL
</code></dd>
1504 <dd class=
"description">Socket file descriptor
</dd>
1506 <h4 class=
"returnvalue">Return Value
</h4>
1507 <p class=
"description">0 on success, -
1 on failure
</p>
1508 <h4 class=
"discussion">Discussion
</h4>
1509 <p class=
"discussion">Pass
<code>NULL
</code> for sockets created with
<a href=
"#httpAddrConnect"><code>httpAddrConnect
</code></a> and the
1510 listen address for sockets created with
<a href=
"#httpAddrListen"><code>httpAddrListen
</code></a>. This will
1511 ensure that domain sockets are removed when closed.
1514 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"httpAddrEqual">httpAddrEqual
</a></h3>
1515 <p class=
"description">Compare two addresses.
</p>
1517 int httpAddrEqual (
<br>
1518 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr1,
<br>
1519 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr2
<br>
1521 <h4 class=
"parameters">Parameters
</h4>
1524 <dd class=
"description">First address
</dd>
1526 <dd class=
"description">Second address
</dd>
1528 <h4 class=
"returnvalue">Return Value
</h4>
1529 <p class=
"description">1 if equal,
0 if not
</p>
1530 <h3 class=
"function"><a name=
"httpAddrFamily">httpAddrFamily
</a></h3>
1531 <p class=
"description">Get the address family of an address.
</p>
1533 int httpAddrFamily (
<br>
1534 <a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1536 <h4 class=
"parameters">Parameters
</h4>
1539 <dd class=
"description">Address
</dd>
1541 <h4 class=
"returnvalue">Return Value
</h4>
1542 <p class=
"description">Address family
</p>
1543 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"httpAddrLength">httpAddrLength
</a></h3>
1544 <p class=
"description">Return the length of the address in bytes.
</p>
1546 int httpAddrLength (
<br>
1547 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1549 <h4 class=
"parameters">Parameters
</h4>
1552 <dd class=
"description">Address
</dd>
1554 <h4 class=
"returnvalue">Return Value
</h4>
1555 <p class=
"description">Length in bytes
</p>
1556 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"httpAddrListen">httpAddrListen
</a></h3>
1557 <p class=
"description">Create a listening socket bound to the specified
1558 address and port.
</p>
1560 int httpAddrListen (
<br>
1561 <a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
1562 int port
<br>
1564 <h4 class=
"parameters">Parameters
</h4>
1567 <dd class=
"description">Address to bind to
</dd>
1569 <dd class=
"description">Port number to bind to
</dd>
1571 <h4 class=
"returnvalue">Return Value
</h4>
1572 <p class=
"description">Socket or -
1 on error
</p>
1573 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"httpAddrLocalhost">httpAddrLocalhost
</a></h3>
1574 <p class=
"description">Check for the local loopback address.
</p>
1576 int httpAddrLocalhost (
<br>
1577 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1579 <h4 class=
"parameters">Parameters
</h4>
1582 <dd class=
"description">Address to check
</dd>
1584 <h4 class=
"returnvalue">Return Value
</h4>
1585 <p class=
"description">1 if local host,
0 otherwise
</p>
1586 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"httpAddrLookup">httpAddrLookup
</a></h3>
1587 <p class=
"description">Lookup the hostname associated with the address.
</p>
1589 char *httpAddrLookup (
<br>
1590 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
1591 char *name,
<br>
1592 int namelen
<br>
1594 <h4 class=
"parameters">Parameters
</h4>
1597 <dd class=
"description">Address to lookup
</dd>
1599 <dd class=
"description">Host name buffer
</dd>
1601 <dd class=
"description">Size of name buffer
</dd>
1603 <h4 class=
"returnvalue">Return Value
</h4>
1604 <p class=
"description">Host name
</p>
1605 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"httpAddrPort">httpAddrPort
</a></h3>
1606 <p class=
"description">Get the port number associated with an address.
</p>
1608 int httpAddrPort (
<br>
1609 <a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1611 <h4 class=
"parameters">Parameters
</h4>
1614 <dd class=
"description">Address
</dd>
1616 <h4 class=
"returnvalue">Return Value
</h4>
1617 <p class=
"description">Port number
</p>
1618 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"httpAddrString">httpAddrString
</a></h3>
1619 <p class=
"description">Convert an address to a numeric string.
</p>
1621 char *httpAddrString (
<br>
1622 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
1623 char *s,
<br>
1624 int slen
<br>
1626 <h4 class=
"parameters">Parameters
</h4>
1629 <dd class=
"description">Address to convert
</dd>
1631 <dd class=
"description">String buffer
</dd>
1633 <dd class=
"description">Length of string
</dd>
1635 <h4 class=
"returnvalue">Return Value
</h4>
1636 <p class=
"description">Numeric address string
</p>
1637 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"httpAssembleURI">httpAssembleURI
</a></h3>
1638 <p class=
"description">Assemble a uniform resource identifier from its
1641 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpAssembleURI (
<br>
1642 <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> encoding,
<br>
1643 char *uri,
<br>
1644 int urilen,
<br>
1645 const char *scheme,
<br>
1646 const char *username,
<br>
1647 const char *host,
<br>
1648 int port,
<br>
1649 const char *resource
<br>
1651 <h4 class=
"parameters">Parameters
</h4>
1654 <dd class=
"description">Encoding flags
</dd>
1656 <dd class=
"description">URI buffer
</dd>
1658 <dd class=
"description">Size of URI buffer
</dd>
1660 <dd class=
"description">Scheme name
</dd>
1662 <dd class=
"description">Username
</dd>
1664 <dd class=
"description">Hostname or address
</dd>
1666 <dd class=
"description">Port number
</dd>
1668 <dd class=
"description">Resource
</dd>
1670 <h4 class=
"returnvalue">Return Value
</h4>
1671 <p class=
"description">URI status
</p>
1672 <h4 class=
"discussion">Discussion
</h4>
1673 <p class=
"discussion">This function escapes reserved characters in the URI depending on the
1674 value of the
"encoding
" argument. You should use this function in
1675 place of traditional string functions whenever you need to create a
1679 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"httpAssembleURIf">httpAssembleURIf
</a></h3>
1680 <p class=
"description">Assemble a uniform resource identifier from its
1681 components with a formatted resource.
</p>
1683 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpAssembleURIf (
<br>
1684 <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> encoding,
<br>
1685 char *uri,
<br>
1686 int urilen,
<br>
1687 const char *scheme,
<br>
1688 const char *username,
<br>
1689 const char *host,
<br>
1690 int port,
<br>
1691 const char *resourcef,
<br>
1692 ...
<br>
1694 <h4 class=
"parameters">Parameters
</h4>
1697 <dd class=
"description">Encoding flags
</dd>
1699 <dd class=
"description">URI buffer
</dd>
1701 <dd class=
"description">Size of URI buffer
</dd>
1703 <dd class=
"description">Scheme name
</dd>
1705 <dd class=
"description">Username
</dd>
1707 <dd class=
"description">Hostname or address
</dd>
1709 <dd class=
"description">Port number
</dd>
1711 <dd class=
"description">Printf-style resource
</dd>
1713 <dd class=
"description">Additional arguments as needed
</dd>
1715 <h4 class=
"returnvalue">Return Value
</h4>
1716 <p class=
"description">URI status
</p>
1717 <h4 class=
"discussion">Discussion
</h4>
1718 <p class=
"discussion">This function creates a formatted version of the resource string
1719 argument
"resourcef
" and escapes reserved characters in the URI
1720 depending on the value of the
"encoding
" argument. You should use
1721 this function in place of traditional string functions whenever
1722 you need to create a URI string.
1725 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"httpAssembleUUID">httpAssembleUUID
</a></h3>
1726 <p class=
"description">Assemble a name-based UUID URN conforming to RFC
4122.
</p>
1728 char *httpAssembleUUID (
<br>
1729 const char *server,
<br>
1730 int port,
<br>
1731 const char *name,
<br>
1732 int number,
<br>
1733 char *buffer,
<br>
1734 size_t bufsize
<br>
1736 <h4 class=
"parameters">Parameters
</h4>
1739 <dd class=
"description">Server name
</dd>
1741 <dd class=
"description">Port number
</dd>
1743 <dd class=
"description">Object name or NULL
</dd>
1745 <dd class=
"description">Object number or
0</dd>
1747 <dd class=
"description">String buffer
</dd>
1749 <dd class=
"description">Size of buffer
</dd>
1751 <h4 class=
"returnvalue">Return Value
</h4>
1752 <p class=
"description">UUID string
</p>
1753 <h4 class=
"discussion">Discussion
</h4>
1754 <p class=
"discussion">This function creates a unique
128-bit identifying number using the server
1755 name, port number, random data, and optionally an object name and/or object
1756 number. The result is formatted as a UUID URN as defined in RFC
4122.
<br>
1758 The buffer needs to be at least
46 bytes in size.
1761 <h3 class=
"function"><a name=
"httpBlocking">httpBlocking
</a></h3>
1762 <p class=
"description">Set blocking/non-blocking behavior on a connection.
</p>
1764 void httpBlocking (
<br>
1765 <a href=
"#http_t">http_t
</a> *http,
<br>
1766 int b
<br>
1768 <h4 class=
"parameters">Parameters
</h4>
1771 <dd class=
"description">HTTP connection
</dd>
1773 <dd class=
"description">1 = blocking,
0 = non-blocking
</dd>
1775 <h3 class=
"function"><a name=
"httpCheck">httpCheck
</a></h3>
1776 <p class=
"description">Check to see if there is a pending response from the server.
</p>
1779 <a href=
"#http_t">http_t
</a> *http
<br>
1781 <h4 class=
"parameters">Parameters
</h4>
1784 <dd class=
"description">HTTP connection
</dd>
1786 <h4 class=
"returnvalue">Return Value
</h4>
1787 <p class=
"description">0 = no data,
1 = data available
</p>
1788 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a name=
"httpClearCookie">httpClearCookie
</a></h3>
1789 <p class=
"description">Clear the cookie value(s).
</p>
1791 void httpClearCookie (
<br>
1792 <a href=
"#http_t">http_t
</a> *http
<br>
1794 <h4 class=
"parameters">Parameters
</h4>
1797 <dd class=
"description">HTTP connection
</dd>
1799 <h3 class=
"function"><a name=
"httpClearFields">httpClearFields
</a></h3>
1800 <p class=
"description">Clear HTTP request fields.
</p>
1802 void httpClearFields (
<br>
1803 <a href=
"#http_t">http_t
</a> *http
<br>
1805 <h4 class=
"parameters">Parameters
</h4>
1808 <dd class=
"description">HTTP connection
</dd>
1810 <h3 class=
"function"><a name=
"httpClose">httpClose
</a></h3>
1811 <p class=
"description">Close an HTTP connection.
</p>
1813 void httpClose (
<br>
1814 <a href=
"#http_t">http_t
</a> *http
<br>
1816 <h4 class=
"parameters">Parameters
</h4>
1819 <dd class=
"description">HTTP connection
</dd>
1821 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpCompareCredentials">httpCompareCredentials
</a></h3>
1822 <p class=
"description">Compare two sets of X
.509 credentials.
</p>
1824 int httpCompareCredentials (
<br>
1825 cups_array_t *cred1,
<br>
1826 cups_array_t *cred2
<br>
1828 <h4 class=
"parameters">Parameters
</h4>
1831 <dd class=
"description">First set of X
.509 credentials
</dd>
1833 <dd class=
"description">Second set of X
.509 credentials
</dd>
1835 <h4 class=
"returnvalue">Return Value
</h4>
1836 <p class=
"description">1 if they match,
0 if they do not
</p>
1837 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpConnect">httpConnect
</a></h3>
1838 <p class=
"description">Connect to a HTTP server.
</p>
1840 <a href=
"#http_t">http_t
</a> *httpConnect (
<br>
1841 const char *host,
<br>
1842 int port
<br>
1844 <h4 class=
"parameters">Parameters
</h4>
1847 <dd class=
"description">Host to connect to
</dd>
1849 <dd class=
"description">Port number
</dd>
1851 <h4 class=
"returnvalue">Return Value
</h4>
1852 <p class=
"description">New HTTP connection
</p>
1853 <h4 class=
"discussion">Discussion
</h4>
1854 <p class=
"discussion">This function is deprecated - use
<a href=
"#httpConnect2"><code>httpConnect2
</code></a> instead.
1857 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"httpConnect2">httpConnect2
</a></h3>
1858 <p class=
"description">Connect to a HTTP server.
</p>
1860 <a href=
"#http_t">http_t
</a> *httpConnect2 (
<br>
1861 const char *host,
<br>
1862 int port,
<br>
1863 <a href=
"#http_addrlist_t">http_addrlist_t
</a> *addrlist,
<br>
1864 int family,
<br>
1865 <a href=
"#http_encryption_t">http_encryption_t
</a> encryption,
<br>
1866 int blocking,
<br>
1867 int msec,
<br>
1868 int *cancel
<br>
1870 <h4 class=
"parameters">Parameters
</h4>
1873 <dd class=
"description">Host to connect to
</dd>
1875 <dd class=
"description">Port number
</dd>
1877 <dd class=
"description">List of addresses or NULL to lookup
</dd>
1879 <dd class=
"description">Address family to use or
<code>AF_UNSPEC
</code> for any
</dd>
1881 <dd class=
"description">Type of encryption to use
</dd>
1883 <dd class=
"description">1 for blocking connection,
0 for non-blocking
</dd>
1885 <dd class=
"description">Connection timeout in milliseconds,
0 means don't connect
</dd>
1887 <dd class=
"description">Pointer to
"cancel
" variable
</dd>
1889 <h4 class=
"returnvalue">Return Value
</h4>
1890 <p class=
"description">New HTTP connection
</p>
1891 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpConnectEncrypt">httpConnectEncrypt
</a></h3>
1892 <p class=
"description">Connect to a HTTP server using encryption.
</p>
1894 <a href=
"#http_t">http_t
</a> *httpConnectEncrypt (
<br>
1895 const char *host,
<br>
1896 int port,
<br>
1897 <a href=
"#http_encryption_t">http_encryption_t
</a> encryption
<br>
1899 <h4 class=
"parameters">Parameters
</h4>
1902 <dd class=
"description">Host to connect to
</dd>
1904 <dd class=
"description">Port number
</dd>
1906 <dd class=
"description">Type of encryption to use
</dd>
1908 <h4 class=
"returnvalue">Return Value
</h4>
1909 <p class=
"description">New HTTP connection
</p>
1910 <h4 class=
"discussion">Discussion
</h4>
1911 <p class=
"discussion">This function is now deprecated. Please use the
<a href=
"#httpConnect2"><code>httpConnect2
</code></a> function
1915 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpDecode64">httpDecode64
</a></h3>
1916 <p class=
"description">Base64-decode a string.
</p>
1918 char *httpDecode64 (
<br>
1919 char *out,
<br>
1920 const char *in
<br>
1922 <h4 class=
"parameters">Parameters
</h4>
1925 <dd class=
"description">String to write to
</dd>
1927 <dd class=
"description">String to read from
</dd>
1929 <h4 class=
"returnvalue">Return Value
</h4>
1930 <p class=
"description">Decoded string
</p>
1931 <h4 class=
"discussion">Discussion
</h4>
1932 <p class=
"discussion">This function is deprecated. Use the httpDecode64_2() function instead
1933 which provides buffer length arguments.
1936 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/macOS
10.4 </span><a name=
"httpDecode64_2">httpDecode64_2
</a></h3>
1937 <p class=
"description">Base64-decode a string.
</p>
1939 char *httpDecode64_2 (
<br>
1940 char *out,
<br>
1941 int *outlen,
<br>
1942 const char *in
<br>
1944 <h4 class=
"parameters">Parameters
</h4>
1947 <dd class=
"description">String to write to
</dd>
1949 <dd class=
"description">Size of output string
</dd>
1951 <dd class=
"description">String to read from
</dd>
1953 <h4 class=
"returnvalue">Return Value
</h4>
1954 <p class=
"description">Decoded string
</p>
1955 <h3 class=
"function"><a name=
"httpDelete">httpDelete
</a></h3>
1956 <p class=
"description">Send a DELETE request to the server.
</p>
1958 int httpDelete (
<br>
1959 <a href=
"#http_t">http_t
</a> *http,
<br>
1960 const char *uri
<br>
1962 <h4 class=
"parameters">Parameters
</h4>
1965 <dd class=
"description">HTTP connection
</dd>
1967 <dd class=
"description">URI to delete
</dd>
1969 <h4 class=
"returnvalue">Return Value
</h4>
1970 <p class=
"description">Status of call (
0 = success)
</p>
1971 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpEncode64">httpEncode64
</a></h3>
1972 <p class=
"description">Base64-encode a string.
</p>
1974 char *httpEncode64 (
<br>
1975 char *out,
<br>
1976 const char *in
<br>
1978 <h4 class=
"parameters">Parameters
</h4>
1981 <dd class=
"description">String to write to
</dd>
1983 <dd class=
"description">String to read from
</dd>
1985 <h4 class=
"returnvalue">Return Value
</h4>
1986 <p class=
"description">Encoded string
</p>
1987 <h4 class=
"discussion">Discussion
</h4>
1988 <p class=
"discussion">This function is deprecated. Use the httpEncode64_2() function instead
1989 which provides buffer length arguments.
1992 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/macOS
10.4 </span><a name=
"httpEncode64_2">httpEncode64_2
</a></h3>
1993 <p class=
"description">Base64-encode a string.
</p>
1995 char *httpEncode64_2 (
<br>
1996 char *out,
<br>
1997 int outlen,
<br>
1998 const char *in,
<br>
1999 int inlen
<br>
2001 <h4 class=
"parameters">Parameters
</h4>
2004 <dd class=
"description">String to write to
</dd>
2006 <dd class=
"description">Size of output string
</dd>
2008 <dd class=
"description">String to read from
</dd>
2010 <dd class=
"description">Size of input string
</dd>
2012 <h4 class=
"returnvalue">Return Value
</h4>
2013 <p class=
"description">Encoded string
</p>
2014 <h3 class=
"function"><a name=
"httpEncryption">httpEncryption
</a></h3>
2015 <p class=
"description">Set the required encryption on the link.
</p>
2017 int httpEncryption (
<br>
2018 <a href=
"#http_t">http_t
</a> *http,
<br>
2019 <a href=
"#http_encryption_t">http_encryption_t
</a> e
<br>
2021 <h4 class=
"parameters">Parameters
</h4>
2024 <dd class=
"description">HTTP connection
</dd>
2026 <dd class=
"description">New encryption preference
</dd>
2028 <h4 class=
"returnvalue">Return Value
</h4>
2029 <p class=
"description">-
1 on error,
0 on success
</p>
2030 <h3 class=
"function"><a name=
"httpError">httpError
</a></h3>
2031 <p class=
"description">Get the last error on a connection.
</p>
2034 <a href=
"#http_t">http_t
</a> *http
<br>
2036 <h4 class=
"parameters">Parameters
</h4>
2039 <dd class=
"description">HTTP connection
</dd>
2041 <h4 class=
"returnvalue">Return Value
</h4>
2042 <p class=
"description">Error code (errno) value
</p>
2043 <h3 class=
"function"><a name=
"httpFieldValue">httpFieldValue
</a></h3>
2044 <p class=
"description">Return the HTTP field enumeration value for a field
2047 <a href=
"#http_field_t">http_field_t
</a> httpFieldValue (
<br>
2048 const char *name
<br>
2050 <h4 class=
"parameters">Parameters
</h4>
2053 <dd class=
"description">String name
</dd>
2055 <h4 class=
"returnvalue">Return Value
</h4>
2056 <p class=
"description">Field index
</p>
2057 <h3 class=
"function"><a name=
"httpFlush">httpFlush
</a></h3>
2058 <p class=
"description">Flush data from a HTTP connection.
</p>
2060 void httpFlush (
<br>
2061 <a href=
"#http_t">http_t
</a> *http
<br>
2063 <h4 class=
"parameters">Parameters
</h4>
2066 <dd class=
"description">HTTP connection
</dd>
2068 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"httpFlushWrite">httpFlushWrite
</a></h3>
2069 <p class=
"description">Flush data in write buffer.
</p>
2071 int httpFlushWrite (
<br>
2072 <a href=
"#http_t">http_t
</a> *http
<br>
2074 <h4 class=
"parameters">Parameters
</h4>
2077 <dd class=
"description">HTTP connection
</dd>
2079 <h4 class=
"returnvalue">Return Value
</h4>
2080 <p class=
"description">Bytes written or -
1 on error
</p>
2081 <h3 class=
"function"><a name=
"httpFreeCredentials">httpFreeCredentials
</a></h3>
2082 <p class=
"description">Free an array of credentials.
</p>
2084 void httpFreeCredentials (
<br>
2085 cups_array_t *credentials
<br>
2087 <h4 class=
"parameters">Parameters
</h4>
2089 <dt>credentials
</dt>
2090 <dd class=
"description">Array of credentials
</dd>
2092 <h3 class=
"function"><a name=
"httpGet">httpGet
</a></h3>
2093 <p class=
"description">Send a GET request to the server.
</p>
2096 <a href=
"#http_t">http_t
</a> *http,
<br>
2097 const char *uri
<br>
2099 <h4 class=
"parameters">Parameters
</h4>
2102 <dd class=
"description">HTTP connection
</dd>
2104 <dd class=
"description">URI to get
</dd>
2106 <h4 class=
"returnvalue">Return Value
</h4>
2107 <p class=
"description">Status of call (
0 = success)
</p>
2108 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpGetActivity">httpGetActivity
</a></h3>
2109 <p class=
"description">Get the most recent activity for a connection.
</p>
2111 time_t httpGetActivity (
<br>
2112 <a href=
"#http_t">http_t
</a> *http
<br>
2114 <h4 class=
"parameters">Parameters
</h4>
2117 <dd class=
"description">HTTP connection
</dd>
2119 <h4 class=
"returnvalue">Return Value
</h4>
2120 <p class=
"description">Time of last read or write
</p>
2121 <h4 class=
"discussion">Discussion
</h4>
2122 <p class=
"discussion">The return value is the UNIX time of the last read or write.
2125 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpGetAddress">httpGetAddress
</a></h3>
2126 <p class=
"description">Get the address of the connected peer of a connection.
</p>
2128 <a href=
"#http_addr_t">http_addr_t
</a> *httpGetAddress (
<br>
2129 <a href=
"#http_t">http_t
</a> *http
<br>
2131 <h4 class=
"parameters">Parameters
</h4>
2134 <dd class=
"description">HTTP connection
</dd>
2136 <h4 class=
"returnvalue">Return Value
</h4>
2137 <p class=
"description">Connected address or
<code>NULL
</code></p>
2138 <h4 class=
"discussion">Discussion
</h4>
2139 <p class=
"discussion">Returns
<code>NULL
</code> if the socket is currently unconnected.
2142 <h3 class=
"function"><span class=
"info"> CUPS
1.3/macOS
10.5 </span><a name=
"httpGetAuthString">httpGetAuthString
</a></h3>
2143 <p class=
"description">Get the current authorization string.
</p>
2145 char *httpGetAuthString (
<br>
2146 <a href=
"#http_t">http_t
</a> *http
<br>
2148 <h4 class=
"parameters">Parameters
</h4>
2151 <dd class=
"description">HTTP connection
</dd>
2153 <h4 class=
"returnvalue">Return Value
</h4>
2154 <p class=
"description">Authorization string
</p>
2155 <h4 class=
"discussion">Discussion
</h4>
2156 <p class=
"discussion">The authorization string is set by cupsDoAuthentication() and
2157 httpSetAuthString(). Use httpGetAuthString() to retrieve the
2158 string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
2162 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"httpGetBlocking">httpGetBlocking
</a></h3>
2163 <p class=
"description">Get the blocking/non-block state of a connection.
</p>
2165 int httpGetBlocking (
<br>
2166 <a href=
"#http_t">http_t
</a> *http
<br>
2168 <h4 class=
"parameters">Parameters
</h4>
2171 <dd class=
"description">HTTP connection
</dd>
2173 <h4 class=
"returnvalue">Return Value
</h4>
2174 <p class=
"description">1 if blocking,
0 if non-blocking
</p>
2175 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"httpGetContentEncoding">httpGetContentEncoding
</a></h3>
2176 <p class=
"description">Get a common content encoding, if any, between
2177 the client and server.
</p>
2179 const char *httpGetContentEncoding (
<br>
2180 <a href=
"#http_t">http_t
</a> *http
<br>
2182 <h4 class=
"parameters">Parameters
</h4>
2185 <dd class=
"description">HTTP connection
</dd>
2187 <h4 class=
"returnvalue">Return Value
</h4>
2188 <p class=
"description">Content-Coding value or
2189 <code>NULL
</code> for the identity
2191 <h4 class=
"discussion">Discussion
</h4>
2192 <p class=
"discussion">This function uses the value of the Accepts-Encoding HTTP header and must be
2193 called after receiving a response from the server or a request from the
2194 client. The value returned can be use in subsequent requests (for clients)
2195 or in the response (for servers) in order to compress the content stream.
2198 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a name=
"httpGetCookie">httpGetCookie
</a></h3>
2199 <p class=
"description">Get any cookie data from the response.
</p>
2201 const char *httpGetCookie (
<br>
2202 <a href=
"#http_t">http_t
</a> *http
<br>
2204 <h4 class=
"parameters">Parameters
</h4>
2207 <dd class=
"description">HTTP connection
</dd>
2209 <h4 class=
"returnvalue">Return Value
</h4>
2210 <p class=
"description">Cookie data or NULL
</p>
2211 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetDateString">httpGetDateString
</a></h3>
2212 <p class=
"description">Get a formatted date/time string from a time value.
</p>
2214 const char *httpGetDateString (
<br>
2215 time_t t
<br>
2217 <h4 class=
"parameters">Parameters
</h4>
2220 <dd class=
"description">UNIX time
</dd>
2222 <h4 class=
"returnvalue">Return Value
</h4>
2223 <p class=
"description">Date/time string
</p>
2224 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"httpGetDateString2">httpGetDateString2
</a></h3>
2225 <p class=
"description">Get a formatted date/time string from a time value.
</p>
2227 const char *httpGetDateString2 (
<br>
2228 time_t t,
<br>
2229 char *s,
<br>
2230 int slen
<br>
2232 <h4 class=
"parameters">Parameters
</h4>
2235 <dd class=
"description">UNIX time
</dd>
2237 <dd class=
"description">String buffer
</dd>
2239 <dd class=
"description">Size of string buffer
</dd>
2241 <h4 class=
"returnvalue">Return Value
</h4>
2242 <p class=
"description">Date/time string
</p>
2243 <h3 class=
"function"><a name=
"httpGetDateTime">httpGetDateTime
</a></h3>
2244 <p class=
"description">Get a time value from a formatted date/time string.
</p>
2246 time_t httpGetDateTime (
<br>
2247 const char *s
<br>
2249 <h4 class=
"parameters">Parameters
</h4>
2252 <dd class=
"description">Date/time string
</dd>
2254 <h4 class=
"returnvalue">Return Value
</h4>
2255 <p class=
"description">UNIX time
</p>
2256 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpGetEncryption">httpGetEncryption
</a></h3>
2257 <p class=
"description">Get the current encryption mode of a connection.
</p>
2259 <a href=
"#http_encryption_t">http_encryption_t
</a> httpGetEncryption (
<br>
2260 <a href=
"#http_t">http_t
</a> *http
<br>
2262 <h4 class=
"parameters">Parameters
</h4>
2265 <dd class=
"description">HTTP connection
</dd>
2267 <h4 class=
"returnvalue">Return Value
</h4>
2268 <p class=
"description">Current encryption mode
</p>
2269 <h4 class=
"discussion">Discussion
</h4>
2270 <p class=
"discussion">This function returns the encryption mode for the connection. Use the
2271 <a href=
"#httpIsEncrypted"><code>httpIsEncrypted
</code></a> function to determine whether a TLS session has
2275 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"httpGetExpect">httpGetExpect
</a></h3>
2276 <p class=
"description">Get the value of the Expect header, if any.
</p>
2278 http_status_t httpGetExpect (
<br>
2279 <a href=
"#http_t">http_t
</a> *http
<br>
2281 <h4 class=
"parameters">Parameters
</h4>
2284 <dd class=
"description">HTTP connection
</dd>
2286 <h4 class=
"returnvalue">Return Value
</h4>
2287 <p class=
"description">Expect: status, if any
</p>
2288 <h4 class=
"discussion">Discussion
</h4>
2289 <p class=
"discussion">Returns
<code>HTTP_STATUS_NONE
</code> if there is no Expect header, otherwise
2290 returns the expected HTTP status code, typically
<code>HTTP_STATUS_CONTINUE
</code>.
2293 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"httpGetFd">httpGetFd
</a></h3>
2294 <p class=
"description">Get the file descriptor associated with a connection.
</p>
2297 <a href=
"#http_t">http_t
</a> *http
<br>
2299 <h4 class=
"parameters">Parameters
</h4>
2302 <dd class=
"description">HTTP connection
</dd>
2304 <h4 class=
"returnvalue">Return Value
</h4>
2305 <p class=
"description">File descriptor or -
1 if none
</p>
2306 <h3 class=
"function"><a name=
"httpGetField">httpGetField
</a></h3>
2307 <p class=
"description">Get a field value from a request/response.
</p>
2309 const char *httpGetField (
<br>
2310 <a href=
"#http_t">http_t
</a> *http,
<br>
2311 <a href=
"#http_field_t">http_field_t
</a> field
<br>
2313 <h4 class=
"parameters">Parameters
</h4>
2316 <dd class=
"description">HTTP connection
</dd>
2318 <dd class=
"description">Field to get
</dd>
2320 <h4 class=
"returnvalue">Return Value
</h4>
2321 <p class=
"description">Field value
</p>
2322 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetHostByName">httpGetHostByName
</a></h3>
2323 <p class=
"description">Lookup a hostname or IPv4 address, and return
2324 address records for the specified name.
</p>
2326 struct hostent *httpGetHostByName (
<br>
2327 const char *name
<br>
2329 <h4 class=
"parameters">Parameters
</h4>
2332 <dd class=
"description">Hostname or IP address
</dd>
2334 <h4 class=
"returnvalue">Return Value
</h4>
2335 <p class=
"description">Host entry
</p>
2336 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"httpGetHostname">httpGetHostname
</a></h3>
2337 <p class=
"description">Get the FQDN for the connection or local system.
</p>
2339 const char *httpGetHostname (
<br>
2340 <a href=
"#http_t">http_t
</a> *http,
<br>
2341 char *s,
<br>
2342 int slen
<br>
2344 <h4 class=
"parameters">Parameters
</h4>
2347 <dd class=
"description">HTTP connection or NULL
</dd>
2349 <dd class=
"description">String buffer for name
</dd>
2351 <dd class=
"description">Size of buffer
</dd>
2353 <h4 class=
"returnvalue">Return Value
</h4>
2354 <p class=
"description">FQDN for connection or system
</p>
2355 <h4 class=
"discussion">Discussion
</h4>
2356 <p class=
"discussion">When
"http
" points to a connected socket, return the hostname or
2357 address that was used in the call to httpConnect() or httpConnectEncrypt(),
2358 or the address of the client for the connection from httpAcceptConnection().
2359 Otherwise, return the FQDN for the local system using both gethostname()
2360 and gethostbyname() to get the local hostname with domain.
2363 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpGetKeepAlive">httpGetKeepAlive
</a></h3>
2364 <p class=
"description">Get the current Keep-Alive state of the connection.
</p>
2366 <a href=
"#http_keepalive_t">http_keepalive_t
</a> httpGetKeepAlive (
<br>
2367 <a href=
"#http_t">http_t
</a> *http
<br>
2369 <h4 class=
"parameters">Parameters
</h4>
2372 <dd class=
"description">HTTP connection
</dd>
2374 <h4 class=
"returnvalue">Return Value
</h4>
2375 <p class=
"description">Keep-Alive state
</p>
2376 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetLength">httpGetLength
</a></h3>
2377 <p class=
"description">Get the amount of data remaining from the
2378 content-length or transfer-encoding fields.
</p>
2380 int httpGetLength (
<br>
2381 <a href=
"#http_t">http_t
</a> *http
<br>
2383 <h4 class=
"parameters">Parameters
</h4>
2386 <dd class=
"description">HTTP connection
</dd>
2388 <h4 class=
"returnvalue">Return Value
</h4>
2389 <p class=
"description">Content length
</p>
2390 <h4 class=
"discussion">Discussion
</h4>
2391 <p class=
"discussion">This function is deprecated and will not return lengths larger than
2392 2^
31 -
1; use httpGetLength2() instead.
2395 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"httpGetLength2">httpGetLength2
</a></h3>
2396 <p class=
"description">Get the amount of data remaining from the
2397 content-length or transfer-encoding fields.
</p>
2399 off_t httpGetLength2 (
<br>
2400 <a href=
"#http_t">http_t
</a> *http
<br>
2402 <h4 class=
"parameters">Parameters
</h4>
2405 <dd class=
"description">HTTP connection
</dd>
2407 <h4 class=
"returnvalue">Return Value
</h4>
2408 <p class=
"description">Content length
</p>
2409 <h4 class=
"discussion">Discussion
</h4>
2410 <p class=
"discussion">This function returns the complete content length, even for
2411 content larger than
2^
31 -
1.
2414 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpGetPending">httpGetPending
</a></h3>
2415 <p class=
"description">Get the number of bytes that are buffered for writing.
</p>
2417 size_t httpGetPending (
<br>
2418 <a href=
"#http_t">http_t
</a> *http
<br>
2420 <h4 class=
"parameters">Parameters
</h4>
2423 <dd class=
"description">HTTP connection
</dd>
2425 <h4 class=
"returnvalue">Return Value
</h4>
2426 <p class=
"description">Number of bytes buffered
</p>
2427 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpGetReady">httpGetReady
</a></h3>
2428 <p class=
"description">Get the number of bytes that can be read without blocking.
</p>
2430 size_t httpGetReady (
<br>
2431 <a href=
"#http_t">http_t
</a> *http
<br>
2433 <h4 class=
"parameters">Parameters
</h4>
2436 <dd class=
"description">HTTP connection
</dd>
2438 <h4 class=
"returnvalue">Return Value
</h4>
2439 <p class=
"description">Number of bytes available
</p>
2440 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpGetRemaining">httpGetRemaining
</a></h3>
2441 <p class=
"description">Get the number of remaining bytes in the message
2442 body or current chunk.
</p>
2444 size_t httpGetRemaining (
<br>
2445 <a href=
"#http_t">http_t
</a> *http
<br>
2447 <h4 class=
"parameters">Parameters
</h4>
2450 <dd class=
"description">HTTP connection
</dd>
2452 <h4 class=
"returnvalue">Return Value
</h4>
2453 <p class=
"description">Remaining bytes
</p>
2454 <h4 class=
"discussion">Discussion
</h4>
2455 <p class=
"discussion">The
<a href=
"#httpIsChunked"><code>httpIsChunked
</code></a> function can be used to determine whether the
2456 message body is chunked or fixed-length.
2459 <h3 class=
"function"><a name=
"httpGetState">httpGetState
</a></h3>
2460 <p class=
"description">Get the current state of the HTTP request.
</p>
2462 <a href=
"#http_state_t">http_state_t
</a> httpGetState (
<br>
2463 <a href=
"#http_t">http_t
</a> *http
<br>
2465 <h4 class=
"parameters">Parameters
</h4>
2468 <dd class=
"description">HTTP connection
</dd>
2470 <h4 class=
"returnvalue">Return Value
</h4>
2471 <p class=
"description">HTTP state
</p>
2472 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"httpGetStatus">httpGetStatus
</a></h3>
2473 <p class=
"description">Get the status of the last HTTP request.
</p>
2475 http_status_t httpGetStatus (
<br>
2476 <a href=
"#http_t">http_t
</a> *http
<br>
2478 <h4 class=
"parameters">Parameters
</h4>
2481 <dd class=
"description">HTTP connection
</dd>
2483 <h4 class=
"returnvalue">Return Value
</h4>
2484 <p class=
"description">HTTP status
</p>
2485 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetSubField">httpGetSubField
</a></h3>
2486 <p class=
"description">Get a sub-field value.
</p>
2488 char *httpGetSubField (
<br>
2489 <a href=
"#http_t">http_t
</a> *http,
<br>
2490 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
2491 const char *name,
<br>
2492 char *value
<br>
2494 <h4 class=
"parameters">Parameters
</h4>
2497 <dd class=
"description">HTTP connection
</dd>
2499 <dd class=
"description">Field index
</dd>
2501 <dd class=
"description">Name of sub-field
</dd>
2503 <dd class=
"description">Value string
</dd>
2505 <h4 class=
"returnvalue">Return Value
</h4>
2506 <p class=
"description">Value or NULL
</p>
2507 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"httpGetSubField2">httpGetSubField2
</a></h3>
2508 <p class=
"description">Get a sub-field value.
</p>
2510 char *httpGetSubField2 (
<br>
2511 <a href=
"#http_t">http_t
</a> *http,
<br>
2512 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
2513 const char *name,
<br>
2514 char *value,
<br>
2515 int valuelen
<br>
2517 <h4 class=
"parameters">Parameters
</h4>
2520 <dd class=
"description">HTTP connection
</dd>
2522 <dd class=
"description">Field index
</dd>
2524 <dd class=
"description">Name of sub-field
</dd>
2526 <dd class=
"description">Value string
</dd>
2528 <dd class=
"description">Size of value buffer
</dd>
2530 <h4 class=
"returnvalue">Return Value
</h4>
2531 <p class=
"description">Value or NULL
</p>
2532 <h3 class=
"function"><a name=
"httpGetVersion">httpGetVersion
</a></h3>
2533 <p class=
"description">Get the HTTP version at the other end.
</p>
2535 <a href=
"#http_version_t">http_version_t
</a> httpGetVersion (
<br>
2536 <a href=
"#http_t">http_t
</a> *http
<br>
2538 <h4 class=
"parameters">Parameters
</h4>
2541 <dd class=
"description">HTTP connection
</dd>
2543 <h4 class=
"returnvalue">Return Value
</h4>
2544 <p class=
"description">Version number
</p>
2545 <h3 class=
"function"><a name=
"httpGets">httpGets
</a></h3>
2546 <p class=
"description">Get a line of text from a HTTP connection.
</p>
2548 char *httpGets (
<br>
2549 char *line,
<br>
2550 int length,
<br>
2551 <a href=
"#http_t">http_t
</a> *http
<br>
2553 <h4 class=
"parameters">Parameters
</h4>
2556 <dd class=
"description">Line to read into
</dd>
2558 <dd class=
"description">Max length of buffer
</dd>
2560 <dd class=
"description">HTTP connection
</dd>
2562 <h4 class=
"returnvalue">Return Value
</h4>
2563 <p class=
"description">Line or NULL
</p>
2564 <h3 class=
"function"><a name=
"httpHead">httpHead
</a></h3>
2565 <p class=
"description">Send a HEAD request to the server.
</p>
2568 <a href=
"#http_t">http_t
</a> *http,
<br>
2569 const char *uri
<br>
2571 <h4 class=
"parameters">Parameters
</h4>
2574 <dd class=
"description">HTTP connection
</dd>
2576 <dd class=
"description">URI for head
</dd>
2578 <h4 class=
"returnvalue">Return Value
</h4>
2579 <p class=
"description">Status of call (
0 = success)
</p>
2580 <h3 class=
"function"><a name=
"httpInitialize">httpInitialize
</a></h3>
2581 <p class=
"description">Initialize the HTTP interface library and set the
2582 default HTTP proxy (if any).
</p>
2584 void httpInitialize (void);
</p>
2585 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpIsChunked">httpIsChunked
</a></h3>
2586 <p class=
"description">Report whether a message body is chunked.
</p>
2588 int httpIsChunked (
<br>
2589 <a href=
"#http_t">http_t
</a> *http
<br>
2591 <h4 class=
"parameters">Parameters
</h4>
2594 <dd class=
"description">HTTP connection
</dd>
2596 <h4 class=
"returnvalue">Return Value
</h4>
2597 <p class=
"description">1 if chunked,
0 if not
</p>
2598 <h4 class=
"discussion">Discussion
</h4>
2599 <p class=
"discussion">This function returns non-zero if the message body is composed of
2600 variable-length chunks.
2603 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpIsEncrypted">httpIsEncrypted
</a></h3>
2604 <p class=
"description">Report whether a connection is encrypted.
</p>
2606 int httpIsEncrypted (
<br>
2607 <a href=
"#http_t">http_t
</a> *http
<br>
2609 <h4 class=
"parameters">Parameters
</h4>
2612 <dd class=
"description">HTTP connection
</dd>
2614 <h4 class=
"returnvalue">Return Value
</h4>
2615 <p class=
"description">1 if encrypted,
0 if not
</p>
2616 <h4 class=
"discussion">Discussion
</h4>
2617 <p class=
"discussion">This function returns non-zero if the connection is currently encrypted.
2620 <h3 class=
"function"><a name=
"httpMD5">httpMD5
</a></h3>
2621 <p class=
"description">Compute the MD5 sum of the username:group:password.
</p>
2624 const char *username,
<br>
2625 const char *realm,
<br>
2626 const char *passwd,
<br>
2627 char md5[
33]
<br>
2629 <h4 class=
"parameters">Parameters
</h4>
2632 <dd class=
"description">User name
</dd>
2634 <dd class=
"description">Realm name
</dd>
2636 <dd class=
"description">Password string
</dd>
2638 <dd class=
"description">MD5 string
</dd>
2640 <h4 class=
"returnvalue">Return Value
</h4>
2641 <p class=
"description">MD5 sum
</p>
2642 <h3 class=
"function"><a name=
"httpMD5Final">httpMD5Final
</a></h3>
2643 <p class=
"description">Combine the MD5 sum of the username, group, and password
2644 with the server-supplied nonce value, method, and
2647 char *httpMD5Final (
<br>
2648 const char *nonce,
<br>
2649 const char *method,
<br>
2650 const char *resource,
<br>
2651 char md5[
33]
<br>
2653 <h4 class=
"parameters">Parameters
</h4>
2656 <dd class=
"description">Server nonce value
</dd>
2658 <dd class=
"description">METHOD (GET, POST, etc.)
</dd>
2660 <dd class=
"description">Resource path
</dd>
2662 <dd class=
"description">MD5 sum
</dd>
2664 <h4 class=
"returnvalue">Return Value
</h4>
2665 <p class=
"description">New sum
</p>
2666 <h3 class=
"function"><a name=
"httpMD5String">httpMD5String
</a></h3>
2667 <p class=
"description">Convert an MD5 sum to a character string.
</p>
2669 char *httpMD5String (
<br>
2670 const unsigned char *sum,
<br>
2671 char md5[
33]
<br>
2673 <h4 class=
"parameters">Parameters
</h4>
2676 <dd class=
"description">MD5 sum data
</dd>
2678 <dd class=
"description">MD5 sum in hex
</dd>
2680 <h4 class=
"returnvalue">Return Value
</h4>
2681 <p class=
"description">MD5 sum in hex
</p>
2682 <h3 class=
"function"><a name=
"httpOptions">httpOptions
</a></h3>
2683 <p class=
"description">Send an OPTIONS request to the server.
</p>
2685 int httpOptions (
<br>
2686 <a href=
"#http_t">http_t
</a> *http,
<br>
2687 const char *uri
<br>
2689 <h4 class=
"parameters">Parameters
</h4>
2692 <dd class=
"description">HTTP connection
</dd>
2694 <dd class=
"description">URI for options
</dd>
2696 <h4 class=
"returnvalue">Return Value
</h4>
2697 <p class=
"description">Status of call (
0 = success)
</p>
2698 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"httpPeek">httpPeek
</a></h3>
2699 <p class=
"description">Peek at data from a HTTP connection.
</p>
2701 ssize_t httpPeek (
<br>
2702 <a href=
"#http_t">http_t
</a> *http,
<br>
2703 char *buffer,
<br>
2704 size_t length
<br>
2706 <h4 class=
"parameters">Parameters
</h4>
2709 <dd class=
"description">HTTP connection
</dd>
2711 <dd class=
"description">Buffer for data
</dd>
2713 <dd class=
"description">Maximum number of bytes
</dd>
2715 <h4 class=
"returnvalue">Return Value
</h4>
2716 <p class=
"description">Number of bytes copied
</p>
2717 <h4 class=
"discussion">Discussion
</h4>
2718 <p class=
"discussion">This function copies available data from the given HTTP connection, reading
2719 a buffer as needed. The data is still available for reading using
2720 <a href=
"#httpRead"><code>httpRead
</code></a> or
<a href=
"#httpRead2"><code>httpRead2
</code></a>.
<br>
2722 For non-blocking connections the usual timeouts apply.
2725 <h3 class=
"function"><a name=
"httpPost">httpPost
</a></h3>
2726 <p class=
"description">Send a POST request to the server.
</p>
2729 <a href=
"#http_t">http_t
</a> *http,
<br>
2730 const char *uri
<br>
2732 <h4 class=
"parameters">Parameters
</h4>
2735 <dd class=
"description">HTTP connection
</dd>
2737 <dd class=
"description">URI for post
</dd>
2739 <h4 class=
"returnvalue">Return Value
</h4>
2740 <p class=
"description">Status of call (
0 = success)
</p>
2741 <h3 class=
"function"><a name=
"httpPut">httpPut
</a></h3>
2742 <p class=
"description">Send a PUT request to the server.
</p>
2745 <a href=
"#http_t">http_t
</a> *http,
<br>
2746 const char *uri
<br>
2748 <h4 class=
"parameters">Parameters
</h4>
2751 <dd class=
"description">HTTP connection
</dd>
2753 <dd class=
"description">URI to put
</dd>
2755 <h4 class=
"returnvalue">Return Value
</h4>
2756 <p class=
"description">Status of call (
0 = success)
</p>
2757 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpRead">httpRead
</a></h3>
2758 <p class=
"description">Read data from a HTTP connection.
</p>
2761 <a href=
"#http_t">http_t
</a> *http,
<br>
2762 char *buffer,
<br>
2763 int length
<br>
2765 <h4 class=
"parameters">Parameters
</h4>
2768 <dd class=
"description">HTTP connection
</dd>
2770 <dd class=
"description">Buffer for data
</dd>
2772 <dd class=
"description">Maximum number of bytes
</dd>
2774 <h4 class=
"returnvalue">Return Value
</h4>
2775 <p class=
"description">Number of bytes read
</p>
2776 <h4 class=
"discussion">Discussion
</h4>
2777 <p class=
"discussion">This function is deprecated. Use the httpRead2() function which can
2778 read more than
2GB of data.
2781 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"httpRead2">httpRead2
</a></h3>
2782 <p class=
"description">Read data from a HTTP connection.
</p>
2784 ssize_t httpRead2 (
<br>
2785 <a href=
"#http_t">http_t
</a> *http,
<br>
2786 char *buffer,
<br>
2787 size_t length
<br>
2789 <h4 class=
"parameters">Parameters
</h4>
2792 <dd class=
"description">HTTP connection
</dd>
2794 <dd class=
"description">Buffer for data
</dd>
2796 <dd class=
"description">Maximum number of bytes
</dd>
2798 <h4 class=
"returnvalue">Return Value
</h4>
2799 <p class=
"description">Number of bytes read
</p>
2800 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"httpReadRequest">httpReadRequest
</a></h3>
2801 <p class=
"description">Read a HTTP request from a connection.
</p>
2803 <a href=
"#http_state_t">http_state_t
</a> httpReadRequest (
<br>
2804 <a href=
"#http_t">http_t
</a> *http,
<br>
2805 char *uri,
<br>
2806 size_t urilen
<br>
2808 <h4 class=
"parameters">Parameters
</h4>
2811 <dd class=
"description">HTTP connection
</dd>
2813 <dd class=
"description">URI buffer
</dd>
2815 <dd class=
"description">Size of URI buffer
</dd>
2817 <h4 class=
"returnvalue">Return Value
</h4>
2818 <p class=
"description">New state of connection
</p>
2819 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpReconnect">httpReconnect
</a></h3>
2820 <p class=
"description">Reconnect to a HTTP server.
</p>
2822 int httpReconnect (
<br>
2823 <a href=
"#http_t">http_t
</a> *http
<br>
2825 <h4 class=
"parameters">Parameters
</h4>
2828 <dd class=
"description">HTTP connection
</dd>
2830 <h4 class=
"returnvalue">Return Value
</h4>
2831 <p class=
"description">0 on success, non-zero on failure
</p>
2832 <h4 class=
"discussion">Discussion
</h4>
2833 <p class=
"discussion">This function is deprecated. Please use the
<a href=
"#httpReconnect2"><code>httpReconnect2
</code></a> function
2837 <h3 class=
"function"><a name=
"httpReconnect2">httpReconnect2
</a></h3>
2838 <p class=
"description">Reconnect to a HTTP server with timeout and optional
2841 int httpReconnect2 (
<br>
2842 <a href=
"#http_t">http_t
</a> *http,
<br>
2843 int msec,
<br>
2844 int *cancel
<br>
2846 <h4 class=
"parameters">Parameters
</h4>
2849 <dd class=
"description">HTTP connection
</dd>
2851 <dd class=
"description">Timeout in milliseconds
</dd>
2853 <dd class=
"description">Pointer to
"cancel
" variable
</dd>
2855 <h4 class=
"returnvalue">Return Value
</h4>
2856 <p class=
"description">0 on success, non-zero on failure
</p>
2857 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpResolveHostname">httpResolveHostname
</a></h3>
2858 <p class=
"description">Resolve the hostname of the HTTP connection
2861 const char *httpResolveHostname (
<br>
2862 <a href=
"#http_t">http_t
</a> *http,
<br>
2863 char *buffer,
<br>
2864 size_t bufsize
<br>
2866 <h4 class=
"parameters">Parameters
</h4>
2869 <dd class=
"description">HTTP connection
</dd>
2871 <dd class=
"description">Hostname buffer
</dd>
2873 <dd class=
"description">Size of buffer
</dd>
2875 <h4 class=
"returnvalue">Return Value
</h4>
2876 <p class=
"description">Resolved hostname or
<code>NULL
</code></p>
2877 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpSeparate">httpSeparate
</a></h3>
2878 <p class=
"description">Separate a Universal Resource Identifier into its
2881 void httpSeparate (
<br>
2882 const char *uri,
<br>
2883 char *scheme,
<br>
2884 char *username,
<br>
2885 char *host,
<br>
2886 int *port,
<br>
2887 char *resource
<br>
2889 <h4 class=
"parameters">Parameters
</h4>
2892 <dd class=
"description">Universal Resource Identifier
</dd>
2894 <dd class=
"description">Scheme [
32] (http, https, etc.)
</dd>
2896 <dd class=
"description">Username [
1024]
</dd>
2898 <dd class=
"description">Hostname [
1024]
</dd>
2900 <dd class=
"description">Port number to use
</dd>
2902 <dd class=
"description">Resource/filename [
1024]
</dd>
2904 <h4 class=
"discussion">Discussion
</h4>
2905 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
2908 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/macOS
10.4 </span><a name=
"httpSeparate2">httpSeparate2
</a></h3>
2909 <p class=
"description">Separate a Universal Resource Identifier into its
2912 void httpSeparate2 (
<br>
2913 const char *uri,
<br>
2914 char *scheme,
<br>
2915 int schemelen,
<br>
2916 char *username,
<br>
2917 int usernamelen,
<br>
2918 char *host,
<br>
2919 int hostlen,
<br>
2920 int *port,
<br>
2921 char *resource,
<br>
2922 int resourcelen
<br>
2924 <h4 class=
"parameters">Parameters
</h4>
2927 <dd class=
"description">Universal Resource Identifier
</dd>
2929 <dd class=
"description">Scheme (http, https, etc.)
</dd>
2931 <dd class=
"description">Size of scheme buffer
</dd>
2933 <dd class=
"description">Username
</dd>
2934 <dt>usernamelen
</dt>
2935 <dd class=
"description">Size of username buffer
</dd>
2937 <dd class=
"description">Hostname
</dd>
2939 <dd class=
"description">Size of hostname buffer
</dd>
2941 <dd class=
"description">Port number to use
</dd>
2943 <dd class=
"description">Resource/filename
</dd>
2944 <dt>resourcelen
</dt>
2945 <dd class=
"description">Size of resource buffer
</dd>
2947 <h4 class=
"discussion">Discussion
</h4>
2948 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
2952 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"httpSeparateURI">httpSeparateURI
</a></h3>
2953 <p class=
"description">Separate a Universal Resource Identifier into its
2956 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpSeparateURI (
<br>
2957 <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> decoding,
<br>
2958 const char *uri,
<br>
2959 char *scheme,
<br>
2960 int schemelen,
<br>
2961 char *username,
<br>
2962 int usernamelen,
<br>
2963 char *host,
<br>
2964 int hostlen,
<br>
2965 int *port,
<br>
2966 char *resource,
<br>
2967 int resourcelen
<br>
2969 <h4 class=
"parameters">Parameters
</h4>
2972 <dd class=
"description">Decoding flags
</dd>
2974 <dd class=
"description">Universal Resource Identifier
</dd>
2976 <dd class=
"description">Scheme (http, https, etc.)
</dd>
2978 <dd class=
"description">Size of scheme buffer
</dd>
2980 <dd class=
"description">Username
</dd>
2981 <dt>usernamelen
</dt>
2982 <dd class=
"description">Size of username buffer
</dd>
2984 <dd class=
"description">Hostname
</dd>
2986 <dd class=
"description">Size of hostname buffer
</dd>
2988 <dd class=
"description">Port number to use
</dd>
2990 <dd class=
"description">Resource/filename
</dd>
2991 <dt>resourcelen
</dt>
2992 <dd class=
"description">Size of resource buffer
</dd>
2994 <h4 class=
"returnvalue">Return Value
</h4>
2995 <p class=
"description">Result of separation
</p>
2996 <h3 class=
"function"><span class=
"info"> CUPS
1.3/macOS
10.5 </span><a name=
"httpSetAuthString">httpSetAuthString
</a></h3>
2997 <p class=
"description">Set the current authorization string.
</p>
2999 void httpSetAuthString (
<br>
3000 <a href=
"#http_t">http_t
</a> *http,
<br>
3001 const char *scheme,
<br>
3002 const char *data
<br>
3004 <h4 class=
"parameters">Parameters
</h4>
3007 <dd class=
"description">HTTP connection
</dd>
3009 <dd class=
"description">Auth scheme (NULL to clear it)
</dd>
3011 <dd class=
"description">Auth data (NULL for none)
</dd>
3013 <h4 class=
"discussion">Discussion
</h4>
3014 <p class=
"discussion">This function just stores a copy of the current authorization string in
3015 the HTTP connection object. You must still call httpSetField() to set
3016 HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
3017 httpHead(), httpOptions(), httpPost, or httpPut().
3020 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a name=
"httpSetCookie">httpSetCookie
</a></h3>
3021 <p class=
"description">Set the cookie value(s).
</p>
3023 void httpSetCookie (
<br>
3024 <a href=
"#http_t">http_t
</a> *http,
<br>
3025 const char *cookie
<br>
3027 <h4 class=
"parameters">Parameters
</h4>
3030 <dd class=
"description">Connection
</dd>
3032 <dd class=
"description">Cookie string
</dd>
3034 <h3 class=
"function"><span class=
"info"> CUPS
1.5/macOS
10.7 </span><a name=
"httpSetCredentials">httpSetCredentials
</a></h3>
3035 <p class=
"description">Set the credentials associated with an encrypted
3038 int httpSetCredentials (
<br>
3039 <a href=
"#http_t">http_t
</a> *http,
<br>
3040 cups_array_t *credentials
<br>
3042 <h4 class=
"parameters">Parameters
</h4>
3045 <dd class=
"description">HTTP connection
</dd>
3046 <dt>credentials
</dt>
3047 <dd class=
"description">Array of credentials
</dd>
3049 <h4 class=
"returnvalue">Return Value
</h4>
3050 <p class=
"description">Status of call (
0 = success)
</p>
3051 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"httpSetDefaultField">httpSetDefaultField
</a></h3>
3052 <p class=
"description">Set the default value of an HTTP header.
</p>
3054 void httpSetDefaultField (
<br>
3055 <a href=
"#http_t">http_t
</a> *http,
<br>
3056 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
3057 const char *value
<br>
3059 <h4 class=
"parameters">Parameters
</h4>
3062 <dd class=
"description">HTTP connection
</dd>
3064 <dd class=
"description">Field index
</dd>
3066 <dd class=
"description">Value
</dd>
3068 <h4 class=
"discussion">Discussion
</h4>
3069 <p class=
"discussion">Currently only
<code>HTTP_FIELD_ACCEPT_ENCODING
</code>,
<code>HTTP_FIELD_SERVER
</code>,
3070 and
<code>HTTP_FIELD_USER_AGENT
</code> can be set.
3073 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"httpSetExpect">httpSetExpect
</a></h3>
3074 <p class=
"description">Set the Expect: header in a request.
</p>
3076 void httpSetExpect (
<br>
3077 <a href=
"#http_t">http_t
</a> *http,
<br>
3078 http_status_t expect
<br>
3080 <h4 class=
"parameters">Parameters
</h4>
3083 <dd class=
"description">HTTP connection
</dd>
3085 <dd class=
"description">HTTP status to expect
3086 (
<code>HTTP_STATUS_CONTINUE
</code>)
</dd>
3088 <h4 class=
"discussion">Discussion
</h4>
3089 <p class=
"discussion">Currently only
<code>HTTP_STATUS_CONTINUE
</code> is supported for the
"expect
"
3093 <h3 class=
"function"><a name=
"httpSetField">httpSetField
</a></h3>
3094 <p class=
"description">Set the value of an HTTP header.
</p>
3096 void httpSetField (
<br>
3097 <a href=
"#http_t">http_t
</a> *http,
<br>
3098 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
3099 const char *value
<br>
3101 <h4 class=
"parameters">Parameters
</h4>
3104 <dd class=
"description">HTTP connection
</dd>
3106 <dd class=
"description">Field index
</dd>
3108 <dd class=
"description">Value
</dd>
3110 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpSetKeepAlive">httpSetKeepAlive
</a></h3>
3111 <p class=
"description">Set the current Keep-Alive state of a connection.
</p>
3113 void httpSetKeepAlive (
<br>
3114 <a href=
"#http_t">http_t
</a> *http,
<br>
3115 <a href=
"#http_keepalive_t">http_keepalive_t
</a> keep_alive
<br>
3117 <h4 class=
"parameters">Parameters
</h4>
3120 <dd class=
"description">HTTP connection
</dd>
3122 <dd class=
"description">New Keep-Alive value
</dd>
3124 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"httpSetLength">httpSetLength
</a></h3>
3125 <p class=
"description">Set the content-length and content-encoding.
</p>
3127 void httpSetLength (
<br>
3128 <a href=
"#http_t">http_t
</a> *http,
<br>
3129 size_t length
<br>
3131 <h4 class=
"parameters">Parameters
</h4>
3134 <dd class=
"description">HTTP connection
</dd>
3136 <dd class=
"description">Length (
0 for chunked)
</dd>
3138 <h3 class=
"function"><span class=
"info"> CUPS
1.5/macOS
10.7 </span><a name=
"httpSetTimeout">httpSetTimeout
</a></h3>
3139 <p class=
"description">Set read/write timeouts and an optional callback.
</p>
3141 void httpSetTimeout (
<br>
3142 <a href=
"#http_t">http_t
</a> *http,
<br>
3143 double timeout,
<br>
3144 <a href=
"#http_timeout_cb_t">http_timeout_cb_t
</a> cb,
<br>
3145 void *user_data
<br>
3147 <h4 class=
"parameters">Parameters
</h4>
3150 <dd class=
"description">HTTP connection
</dd>
3152 <dd class=
"description">Number of seconds for timeout,
3153 must be greater than
0</dd>
3155 <dd class=
"description">Callback function or NULL
</dd>
3157 <dd class=
"description">User data pointer
</dd>
3159 <h4 class=
"discussion">Discussion
</h4>
3160 <p class=
"discussion">The optional timeout callback receives both the HTTP connection and a user
3161 data pointer and must return
1 to continue or
0 to error (time) out.
3164 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpShutdown">httpShutdown
</a></h3>
3165 <p class=
"description">Shutdown one side of an HTTP connection.
</p>
3167 void httpShutdown (
<br>
3168 <a href=
"#http_t">http_t
</a> *http
<br>
3170 <h4 class=
"parameters">Parameters
</h4>
3173 <dd class=
"description">HTTP connection
</dd>
3175 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpStateString">httpStateString
</a></h3>
3176 <p class=
"description">Return the string describing a HTTP state value.
</p>
3178 const char *httpStateString (
<br>
3179 <a href=
"#http_state_t">http_state_t
</a> state
<br>
3181 <h4 class=
"parameters">Parameters
</h4>
3184 <dd class=
"description">HTTP state value
</dd>
3186 <h4 class=
"returnvalue">Return Value
</h4>
3187 <p class=
"description">State string
</p>
3188 <h3 class=
"function"><a name=
"httpStatus">httpStatus
</a></h3>
3189 <p class=
"description">Return a short string describing a HTTP status code.
</p>
3191 const char *httpStatus (
<br>
3192 http_status_t status
<br>
3194 <h4 class=
"parameters">Parameters
</h4>
3197 <dd class=
"description">HTTP status code
</dd>
3199 <h4 class=
"returnvalue">Return Value
</h4>
3200 <p class=
"description">Localized status string
</p>
3201 <h4 class=
"discussion">Discussion
</h4>
3202 <p class=
"discussion">The returned string is localized to the current POSIX locale and is based
3203 on the status strings defined in RFC
2616.
</p>
3204 <h3 class=
"function"><a name=
"httpTrace">httpTrace
</a></h3>
3205 <p class=
"description">Send an TRACE request to the server.
</p>
3208 <a href=
"#http_t">http_t
</a> *http,
<br>
3209 const char *uri
<br>
3211 <h4 class=
"parameters">Parameters
</h4>
3214 <dd class=
"description">HTTP connection
</dd>
3216 <dd class=
"description">URI for trace
</dd>
3218 <h4 class=
"returnvalue">Return Value
</h4>
3219 <p class=
"description">Status of call (
0 = success)
</p>
3220 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpURIStatusString">httpURIStatusString
</a></h3>
3221 <p class=
"description">Return a string describing a URI status code.
</p>
3223 const char *httpURIStatusString (
<br>
3224 <a href=
"#http_uri_status_t">http_uri_status_t
</a> status
<br>
3226 <h4 class=
"parameters">Parameters
</h4>
3229 <dd class=
"description">URI status code
</dd>
3231 <h4 class=
"returnvalue">Return Value
</h4>
3232 <p class=
"description">Localized status string
</p>
3233 <h3 class=
"function"><a name=
"httpUpdate">httpUpdate
</a></h3>
3234 <p class=
"description">Update the current HTTP state for incoming data.
</p>
3236 http_status_t httpUpdate (
<br>
3237 <a href=
"#http_t">http_t
</a> *http
<br>
3239 <h4 class=
"parameters">Parameters
</h4>
3242 <dd class=
"description">HTTP connection
</dd>
3244 <h4 class=
"returnvalue">Return Value
</h4>
3245 <p class=
"description">HTTP status
</p>
3246 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a name=
"httpWait">httpWait
</a></h3>
3247 <p class=
"description">Wait for data available on a connection.
</p>
3250 <a href=
"#http_t">http_t
</a> *http,
<br>
3251 int msec
<br>
3253 <h4 class=
"parameters">Parameters
</h4>
3256 <dd class=
"description">HTTP connection
</dd>
3258 <dd class=
"description">Milliseconds to wait
</dd>
3260 <h4 class=
"returnvalue">Return Value
</h4>
3261 <p class=
"description">1 if data is available,
0 otherwise
</p>
3262 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpWrite">httpWrite
</a></h3>
3263 <p class=
"description">Write data to a HTTP connection.
</p>
3266 <a href=
"#http_t">http_t
</a> *http,
<br>
3267 const char *buffer,
<br>
3268 int length
<br>
3270 <h4 class=
"parameters">Parameters
</h4>
3273 <dd class=
"description">HTTP connection
</dd>
3275 <dd class=
"description">Buffer for data
</dd>
3277 <dd class=
"description">Number of bytes to write
</dd>
3279 <h4 class=
"returnvalue">Return Value
</h4>
3280 <p class=
"description">Number of bytes written
</p>
3281 <h4 class=
"discussion">Discussion
</h4>
3282 <p class=
"discussion">This function is deprecated. Use the httpWrite2() function which can
3283 write more than
2GB of data.
3286 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"httpWrite2">httpWrite2
</a></h3>
3287 <p class=
"description">Write data to a HTTP connection.
</p>
3289 ssize_t httpWrite2 (
<br>
3290 <a href=
"#http_t">http_t
</a> *http,
<br>
3291 const char *buffer,
<br>
3292 size_t length
<br>
3294 <h4 class=
"parameters">Parameters
</h4>
3297 <dd class=
"description">HTTP connection
</dd>
3299 <dd class=
"description">Buffer for data
</dd>
3301 <dd class=
"description">Number of bytes to write
</dd>
3303 <h4 class=
"returnvalue">Return Value
</h4>
3304 <p class=
"description">Number of bytes written
</p>
3305 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"httpWriteResponse">httpWriteResponse
</a></h3>
3306 <p class=
"description">Write a HTTP response to a client connection.
</p>
3308 int httpWriteResponse (
<br>
3309 <a href=
"#http_t">http_t
</a> *http,
<br>
3310 http_status_t status
<br>
3312 <h4 class=
"parameters">Parameters
</h4>
3315 <dd class=
"description">HTTP connection
</dd>
3317 <dd class=
"description">Status code
</dd>
3319 <h4 class=
"returnvalue">Return Value
</h4>
3320 <p class=
"description">0 on success, -
1 on error
</p>
3321 <h3 class=
"function"><a name=
"ippAddBoolean">ippAddBoolean
</a></h3>
3322 <p class=
"description">Add a boolean attribute to an IPP message.
</p>
3324 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBoolean (
<br>
3325 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3326 ipp_tag_t group,
<br>
3327 const char *name,
<br>
3328 char value
<br>
3330 <h4 class=
"parameters">Parameters
</h4>
3333 <dd class=
"description">IPP message
</dd>
3335 <dd class=
"description">IPP group
</dd>
3337 <dd class=
"description">Name of attribute
</dd>
3339 <dd class=
"description">Value of attribute
</dd>
3341 <h4 class=
"returnvalue">Return Value
</h4>
3342 <p class=
"description">New attribute
</p>
3343 <h4 class=
"discussion">Discussion
</h4>
3344 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3345 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>
3347 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3348 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3349 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3350 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3351 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3352 <h3 class=
"function"><a name=
"ippAddBooleans">ippAddBooleans
</a></h3>
3353 <p class=
"description">Add an array of boolean values.
</p>
3355 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBooleans (
<br>
3356 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3357 ipp_tag_t group,
<br>
3358 const char *name,
<br>
3359 int num_values,
<br>
3360 const char *values
<br>
3362 <h4 class=
"parameters">Parameters
</h4>
3365 <dd class=
"description">IPP message
</dd>
3367 <dd class=
"description">IPP group
</dd>
3369 <dd class=
"description">Name of attribute
</dd>
3371 <dd class=
"description">Number of values
</dd>
3373 <dd class=
"description">Values
</dd>
3375 <h4 class=
"returnvalue">Return Value
</h4>
3376 <p class=
"description">New attribute
</p>
3377 <h4 class=
"discussion">Discussion
</h4>
3378 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3379 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>
3381 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3382 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3383 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3384 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3385 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3386 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a name=
"ippAddCollection">ippAddCollection
</a></h3>
3387 <p class=
"description">Add a collection value.
</p>
3389 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollection (
<br>
3390 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3391 ipp_tag_t group,
<br>
3392 const char *name,
<br>
3393 <a href=
"#ipp_t">ipp_t
</a> *value
<br>
3395 <h4 class=
"parameters">Parameters
</h4>
3398 <dd class=
"description">IPP message
</dd>
3400 <dd class=
"description">IPP group
</dd>
3402 <dd class=
"description">Name of attribute
</dd>
3404 <dd class=
"description">Value
</dd>
3406 <h4 class=
"returnvalue">Return Value
</h4>
3407 <p class=
"description">New attribute
</p>
3408 <h4 class=
"discussion">Discussion
</h4>
3409 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3410 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
3412 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3413 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3414 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3415 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3416 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
3419 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a name=
"ippAddCollections">ippAddCollections
</a></h3>
3420 <p class=
"description">Add an array of collection values.
</p>
3422 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollections (
<br>
3423 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3424 ipp_tag_t group,
<br>
3425 const char *name,
<br>
3426 int num_values,
<br>
3427 const
<a href=
"#ipp_t">ipp_t
</a> **values
<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">Number of values
</dd>
3440 <dd class=
"description">Values
</dd>
3442 <h4 class=
"returnvalue">Return Value
</h4>
3443 <p class=
"description">New attribute
</p>
3444 <h4 class=
"discussion">Discussion
</h4>
3445 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3446 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>
3448 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3449 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3450 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3451 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3452 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
3455 <h3 class=
"function"><a name=
"ippAddDate">ippAddDate
</a></h3>
3456 <p class=
"description">Add a date attribute to an IPP message.
</p>
3458 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddDate (
<br>
3459 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3460 ipp_tag_t group,
<br>
3461 const char *name,
<br>
3462 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *value
<br>
3464 <h4 class=
"parameters">Parameters
</h4>
3467 <dd class=
"description">IPP message
</dd>
3469 <dd class=
"description">IPP group
</dd>
3471 <dd class=
"description">Name of attribute
</dd>
3473 <dd class=
"description">Value
</dd>
3475 <h4 class=
"returnvalue">Return Value
</h4>
3476 <p class=
"description">New attribute
</p>
3477 <h4 class=
"discussion">Discussion
</h4>
3478 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3479 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>
3481 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3482 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3483 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3484 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3485 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3486 <h3 class=
"function"><a name=
"ippAddInteger">ippAddInteger
</a></h3>
3487 <p class=
"description">Add a integer attribute to an IPP message.
</p>
3489 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddInteger (
<br>
3490 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3491 ipp_tag_t group,
<br>
3492 ipp_tag_t value_tag,
<br>
3493 const char *name,
<br>
3494 int value
<br>
3496 <h4 class=
"parameters">Parameters
</h4>
3499 <dd class=
"description">IPP message
</dd>
3501 <dd class=
"description">IPP group
</dd>
3503 <dd class=
"description">Type of attribute
</dd>
3505 <dd class=
"description">Name of attribute
</dd>
3507 <dd class=
"description">Value of attribute
</dd>
3509 <h4 class=
"returnvalue">Return Value
</h4>
3510 <p class=
"description">New attribute
</p>
3511 <h4 class=
"discussion">Discussion
</h4>
3512 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3513 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>
3515 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3516 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3517 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3518 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3519 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3521 Supported values include enum (
<code>IPP_TAG_ENUM
</code>) and integer
3522 (
<code>IPP_TAG_INTEGER
</code>).
</p>
3523 <h3 class=
"function"><a name=
"ippAddIntegers">ippAddIntegers
</a></h3>
3524 <p class=
"description">Add an array of integer values.
</p>
3526 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddIntegers (
<br>
3527 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3528 ipp_tag_t group,
<br>
3529 ipp_tag_t value_tag,
<br>
3530 const char *name,
<br>
3531 int num_values,
<br>
3532 const int *values
<br>
3534 <h4 class=
"parameters">Parameters
</h4>
3537 <dd class=
"description">IPP message
</dd>
3539 <dd class=
"description">IPP group
</dd>
3541 <dd class=
"description">Type of attribute
</dd>
3543 <dd class=
"description">Name of attribute
</dd>
3545 <dd class=
"description">Number of values
</dd>
3547 <dd class=
"description">Values
</dd>
3549 <h4 class=
"returnvalue">Return Value
</h4>
3550 <p class=
"description">New attribute
</p>
3551 <h4 class=
"discussion">Discussion
</h4>
3552 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3553 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>
3555 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3556 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3557 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3558 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3559 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3561 Supported values include enum (
<code>IPP_TAG_ENUM
</code>) and integer
3562 (
<code>IPP_TAG_INTEGER
</code>).
</p>
3563 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"ippAddOctetString">ippAddOctetString
</a></h3>
3564 <p class=
"description">Add an octetString value to an IPP message.
</p>
3566 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddOctetString (
<br>
3567 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3568 ipp_tag_t group,
<br>
3569 const char *name,
<br>
3570 const void *data,
<br>
3571 int datalen
<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">Name of attribute
</dd>
3582 <dd class=
"description">octetString data
</dd>
3584 <dd class=
"description">Length of data in bytes
</dd>
3586 <h4 class=
"returnvalue">Return Value
</h4>
3587 <p class=
"description">New attribute
</p>
3588 <h4 class=
"discussion">Discussion
</h4>
3589 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3590 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>
3592 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3593 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3594 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3595 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3596 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
3599 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippAddOutOfBand">ippAddOutOfBand
</a></h3>
3600 <p class=
"description">Add an out-of-band value to an IPP message.
</p>
3602 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddOutOfBand (
<br>
3603 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3604 ipp_tag_t group,
<br>
3605 ipp_tag_t value_tag,
<br>
3606 const char *name
<br>
3608 <h4 class=
"parameters">Parameters
</h4>
3611 <dd class=
"description">IPP message
</dd>
3613 <dd class=
"description">IPP group
</dd>
3615 <dd class=
"description">Type of attribute
</dd>
3617 <dd class=
"description">Name of attribute
</dd>
3619 <h4 class=
"returnvalue">Return Value
</h4>
3620 <p class=
"description">New attribute
</p>
3621 <h4 class=
"discussion">Discussion
</h4>
3622 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3623 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>
3625 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3626 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3627 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3628 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3629 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3631 Supported out-of-band values include unsupported-value
3632 (
<code>IPP_TAG_UNSUPPORTED_VALUE
</code>), default (
<code>IPP_TAG_DEFAULT
</code>), unknown
3633 (
<code>IPP_TAG_UNKNOWN
</code>), no-value (
<code>IPP_TAG_NOVALUE
</code>), not-settable
3634 (
<code>IPP_TAG_NOTSETTABLE
</code>), delete-attribute (
<code>IPP_TAG_DELETEATTR
</code>), and
3635 admin-define (
<code>IPP_TAG_ADMINDEFINE
</code>).
3638 <h3 class=
"function"><a name=
"ippAddRange">ippAddRange
</a></h3>
3639 <p class=
"description">Add a range of values to an IPP message.
</p>
3641 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRange (
<br>
3642 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3643 ipp_tag_t group,
<br>
3644 const char *name,
<br>
3645 int lower,
<br>
3646 int upper
<br>
3648 <h4 class=
"parameters">Parameters
</h4>
3651 <dd class=
"description">IPP message
</dd>
3653 <dd class=
"description">IPP group
</dd>
3655 <dd class=
"description">Name of attribute
</dd>
3657 <dd class=
"description">Lower value
</dd>
3659 <dd class=
"description">Upper value
</dd>
3661 <h4 class=
"returnvalue">Return Value
</h4>
3662 <p class=
"description">New attribute
</p>
3663 <h4 class=
"discussion">Discussion
</h4>
3664 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3665 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>
3667 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3668 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3669 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3670 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3671 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3673 The
<code>lower
</code> parameter must be less than or equal to the
<code>upper
</code> parameter.
</p>
3674 <h3 class=
"function"><a name=
"ippAddRanges">ippAddRanges
</a></h3>
3675 <p class=
"description">Add ranges of values to an IPP message.
</p>
3677 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRanges (
<br>
3678 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3679 ipp_tag_t group,
<br>
3680 const char *name,
<br>
3681 int num_values,
<br>
3682 const int *lower,
<br>
3683 const int *upper
<br>
3685 <h4 class=
"parameters">Parameters
</h4>
3688 <dd class=
"description">IPP message
</dd>
3690 <dd class=
"description">IPP group
</dd>
3692 <dd class=
"description">Name of attribute
</dd>
3694 <dd class=
"description">Number of values
</dd>
3696 <dd class=
"description">Lower values
</dd>
3698 <dd class=
"description">Upper values
</dd>
3700 <h4 class=
"returnvalue">Return Value
</h4>
3701 <p class=
"description">New attribute
</p>
3702 <h4 class=
"discussion">Discussion
</h4>
3703 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3704 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>
3706 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3707 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3708 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3709 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3710 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3711 <h3 class=
"function"><a name=
"ippAddResolution">ippAddResolution
</a></h3>
3712 <p class=
"description">Add a resolution value to an IPP message.
</p>
3714 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolution (
<br>
3715 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3716 ipp_tag_t group,
<br>
3717 const char *name,
<br>
3718 <a href=
"#ipp_res_t">ipp_res_t
</a> units,
<br>
3719 int xres,
<br>
3720 int yres
<br>
3722 <h4 class=
"parameters">Parameters
</h4>
3725 <dd class=
"description">IPP message
</dd>
3727 <dd class=
"description">IPP group
</dd>
3729 <dd class=
"description">Name of attribute
</dd>
3731 <dd class=
"description">Units for resolution
</dd>
3733 <dd class=
"description">X resolution
</dd>
3735 <dd class=
"description">Y resolution
</dd>
3737 <h4 class=
"returnvalue">Return Value
</h4>
3738 <p class=
"description">New attribute
</p>
3739 <h4 class=
"discussion">Discussion
</h4>
3740 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3741 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>
3743 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3744 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3745 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3746 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3747 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3748 <h3 class=
"function"><a name=
"ippAddResolutions">ippAddResolutions
</a></h3>
3749 <p class=
"description">Add resolution values to an IPP message.
</p>
3751 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolutions (
<br>
3752 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3753 ipp_tag_t group,
<br>
3754 const char *name,
<br>
3755 int num_values,
<br>
3756 <a href=
"#ipp_res_t">ipp_res_t
</a> units,
<br>
3757 const int *xres,
<br>
3758 const int *yres
<br>
3760 <h4 class=
"parameters">Parameters
</h4>
3763 <dd class=
"description">IPP message
</dd>
3765 <dd class=
"description">IPP group
</dd>
3767 <dd class=
"description">Name of attribute
</dd>
3769 <dd class=
"description">Number of values
</dd>
3771 <dd class=
"description">Units for resolution
</dd>
3773 <dd class=
"description">X resolutions
</dd>
3775 <dd class=
"description">Y resolutions
</dd>
3777 <h4 class=
"returnvalue">Return Value
</h4>
3778 <p class=
"description">New attribute
</p>
3779 <h4 class=
"discussion">Discussion
</h4>
3780 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3781 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>
3783 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3784 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3785 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3786 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3787 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3788 <h3 class=
"function"><a name=
"ippAddSeparator">ippAddSeparator
</a></h3>
3789 <p class=
"description">Add a group separator to an IPP message.
</p>
3791 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddSeparator (
<br>
3792 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3794 <h4 class=
"parameters">Parameters
</h4>
3797 <dd class=
"description">IPP message
</dd>
3799 <h4 class=
"returnvalue">Return Value
</h4>
3800 <p class=
"description">New attribute
</p>
3801 <h4 class=
"discussion">Discussion
</h4>
3802 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3803 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>
3804 <h3 class=
"function"><a name=
"ippAddString">ippAddString
</a></h3>
3805 <p class=
"description">Add a language-encoded string to an IPP message.
</p>
3807 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddString (
<br>
3808 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3809 ipp_tag_t group,
<br>
3810 ipp_tag_t value_tag,
<br>
3811 const char *name,
<br>
3812 const char *language,
<br>
3813 const char *value
<br>
3815 <h4 class=
"parameters">Parameters
</h4>
3818 <dd class=
"description">IPP message
</dd>
3820 <dd class=
"description">IPP group
</dd>
3822 <dd class=
"description">Type of attribute
</dd>
3824 <dd class=
"description">Name of attribute
</dd>
3826 <dd class=
"description">Language code
</dd>
3828 <dd class=
"description">Value
</dd>
3830 <h4 class=
"returnvalue">Return Value
</h4>
3831 <p class=
"description">New attribute
</p>
3832 <h4 class=
"discussion">Discussion
</h4>
3833 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3834 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>
3836 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3837 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3838 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3839 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3840 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3842 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
3843 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
3844 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
3845 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
3846 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
3847 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
3849 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage and
3850 textWithLanguage string values and must be
<code>NULL
</code> for all other string values.
</p>
3851 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"ippAddStringf">ippAddStringf
</a></h3>
3852 <p class=
"description">Add a formatted string to an IPP message.
</p>
3854 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddStringf (
<br>
3855 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3856 ipp_tag_t group,
<br>
3857 ipp_tag_t value_tag,
<br>
3858 const char *name,
<br>
3859 const char *language,
<br>
3860 const char *format,
<br>
3861 ...
<br>
3863 <h4 class=
"parameters">Parameters
</h4>
3866 <dd class=
"description">IPP message
</dd>
3868 <dd class=
"description">IPP group
</dd>
3870 <dd class=
"description">Type of attribute
</dd>
3872 <dd class=
"description">Name of attribute
</dd>
3874 <dd class=
"description">Language code (
<code>NULL
</code> for default)
</dd>
3876 <dd class=
"description">Printf-style format string
</dd>
3878 <dd class=
"description">Additional arguments as needed
</dd>
3880 <h4 class=
"returnvalue">Return Value
</h4>
3881 <p class=
"description">New attribute
</p>
3882 <h4 class=
"discussion">Discussion
</h4>
3883 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3884 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>
3886 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3887 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document
3888 (
<code>IPP_TAG_DOCUMENT
</code>), event notification
3889 (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation (
<code>IPP_TAG_OPERATION
</code>),
3890 printer (
<code>IPP_TAG_PRINTER
</code>), subscription (
<code>IPP_TAG_SUBSCRIPTION
</code>),
3891 or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3893 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
3894 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
3895 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
3896 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
3897 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
3898 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
3900 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage
3901 and textWithLanguage string values and must be
<code>NULL
</code> for all other
3904 The
<code>format
</code> parameter uses formatting characters compatible with the
3905 printf family of standard functions. Additional arguments follow it as
3906 needed. The formatted string is truncated as needed to the maximum length of
3907 the corresponding value type.
3910 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"ippAddStringfv">ippAddStringfv
</a></h3>
3911 <p class=
"description">Add a formatted string to an IPP message.
</p>
3913 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddStringfv (
<br>
3914 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3915 ipp_tag_t group,
<br>
3916 ipp_tag_t value_tag,
<br>
3917 const char *name,
<br>
3918 const char *language,
<br>
3919 const char *format,
<br>
3920 va_list ap
<br>
3922 <h4 class=
"parameters">Parameters
</h4>
3925 <dd class=
"description">IPP message
</dd>
3927 <dd class=
"description">IPP group
</dd>
3929 <dd class=
"description">Type of attribute
</dd>
3931 <dd class=
"description">Name of attribute
</dd>
3933 <dd class=
"description">Language code (
<code>NULL
</code> for default)
</dd>
3935 <dd class=
"description">Printf-style format string
</dd>
3937 <dd class=
"description">Additional arguments
</dd>
3939 <h4 class=
"returnvalue">Return Value
</h4>
3940 <p class=
"description">New attribute
</p>
3941 <h4 class=
"discussion">Discussion
</h4>
3942 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3943 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>
3945 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3946 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document
3947 (
<code>IPP_TAG_DOCUMENT
</code>), event notification
3948 (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation (
<code>IPP_TAG_OPERATION
</code>),
3949 printer (
<code>IPP_TAG_PRINTER
</code>), subscription (
<code>IPP_TAG_SUBSCRIPTION
</code>),
3950 or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3952 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
3953 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
3954 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
3955 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
3956 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
3957 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
3959 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage
3960 and textWithLanguage string values and must be
<code>NULL
</code> for all other
3963 The
<code>format
</code> parameter uses formatting characters compatible with the
3964 printf family of standard functions. Additional arguments are passed in the
3965 stdarg pointer
<code>ap
</code>. The formatted string is truncated as needed to the
3966 maximum length of the corresponding value type.
3969 <h3 class=
"function"><a name=
"ippAddStrings">ippAddStrings
</a></h3>
3970 <p class=
"description">Add language-encoded strings to an IPP message.
</p>
3972 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddStrings (
<br>
3973 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3974 ipp_tag_t group,
<br>
3975 ipp_tag_t value_tag,
<br>
3976 const char *name,
<br>
3977 int num_values,
<br>
3978 const char *language,
<br>
3979 const char *const *values
<br>
3981 <h4 class=
"parameters">Parameters
</h4>
3984 <dd class=
"description">IPP message
</dd>
3986 <dd class=
"description">IPP group
</dd>
3988 <dd class=
"description">Type of attribute
</dd>
3990 <dd class=
"description">Name of attribute
</dd>
3992 <dd class=
"description">Number of values
</dd>
3994 <dd class=
"description">Language code (
<code>NULL
</code> for default)
</dd>
3996 <dd class=
"description">Values
</dd>
3998 <h4 class=
"returnvalue">Return Value
</h4>
3999 <p class=
"description">New attribute
</p>
4000 <h4 class=
"discussion">Discussion
</h4>
4001 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4002 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>
4004 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
4005 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
4006 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
4007 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
4008 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
4010 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
4011 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
4012 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
4013 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
4014 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
4015 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
4017 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage and
4018 textWithLanguage string values and must be
<code>NULL
</code> for all other string values.
</p>
4019 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippAttributeString">ippAttributeString
</a></h3>
4020 <p class=
"description">Convert the attribute's value to a string.
</p>
4022 size_t ippAttributeString (
<br>
4023 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4024 char *buffer,
<br>
4025 size_t bufsize
<br>
4027 <h4 class=
"parameters">Parameters
</h4>
4030 <dd class=
"description">Attribute
</dd>
4032 <dd class=
"description">String buffer or NULL
</dd>
4034 <dd class=
"description">Size of string buffer
</dd>
4036 <h4 class=
"returnvalue">Return Value
</h4>
4037 <p class=
"description">Number of bytes less nul
</p>
4038 <h4 class=
"discussion">Discussion
</h4>
4039 <p class=
"discussion">Returns the number of bytes that would be written, not including the
4040 trailing nul. The buffer pointer can be NULL to get the required length,
4041 just like (v)snprintf.
4044 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"ippContainsInteger">ippContainsInteger
</a></h3>
4045 <p class=
"description">Determine whether an attribute contains the
4046 specified value or is within the list of ranges.
</p>
4048 int ippContainsInteger (
<br>
4049 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4050 int value
<br>
4052 <h4 class=
"parameters">Parameters
</h4>
4055 <dd class=
"description">Attribute
</dd>
4057 <dd class=
"description">Integer/enum value
</dd>
4059 <h4 class=
"returnvalue">Return Value
</h4>
4060 <p class=
"description">1 on a match,
0 on no match
</p>
4061 <h4 class=
"discussion">Discussion
</h4>
4062 <p class=
"discussion">Returns non-zero when the attribute contains either a matching integer or
4063 enum value, or the value falls within one of the rangeOfInteger values for
4067 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"ippContainsString">ippContainsString
</a></h3>
4068 <p class=
"description">Determine whether an attribute contains the
4069 specified string value.
</p>
4071 int ippContainsString (
<br>
4072 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4073 const char *value
<br>
4075 <h4 class=
"parameters">Parameters
</h4>
4078 <dd class=
"description">Attribute
</dd>
4080 <dd class=
"description">String value
</dd>
4082 <h4 class=
"returnvalue">Return Value
</h4>
4083 <p class=
"description">1 on a match,
0 on no match
</p>
4084 <h4 class=
"discussion">Discussion
</h4>
4085 <p class=
"discussion">Returns non-zero when the attribute contains a matching charset, keyword,
4086 language, mimeMediaType, name, text, URI, or URI scheme value.
4089 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippCopyAttribute">ippCopyAttribute
</a></h3>
4090 <p class=
"description">Copy an attribute.
</p>
4092 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippCopyAttribute (
<br>
4093 <a href=
"#ipp_t">ipp_t
</a> *dst,
<br>
4094 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *srcattr,
<br>
4095 int quickcopy
<br>
4097 <h4 class=
"parameters">Parameters
</h4>
4100 <dd class=
"description">Destination IPP message
</dd>
4102 <dd class=
"description">Attribute to copy
</dd>
4104 <dd class=
"description">1 for a referenced copy,
0 for normal
</dd>
4106 <h4 class=
"returnvalue">Return Value
</h4>
4107 <p class=
"description">New attribute
</p>
4108 <h4 class=
"discussion">Discussion
</h4>
4109 <p class=
"discussion">The specified attribute,
<code>attr
</code>, is copied to the destination IPP message.
4110 When
<code>quickcopy
</code> is non-zero, a
"shallow
" reference copy of the attribute is
4111 created - this should only be done as long as the original source IPP message will
4112 not be freed for the life of the destination.
4115 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippCopyAttributes">ippCopyAttributes
</a></h3>
4116 <p class=
"description">Copy attributes from one IPP message to another.
</p>
4118 int ippCopyAttributes (
<br>
4119 <a href=
"#ipp_t">ipp_t
</a> *dst,
<br>
4120 <a href=
"#ipp_t">ipp_t
</a> *src,
<br>
4121 int quickcopy,
<br>
4122 <a href=
"#ipp_copycb_t">ipp_copycb_t
</a> cb,
<br>
4123 void *context
<br>
4125 <h4 class=
"parameters">Parameters
</h4>
4128 <dd class=
"description">Destination IPP message
</dd>
4130 <dd class=
"description">Source IPP message
</dd>
4132 <dd class=
"description">1 for a referenced copy,
0 for normal
</dd>
4134 <dd class=
"description">Copy callback or
<code>NULL
</code> for none
</dd>
4136 <dd class=
"description">Context pointer
</dd>
4138 <h4 class=
"returnvalue">Return Value
</h4>
4139 <p class=
"description">1 on success,
0 on error
</p>
4140 <h4 class=
"discussion">Discussion
</h4>
4141 <p class=
"discussion">Zero or more attributes are copied from the source IPP message,
<code>src
</code>, to the
4142 destination IPP message,
<code>dst
</code>. When
<code>quickcopy
</code> is non-zero, a
"shallow
"
4143 reference copy of the attribute is created - this should only be done as long as the
4144 original source IPP message will not be freed for the life of the destination.
<br>
4146 The
<code>cb
</code> and
<code>context
</code> parameters provide a generic way to
"filter
" the
4147 attributes that are copied - the function must return
1 to copy the attribute or
4148 0 to skip it. The function may also choose to do a partial copy of the source attribute
4152 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"ippCreateRequestedArray">ippCreateRequestedArray
</a></h3>
4153 <p class=
"description">Create a CUPS array of attribute names from the
4154 given requested-attributes attribute.
</p>
4156 cups_array_t *ippCreateRequestedArray (
<br>
4157 <a href=
"#ipp_t">ipp_t
</a> *request
<br>
4159 <h4 class=
"parameters">Parameters
</h4>
4162 <dd class=
"description">IPP request
</dd>
4164 <h4 class=
"returnvalue">Return Value
</h4>
4165 <p class=
"description">CUPS array or
<code>NULL
</code> if all
</p>
4166 <h4 class=
"discussion">Discussion
</h4>
4167 <p class=
"discussion">This function creates a (sorted) CUPS array of attribute names matching the
4168 list of
"requested-attribute
" values supplied in an IPP request. All IANA-
4169 registered values are supported in addition to the CUPS IPP extension
4172 The
<code>request
</code> parameter specifies the request message that was read from
4175 <code>NULL
</code> is returned if all attributes should be returned. Otherwise, the
4176 result is a sorted array of attribute names, where
<code>cupsArrayFind(array,
4177 "attribute-name")
</code> will return a non-NULL pointer. The array must be freed
4178 using the
<code>cupsArrayDelete
</code> function.
4181 <h3 class=
"function"><a name=
"ippDateToTime">ippDateToTime
</a></h3>
4182 <p class=
"description">Convert from RFC
1903 Date/Time format to UNIX time
4185 time_t ippDateToTime (
<br>
4186 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *date
<br>
4188 <h4 class=
"parameters">Parameters
</h4>
4191 <dd class=
"description">RFC
1903 date info
</dd>
4193 <h4 class=
"returnvalue">Return Value
</h4>
4194 <p class=
"description">UNIX time value
</p>
4195 <h3 class=
"function"><a name=
"ippDelete">ippDelete
</a></h3>
4196 <p class=
"description">Delete an IPP message.
</p>
4198 void ippDelete (
<br>
4199 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4201 <h4 class=
"parameters">Parameters
</h4>
4204 <dd class=
"description">IPP message
</dd>
4206 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a name=
"ippDeleteAttribute">ippDeleteAttribute
</a></h3>
4207 <p class=
"description">Delete a single attribute in an IPP message.
</p>
4209 void ippDeleteAttribute (
<br>
4210 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4211 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
4213 <h4 class=
"parameters">Parameters
</h4>
4216 <dd class=
"description">IPP message
</dd>
4218 <dd class=
"description">Attribute to delete
</dd>
4220 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippDeleteValues">ippDeleteValues
</a></h3>
4221 <p class=
"description">Delete values in an attribute.
</p>
4223 int ippDeleteValues (
<br>
4224 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4225 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4226 int element,
<br>
4227 int count
<br>
4229 <h4 class=
"parameters">Parameters
</h4>
4232 <dd class=
"description">IPP message
</dd>
4234 <dd class=
"description">Attribute
</dd>
4236 <dd class=
"description">Index of first value to delete (
0-based)
</dd>
4238 <dd class=
"description">Number of values to delete
</dd>
4240 <h4 class=
"returnvalue">Return Value
</h4>
4241 <p class=
"description">1 on success,
0 on failure
</p>
4242 <h4 class=
"discussion">Discussion
</h4>
4243 <p class=
"discussion">The
<code>element
</code> parameter specifies the first value to delete, starting at
4244 0. It must be less than the number of values returned by
<a href=
"#ippGetCount"><code>ippGetCount
</code></a>.
<br>
4246 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4248 Deleting all values in an attribute deletes the attribute.
4251 <h3 class=
"function"><a name=
"ippEnumString">ippEnumString
</a></h3>
4252 <p class=
"description">Return a string corresponding to the enum value.
</p>
4254 const char *ippEnumString (
<br>
4255 const char *attrname,
<br>
4256 int enumvalue
<br>
4258 <h4 class=
"parameters">Parameters
</h4>
4261 <dd class=
"description">Attribute name
</dd>
4263 <dd class=
"description">Enum value
</dd>
4265 <h4 class=
"returnvalue">Return Value
</h4>
4266 <p class=
"description">Enum string
</p>
4267 <h3 class=
"function"><a name=
"ippEnumValue">ippEnumValue
</a></h3>
4268 <p class=
"description">Return the value associated with a given enum string.
</p>
4270 int ippEnumValue (
<br>
4271 const char *attrname,
<br>
4272 const char *enumstring
<br>
4274 <h4 class=
"parameters">Parameters
</h4>
4277 <dd class=
"description">Attribute name
</dd>
4279 <dd class=
"description">Enum string
</dd>
4281 <h4 class=
"returnvalue">Return Value
</h4>
4282 <p class=
"description">Enum value or -
1 if unknown
</p>
4283 <h3 class=
"function"><a name=
"ippErrorString">ippErrorString
</a></h3>
4284 <p class=
"description">Return a name for the given status code.
</p>
4286 const char *ippErrorString (
<br>
4287 ipp_status_t error
<br>
4289 <h4 class=
"parameters">Parameters
</h4>
4292 <dd class=
"description">Error status
</dd>
4294 <h4 class=
"returnvalue">Return Value
</h4>
4295 <p class=
"description">Text string
</p>
4296 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"ippErrorValue">ippErrorValue
</a></h3>
4297 <p class=
"description">Return a status code for the given name.
</p>
4299 ipp_status_t ippErrorValue (
<br>
4300 const char *name
<br>
4302 <h4 class=
"parameters">Parameters
</h4>
4305 <dd class=
"description">Name
</dd>
4307 <h4 class=
"returnvalue">Return Value
</h4>
4308 <p class=
"description">IPP status code
</p>
4309 <h3 class=
"function"><a name=
"ippFindAttribute">ippFindAttribute
</a></h3>
4310 <p class=
"description">Find a named attribute in a request.
</p>
4312 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindAttribute (
<br>
4313 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4314 const char *name,
<br>
4315 ipp_tag_t type
<br>
4317 <h4 class=
"parameters">Parameters
</h4>
4320 <dd class=
"description">IPP message
</dd>
4322 <dd class=
"description">Name of attribute
</dd>
4324 <dd class=
"description">Type of attribute
</dd>
4326 <h4 class=
"returnvalue">Return Value
</h4>
4327 <p class=
"description">Matching attribute
</p>
4328 <h4 class=
"discussion">Discussion
</h4>
4329 <p class=
"discussion">Starting with CUPS
2.0, the attribute name can contain a hierarchical list
4330 of attribute and member names separated by slashes, for example
4331 "media-col/media-size
".
</p>
4332 <h3 class=
"function"><a name=
"ippFindNextAttribute">ippFindNextAttribute
</a></h3>
4333 <p class=
"description">Find the next named attribute in a request.
</p>
4335 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindNextAttribute (
<br>
4336 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4337 const char *name,
<br>
4338 ipp_tag_t type
<br>
4340 <h4 class=
"parameters">Parameters
</h4>
4343 <dd class=
"description">IPP message
</dd>
4345 <dd class=
"description">Name of attribute
</dd>
4347 <dd class=
"description">Type of attribute
</dd>
4349 <h4 class=
"returnvalue">Return Value
</h4>
4350 <p class=
"description">Matching attribute
</p>
4351 <h4 class=
"discussion">Discussion
</h4>
4352 <p class=
"discussion">Starting with CUPS
2.0, the attribute name can contain a hierarchical list
4353 of attribute and member names separated by slashes, for example
4354 "media-col/media-size
".
</p>
4355 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippFirstAttribute">ippFirstAttribute
</a></h3>
4356 <p class=
"description">Return the first attribute in the message.
</p>
4358 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFirstAttribute (
<br>
4359 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4361 <h4 class=
"parameters">Parameters
</h4>
4364 <dd class=
"description">IPP message
</dd>
4366 <h4 class=
"returnvalue">Return Value
</h4>
4367 <p class=
"description">First attribute or
<code>NULL
</code> if none
</p>
4368 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippGetBoolean">ippGetBoolean
</a></h3>
4369 <p class=
"description">Get a boolean value for an attribute.
</p>
4371 int ippGetBoolean (
<br>
4372 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4373 int element
<br>
4375 <h4 class=
"parameters">Parameters
</h4>
4378 <dd class=
"description">IPP attribute
</dd>
4380 <dd class=
"description">Value number (
0-based)
</dd>
4382 <h4 class=
"returnvalue">Return Value
</h4>
4383 <p class=
"description">Boolean value or
0 on error
</p>
4384 <h4 class=
"discussion">Discussion
</h4>
4385 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4386 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4389 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippGetCollection">ippGetCollection
</a></h3>
4390 <p class=
"description">Get a collection value for an attribute.
</p>
4392 <a href=
"#ipp_t">ipp_t
</a> *ippGetCollection (
<br>
4393 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4394 int element
<br>
4396 <h4 class=
"parameters">Parameters
</h4>
4399 <dd class=
"description">IPP attribute
</dd>
4401 <dd class=
"description">Value number (
0-based)
</dd>
4403 <h4 class=
"returnvalue">Return Value
</h4>
4404 <p class=
"description">Collection value or
<code>NULL
</code> on error
</p>
4405 <h4 class=
"discussion">Discussion
</h4>
4406 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4407 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4410 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippGetCount">ippGetCount
</a></h3>
4411 <p class=
"description">Get the number of values in an attribute.
</p>
4413 int ippGetCount (
<br>
4414 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
4416 <h4 class=
"parameters">Parameters
</h4>
4419 <dd class=
"description">IPP attribute
</dd>
4421 <h4 class=
"returnvalue">Return Value
</h4>
4422 <p class=
"description">Number of values or
0 on error
</p>
4423 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippGetDate">ippGetDate
</a></h3>
4424 <p class=
"description">Get a date value for an attribute.
</p>
4426 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *ippGetDate (
<br>
4427 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4428 int element
<br>
4430 <h4 class=
"parameters">Parameters
</h4>
4433 <dd class=
"description">IPP attribute
</dd>
4435 <dd class=
"description">Value number (
0-based)
</dd>
4437 <h4 class=
"returnvalue">Return Value
</h4>
4438 <p class=
"description">Date value or
<code>NULL
</code></p>
4439 <h4 class=
"discussion">Discussion
</h4>
4440 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4441 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4444 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippGetGroupTag">ippGetGroupTag
</a></h3>
4445 <p class=
"description">Get the group associated with an attribute.
</p>
4447 ipp_tag_t ippGetGroupTag (
<br>
4448 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
4450 <h4 class=
"parameters">Parameters
</h4>
4453 <dd class=
"description">IPP attribute
</dd>
4455 <h4 class=
"returnvalue">Return Value
</h4>
4456 <p class=
"description">Group tag or
<code>IPP_TAG_ZERO
</code> on error
</p>
4457 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippGetInteger">ippGetInteger
</a></h3>
4458 <p class=
"description">Get the integer/enum value for an attribute.
</p>
4460 int ippGetInteger (
<br>
4461 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4462 int element
<br>
4464 <h4 class=
"parameters">Parameters
</h4>
4467 <dd class=
"description">IPP attribute
</dd>
4469 <dd class=
"description">Value number (
0-based)
</dd>
4471 <h4 class=
"returnvalue">Return Value
</h4>
4472 <p class=
"description">Value or
0 on error
</p>
4473 <h4 class=
"discussion">Discussion
</h4>
4474 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4475 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4478 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippGetName">ippGetName
</a></h3>
4479 <p class=
"description">Get the attribute name.
</p>
4481 const char *ippGetName (
<br>
4482 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
4484 <h4 class=
"parameters">Parameters
</h4>
4487 <dd class=
"description">IPP attribute
</dd>
4489 <h4 class=
"returnvalue">Return Value
</h4>
4490 <p class=
"description">Attribute name or
<code>NULL
</code> for separators
</p>
4491 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"ippGetOctetString">ippGetOctetString
</a></h3>
4492 <p class=
"description">Get an octetString value from an IPP attribute.
</p>
4494 void *ippGetOctetString (
<br>
4495 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4496 int element,
<br>
4497 int *datalen
<br>
4499 <h4 class=
"parameters">Parameters
</h4>
4502 <dd class=
"description">IPP attribute
</dd>
4504 <dd class=
"description">Value number (
0-based)
</dd>
4506 <dd class=
"description">Length of octetString data
</dd>
4508 <h4 class=
"returnvalue">Return Value
</h4>
4509 <p class=
"description">Pointer to octetString data
</p>
4510 <h4 class=
"discussion">Discussion
</h4>
4511 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4512 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4515 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippGetOperation">ippGetOperation
</a></h3>
4516 <p class=
"description">Get the operation ID in an IPP message.
</p>
4518 ipp_op_t ippGetOperation (
<br>
4519 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4521 <h4 class=
"parameters">Parameters
</h4>
4524 <dd class=
"description">IPP request message
</dd>
4526 <h4 class=
"returnvalue">Return Value
</h4>
4527 <p class=
"description">Operation ID or
0 on error
</p>
4528 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippGetRange">ippGetRange
</a></h3>
4529 <p class=
"description">Get a rangeOfInteger value from an attribute.
</p>
4531 int ippGetRange (
<br>
4532 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4533 int element,
<br>
4534 int *uppervalue
<br>
4536 <h4 class=
"parameters">Parameters
</h4>
4539 <dd class=
"description">IPP attribute
</dd>
4541 <dd class=
"description">Value number (
0-based)
</dd>
4543 <dd class=
"description">Upper value of range
</dd>
4545 <h4 class=
"returnvalue">Return Value
</h4>
4546 <p class=
"description">Lower value of range or
0</p>
4547 <h4 class=
"discussion">Discussion
</h4>
4548 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4549 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4552 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippGetRequestId">ippGetRequestId
</a></h3>
4553 <p class=
"description">Get the request ID from an IPP message.
</p>
4555 int ippGetRequestId (
<br>
4556 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4558 <h4 class=
"parameters">Parameters
</h4>
4561 <dd class=
"description">IPP message
</dd>
4563 <h4 class=
"returnvalue">Return Value
</h4>
4564 <p class=
"description">Request ID or
0 on error
</p>
4565 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippGetResolution">ippGetResolution
</a></h3>
4566 <p class=
"description">Get a resolution value for an attribute.
</p>
4568 int ippGetResolution (
<br>
4569 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4570 int element,
<br>
4571 int *yres,
<br>
4572 <a href=
"#ipp_res_t">ipp_res_t
</a> *units
<br>
4574 <h4 class=
"parameters">Parameters
</h4>
4577 <dd class=
"description">IPP attribute
</dd>
4579 <dd class=
"description">Value number (
0-based)
</dd>
4581 <dd class=
"description">Vertical/feed resolution
</dd>
4583 <dd class=
"description">Units for resolution
</dd>
4585 <h4 class=
"returnvalue">Return Value
</h4>
4586 <p class=
"description">Horizontal/cross feed resolution or
0</p>
4587 <h4 class=
"discussion">Discussion
</h4>
4588 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4589 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4592 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippGetState">ippGetState
</a></h3>
4593 <p class=
"description">Get the IPP message state.
</p>
4595 <a href=
"#ipp_state_t">ipp_state_t
</a> ippGetState (
<br>
4596 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4598 <h4 class=
"parameters">Parameters
</h4>
4601 <dd class=
"description">IPP message
</dd>
4603 <h4 class=
"returnvalue">Return Value
</h4>
4604 <p class=
"description">IPP message state value
</p>
4605 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippGetStatusCode">ippGetStatusCode
</a></h3>
4606 <p class=
"description">Get the status code from an IPP response or event message.
</p>
4608 ipp_status_t ippGetStatusCode (
<br>
4609 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4611 <h4 class=
"parameters">Parameters
</h4>
4614 <dd class=
"description">IPP response or event message
</dd>
4616 <h4 class=
"returnvalue">Return Value
</h4>
4617 <p class=
"description">Status code in IPP message
</p>
4618 <h3 class=
"function"><a name=
"ippGetString">ippGetString
</a></h3>
4619 <p class=
"description">Return the value...
</p>
4621 const char *ippGetString (
<br>
4622 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4623 int element,
<br>
4624 const char **language
<br>
4626 <h4 class=
"parameters">Parameters
</h4>
4629 <dd class=
"description">IPP attribute
</dd>
4631 <dd class=
"description">Value number (
0-based)
</dd>
4633 <dd class=
"description">Language code (
<code>NULL
</code> for don't care)
</dd>
4635 <h4 class=
"returnvalue">Return Value
</h4>
4636 <p class=
"description">Get the string and optionally the language code for an attribute.
</p>
4637 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4638 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4641 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippGetValueTag">ippGetValueTag
</a></h3>
4642 <p class=
"description">Get the value tag for an attribute.
</p>
4644 ipp_tag_t ippGetValueTag (
<br>
4645 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
4647 <h4 class=
"parameters">Parameters
</h4>
4650 <dd class=
"description">IPP attribute
</dd>
4652 <h4 class=
"returnvalue">Return Value
</h4>
4653 <p class=
"description">Value tag or
<code>IPP_TAG_ZERO
</code> on error
</p>
4654 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippGetVersion">ippGetVersion
</a></h3>
4655 <p class=
"description">Get the major and minor version number from an IPP message.
</p>
4657 int ippGetVersion (
<br>
4658 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4659 int *minor
<br>
4661 <h4 class=
"parameters">Parameters
</h4>
4664 <dd class=
"description">IPP message
</dd>
4666 <dd class=
"description">Minor version number or
<code>NULL
</code></dd>
4668 <h4 class=
"returnvalue">Return Value
</h4>
4669 <p class=
"description">Major version number or
0 on error
</p>
4670 <h3 class=
"function"><a name=
"ippLength">ippLength
</a></h3>
4671 <p class=
"description">Compute the length of an IPP message.
</p>
4673 size_t ippLength (
<br>
4674 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4676 <h4 class=
"parameters">Parameters
</h4>
4679 <dd class=
"description">IPP message
</dd>
4681 <h4 class=
"returnvalue">Return Value
</h4>
4682 <p class=
"description">Size of IPP message
</p>
4683 <h3 class=
"function"><a name=
"ippNew">ippNew
</a></h3>
4684 <p class=
"description">Allocate a new IPP message.
</p>
4686 <a href=
"#ipp_t">ipp_t
</a> *ippNew (void);
</p>
4687 <h4 class=
"returnvalue">Return Value
</h4>
4688 <p class=
"description">New IPP message
</p>
4689 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"ippNewRequest">ippNewRequest
</a></h3>
4690 <p class=
"description">Allocate a new IPP request message.
</p>
4692 <a href=
"#ipp_t">ipp_t
</a> *ippNewRequest (
<br>
4693 ipp_op_t op
<br>
4695 <h4 class=
"parameters">Parameters
</h4>
4698 <dd class=
"description">Operation code
</dd>
4700 <h4 class=
"returnvalue">Return Value
</h4>
4701 <p class=
"description">IPP request message
</p>
4702 <h4 class=
"discussion">Discussion
</h4>
4703 <p class=
"discussion">The new request message is initialized with the attributes-charset and
4704 attributes-natural-language attributes added. The
4705 attributes-natural-language value is derived from the current locale.
4708 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"ippNewResponse">ippNewResponse
</a></h3>
4709 <p class=
"description">Allocate a new IPP response message.
</p>
4711 <a href=
"#ipp_t">ipp_t
</a> *ippNewResponse (
<br>
4712 <a href=
"#ipp_t">ipp_t
</a> *request
<br>
4714 <h4 class=
"parameters">Parameters
</h4>
4717 <dd class=
"description">IPP request message
</dd>
4719 <h4 class=
"returnvalue">Return Value
</h4>
4720 <p class=
"description">IPP response message
</p>
4721 <h4 class=
"discussion">Discussion
</h4>
4722 <p class=
"discussion">The new response message is initialized with the same version-number,
4723 request-id, attributes-charset, and attributes-natural-language as the
4724 provided request message. If the attributes-charset or
4725 attributes-natural-language attributes are missing from the request,
4726 "utf-
8" and a value derived from the current locale are substituted,
4730 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippNextAttribute">ippNextAttribute
</a></h3>
4731 <p class=
"description">Return the next attribute in the message.
</p>
4733 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippNextAttribute (
<br>
4734 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4736 <h4 class=
"parameters">Parameters
</h4>
4739 <dd class=
"description">IPP message
</dd>
4741 <h4 class=
"returnvalue">Return Value
</h4>
4742 <p class=
"description">Next attribute or
<code>NULL
</code> if none
</p>
4743 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"ippOpString">ippOpString
</a></h3>
4744 <p class=
"description">Return a name for the given operation id.
</p>
4746 const char *ippOpString (
<br>
4747 ipp_op_t op
<br>
4749 <h4 class=
"parameters">Parameters
</h4>
4752 <dd class=
"description">Operation ID
</dd>
4754 <h4 class=
"returnvalue">Return Value
</h4>
4755 <p class=
"description">Name
</p>
4756 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"ippOpValue">ippOpValue
</a></h3>
4757 <p class=
"description">Return an operation id for the given name.
</p>
4759 ipp_op_t ippOpValue (
<br>
4760 const char *name
<br>
4762 <h4 class=
"parameters">Parameters
</h4>
4765 <dd class=
"description">Textual name
</dd>
4767 <h4 class=
"returnvalue">Return Value
</h4>
4768 <p class=
"description">Operation ID
</p>
4769 <h3 class=
"function"><a name=
"ippPort">ippPort
</a></h3>
4770 <p class=
"description">Return the default IPP port number.
</p>
4772 int ippPort (void);
</p>
4773 <h4 class=
"returnvalue">Return Value
</h4>
4774 <p class=
"description">Port number
</p>
4775 <h3 class=
"function"><a name=
"ippRead">ippRead
</a></h3>
4776 <p class=
"description">Read data for an IPP message from a HTTP connection.
</p>
4778 <a href=
"#ipp_state_t">ipp_state_t
</a> ippRead (
<br>
4779 <a href=
"#http_t">http_t
</a> *http,
<br>
4780 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4782 <h4 class=
"parameters">Parameters
</h4>
4785 <dd class=
"description">HTTP connection
</dd>
4787 <dd class=
"description">IPP data
</dd>
4789 <h4 class=
"returnvalue">Return Value
</h4>
4790 <p class=
"description">Current state
</p>
4791 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a name=
"ippReadFile">ippReadFile
</a></h3>
4792 <p class=
"description">Read data for an IPP message from a file.
</p>
4794 <a href=
"#ipp_state_t">ipp_state_t
</a> ippReadFile (
<br>
4795 int fd,
<br>
4796 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4798 <h4 class=
"parameters">Parameters
</h4>
4801 <dd class=
"description">HTTP data
</dd>
4803 <dd class=
"description">IPP data
</dd>
4805 <h4 class=
"returnvalue">Return Value
</h4>
4806 <p class=
"description">Current state
</p>
4807 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"ippReadIO">ippReadIO
</a></h3>
4808 <p class=
"description">Read data for an IPP message.
</p>
4810 <a href=
"#ipp_state_t">ipp_state_t
</a> ippReadIO (
<br>
4811 void *src,
<br>
4812 <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br>
4813 int blocking,
<br>
4814 <a href=
"#ipp_t">ipp_t
</a> *parent,
<br>
4815 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4817 <h4 class=
"parameters">Parameters
</h4>
4820 <dd class=
"description">Data source
</dd>
4822 <dd class=
"description">Read callback function
</dd>
4824 <dd class=
"description">Use blocking IO?
</dd>
4826 <dd class=
"description">Parent request, if any
</dd>
4828 <dd class=
"description">IPP data
</dd>
4830 <h4 class=
"returnvalue">Return Value
</h4>
4831 <p class=
"description">Current state
</p>
4832 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippSetBoolean">ippSetBoolean
</a></h3>
4833 <p class=
"description">Set a boolean value in an attribute.
</p>
4835 int ippSetBoolean (
<br>
4836 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4837 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4838 int element,
<br>
4839 int boolvalue
<br>
4841 <h4 class=
"parameters">Parameters
</h4>
4844 <dd class=
"description">IPP message
</dd>
4846 <dd class=
"description">IPP attribute
</dd>
4848 <dd class=
"description">Value number (
0-based)
</dd>
4850 <dd class=
"description">Boolean value
</dd>
4852 <h4 class=
"returnvalue">Return Value
</h4>
4853 <p class=
"description">1 on success,
0 on failure
</p>
4854 <h4 class=
"discussion">Discussion
</h4>
4855 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4856 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
4858 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4860 The
<code>element
</code> parameter specifies which value to set from
0 to
4861 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4864 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippSetCollection">ippSetCollection
</a></h3>
4865 <p class=
"description">Set a collection value in an attribute.
</p>
4867 int ippSetCollection (
<br>
4868 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4869 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4870 int element,
<br>
4871 <a href=
"#ipp_t">ipp_t
</a> *colvalue
<br>
4873 <h4 class=
"parameters">Parameters
</h4>
4876 <dd class=
"description">IPP message
</dd>
4878 <dd class=
"description">IPP attribute
</dd>
4880 <dd class=
"description">Value number (
0-based)
</dd>
4882 <dd class=
"description">Collection value
</dd>
4884 <h4 class=
"returnvalue">Return Value
</h4>
4885 <p class=
"description">1 on success,
0 on failure
</p>
4886 <h4 class=
"discussion">Discussion
</h4>
4887 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4888 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>
4890 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4892 The
<code>element
</code> parameter specifies which value to set from
0 to
4893 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4896 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippSetDate">ippSetDate
</a></h3>
4897 <p class=
"description">Set a date value in an attribute.
</p>
4899 int ippSetDate (
<br>
4900 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4901 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4902 int element,
<br>
4903 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *datevalue
<br>
4905 <h4 class=
"parameters">Parameters
</h4>
4908 <dd class=
"description">IPP message
</dd>
4910 <dd class=
"description">IPP attribute
</dd>
4912 <dd class=
"description">Value number (
0-based)
</dd>
4914 <dd class=
"description">Date value
</dd>
4916 <h4 class=
"returnvalue">Return Value
</h4>
4917 <p class=
"description">1 on success,
0 on failure
</p>
4918 <h4 class=
"discussion">Discussion
</h4>
4919 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4920 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>
4922 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4924 The
<code>element
</code> parameter specifies which value to set from
0 to
4925 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4928 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippSetGroupTag">ippSetGroupTag
</a></h3>
4929 <p class=
"description">Set the group tag of an attribute.
</p>
4931 int ippSetGroupTag (
<br>
4932 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4933 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4934 ipp_tag_t group_tag
<br>
4936 <h4 class=
"parameters">Parameters
</h4>
4939 <dd class=
"description">IPP message
</dd>
4941 <dd class=
"description">Attribute
</dd>
4943 <dd class=
"description">Group tag
</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>group
</code> parameter specifies the IPP attribute group tag: none
4954 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
4955 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
4956 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
4957 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
4960 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippSetInteger">ippSetInteger
</a></h3>
4961 <p class=
"description">Set an integer or enum value in an attribute.
</p>
4963 int ippSetInteger (
<br>
4964 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4965 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4966 int element,
<br>
4967 int intvalue
<br>
4969 <h4 class=
"parameters">Parameters
</h4>
4972 <dd class=
"description">IPP message
</dd>
4974 <dd class=
"description">IPP attribute
</dd>
4976 <dd class=
"description">Value number (
0-based)
</dd>
4978 <dd class=
"description">Integer/enum value
</dd>
4980 <h4 class=
"returnvalue">Return Value
</h4>
4981 <p class=
"description">1 on success,
0 on failure
</p>
4982 <h4 class=
"discussion">Discussion
</h4>
4983 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4984 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>
4986 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4988 The
<code>element
</code> parameter specifies which value to set from
0 to
4989 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4992 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippSetName">ippSetName
</a></h3>
4993 <p class=
"description">Set the name of an attribute.
</p>
4995 int ippSetName (
<br>
4996 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4997 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4998 const char *name
<br>
5000 <h4 class=
"parameters">Parameters
</h4>
5003 <dd class=
"description">IPP message
</dd>
5005 <dd class=
"description">IPP attribute
</dd>
5007 <dd class=
"description">Attribute name
</dd>
5009 <h4 class=
"returnvalue">Return Value
</h4>
5010 <p class=
"description">1 on success,
0 on failure
</p>
5011 <h4 class=
"discussion">Discussion
</h4>
5012 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5013 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
5015 The
<code>attr
</code> parameter may be modified as a result of setting the value.
5018 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"ippSetOctetString">ippSetOctetString
</a></h3>
5019 <p class=
"description">Set an octetString value in an IPP attribute.
</p>
5021 int ippSetOctetString (
<br>
5022 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5023 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
5024 int element,
<br>
5025 const void *data,
<br>
5026 int datalen
<br>
5028 <h4 class=
"parameters">Parameters
</h4>
5031 <dd class=
"description">IPP message
</dd>
5033 <dd class=
"description">IPP attribute
</dd>
5035 <dd class=
"description">Value number (
0-based)
</dd>
5037 <dd class=
"description">Pointer to octetString data
</dd>
5039 <dd class=
"description">Length of octetString data
</dd>
5041 <h4 class=
"returnvalue">Return Value
</h4>
5042 <p class=
"description">1 on success,
0 on failure
</p>
5043 <h4 class=
"discussion">Discussion
</h4>
5044 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5045 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>
5047 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5049 The
<code>element
</code> parameter specifies which value to set from
0 to
5050 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
5053 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippSetOperation">ippSetOperation
</a></h3>
5054 <p class=
"description">Set the operation ID in an IPP request message.
</p>
5056 int ippSetOperation (
<br>
5057 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5058 ipp_op_t op
<br>
5060 <h4 class=
"parameters">Parameters
</h4>
5063 <dd class=
"description">IPP request message
</dd>
5065 <dd class=
"description">Operation ID
</dd>
5067 <h4 class=
"returnvalue">Return Value
</h4>
5068 <p class=
"description">1 on success,
0 on failure
</p>
5069 <h4 class=
"discussion">Discussion
</h4>
5070 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5071 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
5074 <h3 class=
"function"><a name=
"ippSetPort">ippSetPort
</a></h3>
5075 <p class=
"description">Set the default port number.
</p>
5077 void ippSetPort (
<br>
5078 int p
<br>
5080 <h4 class=
"parameters">Parameters
</h4>
5083 <dd class=
"description">Port number to use
</dd>
5085 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippSetRange">ippSetRange
</a></h3>
5086 <p class=
"description">Set a rangeOfInteger value in an attribute.
</p>
5088 int ippSetRange (
<br>
5089 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5090 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
5091 int element,
<br>
5092 int lowervalue,
<br>
5093 int uppervalue
<br>
5095 <h4 class=
"parameters">Parameters
</h4>
5098 <dd class=
"description">IPP message
</dd>
5100 <dd class=
"description">IPP attribute
</dd>
5102 <dd class=
"description">Value number (
0-based)
</dd>
5104 <dd class=
"description">Lower bound for range
</dd>
5106 <dd class=
"description">Upper bound for range
</dd>
5108 <h4 class=
"returnvalue">Return Value
</h4>
5109 <p class=
"description">1 on success,
0 on failure
</p>
5110 <h4 class=
"discussion">Discussion
</h4>
5111 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5112 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>
5114 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5116 The
<code>element
</code> parameter specifies which value to set from
0 to
5117 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
5120 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippSetRequestId">ippSetRequestId
</a></h3>
5121 <p class=
"description">Set the request ID in an IPP message.
</p>
5123 int ippSetRequestId (
<br>
5124 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5125 int request_id
<br>
5127 <h4 class=
"parameters">Parameters
</h4>
5130 <dd class=
"description">IPP message
</dd>
5132 <dd class=
"description">Request ID
</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>request_id
</code> parameter must be greater than
0.
5143 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippSetResolution">ippSetResolution
</a></h3>
5144 <p class=
"description">Set a resolution value in an attribute.
</p>
5146 int ippSetResolution (
<br>
5147 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5148 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
5149 int element,
<br>
5150 <a href=
"#ipp_res_t">ipp_res_t
</a> unitsvalue,
<br>
5151 int xresvalue,
<br>
5152 int yresvalue
<br>
5154 <h4 class=
"parameters">Parameters
</h4>
5157 <dd class=
"description">IPP message
</dd>
5159 <dd class=
"description">IPP attribute
</dd>
5161 <dd class=
"description">Value number (
0-based)
</dd>
5163 <dd class=
"description">Resolution units
</dd>
5165 <dd class=
"description">Horizontal/cross feed resolution
</dd>
5167 <dd class=
"description">Vertical/feed resolution
</dd>
5169 <h4 class=
"returnvalue">Return Value
</h4>
5170 <p class=
"description">1 on success,
0 on failure
</p>
5171 <h4 class=
"discussion">Discussion
</h4>
5172 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5173 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>
5175 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5177 The
<code>element
</code> parameter specifies which value to set from
0 to
5178 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
5181 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippSetState">ippSetState
</a></h3>
5182 <p class=
"description">Set the current state of the IPP message.
</p>
5184 int ippSetState (
<br>
5185 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5186 <a href=
"#ipp_state_t">ipp_state_t
</a> state
<br>
5188 <h4 class=
"parameters">Parameters
</h4>
5191 <dd class=
"description">IPP message
</dd>
5193 <dd class=
"description">IPP state value
</dd>
5195 <h4 class=
"returnvalue">Return Value
</h4>
5196 <p class=
"description">1 on success,
0 on failure
</p>
5197 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippSetStatusCode">ippSetStatusCode
</a></h3>
5198 <p class=
"description">Set the status code in an IPP response or event message.
</p>
5200 int ippSetStatusCode (
<br>
5201 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5202 ipp_status_t status
<br>
5204 <h4 class=
"parameters">Parameters
</h4>
5207 <dd class=
"description">IPP response or event message
</dd>
5209 <dd class=
"description">Status code
</dd>
5211 <h4 class=
"returnvalue">Return Value
</h4>
5212 <p class=
"description">1 on success,
0 on failure
</p>
5213 <h4 class=
"discussion">Discussion
</h4>
5214 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5215 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
5218 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippSetString">ippSetString
</a></h3>
5219 <p class=
"description">Set a string value in an attribute.
</p>
5221 int ippSetString (
<br>
5222 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5223 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
5224 int element,
<br>
5225 const char *strvalue
<br>
5227 <h4 class=
"parameters">Parameters
</h4>
5230 <dd class=
"description">IPP message
</dd>
5232 <dd class=
"description">IPP attribute
</dd>
5234 <dd class=
"description">Value number (
0-based)
</dd>
5236 <dd class=
"description">String value
</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>.
5250 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"ippSetStringf">ippSetStringf
</a></h3>
5251 <p class=
"description">Set a formatted string value of an attribute.
</p>
5253 int ippSetStringf (
<br>
5254 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5255 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
5256 int element,
<br>
5257 const char *format,
<br>
5258 ...
<br>
5260 <h4 class=
"parameters">Parameters
</h4>
5263 <dd class=
"description">IPP message
</dd>
5265 <dd class=
"description">IPP attribute
</dd>
5267 <dd class=
"description">Value number (
0-based)
</dd>
5269 <dd class=
"description">Printf-style format string
</dd>
5271 <dd class=
"description">Additional arguments as needed
</dd>
5273 <h4 class=
"returnvalue">Return Value
</h4>
5274 <p class=
"description">1 on success,
0 on failure
</p>
5275 <h4 class=
"discussion">Discussion
</h4>
5276 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5277 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>
5279 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5281 The
<code>element
</code> parameter specifies which value to set from
0 to
5282 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
<br>
5284 The
<code>format
</code> parameter uses formatting characters compatible with the
5285 printf family of standard functions. Additional arguments follow it as
5286 needed. The formatted string is truncated as needed to the maximum length of
5287 the corresponding value type.
5290 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"ippSetStringfv">ippSetStringfv
</a></h3>
5291 <p class=
"description">Set a formatted string value of an attribute.
</p>
5293 int ippSetStringfv (
<br>
5294 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5295 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
5296 int element,
<br>
5297 const char *format,
<br>
5298 va_list ap
<br>
5300 <h4 class=
"parameters">Parameters
</h4>
5303 <dd class=
"description">IPP message
</dd>
5305 <dd class=
"description">IPP attribute
</dd>
5307 <dd class=
"description">Value number (
0-based)
</dd>
5309 <dd class=
"description">Printf-style format string
</dd>
5311 <dd class=
"description">Pointer to additional arguments
</dd>
5313 <h4 class=
"returnvalue">Return Value
</h4>
5314 <p class=
"description">1 on success,
0 on failure
</p>
5315 <h4 class=
"discussion">Discussion
</h4>
5316 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5317 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>
5319 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5321 The
<code>element
</code> parameter specifies which value to set from
0 to
5322 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
<br>
5324 The
<code>format
</code> parameter uses formatting characters compatible with the
5325 printf family of standard functions. Additional arguments follow it as
5326 needed. The formatted string is truncated as needed to the maximum length of
5327 the corresponding value type.
5330 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippSetValueTag">ippSetValueTag
</a></h3>
5331 <p class=
"description">Set the value tag of an attribute.
</p>
5333 int ippSetValueTag (
<br>
5334 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5335 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
5336 ipp_tag_t value_tag
<br>
5338 <h4 class=
"parameters">Parameters
</h4>
5341 <dd class=
"description">IPP message
</dd>
5343 <dd class=
"description">IPP attribute
</dd>
5345 <dd class=
"description">Value tag
</dd>
5347 <h4 class=
"returnvalue">Return Value
</h4>
5348 <p class=
"description">1 on success,
0 on failure
</p>
5349 <h4 class=
"discussion">Discussion
</h4>
5350 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5351 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>
5353 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5355 Integer (
<code>IPP_TAG_INTEGER
</code>) values can be promoted to rangeOfInteger
5356 (
<code>IPP_TAG_RANGE
</code>) values, the various string tags can be promoted to name
5357 (
<code>IPP_TAG_NAME
</code>) or nameWithLanguage (
<code>IPP_TAG_NAMELANG
</code>) values, text
5358 (
<code>IPP_TAG_TEXT
</code>) values can be promoted to textWithLanguage
5359 (
<code>IPP_TAG_TEXTLANG
</code>) values, and all values can be demoted to the various
5360 out-of-band value tags such as no-value (
<code>IPP_TAG_NOVALUE
</code>). All other changes
5361 will be rejected.
<br>
5363 Promoting a string attribute to nameWithLanguage or textWithLanguage adds the language
5364 code in the
"attributes-natural-language
" attribute or, if not present, the language
5365 code for the current locale.
5368 <h3 class=
"function"><span class=
"info"> CUPS
1.6/macOS
10.8 </span><a name=
"ippSetVersion">ippSetVersion
</a></h3>
5369 <p class=
"description">Set the version number in an IPP message.
</p>
5371 int ippSetVersion (
<br>
5372 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5373 int major,
<br>
5374 int minor
<br>
5376 <h4 class=
"parameters">Parameters
</h4>
5379 <dd class=
"description">IPP message
</dd>
5381 <dd class=
"description">Major version number (major.minor)
</dd>
5383 <dd class=
"description">Minor version number (major.minor)
</dd>
5385 <h4 class=
"returnvalue">Return Value
</h4>
5386 <p class=
"description">1 on success,
0 on failure
</p>
5387 <h4 class=
"discussion">Discussion
</h4>
5388 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5389 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>
5391 The valid version numbers are currently
1.0,
1.1,
2.0,
2.1, and
2.2.
5394 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"ippStateString">ippStateString
</a></h3>
5395 <p class=
"description">Return the name corresponding to a state value.
</p>
5397 const char *ippStateString (
<br>
5398 <a href=
"#ipp_state_t">ipp_state_t
</a> state
<br>
5400 <h4 class=
"parameters">Parameters
</h4>
5403 <dd class=
"description">State value
</dd>
5405 <h4 class=
"returnvalue">Return Value
</h4>
5406 <p class=
"description">State name
</p>
5407 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a name=
"ippTagString">ippTagString
</a></h3>
5408 <p class=
"description">Return the tag name corresponding to a tag value.
</p>
5410 const char *ippTagString (
<br>
5411 ipp_tag_t tag
<br>
5413 <h4 class=
"parameters">Parameters
</h4>
5416 <dd class=
"description">Tag value
</dd>
5418 <h4 class=
"returnvalue">Return Value
</h4>
5419 <p class=
"description">Tag name
</p>
5420 <h4 class=
"discussion">Discussion
</h4>
5421 <p class=
"discussion">The returned names are defined in RFC
2911 and
3382.
5424 <h3 class=
"function"><span class=
"info"> CUPS
1.4/macOS
10.6 </span><a name=
"ippTagValue">ippTagValue
</a></h3>
5425 <p class=
"description">Return the tag value corresponding to a tag name.
</p>
5427 ipp_tag_t ippTagValue (
<br>
5428 const char *name
<br>
5430 <h4 class=
"parameters">Parameters
</h4>
5433 <dd class=
"description">Tag name
</dd>
5435 <h4 class=
"returnvalue">Return Value
</h4>
5436 <p class=
"description">Tag value
</p>
5437 <h4 class=
"discussion">Discussion
</h4>
5438 <p class=
"discussion">The tag names are defined in RFC
2911 and
3382.
5441 <h3 class=
"function"><a name=
"ippTimeToDate">ippTimeToDate
</a></h3>
5442 <p class=
"description">Convert from UNIX time to RFC
1903 format.
</p>
5444 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *ippTimeToDate (
<br>
5445 time_t t
<br>
5447 <h4 class=
"parameters">Parameters
</h4>
5450 <dd class=
"description">UNIX time value
</dd>
5452 <h4 class=
"returnvalue">Return Value
</h4>
5453 <p class=
"description">RFC-
1903 date/time data
</p>
5454 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"ippValidateAttribute">ippValidateAttribute
</a></h3>
5455 <p class=
"description">Validate the contents of an attribute.
</p>
5457 int ippValidateAttribute (
<br>
5458 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
5460 <h4 class=
"parameters">Parameters
</h4>
5463 <dd class=
"description">Attribute
</dd>
5465 <h4 class=
"returnvalue">Return Value
</h4>
5466 <p class=
"description">1 if valid,
0 otherwise
</p>
5467 <h4 class=
"discussion">Discussion
</h4>
5468 <p class=
"discussion">This function validates the contents of an attribute based on the name and
5469 value tag.
1 is returned if the attribute is valid,
0 otherwise. On
5470 failure, cupsLastErrorString() is set to a human-readable message.
5473 <h3 class=
"function"><span class=
"info"> CUPS
1.7/macOS
10.9 </span><a name=
"ippValidateAttributes">ippValidateAttributes
</a></h3>
5474 <p class=
"description">Validate all attributes in an IPP message.
</p>
5476 int ippValidateAttributes (
<br>
5477 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5479 <h4 class=
"parameters">Parameters
</h4>
5482 <dd class=
"description">IPP message
</dd>
5484 <h4 class=
"returnvalue">Return Value
</h4>
5485 <p class=
"description">1 if valid,
0 otherwise
</p>
5486 <h4 class=
"discussion">Discussion
</h4>
5487 <p class=
"discussion">This function validates the contents of the IPP message, including each
5488 attribute. Like
<a href=
"#ippValidateAttribute"><code>ippValidateAttribute
</code></a>, cupsLastErrorString() is set
5489 to a human-readable message on failure.
5492 <h3 class=
"function"><a name=
"ippWrite">ippWrite
</a></h3>
5493 <p class=
"description">Write data for an IPP message to a HTTP connection.
</p>
5495 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWrite (
<br>
5496 <a href=
"#http_t">http_t
</a> *http,
<br>
5497 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5499 <h4 class=
"parameters">Parameters
</h4>
5502 <dd class=
"description">HTTP connection
</dd>
5504 <dd class=
"description">IPP data
</dd>
5506 <h4 class=
"returnvalue">Return Value
</h4>
5507 <p class=
"description">Current state
</p>
5508 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/macOS
10.3 </span><a name=
"ippWriteFile">ippWriteFile
</a></h3>
5509 <p class=
"description">Write data for an IPP message to a file.
</p>
5511 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWriteFile (
<br>
5512 int fd,
<br>
5513 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5515 <h4 class=
"parameters">Parameters
</h4>
5518 <dd class=
"description">HTTP data
</dd>
5520 <dd class=
"description">IPP data
</dd>
5522 <h4 class=
"returnvalue">Return Value
</h4>
5523 <p class=
"description">Current state
</p>
5524 <h3 class=
"function"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"ippWriteIO">ippWriteIO
</a></h3>
5525 <p class=
"description">Write data for an IPP message.
</p>
5527 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWriteIO (
<br>
5528 void *dst,
<br>
5529 <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br>
5530 int blocking,
<br>
5531 <a href=
"#ipp_t">ipp_t
</a> *parent,
<br>
5532 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5534 <h4 class=
"parameters">Parameters
</h4>
5537 <dd class=
"description">Destination
</dd>
5539 <dd class=
"description">Write callback function
</dd>
5541 <dd class=
"description">Use blocking IO?
</dd>
5543 <dd class=
"description">Parent IPP message
</dd>
5545 <dd class=
"description">IPP data
</dd>
5547 <h4 class=
"returnvalue">Return Value
</h4>
5548 <p class=
"description">Current state
</p>
5549 <h2 class=
"title"><a name=
"TYPES">Data Types
</a></h2>
5550 <h3 class=
"typedef"><a name=
"gss_auth_identity_desc">gss_auth_identity_desc
</a></h3>
5551 <p class=
"description">Local functions...
</p>
5553 typedef struct
<a href=
"#gss_auth_identity">gss_auth_identity
</a> gss_auth_identity_desc;
5555 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"http_addr_t">http_addr_t
</a></h3>
5556 <p class=
"description">Socket address union, which
5557 makes using IPv6 and other
5558 address types easier and
5561 typedef union _http_addr_u / http_addr_t;
5563 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"http_addrlist_t">http_addrlist_t
</a></h3>
5564 <p class=
"description">Socket address list, which is
5565 used to enumerate all of the
5566 addresses that are associated
5567 with a hostname.
</p>
5569 typedef struct
<a href=
"#http_addrlist_s">http_addrlist_s
</a> / http_addrlist_t;
5571 <h3 class=
"typedef"><a name=
"http_auth_t">http_auth_t
</a></h3>
5572 <p class=
"description">HTTP authentication types
</p>
5574 typedef enum
<a href=
"#http_auth_e">http_auth_e
</a> http_auth_t;
5576 <h3 class=
"typedef"><span class=
"info"> CUPS
1.5/macOS
10.7 </span><a name=
"http_credential_t">http_credential_t
</a></h3>
5577 <p class=
"description">HTTP credential data
</p>
5579 typedef struct
<a href=
"#http_credential_s">http_credential_s
</a> http_credential_t;
5581 <h3 class=
"typedef"><a name=
"http_encoding_t">http_encoding_t
</a></h3>
5582 <p class=
"description">HTTP transfer encoding values
</p>
5584 typedef enum
<a href=
"#http_encoding_e">http_encoding_e
</a> http_encoding_t;
5586 <h3 class=
"typedef"><a name=
"http_encryption_t">http_encryption_t
</a></h3>
5587 <p class=
"description">HTTP encryption values
</p>
5589 typedef enum
<a href=
"#http_encryption_e">http_encryption_e
</a> http_encryption_t;
5591 <h3 class=
"typedef"><a name=
"http_field_t">http_field_t
</a></h3>
5592 <p class=
"description">HTTP field names
</p>
5594 typedef enum
<a href=
"#http_field_e">http_field_e
</a> http_field_t;
5596 <h3 class=
"typedef"><a name=
"http_keepalive_t">http_keepalive_t
</a></h3>
5597 <p class=
"description">HTTP keep-alive values
</p>
5599 typedef enum
<a href=
"#http_keepalive_e">http_keepalive_e
</a> http_keepalive_t;
5601 <h3 class=
"typedef"><a name=
"http_state_t">http_state_t
</a></h3>
5602 <p class=
"description">HTTP state values; states
5603 are server-oriented...
</p>
5605 typedef enum
<a href=
"#http_state_e">http_state_e
</a> http_state_t;
5607 <h3 class=
"typedef"><a name=
"http_t">http_t
</a></h3>
5608 <p class=
"description">HTTP connection type
</p>
5610 typedef struct _http_s http_t;
5612 <h3 class=
"typedef"><span class=
"info"> CUPS
1.5/macOS
10.7 </span><a name=
"http_timeout_cb_t">http_timeout_cb_t
</a></h3>
5613 <p class=
"description">HTTP timeout callback
</p>
5615 typedef int (*http_timeout_cb_t)(
<a href=
"#http_t">http_t
</a> *http, void *user_data);
5617 <h3 class=
"typedef"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"http_trust_t">http_trust_t
</a></h3>
5618 <p class=
"description">Level of trust for credentials
</p>
5620 typedef enum
<a href=
"#http_trust_e">http_trust_e
</a> http_trust_t;
5622 <h3 class=
"typedef"><a name=
"http_uri_coding_t">http_uri_coding_t
</a></h3>
5623 <p class=
"description">URI en/decode flags
</p>
5625 typedef enum
<a href=
"#http_uri_coding_e">http_uri_coding_e
</a> http_uri_coding_t;
5627 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"http_uri_status_t">http_uri_status_t
</a></h3>
5628 <p class=
"description">URI separation status
</p>
5630 typedef enum
<a href=
"#http_uri_status_e">http_uri_status_e
</a> http_uri_status_t;
5632 <h3 class=
"typedef"><a name=
"http_version_t">http_version_t
</a></h3>
5633 <p class=
"description">HTTP version numbers
</p>
5635 typedef enum
<a href=
"#http_version_e">http_version_e
</a> http_version_t;
5637 <h3 class=
"typedef"><a name=
"ipp_attribute_t">ipp_attribute_t
</a></h3>
5638 <p class=
"description">IPP attribute
</p>
5640 typedef struct _ipp_attribute_s ipp_attribute_t;
5642 <h3 class=
"typedef"><a name=
"ipp_copycb_t">ipp_copycb_t
</a></h3>
5643 <p class=
"description">The following structures are PRIVATE starting with CUPS
1.6/macOS
10.8.
5644 Please use the new accessor functions available in CUPS
1.6 and later, as
5645 these definitions will be moved to a private header file in a future release.
</p>
5647 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);
5649 <h3 class=
"typedef"><a name=
"ipp_dstate_t">ipp_dstate_t
</a></h3>
5650 <p class=
"description">Document states
</p>
5652 typedef enum
<a href=
"#ipp_dstate_e">ipp_dstate_e
</a> ipp_dstate_t;
5654 <h3 class=
"typedef"><a name=
"ipp_finish_t">ipp_finish_t
</a></h3>
5655 <p class=
"description">Job collation types
</p>
5657 typedef enum
<a href=
"#ipp_finishings_e">ipp_finishings_e
</a> ipp_finish_t;
5659 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"ipp_iocb_t">ipp_iocb_t
</a></h3>
5660 <p class=
"description">IPP IO Callback Function
</p>
5662 typedef ssize_t (*ipp_iocb_t)(void *context,
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *buffer, size_t bytes);
5664 <h3 class=
"typedef"><a name=
"ipp_jcollate_t">ipp_jcollate_t
</a></h3>
5665 <p class=
"description">Job collation types
</p>
5667 typedef enum
<a href=
"#ipp_jcollate_e">ipp_jcollate_e
</a> ipp_jcollate_t;
5669 <h3 class=
"typedef"><a name=
"ipp_orient_t">ipp_orient_t
</a></h3>
5670 <p class=
"description">Orientation values
</p>
5672 typedef enum
<a href=
"#ipp_orient_e">ipp_orient_e
</a> ipp_orient_t;
5674 <h3 class=
"typedef"><a name=
"ipp_pstate_t">ipp_pstate_t
</a></h3>
5675 <p class=
"description">Printer states
</p>
5677 typedef enum
<a href=
"#ipp_pstate_e">ipp_pstate_e
</a> ipp_pstate_t;
5679 <h3 class=
"typedef"><a name=
"ipp_quality_t">ipp_quality_t
</a></h3>
5680 <p class=
"description">Qualities
</p>
5682 typedef enum
<a href=
"#ipp_quality_e">ipp_quality_e
</a> ipp_quality_t;
5684 <h3 class=
"typedef"><a name=
"ipp_res_t">ipp_res_t
</a></h3>
5685 <p class=
"description">Resolution units
</p>
5687 typedef enum
<a href=
"#ipp_res_e">ipp_res_e
</a> ipp_res_t;
5689 <h3 class=
"typedef"><a name=
"ipp_state_t">ipp_state_t
</a></h3>
5690 <p class=
"description">IPP states
</p>
5692 typedef enum
<a href=
"#ipp_state_e">ipp_state_e
</a> ipp_state_t;
5694 <h3 class=
"typedef"><a name=
"ipp_t">ipp_t
</a></h3>
5695 <p class=
"description">IPP request/response data
</p>
5697 typedef struct _ipp_s ipp_t;
5699 <h3 class=
"typedef"><a name=
"ipp_uchar_t">ipp_uchar_t
</a></h3>
5700 <p class=
"description">Unsigned
8-bit integer/character
</p>
5702 typedef unsigned char ipp_uchar_t;
5704 <h2 class=
"title"><a name=
"STRUCTURES">Structures
</a></h2>
5705 <h3 class=
"struct"><a name=
"gss_auth_identity">gss_auth_identity
</a></h3>
5706 <p class=
"description">Local functions...
</p>
5707 <p class=
"code">struct gss_auth_identity {
<br>
5708 gss_buffer_t *credentialsRef;
<br>
5709 uint32_t flags;
<br>
5710 char *password;
<br>
5711 char *realm;
<br>
5712 uint32_t type;
<br>
5713 char *username;
<br>
5715 <h4 class=
"members">Members
</h4>
5717 <dt>credentialsRef
</dt>
5724 <h3 class=
"struct"><span class=
"info"> CUPS
1.2/macOS
10.5 </span><a name=
"http_addrlist_s">http_addrlist_s
</a></h3>
5725 <p class=
"description">Socket address list, which is
5726 used to enumerate all of the
5727 addresses that are associated
5728 with a hostname.
</p>
5729 <p class=
"code">struct http_addrlist_s {
<br>
5730 <a href=
"#http_addr_t">http_addr_t
</a> addr;
<br>
5731 struct
<a href=
"#http_addrlist_s">http_addrlist_s
</a> *next;
<br>
5733 <h4 class=
"members">Members
</h4>
5736 <dd class=
"description">Address
</dd>
5738 <dd class=
"description">Pointer to next address in list
</dd>
5740 <h3 class=
"struct"><span class=
"info"> CUPS
1.5/macOS
10.7 </span><a name=
"http_credential_s">http_credential_s
</a></h3>
5741 <p class=
"description">HTTP credential data
</p>
5742 <p class=
"code">struct http_credential_s {
<br>
5743 void *data;
<br>
5744 size_t datalen;
<br>
5746 <h4 class=
"members">Members
</h4>
5749 <dd class=
"description">Pointer to credential data
</dd>
5751 <dd class=
"description">Credential length
</dd>
5753 <h3 class=
"struct"><a name=
"pollfd">pollfd
</a></h3>
5754 <p class=
"description">User data (unused)
</p>
5755 <p class=
"code">struct pollfd *pollfds, unsigned int num_pollfds, int timeout, void *context) {
<br>
5756 void) context;
<br>
5757 void) timeout;
<br>
5759 <h4 class=
"members">Members
</h4>
5764 <h2 class=
"title"><a name=
"ENUMERATIONS">Constants
</a></h2>
5765 <h3 class=
"enumeration"><a name=
"http_auth_e">http_auth_e
</a></h3>
5766 <p class=
"description">HTTP authentication types
</p>
5767 <h4 class=
"constants">Constants
</h4>
5769 <dt>HTTP_AUTH_BASIC
</dt>
5770 <dd class=
"description">Basic authentication in use
</dd>
5771 <dt>HTTP_AUTH_MD5
</dt>
5772 <dd class=
"description">Digest authentication in use
</dd>
5773 <dt>HTTP_AUTH_MD5_INT
</dt>
5774 <dd class=
"description">Digest authentication in use for body
</dd>
5775 <dt>HTTP_AUTH_MD5_SESS
</dt>
5776 <dd class=
"description">MD5-session authentication in use
</dd>
5777 <dt>HTTP_AUTH_MD5_SESS_INT
</dt>
5778 <dd class=
"description">MD5-session authentication in use for body
</dd>
5779 <dt>HTTP_AUTH_NEGOTIATE
<span class=
"info"> CUPS
1.3/macOS
10.5 </span></dt>
5780 <dd class=
"description">GSSAPI authentication in use
</dd>
5781 <dt>HTTP_AUTH_NONE
</dt>
5782 <dd class=
"description">No authentication in use
</dd>
5784 <h3 class=
"enumeration"><a name=
"http_encoding_e">http_encoding_e
</a></h3>
5785 <p class=
"description">HTTP transfer encoding values
</p>
5786 <h4 class=
"constants">Constants
</h4>
5788 <dt>HTTP_ENCODING_CHUNKED
</dt>
5789 <dd class=
"description">Data is chunked
</dd>
5790 <dt>HTTP_ENCODING_FIELDS
</dt>
5791 <dd class=
"description">Sending HTTP fields
</dd>
5792 <dt>HTTP_ENCODING_LENGTH
</dt>
5793 <dd class=
"description">Data is sent with Content-Length
</dd>
5795 <h3 class=
"enumeration"><a name=
"http_encryption_e">http_encryption_e
</a></h3>
5796 <p class=
"description">HTTP encryption values
</p>
5797 <h4 class=
"constants">Constants
</h4>
5799 <dt>HTTP_ENCRYPTION_ALWAYS
</dt>
5800 <dd class=
"description">Always encrypt (SSL)
</dd>
5801 <dt>HTTP_ENCRYPTION_IF_REQUESTED
</dt>
5802 <dd class=
"description">Encrypt if requested (TLS upgrade)
</dd>
5803 <dt>HTTP_ENCRYPTION_NEVER
</dt>
5804 <dd class=
"description">Never encrypt
</dd>
5805 <dt>HTTP_ENCRYPTION_REQUIRED
</dt>
5806 <dd class=
"description">Encryption is required (TLS upgrade)
</dd>
5808 <h3 class=
"enumeration"><a name=
"http_field_e">http_field_e
</a></h3>
5809 <p class=
"description">HTTP field names
</p>
5810 <h4 class=
"constants">Constants
</h4>
5812 <dt>HTTP_FIELD_ACCEPT_ENCODING
<span class=
"info"> CUPS
1.7/macOS
10.9 </span></dt>
5813 <dd class=
"description">Accepting-Encoding field
</dd>
5814 <dt>HTTP_FIELD_ACCEPT_LANGUAGE
</dt>
5815 <dd class=
"description">Accept-Language field
</dd>
5816 <dt>HTTP_FIELD_ACCEPT_RANGES
</dt>
5817 <dd class=
"description">Accept-Ranges field
</dd>
5818 <dt>HTTP_FIELD_ALLOW
<span class=
"info"> CUPS
1.7/macOS
10.9 </span></dt>
5819 <dd class=
"description">Allow field
</dd>
5820 <dt>HTTP_FIELD_AUTHORIZATION
</dt>
5821 <dd class=
"description">Authorization field
</dd>
5822 <dt>HTTP_FIELD_CONNECTION
</dt>
5823 <dd class=
"description">Connection field
</dd>
5824 <dt>HTTP_FIELD_CONTENT_ENCODING
</dt>
5825 <dd class=
"description">Content-Encoding field
</dd>
5826 <dt>HTTP_FIELD_CONTENT_LANGUAGE
</dt>
5827 <dd class=
"description">Content-Language field
</dd>
5828 <dt>HTTP_FIELD_CONTENT_LENGTH
</dt>
5829 <dd class=
"description">Content-Length field
</dd>
5830 <dt>HTTP_FIELD_CONTENT_LOCATION
</dt>
5831 <dd class=
"description">Content-Location field
</dd>
5832 <dt>HTTP_FIELD_CONTENT_MD5
</dt>
5833 <dd class=
"description">Content-MD5 field
</dd>
5834 <dt>HTTP_FIELD_CONTENT_RANGE
</dt>
5835 <dd class=
"description">Content-Range field
</dd>
5836 <dt>HTTP_FIELD_CONTENT_TYPE
</dt>
5837 <dd class=
"description">Content-Type field
</dd>
5838 <dt>HTTP_FIELD_CONTENT_VERSION
</dt>
5839 <dd class=
"description">Content-Version field
</dd>
5840 <dt>HTTP_FIELD_DATE
</dt>
5841 <dd class=
"description">Date field
</dd>
5842 <dt>HTTP_FIELD_HOST
</dt>
5843 <dd class=
"description">Host field
</dd>
5844 <dt>HTTP_FIELD_IF_MODIFIED_SINCE
</dt>
5845 <dd class=
"description">If-Modified-Since field
</dd>
5846 <dt>HTTP_FIELD_IF_UNMODIFIED_SINCE
</dt>
5847 <dd class=
"description">If-Unmodified-Since field
</dd>
5848 <dt>HTTP_FIELD_KEEP_ALIVE
</dt>
5849 <dd class=
"description">Keep-Alive field
</dd>
5850 <dt>HTTP_FIELD_LAST_MODIFIED
</dt>
5851 <dd class=
"description">Last-Modified field
</dd>
5852 <dt>HTTP_FIELD_LINK
</dt>
5853 <dd class=
"description">Link field
</dd>
5854 <dt>HTTP_FIELD_LOCATION
</dt>
5855 <dd class=
"description">Location field
</dd>
5856 <dt>HTTP_FIELD_MAX
</dt>
5857 <dd class=
"description">Maximum field index
</dd>
5858 <dt>HTTP_FIELD_RANGE
</dt>
5859 <dd class=
"description">Range field
</dd>
5860 <dt>HTTP_FIELD_REFERER
</dt>
5861 <dd class=
"description">Referer field
</dd>
5862 <dt>HTTP_FIELD_RETRY_AFTER
</dt>
5863 <dd class=
"description">Retry-After field
</dd>
5864 <dt>HTTP_FIELD_SERVER
<span class=
"info"> CUPS
1.7/macOS
10.9 </span></dt>
5865 <dd class=
"description">Server field
</dd>
5866 <dt>HTTP_FIELD_TRANSFER_ENCODING
</dt>
5867 <dd class=
"description">Transfer-Encoding field
</dd>
5868 <dt>HTTP_FIELD_UNKNOWN
</dt>
5869 <dd class=
"description">Unknown field
</dd>
5870 <dt>HTTP_FIELD_UPGRADE
</dt>
5871 <dd class=
"description">Upgrade field
</dd>
5872 <dt>HTTP_FIELD_USER_AGENT
</dt>
5873 <dd class=
"description">User-Agent field
</dd>
5874 <dt>HTTP_FIELD_WWW_AUTHENTICATE
</dt>
5875 <dd class=
"description">WWW-Authenticate field
</dd>
5877 <h3 class=
"enumeration"><a name=
"http_keepalive_e">http_keepalive_e
</a></h3>
5878 <p class=
"description">HTTP keep-alive values
</p>
5879 <h4 class=
"constants">Constants
</h4>
5881 <dt>HTTP_KEEPALIVE_OFF
</dt>
5882 <dd class=
"description">No keep alive support
</dd>
5883 <dt>HTTP_KEEPALIVE_ON
</dt>
5884 <dd class=
"description">Use keep alive
</dd>
5886 <h3 class=
"enumeration"><a name=
"http_state_e">http_state_e
</a></h3>
5887 <p class=
"description">HTTP state values; states
5888 are server-oriented...
</p>
5889 <h4 class=
"constants">Constants
</h4>
5891 <dt>HTTP_STATE_CONNECT
</dt>
5892 <dd class=
"description">CONNECT command, waiting for blank line
</dd>
5893 <dt>HTTP_STATE_DELETE
</dt>
5894 <dd class=
"description">DELETE command, waiting for blank line
</dd>
5895 <dt>HTTP_STATE_ERROR
</dt>
5896 <dd class=
"description">Error on socket
</dd>
5897 <dt>HTTP_STATE_GET
</dt>
5898 <dd class=
"description">GET command, waiting for blank line
</dd>
5899 <dt>HTTP_STATE_GET_SEND
</dt>
5900 <dd class=
"description">GET command, sending data
</dd>
5901 <dt>HTTP_STATE_HEAD
</dt>
5902 <dd class=
"description">HEAD command, waiting for blank line
</dd>
5903 <dt>HTTP_STATE_OPTIONS
</dt>
5904 <dd class=
"description">OPTIONS command, waiting for blank line
</dd>
5905 <dt>HTTP_STATE_POST
</dt>
5906 <dd class=
"description">POST command, waiting for blank line
</dd>
5907 <dt>HTTP_STATE_POST_RECV
</dt>
5908 <dd class=
"description">POST command, receiving data
</dd>
5909 <dt>HTTP_STATE_POST_SEND
</dt>
5910 <dd class=
"description">POST command, sending data
</dd>
5911 <dt>HTTP_STATE_PUT
</dt>
5912 <dd class=
"description">PUT command, waiting for blank line
</dd>
5913 <dt>HTTP_STATE_PUT_RECV
</dt>
5914 <dd class=
"description">PUT command, receiving data
</dd>
5915 <dt>HTTP_STATE_STATUS
</dt>
5916 <dd class=
"description">Command complete, sending status
</dd>
5917 <dt>HTTP_STATE_TRACE
</dt>
5918 <dd class=
"description">TRACE command, waiting for blank line
</dd>
5919 <dt>HTTP_STATE_UNKNOWN_METHOD
<span class=
"info"> CUPS
1.7/macOS
10.9 </span></dt>
5920 <dd class=
"description">Unknown request method, waiting for blank line
</dd>
5921 <dt>HTTP_STATE_UNKNOWN_VERSION
<span class=
"info"> CUPS
1.7/macOS
10.9 </span></dt>
5922 <dd class=
"description">Unknown request method, waiting for blank line
</dd>
5923 <dt>HTTP_STATE_WAITING
</dt>
5924 <dd class=
"description">Waiting for command
</dd>
5926 <h3 class=
"enumeration"><a name=
"http_status_e">http_status_e
</a></h3>
5927 <p class=
"description">HTTP status codes
</p>
5928 <h4 class=
"constants">Constants
</h4>
5930 <dt>HTTP_STATUS_ACCEPTED
</dt>
5931 <dd class=
"description">DELETE command was successful
</dd>
5932 <dt>HTTP_STATUS_BAD_GATEWAY
</dt>
5933 <dd class=
"description">Bad gateway
</dd>
5934 <dt>HTTP_STATUS_BAD_REQUEST
</dt>
5935 <dd class=
"description">Bad request
</dd>
5936 <dt>HTTP_STATUS_CONFLICT
</dt>
5937 <dd class=
"description">Request is self-conflicting
</dd>
5938 <dt>HTTP_STATUS_CONTINUE
</dt>
5939 <dd class=
"description">Everything OK, keep going...
</dd>
5940 <dt>HTTP_STATUS_CREATED
</dt>
5941 <dd class=
"description">PUT command was successful
</dd>
5942 <dt>HTTP_STATUS_CUPS_AUTHORIZATION_CANCELED
<span class=
"info"> CUPS
1.4 </span></dt>
5943 <dd class=
"description">User canceled authorization
</dd>
5944 <dt>HTTP_STATUS_CUPS_PKI_ERROR
<span class=
"info"> CUPS
1.5/macOS
10.7 </span></dt>
5945 <dd class=
"description">Error negotiating a secure connection
</dd>
5946 <dt>HTTP_STATUS_ERROR
</dt>
5947 <dd class=
"description">An error response from httpXxxx()
</dd>
5948 <dt>HTTP_STATUS_EXPECTATION_FAILED
</dt>
5949 <dd class=
"description">The expectation given in an Expect header field was not met
</dd>
5950 <dt>HTTP_STATUS_FORBIDDEN
</dt>
5951 <dd class=
"description">Forbidden to access this URI
</dd>
5952 <dt>HTTP_STATUS_GATEWAY_TIMEOUT
</dt>
5953 <dd class=
"description">Gateway connection timed out
</dd>
5954 <dt>HTTP_STATUS_GONE
</dt>
5955 <dd class=
"description">Server has gone away
</dd>
5956 <dt>HTTP_STATUS_LENGTH_REQUIRED
</dt>
5957 <dd class=
"description">A content length or encoding is required
</dd>
5958 <dt>HTTP_STATUS_METHOD_NOT_ALLOWED
</dt>
5959 <dd class=
"description">Method is not allowed
</dd>
5960 <dt>HTTP_STATUS_MOVED_PERMANENTLY
</dt>
5961 <dd class=
"description">Document has moved permanently
</dd>
5962 <dt>HTTP_STATUS_MOVED_TEMPORARILY
</dt>
5963 <dd class=
"description">Document has moved temporarily
</dd>
5964 <dt>HTTP_STATUS_MULTIPLE_CHOICES
</dt>
5965 <dd class=
"description">Multiple files match request
</dd>
5966 <dt>HTTP_STATUS_NONE
<span class=
"info"> CUPS
1.7/macOS
10.9 </span></dt>
5967 <dd class=
"description">No Expect value
</dd>
5968 <dt>HTTP_STATUS_NOT_ACCEPTABLE
</dt>
5969 <dd class=
"description">Not Acceptable
</dd>
5970 <dt>HTTP_STATUS_NOT_AUTHORITATIVE
</dt>
5971 <dd class=
"description">Information isn't authoritative
</dd>
5972 <dt>HTTP_STATUS_NOT_FOUND
</dt>
5973 <dd class=
"description">URI was not found
</dd>
5974 <dt>HTTP_STATUS_NOT_IMPLEMENTED
</dt>
5975 <dd class=
"description">Feature not implemented
</dd>
5976 <dt>HTTP_STATUS_NOT_MODIFIED
</dt>
5977 <dd class=
"description">File not modified
</dd>
5978 <dt>HTTP_STATUS_NOT_SUPPORTED
</dt>
5979 <dd class=
"description">HTTP version not supported
</dd>
5980 <dt>HTTP_STATUS_NO_CONTENT
</dt>
5981 <dd class=
"description">Successful command, no new data
</dd>
5982 <dt>HTTP_STATUS_OK
</dt>
5983 <dd class=
"description">OPTIONS/GET/HEAD/POST/TRACE command was successful
</dd>
5984 <dt>HTTP_STATUS_PARTIAL_CONTENT
</dt>
5985 <dd class=
"description">Only a partial file was received/sent
</dd>
5986 <dt>HTTP_STATUS_PAYMENT_REQUIRED
</dt>
5987 <dd class=
"description">Payment required
</dd>
5988 <dt>HTTP_STATUS_PRECONDITION
</dt>
5989 <dd class=
"description">Precondition failed
</dd>
5990 <dt>HTTP_STATUS_PROXY_AUTHENTICATION
</dt>
5991 <dd class=
"description">Proxy Authentication is Required
</dd>
5992 <dt>HTTP_STATUS_REQUESTED_RANGE
</dt>
5993 <dd class=
"description">The requested range is not satisfiable
</dd>
5994 <dt>HTTP_STATUS_REQUEST_TIMEOUT
</dt>
5995 <dd class=
"description">Request timed out
</dd>
5996 <dt>HTTP_STATUS_REQUEST_TOO_LARGE
</dt>
5997 <dd class=
"description">Request entity too large
</dd>
5998 <dt>HTTP_STATUS_RESET_CONTENT
</dt>
5999 <dd class=
"description">Content was reset/recreated
</dd>
6000 <dt>HTTP_STATUS_SEE_OTHER
</dt>
6001 <dd class=
"description">See this other link...
</dd>
6002 <dt>HTTP_STATUS_SERVER_ERROR
</dt>
6003 <dd class=
"description">Internal server error
</dd>
6004 <dt>HTTP_STATUS_SERVICE_UNAVAILABLE
</dt>
6005 <dd class=
"description">Service is unavailable
</dd>
6006 <dt>HTTP_STATUS_SWITCHING_PROTOCOLS
</dt>
6007 <dd class=
"description">HTTP upgrade to TLS/SSL
</dd>
6008 <dt>HTTP_STATUS_UNAUTHORIZED
</dt>
6009 <dd class=
"description">Unauthorized to access host
</dd>
6010 <dt>HTTP_STATUS_UNSUPPORTED_MEDIATYPE
</dt>
6011 <dd class=
"description">The requested media type is unsupported
</dd>
6012 <dt>HTTP_STATUS_UPGRADE_REQUIRED
</dt>
6013 <dd class=
"description">Upgrade to SSL/TLS required
</dd>
6014 <dt>HTTP_STATUS_URI_TOO_LONG
</dt>
6015 <dd class=
"description">URI too long
</dd>
6016 <dt>HTTP_STATUS_USE_PROXY
</dt>
6017 <dd class=
"description">Must use a proxy to access this URI
</dd>
6019 <h3 class=
"enumeration"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"http_trust_e">http_trust_e
</a></h3>
6020 <p class=
"description">Level of trust for credentials
</p>
6021 <h4 class=
"constants">Constants
</h4>
6023 <dt>HTTP_TRUST_CHANGED
</dt>
6024 <dd class=
"description">Credentials have changed
</dd>
6025 <dt>HTTP_TRUST_EXPIRED
</dt>
6026 <dd class=
"description">Credentials are expired
</dd>
6027 <dt>HTTP_TRUST_INVALID
</dt>
6028 <dd class=
"description">Credentials are invalid
</dd>
6029 <dt>HTTP_TRUST_OK
</dt>
6030 <dd class=
"description">Credentials are OK/trusted
</dd>
6031 <dt>HTTP_TRUST_RENEWED
</dt>
6032 <dd class=
"description">Credentials have been renewed
</dd>
6033 <dt>HTTP_TRUST_UNKNOWN
</dt>
6034 <dd class=
"description">Credentials are unknown/new
</dd>
6036 <h3 class=
"enumeration"><a name=
"http_uri_coding_e">http_uri_coding_e
</a></h3>
6037 <p class=
"description">URI en/decode flags
</p>
6038 <h4 class=
"constants">Constants
</h4>
6040 <dt>HTTP_URI_CODING_ALL
</dt>
6041 <dd class=
"description">En/decode everything
</dd>
6042 <dt>HTTP_URI_CODING_HOSTNAME
</dt>
6043 <dd class=
"description">En/decode the hostname portion
</dd>
6044 <dt>HTTP_URI_CODING_MOST
</dt>
6045 <dd class=
"description">En/decode all but the query
</dd>
6046 <dt>HTTP_URI_CODING_NONE
</dt>
6047 <dd class=
"description">Don't en/decode anything
</dd>
6048 <dt>HTTP_URI_CODING_QUERY
</dt>
6049 <dd class=
"description">En/decode the query portion
</dd>
6050 <dt>HTTP_URI_CODING_RESOURCE
</dt>
6051 <dd class=
"description">En/decode the resource portion
</dd>
6052 <dt>HTTP_URI_CODING_RFC6874
</dt>
6053 <dd class=
"description">Use RFC
6874 address format
</dd>
6054 <dt>HTTP_URI_CODING_USERNAME
</dt>
6055 <dd class=
"description">En/decode the username portion
</dd>
6057 <h3 class=
"enumeration"><span class=
"info"> CUPS
1.2 </span><a name=
"http_uri_status_e">http_uri_status_e
</a></h3>
6058 <p class=
"description">URI separation status
</p>
6059 <h4 class=
"constants">Constants
</h4>
6061 <dt>HTTP_URI_STATUS_BAD_ARGUMENTS
</dt>
6062 <dd class=
"description">Bad arguments to function (error)
</dd>
6063 <dt>HTTP_URI_STATUS_BAD_HOSTNAME
</dt>
6064 <dd class=
"description">Bad hostname in URI (error)
</dd>
6065 <dt>HTTP_URI_STATUS_BAD_PORT
</dt>
6066 <dd class=
"description">Bad port number in URI (error)
</dd>
6067 <dt>HTTP_URI_STATUS_BAD_RESOURCE
</dt>
6068 <dd class=
"description">Bad resource in URI (error)
</dd>
6069 <dt>HTTP_URI_STATUS_BAD_SCHEME
</dt>
6070 <dd class=
"description">Bad scheme in URI (error)
</dd>
6071 <dt>HTTP_URI_STATUS_BAD_URI
</dt>
6072 <dd class=
"description">Bad/empty URI (error)
</dd>
6073 <dt>HTTP_URI_STATUS_BAD_USERNAME
</dt>
6074 <dd class=
"description">Bad username in URI (error)
</dd>
6075 <dt>HTTP_URI_STATUS_MISSING_RESOURCE
</dt>
6076 <dd class=
"description">Missing resource in URI (warning)
</dd>
6077 <dt>HTTP_URI_STATUS_MISSING_SCHEME
</dt>
6078 <dd class=
"description">Missing scheme in URI (warning)
</dd>
6079 <dt>HTTP_URI_STATUS_OK
</dt>
6080 <dd class=
"description">URI decoded OK
</dd>
6081 <dt>HTTP_URI_STATUS_OVERFLOW
</dt>
6082 <dd class=
"description">URI buffer for httpAssembleURI is too small
</dd>
6083 <dt>HTTP_URI_STATUS_UNKNOWN_SCHEME
</dt>
6084 <dd class=
"description">Unknown scheme in URI (warning)
</dd>
6086 <h3 class=
"enumeration"><a name=
"http_version_e">http_version_e
</a></h3>
6087 <p class=
"description">HTTP version numbers
</p>
6088 <h4 class=
"constants">Constants
</h4>
6090 <dt>HTTP_VERSION_0_9
</dt>
6091 <dd class=
"description">HTTP/
0.9</dd>
6092 <dt>HTTP_VERSION_1_0
</dt>
6093 <dd class=
"description">HTTP/
1.0</dd>
6094 <dt>HTTP_VERSION_1_1
</dt>
6095 <dd class=
"description">HTTP/
1.1</dd>
6097 <h3 class=
"enumeration"><a name=
"ipp_dstate_e">ipp_dstate_e
</a></h3>
6098 <p class=
"description">Document states
</p>
6099 <h4 class=
"constants">Constants
</h4>
6101 <dt>IPP_DOCUMENT_ABORTED
</dt>
6102 <dd class=
"description">Document is aborted
</dd>
6103 <dt>IPP_DOCUMENT_CANCELED
</dt>
6104 <dd class=
"description">Document is canceled
</dd>
6105 <dt>IPP_DOCUMENT_COMPLETED
</dt>
6106 <dd class=
"description">Document is completed
</dd>
6107 <dt>IPP_DOCUMENT_PENDING
</dt>
6108 <dd class=
"description">Document is pending
</dd>
6109 <dt>IPP_DOCUMENT_PROCESSING
</dt>
6110 <dd class=
"description">Document is processing
</dd>
6112 <h3 class=
"enumeration"><a name=
"ipp_finishings_e">ipp_finishings_e
</a></h3>
6113 <p class=
"description">Finishings
</p>
6114 <h4 class=
"constants">Constants
</h4>
6116 <dt>IPP_FINISHINGS_BALE
</dt>
6117 <dd class=
"description">Bale (any type)
</dd>
6118 <dt>IPP_FINISHINGS_BIND
</dt>
6119 <dd class=
"description">Bind
</dd>
6120 <dt>IPP_FINISHINGS_BIND_BOTTOM
</dt>
6121 <dd class=
"description">Bind on bottom
</dd>
6122 <dt>IPP_FINISHINGS_BIND_LEFT
</dt>
6123 <dd class=
"description">Bind on left
</dd>
6124 <dt>IPP_FINISHINGS_BIND_RIGHT
</dt>
6125 <dd class=
"description">Bind on right
</dd>
6126 <dt>IPP_FINISHINGS_BIND_TOP
</dt>
6127 <dd class=
"description">Bind on top
</dd>
6128 <dt>IPP_FINISHINGS_BOOKLET_MAKER
</dt>
6129 <dd class=
"description">Fold to make booklet
</dd>
6130 <dt>IPP_FINISHINGS_COAT
</dt>
6131 <dd class=
"description">Apply protective liquid or powder coating
</dd>
6132 <dt>IPP_FINISHINGS_COVER
</dt>
6133 <dd class=
"description">Add cover
</dd>
6134 <dt>IPP_FINISHINGS_CUPS_FOLD_ACCORDIAN
</dt>
6135 <dd class=
"description">Accordian-fold the paper vertically into four sections
</dd>
6136 <dt>IPP_FINISHINGS_CUPS_FOLD_DOUBLE_GATE
</dt>
6137 <dd class=
"description">Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically
</dd>
6138 <dt>IPP_FINISHINGS_CUPS_FOLD_GATE
</dt>
6139 <dd class=
"description">Fold the top and bottom quarters of the paper towards the midline
</dd>
6140 <dt>IPP_FINISHINGS_CUPS_FOLD_HALF
</dt>
6141 <dd class=
"description">Fold the paper in half vertically
</dd>
6142 <dt>IPP_FINISHINGS_CUPS_FOLD_HALF_Z
</dt>
6143 <dd class=
"description">Fold the paper in half horizontally, then Z-fold the paper vertically
</dd>
6144 <dt>IPP_FINISHINGS_CUPS_FOLD_LEFT_GATE
</dt>
6145 <dd class=
"description">Fold the top quarter of the paper towards the midline
</dd>
6146 <dt>IPP_FINISHINGS_CUPS_FOLD_LETTER
</dt>
6147 <dd class=
"description">Fold the paper into three sections vertically; sometimes also known as a C fold
</dd>
6148 <dt>IPP_FINISHINGS_CUPS_FOLD_PARALLEL
</dt>
6149 <dd class=
"description">Fold the paper in half vertically two times, yielding four sections
</dd>
6150 <dt>IPP_FINISHINGS_CUPS_FOLD_POSTER
</dt>
6151 <dd class=
"description">Fold the paper in half horizontally and vertically; sometimes also called a cross fold
</dd>
6152 <dt>IPP_FINISHINGS_CUPS_FOLD_RIGHT_GATE
</dt>
6153 <dd class=
"description">Fold the bottom quarter of the paper towards the midline
</dd>
6154 <dt>IPP_FINISHINGS_CUPS_FOLD_Z
</dt>
6155 <dd class=
"description">Fold the paper vertically into three sections, forming a Z
</dd>
6156 <dt>IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_LEFT
</dt>
6157 <dd class=
"description">Punch
1 hole bottom left
</dd>
6158 <dt>IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_RIGHT
</dt>
6159 <dd class=
"description">Punch
1 hole bottom right
</dd>
6160 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_BOTTOM
</dt>
6161 <dd class=
"description">Punch
2 holes bottom edge
</dd>
6162 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_LEFT
</dt>
6163 <dd class=
"description">Punch
2 holes left side
</dd>
6164 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_RIGHT
</dt>
6165 <dd class=
"description">Punch
2 holes right side
</dd>
6166 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_TOP
</dt>
6167 <dd class=
"description">Punch
2 holes top edge
</dd>
6168 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_BOTTOM
</dt>
6169 <dd class=
"description">Punch
4 holes bottom edge
</dd>
6170 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_LEFT
</dt>
6171 <dd class=
"description">Punch
4 holes left side
</dd>
6172 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_RIGHT
</dt>
6173 <dd class=
"description">Punch
4 holes right side
</dd>
6174 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_TOP
</dt>
6175 <dd class=
"description">Punch
4 holes top edge
</dd>
6176 <dt>IPP_FINISHINGS_CUPS_PUNCH_TOP_LEFT
</dt>
6177 <dd class=
"description">Punch
1 hole top left
</dd>
6178 <dt>IPP_FINISHINGS_CUPS_PUNCH_TOP_RIGHT
</dt>
6179 <dd class=
"description">Punch
1 hole top right
</dd>
6180 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_BOTTOM
</dt>
6181 <dd class=
"description">Punch
3 holes bottom edge
</dd>
6182 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_LEFT
</dt>
6183 <dd class=
"description">Punch
3 holes left side
</dd>
6184 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_RIGHT
</dt>
6185 <dd class=
"description">Punch
3 holes right side
</dd>
6186 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_TOP
</dt>
6187 <dd class=
"description">Punch
3 holes top edge
</dd>
6188 <dt>IPP_FINISHINGS_EDGE_STITCH
</dt>
6189 <dd class=
"description">Stitch along any side
</dd>
6190 <dt>IPP_FINISHINGS_EDGE_STITCH_BOTTOM
</dt>
6191 <dd class=
"description">Stitch along bottom edge
</dd>
6192 <dt>IPP_FINISHINGS_EDGE_STITCH_LEFT
</dt>
6193 <dd class=
"description">Stitch along left side
</dd>
6194 <dt>IPP_FINISHINGS_EDGE_STITCH_RIGHT
</dt>
6195 <dd class=
"description">Stitch along right side
</dd>
6196 <dt>IPP_FINISHINGS_EDGE_STITCH_TOP
</dt>
6197 <dd class=
"description">Stitch along top edge
</dd>
6198 <dt>IPP_FINISHINGS_FOLD
</dt>
6199 <dd class=
"description">Fold (any type)
</dd>
6200 <dt>IPP_FINISHINGS_FOLD_ACCORDIAN
</dt>
6201 <dd class=
"description">Accordian-fold the paper vertically into four sections
</dd>
6202 <dt>IPP_FINISHINGS_FOLD_DOUBLE_GATE
</dt>
6203 <dd class=
"description">Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically
</dd>
6204 <dt>IPP_FINISHINGS_FOLD_GATE
</dt>
6205 <dd class=
"description">Fold the top and bottom quarters of the paper towards the midline
</dd>
6206 <dt>IPP_FINISHINGS_FOLD_HALF
</dt>
6207 <dd class=
"description">Fold the paper in half vertically
</dd>
6208 <dt>IPP_FINISHINGS_FOLD_HALF_Z
</dt>
6209 <dd class=
"description">Fold the paper in half horizontally, then Z-fold the paper vertically
</dd>
6210 <dt>IPP_FINISHINGS_FOLD_LEFT_GATE
</dt>
6211 <dd class=
"description">Fold the top quarter of the paper towards the midline
</dd>
6212 <dt>IPP_FINISHINGS_FOLD_LETTER
</dt>
6213 <dd class=
"description">Fold the paper into three sections vertically; sometimes also known as a C fold
</dd>
6214 <dt>IPP_FINISHINGS_FOLD_PARALLEL
</dt>
6215 <dd class=
"description">Fold the paper in half vertically two times, yielding four sections
</dd>
6216 <dt>IPP_FINISHINGS_FOLD_POSTER
</dt>
6217 <dd class=
"description">Fold the paper in half horizontally and vertically; sometimes also called a cross fold
</dd>
6218 <dt>IPP_FINISHINGS_FOLD_RIGHT_GATE
</dt>
6219 <dd class=
"description">Fold the bottom quarter of the paper towards the midline
</dd>
6220 <dt>IPP_FINISHINGS_FOLD_Z
</dt>
6221 <dd class=
"description">Fold the paper vertically into three sections, forming a Z
</dd>
6222 <dt>IPP_FINISHINGS_JOG_OFFSET
</dt>
6223 <dd class=
"description">Offset for binding (any type)
</dd>
6224 <dt>IPP_FINISHINGS_LAMINATE
</dt>
6225 <dd class=
"description">Apply protective (solid) material
</dd>
6226 <dt>IPP_FINISHINGS_NONE
</dt>
6227 <dd class=
"description">No finishing
</dd>
6228 <dt>IPP_FINISHINGS_PUNCH
</dt>
6229 <dd class=
"description">Punch (any location/count)
</dd>
6230 <dt>IPP_FINISHINGS_PUNCH_BOTTOM_LEFT
</dt>
6231 <dd class=
"description">Punch
1 hole bottom left
</dd>
6232 <dt>IPP_FINISHINGS_PUNCH_BOTTOM_RIGHT
</dt>
6233 <dd class=
"description">Punch
1 hole bottom right
</dd>
6234 <dt>IPP_FINISHINGS_PUNCH_DUAL_BOTTOM
</dt>
6235 <dd class=
"description">Punch
2 holes bottom edge
</dd>
6236 <dt>IPP_FINISHINGS_PUNCH_DUAL_LEFT
</dt>
6237 <dd class=
"description">Punch
2 holes left side
</dd>
6238 <dt>IPP_FINISHINGS_PUNCH_DUAL_RIGHT
</dt>
6239 <dd class=
"description">Punch
2 holes right side
</dd>
6240 <dt>IPP_FINISHINGS_PUNCH_DUAL_TOP
</dt>
6241 <dd class=
"description">Punch
2 holes top edge
</dd>
6242 <dt>IPP_FINISHINGS_PUNCH_QUAD_BOTTOM
</dt>
6243 <dd class=
"description">Punch
4 holes bottom edge
</dd>
6244 <dt>IPP_FINISHINGS_PUNCH_QUAD_LEFT
</dt>
6245 <dd class=
"description">Punch
4 holes left side
</dd>
6246 <dt>IPP_FINISHINGS_PUNCH_QUAD_RIGHT
</dt>
6247 <dd class=
"description">Punch
4 holes right side
</dd>
6248 <dt>IPP_FINISHINGS_PUNCH_QUAD_TOP
</dt>
6249 <dd class=
"description">Punch
4 holes top edge
</dd>
6250 <dt>IPP_FINISHINGS_PUNCH_TOP_LEFT
</dt>
6251 <dd class=
"description">Punch
1 hole top left
</dd>
6252 <dt>IPP_FINISHINGS_PUNCH_TOP_RIGHT
</dt>
6253 <dd class=
"description">Punch
1 hole top right
</dd>
6254 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_BOTTOM
</dt>
6255 <dd class=
"description">Punch
3 holes bottom edge
</dd>
6256 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_LEFT
</dt>
6257 <dd class=
"description">Punch
3 holes left side
</dd>
6258 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_RIGHT
</dt>
6259 <dd class=
"description">Punch
3 holes right side
</dd>
6260 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_TOP
</dt>
6261 <dd class=
"description">Punch
3 holes top edge
</dd>
6262 <dt>IPP_FINISHINGS_SADDLE_STITCH
</dt>
6263 <dd class=
"description">Staple interior
</dd>
6264 <dt>IPP_FINISHINGS_STAPLE
</dt>
6265 <dd class=
"description">Staple (any location)
</dd>
6266 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_LEFT
</dt>
6267 <dd class=
"description">Staple bottom left corner
</dd>
6268 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT
</dt>
6269 <dd class=
"description">Staple bottom right corner
</dd>
6270 <dt>IPP_FINISHINGS_STAPLE_DUAL_BOTTOM
</dt>
6271 <dd class=
"description">Two staples on bottom
</dd>
6272 <dt>IPP_FINISHINGS_STAPLE_DUAL_LEFT
</dt>
6273 <dd class=
"description">Two staples on left
</dd>
6274 <dt>IPP_FINISHINGS_STAPLE_DUAL_RIGHT
</dt>
6275 <dd class=
"description">Two staples on right
</dd>
6276 <dt>IPP_FINISHINGS_STAPLE_DUAL_TOP
</dt>
6277 <dd class=
"description">Two staples on top
</dd>
6278 <dt>IPP_FINISHINGS_STAPLE_TOP_LEFT
</dt>
6279 <dd class=
"description">Staple top left corner
</dd>
6280 <dt>IPP_FINISHINGS_STAPLE_TOP_RIGHT
</dt>
6281 <dd class=
"description">Staple top right corner
</dd>
6282 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_BOTTOM
</dt>
6283 <dd class=
"description">Three staples on bottom
</dd>
6284 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_LEFT
</dt>
6285 <dd class=
"description">Three staples on left
</dd>
6286 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_RIGHT
</dt>
6287 <dd class=
"description">Three staples on right
</dd>
6288 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_TOP
</dt>
6289 <dd class=
"description">Three staples on top
</dd>
6290 <dt>IPP_FINISHINGS_TRIM
</dt>
6291 <dd class=
"description">Trim (any type)
</dd>
6292 <dt>IPP_FINISHINGS_TRIM_AFTER_COPIES
</dt>
6293 <dd class=
"description">Trim output after each copy
</dd>
6294 <dt>IPP_FINISHINGS_TRIM_AFTER_DOCUMENTS
</dt>
6295 <dd class=
"description">Trim output after each document
</dd>
6296 <dt>IPP_FINISHINGS_TRIM_AFTER_JOB
</dt>
6297 <dd class=
"description">Trim output after job
</dd>
6298 <dt>IPP_FINISHINGS_TRIM_AFTER_PAGES
</dt>
6299 <dd class=
"description">Trim output after each page
</dd>
6301 <h3 class=
"enumeration"><a name=
"ipp_jcollate_e">ipp_jcollate_e
</a></h3>
6302 <p class=
"description">Job collation types
</p>
6303 <h4 class=
"constants">Constants
</h4>
6305 <dt>IPP_JCOLLATE_COLLATED_DOCUMENTS
</dt>
6306 <dt>IPP_JCOLLATE_UNCOLLATED_DOCUMENTS
</dt>
6307 <dt>IPP_JCOLLATE_UNCOLLATED_SHEETS
</dt>
6309 <h3 class=
"enumeration"><a name=
"ipp_jstate_e">ipp_jstate_e
</a></h3>
6310 <p class=
"description">Job states
</p>
6311 <h4 class=
"constants">Constants
</h4>
6313 <dt>IPP_JSTATE_ABORTED
</dt>
6314 <dd class=
"description">Job has aborted due to error
</dd>
6315 <dt>IPP_JSTATE_CANCELED
</dt>
6316 <dd class=
"description">Job has been canceled
</dd>
6317 <dt>IPP_JSTATE_COMPLETED
</dt>
6318 <dd class=
"description">Job has completed successfully
</dd>
6319 <dt>IPP_JSTATE_HELD
</dt>
6320 <dd class=
"description">Job is held for printing
</dd>
6321 <dt>IPP_JSTATE_PENDING
</dt>
6322 <dd class=
"description">Job is waiting to be printed
</dd>
6323 <dt>IPP_JSTATE_PROCESSING
</dt>
6324 <dd class=
"description">Job is currently printing
</dd>
6325 <dt>IPP_JSTATE_STOPPED
</dt>
6326 <dd class=
"description">Job has been stopped
</dd>
6328 <h3 class=
"enumeration"><a name=
"ipp_op_e">ipp_op_e
</a></h3>
6329 <p class=
"description">IPP operations
</p>
6330 <h4 class=
"constants">Constants
</h4>
6332 <dt>IPP_OP_ACKNOWLEDGE_DOCUMENT
</dt>
6333 <dd class=
"description">Acknowledge-Document
</dd>
6334 <dt>IPP_OP_ACKNOWLEDGE_IDENTIFY_PRINTER
</dt>
6335 <dd class=
"description">Acknowledge-Identify-Printer
</dd>
6336 <dt>IPP_OP_ACKNOWLEDGE_JOB
</dt>
6337 <dd class=
"description">Acknowledge-Job
</dd>
6338 <dt>IPP_OP_ACTIVATE_PRINTER
</dt>
6339 <dd class=
"description">Start a printer
</dd>
6340 <dt>IPP_OP_CANCEL_CURRENT_JOB
</dt>
6341 <dd class=
"description">Cancel the current job
</dd>
6342 <dt>IPP_OP_CANCEL_DOCUMENT
</dt>
6343 <dd class=
"description">Cancel-Document
</dd>
6344 <dt>IPP_OP_CANCEL_JOB
</dt>
6345 <dd class=
"description">Cancel a job
</dd>
6346 <dt>IPP_OP_CANCEL_JOBS
</dt>
6347 <dd class=
"description">Cancel-Jobs
</dd>
6348 <dt>IPP_OP_CANCEL_MY_JOBS
</dt>
6349 <dd class=
"description">Cancel-My-Jobs
</dd>
6350 <dt>IPP_OP_CANCEL_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
6351 <dd class=
"description">Cancel a subscription
</dd>
6352 <dt>IPP_OP_CLOSE_JOB
</dt>
6353 <dd class=
"description">Close-Job
</dd>
6354 <dt>IPP_OP_CREATE_JOB
</dt>
6355 <dd class=
"description">Create an empty print job
</dd>
6356 <dt>IPP_OP_CREATE_JOB_SUBSCRIPTIONS
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
6357 <dd class=
"description">Create one of more job subscriptions
</dd>
6358 <dt>IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
6359 <dd class=
"description">Create one or more printer subscriptions
</dd>
6360 <dt>IPP_OP_CUPS_ACCEPT_JOBS
</dt>
6361 <dd class=
"description">Accept new jobs on a printer
</dd>
6362 <dt>IPP_OP_CUPS_ADD_MODIFY_CLASS
</dt>
6363 <dd class=
"description">Add or modify a class
</dd>
6364 <dt>IPP_OP_CUPS_ADD_MODIFY_PRINTER
</dt>
6365 <dd class=
"description">Add or modify a printer
</dd>
6366 <dt>IPP_OP_CUPS_AUTHENTICATE_JOB
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
6367 <dd class=
"description">Authenticate a job
</dd>
6368 <dt>IPP_OP_CUPS_CREATE_LOCAL_PRINTER
<span class=
"info"> CUPS
2.2 </span></dt>
6369 <dd class=
"description">Create a local (temporary) printer
<dt>IPP_OP_CUPS_DELETE_CLASS
</dt>
6370 <dd class=
"description">Delete a class
</dd>
6371 <dt>IPP_OP_CUPS_DELETE_PRINTER
</dt>
6372 <dd class=
"description">Delete a printer
</dd>
6373 <dt>IPP_OP_CUPS_GET_CLASSES
<span class=
"info"> DEPRECATED
</span></dt>
6374 <dd class=
"description">Get a list of classes
</dd>
6375 <dt>IPP_OP_CUPS_GET_DEFAULT
</dt>
6376 <dd class=
"description">Get the default printer
</dd>
6377 <dt>IPP_OP_CUPS_GET_DEVICES
<span class=
"info"> DEPRECATED
</span></dt>
6378 <dd class=
"description">Get a list of supported devices
</dd>
6379 <dt>IPP_OP_CUPS_GET_DOCUMENT
<span class=
"info"> CUPS
1.4/macOS
10.6 </span></dt>
6380 <dd class=
"description">Get a document file
</dd>
6381 <dt>IPP_OP_CUPS_GET_PPD
<span class=
"info"> DEPRECATED
</span></dt>
6382 <dd class=
"description">Get a PPD file
</dd>
6383 <dt>IPP_OP_CUPS_GET_PPDS
<span class=
"info"> DEPRECATED
</span></dt>
6384 <dd class=
"description">Get a list of supported drivers
</dd>
6385 <dt>IPP_OP_CUPS_GET_PRINTERS
</dt>
6386 <dd class=
"description">Get a list of printers and/or classes
</dd>
6387 <dt>IPP_OP_CUPS_INVALID
</dt>
6388 <dd class=
"description">Invalid operation name for
<a href=
"#ippOpValue"><code>ippOpValue
</code></a></dd>
6389 <dt>IPP_OP_CUPS_MOVE_JOB
</dt>
6390 <dd class=
"description">Move a job to a different printer
</dd>
6391 <dt>IPP_OP_CUPS_REJECT_JOBS
</dt>
6392 <dd class=
"description">Reject new jobs on a printer
</dd>
6393 <dt>IPP_OP_CUPS_SET_DEFAULT
</dt>
6394 <dd class=
"description">Set the default printer
</dd>
6395 <dt>IPP_OP_DEACTIVATE_PRINTER
</dt>
6396 <dd class=
"description">Stop a printer
</dd>
6397 <dt>IPP_OP_DELETE_DOCUMENT
</dt>
6398 <dd class=
"description">Delete-Document
</dd>
6399 <dt>IPP_OP_DEREGISTER_OUTPUT_DEVICE
</dt>
6400 <dd class=
"description">Deregister-Output-Device
</dd>
6401 <dt>IPP_OP_DISABLE_PRINTER
</dt>
6402 <dd class=
"description">Stop a printer
</dd>
6403 <dt>IPP_OP_ENABLE_PRINTER
</dt>
6404 <dd class=
"description">Start a printer
</dd>
6405 <dt>IPP_OP_FETCH_DOCUMENT
</dt>
6406 <dd class=
"description">Fetch-Document
</dd>
6407 <dt>IPP_OP_FETCH_JOB
</dt>
6408 <dd class=
"description">Fetch-Job
</dd>
6409 <dt>IPP_OP_GET_DOCUMENTS
</dt>
6410 <dd class=
"description">Get-Documents
</dd>
6411 <dt>IPP_OP_GET_DOCUMENT_ATTRIBUTES
</dt>
6412 <dd class=
"description">Get-Document-Attributes
</dd>
6413 <dt>IPP_OP_GET_JOBS
</dt>
6414 <dd class=
"description">Get a list of jobs
</dd>
6415 <dt>IPP_OP_GET_JOB_ATTRIBUTES
</dt>
6416 <dd class=
"description">Get job attributes
</dd>
6417 <dt>IPP_OP_GET_NEXT_DOCUMENT_DATA
</dt>
6418 <dd class=
"description">Get-Next-Document-Data
</dd>
6419 <dt>IPP_OP_GET_NOTIFICATIONS
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
6420 <dd class=
"description">Get notification events
</dd>
6421 <dt>IPP_OP_GET_OUTPUT_DEVICE_ATTRIBUTES
</dt>
6422 <dd class=
"description">Get-Output-Device-Attributes
</dd>
6423 <dt>IPP_OP_GET_PRINTER_ATTRIBUTES
</dt>
6424 <dd class=
"description">Get printer attributes
</dd>
6425 <dt>IPP_OP_GET_PRINTER_SUPPORTED_VALUES
</dt>
6426 <dd class=
"description">Get supported attribute values
</dd>
6427 <dt>IPP_OP_GET_SUBSCRIPTIONS
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
6428 <dd class=
"description">Get list of subscriptions
</dd>
6429 <dt>IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
6430 <dd class=
"description">Get subscription attributes
</dd>
6431 <dt>IPP_OP_HOLD_JOB
</dt>
6432 <dd class=
"description">Hold a job for printing
</dd>
6433 <dt>IPP_OP_HOLD_NEW_JOBS
</dt>
6434 <dd class=
"description">Hold new jobs
</dd>
6435 <dt>IPP_OP_IDENTIFY_PRINTER
</dt>
6436 <dd class=
"description">Identify-Printer
</dd>
6437 <dt>IPP_OP_PAUSE_PRINTER
</dt>
6438 <dd class=
"description">Stop a printer
</dd>
6439 <dt>IPP_OP_PAUSE_PRINTER_AFTER_CURRENT_JOB
</dt>
6440 <dd class=
"description">Stop printer after the current job
</dd>
6441 <dt>IPP_OP_PRINT_JOB
</dt>
6442 <dd class=
"description">Print a single file
</dd>
6443 <dt>IPP_OP_PRINT_URI
</dt>
6444 <dd class=
"description">Print a single URL
</dd>
6445 <dt>IPP_OP_PROMOTE_JOB
</dt>
6446 <dd class=
"description">Promote a job to print sooner
</dd>
6447 <dt>IPP_OP_PURGE_JOBS
</dt>
6448 <dd class=
"description">Cancel all jobs
</dd>
6449 <dt>IPP_OP_RELEASE_HELD_NEW_JOBS
</dt>
6450 <dd class=
"description">Release new jobs
</dd>
6451 <dt>IPP_OP_RELEASE_JOB
</dt>
6452 <dd class=
"description">Release a job for printing
</dd>
6453 <dt>IPP_OP_RENEW_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/macOS
10.5 </span></dt>
6454 <dd class=
"description">Renew a printer subscription
</dd>
6455 <dt>IPP_OP_REPROCESS_JOB
</dt>
6456 <dd class=
"description">Reprint a job
</dd>
6457 <dt>IPP_OP_RESTART_JOB
</dt>
6458 <dd class=
"description">Reprint a job
</dd>
6459 <dt>IPP_OP_RESTART_PRINTER
</dt>
6460 <dd class=
"description">Restart a printer
</dd>
6461 <dt>IPP_OP_RESUBMIT_JOB
</dt>
6462 <dd class=
"description">Resubmit-Job
</dd>
6463 <dt>IPP_OP_RESUME_JOB
</dt>
6464 <dd class=
"description">Resume the current job
</dd>
6465 <dt>IPP_OP_RESUME_PRINTER
</dt>
6466 <dd class=
"description">Start a printer
</dd>
6467 <dt>IPP_OP_SCHEDULE_JOB_AFTER
</dt>
6468 <dd class=
"description">Schedule a job to print after another
</dd>
6469 <dt>IPP_OP_SEND_DOCUMENT
</dt>
6470 <dd class=
"description">Add a file to a job
</dd>
6471 <dt>IPP_OP_SEND_HARDCOPY_DOCUMENT
</dt>
6472 <dd class=
"description">Send-Hardcopy-Document
</dd>
6473 <dt>IPP_OP_SEND_URI
</dt>
6474 <dd class=
"description">Add a URL to a job
</dd>
6475 <dt>IPP_OP_SET_DOCUMENT_ATTRIBUTES
</dt>
6476 <dd class=
"description">Set-Document-Attributes
</dd>
6477 <dt>IPP_OP_SET_JOB_ATTRIBUTES
</dt>
6478 <dd class=
"description">Set job attributes
</dd>
6479 <dt>IPP_OP_SET_PRINTER_ATTRIBUTES
</dt>
6480 <dd class=
"description">Set printer attributes
</dd>
6481 <dt>IPP_OP_SHUTDOWN_PRINTER
</dt>
6482 <dd class=
"description">Turn a printer off
</dd>
6483 <dt>IPP_OP_STARTUP_PRINTER
</dt>
6484 <dd class=
"description">Turn a printer on
</dd>
6485 <dt>IPP_OP_SUSPEND_CURRENT_JOB
</dt>
6486 <dd class=
"description">Suspend the current job
</dd>
6487 <dt>IPP_OP_UPDATE_ACTIVE_JOBS
</dt>
6488 <dd class=
"description">Update-Active-Jobs
</dd>
6489 <dt>IPP_OP_UPDATE_DOCUMENT_STATUS
</dt>
6490 <dd class=
"description">Update-Document-Status
</dd>
6491 <dt>IPP_OP_UPDATE_JOB_STATUS
</dt>
6492 <dd class=
"description">Update-Job-Status
</dd>
6493 <dt>IPP_OP_UPDATE_OUTPUT_DEVICE_ATTRIBUTES
</dt>
6494 <dd class=
"description">Update-Output-Device-Attributes
</dd>
6495 <dt>IPP_OP_VALIDATE_DOCUMENT
</dt>
6496 <dd class=
"description">Validate-Document
</dd>
6497 <dt>IPP_OP_VALIDATE_JOB
</dt>
6498 <dd class=
"description">Validate job options
</dd>
6500 <h3 class=
"enumeration"><a name=
"ipp_orient_e">ipp_orient_e
</a></h3>
6501 <p class=
"description">Orientation values
</p>
6502 <h4 class=
"constants">Constants
</h4>
6504 <dt>IPP_ORIENT_LANDSCAPE
</dt>
6505 <dd class=
"description">90 degrees counter-clockwise
</dd>
6506 <dt>IPP_ORIENT_NONE
</dt>
6507 <dd class=
"description">No rotation
</dd>
6508 <dt>IPP_ORIENT_PORTRAIT
</dt>
6509 <dd class=
"description">No rotation
</dd>
6510 <dt>IPP_ORIENT_REVERSE_LANDSCAPE
</dt>
6511 <dd class=
"description">90 degrees clockwise
</dd>
6512 <dt>IPP_ORIENT_REVERSE_PORTRAIT
</dt>
6513 <dd class=
"description">180 degrees
</dd>
6515 <h3 class=
"enumeration"><a name=
"ipp_pstate_e">ipp_pstate_e
</a></h3>
6516 <p class=
"description">Printer states
</p>
6517 <h4 class=
"constants">Constants
</h4>
6519 <dt>IPP_PSTATE_IDLE
</dt>
6520 <dd class=
"description">Printer is idle
</dd>
6521 <dt>IPP_PSTATE_PROCESSING
</dt>
6522 <dd class=
"description">Printer is working
</dd>
6523 <dt>IPP_PSTATE_STOPPED
</dt>
6524 <dd class=
"description">Printer is stopped
</dd>
6526 <h3 class=
"enumeration"><a name=
"ipp_quality_e">ipp_quality_e
</a></h3>
6527 <p class=
"description">Qualities
</p>
6528 <h4 class=
"constants">Constants
</h4>
6530 <dt>IPP_QUALITY_DRAFT
</dt>
6531 <dd class=
"description">Draft quality
</dd>
6532 <dt>IPP_QUALITY_HIGH
</dt>
6533 <dd class=
"description">High quality
</dd>
6534 <dt>IPP_QUALITY_NORMAL
</dt>
6535 <dd class=
"description">Normal quality
</dd>
6537 <h3 class=
"enumeration"><a name=
"ipp_res_e">ipp_res_e
</a></h3>
6538 <p class=
"description">Resolution units
</p>
6539 <h4 class=
"constants">Constants
</h4>
6541 <dt>IPP_RES_PER_CM
</dt>
6542 <dd class=
"description">Pixels per centimeter
</dd>
6543 <dt>IPP_RES_PER_INCH
</dt>
6544 <dd class=
"description">Pixels per inch
</dd>
6546 <h3 class=
"enumeration"><a name=
"ipp_state_e">ipp_state_e
</a></h3>
6547 <p class=
"description">IPP states
</p>
6548 <h4 class=
"constants">Constants
</h4>
6550 <dt>IPP_STATE_ATTRIBUTE
</dt>
6551 <dd class=
"description">One or more attributes need to be sent/received
</dd>
6552 <dt>IPP_STATE_DATA
</dt>
6553 <dd class=
"description">IPP request data needs to be sent/received
</dd>
6554 <dt>IPP_STATE_ERROR
</dt>
6555 <dd class=
"description">An error occurred
</dd>
6556 <dt>IPP_STATE_HEADER
</dt>
6557 <dd class=
"description">The request header needs to be sent/received
</dd>
6558 <dt>IPP_STATE_IDLE
</dt>
6559 <dd class=
"description">Nothing is happening/request completed
</dd>
6561 <h3 class=
"enumeration"><a name=
"ipp_status_e">ipp_status_e
</a></h3>
6562 <p class=
"description">IPP status codes
</p>
6563 <h4 class=
"constants">Constants
</h4>
6565 <dt>IPP_STATUS_CUPS_INVALID
</dt>
6566 <dd class=
"description">Invalid status name for
<a href=
"#ippErrorValue"><code>ippErrorValue
</code></a></dd>
6567 <dt>IPP_STATUS_CUPS_SEE_OTHER
</dt>
6568 <dd class=
"description">cups-see-other
</dd>
6569 <dt>IPP_STATUS_ERROR_ACCOUNT_AUTHORIZATION_FAILED
</dt>
6570 <dd class=
"description">client-error-account-authorization-failed
</dd>
6571 <dt>IPP_STATUS_ERROR_ACCOUNT_CLOSED
</dt>
6572 <dd class=
"description">client-error-account-closed
</dd>
6573 <dt>IPP_STATUS_ERROR_ACCOUNT_INFO_NEEDED
</dt>
6574 <dd class=
"description">client-error-account-info-needed
</dd>
6575 <dt>IPP_STATUS_ERROR_ACCOUNT_LIMIT_REACHED
</dt>
6576 <dd class=
"description">client-error-account-limit-reached
</dd>
6577 <dt>IPP_STATUS_ERROR_ATTRIBUTES_NOT_SETTABLE
</dt>
6578 <dd class=
"description">client-error-attributes-not-settable
</dd>
6579 <dt>IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES
</dt>
6580 <dd class=
"description">client-error-attributes-or-values-not-supported
</dd>
6581 <dt>IPP_STATUS_ERROR_BAD_REQUEST
</dt>
6582 <dd class=
"description">client-error-bad-request
</dd>
6583 <dt>IPP_STATUS_ERROR_BUSY
</dt>
6584 <dd class=
"description">server-error-busy
</dd>
6585 <dt>IPP_STATUS_ERROR_CHARSET
</dt>
6586 <dd class=
"description">client-error-charset-not-supported
</dd>
6587 <dt>IPP_STATUS_ERROR_COMPRESSION_ERROR
</dt>
6588 <dd class=
"description">client-error-compression-error
</dd>
6589 <dt>IPP_STATUS_ERROR_COMPRESSION_NOT_SUPPORTED
</dt>
6590 <dd class=
"description">client-error-compression-not-supported
</dd>
6591 <dt>IPP_STATUS_ERROR_CONFLICTING
</dt>
6592 <dd class=
"description">client-error-conflicting-attributes
</dd>
6593 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED
<span class=
"info"> DEPRECATED
</span></dt>
6594 <dd class=
"description">cups-error-account-authorization-failed
</dd>
6595 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED
</dt>
6596 <dd class=
"description">cups-error-account-closed @deprecate@
</dd>
6597 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED
<span class=
"info"> DEPRECATED
</span></dt>
6598 <dd class=
"description">cups-error-account-info-needed
</dd>
6599 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_LIMIT_REACHED
<span class=
"info"> DEPRECATED
</span></dt>
6600 <dd class=
"description">cups-error-account-limit-reached
</dd>
6601 <dt>IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED
<span class=
"info"> CUPS
1.5/macOS
10.7 </span></dt>
6602 <dd class=
"description">cups-authentication-canceled - Authentication canceled by user
</dd>
6603 <dt>IPP_STATUS_ERROR_CUPS_PKI
<span class=
"info"> CUPS
1.5/macOS
10.7 </span></dt>
6604 <dd class=
"description">cups-pki-error - Error negotiating a secure connection
</dd>
6605 <dt>IPP_STATUS_ERROR_CUPS_UPGRADE_REQUIRED
</dt>
6606 <dd class=
"description">cups-upgrade-required - TLS upgrade required
</dd>
6607 <dt>IPP_STATUS_ERROR_DEVICE
</dt>
6608 <dd class=
"description">server-error-device-error
</dd>
6609 <dt>IPP_STATUS_ERROR_DOCUMENT_ACCESS
</dt>
6610 <dd class=
"description">client-error-document-access-error
</dd>
6611 <dt>IPP_STATUS_ERROR_DOCUMENT_FORMAT_ERROR
</dt>
6612 <dd class=
"description">client-error-document-format-error
</dd>
6613 <dt>IPP_STATUS_ERROR_DOCUMENT_FORMAT_NOT_SUPPORTED
</dt>
6614 <dd class=
"description">client-error-document-format-not-supported
</dd>
6615 <dt>IPP_STATUS_ERROR_DOCUMENT_PASSWORD
</dt>
6616 <dd class=
"description">client-error-document-password-error
</dd>
6617 <dt>IPP_STATUS_ERROR_DOCUMENT_PERMISSION
</dt>
6618 <dd class=
"description">client-error-document-permission-error
</dd>
6619 <dt>IPP_STATUS_ERROR_DOCUMENT_SECURITY
</dt>
6620 <dd class=
"description">client-error-document-security-error
</dd>
6621 <dt>IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE
</dt>
6622 <dd class=
"description">client-error-document-unprintable-error
</dd>
6623 <dt>IPP_STATUS_ERROR_FORBIDDEN
</dt>
6624 <dd class=
"description">client-error-forbidden
</dd>
6625 <dt>IPP_STATUS_ERROR_GONE
</dt>
6626 <dd class=
"description">client-error-gone
</dd>
6627 <dt>IPP_STATUS_ERROR_IGNORED_ALL_SUBSCRIPTIONS
</dt>
6628 <dd class=
"description">client-error-ignored-all-subscriptions
</dd>
6629 <dt>IPP_STATUS_ERROR_INTERNAL
</dt>
6630 <dd class=
"description">server-error-internal-error
</dd>
6631 <dt>IPP_STATUS_ERROR_JOB_CANCELED
</dt>
6632 <dd class=
"description">server-error-job-canceled
</dd>
6633 <dt>IPP_STATUS_ERROR_MULTIPLE_JOBS_NOT_SUPPORTED
</dt>
6634 <dd class=
"description">server-error-multiple-document-jobs-not-supported
</dd>
6635 <dt>IPP_STATUS_ERROR_NOT_ACCEPTING_JOBS
</dt>
6636 <dd class=
"description">server-error-not-accepting-jobs
</dd>
6637 <dt>IPP_STATUS_ERROR_NOT_AUTHENTICATED
</dt>
6638 <dd class=
"description">client-error-not-authenticated
</dd>
6639 <dt>IPP_STATUS_ERROR_NOT_AUTHORIZED
</dt>
6640 <dd class=
"description">client-error-not-authorized
</dd>
6641 <dt>IPP_STATUS_ERROR_NOT_FETCHABLE
</dt>
6642 <dd class=
"description">client-error-not-fetchable
</dd>
6643 <dt>IPP_STATUS_ERROR_NOT_FOUND
</dt>
6644 <dd class=
"description">client-error-not-found
</dd>
6645 <dt>IPP_STATUS_ERROR_NOT_POSSIBLE
</dt>
6646 <dd class=
"description">client-error-not-possible
</dd>
6647 <dt>IPP_STATUS_ERROR_OPERATION_NOT_SUPPORTED
</dt>
6648 <dd class=
"description">server-error-operation-not-supported
</dd>
6649 <dt>IPP_STATUS_ERROR_PRINTER_IS_DEACTIVATED
</dt>
6650 <dd class=
"description">server-error-printer-is-deactivated
</dd>
6651 <dt>IPP_STATUS_ERROR_REQUEST_ENTITY
</dt>
6652 <dd class=
"description">client-error-request-entity-too-large
</dd>
6653 <dt>IPP_STATUS_ERROR_REQUEST_VALUE
</dt>
6654 <dd class=
"description">client-error-request-value-too-long
</dd>
6655 <dt>IPP_STATUS_ERROR_SERVICE_UNAVAILABLE
</dt>
6656 <dd class=
"description">server-error-service-unavailable
</dd>
6657 <dt>IPP_STATUS_ERROR_TEMPORARY
</dt>
6658 <dd class=
"description">server-error-temporary-error
</dd>
6659 <dt>IPP_STATUS_ERROR_TIMEOUT
</dt>
6660 <dd class=
"description">client-error-timeout
</dd>
6661 <dt>IPP_STATUS_ERROR_TOO_MANY_DOCUMENTS
</dt>
6662 <dd class=
"description">server-error-too-many-documents
</dd>
6663 <dt>IPP_STATUS_ERROR_TOO_MANY_JOBS
</dt>
6664 <dd class=
"description">server-error-too-many-jobs
</dd>
6665 <dt>IPP_STATUS_ERROR_TOO_MANY_SUBSCRIPTIONS
</dt>
6666 <dd class=
"description">client-error-too-many-subscriptions
</dd>
6667 <dt>IPP_STATUS_ERROR_URI_SCHEME
</dt>
6668 <dd class=
"description">client-error-uri-scheme-not-supported
</dd>
6669 <dt>IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED
</dt>
6670 <dd class=
"description">server-error-version-not-supported
</dd>
6671 <dt>IPP_STATUS_OK
</dt>
6672 <dd class=
"description">successful-ok
</dd>
6673 <dt>IPP_STATUS_OK_CONFLICTING
</dt>
6674 <dd class=
"description">successful-ok-conflicting-attributes
</dd>
6675 <dt>IPP_STATUS_OK_EVENTS_COMPLETE
</dt>
6676 <dd class=
"description">successful-ok-events-complete
</dd>
6677 <dt>IPP_STATUS_OK_IGNORED_OR_SUBSTITUTED
</dt>
6678 <dd class=
"description">successful-ok-ignored-or-substituted-attributes
</dd>
6679 <dt>IPP_STATUS_OK_IGNORED_SUBSCRIPTIONS
</dt>
6680 <dd class=
"description">successful-ok-ignored-subscriptions
</dd>
6681 <dt>IPP_STATUS_OK_TOO_MANY_EVENTS
</dt>
6682 <dd class=
"description">successful-ok-too-many-events
</dd>
6684 <h3 class=
"enumeration"><a name=
"ipp_tag_e">ipp_tag_e
</a></h3>
6685 <p class=
"description">Format tags for attributes
</p>
6686 <h4 class=
"constants">Constants
</h4>
6688 <dt>IPP_TAG_ADMINDEFINE
</dt>
6689 <dd class=
"description">Admin-defined value
</dd>
6690 <dt>IPP_TAG_BEGIN_COLLECTION
</dt>
6691 <dd class=
"description">Beginning of collection value
</dd>
6692 <dt>IPP_TAG_BOOLEAN
</dt>
6693 <dd class=
"description">Boolean value
</dd>
6694 <dt>IPP_TAG_CHARSET
</dt>
6695 <dd class=
"description">Character set value
</dd>
6696 <dt>IPP_TAG_CUPS_INVALID
</dt>
6697 <dd class=
"description">Invalid tag name for
<a href=
"#ippTagValue"><code>ippTagValue
</code></a></dd>
6698 <dt>IPP_TAG_DATE
</dt>
6699 <dd class=
"description">Date/time value
</dd>
6700 <dt>IPP_TAG_DEFAULT
</dt>
6701 <dd class=
"description">Default value
</dd>
6702 <dt>IPP_TAG_DELETEATTR
</dt>
6703 <dd class=
"description">Delete-attribute value
</dd>
6704 <dt>IPP_TAG_DOCUMENT
</dt>
6705 <dd class=
"description">Document group
</dd>
6706 <dt>IPP_TAG_END
</dt>
6707 <dd class=
"description">End-of-attributes
</dd>
6708 <dt>IPP_TAG_END_COLLECTION
</dt>
6709 <dd class=
"description">End of collection value
</dd>
6710 <dt>IPP_TAG_ENUM
</dt>
6711 <dd class=
"description">Enumeration value
</dd>
6712 <dt>IPP_TAG_EVENT_NOTIFICATION
</dt>
6713 <dd class=
"description">Event group
</dd>
6714 <dt>IPP_TAG_EXTENSION
</dt>
6715 <dd class=
"description">Extension point for
32-bit tags
</dd>
6716 <dt>IPP_TAG_INTEGER
</dt>
6717 <dd class=
"description">Integer value
</dd>
6718 <dt>IPP_TAG_JOB
</dt>
6719 <dd class=
"description">Job group
</dd>
6720 <dt>IPP_TAG_KEYWORD
</dt>
6721 <dd class=
"description">Keyword value
</dd>
6722 <dt>IPP_TAG_LANGUAGE
</dt>
6723 <dd class=
"description">Language value
</dd>
6724 <dt>IPP_TAG_MEMBERNAME
</dt>
6725 <dd class=
"description">Collection member name value
</dd>
6726 <dt>IPP_TAG_MIMETYPE
</dt>
6727 <dd class=
"description">MIME media type value
</dd>
6728 <dt>IPP_TAG_NAME
</dt>
6729 <dd class=
"description">Name value
</dd>
6730 <dt>IPP_TAG_NAMELANG
</dt>
6731 <dd class=
"description">Name-with-language value
</dd>
6732 <dt>IPP_TAG_NOTSETTABLE
</dt>
6733 <dd class=
"description">Not-settable value
</dd>
6734 <dt>IPP_TAG_NOVALUE
</dt>
6735 <dd class=
"description">No-value value
</dd>
6736 <dt>IPP_TAG_OPERATION
</dt>
6737 <dd class=
"description">Operation group
</dd>
6738 <dt>IPP_TAG_PRINTER
</dt>
6739 <dd class=
"description">Printer group
</dd>
6740 <dt>IPP_TAG_RANGE
</dt>
6741 <dd class=
"description">Range value
</dd>
6742 <dt>IPP_TAG_RESOLUTION
</dt>
6743 <dd class=
"description">Resolution value
</dd>
6744 <dt>IPP_TAG_STRING
</dt>
6745 <dd class=
"description">Octet string value
</dd>
6746 <dt>IPP_TAG_SUBSCRIPTION
</dt>
6747 <dd class=
"description">Subscription group
</dd>
6748 <dt>IPP_TAG_TEXT
</dt>
6749 <dd class=
"description">Text value
</dd>
6750 <dt>IPP_TAG_TEXTLANG
</dt>
6751 <dd class=
"description">Text-with-language value
</dd>
6752 <dt>IPP_TAG_UNKNOWN
</dt>
6753 <dd class=
"description">Unknown value
</dd>
6754 <dt>IPP_TAG_UNSUPPORTED_GROUP
</dt>
6755 <dd class=
"description">Unsupported attributes group
</dd>
6756 <dt>IPP_TAG_UNSUPPORTED_VALUE
</dt>
6757 <dd class=
"description">Unsupported value
</dd>
6758 <dt>IPP_TAG_URI
</dt>
6759 <dd class=
"description">URI value
</dd>
6760 <dt>IPP_TAG_URISCHEME
</dt>
6761 <dd class=
"description">URI scheme value
</dd>
6762 <dt>IPP_TAG_ZERO
</dt>
6763 <dd class=
"description">Zero tag - used for separators
</dd>