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=
"#httpReconnect2" title=
"Reconnect to a HTTP server with timeout and optional
472 cancel.">httpReconnect2
</a></li>
473 <li><a href=
"#httpSeparate" title=
"Separate a Universal Resource Identifier into its
474 components.">httpSeparate
</a></li>
475 <li><a href=
"#httpSeparate2" title=
"Separate a Universal Resource Identifier into its
476 components.">httpSeparate2
</a></li>
477 <li><a href=
"#httpSeparateURI" title=
"Separate a Universal Resource Identifier into its
478 components.">httpSeparateURI
</a></li>
479 <li><a href=
"#httpSetAuthString" title=
"Set the current authorization string.">httpSetAuthString
</a></li>
480 <li><a href=
"#httpSetCookie" title=
"Set the cookie value(s).">httpSetCookie
</a></li>
481 <li><a href=
"#httpSetCredentials" title=
"Set the credentials associated with an encrypted
482 connection.">httpSetCredentials
</a></li>
483 <li><a href=
"#httpSetExpect" title=
"Set the Expect: header in a request.">httpSetExpect
</a></li>
484 <li><a href=
"#httpSetField" title=
"Set the value of an HTTP header.">httpSetField
</a></li>
485 <li><a href=
"#httpSetLength" title=
"Set the content-length and content-encoding.">httpSetLength
</a></li>
486 <li><a href=
"#httpSetTimeout" title=
"Set read/write timeouts and an optional callback.">httpSetTimeout
</a></li>
487 <li><a href=
"#httpStatus" title=
"Return a short string describing a HTTP status code.">httpStatus
</a></li>
488 <li><a href=
"#httpTrace" title=
"Send an TRACE request to the server.">httpTrace
</a></li>
489 <li><a href=
"#httpUpdate" title=
"Update the current HTTP state for incoming data.">httpUpdate
</a></li>
490 <li><a href=
"#httpWait" title=
"Wait for data available on a connection.">httpWait
</a></li>
491 <li><a href=
"#httpWrite" title=
"Write data to a HTTP connection.">httpWrite
</a></li>
492 <li><a href=
"#httpWrite2" title=
"Write data to a HTTP connection.">httpWrite2
</a></li>
493 <li><a href=
"#ippAddBoolean" title=
"Add a boolean attribute to an IPP message.">ippAddBoolean
</a></li>
494 <li><a href=
"#ippAddBooleans" title=
"Add an array of boolean values.">ippAddBooleans
</a></li>
495 <li><a href=
"#ippAddCollection" title=
"Add a collection value.">ippAddCollection
</a></li>
496 <li><a href=
"#ippAddCollections" title=
"Add an array of collection values.">ippAddCollections
</a></li>
497 <li><a href=
"#ippAddDate" title=
"Add a date attribute to an IPP message.">ippAddDate
</a></li>
498 <li><a href=
"#ippAddInteger" title=
"Add a integer attribute to an IPP message.">ippAddInteger
</a></li>
499 <li><a href=
"#ippAddIntegers" title=
"Add an array of integer values.">ippAddIntegers
</a></li>
500 <li><a href=
"#ippAddOctetString" title=
"Add an octetString value to an IPP message.">ippAddOctetString
</a></li>
501 <li><a href=
"#ippAddOutOfBand" title=
"Add an out-of-band value to an IPP message.">ippAddOutOfBand
</a></li>
502 <li><a href=
"#ippAddRange" title=
"Add a range of values to an IPP message.">ippAddRange
</a></li>
503 <li><a href=
"#ippAddRanges" title=
"Add ranges of values to an IPP message.">ippAddRanges
</a></li>
504 <li><a href=
"#ippAddResolution" title=
"Add a resolution value to an IPP message.">ippAddResolution
</a></li>
505 <li><a href=
"#ippAddResolutions" title=
"Add resolution values to an IPP message.">ippAddResolutions
</a></li>
506 <li><a href=
"#ippAddSeparator" title=
"Add a group separator to an IPP message.">ippAddSeparator
</a></li>
507 <li><a href=
"#ippAddString" title=
"Add a language-encoded string to an IPP message.">ippAddString
</a></li>
508 <li><a href=
"#ippAddStrings" title=
"Add language-encoded strings to an IPP message.">ippAddStrings
</a></li>
509 <li><a href=
"#ippAttributeString" title=
"Convert the attribute's value to a string.">ippAttributeString
</a></li>
510 <li><a href=
"#ippCopyAttribute" title=
"Copy an attribute.">ippCopyAttribute
</a></li>
511 <li><a href=
"#ippCopyAttributes" title=
"Copy attributes from one IPP message to another.">ippCopyAttributes
</a></li>
512 <li><a href=
"#ippDateToTime" title=
"Convert from RFC 1903 Date/Time format to UNIX time
513 in seconds.">ippDateToTime
</a></li>
514 <li><a href=
"#ippDelete" title=
"Delete an IPP message.">ippDelete
</a></li>
515 <li><a href=
"#ippDeleteAttribute" title=
"Delete a single attribute in an IPP message.">ippDeleteAttribute
</a></li>
516 <li><a href=
"#ippDeleteValues" title=
"Delete values in an attribute.">ippDeleteValues
</a></li>
517 <li><a href=
"#ippEnumString" title=
"Return a string corresponding to the enum value.">ippEnumString
</a></li>
518 <li><a href=
"#ippEnumValue" title=
"Return the value associated with a given enum string.">ippEnumValue
</a></li>
519 <li><a href=
"#ippErrorString" title=
"Return a name for the given status code.">ippErrorString
</a></li>
520 <li><a href=
"#ippErrorValue" title=
"Return a status code for the given name.">ippErrorValue
</a></li>
521 <li><a href=
"#ippFindAttribute" title=
"Find a named attribute in a request.">ippFindAttribute
</a></li>
522 <li><a href=
"#ippFindNextAttribute" title=
"Find the next named attribute in a request.">ippFindNextAttribute
</a></li>
523 <li><a href=
"#ippFirstAttribute" title=
"Return the first attribute in the message.">ippFirstAttribute
</a></li>
524 <li><a href=
"#ippGetBoolean" title=
"Get a boolean value for an attribute.">ippGetBoolean
</a></li>
525 <li><a href=
"#ippGetCollection" title=
"Get a collection value for an attribute.">ippGetCollection
</a></li>
526 <li><a href=
"#ippGetCount" title=
"Get the number of values in an attribute.">ippGetCount
</a></li>
527 <li><a href=
"#ippGetDate" title=
"Get a date value for an attribute.">ippGetDate
</a></li>
528 <li><a href=
"#ippGetGroupTag" title=
"Get the group associated with an attribute.">ippGetGroupTag
</a></li>
529 <li><a href=
"#ippGetInteger" title=
"Get the integer/enum value for an attribute.">ippGetInteger
</a></li>
530 <li><a href=
"#ippGetName" title=
"Get the attribute name.">ippGetName
</a></li>
531 <li><a href=
"#ippGetOperation" title=
"Get the operation ID in an IPP message.">ippGetOperation
</a></li>
532 <li><a href=
"#ippGetRange" title=
"Get a rangeOfInteger value from an attribute.">ippGetRange
</a></li>
533 <li><a href=
"#ippGetRequestId" title=
"Get the request ID from an IPP message.">ippGetRequestId
</a></li>
534 <li><a href=
"#ippGetResolution" title=
"Get a resolution value for an attribute.">ippGetResolution
</a></li>
535 <li><a href=
"#ippGetState" title=
"Get the IPP message state.">ippGetState
</a></li>
536 <li><a href=
"#ippGetStatusCode" title=
"Get the status code from an IPP response or event message.">ippGetStatusCode
</a></li>
537 <li><a href=
"#ippGetString" title=
"Return the value...">ippGetString
</a></li>
538 <li><a href=
"#ippGetValueTag" title=
"Get the value tag for an attribute.">ippGetValueTag
</a></li>
539 <li><a href=
"#ippGetVersion" title=
"Get the major and minor version number from an IPP message.">ippGetVersion
</a></li>
540 <li><a href=
"#ippLength" title=
"Compute the length of an IPP message.">ippLength
</a></li>
541 <li><a href=
"#ippNew" title=
"Allocate a new IPP message.">ippNew
</a></li>
542 <li><a href=
"#ippNewRequest" title=
"Allocate a new IPP request message.">ippNewRequest
</a></li>
543 <li><a href=
"#ippNextAttribute" title=
"Return the next attribute in the message.">ippNextAttribute
</a></li>
544 <li><a href=
"#ippOpString" title=
"Return a name for the given operation id.">ippOpString
</a></li>
545 <li><a href=
"#ippOpValue" title=
"Return an operation id for the given name.">ippOpValue
</a></li>
546 <li><a href=
"#ippPort" title=
"Return the default IPP port number.">ippPort
</a></li>
547 <li><a href=
"#ippRead" title=
"Read data for an IPP message from a HTTP connection.">ippRead
</a></li>
548 <li><a href=
"#ippReadFile" title=
"Read data for an IPP message from a file.">ippReadFile
</a></li>
549 <li><a href=
"#ippReadIO" title=
"Read data for an IPP message.">ippReadIO
</a></li>
550 <li><a href=
"#ippSetBoolean" title=
"Set a boolean value in an attribute.">ippSetBoolean
</a></li>
551 <li><a href=
"#ippSetCollection" title=
"Set a collection value in an attribute.">ippSetCollection
</a></li>
552 <li><a href=
"#ippSetDate" title=
"Set a date value in an attribute.">ippSetDate
</a></li>
553 <li><a href=
"#ippSetGroupTag" title=
"Set the group tag of an attribute.">ippSetGroupTag
</a></li>
554 <li><a href=
"#ippSetInteger" title=
"Set an integer or enum value in an attribute.">ippSetInteger
</a></li>
555 <li><a href=
"#ippSetName" title=
"Set the name of an attribute.">ippSetName
</a></li>
556 <li><a href=
"#ippSetOperation" title=
"Set the operation ID in an IPP request message.">ippSetOperation
</a></li>
557 <li><a href=
"#ippSetPort" title=
"Set the default port number.">ippSetPort
</a></li>
558 <li><a href=
"#ippSetRange" title=
"Set a rangeOfInteger value in an attribute.">ippSetRange
</a></li>
559 <li><a href=
"#ippSetRequestId" title=
"Set the request ID in an IPP message.">ippSetRequestId
</a></li>
560 <li><a href=
"#ippSetResolution" title=
"Set a resolution value in an attribute.">ippSetResolution
</a></li>
561 <li><a href=
"#ippSetState" title=
"Set the current state of the IPP message.">ippSetState
</a></li>
562 <li><a href=
"#ippSetStatusCode" title=
"Set the status code in an IPP response or event message.">ippSetStatusCode
</a></li>
563 <li><a href=
"#ippSetString" title=
"Set a string value in an attribute.">ippSetString
</a></li>
564 <li><a href=
"#ippSetValueTag" title=
"Set the value tag of an attribute.">ippSetValueTag
</a></li>
565 <li><a href=
"#ippSetVersion" title=
"Set the version number in an IPP message.">ippSetVersion
</a></li>
566 <li><a href=
"#ippTagString" title=
"Return the tag name corresponding to a tag value.">ippTagString
</a></li>
567 <li><a href=
"#ippTagValue" title=
"Return the tag value corresponding to a tag name.">ippTagValue
</a></li>
568 <li><a href=
"#ippTimeToDate" title=
"Convert from UNIX time to RFC 1903 format.">ippTimeToDate
</a></li>
569 <li><a href=
"#ippWrite" title=
"Write data for an IPP message to a HTTP connection.">ippWrite
</a></li>
570 <li><a href=
"#ippWriteFile" title=
"Write data for an IPP message to a file.">ippWriteFile
</a></li>
571 <li><a href=
"#ippWriteIO" title=
"Write data for an IPP message.">ippWriteIO
</a></li>
573 <li><a href=
"#TYPES">Data Types
</a><ul class=
"code">
574 <li><a href=
"#gss_auth_identity_desc" title=
"Local functions...">gss_auth_identity_desc
</a></li>
575 <li><a href=
"#http_addr_t" title=
"Socket address union, which
576 makes using IPv6 and other
577 address types easier and
578 more portable. ">http_addr_t
</a></li>
579 <li><a href=
"#http_addrlist_t" title=
"Socket address list, which is
580 used to enumerate all of the
581 addresses that are associated
582 with a hostname. ">http_addrlist_t
</a></li>
583 <li><a href=
"#http_auth_t" title=
"HTTP authentication types">http_auth_t
</a></li>
584 <li><a href=
"#http_credential_t" title=
"HTTP credential data ">http_credential_t
</a></li>
585 <li><a href=
"#http_encoding_t" title=
"HTTP transfer encoding values">http_encoding_t
</a></li>
586 <li><a href=
"#http_encryption_t" title=
"HTTP encryption values">http_encryption_t
</a></li>
587 <li><a href=
"#http_field_t" title=
"HTTP field names">http_field_t
</a></li>
588 <li><a href=
"#http_keepalive_t" title=
"HTTP keep-alive values">http_keepalive_t
</a></li>
589 <li><a href=
"#http_state_t" title=
"HTTP state values; states
590 are server-oriented...">http_state_t
</a></li>
591 <li><a href=
"#http_status_t" title=
"HTTP status codes">http_status_t
</a></li>
592 <li><a href=
"#http_t" title=
"HTTP connection type">http_t
</a></li>
593 <li><a href=
"#http_timeout_cb_t" title=
"HTTP timeout callback ">http_timeout_cb_t
</a></li>
594 <li><a href=
"#http_uri_coding_t" title=
"URI en/decode flags">http_uri_coding_t
</a></li>
595 <li><a href=
"#http_uri_status_t" title=
"URI separation status ">http_uri_status_t
</a></li>
596 <li><a href=
"#http_version_t" title=
"HTTP version numbers">http_version_t
</a></li>
597 <li><a href=
"#ipp_attribute_t" title=
"IPP attribute">ipp_attribute_t
</a></li>
598 <li><a href=
"#ipp_copycb_t" title=
"Prototypes...">ipp_copycb_t
</a></li>
599 <li><a href=
"#ipp_dstate_t" title=
"Document states">ipp_dstate_t
</a></li>
600 <li><a href=
"#ipp_finish_t" title=
"Finishings">ipp_finish_t
</a></li>
601 <li><a href=
"#ipp_iocb_t" title=
"IPP IO Callback Function ">ipp_iocb_t
</a></li>
602 <li><a href=
"#ipp_jcollate_t" title=
"Job collation types">ipp_jcollate_t
</a></li>
603 <li><a href=
"#ipp_orient_t" title=
"Orientation values">ipp_orient_t
</a></li>
604 <li><a href=
"#ipp_pstate_t" title=
"Printer states">ipp_pstate_t
</a></li>
605 <li><a href=
"#ipp_quality_t" title=
"Qualities">ipp_quality_t
</a></li>
606 <li><a href=
"#ipp_res_t" title=
"Resolution units">ipp_res_t
</a></li>
607 <li><a href=
"#ipp_state_t" title=
"IPP states">ipp_state_t
</a></li>
608 <li><a href=
"#ipp_t" title=
"IPP request/response data">ipp_t
</a></li>
609 <li><a href=
"#ipp_uchar_t" title=
"Unsigned 8-bit integer/character">ipp_uchar_t
</a></li>
611 <li><a href=
"#STRUCTURES">Structures
</a><ul class=
"code">
612 <li><a href=
"#gss_auth_identity" title=
"Local functions...">gss_auth_identity
</a></li>
613 <li><a href=
"#http_addrlist_s" title=
"Socket address list, which is
614 used to enumerate all of the
615 addresses that are associated
616 with a hostname. ">http_addrlist_s
</a></li>
617 <li><a href=
"#http_credential_s" title=
"HTTP credential data ">http_credential_s
</a></li>
619 <li><a href=
"#ENUMERATIONS">Constants
</a><ul class=
"code">
620 <li><a href=
"#http_auth_e" title=
"HTTP authentication types">http_auth_e
</a></li>
621 <li><a href=
"#http_encoding_e" title=
"HTTP transfer encoding values">http_encoding_e
</a></li>
622 <li><a href=
"#http_encryption_e" title=
"HTTP encryption values">http_encryption_e
</a></li>
623 <li><a href=
"#http_field_e" title=
"HTTP field names">http_field_e
</a></li>
624 <li><a href=
"#http_keepalive_e" title=
"HTTP keep-alive values">http_keepalive_e
</a></li>
625 <li><a href=
"#http_state_e" title=
"HTTP state values; states
626 are server-oriented...">http_state_e
</a></li>
627 <li><a href=
"#http_status_e" title=
"HTTP status codes">http_status_e
</a></li>
628 <li><a href=
"#http_uri_coding_e" title=
"URI en/decode flags">http_uri_coding_e
</a></li>
629 <li><a href=
"#http_uri_status_e" title=
"URI separation status ">http_uri_status_e
</a></li>
630 <li><a href=
"#http_version_e" title=
"HTTP version numbers">http_version_e
</a></li>
631 <li><a href=
"#ipp_dstate_e" title=
"Document states">ipp_dstate_e
</a></li>
632 <li><a href=
"#ipp_finish_e" title=
"Finishings">ipp_finish_e
</a></li>
633 <li><a href=
"#ipp_jcollate_e" title=
"Job collation types">ipp_jcollate_e
</a></li>
634 <li><a href=
"#ipp_jstate_e" title=
"Job states">ipp_jstate_e
</a></li>
635 <li><a href=
"#ipp_op_e" title=
"IPP operations">ipp_op_e
</a></li>
636 <li><a href=
"#ipp_orient_e" title=
"Orientation values">ipp_orient_e
</a></li>
637 <li><a href=
"#ipp_pstate_e" title=
"Printer states">ipp_pstate_e
</a></li>
638 <li><a href=
"#ipp_quality_e" title=
"Qualities">ipp_quality_e
</a></li>
639 <li><a href=
"#ipp_res_e" title=
"Resolution units">ipp_res_e
</a></li>
640 <li><a href=
"#ipp_state_e" title=
"IPP states">ipp_state_e
</a></li>
641 <li><a href=
"#ipp_status_e" title=
"IPP status codes">ipp_status_e
</a></li>
642 <li><a href=
"#ipp_tag_e" title=
"Format tags for attributes">ipp_tag_e
</a></li>
648 HTTP and IPP API introduction for CUPS.
650 Copyright 2007-2011 by Apple Inc.
651 Copyright 1997-2006 by Easy Software Products, all rights reserved.
653 These coded instructions, statements, and computer programs are the
654 property of Apple Inc. and are protected by Federal copyright
655 law. Distribution and use rights are outlined in the file "LICENSE.txt"
656 which should have been included with this file. If this file is
657 file is missing or damaged, see the license at "http://www.cups.org/".
660 <h2 class='title'
><a name='OVERVIEW'
>Overview
</a></h2>
662 <p>The CUPS HTTP and IPP APIs provide low-level access to the HTTP and IPP
663 protocols and CUPS scheduler. They are typically used by monitoring and
664 administration programs to perform specific functions not supported by the
665 high-level CUPS API functions.
</p>
667 <p>The HTTP APIs use an opaque structure called
668 <a href='#http_t'
><code>http_t
</code></a> to manage connections to
669 a particular HTTP or IPP server. The
670 <a href='#httpConnectEncrypt'
><code>httpConnectEncrypt
</code></a> function is
671 used to create an instance of this structure for a particular server.
672 The constant
<code>CUPS_HTTP_DEFAULT
</code> can be used with all of the
673 <code>cups
</code> functions to refer to the default CUPS server - the functions
674 create a per-thread
<a href='#http_t'
><code>http_t
</code></a> as needed.
</p>
676 <p>The IPP APIs use two structures for requests (messages sent to the CUPS
677 scheduler) and responses (messages sent back to your application from the
678 scheduler). The
<a href='#ipp_t'
><code>ipp_t
</code></a> structure holds a
679 complete request or response and is allocated using the
680 <a href='#ippNew'
><code>ippNew
</code></a> or
681 <a href='#ippNewRequest'
><code>ippNewRequest
</code></a> functions and
682 freed using the
<a href='#ippDelete'
><code>ippDelete
</code></a> function.
</p>
684 <p>The second structure is called
685 <a href='#ipp_attribute_t'
><code>ipp_attribute_t
</code></a> and holds a
686 single IPP attribute which consists of a group tag (
<code>group_tag
</code>), a
687 value type tag (
<code>value_tag
</code>), the attribute name (
<code>name
</code>),
688 and
1 or more values (
<code>values[]
</code>). Attributes are added to an
689 <a href='#ipp_t'
><code>ipp_t
</code></a> structure using one of the
690 <code>ippAdd
</code> functions. For example, use
691 <a href='#ippAddString'
><code>ippAddString
</code></a> to add a
692 "requesting-user-name" string attribute to a request:
</p>
694 <pre class='example'
>
695 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_GET_JOBS);
697 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
701 <p>Once you have created an IPP request, use the
<code>cups
</code>
702 functions to send the request to and read the response from the server.
703 For example, the
<a href='#cupsDoRequest'
><code>cupsDoRequest
</code></a>
704 function can be used for simple query operations that do not involve files:
</p>
706 <pre class='example'
>
707 #include
<cups/cups.h
>
710 <a href='#ipp_t'
>ipp_t
</a> *
<a name='get_jobs'
>get_jobs
</a>(void)
712 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_GET_JOBS);
714 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
717 return (
<a href='#cupsDoRequest'
>cupsDoRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/"));
721 <p>The
<a href='#cupsDoRequest'
><code>cupsDoRequest
</code></a> function frees
722 the request structure and returns an IPP response structure or NULL pointer if
723 the request could not be sent to the server. Once you have a response from
724 the server, you can either use the
725 <a href='#ippFindAttribute'
><code>ippFindAttribute
</code></a> and
726 <a href='#ippFindNextAttribute'
><code>ippFindNextAttribute
</code></a> functions
727 to find specific attributes, for example:
</p>
729 <pre class='example'
>
730 <a href='#ipp_t'
>ipp_t
</a> *response;
731 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
733 attr =
<a href='#ippFindAttribute'
>ippFindAttribute
</a>(response,
"printer-state", IPP_TAG_ENUM);
736 <p>You can also walk the list of attributes with a simple
<code>for
</code> loop
739 <pre class='example'
>
740 <a href='#ipp_t'
>ipp_t
</a> *response;
741 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
743 for (attr = response-
>attrs; attr != NULL; attr = attr-
>next)
744 if (attr-
>name == NULL)
745 puts(
"--SEPARATOR--");
750 <p>The
<code>for
</code> loop approach is normally used when collecting
751 attributes for multiple objects (jobs, printers, etc.) in a response. Attributes
752 with
<code>NULL
</code> names indicate a separator between the attributes of
753 each object. For example, the following code will list the jobs returned from
754 our previous
<a href='#get_jobs'
><code>get_jobs
</code></a> example code:
</p>
756 <pre class='example'
>
757 <a href='#ipp_t'
>ipp_t
</a> *response =
<a href='#get_jobs'
>get_jobs
</a>();
759 if (response != NULL)
761 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
763 char *job_name = NULL;
764 char *job_originating_user_name = NULL;
766 puts(
"Job ID Owner Title");
767 puts(
"------ ---------------- ---------------------------------");
769 for (attr = response-
>attrs; attr != NULL; attr = attr-
>next)
771 /* Attributes without names are separators between jobs */
772 if (attr-
>name == NULL)
774 if (job_id
> 0 && job_name != NULL
&& job_originating_user_name != NULL)
775 printf(
"%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
779 job_originating_user_name = NULL;
782 else if (!strcmp(attr-
>name,
"job-id")
&& attr-
>value_tag == IPP_TAG_INTEGER)
783 job_id = attr-
>values[
0].integer;
784 else if (!strcmp(attr-
>name,
"job-name")
&& attr-
>value_tag == IPP_TAG_NAME)
785 job_name = attr-
>values[
0].string.text;
786 else if (!strcmp(attr-
>name,
"job-originating-user-name")
&&
787 attr-
>value_tag == IPP_TAG_NAME)
788 job_originating_user_name = attr-
>values[
0].string.text;
791 if (job_id
> 0 && job_name != NULL
&& job_originating_user_name != NULL)
792 printf(
"%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
796 <h3><a name='CREATING_URI_STRINGS'
>Creating URI Strings
</a></h3>
798 <p>To ensure proper encoding, the
799 <a href='#httpAssembleURIf'
><code>httpAssembleURIf
</code></a> function must be
800 used to format a
"printer-uri" string for all printer-based requests:
</p>
802 <pre class='example'
>
803 const char *name =
"Foo";
805 <a href='#ipp_t'
>ipp_t
</a> *request;
807 <a href='#httpAssembleURIf'
>httpAssembleURIf
</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri),
"ipp", NULL, cupsServer(),
808 ippPort(),
"/printers/%s", name);
809 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
812 <h3><a name='SENDING_REQUESTS_WITH_FILES'
>Sending Requests with Files
</a></h3>
814 <p>The
<a href='#cupsDoFileRequest'
><code>cupsDoFileRequest
</code></a> and
815 <a href='#cupsDoIORequest'
><code>cupsDoIORequest
</code></a> functions are
816 used for requests involving files. The
817 <a href='#cupsDoFileRequest'
><code>cupsDoFileRequest
</code></a> function
818 attaches the named file to a request and is typically used when sending a print
819 file or changing a printer's PPD file:
</p>
821 <pre class='example'
>
822 const char *filename =
"/usr/share/cups/data/testprint.ps";
823 const char *name =
"Foo";
826 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_PRINT_JOB);
827 <a href='#ipp_t'
>ipp_t
</a> *response;
829 /* Use httpAssembleURIf for the printer-uri string */
830 <a href='#httpAssembleURIf'
>httpAssembleURIf
</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri),
"ipp", NULL, cupsServer(),
831 ippPort(),
"/printers/%s", name);
832 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
833 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
835 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"job-name",
836 NULL,
"testprint.ps");
838 /* Use snprintf for the resource path */
839 snprintf(resource, sizeof(resource),
"/printers/%s", name);
841 response =
<a href='#cupsDoFileRequest'
>cupsDoFileRequest
</a>(CUPS_HTTP_DEFAULT, request, resource, filename);
844 <p>The
<a href='#cupsDoIORequest'
><code>cupsDoIORequest
</code></a> function
845 optionally attaches a file to the request and optionally saves a file in the
846 response from the server. It is used when using a pipe for the request
847 attachment or when using a request that returns a file, currently only
848 <code>CUPS_GET_DOCUMENT
</code> and
<code>CUPS_GET_PPD
</code>. For example,
849 the following code will download the PPD file for the sample HP LaserJet
852 <pre class='example'
>
855 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
856 <a href='#ipp_t'
>ipp_t
</a> *response;
858 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
859 NULL,
"laserjet.ppd");
861 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
863 response =
<a href='#cupsDoIORequest'
>cupsDoIORequest
</a>(CUPS_HTTP_DEFAULT, request,
"/", -
1, tempfd);
866 <p>The example passes
<code>-
1</code> for the input file descriptor to specify
867 that no file is to be attached to the request. The PPD file attached to the
868 response is written to the temporary file descriptor we created using the
869 <code>cupsTempFd
</code> function.
</p>
871 <h3><a name='ASYNCHRONOUS_REQUEST_PROCESSING'
>Asynchronous Request Processing
</a></h3>
873 <p>The
<a href='#cupsSendRequest'
><code>cupsSendRequest
</code></a> and
874 <a href='#cupsGetResponse'
><code>cupsGetResponse
</code></a> support
875 asynchronous communications with the server. Unlike the other request
876 functions, the IPP request is not automatically freed, so remember to
877 free your request with the
<a href='#ippDelete'
><code>ippDelete
</code></a>
880 <p>File data is attached to the request using the
881 <a href='#cupsWriteRequestData'
><code>cupsWriteRequestData
</code></a>
882 function, while file data returned from the server is read using the
883 <a href='#cupsReadResponseData'
><code>cupsReadResponseData
</code></a>
884 function. We can rewrite the previous
<code>CUPS_GET_PPD
</code> example
885 to use the asynchronous functions quite easily:
</p>
887 <pre class='example'
>
890 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
891 <a href='#ipp_t'
>ipp_t
</a> *response;
893 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
894 NULL,
"laserjet.ppd");
896 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
898 if (
<a href='#cupsSendRequest'
>cupsSendRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/") == HTTP_CONTINUE)
900 response =
<a href='#cupsGetResponse'
>cupsGetResponse
</a>(CUPS_HTTP_DEFAULT,
"/");
902 if (response != NULL)
907 while ((bytes =
<a href='#cupsReadResponseData'
>cupsReadResponseData
</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer)))
> 0)
908 write(tempfd, buffer, bytes);
912 /* Free the request! */
913 <a href='#ippDelete'
>ippDelete
</a>(request);
916 <p>The
<a href='#cupsSendRequest'
><code>cupsSendRequest
</code></a> function
917 returns the initial HTTP request status, typically either
918 <code>HTTP_CONTINUE
</code> or
<code>HTTP_UNAUTHORIZED
</code>. The latter status
919 is returned when the request requires authentication of some sort. The
920 <a href='#cupsDoAuthentication'
><code>cupsDoAuthentication
</code></a> function
921 must be called when your see
<code>HTTP_UNAUTHORIZED
</code> and the request
922 re-sent. We can add authentication support to our example code by using a
923 <code>do ... while
</code> loop:
</p>
925 <pre class='example'
>
928 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
929 <a href='#ipp_t'
>ipp_t
</a> *response;
930 http_status_t status;
932 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
933 NULL,
"laserjet.ppd");
935 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
937 /* Loop for authentication */
940 status =
<a href='#cupsSendRequest'
>cupsSendRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/");
942 if (status == HTTP_UNAUTHORIZED)
944 /* Try to authenticate, break out of the loop if that fails */
945 if (
<a href='#cupsDoAuthentication'
>cupsDoAuthentication
</a>(CUPS_HTTP_DEFAULT,
"POST",
"/"))
949 while (status != HTTP_CONTINUE
&& status != HTTP_UNAUTHORIZED);
951 if (status == HTTP_CONTINUE)
953 response =
<a href='#cupsGetResponse'
>cupsGetResponse
</a>(CUPS_HTTP_DEFAULT,
"/");
955 if (response != NULL)
960 while ((bytes =
<a href='#cupsReadResponseData'
>cupsReadResponseData
</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer)))
> 0)
961 write(tempfd, buffer, bytes);
965 /* Free the request! */
966 <a href='#ippDelete'
>ippDelete
</a>(request);
968 <h2 class=
"title"><a name=
"FUNCTIONS">Functions
</a></h2>
969 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/Mac OS X
10.4 </span><a name=
"cupsDoAuthentication">cupsDoAuthentication
</a></h3>
970 <p class=
"description">Authenticate a request.
</p>
972 int cupsDoAuthentication (
<br>
973 <a href=
"#http_t">http_t
</a> *http,
<br>
974 const char *method,
<br>
975 const char *resource
<br>
977 <h4 class=
"parameters">Parameters
</h4>
980 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
982 <dd class=
"description">Request method (
"GET
",
"POST
",
"PUT
")
</dd>
984 <dd class=
"description">Resource path
</dd>
986 <h4 class=
"returnvalue">Return Value
</h4>
987 <p class=
"description">0 on success, -
1 on error
</p>
988 <h4 class=
"discussion">Discussion
</h4>
989 <p class=
"discussion">This function should be called in response to a
<code>HTTP_UNAUTHORIZED
</code>
990 status, prior to resubmitting your request.
993 <h3 class=
"function"><a name=
"cupsDoFileRequest">cupsDoFileRequest
</a></h3>
994 <p class=
"description">Do an IPP request with a file.
</p>
996 <a href=
"#ipp_t">ipp_t
</a> *cupsDoFileRequest (
<br>
997 <a href=
"#http_t">http_t
</a> *http,
<br>
998 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
999 const char *resource,
<br>
1000 const char *filename
<br>
1002 <h4 class=
"parameters">Parameters
</h4>
1005 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1007 <dd class=
"description">IPP request
</dd>
1009 <dd class=
"description">HTTP resource for POST
</dd>
1011 <dd class=
"description">File to send or
<code>NULL
</code> for none
</dd>
1013 <h4 class=
"returnvalue">Return Value
</h4>
1014 <p class=
"description">Response data
</p>
1015 <h4 class=
"discussion">Discussion
</h4>
1016 <p class=
"discussion">This function sends the IPP request to the specified server, retrying
1017 and authenticating as necessary. The request is freed with
<a href=
"#ippDelete"><code>ippDelete
</code></a>
1018 after receiving a valid IPP response.
</p>
1019 <h3 class=
"function"><span class=
"info"> CUPS
1.3/Mac OS X
10.5 </span><a name=
"cupsDoIORequest">cupsDoIORequest
</a></h3>
1020 <p class=
"description">Do an IPP request with file descriptors.
</p>
1022 <a href=
"#ipp_t">ipp_t
</a> *cupsDoIORequest (
<br>
1023 <a href=
"#http_t">http_t
</a> *http,
<br>
1024 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
1025 const char *resource,
<br>
1026 int infile,
<br>
1027 int outfile
<br>
1029 <h4 class=
"parameters">Parameters
</h4>
1032 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1034 <dd class=
"description">IPP request
</dd>
1036 <dd class=
"description">HTTP resource for POST
</dd>
1038 <dd class=
"description">File to read from or -
1 for none
</dd>
1040 <dd class=
"description">File to write to or -
1 for none
</dd>
1042 <h4 class=
"returnvalue">Return Value
</h4>
1043 <p class=
"description">Response data
</p>
1044 <h4 class=
"discussion">Discussion
</h4>
1045 <p class=
"discussion">This function sends the IPP request to the specified server, retrying
1046 and authenticating as necessary. The request is freed with ippDelete()
1047 after receiving a valid IPP response.
<br>
1049 If
"infile
" is a valid file descriptor, cupsDoIORequest() copies
1050 all of the data from the file after the IPP request message.
<br>
1052 If
"outfile
" is a valid file descriptor, cupsDoIORequest() copies
1053 all of the data after the IPP response message to the file.
1056 <h3 class=
"function"><a name=
"cupsDoRequest">cupsDoRequest
</a></h3>
1057 <p class=
"description">Do an IPP request.
</p>
1059 <a href=
"#ipp_t">ipp_t
</a> *cupsDoRequest (
<br>
1060 <a href=
"#http_t">http_t
</a> *http,
<br>
1061 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
1062 const char *resource
<br>
1064 <h4 class=
"parameters">Parameters
</h4>
1067 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1069 <dd class=
"description">IPP request
</dd>
1071 <dd class=
"description">HTTP resource for POST
</dd>
1073 <h4 class=
"returnvalue">Return Value
</h4>
1074 <p class=
"description">Response data
</p>
1075 <h4 class=
"discussion">Discussion
</h4>
1076 <p class=
"discussion">This function sends the IPP request to the specified server, retrying
1077 and authenticating as necessary. The request is freed with ippDelete()
1078 after receiving a valid IPP response.
</p>
1079 <h3 class=
"function"><a name=
"cupsEncodeOptions">cupsEncodeOptions
</a></h3>
1080 <p class=
"description">Encode printer options into IPP attributes.
</p>
1082 void cupsEncodeOptions (
<br>
1083 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
1084 int num_options,
<br>
1085 cups_option_t *options
<br>
1087 <h4 class=
"parameters">Parameters
</h4>
1090 <dd class=
"description">Request to add to
</dd>
1091 <dt>num_options
</dt>
1092 <dd class=
"description">Number of options
</dd>
1094 <dd class=
"description">Options
</dd>
1096 <h4 class=
"discussion">Discussion
</h4>
1097 <p class=
"discussion">This function adds operation, job, and then subscription attributes,
1098 in that order. Use the cupsEncodeOptions2() function to add attributes
1099 for a single group.
</p>
1100 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"cupsEncodeOptions2">cupsEncodeOptions2
</a></h3>
1101 <p class=
"description">Encode printer options into IPP attributes for a group.
</p>
1103 void cupsEncodeOptions2 (
<br>
1104 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
1105 int num_options,
<br>
1106 cups_option_t *options,
<br>
1107 ipp_tag_t group_tag
<br>
1109 <h4 class=
"parameters">Parameters
</h4>
1112 <dd class=
"description">Request to add to
</dd>
1113 <dt>num_options
</dt>
1114 <dd class=
"description">Number of options
</dd>
1116 <dd class=
"description">Options
</dd>
1118 <dd class=
"description">Group to encode
</dd>
1120 <h4 class=
"discussion">Discussion
</h4>
1121 <p class=
"discussion">This function only adds attributes for a single group. Call this
1122 function multiple times for each group, or use cupsEncodeOptions()
1123 to add the standard groups.
1126 <h3 class=
"function"><span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span><a name=
"cupsGetDevices">cupsGetDevices
</a></h3>
1127 <p class=
"description">Get available printer devices.
</p>
1129 ipp_status_t cupsGetDevices (
<br>
1130 <a href=
"#http_t">http_t
</a> *http,
<br>
1131 int timeout,
<br>
1132 const char *include_schemes,
<br>
1133 const char *exclude_schemes,
<br>
1134 cups_device_cb_t callback,
<br>
1135 void *user_data
<br>
1137 <h4 class=
"parameters">Parameters
</h4>
1140 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1142 <dd class=
"description">Timeout in seconds or
<code>CUPS_TIMEOUT_DEFAULT
</code></dd>
1143 <dt>include_schemes
</dt>
1144 <dd class=
"description">Comma-separated URI schemes to include or
<code>CUPS_INCLUDE_ALL
</code></dd>
1145 <dt>exclude_schemes
</dt>
1146 <dd class=
"description">Comma-separated URI schemes to exclude or
<code>CUPS_EXCLUDE_NONE
</code></dd>
1148 <dd class=
"description">Callback function
</dd>
1150 <dd class=
"description">User data pointer
</dd>
1152 <h4 class=
"returnvalue">Return Value
</h4>
1153 <p class=
"description">Request status -
<code>IPP_OK
</code> on success.
</p>
1154 <h4 class=
"discussion">Discussion
</h4>
1155 <p class=
"discussion">This function sends a CUPS-Get-Devices request and streams the discovered
1156 devices to the specified callback function. The
"timeout
" parameter controls
1157 how long the request lasts, while the
"include_schemes
" and
"exclude_schemes
"
1158 parameters provide comma-delimited lists of backends to include or omit from
1159 the request respectively.
1162 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/Mac OS X
10.4 </span><a name=
"cupsGetFd">cupsGetFd
</a></h3>
1163 <p class=
"description">Get a file from the server.
</p>
1165 <a href=
"#http_status_t">http_status_t
</a> cupsGetFd (
<br>
1166 <a href=
"#http_t">http_t
</a> *http,
<br>
1167 const char *resource,
<br>
1168 int fd
<br>
1170 <h4 class=
"parameters">Parameters
</h4>
1173 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1175 <dd class=
"description">Resource name
</dd>
1177 <dd class=
"description">File descriptor
</dd>
1179 <h4 class=
"returnvalue">Return Value
</h4>
1180 <p class=
"description">HTTP status
</p>
1181 <h4 class=
"discussion">Discussion
</h4>
1182 <p class=
"discussion">This function returns
<code>HTTP_OK
</code> when the file is successfully retrieved.
1185 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/Mac OS X
10.4 </span><a name=
"cupsGetFile">cupsGetFile
</a></h3>
1186 <p class=
"description">Get a file from the server.
</p>
1188 <a href=
"#http_status_t">http_status_t
</a> cupsGetFile (
<br>
1189 <a href=
"#http_t">http_t
</a> *http,
<br>
1190 const char *resource,
<br>
1191 const char *filename
<br>
1193 <h4 class=
"parameters">Parameters
</h4>
1196 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1198 <dd class=
"description">Resource name
</dd>
1200 <dd class=
"description">Filename
</dd>
1202 <h4 class=
"returnvalue">Return Value
</h4>
1203 <p class=
"description">HTTP status
</p>
1204 <h4 class=
"discussion">Discussion
</h4>
1205 <p class=
"discussion">This function returns
<code>HTTP_OK
</code> when the file is successfully retrieved.
1208 <h3 class=
"function"><span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span><a name=
"cupsGetResponse">cupsGetResponse
</a></h3>
1209 <p class=
"description">Get a response to an IPP request.
</p>
1211 <a href=
"#ipp_t">ipp_t
</a> *cupsGetResponse (
<br>
1212 <a href=
"#http_t">http_t
</a> *http,
<br>
1213 const char *resource
<br>
1215 <h4 class=
"parameters">Parameters
</h4>
1218 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1220 <dd class=
"description">HTTP resource for POST
</dd>
1222 <h4 class=
"returnvalue">Return Value
</h4>
1223 <p class=
"description">Response or
<code>NULL
</code> on HTTP error
</p>
1224 <h4 class=
"discussion">Discussion
</h4>
1225 <p class=
"discussion">Use this function to get the response for an IPP request sent using
1226 cupsSendDocument() or cupsSendRequest(). For requests that return
1227 additional data, use httpRead() after getting a successful response,
1228 otherwise call httpFlush() to complete the response processing.
1231 <h3 class=
"function"><a name=
"cupsLastError">cupsLastError
</a></h3>
1232 <p class=
"description">Return the last IPP status code.
</p>
1234 ipp_status_t cupsLastError (void);
</p>
1235 <h4 class=
"returnvalue">Return Value
</h4>
1236 <p class=
"description">IPP status code from last request
</p>
1237 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"cupsLastErrorString">cupsLastErrorString
</a></h3>
1238 <p class=
"description">Return the last IPP status-message.
</p>
1240 const char *cupsLastErrorString (void);
</p>
1241 <h4 class=
"returnvalue">Return Value
</h4>
1242 <p class=
"description">status-message text from last request
</p>
1243 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/Mac OS X
10.4 </span><a name=
"cupsPutFd">cupsPutFd
</a></h3>
1244 <p class=
"description">Put a file on the server.
</p>
1246 <a href=
"#http_status_t">http_status_t
</a> cupsPutFd (
<br>
1247 <a href=
"#http_t">http_t
</a> *http,
<br>
1248 const char *resource,
<br>
1249 int fd
<br>
1251 <h4 class=
"parameters">Parameters
</h4>
1254 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1256 <dd class=
"description">Resource name
</dd>
1258 <dd class=
"description">File descriptor
</dd>
1260 <h4 class=
"returnvalue">Return Value
</h4>
1261 <p class=
"description">HTTP status
</p>
1262 <h4 class=
"discussion">Discussion
</h4>
1263 <p class=
"discussion">This function returns
<code>HTTP_CREATED
</code> when the file is stored
1267 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/Mac OS X
10.4 </span><a name=
"cupsPutFile">cupsPutFile
</a></h3>
1268 <p class=
"description">Put a file on the server.
</p>
1270 <a href=
"#http_status_t">http_status_t
</a> cupsPutFile (
<br>
1271 <a href=
"#http_t">http_t
</a> *http,
<br>
1272 const char *resource,
<br>
1273 const char *filename
<br>
1275 <h4 class=
"parameters">Parameters
</h4>
1278 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1280 <dd class=
"description">Resource name
</dd>
1282 <dd class=
"description">Filename
</dd>
1284 <h4 class=
"returnvalue">Return Value
</h4>
1285 <p class=
"description">HTTP status
</p>
1286 <h4 class=
"discussion">Discussion
</h4>
1287 <p class=
"discussion">This function returns
<code>HTTP_CREATED
</code> when the file is stored
1291 <h3 class=
"function"><span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span><a name=
"cupsReadResponseData">cupsReadResponseData
</a></h3>
1292 <p class=
"description">Read additional data after the IPP response.
</p>
1294 ssize_t cupsReadResponseData (
<br>
1295 <a href=
"#http_t">http_t
</a> *http,
<br>
1296 char *buffer,
<br>
1297 size_t length
<br>
1299 <h4 class=
"parameters">Parameters
</h4>
1302 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1304 <dd class=
"description">Buffer to use
</dd>
1306 <dd class=
"description">Number of bytes to read
</dd>
1308 <h4 class=
"returnvalue">Return Value
</h4>
1309 <p class=
"description">Bytes read,
0 on EOF, -
1 on error
</p>
1310 <h4 class=
"discussion">Discussion
</h4>
1311 <p class=
"discussion">This function is used after cupsGetResponse() to read the PPD or document
1312 files for CUPS_GET_PPD and CUPS_GET_DOCUMENT requests, respectively.
1315 <h3 class=
"function"><span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span><a name=
"cupsSendRequest">cupsSendRequest
</a></h3>
1316 <p class=
"description">Send an IPP request.
</p>
1318 <a href=
"#http_status_t">http_status_t
</a> cupsSendRequest (
<br>
1319 <a href=
"#http_t">http_t
</a> *http,
<br>
1320 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
1321 const char *resource,
<br>
1322 size_t length
<br>
1324 <h4 class=
"parameters">Parameters
</h4>
1327 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1329 <dd class=
"description">IPP request
</dd>
1331 <dd class=
"description">Resource path
</dd>
1333 <dd class=
"description">Length of data to follow or
<code>CUPS_LENGTH_VARIABLE
</code></dd>
1335 <h4 class=
"returnvalue">Return Value
</h4>
1336 <p class=
"description">Initial HTTP status
</p>
1337 <h4 class=
"discussion">Discussion
</h4>
1338 <p class=
"discussion">Use httpWrite() to write any additional data (document, PPD file, etc.)
1339 for the request, cupsGetResponse() to get the IPP response, and httpRead()
1340 to read any additional data following the response. Only one request can be
1341 sent/queued at a time.
<br>
1343 Unlike cupsDoFileRequest(), cupsDoIORequest(), and cupsDoRequest(), the
1344 request is not freed.
1347 <h3 class=
"function"><span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span><a name=
"cupsWriteRequestData">cupsWriteRequestData
</a></h3>
1348 <p class=
"description">Write additional data after an IPP request.
</p>
1350 <a href=
"#http_status_t">http_status_t
</a> cupsWriteRequestData (
<br>
1351 <a href=
"#http_t">http_t
</a> *http,
<br>
1352 const char *buffer,
<br>
1353 size_t length
<br>
1355 <h4 class=
"parameters">Parameters
</h4>
1358 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1360 <dd class=
"description">Bytes to write
</dd>
1362 <dd class=
"description">Number of bytes to write
</dd>
1364 <h4 class=
"returnvalue">Return Value
</h4>
1365 <p class=
"description"><code>HTTP_CONTINUE
</code> if OK or HTTP status on error
</p>
1366 <h4 class=
"discussion">Discussion
</h4>
1367 <p class=
"discussion">This function is used after
<a href=
"#cupsSendRequest"><code>cupsSendRequest
</code></a> to provide a PPD and
1368 after
<a href=
"#cupsStartDocument"><code>cupsStartDocument
</code></a> to provide a document file.
1371 <h3 class=
"function"><span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span><a name=
"httpAddCredential">httpAddCredential
</a></h3>
1372 <p class=
"description">Allocates and adds a single credential to an array.
</p>
1374 int httpAddCredential (
<br>
1375 cups_array_t *credentials,
<br>
1376 const void *data,
<br>
1377 size_t datalen
<br>
1379 <h4 class=
"parameters">Parameters
</h4>
1381 <dt>credentials
</dt>
1382 <dd class=
"description">Credentials array
</dd>
1384 <dd class=
"description">PEM-encoded X
.509 data
</dd>
1386 <dd class=
"description">Length of data
</dd>
1388 <h4 class=
"returnvalue">Return Value
</h4>
1389 <p class=
"description">0 on success, -
1 on error
</p>
1390 <h4 class=
"discussion">Discussion
</h4>
1391 <p class=
"discussion">Use
<code>cupsArrayNew(NULL, NULL)
</code> to create a credentials array.
1394 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrAny">httpAddrAny
</a></h3>
1395 <p class=
"description">Check for the
"any
" address.
</p>
1397 int httpAddrAny (
<br>
1398 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1400 <h4 class=
"parameters">Parameters
</h4>
1403 <dd class=
"description">Address to check
</dd>
1405 <h4 class=
"returnvalue">Return Value
</h4>
1406 <p class=
"description">1 if
"any
",
0 otherwise
</p>
1407 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrEqual">httpAddrEqual
</a></h3>
1408 <p class=
"description">Compare two addresses.
</p>
1410 int httpAddrEqual (
<br>
1411 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr1,
<br>
1412 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr2
<br>
1414 <h4 class=
"parameters">Parameters
</h4>
1417 <dd class=
"description">First address
</dd>
1419 <dd class=
"description">Second address
</dd>
1421 <h4 class=
"returnvalue">Return Value
</h4>
1422 <p class=
"description">1 if equal,
0 if not
</p>
1423 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrLength">httpAddrLength
</a></h3>
1424 <p class=
"description">Return the length of the address in bytes.
</p>
1426 int httpAddrLength (
<br>
1427 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1429 <h4 class=
"parameters">Parameters
</h4>
1432 <dd class=
"description">Address
</dd>
1434 <h4 class=
"returnvalue">Return Value
</h4>
1435 <p class=
"description">Length in bytes
</p>
1436 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrLocalhost">httpAddrLocalhost
</a></h3>
1437 <p class=
"description">Check for the local loopback address.
</p>
1439 int httpAddrLocalhost (
<br>
1440 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1442 <h4 class=
"parameters">Parameters
</h4>
1445 <dd class=
"description">Address to check
</dd>
1447 <h4 class=
"returnvalue">Return Value
</h4>
1448 <p class=
"description">1 if local host,
0 otherwise
</p>
1449 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrLookup">httpAddrLookup
</a></h3>
1450 <p class=
"description">Lookup the hostname associated with the address.
</p>
1452 char *httpAddrLookup (
<br>
1453 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
1454 char *name,
<br>
1455 int namelen
<br>
1457 <h4 class=
"parameters">Parameters
</h4>
1460 <dd class=
"description">Address to lookup
</dd>
1462 <dd class=
"description">Host name buffer
</dd>
1464 <dd class=
"description">Size of name buffer
</dd>
1466 <h4 class=
"returnvalue">Return Value
</h4>
1467 <p class=
"description">Host name
</p>
1468 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrString">httpAddrString
</a></h3>
1469 <p class=
"description">Convert an address to a numeric string.
</p>
1471 char *httpAddrString (
<br>
1472 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
1473 char *s,
<br>
1474 int slen
<br>
1476 <h4 class=
"parameters">Parameters
</h4>
1479 <dd class=
"description">Address to convert
</dd>
1481 <dd class=
"description">String buffer
</dd>
1483 <dd class=
"description">Length of string
</dd>
1485 <h4 class=
"returnvalue">Return Value
</h4>
1486 <p class=
"description">Numeric address string
</p>
1487 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAssembleURI">httpAssembleURI
</a></h3>
1488 <p class=
"description">Assemble a uniform resource identifier from its
1491 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpAssembleURI (
<br>
1492 <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> encoding,
<br>
1493 char *uri,
<br>
1494 int urilen,
<br>
1495 const char *scheme,
<br>
1496 const char *username,
<br>
1497 const char *host,
<br>
1498 int port,
<br>
1499 const char *resource
<br>
1501 <h4 class=
"parameters">Parameters
</h4>
1504 <dd class=
"description">Encoding flags
</dd>
1506 <dd class=
"description">URI buffer
</dd>
1508 <dd class=
"description">Size of URI buffer
</dd>
1510 <dd class=
"description">Scheme name
</dd>
1512 <dd class=
"description">Username
</dd>
1514 <dd class=
"description">Hostname or address
</dd>
1516 <dd class=
"description">Port number
</dd>
1518 <dd class=
"description">Resource
</dd>
1520 <h4 class=
"returnvalue">Return Value
</h4>
1521 <p class=
"description">URI status
</p>
1522 <h4 class=
"discussion">Discussion
</h4>
1523 <p class=
"discussion">This function escapes reserved characters in the URI depending on the
1524 value of the
"encoding
" argument. You should use this function in
1525 place of traditional string functions whenever you need to create a
1529 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAssembleURIf">httpAssembleURIf
</a></h3>
1530 <p class=
"description">Assemble a uniform resource identifier from its
1531 components with a formatted resource.
</p>
1533 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpAssembleURIf (
<br>
1534 <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> encoding,
<br>
1535 char *uri,
<br>
1536 int urilen,
<br>
1537 const char *scheme,
<br>
1538 const char *username,
<br>
1539 const char *host,
<br>
1540 int port,
<br>
1541 const char *resourcef,
<br>
1542 ...
<br>
1544 <h4 class=
"parameters">Parameters
</h4>
1547 <dd class=
"description">Encoding flags
</dd>
1549 <dd class=
"description">URI buffer
</dd>
1551 <dd class=
"description">Size of URI buffer
</dd>
1553 <dd class=
"description">Scheme name
</dd>
1555 <dd class=
"description">Username
</dd>
1557 <dd class=
"description">Hostname or address
</dd>
1559 <dd class=
"description">Port number
</dd>
1561 <dd class=
"description">Printf-style resource
</dd>
1563 <dd class=
"description">Additional arguments as needed
</dd>
1565 <h4 class=
"returnvalue">Return Value
</h4>
1566 <p class=
"description">URI status
</p>
1567 <h4 class=
"discussion">Discussion
</h4>
1568 <p class=
"discussion">This function creates a formatted version of the resource string
1569 argument
"resourcef
" and escapes reserved characters in the URI
1570 depending on the value of the
"encoding
" argument. You should use
1571 this function in place of traditional string functions whenever
1572 you need to create a URI string.
1575 <h3 class=
"function"><a name=
"httpBlocking">httpBlocking
</a></h3>
1576 <p class=
"description">Set blocking/non-blocking behavior on a connection.
</p>
1578 void httpBlocking (
<br>
1579 <a href=
"#http_t">http_t
</a> *http,
<br>
1580 int b
<br>
1582 <h4 class=
"parameters">Parameters
</h4>
1585 <dd class=
"description">Connection to server
</dd>
1587 <dd class=
"description">1 = blocking,
0 = non-blocking
</dd>
1589 <h3 class=
"function"><a name=
"httpCheck">httpCheck
</a></h3>
1590 <p class=
"description">Check to see if there is a pending response from the server.
</p>
1593 <a href=
"#http_t">http_t
</a> *http
<br>
1595 <h4 class=
"parameters">Parameters
</h4>
1598 <dd class=
"description">Connection to server
</dd>
1600 <h4 class=
"returnvalue">Return Value
</h4>
1601 <p class=
"description">0 = no data,
1 = data available
</p>
1602 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"httpClearCookie">httpClearCookie
</a></h3>
1603 <p class=
"description">Clear the cookie value(s).
</p>
1605 void httpClearCookie (
<br>
1606 <a href=
"#http_t">http_t
</a> *http
<br>
1608 <h4 class=
"parameters">Parameters
</h4>
1611 <dd class=
"description">Connection to server
</dd>
1613 <h3 class=
"function"><a name=
"httpClearFields">httpClearFields
</a></h3>
1614 <p class=
"description">Clear HTTP request fields.
</p>
1616 void httpClearFields (
<br>
1617 <a href=
"#http_t">http_t
</a> *http
<br>
1619 <h4 class=
"parameters">Parameters
</h4>
1622 <dd class=
"description">Connection to server
</dd>
1624 <h3 class=
"function"><a name=
"httpClose">httpClose
</a></h3>
1625 <p class=
"description">Close an HTTP connection.
</p>
1627 void httpClose (
<br>
1628 <a href=
"#http_t">http_t
</a> *http
<br>
1630 <h4 class=
"parameters">Parameters
</h4>
1633 <dd class=
"description">Connection to server
</dd>
1635 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpConnect">httpConnect
</a></h3>
1636 <p class=
"description">Connect to a HTTP server.
</p>
1638 <a href=
"#http_t">http_t
</a> *httpConnect (
<br>
1639 const char *host,
<br>
1640 int port
<br>
1642 <h4 class=
"parameters">Parameters
</h4>
1645 <dd class=
"description">Host to connect to
</dd>
1647 <dd class=
"description">Port number
</dd>
1649 <h4 class=
"returnvalue">Return Value
</h4>
1650 <p class=
"description">New HTTP connection
</p>
1651 <h4 class=
"discussion">Discussion
</h4>
1652 <p class=
"discussion">This function is deprecated - use
<a href=
"#httpConnectEncrypt"><code>httpConnectEncrypt
</code></a> instead.
1655 <h3 class=
"function"><a name=
"httpConnectEncrypt">httpConnectEncrypt
</a></h3>
1656 <p class=
"description">Connect to a HTTP server using encryption.
</p>
1658 <a href=
"#http_t">http_t
</a> *httpConnectEncrypt (
<br>
1659 const char *host,
<br>
1660 int port,
<br>
1661 <a href=
"#http_encryption_t">http_encryption_t
</a> encryption
<br>
1663 <h4 class=
"parameters">Parameters
</h4>
1666 <dd class=
"description">Host to connect to
</dd>
1668 <dd class=
"description">Port number
</dd>
1670 <dd class=
"description">Type of encryption to use
</dd>
1672 <h4 class=
"returnvalue">Return Value
</h4>
1673 <p class=
"description">New HTTP connection
</p>
1674 <h3 class=
"function"><span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span><a name=
"httpCopyCredentials">httpCopyCredentials
</a></h3>
1675 <p class=
"description">Copy the credentials associated with an encrypted
1678 int httpCopyCredentials (
<br>
1679 <a href=
"#http_t">http_t
</a> *http,
<br>
1680 cups_array_t **credentials
<br>
1682 <h4 class=
"parameters">Parameters
</h4>
1685 <dd class=
"description">Connection to server
</dd>
1686 <dt>credentials
</dt>
1687 <dd class=
"description">Array of credentials
</dd>
1689 <h4 class=
"returnvalue">Return Value
</h4>
1690 <p class=
"description">Status of call (
0 = success)
</p>
1691 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpDecode64">httpDecode64
</a></h3>
1692 <p class=
"description">Base64-decode a string.
</p>
1694 char *httpDecode64 (
<br>
1695 char *out,
<br>
1696 const char *in
<br>
1698 <h4 class=
"parameters">Parameters
</h4>
1701 <dd class=
"description">String to write to
</dd>
1703 <dd class=
"description">String to read from
</dd>
1705 <h4 class=
"returnvalue">Return Value
</h4>
1706 <p class=
"description">Decoded string
</p>
1707 <h4 class=
"discussion">Discussion
</h4>
1708 <p class=
"discussion">This function is deprecated. Use the httpDecode64_2() function instead
1709 which provides buffer length arguments.
1712 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/Mac OS X
10.4 </span><a name=
"httpDecode64_2">httpDecode64_2
</a></h3>
1713 <p class=
"description">Base64-decode a string.
</p>
1715 char *httpDecode64_2 (
<br>
1716 char *out,
<br>
1717 int *outlen,
<br>
1718 const char *in
<br>
1720 <h4 class=
"parameters">Parameters
</h4>
1723 <dd class=
"description">String to write to
</dd>
1725 <dd class=
"description">Size of output string
</dd>
1727 <dd class=
"description">String to read from
</dd>
1729 <h4 class=
"returnvalue">Return Value
</h4>
1730 <p class=
"description">Decoded string
</p>
1731 <h3 class=
"function"><a name=
"httpDelete">httpDelete
</a></h3>
1732 <p class=
"description">Send a DELETE request to the server.
</p>
1734 int httpDelete (
<br>
1735 <a href=
"#http_t">http_t
</a> *http,
<br>
1736 const char *uri
<br>
1738 <h4 class=
"parameters">Parameters
</h4>
1741 <dd class=
"description">Connection to server
</dd>
1743 <dd class=
"description">URI to delete
</dd>
1745 <h4 class=
"returnvalue">Return Value
</h4>
1746 <p class=
"description">Status of call (
0 = success)
</p>
1747 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpEncode64">httpEncode64
</a></h3>
1748 <p class=
"description">Base64-encode a string.
</p>
1750 char *httpEncode64 (
<br>
1751 char *out,
<br>
1752 const char *in
<br>
1754 <h4 class=
"parameters">Parameters
</h4>
1757 <dd class=
"description">String to write to
</dd>
1759 <dd class=
"description">String to read from
</dd>
1761 <h4 class=
"returnvalue">Return Value
</h4>
1762 <p class=
"description">Encoded string
</p>
1763 <h4 class=
"discussion">Discussion
</h4>
1764 <p class=
"discussion">This function is deprecated. Use the httpEncode64_2() function instead
1765 which provides buffer length arguments.
1768 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/Mac OS X
10.4 </span><a name=
"httpEncode64_2">httpEncode64_2
</a></h3>
1769 <p class=
"description">Base64-encode a string.
</p>
1771 char *httpEncode64_2 (
<br>
1772 char *out,
<br>
1773 int outlen,
<br>
1774 const char *in,
<br>
1775 int inlen
<br>
1777 <h4 class=
"parameters">Parameters
</h4>
1780 <dd class=
"description">String to write to
</dd>
1782 <dd class=
"description">Size of output string
</dd>
1784 <dd class=
"description">String to read from
</dd>
1786 <dd class=
"description">Size of input string
</dd>
1788 <h4 class=
"returnvalue">Return Value
</h4>
1789 <p class=
"description">Encoded string
</p>
1790 <h3 class=
"function"><a name=
"httpEncryption">httpEncryption
</a></h3>
1791 <p class=
"description">Set the required encryption on the link.
</p>
1793 int httpEncryption (
<br>
1794 <a href=
"#http_t">http_t
</a> *http,
<br>
1795 <a href=
"#http_encryption_t">http_encryption_t
</a> e
<br>
1797 <h4 class=
"parameters">Parameters
</h4>
1800 <dd class=
"description">Connection to server
</dd>
1802 <dd class=
"description">New encryption preference
</dd>
1804 <h4 class=
"returnvalue">Return Value
</h4>
1805 <p class=
"description">-
1 on error,
0 on success
</p>
1806 <h3 class=
"function"><a name=
"httpError">httpError
</a></h3>
1807 <p class=
"description">Get the last error on a connection.
</p>
1810 <a href=
"#http_t">http_t
</a> *http
<br>
1812 <h4 class=
"parameters">Parameters
</h4>
1815 <dd class=
"description">Connection to server
</dd>
1817 <h4 class=
"returnvalue">Return Value
</h4>
1818 <p class=
"description">Error code (errno) value
</p>
1819 <h3 class=
"function"><a name=
"httpFlush">httpFlush
</a></h3>
1820 <p class=
"description">Flush data from a HTTP connection.
</p>
1822 void httpFlush (
<br>
1823 <a href=
"#http_t">http_t
</a> *http
<br>
1825 <h4 class=
"parameters">Parameters
</h4>
1828 <dd class=
"description">Connection to server
</dd>
1830 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpFlushWrite">httpFlushWrite
</a></h3>
1831 <p class=
"description">Flush data in write buffer.
</p>
1833 int httpFlushWrite (
<br>
1834 <a href=
"#http_t">http_t
</a> *http
<br>
1836 <h4 class=
"parameters">Parameters
</h4>
1839 <dd class=
"description">Connection to server
</dd>
1841 <h4 class=
"returnvalue">Return Value
</h4>
1842 <p class=
"description">Bytes written or -
1 on error
</p>
1843 <h3 class=
"function"><a name=
"httpFreeCredentials">httpFreeCredentials
</a></h3>
1844 <p class=
"description">Free an array of credentials.
</p>
1846 void httpFreeCredentials (
<br>
1847 cups_array_t *credentials
<br>
1849 <h4 class=
"parameters">Parameters
</h4>
1851 <dt>credentials
</dt>
1852 <dd class=
"description">Array of credentials
</dd>
1854 <h3 class=
"function"><a name=
"httpGet">httpGet
</a></h3>
1855 <p class=
"description">Send a GET request to the server.
</p>
1858 <a href=
"#http_t">http_t
</a> *http,
<br>
1859 const char *uri
<br>
1861 <h4 class=
"parameters">Parameters
</h4>
1864 <dd class=
"description">Connection to server
</dd>
1866 <dd class=
"description">URI to get
</dd>
1868 <h4 class=
"returnvalue">Return Value
</h4>
1869 <p class=
"description">Status of call (
0 = success)
</p>
1870 <h3 class=
"function"><span class=
"info"> CUPS
1.3/Mac OS X
10.5 </span><a name=
"httpGetAuthString">httpGetAuthString
</a></h3>
1871 <p class=
"description">Get the current authorization string.
</p>
1873 char *httpGetAuthString (
<br>
1874 <a href=
"#http_t">http_t
</a> *http
<br>
1876 <h4 class=
"parameters">Parameters
</h4>
1879 <dd class=
"description">Connection to server
</dd>
1881 <h4 class=
"returnvalue">Return Value
</h4>
1882 <p class=
"description">Authorization string
</p>
1883 <h4 class=
"discussion">Discussion
</h4>
1884 <p class=
"discussion">The authorization string is set by cupsDoAuthentication() and
1885 httpSetAuthString(). Use httpGetAuthString() to retrieve the
1886 string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
1890 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetBlocking">httpGetBlocking
</a></h3>
1891 <p class=
"description">Get the blocking/non-block state of a connection.
</p>
1893 int httpGetBlocking (
<br>
1894 <a href=
"#http_t">http_t
</a> *http
<br>
1896 <h4 class=
"parameters">Parameters
</h4>
1899 <dd class=
"description">Connection to server
</dd>
1901 <h4 class=
"returnvalue">Return Value
</h4>
1902 <p class=
"description">1 if blocking,
0 if non-blocking
</p>
1903 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"httpGetCookie">httpGetCookie
</a></h3>
1904 <p class=
"description">Get any cookie data from the response.
</p>
1906 const char *httpGetCookie (
<br>
1907 <a href=
"#http_t">http_t
</a> *http
<br>
1909 <h4 class=
"parameters">Parameters
</h4>
1912 <dd class=
"description">HTTP connecion
</dd>
1914 <h4 class=
"returnvalue">Return Value
</h4>
1915 <p class=
"description">Cookie data or NULL
</p>
1916 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetDateString">httpGetDateString
</a></h3>
1917 <p class=
"description">Get a formatted date/time string from a time value.
</p>
1919 const char *httpGetDateString (
<br>
1920 time_t t
<br>
1922 <h4 class=
"parameters">Parameters
</h4>
1925 <dd class=
"description">UNIX time
</dd>
1927 <h4 class=
"returnvalue">Return Value
</h4>
1928 <p class=
"description">Date/time string
</p>
1929 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetDateString2">httpGetDateString2
</a></h3>
1930 <p class=
"description">Get a formatted date/time string from a time value.
</p>
1932 const char *httpGetDateString2 (
<br>
1933 time_t t,
<br>
1934 char *s,
<br>
1935 int slen
<br>
1937 <h4 class=
"parameters">Parameters
</h4>
1940 <dd class=
"description">UNIX time
</dd>
1942 <dd class=
"description">String buffer
</dd>
1944 <dd class=
"description">Size of string buffer
</dd>
1946 <h4 class=
"returnvalue">Return Value
</h4>
1947 <p class=
"description">Date/time string
</p>
1948 <h3 class=
"function"><a name=
"httpGetDateTime">httpGetDateTime
</a></h3>
1949 <p class=
"description">Get a time value from a formatted date/time string.
</p>
1951 time_t httpGetDateTime (
<br>
1952 const char *s
<br>
1954 <h4 class=
"parameters">Parameters
</h4>
1957 <dd class=
"description">Date/time string
</dd>
1959 <h4 class=
"returnvalue">Return Value
</h4>
1960 <p class=
"description">UNIX time
</p>
1961 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetFd">httpGetFd
</a></h3>
1962 <p class=
"description">Get the file descriptor associated with a connection.
</p>
1965 <a href=
"#http_t">http_t
</a> *http
<br>
1967 <h4 class=
"parameters">Parameters
</h4>
1970 <dd class=
"description">Connection to server
</dd>
1972 <h4 class=
"returnvalue">Return Value
</h4>
1973 <p class=
"description">File descriptor or -
1 if none
</p>
1974 <h3 class=
"function"><a name=
"httpGetField">httpGetField
</a></h3>
1975 <p class=
"description">Get a field value from a request/response.
</p>
1977 const char *httpGetField (
<br>
1978 <a href=
"#http_t">http_t
</a> *http,
<br>
1979 <a href=
"#http_field_t">http_field_t
</a> field
<br>
1981 <h4 class=
"parameters">Parameters
</h4>
1984 <dd class=
"description">Connection to server
</dd>
1986 <dd class=
"description">Field to get
</dd>
1988 <h4 class=
"returnvalue">Return Value
</h4>
1989 <p class=
"description">Field value
</p>
1990 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetHostByName">httpGetHostByName
</a></h3>
1991 <p class=
"description">Lookup a hostname or IPv4 address, and return
1992 address records for the specified name.
</p>
1994 struct hostent *httpGetHostByName (
<br>
1995 const char *name
<br>
1997 <h4 class=
"parameters">Parameters
</h4>
2000 <dd class=
"description">Hostname or IP address
</dd>
2002 <h4 class=
"returnvalue">Return Value
</h4>
2003 <p class=
"description">Host entry
</p>
2004 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetHostname">httpGetHostname
</a></h3>
2005 <p class=
"description">Get the FQDN for the connection or local system.
</p>
2007 const char *httpGetHostname (
<br>
2008 <a href=
"#http_t">http_t
</a> *http,
<br>
2009 char *s,
<br>
2010 int slen
<br>
2012 <h4 class=
"parameters">Parameters
</h4>
2015 <dd class=
"description">HTTP connection or NULL
</dd>
2017 <dd class=
"description">String buffer for name
</dd>
2019 <dd class=
"description">Size of buffer
</dd>
2021 <h4 class=
"returnvalue">Return Value
</h4>
2022 <p class=
"description">FQDN for connection or system
</p>
2023 <h4 class=
"discussion">Discussion
</h4>
2024 <p class=
"discussion">When
"http
" points to a connected socket, return the hostname or
2025 address that was used in the call to httpConnect() or httpConnectEncrypt().
2026 Otherwise, return the FQDN for the local system using both gethostname()
2027 and gethostbyname() to get the local hostname with domain.
2030 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetLength">httpGetLength
</a></h3>
2031 <p class=
"description">Get the amount of data remaining from the
2032 content-length or transfer-encoding fields.
</p>
2034 int httpGetLength (
<br>
2035 <a href=
"#http_t">http_t
</a> *http
<br>
2037 <h4 class=
"parameters">Parameters
</h4>
2040 <dd class=
"description">Connection to server
</dd>
2042 <h4 class=
"returnvalue">Return Value
</h4>
2043 <p class=
"description">Content length
</p>
2044 <h4 class=
"discussion">Discussion
</h4>
2045 <p class=
"discussion">This function is deprecated and will not return lengths larger than
2046 2^
31 -
1; use httpGetLength2() instead.
2049 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetLength2">httpGetLength2
</a></h3>
2050 <p class=
"description">Get the amount of data remaining from the
2051 content-length or transfer-encoding fields.
</p>
2053 off_t httpGetLength2 (
<br>
2054 <a href=
"#http_t">http_t
</a> *http
<br>
2056 <h4 class=
"parameters">Parameters
</h4>
2059 <dd class=
"description">Connection to server
</dd>
2061 <h4 class=
"returnvalue">Return Value
</h4>
2062 <p class=
"description">Content length
</p>
2063 <h4 class=
"discussion">Discussion
</h4>
2064 <p class=
"discussion">This function returns the complete content length, even for
2065 content larger than
2^
31 -
1.
2068 <h3 class=
"function"><a name=
"httpGetState">httpGetState
</a></h3>
2069 <p class=
"description">Get the current state of the HTTP request.
</p>
2071 <a href=
"#http_state_t">http_state_t
</a> httpGetState (
<br>
2072 <a href=
"#http_t">http_t
</a> *http
<br>
2074 <h4 class=
"parameters">Parameters
</h4>
2077 <dd class=
"description">Connection to server
</dd>
2079 <h4 class=
"returnvalue">Return Value
</h4>
2080 <p class=
"description">HTTP state
</p>
2081 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetStatus">httpGetStatus
</a></h3>
2082 <p class=
"description">Get the status of the last HTTP request.
</p>
2084 <a href=
"#http_status_t">http_status_t
</a> httpGetStatus (
<br>
2085 <a href=
"#http_t">http_t
</a> *http
<br>
2087 <h4 class=
"parameters">Parameters
</h4>
2090 <dd class=
"description">Connection to server
</dd>
2092 <h4 class=
"returnvalue">Return Value
</h4>
2093 <p class=
"description">HTTP status
</p>
2094 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetSubField">httpGetSubField
</a></h3>
2095 <p class=
"description">Get a sub-field value.
</p>
2097 char *httpGetSubField (
<br>
2098 <a href=
"#http_t">http_t
</a> *http,
<br>
2099 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
2100 const char *name,
<br>
2101 char *value
<br>
2103 <h4 class=
"parameters">Parameters
</h4>
2106 <dd class=
"description">Connection to server
</dd>
2108 <dd class=
"description">Field index
</dd>
2110 <dd class=
"description">Name of sub-field
</dd>
2112 <dd class=
"description">Value string
</dd>
2114 <h4 class=
"returnvalue">Return Value
</h4>
2115 <p class=
"description">Value or NULL
</p>
2116 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetSubField2">httpGetSubField2
</a></h3>
2117 <p class=
"description">Get a sub-field value.
</p>
2119 char *httpGetSubField2 (
<br>
2120 <a href=
"#http_t">http_t
</a> *http,
<br>
2121 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
2122 const char *name,
<br>
2123 char *value,
<br>
2124 int valuelen
<br>
2126 <h4 class=
"parameters">Parameters
</h4>
2129 <dd class=
"description">Connection to server
</dd>
2131 <dd class=
"description">Field index
</dd>
2133 <dd class=
"description">Name of sub-field
</dd>
2135 <dd class=
"description">Value string
</dd>
2137 <dd class=
"description">Size of value buffer
</dd>
2139 <h4 class=
"returnvalue">Return Value
</h4>
2140 <p class=
"description">Value or NULL
</p>
2141 <h3 class=
"function"><a name=
"httpGetVersion">httpGetVersion
</a></h3>
2142 <p class=
"description">Get the HTTP version at the other end.
</p>
2144 <a href=
"#http_version_t">http_version_t
</a> httpGetVersion (
<br>
2145 <a href=
"#http_t">http_t
</a> *http
<br>
2147 <h4 class=
"parameters">Parameters
</h4>
2150 <dd class=
"description">Connection to server
</dd>
2152 <h4 class=
"returnvalue">Return Value
</h4>
2153 <p class=
"description">Version number
</p>
2154 <h3 class=
"function"><a name=
"httpGets">httpGets
</a></h3>
2155 <p class=
"description">Get a line of text from a HTTP connection.
</p>
2157 char *httpGets (
<br>
2158 char *line,
<br>
2159 int length,
<br>
2160 <a href=
"#http_t">http_t
</a> *http
<br>
2162 <h4 class=
"parameters">Parameters
</h4>
2165 <dd class=
"description">Line to read into
</dd>
2167 <dd class=
"description">Max length of buffer
</dd>
2169 <dd class=
"description">Connection to server
</dd>
2171 <h4 class=
"returnvalue">Return Value
</h4>
2172 <p class=
"description">Line or NULL
</p>
2173 <h3 class=
"function"><a name=
"httpHead">httpHead
</a></h3>
2174 <p class=
"description">Send a HEAD request to the server.
</p>
2177 <a href=
"#http_t">http_t
</a> *http,
<br>
2178 const char *uri
<br>
2180 <h4 class=
"parameters">Parameters
</h4>
2183 <dd class=
"description">Connection to server
</dd>
2185 <dd class=
"description">URI for head
</dd>
2187 <h4 class=
"returnvalue">Return Value
</h4>
2188 <p class=
"description">Status of call (
0 = success)
</p>
2189 <h3 class=
"function"><a name=
"httpInitialize">httpInitialize
</a></h3>
2190 <p class=
"description">Initialize the HTTP interface library and set the
2191 default HTTP proxy (if any).
</p>
2193 void httpInitialize (void);
</p>
2194 <h3 class=
"function"><a name=
"httpMD5">httpMD5
</a></h3>
2195 <p class=
"description">Compute the MD5 sum of the username:group:password.
</p>
2198 const char *username,
<br>
2199 const char *realm,
<br>
2200 const char *passwd,
<br>
2201 char md5[
33]
<br>
2203 <h4 class=
"parameters">Parameters
</h4>
2206 <dd class=
"description">User name
</dd>
2208 <dd class=
"description">Realm name
</dd>
2210 <dd class=
"description">Password string
</dd>
2212 <dd class=
"description">MD5 string
</dd>
2214 <h4 class=
"returnvalue">Return Value
</h4>
2215 <p class=
"description">MD5 sum
</p>
2216 <h3 class=
"function"><a name=
"httpMD5Final">httpMD5Final
</a></h3>
2217 <p class=
"description">Combine the MD5 sum of the username, group, and password
2218 with the server-supplied nonce value, method, and
2221 char *httpMD5Final (
<br>
2222 const char *nonce,
<br>
2223 const char *method,
<br>
2224 const char *resource,
<br>
2225 char md5[
33]
<br>
2227 <h4 class=
"parameters">Parameters
</h4>
2230 <dd class=
"description">Server nonce value
</dd>
2232 <dd class=
"description">METHOD (GET, POST, etc.)
</dd>
2234 <dd class=
"description">Resource path
</dd>
2236 <dd class=
"description">MD5 sum
</dd>
2238 <h4 class=
"returnvalue">Return Value
</h4>
2239 <p class=
"description">New sum
</p>
2240 <h3 class=
"function"><a name=
"httpMD5String">httpMD5String
</a></h3>
2241 <p class=
"description">Convert an MD5 sum to a character string.
</p>
2243 char *httpMD5String (
<br>
2244 const unsigned char *sum,
<br>
2245 char md5[
33]
<br>
2247 <h4 class=
"parameters">Parameters
</h4>
2250 <dd class=
"description">MD5 sum data
</dd>
2252 <dd class=
"description">MD5 sum in hex
</dd>
2254 <h4 class=
"returnvalue">Return Value
</h4>
2255 <p class=
"description">MD5 sum in hex
</p>
2256 <h3 class=
"function"><a name=
"httpOptions">httpOptions
</a></h3>
2257 <p class=
"description">Send an OPTIONS request to the server.
</p>
2259 int httpOptions (
<br>
2260 <a href=
"#http_t">http_t
</a> *http,
<br>
2261 const char *uri
<br>
2263 <h4 class=
"parameters">Parameters
</h4>
2266 <dd class=
"description">Connection to server
</dd>
2268 <dd class=
"description">URI for options
</dd>
2270 <h4 class=
"returnvalue">Return Value
</h4>
2271 <p class=
"description">Status of call (
0 = success)
</p>
2272 <h3 class=
"function"><a name=
"httpPost">httpPost
</a></h3>
2273 <p class=
"description">Send a POST request to the server.
</p>
2276 <a href=
"#http_t">http_t
</a> *http,
<br>
2277 const char *uri
<br>
2279 <h4 class=
"parameters">Parameters
</h4>
2282 <dd class=
"description">Connection to server
</dd>
2284 <dd class=
"description">URI for post
</dd>
2286 <h4 class=
"returnvalue">Return Value
</h4>
2287 <p class=
"description">Status of call (
0 = success)
</p>
2288 <h3 class=
"function"><a name=
"httpPut">httpPut
</a></h3>
2289 <p class=
"description">Send a PUT request to the server.
</p>
2292 <a href=
"#http_t">http_t
</a> *http,
<br>
2293 const char *uri
<br>
2295 <h4 class=
"parameters">Parameters
</h4>
2298 <dd class=
"description">Connection to server
</dd>
2300 <dd class=
"description">URI to put
</dd>
2302 <h4 class=
"returnvalue">Return Value
</h4>
2303 <p class=
"description">Status of call (
0 = success)
</p>
2304 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpRead">httpRead
</a></h3>
2305 <p class=
"description">Read data from a HTTP connection.
</p>
2308 <a href=
"#http_t">http_t
</a> *http,
<br>
2309 char *buffer,
<br>
2310 int length
<br>
2312 <h4 class=
"parameters">Parameters
</h4>
2315 <dd class=
"description">Connection to server
</dd>
2317 <dd class=
"description">Buffer for data
</dd>
2319 <dd class=
"description">Maximum number of bytes
</dd>
2321 <h4 class=
"returnvalue">Return Value
</h4>
2322 <p class=
"description">Number of bytes read
</p>
2323 <h4 class=
"discussion">Discussion
</h4>
2324 <p class=
"discussion">This function is deprecated. Use the httpRead2() function which can
2325 read more than
2GB of data.
2328 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpRead2">httpRead2
</a></h3>
2329 <p class=
"description">Read data from a HTTP connection.
</p>
2331 ssize_t httpRead2 (
<br>
2332 <a href=
"#http_t">http_t
</a> *http,
<br>
2333 char *buffer,
<br>
2334 size_t length
<br>
2336 <h4 class=
"parameters">Parameters
</h4>
2339 <dd class=
"description">Connection to server
</dd>
2341 <dd class=
"description">Buffer for data
</dd>
2343 <dd class=
"description">Maximum number of bytes
</dd>
2345 <h4 class=
"returnvalue">Return Value
</h4>
2346 <p class=
"description">Number of bytes read
</p>
2347 <h3 class=
"function"><a name=
"httpReconnect">httpReconnect
</a></h3>
2348 <p class=
"description">Reconnect to a HTTP server.
</p>
2350 int httpReconnect (
<br>
2351 <a href=
"#http_t">http_t
</a> *http
<br>
2353 <h4 class=
"parameters">Parameters
</h4>
2356 <dd class=
"description">Connection to server
</dd>
2358 <h4 class=
"returnvalue">Return Value
</h4>
2359 <p class=
"description">0 on success, non-zero on failure
</p>
2360 <h3 class=
"function"><a name=
"httpReconnect2">httpReconnect2
</a></h3>
2361 <p class=
"description">Reconnect to a HTTP server with timeout and optional
2364 int httpReconnect2 (
<br>
2365 <a href=
"#http_t">http_t
</a> *http,
<br>
2366 int msec,
<br>
2367 int *cancel
<br>
2369 <h4 class=
"parameters">Parameters
</h4>
2372 <dd class=
"description">Connection to server
</dd>
2374 <dd class=
"description">Timeout in milliseconds
</dd>
2376 <dd class=
"description">Pointer to
"cancel
" variable
</dd>
2378 <h4 class=
"returnvalue">Return Value
</h4>
2379 <p class=
"description">0 on success, non-zero on failure
</p>
2380 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpSeparate">httpSeparate
</a></h3>
2381 <p class=
"description">Separate a Universal Resource Identifier into its
2384 void httpSeparate (
<br>
2385 const char *uri,
<br>
2386 char *scheme,
<br>
2387 char *username,
<br>
2388 char *host,
<br>
2389 int *port,
<br>
2390 char *resource
<br>
2392 <h4 class=
"parameters">Parameters
</h4>
2395 <dd class=
"description">Universal Resource Identifier
</dd>
2397 <dd class=
"description">Scheme [
32] (http, https, etc.)
</dd>
2399 <dd class=
"description">Username [
1024]
</dd>
2401 <dd class=
"description">Hostname [
1024]
</dd>
2403 <dd class=
"description">Port number to use
</dd>
2405 <dd class=
"description">Resource/filename [
1024]
</dd>
2407 <h4 class=
"discussion">Discussion
</h4>
2408 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
2411 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/Mac OS X
10.4 </span><a name=
"httpSeparate2">httpSeparate2
</a></h3>
2412 <p class=
"description">Separate a Universal Resource Identifier into its
2415 void httpSeparate2 (
<br>
2416 const char *uri,
<br>
2417 char *scheme,
<br>
2418 int schemelen,
<br>
2419 char *username,
<br>
2420 int usernamelen,
<br>
2421 char *host,
<br>
2422 int hostlen,
<br>
2423 int *port,
<br>
2424 char *resource,
<br>
2425 int resourcelen
<br>
2427 <h4 class=
"parameters">Parameters
</h4>
2430 <dd class=
"description">Universal Resource Identifier
</dd>
2432 <dd class=
"description">Scheme (http, https, etc.)
</dd>
2434 <dd class=
"description">Size of scheme buffer
</dd>
2436 <dd class=
"description">Username
</dd>
2437 <dt>usernamelen
</dt>
2438 <dd class=
"description">Size of username buffer
</dd>
2440 <dd class=
"description">Hostname
</dd>
2442 <dd class=
"description">Size of hostname buffer
</dd>
2444 <dd class=
"description">Port number to use
</dd>
2446 <dd class=
"description">Resource/filename
</dd>
2447 <dt>resourcelen
</dt>
2448 <dd class=
"description">Size of resource buffer
</dd>
2450 <h4 class=
"discussion">Discussion
</h4>
2451 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
2455 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpSeparateURI">httpSeparateURI
</a></h3>
2456 <p class=
"description">Separate a Universal Resource Identifier into its
2459 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpSeparateURI (
<br>
2460 <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> decoding,
<br>
2461 const char *uri,
<br>
2462 char *scheme,
<br>
2463 int schemelen,
<br>
2464 char *username,
<br>
2465 int usernamelen,
<br>
2466 char *host,
<br>
2467 int hostlen,
<br>
2468 int *port,
<br>
2469 char *resource,
<br>
2470 int resourcelen
<br>
2472 <h4 class=
"parameters">Parameters
</h4>
2475 <dd class=
"description">Decoding flags
</dd>
2477 <dd class=
"description">Universal Resource Identifier
</dd>
2479 <dd class=
"description">Scheme (http, https, etc.)
</dd>
2481 <dd class=
"description">Size of scheme buffer
</dd>
2483 <dd class=
"description">Username
</dd>
2484 <dt>usernamelen
</dt>
2485 <dd class=
"description">Size of username buffer
</dd>
2487 <dd class=
"description">Hostname
</dd>
2489 <dd class=
"description">Size of hostname buffer
</dd>
2491 <dd class=
"description">Port number to use
</dd>
2493 <dd class=
"description">Resource/filename
</dd>
2494 <dt>resourcelen
</dt>
2495 <dd class=
"description">Size of resource buffer
</dd>
2497 <h4 class=
"returnvalue">Return Value
</h4>
2498 <p class=
"description">Result of separation
</p>
2499 <h3 class=
"function"><span class=
"info"> CUPS
1.3/Mac OS X
10.5 </span><a name=
"httpSetAuthString">httpSetAuthString
</a></h3>
2500 <p class=
"description">Set the current authorization string.
</p>
2502 void httpSetAuthString (
<br>
2503 <a href=
"#http_t">http_t
</a> *http,
<br>
2504 const char *scheme,
<br>
2505 const char *data
<br>
2507 <h4 class=
"parameters">Parameters
</h4>
2510 <dd class=
"description">Connection to server
</dd>
2512 <dd class=
"description">Auth scheme (NULL to clear it)
</dd>
2514 <dd class=
"description">Auth data (NULL for none)
</dd>
2516 <h4 class=
"discussion">Discussion
</h4>
2517 <p class=
"discussion">This function just stores a copy of the current authorization string in
2518 the HTTP connection object. You must still call httpSetField() to set
2519 HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
2520 httpHead(), httpOptions(), httpPost, or httpPut().
2523 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"httpSetCookie">httpSetCookie
</a></h3>
2524 <p class=
"description">Set the cookie value(s).
</p>
2526 void httpSetCookie (
<br>
2527 <a href=
"#http_t">http_t
</a> *http,
<br>
2528 const char *cookie
<br>
2530 <h4 class=
"parameters">Parameters
</h4>
2533 <dd class=
"description">Connection
</dd>
2535 <dd class=
"description">Cookie string
</dd>
2537 <h3 class=
"function"><span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span><a name=
"httpSetCredentials">httpSetCredentials
</a></h3>
2538 <p class=
"description">Set the credentials associated with an encrypted
2541 int httpSetCredentials (
<br>
2542 <a href=
"#http_t">http_t
</a> *http,
<br>
2543 cups_array_t *credentials
<br>
2545 <h4 class=
"parameters">Parameters
</h4>
2548 <dd class=
"description">Connection to server
</dd>
2549 <dt>credentials
</dt>
2550 <dd class=
"description">Array of credentials
</dd>
2552 <h4 class=
"returnvalue">Return Value
</h4>
2553 <p class=
"description">Status of call (
0 = success)
</p>
2554 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpSetExpect">httpSetExpect
</a></h3>
2555 <p class=
"description">Set the Expect: header in a request.
</p>
2557 void httpSetExpect (
<br>
2558 <a href=
"#http_t">http_t
</a> *http,
<br>
2559 <a href=
"#http_status_t">http_status_t
</a> expect
<br>
2561 <h4 class=
"parameters">Parameters
</h4>
2564 <dd class=
"description">Connection to server
</dd>
2566 <dd class=
"description">HTTP status to expect (HTTP_CONTINUE)
</dd>
2568 <h4 class=
"discussion">Discussion
</h4>
2569 <p class=
"discussion">Currently only HTTP_CONTINUE is supported for the
"expect
" argument.
2572 <h3 class=
"function"><a name=
"httpSetField">httpSetField
</a></h3>
2573 <p class=
"description">Set the value of an HTTP header.
</p>
2575 void httpSetField (
<br>
2576 <a href=
"#http_t">http_t
</a> *http,
<br>
2577 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
2578 const char *value
<br>
2580 <h4 class=
"parameters">Parameters
</h4>
2583 <dd class=
"description">Connection to server
</dd>
2585 <dd class=
"description">Field index
</dd>
2587 <dd class=
"description">Value
</dd>
2589 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpSetLength">httpSetLength
</a></h3>
2590 <p class=
"description">Set the content-length and content-encoding.
</p>
2592 void httpSetLength (
<br>
2593 <a href=
"#http_t">http_t
</a> *http,
<br>
2594 size_t length
<br>
2596 <h4 class=
"parameters">Parameters
</h4>
2599 <dd class=
"description">Connection to server
</dd>
2601 <dd class=
"description">Length (
0 for chunked)
</dd>
2603 <h3 class=
"function"><span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span><a name=
"httpSetTimeout">httpSetTimeout
</a></h3>
2604 <p class=
"description">Set read/write timeouts and an optional callback.
</p>
2606 void httpSetTimeout (
<br>
2607 <a href=
"#http_t">http_t
</a> *http,
<br>
2608 double timeout,
<br>
2609 <a href=
"#http_timeout_cb_t">http_timeout_cb_t
</a> cb,
<br>
2610 void *user_data
<br>
2612 <h4 class=
"parameters">Parameters
</h4>
2615 <dd class=
"description">Connection to server
</dd>
2617 <dd class=
"description">Number of seconds for timeout,
2618 must be greater than
0</dd>
2620 <dd class=
"description">Callback function or NULL
</dd>
2622 <dd class=
"description">User data pointer
</dd>
2624 <h4 class=
"discussion">Discussion
</h4>
2625 <p class=
"discussion">The optional timeout callback receives both the HTTP connection and a user
2626 data pointer and must return
1 to continue or
0 to error (time) out.
2629 <h3 class=
"function"><a name=
"httpStatus">httpStatus
</a></h3>
2630 <p class=
"description">Return a short string describing a HTTP status code.
</p>
2632 const char *httpStatus (
<br>
2633 <a href=
"#http_status_t">http_status_t
</a> status
<br>
2635 <h4 class=
"parameters">Parameters
</h4>
2638 <dd class=
"description">HTTP status code
</dd>
2640 <h4 class=
"returnvalue">Return Value
</h4>
2641 <p class=
"description">Localized status string
</p>
2642 <h4 class=
"discussion">Discussion
</h4>
2643 <p class=
"discussion">The returned string is localized to the current POSIX locale and is based
2644 on the status strings defined in RFC
2616.
</p>
2645 <h3 class=
"function"><a name=
"httpTrace">httpTrace
</a></h3>
2646 <p class=
"description">Send an TRACE request to the server.
</p>
2649 <a href=
"#http_t">http_t
</a> *http,
<br>
2650 const char *uri
<br>
2652 <h4 class=
"parameters">Parameters
</h4>
2655 <dd class=
"description">Connection to server
</dd>
2657 <dd class=
"description">URI for trace
</dd>
2659 <h4 class=
"returnvalue">Return Value
</h4>
2660 <p class=
"description">Status of call (
0 = success)
</p>
2661 <h3 class=
"function"><a name=
"httpUpdate">httpUpdate
</a></h3>
2662 <p class=
"description">Update the current HTTP state for incoming data.
</p>
2664 <a href=
"#http_status_t">http_status_t
</a> httpUpdate (
<br>
2665 <a href=
"#http_t">http_t
</a> *http
<br>
2667 <h4 class=
"parameters">Parameters
</h4>
2670 <dd class=
"description">Connection to server
</dd>
2672 <h4 class=
"returnvalue">Return Value
</h4>
2673 <p class=
"description">HTTP status
</p>
2674 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"httpWait">httpWait
</a></h3>
2675 <p class=
"description">Wait for data available on a connection.
</p>
2678 <a href=
"#http_t">http_t
</a> *http,
<br>
2679 int msec
<br>
2681 <h4 class=
"parameters">Parameters
</h4>
2684 <dd class=
"description">Connection to server
</dd>
2686 <dd class=
"description">Milliseconds to wait
</dd>
2688 <h4 class=
"returnvalue">Return Value
</h4>
2689 <p class=
"description">1 if data is available,
0 otherwise
</p>
2690 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpWrite">httpWrite
</a></h3>
2691 <p class=
"description">Write data to a HTTP connection.
</p>
2694 <a href=
"#http_t">http_t
</a> *http,
<br>
2695 const char *buffer,
<br>
2696 int length
<br>
2698 <h4 class=
"parameters">Parameters
</h4>
2701 <dd class=
"description">Connection to server
</dd>
2703 <dd class=
"description">Buffer for data
</dd>
2705 <dd class=
"description">Number of bytes to write
</dd>
2707 <h4 class=
"returnvalue">Return Value
</h4>
2708 <p class=
"description">Number of bytes written
</p>
2709 <h4 class=
"discussion">Discussion
</h4>
2710 <p class=
"discussion">This function is deprecated. Use the httpWrite2() function which can
2711 write more than
2GB of data.
2714 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpWrite2">httpWrite2
</a></h3>
2715 <p class=
"description">Write data to a HTTP connection.
</p>
2717 ssize_t httpWrite2 (
<br>
2718 <a href=
"#http_t">http_t
</a> *http,
<br>
2719 const char *buffer,
<br>
2720 size_t length
<br>
2722 <h4 class=
"parameters">Parameters
</h4>
2725 <dd class=
"description">Connection to server
</dd>
2727 <dd class=
"description">Buffer for data
</dd>
2729 <dd class=
"description">Number of bytes to write
</dd>
2731 <h4 class=
"returnvalue">Return Value
</h4>
2732 <p class=
"description">Number of bytes written
</p>
2733 <h3 class=
"function"><a name=
"ippAddBoolean">ippAddBoolean
</a></h3>
2734 <p class=
"description">Add a boolean attribute to an IPP message.
</p>
2736 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBoolean (
<br>
2737 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2738 ipp_tag_t group,
<br>
2739 const char *name,
<br>
2740 char value
<br>
2742 <h4 class=
"parameters">Parameters
</h4>
2745 <dd class=
"description">IPP message
</dd>
2747 <dd class=
"description">IPP group
</dd>
2749 <dd class=
"description">Name of attribute
</dd>
2751 <dd class=
"description">Value of attribute
</dd>
2753 <h4 class=
"returnvalue">Return Value
</h4>
2754 <p class=
"description">New attribute
</p>
2755 <h4 class=
"discussion">Discussion
</h4>
2756 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2757 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2759 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2760 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2761 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2762 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2763 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
2764 <h3 class=
"function"><a name=
"ippAddBooleans">ippAddBooleans
</a></h3>
2765 <p class=
"description">Add an array of boolean values.
</p>
2767 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBooleans (
<br>
2768 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2769 ipp_tag_t group,
<br>
2770 const char *name,
<br>
2771 int num_values,
<br>
2772 const char *values
<br>
2774 <h4 class=
"parameters">Parameters
</h4>
2777 <dd class=
"description">IPP message
</dd>
2779 <dd class=
"description">IPP group
</dd>
2781 <dd class=
"description">Name of attribute
</dd>
2783 <dd class=
"description">Number of values
</dd>
2785 <dd class=
"description">Values
</dd>
2787 <h4 class=
"returnvalue">Return Value
</h4>
2788 <p class=
"description">New attribute
</p>
2789 <h4 class=
"discussion">Discussion
</h4>
2790 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2791 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2793 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2794 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2795 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2796 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2797 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
2798 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"ippAddCollection">ippAddCollection
</a></h3>
2799 <p class=
"description">Add a collection value.
</p>
2801 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollection (
<br>
2802 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2803 ipp_tag_t group,
<br>
2804 const char *name,
<br>
2805 <a href=
"#ipp_t">ipp_t
</a> *value
<br>
2807 <h4 class=
"parameters">Parameters
</h4>
2810 <dd class=
"description">IPP message
</dd>
2812 <dd class=
"description">IPP group
</dd>
2814 <dd class=
"description">Name of attribute
</dd>
2816 <dd class=
"description">Value
</dd>
2818 <h4 class=
"returnvalue">Return Value
</h4>
2819 <p class=
"description">New attribute
</p>
2820 <h4 class=
"discussion">Discussion
</h4>
2821 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2822 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2824 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2825 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2826 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2827 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2828 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
2831 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"ippAddCollections">ippAddCollections
</a></h3>
2832 <p class=
"description">Add an array of collection values.
</p>
2834 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollections (
<br>
2835 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2836 ipp_tag_t group,
<br>
2837 const char *name,
<br>
2838 int num_values,
<br>
2839 const
<a href=
"#ipp_t">ipp_t
</a> **values
<br>
2841 <h4 class=
"parameters">Parameters
</h4>
2844 <dd class=
"description">IPP message
</dd>
2846 <dd class=
"description">IPP group
</dd>
2848 <dd class=
"description">Name of attribute
</dd>
2850 <dd class=
"description">Number of values
</dd>
2852 <dd class=
"description">Values
</dd>
2854 <h4 class=
"returnvalue">Return Value
</h4>
2855 <p class=
"description">New attribute
</p>
2856 <h4 class=
"discussion">Discussion
</h4>
2857 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2858 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2860 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2861 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2862 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2863 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2864 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
2867 <h3 class=
"function"><a name=
"ippAddDate">ippAddDate
</a></h3>
2868 <p class=
"description">Add a date attribute to an IPP message.
</p>
2870 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddDate (
<br>
2871 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2872 ipp_tag_t group,
<br>
2873 const char *name,
<br>
2874 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *value
<br>
2876 <h4 class=
"parameters">Parameters
</h4>
2879 <dd class=
"description">IPP message
</dd>
2881 <dd class=
"description">IPP group
</dd>
2883 <dd class=
"description">Name of attribute
</dd>
2885 <dd class=
"description">Value
</dd>
2887 <h4 class=
"returnvalue">Return Value
</h4>
2888 <p class=
"description">New attribute
</p>
2889 <h4 class=
"discussion">Discussion
</h4>
2890 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2891 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2893 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2894 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2895 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2896 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2897 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
2898 <h3 class=
"function"><a name=
"ippAddInteger">ippAddInteger
</a></h3>
2899 <p class=
"description">Add a integer attribute to an IPP message.
</p>
2901 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddInteger (
<br>
2902 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2903 ipp_tag_t group,
<br>
2904 ipp_tag_t value_tag,
<br>
2905 const char *name,
<br>
2906 int value
<br>
2908 <h4 class=
"parameters">Parameters
</h4>
2911 <dd class=
"description">IPP message
</dd>
2913 <dd class=
"description">IPP group
</dd>
2915 <dd class=
"description">Type of attribute
</dd>
2917 <dd class=
"description">Name of attribute
</dd>
2919 <dd class=
"description">Value of attribute
</dd>
2921 <h4 class=
"returnvalue">Return Value
</h4>
2922 <p class=
"description">New attribute
</p>
2923 <h4 class=
"discussion">Discussion
</h4>
2924 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2925 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2927 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2928 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2929 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2930 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2931 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
2933 Supported values include enum (
<code>IPP_TAG_ENUM
</code>) and integer
2934 (
<code>IPP_TAG_INTEGER
</code>).
</p>
2935 <h3 class=
"function"><a name=
"ippAddIntegers">ippAddIntegers
</a></h3>
2936 <p class=
"description">Add an array of integer values.
</p>
2938 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddIntegers (
<br>
2939 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2940 ipp_tag_t group,
<br>
2941 ipp_tag_t value_tag,
<br>
2942 const char *name,
<br>
2943 int num_values,
<br>
2944 const int *values
<br>
2946 <h4 class=
"parameters">Parameters
</h4>
2949 <dd class=
"description">IPP message
</dd>
2951 <dd class=
"description">IPP group
</dd>
2953 <dd class=
"description">Type of attribute
</dd>
2955 <dd class=
"description">Name of attribute
</dd>
2957 <dd class=
"description">Number of values
</dd>
2959 <dd class=
"description">Values
</dd>
2961 <h4 class=
"returnvalue">Return Value
</h4>
2962 <p class=
"description">New attribute
</p>
2963 <h4 class=
"discussion">Discussion
</h4>
2964 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2965 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2967 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2968 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2969 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2970 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2971 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
2973 Supported values include enum (
<code>IPP_TAG_ENUM
</code>) and integer
2974 (
<code>IPP_TAG_INTEGER
</code>).
</p>
2975 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippAddOctetString">ippAddOctetString
</a></h3>
2976 <p class=
"description">Add an octetString value to an IPP message.
</p>
2978 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddOctetString (
<br>
2979 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2980 ipp_tag_t group,
<br>
2981 const char *name,
<br>
2982 const void *data,
<br>
2983 int datalen
<br>
2985 <h4 class=
"parameters">Parameters
</h4>
2988 <dd class=
"description">IPP message
</dd>
2990 <dd class=
"description">IPP group
</dd>
2992 <dd class=
"description">Name of attribute
</dd>
2994 <dd class=
"description">octetString data
</dd>
2996 <dd class=
"description">Length of data in bytes
</dd>
2998 <h4 class=
"returnvalue">Return Value
</h4>
2999 <p class=
"description">New attribute
</p>
3000 <h4 class=
"discussion">Discussion
</h4>
3001 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3002 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3004 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3005 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3006 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3007 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3008 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
3011 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippAddOutOfBand">ippAddOutOfBand
</a></h3>
3012 <p class=
"description">Add an out-of-band value to an IPP message.
</p>
3014 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddOutOfBand (
<br>
3015 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3016 ipp_tag_t group,
<br>
3017 ipp_tag_t value_tag,
<br>
3018 const char *name
<br>
3020 <h4 class=
"parameters">Parameters
</h4>
3023 <dd class=
"description">IPP message
</dd>
3025 <dd class=
"description">IPP group
</dd>
3027 <dd class=
"description">Type of attribute
</dd>
3029 <dd class=
"description">Name of attribute
</dd>
3031 <h4 class=
"returnvalue">Return Value
</h4>
3032 <p class=
"description">New attribute
</p>
3033 <h4 class=
"discussion">Discussion
</h4>
3034 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3035 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3037 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3038 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3039 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3040 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3041 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3043 Supported out-of-band values include unsupported-value
3044 (
<code>IPP_TAG_UNSUPPORTED_VALUE
</code>), default (
<code>IPP_TAG_DEFAULT
</code>), unknown
3045 (
<code>IPP_TAG_UNKNOWN
</code>), no-value (
<code>IPP_TAG_NOVALUE
</code>), not-settable
3046 (
<code>IPP_TAG_NOTSETTABLE
</code>), delete-attribute (
<code>IPP_TAG_DELETEATTR
</code>), and
3047 admin-define (
<code>IPP_TAG_ADMINDEFINE
</code>).
3050 <h3 class=
"function"><a name=
"ippAddRange">ippAddRange
</a></h3>
3051 <p class=
"description">Add a range of values to an IPP message.
</p>
3053 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRange (
<br>
3054 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3055 ipp_tag_t group,
<br>
3056 const char *name,
<br>
3057 int lower,
<br>
3058 int upper
<br>
3060 <h4 class=
"parameters">Parameters
</h4>
3063 <dd class=
"description">IPP message
</dd>
3065 <dd class=
"description">IPP group
</dd>
3067 <dd class=
"description">Name of attribute
</dd>
3069 <dd class=
"description">Lower value
</dd>
3071 <dd class=
"description">Upper value
</dd>
3073 <h4 class=
"returnvalue">Return Value
</h4>
3074 <p class=
"description">New attribute
</p>
3075 <h4 class=
"discussion">Discussion
</h4>
3076 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3077 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3079 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3080 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3081 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3082 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3083 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3085 The
<code>lower
</code> parameter must be less than or equal to the
<code>upper
</code> parameter.
</p>
3086 <h3 class=
"function"><a name=
"ippAddRanges">ippAddRanges
</a></h3>
3087 <p class=
"description">Add ranges of values to an IPP message.
</p>
3089 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRanges (
<br>
3090 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3091 ipp_tag_t group,
<br>
3092 const char *name,
<br>
3093 int num_values,
<br>
3094 const int *lower,
<br>
3095 const int *upper
<br>
3097 <h4 class=
"parameters">Parameters
</h4>
3100 <dd class=
"description">IPP message
</dd>
3102 <dd class=
"description">IPP group
</dd>
3104 <dd class=
"description">Name of attribute
</dd>
3106 <dd class=
"description">Number of values
</dd>
3108 <dd class=
"description">Lower values
</dd>
3110 <dd class=
"description">Upper values
</dd>
3112 <h4 class=
"returnvalue">Return Value
</h4>
3113 <p class=
"description">New attribute
</p>
3114 <h4 class=
"discussion">Discussion
</h4>
3115 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3116 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3118 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3119 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3120 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3121 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3122 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3123 <h3 class=
"function"><a name=
"ippAddResolution">ippAddResolution
</a></h3>
3124 <p class=
"description">Add a resolution value to an IPP message.
</p>
3126 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolution (
<br>
3127 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3128 ipp_tag_t group,
<br>
3129 const char *name,
<br>
3130 <a href=
"#ipp_res_t">ipp_res_t
</a> units,
<br>
3131 int xres,
<br>
3132 int yres
<br>
3134 <h4 class=
"parameters">Parameters
</h4>
3137 <dd class=
"description">IPP message
</dd>
3139 <dd class=
"description">IPP group
</dd>
3141 <dd class=
"description">Name of attribute
</dd>
3143 <dd class=
"description">Units for resolution
</dd>
3145 <dd class=
"description">X resolution
</dd>
3147 <dd class=
"description">Y resolution
</dd>
3149 <h4 class=
"returnvalue">Return Value
</h4>
3150 <p class=
"description">New attribute
</p>
3151 <h4 class=
"discussion">Discussion
</h4>
3152 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3153 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3155 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3156 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3157 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3158 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3159 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3160 <h3 class=
"function"><a name=
"ippAddResolutions">ippAddResolutions
</a></h3>
3161 <p class=
"description">Add resolution values to an IPP message.
</p>
3163 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolutions (
<br>
3164 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3165 ipp_tag_t group,
<br>
3166 const char *name,
<br>
3167 int num_values,
<br>
3168 <a href=
"#ipp_res_t">ipp_res_t
</a> units,
<br>
3169 const int *xres,
<br>
3170 const int *yres
<br>
3172 <h4 class=
"parameters">Parameters
</h4>
3175 <dd class=
"description">IPP message
</dd>
3177 <dd class=
"description">IPP group
</dd>
3179 <dd class=
"description">Name of attribute
</dd>
3181 <dd class=
"description">Number of values
</dd>
3183 <dd class=
"description">Units for resolution
</dd>
3185 <dd class=
"description">X resolutions
</dd>
3187 <dd class=
"description">Y resolutions
</dd>
3189 <h4 class=
"returnvalue">Return Value
</h4>
3190 <p class=
"description">New attribute
</p>
3191 <h4 class=
"discussion">Discussion
</h4>
3192 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3193 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3195 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3196 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3197 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3198 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3199 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3200 <h3 class=
"function"><a name=
"ippAddSeparator">ippAddSeparator
</a></h3>
3201 <p class=
"description">Add a group separator to an IPP message.
</p>
3203 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddSeparator (
<br>
3204 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3206 <h4 class=
"parameters">Parameters
</h4>
3209 <dd class=
"description">IPP message
</dd>
3211 <h4 class=
"returnvalue">Return Value
</h4>
3212 <p class=
"description">New attribute
</p>
3213 <h4 class=
"discussion">Discussion
</h4>
3214 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3215 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
</p>
3216 <h3 class=
"function"><a name=
"ippAddString">ippAddString
</a></h3>
3217 <p class=
"description">Add a language-encoded string to an IPP message.
</p>
3219 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddString (
<br>
3220 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3221 ipp_tag_t group,
<br>
3222 ipp_tag_t value_tag,
<br>
3223 const char *name,
<br>
3224 const char *language,
<br>
3225 const char *value
<br>
3227 <h4 class=
"parameters">Parameters
</h4>
3230 <dd class=
"description">IPP message
</dd>
3232 <dd class=
"description">IPP group
</dd>
3234 <dd class=
"description">Type of attribute
</dd>
3236 <dd class=
"description">Name of attribute
</dd>
3238 <dd class=
"description">Language code
</dd>
3240 <dd class=
"description">Value
</dd>
3242 <h4 class=
"returnvalue">Return Value
</h4>
3243 <p class=
"description">New attribute
</p>
3244 <h4 class=
"discussion">Discussion
</h4>
3245 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3246 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3248 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3249 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3250 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3251 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3252 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3254 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
3255 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
3256 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
3257 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
3258 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
3259 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
3261 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage and
3262 textWithLanguage string values and must be
<code>NULL
</code> for all other string values.
</p>
3263 <h3 class=
"function"><a name=
"ippAddStrings">ippAddStrings
</a></h3>
3264 <p class=
"description">Add language-encoded strings to an IPP message.
</p>
3266 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddStrings (
<br>
3267 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3268 ipp_tag_t group,
<br>
3269 ipp_tag_t value_tag,
<br>
3270 const char *name,
<br>
3271 int num_values,
<br>
3272 const char *language,
<br>
3273 const char *const *values
<br>
3275 <h4 class=
"parameters">Parameters
</h4>
3278 <dd class=
"description">IPP message
</dd>
3280 <dd class=
"description">IPP group
</dd>
3282 <dd class=
"description">Type of attribute
</dd>
3284 <dd class=
"description">Name of attribute
</dd>
3286 <dd class=
"description">Number of values
</dd>
3288 <dd class=
"description">Language code (
<code>NULL
</code> for default)
</dd>
3290 <dd class=
"description">Values
</dd>
3292 <h4 class=
"returnvalue">Return Value
</h4>
3293 <p class=
"description">New attribute
</p>
3294 <h4 class=
"discussion">Discussion
</h4>
3295 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3296 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3298 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3299 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3300 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3301 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3302 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3304 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
3305 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
3306 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
3307 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
3308 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
3309 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
3311 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage and
3312 textWithLanguage string values and must be
<code>NULL
</code> for all other string values.
</p>
3313 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippAttributeString">ippAttributeString
</a></h3>
3314 <p class=
"description">Convert the attribute's value to a string.
</p>
3316 size_t ippAttributeString (
<br>
3317 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3318 char *buffer,
<br>
3319 size_t bufsize
<br>
3321 <h4 class=
"parameters">Parameters
</h4>
3324 <dd class=
"description">Attribute
</dd>
3326 <dd class=
"description">String buffer or NULL
</dd>
3328 <dd class=
"description">Size of string buffer
</dd>
3330 <h4 class=
"returnvalue">Return Value
</h4>
3331 <p class=
"description">Number of bytes less nul
</p>
3332 <h4 class=
"discussion">Discussion
</h4>
3333 <p class=
"discussion">Returns the number of bytes that would be written, not including the
3334 trailing nul. The buffer pointer can be NULL to get the required length,
3335 just like (v)snprintf.
3338 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippCopyAttribute">ippCopyAttribute
</a></h3>
3339 <p class=
"description">Copy an attribute.
</p>
3341 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippCopyAttribute (
<br>
3342 <a href=
"#ipp_t">ipp_t
</a> *dst,
<br>
3343 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *srcattr,
<br>
3344 int quickcopy
<br>
3346 <h4 class=
"parameters">Parameters
</h4>
3349 <dd class=
"description">Destination IPP message
</dd>
3351 <dd class=
"description">Attribute to copy
</dd>
3353 <dd class=
"description">1 for a referenced copy,
0 for normal
</dd>
3355 <h4 class=
"returnvalue">Return Value
</h4>
3356 <p class=
"description">New attribute
</p>
3357 <h4 class=
"discussion">Discussion
</h4>
3358 <p class=
"discussion">The specified attribute,
<code>attr
</code>, is copied to the destination IPP message.
3359 When
<code>quickcopy
</code> is non-zero, a
"shallow
" reference copy of the attribute is
3360 created - this should only be done as long as the original source IPP message will
3361 not be freed for the life of the destination.
3364 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippCopyAttributes">ippCopyAttributes
</a></h3>
3365 <p class=
"description">Copy attributes from one IPP message to another.
</p>
3367 int ippCopyAttributes (
<br>
3368 <a href=
"#ipp_t">ipp_t
</a> *dst,
<br>
3369 <a href=
"#ipp_t">ipp_t
</a> *src,
<br>
3370 int quickcopy,
<br>
3371 <a href=
"#ipp_copycb_t">ipp_copycb_t
</a> cb,
<br>
3372 void *context
<br>
3374 <h4 class=
"parameters">Parameters
</h4>
3377 <dd class=
"description">Destination IPP message
</dd>
3379 <dd class=
"description">Source IPP message
</dd>
3381 <dd class=
"description">1 for a referenced copy,
0 for normal
</dd>
3383 <dd class=
"description">Copy callback or
<code>NULL
</code> for none
</dd>
3385 <dd class=
"description">Context pointer
</dd>
3387 <h4 class=
"returnvalue">Return Value
</h4>
3388 <p class=
"description">1 on success,
0 on error
</p>
3389 <h4 class=
"discussion">Discussion
</h4>
3390 <p class=
"discussion">Zero or more attributes are copied from the source IPP message, @code@ src, to the
3391 destination IPP message,
<code>dst
</code>. When
<code>quickcopy
</code> is non-zero, a
"shallow
"
3392 reference copy of the attribute is created - this should only be done as long as the
3393 original source IPP message will not be freed for the life of the destination.
<br>
3395 The
<code>cb
</code> and
<code>context
</code> parameters provide a generic way to
"filter
" the
3396 attributes that are copied - the function must return
1 to copy the attribute or
3397 0 to skip it. The function may also choose to do a partial copy of the source attribute
3401 <h3 class=
"function"><a name=
"ippDateToTime">ippDateToTime
</a></h3>
3402 <p class=
"description">Convert from RFC
1903 Date/Time format to UNIX time
3405 time_t ippDateToTime (
<br>
3406 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *date
<br>
3408 <h4 class=
"parameters">Parameters
</h4>
3411 <dd class=
"description">RFC
1903 date info
</dd>
3413 <h4 class=
"returnvalue">Return Value
</h4>
3414 <p class=
"description">UNIX time value
</p>
3415 <h3 class=
"function"><a name=
"ippDelete">ippDelete
</a></h3>
3416 <p class=
"description">Delete an IPP message.
</p>
3418 void ippDelete (
<br>
3419 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3421 <h4 class=
"parameters">Parameters
</h4>
3424 <dd class=
"description">IPP message
</dd>
3426 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"ippDeleteAttribute">ippDeleteAttribute
</a></h3>
3427 <p class=
"description">Delete a single attribute in an IPP message.
</p>
3429 void ippDeleteAttribute (
<br>
3430 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3431 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
3433 <h4 class=
"parameters">Parameters
</h4>
3436 <dd class=
"description">IPP message
</dd>
3438 <dd class=
"description">Attribute to delete
</dd>
3440 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippDeleteValues">ippDeleteValues
</a></h3>
3441 <p class=
"description">Delete values in an attribute.
</p>
3443 int ippDeleteValues (
<br>
3444 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3445 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
3446 int element,
<br>
3447 int count
<br>
3449 <h4 class=
"parameters">Parameters
</h4>
3452 <dd class=
"description">IPP message
</dd>
3454 <dd class=
"description">Attribute
</dd>
3456 <dd class=
"description">Index of first value to delete (
0-based)
</dd>
3458 <dd class=
"description">Number of values to delete
</dd>
3460 <h4 class=
"returnvalue">Return Value
</h4>
3461 <p class=
"description">1 on success,
0 on failure
</p>
3462 <h4 class=
"discussion">Discussion
</h4>
3463 <p class=
"discussion">The
<code>element
</code> parameter specifies the first value to delete, starting at
3464 0. It must be less than the number of values returned by
<a href=
"#ippGetCount"><code>ippGetCount
</code></a>.
<br>
3466 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
3468 Deleting all values in an attribute deletes the attribute.
3471 <h3 class=
"function"><a name=
"ippEnumString">ippEnumString
</a></h3>
3472 <p class=
"description">Return a string corresponding to the enum value.
</p>
3474 const char *ippEnumString (
<br>
3475 const char *attrname,
<br>
3476 int enumvalue
<br>
3478 <h4 class=
"parameters">Parameters
</h4>
3481 <dd class=
"description">Attribute name
</dd>
3483 <dd class=
"description">Enum value
</dd>
3485 <h4 class=
"returnvalue">Return Value
</h4>
3486 <p class=
"description">Enum string
</p>
3487 <h3 class=
"function"><a name=
"ippEnumValue">ippEnumValue
</a></h3>
3488 <p class=
"description">Return the value associated with a given enum string.
</p>
3490 int ippEnumValue (
<br>
3491 const char *attrname,
<br>
3492 const char *enumstring
<br>
3494 <h4 class=
"parameters">Parameters
</h4>
3497 <dd class=
"description">Attribute name
</dd>
3499 <dd class=
"description">Enum string
</dd>
3501 <h4 class=
"returnvalue">Return Value
</h4>
3502 <p class=
"description">Enum value or -
1 if unknown
</p>
3503 <h3 class=
"function"><a name=
"ippErrorString">ippErrorString
</a></h3>
3504 <p class=
"description">Return a name for the given status code.
</p>
3506 const char *ippErrorString (
<br>
3507 ipp_status_t error
<br>
3509 <h4 class=
"parameters">Parameters
</h4>
3512 <dd class=
"description">Error status
</dd>
3514 <h4 class=
"returnvalue">Return Value
</h4>
3515 <p class=
"description">Text string
</p>
3516 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippErrorValue">ippErrorValue
</a></h3>
3517 <p class=
"description">Return a status code for the given name.
</p>
3519 ipp_status_t ippErrorValue (
<br>
3520 const char *name
<br>
3522 <h4 class=
"parameters">Parameters
</h4>
3525 <dd class=
"description">Name
</dd>
3527 <h4 class=
"returnvalue">Return Value
</h4>
3528 <p class=
"description">IPP status code
</p>
3529 <h3 class=
"function"><a name=
"ippFindAttribute">ippFindAttribute
</a></h3>
3530 <p class=
"description">Find a named attribute in a request.
</p>
3532 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindAttribute (
<br>
3533 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3534 const char *name,
<br>
3535 ipp_tag_t type
<br>
3537 <h4 class=
"parameters">Parameters
</h4>
3540 <dd class=
"description">IPP message
</dd>
3542 <dd class=
"description">Name of attribute
</dd>
3544 <dd class=
"description">Type of attribute
</dd>
3546 <h4 class=
"returnvalue">Return Value
</h4>
3547 <p class=
"description">Matching attribute
</p>
3548 <h3 class=
"function"><a name=
"ippFindNextAttribute">ippFindNextAttribute
</a></h3>
3549 <p class=
"description">Find the next named attribute in a request.
</p>
3551 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindNextAttribute (
<br>
3552 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3553 const char *name,
<br>
3554 ipp_tag_t type
<br>
3556 <h4 class=
"parameters">Parameters
</h4>
3559 <dd class=
"description">IPP message
</dd>
3561 <dd class=
"description">Name of attribute
</dd>
3563 <dd class=
"description">Type of attribute
</dd>
3565 <h4 class=
"returnvalue">Return Value
</h4>
3566 <p class=
"description">Matching attribute
</p>
3567 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippFirstAttribute">ippFirstAttribute
</a></h3>
3568 <p class=
"description">Return the first attribute in the message.
</p>
3570 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFirstAttribute (
<br>
3571 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3573 <h4 class=
"parameters">Parameters
</h4>
3576 <dd class=
"description">IPP message
</dd>
3578 <h4 class=
"returnvalue">Return Value
</h4>
3579 <p class=
"description">First attribute or
<code>NULL
</code> if none
</p>
3580 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetBoolean">ippGetBoolean
</a></h3>
3581 <p class=
"description">Get a boolean value for an attribute.
</p>
3583 int ippGetBoolean (
<br>
3584 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3585 int element
<br>
3587 <h4 class=
"parameters">Parameters
</h4>
3590 <dd class=
"description">IPP attribute
</dd>
3592 <dd class=
"description">Value number (
0-based)
</dd>
3594 <h4 class=
"returnvalue">Return Value
</h4>
3595 <p class=
"description">Boolean value or -
1 on error
</p>
3596 <h4 class=
"discussion">Discussion
</h4>
3597 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
3598 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
3601 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetCollection">ippGetCollection
</a></h3>
3602 <p class=
"description">Get a collection value for an attribute.
</p>
3604 <a href=
"#ipp_t">ipp_t
</a> *ippGetCollection (
<br>
3605 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3606 int element
<br>
3608 <h4 class=
"parameters">Parameters
</h4>
3611 <dd class=
"description">IPP attribute
</dd>
3613 <dd class=
"description">Value number (
0-based)
</dd>
3615 <h4 class=
"returnvalue">Return Value
</h4>
3616 <p class=
"description">Collection value or
<code>NULL
</code> on error
</p>
3617 <h4 class=
"discussion">Discussion
</h4>
3618 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
3619 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
3622 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetCount">ippGetCount
</a></h3>
3623 <p class=
"description">Get the number of values in an attribute.
</p>
3625 int ippGetCount (
<br>
3626 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
3628 <h4 class=
"parameters">Parameters
</h4>
3631 <dd class=
"description">IPP attribute
</dd>
3633 <h4 class=
"returnvalue">Return Value
</h4>
3634 <p class=
"description">Number of values or -
1 on error
</p>
3635 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetDate">ippGetDate
</a></h3>
3636 <p class=
"description">Get a date value for an attribute.
</p>
3638 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *ippGetDate (
<br>
3639 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3640 int element
<br>
3642 <h4 class=
"parameters">Parameters
</h4>
3645 <dd class=
"description">IPP attribute
</dd>
3647 <dd class=
"description">Value number (
0-based)
</dd>
3649 <h4 class=
"returnvalue">Return Value
</h4>
3650 <p class=
"description">Date value or
<code>NULL
</code></p>
3651 <h4 class=
"discussion">Discussion
</h4>
3652 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
3653 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
3656 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetGroupTag">ippGetGroupTag
</a></h3>
3657 <p class=
"description">Get the group associated with an attribute.
</p>
3659 ipp_tag_t ippGetGroupTag (
<br>
3660 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
3662 <h4 class=
"parameters">Parameters
</h4>
3665 <dd class=
"description">IPP attribute
</dd>
3667 <h4 class=
"returnvalue">Return Value
</h4>
3668 <p class=
"description">Group tag or
<code>IPP_TAG_ZERO
</code> on error
</p>
3669 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetInteger">ippGetInteger
</a></h3>
3670 <p class=
"description">Get the integer/enum value for an attribute.
</p>
3672 int ippGetInteger (
<br>
3673 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3674 int element
<br>
3676 <h4 class=
"parameters">Parameters
</h4>
3679 <dd class=
"description">IPP attribute
</dd>
3681 <dd class=
"description">Value number (
0-based)
</dd>
3683 <h4 class=
"returnvalue">Return Value
</h4>
3684 <p class=
"description">Value or -
1 on error
</p>
3685 <h4 class=
"discussion">Discussion
</h4>
3686 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
3687 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
3690 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetName">ippGetName
</a></h3>
3691 <p class=
"description">Get the attribute name.
</p>
3693 const char *ippGetName (
<br>
3694 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
3696 <h4 class=
"parameters">Parameters
</h4>
3699 <dd class=
"description">IPP attribute
</dd>
3701 <h4 class=
"returnvalue">Return Value
</h4>
3702 <p class=
"description">Attribute name or
<code>NULL
</code> for separators
</p>
3703 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetOperation">ippGetOperation
</a></h3>
3704 <p class=
"description">Get the operation ID in an IPP message.
</p>
3706 ipp_op_t ippGetOperation (
<br>
3707 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3709 <h4 class=
"parameters">Parameters
</h4>
3712 <dd class=
"description">IPP request message
</dd>
3714 <h4 class=
"returnvalue">Return Value
</h4>
3715 <p class=
"description">Operation ID or -
1 on error
</p>
3716 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetRange">ippGetRange
</a></h3>
3717 <p class=
"description">Get a rangeOfInteger value from an attribute.
</p>
3719 int ippGetRange (
<br>
3720 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3721 int element,
<br>
3722 int *uppervalue
<br>
3724 <h4 class=
"parameters">Parameters
</h4>
3727 <dd class=
"description">IPP attribute
</dd>
3729 <dd class=
"description">Value number (
0-based)
</dd>
3731 <dd class=
"description">Upper value of range
</dd>
3733 <h4 class=
"returnvalue">Return Value
</h4>
3734 <p class=
"description">Lower value of range or -
1</p>
3735 <h4 class=
"discussion">Discussion
</h4>
3736 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
3737 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
3740 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetRequestId">ippGetRequestId
</a></h3>
3741 <p class=
"description">Get the request ID from an IPP message.
</p>
3743 int ippGetRequestId (
<br>
3744 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3746 <h4 class=
"parameters">Parameters
</h4>
3749 <dd class=
"description">IPP message
</dd>
3751 <h4 class=
"returnvalue">Return Value
</h4>
3752 <p class=
"description">Request ID or -
1 on error
</p>
3753 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetResolution">ippGetResolution
</a></h3>
3754 <p class=
"description">Get a resolution value for an attribute.
</p>
3756 int ippGetResolution (
<br>
3757 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3758 int element,
<br>
3759 int *yres,
<br>
3760 <a href=
"#ipp_res_t">ipp_res_t
</a> *units
<br>
3762 <h4 class=
"parameters">Parameters
</h4>
3765 <dd class=
"description">IPP attribute
</dd>
3767 <dd class=
"description">Value number (
0-based)
</dd>
3769 <dd class=
"description">Vertical/feed resolution
</dd>
3771 <dd class=
"description">Units for resolution
</dd>
3773 <h4 class=
"returnvalue">Return Value
</h4>
3774 <p class=
"description">Horizontal/cross feed resolution or -
1</p>
3775 <h4 class=
"discussion">Discussion
</h4>
3776 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
3777 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
3780 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetState">ippGetState
</a></h3>
3781 <p class=
"description">Get the IPP message state.
</p>
3783 <a href=
"#ipp_state_t">ipp_state_t
</a> ippGetState (
<br>
3784 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3786 <h4 class=
"parameters">Parameters
</h4>
3789 <dd class=
"description">IPP message
</dd>
3791 <h4 class=
"returnvalue">Return Value
</h4>
3792 <p class=
"description">IPP message state value
</p>
3793 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetStatusCode">ippGetStatusCode
</a></h3>
3794 <p class=
"description">Get the status code from an IPP response or event message.
</p>
3796 ipp_status_t ippGetStatusCode (
<br>
3797 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3799 <h4 class=
"parameters">Parameters
</h4>
3802 <dd class=
"description">IPP response or event message
</dd>
3804 <h4 class=
"returnvalue">Return Value
</h4>
3805 <p class=
"description">Status code in IPP message
</p>
3806 <h3 class=
"function"><a name=
"ippGetString">ippGetString
</a></h3>
3807 <p class=
"description">Return the value...
</p>
3809 const char *ippGetString (
<br>
3810 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3811 int element,
<br>
3812 const char **language
<br>
3814 <h4 class=
"parameters">Parameters
</h4>
3817 <dd class=
"description">IPP attribute
</dd>
3819 <dd class=
"description">Value number (
0-based)
</dd>
3821 <dd class=
"description">Language code (
<code>NULL
</code> for don't care)
</dd>
3823 <h4 class=
"returnvalue">Return Value
</h4>
3824 <p class=
"description">Get the string and optionally the language code for an attribute.
</p>
3825 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
3826 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
3829 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetValueTag">ippGetValueTag
</a></h3>
3830 <p class=
"description">Get the value tag for an attribute.
</p>
3832 ipp_tag_t ippGetValueTag (
<br>
3833 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
3835 <h4 class=
"parameters">Parameters
</h4>
3838 <dd class=
"description">IPP attribute
</dd>
3840 <h4 class=
"returnvalue">Return Value
</h4>
3841 <p class=
"description">Value tag or
<code>IPP_TAG_ZERO
</code> on error
</p>
3842 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetVersion">ippGetVersion
</a></h3>
3843 <p class=
"description">Get the major and minor version number from an IPP message.
</p>
3845 int ippGetVersion (
<br>
3846 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3847 int *minor
<br>
3849 <h4 class=
"parameters">Parameters
</h4>
3852 <dd class=
"description">IPP message
</dd>
3854 <dd class=
"description">Minor version number or
<code>NULL
</code></dd>
3856 <h4 class=
"returnvalue">Return Value
</h4>
3857 <p class=
"description">Major version number or -
1 on error
</p>
3858 <h3 class=
"function"><a name=
"ippLength">ippLength
</a></h3>
3859 <p class=
"description">Compute the length of an IPP message.
</p>
3861 size_t ippLength (
<br>
3862 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3864 <h4 class=
"parameters">Parameters
</h4>
3867 <dd class=
"description">IPP message
</dd>
3869 <h4 class=
"returnvalue">Return Value
</h4>
3870 <p class=
"description">Size of IPP message
</p>
3871 <h3 class=
"function"><a name=
"ippNew">ippNew
</a></h3>
3872 <p class=
"description">Allocate a new IPP message.
</p>
3874 <a href=
"#ipp_t">ipp_t
</a> *ippNew (void);
</p>
3875 <h4 class=
"returnvalue">Return Value
</h4>
3876 <p class=
"description">New IPP message
</p>
3877 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippNewRequest">ippNewRequest
</a></h3>
3878 <p class=
"description">Allocate a new IPP request message.
</p>
3880 <a href=
"#ipp_t">ipp_t
</a> *ippNewRequest (
<br>
3881 ipp_op_t op
<br>
3883 <h4 class=
"parameters">Parameters
</h4>
3886 <dd class=
"description">Operation code
</dd>
3888 <h4 class=
"returnvalue">Return Value
</h4>
3889 <p class=
"description">IPP request message
</p>
3890 <h4 class=
"discussion">Discussion
</h4>
3891 <p class=
"discussion">The new request message is initialized with the attributes-charset and
3892 attributes-natural-language attributes added. The
3893 attributes-natural-language value is derived from the current locale.
3896 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippNextAttribute">ippNextAttribute
</a></h3>
3897 <p class=
"description">Return the next attribute in the message.
</p>
3899 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippNextAttribute (
<br>
3900 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3902 <h4 class=
"parameters">Parameters
</h4>
3905 <dd class=
"description">IPP message
</dd>
3907 <h4 class=
"returnvalue">Return Value
</h4>
3908 <p class=
"description">Next attribute or
<code>NULL
</code> if none
</p>
3909 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippOpString">ippOpString
</a></h3>
3910 <p class=
"description">Return a name for the given operation id.
</p>
3912 const char *ippOpString (
<br>
3913 ipp_op_t op
<br>
3915 <h4 class=
"parameters">Parameters
</h4>
3918 <dd class=
"description">Operation ID
</dd>
3920 <h4 class=
"returnvalue">Return Value
</h4>
3921 <p class=
"description">Name
</p>
3922 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippOpValue">ippOpValue
</a></h3>
3923 <p class=
"description">Return an operation id for the given name.
</p>
3925 ipp_op_t ippOpValue (
<br>
3926 const char *name
<br>
3928 <h4 class=
"parameters">Parameters
</h4>
3931 <dd class=
"description">Textual name
</dd>
3933 <h4 class=
"returnvalue">Return Value
</h4>
3934 <p class=
"description">Operation ID
</p>
3935 <h3 class=
"function"><a name=
"ippPort">ippPort
</a></h3>
3936 <p class=
"description">Return the default IPP port number.
</p>
3938 int ippPort (void);
</p>
3939 <h4 class=
"returnvalue">Return Value
</h4>
3940 <p class=
"description">Port number
</p>
3941 <h3 class=
"function"><a name=
"ippRead">ippRead
</a></h3>
3942 <p class=
"description">Read data for an IPP message from a HTTP connection.
</p>
3944 <a href=
"#ipp_state_t">ipp_state_t
</a> ippRead (
<br>
3945 <a href=
"#http_t">http_t
</a> *http,
<br>
3946 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3948 <h4 class=
"parameters">Parameters
</h4>
3951 <dd class=
"description">HTTP connection
</dd>
3953 <dd class=
"description">IPP data
</dd>
3955 <h4 class=
"returnvalue">Return Value
</h4>
3956 <p class=
"description">Current state
</p>
3957 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"ippReadFile">ippReadFile
</a></h3>
3958 <p class=
"description">Read data for an IPP message from a file.
</p>
3960 <a href=
"#ipp_state_t">ipp_state_t
</a> ippReadFile (
<br>
3961 int fd,
<br>
3962 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3964 <h4 class=
"parameters">Parameters
</h4>
3967 <dd class=
"description">HTTP data
</dd>
3969 <dd class=
"description">IPP data
</dd>
3971 <h4 class=
"returnvalue">Return Value
</h4>
3972 <p class=
"description">Current state
</p>
3973 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippReadIO">ippReadIO
</a></h3>
3974 <p class=
"description">Read data for an IPP message.
</p>
3976 <a href=
"#ipp_state_t">ipp_state_t
</a> ippReadIO (
<br>
3977 void *src,
<br>
3978 <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br>
3979 int blocking,
<br>
3980 <a href=
"#ipp_t">ipp_t
</a> *parent,
<br>
3981 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3983 <h4 class=
"parameters">Parameters
</h4>
3986 <dd class=
"description">Data source
</dd>
3988 <dd class=
"description">Read callback function
</dd>
3990 <dd class=
"description">Use blocking IO?
</dd>
3992 <dd class=
"description">Parent request, if any
</dd>
3994 <dd class=
"description">IPP data
</dd>
3996 <h4 class=
"returnvalue">Return Value
</h4>
3997 <p class=
"description">Current state
</p>
3998 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetBoolean">ippSetBoolean
</a></h3>
3999 <p class=
"description">Set a boolean value in an attribute.
</p>
4001 int ippSetBoolean (
<br>
4002 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4003 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4004 int element,
<br>
4005 int boolvalue
<br>
4007 <h4 class=
"parameters">Parameters
</h4>
4010 <dd class=
"description">IPP message
</dd>
4012 <dd class=
"description">IPP attribute
</dd>
4014 <dd class=
"description">Value number (
0-based)
</dd>
4016 <dd class=
"description">Boolean value
</dd>
4018 <h4 class=
"returnvalue">Return Value
</h4>
4019 <p class=
"description">1 on success,
0 on failure
</p>
4020 <h4 class=
"discussion">Discussion
</h4>
4021 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4022 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4024 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4026 The
<code>element
</code> parameter specifies which value to set from
0 to
4027 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4030 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetCollection">ippSetCollection
</a></h3>
4031 <p class=
"description">Set a collection value in an attribute.
</p>
4033 int ippSetCollection (
<br>
4034 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4035 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4036 int element,
<br>
4037 <a href=
"#ipp_t">ipp_t
</a> *colvalue
<br>
4039 <h4 class=
"parameters">Parameters
</h4>
4042 <dd class=
"description">IPP message
</dd>
4044 <dd class=
"description">IPP attribute
</dd>
4046 <dd class=
"description">Value number (
0-based)
</dd>
4048 <dd class=
"description">Collection value
</dd>
4050 <h4 class=
"returnvalue">Return Value
</h4>
4051 <p class=
"description">1 on success,
0 on failure
</p>
4052 <h4 class=
"discussion">Discussion
</h4>
4053 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4054 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4056 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4058 The
<code>element
</code> parameter specifies which value to set from
0 to
4059 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4062 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetDate">ippSetDate
</a></h3>
4063 <p class=
"description">Set a date value in an attribute.
</p>
4065 int ippSetDate (
<br>
4066 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4067 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4068 int element,
<br>
4069 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *datevalue
<br>
4071 <h4 class=
"parameters">Parameters
</h4>
4074 <dd class=
"description">IPP message
</dd>
4076 <dd class=
"description">IPP attribute
</dd>
4078 <dd class=
"description">Value number (
0-based)
</dd>
4080 <dd class=
"description">Date value
</dd>
4082 <h4 class=
"returnvalue">Return Value
</h4>
4083 <p class=
"description">1 on success,
0 on failure
</p>
4084 <h4 class=
"discussion">Discussion
</h4>
4085 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4086 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4088 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4090 The
<code>element
</code> parameter specifies which value to set from
0 to
4091 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4094 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetGroupTag">ippSetGroupTag
</a></h3>
4095 <p class=
"description">Set the group tag of an attribute.
</p>
4097 int ippSetGroupTag (
<br>
4098 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4099 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4100 ipp_tag_t group_tag
<br>
4102 <h4 class=
"parameters">Parameters
</h4>
4105 <dd class=
"description">IPP message
</dd>
4107 <dd class=
"description">Attribute
</dd>
4109 <dd class=
"description">Group tag
</dd>
4111 <h4 class=
"returnvalue">Return Value
</h4>
4112 <p class=
"description">1 on success,
0 on failure
</p>
4113 <h4 class=
"discussion">Discussion
</h4>
4114 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4115 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4117 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4119 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
4120 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
4121 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
4122 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
4123 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
4126 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetInteger">ippSetInteger
</a></h3>
4127 <p class=
"description">Set an integer or enum value in an attribute.
</p>
4129 int ippSetInteger (
<br>
4130 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4131 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4132 int element,
<br>
4133 int intvalue
<br>
4135 <h4 class=
"parameters">Parameters
</h4>
4138 <dd class=
"description">IPP message
</dd>
4140 <dd class=
"description">IPP attribute
</dd>
4142 <dd class=
"description">Value number (
0-based)
</dd>
4144 <dd class=
"description">Integer/enum value
</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 the IPP message containing the attribute that was
4150 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4152 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4154 The
<code>element
</code> parameter specifies which value to set from
0 to
4155 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4158 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetName">ippSetName
</a></h3>
4159 <p class=
"description">Set the name of an attribute.
</p>
4161 int ippSetName (
<br>
4162 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4163 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4164 const char *name
<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">Attribute name
</dd>
4175 <h4 class=
"returnvalue">Return Value
</h4>
4176 <p class=
"description">1 on success,
0 on failure
</p>
4177 <h4 class=
"discussion">Discussion
</h4>
4178 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4179 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4181 The
<code>attr
</code> parameter may be modified as a result of setting the value.
4184 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetOperation">ippSetOperation
</a></h3>
4185 <p class=
"description">Set the operation ID in an IPP request message.
</p>
4187 int ippSetOperation (
<br>
4188 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4189 ipp_op_t op
<br>
4191 <h4 class=
"parameters">Parameters
</h4>
4194 <dd class=
"description">IPP request message
</dd>
4196 <dd class=
"description">Operation ID
</dd>
4198 <h4 class=
"returnvalue">Return Value
</h4>
4199 <p class=
"description">1 on success,
0 on failure
</p>
4200 <h4 class=
"discussion">Discussion
</h4>
4201 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
4202 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
4205 <h3 class=
"function"><a name=
"ippSetPort">ippSetPort
</a></h3>
4206 <p class=
"description">Set the default port number.
</p>
4208 void ippSetPort (
<br>
4209 int p
<br>
4211 <h4 class=
"parameters">Parameters
</h4>
4214 <dd class=
"description">Port number to use
</dd>
4216 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetRange">ippSetRange
</a></h3>
4217 <p class=
"description">Set a rangeOfInteger value in an attribute.
</p>
4219 int ippSetRange (
<br>
4220 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4221 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4222 int element,
<br>
4223 int lowervalue,
<br>
4224 int uppervalue
<br>
4226 <h4 class=
"parameters">Parameters
</h4>
4229 <dd class=
"description">IPP message
</dd>
4231 <dd class=
"description">IPP attribute
</dd>
4233 <dd class=
"description">Value number (
0-based)
</dd>
4235 <dd class=
"description">Lower bound for range
</dd>
4237 <dd class=
"description">Upper bound for range
</dd>
4239 <h4 class=
"returnvalue">Return Value
</h4>
4240 <p class=
"description">1 on success,
0 on failure
</p>
4241 <h4 class=
"discussion">Discussion
</h4>
4242 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4243 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4245 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4247 The
<code>element
</code> parameter specifies which value to set from
0 to
4248 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4251 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetRequestId">ippSetRequestId
</a></h3>
4252 <p class=
"description">Set the request ID in an IPP message.
</p>
4254 int ippSetRequestId (
<br>
4255 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4256 int request_id
<br>
4258 <h4 class=
"parameters">Parameters
</h4>
4261 <dd class=
"description">IPP message
</dd>
4263 <dd class=
"description">Request ID
</dd>
4265 <h4 class=
"returnvalue">Return Value
</h4>
4266 <p class=
"description">1 on success,
0 on failure
</p>
4267 <h4 class=
"discussion">Discussion
</h4>
4268 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
4269 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4271 The
<code>request_id
</code> parameter must be greater than
0.
4274 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetResolution">ippSetResolution
</a></h3>
4275 <p class=
"description">Set a resolution value in an attribute.
</p>
4277 int ippSetResolution (
<br>
4278 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4279 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4280 int element,
<br>
4281 <a href=
"#ipp_res_t">ipp_res_t
</a> unitsvalue,
<br>
4282 int xresvalue,
<br>
4283 int yresvalue
<br>
4285 <h4 class=
"parameters">Parameters
</h4>
4288 <dd class=
"description">IPP message
</dd>
4290 <dd class=
"description">IPP attribute
</dd>
4292 <dd class=
"description">Value number (
0-based)
</dd>
4294 <dd class=
"description">Resolution units
</dd>
4296 <dd class=
"description">Horizontal/cross feed resolution
</dd>
4298 <dd class=
"description">Vertical/feed resolution
</dd>
4300 <h4 class=
"returnvalue">Return Value
</h4>
4301 <p class=
"description">1 on success,
0 on failure
</p>
4302 <h4 class=
"discussion">Discussion
</h4>
4303 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4304 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4306 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4308 The
<code>element
</code> parameter specifies which value to set from
0 to
4309 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4312 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetState">ippSetState
</a></h3>
4313 <p class=
"description">Set the current state of the IPP message.
</p>
4315 int ippSetState (
<br>
4316 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4317 <a href=
"#ipp_state_t">ipp_state_t
</a> state
<br>
4319 <h4 class=
"parameters">Parameters
</h4>
4322 <dd class=
"description">IPP message
</dd>
4324 <dd class=
"description">IPP state value
</dd>
4326 <h4 class=
"returnvalue">Return Value
</h4>
4327 <p class=
"description">1 on success,
0 on failure
</p>
4328 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetStatusCode">ippSetStatusCode
</a></h3>
4329 <p class=
"description">Set the status code in an IPP response or event message.
</p>
4331 int ippSetStatusCode (
<br>
4332 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4333 ipp_status_t status
<br>
4335 <h4 class=
"parameters">Parameters
</h4>
4338 <dd class=
"description">IPP response or event message
</dd>
4340 <dd class=
"description">Status code
</dd>
4342 <h4 class=
"returnvalue">Return Value
</h4>
4343 <p class=
"description">1 on success,
0 on failure
</p>
4344 <h4 class=
"discussion">Discussion
</h4>
4345 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
4346 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
4349 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetString">ippSetString
</a></h3>
4350 <p class=
"description">Set a string value in an attribute.
</p>
4352 int ippSetString (
<br>
4353 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4354 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4355 int element,
<br>
4356 const char *strvalue
<br>
4358 <h4 class=
"parameters">Parameters
</h4>
4361 <dd class=
"description">IPP message
</dd>
4363 <dd class=
"description">IPP attribute
</dd>
4365 <dd class=
"description">Value number (
0-based)
</dd>
4367 <dd class=
"description">String value
</dd>
4369 <h4 class=
"returnvalue">Return Value
</h4>
4370 <p class=
"description">1 on success,
0 on failure
</p>
4371 <h4 class=
"discussion">Discussion
</h4>
4372 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4373 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4375 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4377 The
<code>element
</code> parameter specifies which value to set from
0 to
4378 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4381 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetValueTag">ippSetValueTag
</a></h3>
4382 <p class=
"description">Set the value tag of an attribute.
</p>
4384 int ippSetValueTag (
<br>
4385 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4386 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4387 ipp_tag_t value_tag
<br>
4389 <h4 class=
"parameters">Parameters
</h4>
4392 <dd class=
"description">IPP message
</dd>
4394 <dd class=
"description">IPP attribute
</dd>
4396 <dd class=
"description">Value tag
</dd>
4398 <h4 class=
"returnvalue">Return Value
</h4>
4399 <p class=
"description">1 on success,
0 on failure
</p>
4400 <h4 class=
"discussion">Discussion
</h4>
4401 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4402 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4404 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4406 Integer (
<code>IPP_TAG_INTEGER
</code>) values can be promoted to rangeOfInteger
4407 (
<code>IPP_TAG_RANGE
</code>) values, the various string tags can be promoted to name
4408 (
<code>IPP_TAG_NAME
</code>) or nameWithLanguage (
<code>IPP_TAG_NAMELANG
</code>) values, text
4409 (
<code>IPP_TAG_TEXT
</code>) values can be promoted to textWithLanguage
4410 (
<code>IPP_TAG_TEXTLANG
</code>) values, and all values can be demoted to the various
4411 out-of-band value tags such as no-value (
<code>IPP_TAG_NOVALUE
</code>). All other changes
4412 will be rejected.
<br>
4414 Promoting a string attribute to nameWithLanguage or textWithLanguage adds the language
4415 code in the
"attributes-natural-language
" attribute or, if not present, the language
4416 code for the current locale.
4419 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetVersion">ippSetVersion
</a></h3>
4420 <p class=
"description">Set the version number in an IPP message.
</p>
4422 int ippSetVersion (
<br>
4423 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4424 int major,
<br>
4425 int minor
<br>
4427 <h4 class=
"parameters">Parameters
</h4>
4430 <dd class=
"description">IPP message
</dd>
4432 <dd class=
"description">Major version number (major.minor)
</dd>
4434 <dd class=
"description">Minor version number (major.minor)
</dd>
4436 <h4 class=
"returnvalue">Return Value
</h4>
4437 <p class=
"description">1 on success,
0 on failure
</p>
4438 <h4 class=
"discussion">Discussion
</h4>
4439 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
4440 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4442 The valid version numbers are currently
1.0,
1.1,
2.0,
2.1, and
2.2.
4445 <h3 class=
"function"><span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span><a name=
"ippTagString">ippTagString
</a></h3>
4446 <p class=
"description">Return the tag name corresponding to a tag value.
</p>
4448 const char *ippTagString (
<br>
4449 ipp_tag_t tag
<br>
4451 <h4 class=
"parameters">Parameters
</h4>
4454 <dd class=
"description">Tag value
</dd>
4456 <h4 class=
"returnvalue">Return Value
</h4>
4457 <p class=
"description">Tag name
</p>
4458 <h4 class=
"discussion">Discussion
</h4>
4459 <p class=
"discussion">The returned names are defined in RFC
2911 and
3382.
4462 <h3 class=
"function"><span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span><a name=
"ippTagValue">ippTagValue
</a></h3>
4463 <p class=
"description">Return the tag value corresponding to a tag name.
</p>
4465 ipp_tag_t ippTagValue (
<br>
4466 const char *name
<br>
4468 <h4 class=
"parameters">Parameters
</h4>
4471 <dd class=
"description">Tag name
</dd>
4473 <h4 class=
"returnvalue">Return Value
</h4>
4474 <p class=
"description">Tag value
</p>
4475 <h4 class=
"discussion">Discussion
</h4>
4476 <p class=
"discussion">The tag names are defined in RFC
2911 and
3382.
4479 <h3 class=
"function"><a name=
"ippTimeToDate">ippTimeToDate
</a></h3>
4480 <p class=
"description">Convert from UNIX time to RFC
1903 format.
</p>
4482 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *ippTimeToDate (
<br>
4483 time_t t
<br>
4485 <h4 class=
"parameters">Parameters
</h4>
4488 <dd class=
"description">UNIX time value
</dd>
4490 <h4 class=
"returnvalue">Return Value
</h4>
4491 <p class=
"description">RFC-
1903 date/time data
</p>
4492 <h3 class=
"function"><a name=
"ippWrite">ippWrite
</a></h3>
4493 <p class=
"description">Write data for an IPP message to a HTTP connection.
</p>
4495 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWrite (
<br>
4496 <a href=
"#http_t">http_t
</a> *http,
<br>
4497 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4499 <h4 class=
"parameters">Parameters
</h4>
4502 <dd class=
"description">HTTP connection
</dd>
4504 <dd class=
"description">IPP data
</dd>
4506 <h4 class=
"returnvalue">Return Value
</h4>
4507 <p class=
"description">Current state
</p>
4508 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"ippWriteFile">ippWriteFile
</a></h3>
4509 <p class=
"description">Write data for an IPP message to a file.
</p>
4511 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWriteFile (
<br>
4512 int fd,
<br>
4513 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4515 <h4 class=
"parameters">Parameters
</h4>
4518 <dd class=
"description">HTTP data
</dd>
4520 <dd class=
"description">IPP data
</dd>
4522 <h4 class=
"returnvalue">Return Value
</h4>
4523 <p class=
"description">Current state
</p>
4524 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippWriteIO">ippWriteIO
</a></h3>
4525 <p class=
"description">Write data for an IPP message.
</p>
4527 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWriteIO (
<br>
4528 void *dst,
<br>
4529 <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br>
4530 int blocking,
<br>
4531 <a href=
"#ipp_t">ipp_t
</a> *parent,
<br>
4532 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4534 <h4 class=
"parameters">Parameters
</h4>
4537 <dd class=
"description">Destination
</dd>
4539 <dd class=
"description">Write callback function
</dd>
4541 <dd class=
"description">Use blocking IO?
</dd>
4543 <dd class=
"description">Parent IPP message
</dd>
4545 <dd class=
"description">IPP data
</dd>
4547 <h4 class=
"returnvalue">Return Value
</h4>
4548 <p class=
"description">Current state
</p>
4549 <h2 class=
"title"><a name=
"TYPES">Data Types
</a></h2>
4550 <h3 class=
"typedef"><a name=
"gss_auth_identity_desc">gss_auth_identity_desc
</a></h3>
4551 <p class=
"description">Local functions...
</p>
4553 typedef struct
<a href=
"#gss_auth_identity">gss_auth_identity
</a> gss_auth_identity_desc;
4555 <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>
4556 <p class=
"description">Socket address union, which
4557 makes using IPv6 and other
4558 address types easier and
4561 typedef union _http_addr_u / http_addr_t;
4563 <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>
4564 <p class=
"description">Socket address list, which is
4565 used to enumerate all of the
4566 addresses that are associated
4567 with a hostname.
</p>
4569 typedef struct
<a href=
"#http_addrlist_s">http_addrlist_s
</a> / http_addrlist_t;
4571 <h3 class=
"typedef"><a name=
"http_auth_t">http_auth_t
</a></h3>
4572 <p class=
"description">HTTP authentication types
</p>
4574 typedef enum
<a href=
"#http_auth_e">http_auth_e
</a> http_auth_t;
4576 <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>
4577 <p class=
"description">HTTP credential data
</p>
4579 typedef struct
<a href=
"#http_credential_s">http_credential_s
</a> http_credential_t;
4581 <h3 class=
"typedef"><a name=
"http_encoding_t">http_encoding_t
</a></h3>
4582 <p class=
"description">HTTP transfer encoding values
</p>
4584 typedef enum
<a href=
"#http_encoding_e">http_encoding_e
</a> http_encoding_t;
4586 <h3 class=
"typedef"><a name=
"http_encryption_t">http_encryption_t
</a></h3>
4587 <p class=
"description">HTTP encryption values
</p>
4589 typedef enum
<a href=
"#http_encryption_e">http_encryption_e
</a> http_encryption_t;
4591 <h3 class=
"typedef"><a name=
"http_field_t">http_field_t
</a></h3>
4592 <p class=
"description">HTTP field names
</p>
4594 typedef enum
<a href=
"#http_field_e">http_field_e
</a> http_field_t;
4596 <h3 class=
"typedef"><a name=
"http_keepalive_t">http_keepalive_t
</a></h3>
4597 <p class=
"description">HTTP keep-alive values
</p>
4599 typedef enum
<a href=
"#http_keepalive_e">http_keepalive_e
</a> http_keepalive_t;
4601 <h3 class=
"typedef"><a name=
"http_state_t">http_state_t
</a></h3>
4602 <p class=
"description">HTTP state values; states
4603 are server-oriented...
</p>
4605 typedef enum
<a href=
"#http_state_e">http_state_e
</a> / http_state_t;
4607 <h3 class=
"typedef"><a name=
"http_status_t">http_status_t
</a></h3>
4608 <p class=
"description">HTTP status codes
</p>
4610 typedef enum
<a href=
"#http_status_e">http_status_e
</a> http_status_t;
4612 <h3 class=
"typedef"><a name=
"http_t">http_t
</a></h3>
4613 <p class=
"description">HTTP connection type
</p>
4615 typedef struct _http_s http_t;
4617 <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>
4618 <p class=
"description">HTTP timeout callback
</p>
4620 typedef int (*http_timeout_cb_t)(
<a href=
"#http_t">http_t
</a> *http, void *user_data);
4622 <h3 class=
"typedef"><a name=
"http_uri_coding_t">http_uri_coding_t
</a></h3>
4623 <p class=
"description">URI en/decode flags
</p>
4625 typedef enum
<a href=
"#http_uri_coding_e">http_uri_coding_e
</a> http_uri_coding_t;
4627 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"http_uri_status_t">http_uri_status_t
</a></h3>
4628 <p class=
"description">URI separation status
</p>
4630 typedef enum
<a href=
"#http_uri_status_e">http_uri_status_e
</a> http_uri_status_t;
4632 <h3 class=
"typedef"><a name=
"http_version_t">http_version_t
</a></h3>
4633 <p class=
"description">HTTP version numbers
</p>
4635 typedef enum
<a href=
"#http_version_e">http_version_e
</a> http_version_t;
4637 <h3 class=
"typedef"><a name=
"ipp_attribute_t">ipp_attribute_t
</a></h3>
4638 <p class=
"description">IPP attribute
</p>
4640 typedef struct _ipp_attribute_s ipp_attribute_t;
4642 <h3 class=
"typedef"><a name=
"ipp_copycb_t">ipp_copycb_t
</a></h3>
4643 <p class=
"description">Prototypes...
</p>
4645 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);
4647 <h3 class=
"typedef"><a name=
"ipp_dstate_t">ipp_dstate_t
</a></h3>
4648 <p class=
"description">Document states
</p>
4650 typedef enum
<a href=
"#ipp_dstate_e">ipp_dstate_e
</a> ipp_dstate_t;
4652 <h3 class=
"typedef"><a name=
"ipp_finish_t">ipp_finish_t
</a></h3>
4653 <p class=
"description">Finishings
</p>
4655 typedef enum
<a href=
"#ipp_finish_e">ipp_finish_e
</a> ipp_finish_t;
4657 <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>
4658 <p class=
"description">IPP IO Callback Function
</p>
4660 typedef ssize_t (*ipp_iocb_t)(void *context,
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *buffer, size_t bytes);
4662 <h3 class=
"typedef"><a name=
"ipp_jcollate_t">ipp_jcollate_t
</a></h3>
4663 <p class=
"description">Job collation types
</p>
4665 typedef enum
<a href=
"#ipp_jcollate_e">ipp_jcollate_e
</a> ipp_jcollate_t;
4667 <h3 class=
"typedef"><a name=
"ipp_orient_t">ipp_orient_t
</a></h3>
4668 <p class=
"description">Orientation values
</p>
4670 typedef enum
<a href=
"#ipp_orient_e">ipp_orient_e
</a> ipp_orient_t;
4672 <h3 class=
"typedef"><a name=
"ipp_pstate_t">ipp_pstate_t
</a></h3>
4673 <p class=
"description">Printer states
</p>
4675 typedef enum
<a href=
"#ipp_pstate_e">ipp_pstate_e
</a> ipp_pstate_t;
4677 <h3 class=
"typedef"><a name=
"ipp_quality_t">ipp_quality_t
</a></h3>
4678 <p class=
"description">Qualities
</p>
4680 typedef enum
<a href=
"#ipp_quality_e">ipp_quality_e
</a> ipp_quality_t;
4682 <h3 class=
"typedef"><a name=
"ipp_res_t">ipp_res_t
</a></h3>
4683 <p class=
"description">Resolution units
</p>
4685 typedef enum
<a href=
"#ipp_res_e">ipp_res_e
</a> ipp_res_t;
4687 <h3 class=
"typedef"><a name=
"ipp_state_t">ipp_state_t
</a></h3>
4688 <p class=
"description">IPP states
</p>
4690 typedef enum
<a href=
"#ipp_state_e">ipp_state_e
</a> ipp_state_t;
4692 <h3 class=
"typedef"><a name=
"ipp_t">ipp_t
</a></h3>
4693 <p class=
"description">IPP request/response data
</p>
4695 typedef struct _ipp_s ipp_t;
4697 <h3 class=
"typedef"><a name=
"ipp_uchar_t">ipp_uchar_t
</a></h3>
4698 <p class=
"description">Unsigned
8-bit integer/character
</p>
4700 typedef unsigned char ipp_uchar_t;
4702 <h2 class=
"title"><a name=
"STRUCTURES">Structures
</a></h2>
4703 <h3 class=
"struct"><a name=
"gss_auth_identity">gss_auth_identity
</a></h3>
4704 <p class=
"description">Local functions...
</p>
4705 <p class=
"code">struct gss_auth_identity {
<br>
4706 gss_buffer_t *credentialsRef;
<br>
4707 uint32_t flags;
<br>
4708 char *password;
<br>
4709 char *realm;
<br>
4710 uint32_t type;
<br>
4711 char *username;
<br>
4713 <h4 class=
"members">Members
</h4>
4715 <dt>credentialsRef
</dt>
4722 <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>
4723 <p class=
"description">Socket address list, which is
4724 used to enumerate all of the
4725 addresses that are associated
4726 with a hostname.
</p>
4727 <p class=
"code">struct http_addrlist_s {
<br>
4728 <a href=
"#http_addr_t">http_addr_t
</a> addr;
<br>
4729 struct
<a href=
"#http_addrlist_s">http_addrlist_s
</a> *next;
<br>
4731 <h4 class=
"members">Members
</h4>
4734 <dd class=
"description">Address
</dd>
4736 <dd class=
"description">Pointer to next address in list
</dd>
4738 <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>
4739 <p class=
"description">HTTP credential data
</p>
4740 <p class=
"code">struct http_credential_s {
<br>
4741 void *data;
<br>
4742 size_t datalen;
<br>
4744 <h4 class=
"members">Members
</h4>
4747 <dd class=
"description">Pointer to credential data
</dd>
4749 <dd class=
"description">Credential length
</dd>
4751 <h2 class=
"title"><a name=
"ENUMERATIONS">Constants
</a></h2>
4752 <h3 class=
"enumeration"><a name=
"http_auth_e">http_auth_e
</a></h3>
4753 <p class=
"description">HTTP authentication types
</p>
4754 <h4 class=
"constants">Constants
</h4>
4756 <dt>HTTP_AUTH_BASIC
</dt>
4757 <dd class=
"description">Basic authentication in use
</dd>
4758 <dt>HTTP_AUTH_MD5
</dt>
4759 <dd class=
"description">Digest authentication in use
</dd>
4760 <dt>HTTP_AUTH_MD5_INT
</dt>
4761 <dd class=
"description">Digest authentication in use for body
</dd>
4762 <dt>HTTP_AUTH_MD5_SESS
</dt>
4763 <dd class=
"description">MD5-session authentication in use
</dd>
4764 <dt>HTTP_AUTH_MD5_SESS_INT
</dt>
4765 <dd class=
"description">MD5-session authentication in use for body
</dd>
4766 <dt>HTTP_AUTH_NEGOTIATE
<span class=
"info"> CUPS
1.3/Mac OS X
10.5 </span></dt>
4767 <dd class=
"description">GSSAPI authentication in use
</dd>
4768 <dt>HTTP_AUTH_NONE
</dt>
4769 <dd class=
"description">No authentication in use
</dd>
4771 <h3 class=
"enumeration"><a name=
"http_encoding_e">http_encoding_e
</a></h3>
4772 <p class=
"description">HTTP transfer encoding values
</p>
4773 <h4 class=
"constants">Constants
</h4>
4775 <dt>HTTP_ENCODE_CHUNKED
</dt>
4776 <dd class=
"description">Data is chunked
</dd>
4777 <dt>HTTP_ENCODE_FIELDS
</dt>
4778 <dd class=
"description">Sending HTTP fields
</dd>
4779 <dt>HTTP_ENCODE_LENGTH
</dt>
4780 <dd class=
"description">Data is sent with Content-Length
</dd>
4782 <h3 class=
"enumeration"><a name=
"http_encryption_e">http_encryption_e
</a></h3>
4783 <p class=
"description">HTTP encryption values
</p>
4784 <h4 class=
"constants">Constants
</h4>
4786 <dt>HTTP_ENCRYPT_ALWAYS
</dt>
4787 <dd class=
"description">Always encrypt (SSL)
</dd>
4788 <dt>HTTP_ENCRYPT_IF_REQUESTED
</dt>
4789 <dd class=
"description">Encrypt if requested (TLS upgrade)
</dd>
4790 <dt>HTTP_ENCRYPT_NEVER
</dt>
4791 <dd class=
"description">Never encrypt
</dd>
4792 <dt>HTTP_ENCRYPT_REQUIRED
</dt>
4793 <dd class=
"description">Encryption is required (TLS upgrade)
</dd>
4795 <h3 class=
"enumeration"><a name=
"http_field_e">http_field_e
</a></h3>
4796 <p class=
"description">HTTP field names
</p>
4797 <h4 class=
"constants">Constants
</h4>
4799 <dt>HTTP_FIELD_ACCEPT_LANGUAGE
</dt>
4800 <dd class=
"description">Accept-Language field
</dd>
4801 <dt>HTTP_FIELD_ACCEPT_RANGES
</dt>
4802 <dd class=
"description">Accept-Ranges field
</dd>
4803 <dt>HTTP_FIELD_AUTHORIZATION
</dt>
4804 <dd class=
"description">Authorization field
</dd>
4805 <dt>HTTP_FIELD_CONNECTION
</dt>
4806 <dd class=
"description">Connection field
</dd>
4807 <dt>HTTP_FIELD_CONTENT_ENCODING
</dt>
4808 <dd class=
"description">Content-Encoding field
</dd>
4809 <dt>HTTP_FIELD_CONTENT_LANGUAGE
</dt>
4810 <dd class=
"description">Content-Language field
</dd>
4811 <dt>HTTP_FIELD_CONTENT_LENGTH
</dt>
4812 <dd class=
"description">Content-Length field
</dd>
4813 <dt>HTTP_FIELD_CONTENT_LOCATION
</dt>
4814 <dd class=
"description">Content-Location field
</dd>
4815 <dt>HTTP_FIELD_CONTENT_MD5
</dt>
4816 <dd class=
"description">Content-MD5 field
</dd>
4817 <dt>HTTP_FIELD_CONTENT_RANGE
</dt>
4818 <dd class=
"description">Content-Range field
</dd>
4819 <dt>HTTP_FIELD_CONTENT_TYPE
</dt>
4820 <dd class=
"description">Content-Type field
</dd>
4821 <dt>HTTP_FIELD_CONTENT_VERSION
</dt>
4822 <dd class=
"description">Content-Version field
</dd>
4823 <dt>HTTP_FIELD_DATE
</dt>
4824 <dd class=
"description">Date field
</dd>
4825 <dt>HTTP_FIELD_HOST
</dt>
4826 <dd class=
"description">Host field
</dd>
4827 <dt>HTTP_FIELD_IF_MODIFIED_SINCE
</dt>
4828 <dd class=
"description">If-Modified-Since field
</dd>
4829 <dt>HTTP_FIELD_IF_UNMODIFIED_SINCE
</dt>
4830 <dd class=
"description">If-Unmodified-Since field
</dd>
4831 <dt>HTTP_FIELD_KEEP_ALIVE
</dt>
4832 <dd class=
"description">Keep-Alive field
</dd>
4833 <dt>HTTP_FIELD_LAST_MODIFIED
</dt>
4834 <dd class=
"description">Last-Modified field
</dd>
4835 <dt>HTTP_FIELD_LINK
</dt>
4836 <dd class=
"description">Link field
</dd>
4837 <dt>HTTP_FIELD_LOCATION
</dt>
4838 <dd class=
"description">Location field
</dd>
4839 <dt>HTTP_FIELD_MAX
</dt>
4840 <dd class=
"description">Maximum field index
</dd>
4841 <dt>HTTP_FIELD_RANGE
</dt>
4842 <dd class=
"description">Range field
</dd>
4843 <dt>HTTP_FIELD_REFERER
</dt>
4844 <dd class=
"description">Referer field
</dd>
4845 <dt>HTTP_FIELD_RETRY_AFTER
</dt>
4846 <dd class=
"description">Retry-After field
</dd>
4847 <dt>HTTP_FIELD_TRANSFER_ENCODING
</dt>
4848 <dd class=
"description">Transfer-Encoding field
</dd>
4849 <dt>HTTP_FIELD_UNKNOWN
</dt>
4850 <dd class=
"description">Unknown field
</dd>
4851 <dt>HTTP_FIELD_UPGRADE
</dt>
4852 <dd class=
"description">Upgrade field
</dd>
4853 <dt>HTTP_FIELD_USER_AGENT
</dt>
4854 <dd class=
"description">User-Agent field
</dd>
4855 <dt>HTTP_FIELD_WWW_AUTHENTICATE
</dt>
4856 <dd class=
"description">WWW-Authenticate field
</dd>
4858 <h3 class=
"enumeration"><a name=
"http_keepalive_e">http_keepalive_e
</a></h3>
4859 <p class=
"description">HTTP keep-alive values
</p>
4860 <h4 class=
"constants">Constants
</h4>
4862 <dt>HTTP_KEEPALIVE_OFF
</dt>
4863 <dd class=
"description">No keep alive support
</dd>
4864 <dt>HTTP_KEEPALIVE_ON
</dt>
4865 <dd class=
"description">Use keep alive
</dd>
4867 <h3 class=
"enumeration"><a name=
"http_state_e">http_state_e
</a></h3>
4868 <p class=
"description">HTTP state values; states
4869 are server-oriented...
</p>
4870 <h4 class=
"constants">Constants
</h4>
4872 <dt>HTTP_CLOSE
</dt>
4873 <dd class=
"description">CLOSE command, waiting for blank line
</dd>
4874 <dt>HTTP_DELETE
</dt>
4875 <dd class=
"description">DELETE command, waiting for blank line
</dd>
4877 <dd class=
"description">GET command, waiting for blank line
</dd>
4878 <dt>HTTP_GET_SEND
</dt>
4879 <dd class=
"description">GET command, sending data
</dd>
4881 <dd class=
"description">HEAD command, waiting for blank line
</dd>
4882 <dt>HTTP_OPTIONS
</dt>
4883 <dd class=
"description">OPTIONS command, waiting for blank line
</dd>
4885 <dd class=
"description">POST command, waiting for blank line
</dd>
4886 <dt>HTTP_POST_RECV
</dt>
4887 <dd class=
"description">POST command, receiving data
</dd>
4888 <dt>HTTP_POST_SEND
</dt>
4889 <dd class=
"description">POST command, sending data
</dd>
4891 <dd class=
"description">PUT command, waiting for blank line
</dd>
4892 <dt>HTTP_PUT_RECV
</dt>
4893 <dd class=
"description">PUT command, receiving data
</dd>
4894 <dt>HTTP_STATUS
</dt>
4895 <dd class=
"description">Command complete, sending status
</dd>
4896 <dt>HTTP_TRACE
</dt>
4897 <dd class=
"description">TRACE command, waiting for blank line
</dd>
4898 <dt>HTTP_WAITING
</dt>
4899 <dd class=
"description">Waiting for command
</dd>
4901 <h3 class=
"enumeration"><a name=
"http_status_e">http_status_e
</a></h3>
4902 <p class=
"description">HTTP status codes
</p>
4903 <h4 class=
"constants">Constants
</h4>
4905 <dt>HTTP_ACCEPTED
</dt>
4906 <dd class=
"description">DELETE command was successful
</dd>
4907 <dt>HTTP_AUTHORIZATION_CANCELED
<span class=
"info"> CUPS
1.4 </span></dt>
4908 <dd class=
"description">User canceled authorization
</dd>
4909 <dt>HTTP_BAD_GATEWAY
</dt>
4910 <dd class=
"description">Bad gateway
</dd>
4911 <dt>HTTP_BAD_REQUEST
</dt>
4912 <dd class=
"description">Bad request
</dd>
4913 <dt>HTTP_CONFLICT
</dt>
4914 <dd class=
"description">Request is self-conflicting
</dd>
4915 <dt>HTTP_CONTINUE
</dt>
4916 <dd class=
"description">Everything OK, keep going...
</dd>
4917 <dt>HTTP_CREATED
</dt>
4918 <dd class=
"description">PUT command was successful
</dd>
4919 <dt>HTTP_ERROR
</dt>
4920 <dd class=
"description">An error response from httpXxxx()
</dd>
4921 <dt>HTTP_EXPECTATION_FAILED
</dt>
4922 <dd class=
"description">The expectation given in an Expect header field was not met
</dd>
4923 <dt>HTTP_FORBIDDEN
</dt>
4924 <dd class=
"description">Forbidden to access this URI
</dd>
4925 <dt>HTTP_GATEWAY_TIMEOUT
</dt>
4926 <dd class=
"description">Gateway connection timed out
</dd>
4928 <dd class=
"description">Server has gone away
</dd>
4929 <dt>HTTP_LENGTH_REQUIRED
</dt>
4930 <dd class=
"description">A content length or encoding is required
</dd>
4931 <dt>HTTP_METHOD_NOT_ALLOWED
</dt>
4932 <dd class=
"description">Method is not allowed
</dd>
4933 <dt>HTTP_MOVED_PERMANENTLY
</dt>
4934 <dd class=
"description">Document has moved permanently
</dd>
4935 <dt>HTTP_MOVED_TEMPORARILY
</dt>
4936 <dd class=
"description">Document has moved temporarily
</dd>
4937 <dt>HTTP_MULTIPLE_CHOICES
</dt>
4938 <dd class=
"description">Multiple files match request
</dd>
4939 <dt>HTTP_NOT_ACCEPTABLE
</dt>
4940 <dd class=
"description">Not Acceptable
</dd>
4941 <dt>HTTP_NOT_AUTHORITATIVE
</dt>
4942 <dd class=
"description">Information isn't authoritative
</dd>
4943 <dt>HTTP_NOT_FOUND
</dt>
4944 <dd class=
"description">URI was not found
</dd>
4945 <dt>HTTP_NOT_IMPLEMENTED
</dt>
4946 <dd class=
"description">Feature not implemented
</dd>
4947 <dt>HTTP_NOT_MODIFIED
</dt>
4948 <dd class=
"description">File not modified
</dd>
4949 <dt>HTTP_NOT_SUPPORTED
</dt>
4950 <dd class=
"description">HTTP version not supported
</dd>
4951 <dt>HTTP_NO_CONTENT
</dt>
4952 <dd class=
"description">Successful command, no new data
</dd>
4954 <dd class=
"description">OPTIONS/GET/HEAD/POST/TRACE command was successful
</dd>
4955 <dt>HTTP_PARTIAL_CONTENT
</dt>
4956 <dd class=
"description">Only a partial file was recieved/sent
</dd>
4957 <dt>HTTP_PAYMENT_REQUIRED
</dt>
4958 <dd class=
"description">Payment required
</dd>
4959 <dt>HTTP_PKI_ERROR
<span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span></dt>
4960 <dd class=
"description">Error negotiating a secure connection
</dd>
4961 <dt>HTTP_PRECONDITION
</dt>
4962 <dd class=
"description">Precondition failed
</dd>
4963 <dt>HTTP_PROXY_AUTHENTICATION
</dt>
4964 <dd class=
"description">Proxy Authentication is Required
</dd>
4965 <dt>HTTP_REQUESTED_RANGE
</dt>
4966 <dd class=
"description">The requested range is not satisfiable
</dd>
4967 <dt>HTTP_REQUEST_TIMEOUT
</dt>
4968 <dd class=
"description">Request timed out
</dd>
4969 <dt>HTTP_REQUEST_TOO_LARGE
</dt>
4970 <dd class=
"description">Request entity too large
</dd>
4971 <dt>HTTP_RESET_CONTENT
</dt>
4972 <dd class=
"description">Content was reset/recreated
</dd>
4973 <dt>HTTP_SEE_OTHER
</dt>
4974 <dd class=
"description">See this other link...
</dd>
4975 <dt>HTTP_SERVER_ERROR
</dt>
4976 <dd class=
"description">Internal server error
</dd>
4977 <dt>HTTP_SERVICE_UNAVAILABLE
</dt>
4978 <dd class=
"description">Service is unavailable
</dd>
4979 <dt>HTTP_SWITCHING_PROTOCOLS
</dt>
4980 <dd class=
"description">HTTP upgrade to TLS/SSL
</dd>
4981 <dt>HTTP_UNAUTHORIZED
</dt>
4982 <dd class=
"description">Unauthorized to access host
</dd>
4983 <dt>HTTP_UNSUPPORTED_MEDIATYPE
</dt>
4984 <dd class=
"description">The requested media type is unsupported
</dd>
4985 <dt>HTTP_UPGRADE_REQUIRED
</dt>
4986 <dd class=
"description">Upgrade to SSL/TLS required
</dd>
4987 <dt>HTTP_URI_TOO_LONG
</dt>
4988 <dd class=
"description">URI too long
</dd>
4989 <dt>HTTP_USE_PROXY
</dt>
4990 <dd class=
"description">Must use a proxy to access this URI
</dd>
4992 <h3 class=
"enumeration"><a name=
"http_uri_coding_e">http_uri_coding_e
</a></h3>
4993 <p class=
"description">URI en/decode flags
</p>
4994 <h4 class=
"constants">Constants
</h4>
4996 <dt>HTTP_URI_CODING_ALL
</dt>
4997 <dd class=
"description">En/decode everything
</dd>
4998 <dt>HTTP_URI_CODING_HOSTNAME
</dt>
4999 <dd class=
"description">En/decode the hostname portion
</dd>
5000 <dt>HTTP_URI_CODING_MOST
</dt>
5001 <dd class=
"description">En/decode all but the query
</dd>
5002 <dt>HTTP_URI_CODING_NONE
</dt>
5003 <dd class=
"description">Don't en/decode anything
</dd>
5004 <dt>HTTP_URI_CODING_QUERY
</dt>
5005 <dd class=
"description">En/decode the query portion
</dd>
5006 <dt>HTTP_URI_CODING_RESOURCE
</dt>
5007 <dd class=
"description">En/decode the resource portion
</dd>
5008 <dt>HTTP_URI_CODING_USERNAME
</dt>
5009 <dd class=
"description">En/decode the username portion
</dd>
5011 <h3 class=
"enumeration"><span class=
"info"> CUPS
1.2 </span><a name=
"http_uri_status_e">http_uri_status_e
</a></h3>
5012 <p class=
"description">URI separation status
</p>
5013 <h4 class=
"constants">Constants
</h4>
5015 <dt>HTTP_URI_BAD_ARGUMENTS
</dt>
5016 <dd class=
"description">Bad arguments to function (error)
</dd>
5017 <dt>HTTP_URI_BAD_HOSTNAME
</dt>
5018 <dd class=
"description">Bad hostname in URI (error)
</dd>
5019 <dt>HTTP_URI_BAD_PORT
</dt>
5020 <dd class=
"description">Bad port number in URI (error)
</dd>
5021 <dt>HTTP_URI_BAD_RESOURCE
</dt>
5022 <dd class=
"description">Bad resource in URI (error)
</dd>
5023 <dt>HTTP_URI_BAD_SCHEME
</dt>
5024 <dd class=
"description">Bad scheme in URI (error)
</dd>
5025 <dt>HTTP_URI_BAD_URI
</dt>
5026 <dd class=
"description">Bad/empty URI (error)
</dd>
5027 <dt>HTTP_URI_BAD_USERNAME
</dt>
5028 <dd class=
"description">Bad username in URI (error)
</dd>
5029 <dt>HTTP_URI_MISSING_RESOURCE
</dt>
5030 <dd class=
"description">Missing resource in URI (warning)
</dd>
5031 <dt>HTTP_URI_MISSING_SCHEME
</dt>
5032 <dd class=
"description">Missing scheme in URI (warning)
</dd>
5033 <dt>HTTP_URI_OK
</dt>
5034 <dd class=
"description">URI decoded OK
</dd>
5035 <dt>HTTP_URI_OVERFLOW
</dt>
5036 <dd class=
"description">URI buffer for httpAssembleURI is too small
</dd>
5037 <dt>HTTP_URI_UNKNOWN_SCHEME
</dt>
5038 <dd class=
"description">Unknown scheme in URI (warning)
</dd>
5040 <h3 class=
"enumeration"><a name=
"http_version_e">http_version_e
</a></h3>
5041 <p class=
"description">HTTP version numbers
</p>
5042 <h4 class=
"constants">Constants
</h4>
5045 <dd class=
"description">HTTP/
0.9</dd>
5047 <dd class=
"description">HTTP/
1.0</dd>
5049 <dd class=
"description">HTTP/
1.1</dd>
5051 <h3 class=
"enumeration"><a name=
"ipp_dstate_e">ipp_dstate_e
</a></h3>
5052 <p class=
"description">Document states
</p>
5053 <h4 class=
"constants">Constants
</h4>
5055 <dt>IPP_DOCUMENT_ABORTED
</dt>
5056 <dt>IPP_DOCUMENT_CANCELED
</dt>
5057 <dt>IPP_DOCUMENT_COMPLETED
</dt>
5058 <dt>IPP_DOCUMENT_PENDING
</dt>
5059 <dt>IPP_DOCUMENT_PROCESSING
</dt>
5061 <h3 class=
"enumeration"><a name=
"ipp_finish_e">ipp_finish_e
</a></h3>
5062 <p class=
"description">Finishings
</p>
5063 <h4 class=
"constants">Constants
</h4>
5065 <dt>IPP_FINISHINGS_BALE
</dt>
5066 <dd class=
"description">Bale (any type)
</dd>
5067 <dt>IPP_FINISHINGS_BIND
</dt>
5068 <dd class=
"description">Bind
</dd>
5069 <dt>IPP_FINISHINGS_BIND_BOTTOM
</dt>
5070 <dd class=
"description">Bind on bottom
</dd>
5071 <dt>IPP_FINISHINGS_BIND_LEFT
</dt>
5072 <dd class=
"description">Bind on left
</dd>
5073 <dt>IPP_FINISHINGS_BIND_RIGHT
</dt>
5074 <dd class=
"description">Bind on right
</dd>
5075 <dt>IPP_FINISHINGS_BIND_TOP
</dt>
5076 <dd class=
"description">Bind on top
</dd>
5077 <dt>IPP_FINISHINGS_BOOKLET_MAKER
</dt>
5078 <dd class=
"description">Fold to make booklet
</dd>
5079 <dt>IPP_FINISHINGS_COVER
</dt>
5080 <dd class=
"description">Add cover
</dd>
5081 <dt>IPP_FINISHINGS_EDGE_STITCH
</dt>
5082 <dd class=
"description">Stitch along any side
</dd>
5083 <dt>IPP_FINISHINGS_EDGE_STITCH_BOTTOM
</dt>
5084 <dd class=
"description">Stitch along bottom edge
</dd>
5085 <dt>IPP_FINISHINGS_EDGE_STITCH_LEFT
</dt>
5086 <dd class=
"description">Stitch along left side
</dd>
5087 <dt>IPP_FINISHINGS_EDGE_STITCH_RIGHT
</dt>
5088 <dd class=
"description">Stitch along right side
</dd>
5089 <dt>IPP_FINISHINGS_EDGE_STITCH_TOP
</dt>
5090 <dd class=
"description">Stitch along top edge
</dd>
5091 <dt>IPP_FINISHINGS_FOLD
</dt>
5092 <dd class=
"description">Fold (any type)
</dd>
5093 <dt>IPP_FINISHINGS_JOB_OFFSET
</dt>
5094 <dd class=
"description">Offset for binding (any type)
</dd>
5095 <dt>IPP_FINISHINGS_NONE
</dt>
5096 <dd class=
"description">No finishing
</dd>
5097 <dt>IPP_FINISHINGS_PUNCH
</dt>
5098 <dd class=
"description">Punch (any location/count)
</dd>
5099 <dt>IPP_FINISHINGS_SADDLE_STITCH
</dt>
5100 <dd class=
"description">Staple interior
</dd>
5101 <dt>IPP_FINISHINGS_STAPLE
</dt>
5102 <dd class=
"description">Staple (any location)
</dd>
5103 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_LEFT
</dt>
5104 <dd class=
"description">Staple bottom left corner
</dd>
5105 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT
</dt>
5106 <dd class=
"description">Staple bottom right corner
</dd>
5107 <dt>IPP_FINISHINGS_STAPLE_DUAL_BOTTOM
</dt>
5108 <dd class=
"description">Two staples on bottom
</dd>
5109 <dt>IPP_FINISHINGS_STAPLE_DUAL_LEFT
</dt>
5110 <dd class=
"description">Two staples on left
</dd>
5111 <dt>IPP_FINISHINGS_STAPLE_DUAL_RIGHT
</dt>
5112 <dd class=
"description">Two staples on right
</dd>
5113 <dt>IPP_FINISHINGS_STAPLE_DUAL_TOP
</dt>
5114 <dd class=
"description">Two staples on top
</dd>
5115 <dt>IPP_FINISHINGS_STAPLE_TOP_LEFT
</dt>
5116 <dd class=
"description">Staple top left corner
</dd>
5117 <dt>IPP_FINISHINGS_STAPLE_TOP_RIGHT
</dt>
5118 <dd class=
"description">Staple top right corner
</dd>
5119 <dt>IPP_FINISHINGS_TRIM
</dt>
5120 <dd class=
"description">Trim (any type)
</dd>
5121 <dt>IPP_FINISHINGS_TRIM_AFTER_COPIES
</dt>
5122 <dd class=
"description">Trim output after each copy
</dd>
5123 <dt>IPP_FINISHINGS_TRIM_AFTER_DOCUMENTS
</dt>
5124 <dd class=
"description">Trim output after each document
</dd>
5125 <dt>IPP_FINISHINGS_TRIM_AFTER_JOB
</dt>
5126 <dd class=
"description">Trim output after job
</dd>
5127 <dt>IPP_FINISHINGS_TRIM_AFTER_PAGES
</dt>
5128 <dd class=
"description">Trim output after each page
</dd>
5130 <h3 class=
"enumeration"><a name=
"ipp_jcollate_e">ipp_jcollate_e
</a></h3>
5131 <p class=
"description">Job collation types
</p>
5132 <h4 class=
"constants">Constants
</h4>
5134 <dt>IPP_JOB_COLLATED_DOCUMENTS
</dt>
5135 <dt>IPP_JOB_UNCOLLATED_DOCUMENTS
</dt>
5136 <dt>IPP_JOB_UNCOLLATED_SHEETS
</dt>
5138 <h3 class=
"enumeration"><a name=
"ipp_jstate_e">ipp_jstate_e
</a></h3>
5139 <p class=
"description">Job states
</p>
5140 <h4 class=
"constants">Constants
</h4>
5142 <dt>IPP_JOB_ABORTED
</dt>
5143 <dd class=
"description">Job has aborted due to error
</dd>
5144 <dt>IPP_JOB_CANCELED
</dt>
5145 <dd class=
"description">Job has been canceled
</dd>
5146 <dt>IPP_JOB_COMPLETED
</dt>
5147 <dd class=
"description">Job has completed successfully
</dd>
5148 <dt>IPP_JOB_HELD
</dt>
5149 <dd class=
"description">Job is held for printing
</dd>
5150 <dt>IPP_JOB_PENDING
</dt>
5151 <dd class=
"description">Job is waiting to be printed
</dd>
5152 <dt>IPP_JOB_PROCESSING
</dt>
5153 <dd class=
"description">Job is currently printing
</dd>
5154 <dt>IPP_JOB_STOPPED
</dt>
5155 <dd class=
"description">Job has been stopped
</dd>
5157 <h3 class=
"enumeration"><a name=
"ipp_op_e">ipp_op_e
</a></h3>
5158 <p class=
"description">IPP operations
</p>
5159 <h4 class=
"constants">Constants
</h4>
5161 <dt>CUPS_ACCEPT_JOBS
</dt>
5162 <dd class=
"description">Accept new jobs on a printer
</dd>
5163 <dt>CUPS_ADD_MODIFY_CLASS
</dt>
5164 <dd class=
"description">Add or modify a class
</dd>
5165 <dt>CUPS_ADD_MODIFY_PRINTER
</dt>
5166 <dd class=
"description">Add or modify a printer
</dd>
5167 <dt>CUPS_AUTHENTICATE_JOB
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5168 <dd class=
"description">Authenticate a job
</dd>
5169 <dt>CUPS_DELETE_CLASS
</dt>
5170 <dd class=
"description">Delete a class
</dd>
5171 <dt>CUPS_DELETE_PRINTER
</dt>
5172 <dd class=
"description">Delete a printer
</dd>
5173 <dt>CUPS_GET_CLASSES
<span class=
"info"> DEPRECATED
</span></dt>
5174 <dd class=
"description">Get a list of classes
</dd>
5175 <dt>CUPS_GET_DEFAULT
</dt>
5176 <dd class=
"description">Get the default printer
</dd>
5177 <dt>CUPS_GET_DEVICES
</dt>
5178 <dd class=
"description">Get a list of supported devices
</dd>
5179 <dt>CUPS_GET_DOCUMENT
<span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span></dt>
5180 <dd class=
"description">Get a document file
</dd>
5181 <dt>CUPS_GET_PPD
<span class=
"info"> CUPS
1.3/Mac OS X
10.5 </span></dt>
5182 <dd class=
"description">Get a PPD file
</dd>
5183 <dt>CUPS_GET_PPDS
</dt>
5184 <dd class=
"description">Get a list of supported drivers
</dd>
5185 <dt>CUPS_GET_PRINTERS
</dt>
5186 <dd class=
"description">Get a list of printers and/or classes
</dd>
5187 <dt>CUPS_MOVE_JOB
</dt>
5188 <dd class=
"description">Move a job to a different printer
</dd>
5189 <dt>CUPS_REJECT_JOBS
</dt>
5190 <dd class=
"description">Reject new jobs on a printer
</dd>
5191 <dt>CUPS_SET_DEFAULT
</dt>
5192 <dd class=
"description">Set the default printer
</dd>
5193 <dt>IPP_CANCEL_JOB
</dt>
5194 <dd class=
"description">Cancel a job
</dd>
5195 <dt>IPP_CANCEL_JOBS
</dt>
5196 <dd class=
"description">Cancel-Jobs
</dd>
5197 <dt>IPP_CANCEL_MY_JOBS
</dt>
5198 <dd class=
"description">Cancel-My-Jobs
</dd>
5199 <dt>IPP_CANCEL_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5200 <dd class=
"description">Cancel a subscription
</dd>
5201 <dt>IPP_CLOSE_JOB
</dt>
5202 <dd class=
"description">Close-Job
</dd>
5203 <dt>IPP_CREATE_JOB
</dt>
5204 <dd class=
"description">Create an empty print job
</dd>
5205 <dt>IPP_CREATE_JOB_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5206 <dd class=
"description">Create a job subscription
</dd>
5207 <dt>IPP_CREATE_PRINTER_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5208 <dd class=
"description">Create a printer subscription
</dd>
5209 <dt>IPP_DISABLE_PRINTER
</dt>
5210 <dd class=
"description">Stop a printer
</dd>
5211 <dt>IPP_ENABLE_PRINTER
</dt>
5212 <dd class=
"description">Start a printer
</dd>
5213 <dt>IPP_GET_JOBS
</dt>
5214 <dd class=
"description">Get a list of jobs
</dd>
5215 <dt>IPP_GET_JOB_ATTRIBUTES
</dt>
5216 <dd class=
"description">Get job attributes
</dd>
5217 <dt>IPP_GET_NOTIFICATIONS
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5218 <dd class=
"description">Get notification events
</dd>
5219 <dt>IPP_GET_PRINTER_ATTRIBUTES
</dt>
5220 <dd class=
"description">Get printer attributes
</dd>
5221 <dt>IPP_GET_PRINTER_SUPPORTED_VALUES
</dt>
5222 <dd class=
"description">Get supported attribute values
</dd>
5223 <dt>IPP_GET_SUBSCRIPTIONS
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5224 <dd class=
"description">Get list of subscriptions
</dd>
5225 <dt>IPP_GET_SUBSCRIPTION_ATTRIBUTES
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5226 <dd class=
"description">Get subscription attributes
</dd>
5227 <dt>IPP_HOLD_JOB
</dt>
5228 <dd class=
"description">Hold a job for printing
</dd>
5229 <dt>IPP_IDENTIFY_PRINTER
</dt>
5230 <dd class=
"description">Identify-Printer (proposed IPP JPS3)
</dd>
5231 <dt>IPP_OP_CUPS_INVALID
</dt>
5232 <dd class=
"description">Invalid operation name for
<a href=
"#ippOpValue"><code>ippOpValue
</code></a></dd>
5233 <dt>IPP_PAUSE_PRINTER
</dt>
5234 <dd class=
"description">Stop a printer
</dd>
5235 <dt>IPP_PRINT_JOB
</dt>
5236 <dd class=
"description">Print a single file
</dd>
5237 <dt>IPP_PURGE_JOBS
</dt>
5238 <dd class=
"description">Cancel all jobs
</dd>
5239 <dt>IPP_RELEASE_JOB
</dt>
5240 <dd class=
"description">Release a job for printing
</dd>
5241 <dt>IPP_RENEW_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5242 <dd class=
"description">Renew a printer subscription
</dd>
5243 <dt>IPP_RESTART_JOB
</dt>
5244 <dd class=
"description">Reprint a job
</dd>
5245 <dt>IPP_RESUBMIT_JOB
</dt>
5246 <dd class=
"description">Resubmit-Job
</dd>
5247 <dt>IPP_RESUME_PRINTER
</dt>
5248 <dd class=
"description">Start a printer
</dd>
5249 <dt>IPP_SEND_DOCUMENT
</dt>
5250 <dd class=
"description">Add a file to a job
</dd>
5251 <dt>IPP_SET_JOB_ATTRIBUTES
</dt>
5252 <dd class=
"description">Set job attributes
</dd>
5253 <dt>IPP_VALIDATE_JOB
</dt>
5254 <dd class=
"description">Validate job options
</dd>
5256 <h3 class=
"enumeration"><a name=
"ipp_orient_e">ipp_orient_e
</a></h3>
5257 <p class=
"description">Orientation values
</p>
5258 <h4 class=
"constants">Constants
</h4>
5260 <dt>IPP_LANDSCAPE
</dt>
5261 <dd class=
"description">90 degrees counter-clockwise
</dd>
5262 <dt>IPP_PORTRAIT
</dt>
5263 <dd class=
"description">No rotation
</dd>
5264 <dt>IPP_REVERSE_LANDSCAPE
</dt>
5265 <dd class=
"description">90 degrees clockwise
</dd>
5266 <dt>IPP_REVERSE_PORTRAIT
</dt>
5267 <dd class=
"description">180 degrees
</dd>
5269 <h3 class=
"enumeration"><a name=
"ipp_pstate_e">ipp_pstate_e
</a></h3>
5270 <p class=
"description">Printer states
</p>
5271 <h4 class=
"constants">Constants
</h4>
5273 <dt>IPP_PRINTER_IDLE
</dt>
5274 <dd class=
"description">Printer is idle
</dd>
5275 <dt>IPP_PRINTER_PROCESSING
</dt>
5276 <dd class=
"description">Printer is working
</dd>
5277 <dt>IPP_PRINTER_STOPPED
</dt>
5278 <dd class=
"description">Printer is stopped
</dd>
5280 <h3 class=
"enumeration"><a name=
"ipp_quality_e">ipp_quality_e
</a></h3>
5281 <p class=
"description">Qualities
</p>
5282 <h4 class=
"constants">Constants
</h4>
5284 <dt>IPP_QUALITY_DRAFT
</dt>
5285 <dd class=
"description">Draft quality
</dd>
5286 <dt>IPP_QUALITY_HIGH
</dt>
5287 <dd class=
"description">High quality
</dd>
5288 <dt>IPP_QUALITY_NORMAL
</dt>
5289 <dd class=
"description">Normal quality
</dd>
5291 <h3 class=
"enumeration"><a name=
"ipp_res_e">ipp_res_e
</a></h3>
5292 <p class=
"description">Resolution units
</p>
5293 <h4 class=
"constants">Constants
</h4>
5295 <dt>IPP_RES_PER_CM
</dt>
5296 <dd class=
"description">Pixels per centimeter
</dd>
5297 <dt>IPP_RES_PER_INCH
</dt>
5298 <dd class=
"description">Pixels per inch
</dd>
5300 <h3 class=
"enumeration"><a name=
"ipp_state_e">ipp_state_e
</a></h3>
5301 <p class=
"description">IPP states
</p>
5302 <h4 class=
"constants">Constants
</h4>
5304 <dt>IPP_ATTRIBUTE
</dt>
5305 <dd class=
"description">One or more attributes need to be sent/received
</dd>
5307 <dd class=
"description">IPP request data needs to be sent/received
</dd>
5309 <dd class=
"description">An error occurred
</dd>
5310 <dt>IPP_HEADER
</dt>
5311 <dd class=
"description">The request header needs to be sent/received
</dd>
5313 <dd class=
"description">Nothing is happening/request completed
</dd>
5315 <h3 class=
"enumeration"><a name=
"ipp_status_e">ipp_status_e
</a></h3>
5316 <p class=
"description">IPP status codes
</p>
5317 <h4 class=
"constants">Constants
</h4>
5319 <dt>CUPS_SEE_OTHER
</dt>
5320 <dd class=
"description">cups-see-other
</dd>
5321 <dt>IPP_ATTRIBUTES
</dt>
5322 <dd class=
"description">client-error-attributes-or-values-not-supported
</dd>
5323 <dt>IPP_ATTRIBUTES_NOT_SETTABLE
</dt>
5324 <dd class=
"description">client-error-attributes-not-settable
</dd>
5325 <dt>IPP_AUTHENTICATION_CANCELED
<span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span></dt>
5326 <dd class=
"description">Authentication canceled by user
</dd>
5327 <dt>IPP_BAD_REQUEST
</dt>
5328 <dd class=
"description">client-error-bad-request
</dd>
5329 <dt>IPP_CHARSET
</dt>
5330 <dd class=
"description">client-error-charset-not-supported
</dd>
5331 <dt>IPP_COMPRESSION_ERROR
</dt>
5332 <dd class=
"description">client-error-compression-error
</dd>
5333 <dt>IPP_COMPRESSION_NOT_SUPPORTED
</dt>
5334 <dd class=
"description">client-error-compression-not-supported
</dd>
5335 <dt>IPP_CONFLICT
</dt>
5336 <dd class=
"description">client-error-conflicting-attributes
</dd>
5337 <dt>IPP_DEVICE_ERROR
</dt>
5338 <dd class=
"description">server-error-device-error
</dd>
5339 <dt>IPP_DOCUMENT_ACCESS_ERROR
</dt>
5340 <dd class=
"description">client-error-document-access-error
</dd>
5341 <dt>IPP_DOCUMENT_FORMAT
</dt>
5342 <dd class=
"description">client-error-document-format-not-supported
</dd>
5343 <dt>IPP_DOCUMENT_FORMAT_ERROR
</dt>
5344 <dd class=
"description">client-error-document-format-error
</dd>
5345 <dt>IPP_DOCUMENT_PASSWORD_ERROR
</dt>
5346 <dd class=
"description">client-error-document-password-error
</dd>
5347 <dt>IPP_DOCUMENT_PERMISSION_ERROR
</dt>
5348 <dd class=
"description">client-error-document-permission-error
</dd>
5349 <dt>IPP_DOCUMENT_SECURITY_ERROR
</dt>
5350 <dd class=
"description">client-error-document-security-error
</dd>
5351 <dt>IPP_DOCUMENT_UNPRINTABLE_ERROR
</dt>
5352 <dd class=
"description">client-error-document-unprintable-error
</dd>
5353 <dt>IPP_ERROR_JOB_CANCELED
</dt>
5354 <dd class=
"description">server-error-job-canceled
</dd>
5355 <dt>IPP_FORBIDDEN
</dt>
5356 <dd class=
"description">client-error-forbidden
</dd>
5358 <dd class=
"description">client-error-gone
</dd>
5359 <dt>IPP_IGNORED_ALL_SUBSCRIPTIONS
</dt>
5360 <dd class=
"description">client-error-ignored-all-subscriptions
</dd>
5361 <dt>IPP_INTERNAL_ERROR
</dt>
5362 <dd class=
"description">server-error-internal-error
</dd>
5363 <dt>IPP_MULTIPLE_JOBS_NOT_SUPPORTED
</dt>
5364 <dd class=
"description">server-error-multiple-document-jobs-not-supported
</dd>
5365 <dt>IPP_NOT_ACCEPTING
</dt>
5366 <dd class=
"description">server-error-not-accepting-jobs
</dd>
5367 <dt>IPP_NOT_AUTHENTICATED
</dt>
5368 <dd class=
"description">client-error-not-authenticated
</dd>
5369 <dt>IPP_NOT_AUTHORIZED
</dt>
5370 <dd class=
"description">client-error-not-authorized
</dd>
5371 <dt>IPP_NOT_FOUND
</dt>
5372 <dd class=
"description">client-error-not-found
</dd>
5373 <dt>IPP_NOT_POSSIBLE
</dt>
5374 <dd class=
"description">client-error-not-possible
</dd>
5376 <dd class=
"description">successful-ok
</dd>
5377 <dt>IPP_OK_CONFLICT
</dt>
5378 <dd class=
"description">successful-ok-conflicting-attributes
</dd>
5379 <dt>IPP_OK_EVENTS_COMPLETE
</dt>
5380 <dd class=
"description">successful-ok-events-complete
</dd>
5381 <dt>IPP_OK_IGNORED_SUBSCRIPTIONS
</dt>
5382 <dd class=
"description">successful-ok-ignored-subscriptions
</dd>
5383 <dt>IPP_OK_SUBST
</dt>
5384 <dd class=
"description">successful-ok-ignored-or-substituted-attributes
</dd>
5385 <dt>IPP_OK_TOO_MANY_EVENTS
</dt>
5386 <dd class=
"description">successful-ok-too-many-events
</dd>
5387 <dt>IPP_OPERATION_NOT_SUPPORTED
</dt>
5388 <dd class=
"description">server-error-operation-not-supported
</dd>
5389 <dt>IPP_PKI_ERROR
<span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span></dt>
5390 <dd class=
"description">Error negotiating a secure connection
</dd>
5391 <dt>IPP_PRINTER_BUSY
</dt>
5392 <dd class=
"description">server-error-busy
</dd>
5393 <dt>IPP_PRINTER_IS_DEACTIVATED
</dt>
5394 <dd class=
"description">server-error-printer-is-deactivated
</dd>
5395 <dt>IPP_REQUEST_ENTITY
</dt>
5396 <dd class=
"description">client-error-request-entity-too-large
</dd>
5397 <dt>IPP_REQUEST_VALUE
</dt>
5398 <dd class=
"description">client-error-request-value-too-long
</dd>
5399 <dt>IPP_SERVICE_UNAVAILABLE
</dt>
5400 <dd class=
"description">server-error-service-unavailable
</dd>
5401 <dt>IPP_STATUS_CUPS_INVALID
</dt>
5402 <dd class=
"description">Invalid status name for
<a href=
"#ippErrorValue"><code>ippErrorValue
</code></a></dd>
5403 <dt>IPP_TEMPORARY_ERROR
</dt>
5404 <dd class=
"description">server-error-temporary-error
</dd>
5405 <dt>IPP_TIMEOUT
</dt>
5406 <dd class=
"description">client-error-timeout
</dd>
5407 <dt>IPP_TOO_MANY_DOCUMENTS
</dt>
5408 <dd class=
"description">server-error-too-many-documents
</dd>
5409 <dt>IPP_TOO_MANY_JOBS
</dt>
5410 <dd class=
"description">server-error-too-many-jobs
</dd>
5411 <dt>IPP_TOO_MANY_SUBSCRIPTIONS
</dt>
5412 <dd class=
"description">client-error-too-many-subscriptions
</dd>
5413 <dt>IPP_UPGRADE_REQUIRED
</dt>
5414 <dd class=
"description">TLS upgrade required
</dd>
5415 <dt>IPP_URI_SCHEME
</dt>
5416 <dd class=
"description">client-error-uri-scheme-not-supported
</dd>
5417 <dt>IPP_VERSION_NOT_SUPPORTED
</dt>
5418 <dd class=
"description">server-error-version-not-supported
</dd>
5420 <h3 class=
"enumeration"><a name=
"ipp_tag_e">ipp_tag_e
</a></h3>
5421 <p class=
"description">Format tags for attributes
</p>
5422 <h4 class=
"constants">Constants
</h4>
5424 <dt>IPP_TAG_ADMINDEFINE
</dt>
5425 <dd class=
"description">Admin-defined value
</dd>
5426 <dt>IPP_TAG_BEGIN_COLLECTION
</dt>
5427 <dd class=
"description">Beginning of collection value
</dd>
5428 <dt>IPP_TAG_BOOLEAN
</dt>
5429 <dd class=
"description">Boolean value
</dd>
5430 <dt>IPP_TAG_CHARSET
</dt>
5431 <dd class=
"description">Character set value
</dd>
5432 <dt>IPP_TAG_CUPS_INVALID
</dt>
5433 <dd class=
"description">Invalid tag name for
<a href=
"#ippTagValue"><code>ippTagValue
</code></a></dd>
5434 <dt>IPP_TAG_DATE
</dt>
5435 <dd class=
"description">Date/time value
</dd>
5436 <dt>IPP_TAG_DEFAULT
</dt>
5437 <dd class=
"description">Default value
</dd>
5438 <dt>IPP_TAG_DELETEATTR
</dt>
5439 <dd class=
"description">Delete-attribute value
</dd>
5440 <dt>IPP_TAG_DOCUMENT
</dt>
5441 <dd class=
"description">Document group
</dd>
5442 <dt>IPP_TAG_END
</dt>
5443 <dd class=
"description">End-of-attributes
</dd>
5444 <dt>IPP_TAG_END_COLLECTION
</dt>
5445 <dd class=
"description">End of collection value
</dd>
5446 <dt>IPP_TAG_ENUM
</dt>
5447 <dd class=
"description">Enumeration value
</dd>
5448 <dt>IPP_TAG_EVENT_NOTIFICATION
</dt>
5449 <dd class=
"description">Event group
</dd>
5450 <dt>IPP_TAG_EXTENSION
</dt>
5451 <dd class=
"description">Extension point for
32-bit tags
</dd>
5452 <dt>IPP_TAG_INTEGER
</dt>
5453 <dd class=
"description">Integer value
</dd>
5454 <dt>IPP_TAG_JOB
</dt>
5455 <dd class=
"description">Job group
</dd>
5456 <dt>IPP_TAG_KEYWORD
</dt>
5457 <dd class=
"description">Keyword value
</dd>
5458 <dt>IPP_TAG_LANGUAGE
</dt>
5459 <dd class=
"description">Language value
</dd>
5460 <dt>IPP_TAG_MEMBERNAME
</dt>
5461 <dd class=
"description">Collection member name value
</dd>
5462 <dt>IPP_TAG_MIMETYPE
</dt>
5463 <dd class=
"description">MIME media type value
</dd>
5464 <dt>IPP_TAG_NAME
</dt>
5465 <dd class=
"description">Name value
</dd>
5466 <dt>IPP_TAG_NAMELANG
</dt>
5467 <dd class=
"description">Name-with-language value
</dd>
5468 <dt>IPP_TAG_NOTSETTABLE
</dt>
5469 <dd class=
"description">Not-settable value
</dd>
5470 <dt>IPP_TAG_NOVALUE
</dt>
5471 <dd class=
"description">No-value value
</dd>
5472 <dt>IPP_TAG_OPERATION
</dt>
5473 <dd class=
"description">Operation group
</dd>
5474 <dt>IPP_TAG_PRINTER
</dt>
5475 <dd class=
"description">Printer group
</dd>
5476 <dt>IPP_TAG_RANGE
</dt>
5477 <dd class=
"description">Range value
</dd>
5478 <dt>IPP_TAG_RESOLUTION
</dt>
5479 <dd class=
"description">Resolution value
</dd>
5480 <dt>IPP_TAG_STRING
</dt>
5481 <dd class=
"description">Octet string value
</dd>
5482 <dt>IPP_TAG_SUBSCRIPTION
</dt>
5483 <dd class=
"description">Subscription group
</dd>
5484 <dt>IPP_TAG_TEXT
</dt>
5485 <dd class=
"description">Text value
</dd>
5486 <dt>IPP_TAG_TEXTLANG
</dt>
5487 <dd class=
"description">Text-with-language value
</dd>
5488 <dt>IPP_TAG_UNKNOWN
</dt>
5489 <dd class=
"description">Unknown value
</dd>
5490 <dt>IPP_TAG_UNSUPPORTED_GROUP
</dt>
5491 <dd class=
"description">Unsupported attributes group
</dd>
5492 <dt>IPP_TAG_UNSUPPORTED_VALUE
</dt>
5493 <dd class=
"description">Unsupported value
</dd>
5494 <dt>IPP_TAG_URI
</dt>
5495 <dd class=
"description">URI value
</dd>
5496 <dt>IPP_TAG_URISCHEME
</dt>
5497 <dd class=
"description">URI scheme value
</dd>
5498 <dt>IPP_TAG_ZERO
</dt>
5499 <dd class=
"description">Zero tag - used for separators
</dd>