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 "$Id: api-httpipp.header 7258 2008-01-28 00:15:05Z mike $"
358 HTTP and IPP API header for CUPS.
360 Copyright 2007-2011 by Apple Inc.
361 Copyright 1997-2006 by Easy Software Products, all rights reserved.
363 These coded instructions, statements, and computer programs are the
364 property of Apple Inc. and are protected by Federal copyright
365 law. Distribution and use rights are outlined in the file "LICENSE.txt"
366 which should have been included with this file. If this file is
367 file is missing or damaged, see the license at "http://www.cups.org/".
370 <h1 class='title'
>HTTP and IPP APIs
</h1>
372 <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/OS X 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 "$Id: api-httpipp.shtml 7684 2008-06-23 16:47:38Z mike $"
716 HTTP and IPP API introduction for CUPS.
718 Copyright 2007-2012 by Apple Inc.
719 Copyright 1997-2006 by Easy Software Products, all rights reserved.
721 These coded instructions, statements, and computer programs are the
722 property of Apple Inc. and are protected by Federal copyright
723 law. Distribution and use rights are outlined in the file "LICENSE.txt"
724 which should have been included with this file. If this file is
725 file is missing or damaged, see the license at "http://www.cups.org/".
728 <h2 class='title'
><a name='OVERVIEW'
>Overview
</a></h2>
730 <p>The CUPS HTTP and IPP APIs provide low-level access to the HTTP and IPP
731 protocols and CUPS scheduler. They are typically used by monitoring and
732 administration programs to perform specific functions not supported by the
733 high-level CUPS API functions.
</p>
735 <p>The HTTP APIs use an opaque structure called
736 <a href='#http_t'
><code>http_t
</code></a> to manage connections to
737 a particular HTTP or IPP server. The
738 <a href='#httpConnectEncrypt'
><code>httpConnectEncrypt
</code></a> function is
739 used to create an instance of this structure for a particular server.
740 The constant
<code>CUPS_HTTP_DEFAULT
</code> can be used with all of the
741 <code>cups
</code> functions to refer to the default CUPS server - the functions
742 create a per-thread
<a href='#http_t'
><code>http_t
</code></a> as needed.
</p>
744 <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>
746 <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>
748 <pre class='example'
>
749 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_GET_JOBS);
751 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri",
752 NULL,
"ipp://localhost/printers/");
753 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
757 <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>
759 <pre class='example'
>
760 #include
<cups/cups.h
>
763 <a href='#ipp_t'
>ipp_t
</a> *
<a name='get_jobs'
>get_jobs
</a>(void)
765 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_GET_JOBS);
767 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri",
768 NULL,
"ipp://localhost/printers/");
769 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
772 return (
<a href='#cupsDoRequest'
>cupsDoRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/"));
776 <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>
778 <pre class='example'
>
779 <a href='#ipp_t'
>ipp_t
</a> *response;
780 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
782 attr =
<a href='#ippFindAttribute'
>ippFindAttribute
</a>(response,
"printer-state", IPP_TAG_ENUM);
785 <p>You can also walk the list of attributes with a simple
<code>for
</code> loop like this:
</p>
787 <pre class='example'
>
788 <a href='#ipp_t'
>ipp_t
</a> *response;
789 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
791 for (attr =
<a href='#ippFirstAttribute'
>ippFirstAttribute
</a>(response); attr != NULL; attr =
<a href='#ippNextAttribute'
>ippNextAttribute
</a>(response))
792 if (ippGetName(attr) == NULL)
793 puts(
"--SEPARATOR--");
795 puts(ippGetName(attr));
798 <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>
800 <pre class='example'
>
801 <a href='#ipp_t'
>ipp_t
</a> *response =
<a href='#get_jobs'
>get_jobs
</a>();
803 if (response != NULL)
805 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
806 const char *attrname;
808 const char *job_name = NULL;
809 const char *job_originating_user_name = NULL;
811 puts(
"Job ID Owner Title");
812 puts(
"------ ---------------- ---------------------------------");
814 for (attr =
<a href='#ippFirstAttribute'
>ippFirstAttribute
</a>(response); attr != NULL; attr =
<a href='#ippNextAttribute'
>ippNextAttribute
</a>(response))
816 /* Attributes without names are separators between jobs */
817 attrname = ippGetName(attr);
818 if (attrname == NULL)
822 if (job_name == NULL)
823 job_name =
"(withheld)";
825 if (job_originating_user_name == NULL)
826 job_originating_user_name =
"(withheld)";
828 printf(
"%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
833 job_originating_user_name = NULL;
836 else if (!strcmp(attrname,
"job-id")
&& ippGetValueTag(attr) == IPP_TAG_INTEGER)
837 job_id = ippGetInteger(attr,
0);
838 else if (!strcmp(attrname,
"job-name")
&& ippGetValueTag(attr) == IPP_TAG_NAME)
839 job_name = ippGetString(attr,
0, NULL);
840 else if (!strcmp(attrname,
"job-originating-user-name")
&&
841 ippGetValueTag(attr) == IPP_TAG_NAME)
842 job_originating_user_name = ippGetString(attr,
0, NULL);
847 if (job_name == NULL)
848 job_name =
"(withheld)";
850 if (job_originating_user_name == NULL)
851 job_originating_user_name =
"(withheld)";
853 printf(
"%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
858 <h3><a name='CREATING_URI_STRINGS'
>Creating URI Strings
</a></h3>
860 <p>To ensure proper encoding, the
861 <a href='#httpAssembleURIf'
><code>httpAssembleURIf
</code></a> function must be
862 used to format a
"printer-uri" string for all printer-based requests:
</p>
864 <pre class='example'
>
865 const char *name =
"Foo";
867 <a href='#ipp_t'
>ipp_t
</a> *request;
869 <a href='#httpAssembleURIf'
>httpAssembleURIf
</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri),
"ipp", NULL, cupsServer(),
870 ippPort(),
"/printers/%s", name);
871 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
874 <h3><a name='SENDING_REQUESTS_WITH_FILES'
>Sending Requests with Files
</a></h3>
876 <p>The
<a href='#cupsDoFileRequest'
><code>cupsDoFileRequest
</code></a> and
877 <a href='#cupsDoIORequest'
><code>cupsDoIORequest
</code></a> functions are
878 used for requests involving files. The
879 <a href='#cupsDoFileRequest'
><code>cupsDoFileRequest
</code></a> function
880 attaches the named file to a request and is typically used when sending a print
881 file or changing a printer's PPD file:
</p>
883 <pre class='example'
>
884 const char *filename =
"/usr/share/cups/data/testprint.ps";
885 const char *name =
"Foo";
888 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_PRINT_JOB);
889 <a href='#ipp_t'
>ipp_t
</a> *response;
891 /* Use httpAssembleURIf for the printer-uri string */
892 <a href='#httpAssembleURIf'
>httpAssembleURIf
</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri),
"ipp", NULL, cupsServer(),
893 ippPort(),
"/printers/%s", name);
894 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
895 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
897 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"job-name",
898 NULL,
"testprint.ps");
900 /* Use snprintf for the resource path */
901 snprintf(resource, sizeof(resource),
"/printers/%s", name);
903 response =
<a href='#cupsDoFileRequest'
>cupsDoFileRequest
</a>(CUPS_HTTP_DEFAULT, request, resource, filename);
906 <p>The
<a href='#cupsDoIORequest'
><code>cupsDoIORequest
</code></a> function
907 optionally attaches a file to the request and optionally saves a file in the
908 response from the server. It is used when using a pipe for the request
909 attachment or when using a request that returns a file, currently only
910 <code>CUPS_GET_DOCUMENT
</code> and
<code>CUPS_GET_PPD
</code>. For example,
911 the following code will download the PPD file for the sample HP LaserJet
914 <pre class='example'
>
917 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
918 <a href='#ipp_t'
>ipp_t
</a> *response;
920 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
921 NULL,
"laserjet.ppd");
923 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
925 response =
<a href='#cupsDoIORequest'
>cupsDoIORequest
</a>(CUPS_HTTP_DEFAULT, request,
"/", -
1, tempfd);
928 <p>The example passes
<code>-
1</code> for the input file descriptor to specify
929 that no file is to be attached to the request. The PPD file attached to the
930 response is written to the temporary file descriptor we created using the
931 <code>cupsTempFd
</code> function.
</p>
933 <h3><a name='ASYNCHRONOUS_REQUEST_PROCESSING'
>Asynchronous Request Processing
</a></h3>
935 <p>The
<a href='#cupsSendRequest'
><code>cupsSendRequest
</code></a> and
936 <a href='#cupsGetResponse'
><code>cupsGetResponse
</code></a> support
937 asynchronous communications with the server. Unlike the other request
938 functions, the IPP request is not automatically freed, so remember to
939 free your request with the
<a href='#ippDelete'
><code>ippDelete
</code></a>
942 <p>File data is attached to the request using the
943 <a href='#cupsWriteRequestData'
><code>cupsWriteRequestData
</code></a>
944 function, while file data returned from the server is read using the
945 <a href='#cupsReadResponseData'
><code>cupsReadResponseData
</code></a>
946 function. We can rewrite the previous
<code>CUPS_GET_PPD
</code> example
947 to use the asynchronous functions quite easily:
</p>
949 <pre class='example'
>
952 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
953 <a href='#ipp_t'
>ipp_t
</a> *response;
955 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
956 NULL,
"laserjet.ppd");
958 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
960 if (
<a href='#cupsSendRequest'
>cupsSendRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/") == HTTP_CONTINUE)
962 response =
<a href='#cupsGetResponse'
>cupsGetResponse
</a>(CUPS_HTTP_DEFAULT,
"/");
964 if (response != NULL)
969 while ((bytes =
<a href='#cupsReadResponseData'
>cupsReadResponseData
</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer)))
> 0)
970 write(tempfd, buffer, bytes);
974 /* Free the request! */
975 <a href='#ippDelete'
>ippDelete
</a>(request);
978 <p>The
<a href='#cupsSendRequest'
><code>cupsSendRequest
</code></a> function
979 returns the initial HTTP request status, typically either
980 <code>HTTP_CONTINUE
</code> or
<code>HTTP_UNAUTHORIZED
</code>. The latter status
981 is returned when the request requires authentication of some sort. The
982 <a href='#cupsDoAuthentication'
><code>cupsDoAuthentication
</code></a> function
983 must be called when your see
<code>HTTP_UNAUTHORIZED
</code> and the request
984 re-sent. We can add authentication support to our example code by using a
985 <code>do ... while
</code> loop:
</p>
987 <pre class='example'
>
990 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
991 <a href='#ipp_t'
>ipp_t
</a> *response;
992 http_status_t status;
994 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
995 NULL,
"laserjet.ppd");
997 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
999 /* Loop for authentication */
1002 status =
<a href='#cupsSendRequest'
>cupsSendRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/");
1004 if (status == HTTP_UNAUTHORIZED)
1006 /* Try to authenticate, break out of the loop if that fails */
1007 if (
<a href='#cupsDoAuthentication'
>cupsDoAuthentication
</a>(CUPS_HTTP_DEFAULT,
"POST",
"/"))
1011 while (status != HTTP_CONTINUE
&& status != HTTP_UNAUTHORIZED);
1013 if (status == HTTP_CONTINUE)
1015 response =
<a href='#cupsGetResponse'
>cupsGetResponse
</a>(CUPS_HTTP_DEFAULT,
"/");
1017 if (response != NULL)
1022 while ((bytes =
<a href='#cupsReadResponseData'
>cupsReadResponseData
</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer)))
> 0)
1023 write(tempfd, buffer, bytes);
1027 /* Free the request! */
1028 <a href='#ippDelete'
>ippDelete
</a>(request);
1030 <h2 class=
"title"><a name=
"FUNCTIONS">Functions
</a></h2>
1031 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/OS X
10.4 </span><a name=
"cupsDoAuthentication">cupsDoAuthentication
</a></h3>
1032 <p class=
"description">Authenticate a request.
</p>
1034 int cupsDoAuthentication (
<br>
1035 <a href=
"#http_t">http_t
</a> *http,
<br>
1036 const char *method,
<br>
1037 const char *resource
<br>
1039 <h4 class=
"parameters">Parameters
</h4>
1042 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1044 <dd class=
"description">Request method (
"GET
",
"POST
",
"PUT
")
</dd>
1046 <dd class=
"description">Resource path
</dd>
1048 <h4 class=
"returnvalue">Return Value
</h4>
1049 <p class=
"description">0 on success, -
1 on error
</p>
1050 <h4 class=
"discussion">Discussion
</h4>
1051 <p class=
"discussion">This function should be called in response to a
<code>HTTP_STATUS_UNAUTHORIZED
</code>
1052 status, prior to resubmitting your request.
1055 <h3 class=
"function"><a name=
"cupsDoFileRequest">cupsDoFileRequest
</a></h3>
1056 <p class=
"description">Do an IPP request with a file.
</p>
1058 <a href=
"#ipp_t">ipp_t
</a> *cupsDoFileRequest (
<br>
1059 <a href=
"#http_t">http_t
</a> *http,
<br>
1060 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
1061 const char *resource,
<br>
1062 const char *filename
<br>
1064 <h4 class=
"parameters">Parameters
</h4>
1067 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1069 <dd class=
"description">IPP request
</dd>
1071 <dd class=
"description">HTTP resource for POST
</dd>
1073 <dd class=
"description">File to send or
<code>NULL
</code> for none
</dd>
1075 <h4 class=
"returnvalue">Return Value
</h4>
1076 <p class=
"description">Response data
</p>
1077 <h4 class=
"discussion">Discussion
</h4>
1078 <p class=
"discussion">This function sends the IPP request and attached file to the specified
1079 server, retrying and authenticating as necessary. The request is freed with
1080 <a href=
"#ippDelete"><code>ippDelete
</code></a>.
</p>
1081 <h3 class=
"function"><span class=
"info"> CUPS
1.3/OS X
10.5 </span><a name=
"cupsDoIORequest">cupsDoIORequest
</a></h3>
1082 <p class=
"description">Do an IPP request with file descriptors.
</p>
1084 <a href=
"#ipp_t">ipp_t
</a> *cupsDoIORequest (
<br>
1085 <a href=
"#http_t">http_t
</a> *http,
<br>
1086 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
1087 const char *resource,
<br>
1088 int infile,
<br>
1089 int outfile
<br>
1091 <h4 class=
"parameters">Parameters
</h4>
1094 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1096 <dd class=
"description">IPP request
</dd>
1098 <dd class=
"description">HTTP resource for POST
</dd>
1100 <dd class=
"description">File to read from or -
1 for none
</dd>
1102 <dd class=
"description">File to write to or -
1 for none
</dd>
1104 <h4 class=
"returnvalue">Return Value
</h4>
1105 <p class=
"description">Response data
</p>
1106 <h4 class=
"discussion">Discussion
</h4>
1107 <p class=
"discussion">This function sends the IPP request with the optional input file
"infile
" to
1108 the specified server, retrying and authenticating as necessary. The request
1109 is freed with
<a href=
"#ippDelete"><code>ippDelete
</code></a>.
<br>
1111 If
"infile
" is a valid file descriptor,
<code>cupsDoIORequest
</code> copies
1112 all of the data from the file after the IPP request message.
<br>
1114 If
"outfile
" is a valid file descriptor,
<code>cupsDoIORequest
</code> copies
1115 all of the data after the IPP response message to the file.
1118 <h3 class=
"function"><a name=
"cupsDoRequest">cupsDoRequest
</a></h3>
1119 <p class=
"description">Do an IPP request.
</p>
1121 <a href=
"#ipp_t">ipp_t
</a> *cupsDoRequest (
<br>
1122 <a href=
"#http_t">http_t
</a> *http,
<br>
1123 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
1124 const char *resource
<br>
1126 <h4 class=
"parameters">Parameters
</h4>
1129 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1131 <dd class=
"description">IPP request
</dd>
1133 <dd class=
"description">HTTP resource for POST
</dd>
1135 <h4 class=
"returnvalue">Return Value
</h4>
1136 <p class=
"description">Response data
</p>
1137 <h4 class=
"discussion">Discussion
</h4>
1138 <p class=
"discussion">This function sends the IPP request to the specified server, retrying
1139 and authenticating as necessary. The request is freed with
<a href=
"#ippDelete"><code>ippDelete
</code></a>.
</p>
1140 <h3 class=
"function"><a name=
"cupsEncodeOptions">cupsEncodeOptions
</a></h3>
1141 <p class=
"description">Encode printer options into IPP attributes.
</p>
1143 void cupsEncodeOptions (
<br>
1144 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
1145 int num_options,
<br>
1146 cups_option_t *options
<br>
1148 <h4 class=
"parameters">Parameters
</h4>
1151 <dd class=
"description">Request to add to
</dd>
1152 <dt>num_options
</dt>
1153 <dd class=
"description">Number of options
</dd>
1155 <dd class=
"description">Options
</dd>
1157 <h4 class=
"discussion">Discussion
</h4>
1158 <p class=
"discussion">This function adds operation, job, and then subscription attributes,
1159 in that order. Use the cupsEncodeOptions2() function to add attributes
1160 for a single group.
</p>
1161 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"cupsEncodeOptions2">cupsEncodeOptions2
</a></h3>
1162 <p class=
"description">Encode printer options into IPP attributes for a group.
</p>
1164 void cupsEncodeOptions2 (
<br>
1165 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
1166 int num_options,
<br>
1167 cups_option_t *options,
<br>
1168 ipp_tag_t group_tag
<br>
1170 <h4 class=
"parameters">Parameters
</h4>
1173 <dd class=
"description">Request to add to
</dd>
1174 <dt>num_options
</dt>
1175 <dd class=
"description">Number of options
</dd>
1177 <dd class=
"description">Options
</dd>
1179 <dd class=
"description">Group to encode
</dd>
1181 <h4 class=
"discussion">Discussion
</h4>
1182 <p class=
"discussion">This function only adds attributes for a single group. Call this
1183 function multiple times for each group, or use cupsEncodeOptions()
1184 to add the standard groups.
1187 <h3 class=
"function"><span class=
"info"> CUPS
1.4/OS X
10.6 </span><a name=
"cupsGetDevices">cupsGetDevices
</a></h3>
1188 <p class=
"description">Get available printer devices.
</p>
1190 ipp_status_t cupsGetDevices (
<br>
1191 <a href=
"#http_t">http_t
</a> *http,
<br>
1192 int timeout,
<br>
1193 const char *include_schemes,
<br>
1194 const char *exclude_schemes,
<br>
1195 cups_device_cb_t callback,
<br>
1196 void *user_data
<br>
1198 <h4 class=
"parameters">Parameters
</h4>
1201 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1203 <dd class=
"description">Timeout in seconds or
<code>CUPS_TIMEOUT_DEFAULT
</code></dd>
1204 <dt>include_schemes
</dt>
1205 <dd class=
"description">Comma-separated URI schemes to include or
<code>CUPS_INCLUDE_ALL
</code></dd>
1206 <dt>exclude_schemes
</dt>
1207 <dd class=
"description">Comma-separated URI schemes to exclude or
<code>CUPS_EXCLUDE_NONE
</code></dd>
1209 <dd class=
"description">Callback function
</dd>
1211 <dd class=
"description">User data pointer
</dd>
1213 <h4 class=
"returnvalue">Return Value
</h4>
1214 <p class=
"description">Request status -
<code>IPP_OK
</code> on success.
</p>
1215 <h4 class=
"discussion">Discussion
</h4>
1216 <p class=
"discussion">This function sends a CUPS-Get-Devices request and streams the discovered
1217 devices to the specified callback function. The
"timeout
" parameter controls
1218 how long the request lasts, while the
"include_schemes
" and
"exclude_schemes
"
1219 parameters provide comma-delimited lists of backends to include or omit from
1220 the request respectively.
1223 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/OS X
10.4 </span><a name=
"cupsGetFd">cupsGetFd
</a></h3>
1224 <p class=
"description">Get a file from the server.
</p>
1226 http_status_t cupsGetFd (
<br>
1227 <a href=
"#http_t">http_t
</a> *http,
<br>
1228 const char *resource,
<br>
1229 int fd
<br>
1231 <h4 class=
"parameters">Parameters
</h4>
1234 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1236 <dd class=
"description">Resource name
</dd>
1238 <dd class=
"description">File descriptor
</dd>
1240 <h4 class=
"returnvalue">Return Value
</h4>
1241 <p class=
"description">HTTP status
</p>
1242 <h4 class=
"discussion">Discussion
</h4>
1243 <p class=
"discussion">This function returns
<code>HTTP_STATUS_OK
</code> when the file is successfully retrieved.
1246 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/OS X
10.4 </span><a name=
"cupsGetFile">cupsGetFile
</a></h3>
1247 <p class=
"description">Get a file from the server.
</p>
1249 http_status_t cupsGetFile (
<br>
1250 <a href=
"#http_t">http_t
</a> *http,
<br>
1251 const char *resource,
<br>
1252 const char *filename
<br>
1254 <h4 class=
"parameters">Parameters
</h4>
1257 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1259 <dd class=
"description">Resource name
</dd>
1261 <dd class=
"description">Filename
</dd>
1263 <h4 class=
"returnvalue">Return Value
</h4>
1264 <p class=
"description">HTTP status
</p>
1265 <h4 class=
"discussion">Discussion
</h4>
1266 <p class=
"discussion">This function returns
<code>HTTP_STATUS_OK
</code> when the file is successfully retrieved.
1269 <h3 class=
"function"><span class=
"info"> CUPS
1.4/OS X
10.6 </span><a name=
"cupsGetResponse">cupsGetResponse
</a></h3>
1270 <p class=
"description">Get a response to an IPP request.
</p>
1272 <a href=
"#ipp_t">ipp_t
</a> *cupsGetResponse (
<br>
1273 <a href=
"#http_t">http_t
</a> *http,
<br>
1274 const char *resource
<br>
1276 <h4 class=
"parameters">Parameters
</h4>
1279 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1281 <dd class=
"description">HTTP resource for POST
</dd>
1283 <h4 class=
"returnvalue">Return Value
</h4>
1284 <p class=
"description">Response or
<code>NULL
</code> on HTTP error
</p>
1285 <h4 class=
"discussion">Discussion
</h4>
1286 <p class=
"discussion">Use this function to get the response for an IPP request sent using
1287 <a href=
"#cupsSendRequest"><code>cupsSendRequest
</code></a>. For requests that return additional data, use
1288 <a href=
"#cupsReadResponseData"><code>cupsReadResponseData
</code></a> after getting a successful response,
1289 otherwise call
<a href=
"#httpFlush"><code>httpFlush
</code></a> to complete the response processing.
1292 <h3 class=
"function"><a name=
"cupsLastError">cupsLastError
</a></h3>
1293 <p class=
"description">Return the last IPP status code received on the current
1296 ipp_status_t cupsLastError (void);
</p>
1297 <h4 class=
"returnvalue">Return Value
</h4>
1298 <p class=
"description">IPP status code from last request
</p>
1299 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"cupsLastErrorString">cupsLastErrorString
</a></h3>
1300 <p class=
"description">Return the last IPP status-message received on the
1303 const char *cupsLastErrorString (void);
</p>
1304 <h4 class=
"returnvalue">Return Value
</h4>
1305 <p class=
"description">status-message text from last request
</p>
1306 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/OS X
10.4 </span><a name=
"cupsPutFd">cupsPutFd
</a></h3>
1307 <p class=
"description">Put a file on the server.
</p>
1309 http_status_t cupsPutFd (
<br>
1310 <a href=
"#http_t">http_t
</a> *http,
<br>
1311 const char *resource,
<br>
1312 int fd
<br>
1314 <h4 class=
"parameters">Parameters
</h4>
1317 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1319 <dd class=
"description">Resource name
</dd>
1321 <dd class=
"description">File descriptor
</dd>
1323 <h4 class=
"returnvalue">Return Value
</h4>
1324 <p class=
"description">HTTP status
</p>
1325 <h4 class=
"discussion">Discussion
</h4>
1326 <p class=
"discussion">This function returns
<code>HTTP_STATUS_CREATED
</code> when the file is stored
1330 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/OS X
10.4 </span><a name=
"cupsPutFile">cupsPutFile
</a></h3>
1331 <p class=
"description">Put a file on the server.
</p>
1333 http_status_t cupsPutFile (
<br>
1334 <a href=
"#http_t">http_t
</a> *http,
<br>
1335 const char *resource,
<br>
1336 const char *filename
<br>
1338 <h4 class=
"parameters">Parameters
</h4>
1341 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1343 <dd class=
"description">Resource name
</dd>
1345 <dd class=
"description">Filename
</dd>
1347 <h4 class=
"returnvalue">Return Value
</h4>
1348 <p class=
"description">HTTP status
</p>
1349 <h4 class=
"discussion">Discussion
</h4>
1350 <p class=
"discussion">This function returns
<code>HTTP_CREATED
</code> when the file is stored
1354 <h3 class=
"function"><span class=
"info"> CUPS
1.4/OS X
10.6 </span><a name=
"cupsReadResponseData">cupsReadResponseData
</a></h3>
1355 <p class=
"description">Read additional data after the IPP response.
</p>
1357 ssize_t cupsReadResponseData (
<br>
1358 <a href=
"#http_t">http_t
</a> *http,
<br>
1359 char *buffer,
<br>
1360 size_t length
<br>
1362 <h4 class=
"parameters">Parameters
</h4>
1365 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1367 <dd class=
"description">Buffer to use
</dd>
1369 <dd class=
"description">Number of bytes to read
</dd>
1371 <h4 class=
"returnvalue">Return Value
</h4>
1372 <p class=
"description">Bytes read,
0 on EOF, -
1 on error
</p>
1373 <h4 class=
"discussion">Discussion
</h4>
1374 <p class=
"discussion">This function is used after
<a href=
"#cupsGetResponse"><code>cupsGetResponse
</code></a> to read the PPD or document
1375 files from
<code>CUPS_GET_PPD
</code> and
<code>CUPS_GET_DOCUMENT
</code> requests,
1379 <h3 class=
"function"><span class=
"info"> CUPS
1.4/OS X
10.6 </span><a name=
"cupsSendRequest">cupsSendRequest
</a></h3>
1380 <p class=
"description">Send an IPP request.
</p>
1382 http_status_t cupsSendRequest (
<br>
1383 <a href=
"#http_t">http_t
</a> *http,
<br>
1384 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
1385 const char *resource,
<br>
1386 size_t length
<br>
1388 <h4 class=
"parameters">Parameters
</h4>
1391 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1393 <dd class=
"description">IPP request
</dd>
1395 <dd class=
"description">Resource path
</dd>
1397 <dd class=
"description">Length of data to follow or
<code>CUPS_LENGTH_VARIABLE
</code></dd>
1399 <h4 class=
"returnvalue">Return Value
</h4>
1400 <p class=
"description">Initial HTTP status
</p>
1401 <h4 class=
"discussion">Discussion
</h4>
1402 <p class=
"discussion">Use
<a href=
"#cupsWriteRequestData"><code>cupsWriteRequestData
</code></a> to write any additional data (document, PPD
1403 file, etc.) for the request,
<a href=
"#cupsGetResponse"><code>cupsGetResponse
</code></a> to get the IPP response,
1404 and
<a href=
"#cupsReadResponseData"><code>cupsReadResponseData
</code></a> to read any additional data following the
1405 response. Only one request can be sent/queued at a time per
<code>http_t
</code>
1408 Returns the initial HTTP status code, which will be
<code>HTTP_STATUS_CONTINUE
</code>
1409 on a successful send of the request.
<br>
1411 Note: Unlike
<a href=
"#cupsDoFileRequest"><code>cupsDoFileRequest
</code></a>,
<a href=
"#cupsDoIORequest"><code>cupsDoIORequest
</code></a>, and
1412 <a href=
"#cupsDoRequest"><code>cupsDoRequest
</code></a>, the request is NOT freed with
<a href=
"#ippDelete"><code>ippDelete
</code></a>.
1415 <h3 class=
"function"><span class=
"info"> CUPS
1.4/OS X
10.6 </span><a name=
"cupsWriteRequestData">cupsWriteRequestData
</a></h3>
1416 <p class=
"description">Write additional data after an IPP request.
</p>
1418 http_status_t cupsWriteRequestData (
<br>
1419 <a href=
"#http_t">http_t
</a> *http,
<br>
1420 const char *buffer,
<br>
1421 size_t length
<br>
1423 <h4 class=
"parameters">Parameters
</h4>
1426 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1428 <dd class=
"description">Bytes to write
</dd>
1430 <dd class=
"description">Number of bytes to write
</dd>
1432 <h4 class=
"returnvalue">Return Value
</h4>
1433 <p class=
"description"><code>HTTP_STATUS_CONTINUE
</code> if OK or HTTP status on error
</p>
1434 <h4 class=
"discussion">Discussion
</h4>
1435 <p class=
"discussion">This function is used after
<a href=
"#cupsSendRequest"><code>cupsSendRequest
</code></a> to provide a PPD and
1436 after
<a href=
"#cupsStartDocument"><code>cupsStartDocument
</code></a> to provide a document file.
1439 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"httpAcceptConnection">httpAcceptConnection
</a></h3>
1440 <p class=
"description">Accept a new HTTP client connection from the
1441 specified listening socket.
</p>
1443 <a href=
"#http_t">http_t
</a> *httpAcceptConnection (
<br>
1444 int fd,
<br>
1445 int blocking
<br>
1447 <h4 class=
"parameters">Parameters
</h4>
1450 <dd class=
"description">Listen socket file descriptor
</dd>
1452 <dd class=
"description">1 if the connection should be
1453 blocking,
0 otherwise
</dd>
1455 <h4 class=
"returnvalue">Return Value
</h4>
1456 <p class=
"description">HTTP connection or
<code>NULL
</code></p>
1457 <h3 class=
"function"><span class=
"info"> CUPS
1.5/OS X
10.7 </span><a name=
"httpAddCredential">httpAddCredential
</a></h3>
1458 <p class=
"description">Allocates and adds a single credential to an array.
</p>
1460 int httpAddCredential (
<br>
1461 cups_array_t *credentials,
<br>
1462 const void *data,
<br>
1463 size_t datalen
<br>
1465 <h4 class=
"parameters">Parameters
</h4>
1467 <dt>credentials
</dt>
1468 <dd class=
"description">Credentials array
</dd>
1470 <dd class=
"description">PEM-encoded X
.509 data
</dd>
1472 <dd class=
"description">Length of data
</dd>
1474 <h4 class=
"returnvalue">Return Value
</h4>
1475 <p class=
"description">0 on success, -
1 on error
</p>
1476 <h4 class=
"discussion">Discussion
</h4>
1477 <p class=
"discussion">Use
<code>cupsArrayNew(NULL, NULL)
</code> to create a credentials array.
1480 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"httpAddrAny">httpAddrAny
</a></h3>
1481 <p class=
"description">Check for the
"any
" address.
</p>
1483 int httpAddrAny (
<br>
1484 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1486 <h4 class=
"parameters">Parameters
</h4>
1489 <dd class=
"description">Address to check
</dd>
1491 <h4 class=
"returnvalue">Return Value
</h4>
1492 <p class=
"description">1 if
"any
",
0 otherwise
</p>
1493 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpAddrClose">httpAddrClose
</a></h3>
1494 <p class=
"description">Close a socket created by
<a href=
"#httpAddrConnect"><code>httpAddrConnect
</code></a> or
1495 <a href=
"#httpAddrListen"><code>httpAddrListen
</code></a>.
</p>
1497 int httpAddrClose (
<br>
1498 <a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
1499 int fd
<br>
1501 <h4 class=
"parameters">Parameters
</h4>
1504 <dd class=
"description">Listen address or
<code>NULL
</code></dd>
1506 <dd class=
"description">Socket file descriptor
</dd>
1508 <h4 class=
"returnvalue">Return Value
</h4>
1509 <p class=
"description">0 on success, -
1 on failure
</p>
1510 <h4 class=
"discussion">Discussion
</h4>
1511 <p class=
"discussion">Pass
<code>NULL
</code> for sockets created with
<a href=
"#httpAddrConnect"><code>httpAddrConnect
</code></a> and the
1512 listen address for sockets created with
<a href=
"#httpAddrListen"><code>httpAddrListen
</code></a>. This will
1513 ensure that domain sockets are removed when closed.
1516 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"httpAddrEqual">httpAddrEqual
</a></h3>
1517 <p class=
"description">Compare two addresses.
</p>
1519 int httpAddrEqual (
<br>
1520 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr1,
<br>
1521 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr2
<br>
1523 <h4 class=
"parameters">Parameters
</h4>
1526 <dd class=
"description">First address
</dd>
1528 <dd class=
"description">Second address
</dd>
1530 <h4 class=
"returnvalue">Return Value
</h4>
1531 <p class=
"description">1 if equal,
0 if not
</p>
1532 <h3 class=
"function"><a name=
"httpAddrFamily">httpAddrFamily
</a></h3>
1533 <p class=
"description">Get the address family of an address.
</p>
1535 int httpAddrFamily (
<br>
1536 <a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1538 <h4 class=
"parameters">Parameters
</h4>
1541 <dd class=
"description">Address
</dd>
1543 <h4 class=
"returnvalue">Return Value
</h4>
1544 <p class=
"description">Address family
</p>
1545 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"httpAddrLength">httpAddrLength
</a></h3>
1546 <p class=
"description">Return the length of the address in bytes.
</p>
1548 int httpAddrLength (
<br>
1549 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1551 <h4 class=
"parameters">Parameters
</h4>
1554 <dd class=
"description">Address
</dd>
1556 <h4 class=
"returnvalue">Return Value
</h4>
1557 <p class=
"description">Length in bytes
</p>
1558 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"httpAddrListen">httpAddrListen
</a></h3>
1559 <p class=
"description">Create a listening socket bound to the specified
1560 address and port.
</p>
1562 int httpAddrListen (
<br>
1563 <a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
1564 int port
<br>
1566 <h4 class=
"parameters">Parameters
</h4>
1569 <dd class=
"description">Address to bind to
</dd>
1571 <dd class=
"description">Port number to bind to
</dd>
1573 <h4 class=
"returnvalue">Return Value
</h4>
1574 <p class=
"description">Socket or -
1 on error
</p>
1575 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"httpAddrLocalhost">httpAddrLocalhost
</a></h3>
1576 <p class=
"description">Check for the local loopback address.
</p>
1578 int httpAddrLocalhost (
<br>
1579 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1581 <h4 class=
"parameters">Parameters
</h4>
1584 <dd class=
"description">Address to check
</dd>
1586 <h4 class=
"returnvalue">Return Value
</h4>
1587 <p class=
"description">1 if local host,
0 otherwise
</p>
1588 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"httpAddrLookup">httpAddrLookup
</a></h3>
1589 <p class=
"description">Lookup the hostname associated with the address.
</p>
1591 char *httpAddrLookup (
<br>
1592 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
1593 char *name,
<br>
1594 int namelen
<br>
1596 <h4 class=
"parameters">Parameters
</h4>
1599 <dd class=
"description">Address to lookup
</dd>
1601 <dd class=
"description">Host name buffer
</dd>
1603 <dd class=
"description">Size of name buffer
</dd>
1605 <h4 class=
"returnvalue">Return Value
</h4>
1606 <p class=
"description">Host name
</p>
1607 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"httpAddrPort">httpAddrPort
</a></h3>
1608 <p class=
"description">Get the port number associated with an address.
</p>
1610 int httpAddrPort (
<br>
1611 <a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1613 <h4 class=
"parameters">Parameters
</h4>
1616 <dd class=
"description">Address
</dd>
1618 <h4 class=
"returnvalue">Return Value
</h4>
1619 <p class=
"description">Port number
</p>
1620 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"httpAddrString">httpAddrString
</a></h3>
1621 <p class=
"description">Convert an address to a numeric string.
</p>
1623 char *httpAddrString (
<br>
1624 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
1625 char *s,
<br>
1626 int slen
<br>
1628 <h4 class=
"parameters">Parameters
</h4>
1631 <dd class=
"description">Address to convert
</dd>
1633 <dd class=
"description">String buffer
</dd>
1635 <dd class=
"description">Length of string
</dd>
1637 <h4 class=
"returnvalue">Return Value
</h4>
1638 <p class=
"description">Numeric address string
</p>
1639 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"httpAssembleURI">httpAssembleURI
</a></h3>
1640 <p class=
"description">Assemble a uniform resource identifier from its
1643 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpAssembleURI (
<br>
1644 <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> encoding,
<br>
1645 char *uri,
<br>
1646 int urilen,
<br>
1647 const char *scheme,
<br>
1648 const char *username,
<br>
1649 const char *host,
<br>
1650 int port,
<br>
1651 const char *resource
<br>
1653 <h4 class=
"parameters">Parameters
</h4>
1656 <dd class=
"description">Encoding flags
</dd>
1658 <dd class=
"description">URI buffer
</dd>
1660 <dd class=
"description">Size of URI buffer
</dd>
1662 <dd class=
"description">Scheme name
</dd>
1664 <dd class=
"description">Username
</dd>
1666 <dd class=
"description">Hostname or address
</dd>
1668 <dd class=
"description">Port number
</dd>
1670 <dd class=
"description">Resource
</dd>
1672 <h4 class=
"returnvalue">Return Value
</h4>
1673 <p class=
"description">URI status
</p>
1674 <h4 class=
"discussion">Discussion
</h4>
1675 <p class=
"discussion">This function escapes reserved characters in the URI depending on the
1676 value of the
"encoding
" argument. You should use this function in
1677 place of traditional string functions whenever you need to create a
1681 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"httpAssembleURIf">httpAssembleURIf
</a></h3>
1682 <p class=
"description">Assemble a uniform resource identifier from its
1683 components with a formatted resource.
</p>
1685 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpAssembleURIf (
<br>
1686 <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> encoding,
<br>
1687 char *uri,
<br>
1688 int urilen,
<br>
1689 const char *scheme,
<br>
1690 const char *username,
<br>
1691 const char *host,
<br>
1692 int port,
<br>
1693 const char *resourcef,
<br>
1694 ...
<br>
1696 <h4 class=
"parameters">Parameters
</h4>
1699 <dd class=
"description">Encoding flags
</dd>
1701 <dd class=
"description">URI buffer
</dd>
1703 <dd class=
"description">Size of URI buffer
</dd>
1705 <dd class=
"description">Scheme name
</dd>
1707 <dd class=
"description">Username
</dd>
1709 <dd class=
"description">Hostname or address
</dd>
1711 <dd class=
"description">Port number
</dd>
1713 <dd class=
"description">Printf-style resource
</dd>
1715 <dd class=
"description">Additional arguments as needed
</dd>
1717 <h4 class=
"returnvalue">Return Value
</h4>
1718 <p class=
"description">URI status
</p>
1719 <h4 class=
"discussion">Discussion
</h4>
1720 <p class=
"discussion">This function creates a formatted version of the resource string
1721 argument
"resourcef
" and escapes reserved characters in the URI
1722 depending on the value of the
"encoding
" argument. You should use
1723 this function in place of traditional string functions whenever
1724 you need to create a URI string.
1727 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"httpAssembleUUID">httpAssembleUUID
</a></h3>
1728 <p class=
"description">Assemble a name-based UUID URN conforming to RFC
4122.
</p>
1730 char *httpAssembleUUID (
<br>
1731 const char *server,
<br>
1732 int port,
<br>
1733 const char *name,
<br>
1734 int number,
<br>
1735 char *buffer,
<br>
1736 size_t bufsize
<br>
1738 <h4 class=
"parameters">Parameters
</h4>
1741 <dd class=
"description">Server name
</dd>
1743 <dd class=
"description">Port number
</dd>
1745 <dd class=
"description">Object name or NULL
</dd>
1747 <dd class=
"description">Object number or
0</dd>
1749 <dd class=
"description">String buffer
</dd>
1751 <dd class=
"description">Size of buffer
</dd>
1753 <h4 class=
"returnvalue">Return Value
</h4>
1754 <p class=
"description">UUID string
</p>
1755 <h4 class=
"discussion">Discussion
</h4>
1756 <p class=
"discussion">This function creates a unique
128-bit identifying number using the server
1757 name, port number, random data, and optionally an object name and/or object
1758 number. The result is formatted as a UUID URN as defined in RFC
4122.
<br>
1760 The buffer needs to be at least
46 bytes in size.
1763 <h3 class=
"function"><a name=
"httpBlocking">httpBlocking
</a></h3>
1764 <p class=
"description">Set blocking/non-blocking behavior on a connection.
</p>
1766 void httpBlocking (
<br>
1767 <a href=
"#http_t">http_t
</a> *http,
<br>
1768 int b
<br>
1770 <h4 class=
"parameters">Parameters
</h4>
1773 <dd class=
"description">HTTP connection
</dd>
1775 <dd class=
"description">1 = blocking,
0 = non-blocking
</dd>
1777 <h3 class=
"function"><a name=
"httpCheck">httpCheck
</a></h3>
1778 <p class=
"description">Check to see if there is a pending response from the server.
</p>
1781 <a href=
"#http_t">http_t
</a> *http
<br>
1783 <h4 class=
"parameters">Parameters
</h4>
1786 <dd class=
"description">HTTP connection
</dd>
1788 <h4 class=
"returnvalue">Return Value
</h4>
1789 <p class=
"description">0 = no data,
1 = data available
</p>
1790 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/OS X
10.3 </span><a name=
"httpClearCookie">httpClearCookie
</a></h3>
1791 <p class=
"description">Clear the cookie value(s).
</p>
1793 void httpClearCookie (
<br>
1794 <a href=
"#http_t">http_t
</a> *http
<br>
1796 <h4 class=
"parameters">Parameters
</h4>
1799 <dd class=
"description">HTTP connection
</dd>
1801 <h3 class=
"function"><a name=
"httpClearFields">httpClearFields
</a></h3>
1802 <p class=
"description">Clear HTTP request fields.
</p>
1804 void httpClearFields (
<br>
1805 <a href=
"#http_t">http_t
</a> *http
<br>
1807 <h4 class=
"parameters">Parameters
</h4>
1810 <dd class=
"description">HTTP connection
</dd>
1812 <h3 class=
"function"><a name=
"httpClose">httpClose
</a></h3>
1813 <p class=
"description">Close an HTTP connection.
</p>
1815 void httpClose (
<br>
1816 <a href=
"#http_t">http_t
</a> *http
<br>
1818 <h4 class=
"parameters">Parameters
</h4>
1821 <dd class=
"description">HTTP connection
</dd>
1823 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpCompareCredentials">httpCompareCredentials
</a></h3>
1824 <p class=
"description">Compare two sets of X
.509 credentials.
</p>
1826 int httpCompareCredentials (
<br>
1827 cups_array_t *cred1,
<br>
1828 cups_array_t *cred2
<br>
1830 <h4 class=
"parameters">Parameters
</h4>
1833 <dd class=
"description">First set of X
.509 credentials
</dd>
1835 <dd class=
"description">Second set of X
.509 credentials
</dd>
1837 <h4 class=
"returnvalue">Return Value
</h4>
1838 <p class=
"description">1 if they match,
0 if they do not
</p>
1839 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpConnect">httpConnect
</a></h3>
1840 <p class=
"description">Connect to a HTTP server.
</p>
1842 <a href=
"#http_t">http_t
</a> *httpConnect (
<br>
1843 const char *host,
<br>
1844 int port
<br>
1846 <h4 class=
"parameters">Parameters
</h4>
1849 <dd class=
"description">Host to connect to
</dd>
1851 <dd class=
"description">Port number
</dd>
1853 <h4 class=
"returnvalue">Return Value
</h4>
1854 <p class=
"description">New HTTP connection
</p>
1855 <h4 class=
"discussion">Discussion
</h4>
1856 <p class=
"discussion">This function is deprecated - use
<a href=
"#httpConnect2"><code>httpConnect2
</code></a> instead.
1859 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"httpConnect2">httpConnect2
</a></h3>
1860 <p class=
"description">Connect to a HTTP server.
</p>
1862 <a href=
"#http_t">http_t
</a> *httpConnect2 (
<br>
1863 const char *host,
<br>
1864 int port,
<br>
1865 <a href=
"#http_addrlist_t">http_addrlist_t
</a> *addrlist,
<br>
1866 int family,
<br>
1867 <a href=
"#http_encryption_t">http_encryption_t
</a> encryption,
<br>
1868 int blocking,
<br>
1869 int msec,
<br>
1870 int *cancel
<br>
1872 <h4 class=
"parameters">Parameters
</h4>
1875 <dd class=
"description">Host to connect to
</dd>
1877 <dd class=
"description">Port number
</dd>
1879 <dd class=
"description">List of addresses or NULL to lookup
</dd>
1881 <dd class=
"description">Address family to use or
<code>AF_UNSPEC
</code> for any
</dd>
1883 <dd class=
"description">Type of encryption to use
</dd>
1885 <dd class=
"description">1 for blocking connection,
0 for non-blocking
</dd>
1887 <dd class=
"description">Connection timeout in milliseconds,
0 means don't connect
</dd>
1889 <dd class=
"description">Pointer to
"cancel
" variable
</dd>
1891 <h4 class=
"returnvalue">Return Value
</h4>
1892 <p class=
"description">New HTTP connection
</p>
1893 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpConnectEncrypt">httpConnectEncrypt
</a></h3>
1894 <p class=
"description">Connect to a HTTP server using encryption.
</p>
1896 <a href=
"#http_t">http_t
</a> *httpConnectEncrypt (
<br>
1897 const char *host,
<br>
1898 int port,
<br>
1899 <a href=
"#http_encryption_t">http_encryption_t
</a> encryption
<br>
1901 <h4 class=
"parameters">Parameters
</h4>
1904 <dd class=
"description">Host to connect to
</dd>
1906 <dd class=
"description">Port number
</dd>
1908 <dd class=
"description">Type of encryption to use
</dd>
1910 <h4 class=
"returnvalue">Return Value
</h4>
1911 <p class=
"description">New HTTP connection
</p>
1912 <h4 class=
"discussion">Discussion
</h4>
1913 <p class=
"discussion">This function is now deprecated. Please use the
<a href=
"#httpConnect2"><code>httpConnect2
</code></a> function
1917 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpDecode64">httpDecode64
</a></h3>
1918 <p class=
"description">Base64-decode a string.
</p>
1920 char *httpDecode64 (
<br>
1921 char *out,
<br>
1922 const char *in
<br>
1924 <h4 class=
"parameters">Parameters
</h4>
1927 <dd class=
"description">String to write to
</dd>
1929 <dd class=
"description">String to read from
</dd>
1931 <h4 class=
"returnvalue">Return Value
</h4>
1932 <p class=
"description">Decoded string
</p>
1933 <h4 class=
"discussion">Discussion
</h4>
1934 <p class=
"discussion">This function is deprecated. Use the httpDecode64_2() function instead
1935 which provides buffer length arguments.
1938 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/OS X
10.4 </span><a name=
"httpDecode64_2">httpDecode64_2
</a></h3>
1939 <p class=
"description">Base64-decode a string.
</p>
1941 char *httpDecode64_2 (
<br>
1942 char *out,
<br>
1943 int *outlen,
<br>
1944 const char *in
<br>
1946 <h4 class=
"parameters">Parameters
</h4>
1949 <dd class=
"description">String to write to
</dd>
1951 <dd class=
"description">Size of output string
</dd>
1953 <dd class=
"description">String to read from
</dd>
1955 <h4 class=
"returnvalue">Return Value
</h4>
1956 <p class=
"description">Decoded string
</p>
1957 <h3 class=
"function"><a name=
"httpDelete">httpDelete
</a></h3>
1958 <p class=
"description">Send a DELETE request to the server.
</p>
1960 int httpDelete (
<br>
1961 <a href=
"#http_t">http_t
</a> *http,
<br>
1962 const char *uri
<br>
1964 <h4 class=
"parameters">Parameters
</h4>
1967 <dd class=
"description">HTTP connection
</dd>
1969 <dd class=
"description">URI to delete
</dd>
1971 <h4 class=
"returnvalue">Return Value
</h4>
1972 <p class=
"description">Status of call (
0 = success)
</p>
1973 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpEncode64">httpEncode64
</a></h3>
1974 <p class=
"description">Base64-encode a string.
</p>
1976 char *httpEncode64 (
<br>
1977 char *out,
<br>
1978 const char *in
<br>
1980 <h4 class=
"parameters">Parameters
</h4>
1983 <dd class=
"description">String to write to
</dd>
1985 <dd class=
"description">String to read from
</dd>
1987 <h4 class=
"returnvalue">Return Value
</h4>
1988 <p class=
"description">Encoded string
</p>
1989 <h4 class=
"discussion">Discussion
</h4>
1990 <p class=
"discussion">This function is deprecated. Use the httpEncode64_2() function instead
1991 which provides buffer length arguments.
1994 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/OS X
10.4 </span><a name=
"httpEncode64_2">httpEncode64_2
</a></h3>
1995 <p class=
"description">Base64-encode a string.
</p>
1997 char *httpEncode64_2 (
<br>
1998 char *out,
<br>
1999 int outlen,
<br>
2000 const char *in,
<br>
2001 int inlen
<br>
2003 <h4 class=
"parameters">Parameters
</h4>
2006 <dd class=
"description">String to write to
</dd>
2008 <dd class=
"description">Size of output string
</dd>
2010 <dd class=
"description">String to read from
</dd>
2012 <dd class=
"description">Size of input string
</dd>
2014 <h4 class=
"returnvalue">Return Value
</h4>
2015 <p class=
"description">Encoded string
</p>
2016 <h3 class=
"function"><a name=
"httpEncryption">httpEncryption
</a></h3>
2017 <p class=
"description">Set the required encryption on the link.
</p>
2019 int httpEncryption (
<br>
2020 <a href=
"#http_t">http_t
</a> *http,
<br>
2021 <a href=
"#http_encryption_t">http_encryption_t
</a> e
<br>
2023 <h4 class=
"parameters">Parameters
</h4>
2026 <dd class=
"description">HTTP connection
</dd>
2028 <dd class=
"description">New encryption preference
</dd>
2030 <h4 class=
"returnvalue">Return Value
</h4>
2031 <p class=
"description">-
1 on error,
0 on success
</p>
2032 <h3 class=
"function"><a name=
"httpError">httpError
</a></h3>
2033 <p class=
"description">Get the last error on a connection.
</p>
2036 <a href=
"#http_t">http_t
</a> *http
<br>
2038 <h4 class=
"parameters">Parameters
</h4>
2041 <dd class=
"description">HTTP connection
</dd>
2043 <h4 class=
"returnvalue">Return Value
</h4>
2044 <p class=
"description">Error code (errno) value
</p>
2045 <h3 class=
"function"><a name=
"httpFieldValue">httpFieldValue
</a></h3>
2046 <p class=
"description">Return the HTTP field enumeration value for a field
2049 <a href=
"#http_field_t">http_field_t
</a> httpFieldValue (
<br>
2050 const char *name
<br>
2052 <h4 class=
"parameters">Parameters
</h4>
2055 <dd class=
"description">String name
</dd>
2057 <h4 class=
"returnvalue">Return Value
</h4>
2058 <p class=
"description">Field index
</p>
2059 <h3 class=
"function"><a name=
"httpFlush">httpFlush
</a></h3>
2060 <p class=
"description">Flush data from a HTTP connection.
</p>
2062 void httpFlush (
<br>
2063 <a href=
"#http_t">http_t
</a> *http
<br>
2065 <h4 class=
"parameters">Parameters
</h4>
2068 <dd class=
"description">HTTP connection
</dd>
2070 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"httpFlushWrite">httpFlushWrite
</a></h3>
2071 <p class=
"description">Flush data in write buffer.
</p>
2073 int httpFlushWrite (
<br>
2074 <a href=
"#http_t">http_t
</a> *http
<br>
2076 <h4 class=
"parameters">Parameters
</h4>
2079 <dd class=
"description">HTTP connection
</dd>
2081 <h4 class=
"returnvalue">Return Value
</h4>
2082 <p class=
"description">Bytes written or -
1 on error
</p>
2083 <h3 class=
"function"><a name=
"httpFreeCredentials">httpFreeCredentials
</a></h3>
2084 <p class=
"description">Free an array of credentials.
</p>
2086 void httpFreeCredentials (
<br>
2087 cups_array_t *credentials
<br>
2089 <h4 class=
"parameters">Parameters
</h4>
2091 <dt>credentials
</dt>
2092 <dd class=
"description">Array of credentials
</dd>
2094 <h3 class=
"function"><a name=
"httpGet">httpGet
</a></h3>
2095 <p class=
"description">Send a GET request to the server.
</p>
2098 <a href=
"#http_t">http_t
</a> *http,
<br>
2099 const char *uri
<br>
2101 <h4 class=
"parameters">Parameters
</h4>
2104 <dd class=
"description">HTTP connection
</dd>
2106 <dd class=
"description">URI to get
</dd>
2108 <h4 class=
"returnvalue">Return Value
</h4>
2109 <p class=
"description">Status of call (
0 = success)
</p>
2110 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpGetActivity">httpGetActivity
</a></h3>
2111 <p class=
"description">Get the most recent activity for a connection.
</p>
2113 time_t httpGetActivity (
<br>
2114 <a href=
"#http_t">http_t
</a> *http
<br>
2116 <h4 class=
"parameters">Parameters
</h4>
2119 <dd class=
"description">HTTP connection
</dd>
2121 <h4 class=
"returnvalue">Return Value
</h4>
2122 <p class=
"description">Time of last read or write
</p>
2123 <h4 class=
"discussion">Discussion
</h4>
2124 <p class=
"discussion">The return value is the UNIX time of the last read or write.
2127 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpGetAddress">httpGetAddress
</a></h3>
2128 <p class=
"description">Get the address of the connected peer of a connection.
</p>
2130 <a href=
"#http_addr_t">http_addr_t
</a> *httpGetAddress (
<br>
2131 <a href=
"#http_t">http_t
</a> *http
<br>
2133 <h4 class=
"parameters">Parameters
</h4>
2136 <dd class=
"description">HTTP connection
</dd>
2138 <h4 class=
"returnvalue">Return Value
</h4>
2139 <p class=
"description">Connected address or
<code>NULL
</code></p>
2140 <h4 class=
"discussion">Discussion
</h4>
2141 <p class=
"discussion">Returns
<code>NULL
</code> if the socket is currently unconnected.
2144 <h3 class=
"function"><span class=
"info"> CUPS
1.3/OS X
10.5 </span><a name=
"httpGetAuthString">httpGetAuthString
</a></h3>
2145 <p class=
"description">Get the current authorization string.
</p>
2147 char *httpGetAuthString (
<br>
2148 <a href=
"#http_t">http_t
</a> *http
<br>
2150 <h4 class=
"parameters">Parameters
</h4>
2153 <dd class=
"description">HTTP connection
</dd>
2155 <h4 class=
"returnvalue">Return Value
</h4>
2156 <p class=
"description">Authorization string
</p>
2157 <h4 class=
"discussion">Discussion
</h4>
2158 <p class=
"discussion">The authorization string is set by cupsDoAuthentication() and
2159 httpSetAuthString(). Use httpGetAuthString() to retrieve the
2160 string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
2164 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"httpGetBlocking">httpGetBlocking
</a></h3>
2165 <p class=
"description">Get the blocking/non-block state of a connection.
</p>
2167 int httpGetBlocking (
<br>
2168 <a href=
"#http_t">http_t
</a> *http
<br>
2170 <h4 class=
"parameters">Parameters
</h4>
2173 <dd class=
"description">HTTP connection
</dd>
2175 <h4 class=
"returnvalue">Return Value
</h4>
2176 <p class=
"description">1 if blocking,
0 if non-blocking
</p>
2177 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"httpGetContentEncoding">httpGetContentEncoding
</a></h3>
2178 <p class=
"description">Get a common content encoding, if any, between
2179 the client and server.
</p>
2181 const char *httpGetContentEncoding (
<br>
2182 <a href=
"#http_t">http_t
</a> *http
<br>
2184 <h4 class=
"parameters">Parameters
</h4>
2187 <dd class=
"description">HTTP connection
</dd>
2189 <h4 class=
"returnvalue">Return Value
</h4>
2190 <p class=
"description">Content-Coding value or
2191 <code>NULL
</code> for the identity
2193 <h4 class=
"discussion">Discussion
</h4>
2194 <p class=
"discussion">This function uses the value of the Accepts-Encoding HTTP header and must be
2195 called after receiving a response from the server or a request from the
2196 client. The value returned can be use in subsequent requests (for clients)
2197 or in the response (for servers) in order to compress the content stream.
2200 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/OS X
10.3 </span><a name=
"httpGetCookie">httpGetCookie
</a></h3>
2201 <p class=
"description">Get any cookie data from the response.
</p>
2203 const char *httpGetCookie (
<br>
2204 <a href=
"#http_t">http_t
</a> *http
<br>
2206 <h4 class=
"parameters">Parameters
</h4>
2209 <dd class=
"description">HTTP connection
</dd>
2211 <h4 class=
"returnvalue">Return Value
</h4>
2212 <p class=
"description">Cookie data or NULL
</p>
2213 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetDateString">httpGetDateString
</a></h3>
2214 <p class=
"description">Get a formatted date/time string from a time value.
</p>
2216 const char *httpGetDateString (
<br>
2217 time_t t
<br>
2219 <h4 class=
"parameters">Parameters
</h4>
2222 <dd class=
"description">UNIX time
</dd>
2224 <h4 class=
"returnvalue">Return Value
</h4>
2225 <p class=
"description">Date/time string
</p>
2226 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"httpGetDateString2">httpGetDateString2
</a></h3>
2227 <p class=
"description">Get a formatted date/time string from a time value.
</p>
2229 const char *httpGetDateString2 (
<br>
2230 time_t t,
<br>
2231 char *s,
<br>
2232 int slen
<br>
2234 <h4 class=
"parameters">Parameters
</h4>
2237 <dd class=
"description">UNIX time
</dd>
2239 <dd class=
"description">String buffer
</dd>
2241 <dd class=
"description">Size of string buffer
</dd>
2243 <h4 class=
"returnvalue">Return Value
</h4>
2244 <p class=
"description">Date/time string
</p>
2245 <h3 class=
"function"><a name=
"httpGetDateTime">httpGetDateTime
</a></h3>
2246 <p class=
"description">Get a time value from a formatted date/time string.
</p>
2248 time_t httpGetDateTime (
<br>
2249 const char *s
<br>
2251 <h4 class=
"parameters">Parameters
</h4>
2254 <dd class=
"description">Date/time string
</dd>
2256 <h4 class=
"returnvalue">Return Value
</h4>
2257 <p class=
"description">UNIX time
</p>
2258 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpGetEncryption">httpGetEncryption
</a></h3>
2259 <p class=
"description">Get the current encryption mode of a connection.
</p>
2261 <a href=
"#http_encryption_t">http_encryption_t
</a> httpGetEncryption (
<br>
2262 <a href=
"#http_t">http_t
</a> *http
<br>
2264 <h4 class=
"parameters">Parameters
</h4>
2267 <dd class=
"description">HTTP connection
</dd>
2269 <h4 class=
"returnvalue">Return Value
</h4>
2270 <p class=
"description">Current encryption mode
</p>
2271 <h4 class=
"discussion">Discussion
</h4>
2272 <p class=
"discussion">This function returns the encryption mode for the connection. Use the
2273 <a href=
"#httpIsEncrypted"><code>httpIsEncrypted
</code></a> function to determine whether a TLS session has
2277 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"httpGetExpect">httpGetExpect
</a></h3>
2278 <p class=
"description">Get the value of the Expect header, if any.
</p>
2280 http_status_t httpGetExpect (
<br>
2281 <a href=
"#http_t">http_t
</a> *http
<br>
2283 <h4 class=
"parameters">Parameters
</h4>
2286 <dd class=
"description">HTTP connection
</dd>
2288 <h4 class=
"returnvalue">Return Value
</h4>
2289 <p class=
"description">Expect: status, if any
</p>
2290 <h4 class=
"discussion">Discussion
</h4>
2291 <p class=
"discussion">Returns
<code>HTTP_STATUS_NONE
</code> if there is no Expect header, otherwise
2292 returns the expected HTTP status code, typically
<code>HTTP_STATUS_CONTINUE
</code>.
2295 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"httpGetFd">httpGetFd
</a></h3>
2296 <p class=
"description">Get the file descriptor associated with a connection.
</p>
2299 <a href=
"#http_t">http_t
</a> *http
<br>
2301 <h4 class=
"parameters">Parameters
</h4>
2304 <dd class=
"description">HTTP connection
</dd>
2306 <h4 class=
"returnvalue">Return Value
</h4>
2307 <p class=
"description">File descriptor or -
1 if none
</p>
2308 <h3 class=
"function"><a name=
"httpGetField">httpGetField
</a></h3>
2309 <p class=
"description">Get a field value from a request/response.
</p>
2311 const char *httpGetField (
<br>
2312 <a href=
"#http_t">http_t
</a> *http,
<br>
2313 <a href=
"#http_field_t">http_field_t
</a> field
<br>
2315 <h4 class=
"parameters">Parameters
</h4>
2318 <dd class=
"description">HTTP connection
</dd>
2320 <dd class=
"description">Field to get
</dd>
2322 <h4 class=
"returnvalue">Return Value
</h4>
2323 <p class=
"description">Field value
</p>
2324 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetHostByName">httpGetHostByName
</a></h3>
2325 <p class=
"description">Lookup a hostname or IPv4 address, and return
2326 address records for the specified name.
</p>
2328 struct hostent *httpGetHostByName (
<br>
2329 const char *name
<br>
2331 <h4 class=
"parameters">Parameters
</h4>
2334 <dd class=
"description">Hostname or IP address
</dd>
2336 <h4 class=
"returnvalue">Return Value
</h4>
2337 <p class=
"description">Host entry
</p>
2338 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"httpGetHostname">httpGetHostname
</a></h3>
2339 <p class=
"description">Get the FQDN for the connection or local system.
</p>
2341 const char *httpGetHostname (
<br>
2342 <a href=
"#http_t">http_t
</a> *http,
<br>
2343 char *s,
<br>
2344 int slen
<br>
2346 <h4 class=
"parameters">Parameters
</h4>
2349 <dd class=
"description">HTTP connection or NULL
</dd>
2351 <dd class=
"description">String buffer for name
</dd>
2353 <dd class=
"description">Size of buffer
</dd>
2355 <h4 class=
"returnvalue">Return Value
</h4>
2356 <p class=
"description">FQDN for connection or system
</p>
2357 <h4 class=
"discussion">Discussion
</h4>
2358 <p class=
"discussion">When
"http
" points to a connected socket, return the hostname or
2359 address that was used in the call to httpConnect() or httpConnectEncrypt(),
2360 or the address of the client for the connection from httpAcceptConnection().
2361 Otherwise, return the FQDN for the local system using both gethostname()
2362 and gethostbyname() to get the local hostname with domain.
2365 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpGetKeepAlive">httpGetKeepAlive
</a></h3>
2366 <p class=
"description">Get the current Keep-Alive state of the connection.
</p>
2368 <a href=
"#http_keepalive_t">http_keepalive_t
</a> httpGetKeepAlive (
<br>
2369 <a href=
"#http_t">http_t
</a> *http
<br>
2371 <h4 class=
"parameters">Parameters
</h4>
2374 <dd class=
"description">HTTP connection
</dd>
2376 <h4 class=
"returnvalue">Return Value
</h4>
2377 <p class=
"description">Keep-Alive state
</p>
2378 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetLength">httpGetLength
</a></h3>
2379 <p class=
"description">Get the amount of data remaining from the
2380 content-length or transfer-encoding fields.
</p>
2382 int httpGetLength (
<br>
2383 <a href=
"#http_t">http_t
</a> *http
<br>
2385 <h4 class=
"parameters">Parameters
</h4>
2388 <dd class=
"description">HTTP connection
</dd>
2390 <h4 class=
"returnvalue">Return Value
</h4>
2391 <p class=
"description">Content length
</p>
2392 <h4 class=
"discussion">Discussion
</h4>
2393 <p class=
"discussion">This function is deprecated and will not return lengths larger than
2394 2^
31 -
1; use httpGetLength2() instead.
2397 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"httpGetLength2">httpGetLength2
</a></h3>
2398 <p class=
"description">Get the amount of data remaining from the
2399 content-length or transfer-encoding fields.
</p>
2401 off_t httpGetLength2 (
<br>
2402 <a href=
"#http_t">http_t
</a> *http
<br>
2404 <h4 class=
"parameters">Parameters
</h4>
2407 <dd class=
"description">HTTP connection
</dd>
2409 <h4 class=
"returnvalue">Return Value
</h4>
2410 <p class=
"description">Content length
</p>
2411 <h4 class=
"discussion">Discussion
</h4>
2412 <p class=
"discussion">This function returns the complete content length, even for
2413 content larger than
2^
31 -
1.
2416 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpGetPending">httpGetPending
</a></h3>
2417 <p class=
"description">Get the number of bytes that are buffered for writing.
</p>
2419 size_t httpGetPending (
<br>
2420 <a href=
"#http_t">http_t
</a> *http
<br>
2422 <h4 class=
"parameters">Parameters
</h4>
2425 <dd class=
"description">HTTP connection
</dd>
2427 <h4 class=
"returnvalue">Return Value
</h4>
2428 <p class=
"description">Number of bytes buffered
</p>
2429 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpGetReady">httpGetReady
</a></h3>
2430 <p class=
"description">Get the number of bytes that can be read without blocking.
</p>
2432 size_t httpGetReady (
<br>
2433 <a href=
"#http_t">http_t
</a> *http
<br>
2435 <h4 class=
"parameters">Parameters
</h4>
2438 <dd class=
"description">HTTP connection
</dd>
2440 <h4 class=
"returnvalue">Return Value
</h4>
2441 <p class=
"description">Number of bytes available
</p>
2442 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpGetRemaining">httpGetRemaining
</a></h3>
2443 <p class=
"description">Get the number of remaining bytes in the message
2444 body or current chunk.
</p>
2446 size_t httpGetRemaining (
<br>
2447 <a href=
"#http_t">http_t
</a> *http
<br>
2449 <h4 class=
"parameters">Parameters
</h4>
2452 <dd class=
"description">HTTP connection
</dd>
2454 <h4 class=
"returnvalue">Return Value
</h4>
2455 <p class=
"description">Remaining bytes
</p>
2456 <h4 class=
"discussion">Discussion
</h4>
2457 <p class=
"discussion">The
<a href=
"#httpIsChunked"><code>httpIsChunked
</code></a> function can be used to determine whether the
2458 message body is chunked or fixed-length.
2461 <h3 class=
"function"><a name=
"httpGetState">httpGetState
</a></h3>
2462 <p class=
"description">Get the current state of the HTTP request.
</p>
2464 <a href=
"#http_state_t">http_state_t
</a> httpGetState (
<br>
2465 <a href=
"#http_t">http_t
</a> *http
<br>
2467 <h4 class=
"parameters">Parameters
</h4>
2470 <dd class=
"description">HTTP connection
</dd>
2472 <h4 class=
"returnvalue">Return Value
</h4>
2473 <p class=
"description">HTTP state
</p>
2474 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"httpGetStatus">httpGetStatus
</a></h3>
2475 <p class=
"description">Get the status of the last HTTP request.
</p>
2477 http_status_t httpGetStatus (
<br>
2478 <a href=
"#http_t">http_t
</a> *http
<br>
2480 <h4 class=
"parameters">Parameters
</h4>
2483 <dd class=
"description">HTTP connection
</dd>
2485 <h4 class=
"returnvalue">Return Value
</h4>
2486 <p class=
"description">HTTP status
</p>
2487 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetSubField">httpGetSubField
</a></h3>
2488 <p class=
"description">Get a sub-field value.
</p>
2490 char *httpGetSubField (
<br>
2491 <a href=
"#http_t">http_t
</a> *http,
<br>
2492 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
2493 const char *name,
<br>
2494 char *value
<br>
2496 <h4 class=
"parameters">Parameters
</h4>
2499 <dd class=
"description">HTTP connection
</dd>
2501 <dd class=
"description">Field index
</dd>
2503 <dd class=
"description">Name of sub-field
</dd>
2505 <dd class=
"description">Value string
</dd>
2507 <h4 class=
"returnvalue">Return Value
</h4>
2508 <p class=
"description">Value or NULL
</p>
2509 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"httpGetSubField2">httpGetSubField2
</a></h3>
2510 <p class=
"description">Get a sub-field value.
</p>
2512 char *httpGetSubField2 (
<br>
2513 <a href=
"#http_t">http_t
</a> *http,
<br>
2514 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
2515 const char *name,
<br>
2516 char *value,
<br>
2517 int valuelen
<br>
2519 <h4 class=
"parameters">Parameters
</h4>
2522 <dd class=
"description">HTTP connection
</dd>
2524 <dd class=
"description">Field index
</dd>
2526 <dd class=
"description">Name of sub-field
</dd>
2528 <dd class=
"description">Value string
</dd>
2530 <dd class=
"description">Size of value buffer
</dd>
2532 <h4 class=
"returnvalue">Return Value
</h4>
2533 <p class=
"description">Value or NULL
</p>
2534 <h3 class=
"function"><a name=
"httpGetVersion">httpGetVersion
</a></h3>
2535 <p class=
"description">Get the HTTP version at the other end.
</p>
2537 <a href=
"#http_version_t">http_version_t
</a> httpGetVersion (
<br>
2538 <a href=
"#http_t">http_t
</a> *http
<br>
2540 <h4 class=
"parameters">Parameters
</h4>
2543 <dd class=
"description">HTTP connection
</dd>
2545 <h4 class=
"returnvalue">Return Value
</h4>
2546 <p class=
"description">Version number
</p>
2547 <h3 class=
"function"><a name=
"httpGets">httpGets
</a></h3>
2548 <p class=
"description">Get a line of text from a HTTP connection.
</p>
2550 char *httpGets (
<br>
2551 char *line,
<br>
2552 int length,
<br>
2553 <a href=
"#http_t">http_t
</a> *http
<br>
2555 <h4 class=
"parameters">Parameters
</h4>
2558 <dd class=
"description">Line to read into
</dd>
2560 <dd class=
"description">Max length of buffer
</dd>
2562 <dd class=
"description">HTTP connection
</dd>
2564 <h4 class=
"returnvalue">Return Value
</h4>
2565 <p class=
"description">Line or NULL
</p>
2566 <h3 class=
"function"><a name=
"httpHead">httpHead
</a></h3>
2567 <p class=
"description">Send a HEAD request to the server.
</p>
2570 <a href=
"#http_t">http_t
</a> *http,
<br>
2571 const char *uri
<br>
2573 <h4 class=
"parameters">Parameters
</h4>
2576 <dd class=
"description">HTTP connection
</dd>
2578 <dd class=
"description">URI for head
</dd>
2580 <h4 class=
"returnvalue">Return Value
</h4>
2581 <p class=
"description">Status of call (
0 = success)
</p>
2582 <h3 class=
"function"><a name=
"httpInitialize">httpInitialize
</a></h3>
2583 <p class=
"description">Initialize the HTTP interface library and set the
2584 default HTTP proxy (if any).
</p>
2586 void httpInitialize (void);
</p>
2587 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpIsChunked">httpIsChunked
</a></h3>
2588 <p class=
"description">Report whether a message body is chunked.
</p>
2590 int httpIsChunked (
<br>
2591 <a href=
"#http_t">http_t
</a> *http
<br>
2593 <h4 class=
"parameters">Parameters
</h4>
2596 <dd class=
"description">HTTP connection
</dd>
2598 <h4 class=
"returnvalue">Return Value
</h4>
2599 <p class=
"description">1 if chunked,
0 if not
</p>
2600 <h4 class=
"discussion">Discussion
</h4>
2601 <p class=
"discussion">This function returns non-zero if the message body is composed of
2602 variable-length chunks.
2605 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpIsEncrypted">httpIsEncrypted
</a></h3>
2606 <p class=
"description">Report whether a connection is encrypted.
</p>
2608 int httpIsEncrypted (
<br>
2609 <a href=
"#http_t">http_t
</a> *http
<br>
2611 <h4 class=
"parameters">Parameters
</h4>
2614 <dd class=
"description">HTTP connection
</dd>
2616 <h4 class=
"returnvalue">Return Value
</h4>
2617 <p class=
"description">1 if encrypted,
0 if not
</p>
2618 <h4 class=
"discussion">Discussion
</h4>
2619 <p class=
"discussion">This function returns non-zero if the connection is currently encrypted.
2622 <h3 class=
"function"><a name=
"httpMD5">httpMD5
</a></h3>
2623 <p class=
"description">Compute the MD5 sum of the username:group:password.
</p>
2626 const char *username,
<br>
2627 const char *realm,
<br>
2628 const char *passwd,
<br>
2629 char md5[
33]
<br>
2631 <h4 class=
"parameters">Parameters
</h4>
2634 <dd class=
"description">User name
</dd>
2636 <dd class=
"description">Realm name
</dd>
2638 <dd class=
"description">Password string
</dd>
2640 <dd class=
"description">MD5 string
</dd>
2642 <h4 class=
"returnvalue">Return Value
</h4>
2643 <p class=
"description">MD5 sum
</p>
2644 <h3 class=
"function"><a name=
"httpMD5Final">httpMD5Final
</a></h3>
2645 <p class=
"description">Combine the MD5 sum of the username, group, and password
2646 with the server-supplied nonce value, method, and
2649 char *httpMD5Final (
<br>
2650 const char *nonce,
<br>
2651 const char *method,
<br>
2652 const char *resource,
<br>
2653 char md5[
33]
<br>
2655 <h4 class=
"parameters">Parameters
</h4>
2658 <dd class=
"description">Server nonce value
</dd>
2660 <dd class=
"description">METHOD (GET, POST, etc.)
</dd>
2662 <dd class=
"description">Resource path
</dd>
2664 <dd class=
"description">MD5 sum
</dd>
2666 <h4 class=
"returnvalue">Return Value
</h4>
2667 <p class=
"description">New sum
</p>
2668 <h3 class=
"function"><a name=
"httpMD5String">httpMD5String
</a></h3>
2669 <p class=
"description">Convert an MD5 sum to a character string.
</p>
2671 char *httpMD5String (
<br>
2672 const unsigned char *sum,
<br>
2673 char md5[
33]
<br>
2675 <h4 class=
"parameters">Parameters
</h4>
2678 <dd class=
"description">MD5 sum data
</dd>
2680 <dd class=
"description">MD5 sum in hex
</dd>
2682 <h4 class=
"returnvalue">Return Value
</h4>
2683 <p class=
"description">MD5 sum in hex
</p>
2684 <h3 class=
"function"><a name=
"httpOptions">httpOptions
</a></h3>
2685 <p class=
"description">Send an OPTIONS request to the server.
</p>
2687 int httpOptions (
<br>
2688 <a href=
"#http_t">http_t
</a> *http,
<br>
2689 const char *uri
<br>
2691 <h4 class=
"parameters">Parameters
</h4>
2694 <dd class=
"description">HTTP connection
</dd>
2696 <dd class=
"description">URI for options
</dd>
2698 <h4 class=
"returnvalue">Return Value
</h4>
2699 <p class=
"description">Status of call (
0 = success)
</p>
2700 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"httpPeek">httpPeek
</a></h3>
2701 <p class=
"description">Peek at data from a HTTP connection.
</p>
2703 ssize_t httpPeek (
<br>
2704 <a href=
"#http_t">http_t
</a> *http,
<br>
2705 char *buffer,
<br>
2706 size_t length
<br>
2708 <h4 class=
"parameters">Parameters
</h4>
2711 <dd class=
"description">HTTP connection
</dd>
2713 <dd class=
"description">Buffer for data
</dd>
2715 <dd class=
"description">Maximum number of bytes
</dd>
2717 <h4 class=
"returnvalue">Return Value
</h4>
2718 <p class=
"description">Number of bytes copied
</p>
2719 <h4 class=
"discussion">Discussion
</h4>
2720 <p class=
"discussion">This function copies available data from the given HTTP connection, reading
2721 a buffer as needed. The data is still available for reading using
2722 <a href=
"#httpRead"><code>httpRead
</code></a> or
<a href=
"#httpRead2"><code>httpRead2
</code></a>.
<br>
2724 For non-blocking connections the usual timeouts apply.
2727 <h3 class=
"function"><a name=
"httpPost">httpPost
</a></h3>
2728 <p class=
"description">Send a POST request to the server.
</p>
2731 <a href=
"#http_t">http_t
</a> *http,
<br>
2732 const char *uri
<br>
2734 <h4 class=
"parameters">Parameters
</h4>
2737 <dd class=
"description">HTTP connection
</dd>
2739 <dd class=
"description">URI for post
</dd>
2741 <h4 class=
"returnvalue">Return Value
</h4>
2742 <p class=
"description">Status of call (
0 = success)
</p>
2743 <h3 class=
"function"><a name=
"httpPut">httpPut
</a></h3>
2744 <p class=
"description">Send a PUT request to the server.
</p>
2747 <a href=
"#http_t">http_t
</a> *http,
<br>
2748 const char *uri
<br>
2750 <h4 class=
"parameters">Parameters
</h4>
2753 <dd class=
"description">HTTP connection
</dd>
2755 <dd class=
"description">URI to put
</dd>
2757 <h4 class=
"returnvalue">Return Value
</h4>
2758 <p class=
"description">Status of call (
0 = success)
</p>
2759 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpRead">httpRead
</a></h3>
2760 <p class=
"description">Read data from a HTTP connection.
</p>
2763 <a href=
"#http_t">http_t
</a> *http,
<br>
2764 char *buffer,
<br>
2765 int length
<br>
2767 <h4 class=
"parameters">Parameters
</h4>
2770 <dd class=
"description">HTTP connection
</dd>
2772 <dd class=
"description">Buffer for data
</dd>
2774 <dd class=
"description">Maximum number of bytes
</dd>
2776 <h4 class=
"returnvalue">Return Value
</h4>
2777 <p class=
"description">Number of bytes read
</p>
2778 <h4 class=
"discussion">Discussion
</h4>
2779 <p class=
"discussion">This function is deprecated. Use the httpRead2() function which can
2780 read more than
2GB of data.
2783 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"httpRead2">httpRead2
</a></h3>
2784 <p class=
"description">Read data from a HTTP connection.
</p>
2786 ssize_t httpRead2 (
<br>
2787 <a href=
"#http_t">http_t
</a> *http,
<br>
2788 char *buffer,
<br>
2789 size_t length
<br>
2791 <h4 class=
"parameters">Parameters
</h4>
2794 <dd class=
"description">HTTP connection
</dd>
2796 <dd class=
"description">Buffer for data
</dd>
2798 <dd class=
"description">Maximum number of bytes
</dd>
2800 <h4 class=
"returnvalue">Return Value
</h4>
2801 <p class=
"description">Number of bytes read
</p>
2802 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"httpReadRequest">httpReadRequest
</a></h3>
2803 <p class=
"description">Read a HTTP request from a connection.
</p>
2805 <a href=
"#http_state_t">http_state_t
</a> httpReadRequest (
<br>
2806 <a href=
"#http_t">http_t
</a> *http,
<br>
2807 char *uri,
<br>
2808 size_t urilen
<br>
2810 <h4 class=
"parameters">Parameters
</h4>
2813 <dd class=
"description">HTTP connection
</dd>
2815 <dd class=
"description">URI buffer
</dd>
2817 <dd class=
"description">Size of URI buffer
</dd>
2819 <h4 class=
"returnvalue">Return Value
</h4>
2820 <p class=
"description">New state of connection
</p>
2821 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpReconnect">httpReconnect
</a></h3>
2822 <p class=
"description">Reconnect to a HTTP server.
</p>
2824 int httpReconnect (
<br>
2825 <a href=
"#http_t">http_t
</a> *http
<br>
2827 <h4 class=
"parameters">Parameters
</h4>
2830 <dd class=
"description">HTTP connection
</dd>
2832 <h4 class=
"returnvalue">Return Value
</h4>
2833 <p class=
"description">0 on success, non-zero on failure
</p>
2834 <h4 class=
"discussion">Discussion
</h4>
2835 <p class=
"discussion">This function is deprecated. Please use the
<a href=
"#httpReconnect2"><code>httpReconnect2
</code></a> function
2839 <h3 class=
"function"><a name=
"httpReconnect2">httpReconnect2
</a></h3>
2840 <p class=
"description">Reconnect to a HTTP server with timeout and optional
2843 int httpReconnect2 (
<br>
2844 <a href=
"#http_t">http_t
</a> *http,
<br>
2845 int msec,
<br>
2846 int *cancel
<br>
2848 <h4 class=
"parameters">Parameters
</h4>
2851 <dd class=
"description">HTTP connection
</dd>
2853 <dd class=
"description">Timeout in milliseconds
</dd>
2855 <dd class=
"description">Pointer to
"cancel
" variable
</dd>
2857 <h4 class=
"returnvalue">Return Value
</h4>
2858 <p class=
"description">0 on success, non-zero on failure
</p>
2859 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpResolveHostname">httpResolveHostname
</a></h3>
2860 <p class=
"description">Resolve the hostname of the HTTP connection
2863 const char *httpResolveHostname (
<br>
2864 <a href=
"#http_t">http_t
</a> *http,
<br>
2865 char *buffer,
<br>
2866 size_t bufsize
<br>
2868 <h4 class=
"parameters">Parameters
</h4>
2871 <dd class=
"description">HTTP connection
</dd>
2873 <dd class=
"description">Hostname buffer
</dd>
2875 <dd class=
"description">Size of buffer
</dd>
2877 <h4 class=
"returnvalue">Return Value
</h4>
2878 <p class=
"description">Resolved hostname or
<code>NULL
</code></p>
2879 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpSeparate">httpSeparate
</a></h3>
2880 <p class=
"description">Separate a Universal Resource Identifier into its
2883 void httpSeparate (
<br>
2884 const char *uri,
<br>
2885 char *scheme,
<br>
2886 char *username,
<br>
2887 char *host,
<br>
2888 int *port,
<br>
2889 char *resource
<br>
2891 <h4 class=
"parameters">Parameters
</h4>
2894 <dd class=
"description">Universal Resource Identifier
</dd>
2896 <dd class=
"description">Scheme [
32] (http, https, etc.)
</dd>
2898 <dd class=
"description">Username [
1024]
</dd>
2900 <dd class=
"description">Hostname [
1024]
</dd>
2902 <dd class=
"description">Port number to use
</dd>
2904 <dd class=
"description">Resource/filename [
1024]
</dd>
2906 <h4 class=
"discussion">Discussion
</h4>
2907 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
2910 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/OS X
10.4 </span><a name=
"httpSeparate2">httpSeparate2
</a></h3>
2911 <p class=
"description">Separate a Universal Resource Identifier into its
2914 void httpSeparate2 (
<br>
2915 const char *uri,
<br>
2916 char *scheme,
<br>
2917 int schemelen,
<br>
2918 char *username,
<br>
2919 int usernamelen,
<br>
2920 char *host,
<br>
2921 int hostlen,
<br>
2922 int *port,
<br>
2923 char *resource,
<br>
2924 int resourcelen
<br>
2926 <h4 class=
"parameters">Parameters
</h4>
2929 <dd class=
"description">Universal Resource Identifier
</dd>
2931 <dd class=
"description">Scheme (http, https, etc.)
</dd>
2933 <dd class=
"description">Size of scheme buffer
</dd>
2935 <dd class=
"description">Username
</dd>
2936 <dt>usernamelen
</dt>
2937 <dd class=
"description">Size of username buffer
</dd>
2939 <dd class=
"description">Hostname
</dd>
2941 <dd class=
"description">Size of hostname buffer
</dd>
2943 <dd class=
"description">Port number to use
</dd>
2945 <dd class=
"description">Resource/filename
</dd>
2946 <dt>resourcelen
</dt>
2947 <dd class=
"description">Size of resource buffer
</dd>
2949 <h4 class=
"discussion">Discussion
</h4>
2950 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
2954 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"httpSeparateURI">httpSeparateURI
</a></h3>
2955 <p class=
"description">Separate a Universal Resource Identifier into its
2958 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpSeparateURI (
<br>
2959 <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> decoding,
<br>
2960 const char *uri,
<br>
2961 char *scheme,
<br>
2962 int schemelen,
<br>
2963 char *username,
<br>
2964 int usernamelen,
<br>
2965 char *host,
<br>
2966 int hostlen,
<br>
2967 int *port,
<br>
2968 char *resource,
<br>
2969 int resourcelen
<br>
2971 <h4 class=
"parameters">Parameters
</h4>
2974 <dd class=
"description">Decoding flags
</dd>
2976 <dd class=
"description">Universal Resource Identifier
</dd>
2978 <dd class=
"description">Scheme (http, https, etc.)
</dd>
2980 <dd class=
"description">Size of scheme buffer
</dd>
2982 <dd class=
"description">Username
</dd>
2983 <dt>usernamelen
</dt>
2984 <dd class=
"description">Size of username buffer
</dd>
2986 <dd class=
"description">Hostname
</dd>
2988 <dd class=
"description">Size of hostname buffer
</dd>
2990 <dd class=
"description">Port number to use
</dd>
2992 <dd class=
"description">Resource/filename
</dd>
2993 <dt>resourcelen
</dt>
2994 <dd class=
"description">Size of resource buffer
</dd>
2996 <h4 class=
"returnvalue">Return Value
</h4>
2997 <p class=
"description">Result of separation
</p>
2998 <h3 class=
"function"><span class=
"info"> CUPS
1.3/OS X
10.5 </span><a name=
"httpSetAuthString">httpSetAuthString
</a></h3>
2999 <p class=
"description">Set the current authorization string.
</p>
3001 void httpSetAuthString (
<br>
3002 <a href=
"#http_t">http_t
</a> *http,
<br>
3003 const char *scheme,
<br>
3004 const char *data
<br>
3006 <h4 class=
"parameters">Parameters
</h4>
3009 <dd class=
"description">HTTP connection
</dd>
3011 <dd class=
"description">Auth scheme (NULL to clear it)
</dd>
3013 <dd class=
"description">Auth data (NULL for none)
</dd>
3015 <h4 class=
"discussion">Discussion
</h4>
3016 <p class=
"discussion">This function just stores a copy of the current authorization string in
3017 the HTTP connection object. You must still call httpSetField() to set
3018 HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
3019 httpHead(), httpOptions(), httpPost, or httpPut().
3022 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/OS X
10.3 </span><a name=
"httpSetCookie">httpSetCookie
</a></h3>
3023 <p class=
"description">Set the cookie value(s).
</p>
3025 void httpSetCookie (
<br>
3026 <a href=
"#http_t">http_t
</a> *http,
<br>
3027 const char *cookie
<br>
3029 <h4 class=
"parameters">Parameters
</h4>
3032 <dd class=
"description">Connection
</dd>
3034 <dd class=
"description">Cookie string
</dd>
3036 <h3 class=
"function"><span class=
"info"> CUPS
1.5/OS X
10.7 </span><a name=
"httpSetCredentials">httpSetCredentials
</a></h3>
3037 <p class=
"description">Set the credentials associated with an encrypted
3040 int httpSetCredentials (
<br>
3041 <a href=
"#http_t">http_t
</a> *http,
<br>
3042 cups_array_t *credentials
<br>
3044 <h4 class=
"parameters">Parameters
</h4>
3047 <dd class=
"description">HTTP connection
</dd>
3048 <dt>credentials
</dt>
3049 <dd class=
"description">Array of credentials
</dd>
3051 <h4 class=
"returnvalue">Return Value
</h4>
3052 <p class=
"description">Status of call (
0 = success)
</p>
3053 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"httpSetDefaultField">httpSetDefaultField
</a></h3>
3054 <p class=
"description">Set the default value of an HTTP header.
</p>
3056 void httpSetDefaultField (
<br>
3057 <a href=
"#http_t">http_t
</a> *http,
<br>
3058 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
3059 const char *value
<br>
3061 <h4 class=
"parameters">Parameters
</h4>
3064 <dd class=
"description">HTTP connection
</dd>
3066 <dd class=
"description">Field index
</dd>
3068 <dd class=
"description">Value
</dd>
3070 <h4 class=
"discussion">Discussion
</h4>
3071 <p class=
"discussion">Currently only
<code>HTTP_FIELD_ACCEPT_ENCODING
</code>,
<code>HTTP_FIELD_SERVER
</code>,
3072 and
<code>HTTP_FIELD_USER_AGENT
</code> can be set.
3075 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"httpSetExpect">httpSetExpect
</a></h3>
3076 <p class=
"description">Set the Expect: header in a request.
</p>
3078 void httpSetExpect (
<br>
3079 <a href=
"#http_t">http_t
</a> *http,
<br>
3080 http_status_t expect
<br>
3082 <h4 class=
"parameters">Parameters
</h4>
3085 <dd class=
"description">HTTP connection
</dd>
3087 <dd class=
"description">HTTP status to expect
3088 (
<code>HTTP_STATUS_CONTINUE
</code>)
</dd>
3090 <h4 class=
"discussion">Discussion
</h4>
3091 <p class=
"discussion">Currently only
<code>HTTP_STATUS_CONTINUE
</code> is supported for the
"expect
"
3095 <h3 class=
"function"><a name=
"httpSetField">httpSetField
</a></h3>
3096 <p class=
"description">Set the value of an HTTP header.
</p>
3098 void httpSetField (
<br>
3099 <a href=
"#http_t">http_t
</a> *http,
<br>
3100 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
3101 const char *value
<br>
3103 <h4 class=
"parameters">Parameters
</h4>
3106 <dd class=
"description">HTTP connection
</dd>
3108 <dd class=
"description">Field index
</dd>
3110 <dd class=
"description">Value
</dd>
3112 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpSetKeepAlive">httpSetKeepAlive
</a></h3>
3113 <p class=
"description">Set the current Keep-Alive state of a connection.
</p>
3115 void httpSetKeepAlive (
<br>
3116 <a href=
"#http_t">http_t
</a> *http,
<br>
3117 <a href=
"#http_keepalive_t">http_keepalive_t
</a> keep_alive
<br>
3119 <h4 class=
"parameters">Parameters
</h4>
3122 <dd class=
"description">HTTP connection
</dd>
3124 <dd class=
"description">New Keep-Alive value
</dd>
3126 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"httpSetLength">httpSetLength
</a></h3>
3127 <p class=
"description">Set the content-length and content-encoding.
</p>
3129 void httpSetLength (
<br>
3130 <a href=
"#http_t">http_t
</a> *http,
<br>
3131 size_t length
<br>
3133 <h4 class=
"parameters">Parameters
</h4>
3136 <dd class=
"description">HTTP connection
</dd>
3138 <dd class=
"description">Length (
0 for chunked)
</dd>
3140 <h3 class=
"function"><span class=
"info"> CUPS
1.5/OS X
10.7 </span><a name=
"httpSetTimeout">httpSetTimeout
</a></h3>
3141 <p class=
"description">Set read/write timeouts and an optional callback.
</p>
3143 void httpSetTimeout (
<br>
3144 <a href=
"#http_t">http_t
</a> *http,
<br>
3145 double timeout,
<br>
3146 <a href=
"#http_timeout_cb_t">http_timeout_cb_t
</a> cb,
<br>
3147 void *user_data
<br>
3149 <h4 class=
"parameters">Parameters
</h4>
3152 <dd class=
"description">HTTP connection
</dd>
3154 <dd class=
"description">Number of seconds for timeout,
3155 must be greater than
0</dd>
3157 <dd class=
"description">Callback function or NULL
</dd>
3159 <dd class=
"description">User data pointer
</dd>
3161 <h4 class=
"discussion">Discussion
</h4>
3162 <p class=
"discussion">The optional timeout callback receives both the HTTP connection and a user
3163 data pointer and must return
1 to continue or
0 to error (time) out.
3166 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpShutdown">httpShutdown
</a></h3>
3167 <p class=
"description">Shutdown one side of an HTTP connection.
</p>
3169 void httpShutdown (
<br>
3170 <a href=
"#http_t">http_t
</a> *http
<br>
3172 <h4 class=
"parameters">Parameters
</h4>
3175 <dd class=
"description">HTTP connection
</dd>
3177 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpStateString">httpStateString
</a></h3>
3178 <p class=
"description">Return the string describing a HTTP state value.
</p>
3180 const char *httpStateString (
<br>
3181 <a href=
"#http_state_t">http_state_t
</a> state
<br>
3183 <h4 class=
"parameters">Parameters
</h4>
3186 <dd class=
"description">HTTP state value
</dd>
3188 <h4 class=
"returnvalue">Return Value
</h4>
3189 <p class=
"description">State string
</p>
3190 <h3 class=
"function"><a name=
"httpStatus">httpStatus
</a></h3>
3191 <p class=
"description">Return a short string describing a HTTP status code.
</p>
3193 const char *httpStatus (
<br>
3194 http_status_t status
<br>
3196 <h4 class=
"parameters">Parameters
</h4>
3199 <dd class=
"description">HTTP status code
</dd>
3201 <h4 class=
"returnvalue">Return Value
</h4>
3202 <p class=
"description">Localized status string
</p>
3203 <h4 class=
"discussion">Discussion
</h4>
3204 <p class=
"discussion">The returned string is localized to the current POSIX locale and is based
3205 on the status strings defined in RFC
2616.
</p>
3206 <h3 class=
"function"><a name=
"httpTrace">httpTrace
</a></h3>
3207 <p class=
"description">Send an TRACE request to the server.
</p>
3210 <a href=
"#http_t">http_t
</a> *http,
<br>
3211 const char *uri
<br>
3213 <h4 class=
"parameters">Parameters
</h4>
3216 <dd class=
"description">HTTP connection
</dd>
3218 <dd class=
"description">URI for trace
</dd>
3220 <h4 class=
"returnvalue">Return Value
</h4>
3221 <p class=
"description">Status of call (
0 = success)
</p>
3222 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"httpURIStatusString">httpURIStatusString
</a></h3>
3223 <p class=
"description">Return a string describing a URI status code.
</p>
3225 const char *httpURIStatusString (
<br>
3226 <a href=
"#http_uri_status_t">http_uri_status_t
</a> status
<br>
3228 <h4 class=
"parameters">Parameters
</h4>
3231 <dd class=
"description">URI status code
</dd>
3233 <h4 class=
"returnvalue">Return Value
</h4>
3234 <p class=
"description">Localized status string
</p>
3235 <h3 class=
"function"><a name=
"httpUpdate">httpUpdate
</a></h3>
3236 <p class=
"description">Update the current HTTP state for incoming data.
</p>
3238 http_status_t httpUpdate (
<br>
3239 <a href=
"#http_t">http_t
</a> *http
<br>
3241 <h4 class=
"parameters">Parameters
</h4>
3244 <dd class=
"description">HTTP connection
</dd>
3246 <h4 class=
"returnvalue">Return Value
</h4>
3247 <p class=
"description">HTTP status
</p>
3248 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/OS X
10.3 </span><a name=
"httpWait">httpWait
</a></h3>
3249 <p class=
"description">Wait for data available on a connection.
</p>
3252 <a href=
"#http_t">http_t
</a> *http,
<br>
3253 int msec
<br>
3255 <h4 class=
"parameters">Parameters
</h4>
3258 <dd class=
"description">HTTP connection
</dd>
3260 <dd class=
"description">Milliseconds to wait
</dd>
3262 <h4 class=
"returnvalue">Return Value
</h4>
3263 <p class=
"description">1 if data is available,
0 otherwise
</p>
3264 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpWrite">httpWrite
</a></h3>
3265 <p class=
"description">Write data to a HTTP connection.
</p>
3268 <a href=
"#http_t">http_t
</a> *http,
<br>
3269 const char *buffer,
<br>
3270 int length
<br>
3272 <h4 class=
"parameters">Parameters
</h4>
3275 <dd class=
"description">HTTP connection
</dd>
3277 <dd class=
"description">Buffer for data
</dd>
3279 <dd class=
"description">Number of bytes to write
</dd>
3281 <h4 class=
"returnvalue">Return Value
</h4>
3282 <p class=
"description">Number of bytes written
</p>
3283 <h4 class=
"discussion">Discussion
</h4>
3284 <p class=
"discussion">This function is deprecated. Use the httpWrite2() function which can
3285 write more than
2GB of data.
3288 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"httpWrite2">httpWrite2
</a></h3>
3289 <p class=
"description">Write data to a HTTP connection.
</p>
3291 ssize_t httpWrite2 (
<br>
3292 <a href=
"#http_t">http_t
</a> *http,
<br>
3293 const char *buffer,
<br>
3294 size_t length
<br>
3296 <h4 class=
"parameters">Parameters
</h4>
3299 <dd class=
"description">HTTP connection
</dd>
3301 <dd class=
"description">Buffer for data
</dd>
3303 <dd class=
"description">Number of bytes to write
</dd>
3305 <h4 class=
"returnvalue">Return Value
</h4>
3306 <p class=
"description">Number of bytes written
</p>
3307 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"httpWriteResponse">httpWriteResponse
</a></h3>
3308 <p class=
"description">Write a HTTP response to a client connection.
</p>
3310 int httpWriteResponse (
<br>
3311 <a href=
"#http_t">http_t
</a> *http,
<br>
3312 http_status_t status
<br>
3314 <h4 class=
"parameters">Parameters
</h4>
3317 <dd class=
"description">HTTP connection
</dd>
3319 <dd class=
"description">Status code
</dd>
3321 <h4 class=
"returnvalue">Return Value
</h4>
3322 <p class=
"description">0 on success, -
1 on error
</p>
3323 <h3 class=
"function"><a name=
"ippAddBoolean">ippAddBoolean
</a></h3>
3324 <p class=
"description">Add a boolean attribute to an IPP message.
</p>
3326 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBoolean (
<br>
3327 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3328 ipp_tag_t group,
<br>
3329 const char *name,
<br>
3330 char value
<br>
3332 <h4 class=
"parameters">Parameters
</h4>
3335 <dd class=
"description">IPP message
</dd>
3337 <dd class=
"description">IPP group
</dd>
3339 <dd class=
"description">Name of attribute
</dd>
3341 <dd class=
"description">Value of attribute
</dd>
3343 <h4 class=
"returnvalue">Return Value
</h4>
3344 <p class=
"description">New attribute
</p>
3345 <h4 class=
"discussion">Discussion
</h4>
3346 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3347 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>
3349 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3350 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3351 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3352 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3353 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3354 <h3 class=
"function"><a name=
"ippAddBooleans">ippAddBooleans
</a></h3>
3355 <p class=
"description">Add an array of boolean values.
</p>
3357 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBooleans (
<br>
3358 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3359 ipp_tag_t group,
<br>
3360 const char *name,
<br>
3361 int num_values,
<br>
3362 const char *values
<br>
3364 <h4 class=
"parameters">Parameters
</h4>
3367 <dd class=
"description">IPP message
</dd>
3369 <dd class=
"description">IPP group
</dd>
3371 <dd class=
"description">Name of attribute
</dd>
3373 <dd class=
"description">Number of values
</dd>
3375 <dd class=
"description">Values
</dd>
3377 <h4 class=
"returnvalue">Return Value
</h4>
3378 <p class=
"description">New attribute
</p>
3379 <h4 class=
"discussion">Discussion
</h4>
3380 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3381 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>
3383 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3384 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3385 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3386 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3387 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3388 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/OS X
10.3 </span><a name=
"ippAddCollection">ippAddCollection
</a></h3>
3389 <p class=
"description">Add a collection value.
</p>
3391 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollection (
<br>
3392 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3393 ipp_tag_t group,
<br>
3394 const char *name,
<br>
3395 <a href=
"#ipp_t">ipp_t
</a> *value
<br>
3397 <h4 class=
"parameters">Parameters
</h4>
3400 <dd class=
"description">IPP message
</dd>
3402 <dd class=
"description">IPP group
</dd>
3404 <dd class=
"description">Name of attribute
</dd>
3406 <dd class=
"description">Value
</dd>
3408 <h4 class=
"returnvalue">Return Value
</h4>
3409 <p class=
"description">New attribute
</p>
3410 <h4 class=
"discussion">Discussion
</h4>
3411 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3412 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>
3414 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3415 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3416 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3417 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3418 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
3421 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/OS X
10.3 </span><a name=
"ippAddCollections">ippAddCollections
</a></h3>
3422 <p class=
"description">Add an array of collection values.
</p>
3424 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollections (
<br>
3425 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3426 ipp_tag_t group,
<br>
3427 const char *name,
<br>
3428 int num_values,
<br>
3429 const
<a href=
"#ipp_t">ipp_t
</a> **values
<br>
3431 <h4 class=
"parameters">Parameters
</h4>
3434 <dd class=
"description">IPP message
</dd>
3436 <dd class=
"description">IPP group
</dd>
3438 <dd class=
"description">Name of attribute
</dd>
3440 <dd class=
"description">Number of values
</dd>
3442 <dd class=
"description">Values
</dd>
3444 <h4 class=
"returnvalue">Return Value
</h4>
3445 <p class=
"description">New attribute
</p>
3446 <h4 class=
"discussion">Discussion
</h4>
3447 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3448 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>
3450 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3451 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3452 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3453 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3454 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
3457 <h3 class=
"function"><a name=
"ippAddDate">ippAddDate
</a></h3>
3458 <p class=
"description">Add a date attribute to an IPP message.
</p>
3460 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddDate (
<br>
3461 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3462 ipp_tag_t group,
<br>
3463 const char *name,
<br>
3464 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *value
<br>
3466 <h4 class=
"parameters">Parameters
</h4>
3469 <dd class=
"description">IPP message
</dd>
3471 <dd class=
"description">IPP group
</dd>
3473 <dd class=
"description">Name of attribute
</dd>
3475 <dd class=
"description">Value
</dd>
3477 <h4 class=
"returnvalue">Return Value
</h4>
3478 <p class=
"description">New attribute
</p>
3479 <h4 class=
"discussion">Discussion
</h4>
3480 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3481 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>
3483 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3484 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3485 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3486 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3487 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3488 <h3 class=
"function"><a name=
"ippAddInteger">ippAddInteger
</a></h3>
3489 <p class=
"description">Add a integer attribute to an IPP message.
</p>
3491 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddInteger (
<br>
3492 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3493 ipp_tag_t group,
<br>
3494 ipp_tag_t value_tag,
<br>
3495 const char *name,
<br>
3496 int value
<br>
3498 <h4 class=
"parameters">Parameters
</h4>
3501 <dd class=
"description">IPP message
</dd>
3503 <dd class=
"description">IPP group
</dd>
3505 <dd class=
"description">Type of attribute
</dd>
3507 <dd class=
"description">Name of attribute
</dd>
3509 <dd class=
"description">Value of attribute
</dd>
3511 <h4 class=
"returnvalue">Return Value
</h4>
3512 <p class=
"description">New attribute
</p>
3513 <h4 class=
"discussion">Discussion
</h4>
3514 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3515 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>
3517 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3518 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3519 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3520 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3521 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3523 Supported values include enum (
<code>IPP_TAG_ENUM
</code>) and integer
3524 (
<code>IPP_TAG_INTEGER
</code>).
</p>
3525 <h3 class=
"function"><a name=
"ippAddIntegers">ippAddIntegers
</a></h3>
3526 <p class=
"description">Add an array of integer values.
</p>
3528 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddIntegers (
<br>
3529 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3530 ipp_tag_t group,
<br>
3531 ipp_tag_t value_tag,
<br>
3532 const char *name,
<br>
3533 int num_values,
<br>
3534 const int *values
<br>
3536 <h4 class=
"parameters">Parameters
</h4>
3539 <dd class=
"description">IPP message
</dd>
3541 <dd class=
"description">IPP group
</dd>
3543 <dd class=
"description">Type of attribute
</dd>
3545 <dd class=
"description">Name of attribute
</dd>
3547 <dd class=
"description">Number of values
</dd>
3549 <dd class=
"description">Values
</dd>
3551 <h4 class=
"returnvalue">Return Value
</h4>
3552 <p class=
"description">New attribute
</p>
3553 <h4 class=
"discussion">Discussion
</h4>
3554 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3555 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
3557 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3558 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3559 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3560 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3561 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3563 Supported values include enum (
<code>IPP_TAG_ENUM
</code>) and integer
3564 (
<code>IPP_TAG_INTEGER
</code>).
</p>
3565 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"ippAddOctetString">ippAddOctetString
</a></h3>
3566 <p class=
"description">Add an octetString value to an IPP message.
</p>
3568 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddOctetString (
<br>
3569 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3570 ipp_tag_t group,
<br>
3571 const char *name,
<br>
3572 const void *data,
<br>
3573 int datalen
<br>
3575 <h4 class=
"parameters">Parameters
</h4>
3578 <dd class=
"description">IPP message
</dd>
3580 <dd class=
"description">IPP group
</dd>
3582 <dd class=
"description">Name of attribute
</dd>
3584 <dd class=
"description">octetString data
</dd>
3586 <dd class=
"description">Length of data in bytes
</dd>
3588 <h4 class=
"returnvalue">Return Value
</h4>
3589 <p class=
"description">New attribute
</p>
3590 <h4 class=
"discussion">Discussion
</h4>
3591 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3592 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>
3594 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3595 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3596 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3597 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3598 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
3601 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippAddOutOfBand">ippAddOutOfBand
</a></h3>
3602 <p class=
"description">Add an out-of-band value to an IPP message.
</p>
3604 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddOutOfBand (
<br>
3605 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3606 ipp_tag_t group,
<br>
3607 ipp_tag_t value_tag,
<br>
3608 const char *name
<br>
3610 <h4 class=
"parameters">Parameters
</h4>
3613 <dd class=
"description">IPP message
</dd>
3615 <dd class=
"description">IPP group
</dd>
3617 <dd class=
"description">Type of attribute
</dd>
3619 <dd class=
"description">Name of attribute
</dd>
3621 <h4 class=
"returnvalue">Return Value
</h4>
3622 <p class=
"description">New attribute
</p>
3623 <h4 class=
"discussion">Discussion
</h4>
3624 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3625 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>
3627 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3628 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3629 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3630 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3631 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3633 Supported out-of-band values include unsupported-value
3634 (
<code>IPP_TAG_UNSUPPORTED_VALUE
</code>), default (
<code>IPP_TAG_DEFAULT
</code>), unknown
3635 (
<code>IPP_TAG_UNKNOWN
</code>), no-value (
<code>IPP_TAG_NOVALUE
</code>), not-settable
3636 (
<code>IPP_TAG_NOTSETTABLE
</code>), delete-attribute (
<code>IPP_TAG_DELETEATTR
</code>), and
3637 admin-define (
<code>IPP_TAG_ADMINDEFINE
</code>).
3640 <h3 class=
"function"><a name=
"ippAddRange">ippAddRange
</a></h3>
3641 <p class=
"description">Add a range of values to an IPP message.
</p>
3643 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRange (
<br>
3644 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3645 ipp_tag_t group,
<br>
3646 const char *name,
<br>
3647 int lower,
<br>
3648 int upper
<br>
3650 <h4 class=
"parameters">Parameters
</h4>
3653 <dd class=
"description">IPP message
</dd>
3655 <dd class=
"description">IPP group
</dd>
3657 <dd class=
"description">Name of attribute
</dd>
3659 <dd class=
"description">Lower value
</dd>
3661 <dd class=
"description">Upper value
</dd>
3663 <h4 class=
"returnvalue">Return Value
</h4>
3664 <p class=
"description">New attribute
</p>
3665 <h4 class=
"discussion">Discussion
</h4>
3666 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3667 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>
3669 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3670 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3671 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3672 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3673 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3675 The
<code>lower
</code> parameter must be less than or equal to the
<code>upper
</code> parameter.
</p>
3676 <h3 class=
"function"><a name=
"ippAddRanges">ippAddRanges
</a></h3>
3677 <p class=
"description">Add ranges of values to an IPP message.
</p>
3679 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRanges (
<br>
3680 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3681 ipp_tag_t group,
<br>
3682 const char *name,
<br>
3683 int num_values,
<br>
3684 const int *lower,
<br>
3685 const int *upper
<br>
3687 <h4 class=
"parameters">Parameters
</h4>
3690 <dd class=
"description">IPP message
</dd>
3692 <dd class=
"description">IPP group
</dd>
3694 <dd class=
"description">Name of attribute
</dd>
3696 <dd class=
"description">Number of values
</dd>
3698 <dd class=
"description">Lower values
</dd>
3700 <dd class=
"description">Upper values
</dd>
3702 <h4 class=
"returnvalue">Return Value
</h4>
3703 <p class=
"description">New attribute
</p>
3704 <h4 class=
"discussion">Discussion
</h4>
3705 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3706 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
3708 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3709 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3710 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3711 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3712 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3713 <h3 class=
"function"><a name=
"ippAddResolution">ippAddResolution
</a></h3>
3714 <p class=
"description">Add a resolution value to an IPP message.
</p>
3716 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolution (
<br>
3717 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3718 ipp_tag_t group,
<br>
3719 const char *name,
<br>
3720 <a href=
"#ipp_res_t">ipp_res_t
</a> units,
<br>
3721 int xres,
<br>
3722 int yres
<br>
3724 <h4 class=
"parameters">Parameters
</h4>
3727 <dd class=
"description">IPP message
</dd>
3729 <dd class=
"description">IPP group
</dd>
3731 <dd class=
"description">Name of attribute
</dd>
3733 <dd class=
"description">Units for resolution
</dd>
3735 <dd class=
"description">X resolution
</dd>
3737 <dd class=
"description">Y resolution
</dd>
3739 <h4 class=
"returnvalue">Return Value
</h4>
3740 <p class=
"description">New attribute
</p>
3741 <h4 class=
"discussion">Discussion
</h4>
3742 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3743 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>
3745 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3746 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3747 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3748 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3749 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3750 <h3 class=
"function"><a name=
"ippAddResolutions">ippAddResolutions
</a></h3>
3751 <p class=
"description">Add resolution values to an IPP message.
</p>
3753 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolutions (
<br>
3754 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3755 ipp_tag_t group,
<br>
3756 const char *name,
<br>
3757 int num_values,
<br>
3758 <a href=
"#ipp_res_t">ipp_res_t
</a> units,
<br>
3759 const int *xres,
<br>
3760 const int *yres
<br>
3762 <h4 class=
"parameters">Parameters
</h4>
3765 <dd class=
"description">IPP message
</dd>
3767 <dd class=
"description">IPP group
</dd>
3769 <dd class=
"description">Name of attribute
</dd>
3771 <dd class=
"description">Number of values
</dd>
3773 <dd class=
"description">Units for resolution
</dd>
3775 <dd class=
"description">X resolutions
</dd>
3777 <dd class=
"description">Y resolutions
</dd>
3779 <h4 class=
"returnvalue">Return Value
</h4>
3780 <p class=
"description">New attribute
</p>
3781 <h4 class=
"discussion">Discussion
</h4>
3782 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3783 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>
3785 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3786 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3787 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3788 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3789 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3790 <h3 class=
"function"><a name=
"ippAddSeparator">ippAddSeparator
</a></h3>
3791 <p class=
"description">Add a group separator to an IPP message.
</p>
3793 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddSeparator (
<br>
3794 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3796 <h4 class=
"parameters">Parameters
</h4>
3799 <dd class=
"description">IPP message
</dd>
3801 <h4 class=
"returnvalue">Return Value
</h4>
3802 <p class=
"description">New attribute
</p>
3803 <h4 class=
"discussion">Discussion
</h4>
3804 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3805 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>
3806 <h3 class=
"function"><a name=
"ippAddString">ippAddString
</a></h3>
3807 <p class=
"description">Add a language-encoded string to an IPP message.
</p>
3809 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddString (
<br>
3810 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3811 ipp_tag_t group,
<br>
3812 ipp_tag_t value_tag,
<br>
3813 const char *name,
<br>
3814 const char *language,
<br>
3815 const char *value
<br>
3817 <h4 class=
"parameters">Parameters
</h4>
3820 <dd class=
"description">IPP message
</dd>
3822 <dd class=
"description">IPP group
</dd>
3824 <dd class=
"description">Type of attribute
</dd>
3826 <dd class=
"description">Name of attribute
</dd>
3828 <dd class=
"description">Language code
</dd>
3830 <dd class=
"description">Value
</dd>
3832 <h4 class=
"returnvalue">Return Value
</h4>
3833 <p class=
"description">New attribute
</p>
3834 <h4 class=
"discussion">Discussion
</h4>
3835 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3836 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>
3838 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3839 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3840 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3841 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3842 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3844 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
3845 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
3846 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
3847 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
3848 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
3849 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
3851 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage and
3852 textWithLanguage string values and must be
<code>NULL
</code> for all other string values.
</p>
3853 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"ippAddStringf">ippAddStringf
</a></h3>
3854 <p class=
"description">Add a formatted string to an IPP message.
</p>
3856 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddStringf (
<br>
3857 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3858 ipp_tag_t group,
<br>
3859 ipp_tag_t value_tag,
<br>
3860 const char *name,
<br>
3861 const char *language,
<br>
3862 const char *format,
<br>
3863 ...
<br>
3865 <h4 class=
"parameters">Parameters
</h4>
3868 <dd class=
"description">IPP message
</dd>
3870 <dd class=
"description">IPP group
</dd>
3872 <dd class=
"description">Type of attribute
</dd>
3874 <dd class=
"description">Name of attribute
</dd>
3876 <dd class=
"description">Language code (
<code>NULL
</code> for default)
</dd>
3878 <dd class=
"description">Printf-style format string
</dd>
3880 <dd class=
"description">Additional arguments as needed
</dd>
3882 <h4 class=
"returnvalue">Return Value
</h4>
3883 <p class=
"description">New attribute
</p>
3884 <h4 class=
"discussion">Discussion
</h4>
3885 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3886 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>
3888 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3889 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document
3890 (
<code>IPP_TAG_DOCUMENT
</code>), event notification
3891 (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation (
<code>IPP_TAG_OPERATION
</code>),
3892 printer (
<code>IPP_TAG_PRINTER
</code>), subscription (
<code>IPP_TAG_SUBSCRIPTION
</code>),
3893 or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3895 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
3896 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
3897 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
3898 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
3899 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
3900 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
3902 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage
3903 and textWithLanguage string values and must be
<code>NULL
</code> for all other
3906 The
<code>format
</code> parameter uses formatting characters compatible with the
3907 printf family of standard functions. Additional arguments follow it as
3908 needed. The formatted string is truncated as needed to the maximum length of
3909 the corresponding value type.
3912 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"ippAddStringfv">ippAddStringfv
</a></h3>
3913 <p class=
"description">Add a formatted string to an IPP message.
</p>
3915 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddStringfv (
<br>
3916 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3917 ipp_tag_t group,
<br>
3918 ipp_tag_t value_tag,
<br>
3919 const char *name,
<br>
3920 const char *language,
<br>
3921 const char *format,
<br>
3922 va_list ap
<br>
3924 <h4 class=
"parameters">Parameters
</h4>
3927 <dd class=
"description">IPP message
</dd>
3929 <dd class=
"description">IPP group
</dd>
3931 <dd class=
"description">Type of attribute
</dd>
3933 <dd class=
"description">Name of attribute
</dd>
3935 <dd class=
"description">Language code (
<code>NULL
</code> for default)
</dd>
3937 <dd class=
"description">Printf-style format string
</dd>
3939 <dd class=
"description">Additional arguments
</dd>
3941 <h4 class=
"returnvalue">Return Value
</h4>
3942 <p class=
"description">New attribute
</p>
3943 <h4 class=
"discussion">Discussion
</h4>
3944 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
3945 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>
3947 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3948 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document
3949 (
<code>IPP_TAG_DOCUMENT
</code>), event notification
3950 (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation (
<code>IPP_TAG_OPERATION
</code>),
3951 printer (
<code>IPP_TAG_PRINTER
</code>), subscription (
<code>IPP_TAG_SUBSCRIPTION
</code>),
3952 or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3954 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
3955 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
3956 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
3957 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
3958 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
3959 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
3961 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage
3962 and textWithLanguage string values and must be
<code>NULL
</code> for all other
3965 The
<code>format
</code> parameter uses formatting characters compatible with the
3966 printf family of standard functions. Additional arguments are passed in the
3967 stdarg pointer
<code>ap
</code>. The formatted string is truncated as needed to the
3968 maximum length of the corresponding value type.
3971 <h3 class=
"function"><a name=
"ippAddStrings">ippAddStrings
</a></h3>
3972 <p class=
"description">Add language-encoded strings to an IPP message.
</p>
3974 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddStrings (
<br>
3975 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3976 ipp_tag_t group,
<br>
3977 ipp_tag_t value_tag,
<br>
3978 const char *name,
<br>
3979 int num_values,
<br>
3980 const char *language,
<br>
3981 const char *const *values
<br>
3983 <h4 class=
"parameters">Parameters
</h4>
3986 <dd class=
"description">IPP message
</dd>
3988 <dd class=
"description">IPP group
</dd>
3990 <dd class=
"description">Type of attribute
</dd>
3992 <dd class=
"description">Name of attribute
</dd>
3994 <dd class=
"description">Number of values
</dd>
3996 <dd class=
"description">Language code (
<code>NULL
</code> for default)
</dd>
3998 <dd class=
"description">Values
</dd>
4000 <h4 class=
"returnvalue">Return Value
</h4>
4001 <p class=
"description">New attribute
</p>
4002 <h4 class=
"discussion">Discussion
</h4>
4003 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4004 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>
4006 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
4007 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
4008 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
4009 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
4010 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
4012 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
4013 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
4014 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
4015 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
4016 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
4017 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
4019 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage and
4020 textWithLanguage string values and must be
<code>NULL
</code> for all other string values.
</p>
4021 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippAttributeString">ippAttributeString
</a></h3>
4022 <p class=
"description">Convert the attribute's value to a string.
</p>
4024 size_t ippAttributeString (
<br>
4025 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4026 char *buffer,
<br>
4027 size_t bufsize
<br>
4029 <h4 class=
"parameters">Parameters
</h4>
4032 <dd class=
"description">Attribute
</dd>
4034 <dd class=
"description">String buffer or NULL
</dd>
4036 <dd class=
"description">Size of string buffer
</dd>
4038 <h4 class=
"returnvalue">Return Value
</h4>
4039 <p class=
"description">Number of bytes less nul
</p>
4040 <h4 class=
"discussion">Discussion
</h4>
4041 <p class=
"discussion">Returns the number of bytes that would be written, not including the
4042 trailing nul. The buffer pointer can be NULL to get the required length,
4043 just like (v)snprintf.
4046 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"ippContainsInteger">ippContainsInteger
</a></h3>
4047 <p class=
"description">Determine whether an attribute contains the
4048 specified value or is within the list of ranges.
</p>
4050 int ippContainsInteger (
<br>
4051 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4052 int value
<br>
4054 <h4 class=
"parameters">Parameters
</h4>
4057 <dd class=
"description">Attribute
</dd>
4059 <dd class=
"description">Integer/enum value
</dd>
4061 <h4 class=
"returnvalue">Return Value
</h4>
4062 <p class=
"description">1 on a match,
0 on no match
</p>
4063 <h4 class=
"discussion">Discussion
</h4>
4064 <p class=
"discussion">Returns non-zero when the attribute contains either a matching integer or
4065 enum value, or the value falls within one of the rangeOfInteger values for
4069 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"ippContainsString">ippContainsString
</a></h3>
4070 <p class=
"description">Determine whether an attribute contains the
4071 specified string value.
</p>
4073 int ippContainsString (
<br>
4074 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4075 const char *value
<br>
4077 <h4 class=
"parameters">Parameters
</h4>
4080 <dd class=
"description">Attribute
</dd>
4082 <dd class=
"description">String value
</dd>
4084 <h4 class=
"returnvalue">Return Value
</h4>
4085 <p class=
"description">1 on a match,
0 on no match
</p>
4086 <h4 class=
"discussion">Discussion
</h4>
4087 <p class=
"discussion">Returns non-zero when the attribute contains a matching charset, keyword,
4088 language, mimeMediaType, name, text, URI, or URI scheme value.
4091 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippCopyAttribute">ippCopyAttribute
</a></h3>
4092 <p class=
"description">Copy an attribute.
</p>
4094 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippCopyAttribute (
<br>
4095 <a href=
"#ipp_t">ipp_t
</a> *dst,
<br>
4096 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *srcattr,
<br>
4097 int quickcopy
<br>
4099 <h4 class=
"parameters">Parameters
</h4>
4102 <dd class=
"description">Destination IPP message
</dd>
4104 <dd class=
"description">Attribute to copy
</dd>
4106 <dd class=
"description">1 for a referenced copy,
0 for normal
</dd>
4108 <h4 class=
"returnvalue">Return Value
</h4>
4109 <p class=
"description">New attribute
</p>
4110 <h4 class=
"discussion">Discussion
</h4>
4111 <p class=
"discussion">The specified attribute,
<code>attr
</code>, is copied to the destination IPP message.
4112 When
<code>quickcopy
</code> is non-zero, a
"shallow
" reference copy of the attribute is
4113 created - this should only be done as long as the original source IPP message will
4114 not be freed for the life of the destination.
4117 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippCopyAttributes">ippCopyAttributes
</a></h3>
4118 <p class=
"description">Copy attributes from one IPP message to another.
</p>
4120 int ippCopyAttributes (
<br>
4121 <a href=
"#ipp_t">ipp_t
</a> *dst,
<br>
4122 <a href=
"#ipp_t">ipp_t
</a> *src,
<br>
4123 int quickcopy,
<br>
4124 <a href=
"#ipp_copycb_t">ipp_copycb_t
</a> cb,
<br>
4125 void *context
<br>
4127 <h4 class=
"parameters">Parameters
</h4>
4130 <dd class=
"description">Destination IPP message
</dd>
4132 <dd class=
"description">Source IPP message
</dd>
4134 <dd class=
"description">1 for a referenced copy,
0 for normal
</dd>
4136 <dd class=
"description">Copy callback or
<code>NULL
</code> for none
</dd>
4138 <dd class=
"description">Context pointer
</dd>
4140 <h4 class=
"returnvalue">Return Value
</h4>
4141 <p class=
"description">1 on success,
0 on error
</p>
4142 <h4 class=
"discussion">Discussion
</h4>
4143 <p class=
"discussion">Zero or more attributes are copied from the source IPP message,
<code>src
</code>, to the
4144 destination IPP message,
<code>dst
</code>. When
<code>quickcopy
</code> is non-zero, a
"shallow
"
4145 reference copy of the attribute is created - this should only be done as long as the
4146 original source IPP message will not be freed for the life of the destination.
<br>
4148 The
<code>cb
</code> and
<code>context
</code> parameters provide a generic way to
"filter
" the
4149 attributes that are copied - the function must return
1 to copy the attribute or
4150 0 to skip it. The function may also choose to do a partial copy of the source attribute
4154 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"ippCreateRequestedArray">ippCreateRequestedArray
</a></h3>
4155 <p class=
"description">Create a CUPS array of attribute names from the
4156 given requested-attributes attribute.
</p>
4158 cups_array_t *ippCreateRequestedArray (
<br>
4159 <a href=
"#ipp_t">ipp_t
</a> *request
<br>
4161 <h4 class=
"parameters">Parameters
</h4>
4164 <dd class=
"description">IPP request
</dd>
4166 <h4 class=
"returnvalue">Return Value
</h4>
4167 <p class=
"description">CUPS array or
<code>NULL
</code> if all
</p>
4168 <h4 class=
"discussion">Discussion
</h4>
4169 <p class=
"discussion">This function creates a (sorted) CUPS array of attribute names matching the
4170 list of
"requested-attribute
" values supplied in an IPP request. All IANA-
4171 registered values are supported in addition to the CUPS IPP extension
4174 The
<code>request
</code> parameter specifies the request message that was read from
4177 <code>NULL
</code> is returned if all attributes should be returned. Otherwise, the
4178 result is a sorted array of attribute names, where
<code>cupsArrayFind(array,
4179 "attribute-name")
</code> will return a non-NULL pointer. The array must be freed
4180 using the
<code>cupsArrayDelete
</code> function.
4183 <h3 class=
"function"><a name=
"ippDateToTime">ippDateToTime
</a></h3>
4184 <p class=
"description">Convert from RFC
1903 Date/Time format to UNIX time
4187 time_t ippDateToTime (
<br>
4188 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *date
<br>
4190 <h4 class=
"parameters">Parameters
</h4>
4193 <dd class=
"description">RFC
1903 date info
</dd>
4195 <h4 class=
"returnvalue">Return Value
</h4>
4196 <p class=
"description">UNIX time value
</p>
4197 <h3 class=
"function"><a name=
"ippDelete">ippDelete
</a></h3>
4198 <p class=
"description">Delete an IPP message.
</p>
4200 void ippDelete (
<br>
4201 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4203 <h4 class=
"parameters">Parameters
</h4>
4206 <dd class=
"description">IPP message
</dd>
4208 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/OS X
10.3 </span><a name=
"ippDeleteAttribute">ippDeleteAttribute
</a></h3>
4209 <p class=
"description">Delete a single attribute in an IPP message.
</p>
4211 void ippDeleteAttribute (
<br>
4212 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4213 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
4215 <h4 class=
"parameters">Parameters
</h4>
4218 <dd class=
"description">IPP message
</dd>
4220 <dd class=
"description">Attribute to delete
</dd>
4222 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippDeleteValues">ippDeleteValues
</a></h3>
4223 <p class=
"description">Delete values in an attribute.
</p>
4225 int ippDeleteValues (
<br>
4226 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4227 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4228 int element,
<br>
4229 int count
<br>
4231 <h4 class=
"parameters">Parameters
</h4>
4234 <dd class=
"description">IPP message
</dd>
4236 <dd class=
"description">Attribute
</dd>
4238 <dd class=
"description">Index of first value to delete (
0-based)
</dd>
4240 <dd class=
"description">Number of values to delete
</dd>
4242 <h4 class=
"returnvalue">Return Value
</h4>
4243 <p class=
"description">1 on success,
0 on failure
</p>
4244 <h4 class=
"discussion">Discussion
</h4>
4245 <p class=
"discussion">The
<code>element
</code> parameter specifies the first value to delete, starting at
4246 0. It must be less than the number of values returned by
<a href=
"#ippGetCount"><code>ippGetCount
</code></a>.
<br>
4248 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4250 Deleting all values in an attribute deletes the attribute.
4253 <h3 class=
"function"><a name=
"ippEnumString">ippEnumString
</a></h3>
4254 <p class=
"description">Return a string corresponding to the enum value.
</p>
4256 const char *ippEnumString (
<br>
4257 const char *attrname,
<br>
4258 int enumvalue
<br>
4260 <h4 class=
"parameters">Parameters
</h4>
4263 <dd class=
"description">Attribute name
</dd>
4265 <dd class=
"description">Enum value
</dd>
4267 <h4 class=
"returnvalue">Return Value
</h4>
4268 <p class=
"description">Enum string
</p>
4269 <h3 class=
"function"><a name=
"ippEnumValue">ippEnumValue
</a></h3>
4270 <p class=
"description">Return the value associated with a given enum string.
</p>
4272 int ippEnumValue (
<br>
4273 const char *attrname,
<br>
4274 const char *enumstring
<br>
4276 <h4 class=
"parameters">Parameters
</h4>
4279 <dd class=
"description">Attribute name
</dd>
4281 <dd class=
"description">Enum string
</dd>
4283 <h4 class=
"returnvalue">Return Value
</h4>
4284 <p class=
"description">Enum value or -
1 if unknown
</p>
4285 <h3 class=
"function"><a name=
"ippErrorString">ippErrorString
</a></h3>
4286 <p class=
"description">Return a name for the given status code.
</p>
4288 const char *ippErrorString (
<br>
4289 ipp_status_t error
<br>
4291 <h4 class=
"parameters">Parameters
</h4>
4294 <dd class=
"description">Error status
</dd>
4296 <h4 class=
"returnvalue">Return Value
</h4>
4297 <p class=
"description">Text string
</p>
4298 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"ippErrorValue">ippErrorValue
</a></h3>
4299 <p class=
"description">Return a status code for the given name.
</p>
4301 ipp_status_t ippErrorValue (
<br>
4302 const char *name
<br>
4304 <h4 class=
"parameters">Parameters
</h4>
4307 <dd class=
"description">Name
</dd>
4309 <h4 class=
"returnvalue">Return Value
</h4>
4310 <p class=
"description">IPP status code
</p>
4311 <h3 class=
"function"><a name=
"ippFindAttribute">ippFindAttribute
</a></h3>
4312 <p class=
"description">Find a named attribute in a request.
</p>
4314 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindAttribute (
<br>
4315 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4316 const char *name,
<br>
4317 ipp_tag_t type
<br>
4319 <h4 class=
"parameters">Parameters
</h4>
4322 <dd class=
"description">IPP message
</dd>
4324 <dd class=
"description">Name of attribute
</dd>
4326 <dd class=
"description">Type of attribute
</dd>
4328 <h4 class=
"returnvalue">Return Value
</h4>
4329 <p class=
"description">Matching attribute
</p>
4330 <h4 class=
"discussion">Discussion
</h4>
4331 <p class=
"discussion">Starting with CUPS
2.0, the attribute name can contain a hierarchical list
4332 of attribute and member names separated by slashes, for example
4333 "media-col/media-size
".
</p>
4334 <h3 class=
"function"><a name=
"ippFindNextAttribute">ippFindNextAttribute
</a></h3>
4335 <p class=
"description">Find the next named attribute in a request.
</p>
4337 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindNextAttribute (
<br>
4338 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4339 const char *name,
<br>
4340 ipp_tag_t type
<br>
4342 <h4 class=
"parameters">Parameters
</h4>
4345 <dd class=
"description">IPP message
</dd>
4347 <dd class=
"description">Name of attribute
</dd>
4349 <dd class=
"description">Type of attribute
</dd>
4351 <h4 class=
"returnvalue">Return Value
</h4>
4352 <p class=
"description">Matching attribute
</p>
4353 <h4 class=
"discussion">Discussion
</h4>
4354 <p class=
"discussion">Starting with CUPS
2.0, the attribute name can contain a hierarchical list
4355 of attribute and member names separated by slashes, for example
4356 "media-col/media-size
".
</p>
4357 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippFirstAttribute">ippFirstAttribute
</a></h3>
4358 <p class=
"description">Return the first attribute in the message.
</p>
4360 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFirstAttribute (
<br>
4361 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4363 <h4 class=
"parameters">Parameters
</h4>
4366 <dd class=
"description">IPP message
</dd>
4368 <h4 class=
"returnvalue">Return Value
</h4>
4369 <p class=
"description">First attribute or
<code>NULL
</code> if none
</p>
4370 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippGetBoolean">ippGetBoolean
</a></h3>
4371 <p class=
"description">Get a boolean value for an attribute.
</p>
4373 int ippGetBoolean (
<br>
4374 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4375 int element
<br>
4377 <h4 class=
"parameters">Parameters
</h4>
4380 <dd class=
"description">IPP attribute
</dd>
4382 <dd class=
"description">Value number (
0-based)
</dd>
4384 <h4 class=
"returnvalue">Return Value
</h4>
4385 <p class=
"description">Boolean value or
0 on error
</p>
4386 <h4 class=
"discussion">Discussion
</h4>
4387 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4388 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4391 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippGetCollection">ippGetCollection
</a></h3>
4392 <p class=
"description">Get a collection value for an attribute.
</p>
4394 <a href=
"#ipp_t">ipp_t
</a> *ippGetCollection (
<br>
4395 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4396 int element
<br>
4398 <h4 class=
"parameters">Parameters
</h4>
4401 <dd class=
"description">IPP attribute
</dd>
4403 <dd class=
"description">Value number (
0-based)
</dd>
4405 <h4 class=
"returnvalue">Return Value
</h4>
4406 <p class=
"description">Collection value or
<code>NULL
</code> on error
</p>
4407 <h4 class=
"discussion">Discussion
</h4>
4408 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4409 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4412 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippGetCount">ippGetCount
</a></h3>
4413 <p class=
"description">Get the number of values in an attribute.
</p>
4415 int ippGetCount (
<br>
4416 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
4418 <h4 class=
"parameters">Parameters
</h4>
4421 <dd class=
"description">IPP attribute
</dd>
4423 <h4 class=
"returnvalue">Return Value
</h4>
4424 <p class=
"description">Number of values or
0 on error
</p>
4425 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippGetDate">ippGetDate
</a></h3>
4426 <p class=
"description">Get a date value for an attribute.
</p>
4428 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *ippGetDate (
<br>
4429 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4430 int element
<br>
4432 <h4 class=
"parameters">Parameters
</h4>
4435 <dd class=
"description">IPP attribute
</dd>
4437 <dd class=
"description">Value number (
0-based)
</dd>
4439 <h4 class=
"returnvalue">Return Value
</h4>
4440 <p class=
"description">Date value or
<code>NULL
</code></p>
4441 <h4 class=
"discussion">Discussion
</h4>
4442 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4443 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4446 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippGetGroupTag">ippGetGroupTag
</a></h3>
4447 <p class=
"description">Get the group associated with an attribute.
</p>
4449 ipp_tag_t ippGetGroupTag (
<br>
4450 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
4452 <h4 class=
"parameters">Parameters
</h4>
4455 <dd class=
"description">IPP attribute
</dd>
4457 <h4 class=
"returnvalue">Return Value
</h4>
4458 <p class=
"description">Group tag or
<code>IPP_TAG_ZERO
</code> on error
</p>
4459 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippGetInteger">ippGetInteger
</a></h3>
4460 <p class=
"description">Get the integer/enum value for an attribute.
</p>
4462 int ippGetInteger (
<br>
4463 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4464 int element
<br>
4466 <h4 class=
"parameters">Parameters
</h4>
4469 <dd class=
"description">IPP attribute
</dd>
4471 <dd class=
"description">Value number (
0-based)
</dd>
4473 <h4 class=
"returnvalue">Return Value
</h4>
4474 <p class=
"description">Value or
0 on error
</p>
4475 <h4 class=
"discussion">Discussion
</h4>
4476 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4477 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4480 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippGetName">ippGetName
</a></h3>
4481 <p class=
"description">Get the attribute name.
</p>
4483 const char *ippGetName (
<br>
4484 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
4486 <h4 class=
"parameters">Parameters
</h4>
4489 <dd class=
"description">IPP attribute
</dd>
4491 <h4 class=
"returnvalue">Return Value
</h4>
4492 <p class=
"description">Attribute name or
<code>NULL
</code> for separators
</p>
4493 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"ippGetOctetString">ippGetOctetString
</a></h3>
4494 <p class=
"description">Get an octetString value from an IPP attribute.
</p>
4496 void *ippGetOctetString (
<br>
4497 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4498 int element,
<br>
4499 int *datalen
<br>
4501 <h4 class=
"parameters">Parameters
</h4>
4504 <dd class=
"description">IPP attribute
</dd>
4506 <dd class=
"description">Value number (
0-based)
</dd>
4508 <dd class=
"description">Length of octetString data
</dd>
4510 <h4 class=
"returnvalue">Return Value
</h4>
4511 <p class=
"description">Pointer to octetString data
</p>
4512 <h4 class=
"discussion">Discussion
</h4>
4513 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4514 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4517 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippGetOperation">ippGetOperation
</a></h3>
4518 <p class=
"description">Get the operation ID in an IPP message.
</p>
4520 ipp_op_t ippGetOperation (
<br>
4521 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4523 <h4 class=
"parameters">Parameters
</h4>
4526 <dd class=
"description">IPP request message
</dd>
4528 <h4 class=
"returnvalue">Return Value
</h4>
4529 <p class=
"description">Operation ID or
0 on error
</p>
4530 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippGetRange">ippGetRange
</a></h3>
4531 <p class=
"description">Get a rangeOfInteger value from an attribute.
</p>
4533 int ippGetRange (
<br>
4534 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4535 int element,
<br>
4536 int *uppervalue
<br>
4538 <h4 class=
"parameters">Parameters
</h4>
4541 <dd class=
"description">IPP attribute
</dd>
4543 <dd class=
"description">Value number (
0-based)
</dd>
4545 <dd class=
"description">Upper value of range
</dd>
4547 <h4 class=
"returnvalue">Return Value
</h4>
4548 <p class=
"description">Lower value of range or
0</p>
4549 <h4 class=
"discussion">Discussion
</h4>
4550 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4551 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4554 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippGetRequestId">ippGetRequestId
</a></h3>
4555 <p class=
"description">Get the request ID from an IPP message.
</p>
4557 int ippGetRequestId (
<br>
4558 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4560 <h4 class=
"parameters">Parameters
</h4>
4563 <dd class=
"description">IPP message
</dd>
4565 <h4 class=
"returnvalue">Return Value
</h4>
4566 <p class=
"description">Request ID or
0 on error
</p>
4567 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippGetResolution">ippGetResolution
</a></h3>
4568 <p class=
"description">Get a resolution value for an attribute.
</p>
4570 int ippGetResolution (
<br>
4571 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4572 int element,
<br>
4573 int *yres,
<br>
4574 <a href=
"#ipp_res_t">ipp_res_t
</a> *units
<br>
4576 <h4 class=
"parameters">Parameters
</h4>
4579 <dd class=
"description">IPP attribute
</dd>
4581 <dd class=
"description">Value number (
0-based)
</dd>
4583 <dd class=
"description">Vertical/feed resolution
</dd>
4585 <dd class=
"description">Units for resolution
</dd>
4587 <h4 class=
"returnvalue">Return Value
</h4>
4588 <p class=
"description">Horizontal/cross feed resolution or
0</p>
4589 <h4 class=
"discussion">Discussion
</h4>
4590 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4591 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4594 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippGetState">ippGetState
</a></h3>
4595 <p class=
"description">Get the IPP message state.
</p>
4597 <a href=
"#ipp_state_t">ipp_state_t
</a> ippGetState (
<br>
4598 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4600 <h4 class=
"parameters">Parameters
</h4>
4603 <dd class=
"description">IPP message
</dd>
4605 <h4 class=
"returnvalue">Return Value
</h4>
4606 <p class=
"description">IPP message state value
</p>
4607 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippGetStatusCode">ippGetStatusCode
</a></h3>
4608 <p class=
"description">Get the status code from an IPP response or event message.
</p>
4610 ipp_status_t ippGetStatusCode (
<br>
4611 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4613 <h4 class=
"parameters">Parameters
</h4>
4616 <dd class=
"description">IPP response or event message
</dd>
4618 <h4 class=
"returnvalue">Return Value
</h4>
4619 <p class=
"description">Status code in IPP message
</p>
4620 <h3 class=
"function"><a name=
"ippGetString">ippGetString
</a></h3>
4621 <p class=
"description">Return the value...
</p>
4623 const char *ippGetString (
<br>
4624 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
4625 int element,
<br>
4626 const char **language
<br>
4628 <h4 class=
"parameters">Parameters
</h4>
4631 <dd class=
"description">IPP attribute
</dd>
4633 <dd class=
"description">Value number (
0-based)
</dd>
4635 <dd class=
"description">Language code (
<code>NULL
</code> for don't care)
</dd>
4637 <h4 class=
"returnvalue">Return Value
</h4>
4638 <p class=
"description">Get the string and optionally the language code for an attribute.
</p>
4639 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
4640 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
4643 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippGetValueTag">ippGetValueTag
</a></h3>
4644 <p class=
"description">Get the value tag for an attribute.
</p>
4646 ipp_tag_t ippGetValueTag (
<br>
4647 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
4649 <h4 class=
"parameters">Parameters
</h4>
4652 <dd class=
"description">IPP attribute
</dd>
4654 <h4 class=
"returnvalue">Return Value
</h4>
4655 <p class=
"description">Value tag or
<code>IPP_TAG_ZERO
</code> on error
</p>
4656 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippGetVersion">ippGetVersion
</a></h3>
4657 <p class=
"description">Get the major and minor version number from an IPP message.
</p>
4659 int ippGetVersion (
<br>
4660 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4661 int *minor
<br>
4663 <h4 class=
"parameters">Parameters
</h4>
4666 <dd class=
"description">IPP message
</dd>
4668 <dd class=
"description">Minor version number or
<code>NULL
</code></dd>
4670 <h4 class=
"returnvalue">Return Value
</h4>
4671 <p class=
"description">Major version number or
0 on error
</p>
4672 <h3 class=
"function"><a name=
"ippLength">ippLength
</a></h3>
4673 <p class=
"description">Compute the length of an IPP message.
</p>
4675 size_t ippLength (
<br>
4676 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4678 <h4 class=
"parameters">Parameters
</h4>
4681 <dd class=
"description">IPP message
</dd>
4683 <h4 class=
"returnvalue">Return Value
</h4>
4684 <p class=
"description">Size of IPP message
</p>
4685 <h3 class=
"function"><a name=
"ippNew">ippNew
</a></h3>
4686 <p class=
"description">Allocate a new IPP message.
</p>
4688 <a href=
"#ipp_t">ipp_t
</a> *ippNew (void);
</p>
4689 <h4 class=
"returnvalue">Return Value
</h4>
4690 <p class=
"description">New IPP message
</p>
4691 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"ippNewRequest">ippNewRequest
</a></h3>
4692 <p class=
"description">Allocate a new IPP request message.
</p>
4694 <a href=
"#ipp_t">ipp_t
</a> *ippNewRequest (
<br>
4695 ipp_op_t op
<br>
4697 <h4 class=
"parameters">Parameters
</h4>
4700 <dd class=
"description">Operation code
</dd>
4702 <h4 class=
"returnvalue">Return Value
</h4>
4703 <p class=
"description">IPP request message
</p>
4704 <h4 class=
"discussion">Discussion
</h4>
4705 <p class=
"discussion">The new request message is initialized with the attributes-charset and
4706 attributes-natural-language attributes added. The
4707 attributes-natural-language value is derived from the current locale.
4710 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"ippNewResponse">ippNewResponse
</a></h3>
4711 <p class=
"description">Allocate a new IPP response message.
</p>
4713 <a href=
"#ipp_t">ipp_t
</a> *ippNewResponse (
<br>
4714 <a href=
"#ipp_t">ipp_t
</a> *request
<br>
4716 <h4 class=
"parameters">Parameters
</h4>
4719 <dd class=
"description">IPP request message
</dd>
4721 <h4 class=
"returnvalue">Return Value
</h4>
4722 <p class=
"description">IPP response message
</p>
4723 <h4 class=
"discussion">Discussion
</h4>
4724 <p class=
"discussion">The new response message is initialized with the same version-number,
4725 request-id, attributes-charset, and attributes-natural-language as the
4726 provided request message. If the attributes-charset or
4727 attributes-natural-language attributes are missing from the request,
4728 "utf-
8" and a value derived from the current locale are substituted,
4732 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippNextAttribute">ippNextAttribute
</a></h3>
4733 <p class=
"description">Return the next attribute in the message.
</p>
4735 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippNextAttribute (
<br>
4736 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4738 <h4 class=
"parameters">Parameters
</h4>
4741 <dd class=
"description">IPP message
</dd>
4743 <h4 class=
"returnvalue">Return Value
</h4>
4744 <p class=
"description">Next attribute or
<code>NULL
</code> if none
</p>
4745 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"ippOpString">ippOpString
</a></h3>
4746 <p class=
"description">Return a name for the given operation id.
</p>
4748 const char *ippOpString (
<br>
4749 ipp_op_t op
<br>
4751 <h4 class=
"parameters">Parameters
</h4>
4754 <dd class=
"description">Operation ID
</dd>
4756 <h4 class=
"returnvalue">Return Value
</h4>
4757 <p class=
"description">Name
</p>
4758 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"ippOpValue">ippOpValue
</a></h3>
4759 <p class=
"description">Return an operation id for the given name.
</p>
4761 ipp_op_t ippOpValue (
<br>
4762 const char *name
<br>
4764 <h4 class=
"parameters">Parameters
</h4>
4767 <dd class=
"description">Textual name
</dd>
4769 <h4 class=
"returnvalue">Return Value
</h4>
4770 <p class=
"description">Operation ID
</p>
4771 <h3 class=
"function"><a name=
"ippPort">ippPort
</a></h3>
4772 <p class=
"description">Return the default IPP port number.
</p>
4774 int ippPort (void);
</p>
4775 <h4 class=
"returnvalue">Return Value
</h4>
4776 <p class=
"description">Port number
</p>
4777 <h3 class=
"function"><a name=
"ippRead">ippRead
</a></h3>
4778 <p class=
"description">Read data for an IPP message from a HTTP connection.
</p>
4780 <a href=
"#ipp_state_t">ipp_state_t
</a> ippRead (
<br>
4781 <a href=
"#http_t">http_t
</a> *http,
<br>
4782 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4784 <h4 class=
"parameters">Parameters
</h4>
4787 <dd class=
"description">HTTP connection
</dd>
4789 <dd class=
"description">IPP data
</dd>
4791 <h4 class=
"returnvalue">Return Value
</h4>
4792 <p class=
"description">Current state
</p>
4793 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/OS X
10.3 </span><a name=
"ippReadFile">ippReadFile
</a></h3>
4794 <p class=
"description">Read data for an IPP message from a file.
</p>
4796 <a href=
"#ipp_state_t">ipp_state_t
</a> ippReadFile (
<br>
4797 int fd,
<br>
4798 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4800 <h4 class=
"parameters">Parameters
</h4>
4803 <dd class=
"description">HTTP data
</dd>
4805 <dd class=
"description">IPP data
</dd>
4807 <h4 class=
"returnvalue">Return Value
</h4>
4808 <p class=
"description">Current state
</p>
4809 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"ippReadIO">ippReadIO
</a></h3>
4810 <p class=
"description">Read data for an IPP message.
</p>
4812 <a href=
"#ipp_state_t">ipp_state_t
</a> ippReadIO (
<br>
4813 void *src,
<br>
4814 <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br>
4815 int blocking,
<br>
4816 <a href=
"#ipp_t">ipp_t
</a> *parent,
<br>
4817 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4819 <h4 class=
"parameters">Parameters
</h4>
4822 <dd class=
"description">Data source
</dd>
4824 <dd class=
"description">Read callback function
</dd>
4826 <dd class=
"description">Use blocking IO?
</dd>
4828 <dd class=
"description">Parent request, if any
</dd>
4830 <dd class=
"description">IPP data
</dd>
4832 <h4 class=
"returnvalue">Return Value
</h4>
4833 <p class=
"description">Current state
</p>
4834 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippSetBoolean">ippSetBoolean
</a></h3>
4835 <p class=
"description">Set a boolean value in an attribute.
</p>
4837 int ippSetBoolean (
<br>
4838 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4839 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4840 int element,
<br>
4841 int boolvalue
<br>
4843 <h4 class=
"parameters">Parameters
</h4>
4846 <dd class=
"description">IPP message
</dd>
4848 <dd class=
"description">IPP attribute
</dd>
4850 <dd class=
"description">Value number (
0-based)
</dd>
4852 <dd class=
"description">Boolean value
</dd>
4854 <h4 class=
"returnvalue">Return Value
</h4>
4855 <p class=
"description">1 on success,
0 on failure
</p>
4856 <h4 class=
"discussion">Discussion
</h4>
4857 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4858 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>
4860 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4862 The
<code>element
</code> parameter specifies which value to set from
0 to
4863 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4866 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippSetCollection">ippSetCollection
</a></h3>
4867 <p class=
"description">Set a collection value in an attribute.
</p>
4869 int ippSetCollection (
<br>
4870 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4871 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4872 int element,
<br>
4873 <a href=
"#ipp_t">ipp_t
</a> *colvalue
<br>
4875 <h4 class=
"parameters">Parameters
</h4>
4878 <dd class=
"description">IPP message
</dd>
4880 <dd class=
"description">IPP attribute
</dd>
4882 <dd class=
"description">Value number (
0-based)
</dd>
4884 <dd class=
"description">Collection value
</dd>
4886 <h4 class=
"returnvalue">Return Value
</h4>
4887 <p class=
"description">1 on success,
0 on failure
</p>
4888 <h4 class=
"discussion">Discussion
</h4>
4889 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4890 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>
4892 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4894 The
<code>element
</code> parameter specifies which value to set from
0 to
4895 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4898 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippSetDate">ippSetDate
</a></h3>
4899 <p class=
"description">Set a date value in an attribute.
</p>
4901 int ippSetDate (
<br>
4902 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4903 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4904 int element,
<br>
4905 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *datevalue
<br>
4907 <h4 class=
"parameters">Parameters
</h4>
4910 <dd class=
"description">IPP message
</dd>
4912 <dd class=
"description">IPP attribute
</dd>
4914 <dd class=
"description">Value number (
0-based)
</dd>
4916 <dd class=
"description">Date value
</dd>
4918 <h4 class=
"returnvalue">Return Value
</h4>
4919 <p class=
"description">1 on success,
0 on failure
</p>
4920 <h4 class=
"discussion">Discussion
</h4>
4921 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4922 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>
4924 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4926 The
<code>element
</code> parameter specifies which value to set from
0 to
4927 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4930 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippSetGroupTag">ippSetGroupTag
</a></h3>
4931 <p class=
"description">Set the group tag of an attribute.
</p>
4933 int ippSetGroupTag (
<br>
4934 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4935 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4936 ipp_tag_t group_tag
<br>
4938 <h4 class=
"parameters">Parameters
</h4>
4941 <dd class=
"description">IPP message
</dd>
4943 <dd class=
"description">Attribute
</dd>
4945 <dd class=
"description">Group tag
</dd>
4947 <h4 class=
"returnvalue">Return Value
</h4>
4948 <p class=
"description">1 on success,
0 on failure
</p>
4949 <h4 class=
"discussion">Discussion
</h4>
4950 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4951 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>
4953 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4955 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
4956 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
4957 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
4958 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
4959 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
4962 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippSetInteger">ippSetInteger
</a></h3>
4963 <p class=
"description">Set an integer or enum value in an attribute.
</p>
4965 int ippSetInteger (
<br>
4966 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4967 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4968 int element,
<br>
4969 int intvalue
<br>
4971 <h4 class=
"parameters">Parameters
</h4>
4974 <dd class=
"description">IPP message
</dd>
4976 <dd class=
"description">IPP attribute
</dd>
4978 <dd class=
"description">Value number (
0-based)
</dd>
4980 <dd class=
"description">Integer/enum value
</dd>
4982 <h4 class=
"returnvalue">Return Value
</h4>
4983 <p class=
"description">1 on success,
0 on failure
</p>
4984 <h4 class=
"discussion">Discussion
</h4>
4985 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
4986 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>
4988 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4990 The
<code>element
</code> parameter specifies which value to set from
0 to
4991 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4994 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippSetName">ippSetName
</a></h3>
4995 <p class=
"description">Set the name of an attribute.
</p>
4997 int ippSetName (
<br>
4998 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4999 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
5000 const char *name
<br>
5002 <h4 class=
"parameters">Parameters
</h4>
5005 <dd class=
"description">IPP message
</dd>
5007 <dd class=
"description">IPP attribute
</dd>
5009 <dd class=
"description">Attribute name
</dd>
5011 <h4 class=
"returnvalue">Return Value
</h4>
5012 <p class=
"description">1 on success,
0 on failure
</p>
5013 <h4 class=
"discussion">Discussion
</h4>
5014 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5015 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
5017 The
<code>attr
</code> parameter may be modified as a result of setting the value.
5020 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"ippSetOctetString">ippSetOctetString
</a></h3>
5021 <p class=
"description">Set an octetString value in an IPP attribute.
</p>
5023 int ippSetOctetString (
<br>
5024 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5025 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
5026 int element,
<br>
5027 const void *data,
<br>
5028 int datalen
<br>
5030 <h4 class=
"parameters">Parameters
</h4>
5033 <dd class=
"description">IPP message
</dd>
5035 <dd class=
"description">IPP attribute
</dd>
5037 <dd class=
"description">Value number (
0-based)
</dd>
5039 <dd class=
"description">Pointer to octetString data
</dd>
5041 <dd class=
"description">Length of octetString data
</dd>
5043 <h4 class=
"returnvalue">Return Value
</h4>
5044 <p class=
"description">1 on success,
0 on failure
</p>
5045 <h4 class=
"discussion">Discussion
</h4>
5046 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5047 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>
5049 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5051 The
<code>element
</code> parameter specifies which value to set from
0 to
5052 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
5055 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippSetOperation">ippSetOperation
</a></h3>
5056 <p class=
"description">Set the operation ID in an IPP request message.
</p>
5058 int ippSetOperation (
<br>
5059 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5060 ipp_op_t op
<br>
5062 <h4 class=
"parameters">Parameters
</h4>
5065 <dd class=
"description">IPP request message
</dd>
5067 <dd class=
"description">Operation ID
</dd>
5069 <h4 class=
"returnvalue">Return Value
</h4>
5070 <p class=
"description">1 on success,
0 on failure
</p>
5071 <h4 class=
"discussion">Discussion
</h4>
5072 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5073 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
5076 <h3 class=
"function"><a name=
"ippSetPort">ippSetPort
</a></h3>
5077 <p class=
"description">Set the default port number.
</p>
5079 void ippSetPort (
<br>
5080 int p
<br>
5082 <h4 class=
"parameters">Parameters
</h4>
5085 <dd class=
"description">Port number to use
</dd>
5087 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippSetRange">ippSetRange
</a></h3>
5088 <p class=
"description">Set a rangeOfInteger value in an attribute.
</p>
5090 int ippSetRange (
<br>
5091 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5092 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
5093 int element,
<br>
5094 int lowervalue,
<br>
5095 int uppervalue
<br>
5097 <h4 class=
"parameters">Parameters
</h4>
5100 <dd class=
"description">IPP message
</dd>
5102 <dd class=
"description">IPP attribute
</dd>
5104 <dd class=
"description">Value number (
0-based)
</dd>
5106 <dd class=
"description">Lower bound for range
</dd>
5108 <dd class=
"description">Upper bound for range
</dd>
5110 <h4 class=
"returnvalue">Return Value
</h4>
5111 <p class=
"description">1 on success,
0 on failure
</p>
5112 <h4 class=
"discussion">Discussion
</h4>
5113 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5114 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>
5116 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5118 The
<code>element
</code> parameter specifies which value to set from
0 to
5119 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
5122 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippSetRequestId">ippSetRequestId
</a></h3>
5123 <p class=
"description">Set the request ID in an IPP message.
</p>
5125 int ippSetRequestId (
<br>
5126 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5127 int request_id
<br>
5129 <h4 class=
"parameters">Parameters
</h4>
5132 <dd class=
"description">IPP message
</dd>
5134 <dd class=
"description">Request ID
</dd>
5136 <h4 class=
"returnvalue">Return Value
</h4>
5137 <p class=
"description">1 on success,
0 on failure
</p>
5138 <h4 class=
"discussion">Discussion
</h4>
5139 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5140 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>
5142 The
<code>request_id
</code> parameter must be greater than
0.
5145 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippSetResolution">ippSetResolution
</a></h3>
5146 <p class=
"description">Set a resolution value in an attribute.
</p>
5148 int ippSetResolution (
<br>
5149 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5150 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
5151 int element,
<br>
5152 <a href=
"#ipp_res_t">ipp_res_t
</a> unitsvalue,
<br>
5153 int xresvalue,
<br>
5154 int yresvalue
<br>
5156 <h4 class=
"parameters">Parameters
</h4>
5159 <dd class=
"description">IPP message
</dd>
5161 <dd class=
"description">IPP attribute
</dd>
5163 <dd class=
"description">Value number (
0-based)
</dd>
5165 <dd class=
"description">Resolution units
</dd>
5167 <dd class=
"description">Horizontal/cross feed resolution
</dd>
5169 <dd class=
"description">Vertical/feed resolution
</dd>
5171 <h4 class=
"returnvalue">Return Value
</h4>
5172 <p class=
"description">1 on success,
0 on failure
</p>
5173 <h4 class=
"discussion">Discussion
</h4>
5174 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5175 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
<br>
5177 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5179 The
<code>element
</code> parameter specifies which value to set from
0 to
5180 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
5183 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippSetState">ippSetState
</a></h3>
5184 <p class=
"description">Set the current state of the IPP message.
</p>
5186 int ippSetState (
<br>
5187 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5188 <a href=
"#ipp_state_t">ipp_state_t
</a> state
<br>
5190 <h4 class=
"parameters">Parameters
</h4>
5193 <dd class=
"description">IPP message
</dd>
5195 <dd class=
"description">IPP state value
</dd>
5197 <h4 class=
"returnvalue">Return Value
</h4>
5198 <p class=
"description">1 on success,
0 on failure
</p>
5199 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippSetStatusCode">ippSetStatusCode
</a></h3>
5200 <p class=
"description">Set the status code in an IPP response or event message.
</p>
5202 int ippSetStatusCode (
<br>
5203 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5204 ipp_status_t status
<br>
5206 <h4 class=
"parameters">Parameters
</h4>
5209 <dd class=
"description">IPP response or event message
</dd>
5211 <dd class=
"description">Status code
</dd>
5213 <h4 class=
"returnvalue">Return Value
</h4>
5214 <p class=
"description">1 on success,
0 on failure
</p>
5215 <h4 class=
"discussion">Discussion
</h4>
5216 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5217 the
<a href=
"#ippNew"><code>ippNew
</code></a>,
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a>, or
<a href=
"#ippNewResponse"><code>ippNewResponse
</code></a> functions.
5220 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippSetString">ippSetString
</a></h3>
5221 <p class=
"description">Set a string value in an attribute.
</p>
5223 int ippSetString (
<br>
5224 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5225 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
5226 int element,
<br>
5227 const char *strvalue
<br>
5229 <h4 class=
"parameters">Parameters
</h4>
5232 <dd class=
"description">IPP message
</dd>
5234 <dd class=
"description">IPP attribute
</dd>
5236 <dd class=
"description">Value number (
0-based)
</dd>
5238 <dd class=
"description">String value
</dd>
5240 <h4 class=
"returnvalue">Return Value
</h4>
5241 <p class=
"description">1 on success,
0 on failure
</p>
5242 <h4 class=
"discussion">Discussion
</h4>
5243 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5244 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>
5246 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5248 The
<code>element
</code> parameter specifies which value to set from
0 to
5249 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
5252 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"ippSetStringf">ippSetStringf
</a></h3>
5253 <p class=
"description">Set a formatted string value of an attribute.
</p>
5255 int ippSetStringf (
<br>
5256 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5257 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
5258 int element,
<br>
5259 const char *format,
<br>
5260 ...
<br>
5262 <h4 class=
"parameters">Parameters
</h4>
5265 <dd class=
"description">IPP message
</dd>
5267 <dd class=
"description">IPP attribute
</dd>
5269 <dd class=
"description">Value number (
0-based)
</dd>
5271 <dd class=
"description">Printf-style format string
</dd>
5273 <dd class=
"description">Additional arguments as needed
</dd>
5275 <h4 class=
"returnvalue">Return Value
</h4>
5276 <p class=
"description">1 on success,
0 on failure
</p>
5277 <h4 class=
"discussion">Discussion
</h4>
5278 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5279 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>
5281 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5283 The
<code>element
</code> parameter specifies which value to set from
0 to
5284 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
<br>
5286 The
<code>format
</code> parameter uses formatting characters compatible with the
5287 printf family of standard functions. Additional arguments follow it as
5288 needed. The formatted string is truncated as needed to the maximum length of
5289 the corresponding value type.
5292 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"ippSetStringfv">ippSetStringfv
</a></h3>
5293 <p class=
"description">Set a formatted string value of an attribute.
</p>
5295 int ippSetStringfv (
<br>
5296 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5297 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
5298 int element,
<br>
5299 const char *format,
<br>
5300 va_list ap
<br>
5302 <h4 class=
"parameters">Parameters
</h4>
5305 <dd class=
"description">IPP message
</dd>
5307 <dd class=
"description">IPP attribute
</dd>
5309 <dd class=
"description">Value number (
0-based)
</dd>
5311 <dd class=
"description">Printf-style format string
</dd>
5313 <dd class=
"description">Pointer to additional arguments
</dd>
5315 <h4 class=
"returnvalue">Return Value
</h4>
5316 <p class=
"description">1 on success,
0 on failure
</p>
5317 <h4 class=
"discussion">Discussion
</h4>
5318 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5319 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>
5321 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5323 The
<code>element
</code> parameter specifies which value to set from
0 to
5324 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
<br>
5326 The
<code>format
</code> parameter uses formatting characters compatible with the
5327 printf family of standard functions. Additional arguments follow it as
5328 needed. The formatted string is truncated as needed to the maximum length of
5329 the corresponding value type.
5332 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippSetValueTag">ippSetValueTag
</a></h3>
5333 <p class=
"description">Set the value tag of an attribute.
</p>
5335 int ippSetValueTag (
<br>
5336 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5337 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
5338 ipp_tag_t value_tag
<br>
5340 <h4 class=
"parameters">Parameters
</h4>
5343 <dd class=
"description">IPP message
</dd>
5345 <dd class=
"description">IPP attribute
</dd>
5347 <dd class=
"description">Value tag
</dd>
5349 <h4 class=
"returnvalue">Return Value
</h4>
5350 <p class=
"description">1 on success,
0 on failure
</p>
5351 <h4 class=
"discussion">Discussion
</h4>
5352 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5353 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>
5355 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
5357 Integer (
<code>IPP_TAG_INTEGER
</code>) values can be promoted to rangeOfInteger
5358 (
<code>IPP_TAG_RANGE
</code>) values, the various string tags can be promoted to name
5359 (
<code>IPP_TAG_NAME
</code>) or nameWithLanguage (
<code>IPP_TAG_NAMELANG
</code>) values, text
5360 (
<code>IPP_TAG_TEXT
</code>) values can be promoted to textWithLanguage
5361 (
<code>IPP_TAG_TEXTLANG
</code>) values, and all values can be demoted to the various
5362 out-of-band value tags such as no-value (
<code>IPP_TAG_NOVALUE
</code>). All other changes
5363 will be rejected.
<br>
5365 Promoting a string attribute to nameWithLanguage or textWithLanguage adds the language
5366 code in the
"attributes-natural-language
" attribute or, if not present, the language
5367 code for the current locale.
5370 <h3 class=
"function"><span class=
"info"> CUPS
1.6/OS X
10.8 </span><a name=
"ippSetVersion">ippSetVersion
</a></h3>
5371 <p class=
"description">Set the version number in an IPP message.
</p>
5373 int ippSetVersion (
<br>
5374 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
5375 int major,
<br>
5376 int minor
<br>
5378 <h4 class=
"parameters">Parameters
</h4>
5381 <dd class=
"description">IPP message
</dd>
5383 <dd class=
"description">Major version number (major.minor)
</dd>
5385 <dd class=
"description">Minor version number (major.minor)
</dd>
5387 <h4 class=
"returnvalue">Return Value
</h4>
5388 <p class=
"description">1 on success,
0 on failure
</p>
5389 <h4 class=
"discussion">Discussion
</h4>
5390 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using
5391 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>
5393 The valid version numbers are currently
1.0,
1.1,
2.0,
2.1, and
2.2.
5396 <h3 class=
"function"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"ippStateString">ippStateString
</a></h3>
5397 <p class=
"description">Return the name corresponding to a state value.
</p>
5399 const char *ippStateString (
<br>
5400 <a href=
"#ipp_state_t">ipp_state_t
</a> state
<br>
5402 <h4 class=
"parameters">Parameters
</h4>
5405 <dd class=
"description">State value
</dd>
5407 <h4 class=
"returnvalue">Return Value
</h4>
5408 <p class=
"description">State name
</p>
5409 <h3 class=
"function"><span class=
"info"> CUPS
1.4/OS X
10.6 </span><a name=
"ippTagString">ippTagString
</a></h3>
5410 <p class=
"description">Return the tag name corresponding to a tag value.
</p>
5412 const char *ippTagString (
<br>
5413 ipp_tag_t tag
<br>
5415 <h4 class=
"parameters">Parameters
</h4>
5418 <dd class=
"description">Tag value
</dd>
5420 <h4 class=
"returnvalue">Return Value
</h4>
5421 <p class=
"description">Tag name
</p>
5422 <h4 class=
"discussion">Discussion
</h4>
5423 <p class=
"discussion">The returned names are defined in RFC
2911 and
3382.
5426 <h3 class=
"function"><span class=
"info"> CUPS
1.4/OS X
10.6 </span><a name=
"ippTagValue">ippTagValue
</a></h3>
5427 <p class=
"description">Return the tag value corresponding to a tag name.
</p>
5429 ipp_tag_t ippTagValue (
<br>
5430 const char *name
<br>
5432 <h4 class=
"parameters">Parameters
</h4>
5435 <dd class=
"description">Tag name
</dd>
5437 <h4 class=
"returnvalue">Return Value
</h4>
5438 <p class=
"description">Tag value
</p>
5439 <h4 class=
"discussion">Discussion
</h4>
5440 <p class=
"discussion">The tag names are defined in RFC
2911 and
3382.
5443 <h3 class=
"function"><a name=
"ippTimeToDate">ippTimeToDate
</a></h3>
5444 <p class=
"description">Convert from UNIX time to RFC
1903 format.
</p>
5446 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *ippTimeToDate (
<br>
5447 time_t t
<br>
5449 <h4 class=
"parameters">Parameters
</h4>
5452 <dd class=
"description">UNIX time value
</dd>
5454 <h4 class=
"returnvalue">Return Value
</h4>
5455 <p class=
"description">RFC-
1903 date/time data
</p>
5456 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"ippValidateAttribute">ippValidateAttribute
</a></h3>
5457 <p class=
"description">Validate the contents of an attribute.
</p>
5459 int ippValidateAttribute (
<br>
5460 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
5462 <h4 class=
"parameters">Parameters
</h4>
5465 <dd class=
"description">Attribute
</dd>
5467 <h4 class=
"returnvalue">Return Value
</h4>
5468 <p class=
"description">1 if valid,
0 otherwise
</p>
5469 <h4 class=
"discussion">Discussion
</h4>
5470 <p class=
"discussion">This function validates the contents of an attribute based on the name and
5471 value tag.
1 is returned if the attribute is valid,
0 otherwise. On
5472 failure, cupsLastErrorString() is set to a human-readable message.
5475 <h3 class=
"function"><span class=
"info"> CUPS
1.7/OS X
10.9 </span><a name=
"ippValidateAttributes">ippValidateAttributes
</a></h3>
5476 <p class=
"description">Validate all attributes in an IPP message.
</p>
5478 int ippValidateAttributes (
<br>
5479 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5481 <h4 class=
"parameters">Parameters
</h4>
5484 <dd class=
"description">IPP message
</dd>
5486 <h4 class=
"returnvalue">Return Value
</h4>
5487 <p class=
"description">1 if valid,
0 otherwise
</p>
5488 <h4 class=
"discussion">Discussion
</h4>
5489 <p class=
"discussion">This function validates the contents of the IPP message, including each
5490 attribute. Like
<a href=
"#ippValidateAttribute"><code>ippValidateAttribute
</code></a>, cupsLastErrorString() is set
5491 to a human-readable message on failure.
5494 <h3 class=
"function"><a name=
"ippWrite">ippWrite
</a></h3>
5495 <p class=
"description">Write data for an IPP message to a HTTP connection.
</p>
5497 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWrite (
<br>
5498 <a href=
"#http_t">http_t
</a> *http,
<br>
5499 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5501 <h4 class=
"parameters">Parameters
</h4>
5504 <dd class=
"description">HTTP connection
</dd>
5506 <dd class=
"description">IPP data
</dd>
5508 <h4 class=
"returnvalue">Return Value
</h4>
5509 <p class=
"description">Current state
</p>
5510 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/OS X
10.3 </span><a name=
"ippWriteFile">ippWriteFile
</a></h3>
5511 <p class=
"description">Write data for an IPP message to a file.
</p>
5513 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWriteFile (
<br>
5514 int fd,
<br>
5515 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5517 <h4 class=
"parameters">Parameters
</h4>
5520 <dd class=
"description">HTTP data
</dd>
5522 <dd class=
"description">IPP data
</dd>
5524 <h4 class=
"returnvalue">Return Value
</h4>
5525 <p class=
"description">Current state
</p>
5526 <h3 class=
"function"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"ippWriteIO">ippWriteIO
</a></h3>
5527 <p class=
"description">Write data for an IPP message.
</p>
5529 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWriteIO (
<br>
5530 void *dst,
<br>
5531 <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br>
5532 int blocking,
<br>
5533 <a href=
"#ipp_t">ipp_t
</a> *parent,
<br>
5534 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
5536 <h4 class=
"parameters">Parameters
</h4>
5539 <dd class=
"description">Destination
</dd>
5541 <dd class=
"description">Write callback function
</dd>
5543 <dd class=
"description">Use blocking IO?
</dd>
5545 <dd class=
"description">Parent IPP message
</dd>
5547 <dd class=
"description">IPP data
</dd>
5549 <h4 class=
"returnvalue">Return Value
</h4>
5550 <p class=
"description">Current state
</p>
5551 <h2 class=
"title"><a name=
"TYPES">Data Types
</a></h2>
5552 <h3 class=
"typedef"><a name=
"gss_auth_identity_desc">gss_auth_identity_desc
</a></h3>
5553 <p class=
"description">Local functions...
</p>
5555 typedef struct
<a href=
"#gss_auth_identity">gss_auth_identity
</a> gss_auth_identity_desc;
5557 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"http_addr_t">http_addr_t
</a></h3>
5558 <p class=
"description">Socket address union, which
5559 makes using IPv6 and other
5560 address types easier and
5563 typedef union _http_addr_u / http_addr_t;
5565 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"http_addrlist_t">http_addrlist_t
</a></h3>
5566 <p class=
"description">Socket address list, which is
5567 used to enumerate all of the
5568 addresses that are associated
5569 with a hostname.
</p>
5571 typedef struct
<a href=
"#http_addrlist_s">http_addrlist_s
</a> / http_addrlist_t;
5573 <h3 class=
"typedef"><a name=
"http_auth_t">http_auth_t
</a></h3>
5574 <p class=
"description">HTTP authentication types
</p>
5576 typedef enum
<a href=
"#http_auth_e">http_auth_e
</a> http_auth_t;
5578 <h3 class=
"typedef"><span class=
"info"> CUPS
1.5/OS X
10.7 </span><a name=
"http_credential_t">http_credential_t
</a></h3>
5579 <p class=
"description">HTTP credential data
</p>
5581 typedef struct
<a href=
"#http_credential_s">http_credential_s
</a> http_credential_t;
5583 <h3 class=
"typedef"><a name=
"http_encoding_t">http_encoding_t
</a></h3>
5584 <p class=
"description">HTTP transfer encoding values
</p>
5586 typedef enum
<a href=
"#http_encoding_e">http_encoding_e
</a> http_encoding_t;
5588 <h3 class=
"typedef"><a name=
"http_encryption_t">http_encryption_t
</a></h3>
5589 <p class=
"description">HTTP encryption values
</p>
5591 typedef enum
<a href=
"#http_encryption_e">http_encryption_e
</a> http_encryption_t;
5593 <h3 class=
"typedef"><a name=
"http_field_t">http_field_t
</a></h3>
5594 <p class=
"description">HTTP field names
</p>
5596 typedef enum
<a href=
"#http_field_e">http_field_e
</a> http_field_t;
5598 <h3 class=
"typedef"><a name=
"http_keepalive_t">http_keepalive_t
</a></h3>
5599 <p class=
"description">HTTP keep-alive values
</p>
5601 typedef enum
<a href=
"#http_keepalive_e">http_keepalive_e
</a> http_keepalive_t;
5603 <h3 class=
"typedef"><a name=
"http_state_t">http_state_t
</a></h3>
5604 <p class=
"description">HTTP state values; states
5605 are server-oriented...
</p>
5607 typedef enum
<a href=
"#http_state_e">http_state_e
</a> http_state_t;
5609 <h3 class=
"typedef"><a name=
"http_t">http_t
</a></h3>
5610 <p class=
"description">HTTP connection type
</p>
5612 typedef struct _http_s http_t;
5614 <h3 class=
"typedef"><span class=
"info"> CUPS
1.5/OS X
10.7 </span><a name=
"http_timeout_cb_t">http_timeout_cb_t
</a></h3>
5615 <p class=
"description">HTTP timeout callback
</p>
5617 typedef int (*http_timeout_cb_t)(
<a href=
"#http_t">http_t
</a> *http, void *user_data);
5619 <h3 class=
"typedef"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"http_trust_t">http_trust_t
</a></h3>
5620 <p class=
"description">Level of trust for credentials
</p>
5622 typedef enum
<a href=
"#http_trust_e">http_trust_e
</a> http_trust_t;
5624 <h3 class=
"typedef"><a name=
"http_uri_coding_t">http_uri_coding_t
</a></h3>
5625 <p class=
"description">URI en/decode flags
</p>
5627 typedef enum
<a href=
"#http_uri_coding_e">http_uri_coding_e
</a> http_uri_coding_t;
5629 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"http_uri_status_t">http_uri_status_t
</a></h3>
5630 <p class=
"description">URI separation status
</p>
5632 typedef enum
<a href=
"#http_uri_status_e">http_uri_status_e
</a> http_uri_status_t;
5634 <h3 class=
"typedef"><a name=
"http_version_t">http_version_t
</a></h3>
5635 <p class=
"description">HTTP version numbers
</p>
5637 typedef enum
<a href=
"#http_version_e">http_version_e
</a> http_version_t;
5639 <h3 class=
"typedef"><a name=
"ipp_attribute_t">ipp_attribute_t
</a></h3>
5640 <p class=
"description">IPP attribute
</p>
5642 typedef struct _ipp_attribute_s ipp_attribute_t;
5644 <h3 class=
"typedef"><a name=
"ipp_copycb_t">ipp_copycb_t
</a></h3>
5645 <p class=
"description">The following structures are PRIVATE starting with CUPS
1.6/OS X
10.8.
5646 Please use the new accessor functions available in CUPS
1.6 and later, as
5647 these definitions will be moved to a private header file in a future release.
</p>
5649 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);
5651 <h3 class=
"typedef"><a name=
"ipp_dstate_t">ipp_dstate_t
</a></h3>
5652 <p class=
"description">Document states
</p>
5654 typedef enum
<a href=
"#ipp_dstate_e">ipp_dstate_e
</a> ipp_dstate_t;
5656 <h3 class=
"typedef"><a name=
"ipp_finish_t">ipp_finish_t
</a></h3>
5657 <p class=
"description">Job collation types
</p>
5659 typedef enum
<a href=
"#ipp_finishings_e">ipp_finishings_e
</a> ipp_finish_t;
5661 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"ipp_iocb_t">ipp_iocb_t
</a></h3>
5662 <p class=
"description">IPP IO Callback Function
</p>
5664 typedef ssize_t (*ipp_iocb_t)(void *context,
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *buffer, size_t bytes);
5666 <h3 class=
"typedef"><a name=
"ipp_jcollate_t">ipp_jcollate_t
</a></h3>
5667 <p class=
"description">Job collation types
</p>
5669 typedef enum
<a href=
"#ipp_jcollate_e">ipp_jcollate_e
</a> ipp_jcollate_t;
5671 <h3 class=
"typedef"><a name=
"ipp_orient_t">ipp_orient_t
</a></h3>
5672 <p class=
"description">Orientation values
</p>
5674 typedef enum
<a href=
"#ipp_orient_e">ipp_orient_e
</a> ipp_orient_t;
5676 <h3 class=
"typedef"><a name=
"ipp_pstate_t">ipp_pstate_t
</a></h3>
5677 <p class=
"description">Printer states
</p>
5679 typedef enum
<a href=
"#ipp_pstate_e">ipp_pstate_e
</a> ipp_pstate_t;
5681 <h3 class=
"typedef"><a name=
"ipp_quality_t">ipp_quality_t
</a></h3>
5682 <p class=
"description">Qualities
</p>
5684 typedef enum
<a href=
"#ipp_quality_e">ipp_quality_e
</a> ipp_quality_t;
5686 <h3 class=
"typedef"><a name=
"ipp_res_t">ipp_res_t
</a></h3>
5687 <p class=
"description">Resolution units
</p>
5689 typedef enum
<a href=
"#ipp_res_e">ipp_res_e
</a> ipp_res_t;
5691 <h3 class=
"typedef"><a name=
"ipp_state_t">ipp_state_t
</a></h3>
5692 <p class=
"description">IPP states
</p>
5694 typedef enum
<a href=
"#ipp_state_e">ipp_state_e
</a> ipp_state_t;
5696 <h3 class=
"typedef"><a name=
"ipp_t">ipp_t
</a></h3>
5697 <p class=
"description">IPP request/response data
</p>
5699 typedef struct _ipp_s ipp_t;
5701 <h3 class=
"typedef"><a name=
"ipp_uchar_t">ipp_uchar_t
</a></h3>
5702 <p class=
"description">Unsigned
8-bit integer/character
</p>
5704 typedef unsigned char ipp_uchar_t;
5706 <h2 class=
"title"><a name=
"STRUCTURES">Structures
</a></h2>
5707 <h3 class=
"struct"><a name=
"gss_auth_identity">gss_auth_identity
</a></h3>
5708 <p class=
"description">Local functions...
</p>
5709 <p class=
"code">struct gss_auth_identity {
<br>
5710 gss_buffer_t *credentialsRef;
<br>
5711 uint32_t flags;
<br>
5712 char *password;
<br>
5713 char *realm;
<br>
5714 uint32_t type;
<br>
5715 char *username;
<br>
5717 <h4 class=
"members">Members
</h4>
5719 <dt>credentialsRef
</dt>
5726 <h3 class=
"struct"><span class=
"info"> CUPS
1.2/OS X
10.5 </span><a name=
"http_addrlist_s">http_addrlist_s
</a></h3>
5727 <p class=
"description">Socket address list, which is
5728 used to enumerate all of the
5729 addresses that are associated
5730 with a hostname.
</p>
5731 <p class=
"code">struct http_addrlist_s {
<br>
5732 <a href=
"#http_addr_t">http_addr_t
</a> addr;
<br>
5733 struct
<a href=
"#http_addrlist_s">http_addrlist_s
</a> *next;
<br>
5735 <h4 class=
"members">Members
</h4>
5738 <dd class=
"description">Address
</dd>
5740 <dd class=
"description">Pointer to next address in list
</dd>
5742 <h3 class=
"struct"><span class=
"info"> CUPS
1.5/OS X
10.7 </span><a name=
"http_credential_s">http_credential_s
</a></h3>
5743 <p class=
"description">HTTP credential data
</p>
5744 <p class=
"code">struct http_credential_s {
<br>
5745 void *data;
<br>
5746 size_t datalen;
<br>
5748 <h4 class=
"members">Members
</h4>
5751 <dd class=
"description">Pointer to credential data
</dd>
5753 <dd class=
"description">Credential length
</dd>
5755 <h3 class=
"struct"><a name=
"pollfd">pollfd
</a></h3>
5756 <p class=
"description">User data (unused)
</p>
5757 <p class=
"code">struct pollfd *pollfds, unsigned int num_pollfds, int timeout, void *context) {
<br>
5758 void) context;
<br>
5759 void) timeout;
<br>
5761 <h4 class=
"members">Members
</h4>
5766 <h2 class=
"title"><a name=
"ENUMERATIONS">Constants
</a></h2>
5767 <h3 class=
"enumeration"><a name=
"http_auth_e">http_auth_e
</a></h3>
5768 <p class=
"description">HTTP authentication types
</p>
5769 <h4 class=
"constants">Constants
</h4>
5771 <dt>HTTP_AUTH_BASIC
</dt>
5772 <dd class=
"description">Basic authentication in use
</dd>
5773 <dt>HTTP_AUTH_MD5
</dt>
5774 <dd class=
"description">Digest authentication in use
</dd>
5775 <dt>HTTP_AUTH_MD5_INT
</dt>
5776 <dd class=
"description">Digest authentication in use for body
</dd>
5777 <dt>HTTP_AUTH_MD5_SESS
</dt>
5778 <dd class=
"description">MD5-session authentication in use
</dd>
5779 <dt>HTTP_AUTH_MD5_SESS_INT
</dt>
5780 <dd class=
"description">MD5-session authentication in use for body
</dd>
5781 <dt>HTTP_AUTH_NEGOTIATE
<span class=
"info"> CUPS
1.3/OS X
10.5 </span></dt>
5782 <dd class=
"description">GSSAPI authentication in use
</dd>
5783 <dt>HTTP_AUTH_NONE
</dt>
5784 <dd class=
"description">No authentication in use
</dd>
5786 <h3 class=
"enumeration"><a name=
"http_encoding_e">http_encoding_e
</a></h3>
5787 <p class=
"description">HTTP transfer encoding values
</p>
5788 <h4 class=
"constants">Constants
</h4>
5790 <dt>HTTP_ENCODING_CHUNKED
</dt>
5791 <dd class=
"description">Data is chunked
</dd>
5792 <dt>HTTP_ENCODING_FIELDS
</dt>
5793 <dd class=
"description">Sending HTTP fields
</dd>
5794 <dt>HTTP_ENCODING_LENGTH
</dt>
5795 <dd class=
"description">Data is sent with Content-Length
</dd>
5797 <h3 class=
"enumeration"><a name=
"http_encryption_e">http_encryption_e
</a></h3>
5798 <p class=
"description">HTTP encryption values
</p>
5799 <h4 class=
"constants">Constants
</h4>
5801 <dt>HTTP_ENCRYPTION_ALWAYS
</dt>
5802 <dd class=
"description">Always encrypt (SSL)
</dd>
5803 <dt>HTTP_ENCRYPTION_IF_REQUESTED
</dt>
5804 <dd class=
"description">Encrypt if requested (TLS upgrade)
</dd>
5805 <dt>HTTP_ENCRYPTION_NEVER
</dt>
5806 <dd class=
"description">Never encrypt
</dd>
5807 <dt>HTTP_ENCRYPTION_REQUIRED
</dt>
5808 <dd class=
"description">Encryption is required (TLS upgrade)
</dd>
5810 <h3 class=
"enumeration"><a name=
"http_field_e">http_field_e
</a></h3>
5811 <p class=
"description">HTTP field names
</p>
5812 <h4 class=
"constants">Constants
</h4>
5814 <dt>HTTP_FIELD_ACCEPT_ENCODING
<span class=
"info"> CUPS
1.7/OS X
10.9 </span></dt>
5815 <dd class=
"description">Accepting-Encoding field
</dd>
5816 <dt>HTTP_FIELD_ACCEPT_LANGUAGE
</dt>
5817 <dd class=
"description">Accept-Language field
</dd>
5818 <dt>HTTP_FIELD_ACCEPT_RANGES
</dt>
5819 <dd class=
"description">Accept-Ranges field
</dd>
5820 <dt>HTTP_FIELD_ALLOW
<span class=
"info"> CUPS
1.7/OS X
10.9 </span></dt>
5821 <dd class=
"description">Allow field
</dd>
5822 <dt>HTTP_FIELD_AUTHORIZATION
</dt>
5823 <dd class=
"description">Authorization field
</dd>
5824 <dt>HTTP_FIELD_CONNECTION
</dt>
5825 <dd class=
"description">Connection field
</dd>
5826 <dt>HTTP_FIELD_CONTENT_ENCODING
</dt>
5827 <dd class=
"description">Content-Encoding field
</dd>
5828 <dt>HTTP_FIELD_CONTENT_LANGUAGE
</dt>
5829 <dd class=
"description">Content-Language field
</dd>
5830 <dt>HTTP_FIELD_CONTENT_LENGTH
</dt>
5831 <dd class=
"description">Content-Length field
</dd>
5832 <dt>HTTP_FIELD_CONTENT_LOCATION
</dt>
5833 <dd class=
"description">Content-Location field
</dd>
5834 <dt>HTTP_FIELD_CONTENT_MD5
</dt>
5835 <dd class=
"description">Content-MD5 field
</dd>
5836 <dt>HTTP_FIELD_CONTENT_RANGE
</dt>
5837 <dd class=
"description">Content-Range field
</dd>
5838 <dt>HTTP_FIELD_CONTENT_TYPE
</dt>
5839 <dd class=
"description">Content-Type field
</dd>
5840 <dt>HTTP_FIELD_CONTENT_VERSION
</dt>
5841 <dd class=
"description">Content-Version field
</dd>
5842 <dt>HTTP_FIELD_DATE
</dt>
5843 <dd class=
"description">Date field
</dd>
5844 <dt>HTTP_FIELD_HOST
</dt>
5845 <dd class=
"description">Host field
</dd>
5846 <dt>HTTP_FIELD_IF_MODIFIED_SINCE
</dt>
5847 <dd class=
"description">If-Modified-Since field
</dd>
5848 <dt>HTTP_FIELD_IF_UNMODIFIED_SINCE
</dt>
5849 <dd class=
"description">If-Unmodified-Since field
</dd>
5850 <dt>HTTP_FIELD_KEEP_ALIVE
</dt>
5851 <dd class=
"description">Keep-Alive field
</dd>
5852 <dt>HTTP_FIELD_LAST_MODIFIED
</dt>
5853 <dd class=
"description">Last-Modified field
</dd>
5854 <dt>HTTP_FIELD_LINK
</dt>
5855 <dd class=
"description">Link field
</dd>
5856 <dt>HTTP_FIELD_LOCATION
</dt>
5857 <dd class=
"description">Location field
</dd>
5858 <dt>HTTP_FIELD_MAX
</dt>
5859 <dd class=
"description">Maximum field index
</dd>
5860 <dt>HTTP_FIELD_RANGE
</dt>
5861 <dd class=
"description">Range field
</dd>
5862 <dt>HTTP_FIELD_REFERER
</dt>
5863 <dd class=
"description">Referer field
</dd>
5864 <dt>HTTP_FIELD_RETRY_AFTER
</dt>
5865 <dd class=
"description">Retry-After field
</dd>
5866 <dt>HTTP_FIELD_SERVER
<span class=
"info"> CUPS
1.7/OS X
10.9 </span></dt>
5867 <dd class=
"description">Server field
</dd>
5868 <dt>HTTP_FIELD_TRANSFER_ENCODING
</dt>
5869 <dd class=
"description">Transfer-Encoding field
</dd>
5870 <dt>HTTP_FIELD_UNKNOWN
</dt>
5871 <dd class=
"description">Unknown field
</dd>
5872 <dt>HTTP_FIELD_UPGRADE
</dt>
5873 <dd class=
"description">Upgrade field
</dd>
5874 <dt>HTTP_FIELD_USER_AGENT
</dt>
5875 <dd class=
"description">User-Agent field
</dd>
5876 <dt>HTTP_FIELD_WWW_AUTHENTICATE
</dt>
5877 <dd class=
"description">WWW-Authenticate field
</dd>
5879 <h3 class=
"enumeration"><a name=
"http_keepalive_e">http_keepalive_e
</a></h3>
5880 <p class=
"description">HTTP keep-alive values
</p>
5881 <h4 class=
"constants">Constants
</h4>
5883 <dt>HTTP_KEEPALIVE_OFF
</dt>
5884 <dd class=
"description">No keep alive support
</dd>
5885 <dt>HTTP_KEEPALIVE_ON
</dt>
5886 <dd class=
"description">Use keep alive
</dd>
5888 <h3 class=
"enumeration"><a name=
"http_state_e">http_state_e
</a></h3>
5889 <p class=
"description">HTTP state values; states
5890 are server-oriented...
</p>
5891 <h4 class=
"constants">Constants
</h4>
5893 <dt>HTTP_STATE_CONNECT
</dt>
5894 <dd class=
"description">CONNECT command, waiting for blank line
</dd>
5895 <dt>HTTP_STATE_DELETE
</dt>
5896 <dd class=
"description">DELETE command, waiting for blank line
</dd>
5897 <dt>HTTP_STATE_ERROR
</dt>
5898 <dd class=
"description">Error on socket
</dd>
5899 <dt>HTTP_STATE_GET
</dt>
5900 <dd class=
"description">GET command, waiting for blank line
</dd>
5901 <dt>HTTP_STATE_GET_SEND
</dt>
5902 <dd class=
"description">GET command, sending data
</dd>
5903 <dt>HTTP_STATE_HEAD
</dt>
5904 <dd class=
"description">HEAD command, waiting for blank line
</dd>
5905 <dt>HTTP_STATE_OPTIONS
</dt>
5906 <dd class=
"description">OPTIONS command, waiting for blank line
</dd>
5907 <dt>HTTP_STATE_POST
</dt>
5908 <dd class=
"description">POST command, waiting for blank line
</dd>
5909 <dt>HTTP_STATE_POST_RECV
</dt>
5910 <dd class=
"description">POST command, receiving data
</dd>
5911 <dt>HTTP_STATE_POST_SEND
</dt>
5912 <dd class=
"description">POST command, sending data
</dd>
5913 <dt>HTTP_STATE_PUT
</dt>
5914 <dd class=
"description">PUT command, waiting for blank line
</dd>
5915 <dt>HTTP_STATE_PUT_RECV
</dt>
5916 <dd class=
"description">PUT command, receiving data
</dd>
5917 <dt>HTTP_STATE_STATUS
</dt>
5918 <dd class=
"description">Command complete, sending status
</dd>
5919 <dt>HTTP_STATE_TRACE
</dt>
5920 <dd class=
"description">TRACE command, waiting for blank line
</dd>
5921 <dt>HTTP_STATE_UNKNOWN_METHOD
<span class=
"info"> CUPS
1.7/OS X
10.9 </span></dt>
5922 <dd class=
"description">Unknown request method, waiting for blank line
</dd>
5923 <dt>HTTP_STATE_UNKNOWN_VERSION
<span class=
"info"> CUPS
1.7/OS X
10.9 </span></dt>
5924 <dd class=
"description">Unknown request method, waiting for blank line
</dd>
5925 <dt>HTTP_STATE_WAITING
</dt>
5926 <dd class=
"description">Waiting for command
</dd>
5928 <h3 class=
"enumeration"><a name=
"http_status_e">http_status_e
</a></h3>
5929 <p class=
"description">HTTP status codes
</p>
5930 <h4 class=
"constants">Constants
</h4>
5932 <dt>HTTP_STATUS_ACCEPTED
</dt>
5933 <dd class=
"description">DELETE command was successful
</dd>
5934 <dt>HTTP_STATUS_BAD_GATEWAY
</dt>
5935 <dd class=
"description">Bad gateway
</dd>
5936 <dt>HTTP_STATUS_BAD_REQUEST
</dt>
5937 <dd class=
"description">Bad request
</dd>
5938 <dt>HTTP_STATUS_CONFLICT
</dt>
5939 <dd class=
"description">Request is self-conflicting
</dd>
5940 <dt>HTTP_STATUS_CONTINUE
</dt>
5941 <dd class=
"description">Everything OK, keep going...
</dd>
5942 <dt>HTTP_STATUS_CREATED
</dt>
5943 <dd class=
"description">PUT command was successful
</dd>
5944 <dt>HTTP_STATUS_CUPS_AUTHORIZATION_CANCELED
<span class=
"info"> CUPS
1.4 </span></dt>
5945 <dd class=
"description">User canceled authorization
</dd>
5946 <dt>HTTP_STATUS_CUPS_PKI_ERROR
<span class=
"info"> CUPS
1.5/OS X
10.7 </span></dt>
5947 <dd class=
"description">Error negotiating a secure connection
</dd>
5948 <dt>HTTP_STATUS_ERROR
</dt>
5949 <dd class=
"description">An error response from httpXxxx()
</dd>
5950 <dt>HTTP_STATUS_EXPECTATION_FAILED
</dt>
5951 <dd class=
"description">The expectation given in an Expect header field was not met
</dd>
5952 <dt>HTTP_STATUS_FORBIDDEN
</dt>
5953 <dd class=
"description">Forbidden to access this URI
</dd>
5954 <dt>HTTP_STATUS_GATEWAY_TIMEOUT
</dt>
5955 <dd class=
"description">Gateway connection timed out
</dd>
5956 <dt>HTTP_STATUS_GONE
</dt>
5957 <dd class=
"description">Server has gone away
</dd>
5958 <dt>HTTP_STATUS_LENGTH_REQUIRED
</dt>
5959 <dd class=
"description">A content length or encoding is required
</dd>
5960 <dt>HTTP_STATUS_METHOD_NOT_ALLOWED
</dt>
5961 <dd class=
"description">Method is not allowed
</dd>
5962 <dt>HTTP_STATUS_MOVED_PERMANENTLY
</dt>
5963 <dd class=
"description">Document has moved permanently
</dd>
5964 <dt>HTTP_STATUS_MOVED_TEMPORARILY
</dt>
5965 <dd class=
"description">Document has moved temporarily
</dd>
5966 <dt>HTTP_STATUS_MULTIPLE_CHOICES
</dt>
5967 <dd class=
"description">Multiple files match request
</dd>
5968 <dt>HTTP_STATUS_NONE
<span class=
"info"> CUPS
1.7/OS X
10.9 </span></dt>
5969 <dd class=
"description">No Expect value
</dd>
5970 <dt>HTTP_STATUS_NOT_ACCEPTABLE
</dt>
5971 <dd class=
"description">Not Acceptable
</dd>
5972 <dt>HTTP_STATUS_NOT_AUTHORITATIVE
</dt>
5973 <dd class=
"description">Information isn't authoritative
</dd>
5974 <dt>HTTP_STATUS_NOT_FOUND
</dt>
5975 <dd class=
"description">URI was not found
</dd>
5976 <dt>HTTP_STATUS_NOT_IMPLEMENTED
</dt>
5977 <dd class=
"description">Feature not implemented
</dd>
5978 <dt>HTTP_STATUS_NOT_MODIFIED
</dt>
5979 <dd class=
"description">File not modified
</dd>
5980 <dt>HTTP_STATUS_NOT_SUPPORTED
</dt>
5981 <dd class=
"description">HTTP version not supported
</dd>
5982 <dt>HTTP_STATUS_NO_CONTENT
</dt>
5983 <dd class=
"description">Successful command, no new data
</dd>
5984 <dt>HTTP_STATUS_OK
</dt>
5985 <dd class=
"description">OPTIONS/GET/HEAD/POST/TRACE command was successful
</dd>
5986 <dt>HTTP_STATUS_PARTIAL_CONTENT
</dt>
5987 <dd class=
"description">Only a partial file was received/sent
</dd>
5988 <dt>HTTP_STATUS_PAYMENT_REQUIRED
</dt>
5989 <dd class=
"description">Payment required
</dd>
5990 <dt>HTTP_STATUS_PRECONDITION
</dt>
5991 <dd class=
"description">Precondition failed
</dd>
5992 <dt>HTTP_STATUS_PROXY_AUTHENTICATION
</dt>
5993 <dd class=
"description">Proxy Authentication is Required
</dd>
5994 <dt>HTTP_STATUS_REQUESTED_RANGE
</dt>
5995 <dd class=
"description">The requested range is not satisfiable
</dd>
5996 <dt>HTTP_STATUS_REQUEST_TIMEOUT
</dt>
5997 <dd class=
"description">Request timed out
</dd>
5998 <dt>HTTP_STATUS_REQUEST_TOO_LARGE
</dt>
5999 <dd class=
"description">Request entity too large
</dd>
6000 <dt>HTTP_STATUS_RESET_CONTENT
</dt>
6001 <dd class=
"description">Content was reset/recreated
</dd>
6002 <dt>HTTP_STATUS_SEE_OTHER
</dt>
6003 <dd class=
"description">See this other link...
</dd>
6004 <dt>HTTP_STATUS_SERVER_ERROR
</dt>
6005 <dd class=
"description">Internal server error
</dd>
6006 <dt>HTTP_STATUS_SERVICE_UNAVAILABLE
</dt>
6007 <dd class=
"description">Service is unavailable
</dd>
6008 <dt>HTTP_STATUS_SWITCHING_PROTOCOLS
</dt>
6009 <dd class=
"description">HTTP upgrade to TLS/SSL
</dd>
6010 <dt>HTTP_STATUS_UNAUTHORIZED
</dt>
6011 <dd class=
"description">Unauthorized to access host
</dd>
6012 <dt>HTTP_STATUS_UNSUPPORTED_MEDIATYPE
</dt>
6013 <dd class=
"description">The requested media type is unsupported
</dd>
6014 <dt>HTTP_STATUS_UPGRADE_REQUIRED
</dt>
6015 <dd class=
"description">Upgrade to SSL/TLS required
</dd>
6016 <dt>HTTP_STATUS_URI_TOO_LONG
</dt>
6017 <dd class=
"description">URI too long
</dd>
6018 <dt>HTTP_STATUS_USE_PROXY
</dt>
6019 <dd class=
"description">Must use a proxy to access this URI
</dd>
6021 <h3 class=
"enumeration"><span class=
"info"> CUPS
2.0/OS
10.10 </span><a name=
"http_trust_e">http_trust_e
</a></h3>
6022 <p class=
"description">Level of trust for credentials
</p>
6023 <h4 class=
"constants">Constants
</h4>
6025 <dt>HTTP_TRUST_CHANGED
</dt>
6026 <dd class=
"description">Credentials have changed
</dd>
6027 <dt>HTTP_TRUST_EXPIRED
</dt>
6028 <dd class=
"description">Credentials are expired
</dd>
6029 <dt>HTTP_TRUST_INVALID
</dt>
6030 <dd class=
"description">Credentials are invalid
</dd>
6031 <dt>HTTP_TRUST_OK
</dt>
6032 <dd class=
"description">Credentials are OK/trusted
</dd>
6033 <dt>HTTP_TRUST_RENEWED
</dt>
6034 <dd class=
"description">Credentials have been renewed
</dd>
6035 <dt>HTTP_TRUST_UNKNOWN
</dt>
6036 <dd class=
"description">Credentials are unknown/new
</dd>
6038 <h3 class=
"enumeration"><a name=
"http_uri_coding_e">http_uri_coding_e
</a></h3>
6039 <p class=
"description">URI en/decode flags
</p>
6040 <h4 class=
"constants">Constants
</h4>
6042 <dt>HTTP_URI_CODING_ALL
</dt>
6043 <dd class=
"description">En/decode everything
</dd>
6044 <dt>HTTP_URI_CODING_HOSTNAME
</dt>
6045 <dd class=
"description">En/decode the hostname portion
</dd>
6046 <dt>HTTP_URI_CODING_MOST
</dt>
6047 <dd class=
"description">En/decode all but the query
</dd>
6048 <dt>HTTP_URI_CODING_NONE
</dt>
6049 <dd class=
"description">Don't en/decode anything
</dd>
6050 <dt>HTTP_URI_CODING_QUERY
</dt>
6051 <dd class=
"description">En/decode the query portion
</dd>
6052 <dt>HTTP_URI_CODING_RESOURCE
</dt>
6053 <dd class=
"description">En/decode the resource portion
</dd>
6054 <dt>HTTP_URI_CODING_RFC6874
</dt>
6055 <dd class=
"description">Use RFC
6874 address format
</dd>
6056 <dt>HTTP_URI_CODING_USERNAME
</dt>
6057 <dd class=
"description">En/decode the username portion
</dd>
6059 <h3 class=
"enumeration"><span class=
"info"> CUPS
1.2 </span><a name=
"http_uri_status_e">http_uri_status_e
</a></h3>
6060 <p class=
"description">URI separation status
</p>
6061 <h4 class=
"constants">Constants
</h4>
6063 <dt>HTTP_URI_STATUS_BAD_ARGUMENTS
</dt>
6064 <dd class=
"description">Bad arguments to function (error)
</dd>
6065 <dt>HTTP_URI_STATUS_BAD_HOSTNAME
</dt>
6066 <dd class=
"description">Bad hostname in URI (error)
</dd>
6067 <dt>HTTP_URI_STATUS_BAD_PORT
</dt>
6068 <dd class=
"description">Bad port number in URI (error)
</dd>
6069 <dt>HTTP_URI_STATUS_BAD_RESOURCE
</dt>
6070 <dd class=
"description">Bad resource in URI (error)
</dd>
6071 <dt>HTTP_URI_STATUS_BAD_SCHEME
</dt>
6072 <dd class=
"description">Bad scheme in URI (error)
</dd>
6073 <dt>HTTP_URI_STATUS_BAD_URI
</dt>
6074 <dd class=
"description">Bad/empty URI (error)
</dd>
6075 <dt>HTTP_URI_STATUS_BAD_USERNAME
</dt>
6076 <dd class=
"description">Bad username in URI (error)
</dd>
6077 <dt>HTTP_URI_STATUS_MISSING_RESOURCE
</dt>
6078 <dd class=
"description">Missing resource in URI (warning)
</dd>
6079 <dt>HTTP_URI_STATUS_MISSING_SCHEME
</dt>
6080 <dd class=
"description">Missing scheme in URI (warning)
</dd>
6081 <dt>HTTP_URI_STATUS_OK
</dt>
6082 <dd class=
"description">URI decoded OK
</dd>
6083 <dt>HTTP_URI_STATUS_OVERFLOW
</dt>
6084 <dd class=
"description">URI buffer for httpAssembleURI is too small
</dd>
6085 <dt>HTTP_URI_STATUS_UNKNOWN_SCHEME
</dt>
6086 <dd class=
"description">Unknown scheme in URI (warning)
</dd>
6088 <h3 class=
"enumeration"><a name=
"http_version_e">http_version_e
</a></h3>
6089 <p class=
"description">HTTP version numbers
</p>
6090 <h4 class=
"constants">Constants
</h4>
6092 <dt>HTTP_VERSION_0_9
</dt>
6093 <dd class=
"description">HTTP/
0.9</dd>
6094 <dt>HTTP_VERSION_1_0
</dt>
6095 <dd class=
"description">HTTP/
1.0</dd>
6096 <dt>HTTP_VERSION_1_1
</dt>
6097 <dd class=
"description">HTTP/
1.1</dd>
6099 <h3 class=
"enumeration"><a name=
"ipp_dstate_e">ipp_dstate_e
</a></h3>
6100 <p class=
"description">Document states
</p>
6101 <h4 class=
"constants">Constants
</h4>
6103 <dt>IPP_DOCUMENT_ABORTED
</dt>
6104 <dd class=
"description">Document is aborted
</dd>
6105 <dt>IPP_DOCUMENT_CANCELED
</dt>
6106 <dd class=
"description">Document is canceled
</dd>
6107 <dt>IPP_DOCUMENT_COMPLETED
</dt>
6108 <dd class=
"description">Document is completed
</dd>
6109 <dt>IPP_DOCUMENT_PENDING
</dt>
6110 <dd class=
"description">Document is pending
</dd>
6111 <dt>IPP_DOCUMENT_PROCESSING
</dt>
6112 <dd class=
"description">Document is processing
</dd>
6114 <h3 class=
"enumeration"><a name=
"ipp_finishings_e">ipp_finishings_e
</a></h3>
6115 <p class=
"description">Finishings
</p>
6116 <h4 class=
"constants">Constants
</h4>
6118 <dt>IPP_FINISHINGS_BALE
</dt>
6119 <dd class=
"description">Bale (any type)
</dd>
6120 <dt>IPP_FINISHINGS_BIND
</dt>
6121 <dd class=
"description">Bind
</dd>
6122 <dt>IPP_FINISHINGS_BIND_BOTTOM
</dt>
6123 <dd class=
"description">Bind on bottom
</dd>
6124 <dt>IPP_FINISHINGS_BIND_LEFT
</dt>
6125 <dd class=
"description">Bind on left
</dd>
6126 <dt>IPP_FINISHINGS_BIND_RIGHT
</dt>
6127 <dd class=
"description">Bind on right
</dd>
6128 <dt>IPP_FINISHINGS_BIND_TOP
</dt>
6129 <dd class=
"description">Bind on top
</dd>
6130 <dt>IPP_FINISHINGS_BOOKLET_MAKER
</dt>
6131 <dd class=
"description">Fold to make booklet
</dd>
6132 <dt>IPP_FINISHINGS_COAT
</dt>
6133 <dd class=
"description">Apply protective liquid or powder coating
</dd>
6134 <dt>IPP_FINISHINGS_COVER
</dt>
6135 <dd class=
"description">Add cover
</dd>
6136 <dt>IPP_FINISHINGS_CUPS_FOLD_ACCORDIAN
</dt>
6137 <dd class=
"description">Accordian-fold the paper vertically into four sections
</dd>
6138 <dt>IPP_FINISHINGS_CUPS_FOLD_DOUBLE_GATE
</dt>
6139 <dd class=
"description">Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically
</dd>
6140 <dt>IPP_FINISHINGS_CUPS_FOLD_GATE
</dt>
6141 <dd class=
"description">Fold the top and bottom quarters of the paper towards the midline
</dd>
6142 <dt>IPP_FINISHINGS_CUPS_FOLD_HALF
</dt>
6143 <dd class=
"description">Fold the paper in half vertically
</dd>
6144 <dt>IPP_FINISHINGS_CUPS_FOLD_HALF_Z
</dt>
6145 <dd class=
"description">Fold the paper in half horizontally, then Z-fold the paper vertically
</dd>
6146 <dt>IPP_FINISHINGS_CUPS_FOLD_LEFT_GATE
</dt>
6147 <dd class=
"description">Fold the top quarter of the paper towards the midline
</dd>
6148 <dt>IPP_FINISHINGS_CUPS_FOLD_LETTER
</dt>
6149 <dd class=
"description">Fold the paper into three sections vertically; sometimes also known as a C fold
</dd>
6150 <dt>IPP_FINISHINGS_CUPS_FOLD_PARALLEL
</dt>
6151 <dd class=
"description">Fold the paper in half vertically two times, yielding four sections
</dd>
6152 <dt>IPP_FINISHINGS_CUPS_FOLD_POSTER
</dt>
6153 <dd class=
"description">Fold the paper in half horizontally and vertically; sometimes also called a cross fold
</dd>
6154 <dt>IPP_FINISHINGS_CUPS_FOLD_RIGHT_GATE
</dt>
6155 <dd class=
"description">Fold the bottom quarter of the paper towards the midline
</dd>
6156 <dt>IPP_FINISHINGS_CUPS_FOLD_Z
</dt>
6157 <dd class=
"description">Fold the paper vertically into three sections, forming a Z
</dd>
6158 <dt>IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_LEFT
</dt>
6159 <dd class=
"description">Punch
1 hole bottom left
</dd>
6160 <dt>IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_RIGHT
</dt>
6161 <dd class=
"description">Punch
1 hole bottom right
</dd>
6162 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_BOTTOM
</dt>
6163 <dd class=
"description">Punch
2 holes bottom edge
</dd>
6164 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_LEFT
</dt>
6165 <dd class=
"description">Punch
2 holes left side
</dd>
6166 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_RIGHT
</dt>
6167 <dd class=
"description">Punch
2 holes right side
</dd>
6168 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_TOP
</dt>
6169 <dd class=
"description">Punch
2 holes top edge
</dd>
6170 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_BOTTOM
</dt>
6171 <dd class=
"description">Punch
4 holes bottom edge
</dd>
6172 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_LEFT
</dt>
6173 <dd class=
"description">Punch
4 holes left side
</dd>
6174 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_RIGHT
</dt>
6175 <dd class=
"description">Punch
4 holes right side
</dd>
6176 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_TOP
</dt>
6177 <dd class=
"description">Punch
4 holes top edge
</dd>
6178 <dt>IPP_FINISHINGS_CUPS_PUNCH_TOP_LEFT
</dt>
6179 <dd class=
"description">Punch
1 hole top left
</dd>
6180 <dt>IPP_FINISHINGS_CUPS_PUNCH_TOP_RIGHT
</dt>
6181 <dd class=
"description">Punch
1 hole top right
</dd>
6182 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_BOTTOM
</dt>
6183 <dd class=
"description">Punch
3 holes bottom edge
</dd>
6184 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_LEFT
</dt>
6185 <dd class=
"description">Punch
3 holes left side
</dd>
6186 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_RIGHT
</dt>
6187 <dd class=
"description">Punch
3 holes right side
</dd>
6188 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_TOP
</dt>
6189 <dd class=
"description">Punch
3 holes top edge
</dd>
6190 <dt>IPP_FINISHINGS_EDGE_STITCH
</dt>
6191 <dd class=
"description">Stitch along any side
</dd>
6192 <dt>IPP_FINISHINGS_EDGE_STITCH_BOTTOM
</dt>
6193 <dd class=
"description">Stitch along bottom edge
</dd>
6194 <dt>IPP_FINISHINGS_EDGE_STITCH_LEFT
</dt>
6195 <dd class=
"description">Stitch along left side
</dd>
6196 <dt>IPP_FINISHINGS_EDGE_STITCH_RIGHT
</dt>
6197 <dd class=
"description">Stitch along right side
</dd>
6198 <dt>IPP_FINISHINGS_EDGE_STITCH_TOP
</dt>
6199 <dd class=
"description">Stitch along top edge
</dd>
6200 <dt>IPP_FINISHINGS_FOLD
</dt>
6201 <dd class=
"description">Fold (any type)
</dd>
6202 <dt>IPP_FINISHINGS_FOLD_ACCORDIAN
</dt>
6203 <dd class=
"description">Accordian-fold the paper vertically into four sections
</dd>
6204 <dt>IPP_FINISHINGS_FOLD_DOUBLE_GATE
</dt>
6205 <dd class=
"description">Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically
</dd>
6206 <dt>IPP_FINISHINGS_FOLD_GATE
</dt>
6207 <dd class=
"description">Fold the top and bottom quarters of the paper towards the midline
</dd>
6208 <dt>IPP_FINISHINGS_FOLD_HALF
</dt>
6209 <dd class=
"description">Fold the paper in half vertically
</dd>
6210 <dt>IPP_FINISHINGS_FOLD_HALF_Z
</dt>
6211 <dd class=
"description">Fold the paper in half horizontally, then Z-fold the paper vertically
</dd>
6212 <dt>IPP_FINISHINGS_FOLD_LEFT_GATE
</dt>
6213 <dd class=
"description">Fold the top quarter of the paper towards the midline
</dd>
6214 <dt>IPP_FINISHINGS_FOLD_LETTER
</dt>
6215 <dd class=
"description">Fold the paper into three sections vertically; sometimes also known as a C fold
</dd>
6216 <dt>IPP_FINISHINGS_FOLD_PARALLEL
</dt>
6217 <dd class=
"description">Fold the paper in half vertically two times, yielding four sections
</dd>
6218 <dt>IPP_FINISHINGS_FOLD_POSTER
</dt>
6219 <dd class=
"description">Fold the paper in half horizontally and vertically; sometimes also called a cross fold
</dd>
6220 <dt>IPP_FINISHINGS_FOLD_RIGHT_GATE
</dt>
6221 <dd class=
"description">Fold the bottom quarter of the paper towards the midline
</dd>
6222 <dt>IPP_FINISHINGS_FOLD_Z
</dt>
6223 <dd class=
"description">Fold the paper vertically into three sections, forming a Z
</dd>
6224 <dt>IPP_FINISHINGS_JOG_OFFSET
</dt>
6225 <dd class=
"description">Offset for binding (any type)
</dd>
6226 <dt>IPP_FINISHINGS_LAMINATE
</dt>
6227 <dd class=
"description">Apply protective (solid) material
</dd>
6228 <dt>IPP_FINISHINGS_NONE
</dt>
6229 <dd class=
"description">No finishing
</dd>
6230 <dt>IPP_FINISHINGS_PUNCH
</dt>
6231 <dd class=
"description">Punch (any location/count)
</dd>
6232 <dt>IPP_FINISHINGS_PUNCH_BOTTOM_LEFT
</dt>
6233 <dd class=
"description">Punch
1 hole bottom left
</dd>
6234 <dt>IPP_FINISHINGS_PUNCH_BOTTOM_RIGHT
</dt>
6235 <dd class=
"description">Punch
1 hole bottom right
</dd>
6236 <dt>IPP_FINISHINGS_PUNCH_DUAL_BOTTOM
</dt>
6237 <dd class=
"description">Punch
2 holes bottom edge
</dd>
6238 <dt>IPP_FINISHINGS_PUNCH_DUAL_LEFT
</dt>
6239 <dd class=
"description">Punch
2 holes left side
</dd>
6240 <dt>IPP_FINISHINGS_PUNCH_DUAL_RIGHT
</dt>
6241 <dd class=
"description">Punch
2 holes right side
</dd>
6242 <dt>IPP_FINISHINGS_PUNCH_DUAL_TOP
</dt>
6243 <dd class=
"description">Punch
2 holes top edge
</dd>
6244 <dt>IPP_FINISHINGS_PUNCH_QUAD_BOTTOM
</dt>
6245 <dd class=
"description">Punch
4 holes bottom edge
</dd>
6246 <dt>IPP_FINISHINGS_PUNCH_QUAD_LEFT
</dt>
6247 <dd class=
"description">Punch
4 holes left side
</dd>
6248 <dt>IPP_FINISHINGS_PUNCH_QUAD_RIGHT
</dt>
6249 <dd class=
"description">Punch
4 holes right side
</dd>
6250 <dt>IPP_FINISHINGS_PUNCH_QUAD_TOP
</dt>
6251 <dd class=
"description">Punch
4 holes top edge
</dd>
6252 <dt>IPP_FINISHINGS_PUNCH_TOP_LEFT
</dt>
6253 <dd class=
"description">Punch
1 hole top left
</dd>
6254 <dt>IPP_FINISHINGS_PUNCH_TOP_RIGHT
</dt>
6255 <dd class=
"description">Punch
1 hole top right
</dd>
6256 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_BOTTOM
</dt>
6257 <dd class=
"description">Punch
3 holes bottom edge
</dd>
6258 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_LEFT
</dt>
6259 <dd class=
"description">Punch
3 holes left side
</dd>
6260 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_RIGHT
</dt>
6261 <dd class=
"description">Punch
3 holes right side
</dd>
6262 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_TOP
</dt>
6263 <dd class=
"description">Punch
3 holes top edge
</dd>
6264 <dt>IPP_FINISHINGS_SADDLE_STITCH
</dt>
6265 <dd class=
"description">Staple interior
</dd>
6266 <dt>IPP_FINISHINGS_STAPLE
</dt>
6267 <dd class=
"description">Staple (any location)
</dd>
6268 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_LEFT
</dt>
6269 <dd class=
"description">Staple bottom left corner
</dd>
6270 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT
</dt>
6271 <dd class=
"description">Staple bottom right corner
</dd>
6272 <dt>IPP_FINISHINGS_STAPLE_DUAL_BOTTOM
</dt>
6273 <dd class=
"description">Two staples on bottom
</dd>
6274 <dt>IPP_FINISHINGS_STAPLE_DUAL_LEFT
</dt>
6275 <dd class=
"description">Two staples on left
</dd>
6276 <dt>IPP_FINISHINGS_STAPLE_DUAL_RIGHT
</dt>
6277 <dd class=
"description">Two staples on right
</dd>
6278 <dt>IPP_FINISHINGS_STAPLE_DUAL_TOP
</dt>
6279 <dd class=
"description">Two staples on top
</dd>
6280 <dt>IPP_FINISHINGS_STAPLE_TOP_LEFT
</dt>
6281 <dd class=
"description">Staple top left corner
</dd>
6282 <dt>IPP_FINISHINGS_STAPLE_TOP_RIGHT
</dt>
6283 <dd class=
"description">Staple top right corner
</dd>
6284 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_BOTTOM
</dt>
6285 <dd class=
"description">Three staples on bottom
</dd>
6286 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_LEFT
</dt>
6287 <dd class=
"description">Three staples on left
</dd>
6288 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_RIGHT
</dt>
6289 <dd class=
"description">Three staples on right
</dd>
6290 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_TOP
</dt>
6291 <dd class=
"description">Three staples on top
</dd>
6292 <dt>IPP_FINISHINGS_TRIM
</dt>
6293 <dd class=
"description">Trim (any type)
</dd>
6294 <dt>IPP_FINISHINGS_TRIM_AFTER_COPIES
</dt>
6295 <dd class=
"description">Trim output after each copy
</dd>
6296 <dt>IPP_FINISHINGS_TRIM_AFTER_DOCUMENTS
</dt>
6297 <dd class=
"description">Trim output after each document
</dd>
6298 <dt>IPP_FINISHINGS_TRIM_AFTER_JOB
</dt>
6299 <dd class=
"description">Trim output after job
</dd>
6300 <dt>IPP_FINISHINGS_TRIM_AFTER_PAGES
</dt>
6301 <dd class=
"description">Trim output after each page
</dd>
6303 <h3 class=
"enumeration"><a name=
"ipp_jcollate_e">ipp_jcollate_e
</a></h3>
6304 <p class=
"description">Job collation types
</p>
6305 <h4 class=
"constants">Constants
</h4>
6307 <dt>IPP_JCOLLATE_COLLATED_DOCUMENTS
</dt>
6308 <dt>IPP_JCOLLATE_UNCOLLATED_DOCUMENTS
</dt>
6309 <dt>IPP_JCOLLATE_UNCOLLATED_SHEETS
</dt>
6311 <h3 class=
"enumeration"><a name=
"ipp_jstate_e">ipp_jstate_e
</a></h3>
6312 <p class=
"description">Job states
</p>
6313 <h4 class=
"constants">Constants
</h4>
6315 <dt>IPP_JSTATE_ABORTED
</dt>
6316 <dd class=
"description">Job has aborted due to error
</dd>
6317 <dt>IPP_JSTATE_CANCELED
</dt>
6318 <dd class=
"description">Job has been canceled
</dd>
6319 <dt>IPP_JSTATE_COMPLETED
</dt>
6320 <dd class=
"description">Job has completed successfully
</dd>
6321 <dt>IPP_JSTATE_HELD
</dt>
6322 <dd class=
"description">Job is held for printing
</dd>
6323 <dt>IPP_JSTATE_PENDING
</dt>
6324 <dd class=
"description">Job is waiting to be printed
</dd>
6325 <dt>IPP_JSTATE_PROCESSING
</dt>
6326 <dd class=
"description">Job is currently printing
</dd>
6327 <dt>IPP_JSTATE_STOPPED
</dt>
6328 <dd class=
"description">Job has been stopped
</dd>
6330 <h3 class=
"enumeration"><a name=
"ipp_op_e">ipp_op_e
</a></h3>
6331 <p class=
"description">IPP operations
</p>
6332 <h4 class=
"constants">Constants
</h4>
6334 <dt>IPP_OP_ACKNOWLEDGE_DOCUMENT
</dt>
6335 <dd class=
"description">Acknowledge-Document
</dd>
6336 <dt>IPP_OP_ACKNOWLEDGE_IDENTIFY_PRINTER
</dt>
6337 <dd class=
"description">Acknowledge-Identify-Printer
</dd>
6338 <dt>IPP_OP_ACKNOWLEDGE_JOB
</dt>
6339 <dd class=
"description">Acknowledge-Job
</dd>
6340 <dt>IPP_OP_ACTIVATE_PRINTER
</dt>
6341 <dd class=
"description">Start a printer
</dd>
6342 <dt>IPP_OP_CANCEL_CURRENT_JOB
</dt>
6343 <dd class=
"description">Cancel the current job
</dd>
6344 <dt>IPP_OP_CANCEL_DOCUMENT
</dt>
6345 <dd class=
"description">Cancel-Document
</dd>
6346 <dt>IPP_OP_CANCEL_JOB
</dt>
6347 <dd class=
"description">Cancel a job
</dd>
6348 <dt>IPP_OP_CANCEL_JOBS
</dt>
6349 <dd class=
"description">Cancel-Jobs
</dd>
6350 <dt>IPP_OP_CANCEL_MY_JOBS
</dt>
6351 <dd class=
"description">Cancel-My-Jobs
</dd>
6352 <dt>IPP_OP_CANCEL_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/OS X
10.5 </span></dt>
6353 <dd class=
"description">Cancel a subscription
</dd>
6354 <dt>IPP_OP_CLOSE_JOB
</dt>
6355 <dd class=
"description">Close-Job
</dd>
6356 <dt>IPP_OP_CREATE_JOB
</dt>
6357 <dd class=
"description">Create an empty print job
</dd>
6358 <dt>IPP_OP_CREATE_JOB_SUBSCRIPTIONS
<span class=
"info"> CUPS
1.2/OS X
10.5 </span></dt>
6359 <dd class=
"description">Create one of more job subscriptions
</dd>
6360 <dt>IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS
<span class=
"info"> CUPS
1.2/OS X
10.5 </span></dt>
6361 <dd class=
"description">Create one or more printer subscriptions
</dd>
6362 <dt>IPP_OP_CUPS_ACCEPT_JOBS
</dt>
6363 <dd class=
"description">Accept new jobs on a printer
</dd>
6364 <dt>IPP_OP_CUPS_ADD_MODIFY_CLASS
</dt>
6365 <dd class=
"description">Add or modify a class
</dd>
6366 <dt>IPP_OP_CUPS_ADD_MODIFY_PRINTER
</dt>
6367 <dd class=
"description">Add or modify a printer
</dd>
6368 <dt>IPP_OP_CUPS_AUTHENTICATE_JOB
<span class=
"info"> CUPS
1.2/OS X
10.5 </span></dt>
6369 <dd class=
"description">Authenticate a job
</dd>
6370 <dt>IPP_OP_CUPS_DELETE_CLASS
</dt>
6371 <dd class=
"description">Delete a class
</dd>
6372 <dt>IPP_OP_CUPS_DELETE_PRINTER
</dt>
6373 <dd class=
"description">Delete a printer
</dd>
6374 <dt>IPP_OP_CUPS_GET_CLASSES
<span class=
"info"> DEPRECATED
</span></dt>
6375 <dd class=
"description">Get a list of classes
</dd>
6376 <dt>IPP_OP_CUPS_GET_DEFAULT
</dt>
6377 <dd class=
"description">Get the default printer
</dd>
6378 <dt>IPP_OP_CUPS_GET_DEVICES
</dt>
6379 <dd class=
"description">Get a list of supported devices
</dd>
6380 <dt>IPP_OP_CUPS_GET_DOCUMENT
<span class=
"info"> CUPS
1.4/OS X
10.6 </span></dt>
6381 <dd class=
"description">Get a document file
</dd>
6382 <dt>IPP_OP_CUPS_GET_PPD
<span class=
"info"> CUPS
1.3/OS X
10.5 </span></dt>
6383 <dd class=
"description">Get a PPD file
</dd>
6384 <dt>IPP_OP_CUPS_GET_PPDS
</dt>
6385 <dd class=
"description">Get a list of supported drivers
</dd>
6386 <dt>IPP_OP_CUPS_GET_PRINTERS
</dt>
6387 <dd class=
"description">Get a list of printers and/or classes
</dd>
6388 <dt>IPP_OP_CUPS_INVALID
</dt>
6389 <dd class=
"description">Invalid operation name for
<a href=
"#ippOpValue"><code>ippOpValue
</code></a></dd>
6390 <dt>IPP_OP_CUPS_MOVE_JOB
</dt>
6391 <dd class=
"description">Move a job to a different printer
</dd>
6392 <dt>IPP_OP_CUPS_REJECT_JOBS
</dt>
6393 <dd class=
"description">Reject new jobs on a printer
</dd>
6394 <dt>IPP_OP_CUPS_SET_DEFAULT
</dt>
6395 <dd class=
"description">Set the default printer
</dd>
6396 <dt>IPP_OP_DEACTIVATE_PRINTER
</dt>
6397 <dd class=
"description">Stop a printer
</dd>
6398 <dt>IPP_OP_DELETE_DOCUMENT
</dt>
6399 <dd class=
"description">Delete-Document
</dd>
6400 <dt>IPP_OP_DEREGISTER_OUTPUT_DEVICE
</dt>
6401 <dd class=
"description">Deregister-Output-Device
</dd>
6402 <dt>IPP_OP_DISABLE_PRINTER
</dt>
6403 <dd class=
"description">Stop a printer
</dd>
6404 <dt>IPP_OP_ENABLE_PRINTER
</dt>
6405 <dd class=
"description">Start a printer
</dd>
6406 <dt>IPP_OP_FETCH_DOCUMENT
</dt>
6407 <dd class=
"description">Fetch-Document
</dd>
6408 <dt>IPP_OP_FETCH_JOB
</dt>
6409 <dd class=
"description">Fetch-Job
</dd>
6410 <dt>IPP_OP_GET_DOCUMENTS
</dt>
6411 <dd class=
"description">Get-Documents
</dd>
6412 <dt>IPP_OP_GET_DOCUMENT_ATTRIBUTES
</dt>
6413 <dd class=
"description">Get-Document-Attributes
</dd>
6414 <dt>IPP_OP_GET_JOBS
</dt>
6415 <dd class=
"description">Get a list of jobs
</dd>
6416 <dt>IPP_OP_GET_JOB_ATTRIBUTES
</dt>
6417 <dd class=
"description">Get job attributes
</dd>
6418 <dt>IPP_OP_GET_NEXT_DOCUMENT_DATA
</dt>
6419 <dd class=
"description">Get-Next-Document-Data
</dd>
6420 <dt>IPP_OP_GET_NOTIFICATIONS
<span class=
"info"> CUPS
1.2/OS X
10.5 </span></dt>
6421 <dd class=
"description">Get notification events
</dd>
6422 <dt>IPP_OP_GET_OUTPUT_DEVICE_ATTRIBUTES
</dt>
6423 <dd class=
"description">Get-Output-Device-Attributes
</dd>
6424 <dt>IPP_OP_GET_PRINTER_ATTRIBUTES
</dt>
6425 <dd class=
"description">Get printer attributes
</dd>
6426 <dt>IPP_OP_GET_PRINTER_SUPPORTED_VALUES
</dt>
6427 <dd class=
"description">Get supported attribute values
</dd>
6428 <dt>IPP_OP_GET_SUBSCRIPTIONS
<span class=
"info"> CUPS
1.2/OS X
10.5 </span></dt>
6429 <dd class=
"description">Get list of subscriptions
</dd>
6430 <dt>IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES
<span class=
"info"> CUPS
1.2/OS X
10.5 </span></dt>
6431 <dd class=
"description">Get subscription attributes
</dd>
6432 <dt>IPP_OP_HOLD_JOB
</dt>
6433 <dd class=
"description">Hold a job for printing
</dd>
6434 <dt>IPP_OP_HOLD_NEW_JOBS
</dt>
6435 <dd class=
"description">Hold new jobs
</dd>
6436 <dt>IPP_OP_IDENTIFY_PRINTER
</dt>
6437 <dd class=
"description">Identify-Printer
</dd>
6438 <dt>IPP_OP_PAUSE_PRINTER
</dt>
6439 <dd class=
"description">Stop a printer
</dd>
6440 <dt>IPP_OP_PAUSE_PRINTER_AFTER_CURRENT_JOB
</dt>
6441 <dd class=
"description">Stop printer after the current job
</dd>
6442 <dt>IPP_OP_PRINT_JOB
</dt>
6443 <dd class=
"description">Print a single file
</dd>
6444 <dt>IPP_OP_PRINT_URI
</dt>
6445 <dd class=
"description">Print a single URL
</dd>
6446 <dt>IPP_OP_PROMOTE_JOB
</dt>
6447 <dd class=
"description">Promote a job to print sooner
</dd>
6448 <dt>IPP_OP_PURGE_JOBS
</dt>
6449 <dd class=
"description">Cancel all jobs
</dd>
6450 <dt>IPP_OP_RELEASE_HELD_NEW_JOBS
</dt>
6451 <dd class=
"description">Release new jobs
</dd>
6452 <dt>IPP_OP_RELEASE_JOB
</dt>
6453 <dd class=
"description">Release a job for printing
</dd>
6454 <dt>IPP_OP_RENEW_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/OS X
10.5 </span></dt>
6455 <dd class=
"description">Renew a printer subscription
</dd>
6456 <dt>IPP_OP_REPROCESS_JOB
</dt>
6457 <dd class=
"description">Reprint a job
</dd>
6458 <dt>IPP_OP_RESTART_JOB
</dt>
6459 <dd class=
"description">Reprint a job
</dd>
6460 <dt>IPP_OP_RESTART_PRINTER
</dt>
6461 <dd class=
"description">Restart a printer
</dd>
6462 <dt>IPP_OP_RESUBMIT_JOB
</dt>
6463 <dd class=
"description">Resubmit-Job
</dd>
6464 <dt>IPP_OP_RESUME_JOB
</dt>
6465 <dd class=
"description">Resume the current job
</dd>
6466 <dt>IPP_OP_RESUME_PRINTER
</dt>
6467 <dd class=
"description">Start a printer
</dd>
6468 <dt>IPP_OP_SCHEDULE_JOB_AFTER
</dt>
6469 <dd class=
"description">Schedule a job to print after another
</dd>
6470 <dt>IPP_OP_SEND_DOCUMENT
</dt>
6471 <dd class=
"description">Add a file to a job
</dd>
6472 <dt>IPP_OP_SEND_HARDCOPY_DOCUMENT
</dt>
6473 <dd class=
"description">Send-Hardcopy-Document
</dd>
6474 <dt>IPP_OP_SEND_URI
</dt>
6475 <dd class=
"description">Add a URL to a job
</dd>
6476 <dt>IPP_OP_SET_DOCUMENT_ATTRIBUTES
</dt>
6477 <dd class=
"description">Set-Document-Attributes
</dd>
6478 <dt>IPP_OP_SET_JOB_ATTRIBUTES
</dt>
6479 <dd class=
"description">Set job attributes
</dd>
6480 <dt>IPP_OP_SET_PRINTER_ATTRIBUTES
</dt>
6481 <dd class=
"description">Set printer attributes
</dd>
6482 <dt>IPP_OP_SHUTDOWN_PRINTER
</dt>
6483 <dd class=
"description">Turn a printer off
</dd>
6484 <dt>IPP_OP_STARTUP_PRINTER
</dt>
6485 <dd class=
"description">Turn a printer on
</dd>
6486 <dt>IPP_OP_SUSPEND_CURRENT_JOB
</dt>
6487 <dd class=
"description">Suspend the current job
</dd>
6488 <dt>IPP_OP_UPDATE_ACTIVE_JOBS
</dt>
6489 <dd class=
"description">Update-Active-Jobs
</dd>
6490 <dt>IPP_OP_UPDATE_DOCUMENT_STATUS
</dt>
6491 <dd class=
"description">Update-Document-Status
</dd>
6492 <dt>IPP_OP_UPDATE_JOB_STATUS
</dt>
6493 <dd class=
"description">Update-Job-Status
</dd>
6494 <dt>IPP_OP_UPDATE_OUTPUT_DEVICE_ATTRIBUTES
</dt>
6495 <dd class=
"description">Update-Output-Device-Attributes
</dd>
6496 <dt>IPP_OP_VALIDATE_DOCUMENT
</dt>
6497 <dd class=
"description">Validate-Document
</dd>
6498 <dt>IPP_OP_VALIDATE_JOB
</dt>
6499 <dd class=
"description">Validate job options
</dd>
6501 <h3 class=
"enumeration"><a name=
"ipp_orient_e">ipp_orient_e
</a></h3>
6502 <p class=
"description">Orientation values
</p>
6503 <h4 class=
"constants">Constants
</h4>
6505 <dt>IPP_ORIENT_LANDSCAPE
</dt>
6506 <dd class=
"description">90 degrees counter-clockwise
</dd>
6507 <dt>IPP_ORIENT_NONE
</dt>
6508 <dd class=
"description">No rotation
</dd>
6509 <dt>IPP_ORIENT_PORTRAIT
</dt>
6510 <dd class=
"description">No rotation
</dd>
6511 <dt>IPP_ORIENT_REVERSE_LANDSCAPE
</dt>
6512 <dd class=
"description">90 degrees clockwise
</dd>
6513 <dt>IPP_ORIENT_REVERSE_PORTRAIT
</dt>
6514 <dd class=
"description">180 degrees
</dd>
6516 <h3 class=
"enumeration"><a name=
"ipp_pstate_e">ipp_pstate_e
</a></h3>
6517 <p class=
"description">Printer states
</p>
6518 <h4 class=
"constants">Constants
</h4>
6520 <dt>IPP_PSTATE_IDLE
</dt>
6521 <dd class=
"description">Printer is idle
</dd>
6522 <dt>IPP_PSTATE_PROCESSING
</dt>
6523 <dd class=
"description">Printer is working
</dd>
6524 <dt>IPP_PSTATE_STOPPED
</dt>
6525 <dd class=
"description">Printer is stopped
</dd>
6527 <h3 class=
"enumeration"><a name=
"ipp_quality_e">ipp_quality_e
</a></h3>
6528 <p class=
"description">Qualities
</p>
6529 <h4 class=
"constants">Constants
</h4>
6531 <dt>IPP_QUALITY_DRAFT
</dt>
6532 <dd class=
"description">Draft quality
</dd>
6533 <dt>IPP_QUALITY_HIGH
</dt>
6534 <dd class=
"description">High quality
</dd>
6535 <dt>IPP_QUALITY_NORMAL
</dt>
6536 <dd class=
"description">Normal quality
</dd>
6538 <h3 class=
"enumeration"><a name=
"ipp_res_e">ipp_res_e
</a></h3>
6539 <p class=
"description">Resolution units
</p>
6540 <h4 class=
"constants">Constants
</h4>
6542 <dt>IPP_RES_PER_CM
</dt>
6543 <dd class=
"description">Pixels per centimeter
</dd>
6544 <dt>IPP_RES_PER_INCH
</dt>
6545 <dd class=
"description">Pixels per inch
</dd>
6547 <h3 class=
"enumeration"><a name=
"ipp_state_e">ipp_state_e
</a></h3>
6548 <p class=
"description">IPP states
</p>
6549 <h4 class=
"constants">Constants
</h4>
6551 <dt>IPP_STATE_ATTRIBUTE
</dt>
6552 <dd class=
"description">One or more attributes need to be sent/received
</dd>
6553 <dt>IPP_STATE_DATA
</dt>
6554 <dd class=
"description">IPP request data needs to be sent/received
</dd>
6555 <dt>IPP_STATE_ERROR
</dt>
6556 <dd class=
"description">An error occurred
</dd>
6557 <dt>IPP_STATE_HEADER
</dt>
6558 <dd class=
"description">The request header needs to be sent/received
</dd>
6559 <dt>IPP_STATE_IDLE
</dt>
6560 <dd class=
"description">Nothing is happening/request completed
</dd>
6562 <h3 class=
"enumeration"><a name=
"ipp_status_e">ipp_status_e
</a></h3>
6563 <p class=
"description">IPP status codes
</p>
6564 <h4 class=
"constants">Constants
</h4>
6566 <dt>IPP_STATUS_CUPS_INVALID
</dt>
6567 <dd class=
"description">Invalid status name for
<a href=
"#ippErrorValue"><code>ippErrorValue
</code></a></dd>
6568 <dt>IPP_STATUS_CUPS_SEE_OTHER
</dt>
6569 <dd class=
"description">cups-see-other
</dd>
6570 <dt>IPP_STATUS_ERROR_ACCOUNT_AUTHORIZATION_FAILED
</dt>
6571 <dd class=
"description">client-error-account-authorization-failed
</dd>
6572 <dt>IPP_STATUS_ERROR_ACCOUNT_CLOSED
</dt>
6573 <dd class=
"description">client-error-account-closed
</dd>
6574 <dt>IPP_STATUS_ERROR_ACCOUNT_INFO_NEEDED
</dt>
6575 <dd class=
"description">client-error-account-info-needed
</dd>
6576 <dt>IPP_STATUS_ERROR_ACCOUNT_LIMIT_REACHED
</dt>
6577 <dd class=
"description">client-error-account-limit-reached
</dd>
6578 <dt>IPP_STATUS_ERROR_ATTRIBUTES_NOT_SETTABLE
</dt>
6579 <dd class=
"description">client-error-attributes-not-settable
</dd>
6580 <dt>IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES
</dt>
6581 <dd class=
"description">client-error-attributes-or-values-not-supported
</dd>
6582 <dt>IPP_STATUS_ERROR_BAD_REQUEST
</dt>
6583 <dd class=
"description">client-error-bad-request
</dd>
6584 <dt>IPP_STATUS_ERROR_BUSY
</dt>
6585 <dd class=
"description">server-error-busy
</dd>
6586 <dt>IPP_STATUS_ERROR_CHARSET
</dt>
6587 <dd class=
"description">client-error-charset-not-supported
</dd>
6588 <dt>IPP_STATUS_ERROR_COMPRESSION_ERROR
</dt>
6589 <dd class=
"description">client-error-compression-error
</dd>
6590 <dt>IPP_STATUS_ERROR_COMPRESSION_NOT_SUPPORTED
</dt>
6591 <dd class=
"description">client-error-compression-not-supported
</dd>
6592 <dt>IPP_STATUS_ERROR_CONFLICTING
</dt>
6593 <dd class=
"description">client-error-conflicting-attributes
</dd>
6594 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED
<span class=
"info"> DEPRECATED
</span></dt>
6595 <dd class=
"description">cups-error-account-authorization-failed
</dd>
6596 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED
</dt>
6597 <dd class=
"description">cups-error-account-closed @deprecate@
</dd>
6598 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED
<span class=
"info"> DEPRECATED
</span></dt>
6599 <dd class=
"description">cups-error-account-info-needed
</dd>
6600 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_LIMIT_REACHED
<span class=
"info"> DEPRECATED
</span></dt>
6601 <dd class=
"description">cups-error-account-limit-reached
</dd>
6602 <dt>IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED
<span class=
"info"> CUPS
1.5/OS X
10.7 </span></dt>
6603 <dd class=
"description">cups-authentication-canceled - Authentication canceled by user
</dd>
6604 <dt>IPP_STATUS_ERROR_CUPS_PKI
<span class=
"info"> CUPS
1.5/OS X
10.7 </span></dt>
6605 <dd class=
"description">cups-pki-error - Error negotiating a secure connection
</dd>
6606 <dt>IPP_STATUS_ERROR_CUPS_UPGRADE_REQUIRED
</dt>
6607 <dd class=
"description">cups-upgrade-required - TLS upgrade required
</dd>
6608 <dt>IPP_STATUS_ERROR_DEVICE
</dt>
6609 <dd class=
"description">server-error-device-error
</dd>
6610 <dt>IPP_STATUS_ERROR_DOCUMENT_ACCESS
</dt>
6611 <dd class=
"description">client-error-document-access-error
</dd>
6612 <dt>IPP_STATUS_ERROR_DOCUMENT_FORMAT_ERROR
</dt>
6613 <dd class=
"description">client-error-document-format-error
</dd>
6614 <dt>IPP_STATUS_ERROR_DOCUMENT_FORMAT_NOT_SUPPORTED
</dt>
6615 <dd class=
"description">client-error-document-format-not-supported
</dd>
6616 <dt>IPP_STATUS_ERROR_DOCUMENT_PASSWORD
</dt>
6617 <dd class=
"description">client-error-document-password-error
</dd>
6618 <dt>IPP_STATUS_ERROR_DOCUMENT_PERMISSION
</dt>
6619 <dd class=
"description">client-error-document-permission-error
</dd>
6620 <dt>IPP_STATUS_ERROR_DOCUMENT_SECURITY
</dt>
6621 <dd class=
"description">client-error-document-security-error
</dd>
6622 <dt>IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE
</dt>
6623 <dd class=
"description">client-error-document-unprintable-error
</dd>
6624 <dt>IPP_STATUS_ERROR_FORBIDDEN
</dt>
6625 <dd class=
"description">client-error-forbidden
</dd>
6626 <dt>IPP_STATUS_ERROR_GONE
</dt>
6627 <dd class=
"description">client-error-gone
</dd>
6628 <dt>IPP_STATUS_ERROR_IGNORED_ALL_SUBSCRIPTIONS
</dt>
6629 <dd class=
"description">client-error-ignored-all-subscriptions
</dd>
6630 <dt>IPP_STATUS_ERROR_INTERNAL
</dt>
6631 <dd class=
"description">server-error-internal-error
</dd>
6632 <dt>IPP_STATUS_ERROR_JOB_CANCELED
</dt>
6633 <dd class=
"description">server-error-job-canceled
</dd>
6634 <dt>IPP_STATUS_ERROR_MULTIPLE_JOBS_NOT_SUPPORTED
</dt>
6635 <dd class=
"description">server-error-multiple-document-jobs-not-supported
</dd>
6636 <dt>IPP_STATUS_ERROR_NOT_ACCEPTING_JOBS
</dt>
6637 <dd class=
"description">server-error-not-accepting-jobs
</dd>
6638 <dt>IPP_STATUS_ERROR_NOT_AUTHENTICATED
</dt>
6639 <dd class=
"description">client-error-not-authenticated
</dd>
6640 <dt>IPP_STATUS_ERROR_NOT_AUTHORIZED
</dt>
6641 <dd class=
"description">client-error-not-authorized
</dd>
6642 <dt>IPP_STATUS_ERROR_NOT_FOUND
</dt>
6643 <dd class=
"description">client-error-not-found
</dd>
6644 <dt>IPP_STATUS_ERROR_NOT_POSSIBLE
</dt>
6645 <dd class=
"description">client-error-not-possible
</dd>
6646 <dt>IPP_STATUS_ERROR_OPERATION_NOT_SUPPORTED
</dt>
6647 <dd class=
"description">server-error-operation-not-supported
</dd>
6648 <dt>IPP_STATUS_ERROR_PRINTER_IS_DEACTIVATED
</dt>
6649 <dd class=
"description">server-error-printer-is-deactivated
</dd>
6650 <dt>IPP_STATUS_ERROR_REQUEST_ENTITY
</dt>
6651 <dd class=
"description">client-error-request-entity-too-large
</dd>
6652 <dt>IPP_STATUS_ERROR_REQUEST_VALUE
</dt>
6653 <dd class=
"description">client-error-request-value-too-long
</dd>
6654 <dt>IPP_STATUS_ERROR_SERVICE_UNAVAILABLE
</dt>
6655 <dd class=
"description">server-error-service-unavailable
</dd>
6656 <dt>IPP_STATUS_ERROR_TEMPORARY
</dt>
6657 <dd class=
"description">server-error-temporary-error
</dd>
6658 <dt>IPP_STATUS_ERROR_TIMEOUT
</dt>
6659 <dd class=
"description">client-error-timeout
</dd>
6660 <dt>IPP_STATUS_ERROR_TOO_MANY_DOCUMENTS
</dt>
6661 <dd class=
"description">server-error-too-many-documents
</dd>
6662 <dt>IPP_STATUS_ERROR_TOO_MANY_JOBS
</dt>
6663 <dd class=
"description">server-error-too-many-jobs
</dd>
6664 <dt>IPP_STATUS_ERROR_TOO_MANY_SUBSCRIPTIONS
</dt>
6665 <dd class=
"description">client-error-too-many-subscriptions
</dd>
6666 <dt>IPP_STATUS_ERROR_URI_SCHEME
</dt>
6667 <dd class=
"description">client-error-uri-scheme-not-supported
</dd>
6668 <dt>IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED
</dt>
6669 <dd class=
"description">server-error-version-not-supported
</dd>
6670 <dt>IPP_STATUS_OK
</dt>
6671 <dd class=
"description">successful-ok
</dd>
6672 <dt>IPP_STATUS_OK_CONFLICTING
</dt>
6673 <dd class=
"description">successful-ok-conflicting-attributes
</dd>
6674 <dt>IPP_STATUS_OK_EVENTS_COMPLETE
</dt>
6675 <dd class=
"description">successful-ok-events-complete
</dd>
6676 <dt>IPP_STATUS_OK_IGNORED_OR_SUBSTITUTED
</dt>
6677 <dd class=
"description">successful-ok-ignored-or-substituted-attributes
</dd>
6678 <dt>IPP_STATUS_OK_IGNORED_SUBSCRIPTIONS
</dt>
6679 <dd class=
"description">successful-ok-ignored-subscriptions
</dd>
6680 <dt>IPP_STATUS_OK_TOO_MANY_EVENTS
</dt>
6681 <dd class=
"description">successful-ok-too-many-events
</dd>
6683 <h3 class=
"enumeration"><a name=
"ipp_tag_e">ipp_tag_e
</a></h3>
6684 <p class=
"description">Format tags for attributes
</p>
6685 <h4 class=
"constants">Constants
</h4>
6687 <dt>IPP_TAG_ADMINDEFINE
</dt>
6688 <dd class=
"description">Admin-defined value
</dd>
6689 <dt>IPP_TAG_BEGIN_COLLECTION
</dt>
6690 <dd class=
"description">Beginning of collection value
</dd>
6691 <dt>IPP_TAG_BOOLEAN
</dt>
6692 <dd class=
"description">Boolean value
</dd>
6693 <dt>IPP_TAG_CHARSET
</dt>
6694 <dd class=
"description">Character set value
</dd>
6695 <dt>IPP_TAG_CUPS_INVALID
</dt>
6696 <dd class=
"description">Invalid tag name for
<a href=
"#ippTagValue"><code>ippTagValue
</code></a></dd>
6697 <dt>IPP_TAG_DATE
</dt>
6698 <dd class=
"description">Date/time value
</dd>
6699 <dt>IPP_TAG_DEFAULT
</dt>
6700 <dd class=
"description">Default value
</dd>
6701 <dt>IPP_TAG_DELETEATTR
</dt>
6702 <dd class=
"description">Delete-attribute value
</dd>
6703 <dt>IPP_TAG_DOCUMENT
</dt>
6704 <dd class=
"description">Document group
</dd>
6705 <dt>IPP_TAG_END
</dt>
6706 <dd class=
"description">End-of-attributes
</dd>
6707 <dt>IPP_TAG_END_COLLECTION
</dt>
6708 <dd class=
"description">End of collection value
</dd>
6709 <dt>IPP_TAG_ENUM
</dt>
6710 <dd class=
"description">Enumeration value
</dd>
6711 <dt>IPP_TAG_EVENT_NOTIFICATION
</dt>
6712 <dd class=
"description">Event group
</dd>
6713 <dt>IPP_TAG_EXTENSION
</dt>
6714 <dd class=
"description">Extension point for
32-bit tags
</dd>
6715 <dt>IPP_TAG_INTEGER
</dt>
6716 <dd class=
"description">Integer value
</dd>
6717 <dt>IPP_TAG_JOB
</dt>
6718 <dd class=
"description">Job group
</dd>
6719 <dt>IPP_TAG_KEYWORD
</dt>
6720 <dd class=
"description">Keyword value
</dd>
6721 <dt>IPP_TAG_LANGUAGE
</dt>
6722 <dd class=
"description">Language value
</dd>
6723 <dt>IPP_TAG_MEMBERNAME
</dt>
6724 <dd class=
"description">Collection member name value
</dd>
6725 <dt>IPP_TAG_MIMETYPE
</dt>
6726 <dd class=
"description">MIME media type value
</dd>
6727 <dt>IPP_TAG_NAME
</dt>
6728 <dd class=
"description">Name value
</dd>
6729 <dt>IPP_TAG_NAMELANG
</dt>
6730 <dd class=
"description">Name-with-language value
</dd>
6731 <dt>IPP_TAG_NOTSETTABLE
</dt>
6732 <dd class=
"description">Not-settable value
</dd>
6733 <dt>IPP_TAG_NOVALUE
</dt>
6734 <dd class=
"description">No-value value
</dd>
6735 <dt>IPP_TAG_OPERATION
</dt>
6736 <dd class=
"description">Operation group
</dd>
6737 <dt>IPP_TAG_PRINTER
</dt>
6738 <dd class=
"description">Printer group
</dd>
6739 <dt>IPP_TAG_RANGE
</dt>
6740 <dd class=
"description">Range value
</dd>
6741 <dt>IPP_TAG_RESOLUTION
</dt>
6742 <dd class=
"description">Resolution value
</dd>
6743 <dt>IPP_TAG_STRING
</dt>
6744 <dd class=
"description">Octet string value
</dd>
6745 <dt>IPP_TAG_SUBSCRIPTION
</dt>
6746 <dd class=
"description">Subscription group
</dd>
6747 <dt>IPP_TAG_TEXT
</dt>
6748 <dd class=
"description">Text value
</dd>
6749 <dt>IPP_TAG_TEXTLANG
</dt>
6750 <dd class=
"description">Text-with-language value
</dd>
6751 <dt>IPP_TAG_UNKNOWN
</dt>
6752 <dd class=
"description">Unknown value
</dd>
6753 <dt>IPP_TAG_UNSUPPORTED_GROUP
</dt>
6754 <dd class=
"description">Unsupported attributes group
</dd>
6755 <dt>IPP_TAG_UNSUPPORTED_VALUE
</dt>
6756 <dd class=
"description">Unsupported value
</dd>
6757 <dt>IPP_TAG_URI
</dt>
6758 <dd class=
"description">URI value
</dd>
6759 <dt>IPP_TAG_URISCHEME
</dt>
6760 <dd class=
"description">URI scheme value
</dd>
6761 <dt>IPP_TAG_ZERO
</dt>
6762 <dd class=
"description">Zero tag - used for separators
</dd>