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=
"The following structures are PRIVATE starting with CUPS 1.6. Please use the
599 new accessor functions available in CUPS 1.6 and later, as these definitions
600 will be moved to a private header file in a future release.">ipp_copycb_t
</a></li>
601 <li><a href=
"#ipp_dstate_t" title=
"Document states">ipp_dstate_t
</a></li>
602 <li><a href=
"#ipp_finish_t" title=
"Finishings">ipp_finish_t
</a></li>
603 <li><a href=
"#ipp_iocb_t" title=
"IPP IO Callback Function ">ipp_iocb_t
</a></li>
604 <li><a href=
"#ipp_jcollate_t" title=
"Job collation types">ipp_jcollate_t
</a></li>
605 <li><a href=
"#ipp_orient_t" title=
"Orientation values">ipp_orient_t
</a></li>
606 <li><a href=
"#ipp_pstate_t" title=
"Printer states">ipp_pstate_t
</a></li>
607 <li><a href=
"#ipp_quality_t" title=
"Qualities">ipp_quality_t
</a></li>
608 <li><a href=
"#ipp_res_t" title=
"Resolution units">ipp_res_t
</a></li>
609 <li><a href=
"#ipp_state_t" title=
"IPP states">ipp_state_t
</a></li>
610 <li><a href=
"#ipp_t" title=
"IPP request/response data">ipp_t
</a></li>
611 <li><a href=
"#ipp_uchar_t" title=
"Unsigned 8-bit integer/character">ipp_uchar_t
</a></li>
613 <li><a href=
"#STRUCTURES">Structures
</a><ul class=
"code">
614 <li><a href=
"#gss_auth_identity" title=
"Local functions...">gss_auth_identity
</a></li>
615 <li><a href=
"#http_addrlist_s" title=
"Socket address list, which is
616 used to enumerate all of the
617 addresses that are associated
618 with a hostname. ">http_addrlist_s
</a></li>
619 <li><a href=
"#http_credential_s" title=
"HTTP credential data ">http_credential_s
</a></li>
621 <li><a href=
"#ENUMERATIONS">Constants
</a><ul class=
"code">
622 <li><a href=
"#http_auth_e" title=
"HTTP authentication types">http_auth_e
</a></li>
623 <li><a href=
"#http_encoding_e" title=
"HTTP transfer encoding values">http_encoding_e
</a></li>
624 <li><a href=
"#http_encryption_e" title=
"HTTP encryption values">http_encryption_e
</a></li>
625 <li><a href=
"#http_field_e" title=
"HTTP field names">http_field_e
</a></li>
626 <li><a href=
"#http_keepalive_e" title=
"HTTP keep-alive values">http_keepalive_e
</a></li>
627 <li><a href=
"#http_state_e" title=
"HTTP state values; states
628 are server-oriented...">http_state_e
</a></li>
629 <li><a href=
"#http_status_e" title=
"HTTP status codes">http_status_e
</a></li>
630 <li><a href=
"#http_uri_coding_e" title=
"URI en/decode flags">http_uri_coding_e
</a></li>
631 <li><a href=
"#http_uri_status_e" title=
"URI separation status ">http_uri_status_e
</a></li>
632 <li><a href=
"#http_version_e" title=
"HTTP version numbers">http_version_e
</a></li>
633 <li><a href=
"#ipp_dstate_e" title=
"Document states">ipp_dstate_e
</a></li>
634 <li><a href=
"#ipp_finish_e" title=
"Finishings">ipp_finish_e
</a></li>
635 <li><a href=
"#ipp_jcollate_e" title=
"Job collation types">ipp_jcollate_e
</a></li>
636 <li><a href=
"#ipp_jstate_e" title=
"Job states">ipp_jstate_e
</a></li>
637 <li><a href=
"#ipp_op_e" title=
"IPP operations">ipp_op_e
</a></li>
638 <li><a href=
"#ipp_orient_e" title=
"Orientation values">ipp_orient_e
</a></li>
639 <li><a href=
"#ipp_pstate_e" title=
"Printer states">ipp_pstate_e
</a></li>
640 <li><a href=
"#ipp_quality_e" title=
"Qualities">ipp_quality_e
</a></li>
641 <li><a href=
"#ipp_res_e" title=
"Resolution units">ipp_res_e
</a></li>
642 <li><a href=
"#ipp_state_e" title=
"IPP states">ipp_state_e
</a></li>
643 <li><a href=
"#ipp_status_e" title=
"IPP status codes">ipp_status_e
</a></li>
644 <li><a href=
"#ipp_tag_e" title=
"Format tags for attributes">ipp_tag_e
</a></li>
650 HTTP and IPP API introduction for CUPS.
652 Copyright 2007-2012 by Apple Inc.
653 Copyright 1997-2006 by Easy Software Products, all rights reserved.
655 These coded instructions, statements, and computer programs are the
656 property of Apple Inc. and are protected by Federal copyright
657 law. Distribution and use rights are outlined in the file "LICENSE.txt"
658 which should have been included with this file. If this file is
659 file is missing or damaged, see the license at "http://www.cups.org/".
662 <h2 class='title'
><a name='OVERVIEW'
>Overview
</a></h2>
664 <p>The CUPS HTTP and IPP APIs provide low-level access to the HTTP and IPP
665 protocols and CUPS scheduler. They are typically used by monitoring and
666 administration programs to perform specific functions not supported by the
667 high-level CUPS API functions.
</p>
669 <p>The HTTP APIs use an opaque structure called
670 <a href='#http_t'
><code>http_t
</code></a> to manage connections to
671 a particular HTTP or IPP server. The
672 <a href='#httpConnectEncrypt'
><code>httpConnectEncrypt
</code></a> function is
673 used to create an instance of this structure for a particular server.
674 The constant
<code>CUPS_HTTP_DEFAULT
</code> can be used with all of the
675 <code>cups
</code> functions to refer to the default CUPS server - the functions
676 create a per-thread
<a href='#http_t'
><code>http_t
</code></a> as needed.
</p>
678 <p>The IPP APIs use two opaque structures for requests (messages sent to the CUPS scheduler) and responses (messages sent back to your application from the scheduler). The
<a href='#ipp_t'
><code>ipp_t
</code></a> type holds a complete request or response and is allocated using the
<a href='#ippNew'
><code>ippNew
</code></a> or
<a href='#ippNewRequest'
><code>ippNewRequest
</code></a> functions and freed using the
<a href='#ippDelete'
><code>ippDelete
</code></a> function.
</p>
680 <p>The second opaque structure is called
<a href='#ipp_attribute_t'
><code>ipp_attribute_t
</code></a> and holds a single IPP attribute which consists of a group tag (
<a href='#ippGetGroupTag'
><code>ippGetGroupTag
</code></a>), a value type tag (
<a href='#ippGetValueTag'
><code>ippGetValueTag
</code></a>), the attribute name (
<a href='#ippGetName'
><code>ippGetName
</code></a>), and
1 or more values (
<a href='#ippGetCount'
><code>ippGetCount
</code></a>,
<a href='#ippGetBoolean'
><code>ippGetBoolean
</code></a>,
<a href='#ippGetCollection'
><code>ippGetCollection
</code></a>,
<a href='#ippGetDate'
><code>ippGetDate
</code></a>,
<a href='#ippGetInteger'
><code>ippGetInteger
</code></a>,
<a href='#ippGetRange'
><code>ippGetRange
</code></a>,
<a href='#ippGetResolution'
><code>ippGetResolution
</code></a>, and
<a href='#ippGetString'
><code>ippGetString
</code></a>). Attributes are added to an
<a href='#ipp_t'
><code>ipp_t
</code></a> pointer using one of the
<code>ippAdd
</code> functions. For example, use
<a href='#ippAddString'
><code>ippAddString
</code></a> to add the
"printer-uri" and
"requesting-user-name" string attributes to a request:
</p>
682 <pre class='example'
>
683 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_GET_JOBS);
685 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri",
686 NULL,
"ipp://localhost/printers/");
687 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
691 <p>Once you have created an IPP request, use the
<code>cups
</code> functions to send the request to and read the response from the server. For example, the
<a href='#cupsDoRequest'
><code>cupsDoRequest
</code></a> function can be used for simple query operations that do not involve files:
</p>
693 <pre class='example'
>
694 #include
<cups/cups.h
>
697 <a href='#ipp_t'
>ipp_t
</a> *
<a name='get_jobs'
>get_jobs
</a>(void)
699 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_GET_JOBS);
701 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri",
702 NULL,
"ipp://localhost/printers/");
703 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
706 return (
<a href='#cupsDoRequest'
>cupsDoRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/"));
710 <p>The
<a href='#cupsDoRequest'
><code>cupsDoRequest
</code></a> function frees the request and returns an IPP response or
<code>NULL
</code> pointer if the request could not be sent to the server. Once you have a response from the server, you can either use the
<a href='#ippFindAttribute'
><code>ippFindAttribute
</code></a> and
<a href='#ippFindNextAttribute'
><code>ippFindNextAttribute
</code></a> functions to find specific attributes, for example:
</p>
712 <pre class='example'
>
713 <a href='#ipp_t'
>ipp_t
</a> *response;
714 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
716 attr =
<a href='#ippFindAttribute'
>ippFindAttribute
</a>(response,
"printer-state", IPP_TAG_ENUM);
719 <p>You can also walk the list of attributes with a simple
<code>for
</code> loop like this:
</p>
721 <pre class='example'
>
722 <a href='#ipp_t'
>ipp_t
</a> *response;
723 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
725 for (attr =
<a href='#ippFirstAttribute'
>ippFirstAttribute
</a>(response); attr != NULL; attr =
<a href='#ippNextAttribute'
>ippNextAttribute
</a>(response))
726 if (ippGetName(attr) == NULL)
727 puts(
"--SEPARATOR--");
729 puts(ippGetName(attr));
732 <p>The
<code>for
</code> loop approach is normally used when collecting attributes for multiple objects (jobs, printers, etc.) in a response. Attributes with
<code>NULL
</code> names indicate a separator between the attributes of each object. For example, the following code will list the jobs returned from our previous
<a href='#get_jobs'
><code>get_jobs
</code></a> example code:
</p>
734 <pre class='example'
>
735 <a href='#ipp_t'
>ipp_t
</a> *response =
<a href='#get_jobs'
>get_jobs
</a>();
737 if (response != NULL)
739 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
740 const char *attrname;
742 const char *job_name = NULL;
743 const char *job_originating_user_name = NULL;
745 puts(
"Job ID Owner Title");
746 puts(
"------ ---------------- ---------------------------------");
748 for (attr =
<a href='#ippFirstAttribute'
>ippFirstAttribute
</a>(response); attr != NULL; attr =
<a href='#ippNextAttribute'
>ippNextAttribute
</a>(response))
750 /* Attributes without names are separators between jobs */
751 attrname = ippGetName(attr);
752 if (attrname == NULL)
756 if (job_name == NULL)
757 job_name =
"(withheld)";
759 if (job_originating_user_name == NULL)
760 job_originating_user_name =
"(withheld)";
762 printf(
"%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
767 job_originating_user_name = NULL;
770 else if (!strcmp(attrname,
"job-id")
&& ippGetValueTag(attr) == IPP_TAG_INTEGER)
771 job_id = ippGetInteger(attr,
0);
772 else if (!strcmp(attrname,
"job-name")
&& ippGetValueTag(attr) == IPP_TAG_NAME)
773 job_name = ippGetString(attr,
0, NULL);
774 else if (!strcmp(attrname,
"job-originating-user-name")
&&
775 ippGetValueTag(attr) == IPP_TAG_NAME)
776 job_originating_user_name = ippGetString(attr,
0, NULL);
781 if (job_name == NULL)
782 job_name =
"(withheld)";
784 if (job_originating_user_name == NULL)
785 job_originating_user_name =
"(withheld)";
787 printf(
"%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
792 <h3><a name='CREATING_URI_STRINGS'
>Creating URI Strings
</a></h3>
794 <p>To ensure proper encoding, the
795 <a href='#httpAssembleURIf'
><code>httpAssembleURIf
</code></a> function must be
796 used to format a
"printer-uri" string for all printer-based requests:
</p>
798 <pre class='example'
>
799 const char *name =
"Foo";
801 <a href='#ipp_t'
>ipp_t
</a> *request;
803 <a href='#httpAssembleURIf'
>httpAssembleURIf
</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri),
"ipp", NULL, cupsServer(),
804 ippPort(),
"/printers/%s", name);
805 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
808 <h3><a name='SENDING_REQUESTS_WITH_FILES'
>Sending Requests with Files
</a></h3>
810 <p>The
<a href='#cupsDoFileRequest'
><code>cupsDoFileRequest
</code></a> and
811 <a href='#cupsDoIORequest'
><code>cupsDoIORequest
</code></a> functions are
812 used for requests involving files. The
813 <a href='#cupsDoFileRequest'
><code>cupsDoFileRequest
</code></a> function
814 attaches the named file to a request and is typically used when sending a print
815 file or changing a printer's PPD file:
</p>
817 <pre class='example'
>
818 const char *filename =
"/usr/share/cups/data/testprint.ps";
819 const char *name =
"Foo";
822 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_PRINT_JOB);
823 <a href='#ipp_t'
>ipp_t
</a> *response;
825 /* Use httpAssembleURIf for the printer-uri string */
826 <a href='#httpAssembleURIf'
>httpAssembleURIf
</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri),
"ipp", NULL, cupsServer(),
827 ippPort(),
"/printers/%s", name);
828 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
829 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
831 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"job-name",
832 NULL,
"testprint.ps");
834 /* Use snprintf for the resource path */
835 snprintf(resource, sizeof(resource),
"/printers/%s", name);
837 response =
<a href='#cupsDoFileRequest'
>cupsDoFileRequest
</a>(CUPS_HTTP_DEFAULT, request, resource, filename);
840 <p>The
<a href='#cupsDoIORequest'
><code>cupsDoIORequest
</code></a> function
841 optionally attaches a file to the request and optionally saves a file in the
842 response from the server. It is used when using a pipe for the request
843 attachment or when using a request that returns a file, currently only
844 <code>CUPS_GET_DOCUMENT
</code> and
<code>CUPS_GET_PPD
</code>. For example,
845 the following code will download the PPD file for the sample HP LaserJet
848 <pre class='example'
>
851 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
852 <a href='#ipp_t'
>ipp_t
</a> *response;
854 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
855 NULL,
"laserjet.ppd");
857 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
859 response =
<a href='#cupsDoIORequest'
>cupsDoIORequest
</a>(CUPS_HTTP_DEFAULT, request,
"/", -
1, tempfd);
862 <p>The example passes
<code>-
1</code> for the input file descriptor to specify
863 that no file is to be attached to the request. The PPD file attached to the
864 response is written to the temporary file descriptor we created using the
865 <code>cupsTempFd
</code> function.
</p>
867 <h3><a name='ASYNCHRONOUS_REQUEST_PROCESSING'
>Asynchronous Request Processing
</a></h3>
869 <p>The
<a href='#cupsSendRequest'
><code>cupsSendRequest
</code></a> and
870 <a href='#cupsGetResponse'
><code>cupsGetResponse
</code></a> support
871 asynchronous communications with the server. Unlike the other request
872 functions, the IPP request is not automatically freed, so remember to
873 free your request with the
<a href='#ippDelete'
><code>ippDelete
</code></a>
876 <p>File data is attached to the request using the
877 <a href='#cupsWriteRequestData'
><code>cupsWriteRequestData
</code></a>
878 function, while file data returned from the server is read using the
879 <a href='#cupsReadResponseData'
><code>cupsReadResponseData
</code></a>
880 function. We can rewrite the previous
<code>CUPS_GET_PPD
</code> example
881 to use the asynchronous functions quite easily:
</p>
883 <pre class='example'
>
886 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
887 <a href='#ipp_t'
>ipp_t
</a> *response;
889 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
890 NULL,
"laserjet.ppd");
892 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
894 if (
<a href='#cupsSendRequest'
>cupsSendRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/") == HTTP_CONTINUE)
896 response =
<a href='#cupsGetResponse'
>cupsGetResponse
</a>(CUPS_HTTP_DEFAULT,
"/");
898 if (response != NULL)
903 while ((bytes =
<a href='#cupsReadResponseData'
>cupsReadResponseData
</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer)))
> 0)
904 write(tempfd, buffer, bytes);
908 /* Free the request! */
909 <a href='#ippDelete'
>ippDelete
</a>(request);
912 <p>The
<a href='#cupsSendRequest'
><code>cupsSendRequest
</code></a> function
913 returns the initial HTTP request status, typically either
914 <code>HTTP_CONTINUE
</code> or
<code>HTTP_UNAUTHORIZED
</code>. The latter status
915 is returned when the request requires authentication of some sort. The
916 <a href='#cupsDoAuthentication'
><code>cupsDoAuthentication
</code></a> function
917 must be called when your see
<code>HTTP_UNAUTHORIZED
</code> and the request
918 re-sent. We can add authentication support to our example code by using a
919 <code>do ... while
</code> loop:
</p>
921 <pre class='example'
>
924 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
925 <a href='#ipp_t'
>ipp_t
</a> *response;
926 http_status_t status;
928 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
929 NULL,
"laserjet.ppd");
931 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
933 /* Loop for authentication */
936 status =
<a href='#cupsSendRequest'
>cupsSendRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/");
938 if (status == HTTP_UNAUTHORIZED)
940 /* Try to authenticate, break out of the loop if that fails */
941 if (
<a href='#cupsDoAuthentication'
>cupsDoAuthentication
</a>(CUPS_HTTP_DEFAULT,
"POST",
"/"))
945 while (status != HTTP_CONTINUE
&& status != HTTP_UNAUTHORIZED);
947 if (status == HTTP_CONTINUE)
949 response =
<a href='#cupsGetResponse'
>cupsGetResponse
</a>(CUPS_HTTP_DEFAULT,
"/");
951 if (response != NULL)
956 while ((bytes =
<a href='#cupsReadResponseData'
>cupsReadResponseData
</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer)))
> 0)
957 write(tempfd, buffer, bytes);
961 /* Free the request! */
962 <a href='#ippDelete'
>ippDelete
</a>(request);
964 <h2 class=
"title"><a name=
"FUNCTIONS">Functions
</a></h2>
965 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/Mac OS X
10.4 </span><a name=
"cupsDoAuthentication">cupsDoAuthentication
</a></h3>
966 <p class=
"description">Authenticate a request.
</p>
968 int cupsDoAuthentication (
<br>
969 <a href=
"#http_t">http_t
</a> *http,
<br>
970 const char *method,
<br>
971 const char *resource
<br>
973 <h4 class=
"parameters">Parameters
</h4>
976 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
978 <dd class=
"description">Request method (
"GET
",
"POST
",
"PUT
")
</dd>
980 <dd class=
"description">Resource path
</dd>
982 <h4 class=
"returnvalue">Return Value
</h4>
983 <p class=
"description">0 on success, -
1 on error
</p>
984 <h4 class=
"discussion">Discussion
</h4>
985 <p class=
"discussion">This function should be called in response to a
<code>HTTP_UNAUTHORIZED
</code>
986 status, prior to resubmitting your request.
989 <h3 class=
"function"><a name=
"cupsDoFileRequest">cupsDoFileRequest
</a></h3>
990 <p class=
"description">Do an IPP request with a file.
</p>
992 <a href=
"#ipp_t">ipp_t
</a> *cupsDoFileRequest (
<br>
993 <a href=
"#http_t">http_t
</a> *http,
<br>
994 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
995 const char *resource,
<br>
996 const char *filename
<br>
998 <h4 class=
"parameters">Parameters
</h4>
1001 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1003 <dd class=
"description">IPP request
</dd>
1005 <dd class=
"description">HTTP resource for POST
</dd>
1007 <dd class=
"description">File to send or
<code>NULL
</code> for none
</dd>
1009 <h4 class=
"returnvalue">Return Value
</h4>
1010 <p class=
"description">Response data
</p>
1011 <h4 class=
"discussion">Discussion
</h4>
1012 <p class=
"discussion">This function sends the IPP request to the specified server, retrying
1013 and authenticating as necessary. The request is freed with
<a href=
"#ippDelete"><code>ippDelete
</code></a>
1014 after receiving a valid IPP response.
</p>
1015 <h3 class=
"function"><span class=
"info"> CUPS
1.3/Mac OS X
10.5 </span><a name=
"cupsDoIORequest">cupsDoIORequest
</a></h3>
1016 <p class=
"description">Do an IPP request with file descriptors.
</p>
1018 <a href=
"#ipp_t">ipp_t
</a> *cupsDoIORequest (
<br>
1019 <a href=
"#http_t">http_t
</a> *http,
<br>
1020 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
1021 const char *resource,
<br>
1022 int infile,
<br>
1023 int outfile
<br>
1025 <h4 class=
"parameters">Parameters
</h4>
1028 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1030 <dd class=
"description">IPP request
</dd>
1032 <dd class=
"description">HTTP resource for POST
</dd>
1034 <dd class=
"description">File to read from or -
1 for none
</dd>
1036 <dd class=
"description">File to write to or -
1 for none
</dd>
1038 <h4 class=
"returnvalue">Return Value
</h4>
1039 <p class=
"description">Response data
</p>
1040 <h4 class=
"discussion">Discussion
</h4>
1041 <p class=
"discussion">This function sends the IPP request to the specified server, retrying
1042 and authenticating as necessary. The request is freed with ippDelete()
1043 after receiving a valid IPP response.
<br>
1045 If
"infile
" is a valid file descriptor, cupsDoIORequest() copies
1046 all of the data from the file after the IPP request message.
<br>
1048 If
"outfile
" is a valid file descriptor, cupsDoIORequest() copies
1049 all of the data after the IPP response message to the file.
1052 <h3 class=
"function"><a name=
"cupsDoRequest">cupsDoRequest
</a></h3>
1053 <p class=
"description">Do an IPP request.
</p>
1055 <a href=
"#ipp_t">ipp_t
</a> *cupsDoRequest (
<br>
1056 <a href=
"#http_t">http_t
</a> *http,
<br>
1057 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
1058 const char *resource
<br>
1060 <h4 class=
"parameters">Parameters
</h4>
1063 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1065 <dd class=
"description">IPP request
</dd>
1067 <dd class=
"description">HTTP resource for POST
</dd>
1069 <h4 class=
"returnvalue">Return Value
</h4>
1070 <p class=
"description">Response data
</p>
1071 <h4 class=
"discussion">Discussion
</h4>
1072 <p class=
"discussion">This function sends the IPP request to the specified server, retrying
1073 and authenticating as necessary. The request is freed with ippDelete()
1074 after receiving a valid IPP response.
</p>
1075 <h3 class=
"function"><a name=
"cupsEncodeOptions">cupsEncodeOptions
</a></h3>
1076 <p class=
"description">Encode printer options into IPP attributes.
</p>
1078 void cupsEncodeOptions (
<br>
1079 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
1080 int num_options,
<br>
1081 cups_option_t *options
<br>
1083 <h4 class=
"parameters">Parameters
</h4>
1086 <dd class=
"description">Request to add to
</dd>
1087 <dt>num_options
</dt>
1088 <dd class=
"description">Number of options
</dd>
1090 <dd class=
"description">Options
</dd>
1092 <h4 class=
"discussion">Discussion
</h4>
1093 <p class=
"discussion">This function adds operation, job, and then subscription attributes,
1094 in that order. Use the cupsEncodeOptions2() function to add attributes
1095 for a single group.
</p>
1096 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"cupsEncodeOptions2">cupsEncodeOptions2
</a></h3>
1097 <p class=
"description">Encode printer options into IPP attributes for a group.
</p>
1099 void cupsEncodeOptions2 (
<br>
1100 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
1101 int num_options,
<br>
1102 cups_option_t *options,
<br>
1103 ipp_tag_t group_tag
<br>
1105 <h4 class=
"parameters">Parameters
</h4>
1108 <dd class=
"description">Request to add to
</dd>
1109 <dt>num_options
</dt>
1110 <dd class=
"description">Number of options
</dd>
1112 <dd class=
"description">Options
</dd>
1114 <dd class=
"description">Group to encode
</dd>
1116 <h4 class=
"discussion">Discussion
</h4>
1117 <p class=
"discussion">This function only adds attributes for a single group. Call this
1118 function multiple times for each group, or use cupsEncodeOptions()
1119 to add the standard groups.
1122 <h3 class=
"function"><span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span><a name=
"cupsGetDevices">cupsGetDevices
</a></h3>
1123 <p class=
"description">Get available printer devices.
</p>
1125 ipp_status_t cupsGetDevices (
<br>
1126 <a href=
"#http_t">http_t
</a> *http,
<br>
1127 int timeout,
<br>
1128 const char *include_schemes,
<br>
1129 const char *exclude_schemes,
<br>
1130 cups_device_cb_t callback,
<br>
1131 void *user_data
<br>
1133 <h4 class=
"parameters">Parameters
</h4>
1136 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1138 <dd class=
"description">Timeout in seconds or
<code>CUPS_TIMEOUT_DEFAULT
</code></dd>
1139 <dt>include_schemes
</dt>
1140 <dd class=
"description">Comma-separated URI schemes to include or
<code>CUPS_INCLUDE_ALL
</code></dd>
1141 <dt>exclude_schemes
</dt>
1142 <dd class=
"description">Comma-separated URI schemes to exclude or
<code>CUPS_EXCLUDE_NONE
</code></dd>
1144 <dd class=
"description">Callback function
</dd>
1146 <dd class=
"description">User data pointer
</dd>
1148 <h4 class=
"returnvalue">Return Value
</h4>
1149 <p class=
"description">Request status -
<code>IPP_OK
</code> on success.
</p>
1150 <h4 class=
"discussion">Discussion
</h4>
1151 <p class=
"discussion">This function sends a CUPS-Get-Devices request and streams the discovered
1152 devices to the specified callback function. The
"timeout
" parameter controls
1153 how long the request lasts, while the
"include_schemes
" and
"exclude_schemes
"
1154 parameters provide comma-delimited lists of backends to include or omit from
1155 the request respectively.
1158 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/Mac OS X
10.4 </span><a name=
"cupsGetFd">cupsGetFd
</a></h3>
1159 <p class=
"description">Get a file from the server.
</p>
1161 <a href=
"#http_status_t">http_status_t
</a> cupsGetFd (
<br>
1162 <a href=
"#http_t">http_t
</a> *http,
<br>
1163 const char *resource,
<br>
1164 int fd
<br>
1166 <h4 class=
"parameters">Parameters
</h4>
1169 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1171 <dd class=
"description">Resource name
</dd>
1173 <dd class=
"description">File descriptor
</dd>
1175 <h4 class=
"returnvalue">Return Value
</h4>
1176 <p class=
"description">HTTP status
</p>
1177 <h4 class=
"discussion">Discussion
</h4>
1178 <p class=
"discussion">This function returns
<code>HTTP_OK
</code> when the file is successfully retrieved.
1181 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/Mac OS X
10.4 </span><a name=
"cupsGetFile">cupsGetFile
</a></h3>
1182 <p class=
"description">Get a file from the server.
</p>
1184 <a href=
"#http_status_t">http_status_t
</a> cupsGetFile (
<br>
1185 <a href=
"#http_t">http_t
</a> *http,
<br>
1186 const char *resource,
<br>
1187 const char *filename
<br>
1189 <h4 class=
"parameters">Parameters
</h4>
1192 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1194 <dd class=
"description">Resource name
</dd>
1196 <dd class=
"description">Filename
</dd>
1198 <h4 class=
"returnvalue">Return Value
</h4>
1199 <p class=
"description">HTTP status
</p>
1200 <h4 class=
"discussion">Discussion
</h4>
1201 <p class=
"discussion">This function returns
<code>HTTP_OK
</code> when the file is successfully retrieved.
1204 <h3 class=
"function"><span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span><a name=
"cupsGetResponse">cupsGetResponse
</a></h3>
1205 <p class=
"description">Get a response to an IPP request.
</p>
1207 <a href=
"#ipp_t">ipp_t
</a> *cupsGetResponse (
<br>
1208 <a href=
"#http_t">http_t
</a> *http,
<br>
1209 const char *resource
<br>
1211 <h4 class=
"parameters">Parameters
</h4>
1214 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1216 <dd class=
"description">HTTP resource for POST
</dd>
1218 <h4 class=
"returnvalue">Return Value
</h4>
1219 <p class=
"description">Response or
<code>NULL
</code> on HTTP error
</p>
1220 <h4 class=
"discussion">Discussion
</h4>
1221 <p class=
"discussion">Use this function to get the response for an IPP request sent using
1222 cupsSendDocument() or cupsSendRequest(). For requests that return
1223 additional data, use httpRead() after getting a successful response,
1224 otherwise call httpFlush() to complete the response processing.
1227 <h3 class=
"function"><a name=
"cupsLastError">cupsLastError
</a></h3>
1228 <p class=
"description">Return the last IPP status code.
</p>
1230 ipp_status_t cupsLastError (void);
</p>
1231 <h4 class=
"returnvalue">Return Value
</h4>
1232 <p class=
"description">IPP status code from last request
</p>
1233 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"cupsLastErrorString">cupsLastErrorString
</a></h3>
1234 <p class=
"description">Return the last IPP status-message.
</p>
1236 const char *cupsLastErrorString (void);
</p>
1237 <h4 class=
"returnvalue">Return Value
</h4>
1238 <p class=
"description">status-message text from last request
</p>
1239 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/Mac OS X
10.4 </span><a name=
"cupsPutFd">cupsPutFd
</a></h3>
1240 <p class=
"description">Put a file on the server.
</p>
1242 <a href=
"#http_status_t">http_status_t
</a> cupsPutFd (
<br>
1243 <a href=
"#http_t">http_t
</a> *http,
<br>
1244 const char *resource,
<br>
1245 int fd
<br>
1247 <h4 class=
"parameters">Parameters
</h4>
1250 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1252 <dd class=
"description">Resource name
</dd>
1254 <dd class=
"description">File descriptor
</dd>
1256 <h4 class=
"returnvalue">Return Value
</h4>
1257 <p class=
"description">HTTP status
</p>
1258 <h4 class=
"discussion">Discussion
</h4>
1259 <p class=
"discussion">This function returns
<code>HTTP_CREATED
</code> when the file is stored
1263 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/Mac OS X
10.4 </span><a name=
"cupsPutFile">cupsPutFile
</a></h3>
1264 <p class=
"description">Put a file on the server.
</p>
1266 <a href=
"#http_status_t">http_status_t
</a> cupsPutFile (
<br>
1267 <a href=
"#http_t">http_t
</a> *http,
<br>
1268 const char *resource,
<br>
1269 const char *filename
<br>
1271 <h4 class=
"parameters">Parameters
</h4>
1274 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1276 <dd class=
"description">Resource name
</dd>
1278 <dd class=
"description">Filename
</dd>
1280 <h4 class=
"returnvalue">Return Value
</h4>
1281 <p class=
"description">HTTP status
</p>
1282 <h4 class=
"discussion">Discussion
</h4>
1283 <p class=
"discussion">This function returns
<code>HTTP_CREATED
</code> when the file is stored
1287 <h3 class=
"function"><span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span><a name=
"cupsReadResponseData">cupsReadResponseData
</a></h3>
1288 <p class=
"description">Read additional data after the IPP response.
</p>
1290 ssize_t cupsReadResponseData (
<br>
1291 <a href=
"#http_t">http_t
</a> *http,
<br>
1292 char *buffer,
<br>
1293 size_t length
<br>
1295 <h4 class=
"parameters">Parameters
</h4>
1298 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1300 <dd class=
"description">Buffer to use
</dd>
1302 <dd class=
"description">Number of bytes to read
</dd>
1304 <h4 class=
"returnvalue">Return Value
</h4>
1305 <p class=
"description">Bytes read,
0 on EOF, -
1 on error
</p>
1306 <h4 class=
"discussion">Discussion
</h4>
1307 <p class=
"discussion">This function is used after cupsGetResponse() to read the PPD or document
1308 files for CUPS_GET_PPD and CUPS_GET_DOCUMENT requests, respectively.
1311 <h3 class=
"function"><span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span><a name=
"cupsSendRequest">cupsSendRequest
</a></h3>
1312 <p class=
"description">Send an IPP request.
</p>
1314 <a href=
"#http_status_t">http_status_t
</a> cupsSendRequest (
<br>
1315 <a href=
"#http_t">http_t
</a> *http,
<br>
1316 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
1317 const char *resource,
<br>
1318 size_t length
<br>
1320 <h4 class=
"parameters">Parameters
</h4>
1323 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1325 <dd class=
"description">IPP request
</dd>
1327 <dd class=
"description">Resource path
</dd>
1329 <dd class=
"description">Length of data to follow or
<code>CUPS_LENGTH_VARIABLE
</code></dd>
1331 <h4 class=
"returnvalue">Return Value
</h4>
1332 <p class=
"description">Initial HTTP status
</p>
1333 <h4 class=
"discussion">Discussion
</h4>
1334 <p class=
"discussion">Use httpWrite() to write any additional data (document, PPD file, etc.)
1335 for the request, cupsGetResponse() to get the IPP response, and httpRead()
1336 to read any additional data following the response. Only one request can be
1337 sent/queued at a time.
<br>
1339 Unlike cupsDoFileRequest(), cupsDoIORequest(), and cupsDoRequest(), the
1340 request is not freed.
1343 <h3 class=
"function"><span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span><a name=
"cupsWriteRequestData">cupsWriteRequestData
</a></h3>
1344 <p class=
"description">Write additional data after an IPP request.
</p>
1346 <a href=
"#http_status_t">http_status_t
</a> cupsWriteRequestData (
<br>
1347 <a href=
"#http_t">http_t
</a> *http,
<br>
1348 const char *buffer,
<br>
1349 size_t length
<br>
1351 <h4 class=
"parameters">Parameters
</h4>
1354 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1356 <dd class=
"description">Bytes to write
</dd>
1358 <dd class=
"description">Number of bytes to write
</dd>
1360 <h4 class=
"returnvalue">Return Value
</h4>
1361 <p class=
"description"><code>HTTP_CONTINUE
</code> if OK or HTTP status on error
</p>
1362 <h4 class=
"discussion">Discussion
</h4>
1363 <p class=
"discussion">This function is used after
<a href=
"#cupsSendRequest"><code>cupsSendRequest
</code></a> to provide a PPD and
1364 after
<a href=
"#cupsStartDocument"><code>cupsStartDocument
</code></a> to provide a document file.
1367 <h3 class=
"function"><span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span><a name=
"httpAddCredential">httpAddCredential
</a></h3>
1368 <p class=
"description">Allocates and adds a single credential to an array.
</p>
1370 int httpAddCredential (
<br>
1371 cups_array_t *credentials,
<br>
1372 const void *data,
<br>
1373 size_t datalen
<br>
1375 <h4 class=
"parameters">Parameters
</h4>
1377 <dt>credentials
</dt>
1378 <dd class=
"description">Credentials array
</dd>
1380 <dd class=
"description">PEM-encoded X
.509 data
</dd>
1382 <dd class=
"description">Length of data
</dd>
1384 <h4 class=
"returnvalue">Return Value
</h4>
1385 <p class=
"description">0 on success, -
1 on error
</p>
1386 <h4 class=
"discussion">Discussion
</h4>
1387 <p class=
"discussion">Use
<code>cupsArrayNew(NULL, NULL)
</code> to create a credentials array.
1390 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrAny">httpAddrAny
</a></h3>
1391 <p class=
"description">Check for the
"any
" address.
</p>
1393 int httpAddrAny (
<br>
1394 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1396 <h4 class=
"parameters">Parameters
</h4>
1399 <dd class=
"description">Address to check
</dd>
1401 <h4 class=
"returnvalue">Return Value
</h4>
1402 <p class=
"description">1 if
"any
",
0 otherwise
</p>
1403 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrEqual">httpAddrEqual
</a></h3>
1404 <p class=
"description">Compare two addresses.
</p>
1406 int httpAddrEqual (
<br>
1407 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr1,
<br>
1408 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr2
<br>
1410 <h4 class=
"parameters">Parameters
</h4>
1413 <dd class=
"description">First address
</dd>
1415 <dd class=
"description">Second address
</dd>
1417 <h4 class=
"returnvalue">Return Value
</h4>
1418 <p class=
"description">1 if equal,
0 if not
</p>
1419 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrLength">httpAddrLength
</a></h3>
1420 <p class=
"description">Return the length of the address in bytes.
</p>
1422 int httpAddrLength (
<br>
1423 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1425 <h4 class=
"parameters">Parameters
</h4>
1428 <dd class=
"description">Address
</dd>
1430 <h4 class=
"returnvalue">Return Value
</h4>
1431 <p class=
"description">Length in bytes
</p>
1432 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrLocalhost">httpAddrLocalhost
</a></h3>
1433 <p class=
"description">Check for the local loopback address.
</p>
1435 int httpAddrLocalhost (
<br>
1436 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1438 <h4 class=
"parameters">Parameters
</h4>
1441 <dd class=
"description">Address to check
</dd>
1443 <h4 class=
"returnvalue">Return Value
</h4>
1444 <p class=
"description">1 if local host,
0 otherwise
</p>
1445 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrLookup">httpAddrLookup
</a></h3>
1446 <p class=
"description">Lookup the hostname associated with the address.
</p>
1448 char *httpAddrLookup (
<br>
1449 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
1450 char *name,
<br>
1451 int namelen
<br>
1453 <h4 class=
"parameters">Parameters
</h4>
1456 <dd class=
"description">Address to lookup
</dd>
1458 <dd class=
"description">Host name buffer
</dd>
1460 <dd class=
"description">Size of name buffer
</dd>
1462 <h4 class=
"returnvalue">Return Value
</h4>
1463 <p class=
"description">Host name
</p>
1464 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrString">httpAddrString
</a></h3>
1465 <p class=
"description">Convert an address to a numeric string.
</p>
1467 char *httpAddrString (
<br>
1468 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
1469 char *s,
<br>
1470 int slen
<br>
1472 <h4 class=
"parameters">Parameters
</h4>
1475 <dd class=
"description">Address to convert
</dd>
1477 <dd class=
"description">String buffer
</dd>
1479 <dd class=
"description">Length of string
</dd>
1481 <h4 class=
"returnvalue">Return Value
</h4>
1482 <p class=
"description">Numeric address string
</p>
1483 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAssembleURI">httpAssembleURI
</a></h3>
1484 <p class=
"description">Assemble a uniform resource identifier from its
1487 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpAssembleURI (
<br>
1488 <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> encoding,
<br>
1489 char *uri,
<br>
1490 int urilen,
<br>
1491 const char *scheme,
<br>
1492 const char *username,
<br>
1493 const char *host,
<br>
1494 int port,
<br>
1495 const char *resource
<br>
1497 <h4 class=
"parameters">Parameters
</h4>
1500 <dd class=
"description">Encoding flags
</dd>
1502 <dd class=
"description">URI buffer
</dd>
1504 <dd class=
"description">Size of URI buffer
</dd>
1506 <dd class=
"description">Scheme name
</dd>
1508 <dd class=
"description">Username
</dd>
1510 <dd class=
"description">Hostname or address
</dd>
1512 <dd class=
"description">Port number
</dd>
1514 <dd class=
"description">Resource
</dd>
1516 <h4 class=
"returnvalue">Return Value
</h4>
1517 <p class=
"description">URI status
</p>
1518 <h4 class=
"discussion">Discussion
</h4>
1519 <p class=
"discussion">This function escapes reserved characters in the URI depending on the
1520 value of the
"encoding
" argument. You should use this function in
1521 place of traditional string functions whenever you need to create a
1525 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAssembleURIf">httpAssembleURIf
</a></h3>
1526 <p class=
"description">Assemble a uniform resource identifier from its
1527 components with a formatted resource.
</p>
1529 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpAssembleURIf (
<br>
1530 <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> encoding,
<br>
1531 char *uri,
<br>
1532 int urilen,
<br>
1533 const char *scheme,
<br>
1534 const char *username,
<br>
1535 const char *host,
<br>
1536 int port,
<br>
1537 const char *resourcef,
<br>
1538 ...
<br>
1540 <h4 class=
"parameters">Parameters
</h4>
1543 <dd class=
"description">Encoding flags
</dd>
1545 <dd class=
"description">URI buffer
</dd>
1547 <dd class=
"description">Size of URI buffer
</dd>
1549 <dd class=
"description">Scheme name
</dd>
1551 <dd class=
"description">Username
</dd>
1553 <dd class=
"description">Hostname or address
</dd>
1555 <dd class=
"description">Port number
</dd>
1557 <dd class=
"description">Printf-style resource
</dd>
1559 <dd class=
"description">Additional arguments as needed
</dd>
1561 <h4 class=
"returnvalue">Return Value
</h4>
1562 <p class=
"description">URI status
</p>
1563 <h4 class=
"discussion">Discussion
</h4>
1564 <p class=
"discussion">This function creates a formatted version of the resource string
1565 argument
"resourcef
" and escapes reserved characters in the URI
1566 depending on the value of the
"encoding
" argument. You should use
1567 this function in place of traditional string functions whenever
1568 you need to create a URI string.
1571 <h3 class=
"function"><a name=
"httpBlocking">httpBlocking
</a></h3>
1572 <p class=
"description">Set blocking/non-blocking behavior on a connection.
</p>
1574 void httpBlocking (
<br>
1575 <a href=
"#http_t">http_t
</a> *http,
<br>
1576 int b
<br>
1578 <h4 class=
"parameters">Parameters
</h4>
1581 <dd class=
"description">Connection to server
</dd>
1583 <dd class=
"description">1 = blocking,
0 = non-blocking
</dd>
1585 <h3 class=
"function"><a name=
"httpCheck">httpCheck
</a></h3>
1586 <p class=
"description">Check to see if there is a pending response from the server.
</p>
1589 <a href=
"#http_t">http_t
</a> *http
<br>
1591 <h4 class=
"parameters">Parameters
</h4>
1594 <dd class=
"description">Connection to server
</dd>
1596 <h4 class=
"returnvalue">Return Value
</h4>
1597 <p class=
"description">0 = no data,
1 = data available
</p>
1598 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"httpClearCookie">httpClearCookie
</a></h3>
1599 <p class=
"description">Clear the cookie value(s).
</p>
1601 void httpClearCookie (
<br>
1602 <a href=
"#http_t">http_t
</a> *http
<br>
1604 <h4 class=
"parameters">Parameters
</h4>
1607 <dd class=
"description">Connection to server
</dd>
1609 <h3 class=
"function"><a name=
"httpClearFields">httpClearFields
</a></h3>
1610 <p class=
"description">Clear HTTP request fields.
</p>
1612 void httpClearFields (
<br>
1613 <a href=
"#http_t">http_t
</a> *http
<br>
1615 <h4 class=
"parameters">Parameters
</h4>
1618 <dd class=
"description">Connection to server
</dd>
1620 <h3 class=
"function"><a name=
"httpClose">httpClose
</a></h3>
1621 <p class=
"description">Close an HTTP connection.
</p>
1623 void httpClose (
<br>
1624 <a href=
"#http_t">http_t
</a> *http
<br>
1626 <h4 class=
"parameters">Parameters
</h4>
1629 <dd class=
"description">Connection to server
</dd>
1631 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpConnect">httpConnect
</a></h3>
1632 <p class=
"description">Connect to a HTTP server.
</p>
1634 <a href=
"#http_t">http_t
</a> *httpConnect (
<br>
1635 const char *host,
<br>
1636 int port
<br>
1638 <h4 class=
"parameters">Parameters
</h4>
1641 <dd class=
"description">Host to connect to
</dd>
1643 <dd class=
"description">Port number
</dd>
1645 <h4 class=
"returnvalue">Return Value
</h4>
1646 <p class=
"description">New HTTP connection
</p>
1647 <h4 class=
"discussion">Discussion
</h4>
1648 <p class=
"discussion">This function is deprecated - use
<a href=
"#httpConnectEncrypt"><code>httpConnectEncrypt
</code></a> instead.
1651 <h3 class=
"function"><a name=
"httpConnectEncrypt">httpConnectEncrypt
</a></h3>
1652 <p class=
"description">Connect to a HTTP server using encryption.
</p>
1654 <a href=
"#http_t">http_t
</a> *httpConnectEncrypt (
<br>
1655 const char *host,
<br>
1656 int port,
<br>
1657 <a href=
"#http_encryption_t">http_encryption_t
</a> encryption
<br>
1659 <h4 class=
"parameters">Parameters
</h4>
1662 <dd class=
"description">Host to connect to
</dd>
1664 <dd class=
"description">Port number
</dd>
1666 <dd class=
"description">Type of encryption to use
</dd>
1668 <h4 class=
"returnvalue">Return Value
</h4>
1669 <p class=
"description">New HTTP connection
</p>
1670 <h3 class=
"function"><span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span><a name=
"httpCopyCredentials">httpCopyCredentials
</a></h3>
1671 <p class=
"description">Copy the credentials associated with an encrypted
1674 int httpCopyCredentials (
<br>
1675 <a href=
"#http_t">http_t
</a> *http,
<br>
1676 cups_array_t **credentials
<br>
1678 <h4 class=
"parameters">Parameters
</h4>
1681 <dd class=
"description">Connection to server
</dd>
1682 <dt>credentials
</dt>
1683 <dd class=
"description">Array of credentials
</dd>
1685 <h4 class=
"returnvalue">Return Value
</h4>
1686 <p class=
"description">Status of call (
0 = success)
</p>
1687 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpDecode64">httpDecode64
</a></h3>
1688 <p class=
"description">Base64-decode a string.
</p>
1690 char *httpDecode64 (
<br>
1691 char *out,
<br>
1692 const char *in
<br>
1694 <h4 class=
"parameters">Parameters
</h4>
1697 <dd class=
"description">String to write to
</dd>
1699 <dd class=
"description">String to read from
</dd>
1701 <h4 class=
"returnvalue">Return Value
</h4>
1702 <p class=
"description">Decoded string
</p>
1703 <h4 class=
"discussion">Discussion
</h4>
1704 <p class=
"discussion">This function is deprecated. Use the httpDecode64_2() function instead
1705 which provides buffer length arguments.
1708 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/Mac OS X
10.4 </span><a name=
"httpDecode64_2">httpDecode64_2
</a></h3>
1709 <p class=
"description">Base64-decode a string.
</p>
1711 char *httpDecode64_2 (
<br>
1712 char *out,
<br>
1713 int *outlen,
<br>
1714 const char *in
<br>
1716 <h4 class=
"parameters">Parameters
</h4>
1719 <dd class=
"description">String to write to
</dd>
1721 <dd class=
"description">Size of output string
</dd>
1723 <dd class=
"description">String to read from
</dd>
1725 <h4 class=
"returnvalue">Return Value
</h4>
1726 <p class=
"description">Decoded string
</p>
1727 <h3 class=
"function"><a name=
"httpDelete">httpDelete
</a></h3>
1728 <p class=
"description">Send a DELETE request to the server.
</p>
1730 int httpDelete (
<br>
1731 <a href=
"#http_t">http_t
</a> *http,
<br>
1732 const char *uri
<br>
1734 <h4 class=
"parameters">Parameters
</h4>
1737 <dd class=
"description">Connection to server
</dd>
1739 <dd class=
"description">URI to delete
</dd>
1741 <h4 class=
"returnvalue">Return Value
</h4>
1742 <p class=
"description">Status of call (
0 = success)
</p>
1743 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpEncode64">httpEncode64
</a></h3>
1744 <p class=
"description">Base64-encode a string.
</p>
1746 char *httpEncode64 (
<br>
1747 char *out,
<br>
1748 const char *in
<br>
1750 <h4 class=
"parameters">Parameters
</h4>
1753 <dd class=
"description">String to write to
</dd>
1755 <dd class=
"description">String to read from
</dd>
1757 <h4 class=
"returnvalue">Return Value
</h4>
1758 <p class=
"description">Encoded string
</p>
1759 <h4 class=
"discussion">Discussion
</h4>
1760 <p class=
"discussion">This function is deprecated. Use the httpEncode64_2() function instead
1761 which provides buffer length arguments.
1764 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/Mac OS X
10.4 </span><a name=
"httpEncode64_2">httpEncode64_2
</a></h3>
1765 <p class=
"description">Base64-encode a string.
</p>
1767 char *httpEncode64_2 (
<br>
1768 char *out,
<br>
1769 int outlen,
<br>
1770 const char *in,
<br>
1771 int inlen
<br>
1773 <h4 class=
"parameters">Parameters
</h4>
1776 <dd class=
"description">String to write to
</dd>
1778 <dd class=
"description">Size of output string
</dd>
1780 <dd class=
"description">String to read from
</dd>
1782 <dd class=
"description">Size of input string
</dd>
1784 <h4 class=
"returnvalue">Return Value
</h4>
1785 <p class=
"description">Encoded string
</p>
1786 <h3 class=
"function"><a name=
"httpEncryption">httpEncryption
</a></h3>
1787 <p class=
"description">Set the required encryption on the link.
</p>
1789 int httpEncryption (
<br>
1790 <a href=
"#http_t">http_t
</a> *http,
<br>
1791 <a href=
"#http_encryption_t">http_encryption_t
</a> e
<br>
1793 <h4 class=
"parameters">Parameters
</h4>
1796 <dd class=
"description">Connection to server
</dd>
1798 <dd class=
"description">New encryption preference
</dd>
1800 <h4 class=
"returnvalue">Return Value
</h4>
1801 <p class=
"description">-
1 on error,
0 on success
</p>
1802 <h3 class=
"function"><a name=
"httpError">httpError
</a></h3>
1803 <p class=
"description">Get the last error on a connection.
</p>
1806 <a href=
"#http_t">http_t
</a> *http
<br>
1808 <h4 class=
"parameters">Parameters
</h4>
1811 <dd class=
"description">Connection to server
</dd>
1813 <h4 class=
"returnvalue">Return Value
</h4>
1814 <p class=
"description">Error code (errno) value
</p>
1815 <h3 class=
"function"><a name=
"httpFlush">httpFlush
</a></h3>
1816 <p class=
"description">Flush data from a HTTP connection.
</p>
1818 void httpFlush (
<br>
1819 <a href=
"#http_t">http_t
</a> *http
<br>
1821 <h4 class=
"parameters">Parameters
</h4>
1824 <dd class=
"description">Connection to server
</dd>
1826 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpFlushWrite">httpFlushWrite
</a></h3>
1827 <p class=
"description">Flush data in write buffer.
</p>
1829 int httpFlushWrite (
<br>
1830 <a href=
"#http_t">http_t
</a> *http
<br>
1832 <h4 class=
"parameters">Parameters
</h4>
1835 <dd class=
"description">Connection to server
</dd>
1837 <h4 class=
"returnvalue">Return Value
</h4>
1838 <p class=
"description">Bytes written or -
1 on error
</p>
1839 <h3 class=
"function"><a name=
"httpFreeCredentials">httpFreeCredentials
</a></h3>
1840 <p class=
"description">Free an array of credentials.
</p>
1842 void httpFreeCredentials (
<br>
1843 cups_array_t *credentials
<br>
1845 <h4 class=
"parameters">Parameters
</h4>
1847 <dt>credentials
</dt>
1848 <dd class=
"description">Array of credentials
</dd>
1850 <h3 class=
"function"><a name=
"httpGet">httpGet
</a></h3>
1851 <p class=
"description">Send a GET request to the server.
</p>
1854 <a href=
"#http_t">http_t
</a> *http,
<br>
1855 const char *uri
<br>
1857 <h4 class=
"parameters">Parameters
</h4>
1860 <dd class=
"description">Connection to server
</dd>
1862 <dd class=
"description">URI to get
</dd>
1864 <h4 class=
"returnvalue">Return Value
</h4>
1865 <p class=
"description">Status of call (
0 = success)
</p>
1866 <h3 class=
"function"><span class=
"info"> CUPS
1.3/Mac OS X
10.5 </span><a name=
"httpGetAuthString">httpGetAuthString
</a></h3>
1867 <p class=
"description">Get the current authorization string.
</p>
1869 char *httpGetAuthString (
<br>
1870 <a href=
"#http_t">http_t
</a> *http
<br>
1872 <h4 class=
"parameters">Parameters
</h4>
1875 <dd class=
"description">Connection to server
</dd>
1877 <h4 class=
"returnvalue">Return Value
</h4>
1878 <p class=
"description">Authorization string
</p>
1879 <h4 class=
"discussion">Discussion
</h4>
1880 <p class=
"discussion">The authorization string is set by cupsDoAuthentication() and
1881 httpSetAuthString(). Use httpGetAuthString() to retrieve the
1882 string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
1886 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetBlocking">httpGetBlocking
</a></h3>
1887 <p class=
"description">Get the blocking/non-block state of a connection.
</p>
1889 int httpGetBlocking (
<br>
1890 <a href=
"#http_t">http_t
</a> *http
<br>
1892 <h4 class=
"parameters">Parameters
</h4>
1895 <dd class=
"description">Connection to server
</dd>
1897 <h4 class=
"returnvalue">Return Value
</h4>
1898 <p class=
"description">1 if blocking,
0 if non-blocking
</p>
1899 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"httpGetCookie">httpGetCookie
</a></h3>
1900 <p class=
"description">Get any cookie data from the response.
</p>
1902 const char *httpGetCookie (
<br>
1903 <a href=
"#http_t">http_t
</a> *http
<br>
1905 <h4 class=
"parameters">Parameters
</h4>
1908 <dd class=
"description">HTTP connecion
</dd>
1910 <h4 class=
"returnvalue">Return Value
</h4>
1911 <p class=
"description">Cookie data or NULL
</p>
1912 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetDateString">httpGetDateString
</a></h3>
1913 <p class=
"description">Get a formatted date/time string from a time value.
</p>
1915 const char *httpGetDateString (
<br>
1916 time_t t
<br>
1918 <h4 class=
"parameters">Parameters
</h4>
1921 <dd class=
"description">UNIX time
</dd>
1923 <h4 class=
"returnvalue">Return Value
</h4>
1924 <p class=
"description">Date/time string
</p>
1925 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetDateString2">httpGetDateString2
</a></h3>
1926 <p class=
"description">Get a formatted date/time string from a time value.
</p>
1928 const char *httpGetDateString2 (
<br>
1929 time_t t,
<br>
1930 char *s,
<br>
1931 int slen
<br>
1933 <h4 class=
"parameters">Parameters
</h4>
1936 <dd class=
"description">UNIX time
</dd>
1938 <dd class=
"description">String buffer
</dd>
1940 <dd class=
"description">Size of string buffer
</dd>
1942 <h4 class=
"returnvalue">Return Value
</h4>
1943 <p class=
"description">Date/time string
</p>
1944 <h3 class=
"function"><a name=
"httpGetDateTime">httpGetDateTime
</a></h3>
1945 <p class=
"description">Get a time value from a formatted date/time string.
</p>
1947 time_t httpGetDateTime (
<br>
1948 const char *s
<br>
1950 <h4 class=
"parameters">Parameters
</h4>
1953 <dd class=
"description">Date/time string
</dd>
1955 <h4 class=
"returnvalue">Return Value
</h4>
1956 <p class=
"description">UNIX time
</p>
1957 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetFd">httpGetFd
</a></h3>
1958 <p class=
"description">Get the file descriptor associated with a connection.
</p>
1961 <a href=
"#http_t">http_t
</a> *http
<br>
1963 <h4 class=
"parameters">Parameters
</h4>
1966 <dd class=
"description">Connection to server
</dd>
1968 <h4 class=
"returnvalue">Return Value
</h4>
1969 <p class=
"description">File descriptor or -
1 if none
</p>
1970 <h3 class=
"function"><a name=
"httpGetField">httpGetField
</a></h3>
1971 <p class=
"description">Get a field value from a request/response.
</p>
1973 const char *httpGetField (
<br>
1974 <a href=
"#http_t">http_t
</a> *http,
<br>
1975 <a href=
"#http_field_t">http_field_t
</a> field
<br>
1977 <h4 class=
"parameters">Parameters
</h4>
1980 <dd class=
"description">Connection to server
</dd>
1982 <dd class=
"description">Field to get
</dd>
1984 <h4 class=
"returnvalue">Return Value
</h4>
1985 <p class=
"description">Field value
</p>
1986 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetHostByName">httpGetHostByName
</a></h3>
1987 <p class=
"description">Lookup a hostname or IPv4 address, and return
1988 address records for the specified name.
</p>
1990 struct hostent *httpGetHostByName (
<br>
1991 const char *name
<br>
1993 <h4 class=
"parameters">Parameters
</h4>
1996 <dd class=
"description">Hostname or IP address
</dd>
1998 <h4 class=
"returnvalue">Return Value
</h4>
1999 <p class=
"description">Host entry
</p>
2000 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetHostname">httpGetHostname
</a></h3>
2001 <p class=
"description">Get the FQDN for the connection or local system.
</p>
2003 const char *httpGetHostname (
<br>
2004 <a href=
"#http_t">http_t
</a> *http,
<br>
2005 char *s,
<br>
2006 int slen
<br>
2008 <h4 class=
"parameters">Parameters
</h4>
2011 <dd class=
"description">HTTP connection or NULL
</dd>
2013 <dd class=
"description">String buffer for name
</dd>
2015 <dd class=
"description">Size of buffer
</dd>
2017 <h4 class=
"returnvalue">Return Value
</h4>
2018 <p class=
"description">FQDN for connection or system
</p>
2019 <h4 class=
"discussion">Discussion
</h4>
2020 <p class=
"discussion">When
"http
" points to a connected socket, return the hostname or
2021 address that was used in the call to httpConnect() or httpConnectEncrypt().
2022 Otherwise, return the FQDN for the local system using both gethostname()
2023 and gethostbyname() to get the local hostname with domain.
2026 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetLength">httpGetLength
</a></h3>
2027 <p class=
"description">Get the amount of data remaining from the
2028 content-length or transfer-encoding fields.
</p>
2030 int httpGetLength (
<br>
2031 <a href=
"#http_t">http_t
</a> *http
<br>
2033 <h4 class=
"parameters">Parameters
</h4>
2036 <dd class=
"description">Connection to server
</dd>
2038 <h4 class=
"returnvalue">Return Value
</h4>
2039 <p class=
"description">Content length
</p>
2040 <h4 class=
"discussion">Discussion
</h4>
2041 <p class=
"discussion">This function is deprecated and will not return lengths larger than
2042 2^
31 -
1; use httpGetLength2() instead.
2045 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetLength2">httpGetLength2
</a></h3>
2046 <p class=
"description">Get the amount of data remaining from the
2047 content-length or transfer-encoding fields.
</p>
2049 off_t httpGetLength2 (
<br>
2050 <a href=
"#http_t">http_t
</a> *http
<br>
2052 <h4 class=
"parameters">Parameters
</h4>
2055 <dd class=
"description">Connection to server
</dd>
2057 <h4 class=
"returnvalue">Return Value
</h4>
2058 <p class=
"description">Content length
</p>
2059 <h4 class=
"discussion">Discussion
</h4>
2060 <p class=
"discussion">This function returns the complete content length, even for
2061 content larger than
2^
31 -
1.
2064 <h3 class=
"function"><a name=
"httpGetState">httpGetState
</a></h3>
2065 <p class=
"description">Get the current state of the HTTP request.
</p>
2067 <a href=
"#http_state_t">http_state_t
</a> httpGetState (
<br>
2068 <a href=
"#http_t">http_t
</a> *http
<br>
2070 <h4 class=
"parameters">Parameters
</h4>
2073 <dd class=
"description">Connection to server
</dd>
2075 <h4 class=
"returnvalue">Return Value
</h4>
2076 <p class=
"description">HTTP state
</p>
2077 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetStatus">httpGetStatus
</a></h3>
2078 <p class=
"description">Get the status of the last HTTP request.
</p>
2080 <a href=
"#http_status_t">http_status_t
</a> httpGetStatus (
<br>
2081 <a href=
"#http_t">http_t
</a> *http
<br>
2083 <h4 class=
"parameters">Parameters
</h4>
2086 <dd class=
"description">Connection to server
</dd>
2088 <h4 class=
"returnvalue">Return Value
</h4>
2089 <p class=
"description">HTTP status
</p>
2090 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetSubField">httpGetSubField
</a></h3>
2091 <p class=
"description">Get a sub-field value.
</p>
2093 char *httpGetSubField (
<br>
2094 <a href=
"#http_t">http_t
</a> *http,
<br>
2095 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
2096 const char *name,
<br>
2097 char *value
<br>
2099 <h4 class=
"parameters">Parameters
</h4>
2102 <dd class=
"description">Connection to server
</dd>
2104 <dd class=
"description">Field index
</dd>
2106 <dd class=
"description">Name of sub-field
</dd>
2108 <dd class=
"description">Value string
</dd>
2110 <h4 class=
"returnvalue">Return Value
</h4>
2111 <p class=
"description">Value or NULL
</p>
2112 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetSubField2">httpGetSubField2
</a></h3>
2113 <p class=
"description">Get a sub-field value.
</p>
2115 char *httpGetSubField2 (
<br>
2116 <a href=
"#http_t">http_t
</a> *http,
<br>
2117 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
2118 const char *name,
<br>
2119 char *value,
<br>
2120 int valuelen
<br>
2122 <h4 class=
"parameters">Parameters
</h4>
2125 <dd class=
"description">Connection to server
</dd>
2127 <dd class=
"description">Field index
</dd>
2129 <dd class=
"description">Name of sub-field
</dd>
2131 <dd class=
"description">Value string
</dd>
2133 <dd class=
"description">Size of value buffer
</dd>
2135 <h4 class=
"returnvalue">Return Value
</h4>
2136 <p class=
"description">Value or NULL
</p>
2137 <h3 class=
"function"><a name=
"httpGetVersion">httpGetVersion
</a></h3>
2138 <p class=
"description">Get the HTTP version at the other end.
</p>
2140 <a href=
"#http_version_t">http_version_t
</a> httpGetVersion (
<br>
2141 <a href=
"#http_t">http_t
</a> *http
<br>
2143 <h4 class=
"parameters">Parameters
</h4>
2146 <dd class=
"description">Connection to server
</dd>
2148 <h4 class=
"returnvalue">Return Value
</h4>
2149 <p class=
"description">Version number
</p>
2150 <h3 class=
"function"><a name=
"httpGets">httpGets
</a></h3>
2151 <p class=
"description">Get a line of text from a HTTP connection.
</p>
2153 char *httpGets (
<br>
2154 char *line,
<br>
2155 int length,
<br>
2156 <a href=
"#http_t">http_t
</a> *http
<br>
2158 <h4 class=
"parameters">Parameters
</h4>
2161 <dd class=
"description">Line to read into
</dd>
2163 <dd class=
"description">Max length of buffer
</dd>
2165 <dd class=
"description">Connection to server
</dd>
2167 <h4 class=
"returnvalue">Return Value
</h4>
2168 <p class=
"description">Line or NULL
</p>
2169 <h3 class=
"function"><a name=
"httpHead">httpHead
</a></h3>
2170 <p class=
"description">Send a HEAD request to the server.
</p>
2173 <a href=
"#http_t">http_t
</a> *http,
<br>
2174 const char *uri
<br>
2176 <h4 class=
"parameters">Parameters
</h4>
2179 <dd class=
"description">Connection to server
</dd>
2181 <dd class=
"description">URI for head
</dd>
2183 <h4 class=
"returnvalue">Return Value
</h4>
2184 <p class=
"description">Status of call (
0 = success)
</p>
2185 <h3 class=
"function"><a name=
"httpInitialize">httpInitialize
</a></h3>
2186 <p class=
"description">Initialize the HTTP interface library and set the
2187 default HTTP proxy (if any).
</p>
2189 void httpInitialize (void);
</p>
2190 <h3 class=
"function"><a name=
"httpMD5">httpMD5
</a></h3>
2191 <p class=
"description">Compute the MD5 sum of the username:group:password.
</p>
2194 const char *username,
<br>
2195 const char *realm,
<br>
2196 const char *passwd,
<br>
2197 char md5[
33]
<br>
2199 <h4 class=
"parameters">Parameters
</h4>
2202 <dd class=
"description">User name
</dd>
2204 <dd class=
"description">Realm name
</dd>
2206 <dd class=
"description">Password string
</dd>
2208 <dd class=
"description">MD5 string
</dd>
2210 <h4 class=
"returnvalue">Return Value
</h4>
2211 <p class=
"description">MD5 sum
</p>
2212 <h3 class=
"function"><a name=
"httpMD5Final">httpMD5Final
</a></h3>
2213 <p class=
"description">Combine the MD5 sum of the username, group, and password
2214 with the server-supplied nonce value, method, and
2217 char *httpMD5Final (
<br>
2218 const char *nonce,
<br>
2219 const char *method,
<br>
2220 const char *resource,
<br>
2221 char md5[
33]
<br>
2223 <h4 class=
"parameters">Parameters
</h4>
2226 <dd class=
"description">Server nonce value
</dd>
2228 <dd class=
"description">METHOD (GET, POST, etc.)
</dd>
2230 <dd class=
"description">Resource path
</dd>
2232 <dd class=
"description">MD5 sum
</dd>
2234 <h4 class=
"returnvalue">Return Value
</h4>
2235 <p class=
"description">New sum
</p>
2236 <h3 class=
"function"><a name=
"httpMD5String">httpMD5String
</a></h3>
2237 <p class=
"description">Convert an MD5 sum to a character string.
</p>
2239 char *httpMD5String (
<br>
2240 const unsigned char *sum,
<br>
2241 char md5[
33]
<br>
2243 <h4 class=
"parameters">Parameters
</h4>
2246 <dd class=
"description">MD5 sum data
</dd>
2248 <dd class=
"description">MD5 sum in hex
</dd>
2250 <h4 class=
"returnvalue">Return Value
</h4>
2251 <p class=
"description">MD5 sum in hex
</p>
2252 <h3 class=
"function"><a name=
"httpOptions">httpOptions
</a></h3>
2253 <p class=
"description">Send an OPTIONS request to the server.
</p>
2255 int httpOptions (
<br>
2256 <a href=
"#http_t">http_t
</a> *http,
<br>
2257 const char *uri
<br>
2259 <h4 class=
"parameters">Parameters
</h4>
2262 <dd class=
"description">Connection to server
</dd>
2264 <dd class=
"description">URI for options
</dd>
2266 <h4 class=
"returnvalue">Return Value
</h4>
2267 <p class=
"description">Status of call (
0 = success)
</p>
2268 <h3 class=
"function"><a name=
"httpPost">httpPost
</a></h3>
2269 <p class=
"description">Send a POST request to the server.
</p>
2272 <a href=
"#http_t">http_t
</a> *http,
<br>
2273 const char *uri
<br>
2275 <h4 class=
"parameters">Parameters
</h4>
2278 <dd class=
"description">Connection to server
</dd>
2280 <dd class=
"description">URI for post
</dd>
2282 <h4 class=
"returnvalue">Return Value
</h4>
2283 <p class=
"description">Status of call (
0 = success)
</p>
2284 <h3 class=
"function"><a name=
"httpPut">httpPut
</a></h3>
2285 <p class=
"description">Send a PUT request to the server.
</p>
2288 <a href=
"#http_t">http_t
</a> *http,
<br>
2289 const char *uri
<br>
2291 <h4 class=
"parameters">Parameters
</h4>
2294 <dd class=
"description">Connection to server
</dd>
2296 <dd class=
"description">URI to put
</dd>
2298 <h4 class=
"returnvalue">Return Value
</h4>
2299 <p class=
"description">Status of call (
0 = success)
</p>
2300 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpRead">httpRead
</a></h3>
2301 <p class=
"description">Read data from a HTTP connection.
</p>
2304 <a href=
"#http_t">http_t
</a> *http,
<br>
2305 char *buffer,
<br>
2306 int length
<br>
2308 <h4 class=
"parameters">Parameters
</h4>
2311 <dd class=
"description">Connection to server
</dd>
2313 <dd class=
"description">Buffer for data
</dd>
2315 <dd class=
"description">Maximum number of bytes
</dd>
2317 <h4 class=
"returnvalue">Return Value
</h4>
2318 <p class=
"description">Number of bytes read
</p>
2319 <h4 class=
"discussion">Discussion
</h4>
2320 <p class=
"discussion">This function is deprecated. Use the httpRead2() function which can
2321 read more than
2GB of data.
2324 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpRead2">httpRead2
</a></h3>
2325 <p class=
"description">Read data from a HTTP connection.
</p>
2327 ssize_t httpRead2 (
<br>
2328 <a href=
"#http_t">http_t
</a> *http,
<br>
2329 char *buffer,
<br>
2330 size_t length
<br>
2332 <h4 class=
"parameters">Parameters
</h4>
2335 <dd class=
"description">Connection to server
</dd>
2337 <dd class=
"description">Buffer for data
</dd>
2339 <dd class=
"description">Maximum number of bytes
</dd>
2341 <h4 class=
"returnvalue">Return Value
</h4>
2342 <p class=
"description">Number of bytes read
</p>
2343 <h3 class=
"function"><a name=
"httpReconnect">httpReconnect
</a></h3>
2344 <p class=
"description">Reconnect to a HTTP server.
</p>
2346 int httpReconnect (
<br>
2347 <a href=
"#http_t">http_t
</a> *http
<br>
2349 <h4 class=
"parameters">Parameters
</h4>
2352 <dd class=
"description">Connection to server
</dd>
2354 <h4 class=
"returnvalue">Return Value
</h4>
2355 <p class=
"description">0 on success, non-zero on failure
</p>
2356 <h3 class=
"function"><a name=
"httpReconnect2">httpReconnect2
</a></h3>
2357 <p class=
"description">Reconnect to a HTTP server with timeout and optional
2360 int httpReconnect2 (
<br>
2361 <a href=
"#http_t">http_t
</a> *http,
<br>
2362 int msec,
<br>
2363 int *cancel
<br>
2365 <h4 class=
"parameters">Parameters
</h4>
2368 <dd class=
"description">Connection to server
</dd>
2370 <dd class=
"description">Timeout in milliseconds
</dd>
2372 <dd class=
"description">Pointer to
"cancel
" variable
</dd>
2374 <h4 class=
"returnvalue">Return Value
</h4>
2375 <p class=
"description">0 on success, non-zero on failure
</p>
2376 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpSeparate">httpSeparate
</a></h3>
2377 <p class=
"description">Separate a Universal Resource Identifier into its
2380 void httpSeparate (
<br>
2381 const char *uri,
<br>
2382 char *scheme,
<br>
2383 char *username,
<br>
2384 char *host,
<br>
2385 int *port,
<br>
2386 char *resource
<br>
2388 <h4 class=
"parameters">Parameters
</h4>
2391 <dd class=
"description">Universal Resource Identifier
</dd>
2393 <dd class=
"description">Scheme [
32] (http, https, etc.)
</dd>
2395 <dd class=
"description">Username [
1024]
</dd>
2397 <dd class=
"description">Hostname [
1024]
</dd>
2399 <dd class=
"description">Port number to use
</dd>
2401 <dd class=
"description">Resource/filename [
1024]
</dd>
2403 <h4 class=
"discussion">Discussion
</h4>
2404 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
2407 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/Mac OS X
10.4 </span><a name=
"httpSeparate2">httpSeparate2
</a></h3>
2408 <p class=
"description">Separate a Universal Resource Identifier into its
2411 void httpSeparate2 (
<br>
2412 const char *uri,
<br>
2413 char *scheme,
<br>
2414 int schemelen,
<br>
2415 char *username,
<br>
2416 int usernamelen,
<br>
2417 char *host,
<br>
2418 int hostlen,
<br>
2419 int *port,
<br>
2420 char *resource,
<br>
2421 int resourcelen
<br>
2423 <h4 class=
"parameters">Parameters
</h4>
2426 <dd class=
"description">Universal Resource Identifier
</dd>
2428 <dd class=
"description">Scheme (http, https, etc.)
</dd>
2430 <dd class=
"description">Size of scheme buffer
</dd>
2432 <dd class=
"description">Username
</dd>
2433 <dt>usernamelen
</dt>
2434 <dd class=
"description">Size of username buffer
</dd>
2436 <dd class=
"description">Hostname
</dd>
2438 <dd class=
"description">Size of hostname buffer
</dd>
2440 <dd class=
"description">Port number to use
</dd>
2442 <dd class=
"description">Resource/filename
</dd>
2443 <dt>resourcelen
</dt>
2444 <dd class=
"description">Size of resource buffer
</dd>
2446 <h4 class=
"discussion">Discussion
</h4>
2447 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
2451 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpSeparateURI">httpSeparateURI
</a></h3>
2452 <p class=
"description">Separate a Universal Resource Identifier into its
2455 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpSeparateURI (
<br>
2456 <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> decoding,
<br>
2457 const char *uri,
<br>
2458 char *scheme,
<br>
2459 int schemelen,
<br>
2460 char *username,
<br>
2461 int usernamelen,
<br>
2462 char *host,
<br>
2463 int hostlen,
<br>
2464 int *port,
<br>
2465 char *resource,
<br>
2466 int resourcelen
<br>
2468 <h4 class=
"parameters">Parameters
</h4>
2471 <dd class=
"description">Decoding flags
</dd>
2473 <dd class=
"description">Universal Resource Identifier
</dd>
2475 <dd class=
"description">Scheme (http, https, etc.)
</dd>
2477 <dd class=
"description">Size of scheme buffer
</dd>
2479 <dd class=
"description">Username
</dd>
2480 <dt>usernamelen
</dt>
2481 <dd class=
"description">Size of username buffer
</dd>
2483 <dd class=
"description">Hostname
</dd>
2485 <dd class=
"description">Size of hostname buffer
</dd>
2487 <dd class=
"description">Port number to use
</dd>
2489 <dd class=
"description">Resource/filename
</dd>
2490 <dt>resourcelen
</dt>
2491 <dd class=
"description">Size of resource buffer
</dd>
2493 <h4 class=
"returnvalue">Return Value
</h4>
2494 <p class=
"description">Result of separation
</p>
2495 <h3 class=
"function"><span class=
"info"> CUPS
1.3/Mac OS X
10.5 </span><a name=
"httpSetAuthString">httpSetAuthString
</a></h3>
2496 <p class=
"description">Set the current authorization string.
</p>
2498 void httpSetAuthString (
<br>
2499 <a href=
"#http_t">http_t
</a> *http,
<br>
2500 const char *scheme,
<br>
2501 const char *data
<br>
2503 <h4 class=
"parameters">Parameters
</h4>
2506 <dd class=
"description">Connection to server
</dd>
2508 <dd class=
"description">Auth scheme (NULL to clear it)
</dd>
2510 <dd class=
"description">Auth data (NULL for none)
</dd>
2512 <h4 class=
"discussion">Discussion
</h4>
2513 <p class=
"discussion">This function just stores a copy of the current authorization string in
2514 the HTTP connection object. You must still call httpSetField() to set
2515 HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
2516 httpHead(), httpOptions(), httpPost, or httpPut().
2519 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"httpSetCookie">httpSetCookie
</a></h3>
2520 <p class=
"description">Set the cookie value(s).
</p>
2522 void httpSetCookie (
<br>
2523 <a href=
"#http_t">http_t
</a> *http,
<br>
2524 const char *cookie
<br>
2526 <h4 class=
"parameters">Parameters
</h4>
2529 <dd class=
"description">Connection
</dd>
2531 <dd class=
"description">Cookie string
</dd>
2533 <h3 class=
"function"><span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span><a name=
"httpSetCredentials">httpSetCredentials
</a></h3>
2534 <p class=
"description">Set the credentials associated with an encrypted
2537 int httpSetCredentials (
<br>
2538 <a href=
"#http_t">http_t
</a> *http,
<br>
2539 cups_array_t *credentials
<br>
2541 <h4 class=
"parameters">Parameters
</h4>
2544 <dd class=
"description">Connection to server
</dd>
2545 <dt>credentials
</dt>
2546 <dd class=
"description">Array of credentials
</dd>
2548 <h4 class=
"returnvalue">Return Value
</h4>
2549 <p class=
"description">Status of call (
0 = success)
</p>
2550 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpSetExpect">httpSetExpect
</a></h3>
2551 <p class=
"description">Set the Expect: header in a request.
</p>
2553 void httpSetExpect (
<br>
2554 <a href=
"#http_t">http_t
</a> *http,
<br>
2555 <a href=
"#http_status_t">http_status_t
</a> expect
<br>
2557 <h4 class=
"parameters">Parameters
</h4>
2560 <dd class=
"description">Connection to server
</dd>
2562 <dd class=
"description">HTTP status to expect (HTTP_CONTINUE)
</dd>
2564 <h4 class=
"discussion">Discussion
</h4>
2565 <p class=
"discussion">Currently only HTTP_CONTINUE is supported for the
"expect
" argument.
2568 <h3 class=
"function"><a name=
"httpSetField">httpSetField
</a></h3>
2569 <p class=
"description">Set the value of an HTTP header.
</p>
2571 void httpSetField (
<br>
2572 <a href=
"#http_t">http_t
</a> *http,
<br>
2573 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
2574 const char *value
<br>
2576 <h4 class=
"parameters">Parameters
</h4>
2579 <dd class=
"description">Connection to server
</dd>
2581 <dd class=
"description">Field index
</dd>
2583 <dd class=
"description">Value
</dd>
2585 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpSetLength">httpSetLength
</a></h3>
2586 <p class=
"description">Set the content-length and content-encoding.
</p>
2588 void httpSetLength (
<br>
2589 <a href=
"#http_t">http_t
</a> *http,
<br>
2590 size_t length
<br>
2592 <h4 class=
"parameters">Parameters
</h4>
2595 <dd class=
"description">Connection to server
</dd>
2597 <dd class=
"description">Length (
0 for chunked)
</dd>
2599 <h3 class=
"function"><span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span><a name=
"httpSetTimeout">httpSetTimeout
</a></h3>
2600 <p class=
"description">Set read/write timeouts and an optional callback.
</p>
2602 void httpSetTimeout (
<br>
2603 <a href=
"#http_t">http_t
</a> *http,
<br>
2604 double timeout,
<br>
2605 <a href=
"#http_timeout_cb_t">http_timeout_cb_t
</a> cb,
<br>
2606 void *user_data
<br>
2608 <h4 class=
"parameters">Parameters
</h4>
2611 <dd class=
"description">Connection to server
</dd>
2613 <dd class=
"description">Number of seconds for timeout,
2614 must be greater than
0</dd>
2616 <dd class=
"description">Callback function or NULL
</dd>
2618 <dd class=
"description">User data pointer
</dd>
2620 <h4 class=
"discussion">Discussion
</h4>
2621 <p class=
"discussion">The optional timeout callback receives both the HTTP connection and a user
2622 data pointer and must return
1 to continue or
0 to error (time) out.
2625 <h3 class=
"function"><a name=
"httpStatus">httpStatus
</a></h3>
2626 <p class=
"description">Return a short string describing a HTTP status code.
</p>
2628 const char *httpStatus (
<br>
2629 <a href=
"#http_status_t">http_status_t
</a> status
<br>
2631 <h4 class=
"parameters">Parameters
</h4>
2634 <dd class=
"description">HTTP status code
</dd>
2636 <h4 class=
"returnvalue">Return Value
</h4>
2637 <p class=
"description">Localized status string
</p>
2638 <h4 class=
"discussion">Discussion
</h4>
2639 <p class=
"discussion">The returned string is localized to the current POSIX locale and is based
2640 on the status strings defined in RFC
2616.
</p>
2641 <h3 class=
"function"><a name=
"httpTrace">httpTrace
</a></h3>
2642 <p class=
"description">Send an TRACE request to the server.
</p>
2645 <a href=
"#http_t">http_t
</a> *http,
<br>
2646 const char *uri
<br>
2648 <h4 class=
"parameters">Parameters
</h4>
2651 <dd class=
"description">Connection to server
</dd>
2653 <dd class=
"description">URI for trace
</dd>
2655 <h4 class=
"returnvalue">Return Value
</h4>
2656 <p class=
"description">Status of call (
0 = success)
</p>
2657 <h3 class=
"function"><a name=
"httpUpdate">httpUpdate
</a></h3>
2658 <p class=
"description">Update the current HTTP state for incoming data.
</p>
2660 <a href=
"#http_status_t">http_status_t
</a> httpUpdate (
<br>
2661 <a href=
"#http_t">http_t
</a> *http
<br>
2663 <h4 class=
"parameters">Parameters
</h4>
2666 <dd class=
"description">Connection to server
</dd>
2668 <h4 class=
"returnvalue">Return Value
</h4>
2669 <p class=
"description">HTTP status
</p>
2670 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"httpWait">httpWait
</a></h3>
2671 <p class=
"description">Wait for data available on a connection.
</p>
2674 <a href=
"#http_t">http_t
</a> *http,
<br>
2675 int msec
<br>
2677 <h4 class=
"parameters">Parameters
</h4>
2680 <dd class=
"description">Connection to server
</dd>
2682 <dd class=
"description">Milliseconds to wait
</dd>
2684 <h4 class=
"returnvalue">Return Value
</h4>
2685 <p class=
"description">1 if data is available,
0 otherwise
</p>
2686 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpWrite">httpWrite
</a></h3>
2687 <p class=
"description">Write data to a HTTP connection.
</p>
2690 <a href=
"#http_t">http_t
</a> *http,
<br>
2691 const char *buffer,
<br>
2692 int length
<br>
2694 <h4 class=
"parameters">Parameters
</h4>
2697 <dd class=
"description">Connection to server
</dd>
2699 <dd class=
"description">Buffer for data
</dd>
2701 <dd class=
"description">Number of bytes to write
</dd>
2703 <h4 class=
"returnvalue">Return Value
</h4>
2704 <p class=
"description">Number of bytes written
</p>
2705 <h4 class=
"discussion">Discussion
</h4>
2706 <p class=
"discussion">This function is deprecated. Use the httpWrite2() function which can
2707 write more than
2GB of data.
2710 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpWrite2">httpWrite2
</a></h3>
2711 <p class=
"description">Write data to a HTTP connection.
</p>
2713 ssize_t httpWrite2 (
<br>
2714 <a href=
"#http_t">http_t
</a> *http,
<br>
2715 const char *buffer,
<br>
2716 size_t length
<br>
2718 <h4 class=
"parameters">Parameters
</h4>
2721 <dd class=
"description">Connection to server
</dd>
2723 <dd class=
"description">Buffer for data
</dd>
2725 <dd class=
"description">Number of bytes to write
</dd>
2727 <h4 class=
"returnvalue">Return Value
</h4>
2728 <p class=
"description">Number of bytes written
</p>
2729 <h3 class=
"function"><a name=
"ippAddBoolean">ippAddBoolean
</a></h3>
2730 <p class=
"description">Add a boolean attribute to an IPP message.
</p>
2732 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBoolean (
<br>
2733 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2734 ipp_tag_t group,
<br>
2735 const char *name,
<br>
2736 char value
<br>
2738 <h4 class=
"parameters">Parameters
</h4>
2741 <dd class=
"description">IPP message
</dd>
2743 <dd class=
"description">IPP group
</dd>
2745 <dd class=
"description">Name of attribute
</dd>
2747 <dd class=
"description">Value of attribute
</dd>
2749 <h4 class=
"returnvalue">Return Value
</h4>
2750 <p class=
"description">New attribute
</p>
2751 <h4 class=
"discussion">Discussion
</h4>
2752 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2753 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2755 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2756 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2757 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2758 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2759 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
2760 <h3 class=
"function"><a name=
"ippAddBooleans">ippAddBooleans
</a></h3>
2761 <p class=
"description">Add an array of boolean values.
</p>
2763 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBooleans (
<br>
2764 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2765 ipp_tag_t group,
<br>
2766 const char *name,
<br>
2767 int num_values,
<br>
2768 const char *values
<br>
2770 <h4 class=
"parameters">Parameters
</h4>
2773 <dd class=
"description">IPP message
</dd>
2775 <dd class=
"description">IPP group
</dd>
2777 <dd class=
"description">Name of attribute
</dd>
2779 <dd class=
"description">Number of values
</dd>
2781 <dd class=
"description">Values
</dd>
2783 <h4 class=
"returnvalue">Return Value
</h4>
2784 <p class=
"description">New attribute
</p>
2785 <h4 class=
"discussion">Discussion
</h4>
2786 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2787 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2789 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2790 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2791 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2792 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2793 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
2794 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"ippAddCollection">ippAddCollection
</a></h3>
2795 <p class=
"description">Add a collection value.
</p>
2797 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollection (
<br>
2798 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2799 ipp_tag_t group,
<br>
2800 const char *name,
<br>
2801 <a href=
"#ipp_t">ipp_t
</a> *value
<br>
2803 <h4 class=
"parameters">Parameters
</h4>
2806 <dd class=
"description">IPP message
</dd>
2808 <dd class=
"description">IPP group
</dd>
2810 <dd class=
"description">Name of attribute
</dd>
2812 <dd class=
"description">Value
</dd>
2814 <h4 class=
"returnvalue">Return Value
</h4>
2815 <p class=
"description">New attribute
</p>
2816 <h4 class=
"discussion">Discussion
</h4>
2817 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2818 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2820 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2821 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2822 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2823 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2824 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
2827 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"ippAddCollections">ippAddCollections
</a></h3>
2828 <p class=
"description">Add an array of collection values.
</p>
2830 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollections (
<br>
2831 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2832 ipp_tag_t group,
<br>
2833 const char *name,
<br>
2834 int num_values,
<br>
2835 const
<a href=
"#ipp_t">ipp_t
</a> **values
<br>
2837 <h4 class=
"parameters">Parameters
</h4>
2840 <dd class=
"description">IPP message
</dd>
2842 <dd class=
"description">IPP group
</dd>
2844 <dd class=
"description">Name of attribute
</dd>
2846 <dd class=
"description">Number of values
</dd>
2848 <dd class=
"description">Values
</dd>
2850 <h4 class=
"returnvalue">Return Value
</h4>
2851 <p class=
"description">New attribute
</p>
2852 <h4 class=
"discussion">Discussion
</h4>
2853 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2854 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2856 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2857 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2858 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2859 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2860 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
2863 <h3 class=
"function"><a name=
"ippAddDate">ippAddDate
</a></h3>
2864 <p class=
"description">Add a date attribute to an IPP message.
</p>
2866 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddDate (
<br>
2867 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2868 ipp_tag_t group,
<br>
2869 const char *name,
<br>
2870 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *value
<br>
2872 <h4 class=
"parameters">Parameters
</h4>
2875 <dd class=
"description">IPP message
</dd>
2877 <dd class=
"description">IPP group
</dd>
2879 <dd class=
"description">Name of attribute
</dd>
2881 <dd class=
"description">Value
</dd>
2883 <h4 class=
"returnvalue">Return Value
</h4>
2884 <p class=
"description">New attribute
</p>
2885 <h4 class=
"discussion">Discussion
</h4>
2886 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2887 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2889 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2890 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2891 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2892 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2893 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
2894 <h3 class=
"function"><a name=
"ippAddInteger">ippAddInteger
</a></h3>
2895 <p class=
"description">Add a integer attribute to an IPP message.
</p>
2897 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddInteger (
<br>
2898 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2899 ipp_tag_t group,
<br>
2900 ipp_tag_t value_tag,
<br>
2901 const char *name,
<br>
2902 int value
<br>
2904 <h4 class=
"parameters">Parameters
</h4>
2907 <dd class=
"description">IPP message
</dd>
2909 <dd class=
"description">IPP group
</dd>
2911 <dd class=
"description">Type of attribute
</dd>
2913 <dd class=
"description">Name of attribute
</dd>
2915 <dd class=
"description">Value of attribute
</dd>
2917 <h4 class=
"returnvalue">Return Value
</h4>
2918 <p class=
"description">New attribute
</p>
2919 <h4 class=
"discussion">Discussion
</h4>
2920 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2921 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2923 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2924 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2925 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2926 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2927 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
2929 Supported values include enum (
<code>IPP_TAG_ENUM
</code>) and integer
2930 (
<code>IPP_TAG_INTEGER
</code>).
</p>
2931 <h3 class=
"function"><a name=
"ippAddIntegers">ippAddIntegers
</a></h3>
2932 <p class=
"description">Add an array of integer values.
</p>
2934 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddIntegers (
<br>
2935 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2936 ipp_tag_t group,
<br>
2937 ipp_tag_t value_tag,
<br>
2938 const char *name,
<br>
2939 int num_values,
<br>
2940 const int *values
<br>
2942 <h4 class=
"parameters">Parameters
</h4>
2945 <dd class=
"description">IPP message
</dd>
2947 <dd class=
"description">IPP group
</dd>
2949 <dd class=
"description">Type of attribute
</dd>
2951 <dd class=
"description">Name of attribute
</dd>
2953 <dd class=
"description">Number of values
</dd>
2955 <dd class=
"description">Values
</dd>
2957 <h4 class=
"returnvalue">Return Value
</h4>
2958 <p class=
"description">New attribute
</p>
2959 <h4 class=
"discussion">Discussion
</h4>
2960 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2961 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
2963 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
2964 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
2965 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
2966 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
2967 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
2969 Supported values include enum (
<code>IPP_TAG_ENUM
</code>) and integer
2970 (
<code>IPP_TAG_INTEGER
</code>).
</p>
2971 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippAddOctetString">ippAddOctetString
</a></h3>
2972 <p class=
"description">Add an octetString value to an IPP message.
</p>
2974 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddOctetString (
<br>
2975 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2976 ipp_tag_t group,
<br>
2977 const char *name,
<br>
2978 const void *data,
<br>
2979 int datalen
<br>
2981 <h4 class=
"parameters">Parameters
</h4>
2984 <dd class=
"description">IPP message
</dd>
2986 <dd class=
"description">IPP group
</dd>
2988 <dd class=
"description">Name of attribute
</dd>
2990 <dd class=
"description">octetString data
</dd>
2992 <dd class=
"description">Length of data in bytes
</dd>
2994 <h4 class=
"returnvalue">Return Value
</h4>
2995 <p class=
"description">New attribute
</p>
2996 <h4 class=
"discussion">Discussion
</h4>
2997 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
2998 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3000 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3001 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3002 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3003 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3004 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
3007 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippAddOutOfBand">ippAddOutOfBand
</a></h3>
3008 <p class=
"description">Add an out-of-band value to an IPP message.
</p>
3010 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddOutOfBand (
<br>
3011 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3012 ipp_tag_t group,
<br>
3013 ipp_tag_t value_tag,
<br>
3014 const char *name
<br>
3016 <h4 class=
"parameters">Parameters
</h4>
3019 <dd class=
"description">IPP message
</dd>
3021 <dd class=
"description">IPP group
</dd>
3023 <dd class=
"description">Type of attribute
</dd>
3025 <dd class=
"description">Name of attribute
</dd>
3027 <h4 class=
"returnvalue">Return Value
</h4>
3028 <p class=
"description">New attribute
</p>
3029 <h4 class=
"discussion">Discussion
</h4>
3030 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3031 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3033 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3034 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3035 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3036 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3037 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3039 Supported out-of-band values include unsupported-value
3040 (
<code>IPP_TAG_UNSUPPORTED_VALUE
</code>), default (
<code>IPP_TAG_DEFAULT
</code>), unknown
3041 (
<code>IPP_TAG_UNKNOWN
</code>), no-value (
<code>IPP_TAG_NOVALUE
</code>), not-settable
3042 (
<code>IPP_TAG_NOTSETTABLE
</code>), delete-attribute (
<code>IPP_TAG_DELETEATTR
</code>), and
3043 admin-define (
<code>IPP_TAG_ADMINDEFINE
</code>).
3046 <h3 class=
"function"><a name=
"ippAddRange">ippAddRange
</a></h3>
3047 <p class=
"description">Add a range of values to an IPP message.
</p>
3049 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRange (
<br>
3050 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3051 ipp_tag_t group,
<br>
3052 const char *name,
<br>
3053 int lower,
<br>
3054 int upper
<br>
3056 <h4 class=
"parameters">Parameters
</h4>
3059 <dd class=
"description">IPP message
</dd>
3061 <dd class=
"description">IPP group
</dd>
3063 <dd class=
"description">Name of attribute
</dd>
3065 <dd class=
"description">Lower value
</dd>
3067 <dd class=
"description">Upper value
</dd>
3069 <h4 class=
"returnvalue">Return Value
</h4>
3070 <p class=
"description">New attribute
</p>
3071 <h4 class=
"discussion">Discussion
</h4>
3072 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3073 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3075 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3076 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3077 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3078 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3079 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3081 The
<code>lower
</code> parameter must be less than or equal to the
<code>upper
</code> parameter.
</p>
3082 <h3 class=
"function"><a name=
"ippAddRanges">ippAddRanges
</a></h3>
3083 <p class=
"description">Add ranges of values to an IPP message.
</p>
3085 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRanges (
<br>
3086 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3087 ipp_tag_t group,
<br>
3088 const char *name,
<br>
3089 int num_values,
<br>
3090 const int *lower,
<br>
3091 const int *upper
<br>
3093 <h4 class=
"parameters">Parameters
</h4>
3096 <dd class=
"description">IPP message
</dd>
3098 <dd class=
"description">IPP group
</dd>
3100 <dd class=
"description">Name of attribute
</dd>
3102 <dd class=
"description">Number of values
</dd>
3104 <dd class=
"description">Lower values
</dd>
3106 <dd class=
"description">Upper values
</dd>
3108 <h4 class=
"returnvalue">Return Value
</h4>
3109 <p class=
"description">New attribute
</p>
3110 <h4 class=
"discussion">Discussion
</h4>
3111 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3112 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3114 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3115 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3116 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3117 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3118 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3119 <h3 class=
"function"><a name=
"ippAddResolution">ippAddResolution
</a></h3>
3120 <p class=
"description">Add a resolution value to an IPP message.
</p>
3122 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolution (
<br>
3123 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3124 ipp_tag_t group,
<br>
3125 const char *name,
<br>
3126 <a href=
"#ipp_res_t">ipp_res_t
</a> units,
<br>
3127 int xres,
<br>
3128 int yres
<br>
3130 <h4 class=
"parameters">Parameters
</h4>
3133 <dd class=
"description">IPP message
</dd>
3135 <dd class=
"description">IPP group
</dd>
3137 <dd class=
"description">Name of attribute
</dd>
3139 <dd class=
"description">Units for resolution
</dd>
3141 <dd class=
"description">X resolution
</dd>
3143 <dd class=
"description">Y resolution
</dd>
3145 <h4 class=
"returnvalue">Return Value
</h4>
3146 <p class=
"description">New attribute
</p>
3147 <h4 class=
"discussion">Discussion
</h4>
3148 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3149 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3151 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3152 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3153 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3154 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3155 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3156 <h3 class=
"function"><a name=
"ippAddResolutions">ippAddResolutions
</a></h3>
3157 <p class=
"description">Add resolution values to an IPP message.
</p>
3159 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolutions (
<br>
3160 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3161 ipp_tag_t group,
<br>
3162 const char *name,
<br>
3163 int num_values,
<br>
3164 <a href=
"#ipp_res_t">ipp_res_t
</a> units,
<br>
3165 const int *xres,
<br>
3166 const int *yres
<br>
3168 <h4 class=
"parameters">Parameters
</h4>
3171 <dd class=
"description">IPP message
</dd>
3173 <dd class=
"description">IPP group
</dd>
3175 <dd class=
"description">Name of attribute
</dd>
3177 <dd class=
"description">Number of values
</dd>
3179 <dd class=
"description">Units for resolution
</dd>
3181 <dd class=
"description">X resolutions
</dd>
3183 <dd class=
"description">Y resolutions
</dd>
3185 <h4 class=
"returnvalue">Return Value
</h4>
3186 <p class=
"description">New attribute
</p>
3187 <h4 class=
"discussion">Discussion
</h4>
3188 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3189 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3191 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3192 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3193 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3194 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3195 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
</p>
3196 <h3 class=
"function"><a name=
"ippAddSeparator">ippAddSeparator
</a></h3>
3197 <p class=
"description">Add a group separator to an IPP message.
</p>
3199 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddSeparator (
<br>
3200 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3202 <h4 class=
"parameters">Parameters
</h4>
3205 <dd class=
"description">IPP message
</dd>
3207 <h4 class=
"returnvalue">Return Value
</h4>
3208 <p class=
"description">New attribute
</p>
3209 <h4 class=
"discussion">Discussion
</h4>
3210 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3211 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
</p>
3212 <h3 class=
"function"><a name=
"ippAddString">ippAddString
</a></h3>
3213 <p class=
"description">Add a language-encoded string to an IPP message.
</p>
3215 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddString (
<br>
3216 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3217 ipp_tag_t group,
<br>
3218 ipp_tag_t value_tag,
<br>
3219 const char *name,
<br>
3220 const char *language,
<br>
3221 const char *value
<br>
3223 <h4 class=
"parameters">Parameters
</h4>
3226 <dd class=
"description">IPP message
</dd>
3228 <dd class=
"description">IPP group
</dd>
3230 <dd class=
"description">Type of attribute
</dd>
3232 <dd class=
"description">Name of attribute
</dd>
3234 <dd class=
"description">Language code
</dd>
3236 <dd class=
"description">Value
</dd>
3238 <h4 class=
"returnvalue">Return Value
</h4>
3239 <p class=
"description">New attribute
</p>
3240 <h4 class=
"discussion">Discussion
</h4>
3241 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3242 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3244 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3245 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3246 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3247 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3248 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3250 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
3251 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
3252 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
3253 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
3254 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
3255 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
3257 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage and
3258 textWithLanguage string values and must be
<code>NULL
</code> for all other string values.
</p>
3259 <h3 class=
"function"><a name=
"ippAddStrings">ippAddStrings
</a></h3>
3260 <p class=
"description">Add language-encoded strings to an IPP message.
</p>
3262 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddStrings (
<br>
3263 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3264 ipp_tag_t group,
<br>
3265 ipp_tag_t value_tag,
<br>
3266 const char *name,
<br>
3267 int num_values,
<br>
3268 const char *language,
<br>
3269 const char *const *values
<br>
3271 <h4 class=
"parameters">Parameters
</h4>
3274 <dd class=
"description">IPP message
</dd>
3276 <dd class=
"description">IPP group
</dd>
3278 <dd class=
"description">Type of attribute
</dd>
3280 <dd class=
"description">Name of attribute
</dd>
3282 <dd class=
"description">Number of values
</dd>
3284 <dd class=
"description">Language code (
<code>NULL
</code> for default)
</dd>
3286 <dd class=
"description">Values
</dd>
3288 <h4 class=
"returnvalue">Return Value
</h4>
3289 <p class=
"description">New attribute
</p>
3290 <h4 class=
"discussion">Discussion
</h4>
3291 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
3292 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
3294 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
3295 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
3296 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
3297 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
3298 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
<br>
3300 Supported string values include charset (
<code>IPP_TAG_CHARSET
</code>), keyword
3301 (
<code>IPP_TAG_KEYWORD
</code>), language (
<code>IPP_TAG_LANGUAGE
</code>), mimeMediaType
3302 (
<code>IPP_TAG_MIMETYPE
</code>), name (
<code>IPP_TAG_NAME
</code>), nameWithLanguage
3303 (
<code>IPP_TAG_NAMELANG), text (
</code>code IPP_TAG_TEXT@), textWithLanguage
3304 (
<code>IPP_TAG_TEXTLANG
</code>), uri (
<code>IPP_TAG_URI
</code>), and uriScheme
3305 (
<code>IPP_TAG_URISCHEME
</code>).
<br>
3307 The
<code>language
</code> parameter must be non-
<code>NULL
</code> for nameWithLanguage and
3308 textWithLanguage string values and must be
<code>NULL
</code> for all other string values.
</p>
3309 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippAttributeString">ippAttributeString
</a></h3>
3310 <p class=
"description">Convert the attribute's value to a string.
</p>
3312 size_t ippAttributeString (
<br>
3313 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3314 char *buffer,
<br>
3315 size_t bufsize
<br>
3317 <h4 class=
"parameters">Parameters
</h4>
3320 <dd class=
"description">Attribute
</dd>
3322 <dd class=
"description">String buffer or NULL
</dd>
3324 <dd class=
"description">Size of string buffer
</dd>
3326 <h4 class=
"returnvalue">Return Value
</h4>
3327 <p class=
"description">Number of bytes less nul
</p>
3328 <h4 class=
"discussion">Discussion
</h4>
3329 <p class=
"discussion">Returns the number of bytes that would be written, not including the
3330 trailing nul. The buffer pointer can be NULL to get the required length,
3331 just like (v)snprintf.
3334 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippCopyAttribute">ippCopyAttribute
</a></h3>
3335 <p class=
"description">Copy an attribute.
</p>
3337 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippCopyAttribute (
<br>
3338 <a href=
"#ipp_t">ipp_t
</a> *dst,
<br>
3339 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *srcattr,
<br>
3340 int quickcopy
<br>
3342 <h4 class=
"parameters">Parameters
</h4>
3345 <dd class=
"description">Destination IPP message
</dd>
3347 <dd class=
"description">Attribute to copy
</dd>
3349 <dd class=
"description">1 for a referenced copy,
0 for normal
</dd>
3351 <h4 class=
"returnvalue">Return Value
</h4>
3352 <p class=
"description">New attribute
</p>
3353 <h4 class=
"discussion">Discussion
</h4>
3354 <p class=
"discussion">The specified attribute,
<code>attr
</code>, is copied to the destination IPP message.
3355 When
<code>quickcopy
</code> is non-zero, a
"shallow
" reference copy of the attribute is
3356 created - this should only be done as long as the original source IPP message will
3357 not be freed for the life of the destination.
3360 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippCopyAttributes">ippCopyAttributes
</a></h3>
3361 <p class=
"description">Copy attributes from one IPP message to another.
</p>
3363 int ippCopyAttributes (
<br>
3364 <a href=
"#ipp_t">ipp_t
</a> *dst,
<br>
3365 <a href=
"#ipp_t">ipp_t
</a> *src,
<br>
3366 int quickcopy,
<br>
3367 <a href=
"#ipp_copycb_t">ipp_copycb_t
</a> cb,
<br>
3368 void *context
<br>
3370 <h4 class=
"parameters">Parameters
</h4>
3373 <dd class=
"description">Destination IPP message
</dd>
3375 <dd class=
"description">Source IPP message
</dd>
3377 <dd class=
"description">1 for a referenced copy,
0 for normal
</dd>
3379 <dd class=
"description">Copy callback or
<code>NULL
</code> for none
</dd>
3381 <dd class=
"description">Context pointer
</dd>
3383 <h4 class=
"returnvalue">Return Value
</h4>
3384 <p class=
"description">1 on success,
0 on error
</p>
3385 <h4 class=
"discussion">Discussion
</h4>
3386 <p class=
"discussion">Zero or more attributes are copied from the source IPP message, @code@ src, to the
3387 destination IPP message,
<code>dst
</code>. When
<code>quickcopy
</code> is non-zero, a
"shallow
"
3388 reference copy of the attribute is created - this should only be done as long as the
3389 original source IPP message will not be freed for the life of the destination.
<br>
3391 The
<code>cb
</code> and
<code>context
</code> parameters provide a generic way to
"filter
" the
3392 attributes that are copied - the function must return
1 to copy the attribute or
3393 0 to skip it. The function may also choose to do a partial copy of the source attribute
3397 <h3 class=
"function"><a name=
"ippDateToTime">ippDateToTime
</a></h3>
3398 <p class=
"description">Convert from RFC
1903 Date/Time format to UNIX time
3401 time_t ippDateToTime (
<br>
3402 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *date
<br>
3404 <h4 class=
"parameters">Parameters
</h4>
3407 <dd class=
"description">RFC
1903 date info
</dd>
3409 <h4 class=
"returnvalue">Return Value
</h4>
3410 <p class=
"description">UNIX time value
</p>
3411 <h3 class=
"function"><a name=
"ippDelete">ippDelete
</a></h3>
3412 <p class=
"description">Delete an IPP message.
</p>
3414 void ippDelete (
<br>
3415 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3417 <h4 class=
"parameters">Parameters
</h4>
3420 <dd class=
"description">IPP message
</dd>
3422 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"ippDeleteAttribute">ippDeleteAttribute
</a></h3>
3423 <p class=
"description">Delete a single attribute in an IPP message.
</p>
3425 void ippDeleteAttribute (
<br>
3426 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3427 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
3429 <h4 class=
"parameters">Parameters
</h4>
3432 <dd class=
"description">IPP message
</dd>
3434 <dd class=
"description">Attribute to delete
</dd>
3436 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippDeleteValues">ippDeleteValues
</a></h3>
3437 <p class=
"description">Delete values in an attribute.
</p>
3439 int ippDeleteValues (
<br>
3440 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3441 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
3442 int element,
<br>
3443 int count
<br>
3445 <h4 class=
"parameters">Parameters
</h4>
3448 <dd class=
"description">IPP message
</dd>
3450 <dd class=
"description">Attribute
</dd>
3452 <dd class=
"description">Index of first value to delete (
0-based)
</dd>
3454 <dd class=
"description">Number of values to delete
</dd>
3456 <h4 class=
"returnvalue">Return Value
</h4>
3457 <p class=
"description">1 on success,
0 on failure
</p>
3458 <h4 class=
"discussion">Discussion
</h4>
3459 <p class=
"discussion">The
<code>element
</code> parameter specifies the first value to delete, starting at
3460 0. It must be less than the number of values returned by
<a href=
"#ippGetCount"><code>ippGetCount
</code></a>.
<br>
3462 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
3464 Deleting all values in an attribute deletes the attribute.
3467 <h3 class=
"function"><a name=
"ippEnumString">ippEnumString
</a></h3>
3468 <p class=
"description">Return a string corresponding to the enum value.
</p>
3470 const char *ippEnumString (
<br>
3471 const char *attrname,
<br>
3472 int enumvalue
<br>
3474 <h4 class=
"parameters">Parameters
</h4>
3477 <dd class=
"description">Attribute name
</dd>
3479 <dd class=
"description">Enum value
</dd>
3481 <h4 class=
"returnvalue">Return Value
</h4>
3482 <p class=
"description">Enum string
</p>
3483 <h3 class=
"function"><a name=
"ippEnumValue">ippEnumValue
</a></h3>
3484 <p class=
"description">Return the value associated with a given enum string.
</p>
3486 int ippEnumValue (
<br>
3487 const char *attrname,
<br>
3488 const char *enumstring
<br>
3490 <h4 class=
"parameters">Parameters
</h4>
3493 <dd class=
"description">Attribute name
</dd>
3495 <dd class=
"description">Enum string
</dd>
3497 <h4 class=
"returnvalue">Return Value
</h4>
3498 <p class=
"description">Enum value or -
1 if unknown
</p>
3499 <h3 class=
"function"><a name=
"ippErrorString">ippErrorString
</a></h3>
3500 <p class=
"description">Return a name for the given status code.
</p>
3502 const char *ippErrorString (
<br>
3503 ipp_status_t error
<br>
3505 <h4 class=
"parameters">Parameters
</h4>
3508 <dd class=
"description">Error status
</dd>
3510 <h4 class=
"returnvalue">Return Value
</h4>
3511 <p class=
"description">Text string
</p>
3512 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippErrorValue">ippErrorValue
</a></h3>
3513 <p class=
"description">Return a status code for the given name.
</p>
3515 ipp_status_t ippErrorValue (
<br>
3516 const char *name
<br>
3518 <h4 class=
"parameters">Parameters
</h4>
3521 <dd class=
"description">Name
</dd>
3523 <h4 class=
"returnvalue">Return Value
</h4>
3524 <p class=
"description">IPP status code
</p>
3525 <h3 class=
"function"><a name=
"ippFindAttribute">ippFindAttribute
</a></h3>
3526 <p class=
"description">Find a named attribute in a request.
</p>
3528 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindAttribute (
<br>
3529 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3530 const char *name,
<br>
3531 ipp_tag_t type
<br>
3533 <h4 class=
"parameters">Parameters
</h4>
3536 <dd class=
"description">IPP message
</dd>
3538 <dd class=
"description">Name of attribute
</dd>
3540 <dd class=
"description">Type of attribute
</dd>
3542 <h4 class=
"returnvalue">Return Value
</h4>
3543 <p class=
"description">Matching attribute
</p>
3544 <h3 class=
"function"><a name=
"ippFindNextAttribute">ippFindNextAttribute
</a></h3>
3545 <p class=
"description">Find the next named attribute in a request.
</p>
3547 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindNextAttribute (
<br>
3548 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3549 const char *name,
<br>
3550 ipp_tag_t type
<br>
3552 <h4 class=
"parameters">Parameters
</h4>
3555 <dd class=
"description">IPP message
</dd>
3557 <dd class=
"description">Name of attribute
</dd>
3559 <dd class=
"description">Type of attribute
</dd>
3561 <h4 class=
"returnvalue">Return Value
</h4>
3562 <p class=
"description">Matching attribute
</p>
3563 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippFirstAttribute">ippFirstAttribute
</a></h3>
3564 <p class=
"description">Return the first attribute in the message.
</p>
3566 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFirstAttribute (
<br>
3567 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3569 <h4 class=
"parameters">Parameters
</h4>
3572 <dd class=
"description">IPP message
</dd>
3574 <h4 class=
"returnvalue">Return Value
</h4>
3575 <p class=
"description">First attribute or
<code>NULL
</code> if none
</p>
3576 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetBoolean">ippGetBoolean
</a></h3>
3577 <p class=
"description">Get a boolean value for an attribute.
</p>
3579 int ippGetBoolean (
<br>
3580 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3581 int element
<br>
3583 <h4 class=
"parameters">Parameters
</h4>
3586 <dd class=
"description">IPP attribute
</dd>
3588 <dd class=
"description">Value number (
0-based)
</dd>
3590 <h4 class=
"returnvalue">Return Value
</h4>
3591 <p class=
"description">Boolean value or -
1 on error
</p>
3592 <h4 class=
"discussion">Discussion
</h4>
3593 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
3594 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
3597 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetCollection">ippGetCollection
</a></h3>
3598 <p class=
"description">Get a collection value for an attribute.
</p>
3600 <a href=
"#ipp_t">ipp_t
</a> *ippGetCollection (
<br>
3601 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3602 int element
<br>
3604 <h4 class=
"parameters">Parameters
</h4>
3607 <dd class=
"description">IPP attribute
</dd>
3609 <dd class=
"description">Value number (
0-based)
</dd>
3611 <h4 class=
"returnvalue">Return Value
</h4>
3612 <p class=
"description">Collection value or
<code>NULL
</code> on error
</p>
3613 <h4 class=
"discussion">Discussion
</h4>
3614 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
3615 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
3618 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetCount">ippGetCount
</a></h3>
3619 <p class=
"description">Get the number of values in an attribute.
</p>
3621 int ippGetCount (
<br>
3622 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
3624 <h4 class=
"parameters">Parameters
</h4>
3627 <dd class=
"description">IPP attribute
</dd>
3629 <h4 class=
"returnvalue">Return Value
</h4>
3630 <p class=
"description">Number of values or -
1 on error
</p>
3631 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetDate">ippGetDate
</a></h3>
3632 <p class=
"description">Get a date value for an attribute.
</p>
3634 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *ippGetDate (
<br>
3635 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3636 int element
<br>
3638 <h4 class=
"parameters">Parameters
</h4>
3641 <dd class=
"description">IPP attribute
</dd>
3643 <dd class=
"description">Value number (
0-based)
</dd>
3645 <h4 class=
"returnvalue">Return Value
</h4>
3646 <p class=
"description">Date value or
<code>NULL
</code></p>
3647 <h4 class=
"discussion">Discussion
</h4>
3648 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
3649 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
3652 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetGroupTag">ippGetGroupTag
</a></h3>
3653 <p class=
"description">Get the group associated with an attribute.
</p>
3655 ipp_tag_t ippGetGroupTag (
<br>
3656 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
3658 <h4 class=
"parameters">Parameters
</h4>
3661 <dd class=
"description">IPP attribute
</dd>
3663 <h4 class=
"returnvalue">Return Value
</h4>
3664 <p class=
"description">Group tag or
<code>IPP_TAG_ZERO
</code> on error
</p>
3665 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetInteger">ippGetInteger
</a></h3>
3666 <p class=
"description">Get the integer/enum value for an attribute.
</p>
3668 int ippGetInteger (
<br>
3669 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3670 int element
<br>
3672 <h4 class=
"parameters">Parameters
</h4>
3675 <dd class=
"description">IPP attribute
</dd>
3677 <dd class=
"description">Value number (
0-based)
</dd>
3679 <h4 class=
"returnvalue">Return Value
</h4>
3680 <p class=
"description">Value or -
1 on error
</p>
3681 <h4 class=
"discussion">Discussion
</h4>
3682 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
3683 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
3686 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetName">ippGetName
</a></h3>
3687 <p class=
"description">Get the attribute name.
</p>
3689 const char *ippGetName (
<br>
3690 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
3692 <h4 class=
"parameters">Parameters
</h4>
3695 <dd class=
"description">IPP attribute
</dd>
3697 <h4 class=
"returnvalue">Return Value
</h4>
3698 <p class=
"description">Attribute name or
<code>NULL
</code> for separators
</p>
3699 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetOperation">ippGetOperation
</a></h3>
3700 <p class=
"description">Get the operation ID in an IPP message.
</p>
3702 ipp_op_t ippGetOperation (
<br>
3703 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3705 <h4 class=
"parameters">Parameters
</h4>
3708 <dd class=
"description">IPP request message
</dd>
3710 <h4 class=
"returnvalue">Return Value
</h4>
3711 <p class=
"description">Operation ID or -
1 on error
</p>
3712 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetRange">ippGetRange
</a></h3>
3713 <p class=
"description">Get a rangeOfInteger value from an attribute.
</p>
3715 int ippGetRange (
<br>
3716 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3717 int element,
<br>
3718 int *uppervalue
<br>
3720 <h4 class=
"parameters">Parameters
</h4>
3723 <dd class=
"description">IPP attribute
</dd>
3725 <dd class=
"description">Value number (
0-based)
</dd>
3727 <dd class=
"description">Upper value of range
</dd>
3729 <h4 class=
"returnvalue">Return Value
</h4>
3730 <p class=
"description">Lower value of range or -
1</p>
3731 <h4 class=
"discussion">Discussion
</h4>
3732 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
3733 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
3736 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetRequestId">ippGetRequestId
</a></h3>
3737 <p class=
"description">Get the request ID from an IPP message.
</p>
3739 int ippGetRequestId (
<br>
3740 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3742 <h4 class=
"parameters">Parameters
</h4>
3745 <dd class=
"description">IPP message
</dd>
3747 <h4 class=
"returnvalue">Return Value
</h4>
3748 <p class=
"description">Request ID or -
1 on error
</p>
3749 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetResolution">ippGetResolution
</a></h3>
3750 <p class=
"description">Get a resolution value for an attribute.
</p>
3752 int ippGetResolution (
<br>
3753 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3754 int element,
<br>
3755 int *yres,
<br>
3756 <a href=
"#ipp_res_t">ipp_res_t
</a> *units
<br>
3758 <h4 class=
"parameters">Parameters
</h4>
3761 <dd class=
"description">IPP attribute
</dd>
3763 <dd class=
"description">Value number (
0-based)
</dd>
3765 <dd class=
"description">Vertical/feed resolution
</dd>
3767 <dd class=
"description">Units for resolution
</dd>
3769 <h4 class=
"returnvalue">Return Value
</h4>
3770 <p class=
"description">Horizontal/cross feed resolution or -
1</p>
3771 <h4 class=
"discussion">Discussion
</h4>
3772 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
3773 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
3776 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetState">ippGetState
</a></h3>
3777 <p class=
"description">Get the IPP message state.
</p>
3779 <a href=
"#ipp_state_t">ipp_state_t
</a> ippGetState (
<br>
3780 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3782 <h4 class=
"parameters">Parameters
</h4>
3785 <dd class=
"description">IPP message
</dd>
3787 <h4 class=
"returnvalue">Return Value
</h4>
3788 <p class=
"description">IPP message state value
</p>
3789 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetStatusCode">ippGetStatusCode
</a></h3>
3790 <p class=
"description">Get the status code from an IPP response or event message.
</p>
3792 ipp_status_t ippGetStatusCode (
<br>
3793 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3795 <h4 class=
"parameters">Parameters
</h4>
3798 <dd class=
"description">IPP response or event message
</dd>
3800 <h4 class=
"returnvalue">Return Value
</h4>
3801 <p class=
"description">Status code in IPP message
</p>
3802 <h3 class=
"function"><a name=
"ippGetString">ippGetString
</a></h3>
3803 <p class=
"description">Return the value...
</p>
3805 const char *ippGetString (
<br>
3806 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr,
<br>
3807 int element,
<br>
3808 const char **language
<br>
3810 <h4 class=
"parameters">Parameters
</h4>
3813 <dd class=
"description">IPP attribute
</dd>
3815 <dd class=
"description">Value number (
0-based)
</dd>
3817 <dd class=
"description">Language code (
<code>NULL
</code> for don't care)
</dd>
3819 <h4 class=
"returnvalue">Return Value
</h4>
3820 <p class=
"description">Get the string and optionally the language code for an attribute.
</p>
3821 <p class=
"discussion">The
<code>element
</code> parameter specifies which value to get from
0 to
3822 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a> -
1.
3825 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetValueTag">ippGetValueTag
</a></h3>
3826 <p class=
"description">Get the value tag for an attribute.
</p>
3828 ipp_tag_t ippGetValueTag (
<br>
3829 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
3831 <h4 class=
"parameters">Parameters
</h4>
3834 <dd class=
"description">IPP attribute
</dd>
3836 <h4 class=
"returnvalue">Return Value
</h4>
3837 <p class=
"description">Value tag or
<code>IPP_TAG_ZERO
</code> on error
</p>
3838 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippGetVersion">ippGetVersion
</a></h3>
3839 <p class=
"description">Get the major and minor version number from an IPP message.
</p>
3841 int ippGetVersion (
<br>
3842 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3843 int *minor
<br>
3845 <h4 class=
"parameters">Parameters
</h4>
3848 <dd class=
"description">IPP message
</dd>
3850 <dd class=
"description">Minor version number or
<code>NULL
</code></dd>
3852 <h4 class=
"returnvalue">Return Value
</h4>
3853 <p class=
"description">Major version number or -
1 on error
</p>
3854 <h3 class=
"function"><a name=
"ippLength">ippLength
</a></h3>
3855 <p class=
"description">Compute the length of an IPP message.
</p>
3857 size_t ippLength (
<br>
3858 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3860 <h4 class=
"parameters">Parameters
</h4>
3863 <dd class=
"description">IPP message
</dd>
3865 <h4 class=
"returnvalue">Return Value
</h4>
3866 <p class=
"description">Size of IPP message
</p>
3867 <h3 class=
"function"><a name=
"ippNew">ippNew
</a></h3>
3868 <p class=
"description">Allocate a new IPP message.
</p>
3870 <a href=
"#ipp_t">ipp_t
</a> *ippNew (void);
</p>
3871 <h4 class=
"returnvalue">Return Value
</h4>
3872 <p class=
"description">New IPP message
</p>
3873 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippNewRequest">ippNewRequest
</a></h3>
3874 <p class=
"description">Allocate a new IPP request message.
</p>
3876 <a href=
"#ipp_t">ipp_t
</a> *ippNewRequest (
<br>
3877 ipp_op_t op
<br>
3879 <h4 class=
"parameters">Parameters
</h4>
3882 <dd class=
"description">Operation code
</dd>
3884 <h4 class=
"returnvalue">Return Value
</h4>
3885 <p class=
"description">IPP request message
</p>
3886 <h4 class=
"discussion">Discussion
</h4>
3887 <p class=
"discussion">The new request message is initialized with the attributes-charset and
3888 attributes-natural-language attributes added. The
3889 attributes-natural-language value is derived from the current locale.
3892 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippNextAttribute">ippNextAttribute
</a></h3>
3893 <p class=
"description">Return the next attribute in the message.
</p>
3895 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippNextAttribute (
<br>
3896 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3898 <h4 class=
"parameters">Parameters
</h4>
3901 <dd class=
"description">IPP message
</dd>
3903 <h4 class=
"returnvalue">Return Value
</h4>
3904 <p class=
"description">Next attribute or
<code>NULL
</code> if none
</p>
3905 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippOpString">ippOpString
</a></h3>
3906 <p class=
"description">Return a name for the given operation id.
</p>
3908 const char *ippOpString (
<br>
3909 ipp_op_t op
<br>
3911 <h4 class=
"parameters">Parameters
</h4>
3914 <dd class=
"description">Operation ID
</dd>
3916 <h4 class=
"returnvalue">Return Value
</h4>
3917 <p class=
"description">Name
</p>
3918 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippOpValue">ippOpValue
</a></h3>
3919 <p class=
"description">Return an operation id for the given name.
</p>
3921 ipp_op_t ippOpValue (
<br>
3922 const char *name
<br>
3924 <h4 class=
"parameters">Parameters
</h4>
3927 <dd class=
"description">Textual name
</dd>
3929 <h4 class=
"returnvalue">Return Value
</h4>
3930 <p class=
"description">Operation ID
</p>
3931 <h3 class=
"function"><a name=
"ippPort">ippPort
</a></h3>
3932 <p class=
"description">Return the default IPP port number.
</p>
3934 int ippPort (void);
</p>
3935 <h4 class=
"returnvalue">Return Value
</h4>
3936 <p class=
"description">Port number
</p>
3937 <h3 class=
"function"><a name=
"ippRead">ippRead
</a></h3>
3938 <p class=
"description">Read data for an IPP message from a HTTP connection.
</p>
3940 <a href=
"#ipp_state_t">ipp_state_t
</a> ippRead (
<br>
3941 <a href=
"#http_t">http_t
</a> *http,
<br>
3942 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3944 <h4 class=
"parameters">Parameters
</h4>
3947 <dd class=
"description">HTTP connection
</dd>
3949 <dd class=
"description">IPP data
</dd>
3951 <h4 class=
"returnvalue">Return Value
</h4>
3952 <p class=
"description">Current state
</p>
3953 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"ippReadFile">ippReadFile
</a></h3>
3954 <p class=
"description">Read data for an IPP message from a file.
</p>
3956 <a href=
"#ipp_state_t">ipp_state_t
</a> ippReadFile (
<br>
3957 int fd,
<br>
3958 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3960 <h4 class=
"parameters">Parameters
</h4>
3963 <dd class=
"description">HTTP data
</dd>
3965 <dd class=
"description">IPP data
</dd>
3967 <h4 class=
"returnvalue">Return Value
</h4>
3968 <p class=
"description">Current state
</p>
3969 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippReadIO">ippReadIO
</a></h3>
3970 <p class=
"description">Read data for an IPP message.
</p>
3972 <a href=
"#ipp_state_t">ipp_state_t
</a> ippReadIO (
<br>
3973 void *src,
<br>
3974 <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br>
3975 int blocking,
<br>
3976 <a href=
"#ipp_t">ipp_t
</a> *parent,
<br>
3977 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3979 <h4 class=
"parameters">Parameters
</h4>
3982 <dd class=
"description">Data source
</dd>
3984 <dd class=
"description">Read callback function
</dd>
3986 <dd class=
"description">Use blocking IO?
</dd>
3988 <dd class=
"description">Parent request, if any
</dd>
3990 <dd class=
"description">IPP data
</dd>
3992 <h4 class=
"returnvalue">Return Value
</h4>
3993 <p class=
"description">Current state
</p>
3994 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetBoolean">ippSetBoolean
</a></h3>
3995 <p class=
"description">Set a boolean value in an attribute.
</p>
3997 int ippSetBoolean (
<br>
3998 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
3999 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4000 int element,
<br>
4001 int boolvalue
<br>
4003 <h4 class=
"parameters">Parameters
</h4>
4006 <dd class=
"description">IPP message
</dd>
4008 <dd class=
"description">IPP attribute
</dd>
4010 <dd class=
"description">Value number (
0-based)
</dd>
4012 <dd class=
"description">Boolean value
</dd>
4014 <h4 class=
"returnvalue">Return Value
</h4>
4015 <p class=
"description">1 on success,
0 on failure
</p>
4016 <h4 class=
"discussion">Discussion
</h4>
4017 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4018 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4020 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4022 The
<code>element
</code> parameter specifies which value to set from
0 to
4023 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4026 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetCollection">ippSetCollection
</a></h3>
4027 <p class=
"description">Set a collection value in an attribute.
</p>
4029 int ippSetCollection (
<br>
4030 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4031 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4032 int element,
<br>
4033 <a href=
"#ipp_t">ipp_t
</a> *colvalue
<br>
4035 <h4 class=
"parameters">Parameters
</h4>
4038 <dd class=
"description">IPP message
</dd>
4040 <dd class=
"description">IPP attribute
</dd>
4042 <dd class=
"description">Value number (
0-based)
</dd>
4044 <dd class=
"description">Collection value
</dd>
4046 <h4 class=
"returnvalue">Return Value
</h4>
4047 <p class=
"description">1 on success,
0 on failure
</p>
4048 <h4 class=
"discussion">Discussion
</h4>
4049 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4050 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4052 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4054 The
<code>element
</code> parameter specifies which value to set from
0 to
4055 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4058 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetDate">ippSetDate
</a></h3>
4059 <p class=
"description">Set a date value in an attribute.
</p>
4061 int ippSetDate (
<br>
4062 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4063 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4064 int element,
<br>
4065 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *datevalue
<br>
4067 <h4 class=
"parameters">Parameters
</h4>
4070 <dd class=
"description">IPP message
</dd>
4072 <dd class=
"description">IPP attribute
</dd>
4074 <dd class=
"description">Value number (
0-based)
</dd>
4076 <dd class=
"description">Date value
</dd>
4078 <h4 class=
"returnvalue">Return Value
</h4>
4079 <p class=
"description">1 on success,
0 on failure
</p>
4080 <h4 class=
"discussion">Discussion
</h4>
4081 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4082 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4084 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4086 The
<code>element
</code> parameter specifies which value to set from
0 to
4087 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4090 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetGroupTag">ippSetGroupTag
</a></h3>
4091 <p class=
"description">Set the group tag of an attribute.
</p>
4093 int ippSetGroupTag (
<br>
4094 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4095 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4096 ipp_tag_t group_tag
<br>
4098 <h4 class=
"parameters">Parameters
</h4>
4101 <dd class=
"description">IPP message
</dd>
4103 <dd class=
"description">Attribute
</dd>
4105 <dd class=
"description">Group tag
</dd>
4107 <h4 class=
"returnvalue">Return Value
</h4>
4108 <p class=
"description">1 on success,
0 on failure
</p>
4109 <h4 class=
"discussion">Discussion
</h4>
4110 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4111 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4113 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4115 The
<code>group
</code> parameter specifies the IPP attribute group tag: none
4116 (
<code>IPP_TAG_ZERO
</code>, for member attributes), document (
<code>IPP_TAG_DOCUMENT
</code>),
4117 event notification (
<code>IPP_TAG_EVENT_NOTIFICATION
</code>), operation
4118 (
<code>IPP_TAG_OPERATION
</code>), printer (
<code>IPP_TAG_PRINTER
</code>), subscription
4119 (
<code>IPP_TAG_SUBSCRIPTION
</code>), or unsupported (
<code>IPP_TAG_UNSUPPORTED_GROUP
</code>).
4122 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetInteger">ippSetInteger
</a></h3>
4123 <p class=
"description">Set an integer or enum value in an attribute.
</p>
4125 int ippSetInteger (
<br>
4126 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4127 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4128 int element,
<br>
4129 int intvalue
<br>
4131 <h4 class=
"parameters">Parameters
</h4>
4134 <dd class=
"description">IPP message
</dd>
4136 <dd class=
"description">IPP attribute
</dd>
4138 <dd class=
"description">Value number (
0-based)
</dd>
4140 <dd class=
"description">Integer/enum value
</dd>
4142 <h4 class=
"returnvalue">Return Value
</h4>
4143 <p class=
"description">1 on success,
0 on failure
</p>
4144 <h4 class=
"discussion">Discussion
</h4>
4145 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4146 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4148 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4150 The
<code>element
</code> parameter specifies which value to set from
0 to
4151 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4154 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetName">ippSetName
</a></h3>
4155 <p class=
"description">Set the name of an attribute.
</p>
4157 int ippSetName (
<br>
4158 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4159 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4160 const char *name
<br>
4162 <h4 class=
"parameters">Parameters
</h4>
4165 <dd class=
"description">IPP message
</dd>
4167 <dd class=
"description">IPP attribute
</dd>
4169 <dd class=
"description">Attribute name
</dd>
4171 <h4 class=
"returnvalue">Return Value
</h4>
4172 <p class=
"description">1 on success,
0 on failure
</p>
4173 <h4 class=
"discussion">Discussion
</h4>
4174 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4175 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4177 The
<code>attr
</code> parameter may be modified as a result of setting the value.
4180 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetOperation">ippSetOperation
</a></h3>
4181 <p class=
"description">Set the operation ID in an IPP request message.
</p>
4183 int ippSetOperation (
<br>
4184 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4185 ipp_op_t op
<br>
4187 <h4 class=
"parameters">Parameters
</h4>
4190 <dd class=
"description">IPP request message
</dd>
4192 <dd class=
"description">Operation ID
</dd>
4194 <h4 class=
"returnvalue">Return Value
</h4>
4195 <p class=
"description">1 on success,
0 on failure
</p>
4196 <h4 class=
"discussion">Discussion
</h4>
4197 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
4198 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
4201 <h3 class=
"function"><a name=
"ippSetPort">ippSetPort
</a></h3>
4202 <p class=
"description">Set the default port number.
</p>
4204 void ippSetPort (
<br>
4205 int p
<br>
4207 <h4 class=
"parameters">Parameters
</h4>
4210 <dd class=
"description">Port number to use
</dd>
4212 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetRange">ippSetRange
</a></h3>
4213 <p class=
"description">Set a rangeOfInteger value in an attribute.
</p>
4215 int ippSetRange (
<br>
4216 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4217 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4218 int element,
<br>
4219 int lowervalue,
<br>
4220 int uppervalue
<br>
4222 <h4 class=
"parameters">Parameters
</h4>
4225 <dd class=
"description">IPP message
</dd>
4227 <dd class=
"description">IPP attribute
</dd>
4229 <dd class=
"description">Value number (
0-based)
</dd>
4231 <dd class=
"description">Lower bound for range
</dd>
4233 <dd class=
"description">Upper bound for range
</dd>
4235 <h4 class=
"returnvalue">Return Value
</h4>
4236 <p class=
"description">1 on success,
0 on failure
</p>
4237 <h4 class=
"discussion">Discussion
</h4>
4238 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4239 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4241 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4243 The
<code>element
</code> parameter specifies which value to set from
0 to
4244 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4247 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetRequestId">ippSetRequestId
</a></h3>
4248 <p class=
"description">Set the request ID in an IPP message.
</p>
4250 int ippSetRequestId (
<br>
4251 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4252 int request_id
<br>
4254 <h4 class=
"parameters">Parameters
</h4>
4257 <dd class=
"description">IPP message
</dd>
4259 <dd class=
"description">Request ID
</dd>
4261 <h4 class=
"returnvalue">Return Value
</h4>
4262 <p class=
"description">1 on success,
0 on failure
</p>
4263 <h4 class=
"discussion">Discussion
</h4>
4264 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
4265 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4267 The
<code>request_id
</code> parameter must be greater than
0.
4270 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetResolution">ippSetResolution
</a></h3>
4271 <p class=
"description">Set a resolution value in an attribute.
</p>
4273 int ippSetResolution (
<br>
4274 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4275 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4276 int element,
<br>
4277 <a href=
"#ipp_res_t">ipp_res_t
</a> unitsvalue,
<br>
4278 int xresvalue,
<br>
4279 int yresvalue
<br>
4281 <h4 class=
"parameters">Parameters
</h4>
4284 <dd class=
"description">IPP message
</dd>
4286 <dd class=
"description">IPP attribute
</dd>
4288 <dd class=
"description">Value number (
0-based)
</dd>
4290 <dd class=
"description">Resolution units
</dd>
4292 <dd class=
"description">Horizontal/cross feed resolution
</dd>
4294 <dd class=
"description">Vertical/feed resolution
</dd>
4296 <h4 class=
"returnvalue">Return Value
</h4>
4297 <p class=
"description">1 on success,
0 on failure
</p>
4298 <h4 class=
"discussion">Discussion
</h4>
4299 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4300 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4302 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4304 The
<code>element
</code> parameter specifies which value to set from
0 to
4305 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4308 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetState">ippSetState
</a></h3>
4309 <p class=
"description">Set the current state of the IPP message.
</p>
4311 int ippSetState (
<br>
4312 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4313 <a href=
"#ipp_state_t">ipp_state_t
</a> state
<br>
4315 <h4 class=
"parameters">Parameters
</h4>
4318 <dd class=
"description">IPP message
</dd>
4320 <dd class=
"description">IPP state value
</dd>
4322 <h4 class=
"returnvalue">Return Value
</h4>
4323 <p class=
"description">1 on success,
0 on failure
</p>
4324 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetStatusCode">ippSetStatusCode
</a></h3>
4325 <p class=
"description">Set the status code in an IPP response or event message.
</p>
4327 int ippSetStatusCode (
<br>
4328 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4329 ipp_status_t status
<br>
4331 <h4 class=
"parameters">Parameters
</h4>
4334 <dd class=
"description">IPP response or event message
</dd>
4336 <dd class=
"description">Status code
</dd>
4338 <h4 class=
"returnvalue">Return Value
</h4>
4339 <p class=
"description">1 on success,
0 on failure
</p>
4340 <h4 class=
"discussion">Discussion
</h4>
4341 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
4342 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
4345 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetString">ippSetString
</a></h3>
4346 <p class=
"description">Set a string value in an attribute.
</p>
4348 int ippSetString (
<br>
4349 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4350 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4351 int element,
<br>
4352 const char *strvalue
<br>
4354 <h4 class=
"parameters">Parameters
</h4>
4357 <dd class=
"description">IPP message
</dd>
4359 <dd class=
"description">IPP attribute
</dd>
4361 <dd class=
"description">Value number (
0-based)
</dd>
4363 <dd class=
"description">String value
</dd>
4365 <h4 class=
"returnvalue">Return Value
</h4>
4366 <p class=
"description">1 on success,
0 on failure
</p>
4367 <h4 class=
"discussion">Discussion
</h4>
4368 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4369 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4371 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4373 The
<code>element
</code> parameter specifies which value to set from
0 to
4374 <a href=
"#ippGetCount(attr)"><code>ippGetCount(attr)
</code></a>.
4377 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetValueTag">ippSetValueTag
</a></h3>
4378 <p class=
"description">Set the value tag of an attribute.
</p>
4380 int ippSetValueTag (
<br>
4381 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4382 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> **attr,
<br>
4383 ipp_tag_t value_tag
<br>
4385 <h4 class=
"parameters">Parameters
</h4>
4388 <dd class=
"description">IPP message
</dd>
4390 <dd class=
"description">IPP attribute
</dd>
4392 <dd class=
"description">Value tag
</dd>
4394 <h4 class=
"returnvalue">Return Value
</h4>
4395 <p class=
"description">1 on success,
0 on failure
</p>
4396 <h4 class=
"discussion">Discussion
</h4>
4397 <p class=
"discussion">The
<code>ipp
</code> parameter refers to the IPP message containing the attribute that was
4398 previously created using the
<a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4400 The
<code>attr
</code> parameter may be modified as a result of setting the value.
<br>
4402 Integer (
<code>IPP_TAG_INTEGER
</code>) values can be promoted to rangeOfInteger
4403 (
<code>IPP_TAG_RANGE
</code>) values, the various string tags can be promoted to name
4404 (
<code>IPP_TAG_NAME
</code>) or nameWithLanguage (
<code>IPP_TAG_NAMELANG
</code>) values, text
4405 (
<code>IPP_TAG_TEXT
</code>) values can be promoted to textWithLanguage
4406 (
<code>IPP_TAG_TEXTLANG
</code>) values, and all values can be demoted to the various
4407 out-of-band value tags such as no-value (
<code>IPP_TAG_NOVALUE
</code>). All other changes
4408 will be rejected.
<br>
4410 Promoting a string attribute to nameWithLanguage or textWithLanguage adds the language
4411 code in the
"attributes-natural-language
" attribute or, if not present, the language
4412 code for the current locale.
4415 <h3 class=
"function"><span class=
"info"> CUPS
1.6 </span><a name=
"ippSetVersion">ippSetVersion
</a></h3>
4416 <p class=
"description">Set the version number in an IPP message.
</p>
4418 int ippSetVersion (
<br>
4419 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
4420 int major,
<br>
4421 int minor
<br>
4423 <h4 class=
"parameters">Parameters
</h4>
4426 <dd class=
"description">IPP message
</dd>
4428 <dd class=
"description">Major version number (major.minor)
</dd>
4430 <dd class=
"description">Minor version number (major.minor)
</dd>
4432 <h4 class=
"returnvalue">Return Value
</h4>
4433 <p class=
"description">1 on success,
0 on failure
</p>
4434 <h4 class=
"discussion">Discussion
</h4>
4435 <p class=
"discussion">The
<code>ipp
</code> parameter refers to an IPP message previously created using the
4436 <a href=
"#ippNew"><code>ippNew
</code></a> or
<a href=
"#ippNewRequest"><code>ippNewRequest
</code></a> functions.
<br>
4438 The valid version numbers are currently
1.0,
1.1,
2.0,
2.1, and
2.2.
4441 <h3 class=
"function"><span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span><a name=
"ippTagString">ippTagString
</a></h3>
4442 <p class=
"description">Return the tag name corresponding to a tag value.
</p>
4444 const char *ippTagString (
<br>
4445 ipp_tag_t tag
<br>
4447 <h4 class=
"parameters">Parameters
</h4>
4450 <dd class=
"description">Tag value
</dd>
4452 <h4 class=
"returnvalue">Return Value
</h4>
4453 <p class=
"description">Tag name
</p>
4454 <h4 class=
"discussion">Discussion
</h4>
4455 <p class=
"discussion">The returned names are defined in RFC
2911 and
3382.
4458 <h3 class=
"function"><span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span><a name=
"ippTagValue">ippTagValue
</a></h3>
4459 <p class=
"description">Return the tag value corresponding to a tag name.
</p>
4461 ipp_tag_t ippTagValue (
<br>
4462 const char *name
<br>
4464 <h4 class=
"parameters">Parameters
</h4>
4467 <dd class=
"description">Tag name
</dd>
4469 <h4 class=
"returnvalue">Return Value
</h4>
4470 <p class=
"description">Tag value
</p>
4471 <h4 class=
"discussion">Discussion
</h4>
4472 <p class=
"discussion">The tag names are defined in RFC
2911 and
3382.
4475 <h3 class=
"function"><a name=
"ippTimeToDate">ippTimeToDate
</a></h3>
4476 <p class=
"description">Convert from UNIX time to RFC
1903 format.
</p>
4478 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *ippTimeToDate (
<br>
4479 time_t t
<br>
4481 <h4 class=
"parameters">Parameters
</h4>
4484 <dd class=
"description">UNIX time value
</dd>
4486 <h4 class=
"returnvalue">Return Value
</h4>
4487 <p class=
"description">RFC-
1903 date/time data
</p>
4488 <h3 class=
"function"><a name=
"ippWrite">ippWrite
</a></h3>
4489 <p class=
"description">Write data for an IPP message to a HTTP connection.
</p>
4491 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWrite (
<br>
4492 <a href=
"#http_t">http_t
</a> *http,
<br>
4493 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4495 <h4 class=
"parameters">Parameters
</h4>
4498 <dd class=
"description">HTTP connection
</dd>
4500 <dd class=
"description">IPP data
</dd>
4502 <h4 class=
"returnvalue">Return Value
</h4>
4503 <p class=
"description">Current state
</p>
4504 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"ippWriteFile">ippWriteFile
</a></h3>
4505 <p class=
"description">Write data for an IPP message to a file.
</p>
4507 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWriteFile (
<br>
4508 int fd,
<br>
4509 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4511 <h4 class=
"parameters">Parameters
</h4>
4514 <dd class=
"description">HTTP data
</dd>
4516 <dd class=
"description">IPP data
</dd>
4518 <h4 class=
"returnvalue">Return Value
</h4>
4519 <p class=
"description">Current state
</p>
4520 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippWriteIO">ippWriteIO
</a></h3>
4521 <p class=
"description">Write data for an IPP message.
</p>
4523 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWriteIO (
<br>
4524 void *dst,
<br>
4525 <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br>
4526 int blocking,
<br>
4527 <a href=
"#ipp_t">ipp_t
</a> *parent,
<br>
4528 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
4530 <h4 class=
"parameters">Parameters
</h4>
4533 <dd class=
"description">Destination
</dd>
4535 <dd class=
"description">Write callback function
</dd>
4537 <dd class=
"description">Use blocking IO?
</dd>
4539 <dd class=
"description">Parent IPP message
</dd>
4541 <dd class=
"description">IPP data
</dd>
4543 <h4 class=
"returnvalue">Return Value
</h4>
4544 <p class=
"description">Current state
</p>
4545 <h2 class=
"title"><a name=
"TYPES">Data Types
</a></h2>
4546 <h3 class=
"typedef"><a name=
"gss_auth_identity_desc">gss_auth_identity_desc
</a></h3>
4547 <p class=
"description">Local functions...
</p>
4549 typedef struct
<a href=
"#gss_auth_identity">gss_auth_identity
</a> gss_auth_identity_desc;
4551 <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>
4552 <p class=
"description">Socket address union, which
4553 makes using IPv6 and other
4554 address types easier and
4557 typedef union _http_addr_u / http_addr_t;
4559 <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>
4560 <p class=
"description">Socket address list, which is
4561 used to enumerate all of the
4562 addresses that are associated
4563 with a hostname.
</p>
4565 typedef struct
<a href=
"#http_addrlist_s">http_addrlist_s
</a> / http_addrlist_t;
4567 <h3 class=
"typedef"><a name=
"http_auth_t">http_auth_t
</a></h3>
4568 <p class=
"description">HTTP authentication types
</p>
4570 typedef enum
<a href=
"#http_auth_e">http_auth_e
</a> http_auth_t;
4572 <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>
4573 <p class=
"description">HTTP credential data
</p>
4575 typedef struct
<a href=
"#http_credential_s">http_credential_s
</a> http_credential_t;
4577 <h3 class=
"typedef"><a name=
"http_encoding_t">http_encoding_t
</a></h3>
4578 <p class=
"description">HTTP transfer encoding values
</p>
4580 typedef enum
<a href=
"#http_encoding_e">http_encoding_e
</a> http_encoding_t;
4582 <h3 class=
"typedef"><a name=
"http_encryption_t">http_encryption_t
</a></h3>
4583 <p class=
"description">HTTP encryption values
</p>
4585 typedef enum
<a href=
"#http_encryption_e">http_encryption_e
</a> http_encryption_t;
4587 <h3 class=
"typedef"><a name=
"http_field_t">http_field_t
</a></h3>
4588 <p class=
"description">HTTP field names
</p>
4590 typedef enum
<a href=
"#http_field_e">http_field_e
</a> http_field_t;
4592 <h3 class=
"typedef"><a name=
"http_keepalive_t">http_keepalive_t
</a></h3>
4593 <p class=
"description">HTTP keep-alive values
</p>
4595 typedef enum
<a href=
"#http_keepalive_e">http_keepalive_e
</a> http_keepalive_t;
4597 <h3 class=
"typedef"><a name=
"http_state_t">http_state_t
</a></h3>
4598 <p class=
"description">HTTP state values; states
4599 are server-oriented...
</p>
4601 typedef enum
<a href=
"#http_state_e">http_state_e
</a> / http_state_t;
4603 <h3 class=
"typedef"><a name=
"http_status_t">http_status_t
</a></h3>
4604 <p class=
"description">HTTP status codes
</p>
4606 typedef enum
<a href=
"#http_status_e">http_status_e
</a> http_status_t;
4608 <h3 class=
"typedef"><a name=
"http_t">http_t
</a></h3>
4609 <p class=
"description">HTTP connection type
</p>
4611 typedef struct _http_s http_t;
4613 <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>
4614 <p class=
"description">HTTP timeout callback
</p>
4616 typedef int (*http_timeout_cb_t)(
<a href=
"#http_t">http_t
</a> *http, void *user_data);
4618 <h3 class=
"typedef"><a name=
"http_uri_coding_t">http_uri_coding_t
</a></h3>
4619 <p class=
"description">URI en/decode flags
</p>
4621 typedef enum
<a href=
"#http_uri_coding_e">http_uri_coding_e
</a> http_uri_coding_t;
4623 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"http_uri_status_t">http_uri_status_t
</a></h3>
4624 <p class=
"description">URI separation status
</p>
4626 typedef enum
<a href=
"#http_uri_status_e">http_uri_status_e
</a> http_uri_status_t;
4628 <h3 class=
"typedef"><a name=
"http_version_t">http_version_t
</a></h3>
4629 <p class=
"description">HTTP version numbers
</p>
4631 typedef enum
<a href=
"#http_version_e">http_version_e
</a> http_version_t;
4633 <h3 class=
"typedef"><a name=
"ipp_attribute_t">ipp_attribute_t
</a></h3>
4634 <p class=
"description">IPP attribute
</p>
4636 typedef struct _ipp_attribute_s ipp_attribute_t;
4638 <h3 class=
"typedef"><a name=
"ipp_copycb_t">ipp_copycb_t
</a></h3>
4639 <p class=
"description">The following structures are PRIVATE starting with CUPS
1.6. Please use the
4640 new accessor functions available in CUPS
1.6 and later, as these definitions
4641 will be moved to a private header file in a future release.
</p>
4643 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);
4645 <h3 class=
"typedef"><a name=
"ipp_dstate_t">ipp_dstate_t
</a></h3>
4646 <p class=
"description">Document states
</p>
4648 typedef enum
<a href=
"#ipp_dstate_e">ipp_dstate_e
</a> ipp_dstate_t;
4650 <h3 class=
"typedef"><a name=
"ipp_finish_t">ipp_finish_t
</a></h3>
4651 <p class=
"description">Finishings
</p>
4653 typedef enum
<a href=
"#ipp_finish_e">ipp_finish_e
</a> ipp_finish_t;
4655 <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>
4656 <p class=
"description">IPP IO Callback Function
</p>
4658 typedef ssize_t (*ipp_iocb_t)(void *context,
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *buffer, size_t bytes);
4660 <h3 class=
"typedef"><a name=
"ipp_jcollate_t">ipp_jcollate_t
</a></h3>
4661 <p class=
"description">Job collation types
</p>
4663 typedef enum
<a href=
"#ipp_jcollate_e">ipp_jcollate_e
</a> ipp_jcollate_t;
4665 <h3 class=
"typedef"><a name=
"ipp_orient_t">ipp_orient_t
</a></h3>
4666 <p class=
"description">Orientation values
</p>
4668 typedef enum
<a href=
"#ipp_orient_e">ipp_orient_e
</a> ipp_orient_t;
4670 <h3 class=
"typedef"><a name=
"ipp_pstate_t">ipp_pstate_t
</a></h3>
4671 <p class=
"description">Printer states
</p>
4673 typedef enum
<a href=
"#ipp_pstate_e">ipp_pstate_e
</a> ipp_pstate_t;
4675 <h3 class=
"typedef"><a name=
"ipp_quality_t">ipp_quality_t
</a></h3>
4676 <p class=
"description">Qualities
</p>
4678 typedef enum
<a href=
"#ipp_quality_e">ipp_quality_e
</a> ipp_quality_t;
4680 <h3 class=
"typedef"><a name=
"ipp_res_t">ipp_res_t
</a></h3>
4681 <p class=
"description">Resolution units
</p>
4683 typedef enum
<a href=
"#ipp_res_e">ipp_res_e
</a> ipp_res_t;
4685 <h3 class=
"typedef"><a name=
"ipp_state_t">ipp_state_t
</a></h3>
4686 <p class=
"description">IPP states
</p>
4688 typedef enum
<a href=
"#ipp_state_e">ipp_state_e
</a> ipp_state_t;
4690 <h3 class=
"typedef"><a name=
"ipp_t">ipp_t
</a></h3>
4691 <p class=
"description">IPP request/response data
</p>
4693 typedef struct _ipp_s ipp_t;
4695 <h3 class=
"typedef"><a name=
"ipp_uchar_t">ipp_uchar_t
</a></h3>
4696 <p class=
"description">Unsigned
8-bit integer/character
</p>
4698 typedef unsigned char ipp_uchar_t;
4700 <h2 class=
"title"><a name=
"STRUCTURES">Structures
</a></h2>
4701 <h3 class=
"struct"><a name=
"gss_auth_identity">gss_auth_identity
</a></h3>
4702 <p class=
"description">Local functions...
</p>
4703 <p class=
"code">struct gss_auth_identity {
<br>
4704 gss_buffer_t *credentialsRef;
<br>
4705 uint32_t flags;
<br>
4706 char *password;
<br>
4707 char *realm;
<br>
4708 uint32_t type;
<br>
4709 char *username;
<br>
4711 <h4 class=
"members">Members
</h4>
4713 <dt>credentialsRef
</dt>
4720 <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>
4721 <p class=
"description">Socket address list, which is
4722 used to enumerate all of the
4723 addresses that are associated
4724 with a hostname.
</p>
4725 <p class=
"code">struct http_addrlist_s {
<br>
4726 <a href=
"#http_addr_t">http_addr_t
</a> addr;
<br>
4727 struct
<a href=
"#http_addrlist_s">http_addrlist_s
</a> *next;
<br>
4729 <h4 class=
"members">Members
</h4>
4732 <dd class=
"description">Address
</dd>
4734 <dd class=
"description">Pointer to next address in list
</dd>
4736 <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>
4737 <p class=
"description">HTTP credential data
</p>
4738 <p class=
"code">struct http_credential_s {
<br>
4739 void *data;
<br>
4740 size_t datalen;
<br>
4742 <h4 class=
"members">Members
</h4>
4745 <dd class=
"description">Pointer to credential data
</dd>
4747 <dd class=
"description">Credential length
</dd>
4749 <h2 class=
"title"><a name=
"ENUMERATIONS">Constants
</a></h2>
4750 <h3 class=
"enumeration"><a name=
"http_auth_e">http_auth_e
</a></h3>
4751 <p class=
"description">HTTP authentication types
</p>
4752 <h4 class=
"constants">Constants
</h4>
4754 <dt>HTTP_AUTH_BASIC
</dt>
4755 <dd class=
"description">Basic authentication in use
</dd>
4756 <dt>HTTP_AUTH_MD5
</dt>
4757 <dd class=
"description">Digest authentication in use
</dd>
4758 <dt>HTTP_AUTH_MD5_INT
</dt>
4759 <dd class=
"description">Digest authentication in use for body
</dd>
4760 <dt>HTTP_AUTH_MD5_SESS
</dt>
4761 <dd class=
"description">MD5-session authentication in use
</dd>
4762 <dt>HTTP_AUTH_MD5_SESS_INT
</dt>
4763 <dd class=
"description">MD5-session authentication in use for body
</dd>
4764 <dt>HTTP_AUTH_NEGOTIATE
<span class=
"info"> CUPS
1.3/Mac OS X
10.5 </span></dt>
4765 <dd class=
"description">GSSAPI authentication in use
</dd>
4766 <dt>HTTP_AUTH_NONE
</dt>
4767 <dd class=
"description">No authentication in use
</dd>
4769 <h3 class=
"enumeration"><a name=
"http_encoding_e">http_encoding_e
</a></h3>
4770 <p class=
"description">HTTP transfer encoding values
</p>
4771 <h4 class=
"constants">Constants
</h4>
4773 <dt>HTTP_ENCODE_CHUNKED
</dt>
4774 <dd class=
"description">Data is chunked
</dd>
4775 <dt>HTTP_ENCODE_FIELDS
</dt>
4776 <dd class=
"description">Sending HTTP fields
</dd>
4777 <dt>HTTP_ENCODE_LENGTH
</dt>
4778 <dd class=
"description">Data is sent with Content-Length
</dd>
4780 <h3 class=
"enumeration"><a name=
"http_encryption_e">http_encryption_e
</a></h3>
4781 <p class=
"description">HTTP encryption values
</p>
4782 <h4 class=
"constants">Constants
</h4>
4784 <dt>HTTP_ENCRYPT_ALWAYS
</dt>
4785 <dd class=
"description">Always encrypt (SSL)
</dd>
4786 <dt>HTTP_ENCRYPT_IF_REQUESTED
</dt>
4787 <dd class=
"description">Encrypt if requested (TLS upgrade)
</dd>
4788 <dt>HTTP_ENCRYPT_NEVER
</dt>
4789 <dd class=
"description">Never encrypt
</dd>
4790 <dt>HTTP_ENCRYPT_REQUIRED
</dt>
4791 <dd class=
"description">Encryption is required (TLS upgrade)
</dd>
4793 <h3 class=
"enumeration"><a name=
"http_field_e">http_field_e
</a></h3>
4794 <p class=
"description">HTTP field names
</p>
4795 <h4 class=
"constants">Constants
</h4>
4797 <dt>HTTP_FIELD_ACCEPT_LANGUAGE
</dt>
4798 <dd class=
"description">Accept-Language field
</dd>
4799 <dt>HTTP_FIELD_ACCEPT_RANGES
</dt>
4800 <dd class=
"description">Accept-Ranges field
</dd>
4801 <dt>HTTP_FIELD_AUTHORIZATION
</dt>
4802 <dd class=
"description">Authorization field
</dd>
4803 <dt>HTTP_FIELD_CONNECTION
</dt>
4804 <dd class=
"description">Connection field
</dd>
4805 <dt>HTTP_FIELD_CONTENT_ENCODING
</dt>
4806 <dd class=
"description">Content-Encoding field
</dd>
4807 <dt>HTTP_FIELD_CONTENT_LANGUAGE
</dt>
4808 <dd class=
"description">Content-Language field
</dd>
4809 <dt>HTTP_FIELD_CONTENT_LENGTH
</dt>
4810 <dd class=
"description">Content-Length field
</dd>
4811 <dt>HTTP_FIELD_CONTENT_LOCATION
</dt>
4812 <dd class=
"description">Content-Location field
</dd>
4813 <dt>HTTP_FIELD_CONTENT_MD5
</dt>
4814 <dd class=
"description">Content-MD5 field
</dd>
4815 <dt>HTTP_FIELD_CONTENT_RANGE
</dt>
4816 <dd class=
"description">Content-Range field
</dd>
4817 <dt>HTTP_FIELD_CONTENT_TYPE
</dt>
4818 <dd class=
"description">Content-Type field
</dd>
4819 <dt>HTTP_FIELD_CONTENT_VERSION
</dt>
4820 <dd class=
"description">Content-Version field
</dd>
4821 <dt>HTTP_FIELD_DATE
</dt>
4822 <dd class=
"description">Date field
</dd>
4823 <dt>HTTP_FIELD_HOST
</dt>
4824 <dd class=
"description">Host field
</dd>
4825 <dt>HTTP_FIELD_IF_MODIFIED_SINCE
</dt>
4826 <dd class=
"description">If-Modified-Since field
</dd>
4827 <dt>HTTP_FIELD_IF_UNMODIFIED_SINCE
</dt>
4828 <dd class=
"description">If-Unmodified-Since field
</dd>
4829 <dt>HTTP_FIELD_KEEP_ALIVE
</dt>
4830 <dd class=
"description">Keep-Alive field
</dd>
4831 <dt>HTTP_FIELD_LAST_MODIFIED
</dt>
4832 <dd class=
"description">Last-Modified field
</dd>
4833 <dt>HTTP_FIELD_LINK
</dt>
4834 <dd class=
"description">Link field
</dd>
4835 <dt>HTTP_FIELD_LOCATION
</dt>
4836 <dd class=
"description">Location field
</dd>
4837 <dt>HTTP_FIELD_MAX
</dt>
4838 <dd class=
"description">Maximum field index
</dd>
4839 <dt>HTTP_FIELD_RANGE
</dt>
4840 <dd class=
"description">Range field
</dd>
4841 <dt>HTTP_FIELD_REFERER
</dt>
4842 <dd class=
"description">Referer field
</dd>
4843 <dt>HTTP_FIELD_RETRY_AFTER
</dt>
4844 <dd class=
"description">Retry-After field
</dd>
4845 <dt>HTTP_FIELD_TRANSFER_ENCODING
</dt>
4846 <dd class=
"description">Transfer-Encoding field
</dd>
4847 <dt>HTTP_FIELD_UNKNOWN
</dt>
4848 <dd class=
"description">Unknown field
</dd>
4849 <dt>HTTP_FIELD_UPGRADE
</dt>
4850 <dd class=
"description">Upgrade field
</dd>
4851 <dt>HTTP_FIELD_USER_AGENT
</dt>
4852 <dd class=
"description">User-Agent field
</dd>
4853 <dt>HTTP_FIELD_WWW_AUTHENTICATE
</dt>
4854 <dd class=
"description">WWW-Authenticate field
</dd>
4856 <h3 class=
"enumeration"><a name=
"http_keepalive_e">http_keepalive_e
</a></h3>
4857 <p class=
"description">HTTP keep-alive values
</p>
4858 <h4 class=
"constants">Constants
</h4>
4860 <dt>HTTP_KEEPALIVE_OFF
</dt>
4861 <dd class=
"description">No keep alive support
</dd>
4862 <dt>HTTP_KEEPALIVE_ON
</dt>
4863 <dd class=
"description">Use keep alive
</dd>
4865 <h3 class=
"enumeration"><a name=
"http_state_e">http_state_e
</a></h3>
4866 <p class=
"description">HTTP state values; states
4867 are server-oriented...
</p>
4868 <h4 class=
"constants">Constants
</h4>
4870 <dt>HTTP_CLOSE
</dt>
4871 <dd class=
"description">CLOSE command, waiting for blank line
</dd>
4872 <dt>HTTP_DELETE
</dt>
4873 <dd class=
"description">DELETE command, waiting for blank line
</dd>
4875 <dd class=
"description">GET command, waiting for blank line
</dd>
4876 <dt>HTTP_GET_SEND
</dt>
4877 <dd class=
"description">GET command, sending data
</dd>
4879 <dd class=
"description">HEAD command, waiting for blank line
</dd>
4880 <dt>HTTP_OPTIONS
</dt>
4881 <dd class=
"description">OPTIONS command, waiting for blank line
</dd>
4883 <dd class=
"description">POST command, waiting for blank line
</dd>
4884 <dt>HTTP_POST_RECV
</dt>
4885 <dd class=
"description">POST command, receiving data
</dd>
4886 <dt>HTTP_POST_SEND
</dt>
4887 <dd class=
"description">POST command, sending data
</dd>
4889 <dd class=
"description">PUT command, waiting for blank line
</dd>
4890 <dt>HTTP_PUT_RECV
</dt>
4891 <dd class=
"description">PUT command, receiving data
</dd>
4892 <dt>HTTP_STATUS
</dt>
4893 <dd class=
"description">Command complete, sending status
</dd>
4894 <dt>HTTP_TRACE
</dt>
4895 <dd class=
"description">TRACE command, waiting for blank line
</dd>
4896 <dt>HTTP_WAITING
</dt>
4897 <dd class=
"description">Waiting for command
</dd>
4899 <h3 class=
"enumeration"><a name=
"http_status_e">http_status_e
</a></h3>
4900 <p class=
"description">HTTP status codes
</p>
4901 <h4 class=
"constants">Constants
</h4>
4903 <dt>HTTP_ACCEPTED
</dt>
4904 <dd class=
"description">DELETE command was successful
</dd>
4905 <dt>HTTP_AUTHORIZATION_CANCELED
<span class=
"info"> CUPS
1.4 </span></dt>
4906 <dd class=
"description">User canceled authorization
</dd>
4907 <dt>HTTP_BAD_GATEWAY
</dt>
4908 <dd class=
"description">Bad gateway
</dd>
4909 <dt>HTTP_BAD_REQUEST
</dt>
4910 <dd class=
"description">Bad request
</dd>
4911 <dt>HTTP_CONFLICT
</dt>
4912 <dd class=
"description">Request is self-conflicting
</dd>
4913 <dt>HTTP_CONTINUE
</dt>
4914 <dd class=
"description">Everything OK, keep going...
</dd>
4915 <dt>HTTP_CREATED
</dt>
4916 <dd class=
"description">PUT command was successful
</dd>
4917 <dt>HTTP_ERROR
</dt>
4918 <dd class=
"description">An error response from httpXxxx()
</dd>
4919 <dt>HTTP_EXPECTATION_FAILED
</dt>
4920 <dd class=
"description">The expectation given in an Expect header field was not met
</dd>
4921 <dt>HTTP_FORBIDDEN
</dt>
4922 <dd class=
"description">Forbidden to access this URI
</dd>
4923 <dt>HTTP_GATEWAY_TIMEOUT
</dt>
4924 <dd class=
"description">Gateway connection timed out
</dd>
4926 <dd class=
"description">Server has gone away
</dd>
4927 <dt>HTTP_LENGTH_REQUIRED
</dt>
4928 <dd class=
"description">A content length or encoding is required
</dd>
4929 <dt>HTTP_METHOD_NOT_ALLOWED
</dt>
4930 <dd class=
"description">Method is not allowed
</dd>
4931 <dt>HTTP_MOVED_PERMANENTLY
</dt>
4932 <dd class=
"description">Document has moved permanently
</dd>
4933 <dt>HTTP_MOVED_TEMPORARILY
</dt>
4934 <dd class=
"description">Document has moved temporarily
</dd>
4935 <dt>HTTP_MULTIPLE_CHOICES
</dt>
4936 <dd class=
"description">Multiple files match request
</dd>
4937 <dt>HTTP_NOT_ACCEPTABLE
</dt>
4938 <dd class=
"description">Not Acceptable
</dd>
4939 <dt>HTTP_NOT_AUTHORITATIVE
</dt>
4940 <dd class=
"description">Information isn't authoritative
</dd>
4941 <dt>HTTP_NOT_FOUND
</dt>
4942 <dd class=
"description">URI was not found
</dd>
4943 <dt>HTTP_NOT_IMPLEMENTED
</dt>
4944 <dd class=
"description">Feature not implemented
</dd>
4945 <dt>HTTP_NOT_MODIFIED
</dt>
4946 <dd class=
"description">File not modified
</dd>
4947 <dt>HTTP_NOT_SUPPORTED
</dt>
4948 <dd class=
"description">HTTP version not supported
</dd>
4949 <dt>HTTP_NO_CONTENT
</dt>
4950 <dd class=
"description">Successful command, no new data
</dd>
4952 <dd class=
"description">OPTIONS/GET/HEAD/POST/TRACE command was successful
</dd>
4953 <dt>HTTP_PARTIAL_CONTENT
</dt>
4954 <dd class=
"description">Only a partial file was recieved/sent
</dd>
4955 <dt>HTTP_PAYMENT_REQUIRED
</dt>
4956 <dd class=
"description">Payment required
</dd>
4957 <dt>HTTP_PKI_ERROR
<span class=
"info"> CUPS
1.5/Mac OS X
10.7 </span></dt>
4958 <dd class=
"description">Error negotiating a secure connection
</dd>
4959 <dt>HTTP_PRECONDITION
</dt>
4960 <dd class=
"description">Precondition failed
</dd>
4961 <dt>HTTP_PROXY_AUTHENTICATION
</dt>
4962 <dd class=
"description">Proxy Authentication is Required
</dd>
4963 <dt>HTTP_REQUESTED_RANGE
</dt>
4964 <dd class=
"description">The requested range is not satisfiable
</dd>
4965 <dt>HTTP_REQUEST_TIMEOUT
</dt>
4966 <dd class=
"description">Request timed out
</dd>
4967 <dt>HTTP_REQUEST_TOO_LARGE
</dt>
4968 <dd class=
"description">Request entity too large
</dd>
4969 <dt>HTTP_RESET_CONTENT
</dt>
4970 <dd class=
"description">Content was reset/recreated
</dd>
4971 <dt>HTTP_SEE_OTHER
</dt>
4972 <dd class=
"description">See this other link...
</dd>
4973 <dt>HTTP_SERVER_ERROR
</dt>
4974 <dd class=
"description">Internal server error
</dd>
4975 <dt>HTTP_SERVICE_UNAVAILABLE
</dt>
4976 <dd class=
"description">Service is unavailable
</dd>
4977 <dt>HTTP_SWITCHING_PROTOCOLS
</dt>
4978 <dd class=
"description">HTTP upgrade to TLS/SSL
</dd>
4979 <dt>HTTP_UNAUTHORIZED
</dt>
4980 <dd class=
"description">Unauthorized to access host
</dd>
4981 <dt>HTTP_UNSUPPORTED_MEDIATYPE
</dt>
4982 <dd class=
"description">The requested media type is unsupported
</dd>
4983 <dt>HTTP_UPGRADE_REQUIRED
</dt>
4984 <dd class=
"description">Upgrade to SSL/TLS required
</dd>
4985 <dt>HTTP_URI_TOO_LONG
</dt>
4986 <dd class=
"description">URI too long
</dd>
4987 <dt>HTTP_USE_PROXY
</dt>
4988 <dd class=
"description">Must use a proxy to access this URI
</dd>
4990 <h3 class=
"enumeration"><a name=
"http_uri_coding_e">http_uri_coding_e
</a></h3>
4991 <p class=
"description">URI en/decode flags
</p>
4992 <h4 class=
"constants">Constants
</h4>
4994 <dt>HTTP_URI_CODING_ALL
</dt>
4995 <dd class=
"description">En/decode everything
</dd>
4996 <dt>HTTP_URI_CODING_HOSTNAME
</dt>
4997 <dd class=
"description">En/decode the hostname portion
</dd>
4998 <dt>HTTP_URI_CODING_MOST
</dt>
4999 <dd class=
"description">En/decode all but the query
</dd>
5000 <dt>HTTP_URI_CODING_NONE
</dt>
5001 <dd class=
"description">Don't en/decode anything
</dd>
5002 <dt>HTTP_URI_CODING_QUERY
</dt>
5003 <dd class=
"description">En/decode the query portion
</dd>
5004 <dt>HTTP_URI_CODING_RESOURCE
</dt>
5005 <dd class=
"description">En/decode the resource portion
</dd>
5006 <dt>HTTP_URI_CODING_USERNAME
</dt>
5007 <dd class=
"description">En/decode the username portion
</dd>
5009 <h3 class=
"enumeration"><span class=
"info"> CUPS
1.2 </span><a name=
"http_uri_status_e">http_uri_status_e
</a></h3>
5010 <p class=
"description">URI separation status
</p>
5011 <h4 class=
"constants">Constants
</h4>
5013 <dt>HTTP_URI_BAD_ARGUMENTS
</dt>
5014 <dd class=
"description">Bad arguments to function (error)
</dd>
5015 <dt>HTTP_URI_BAD_HOSTNAME
</dt>
5016 <dd class=
"description">Bad hostname in URI (error)
</dd>
5017 <dt>HTTP_URI_BAD_PORT
</dt>
5018 <dd class=
"description">Bad port number in URI (error)
</dd>
5019 <dt>HTTP_URI_BAD_RESOURCE
</dt>
5020 <dd class=
"description">Bad resource in URI (error)
</dd>
5021 <dt>HTTP_URI_BAD_SCHEME
</dt>
5022 <dd class=
"description">Bad scheme in URI (error)
</dd>
5023 <dt>HTTP_URI_BAD_URI
</dt>
5024 <dd class=
"description">Bad/empty URI (error)
</dd>
5025 <dt>HTTP_URI_BAD_USERNAME
</dt>
5026 <dd class=
"description">Bad username in URI (error)
</dd>
5027 <dt>HTTP_URI_MISSING_RESOURCE
</dt>
5028 <dd class=
"description">Missing resource in URI (warning)
</dd>
5029 <dt>HTTP_URI_MISSING_SCHEME
</dt>
5030 <dd class=
"description">Missing scheme in URI (warning)
</dd>
5031 <dt>HTTP_URI_OK
</dt>
5032 <dd class=
"description">URI decoded OK
</dd>
5033 <dt>HTTP_URI_OVERFLOW
</dt>
5034 <dd class=
"description">URI buffer for httpAssembleURI is too small
</dd>
5035 <dt>HTTP_URI_UNKNOWN_SCHEME
</dt>
5036 <dd class=
"description">Unknown scheme in URI (warning)
</dd>
5038 <h3 class=
"enumeration"><a name=
"http_version_e">http_version_e
</a></h3>
5039 <p class=
"description">HTTP version numbers
</p>
5040 <h4 class=
"constants">Constants
</h4>
5043 <dd class=
"description">HTTP/
0.9</dd>
5045 <dd class=
"description">HTTP/
1.0</dd>
5047 <dd class=
"description">HTTP/
1.1</dd>
5049 <h3 class=
"enumeration"><a name=
"ipp_dstate_e">ipp_dstate_e
</a></h3>
5050 <p class=
"description">Document states
</p>
5051 <h4 class=
"constants">Constants
</h4>
5053 <dt>IPP_DOCUMENT_ABORTED
</dt>
5054 <dt>IPP_DOCUMENT_CANCELED
</dt>
5055 <dt>IPP_DOCUMENT_COMPLETED
</dt>
5056 <dt>IPP_DOCUMENT_PENDING
</dt>
5057 <dt>IPP_DOCUMENT_PROCESSING
</dt>
5059 <h3 class=
"enumeration"><a name=
"ipp_finish_e">ipp_finish_e
</a></h3>
5060 <p class=
"description">Finishings
</p>
5061 <h4 class=
"constants">Constants
</h4>
5063 <dt>IPP_FINISHINGS_BALE
</dt>
5064 <dd class=
"description">Bale (any type)
</dd>
5065 <dt>IPP_FINISHINGS_BIND
</dt>
5066 <dd class=
"description">Bind
</dd>
5067 <dt>IPP_FINISHINGS_BIND_BOTTOM
</dt>
5068 <dd class=
"description">Bind on bottom
</dd>
5069 <dt>IPP_FINISHINGS_BIND_LEFT
</dt>
5070 <dd class=
"description">Bind on left
</dd>
5071 <dt>IPP_FINISHINGS_BIND_RIGHT
</dt>
5072 <dd class=
"description">Bind on right
</dd>
5073 <dt>IPP_FINISHINGS_BIND_TOP
</dt>
5074 <dd class=
"description">Bind on top
</dd>
5075 <dt>IPP_FINISHINGS_BOOKLET_MAKER
</dt>
5076 <dd class=
"description">Fold to make booklet
</dd>
5077 <dt>IPP_FINISHINGS_COVER
</dt>
5078 <dd class=
"description">Add cover
</dd>
5079 <dt>IPP_FINISHINGS_EDGE_STITCH
</dt>
5080 <dd class=
"description">Stitch along any side
</dd>
5081 <dt>IPP_FINISHINGS_EDGE_STITCH_BOTTOM
</dt>
5082 <dd class=
"description">Stitch along bottom edge
</dd>
5083 <dt>IPP_FINISHINGS_EDGE_STITCH_LEFT
</dt>
5084 <dd class=
"description">Stitch along left side
</dd>
5085 <dt>IPP_FINISHINGS_EDGE_STITCH_RIGHT
</dt>
5086 <dd class=
"description">Stitch along right side
</dd>
5087 <dt>IPP_FINISHINGS_EDGE_STITCH_TOP
</dt>
5088 <dd class=
"description">Stitch along top edge
</dd>
5089 <dt>IPP_FINISHINGS_FOLD
</dt>
5090 <dd class=
"description">Fold (any type)
</dd>
5091 <dt>IPP_FINISHINGS_JOB_OFFSET
</dt>
5092 <dd class=
"description">Offset for binding (any type)
</dd>
5093 <dt>IPP_FINISHINGS_NONE
</dt>
5094 <dd class=
"description">No finishing
</dd>
5095 <dt>IPP_FINISHINGS_PUNCH
</dt>
5096 <dd class=
"description">Punch (any location/count)
</dd>
5097 <dt>IPP_FINISHINGS_SADDLE_STITCH
</dt>
5098 <dd class=
"description">Staple interior
</dd>
5099 <dt>IPP_FINISHINGS_STAPLE
</dt>
5100 <dd class=
"description">Staple (any location)
</dd>
5101 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_LEFT
</dt>
5102 <dd class=
"description">Staple bottom left corner
</dd>
5103 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT
</dt>
5104 <dd class=
"description">Staple bottom right corner
</dd>
5105 <dt>IPP_FINISHINGS_STAPLE_DUAL_BOTTOM
</dt>
5106 <dd class=
"description">Two staples on bottom
</dd>
5107 <dt>IPP_FINISHINGS_STAPLE_DUAL_LEFT
</dt>
5108 <dd class=
"description">Two staples on left
</dd>
5109 <dt>IPP_FINISHINGS_STAPLE_DUAL_RIGHT
</dt>
5110 <dd class=
"description">Two staples on right
</dd>
5111 <dt>IPP_FINISHINGS_STAPLE_DUAL_TOP
</dt>
5112 <dd class=
"description">Two staples on top
</dd>
5113 <dt>IPP_FINISHINGS_STAPLE_TOP_LEFT
</dt>
5114 <dd class=
"description">Staple top left corner
</dd>
5115 <dt>IPP_FINISHINGS_STAPLE_TOP_RIGHT
</dt>
5116 <dd class=
"description">Staple top right corner
</dd>
5117 <dt>IPP_FINISHINGS_TRIM
</dt>
5118 <dd class=
"description">Trim (any type)
</dd>
5119 <dt>IPP_FINISHINGS_TRIM_AFTER_COPIES
</dt>
5120 <dd class=
"description">Trim output after each copy
</dd>
5121 <dt>IPP_FINISHINGS_TRIM_AFTER_DOCUMENTS
</dt>
5122 <dd class=
"description">Trim output after each document
</dd>
5123 <dt>IPP_FINISHINGS_TRIM_AFTER_JOB
</dt>
5124 <dd class=
"description">Trim output after job
</dd>
5125 <dt>IPP_FINISHINGS_TRIM_AFTER_PAGES
</dt>
5126 <dd class=
"description">Trim output after each page
</dd>
5128 <h3 class=
"enumeration"><a name=
"ipp_jcollate_e">ipp_jcollate_e
</a></h3>
5129 <p class=
"description">Job collation types
</p>
5130 <h4 class=
"constants">Constants
</h4>
5132 <dt>IPP_JOB_COLLATED_DOCUMENTS
</dt>
5133 <dt>IPP_JOB_UNCOLLATED_DOCUMENTS
</dt>
5134 <dt>IPP_JOB_UNCOLLATED_SHEETS
</dt>
5136 <h3 class=
"enumeration"><a name=
"ipp_jstate_e">ipp_jstate_e
</a></h3>
5137 <p class=
"description">Job states
</p>
5138 <h4 class=
"constants">Constants
</h4>
5140 <dt>IPP_JOB_ABORTED
</dt>
5141 <dd class=
"description">Job has aborted due to error
</dd>
5142 <dt>IPP_JOB_CANCELED
</dt>
5143 <dd class=
"description">Job has been canceled
</dd>
5144 <dt>IPP_JOB_COMPLETED
</dt>
5145 <dd class=
"description">Job has completed successfully
</dd>
5146 <dt>IPP_JOB_HELD
</dt>
5147 <dd class=
"description">Job is held for printing
</dd>
5148 <dt>IPP_JOB_PENDING
</dt>
5149 <dd class=
"description">Job is waiting to be printed
</dd>
5150 <dt>IPP_JOB_PROCESSING
</dt>
5151 <dd class=
"description">Job is currently printing
</dd>
5152 <dt>IPP_JOB_STOPPED
</dt>
5153 <dd class=
"description">Job has been stopped
</dd>
5155 <h3 class=
"enumeration"><a name=
"ipp_op_e">ipp_op_e
</a></h3>
5156 <p class=
"description">IPP operations
</p>
5157 <h4 class=
"constants">Constants
</h4>
5159 <dt>CUPS_ACCEPT_JOBS
</dt>
5160 <dd class=
"description">Accept new jobs on a printer
</dd>
5161 <dt>CUPS_ADD_MODIFY_CLASS
</dt>
5162 <dd class=
"description">Add or modify a class
</dd>
5163 <dt>CUPS_ADD_MODIFY_PRINTER
</dt>
5164 <dd class=
"description">Add or modify a printer
</dd>
5165 <dt>CUPS_AUTHENTICATE_JOB
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5166 <dd class=
"description">Authenticate a job
</dd>
5167 <dt>CUPS_DELETE_CLASS
</dt>
5168 <dd class=
"description">Delete a class
</dd>
5169 <dt>CUPS_DELETE_PRINTER
</dt>
5170 <dd class=
"description">Delete a printer
</dd>
5171 <dt>CUPS_GET_CLASSES
<span class=
"info"> DEPRECATED
</span></dt>
5172 <dd class=
"description">Get a list of classes
</dd>
5173 <dt>CUPS_GET_DEFAULT
</dt>
5174 <dd class=
"description">Get the default printer
</dd>
5175 <dt>CUPS_GET_DEVICES
</dt>
5176 <dd class=
"description">Get a list of supported devices
</dd>
5177 <dt>CUPS_GET_DOCUMENT
<span class=
"info"> CUPS
1.4/Mac OS X
10.6 </span></dt>
5178 <dd class=
"description">Get a document file
</dd>
5179 <dt>CUPS_GET_PPD
<span class=
"info"> CUPS
1.3/Mac OS X
10.5 </span></dt>
5180 <dd class=
"description">Get a PPD file
</dd>
5181 <dt>CUPS_GET_PPDS
</dt>
5182 <dd class=
"description">Get a list of supported drivers
</dd>
5183 <dt>CUPS_GET_PRINTERS
</dt>
5184 <dd class=
"description">Get a list of printers and/or classes
</dd>
5185 <dt>CUPS_MOVE_JOB
</dt>
5186 <dd class=
"description">Move a job to a different printer
</dd>
5187 <dt>CUPS_REJECT_JOBS
</dt>
5188 <dd class=
"description">Reject new jobs on a printer
</dd>
5189 <dt>CUPS_SET_DEFAULT
</dt>
5190 <dd class=
"description">Set the default printer
</dd>
5191 <dt>IPP_CANCEL_JOB
</dt>
5192 <dd class=
"description">Cancel a job
</dd>
5193 <dt>IPP_CANCEL_JOBS
</dt>
5194 <dd class=
"description">Cancel-Jobs
</dd>
5195 <dt>IPP_CANCEL_MY_JOBS
</dt>
5196 <dd class=
"description">Cancel-My-Jobs
</dd>
5197 <dt>IPP_CANCEL_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5198 <dd class=
"description">Cancel a subscription
</dd>
5199 <dt>IPP_CLOSE_JOB
</dt>
5200 <dd class=
"description">Close-Job
</dd>
5201 <dt>IPP_CREATE_JOB
</dt>
5202 <dd class=
"description">Create an empty print job
</dd>
5203 <dt>IPP_CREATE_JOB_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5204 <dd class=
"description">Create a job subscription
</dd>
5205 <dt>IPP_CREATE_PRINTER_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5206 <dd class=
"description">Create a printer subscription
</dd>
5207 <dt>IPP_DISABLE_PRINTER
</dt>
5208 <dd class=
"description">Stop a printer
</dd>
5209 <dt>IPP_ENABLE_PRINTER
</dt>
5210 <dd class=
"description">Start a printer
</dd>
5211 <dt>IPP_GET_JOBS
</dt>
5212 <dd class=
"description">Get a list of jobs
</dd>
5213 <dt>IPP_GET_JOB_ATTRIBUTES
</dt>
5214 <dd class=
"description">Get job attributes
</dd>
5215 <dt>IPP_GET_NOTIFICATIONS
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5216 <dd class=
"description">Get notification events
</dd>
5217 <dt>IPP_GET_PRINTER_ATTRIBUTES
</dt>
5218 <dd class=
"description">Get printer attributes
</dd>
5219 <dt>IPP_GET_PRINTER_SUPPORTED_VALUES
</dt>
5220 <dd class=
"description">Get supported attribute values
</dd>
5221 <dt>IPP_GET_SUBSCRIPTIONS
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5222 <dd class=
"description">Get list of subscriptions
</dd>
5223 <dt>IPP_GET_SUBSCRIPTION_ATTRIBUTES
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5224 <dd class=
"description">Get subscription attributes
</dd>
5225 <dt>IPP_HOLD_JOB
</dt>
5226 <dd class=
"description">Hold a job for printing
</dd>
5227 <dt>IPP_IDENTIFY_PRINTER
</dt>
5228 <dd class=
"description">Identify-Printer (proposed IPP JPS3)
</dd>
5229 <dt>IPP_OP_CUPS_INVALID
</dt>
5230 <dd class=
"description">Invalid operation name for
<a href=
"#ippOpValue"><code>ippOpValue
</code></a></dd>
5231 <dt>IPP_PAUSE_PRINTER
</dt>
5232 <dd class=
"description">Stop a printer
</dd>
5233 <dt>IPP_PRINT_JOB
</dt>
5234 <dd class=
"description">Print a single file
</dd>
5235 <dt>IPP_PURGE_JOBS
</dt>
5236 <dd class=
"description">Cancel all jobs
</dd>
5237 <dt>IPP_RELEASE_JOB
</dt>
5238 <dd class=
"description">Release a job for printing
</dd>
5239 <dt>IPP_RENEW_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
5240 <dd class=
"description">Renew a printer subscription
</dd>
5241 <dt>IPP_RESTART_JOB
</dt>
5242 <dd class=
"description">Reprint a job
</dd>
5243 <dt>IPP_RESUBMIT_JOB
</dt>
5244 <dd class=
"description">Resubmit-Job
</dd>
5245 <dt>IPP_RESUME_PRINTER
</dt>
5246 <dd class=
"description">Start a printer
</dd>
5247 <dt>IPP_SEND_DOCUMENT
</dt>
5248 <dd class=
"description">Add a file to a job
</dd>
5249 <dt>IPP_SET_JOB_ATTRIBUTES
</dt>
5250 <dd class=
"description">Set job attributes
</dd>
5251 <dt>IPP_VALIDATE_DOCUMENT
</dt>
5252 <dd class=
"description">Validate-Document (proposed IPP JPS3)
</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>