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;
44 border: dotted thin #999999;
49 PRE.command EM, PRE.example EM {
50 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
54 font-family: monaco, courier, monospace;
65 border: solid thin #999999;
76 -moz-border-radius: 10px;
81 text-decoration: none;
84 A:link:hover, A:visited:hover, A:active {
85 text-decoration: underline;
92 TR.data, TD.data, TR.data TD {
95 border-bottom: solid 1pt #999999;
99 border-bottom: solid 1pt #999999;
106 border: solid thin #999999;
107 border-collapse: collapse;
123 border: solid thin #cccccc;
130 border-bottom: solid thin #999999;
139 caption-side: bottom;
163 border: thin solid black;
171 H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
180 border-bottom: solid 2pt #000000;
183 DIV.indent, TABLE.indent {
191 border-collapse: collapse;
194 TABLE.indent TD, TABLE.indent TH {
199 border-collapse: collapse;
207 border-bottom: solid thin #cccccc;
212 vertical-align: bottom;
221 border-bottom: solid thin #eeeeee;
226 TABLE.list TR:nth-child(even) {
230 TABLE.list TR:nth-child(odd) {
249 font-family: monaco, courier, monospace;
253 border: solid thin #999999;
254 border-collapse: collapse;
259 DIV.summary TABLE TD, DIV.summary TABLE TH {
260 border: solid thin #999999;
266 DIV.summary TABLE THEAD TH {
270 /* API documentation styles... */
277 div.body h3, div.body h4, div.body h5 {
278 margin-bottom: 0.5em;
281 .class, .enumeration, .function, .struct, .typedef, .union {
282 border-bottom: solid thin #999999;
289 code, p.code, pre, ul.code li {
290 font-family: monaco, courier, monospace;
293 ul.code, ul.contents, ul.subcontents {
294 list-style-type: none;
304 ul.contents li ul.code, ul.contents li ul.subcontents {
317 margin-bottom: 0.5em;
320 /* This is just for the HTML files generated with the framedhelp target */
323 border: solid thin black;
332 div.contents ul.contents {
335 div.contents ul.subcontents li {
346 HTTP and IPP API header for CUPS.
348 Copyright 2007-2011 by Apple Inc.
349 Copyright 1997-2006 by Easy Software Products, all rights reserved.
351 These coded instructions, statements, and computer programs are the
352 property of Apple Inc. and are protected by Federal copyright
353 law. Distribution and use rights are outlined in the file "LICENSE.txt"
354 which should have been included with this file. If this file is
355 file is missing or damaged, see the license at "http://www.cups.org/".
358 <h1 class='title'
>HTTP and IPP APIs
</h1>
360 <div class='summary'
><table summary='General Information'
>
374 <td>Programming:
<a href='api-overview.html'
>Introduction to CUPS Programming
</a><br>
375 Programming:
<a href='api-cups.html'
>CUPS API
</a><br>
376 References:
<a href='spec-ipp.html'
>CUPS Implementation of IPP
</a></td>
380 <h2 class=
"title">Contents
</h2>
381 <ul class=
"contents">
382 <li><a href=
"#OVERVIEW">Overview
</a><ul class=
"subcontents">
383 <li><a href=
"#CREATING_URI_STRINGS">Creating URI Strings
</a></li>
384 <li><a href=
"#SENDING_REQUESTS_WITH_FILES">Sending Requests with Files
</a></li>
385 <li><a href=
"#ASYNCHRONOUS_REQUEST_PROCESSING">Asynchronous Request Processing
</a></li>
387 <li><a href=
"#FUNCTIONS">Functions
</a><ul class=
"code">
388 <li><a href=
"#cupsDoAuthentication" title=
"Authenticate a request.">cupsDoAuthentication
</a></li>
389 <li><a href=
"#cupsDoFileRequest" title=
"Do an IPP request with a file.">cupsDoFileRequest
</a></li>
390 <li><a href=
"#cupsDoIORequest" title=
"Do an IPP request with file descriptors.">cupsDoIORequest
</a></li>
391 <li><a href=
"#cupsDoRequest" title=
"Do an IPP request.">cupsDoRequest
</a></li>
392 <li><a href=
"#cupsEncodeOptions" title=
"Encode printer options into IPP attributes.">cupsEncodeOptions
</a></li>
393 <li><a href=
"#cupsEncodeOptions2" title=
"Encode printer options into IPP attributes for a group.">cupsEncodeOptions2
</a></li>
394 <li><a href=
"#cupsGetDevices" title=
"Get available printer devices.">cupsGetDevices
</a></li>
395 <li><a href=
"#cupsGetFd" title=
"Get a file from the server.">cupsGetFd
</a></li>
396 <li><a href=
"#cupsGetFile" title=
"Get a file from the server.">cupsGetFile
</a></li>
397 <li><a href=
"#cupsGetResponse" title=
"Get a response to an IPP request.">cupsGetResponse
</a></li>
398 <li><a href=
"#cupsLastError" title=
"Return the last IPP status code.">cupsLastError
</a></li>
399 <li><a href=
"#cupsLastErrorString" title=
"Return the last IPP status-message.">cupsLastErrorString
</a></li>
400 <li><a href=
"#cupsPutFd" title=
"Put a file on the server.">cupsPutFd
</a></li>
401 <li><a href=
"#cupsPutFile" title=
"Put a file on the server.">cupsPutFile
</a></li>
402 <li><a href=
"#cupsReadResponseData" title=
"Read additional data after the IPP response.">cupsReadResponseData
</a></li>
403 <li><a href=
"#cupsSendRequest" title=
"Send an IPP request.">cupsSendRequest
</a></li>
404 <li><a href=
"#cupsWriteRequestData" title=
"Write additional data after an IPP request.">cupsWriteRequestData
</a></li>
405 <li><a href=
"#httpAddCredential" title=
"Allocates and adds a single credential to an array.">httpAddCredential
</a></li>
406 <li><a href=
"#httpAddrAny" title=
"Check for the "any" address.">httpAddrAny
</a></li>
407 <li><a href=
"#httpAddrEqual" title=
"Compare two addresses.">httpAddrEqual
</a></li>
408 <li><a href=
"#httpAddrLength" title=
"Return the length of the address in bytes.">httpAddrLength
</a></li>
409 <li><a href=
"#httpAddrLocalhost" title=
"Check for the local loopback address.">httpAddrLocalhost
</a></li>
410 <li><a href=
"#httpAddrLookup" title=
"Lookup the hostname associated with the address.">httpAddrLookup
</a></li>
411 <li><a href=
"#httpAddrString" title=
"Convert an address to a numeric string.">httpAddrString
</a></li>
412 <li><a href=
"#httpAssembleURI" title=
"Assemble a uniform resource identifier from its
413 components.">httpAssembleURI
</a></li>
414 <li><a href=
"#httpAssembleURIf" title=
"Assemble a uniform resource identifier from its
415 components with a formatted resource.">httpAssembleURIf
</a></li>
416 <li><a href=
"#httpBlocking" title=
"Set blocking/non-blocking behavior on a connection.">httpBlocking
</a></li>
417 <li><a href=
"#httpCheck" title=
"Check to see if there is a pending response from the server.">httpCheck
</a></li>
418 <li><a href=
"#httpClearCookie" title=
"Clear the cookie value(s).">httpClearCookie
</a></li>
419 <li><a href=
"#httpClearFields" title=
"Clear HTTP request fields.">httpClearFields
</a></li>
420 <li><a href=
"#httpClose" title=
"Close an HTTP connection.">httpClose
</a></li>
421 <li><a href=
"#httpConnect" title=
"Connect to a HTTP server.">httpConnect
</a></li>
422 <li><a href=
"#httpConnectEncrypt" title=
"Connect to a HTTP server using encryption.">httpConnectEncrypt
</a></li>
423 <li><a href=
"#httpCopyCredentials" title=
"Copy the credentials associated with an encrypted
424 connection.">httpCopyCredentials
</a></li>
425 <li><a href=
"#httpDecode64" title=
"Base64-decode a string.">httpDecode64
</a></li>
426 <li><a href=
"#httpDecode64_2" title=
"Base64-decode a string.">httpDecode64_2
</a></li>
427 <li><a href=
"#httpDelete" title=
"Send a DELETE request to the server.">httpDelete
</a></li>
428 <li><a href=
"#httpEncode64" title=
"Base64-encode a string.">httpEncode64
</a></li>
429 <li><a href=
"#httpEncode64_2" title=
"Base64-encode a string.">httpEncode64_2
</a></li>
430 <li><a href=
"#httpEncryption" title=
"Set the required encryption on the link.">httpEncryption
</a></li>
431 <li><a href=
"#httpError" title=
"Get the last error on a connection.">httpError
</a></li>
432 <li><a href=
"#httpFlush" title=
"Flush data from a HTTP connection.">httpFlush
</a></li>
433 <li><a href=
"#httpFlushWrite" title=
"Flush data in write buffer.">httpFlushWrite
</a></li>
434 <li><a href=
"#httpFreeCredentials" title=
"Free an array of credentials.">httpFreeCredentials
</a></li>
435 <li><a href=
"#httpGet" title=
"Send a GET request to the server.">httpGet
</a></li>
436 <li><a href=
"#httpGetAuthString" title=
"Get the current authorization string.">httpGetAuthString
</a></li>
437 <li><a href=
"#httpGetBlocking" title=
"Get the blocking/non-block state of a connection.">httpGetBlocking
</a></li>
438 <li><a href=
"#httpGetCookie" title=
"Get any cookie data from the response.">httpGetCookie
</a></li>
439 <li><a href=
"#httpGetDateString" title=
"Get a formatted date/time string from a time value.">httpGetDateString
</a></li>
440 <li><a href=
"#httpGetDateString2" title=
"Get a formatted date/time string from a time value.">httpGetDateString2
</a></li>
441 <li><a href=
"#httpGetDateTime" title=
"Get a time value from a formatted date/time string.">httpGetDateTime
</a></li>
442 <li><a href=
"#httpGetFd" title=
"Get the file descriptor associated with a connection.">httpGetFd
</a></li>
443 <li><a href=
"#httpGetField" title=
"Get a field value from a request/response.">httpGetField
</a></li>
444 <li><a href=
"#httpGetHostByName" title=
"Lookup a hostname or IPv4 address, and return
445 address records for the specified name.">httpGetHostByName
</a></li>
446 <li><a href=
"#httpGetHostname" title=
"Get the FQDN for the connection or local system.">httpGetHostname
</a></li>
447 <li><a href=
"#httpGetLength" title=
"Get the amount of data remaining from the
448 content-length or transfer-encoding fields.">httpGetLength
</a></li>
449 <li><a href=
"#httpGetLength2" title=
"Get the amount of data remaining from the
450 content-length or transfer-encoding fields.">httpGetLength2
</a></li>
451 <li><a href=
"#httpGetState" title=
"Get the current state of the HTTP request.">httpGetState
</a></li>
452 <li><a href=
"#httpGetStatus" title=
"Get the status of the last HTTP request.">httpGetStatus
</a></li>
453 <li><a href=
"#httpGetSubField" title=
"Get a sub-field value.">httpGetSubField
</a></li>
454 <li><a href=
"#httpGetSubField2" title=
"Get a sub-field value.">httpGetSubField2
</a></li>
455 <li><a href=
"#httpGetVersion" title=
"Get the HTTP version at the other end.">httpGetVersion
</a></li>
456 <li><a href=
"#httpGets" title=
"Get a line of text from a HTTP connection.">httpGets
</a></li>
457 <li><a href=
"#httpHead" title=
"Send a HEAD request to the server.">httpHead
</a></li>
458 <li><a href=
"#httpInitialize" title=
"Initialize the HTTP interface library and set the
459 default HTTP proxy (if any).">httpInitialize
</a></li>
460 <li><a href=
"#httpMD5" title=
"Compute the MD5 sum of the username:group:password.">httpMD5
</a></li>
461 <li><a href=
"#httpMD5Final" title=
"Combine the MD5 sum of the username, group, and password
462 with the server-supplied nonce value, method, and
463 request-uri.">httpMD5Final
</a></li>
464 <li><a href=
"#httpMD5String" title=
"Convert an MD5 sum to a character string.">httpMD5String
</a></li>
465 <li><a href=
"#httpOptions" title=
"Send an OPTIONS request to the server.">httpOptions
</a></li>
466 <li><a href=
"#httpPost" title=
"Send a POST request to the server.">httpPost
</a></li>
467 <li><a href=
"#httpPut" title=
"Send a PUT request to the server.">httpPut
</a></li>
468 <li><a href=
"#httpRead" title=
"Read data from a HTTP connection.">httpRead
</a></li>
469 <li><a href=
"#httpRead2" title=
"Read data from a HTTP connection.">httpRead2
</a></li>
470 <li><a href=
"#httpReconnect" title=
"Reconnect to a HTTP server.">httpReconnect
</a></li>
471 <li><a href=
"#httpSeparate" title=
"Separate a Universal Resource Identifier into its
472 components.">httpSeparate
</a></li>
473 <li><a href=
"#httpSeparate2" title=
"Separate a Universal Resource Identifier into its
474 components.">httpSeparate2
</a></li>
475 <li><a href=
"#httpSeparateURI" title=
"Separate a Universal Resource Identifier into its
476 components.">httpSeparateURI
</a></li>
477 <li><a href=
"#httpSetAuthString" title=
"Set the current authorization string.">httpSetAuthString
</a></li>
478 <li><a href=
"#httpSetCookie" title=
"Set the cookie value(s).">httpSetCookie
</a></li>
479 <li><a href=
"#httpSetCredentials" title=
"Set the credentials associated with an encrypted
480 connection.">httpSetCredentials
</a></li>
481 <li><a href=
"#httpSetExpect" title=
"Set the Expect: header in a request.">httpSetExpect
</a></li>
482 <li><a href=
"#httpSetField" title=
"Set the value of an HTTP header.">httpSetField
</a></li>
483 <li><a href=
"#httpSetLength" title=
"Set the content-length and content-encoding.">httpSetLength
</a></li>
484 <li><a href=
"#httpSetTimeout" title=
"Set read/write timeouts and an optional callback.">httpSetTimeout
</a></li>
485 <li><a href=
"#httpStatus" title=
"Return a short string describing a HTTP status code.">httpStatus
</a></li>
486 <li><a href=
"#httpTrace" title=
"Send an TRACE request to the server.">httpTrace
</a></li>
487 <li><a href=
"#httpUpdate" title=
"Update the current HTTP state for incoming data.">httpUpdate
</a></li>
488 <li><a href=
"#httpWait" title=
"Wait for data available on a connection.">httpWait
</a></li>
489 <li><a href=
"#httpWrite" title=
"Write data to a HTTP connection.">httpWrite
</a></li>
490 <li><a href=
"#httpWrite2" title=
"Write data to a HTTP connection.">httpWrite2
</a></li>
491 <li><a href=
"#ippAddBoolean" title=
"Add a boolean attribute to an IPP message.">ippAddBoolean
</a></li>
492 <li><a href=
"#ippAddBooleans" title=
"Add an array of boolean values.">ippAddBooleans
</a></li>
493 <li><a href=
"#ippAddCollection" title=
"Add a collection value.">ippAddCollection
</a></li>
494 <li><a href=
"#ippAddCollections" title=
"Add an array of collection values.">ippAddCollections
</a></li>
495 <li><a href=
"#ippAddDate" title=
"Add a date attribute to an IPP message.">ippAddDate
</a></li>
496 <li><a href=
"#ippAddInteger" title=
"Add a integer attribute to an IPP message.">ippAddInteger
</a></li>
497 <li><a href=
"#ippAddIntegers" title=
"Add an array of integer values.">ippAddIntegers
</a></li>
498 <li><a href=
"#ippAddOctetString" title=
"Add an octetString value to an IPP message.">ippAddOctetString
</a></li>
499 <li><a href=
"#ippAddOutOfBand" title=
"Add an out-of-band value to an IPP message.">ippAddOutOfBand
</a></li>
500 <li><a href=
"#ippAddRange" title=
"Add a range of values to an IPP message.">ippAddRange
</a></li>
501 <li><a href=
"#ippAddRanges" title=
"Add ranges of values to an IPP message.">ippAddRanges
</a></li>
502 <li><a href=
"#ippAddResolution" title=
"Add a resolution value to an IPP message.">ippAddResolution
</a></li>
503 <li><a href=
"#ippAddResolutions" title=
"Add resolution values to an IPP message.">ippAddResolutions
</a></li>
504 <li><a href=
"#ippAddSeparator" title=
"Add a group separator to an IPP message.">ippAddSeparator
</a></li>
505 <li><a href=
"#ippAddString" title=
"Add a language-encoded string to an IPP message.">ippAddString
</a></li>
506 <li><a href=
"#ippAddStrings" title=
"Add language-encoded strings to an IPP message.">ippAddStrings
</a></li>
507 <li><a href=
"#ippAttributeString" title=
"Convert the attribute's value to a string.">ippAttributeString
</a></li>
508 <li><a href=
"#ippCopyAttribute" title=
"Copy an attribute.">ippCopyAttribute
</a></li>
509 <li><a href=
"#ippCopyAttributes" title=
"Copy attributes from one IPP message to another.">ippCopyAttributes
</a></li>
510 <li><a href=
"#ippDateToTime" title=
"Convert from RFC 1903 Date/Time format to UNIX time
511 in seconds.">ippDateToTime
</a></li>
512 <li><a href=
"#ippDelete" title=
"Delete an IPP message.">ippDelete
</a></li>
513 <li><a href=
"#ippDeleteAttribute" title=
"Delete a single attribute in an IPP message.">ippDeleteAttribute
</a></li>
514 <li><a href=
"#ippDeleteValues" title=
"Delete values in an attribute.">ippDeleteValues
</a></li>
515 <li><a href=
"#ippEnumString" title=
"Return a string corresponding to the enum value.">ippEnumString
</a></li>
516 <li><a href=
"#ippEnumValue" title=
"Return the value associated with a given enum string.">ippEnumValue
</a></li>
517 <li><a href=
"#ippErrorString" title=
"Return a name for the given status code.">ippErrorString
</a></li>
518 <li><a href=
"#ippErrorValue" title=
"Return a status code for the given name.">ippErrorValue
</a></li>
519 <li><a href=
"#ippFindAttribute" title=
"Find a named attribute in a request...">ippFindAttribute
</a></li>
520 <li><a href=
"#ippFindNextAttribute" title=
"Find the next named attribute in a request...">ippFindNextAttribute
</a></li>
521 <li><a href=
"#ippFirstAttribute" title=
"Return the first attribute in the message.">ippFirstAttribute
</a></li>
522 <li><a href=
"#ippGetBoolean" title=
"Get a boolean value for an attribute.">ippGetBoolean
</a></li>
523 <li><a href=
"#ippGetCollection" title=
"Get a collection value for an attribute.">ippGetCollection
</a></li>
524 <li><a href=
"#ippGetCount" title=
"Get the number of values in an attribute.">ippGetCount
</a></li>
525 <li><a href=
"#ippGetGroupTag" title=
"Get the group associated with an attribute.">ippGetGroupTag
</a></li>
526 <li><a href=
"#ippGetInteger" title=
"Get the integer/enum value for an attribute.">ippGetInteger
</a></li>
527 <li><a href=
"#ippGetName" title=
"Get the attribute name.">ippGetName
</a></li>
528 <li><a href=
"#ippGetOperation" title=
"Get the operation ID in an IPP message.">ippGetOperation
</a></li>
529 <li><a href=
"#ippGetRequestId" title=
"Get the request ID from an IPP message.">ippGetRequestId
</a></li>
530 <li><a href=
"#ippGetResolution" title=
"Get a resolution value for an attribute.">ippGetResolution
</a></li>
531 <li><a href=
"#ippGetStatusCode" title=
"Get the status code from an IPP response or event message.">ippGetStatusCode
</a></li>
532 <li><a href=
"#ippGetString" title=
"Return the value...">ippGetString
</a></li>
533 <li><a href=
"#ippGetValueTag" title=
"Get the value tag for an attribute.">ippGetValueTag
</a></li>
534 <li><a href=
"#ippGetVersion" title=
"Get the major and minor version number from an IPP message.">ippGetVersion
</a></li>
535 <li><a href=
"#ippLength" title=
"Compute the length of an IPP message.">ippLength
</a></li>
536 <li><a href=
"#ippNew" title=
"Allocate a new IPP message.">ippNew
</a></li>
537 <li><a href=
"#ippNewRequest" title=
"Allocate a new IPP request message.">ippNewRequest
</a></li>
538 <li><a href=
"#ippNextAttribute" title=
"Return the next attribute in the message.">ippNextAttribute
</a></li>
539 <li><a href=
"#ippOpString" title=
"Return a name for the given operation id.">ippOpString
</a></li>
540 <li><a href=
"#ippOpValue" title=
"Return an operation id for the given name.">ippOpValue
</a></li>
541 <li><a href=
"#ippPort" title=
"Return the default IPP port number.">ippPort
</a></li>
542 <li><a href=
"#ippRead" title=
"Read data for an IPP message from a HTTP connection.">ippRead
</a></li>
543 <li><a href=
"#ippReadFile" title=
"Read data for an IPP message from a file.">ippReadFile
</a></li>
544 <li><a href=
"#ippReadIO" title=
"Read data for an IPP message.">ippReadIO
</a></li>
545 <li><a href=
"#ippSetBoolean" title=
"Set a boolean value in an attribute.">ippSetBoolean
</a></li>
546 <li><a href=
"#ippSetCollection" title=
"Set a collection value in an attribute.">ippSetCollection
</a></li>
547 <li><a href=
"#ippSetGroupTag" title=
"Set the group tag of an attribute.">ippSetGroupTag
</a></li>
548 <li><a href=
"#ippSetInteger" title=
"Set an integer or enum value in an attribute.">ippSetInteger
</a></li>
549 <li><a href=
"#ippSetName" title=
"Set the name of an attribute.">ippSetName
</a></li>
550 <li><a href=
"#ippSetOperation" title=
"Set the operation ID in an IPP request message.">ippSetOperation
</a></li>
551 <li><a href=
"#ippSetPort" title=
"Set the default port number.">ippSetPort
</a></li>
552 <li><a href=
"#ippSetRange" title=
"Set a rangeOfInteger value in an attribute.">ippSetRange
</a></li>
553 <li><a href=
"#ippSetRequestId" title=
"Set the request ID in an IPP message.">ippSetRequestId
</a></li>
554 <li><a href=
"#ippSetResolution" title=
"Set a resolution value in an attribute.">ippSetResolution
</a></li>
555 <li><a href=
"#ippSetStatusCode" title=
"Set the status code in an IPP response or event message.">ippSetStatusCode
</a></li>
556 <li><a href=
"#ippSetString" title=
"Set a string value in an attribute.">ippSetString
</a></li>
557 <li><a href=
"#ippSetValueTag" title=
"Set the value tag of an attribute.">ippSetValueTag
</a></li>
558 <li><a href=
"#ippSetVersion" title=
"Set the version number in an IPP message.">ippSetVersion
</a></li>
559 <li><a href=
"#ippTagString" title=
"Return the tag name corresponding to a tag value.">ippTagString
</a></li>
560 <li><a href=
"#ippTagValue" title=
"Return the tag value corresponding to a tag name.">ippTagValue
</a></li>
561 <li><a href=
"#ippTimeToDate" title=
"Convert from UNIX time to RFC 1903 format.">ippTimeToDate
</a></li>
562 <li><a href=
"#ippWrite" title=
"Write data for an IPP message to a HTTP connection.">ippWrite
</a></li>
563 <li><a href=
"#ippWriteFile" title=
"Write data for an IPP message to a file.">ippWriteFile
</a></li>
564 <li><a href=
"#ippWriteIO" title=
"Write data for an IPP message.">ippWriteIO
</a></li>
566 <li><a href=
"#TYPES">Data Types
</a><ul class=
"code">
567 <li><a href=
"#gss_auth_identity_desc" title=
"Local functions...">gss_auth_identity_desc
</a></li>
568 <li><a href=
"#http_addr_t" title=
"Socket address union, which
569 makes using IPv6 and other
570 address types easier and
571 more portable. ">http_addr_t
</a></li>
572 <li><a href=
"#http_addrlist_t" title=
"Socket address list, which is
573 used to enumerate all of the
574 addresses that are associated
575 with a hostname. ">http_addrlist_t
</a></li>
576 <li><a href=
"#http_auth_t" title=
"HTTP authentication types">http_auth_t
</a></li>
577 <li><a href=
"#http_credential_t" title=
"HTTP credential data ">http_credential_t
</a></li>
578 <li><a href=
"#http_encoding_t" title=
"HTTP transfer encoding values">http_encoding_t
</a></li>
579 <li><a href=
"#http_encryption_t" title=
"HTTP encryption values">http_encryption_t
</a></li>
580 <li><a href=
"#http_field_t" title=
"HTTP field names">http_field_t
</a></li>
581 <li><a href=
"#http_keepalive_t" title=
"HTTP keep-alive values">http_keepalive_t
</a></li>
582 <li><a href=
"#http_state_t" title=
"HTTP state values; states
583 are server-oriented...">http_state_t
</a></li>
584 <li><a href=
"#http_status_t" title=
"HTTP status codes">http_status_t
</a></li>
585 <li><a href=
"#http_t" title=
"HTTP connection type">http_t
</a></li>
586 <li><a href=
"#http_timeout_cb_t" title=
"HTTP timeout callback ">http_timeout_cb_t
</a></li>
587 <li><a href=
"#http_uri_coding_t" title=
"URI en/decode flags">http_uri_coding_t
</a></li>
588 <li><a href=
"#http_uri_status_t" title=
"URI separation status ">http_uri_status_t
</a></li>
589 <li><a href=
"#http_version_t" title=
"HTTP version numbers">http_version_t
</a></li>
590 <li><a href=
"#ipp_attribute_t" title=
"IPP attribute">ipp_attribute_t
</a></li>
591 <li><a href=
"#ipp_copycb_t" title=
"Prototypes...">ipp_copycb_t
</a></li>
592 <li><a href=
"#ipp_dstate_t" title=
"Document states">ipp_dstate_t
</a></li>
593 <li><a href=
"#ipp_finish_t" title=
"Finishings">ipp_finish_t
</a></li>
594 <li><a href=
"#ipp_iocb_t" title=
"IPP IO Callback Function ">ipp_iocb_t
</a></li>
595 <li><a href=
"#ipp_jcollate_t" title=
"Job collation types">ipp_jcollate_t
</a></li>
596 <li><a href=
"#ipp_orient_t" title=
"Orientation values">ipp_orient_t
</a></li>
597 <li><a href=
"#ipp_pstate_t" title=
"Printer states">ipp_pstate_t
</a></li>
598 <li><a href=
"#ipp_quality_t" title=
"Qualities">ipp_quality_t
</a></li>
599 <li><a href=
"#ipp_res_t" title=
"Resolution units">ipp_res_t
</a></li>
600 <li><a href=
"#ipp_state_t" title=
"IPP states">ipp_state_t
</a></li>
601 <li><a href=
"#ipp_t" title=
"IPP request/response data">ipp_t
</a></li>
602 <li><a href=
"#ipp_uchar_t" title=
"Unsigned 8-bit integer/character">ipp_uchar_t
</a></li>
604 <li><a href=
"#STRUCTURES">Structures
</a><ul class=
"code">
605 <li><a href=
"#gss_auth_identity" title=
"Local functions...">gss_auth_identity
</a></li>
606 <li><a href=
"#http_addrlist_s" title=
"Socket address list, which is
607 used to enumerate all of the
608 addresses that are associated
609 with a hostname. ">http_addrlist_s
</a></li>
610 <li><a href=
"#http_credential_s" title=
"HTTP credential data ">http_credential_s
</a></li>
612 <li><a href=
"#ENUMERATIONS">Constants
</a><ul class=
"code">
613 <li><a href=
"#http_auth_e" title=
"HTTP authentication types">http_auth_e
</a></li>
614 <li><a href=
"#http_encoding_e" title=
"HTTP transfer encoding values">http_encoding_e
</a></li>
615 <li><a href=
"#http_encryption_e" title=
"HTTP encryption values">http_encryption_e
</a></li>
616 <li><a href=
"#http_field_e" title=
"HTTP field names">http_field_e
</a></li>
617 <li><a href=
"#http_keepalive_e" title=
"HTTP keep-alive values">http_keepalive_e
</a></li>
618 <li><a href=
"#http_state_e" title=
"HTTP state values; states
619 are server-oriented...">http_state_e
</a></li>
620 <li><a href=
"#http_status_e" title=
"HTTP status codes">http_status_e
</a></li>
621 <li><a href=
"#http_uri_coding_e" title=
"URI en/decode flags">http_uri_coding_e
</a></li>
622 <li><a href=
"#http_uri_status_e" title=
"URI separation status ">http_uri_status_e
</a></li>
623 <li><a href=
"#http_version_e" title=
"HTTP version numbers">http_version_e
</a></li>
624 <li><a href=
"#ipp_dstate_e" title=
"Document states">ipp_dstate_e
</a></li>
625 <li><a href=
"#ipp_finish_e" title=
"Finishings">ipp_finish_e
</a></li>
626 <li><a href=
"#ipp_jcollate_e" title=
"Job collation types">ipp_jcollate_e
</a></li>
627 <li><a href=
"#ipp_jstate_e" title=
"Job states">ipp_jstate_e
</a></li>
628 <li><a href=
"#ipp_op_e" title=
"IPP operations">ipp_op_e
</a></li>
629 <li><a href=
"#ipp_orient_e" title=
"Orientation values">ipp_orient_e
</a></li>
630 <li><a href=
"#ipp_pstate_e" title=
"Printer states">ipp_pstate_e
</a></li>
631 <li><a href=
"#ipp_quality_e" title=
"Qualities">ipp_quality_e
</a></li>
632 <li><a href=
"#ipp_res_e" title=
"Resolution units">ipp_res_e
</a></li>
633 <li><a href=
"#ipp_state_e" title=
"IPP states">ipp_state_e
</a></li>
634 <li><a href=
"#ipp_status_e" title=
"IPP status codes">ipp_status_e
</a></li>
635 <li><a href=
"#ipp_tag_e" title=
"Format tags for attributes">ipp_tag_e
</a></li>
641 HTTP and IPP API introduction for CUPS.
643 Copyright 2007-2011 by Apple Inc.
644 Copyright 1997-2006 by Easy Software Products, all rights reserved.
646 These coded instructions, statements, and computer programs are the
647 property of Apple Inc. and are protected by Federal copyright
648 law. Distribution and use rights are outlined in the file "LICENSE.txt"
649 which should have been included with this file. If this file is
650 file is missing or damaged, see the license at "http://www.cups.org/".
653 <h2 class='title'
><a name='OVERVIEW'
>Overview
</a></h2>
655 <p>The CUPS HTTP and IPP APIs provide low-level access to the HTTP and IPP
656 protocols and CUPS scheduler. They are typically used by monitoring and
657 administration programs to perform specific functions not supported by the
658 high-level CUPS API functions.
</p>
660 <p>The HTTP APIs use an opaque structure called
661 <a href='#http_t'
><code>http_t
</code></a> to manage connections to
662 a particular HTTP or IPP server. The
663 <a href='#httpConnectEncrypt'
><code>httpConnectEncrypt
</code></a> function is
664 used to create an instance of this structure for a particular server.
665 The constant
<code>CUPS_HTTP_DEFAULT
</code> can be used with all of the
666 <code>cups
</code> functions to refer to the default CUPS server - the functions
667 create a per-thread
<a href='#http_t'
><code>http_t
</code></a> as needed.
</p>
669 <p>The IPP APIs use two structures for requests (messages sent to the CUPS
670 scheduler) and responses (messages sent back to your application from the
671 scheduler). The
<a href='#ipp_t'
><code>ipp_t
</code></a> structure holds a
672 complete request or response and is allocated using the
673 <a href='#ippNew'
><code>ippNew
</code></a> or
674 <a href='#ippNewRequest'
><code>ippNewRequest
</code></a> functions and
675 freed using the
<a href='#ippDelete'
><code>ippDelete
</code></a> function.
</p>
677 <p>The second structure is called
678 <a href='#ipp_attribute_t'
><code>ipp_attribute_t
</code></a> and holds a
679 single IPP attribute which consists of a group tag (
<code>group_tag
</code>), a
680 value type tag (
<code>value_tag
</code>), the attribute name (
<code>name
</code>),
681 and
1 or more values (
<code>values[]
</code>). Attributes are added to an
682 <a href='#ipp_t'
><code>ipp_t
</code></a> structure using one of the
683 <code>ippAdd
</code> functions. For example, use
684 <a href='#ippAddString'
><code>ippAddString
</code></a> to add a
685 "requesting-user-name" string attribute to a request:
</p>
687 <pre class='example'
>
688 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_GET_JOBS);
690 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
694 <p>Once you have created an IPP request, use the
<code>cups
</code>
695 functions to send the request to and read the response from the server.
696 For example, the
<a href='#cupsDoRequest'
><code>cupsDoRequest
</code></a>
697 function can be used for simple query operations that do not involve files:
</p>
699 <pre class='example'
>
700 #include
<cups/cups.h
>
703 <a href='#ipp_t'
>ipp_t
</a> *
<a name='get_jobs'
>get_jobs
</a>(void)
705 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_GET_JOBS);
707 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
710 return (
<a href='#cupsDoRequest'
>cupsDoRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/"));
714 <p>The
<a href='#cupsDoRequest'
><code>cupsDoRequest
</code></a> function frees
715 the request structure and returns an IPP response structure or NULL pointer if
716 the request could not be sent to the server. Once you have a response from
717 the server, you can either use the
718 <a href='#ippFindAttribute'
><code>ippFindAttribute
</code></a> and
719 <a href='#ippFindNextAttribute'
><code>ippFindNextAttribute
</code></a> functions
720 to find specific attributes, for example:
</p>
722 <pre class='example'
>
723 <a href='#ipp_t'
>ipp_t
</a> *response;
724 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
726 attr =
<a href='#ippFindAttribute'
>ippFindAttribute
</a>(response,
"printer-state", IPP_TAG_ENUM);
729 <p>You can also walk the list of attributes with a simple
<code>for
</code> loop
732 <pre class='example'
>
733 <a href='#ipp_t'
>ipp_t
</a> *response;
734 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
736 for (attr = response-
>attrs; attr != NULL; attr = attr-
>next)
737 if (attr-
>name == NULL)
738 puts(
"--SEPARATOR--");
743 <p>The
<code>for
</code> loop approach is normally used when collecting
744 attributes for multiple objects (jobs, printers, etc.) in a response. Attributes
745 with
<code>NULL
</code> names indicate a separator between the attributes of
746 each object. For example, the following code will list the jobs returned from
747 our previous
<a href='#get_jobs'
><code>get_jobs
</code></a> example code:
</p>
749 <pre class='example'
>
750 <a href='#ipp_t'
>ipp_t
</a> *response =
<a href='#get_jobs'
>get_jobs
</a>();
752 if (response != NULL)
754 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
756 char *job_name = NULL;
757 char *job_originating_user_name = NULL;
759 puts(
"Job ID Owner Title");
760 puts(
"------ ---------------- ---------------------------------");
762 for (attr = response-
>attrs; attr != NULL; attr = attr-
>next)
764 /* Attributes without names are separators between jobs */
765 if (attr-
>name == NULL)
767 if (job_id
> 0 && job_name != NULL
&& job_originating_user_name != NULL)
768 printf(
"%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
772 job_originating_user_name = NULL;
775 else if (!strcmp(attr-
>name,
"job-id")
&& attr-
>value_tag == IPP_TAG_INTEGER)
776 job_id = attr-
>values[
0].integer;
777 else if (!strcmp(attr-
>name,
"job-name")
&& attr-
>value_tag == IPP_TAG_NAME)
778 job_name = attr-
>values[
0].string.text;
779 else if (!strcmp(attr-
>name,
"job-originating-user-name")
&&
780 attr-
>value_tag == IPP_TAG_NAME)
781 job_originating_user_name = attr-
>values[
0].string.text;
784 if (job_id
> 0 && job_name != NULL
&& job_originating_user_name != NULL)
785 printf(
"%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
789 <h3><a name='CREATING_URI_STRINGS'
>Creating URI Strings
</a></h3>
791 <p>To ensure proper encoding, the
792 <a href='#httpAssembleURIf'
><code>httpAssembleURIf
</code></a> function must be
793 used to format a
"printer-uri" string for all printer-based requests:
</p>
795 <pre class='example'
>
796 const char *name =
"Foo";
798 <a href='#ipp_t'
>ipp_t
</a> *request;
800 <a href='#httpAssembleURIf'
>httpAssembleURIf
</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri),
"ipp", NULL, cupsServer(),
801 ippPort(),
"/printers/%s", name);
802 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
805 <h3><a name='SENDING_REQUESTS_WITH_FILES'
>Sending Requests with Files
</a></h3>
807 <p>The
<a href='#cupsDoFileRequest'
><code>cupsDoFileRequest
</code></a> and
808 <a href='#cupsDoIORequest'
><code>cupsDoIORequest
</code></a> functions are
809 used for requests involving files. The
810 <a href='#cupsDoFileRequest'
><code>cupsDoFileRequest
</code></a> function
811 attaches the named file to a request and is typically used when sending a print
812 file or changing a printer's PPD file:
</p>
814 <pre class='example'
>
815 const char *filename =
"/usr/share/cups/data/testprint.ps";
816 const char *name =
"Foo";
819 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_PRINT_JOB);
820 <a href='#ipp_t'
>ipp_t
</a> *response;
822 /* Use httpAssembleURIf for the printer-uri string */
823 <a href='#httpAssembleURIf'
>httpAssembleURIf
</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri),
"ipp", NULL, cupsServer(),
824 ippPort(),
"/printers/%s", name);
825 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
826 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
828 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"job-name",
829 NULL,
"testprint.ps");
831 /* Use snprintf for the resource path */
832 snprintf(resource, sizeof(resource),
"/printers/%s", name);
834 response =
<a href='#cupsDoFileRequest'
>cupsDoFileRequest
</a>(CUPS_HTTP_DEFAULT, request, resource, filename);
837 <p>The
<a href='#cupsDoIORequest'
><code>cupsDoIORequest
</code></a> function
838 optionally attaches a file to the request and optionally saves a file in the
839 response from the server. It is used when using a pipe for the request
840 attachment or when using a request that returns a file, currently only
841 <code>CUPS_GET_DOCUMENT
</code> and
<code>CUPS_GET_PPD
</code>. For example,
842 the following code will download the PPD file for the sample HP LaserJet
845 <pre class='example'
>
848 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
849 <a href='#ipp_t'
>ipp_t
</a> *response;
851 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
852 NULL,
"laserjet.ppd");
854 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
856 response =
<a href='#cupsDoIORequest'
>cupsDoIORequest
</a>(CUPS_HTTP_DEFAULT, request,
"/", -
1, tempfd);
859 <p>The example passes
<code>-
1</code> for the input file descriptor to specify
860 that no file is to be attached to the request. The PPD file attached to the
861 response is written to the temporary file descriptor we created using the
862 <code>cupsTempFd
</code> function.
</p>
864 <h3><a name='ASYNCHRONOUS_REQUEST_PROCESSING'
>Asynchronous Request Processing
</a></h3>
866 <p>The
<a href='#cupsSendRequest'
><code>cupsSendRequest
</code></a> and
867 <a href='#cupsGetResponse'
><code>cupsGetResponse
</code></a> support
868 asynchronous communications with the server. Unlike the other request
869 functions, the IPP request is not automatically freed, so remember to
870 free your request with the
<a href='#ippDelete'
><code>ippDelete
</code></a>
873 <p>File data is attached to the request using the
874 <a href='#cupsWriteRequestData'
><code>cupsWriteRequestData
</code></a>
875 function, while file data returned from the server is read using the
876 <a href='#cupsReadResponseData'
><code>cupsReadResponseData
</code></a>
877 function. We can rewrite the previous
<code>CUPS_GET_PPD
</code> example
878 to use the asynchronous functions quite easily:
</p>
880 <pre class='example'
>
883 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
884 <a href='#ipp_t'
>ipp_t
</a> *response;
886 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
887 NULL,
"laserjet.ppd");
889 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
891 if (
<a href='#cupsSendRequest'
>cupsSendRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/") == HTTP_CONTINUE)
893 response =
<a href='#cupsGetResponse'
>cupsGetResponse
</a>(CUPS_HTTP_DEFAULT,
"/");
895 if (response != NULL)
900 while ((bytes =
<a href='#cupsReadResponseData'
>cupsReadResponseData
</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer)))
> 0)
901 write(tempfd, buffer, bytes);
905 /* Free the request! */
906 <a href='#ippDelete'
>ippDelete
</a>(request);
909 <p>The
<a href='#cupsSendRequest'
><code>cupsSendRequest
</code></a> function
910 returns the initial HTTP request status, typically either
911 <code>HTTP_CONTINUE
</code> or
<code>HTTP_UNAUTHORIZED
</code>. The latter status
912 is returned when the request requires authentication of some sort. The
913 <a href='#cupsDoAuthentication'
><code>cupsDoAuthentication
</code></a> function
914 must be called when your see
<code>HTTP_UNAUTHORIZED
</code> and the request
915 re-sent. We can add authentication support to our example code by using a
916 <code>do ... while
</code> loop:
</p>
918 <pre class='example'
>
921 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
922 <a href='#ipp_t'
>ipp_t
</a> *response;
923 http_status_t status;
925 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
926 NULL,
"laserjet.ppd");
928 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
930 /* Loop for authentication */
933 status =
<a href='#cupsSendRequest'
>cupsSendRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/");
935 if (status == HTTP_UNAUTHORIZED)
937 /* Try to authenticate, break out of the loop if that fails */
938 if (
<a href='#cupsDoAuthentication'
>cupsDoAuthentication
</a>(CUPS_HTTP_DEFAULT,
"POST",
"/"))
942 while (status != HTTP_CONTINUE
&& status != HTTP_UNAUTHORIZED);
944 if (status == HTTP_CONTINUE)
946 response =
<a href='#cupsGetResponse'
>cupsGetResponse
</a>(CUPS_HTTP_DEFAULT,
"/");
948 if (response != NULL)
953 while ((bytes =
<a href='#cupsReadResponseData'
>cupsReadResponseData
</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer)))
> 0)
954 write(tempfd, buffer, bytes);
958 /* Free the request! */
959 <a href='#ippDelete'
>ippDelete
</a>(request);
961 <h2 class=
"title"><a name=
"FUNCTIONS">Functions
</a></h2>
962 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/Mac OS X
10.4 </span><a name=
"cupsDoAuthentication">cupsDoAuthentication
</a></h3>
963 <p class=
"description">Authenticate a request.
</p>
965 int cupsDoAuthentication (
<br>
966 <a href=
"#http_t">http_t
</a> *http,
<br>
967 const char *method,
<br>
968 const char *resource
<br>
970 <h4 class=
"parameters">Parameters
</h4>
973 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
975 <dd class=
"description">Request method (
"GET
",
"POST
",
"PUT
")
</dd>
977 <dd class=
"description">Resource path
</dd>
979 <h4 class=
"returnvalue">Return Value
</h4>
980 <p class=
"description">0 on success, -
1 on error
</p>
981 <h4 class=
"discussion">Discussion
</h4>
982 <p class=
"discussion">This function should be called in response to a
<code>HTTP_UNAUTHORIZED
</code>
983 status, prior to resubmitting your request.
986 <h3 class=
"function"><a name=
"cupsDoFileRequest">cupsDoFileRequest
</a></h3>
987 <p class=
"description">Do an IPP request with a file.
</p>
989 <a href=
"#ipp_t">ipp_t
</a> *cupsDoFileRequest (
<br>
990 <a href=
"#http_t">http_t
</a> *http,
<br>
991 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
992 const char *resource,
<br>
993 const char *filename
<br>
995 <h4 class=
"parameters">Parameters
</h4>
998 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1000 <dd class=
"description">IPP request
</dd>
1002 <dd class=
"description">HTTP resource for POST
</dd>
1004 <dd class=
"description">File to send or
<code>NULL
</code> for none
</dd>
1006 <h4 class=
"returnvalue">Return Value
</h4>
1007 <p class=
"description">Response data
</p>
1008 <h4 class=
"discussion">Discussion
</h4>
1009 <p class=
"discussion">This function sends the IPP request to the specified server, retrying
1010 and authenticating as necessary. The request is freed with
<a href=
"#ippDelete"><code>ippDelete
</code></a>
1011 after receiving a valid IPP response.
</p>
1012 <h3 class=
"function"><span class=
"info"> CUPS
1.3/Mac OS X
10.5 </span><a name=
"cupsDoIORequest">cupsDoIORequest
</a></h3>
1013 <p class=
"description">Do an IPP request with file descriptors.
</p>
1015 <a href=
"#ipp_t">ipp_t
</a> *cupsDoIORequest (
<br>
1016 <a href=
"#http_t">http_t
</a> *http,
<br>
1017 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
1018 const char *resource,
<br>
1019 int infile,
<br>
1020 int outfile
<br>
1022 <h4 class=
"parameters">Parameters
</h4>
1025 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1027 <dd class=
"description">IPP request
</dd>
1029 <dd class=
"description">HTTP resource for POST
</dd>
1031 <dd class=
"description">File to read from or -
1 for none
</dd>
1033 <dd class=
"description">File to write to or -
1 for none
</dd>
1035 <h4 class=
"returnvalue">Return Value
</h4>
1036 <p class=
"description">Response data
</p>
1037 <h4 class=
"discussion">Discussion
</h4>
1038 <p class=
"discussion">This function sends the IPP request to the specified server, retrying
1039 and authenticating as necessary. The request is freed with ippDelete()
1040 after receiving a valid IPP response.
<br>
1042 If
"infile
" is a valid file descriptor, cupsDoIORequest() copies
1043 all of the data from the file after the IPP request message.
<br>
1045 If
"outfile
" is a valid file descriptor, cupsDoIORequest() copies
1046 all of the data after the IPP response message to the file.
1049 <h3 class=
"function"><a name=
"cupsDoRequest">cupsDoRequest
</a></h3>
1050 <p class=
"description">Do an IPP request.
</p>
1052 <a href=
"#ipp_t">ipp_t
</a> *cupsDoRequest (
<br>
1053 <a href=
"#http_t">http_t
</a> *http,
<br>
1054 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
1055 const char *resource
<br>
1057 <h4 class=
"parameters">Parameters
</h4>
1060 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1062 <dd class=
"description">IPP request
</dd>
1064 <dd class=
"description">HTTP resource for POST
</dd>
1066 <h4 class=
"returnvalue">Return Value
</h4>
1067 <p class=
"description">Response data
</p>
1068 <h4 class=
"discussion">Discussion
</h4>
1069 <p class=
"discussion">This function sends the IPP request to the specified server, retrying
1070 and authenticating as necessary. The request is freed with ippDelete()
1071 after receiving a valid IPP response.
</p>
1072 <h3 class=
"function"><a name=
"cupsEncodeOptions">cupsEncodeOptions
</a></h3>
1073 <p class=
"description">Encode printer options into IPP attributes.
</p>
1075 void cupsEncodeOptions (
<br>
1076 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
1077 int num_options,
<br>
1078 cups_option_t *options
<br>
1080 <h4 class=
"parameters">Parameters
</h4>
1083 <dd class=
"description">Request to add to
</dd>
1084 <dt>num_options
</dt>
1085 <dd class=
"description">Number of options
</dd>
1087 <dd class=
"description">Options
</dd>
1089 <h4 class=
"discussion">Discussion
</h4>
1090 <p class=
"discussion">This function adds operation, job, and then subscription attributes,
1091 in that order. Use the cupsEncodeOptions2() function to add attributes
1092 for a single group.
</p>
1093 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"cupsEncodeOptions2">cupsEncodeOptions2
</a></h3>
1094 <p class=
"description">Encode printer options into IPP attributes for a group.
</p>
1096 void cupsEncodeOptions2 (
<br>
1097 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
1098 int num_options,
<br>
1099 cups_option_t *options,
<br>
1100 ipp_tag_t group_tag
<br>
1102 <h4 class=
"parameters">Parameters
</h4>
1105 <dd class=
"description">Request to add to
</dd>
1106 <dt>num_options
</dt>
1107 <dd class=
"description">Number of options
</dd>
1109 <dd class=
"description">Options
</dd>
1111 <dd class=
"description">Group to encode
</dd>
1113 <h4 class=
"discussion">Discussion
</h4>
1114 <p class=
"discussion">This function only adds attributes for a single group. Call this
1115 function multiple times for each group, or use cupsEncodeOptions()
1116 to add the standard groups.
1119 <h3 class=
"function"><span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span><a name=
"cupsGetDevices">cupsGetDevices
</a></h3>
1120 <p class=
"description">Get available printer devices.
</p>
1122 ipp_status_t cupsGetDevices (
<br>
1123 <a href=
"#http_t">http_t
</a> *http,
<br>
1124 int timeout,
<br>
1125 const char *include_schemes,
<br>
1126 const char *exclude_schemes,
<br>
1127 cups_device_cb_t callback,
<br>
1128 void *user_data
<br>
1130 <h4 class=
"parameters">Parameters
</h4>
1133 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1135 <dd class=
"description">Timeout in seconds or
<code>CUPS_TIMEOUT_DEFAULT
</code></dd>
1136 <dt>include_schemes
</dt>
1137 <dd class=
"description">Comma-separated URI schemes to include or
<code>CUPS_INCLUDE_ALL
</code></dd>
1138 <dt>exclude_schemes
</dt>
1139 <dd class=
"description">Comma-separated URI schemes to exclude or
<code>CUPS_EXCLUDE_NONE
</code></dd>
1141 <dd class=
"description">Callback function
</dd>
1143 <dd class=
"description">User data pointer
</dd>
1145 <h4 class=
"returnvalue">Return Value
</h4>
1146 <p class=
"description">Request status -
<code>IPP_OK
</code> on success.
</p>
1147 <h4 class=
"discussion">Discussion
</h4>
1148 <p class=
"discussion">This function sends a CUPS-Get-Devices request and streams the discovered
1149 devices to the specified callback function. The
"timeout
" parameter controls
1150 how long the request lasts, while the
"include_schemes
" and
"exclude_schemes
"
1151 parameters provide comma-delimited lists of backends to include or omit from
1152 the request respectively.
1155 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/Mac OS X
10.4 </span><a name=
"cupsGetFd">cupsGetFd
</a></h3>
1156 <p class=
"description">Get a file from the server.
</p>
1158 <a href=
"#http_status_t">http_status_t
</a> cupsGetFd (
<br>
1159 <a href=
"#http_t">http_t
</a> *http,
<br>
1160 const char *resource,
<br>
1161 int fd
<br>
1163 <h4 class=
"parameters">Parameters
</h4>
1166 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1168 <dd class=
"description">Resource name
</dd>
1170 <dd class=
"description">File descriptor
</dd>
1172 <h4 class=
"returnvalue">Return Value
</h4>
1173 <p class=
"description">HTTP status
</p>
1174 <h4 class=
"discussion">Discussion
</h4>
1175 <p class=
"discussion">This function returns
<code>HTTP_OK
</code> when the file is successfully retrieved.
1178 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/Mac OS X
10.4 </span><a name=
"cupsGetFile">cupsGetFile
</a></h3>
1179 <p class=
"description">Get a file from the server.
</p>
1181 <a href=
"#http_status_t">http_status_t
</a> cupsGetFile (
<br>
1182 <a href=
"#http_t">http_t
</a> *http,
<br>
1183 const char *resource,
<br>
1184 const char *filename
<br>
1186 <h4 class=
"parameters">Parameters
</h4>
1189 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1191 <dd class=
"description">Resource name
</dd>
1193 <dd class=
"description">Filename
</dd>
1195 <h4 class=
"returnvalue">Return Value
</h4>
1196 <p class=
"description">HTTP status
</p>
1197 <h4 class=
"discussion">Discussion
</h4>
1198 <p class=
"discussion">This function returns
<code>HTTP_OK
</code> when the file is successfully retrieved.
1201 <h3 class=
"function"><span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span><a name=
"cupsGetResponse">cupsGetResponse
</a></h3>
1202 <p class=
"description">Get a response to an IPP request.
</p>
1204 <a href=
"#ipp_t">ipp_t
</a> *cupsGetResponse (
<br>
1205 <a href=
"#http_t">http_t
</a> *http,
<br>
1206 const char *resource
<br>
1208 <h4 class=
"parameters">Parameters
</h4>
1211 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1213 <dd class=
"description">HTTP resource for POST
</dd>
1215 <h4 class=
"returnvalue">Return Value
</h4>
1216 <p class=
"description">Response or
<code>NULL
</code> on HTTP error
</p>
1217 <h4 class=
"discussion">Discussion
</h4>
1218 <p class=
"discussion">Use this function to get the response for an IPP request sent using
1219 cupsSendDocument() or cupsSendRequest(). For requests that return
1220 additional data, use httpRead() after getting a successful response,
1221 otherwise call httpFlush() to complete the response processing.
1224 <h3 class=
"function"><a name=
"cupsLastError">cupsLastError
</a></h3>
1225 <p class=
"description">Return the last IPP status code.
</p>
1227 ipp_status_t cupsLastError (void);
</p>
1228 <h4 class=
"returnvalue">Return Value
</h4>
1229 <p class=
"description">IPP status code from last request
</p>
1230 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"cupsLastErrorString">cupsLastErrorString
</a></h3>
1231 <p class=
"description">Return the last IPP status-message.
</p>
1233 const char *cupsLastErrorString (void);
</p>
1234 <h4 class=
"returnvalue">Return Value
</h4>
1235 <p class=
"description">status-message text from last request
</p>
1236 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/Mac OS X
10.4 </span><a name=
"cupsPutFd">cupsPutFd
</a></h3>
1237 <p class=
"description">Put a file on the server.
</p>
1239 <a href=
"#http_status_t">http_status_t
</a> cupsPutFd (
<br>
1240 <a href=
"#http_t">http_t
</a> *http,
<br>
1241 const char *resource,
<br>
1242 int fd
<br>
1244 <h4 class=
"parameters">Parameters
</h4>
1247 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1249 <dd class=
"description">Resource name
</dd>
1251 <dd class=
"description">File descriptor
</dd>
1253 <h4 class=
"returnvalue">Return Value
</h4>
1254 <p class=
"description">HTTP status
</p>
1255 <h4 class=
"discussion">Discussion
</h4>
1256 <p class=
"discussion">This function returns
<code>HTTP_CREATED
</code> when the file is stored
1260 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/Mac OS X
10.4 </span><a name=
"cupsPutFile">cupsPutFile
</a></h3>
1261 <p class=
"description">Put a file on the server.
</p>
1263 <a href=
"#http_status_t">http_status_t
</a> cupsPutFile (
<br>
1264 <a href=
"#http_t">http_t
</a> *http,
<br>
1265 const char *resource,
<br>
1266 const char *filename
<br>
1268 <h4 class=
"parameters">Parameters
</h4>
1271 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1273 <dd class=
"description">Resource name
</dd>
1275 <dd class=
"description">Filename
</dd>
1277 <h4 class=
"returnvalue">Return Value
</h4>
1278 <p class=
"description">HTTP status
</p>
1279 <h4 class=
"discussion">Discussion
</h4>
1280 <p class=
"discussion">This function returns
<code>HTTP_CREATED
</code> when the file is stored
1284 <h3 class=
"function"><span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span><a name=
"cupsReadResponseData">cupsReadResponseData
</a></h3>
1285 <p class=
"description">Read additional data after the IPP response.
</p>
1287 ssize_t cupsReadResponseData (
<br>
1288 <a href=
"#http_t">http_t
</a> *http,
<br>
1289 char *buffer,
<br>
1290 size_t length
<br>
1292 <h4 class=
"parameters">Parameters
</h4>
1295 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1297 <dd class=
"description">Buffer to use
</dd>
1299 <dd class=
"description">Number of bytes to read
</dd>
1301 <h4 class=
"returnvalue">Return Value
</h4>
1302 <p class=
"description">Bytes read,
0 on EOF, -
1 on error
</p>
1303 <h4 class=
"discussion">Discussion
</h4>
1304 <p class=
"discussion">This function is used after cupsGetResponse() to read the PPD or document
1305 files for CUPS_GET_PPD and CUPS_GET_DOCUMENT requests, respectively.
1308 <h3 class=
"function"><span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span><a name=
"cupsSendRequest">cupsSendRequest
</a></h3>
1309 <p class=
"description">Send an IPP request.
</p>
1311 <a href=
"#http_status_t">http_status_t
</a> cupsSendRequest (
<br>
1312 <a href=
"#http_t">http_t
</a> *http,
<br>
1313 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
1314 const char *resource,
<br>
1315 size_t length
<br>
1317 <h4 class=
"parameters">Parameters
</h4>
1320 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1322 <dd class=
"description">IPP request
</dd>
1324 <dd class=
"description">Resource path
</dd>
1326 <dd class=
"description">Length of data to follow or
<code>CUPS_LENGTH_VARIABLE
</code></dd>
1328 <h4 class=
"returnvalue">Return Value
</h4>
1329 <p class=
"description">Initial HTTP status
</p>
1330 <h4 class=
"discussion">Discussion
</h4>
1331 <p class=
"discussion">Use httpWrite() to write any additional data (document, PPD file, etc.)
1332 for the request, cupsGetResponse() to get the IPP response, and httpRead()
1333 to read any additional data following the response. Only one request can be
1334 sent/queued at a time.
<br>
1336 Unlike cupsDoFileRequest(), cupsDoIORequest(), and cupsDoRequest(), the
1337 request is not freed.
1340 <h3 class=
"function"><span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span><a name=
"cupsWriteRequestData">cupsWriteRequestData
</a></h3>
1341 <p class=
"description">Write additional data after an IPP request.
</p>
1343 <a href=
"#http_status_t">http_status_t
</a> cupsWriteRequestData (
<br>
1344 <a href=
"#http_t">http_t
</a> *http,
<br>
1345 const char *buffer,
<br>
1346 size_t length
<br>
1348 <h4 class=
"parameters">Parameters
</h4>
1351 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1353 <dd class=
"description">Bytes to write
</dd>
1355 <dd class=
"description">Number of bytes to write
</dd>
1357 <h4 class=
"returnvalue">Return Value
</h4>
1358 <p class=
"description"><code>HTTP_CONTINUE
</code> if OK or HTTP status on error
</p>
1359 <h4 class=
"discussion">Discussion
</h4>
1360 <p class=
"discussion">This function is used after
<a href=
"#cupsSendRequest"><code>cupsSendRequest
</code></a> to provide a PPD and
1361 after
<a href=
"#cupsStartDocument"><code>cupsStartDocument
</code></a> to provide a document file.
1364 <h3 class=
"function"><span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span><a name=
"httpAddCredential">httpAddCredential
</a></h3>
1365 <p class=
"description">Allocates and adds a single credential to an array.
</p>
1367 int httpAddCredential (
<br>
1368 cups_array_t *credentials,
<br>
1369 const void *data,
<br>
1370 size_t datalen
<br>
1372 <h4 class=
"parameters">Parameters
</h4>
1374 <dt>credentials
</dt>
1375 <dd class=
"description">Credentials array
</dd>
1377 <dd class=
"description">PEM-encoded X
.509 data
</dd>
1379 <dd class=
"description">Length of data
</dd>
1381 <h4 class=
"returnvalue">Return Value
</h4>
1382 <p class=
"description">0 on success, -
1 on error
</p>
1383 <h4 class=
"discussion">Discussion
</h4>
1384 <p class=
"discussion">Use
<code>cupsArrayNew(NULL, NULL)
</code> to create a credentials array.
1387 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrAny">httpAddrAny
</a></h3>
1388 <p class=
"description">Check for the
"any
" address.
</p>
1390 int httpAddrAny (
<br>
1391 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1393 <h4 class=
"parameters">Parameters
</h4>
1396 <dd class=
"description">Address to check
</dd>
1398 <h4 class=
"returnvalue">Return Value
</h4>
1399 <p class=
"description">1 if
"any
",
0 otherwise
</p>
1400 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrEqual">httpAddrEqual
</a></h3>
1401 <p class=
"description">Compare two addresses.
</p>
1403 int httpAddrEqual (
<br>
1404 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr1,
<br>
1405 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr2
<br>
1407 <h4 class=
"parameters">Parameters
</h4>
1410 <dd class=
"description">First address
</dd>
1412 <dd class=
"description">Second address
</dd>
1414 <h4 class=
"returnvalue">Return Value
</h4>
1415 <p class=
"description">1 if equal,
0 if not
</p>
1416 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrLength">httpAddrLength
</a></h3>
1417 <p class=
"description">Return the length of the address in bytes.
</p>
1419 int httpAddrLength (
<br>
1420 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1422 <h4 class=
"parameters">Parameters
</h4>
1425 <dd class=
"description">Address
</dd>
1427 <h4 class=
"returnvalue">Return Value
</h4>
1428 <p class=
"description">Length in bytes
</p>
1429 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrLocalhost">httpAddrLocalhost
</a></h3>
1430 <p class=
"description">Check for the local loopback address.
</p>
1432 int httpAddrLocalhost (
<br>
1433 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1435 <h4 class=
"parameters">Parameters
</h4>
1438 <dd class=
"description">Address to check
</dd>
1440 <h4 class=
"returnvalue">Return Value
</h4>
1441 <p class=
"description">1 if local host,
0 otherwise
</p>
1442 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrLookup">httpAddrLookup
</a></h3>
1443 <p class=
"description">Lookup the hostname associated with the address.
</p>
1445 char *httpAddrLookup (
<br>
1446 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
1447 char *name,
<br>
1448 int namelen
<br>
1450 <h4 class=
"parameters">Parameters
</h4>
1453 <dd class=
"description">Address to lookup
</dd>
1455 <dd class=
"description">Host name buffer
</dd>
1457 <dd class=
"description">Size of name buffer
</dd>
1459 <h4 class=
"returnvalue">Return Value
</h4>
1460 <p class=
"description">Host name
</p>
1461 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrString">httpAddrString
</a></h3>
1462 <p class=
"description">Convert an address to a numeric string.
</p>
1464 char *httpAddrString (
<br>
1465 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
1466 char *s,
<br>
1467 int slen
<br>
1469 <h4 class=
"parameters">Parameters
</h4>
1472 <dd class=
"description">Address to convert
</dd>
1474 <dd class=
"description">String buffer
</dd>
1476 <dd class=
"description">Length of string
</dd>
1478 <h4 class=
"returnvalue">Return Value
</h4>
1479 <p class=
"description">Numeric address string
</p>
1480 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAssembleURI">httpAssembleURI
</a></h3>
1481 <p class=
"description">Assemble a uniform resource identifier from its
1484 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpAssembleURI (
<br>
1485 <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> encoding,
<br>
1486 char *uri,
<br>
1487 int urilen,
<br>
1488 const char *scheme,
<br>
1489 const char *username,
<br>
1490 const char *host,
<br>
1491 int port,
<br>
1492 const char *resource
<br>
1494 <h4 class=
"parameters">Parameters
</h4>
1497 <dd class=
"description">Encoding flags
</dd>
1499 <dd class=
"description">URI buffer
</dd>
1501 <dd class=
"description">Size of URI buffer
</dd>
1503 <dd class=
"description">Scheme name
</dd>
1505 <dd class=
"description">Username
</dd>
1507 <dd class=
"description">Hostname or address
</dd>
1509 <dd class=
"description">Port number
</dd>
1511 <dd class=
"description">Resource
</dd>
1513 <h4 class=
"returnvalue">Return Value
</h4>
1514 <p class=
"description">URI status
</p>
1515 <h4 class=
"discussion">Discussion
</h4>
1516 <p class=
"discussion">This function escapes reserved characters in the URI depending on the
1517 value of the
"encoding
" argument. You should use this function in
1518 place of traditional string functions whenever you need to create a
1522 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAssembleURIf">httpAssembleURIf
</a></h3>
1523 <p class=
"description">Assemble a uniform resource identifier from its
1524 components with a formatted resource.
</p>
1526 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpAssembleURIf (
<br>
1527 <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> encoding,
<br>
1528 char *uri,
<br>
1529 int urilen,
<br>
1530 const char *scheme,
<br>
1531 const char *username,
<br>
1532 const char *host,
<br>
1533 int port,
<br>
1534 const char *resourcef,
<br>
1535 ...
<br>
1537 <h4 class=
"parameters">Parameters
</h4>
1540 <dd class=
"description">Encoding flags
</dd>
1542 <dd class=
"description">URI buffer
</dd>
1544 <dd class=
"description">Size of URI buffer
</dd>
1546 <dd class=
"description">Scheme name
</dd>
1548 <dd class=
"description">Username
</dd>
1550 <dd class=
"description">Hostname or address
</dd>
1552 <dd class=
"description">Port number
</dd>
1554 <dd class=
"description">Printf-style resource
</dd>
1556 <dd class=
"description">Additional arguments as needed
</dd>
1558 <h4 class=
"returnvalue">Return Value
</h4>
1559 <p class=
"description">URI status
</p>
1560 <h4 class=
"discussion">Discussion
</h4>
1561 <p class=
"discussion">This function creates a formatted version of the resource string
1562 argument
"resourcef
" and escapes reserved characters in the URI
1563 depending on the value of the
"encoding
" argument. You should use
1564 this function in place of traditional string functions whenever
1565 you need to create a URI string.
1568 <h3 class=
"function"><a name=
"httpBlocking">httpBlocking
</a></h3>
1569 <p class=
"description">Set blocking/non-blocking behavior on a connection.
</p>
1571 void httpBlocking (
<br>
1572 <a href=
"#http_t">http_t
</a> *http,
<br>
1573 int b
<br>
1575 <h4 class=
"parameters">Parameters
</h4>
1578 <dd class=
"description">Connection to server
</dd>
1580 <dd class=
"description">1 = blocking,
0 = non-blocking
</dd>
1582 <h3 class=
"function"><a name=
"httpCheck">httpCheck
</a></h3>
1583 <p class=
"description">Check to see if there is a pending response from the server.
</p>
1586 <a href=
"#http_t">http_t
</a> *http
<br>
1588 <h4 class=
"parameters">Parameters
</h4>
1591 <dd class=
"description">Connection to server
</dd>
1593 <h4 class=
"returnvalue">Return Value
</h4>
1594 <p class=
"description">0 = no data,
1 = data available
</p>
1595 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"httpClearCookie">httpClearCookie
</a></h3>
1596 <p class=
"description">Clear the cookie value(s).
</p>
1598 void httpClearCookie (
<br>
1599 <a href=
"#http_t">http_t
</a> *http
<br>
1601 <h4 class=
"parameters">Parameters
</h4>
1604 <dd class=
"description">Connection to server
</dd>
1606 <h3 class=
"function"><a name=
"httpClearFields">httpClearFields
</a></h3>
1607 <p class=
"description">Clear HTTP request fields.
</p>
1609 void httpClearFields (
<br>
1610 <a href=
"#http_t">http_t
</a> *http
<br>
1612 <h4 class=
"parameters">Parameters
</h4>
1615 <dd class=
"description">Connection to server
</dd>
1617 <h3 class=
"function"><a name=
"httpClose">httpClose
</a></h3>
1618 <p class=
"description">Close an HTTP connection.
</p>
1620 void httpClose (
<br>
1621 <a href=
"#http_t">http_t
</a> *http
<br>
1623 <h4 class=
"parameters">Parameters
</h4>
1626 <dd class=
"description">Connection to server
</dd>
1628 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpConnect">httpConnect
</a></h3>
1629 <p class=
"description">Connect to a HTTP server.
</p>
1631 <a href=
"#http_t">http_t
</a> *httpConnect (
<br>
1632 const char *host,
<br>
1633 int port
<br>
1635 <h4 class=
"parameters">Parameters
</h4>
1638 <dd class=
"description">Host to connect to
</dd>
1640 <dd class=
"description">Port number
</dd>
1642 <h4 class=
"returnvalue">Return Value
</h4>
1643 <p class=
"description">New HTTP connection
</p>
1644 <h4 class=
"discussion">Discussion
</h4>
1645 <p class=
"discussion">This function is deprecated - use
<a href=
"#httpConnectEncrypt"><code>httpConnectEncrypt
</code></a> instead.
1648 <h3 class=
"function"><a name=
"httpConnectEncrypt">httpConnectEncrypt
</a></h3>
1649 <p class=
"description">Connect to a HTTP server using encryption.
</p>
1651 <a href=
"#http_t">http_t
</a> *httpConnectEncrypt (
<br>
1652 const char *host,
<br>
1653 int port,
<br>
1654 <a href=
"#http_encryption_t">http_encryption_t
</a> encryption
<br>
1656 <h4 class=
"parameters">Parameters
</h4>
1659 <dd class=
"description">Host to connect to
</dd>
1661 <dd class=
"description">Port number
</dd>
1663 <dd class=
"description">Type of encryption to use
</dd>
1665 <h4 class=
"returnvalue">Return Value
</h4>
1666 <p class=
"description">New HTTP connection
</p>
1667 <h3 class=
"function"><span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span><a name=
"httpCopyCredentials">httpCopyCredentials
</a></h3>
1668 <p class=
"description">Copy the credentials associated with an encrypted
1671 int httpCopyCredentials (
<br>
1672 <a href=
"#http_t">http_t
</a> *http,
<br>
1673 cups_array_t **credentials
<br>
1675 <h4 class=
"parameters">Parameters
</h4>
1678 <dd class=
"description">Connection to server
</dd>
1679 <dt>credentials
</dt>
1680 <dd class=
"description">Array of credentials
</dd>
1682 <h4 class=
"returnvalue">Return Value
</h4>
1683 <p class=
"description">Status of call (
0 = success)
</p>
1684 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpDecode64">httpDecode64
</a></h3>
1685 <p class=
"description">Base64-decode a string.
</p>
1687 char *httpDecode64 (
<br>
1688 char *out,
<br>
1689 const char *in
<br>
1691 <h4 class=
"parameters">Parameters
</h4>
1694 <dd class=
"description">String to write to
</dd>
1696 <dd class=
"description">String to read from
</dd>
1698 <h4 class=
"returnvalue">Return Value
</h4>
1699 <p class=
"description">Decoded string
</p>
1700 <h4 class=
"discussion">Discussion
</h4>
1701 <p class=
"discussion">This function is deprecated. Use the httpDecode64_2() function instead
1702 which provides buffer length arguments.
1705 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/Mac OS X
10.4 </span><a name=
"httpDecode64_2">httpDecode64_2
</a></h3>
1706 <p class=
"description">Base64-decode a string.
</p>
1708 char *httpDecode64_2 (
<br>
1709 char *out,
<br>
1710 int *outlen,
<br>
1711 const char *in
<br>
1713 <h4 class=
"parameters">Parameters
</h4>
1716 <dd class=
"description">String to write to
</dd>
1718 <dd class=
"description">Size of output string
</dd>
1720 <dd class=
"description">String to read from
</dd>
1722 <h4 class=
"returnvalue">Return Value
</h4>
1723 <p class=
"description">Decoded string
</p>
1724 <h3 class=
"function"><a name=
"httpDelete">httpDelete
</a></h3>
1725 <p class=
"description">Send a DELETE request to the server.
</p>
1727 int httpDelete (
<br>
1728 <a href=
"#http_t">http_t
</a> *http,
<br>
1729 const char *uri
<br>
1731 <h4 class=
"parameters">Parameters
</h4>
1734 <dd class=
"description">Connection to server
</dd>
1736 <dd class=
"description">URI to delete
</dd>
1738 <h4 class=
"returnvalue">Return Value
</h4>
1739 <p class=
"description">Status of call (
0 = success)
</p>
1740 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpEncode64">httpEncode64
</a></h3>
1741 <p class=
"description">Base64-encode a string.
</p>
1743 char *httpEncode64 (
<br>
1744 char *out,
<br>
1745 const char *in
<br>
1747 <h4 class=
"parameters">Parameters
</h4>
1750 <dd class=
"description">String to write to
</dd>
1752 <dd class=
"description">String to read from
</dd>
1754 <h4 class=
"returnvalue">Return Value
</h4>
1755 <p class=
"description">Encoded string
</p>
1756 <h4 class=
"discussion">Discussion
</h4>
1757 <p class=
"discussion">This function is deprecated. Use the httpEncode64_2() function instead
1758 which provides buffer length arguments.
1761 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/Mac OS X
10.4 </span><a name=
"httpEncode64_2">httpEncode64_2
</a></h3>
1762 <p class=
"description">Base64-encode a string.
</p>
1764 char *httpEncode64_2 (
<br>
1765 char *out,
<br>
1766 int outlen,
<br>
1767 const char *in,
<br>
1768 int inlen
<br>
1770 <h4 class=
"parameters">Parameters
</h4>
1773 <dd class=
"description">String to write to
</dd>
1775 <dd class=
"description">Size of output string
</dd>
1777 <dd class=
"description">String to read from
</dd>
1779 <dd class=
"description">Size of input string
</dd>
1781 <h4 class=
"returnvalue">Return Value
</h4>
1782 <p class=
"description">Encoded string
</p>
1783 <h3 class=
"function"><a name=
"httpEncryption">httpEncryption
</a></h3>
1784 <p class=
"description">Set the required encryption on the link.
</p>
1786 int httpEncryption (
<br>
1787 <a href=
"#http_t">http_t
</a> *http,
<br>
1788 <a href=
"#http_encryption_t">http_encryption_t
</a> e
<br>
1790 <h4 class=
"parameters">Parameters
</h4>
1793 <dd class=
"description">Connection to server
</dd>
1795 <dd class=
"description">New encryption preference
</dd>
1797 <h4 class=
"returnvalue">Return Value
</h4>
1798 <p class=
"description">-
1 on error,
0 on success
</p>
1799 <h3 class=
"function"><a name=
"httpError">httpError
</a></h3>
1800 <p class=
"description">Get the last error on a connection.
</p>
1803 <a href=
"#http_t">http_t
</a> *http
<br>
1805 <h4 class=
"parameters">Parameters
</h4>
1808 <dd class=
"description">Connection to server
</dd>
1810 <h4 class=
"returnvalue">Return Value
</h4>
1811 <p class=
"description">Error code (errno) value
</p>
1812 <h3 class=
"function"><a name=
"httpFlush">httpFlush
</a></h3>
1813 <p class=
"description">Flush data from a HTTP connection.
</p>
1815 void httpFlush (
<br>
1816 <a href=
"#http_t">http_t
</a> *http
<br>
1818 <h4 class=
"parameters">Parameters
</h4>
1821 <dd class=
"description">Connection to server
</dd>
1823 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpFlushWrite">httpFlushWrite
</a></h3>
1824 <p class=
"description">Flush data in write buffer.
</p>
1826 int httpFlushWrite (
<br>
1827 <a href=
"#http_t">http_t
</a> *http
<br>
1829 <h4 class=
"parameters">Parameters
</h4>
1832 <dd class=
"description">Connection to server
</dd>
1834 <h4 class=
"returnvalue">Return Value
</h4>
1835 <p class=
"description">Bytes written or -
1 on error
</p>
1836 <h3 class=
"function"><a name=
"httpFreeCredentials">httpFreeCredentials
</a></h3>
1837 <p class=
"description">Free an array of credentials.
</p>
1839 void httpFreeCredentials (
<br>
1840 cups_array_t *credentials
<br>
1842 <h4 class=
"parameters">Parameters
</h4>
1844 <dt>credentials
</dt>
1845 <dd class=
"description">Array of credentials
</dd>
1847 <h3 class=
"function"><a name=
"httpGet">httpGet
</a></h3>
1848 <p class=
"description">Send a GET request to the server.
</p>
1851 <a href=
"#http_t">http_t
</a> *http,
<br>
1852 const char *uri
<br>
1854 <h4 class=
"parameters">Parameters
</h4>
1857 <dd class=
"description">Connection to server
</dd>
1859 <dd class=
"description">URI to get
</dd>
1861 <h4 class=
"returnvalue">Return Value
</h4>
1862 <p class=
"description">Status of call (
0 = success)
</p>
1863 <h3 class=
"function"><span class=
"info"> CUPS
1.3/Mac OS X
10.5 </span><a name=
"httpGetAuthString">httpGetAuthString
</a></h3>
1864 <p class=
"description">Get the current authorization string.
</p>
1866 char *httpGetAuthString (
<br>
1867 <a href=
"#http_t">http_t
</a> *http
<br>
1869 <h4 class=
"parameters">Parameters
</h4>
1872 <dd class=
"description">Connection to server
</dd>
1874 <h4 class=
"returnvalue">Return Value
</h4>
1875 <p class=
"description">Authorization string
</p>
1876 <h4 class=
"discussion">Discussion
</h4>
1877 <p class=
"discussion">The authorization string is set by cupsDoAuthentication() and
1878 httpSetAuthString(). Use httpGetAuthString() to retrieve the
1879 string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
1883 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetBlocking">httpGetBlocking
</a></h3>
1884 <p class=
"description">Get the blocking/non-block state of a connection.
</p>
1886 int httpGetBlocking (
<br>
1887 <a href=
"#http_t">http_t
</a> *http
<br>
1889 <h4 class=
"parameters">Parameters
</h4>
1892 <dd class=
"description">Connection to server
</dd>
1894 <h4 class=
"returnvalue">Return Value
</h4>
1895 <p class=
"description">1 if blocking,
0 if non-blocking
</p>
1896 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"httpGetCookie">httpGetCookie
</a></h3>
1897 <p class=
"description">Get any cookie data from the response.
</p>
1899 const char *httpGetCookie (
<br>
1900 <a href=
"#http_t">http_t
</a> *http
<br>
1902 <h4 class=
"parameters">Parameters
</h4>
1905 <dd class=
"description">HTTP connecion
</dd>
1907 <h4 class=
"returnvalue">Return Value
</h4>
1908 <p class=
"description">Cookie data or NULL
</p>
1909 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetDateString">httpGetDateString
</a></h3>
1910 <p class=
"description">Get a formatted date/time string from a time value.
</p>
1912 const char *httpGetDateString (
<br>
1913 time_t t
<br>
1915 <h4 class=
"parameters">Parameters
</h4>
1918 <dd class=
"description">UNIX time
</dd>
1920 <h4 class=
"returnvalue">Return Value
</h4>
1921 <p class=
"description">Date/time string
</p>
1922 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetDateString2">httpGetDateString2
</a></h3>
1923 <p class=
"description">Get a formatted date/time string from a time value.
</p>
1925 const char *httpGetDateString2 (
<br>
1926 time_t t,
<br>
1927 char *s,
<br>
1928 int slen
<br>
1930 <h4 class=
"parameters">Parameters
</h4>
1933 <dd class=
"description">UNIX time
</dd>
1935 <dd class=
"description">String buffer
</dd>
1937 <dd class=
"description">Size of string buffer
</dd>
1939 <h4 class=
"returnvalue">Return Value
</h4>
1940 <p class=
"description">Date/time string
</p>
1941 <h3 class=
"function"><a name=
"httpGetDateTime">httpGetDateTime
</a></h3>
1942 <p class=
"description">Get a time value from a formatted date/time string.
</p>
1944 time_t httpGetDateTime (
<br>
1945 const char *s
<br>
1947 <h4 class=
"parameters">Parameters
</h4>
1950 <dd class=
"description">Date/time string
</dd>
1952 <h4 class=
"returnvalue">Return Value
</h4>
1953 <p class=
"description">UNIX time
</p>
1954 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetFd">httpGetFd
</a></h3>
1955 <p class=
"description">Get the file descriptor associated with a connection.
</p>
1958 <a href=
"#http_t">http_t
</a> *http
<br>
1960 <h4 class=
"parameters">Parameters
</h4>
1963 <dd class=
"description">Connection to server
</dd>
1965 <h4 class=
"returnvalue">Return Value
</h4>
1966 <p class=
"description">File descriptor or -
1 if none
</p>
1967 <h3 class=
"function"><a name=
"httpGetField">httpGetField
</a></h3>
1968 <p class=
"description">Get a field value from a request/response.
</p>
1970 const char *httpGetField (
<br>
1971 <a href=
"#http_t">http_t
</a> *http,
<br>
1972 <a href=
"#http_field_t">http_field_t
</a> field
<br>
1974 <h4 class=
"parameters">Parameters
</h4>
1977 <dd class=
"description">Connection to server
</dd>
1979 <dd class=
"description">Field to get
</dd>
1981 <h4 class=
"returnvalue">Return Value
</h4>
1982 <p class=
"description">Field value
</p>
1983 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetHostByName">httpGetHostByName
</a></h3>
1984 <p class=
"description">Lookup a hostname or IPv4 address, and return
1985 address records for the specified name.
</p>
1987 struct hostent *httpGetHostByName (
<br>
1988 const char *name
<br>
1990 <h4 class=
"parameters">Parameters
</h4>
1993 <dd class=
"description">Hostname or IP address
</dd>
1995 <h4 class=
"returnvalue">Return Value
</h4>
1996 <p class=
"description">Host entry
</p>
1997 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetHostname">httpGetHostname
</a></h3>
1998 <p class=
"description">Get the FQDN for the connection or local system.
</p>
2000 const char *httpGetHostname (
<br>
2001 <a href=
"#http_t">http_t
</a> *http,
<br>
2002 char *s,
<br>
2003 int slen
<br>
2005 <h4 class=
"parameters">Parameters
</h4>
2008 <dd class=
"description">HTTP connection or NULL
</dd>
2010 <dd class=
"description">String buffer for name
</dd>
2012 <dd class=
"description">Size of buffer
</dd>
2014 <h4 class=
"returnvalue">Return Value
</h4>
2015 <p class=
"description">FQDN for connection or system
</p>
2016 <h4 class=
"discussion">Discussion
</h4>
2017 <p class=
"discussion">When
"http
" points to a connected socket, return the hostname or
2018 address that was used in the call to httpConnect() or httpConnectEncrypt().
2019 Otherwise, return the FQDN for the local system using both gethostname()
2020 and gethostbyname() to get the local hostname with domain.
2023 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetLength">httpGetLength
</a></h3>
2024 <p class=
"description">Get the amount of data remaining from the
2025 content-length or transfer-encoding fields.
</p>
2027 int httpGetLength (
<br>
2028 <a href=
"#http_t">http_t
</a> *http
<br>
2030 <h4 class=
"parameters">Parameters
</h4>
2033 <dd class=
"description">Connection to server
</dd>
2035 <h4 class=
"returnvalue">Return Value
</h4>
2036 <p class=
"description">Content length
</p>
2037 <h4 class=
"discussion">Discussion
</h4>
2038 <p class=
"discussion">This function is deprecated and will not return lengths larger than
2039 2^
31 -
1; use httpGetLength2() instead.
2042 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetLength2">httpGetLength2
</a></h3>
2043 <p class=
"description">Get the amount of data remaining from the
2044 content-length or transfer-encoding fields.
</p>
2046 off_t httpGetLength2 (
<br>
2047 <a href=
"#http_t">http_t
</a> *http
<br>
2049 <h4 class=
"parameters">Parameters
</h4>
2052 <dd class=
"description">Connection to server
</dd>
2054 <h4 class=
"returnvalue">Return Value
</h4>
2055 <p class=
"description">Content length
</p>
2056 <h4 class=
"discussion">Discussion
</h4>
2057 <p class=
"discussion">This function returns the complete content length, even for
2058 content larger than
2^
31 -
1.
2061 <h3 class=
"function"><a name=
"httpGetState">httpGetState
</a></h3>
2062 <p class=
"description">Get the current state of the HTTP request.
</p>
2064 <a href=
"#http_state_t">http_state_t
</a> httpGetState (
<br>
2065 <a href=
"#http_t">http_t
</a> *http
<br>
2067 <h4 class=
"parameters">Parameters
</h4>
2070 <dd class=
"description">Connection to server
</dd>
2072 <h4 class=
"returnvalue">Return Value
</h4>
2073 <p class=
"description">HTTP state
</p>
2074 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetStatus">httpGetStatus
</a></h3>
2075 <p class=
"description">Get the status of the last HTTP request.
</p>
2077 <a href=
"#http_status_t">http_status_t
</a> httpGetStatus (
<br>
2078 <a href=
"#http_t">http_t
</a> *http
<br>
2080 <h4 class=
"parameters">Parameters
</h4>
2083 <dd class=
"description">Connection to server
</dd>
2085 <h4 class=
"returnvalue">Return Value
</h4>
2086 <p class=
"description">HTTP status
</p>
2087 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetSubField">httpGetSubField
</a></h3>
2088 <p class=
"description">Get a sub-field value.
</p>
2090 char *httpGetSubField (
<br>
2091 <a href=
"#http_t">http_t
</a> *http,
<br>
2092 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
2093 const char *name,
<br>
2094 char *value
<br>
2096 <h4 class=
"parameters">Parameters
</h4>
2099 <dd class=
"description">Connection to server
</dd>
2101 <dd class=
"description">Field index
</dd>
2103 <dd class=
"description">Name of sub-field
</dd>
2105 <dd class=
"description">Value string
</dd>
2107 <h4 class=
"returnvalue">Return Value
</h4>
2108 <p class=
"description">Value or NULL
</p>
2109 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetSubField2">httpGetSubField2
</a></h3>
2110 <p class=
"description">Get a sub-field value.
</p>
2112 char *httpGetSubField2 (
<br>
2113 <a href=
"#http_t">http_t
</a> *http,
<br>
2114 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
2115 const char *name,
<br>
2116 char *value,
<br>
2117 int valuelen
<br>
2119 <h4 class=
"parameters">Parameters
</h4>
2122 <dd class=
"description">Connection to server
</dd>
2124 <dd class=
"description">Field index
</dd>
2126 <dd class=
"description">Name of sub-field
</dd>
2128 <dd class=
"description">Value string
</dd>
2130 <dd class=
"description">Size of value buffer
</dd>
2132 <h4 class=
"returnvalue">Return Value
</h4>
2133 <p class=
"description">Value or NULL
</p>
2134 <h3 class=
"function"><a name=
"httpGetVersion">httpGetVersion
</a></h3>
2135 <p class=
"description">Get the HTTP version at the other end.
</p>
2137 <a href=
"#http_version_t">http_version_t
</a> httpGetVersion (
<br>
2138 <a href=
"#http_t">http_t
</a> *http
<br>
2140 <h4 class=
"parameters">Parameters
</h4>
2143 <dd class=
"description">Connection to server
</dd>
2145 <h4 class=
"returnvalue">Return Value
</h4>
2146 <p class=
"description">Version number
</p>
2147 <h3 class=
"function"><a name=
"httpGets">httpGets
</a></h3>
2148 <p class=
"description">Get a line of text from a HTTP connection.
</p>
2150 char *httpGets (
<br>
2151 char *line,
<br>
2152 int length,
<br>
2153 <a href=
"#http_t">http_t
</a> *http
<br>
2155 <h4 class=
"parameters">Parameters
</h4>
2158 <dd class=
"description">Line to read into
</dd>
2160 <dd class=
"description">Max length of buffer
</dd>
2162 <dd class=
"description">Connection to server
</dd>
2164 <h4 class=
"returnvalue">Return Value
</h4>
2165 <p class=
"description">Line or NULL
</p>
2166 <h3 class=
"function"><a name=
"httpHead">httpHead
</a></h3>
2167 <p class=
"description">Send a HEAD request to the server.
</p>
2170 <a href=
"#http_t">http_t
</a> *http,
<br>
2171 const char *uri
<br>
2173 <h4 class=
"parameters">Parameters
</h4>
2176 <dd class=
"description">Connection to server
</dd>
2178 <dd class=
"description">URI for head
</dd>
2180 <h4 class=
"returnvalue">Return Value
</h4>
2181 <p class=
"description">Status of call (
0 = success)
</p>
2182 <h3 class=
"function"><a name=
"httpInitialize">httpInitialize
</a></h3>
2183 <p class=
"description">Initialize the HTTP interface library and set the
2184 default HTTP proxy (if any).
</p>
2186 void httpInitialize (void);
</p>
2187 <h3 class=
"function"><a name=
"httpMD5">httpMD5
</a></h3>
2188 <p class=
"description">Compute the MD5 sum of the username:group:password.
</p>
2191 const char *username,
<br>
2192 const char *realm,
<br>
2193 const char *passwd,
<br>
2194 char md5[
33]
<br>
2196 <h4 class=
"parameters">Parameters
</h4>
2199 <dd class=
"description">User name
</dd>
2201 <dd class=
"description">Realm name
</dd>
2203 <dd class=
"description">Password string
</dd>
2205 <dd class=
"description">MD5 string
</dd>
2207 <h4 class=
"returnvalue">Return Value
</h4>
2208 <p class=
"description">MD5 sum
</p>
2209 <h3 class=
"function"><a name=
"httpMD5Final">httpMD5Final
</a></h3>
2210 <p class=
"description">Combine the MD5 sum of the username, group, and password
2211 with the server-supplied nonce value, method, and
2214 char *httpMD5Final (
<br>
2215 const char *nonce,
<br>
2216 const char *method,
<br>
2217 const char *resource,
<br>
2218 char md5[
33]
<br>
2220 <h4 class=
"parameters">Parameters
</h4>
2223 <dd class=
"description">Server nonce value
</dd>
2225 <dd class=
"description">METHOD (GET, POST, etc.)
</dd>
2227 <dd class=
"description">Resource path
</dd>
2229 <dd class=
"description">MD5 sum
</dd>
2231 <h4 class=
"returnvalue">Return Value
</h4>
2232 <p class=
"description">New sum
</p>
2233 <h3 class=
"function"><a name=
"httpMD5String">httpMD5String
</a></h3>
2234 <p class=
"description">Convert an MD5 sum to a character string.
</p>
2236 char *httpMD5String (
<br>
2237 const unsigned char *sum,
<br>
2238 char md5[
33]
<br>
2240 <h4 class=
"parameters">Parameters
</h4>
2243 <dd class=
"description">MD5 sum data
</dd>
2245 <dd class=
"description">MD5 sum in hex
</dd>
2247 <h4 class=
"returnvalue">Return Value
</h4>
2248 <p class=
"description">MD5 sum in hex
</p>
2249 <h3 class=
"function"><a name=
"httpOptions">httpOptions
</a></h3>
2250 <p class=
"description">Send an OPTIONS request to the server.
</p>
2252 int httpOptions (
<br>
2253 <a href=
"#http_t">http_t
</a> *http,
<br>
2254 const char *uri
<br>
2256 <h4 class=
"parameters">Parameters
</h4>
2259 <dd class=
"description">Connection to server
</dd>
2261 <dd class=
"description">URI for options
</dd>
2263 <h4 class=
"returnvalue">Return Value
</h4>
2264 <p class=
"description">Status of call (
0 = success)
</p>
2265 <h3 class=
"function"><a name=
"httpPost">httpPost
</a></h3>
2266 <p class=
"description">Send a POST request to the server.
</p>
2269 <a href=
"#http_t">http_t
</a> *http,
<br>
2270 const char *uri
<br>
2272 <h4 class=
"parameters">Parameters
</h4>
2275 <dd class=
"description">Connection to server
</dd>
2277 <dd class=
"description">URI for post
</dd>
2279 <h4 class=
"returnvalue">Return Value
</h4>
2280 <p class=
"description">Status of call (
0 = success)
</p>
2281 <h3 class=
"function"><a name=
"httpPut">httpPut
</a></h3>
2282 <p class=
"description">Send a PUT request to the server.
</p>
2285 <a href=
"#http_t">http_t
</a> *http,
<br>
2286 const char *uri
<br>
2288 <h4 class=
"parameters">Parameters
</h4>
2291 <dd class=
"description">Connection to server
</dd>
2293 <dd class=
"description">URI to put
</dd>
2295 <h4 class=
"returnvalue">Return Value
</h4>
2296 <p class=
"description">Status of call (
0 = success)
</p>
2297 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpRead">httpRead
</a></h3>
2298 <p class=
"description">Read data from a HTTP connection.
</p>
2301 <a href=
"#http_t">http_t
</a> *http,
<br>
2302 char *buffer,
<br>
2303 int length
<br>
2305 <h4 class=
"parameters">Parameters
</h4>
2308 <dd class=
"description">Connection to server
</dd>
2310 <dd class=
"description">Buffer for data
</dd>
2312 <dd class=
"description">Maximum number of bytes
</dd>
2314 <h4 class=
"returnvalue">Return Value
</h4>
2315 <p class=
"description">Number of bytes read
</p>
2316 <h4 class=
"discussion">Discussion
</h4>
2317 <p class=
"discussion">This function is deprecated. Use the httpRead2() function which can
2318 read more than
2GB of data.
2321 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpRead2">httpRead2
</a></h3>
2322 <p class=
"description">Read data from a HTTP connection.
</p>
2324 ssize_t httpRead2 (
<br>
2325 <a href=
"#http_t">http_t
</a> *http,
<br>
2326 char *buffer,
<br>
2327 size_t length
<br>
2329 <h4 class=
"parameters">Parameters
</h4>
2332 <dd class=
"description">Connection to server
</dd>
2334 <dd class=
"description">Buffer for data
</dd>
2336 <dd class=
"description">Maximum number of bytes
</dd>
2338 <h4 class=
"returnvalue">Return Value
</h4>
2339 <p class=
"description">Number of bytes read
</p>
2340 <h3 class=
"function"><a name=
"httpReconnect">httpReconnect
</a></h3>
2341 <p class=
"description">Reconnect to a HTTP server.
</p>
2343 int httpReconnect (
<br>
2344 <a href=
"#http_t">http_t
</a> *http
<br>
2346 <h4 class=
"parameters">Parameters
</h4>
2349 <dd class=
"description">Connection to server
</dd>
2351 <h4 class=
"returnvalue">Return Value
</h4>
2352 <p class=
"description">0 on success, non-zero on failure
</p>
2353 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpSeparate">httpSeparate
</a></h3>
2354 <p class=
"description">Separate a Universal Resource Identifier into its
2357 void httpSeparate (
<br>
2358 const char *uri,
<br>
2359 char *scheme,
<br>
2360 char *username,
<br>
2361 char *host,
<br>
2362 int *port,
<br>
2363 char *resource
<br>
2365 <h4 class=
"parameters">Parameters
</h4>
2368 <dd class=
"description">Universal Resource Identifier
</dd>
2370 <dd class=
"description">Scheme [
32] (http, https, etc.)
</dd>
2372 <dd class=
"description">Username [
1024]
</dd>
2374 <dd class=
"description">Hostname [
1024]
</dd>
2376 <dd class=
"description">Port number to use
</dd>
2378 <dd class=
"description">Resource/filename [
1024]
</dd>
2380 <h4 class=
"discussion">Discussion
</h4>
2381 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
2384 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/Mac OS X
10.4 </span><a name=
"httpSeparate2">httpSeparate2
</a></h3>
2385 <p class=
"description">Separate a Universal Resource Identifier into its
2388 void httpSeparate2 (
<br>
2389 const char *uri,
<br>
2390 char *scheme,
<br>
2391 int schemelen,
<br>
2392 char *username,
<br>
2393 int usernamelen,
<br>
2394 char *host,
<br>
2395 int hostlen,
<br>
2396 int *port,
<br>
2397 char *resource,
<br>
2398 int resourcelen
<br>
2400 <h4 class=
"parameters">Parameters
</h4>
2403 <dd class=
"description">Universal Resource Identifier
</dd>
2405 <dd class=
"description">Scheme (http, https, etc.)
</dd>
2407 <dd class=
"description">Size of scheme buffer
</dd>
2409 <dd class=
"description">Username
</dd>
2410 <dt>usernamelen
</dt>
2411 <dd class=
"description">Size of username buffer
</dd>
2413 <dd class=
"description">Hostname
</dd>
2415 <dd class=
"description">Size of hostname buffer
</dd>
2417 <dd class=
"description">Port number to use
</dd>
2419 <dd class=
"description">Resource/filename
</dd>
2420 <dt>resourcelen
</dt>
2421 <dd class=
"description">Size of resource buffer
</dd>
2423 <h4 class=
"discussion">Discussion
</h4>
2424 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
2428 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpSeparateURI">httpSeparateURI
</a></h3>
2429 <p class=
"description">Separate a Universal Resource Identifier into its
2432 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpSeparateURI (
<br>
2433 <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> decoding,
<br>
2434 const char *uri,
<br>
2435 char *scheme,
<br>
2436 int schemelen,
<br>
2437 char *username,
<br>
2438 int usernamelen,
<br>
2439 char *host,
<br>
2440 int hostlen,
<br>
2441 int *port,
<br>
2442 char *resource,
<br>
2443 int resourcelen
<br>
2445 <h4 class=
"parameters">Parameters
</h4>
2448 <dd class=
"description">Decoding flags
</dd>
2450 <dd class=
"description">Universal Resource Identifier
</dd>
2452 <dd class=
"description">Scheme (http, https, etc.)
</dd>
2454 <dd class=
"description">Size of scheme buffer
</dd>
2456 <dd class=
"description">Username
</dd>
2457 <dt>usernamelen
</dt>
2458 <dd class=
"description">Size of username buffer
</dd>
2460 <dd class=
"description">Hostname
</dd>
2462 <dd class=
"description">Size of hostname buffer
</dd>
2464 <dd class=
"description">Port number to use
</dd>
2466 <dd class=
"description">Resource/filename
</dd>
2467 <dt>resourcelen
</dt>
2468 <dd class=
"description">Size of resource buffer
</dd>
2470 <h4 class=
"returnvalue">Return Value
</h4>
2471 <p class=
"description">Result of separation
</p>
2472 <h3 class=
"function"><span class=
"info"> CUPS
1.3/Mac OS X
10.5 </span><a name=
"httpSetAuthString">httpSetAuthString
</a></h3>
2473 <p class=
"description">Set the current authorization string.
</p>
2475 void httpSetAuthString (
<br>
2476 <a href=
"#http_t">http_t
</a> *http,
<br>
2477 const char *scheme,
<br>
2478 const char *data
<br>
2480 <h4 class=
"parameters">Parameters
</h4>
2483 <dd class=
"description">Connection to server
</dd>
2485 <dd class=
"description">Auth scheme (NULL to clear it)
</dd>
2487 <dd class=
"description">Auth data (NULL for none)
</dd>
2489 <h4 class=
"discussion">Discussion
</h4>
2490 <p class=
"discussion">This function just stores a copy of the current authorization string in
2491 the HTTP connection object. You must still call httpSetField() to set
2492 HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
2493 httpHead(), httpOptions(), httpPost, or httpPut().
2496 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"httpSetCookie">httpSetCookie
</a></h3>
2497 <p class=
"description">Set the cookie value(s).
</p>
2499 void httpSetCookie (
<br>
2500 <a href=
"#http_t">http_t
</a> *http,
<br>
2501 const char *cookie
<br>
2503 <h4 class=
"parameters">Parameters
</h4>
2506 <dd class=
"description">Connection
</dd>
2508 <dd class=
"description">Cookie string
</dd>
2510 <h3 class=
"function"><span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span><a name=
"httpSetCredentials">httpSetCredentials
</a></h3>
2511 <p class=
"description">Set the credentials associated with an encrypted
2514 int httpSetCredentials (
<br>
2515 <a href=
"#http_t">http_t
</a> *http,
<br>
2516 cups_array_t *credentials
<br>
2518 <h4 class=
"parameters">Parameters
</h4>
2521 <dd class=
"description">Connection to server
</dd>
2522 <dt>credentials
</dt>
2523 <dd class=
"description">Array of credentials
</dd>
2525 <h4 class=
"returnvalue">Return Value
</h4>
2526 <p class=
"description">Status of call (
0 = success)
</p>
2527 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpSetExpect">httpSetExpect
</a></h3>
2528 <p class=
"description">Set the Expect: header in a request.
</p>
2530 void httpSetExpect (
<br>
2531 <a href=
"#http_t">http_t
</a> *http,
<br>
2532 <a href=
"#http_status_t">http_status_t
</a> expect
<br>
2534 <h4 class=
"parameters">Parameters
</h4>
2537 <dd class=
"description">Connection to server
</dd>
2539 <dd class=
"description">HTTP status to expect (HTTP_CONTINUE)
</dd>
2541 <h4 class=
"discussion">Discussion
</h4>
2542 <p class=
"discussion">Currently only HTTP_CONTINUE is supported for the
"expect
" argument.
2545 <h3 class=
"function"><a name=
"httpSetField">httpSetField
</a></h3>
2546 <p class=
"description">Set the value of an HTTP header.
</p>
2548 void httpSetField (
<br>
2549 <a href=
"#http_t">http_t
</a> *http,
<br>
2550 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
2551 const char *value
<br>
2553 <h4 class=
"parameters">Parameters
</h4>
2556 <dd class=
"description">Connection to server
</dd>
2558 <dd class=
"description">Field index
</dd>
2560 <dd class=
"description">Value
</dd>
2562 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpSetLength">httpSetLength
</a></h3>
2563 <p class=
"description">Set the content-length and content-encoding.
</p>
2565 void httpSetLength (
<br>
2566 <a href=
"#http_t">http_t
</a> *http,
<br>
2567 size_t length
<br>
2569 <h4 class=
"parameters">Parameters
</h4>
2572 <dd class=
"description">Connection to server
</dd>
2574 <dd class=
"description">Length (
0 for chunked)
</dd>
2576 <h3 class=
"function"><span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span><a name=
"httpSetTimeout">httpSetTimeout
</a></h3>
2577 <p class=
"description">Set read/write timeouts and an optional callback.
</p>
2579 void httpSetTimeout (
<br>
2580 <a href=
"#http_t">http_t
</a> *http,
<br>
2581 double timeout,
<br>
2582 <a href=
"#http_timeout_cb_t">http_timeout_cb_t
</a> cb,
<br>
2583 void *user_data
<br>
2585 <h4 class=
"parameters">Parameters
</h4>
2588 <dd class=
"description">Connection to server
</dd>
2590 <dd class=
"description">Number of seconds for timeout,
2591 must be greater than
0</dd>
2593 <dd class=
"description">Callback function or NULL
</dd>
2595 <dd class=
"description">User data pointer
</dd>
2597 <h4 class=
"discussion">Discussion
</h4>
2598 <p class=
"discussion">The optional timeout callback receives both the HTTP connection and a user
2599 data pointer and must return
1 to continue or
0 to error (time) out.
2602 <h3 class=
"function"><a name=
"httpStatus">httpStatus
</a></h3>
2603 <p class=
"description">Return a short string describing a HTTP status code.
</p>
2605 const char *httpStatus (
<br>
2606 <a href=
"#http_status_t">http_status_t
</a> status
<br>
2608 <h4 class=
"parameters">Parameters
</h4>
2611 <dd class=
"description">HTTP status code
</dd>
2613 <h4 class=
"returnvalue">Return Value
</h4>
2614 <p class=
"description">Localized status string
</p>
2615 <h4 class=
"discussion">Discussion
</h4>
2616 <p class=
"discussion">The returned string is localized to the current POSIX locale and is based
2617 on the status strings defined in RFC
2616.
</p>
2618 <h3 class=
"function"><a name=
"httpTrace">httpTrace
</a></h3>
2619 <p class=
"description">Send an TRACE request to the server.
</p>
2622 <a href=
"#http_t">http_t
</a> *http,
<br>
2623 const char *uri
<br>
2625 <h4 class=
"parameters">Parameters
</h4>
2628 <dd class=
"description">Connection to server
</dd>
2630 <dd class=
"description">URI for trace
</dd>
2632 <h4 class=
"returnvalue">Return Value
</h4>
2633 <p class=
"description">Status of call (
0 = success)
</p>
2634 <h3 class=
"function"><a name=
"httpUpdate">httpUpdate
</a></h3>
2635 <p class=
"description">Update the current HTTP state for incoming data.
</p>
2637 <a href=
"#http_status_t">http_status_t
</a> httpUpdate (
<br>
2638 <a href=
"#http_t">http_t
</a> *http
<br>
2640 <h4 class=
"parameters">Parameters
</h4>
2643 <dd class=
"description">Connection to server
</dd>
2645 <h4 class=
"returnvalue">Return Value
</h4>
2646 <p class=
"description">HTTP status
</p>
2647 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"httpWait">httpWait
</a></h3>
2648 <p class=
"description">Wait for data available on a connection.
</p>
2651 <a href=
"#http_t">http_t
</a> *http,
<br>
2652 int msec
<br>
2654 <h4 class=
"parameters">Parameters
</h4>
2657 <dd class=
"description">Connection to server
</dd>
2659 <dd class=
"description">Milliseconds to wait
</dd>
2661 <h4 class=
"returnvalue">Return Value
</h4>
2662 <p class=
"description">1 if data is available,
0 otherwise
</p>
2663 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpWrite">httpWrite
</a></h3>
2664 <p class=
"description">Write data to a HTTP connection.
</p>
2667 <a href=
"#http_t">http_t
</a> *http,
<br>
2668 const char *buffer,
<br>
2669 int length
<br>
2671 <h4 class=
"parameters">Parameters
</h4>
2674 <dd class=
"description">Connection to server
</dd>
2676 <dd class=
"description">Buffer for data
</dd>
2678 <dd class=
"description">Number of bytes to write
</dd>
2680 <h4 class=
"returnvalue">Return Value
</h4>
2681 <p class=
"description">Number of bytes written
</p>
2682 <h4 class=
"discussion">Discussion
</h4>
2683 <p class=
"discussion">This function is deprecated. Use the httpWrite2() function which can
2684 write more than
2GB of data.
2687 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpWrite2">httpWrite2
</a></h3>
2688 <p class=
"description">Write data to a HTTP connection.
</p>
2690 ssize_t httpWrite2 (
<br>
2691 <a href=
"#http_t">http_t
</a> *http,
<br>
2692 const char *buffer,
<br>
2693 size_t length
<br>
2695 <h4 class=
"parameters">Parameters
</h4>
2698 <dd class=
"description">Connection to server
</dd>
2700 <dd class=
"description">Buffer for data
</dd>
2702 <dd class=
"description">Number of bytes to write
</dd>
2704 <h4 class=
"returnvalue">Return Value
</h4>
2705 <p class=
"description">Number of bytes written
</p>
2706 <h3 class=
"function"><a name=
"ippAddBoolean">ippAddBoolean
</a></h3>
2707 <p class=
"description">Add a boolean attribute to an IPP message.
</p>
2709 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBoolean (
<br>
2710 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2711 ipp_tag_t group,
<br>
2712 const char *name,
<br>
2713 char value
<br>
2715 <h4 class=
"parameters">Parameters
</h4>
2718 <dd class=
"description">IPP message
</dd>
2720 <dd class=
"description">IPP group
</dd>
2722 <dd class=
"description">Name of attribute
</dd>
2724 <dd class=
"description">Value of attribute
</dd>
2726 <h4 class=
"returnvalue">Return Value
</h4>
2727 <p class=
"description">New attribute
</p>
2728 <h4 class=
"discussion">Discussion
</h4>
2729 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2730 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2732 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2733 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2734 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2735 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2736 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
2737 <h3 class=
"function"><a name=
"ippAddBooleans">ippAddBooleans
</a></h3>
2738 <p class=
"description">Add an array of boolean values.
</p>
2740 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBooleans (
<br>
2741 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2742 ipp_tag_t group,
<br>
2743 const char *name,
<br>
2744 int num_values,
<br>
2745 const char *values
<br>
2747 <h4 class=
"parameters">Parameters
</h4>
2750 <dd class=
"description">IPP message
</dd>
2752 <dd class=
"description">IPP group
</dd>
2754 <dd class=
"description">Name of attribute
</dd>
2756 <dd class=
"description">Number of values
</dd>
2758 <dd class=
"description">Values
</dd>
2760 <h4 class=
"returnvalue">Return Value
</h4>
2761 <p class=
"description">New attribute
</p>
2762 <h4 class=
"discussion">Discussion
</h4>
2763 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2764 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2766 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2767 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2768 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2769 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2770 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
2771 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"ippAddCollection">ippAddCollection
</a></h3>
2772 <p class=
"description">Add a collection value.
</p>
2774 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollection (
<br>
2775 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2776 ipp_tag_t group,
<br>
2777 const char *name,
<br>
2778 <a href=
"#ipp_t">ipp_t
</a> *value
<br>
2780 <h4 class=
"parameters">Parameters
</h4>
2783 <dd class=
"description">IPP message
</dd>
2785 <dd class=
"description">IPP group
</dd>
2787 <dd class=
"description">Name of attribute
</dd>
2789 <dd class=
"description">Value
</dd>
2791 <h4 class=
"returnvalue">Return Value
</h4>
2792 <p class=
"description">New attribute
</p>
2793 <h4 class=
"discussion">Discussion
</h4>
2794 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2795 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2797 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2798 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2799 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2800 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2801 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
2804 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"ippAddCollections">ippAddCollections
</a></h3>
2805 <p class=
"description">Add an array of collection values.
</p>
2807 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollections (
<br>
2808 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2809 ipp_tag_t group,
<br>
2810 const char *name,
<br>
2811 int num_values,
<br>
2812 const
<a href=
"#ipp_t">ipp_t
</a> **values
<br>
2814 <h4 class=
"parameters">Parameters
</h4>
2817 <dd class=
"description">IPP message
</dd>
2819 <dd class=
"description">IPP group
</dd>
2821 <dd class=
"description">Name of attribute
</dd>
2823 <dd class=
"description">Number of values
</dd>
2825 <dd class=
"description">Values
</dd>
2827 <h4 class=
"returnvalue">Return Value
</h4>
2828 <p class=
"description">New attribute
</p>
2829 <h4 class=
"discussion">Discussion
</h4>
2830 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2831 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2833 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2834 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2835 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2836 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2837 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
2840 <h3 class=
"function"><a name=
"ippAddDate">ippAddDate
</a></h3>
2841 <p class=
"description">Add a date attribute to an IPP message.
</p>
2843 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddDate (
<br>
2844 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2845 ipp_tag_t group,
<br>
2846 const char *name,
<br>
2847 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *value
<br>
2849 <h4 class=
"parameters">Parameters
</h4>
2852 <dd class=
"description">IPP message
</dd>
2854 <dd class=
"description">IPP group
</dd>
2856 <dd class=
"description">Name of attribute
</dd>
2858 <dd class=
"description">Value
</dd>
2860 <h4 class=
"returnvalue">Return Value
</h4>
2861 <p class=
"description">New attribute
</p>
2862 <h4 class=
"discussion">Discussion
</h4>
2863 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2864 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2866 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2867 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2868 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2869 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2870 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
2871 <h3 class=
"function"><a name=
"ippAddInteger">ippAddInteger
</a></h3>
2872 <p class=
"description">Add a integer attribute to an IPP message.
</p>
2874 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddInteger (
<br>
2875 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2876 ipp_tag_t group,
<br>
2877 ipp_tag_t value_tag,
<br>
2878 const char *name,
<br>
2879 int value
<br>
2881 <h4 class=
"parameters">Parameters
</h4>
2884 <dd class=
"description">IPP message
</dd>
2886 <dd class=
"description">IPP group
</dd>
2888 <dd class=
"description">Type of attribute
</dd>
2890 <dd class=
"description">Name of attribute
</dd>
2892 <dd class=
"description">Value of attribute
</dd>
2894 <h4 class=
"returnvalue">Return Value
</h4>
2895 <p class=
"description">New attribute
</p>
2896 <h4 class=
"discussion">Discussion
</h4>
2897 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2898 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2900 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2901 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2902 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2903 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2904 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
2906 Supported values include enum (
<code>IPP_TAG_ENUM
</code>) and integer
2907 (
<code>IPP_TAG_INTEGER
</code>).
</p>
2908 <h3 class=
"function"><a name=
"ippAddIntegers">ippAddIntegers
</a></h3>
2909 <p class=
"description">Add an array of integer values.
</p>
2911 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddIntegers (
<br>
2912 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2913 ipp_tag_t group,
<br>
2914 ipp_tag_t value_tag,
<br>
2915 const char *name,
<br>
2916 int num_values,
<br>
2917 const int *values
<br>
2919 <h4 class=
"parameters">Parameters
</h4>
2922 <dd class=
"description">IPP message
</dd>
2924 <dd class=
"description">IPP group
</dd>
2926 <dd class=
"description">Type of attribute
</dd>
2928 <dd class=
"description">Name of attribute
</dd>
2930 <dd class=
"description">Number of values
</dd>
2932 <dd class=
"description">Values
</dd>
2934 <h4 class=
"returnvalue">Return Value
</h4>
2935 <p class=
"description">New attribute
</p>
2936 <h4 class=
"discussion">Discussion
</h4>
2937 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2938 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2940 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2941 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2942 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2943 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2944 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
2946 Supported values include enum (
<code>IPP_TAG_ENUM
</code>) and integer
2947 (
<code>IPP_TAG_INTEGER
</code>).
</p>
2948 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippAddOctetString">ippAddOctetString
</a></h3>
2949 <p class=
"description">Add an octetString value to an IPP message.
</p>
2951 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddOctetString (
<br>
2952 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2953 ipp_tag_t group,
<br>
2954 const char *name,
<br>
2955 const void *data,
<br>
2956 int datalen
<br>
2958 <h4 class=
"parameters">Parameters
</h4>
2961 <dd class=
"description">IPP message
</dd>
2963 <dd class=
"description">IPP group
</dd>
2965 <dd class=
"description">Name of attribute
</dd>
2967 <dd class=
"description">octetString data
</dd>
2969 <dd class=
"description">Length of data in bytes
</dd>
2971 <h4 class=
"returnvalue">Return Value
</h4>
2972 <p class=
"description">New attribute
</p>
2973 <h4 class=
"discussion">Discussion
</h4>
2974 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2975 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2977 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2978 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2979 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2980 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2981 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
2984 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippAddOutOfBand">ippAddOutOfBand
</a></h3>
2985 <p class=
"description">Add an out-of-band value to an IPP message.
</p>
2987 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddOutOfBand (
<br>
2988 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2989 ipp_tag_t group,
<br>
2990 ipp_tag_t value_tag,
<br>
2991 const char *name
<br>
2993 <h4 class=
"parameters">Parameters
</h4>
2996 <dd class=
"description">IPP message
</dd>
2998 <dd class=
"description">IPP group
</dd>
3000 <dd class=
"description">Type of attribute
</dd>
3002 <dd class=
"description">Name of attribute
</dd>
3004 <h4 class=
"returnvalue">Return Value
</h4>
3005 <p class=
"description">New attribute
</p>
3006 <h4 class=
"discussion">Discussion
</h4>
3007 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3008 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3010 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3011 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3012 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3013 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3014 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3016 Supported out-of-band values include unsupported-value
3017 (
<code>IPP_TAG_UNSUPPORTED_VALUE
</code>), default (
<code>IPP_TAG_DEFAULT
</code>), unknown
3018 (
<code>IPP_TAG_UNKNOWN
</code>), no-value (
<code>IPP_TAG_NOVALUE
</code>), not-settable
3019 (
<code>IPP_TAG_NOTSETTABLE
</code>), delete-attribute (
<code>IPP_TAG_DELETEATTR
</code>), and
3020 admin-define (
<code>IPP_TAG_ADMINDEFINE
</code>).
3023 <h3 class=
"function"><a name=
"ippAddRange">ippAddRange
</a></h3>
3024 <p class=
"description">Add a range of values to an IPP message.
</p>
3026 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRange (
<br>
3027 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3028 ipp_tag_t group,
<br>
3029 const char *name,
<br>
3030 int lower,
<br>
3031 int upper
<br>
3033 <h4 class=
"parameters">Parameters
</h4>
3036 <dd class=
"description">IPP message
</dd>
3038 <dd class=
"description">IPP group
</dd>
3040 <dd class=
"description">Name of attribute
</dd>
3042 <dd class=
"description">Lower value
</dd>
3044 <dd class=
"description">Upper value
</dd>
3046 <h4 class=
"returnvalue">Return Value
</h4>
3047 <p class=
"description">New attribute
</p>
3048 <h4 class=
"discussion">Discussion
</h4>
3049 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3050 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3052 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3053 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3054 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3055 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3056 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3058 The
<code>lower
</code> parameter must be less than or equal to the
<code>upper
</code> parameter.
</p>
3059 <h3 class=
"function"><a name=
"ippAddRanges">ippAddRanges
</a></h3>
3060 <p class=
"description">Add ranges of values to an IPP message.
</p>
3062 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRanges (
<br>
3063 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3064 ipp_tag_t group,
<br>
3065 const char *name,
<br>
3066 int num_values,
<br>
3067 const int *lower,
<br>
3068 const int *upper
<br>
3070 <h4 class=
"parameters">Parameters
</h4>
3073 <dd class=
"description">IPP message
</dd>
3075 <dd class=
"description">IPP group
</dd>
3077 <dd class=
"description">Name of attribute
</dd>
3079 <dd class=
"description">Number of values
</dd>
3081 <dd class=
"description">Lower values
</dd>
3083 <dd class=
"description">Upper values
</dd>
3085 <h4 class=
"returnvalue">Return Value
</h4>
3086 <p class=
"description">New attribute
</p>
3087 <h4 class=
"discussion">Discussion
</h4>
3088 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3089 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3091 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3092 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3093 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3094 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3095 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3096 <h3 class=
"function"><a name=
"ippAddResolution">ippAddResolution
</a></h3>
3097 <p class=
"description">Add a resolution value to an IPP message.
</p>
3099 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolution (
<br>
3100 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3101 ipp_tag_t group,
<br>
3102 const char *name,
<br>
3103 <a href=
"#ipp_res_t">ipp_res_t
</a> units,
<br>
3104 int xres,
<br>
3105 int yres
<br>
3107 <h4 class=
"parameters">Parameters
</h4>
3110 <dd class=
"description">IPP message
</dd>
3112 <dd class=
"description">IPP group
</dd>
3114 <dd class=
"description">Name of attribute
</dd>
3116 <dd class=
"description">Units for resolution
</dd>
3118 <dd class=
"description">X resolution
</dd>
3120 <dd class=
"description">Y resolution
</dd>
3122 <h4 class=
"returnvalue">Return Value
</h4>
3123 <p class=
"description">New attribute
</p>
3124 <h4 class=
"discussion">Discussion
</h4>
3125 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3126 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3128 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3129 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3130 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3131 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3132 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3133 <h3 class=
"function"><a name=
"ippAddResolutions">ippAddResolutions
</a></h3>
3134 <p class=
"description">Add resolution values to an IPP message.
</p>
3136 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolutions (
<br>
3137 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3138 ipp_tag_t group,
<br>
3139 const char *name,
<br>
3140 int num_values,
<br>
3141 <a href=
"#ipp_res_t">ipp_res_t
</a> units,
<br>
3142 const int *xres,
<br>
3143 const int *yres
<br>
3145 <h4 class=
"parameters">Parameters
</h4>
3148 <dd class=
"description">IPP message
</dd>
3150 <dd class=
"description">IPP group
</dd>
3152 <dd class=
"description">Name of attribute
</dd>
3154 <dd class=
"description">Number of values
</dd>
3156 <dd class=
"description">Units for resolution
</dd>
3158 <dd class=
"description">X resolutions
</dd>
3160 <dd class=
"description">Y resolutions
</dd>
3162 <h4 class=
"returnvalue">Return Value
</h4>
3163 <p class=
"description">New attribute
</p>
3164 <h4 class=
"discussion">Discussion
</h4>
3165 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3166 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3168 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3169 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3170 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3171 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3172 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3173 <h3 class=
"function"><a name=
"ippAddSeparator">ippAddSeparator
</a></h3>
3174 <p class=
"description">Add a group separator to an IPP message.
</p>
3176 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddSeparator (
<br>
3177 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3179 <h4 class=
"parameters">Parameters
</h4>
3182 <dd class=
"description">IPP message
</dd>
3184 <h4 class=
"returnvalue">Return Value
</h4>
3185 <p class=
"description">New attribute
</p>
3186 <h4 class=
"discussion">Discussion
</h4>
3187 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3188 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
</p>
3189 <h3 class=
"function"><a name=
"ippAddString">ippAddString
</a></h3>
3190 <p class=
"description">Add a language-encoded string to an IPP message.
</p>
3192 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddString (
<br>
3193 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3194 ipp_tag_t group,
<br>
3195 ipp_tag_t value_tag,
<br>
3196 const char *name,
<br>
3197 const char *language,
<br>
3198 const char *value
<br>
3200 <h4 class=
"parameters">Parameters
</h4>
3203 <dd class=
"description">IPP message
</dd>
3205 <dd class=
"description">IPP group
</dd>
3207 <dd class=
"description">Type of attribute
</dd>
3209 <dd class=
"description">Name of attribute
</dd>
3211 <dd class=
"description">Language code
</dd>
3213 <dd class=
"description">Value
</dd>
3215 <h4 class=
"returnvalue">Return Value
</h4>
3216 <p class=
"description">New attribute
</p>
3217 <h4 class=
"discussion">Discussion
</h4>
3218 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3219 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3221 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3222 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3223 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3224 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3225 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3227 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
3228 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
3229 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
3230 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
3231 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
3232 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
3234 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage and
3235 textWithLanguage string values and must be
<code>NULL
</code> for all other string values.
</p>
3236 <h3 class=
"function"><a name=
"ippAddStrings">ippAddStrings
</a></h3>
3237 <p class=
"description">Add language-encoded strings to an IPP message.
</p>
3239 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddStrings (
<br>
3240 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3241 ipp_tag_t group,
<br>
3242 ipp_tag_t value_tag,
<br>
3243 const char *name,
<br>
3244 int num_values,
<br>
3245 const char *language,
<br>
3246 const char *const *values
<br>
3248 <h4 class=
"parameters">Parameters
</h4>
3251 <dd class=
"description">IPP message
</dd>
3253 <dd class=
"description">IPP group
</dd>
3255 <dd class=
"description">Type of attribute
</dd>
3257 <dd class=
"description">Name of attribute
</dd>
3259 <dd class=
"description">Number of values
</dd>
3261 <dd class=
"description">Language code (
<code>NULL
</code> for default)
</dd>
3263 <dd class=
"description">Values
</dd>
3265 <h4 class=
"returnvalue">Return Value
</h4>
3266 <p class=
"description">New attribute
</p>
3267 <h4 class=
"discussion">Discussion
</h4>
3268 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3269 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3271 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3272 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3273 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3274 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3275 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3277 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
3278 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
3279 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
3280 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
3281 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
3282 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
3284 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage and
3285 textWithLanguage string values and must be
<code>NULL
</code> for all other string values.
</p>
3286 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippAttributeString">ippAttributeString
</a></h3>
3287 <p class=
"description">Convert the attribute's value to a string.
</p>
3289 size_t ippAttributeString (
<br>
3290 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3291 char *buffer,
<br>
3292 size_t bufsize
<br>
3294 <h4 class=
"parameters">Parameters
</h4>
3297 <dd class=
"description">Attribute
</dd>
3299 <dd class=
"description">String buffer or NULL
</dd>
3301 <dd class=
"description">Size of string buffer
</dd>
3303 <h4 class=
"returnvalue">Return Value
</h4>
3304 <p class=
"description">Number of bytes less nul
</p>
3305 <h4 class=
"discussion">Discussion
</h4>
3306 <p class=
"discussion">Returns the number of bytes that would be written, not including the
3307 trailing nul. The buffer pointer can be NULL to get the required length,
3308 just like (v)snprintf.
3311 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippCopyAttribute">ippCopyAttribute
</a></h3>
3312 <p class=
"description">Copy an attribute.
</p>
3314 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippCopyAttribute (
<br>
3315 <a href=
"#ipp_t">ipp_t
</a> *dst,
<br>
3316 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *srcattr,
<br>
3317 int quickcopy
<br>
3319 <h4 class=
"parameters">Parameters
</h4>
3322 <dd class=
"description">Destination IPP message
</dd>
3324 <dd class=
"description">Attribute to copy
</dd>
3326 <dd class=
"description">1 for a referenced copy,
0 for normal
</dd>
3328 <h4 class=
"returnvalue">Return Value
</h4>
3329 <p class=
"description">New attribute
</p>
3330 <h4 class=
"discussion">Discussion
</h4>
3331 <p class=
"discussion">The specified attribute,
<code>attr
</code>, is copied to the destination IPP message.
3332 When
<code>quickcopy
</code> is non-zero, a
"shallow
" reference copy of the attribute is
3333 created - this should only be done as long as the original source IPP message will
3334 not be freed for the life of the destination.
3337 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippCopyAttributes">ippCopyAttributes
</a></h3>
3338 <p class=
"description">Copy attributes from one IPP message to another.
</p>
3340 int ippCopyAttributes (
<br>
3341 <a href=
"#ipp_t">ipp_t
</a> *dst,
<br>
3342 <a href=
"#ipp_t">ipp_t
</a> *src,
<br>
3343 int quickcopy,
<br>
3344 <a href=
"#ipp_copycb_t">ipp_copycb_t
</a> cb,
<br>
3345 void *context
<br>
3347 <h4 class=
"parameters">Parameters
</h4>
3350 <dd class=
"description">Destination IPP message
</dd>
3352 <dd class=
"description">Source IPP message
</dd>
3354 <dd class=
"description">1 for a referenced copy,
0 for normal
</dd>
3356 <dd class=
"description">Copy callback or
<code>NULL
</code> for none
</dd>
3358 <dd class=
"description">Context pointer
</dd>
3360 <h4 class=
"returnvalue">Return Value
</h4>
3361 <p class=
"description">1 on success,
0 on error
</p>
3362 <h4 class=
"discussion">Discussion
</h4>
3363 <p class=
"discussion">Zero or more attributes are copied from the source IPP message, @code@ src, to the
3364 destination IPP message,
<code>dst
</code>. When
<code>quickcopy
</code> is non-zero, a
"shallow
"
3365 reference copy of the attribute is created - this should only be done as long as the
3366 original source IPP message will not be freed for the life of the destination.
<br>
3368 The
<code>cb
</code> and
<code>context
</code> parameters provide a generic way to
"filter
" the
3369 attributes that are copied - the function must return
1 to copy the attribute or
3370 0 to skip it. The function may also choose to do a partial copy of the source attribute
3374 <h3 class=
"function"><a name=
"ippDateToTime">ippDateToTime
</a></h3>
3375 <p class=
"description">Convert from RFC
1903 Date/Time format to UNIX time
3378 time_t ippDateToTime (
<br>
3379 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *date
<br>
3381 <h4 class=
"parameters">Parameters
</h4>
3384 <dd class=
"description">RFC
1903 date info
</dd>
3386 <h4 class=
"returnvalue">Return Value
</h4>
3387 <p class=
"description">UNIX time value
</p>
3388 <h3 class=
"function"><a name=
"ippDelete">ippDelete
</a></h3>
3389 <p class=
"description">Delete an IPP message.
</p>
3391 void ippDelete (
<br>
3392 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3394 <h4 class=
"parameters">Parameters
</h4>
3397 <dd class=
"description">IPP message
</dd>
3399 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"ippDeleteAttribute">ippDeleteAttribute
</a></h3>
3400 <p class=
"description">Delete a single attribute in an IPP message.
</p>
3402 void ippDeleteAttribute (
<br>
3403 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3404 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
3406 <h4 class=
"parameters">Parameters
</h4>
3409 <dd class=
"description">IPP message
</dd>
3411 <dd class=
"description">Attribute to delete
</dd>
3413 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippDeleteValues">ippDeleteValues
</a></h3>
3414 <p class=
"description">Delete values in an attribute.
</p>
3416 int ippDeleteValues (
<br>
3417 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3418 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3419 int element,
<br>
3420 int count
<br>
3422 <h4 class=
"parameters">Parameters
</h4>
3425 <dd class=
"description">IPP message
</dd>
3427 <dd class=
"description">Attribute
</dd>
3429 <dd class=
"description">Index of first value to delete (
0-based)
</dd>
3431 <dd class=
"description">Number of values to delete
</dd>
3433 <h4 class=
"returnvalue">Return Value
</h4>
3434 <p class=
"description">1 on success,
0 on failure
</p>
3435 <h4 class=
"discussion">Discussion
</h4>
3436 <p class=
"discussion">The
<code>element
</code> parameter specifies the first value to delete, starting at
0. It
3437 must be less than the number of values returned by
<a href=
"#ippGetCount"><code>ippGetCount
</code></a>.
<br>
3439 Deleting all values in an attribute deletes the attribute.
3442 <h3 class=
"function"><a name=
"ippEnumString">ippEnumString
</a></h3>
3443 <p class=
"description">Return a string corresponding to the enum value.
</p>
3445 const char *ippEnumString (
<br>
3446 const char *attrname,
<br>
3447 int enumvalue
<br>
3449 <h4 class=
"parameters">Parameters
</h4>
3452 <dd class=
"description">Attribute name
</dd>
3454 <dd class=
"description">Enum value
</dd>
3456 <h4 class=
"returnvalue">Return Value
</h4>
3457 <p class=
"description">Enum string
</p>
3458 <h3 class=
"function"><a name=
"ippEnumValue">ippEnumValue
</a></h3>
3459 <p class=
"description">Return the value associated with a given enum string.
</p>
3461 int ippEnumValue (
<br>
3462 const char *attrname,
<br>
3463 const char *enumstring
<br>
3465 <h4 class=
"parameters">Parameters
</h4>
3468 <dd class=
"description">Attribute name
</dd>
3470 <dd class=
"description">Enum string
</dd>
3472 <h4 class=
"returnvalue">Return Value
</h4>
3473 <p class=
"description">Enum value or -
1 if unknown
</p>
3474 <h3 class=
"function"><a name=
"ippErrorString">ippErrorString
</a></h3>
3475 <p class=
"description">Return a name for the given status code.
</p>
3477 const char *ippErrorString (
<br>
3478 ipp_status_t error
<br>
3480 <h4 class=
"parameters">Parameters
</h4>
3483 <dd class=
"description">Error status
</dd>
3485 <h4 class=
"returnvalue">Return Value
</h4>
3486 <p class=
"description">Text string
</p>
3487 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippErrorValue">ippErrorValue
</a></h3>
3488 <p class=
"description">Return a status code for the given name.
</p>
3490 ipp_status_t ippErrorValue (
<br>
3491 const char *name
<br>
3493 <h4 class=
"parameters">Parameters
</h4>
3496 <dd class=
"description">Name
</dd>
3498 <h4 class=
"returnvalue">Return Value
</h4>
3499 <p class=
"description">IPP status code
</p>
3500 <h3 class=
"function"><a name=
"ippFindAttribute">ippFindAttribute
</a></h3>
3501 <p class=
"description">Find a named attribute in a request...
</p>
3503 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindAttribute (
<br>
3504 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3505 const char *name,
<br>
3506 ipp_tag_t type
<br>
3508 <h4 class=
"parameters">Parameters
</h4>
3511 <dd class=
"description">IPP message
</dd>
3513 <dd class=
"description">Name of attribute
</dd>
3515 <dd class=
"description">Type of attribute
</dd>
3517 <h4 class=
"returnvalue">Return Value
</h4>
3518 <p class=
"description">Matching attribute
</p>
3519 <h3 class=
"function"><a name=
"ippFindNextAttribute">ippFindNextAttribute
</a></h3>
3520 <p class=
"description">Find the next named attribute in a request...
</p>
3522 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindNextAttribute (
<br>
3523 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3524 const char *name,
<br>
3525 ipp_tag_t type
<br>
3527 <h4 class=
"parameters">Parameters
</h4>
3530 <dd class=
"description">IPP message
</dd>
3532 <dd class=
"description">Name of attribute
</dd>
3534 <dd class=
"description">Type of attribute
</dd>
3536 <h4 class=
"returnvalue">Return Value
</h4>
3537 <p class=
"description">Matching attribute
</p>
3538 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippFirstAttribute">ippFirstAttribute
</a></h3>
3539 <p class=
"description">Return the first attribute in the message.
</p>
3541 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFirstAttribute (
<br>
3542 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3544 <h4 class=
"parameters">Parameters
</h4>
3547 <dd class=
"description">IPP message
</dd>
3549 <h4 class=
"returnvalue">Return Value
</h4>
3550 <p class=
"description">First attribute or
<code>NULL
</code> if none
</p>
3551 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetBoolean">ippGetBoolean
</a></h3>
3552 <p class=
"description">Get a boolean value for an attribute.
</p>
3554 int ippGetBoolean (
<br>
3555 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3556 int element
<br>
3558 <h4 class=
"parameters">Parameters
</h4>
3561 <dd class=
"description">IPP attribute
</dd>
3563 <dd class=
"description">Value number (
0-based)
</dd>
3565 <h4 class=
"returnvalue">Return Value
</h4>
3566 <p class=
"description">Boolean value or -
1 on error
</p>
3567 <h4 class=
"discussion">Discussion
</h4>
3568 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
3569 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
3572 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetCollection">ippGetCollection
</a></h3>
3573 <p class=
"description">Get a collection value for an attribute.
</p>
3575 <a href=
"#ipp_t">ipp_t
</a> *ippGetCollection (
<br>
3576 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3577 int element
<br>
3579 <h4 class=
"parameters">Parameters
</h4>
3582 <dd class=
"description">IPP attribute
</dd>
3584 <dd class=
"description">Value number (
0-based)
</dd>
3586 <h4 class=
"returnvalue">Return Value
</h4>
3587 <p class=
"description">Collection value or
<code>NULL
</code> on error
</p>
3588 <h4 class=
"discussion">Discussion
</h4>
3589 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
3590 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
3593 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetCount">ippGetCount
</a></h3>
3594 <p class=
"description">Get the number of values in an attribute.
</p>
3596 int ippGetCount (
<br>
3597 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
3599 <h4 class=
"parameters">Parameters
</h4>
3602 <dd class=
"description">IPP attribute
</dd>
3604 <h4 class=
"returnvalue">Return Value
</h4>
3605 <p class=
"description">Number of values or -
1 on error
</p>
3606 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetGroupTag">ippGetGroupTag
</a></h3>
3607 <p class=
"description">Get the group associated with an attribute.
</p>
3609 ipp_tag_t ippGetGroupTag (
<br>
3610 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
3612 <h4 class=
"parameters">Parameters
</h4>
3615 <dd class=
"description">IPP attribute
</dd>
3617 <h4 class=
"returnvalue">Return Value
</h4>
3618 <p class=
"description">Group tag or
<code>IPP_TAG_ZERO
</code> on error
</p>
3619 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetInteger">ippGetInteger
</a></h3>
3620 <p class=
"description">Get the integer/enum value for an attribute.
</p>
3622 int ippGetInteger (
<br>
3623 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3624 int element
<br>
3626 <h4 class=
"parameters">Parameters
</h4>
3629 <dd class=
"description">IPP attribute
</dd>
3631 <dd class=
"description">Value number (
0-based)
</dd>
3633 <h4 class=
"returnvalue">Return Value
</h4>
3634 <p class=
"description">Value or -
1 on error
</p>
3635 <h4 class=
"discussion">Discussion
</h4>
3636 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
3637 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
3640 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetName">ippGetName
</a></h3>
3641 <p class=
"description">Get the attribute name.
</p>
3643 const char *ippGetName (
<br>
3644 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
3646 <h4 class=
"parameters">Parameters
</h4>
3649 <dd class=
"description">IPP attribute
</dd>
3651 <h4 class=
"returnvalue">Return Value
</h4>
3652 <p class=
"description">Attribute name or
<code>NULL
</code> for separators
</p>
3653 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetOperation">ippGetOperation
</a></h3>
3654 <p class=
"description">Get the operation ID in an IPP message.
</p>
3656 ipp_op_t ippGetOperation (
<br>
3657 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3659 <h4 class=
"parameters">Parameters
</h4>
3662 <dd class=
"description">IPP request message
</dd>
3664 <h4 class=
"returnvalue">Return Value
</h4>
3665 <p class=
"description">Operation ID or -
1 on error
</p>
3666 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetRequestId">ippGetRequestId
</a></h3>
3667 <p class=
"description">Get the request ID from an IPP message.
</p>
3669 int ippGetRequestId (
<br>
3670 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3672 <h4 class=
"parameters">Parameters
</h4>
3675 <dd class=
"description">IPP message
</dd>
3677 <h4 class=
"returnvalue">Return Value
</h4>
3678 <p class=
"description">Request ID or -
1 on error
</p>
3679 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetResolution">ippGetResolution
</a></h3>
3680 <p class=
"description">Get a resolution value for an attribute.
</p>
3682 int ippGetResolution (
<br>
3683 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3684 int element,
<br>
3685 int *yres,
<br>
3686 <a href=
"#ipp_res_t">ipp_res_t
</a> *units
<br>
3688 <h4 class=
"parameters">Parameters
</h4>
3691 <dd class=
"description">IPP attribute
</dd>
3693 <dd class=
"description">Value number (
0-based)
</dd>
3695 <dd class=
"description">Vertical/feed resolution
</dd>
3697 <dd class=
"description">Units for resolution
</dd>
3699 <h4 class=
"returnvalue">Return Value
</h4>
3700 <p class=
"description">Horizontal/cross feed resolution or -
1</p>
3701 <h4 class=
"discussion">Discussion
</h4>
3702 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
3703 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
3706 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetStatusCode">ippGetStatusCode
</a></h3>
3707 <p class=
"description">Get the status code from an IPP response or event message.
</p>
3709 ipp_status_t ippGetStatusCode (
<br>
3710 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3712 <h4 class=
"parameters">Parameters
</h4>
3715 <dd class=
"description">IPP response or event message
</dd>
3717 <h4 class=
"returnvalue">Return Value
</h4>
3718 <p class=
"description">Status code in IPP message
</p>
3719 <h3 class=
"function"><a name=
"ippGetString">ippGetString
</a></h3>
3720 <p class=
"description">Return the value...
</p>
3722 const char *ippGetString (
<br>
3723 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3724 int element,
<br>
3725 const char **language
<br>
3727 <h4 class=
"parameters">Parameters
</h4>
3730 <dd class=
"description">IPP attribute
</dd>
3732 <dd class=
"description">Value number (
0-based)
</dd>
3734 <dd class=
"description">Language code (
<code>NULL
</code> for don't care)
</dd>
3736 <h4 class=
"returnvalue">Return Value
</h4>
3737 <p class=
"description">Get the string and optionally the language code for an attribute.
</p>
3738 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
3739 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
3742 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetValueTag">ippGetValueTag
</a></h3>
3743 <p class=
"description">Get the value tag for an attribute.
</p>
3745 ipp_tag_t ippGetValueTag (
<br>
3746 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
3748 <h4 class=
"parameters">Parameters
</h4>
3751 <dd class=
"description">IPP attribute
</dd>
3753 <h4 class=
"returnvalue">Return Value
</h4>
3754 <p class=
"description">Value tag or
<code>IPP_TAG_ZERO
</code> on error
</p>
3755 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetVersion">ippGetVersion
</a></h3>
3756 <p class=
"description">Get the major and minor version number from an IPP message.
</p>
3758 int ippGetVersion (
<br>
3759 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3760 int *minor
<br>
3762 <h4 class=
"parameters">Parameters
</h4>
3765 <dd class=
"description">IPP message
</dd>
3767 <dd class=
"description">Minor version number or
<code>NULL
</code></dd>
3769 <h4 class=
"returnvalue">Return Value
</h4>
3770 <p class=
"description">Major version number or -
1 on error
</p>
3771 <h3 class=
"function"><a name=
"ippLength">ippLength
</a></h3>
3772 <p class=
"description">Compute the length of an IPP message.
</p>
3774 size_t ippLength (
<br>
3775 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3777 <h4 class=
"parameters">Parameters
</h4>
3780 <dd class=
"description">IPP message
</dd>
3782 <h4 class=
"returnvalue">Return Value
</h4>
3783 <p class=
"description">Size of IPP message
</p>
3784 <h3 class=
"function"><a name=
"ippNew">ippNew
</a></h3>
3785 <p class=
"description">Allocate a new IPP message.
</p>
3787 <a href=
"#ipp_t">ipp_t
</a> *ippNew (void);
</p>
3788 <h4 class=
"returnvalue">Return Value
</h4>
3789 <p class=
"description">New IPP message
</p>
3790 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippNewRequest">ippNewRequest
</a></h3>
3791 <p class=
"description">Allocate a new IPP request message.
</p>
3793 <a href=
"#ipp_t">ipp_t
</a> *ippNewRequest (
<br>
3794 ipp_op_t op
<br>
3796 <h4 class=
"parameters">Parameters
</h4>
3799 <dd class=
"description">Operation code
</dd>
3801 <h4 class=
"returnvalue">Return Value
</h4>
3802 <p class=
"description">IPP request message
</p>
3803 <h4 class=
"discussion">Discussion
</h4>
3804 <p class=
"discussion">The new request message is initialized with the attributes-charset and
3805 attributes-natural-language attributes added. The
3806 attributes-natural-language value is derived from the current locale.
3809 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippNextAttribute">ippNextAttribute
</a></h3>
3810 <p class=
"description">Return the next attribute in the message.
</p>
3812 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippNextAttribute (
<br>
3813 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3815 <h4 class=
"parameters">Parameters
</h4>
3818 <dd class=
"description">IPP message
</dd>
3820 <h4 class=
"returnvalue">Return Value
</h4>
3821 <p class=
"description">Next attribute or
<code>NULL
</code> if none
</p>
3822 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippOpString">ippOpString
</a></h3>
3823 <p class=
"description">Return a name for the given operation id.
</p>
3825 const char *ippOpString (
<br>
3826 ipp_op_t op
<br>
3828 <h4 class=
"parameters">Parameters
</h4>
3831 <dd class=
"description">Operation ID
</dd>
3833 <h4 class=
"returnvalue">Return Value
</h4>
3834 <p class=
"description">Name
</p>
3835 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippOpValue">ippOpValue
</a></h3>
3836 <p class=
"description">Return an operation id for the given name.
</p>
3838 ipp_op_t ippOpValue (
<br>
3839 const char *name
<br>
3841 <h4 class=
"parameters">Parameters
</h4>
3844 <dd class=
"description">Textual name
</dd>
3846 <h4 class=
"returnvalue">Return Value
</h4>
3847 <p class=
"description">Operation ID
</p>
3848 <h3 class=
"function"><a name=
"ippPort">ippPort
</a></h3>
3849 <p class=
"description">Return the default IPP port number.
</p>
3851 int ippPort (void);
</p>
3852 <h4 class=
"returnvalue">Return Value
</h4>
3853 <p class=
"description">Port number
</p>
3854 <h3 class=
"function"><a name=
"ippRead">ippRead
</a></h3>
3855 <p class=
"description">Read data for an IPP message from a HTTP connection.
</p>
3857 <a href=
"#ipp_state_t">ipp_state_t
</a> ippRead (
<br>
3858 <a href=
"#http_t">http_t
</a> *http,
<br>
3859 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3861 <h4 class=
"parameters">Parameters
</h4>
3864 <dd class=
"description">HTTP connection
</dd>
3866 <dd class=
"description">IPP data
</dd>
3868 <h4 class=
"returnvalue">Return Value
</h4>
3869 <p class=
"description">Current state
</p>
3870 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"ippReadFile">ippReadFile
</a></h3>
3871 <p class=
"description">Read data for an IPP message from a file.
</p>
3873 <a href=
"#ipp_state_t">ipp_state_t
</a> ippReadFile (
<br>
3874 int fd,
<br>
3875 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3877 <h4 class=
"parameters">Parameters
</h4>
3880 <dd class=
"description">HTTP data
</dd>
3882 <dd class=
"description">IPP data
</dd>
3884 <h4 class=
"returnvalue">Return Value
</h4>
3885 <p class=
"description">Current state
</p>
3886 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippReadIO">ippReadIO
</a></h3>
3887 <p class=
"description">Read data for an IPP message.
</p>
3889 <a href=
"#ipp_state_t">ipp_state_t
</a> ippReadIO (
<br>
3890 void *src,
<br>
3891 <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br>
3892 int blocking,
<br>
3893 <a href=
"#ipp_t">ipp_t
</a> *parent,
<br>
3894 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3896 <h4 class=
"parameters">Parameters
</h4>
3899 <dd class=
"description">Data source
</dd>
3901 <dd class=
"description">Read callback function
</dd>
3903 <dd class=
"description">Use blocking IO?
</dd>
3905 <dd class=
"description">Parent request, if any
</dd>
3907 <dd class=
"description">IPP data
</dd>
3909 <h4 class=
"returnvalue">Return Value
</h4>
3910 <p class=
"description">Current state
</p>
3911 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetBoolean">ippSetBoolean
</a></h3>
3912 <p class=
"description">Set a boolean value in an attribute.
</p>
3914 int ippSetBoolean (
<br>
3915 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3916 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
3917 int element,
<br>
3918 int boolvalue
<br>
3920 <h4 class=
"parameters">Parameters
</h4>
3923 <dd class=
"description">IPP message
</dd>
3925 <dd class=
"description">IPP attribute
</dd>
3927 <dd class=
"description">Value number (
0-based)
</dd>
3929 <dd class=
"description">Boolean value
</dd>
3931 <h4 class=
"returnvalue">Return Value
</h4>
3932 <p class=
"description">1 on success,
0 on failure
</p>
3933 <h4 class=
"discussion">Discussion
</h4>
3934 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
3935 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3937 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
3939 The
<code>element
</code> parameter specifies which value to set from
0 to
3940 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
3943 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetCollection">ippSetCollection
</a></h3>
3944 <p class=
"description">Set a collection value in an attribute.
</p>
3946 int ippSetCollection (
<br>
3947 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3948 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
3949 int element,
<br>
3950 <a href=
"#ipp_t">ipp_t
</a> *colvalue
<br>
3952 <h4 class=
"parameters">Parameters
</h4>
3955 <dd class=
"description">IPP message
</dd>
3957 <dd class=
"description">IPP attribute
</dd>
3959 <dd class=
"description">Value number (
0-based)
</dd>
3961 <dd class=
"description">Collection value
</dd>
3963 <h4 class=
"returnvalue">Return Value
</h4>
3964 <p class=
"description">1 on success,
0 on failure
</p>
3965 <h4 class=
"discussion">Discussion
</h4>
3966 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
3967 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3969 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
3971 The
<code>element
</code> parameter specifies which value to set from
0 to
3972 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
3975 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetGroupTag">ippSetGroupTag
</a></h3>
3976 <p class=
"description">Set the group tag of an attribute.
</p>
3978 int ippSetGroupTag (
<br>
3979 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3980 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
3981 ipp_tag_t group_tag
<br>
3983 <h4 class=
"parameters">Parameters
</h4>
3986 <dd class=
"description">IPP message
</dd>
3988 <dd class=
"description">Attribute
</dd>
3990 <dd class=
"description">Group tag
</dd>
3992 <h4 class=
"returnvalue">Return Value
</h4>
3993 <p class=
"description">1 on success,
0 on failure
</p>
3994 <h4 class=
"discussion">Discussion
</h4>
3995 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
3996 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3998 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4000 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
4001 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
4002 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
4003 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
4004 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
4007 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetInteger">ippSetInteger
</a></h3>
4008 <p class=
"description">Set an integer or enum value in an attribute.
</p>
4010 int ippSetInteger (
<br>
4011 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4012 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4013 int element,
<br>
4014 int intvalue
<br>
4016 <h4 class=
"parameters">Parameters
</h4>
4019 <dd class=
"description">IPP message
</dd>
4021 <dd class=
"description">IPP attribute
</dd>
4023 <dd class=
"description">Value number (
0-based)
</dd>
4025 <dd class=
"description">Integer/enum value
</dd>
4027 <h4 class=
"returnvalue">Return Value
</h4>
4028 <p class=
"description">1 on success,
0 on failure
</p>
4029 <h4 class=
"discussion">Discussion
</h4>
4030 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4031 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4033 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4035 The
<code>element
</code> parameter specifies which value to set from
0 to
4036 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4039 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetName">ippSetName
</a></h3>
4040 <p class=
"description">Set the name of an attribute.
</p>
4042 int ippSetName (
<br>
4043 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4044 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4045 const char *name
<br>
4047 <h4 class=
"parameters">Parameters
</h4>
4050 <dd class=
"description">IPP message
</dd>
4052 <dd class=
"description">IPP attribute
</dd>
4054 <dd class=
"description">Attribute name
</dd>
4056 <h4 class=
"returnvalue">Return Value
</h4>
4057 <p class=
"description">1 on success,
0 on failure
</p>
4058 <h4 class=
"discussion">Discussion
</h4>
4059 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4060 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4062 The
<code>attr
</code> parameter may be modified as a result of setting the value.
4065 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetOperation">ippSetOperation
</a></h3>
4066 <p class=
"description">Set the operation ID in an IPP request message.
</p>
4068 int ippSetOperation (
<br>
4069 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4070 ipp_op_t op
<br>
4072 <h4 class=
"parameters">Parameters
</h4>
4075 <dd class=
"description">IPP request message
</dd>
4077 <dd class=
"description">Operation ID
</dd>
4079 <h4 class=
"returnvalue">Return Value
</h4>
4080 <p class=
"description">1 on success,
0 on failure
</p>
4081 <h4 class=
"discussion">Discussion
</h4>
4082 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
4083 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
4086 <h3 class=
"function"><a name=
"ippSetPort">ippSetPort
</a></h3>
4087 <p class=
"description">Set the default port number.
</p>
4089 void ippSetPort (
<br>
4090 int p
<br>
4092 <h4 class=
"parameters">Parameters
</h4>
4095 <dd class=
"description">Port number to use
</dd>
4097 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetRange">ippSetRange
</a></h3>
4098 <p class=
"description">Set a rangeOfInteger value in an attribute.
</p>
4100 int ippSetRange (
<br>
4101 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4102 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4103 int element,
<br>
4104 int lowervalue,
<br>
4105 int uppervalue
<br>
4107 <h4 class=
"parameters">Parameters
</h4>
4110 <dd class=
"description">IPP message
</dd>
4112 <dd class=
"description">IPP attribute
</dd>
4114 <dd class=
"description">Value number (
0-based)
</dd>
4116 <dd class=
"description">Lower bound for range
</dd>
4118 <dd class=
"description">Upper bound for range
</dd>
4120 <h4 class=
"returnvalue">Return Value
</h4>
4121 <p class=
"description">1 on success,
0 on failure
</p>
4122 <h4 class=
"discussion">Discussion
</h4>
4123 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4124 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4126 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4128 The
<code>element
</code> parameter specifies which value to set from
0 to
4129 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4132 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetRequestId">ippSetRequestId
</a></h3>
4133 <p class=
"description">Set the request ID in an IPP message.
</p>
4135 int ippSetRequestId (
<br>
4136 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4137 int request_id
<br>
4139 <h4 class=
"parameters">Parameters
</h4>
4142 <dd class=
"description">IPP message
</dd>
4144 <dd class=
"description">Request ID
</dd>
4146 <h4 class=
"returnvalue">Return Value
</h4>
4147 <p class=
"description">1 on success,
0 on failure
</p>
4148 <h4 class=
"discussion">Discussion
</h4>
4149 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
4150 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4152 The
<code>request_id
</code> parameter must be greater than
0.
4155 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetResolution">ippSetResolution
</a></h3>
4156 <p class=
"description">Set a resolution value in an attribute.
</p>
4158 int ippSetResolution (
<br>
4159 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4160 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4161 int element,
<br>
4162 <a href=
"#ipp_res_t">ipp_res_t
</a> unitsvalue,
<br>
4163 int xresvalue,
<br>
4164 int yresvalue
<br>
4166 <h4 class=
"parameters">Parameters
</h4>
4169 <dd class=
"description">IPP message
</dd>
4171 <dd class=
"description">IPP attribute
</dd>
4173 <dd class=
"description">Value number (
0-based)
</dd>
4175 <dd class=
"description">Resolution units
</dd>
4177 <dd class=
"description">Horizontal/cross feed resolution
</dd>
4179 <dd class=
"description">Vertical/feed resolution
</dd>
4181 <h4 class=
"returnvalue">Return Value
</h4>
4182 <p class=
"description">1 on success,
0 on failure
</p>
4183 <h4 class=
"discussion">Discussion
</h4>
4184 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4185 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4187 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4189 The
<code>element
</code> parameter specifies which value to set from
0 to
4190 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4193 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetStatusCode">ippSetStatusCode
</a></h3>
4194 <p class=
"description">Set the status code in an IPP response or event message.
</p>
4196 int ippSetStatusCode (
<br>
4197 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4198 ipp_status_t status
<br>
4200 <h4 class=
"parameters">Parameters
</h4>
4203 <dd class=
"description">IPP response or event message
</dd>
4205 <dd class=
"description">Status code
</dd>
4207 <h4 class=
"returnvalue">Return Value
</h4>
4208 <p class=
"description">1 on success,
0 on failure
</p>
4209 <h4 class=
"discussion">Discussion
</h4>
4210 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
4211 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
4214 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetString">ippSetString
</a></h3>
4215 <p class=
"description">Set a string value in an attribute.
</p>
4217 int ippSetString (
<br>
4218 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4219 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4220 int element,
<br>
4221 const char *strvalue
<br>
4223 <h4 class=
"parameters">Parameters
</h4>
4226 <dd class=
"description">IPP message
</dd>
4228 <dd class=
"description">IPP attribute
</dd>
4230 <dd class=
"description">Value number (
0-based)
</dd>
4232 <dd class=
"description">String value
</dd>
4234 <h4 class=
"returnvalue">Return Value
</h4>
4235 <p class=
"description">1 on success,
0 on failure
</p>
4236 <h4 class=
"discussion">Discussion
</h4>
4237 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4238 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4240 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4242 The
<code>element
</code> parameter specifies which value to set from
0 to
4243 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4246 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetValueTag">ippSetValueTag
</a></h3>
4247 <p class=
"description">Set the value tag of an attribute.
</p>
4249 int ippSetValueTag (
<br>
4250 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4251 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4252 ipp_tag_t value_tag
<br>
4254 <h4 class=
"parameters">Parameters
</h4>
4257 <dd class=
"description">IPP message
</dd>
4259 <dd class=
"description">IPP attribute
</dd>
4261 <dd class=
"description">Value tag
</dd>
4263 <h4 class=
"returnvalue">Return Value
</h4>
4264 <p class=
"description">1 on success,
0 on failure
</p>
4265 <h4 class=
"discussion">Discussion
</h4>
4266 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4267 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4269 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4271 Integer (
<code>IPP_TAG_INTEGER
</code>) values can be promoted to rangeOfInteger
4272 (
<code>IPP_TAG_RANGE
</code>) values, the various string tags can be promoted to name
4273 (
<code>IPP_TAG_NAME
</code>) or nameWithLanguage (
<code>IPP_TAG_NAMELANG
</code>) values, text
4274 (
<code>IPP_TAG_TEXT
</code>) values can be promoted to textWithLanguage
4275 (
<code>IPP_TAG_TEXTLANG
</code>) values, and all values can be demoted to the various
4276 out-of-band value tags such as no-value (
<code>IPP_TAG_NOVALUE
</code>). All other changes
4277 will be rejected.
<br>
4279 Promoting a string attribute to nameWithLanguage or textWithLanguage adds the language
4280 code in the
"attributes-natural-language
" attribute or, if not present, the language
4281 code for the current locale.
4284 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetVersion">ippSetVersion
</a></h3>
4285 <p class=
"description">Set the version number in an IPP message.
</p>
4287 int ippSetVersion (
<br>
4288 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4289 int major,
<br>
4290 int minor
<br>
4292 <h4 class=
"parameters">Parameters
</h4>
4295 <dd class=
"description">IPP message
</dd>
4297 <dd class=
"description">Major version number (major.minor)
</dd>
4299 <dd class=
"description">Minor version number (major.minor)
</dd>
4301 <h4 class=
"returnvalue">Return Value
</h4>
4302 <p class=
"description">1 on success,
0 on failure
</p>
4303 <h4 class=
"discussion">Discussion
</h4>
4304 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
4305 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4307 The valid version numbers are currently
1.0,
1.1,
2.0,
2.1, and
2.2.
4310 <h3 class=
"function"><span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span><a name=
"ippTagString">ippTagString
</a></h3>
4311 <p class=
"description">Return the tag name corresponding to a tag value.
</p>
4313 const char *ippTagString (
<br>
4314 ipp_tag_t tag
<br>
4316 <h4 class=
"parameters">Parameters
</h4>
4319 <dd class=
"description">Tag value
</dd>
4321 <h4 class=
"returnvalue">Return Value
</h4>
4322 <p class=
"description">Tag name
</p>
4323 <h4 class=
"discussion">Discussion
</h4>
4324 <p class=
"discussion">The returned names are defined in RFC
2911 and
3382.
4327 <h3 class=
"function"><span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span><a name=
"ippTagValue">ippTagValue
</a></h3>
4328 <p class=
"description">Return the tag value corresponding to a tag name.
</p>
4330 ipp_tag_t ippTagValue (
<br>
4331 const char *name
<br>
4333 <h4 class=
"parameters">Parameters
</h4>
4336 <dd class=
"description">Tag name
</dd>
4338 <h4 class=
"returnvalue">Return Value
</h4>
4339 <p class=
"description">Tag value
</p>
4340 <h4 class=
"discussion">Discussion
</h4>
4341 <p class=
"discussion">The tag names are defined in RFC
2911 and
3382.
4344 <h3 class=
"function"><a name=
"ippTimeToDate">ippTimeToDate
</a></h3>
4345 <p class=
"description">Convert from UNIX time to RFC
1903 format.
</p>
4347 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *ippTimeToDate (
<br>
4348 time_t t
<br>
4350 <h4 class=
"parameters">Parameters
</h4>
4353 <dd class=
"description">UNIX time value
</dd>
4355 <h4 class=
"returnvalue">Return Value
</h4>
4356 <p class=
"description">RFC-
1903 date/time data
</p>
4357 <h3 class=
"function"><a name=
"ippWrite">ippWrite
</a></h3>
4358 <p class=
"description">Write data for an IPP message to a HTTP connection.
</p>
4360 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWrite (
<br>
4361 <a href=
"#http_t">http_t
</a> *http,
<br>
4362 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4364 <h4 class=
"parameters">Parameters
</h4>
4367 <dd class=
"description">HTTP connection
</dd>
4369 <dd class=
"description">IPP data
</dd>
4371 <h4 class=
"returnvalue">Return Value
</h4>
4372 <p class=
"description">Current state
</p>
4373 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"ippWriteFile">ippWriteFile
</a></h3>
4374 <p class=
"description">Write data for an IPP message to a file.
</p>
4376 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWriteFile (
<br>
4377 int fd,
<br>
4378 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4380 <h4 class=
"parameters">Parameters
</h4>
4383 <dd class=
"description">HTTP data
</dd>
4385 <dd class=
"description">IPP data
</dd>
4387 <h4 class=
"returnvalue">Return Value
</h4>
4388 <p class=
"description">Current state
</p>
4389 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippWriteIO">ippWriteIO
</a></h3>
4390 <p class=
"description">Write data for an IPP message.
</p>
4392 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWriteIO (
<br>
4393 void *dst,
<br>
4394 <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br>
4395 int blocking,
<br>
4396 <a href=
"#ipp_t">ipp_t
</a> *parent,
<br>
4397 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4399 <h4 class=
"parameters">Parameters
</h4>
4402 <dd class=
"description">Destination
</dd>
4404 <dd class=
"description">Write callback function
</dd>
4406 <dd class=
"description">Use blocking IO?
</dd>
4408 <dd class=
"description">Parent IPP message
</dd>
4410 <dd class=
"description">IPP data
</dd>
4412 <h4 class=
"returnvalue">Return Value
</h4>
4413 <p class=
"description">Current state
</p>
4414 <h2 class=
"title"><a name=
"TYPES">Data Types
</a></h2>
4415 <h3 class=
"typedef"><a name=
"gss_auth_identity_desc">gss_auth_identity_desc
</a></h3>
4416 <p class=
"description">Local functions...
</p>
4418 typedef struct
<a href=
"#gss_auth_identity">gss_auth_identity
</a> gss_auth_identity_desc;
4420 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"http_addr_t">http_addr_t
</a></h3>
4421 <p class=
"description">Socket address union, which
4422 makes using IPv6 and other
4423 address types easier and
4426 typedef union _http_addr_u / http_addr_t;
4428 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"http_addrlist_t">http_addrlist_t
</a></h3>
4429 <p class=
"description">Socket address list, which is
4430 used to enumerate all of the
4431 addresses that are associated
4432 with a hostname.
</p>
4434 typedef struct
<a href=
"#http_addrlist_s">http_addrlist_s
</a> / http_addrlist_t;
4436 <h3 class=
"typedef"><a name=
"http_auth_t">http_auth_t
</a></h3>
4437 <p class=
"description">HTTP authentication types
</p>
4439 typedef enum
<a href=
"#http_auth_e">http_auth_e
</a> http_auth_t;
4441 <h3 class=
"typedef"><span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span><a name=
"http_credential_t">http_credential_t
</a></h3>
4442 <p class=
"description">HTTP credential data
</p>
4444 typedef struct
<a href=
"#http_credential_s">http_credential_s
</a> http_credential_t;
4446 <h3 class=
"typedef"><a name=
"http_encoding_t">http_encoding_t
</a></h3>
4447 <p class=
"description">HTTP transfer encoding values
</p>
4449 typedef enum
<a href=
"#http_encoding_e">http_encoding_e
</a> http_encoding_t;
4451 <h3 class=
"typedef"><a name=
"http_encryption_t">http_encryption_t
</a></h3>
4452 <p class=
"description">HTTP encryption values
</p>
4454 typedef enum
<a href=
"#http_encryption_e">http_encryption_e
</a> http_encryption_t;
4456 <h3 class=
"typedef"><a name=
"http_field_t">http_field_t
</a></h3>
4457 <p class=
"description">HTTP field names
</p>
4459 typedef enum
<a href=
"#http_field_e">http_field_e
</a> http_field_t;
4461 <h3 class=
"typedef"><a name=
"http_keepalive_t">http_keepalive_t
</a></h3>
4462 <p class=
"description">HTTP keep-alive values
</p>
4464 typedef enum
<a href=
"#http_keepalive_e">http_keepalive_e
</a> http_keepalive_t;
4466 <h3 class=
"typedef"><a name=
"http_state_t">http_state_t
</a></h3>
4467 <p class=
"description">HTTP state values; states
4468 are server-oriented...
</p>
4470 typedef enum
<a href=
"#http_state_e">http_state_e
</a> / http_state_t;
4472 <h3 class=
"typedef"><a name=
"http_status_t">http_status_t
</a></h3>
4473 <p class=
"description">HTTP status codes
</p>
4475 typedef enum
<a href=
"#http_status_e">http_status_e
</a> http_status_t;
4477 <h3 class=
"typedef"><a name=
"http_t">http_t
</a></h3>
4478 <p class=
"description">HTTP connection type
</p>
4480 typedef struct _http_s http_t;
4482 <h3 class=
"typedef"><span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span><a name=
"http_timeout_cb_t">http_timeout_cb_t
</a></h3>
4483 <p class=
"description">HTTP timeout callback
</p>
4485 typedef int (*http_timeout_cb_t)(
<a href=
"#http_t">http_t
</a> *http, void *user_data);
4487 <h3 class=
"typedef"><a name=
"http_uri_coding_t">http_uri_coding_t
</a></h3>
4488 <p class=
"description">URI en/decode flags
</p>
4490 typedef enum
<a href=
"#http_uri_coding_e">http_uri_coding_e
</a> http_uri_coding_t;
4492 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"http_uri_status_t">http_uri_status_t
</a></h3>
4493 <p class=
"description">URI separation status
</p>
4495 typedef enum
<a href=
"#http_uri_status_e">http_uri_status_e
</a> http_uri_status_t;
4497 <h3 class=
"typedef"><a name=
"http_version_t">http_version_t
</a></h3>
4498 <p class=
"description">HTTP version numbers
</p>
4500 typedef enum
<a href=
"#http_version_e">http_version_e
</a> http_version_t;
4502 <h3 class=
"typedef"><a name=
"ipp_attribute_t">ipp_attribute_t
</a></h3>
4503 <p class=
"description">IPP attribute
</p>
4505 typedef struct _ipp_attribute_s ipp_attribute_t;
4507 <h3 class=
"typedef"><a name=
"ipp_copycb_t">ipp_copycb_t
</a></h3>
4508 <p class=
"description">Prototypes...
</p>
4510 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);
4512 <h3 class=
"typedef"><a name=
"ipp_dstate_t">ipp_dstate_t
</a></h3>
4513 <p class=
"description">Document states
</p>
4515 typedef enum
<a href=
"#ipp_dstate_e">ipp_dstate_e
</a> ipp_dstate_t;
4517 <h3 class=
"typedef"><a name=
"ipp_finish_t">ipp_finish_t
</a></h3>
4518 <p class=
"description">Finishings
</p>
4520 typedef enum
<a href=
"#ipp_finish_e">ipp_finish_e
</a> ipp_finish_t;
4522 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ipp_iocb_t">ipp_iocb_t
</a></h3>
4523 <p class=
"description">IPP IO Callback Function
</p>
4525 typedef ssize_t (*ipp_iocb_t)(void *context,
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *buffer, size_t bytes);
4527 <h3 class=
"typedef"><a name=
"ipp_jcollate_t">ipp_jcollate_t
</a></h3>
4528 <p class=
"description">Job collation types
</p>
4530 typedef enum
<a href=
"#ipp_jcollate_e">ipp_jcollate_e
</a> ipp_jcollate_t;
4532 <h3 class=
"typedef"><a name=
"ipp_orient_t">ipp_orient_t
</a></h3>
4533 <p class=
"description">Orientation values
</p>
4535 typedef enum
<a href=
"#ipp_orient_e">ipp_orient_e
</a> ipp_orient_t;
4537 <h3 class=
"typedef"><a name=
"ipp_pstate_t">ipp_pstate_t
</a></h3>
4538 <p class=
"description">Printer states
</p>
4540 typedef enum
<a href=
"#ipp_pstate_e">ipp_pstate_e
</a> ipp_pstate_t;
4542 <h3 class=
"typedef"><a name=
"ipp_quality_t">ipp_quality_t
</a></h3>
4543 <p class=
"description">Qualities
</p>
4545 typedef enum
<a href=
"#ipp_quality_e">ipp_quality_e
</a> ipp_quality_t;
4547 <h3 class=
"typedef"><a name=
"ipp_res_t">ipp_res_t
</a></h3>
4548 <p class=
"description">Resolution units
</p>
4550 typedef enum
<a href=
"#ipp_res_e">ipp_res_e
</a> ipp_res_t;
4552 <h3 class=
"typedef"><a name=
"ipp_state_t">ipp_state_t
</a></h3>
4553 <p class=
"description">IPP states
</p>
4555 typedef enum
<a href=
"#ipp_state_e">ipp_state_e
</a> ipp_state_t;
4557 <h3 class=
"typedef"><a name=
"ipp_t">ipp_t
</a></h3>
4558 <p class=
"description">IPP request/response data
</p>
4560 typedef struct _ipp_s ipp_t;
4562 <h3 class=
"typedef"><a name=
"ipp_uchar_t">ipp_uchar_t
</a></h3>
4563 <p class=
"description">Unsigned
8-bit integer/character
</p>
4565 typedef unsigned char ipp_uchar_t;
4567 <h2 class=
"title"><a name=
"STRUCTURES">Structures
</a></h2>
4568 <h3 class=
"struct"><a name=
"gss_auth_identity">gss_auth_identity
</a></h3>
4569 <p class=
"description">Local functions...
</p>
4570 <p class=
"code">struct gss_auth_identity {
<br>
4571 gss_buffer_t *credentialsRef;
<br>
4572 uint32_t flags;
<br>
4573 char *password;
<br>
4574 char *realm;
<br>
4575 uint32_t type;
<br>
4576 char *username;
<br>
4578 <h4 class=
"members">Members
</h4>
4580 <dt>credentialsRef
</dt>
4587 <h3 class=
"struct"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"http_addrlist_s">http_addrlist_s
</a></h3>
4588 <p class=
"description">Socket address list, which is
4589 used to enumerate all of the
4590 addresses that are associated
4591 with a hostname.
</p>
4592 <p class=
"code">struct http_addrlist_s {
<br>
4593 <a href=
"#http_addr_t">http_addr_t
</a> addr;
<br>
4594 struct
<a href=
"#http_addrlist_s">http_addrlist_s
</a> *next;
<br>
4596 <h4 class=
"members">Members
</h4>
4599 <dd class=
"description">Address
</dd>
4601 <dd class=
"description">Pointer to next address in list
</dd>
4603 <h3 class=
"struct"><span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span><a name=
"http_credential_s">http_credential_s
</a></h3>
4604 <p class=
"description">HTTP credential data
</p>
4605 <p class=
"code">struct http_credential_s {
<br>
4606 void *data;
<br>
4607 size_t datalen;
<br>
4609 <h4 class=
"members">Members
</h4>
4612 <dd class=
"description">Pointer to credential data
</dd>
4614 <dd class=
"description">Credential length
</dd>
4616 <h2 class=
"title"><a name=
"ENUMERATIONS">Constants
</a></h2>
4617 <h3 class=
"enumeration"><a name=
"http_auth_e">http_auth_e
</a></h3>
4618 <p class=
"description">HTTP authentication types
</p>
4619 <h4 class=
"constants">Constants
</h4>
4621 <dt>HTTP_AUTH_BASIC
</dt>
4622 <dd class=
"description">Basic authentication in use
</dd>
4623 <dt>HTTP_AUTH_MD5
</dt>
4624 <dd class=
"description">Digest authentication in use
</dd>
4625 <dt>HTTP_AUTH_MD5_INT
</dt>
4626 <dd class=
"description">Digest authentication in use for body
</dd>
4627 <dt>HTTP_AUTH_MD5_SESS
</dt>
4628 <dd class=
"description">MD5-session authentication in use
</dd>
4629 <dt>HTTP_AUTH_MD5_SESS_INT
</dt>
4630 <dd class=
"description">MD5-session authentication in use for body
</dd>
4631 <dt>HTTP_AUTH_NEGOTIATE
<span class=
"info"> CUPS
1.3/Mac OS X
10.5 </span></dt>
4632 <dd class=
"description">GSSAPI authentication in use
</dd>
4633 <dt>HTTP_AUTH_NONE
</dt>
4634 <dd class=
"description">No authentication in use
</dd>
4636 <h3 class=
"enumeration"><a name=
"http_encoding_e">http_encoding_e
</a></h3>
4637 <p class=
"description">HTTP transfer encoding values
</p>
4638 <h4 class=
"constants">Constants
</h4>
4640 <dt>HTTP_ENCODE_CHUNKED
</dt>
4641 <dd class=
"description">Data is chunked
</dd>
4642 <dt>HTTP_ENCODE_FIELDS
</dt>
4643 <dd class=
"description">Sending HTTP fields
</dd>
4644 <dt>HTTP_ENCODE_LENGTH
</dt>
4645 <dd class=
"description">Data is sent with Content-Length
</dd>
4647 <h3 class=
"enumeration"><a name=
"http_encryption_e">http_encryption_e
</a></h3>
4648 <p class=
"description">HTTP encryption values
</p>
4649 <h4 class=
"constants">Constants
</h4>
4651 <dt>HTTP_ENCRYPT_ALWAYS
</dt>
4652 <dd class=
"description">Always encrypt (SSL)
</dd>
4653 <dt>HTTP_ENCRYPT_IF_REQUESTED
</dt>
4654 <dd class=
"description">Encrypt if requested (TLS upgrade)
</dd>
4655 <dt>HTTP_ENCRYPT_NEVER
</dt>
4656 <dd class=
"description">Never encrypt
</dd>
4657 <dt>HTTP_ENCRYPT_REQUIRED
</dt>
4658 <dd class=
"description">Encryption is required (TLS upgrade)
</dd>
4660 <h3 class=
"enumeration"><a name=
"http_field_e">http_field_e
</a></h3>
4661 <p class=
"description">HTTP field names
</p>
4662 <h4 class=
"constants">Constants
</h4>
4664 <dt>HTTP_FIELD_ACCEPT_LANGUAGE
</dt>
4665 <dd class=
"description">Accept-Language field
</dd>
4666 <dt>HTTP_FIELD_ACCEPT_RANGES
</dt>
4667 <dd class=
"description">Accept-Ranges field
</dd>
4668 <dt>HTTP_FIELD_AUTHORIZATION
</dt>
4669 <dd class=
"description">Authorization field
</dd>
4670 <dt>HTTP_FIELD_CONNECTION
</dt>
4671 <dd class=
"description">Connection field
</dd>
4672 <dt>HTTP_FIELD_CONTENT_ENCODING
</dt>
4673 <dd class=
"description">Content-Encoding field
</dd>
4674 <dt>HTTP_FIELD_CONTENT_LANGUAGE
</dt>
4675 <dd class=
"description">Content-Language field
</dd>
4676 <dt>HTTP_FIELD_CONTENT_LENGTH
</dt>
4677 <dd class=
"description">Content-Length field
</dd>
4678 <dt>HTTP_FIELD_CONTENT_LOCATION
</dt>
4679 <dd class=
"description">Content-Location field
</dd>
4680 <dt>HTTP_FIELD_CONTENT_MD5
</dt>
4681 <dd class=
"description">Content-MD5 field
</dd>
4682 <dt>HTTP_FIELD_CONTENT_RANGE
</dt>
4683 <dd class=
"description">Content-Range field
</dd>
4684 <dt>HTTP_FIELD_CONTENT_TYPE
</dt>
4685 <dd class=
"description">Content-Type field
</dd>
4686 <dt>HTTP_FIELD_CONTENT_VERSION
</dt>
4687 <dd class=
"description">Content-Version field
</dd>
4688 <dt>HTTP_FIELD_DATE
</dt>
4689 <dd class=
"description">Date field
</dd>
4690 <dt>HTTP_FIELD_HOST
</dt>
4691 <dd class=
"description">Host field
</dd>
4692 <dt>HTTP_FIELD_IF_MODIFIED_SINCE
</dt>
4693 <dd class=
"description">If-Modified-Since field
</dd>
4694 <dt>HTTP_FIELD_IF_UNMODIFIED_SINCE
</dt>
4695 <dd class=
"description">If-Unmodified-Since field
</dd>
4696 <dt>HTTP_FIELD_KEEP_ALIVE
</dt>
4697 <dd class=
"description">Keep-Alive field
</dd>
4698 <dt>HTTP_FIELD_LAST_MODIFIED
</dt>
4699 <dd class=
"description">Last-Modified field
</dd>
4700 <dt>HTTP_FIELD_LINK
</dt>
4701 <dd class=
"description">Link field
</dd>
4702 <dt>HTTP_FIELD_LOCATION
</dt>
4703 <dd class=
"description">Location field
</dd>
4704 <dt>HTTP_FIELD_MAX
</dt>
4705 <dd class=
"description">Maximum field index
</dd>
4706 <dt>HTTP_FIELD_RANGE
</dt>
4707 <dd class=
"description">Range field
</dd>
4708 <dt>HTTP_FIELD_REFERER
</dt>
4709 <dd class=
"description">Referer field
</dd>
4710 <dt>HTTP_FIELD_RETRY_AFTER
</dt>
4711 <dd class=
"description">Retry-After field
</dd>
4712 <dt>HTTP_FIELD_TRANSFER_ENCODING
</dt>
4713 <dd class=
"description">Transfer-Encoding field
</dd>
4714 <dt>HTTP_FIELD_UNKNOWN
</dt>
4715 <dd class=
"description">Unknown field
</dd>
4716 <dt>HTTP_FIELD_UPGRADE
</dt>
4717 <dd class=
"description">Upgrade field
</dd>
4718 <dt>HTTP_FIELD_USER_AGENT
</dt>
4719 <dd class=
"description">User-Agent field
</dd>
4720 <dt>HTTP_FIELD_WWW_AUTHENTICATE
</dt>
4721 <dd class=
"description">WWW-Authenticate field
</dd>
4723 <h3 class=
"enumeration"><a name=
"http_keepalive_e">http_keepalive_e
</a></h3>
4724 <p class=
"description">HTTP keep-alive values
</p>
4725 <h4 class=
"constants">Constants
</h4>
4727 <dt>HTTP_KEEPALIVE_OFF
</dt>
4728 <dd class=
"description">No keep alive support
</dd>
4729 <dt>HTTP_KEEPALIVE_ON
</dt>
4730 <dd class=
"description">Use keep alive
</dd>
4732 <h3 class=
"enumeration"><a name=
"http_state_e">http_state_e
</a></h3>
4733 <p class=
"description">HTTP state values; states
4734 are server-oriented...
</p>
4735 <h4 class=
"constants">Constants
</h4>
4737 <dt>HTTP_CLOSE
</dt>
4738 <dd class=
"description">CLOSE command, waiting for blank line
</dd>
4739 <dt>HTTP_DELETE
</dt>
4740 <dd class=
"description">DELETE command, waiting for blank line
</dd>
4742 <dd class=
"description">GET command, waiting for blank line
</dd>
4743 <dt>HTTP_GET_SEND
</dt>
4744 <dd class=
"description">GET command, sending data
</dd>
4746 <dd class=
"description">HEAD command, waiting for blank line
</dd>
4747 <dt>HTTP_OPTIONS
</dt>
4748 <dd class=
"description">OPTIONS command, waiting for blank line
</dd>
4750 <dd class=
"description">POST command, waiting for blank line
</dd>
4751 <dt>HTTP_POST_RECV
</dt>
4752 <dd class=
"description">POST command, receiving data
</dd>
4753 <dt>HTTP_POST_SEND
</dt>
4754 <dd class=
"description">POST command, sending data
</dd>
4756 <dd class=
"description">PUT command, waiting for blank line
</dd>
4757 <dt>HTTP_PUT_RECV
</dt>
4758 <dd class=
"description">PUT command, receiving data
</dd>
4759 <dt>HTTP_STATUS
</dt>
4760 <dd class=
"description">Command complete, sending status
</dd>
4761 <dt>HTTP_TRACE
</dt>
4762 <dd class=
"description">TRACE command, waiting for blank line
</dd>
4763 <dt>HTTP_WAITING
</dt>
4764 <dd class=
"description">Waiting for command
</dd>
4766 <h3 class=
"enumeration"><a name=
"http_status_e">http_status_e
</a></h3>
4767 <p class=
"description">HTTP status codes
</p>
4768 <h4 class=
"constants">Constants
</h4>
4770 <dt>HTTP_ACCEPTED
</dt>
4771 <dd class=
"description">DELETE command was successful
</dd>
4772 <dt>HTTP_AUTHORIZATION_CANCELED
<span class=
"info"> CUPS
1.4 </span></dt>
4773 <dd class=
"description">User canceled authorization
</dd>
4774 <dt>HTTP_BAD_GATEWAY
</dt>
4775 <dd class=
"description">Bad gateway
</dd>
4776 <dt>HTTP_BAD_REQUEST
</dt>
4777 <dd class=
"description">Bad request
</dd>
4778 <dt>HTTP_CONFLICT
</dt>
4779 <dd class=
"description">Request is self-conflicting
</dd>
4780 <dt>HTTP_CONTINUE
</dt>
4781 <dd class=
"description">Everything OK, keep going...
</dd>
4782 <dt>HTTP_CREATED
</dt>
4783 <dd class=
"description">PUT command was successful
</dd>
4784 <dt>HTTP_ERROR
</dt>
4785 <dd class=
"description">An error response from httpXxxx()
</dd>
4786 <dt>HTTP_EXPECTATION_FAILED
</dt>
4787 <dd class=
"description">The expectation given in an Expect header field was not met
</dd>
4788 <dt>HTTP_FORBIDDEN
</dt>
4789 <dd class=
"description">Forbidden to access this URI
</dd>
4790 <dt>HTTP_GATEWAY_TIMEOUT
</dt>
4791 <dd class=
"description">Gateway connection timed out
</dd>
4793 <dd class=
"description">Server has gone away
</dd>
4794 <dt>HTTP_LENGTH_REQUIRED
</dt>
4795 <dd class=
"description">A content length or encoding is required
</dd>
4796 <dt>HTTP_METHOD_NOT_ALLOWED
</dt>
4797 <dd class=
"description">Method is not allowed
</dd>
4798 <dt>HTTP_MOVED_PERMANENTLY
</dt>
4799 <dd class=
"description">Document has moved permanently
</dd>
4800 <dt>HTTP_MOVED_TEMPORARILY
</dt>
4801 <dd class=
"description">Document has moved temporarily
</dd>
4802 <dt>HTTP_MULTIPLE_CHOICES
</dt>
4803 <dd class=
"description">Multiple files match request
</dd>
4804 <dt>HTTP_NOT_ACCEPTABLE
</dt>
4805 <dd class=
"description">Not Acceptable
</dd>
4806 <dt>HTTP_NOT_AUTHORITATIVE
</dt>
4807 <dd class=
"description">Information isn't authoritative
</dd>
4808 <dt>HTTP_NOT_FOUND
</dt>
4809 <dd class=
"description">URI was not found
</dd>
4810 <dt>HTTP_NOT_IMPLEMENTED
</dt>
4811 <dd class=
"description">Feature not implemented
</dd>
4812 <dt>HTTP_NOT_MODIFIED
</dt>
4813 <dd class=
"description">File not modified
</dd>
4814 <dt>HTTP_NOT_SUPPORTED
</dt>
4815 <dd class=
"description">HTTP version not supported
</dd>
4816 <dt>HTTP_NO_CONTENT
</dt>
4817 <dd class=
"description">Successful command, no new data
</dd>
4819 <dd class=
"description">OPTIONS/GET/HEAD/POST/TRACE command was successful
</dd>
4820 <dt>HTTP_PARTIAL_CONTENT
</dt>
4821 <dd class=
"description">Only a partial file was recieved/sent
</dd>
4822 <dt>HTTP_PAYMENT_REQUIRED
</dt>
4823 <dd class=
"description">Payment required
</dd>
4824 <dt>HTTP_PKI_ERROR
<span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span></dt>
4825 <dd class=
"description">Error negotiating a secure connection
</dd>
4826 <dt>HTTP_PRECONDITION
</dt>
4827 <dd class=
"description">Precondition failed
</dd>
4828 <dt>HTTP_PROXY_AUTHENTICATION
</dt>
4829 <dd class=
"description">Proxy Authentication is Required
</dd>
4830 <dt>HTTP_REQUESTED_RANGE
</dt>
4831 <dd class=
"description">The requested range is not satisfiable
</dd>
4832 <dt>HTTP_REQUEST_TIMEOUT
</dt>
4833 <dd class=
"description">Request timed out
</dd>
4834 <dt>HTTP_REQUEST_TOO_LARGE
</dt>
4835 <dd class=
"description">Request entity too large
</dd>
4836 <dt>HTTP_RESET_CONTENT
</dt>
4837 <dd class=
"description">Content was reset/recreated
</dd>
4838 <dt>HTTP_SEE_OTHER
</dt>
4839 <dd class=
"description">See this other link...
</dd>
4840 <dt>HTTP_SERVER_ERROR
</dt>
4841 <dd class=
"description">Internal server error
</dd>
4842 <dt>HTTP_SERVICE_UNAVAILABLE
</dt>
4843 <dd class=
"description">Service is unavailable
</dd>
4844 <dt>HTTP_SWITCHING_PROTOCOLS
</dt>
4845 <dd class=
"description">HTTP upgrade to TLS/SSL
</dd>
4846 <dt>HTTP_UNAUTHORIZED
</dt>
4847 <dd class=
"description">Unauthorized to access host
</dd>
4848 <dt>HTTP_UNSUPPORTED_MEDIATYPE
</dt>
4849 <dd class=
"description">The requested media type is unsupported
</dd>
4850 <dt>HTTP_UPGRADE_REQUIRED
</dt>
4851 <dd class=
"description">Upgrade to SSL/TLS required
</dd>
4852 <dt>HTTP_URI_TOO_LONG
</dt>
4853 <dd class=
"description">URI too long
</dd>
4854 <dt>HTTP_USE_PROXY
</dt>
4855 <dd class=
"description">Must use a proxy to access this URI
</dd>
4857 <h3 class=
"enumeration"><a name=
"http_uri_coding_e">http_uri_coding_e
</a></h3>
4858 <p class=
"description">URI en/decode flags
</p>
4859 <h4 class=
"constants">Constants
</h4>
4861 <dt>HTTP_URI_CODING_ALL
</dt>
4862 <dd class=
"description">En/decode everything
</dd>
4863 <dt>HTTP_URI_CODING_HOSTNAME
</dt>
4864 <dd class=
"description">En/decode the hostname portion
</dd>
4865 <dt>HTTP_URI_CODING_MOST
</dt>
4866 <dd class=
"description">En/decode all but the query
</dd>
4867 <dt>HTTP_URI_CODING_NONE
</dt>
4868 <dd class=
"description">Don't en/decode anything
</dd>
4869 <dt>HTTP_URI_CODING_QUERY
</dt>
4870 <dd class=
"description">En/decode the query portion
</dd>
4871 <dt>HTTP_URI_CODING_RESOURCE
</dt>
4872 <dd class=
"description">En/decode the resource portion
</dd>
4873 <dt>HTTP_URI_CODING_USERNAME
</dt>
4874 <dd class=
"description">En/decode the username portion
</dd>
4876 <h3 class=
"enumeration"><span class=
"info"> CUPS
1.2 </span><a name=
"http_uri_status_e">http_uri_status_e
</a></h3>
4877 <p class=
"description">URI separation status
</p>
4878 <h4 class=
"constants">Constants
</h4>
4880 <dt>HTTP_URI_BAD_ARGUMENTS
</dt>
4881 <dd class=
"description">Bad arguments to function (error)
</dd>
4882 <dt>HTTP_URI_BAD_HOSTNAME
</dt>
4883 <dd class=
"description">Bad hostname in URI (error)
</dd>
4884 <dt>HTTP_URI_BAD_PORT
</dt>
4885 <dd class=
"description">Bad port number in URI (error)
</dd>
4886 <dt>HTTP_URI_BAD_RESOURCE
</dt>
4887 <dd class=
"description">Bad resource in URI (error)
</dd>
4888 <dt>HTTP_URI_BAD_SCHEME
</dt>
4889 <dd class=
"description">Bad scheme in URI (error)
</dd>
4890 <dt>HTTP_URI_BAD_URI
</dt>
4891 <dd class=
"description">Bad/empty URI (error)
</dd>
4892 <dt>HTTP_URI_BAD_USERNAME
</dt>
4893 <dd class=
"description">Bad username in URI (error)
</dd>
4894 <dt>HTTP_URI_MISSING_RESOURCE
</dt>
4895 <dd class=
"description">Missing resource in URI (warning)
</dd>
4896 <dt>HTTP_URI_MISSING_SCHEME
</dt>
4897 <dd class=
"description">Missing scheme in URI (warning)
</dd>
4898 <dt>HTTP_URI_OK
</dt>
4899 <dd class=
"description">URI decoded OK
</dd>
4900 <dt>HTTP_URI_OVERFLOW
</dt>
4901 <dd class=
"description">URI buffer for httpAssembleURI is too small
</dd>
4902 <dt>HTTP_URI_UNKNOWN_SCHEME
</dt>
4903 <dd class=
"description">Unknown scheme in URI (warning)
</dd>
4905 <h3 class=
"enumeration"><a name=
"http_version_e">http_version_e
</a></h3>
4906 <p class=
"description">HTTP version numbers
</p>
4907 <h4 class=
"constants">Constants
</h4>
4910 <dd class=
"description">HTTP/
0.9</dd>
4912 <dd class=
"description">HTTP/
1.0</dd>
4914 <dd class=
"description">HTTP/
1.1</dd>
4916 <h3 class=
"enumeration"><a name=
"ipp_dstate_e">ipp_dstate_e
</a></h3>
4917 <p class=
"description">Document states
</p>
4918 <h4 class=
"constants">Constants
</h4>
4920 <dt>IPP_DOCUMENT_ABORTED
</dt>
4921 <dt>IPP_DOCUMENT_CANCELED
</dt>
4922 <dt>IPP_DOCUMENT_COMPLETED
</dt>
4923 <dt>IPP_DOCUMENT_PENDING
</dt>
4924 <dt>IPP_DOCUMENT_PROCESSING
</dt>
4926 <h3 class=
"enumeration"><a name=
"ipp_finish_e">ipp_finish_e
</a></h3>
4927 <p class=
"description">Finishings
</p>
4928 <h4 class=
"constants">Constants
</h4>
4930 <dt>IPP_FINISHINGS_BALE
</dt>
4931 <dd class=
"description">Bale (any type)
</dd>
4932 <dt>IPP_FINISHINGS_BIND
</dt>
4933 <dd class=
"description">Bind
</dd>
4934 <dt>IPP_FINISHINGS_BIND_BOTTOM
</dt>
4935 <dd class=
"description">Bind on bottom
</dd>
4936 <dt>IPP_FINISHINGS_BIND_LEFT
</dt>
4937 <dd class=
"description">Bind on left
</dd>
4938 <dt>IPP_FINISHINGS_BIND_RIGHT
</dt>
4939 <dd class=
"description">Bind on right
</dd>
4940 <dt>IPP_FINISHINGS_BIND_TOP
</dt>
4941 <dd class=
"description">Bind on top
</dd>
4942 <dt>IPP_FINISHINGS_BOOKLET_MAKER
</dt>
4943 <dd class=
"description">Fold to make booklet
</dd>
4944 <dt>IPP_FINISHINGS_COVER
</dt>
4945 <dd class=
"description">Add cover
</dd>
4946 <dt>IPP_FINISHINGS_EDGE_STITCH
</dt>
4947 <dd class=
"description">Stitch along any side
</dd>
4948 <dt>IPP_FINISHINGS_EDGE_STITCH_BOTTOM
</dt>
4949 <dd class=
"description">Stitch along bottom edge
</dd>
4950 <dt>IPP_FINISHINGS_EDGE_STITCH_LEFT
</dt>
4951 <dd class=
"description">Stitch along left side
</dd>
4952 <dt>IPP_FINISHINGS_EDGE_STITCH_RIGHT
</dt>
4953 <dd class=
"description">Stitch along right side
</dd>
4954 <dt>IPP_FINISHINGS_EDGE_STITCH_TOP
</dt>
4955 <dd class=
"description">Stitch along top edge
</dd>
4956 <dt>IPP_FINISHINGS_FOLD
</dt>
4957 <dd class=
"description">Fold (any type)
</dd>
4958 <dt>IPP_FINISHINGS_JOB_OFFSET
</dt>
4959 <dd class=
"description">Offset for binding (any type)
</dd>
4960 <dt>IPP_FINISHINGS_NONE
</dt>
4961 <dd class=
"description">No finishing
</dd>
4962 <dt>IPP_FINISHINGS_PUNCH
</dt>
4963 <dd class=
"description">Punch (any location/count)
</dd>
4964 <dt>IPP_FINISHINGS_SADDLE_STITCH
</dt>
4965 <dd class=
"description">Staple interior
</dd>
4966 <dt>IPP_FINISHINGS_STAPLE
</dt>
4967 <dd class=
"description">Staple (any location)
</dd>
4968 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_LEFT
</dt>
4969 <dd class=
"description">Staple bottom left corner
</dd>
4970 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT
</dt>
4971 <dd class=
"description">Staple bottom right corner
</dd>
4972 <dt>IPP_FINISHINGS_STAPLE_DUAL_BOTTOM
</dt>
4973 <dd class=
"description">Two staples on bottom
</dd>
4974 <dt>IPP_FINISHINGS_STAPLE_DUAL_LEFT
</dt>
4975 <dd class=
"description">Two staples on left
</dd>
4976 <dt>IPP_FINISHINGS_STAPLE_DUAL_RIGHT
</dt>
4977 <dd class=
"description">Two staples on right
</dd>
4978 <dt>IPP_FINISHINGS_STAPLE_DUAL_TOP
</dt>
4979 <dd class=
"description">Two staples on top
</dd>
4980 <dt>IPP_FINISHINGS_STAPLE_TOP_LEFT
</dt>
4981 <dd class=
"description">Staple top left corner
</dd>
4982 <dt>IPP_FINISHINGS_STAPLE_TOP_RIGHT
</dt>
4983 <dd class=
"description">Staple top right corner
</dd>
4984 <dt>IPP_FINISHINGS_TRIM
</dt>
4985 <dd class=
"description">Trim (any type)
</dd>
4986 <dt>IPP_FINISHINGS_TRIM_AFTER_COPIES
</dt>
4987 <dd class=
"description">Trim output after each copy
</dd>
4988 <dt>IPP_FINISHINGS_TRIM_AFTER_DOCUMENTS
</dt>
4989 <dd class=
"description">Trim output after each document
</dd>
4990 <dt>IPP_FINISHINGS_TRIM_AFTER_JOB
</dt>
4991 <dd class=
"description">Trim output after job
</dd>
4992 <dt>IPP_FINISHINGS_TRIM_AFTER_PAGES
</dt>
4993 <dd class=
"description">Trim output after each page
</dd>
4995 <h3 class=
"enumeration"><a name=
"ipp_jcollate_e">ipp_jcollate_e
</a></h3>
4996 <p class=
"description">Job collation types
</p>
4997 <h4 class=
"constants">Constants
</h4>
4999 <dt>IPP_JOB_COLLATED_DOCUMENTS
</dt>
5000 <dt>IPP_JOB_UNCOLLATED_DOCUMENTS
</dt>
5001 <dt>IPP_JOB_UNCOLLATED_SHEETS
</dt>
5003 <h3 class=
"enumeration"><a name=
"ipp_jstate_e">ipp_jstate_e
</a></h3>
5004 <p class=
"description">Job states
</p>
5005 <h4 class=
"constants">Constants
</h4>
5007 <dt>IPP_JOB_ABORTED
</dt>
5008 <dd class=
"description">Job has aborted due to error
</dd>
5009 <dt>IPP_JOB_CANCELED
</dt>
5010 <dd class=
"description">Job has been canceled
</dd>
5011 <dt>IPP_JOB_COMPLETED
</dt>
5012 <dd class=
"description">Job has completed successfully
</dd>
5013 <dt>IPP_JOB_HELD
</dt>
5014 <dd class=
"description">Job is held for printing
</dd>
5015 <dt>IPP_JOB_PENDING
</dt>
5016 <dd class=
"description">Job is waiting to be printed
</dd>
5017 <dt>IPP_JOB_PROCESSING
</dt>
5018 <dd class=
"description">Job is currently printing
</dd>
5019 <dt>IPP_JOB_STOPPED
</dt>
5020 <dd class=
"description">Job has been stopped
</dd>
5022 <h3 class=
"enumeration"><a name=
"ipp_op_e">ipp_op_e
</a></h3>
5023 <p class=
"description">IPP operations
</p>
5024 <h4 class=
"constants">Constants
</h4>
5026 <dt>CUPS_ACCEPT_JOBS
</dt>
5027 <dd class=
"description">Accept new jobs on a printer
</dd>
5028 <dt>CUPS_ADD_MODIFY_CLASS
</dt>
5029 <dd class=
"description">Add or modify a class
</dd>
5030 <dt>CUPS_ADD_MODIFY_PRINTER
</dt>
5031 <dd class=
"description">Add or modify a printer
</dd>
5032 <dt>CUPS_AUTHENTICATE_JOB
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5033 <dd class=
"description">Authenticate a job
</dd>
5034 <dt>CUPS_DELETE_CLASS
</dt>
5035 <dd class=
"description">Delete a class
</dd>
5036 <dt>CUPS_DELETE_PRINTER
</dt>
5037 <dd class=
"description">Delete a printer
</dd>
5038 <dt>CUPS_GET_CLASSES
<span class=
"info"> DEPRECATED
</span></dt>
5039 <dd class=
"description">Get a list of classes
</dd>
5040 <dt>CUPS_GET_DEFAULT
</dt>
5041 <dd class=
"description">Get the default printer
</dd>
5042 <dt>CUPS_GET_DEVICES
</dt>
5043 <dd class=
"description">Get a list of supported devices
</dd>
5044 <dt>CUPS_GET_DOCUMENT
<span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span></dt>
5045 <dd class=
"description">Get a document file
</dd>
5046 <dt>CUPS_GET_PPD
<span class=
"info"> CUPS
1.3/Mac OS X
10.5 </span></dt>
5047 <dd class=
"description">Get a PPD file
</dd>
5048 <dt>CUPS_GET_PPDS
</dt>
5049 <dd class=
"description">Get a list of supported drivers
</dd>
5050 <dt>CUPS_GET_PRINTERS
</dt>
5051 <dd class=
"description">Get a list of printers and/or classes
</dd>
5052 <dt>CUPS_MOVE_JOB
</dt>
5053 <dd class=
"description">Move a job to a different printer
</dd>
5054 <dt>CUPS_REJECT_JOBS
</dt>
5055 <dd class=
"description">Reject new jobs on a printer
</dd>
5056 <dt>CUPS_SET_DEFAULT
</dt>
5057 <dd class=
"description">Set the default printer
</dd>
5058 <dt>IPP_CANCEL_JOB
</dt>
5059 <dd class=
"description">Cancel a job
</dd>
5060 <dt>IPP_CANCEL_JOBS
</dt>
5061 <dd class=
"description">Cancel-Jobs
</dd>
5062 <dt>IPP_CANCEL_MY_JOBS
</dt>
5063 <dd class=
"description">Cancel-My-Jobs
</dd>
5064 <dt>IPP_CANCEL_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5065 <dd class=
"description">Cancel a subscription
</dd>
5066 <dt>IPP_CLOSE_JOB
</dt>
5067 <dd class=
"description">Close-Job
</dd>
5068 <dt>IPP_CREATE_JOB
</dt>
5069 <dd class=
"description">Create an empty print job
</dd>
5070 <dt>IPP_CREATE_JOB_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5071 <dd class=
"description">Create a job subscription
</dd>
5072 <dt>IPP_CREATE_PRINTER_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5073 <dd class=
"description">Create a printer subscription
</dd>
5074 <dt>IPP_DISABLE_PRINTER
</dt>
5075 <dd class=
"description">Stop a printer
</dd>
5076 <dt>IPP_ENABLE_PRINTER
</dt>
5077 <dd class=
"description">Start a printer
</dd>
5078 <dt>IPP_GET_JOBS
</dt>
5079 <dd class=
"description">Get a list of jobs
</dd>
5080 <dt>IPP_GET_JOB_ATTRIBUTES
</dt>
5081 <dd class=
"description">Get job attributes
</dd>
5082 <dt>IPP_GET_NOTIFICATIONS
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5083 <dd class=
"description">Get notification events
</dd>
5084 <dt>IPP_GET_PRINTER_ATTRIBUTES
</dt>
5085 <dd class=
"description">Get printer attributes
</dd>
5086 <dt>IPP_GET_PRINTER_SUPPORTED_VALUES
</dt>
5087 <dd class=
"description">Get supported attribute values
</dd>
5088 <dt>IPP_GET_SUBSCRIPTIONS
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5089 <dd class=
"description">Get list of subscriptions
</dd>
5090 <dt>IPP_GET_SUBSCRIPTION_ATTRIBUTES
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5091 <dd class=
"description">Get subscription attributes
</dd>
5092 <dt>IPP_HOLD_JOB
</dt>
5093 <dd class=
"description">Hold a job for printing
</dd>
5094 <dt>IPP_IDENTIFY_PRINTER
</dt>
5095 <dd class=
"description">Identify-Printer (proposed IPP JPS3)
</dd>
5096 <dt>IPP_PAUSE_PRINTER
</dt>
5097 <dd class=
"description">Stop a printer
</dd>
5098 <dt>IPP_PRINT_JOB
</dt>
5099 <dd class=
"description">Print a single file
</dd>
5100 <dt>IPP_PURGE_JOBS
</dt>
5101 <dd class=
"description">Cancel all jobs
</dd>
5102 <dt>IPP_RELEASE_JOB
</dt>
5103 <dd class=
"description">Release a job for printing
</dd>
5104 <dt>IPP_RENEW_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5105 <dd class=
"description">Renew a printer subscription
</dd>
5106 <dt>IPP_RESTART_JOB
</dt>
5107 <dd class=
"description">Reprint a job
</dd>
5108 <dt>IPP_RESUBMIT_JOB
</dt>
5109 <dd class=
"description">Resubmit-Job
</dd>
5110 <dt>IPP_RESUME_PRINTER
</dt>
5111 <dd class=
"description">Start a printer
</dd>
5112 <dt>IPP_SEND_DOCUMENT
</dt>
5113 <dd class=
"description">Add a file to a job
</dd>
5114 <dt>IPP_SET_JOB_ATTRIBUTES
</dt>
5115 <dd class=
"description">Set job attributes
</dd>
5116 <dt>IPP_VALIDATE_JOB
</dt>
5117 <dd class=
"description">Validate job options
</dd>
5119 <h3 class=
"enumeration"><a name=
"ipp_orient_e">ipp_orient_e
</a></h3>
5120 <p class=
"description">Orientation values
</p>
5121 <h4 class=
"constants">Constants
</h4>
5123 <dt>IPP_LANDSCAPE
</dt>
5124 <dd class=
"description">90 degrees counter-clockwise
</dd>
5125 <dt>IPP_PORTRAIT
</dt>
5126 <dd class=
"description">No rotation
</dd>
5127 <dt>IPP_REVERSE_LANDSCAPE
</dt>
5128 <dd class=
"description">90 degrees clockwise
</dd>
5129 <dt>IPP_REVERSE_PORTRAIT
</dt>
5130 <dd class=
"description">180 degrees
</dd>
5132 <h3 class=
"enumeration"><a name=
"ipp_pstate_e">ipp_pstate_e
</a></h3>
5133 <p class=
"description">Printer states
</p>
5134 <h4 class=
"constants">Constants
</h4>
5136 <dt>IPP_PRINTER_IDLE
</dt>
5137 <dd class=
"description">Printer is idle
</dd>
5138 <dt>IPP_PRINTER_PROCESSING
</dt>
5139 <dd class=
"description">Printer is working
</dd>
5140 <dt>IPP_PRINTER_STOPPED
</dt>
5141 <dd class=
"description">Printer is stopped
</dd>
5143 <h3 class=
"enumeration"><a name=
"ipp_quality_e">ipp_quality_e
</a></h3>
5144 <p class=
"description">Qualities
</p>
5145 <h4 class=
"constants">Constants
</h4>
5147 <dt>IPP_QUALITY_DRAFT
</dt>
5148 <dd class=
"description">Draft quality
</dd>
5149 <dt>IPP_QUALITY_HIGH
</dt>
5150 <dd class=
"description">High quality
</dd>
5151 <dt>IPP_QUALITY_NORMAL
</dt>
5152 <dd class=
"description">Normal quality
</dd>
5154 <h3 class=
"enumeration"><a name=
"ipp_res_e">ipp_res_e
</a></h3>
5155 <p class=
"description">Resolution units
</p>
5156 <h4 class=
"constants">Constants
</h4>
5158 <dt>IPP_RES_PER_CM
</dt>
5159 <dd class=
"description">Pixels per centimeter
</dd>
5160 <dt>IPP_RES_PER_INCH
</dt>
5161 <dd class=
"description">Pixels per inch
</dd>
5163 <h3 class=
"enumeration"><a name=
"ipp_state_e">ipp_state_e
</a></h3>
5164 <p class=
"description">IPP states
</p>
5165 <h4 class=
"constants">Constants
</h4>
5167 <dt>IPP_ATTRIBUTE
</dt>
5168 <dd class=
"description">One or more attributes need to be sent/received
</dd>
5170 <dd class=
"description">IPP request data needs to be sent/received
</dd>
5172 <dd class=
"description">An error occurred
</dd>
5173 <dt>IPP_HEADER
</dt>
5174 <dd class=
"description">The request header needs to be sent/received
</dd>
5176 <dd class=
"description">Nothing is happening/request completed
</dd>
5178 <h3 class=
"enumeration"><a name=
"ipp_status_e">ipp_status_e
</a></h3>
5179 <p class=
"description">IPP status codes
</p>
5180 <h4 class=
"constants">Constants
</h4>
5182 <dt>CUPS_SEE_OTHER
</dt>
5183 <dd class=
"description">cups-see-other
</dd>
5184 <dt>IPP_ATTRIBUTES
</dt>
5185 <dd class=
"description">client-error-attributes-or-values-not-supported
</dd>
5186 <dt>IPP_ATTRIBUTES_NOT_SETTABLE
</dt>
5187 <dd class=
"description">client-error-attributes-not-settable
</dd>
5188 <dt>IPP_AUTHENTICATION_CANCELED
<span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span></dt>
5189 <dd class=
"description">Authentication canceled by user
</dd>
5190 <dt>IPP_BAD_REQUEST
</dt>
5191 <dd class=
"description">client-error-bad-request
</dd>
5192 <dt>IPP_CHARSET
</dt>
5193 <dd class=
"description">client-error-charset-not-supported
</dd>
5194 <dt>IPP_COMPRESSION_ERROR
</dt>
5195 <dd class=
"description">client-error-compression-error
</dd>
5196 <dt>IPP_COMPRESSION_NOT_SUPPORTED
</dt>
5197 <dd class=
"description">client-error-compression-not-supported
</dd>
5198 <dt>IPP_CONFLICT
</dt>
5199 <dd class=
"description">client-error-conflicting-attributes
</dd>
5200 <dt>IPP_DEVICE_ERROR
</dt>
5201 <dd class=
"description">server-error-device-error
</dd>
5202 <dt>IPP_DOCUMENT_ACCESS_ERROR
</dt>
5203 <dd class=
"description">client-error-document-access-error
</dd>
5204 <dt>IPP_DOCUMENT_FORMAT
</dt>
5205 <dd class=
"description">client-error-document-format-not-supported
</dd>
5206 <dt>IPP_DOCUMENT_FORMAT_ERROR
</dt>
5207 <dd class=
"description">client-error-document-format-error
</dd>
5208 <dt>IPP_DOCUMENT_PASSWORD_ERROR
</dt>
5209 <dd class=
"description">client-error-document-password-error
</dd>
5210 <dt>IPP_DOCUMENT_PERMISSION_ERROR
</dt>
5211 <dd class=
"description">client-error-document-permission-error
</dd>
5212 <dt>IPP_DOCUMENT_SECURITY_ERROR
</dt>
5213 <dd class=
"description">client-error-document-security-error
</dd>
5214 <dt>IPP_DOCUMENT_UNPRINTABLE_ERROR
</dt>
5215 <dd class=
"description">client-error-document-unprintable-error
</dd>
5216 <dt>IPP_ERROR_JOB_CANCELED
</dt>
5217 <dd class=
"description">server-error-job-canceled
</dd>
5218 <dt>IPP_FORBIDDEN
</dt>
5219 <dd class=
"description">client-error-forbidden
</dd>
5221 <dd class=
"description">client-error-gone
</dd>
5222 <dt>IPP_IGNORED_ALL_SUBSCRIPTIONS
</dt>
5223 <dd class=
"description">client-error-ignored-all-subscriptions
</dd>
5224 <dt>IPP_INTERNAL_ERROR
</dt>
5225 <dd class=
"description">server-error-internal-error
</dd>
5226 <dt>IPP_MULTIPLE_JOBS_NOT_SUPPORTED
</dt>
5227 <dd class=
"description">server-error-multiple-document-jobs-not-supported
</dd>
5228 <dt>IPP_NOT_ACCEPTING
</dt>
5229 <dd class=
"description">server-error-not-accepting-jobs
</dd>
5230 <dt>IPP_NOT_AUTHENTICATED
</dt>
5231 <dd class=
"description">client-error-not-authenticated
</dd>
5232 <dt>IPP_NOT_AUTHORIZED
</dt>
5233 <dd class=
"description">client-error-not-authorized
</dd>
5234 <dt>IPP_NOT_FOUND
</dt>
5235 <dd class=
"description">client-error-not-found
</dd>
5236 <dt>IPP_NOT_POSSIBLE
</dt>
5237 <dd class=
"description">client-error-not-possible
</dd>
5239 <dd class=
"description">successful-ok
</dd>
5240 <dt>IPP_OK_CONFLICT
</dt>
5241 <dd class=
"description">successful-ok-conflicting-attributes
</dd>
5242 <dt>IPP_OK_EVENTS_COMPLETE
</dt>
5243 <dd class=
"description">successful-ok-events-complete
</dd>
5244 <dt>IPP_OK_IGNORED_SUBSCRIPTIONS
</dt>
5245 <dd class=
"description">successful-ok-ignored-subscriptions
</dd>
5246 <dt>IPP_OK_SUBST
</dt>
5247 <dd class=
"description">successful-ok-ignored-or-substituted-attributes
</dd>
5248 <dt>IPP_OK_TOO_MANY_EVENTS
</dt>
5249 <dd class=
"description">successful-ok-too-many-events
</dd>
5250 <dt>IPP_OPERATION_NOT_SUPPORTED
</dt>
5251 <dd class=
"description">server-error-operation-not-supported
</dd>
5252 <dt>IPP_PKI_ERROR
<span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span></dt>
5253 <dd class=
"description">Error negotiating a secure connection
</dd>
5254 <dt>IPP_PRINTER_BUSY
</dt>
5255 <dd class=
"description">server-error-busy
</dd>
5256 <dt>IPP_PRINTER_IS_DEACTIVATED
</dt>
5257 <dd class=
"description">server-error-printer-is-deactivated
</dd>
5258 <dt>IPP_REQUEST_ENTITY
</dt>
5259 <dd class=
"description">client-error-request-entity-too-large
</dd>
5260 <dt>IPP_REQUEST_VALUE
</dt>
5261 <dd class=
"description">client-error-request-value-too-long
</dd>
5262 <dt>IPP_SERVICE_UNAVAILABLE
</dt>
5263 <dd class=
"description">server-error-service-unavailable
</dd>
5264 <dt>IPP_TEMPORARY_ERROR
</dt>
5265 <dd class=
"description">server-error-temporary-error
</dd>
5266 <dt>IPP_TIMEOUT
</dt>
5267 <dd class=
"description">client-error-timeout
</dd>
5268 <dt>IPP_TOO_MANY_SUBSCRIPTIONS
</dt>
5269 <dd class=
"description">client-error-too-many-subscriptions
</dd>
5270 <dt>IPP_UPGRADE_REQUIRED
</dt>
5271 <dd class=
"description">TLS upgrade required
</dd>
5272 <dt>IPP_URI_SCHEME
</dt>
5273 <dd class=
"description">client-error-uri-scheme-not-supported
</dd>
5274 <dt>IPP_VERSION_NOT_SUPPORTED
</dt>
5275 <dd class=
"description">server-error-version-not-supported
</dd>
5277 <h3 class=
"enumeration"><a name=
"ipp_tag_e">ipp_tag_e
</a></h3>
5278 <p class=
"description">Format tags for attributes
</p>
5279 <h4 class=
"constants">Constants
</h4>
5281 <dt>IPP_TAG_ADMINDEFINE
</dt>
5282 <dd class=
"description">Admin-defined value
</dd>
5283 <dt>IPP_TAG_BEGIN_COLLECTION
</dt>
5284 <dd class=
"description">Beginning of collection value
</dd>
5285 <dt>IPP_TAG_BOOLEAN
</dt>
5286 <dd class=
"description">Boolean value
</dd>
5287 <dt>IPP_TAG_CHARSET
</dt>
5288 <dd class=
"description">Character set value
</dd>
5289 <dt>IPP_TAG_DATE
</dt>
5290 <dd class=
"description">Date/time value
</dd>
5291 <dt>IPP_TAG_DEFAULT
</dt>
5292 <dd class=
"description">Default value
</dd>
5293 <dt>IPP_TAG_DELETEATTR
</dt>
5294 <dd class=
"description">Delete-attribute value
</dd>
5295 <dt>IPP_TAG_DOCUMENT
</dt>
5296 <dd class=
"description">Document group
</dd>
5297 <dt>IPP_TAG_END
</dt>
5298 <dd class=
"description">End-of-attributes
</dd>
5299 <dt>IPP_TAG_END_COLLECTION
</dt>
5300 <dd class=
"description">End of collection value
</dd>
5301 <dt>IPP_TAG_ENUM
</dt>
5302 <dd class=
"description">Enumeration value
</dd>
5303 <dt>IPP_TAG_EVENT_NOTIFICATION
</dt>
5304 <dd class=
"description">Event group
</dd>
5305 <dt>IPP_TAG_EXTENSION
</dt>
5306 <dd class=
"description">Extension point for
32-bit tags
</dd>
5307 <dt>IPP_TAG_INTEGER
</dt>
5308 <dd class=
"description">Integer value
</dd>
5309 <dt>IPP_TAG_JOB
</dt>
5310 <dd class=
"description">Job group
</dd>
5311 <dt>IPP_TAG_KEYWORD
</dt>
5312 <dd class=
"description">Keyword value
</dd>
5313 <dt>IPP_TAG_LANGUAGE
</dt>
5314 <dd class=
"description">Language value
</dd>
5315 <dt>IPP_TAG_MEMBERNAME
</dt>
5316 <dd class=
"description">Collection member name value
</dd>
5317 <dt>IPP_TAG_MIMETYPE
</dt>
5318 <dd class=
"description">MIME media type value
</dd>
5319 <dt>IPP_TAG_NAME
</dt>
5320 <dd class=
"description">Name value
</dd>
5321 <dt>IPP_TAG_NAMELANG
</dt>
5322 <dd class=
"description">Name-with-language value
</dd>
5323 <dt>IPP_TAG_NOTSETTABLE
</dt>
5324 <dd class=
"description">Not-settable value
</dd>
5325 <dt>IPP_TAG_NOVALUE
</dt>
5326 <dd class=
"description">No-value value
</dd>
5327 <dt>IPP_TAG_OPERATION
</dt>
5328 <dd class=
"description">Operation group
</dd>
5329 <dt>IPP_TAG_PRINTER
</dt>
5330 <dd class=
"description">Printer group
</dd>
5331 <dt>IPP_TAG_RANGE
</dt>
5332 <dd class=
"description">Range value
</dd>
5333 <dt>IPP_TAG_RESOLUTION
</dt>
5334 <dd class=
"description">Resolution value
</dd>
5335 <dt>IPP_TAG_STRING
</dt>
5336 <dd class=
"description">Octet string value
</dd>
5337 <dt>IPP_TAG_SUBSCRIPTION
</dt>
5338 <dd class=
"description">Subscription group
</dd>
5339 <dt>IPP_TAG_TEXT
</dt>
5340 <dd class=
"description">Text value
</dd>
5341 <dt>IPP_TAG_TEXTLANG
</dt>
5342 <dd class=
"description">Text-with-language value
</dd>
5343 <dt>IPP_TAG_UNKNOWN
</dt>
5344 <dd class=
"description">Unknown value
</dd>
5345 <dt>IPP_TAG_UNSUPPORTED_GROUP
</dt>
5346 <dd class=
"description">Unsupported attributes group
</dd>
5347 <dt>IPP_TAG_UNSUPPORTED_VALUE
</dt>
5348 <dd class=
"description">Unsupported value
</dd>
5349 <dt>IPP_TAG_URI
</dt>
5350 <dd class=
"description">URI value
</dd>
5351 <dt>IPP_TAG_URISCHEME
</dt>
5352 <dd class=
"description">URI scheme value
</dd>
5353 <dt>IPP_TAG_ZERO
</dt>
5354 <dd class=
"description">Zero tag - used for separators
</dd>