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 name=
"creator" content=
"Mini-XML v2.6">
8 <style type=
"text/css"><!--
10 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
13 H1, H2, H3, H4, H5, H6, P, TD, TH {
14 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
18 font-family: monaco, courier, monospace;
23 font-family: monaco, courier, monospace;
37 border: dotted thin #999999;
42 PRE.command EM, PRE.example EM {
43 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
47 font-family: monaco, courier, monospace;
58 border: solid thin #999999;
69 -moz-border-radius: 10px;
74 text-decoration: none;
77 A:link:hover, A:visited:hover, A:active {
78 text-decoration: underline;
85 TR.data, TD.data, TR.data TD {
88 border-bottom: solid 1pt #999999;
92 border-bottom: solid 1pt #999999;
99 border: solid thin #999999;
100 border-collapse: collapse;
116 border: solid thin #cccccc;
123 border-bottom: solid thin #999999;
132 caption-side: bottom;
156 border: thin solid black;
164 H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
170 border-bottom: solid 2pt #000000;
173 DIV.indent, TABLE.indent {
181 border-collapse: collapse;
184 TABLE.indent TD, TABLE.indent TH {
189 border-collapse: collapse;
197 border-bottom: solid thin #cccccc;
202 vertical-align: bottom;
211 border-bottom: solid thin #eeeeee;
216 TABLE.list TR:nth-child(even) {
220 TABLE.list TR:nth-child(odd) {
239 font-family: monaco, courier, monospace;
243 border: solid thin #999999;
244 border-collapse: collapse;
249 DIV.summary TABLE TD, DIV.summary TABLE TH {
250 border: solid thin #999999;
256 DIV.summary TABLE THEAD TH {
260 /* API documentation styles... */
267 div.body h3, div.body h4, div.body h5 {
268 margin-bottom: 0.5em;
271 .class, .enumeration, .function, .struct, .typedef, .union {
272 border-bottom: solid thin #999999;
279 code, p.code, pre, ul.code li {
280 font-family: monaco, courier, monospace;
283 ul.code, ul.contents, ul.subcontents {
284 list-style-type: none;
294 ul.contents li ul.code, ul.contents li ul.subcontents {
307 margin-bottom: 0.5em;
310 /* This is just for the HTML files generated with the framedhelp target */
313 border: solid thin black;
322 div.contents ul.contents {
325 div.contents ul.subcontents li {
334 "$Id: api-httpipp.header 8087 2008-10-27 21:37:05Z mike $"
336 HTTP and IPP API header for the Common UNIX Printing System (CUPS).
338 Copyright 2007-2008 by Apple Inc.
339 Copyright 1997-2006 by Easy Software Products, all rights reserved.
341 These coded instructions, statements, and computer programs are the
342 property of Apple Inc. and are protected by Federal copyright
343 law. Distribution and use rights are outlined in the file "LICENSE.txt"
344 which should have been included with this file. If this file is
345 file is missing or damaged, see the license at "http://www.cups.org/".
348 <div class='summary'
><table summary='General Information'
>
362 <td>Programming:
<a href='api-overview.html'
>Introduction to CUPS Programming
</a><br>
363 Programming:
<a href='api-cups.html'
>CUPS API
</a><br>
364 References:
<a href='spec-ipp.html'
>CUPS Implementation of IPP
</a></td>
368 <h2 class=
"title">Contents
</h2>
369 <ul class=
"contents">
370 <ul class=
"subcontents">
371 <li><a href=
"#OVERVIEW">Overview
</a><ul class=
"subcontents">
372 <li><a href=
"#CREATING_URI_STRINGS">Creating URI Strings
</a></li>
373 <li><a href=
"#SENDING_REQUESTS_WITH_FILES">Sending Requests with Files
</a></li>
374 <li><a href=
"#ASYNCHRONOUS_REQUEST_PROCESSING">Asynchronous Request Processing
</a></li>
376 <li><a href=
"#FUNCTIONS">Functions
</a><ul class=
"code">
377 <li><a href=
"#cupsDoAuthentication" title=
"Authenticate a request.">cupsDoAuthentication
</a></li>
378 <li><a href=
"#cupsDoFileRequest" title=
"Do an IPP request with a file.">cupsDoFileRequest
</a></li>
379 <li><a href=
"#cupsDoIORequest" title=
"Do an IPP request with file descriptors.">cupsDoIORequest
</a></li>
380 <li><a href=
"#cupsDoRequest" title=
"Do an IPP request.">cupsDoRequest
</a></li>
381 <li><a href=
"#cupsEncodeOptions" title=
"Encode printer options into IPP attributes.">cupsEncodeOptions
</a></li>
382 <li><a href=
"#cupsEncodeOptions2" title=
"Encode printer options into IPP attributes for a group.">cupsEncodeOptions2
</a></li>
383 <li><a href=
"#cupsGetDevices" title=
"Get available printer devices.">cupsGetDevices
</a></li>
384 <li><a href=
"#cupsGetFd" title=
"Get a file from the server.">cupsGetFd
</a></li>
385 <li><a href=
"#cupsGetFile" title=
"Get a file from the server.">cupsGetFile
</a></li>
386 <li><a href=
"#cupsGetResponse" title=
"Get a response to an IPP request.">cupsGetResponse
</a></li>
387 <li><a href=
"#cupsPutFd" title=
"Put a file on the server.">cupsPutFd
</a></li>
388 <li><a href=
"#cupsPutFile" title=
"Put a file on the server.">cupsPutFile
</a></li>
389 <li><a href=
"#cupsReadResponseData" title=
"Read additional data after the IPP response.">cupsReadResponseData
</a></li>
390 <li><a href=
"#cupsSendRequest" title=
"Send an IPP request.">cupsSendRequest
</a></li>
391 <li><a href=
"#cupsWriteRequestData" title=
"Write additional data after an IPP request.">cupsWriteRequestData
</a></li>
392 <li><a href=
"#httpAddrAny" title=
"Check for the "any" address.">httpAddrAny
</a></li>
393 <li><a href=
"#httpAddrEqual" title=
"Compare two addresses.">httpAddrEqual
</a></li>
394 <li><a href=
"#httpAddrLength" title=
"Return the length of the address in bytes.">httpAddrLength
</a></li>
395 <li><a href=
"#httpAddrLocalhost" title=
"Check for the local loopback address.">httpAddrLocalhost
</a></li>
396 <li><a href=
"#httpAddrLookup" title=
"Lookup the hostname associated with the address.">httpAddrLookup
</a></li>
397 <li><a href=
"#httpAddrString" title=
"Convert an address to a numeric string.">httpAddrString
</a></li>
398 <li><a href=
"#httpAssembleURI" title=
"Assemble a uniform resource identifier from its
399 components.">httpAssembleURI
</a></li>
400 <li><a href=
"#httpAssembleURIf" title=
"Assemble a uniform resource identifier from its
401 components with a formatted resource.">httpAssembleURIf
</a></li>
402 <li><a href=
"#httpBlocking" title=
"Set blocking/non-blocking behavior on a connection.">httpBlocking
</a></li>
403 <li><a href=
"#httpCheck" title=
"Check to see if there is a pending response from the server.">httpCheck
</a></li>
404 <li><a href=
"#httpClearCookie" title=
"Clear the cookie value(s).">httpClearCookie
</a></li>
405 <li><a href=
"#httpClearFields" title=
"Clear HTTP request fields.">httpClearFields
</a></li>
406 <li><a href=
"#httpClose" title=
"Close an HTTP connection...">httpClose
</a></li>
407 <li><a href=
"#httpConnect" title=
"Connect to a HTTP server.">httpConnect
</a></li>
408 <li><a href=
"#httpConnectEncrypt" title=
"Connect to a HTTP server using encryption.">httpConnectEncrypt
</a></li>
409 <li><a href=
"#httpDecode64" title=
"Base64-decode a string.">httpDecode64
</a></li>
410 <li><a href=
"#httpDecode64_2" title=
"Base64-decode a string.">httpDecode64_2
</a></li>
411 <li><a href=
"#httpDelete" title=
"Send a DELETE request to the server.">httpDelete
</a></li>
412 <li><a href=
"#httpEncode64" title=
"Base64-encode a string.">httpEncode64
</a></li>
413 <li><a href=
"#httpEncode64_2" title=
"Base64-encode a string.">httpEncode64_2
</a></li>
414 <li><a href=
"#httpEncryption" title=
"Set the required encryption on the link.">httpEncryption
</a></li>
415 <li><a href=
"#httpError" title=
"Get the last error on a connection.">httpError
</a></li>
416 <li><a href=
"#httpFlush" title=
"Flush data from a HTTP connection.">httpFlush
</a></li>
417 <li><a href=
"#httpFlushWrite" title=
"Flush data in write buffer.">httpFlushWrite
</a></li>
418 <li><a href=
"#httpGet" title=
"Send a GET request to the server.">httpGet
</a></li>
419 <li><a href=
"#httpGetAuthString" title=
"Get the current authorization string.">httpGetAuthString
</a></li>
420 <li><a href=
"#httpGetBlocking" title=
"Get the blocking/non-block state of a connection.">httpGetBlocking
</a></li>
421 <li><a href=
"#httpGetCookie" title=
"Get any cookie data from the response.">httpGetCookie
</a></li>
422 <li><a href=
"#httpGetDateString" title=
"Get a formatted date/time string from a time value.">httpGetDateString
</a></li>
423 <li><a href=
"#httpGetDateString2" title=
"Get a formatted date/time string from a time value.">httpGetDateString2
</a></li>
424 <li><a href=
"#httpGetDateTime" title=
"Get a time value from a formatted date/time string.">httpGetDateTime
</a></li>
425 <li><a href=
"#httpGetFd" title=
"Get the file descriptor associated with a connection.">httpGetFd
</a></li>
426 <li><a href=
"#httpGetField" title=
"Get a field value from a request/response.">httpGetField
</a></li>
427 <li><a href=
"#httpGetHostByName" title=
"Lookup a hostname or IPv4 address, and return
428 address records for the specified name.">httpGetHostByName
</a></li>
429 <li><a href=
"#httpGetHostname" title=
"Get the FQDN for the connection or local system.">httpGetHostname
</a></li>
430 <li><a href=
"#httpGetLength" title=
"Get the amount of data remaining from the
431 content-length or transfer-encoding fields.">httpGetLength
</a></li>
432 <li><a href=
"#httpGetLength2" title=
"Get the amount of data remaining from the
433 content-length or transfer-encoding fields.">httpGetLength2
</a></li>
434 <li><a href=
"#httpGetStatus" title=
"Get the status of the last HTTP request.">httpGetStatus
</a></li>
435 <li><a href=
"#httpGetSubField" title=
"Get a sub-field value.">httpGetSubField
</a></li>
436 <li><a href=
"#httpGetSubField2" title=
"Get a sub-field value.">httpGetSubField2
</a></li>
437 <li><a href=
"#httpGets" title=
"Get a line of text from a HTTP connection.">httpGets
</a></li>
438 <li><a href=
"#httpHead" title=
"Send a HEAD request to the server.">httpHead
</a></li>
439 <li><a href=
"#httpInitialize" title=
"Initialize the HTTP interface library and set the
440 default HTTP proxy (if any).">httpInitialize
</a></li>
441 <li><a href=
"#httpMD5" title=
"Compute the MD5 sum of the username:group:password.">httpMD5
</a></li>
442 <li><a href=
"#httpMD5Final" title=
"Combine the MD5 sum of the username, group, and password
443 with the server-supplied nonce value, method, and
444 request-uri.">httpMD5Final
</a></li>
445 <li><a href=
"#httpMD5String" title=
"Convert an MD5 sum to a character string.">httpMD5String
</a></li>
446 <li><a href=
"#httpOptions" title=
"Send an OPTIONS request to the server.">httpOptions
</a></li>
447 <li><a href=
"#httpPost" title=
"Send a POST request to the server.">httpPost
</a></li>
448 <li><a href=
"#httpPut" title=
"Send a PUT request to the server.">httpPut
</a></li>
449 <li><a href=
"#httpRead" title=
"Read data from a HTTP connection.">httpRead
</a></li>
450 <li><a href=
"#httpRead2" title=
"Read data from a HTTP connection.">httpRead2
</a></li>
451 <li><a href=
"#httpReconnect" title=
"Reconnect to a HTTP server.">httpReconnect
</a></li>
452 <li><a href=
"#httpSeparate" title=
"Separate a Universal Resource Identifier into its
453 components.">httpSeparate
</a></li>
454 <li><a href=
"#httpSeparate2" title=
"Separate a Universal Resource Identifier into its
455 components.">httpSeparate2
</a></li>
456 <li><a href=
"#httpSeparateURI" title=
"Separate a Universal Resource Identifier into its
457 components.">httpSeparateURI
</a></li>
458 <li><a href=
"#httpSetAuthString" title=
"Set the current authorization string.">httpSetAuthString
</a></li>
459 <li><a href=
"#httpSetCookie" title=
"Set the cookie value(s)...">httpSetCookie
</a></li>
460 <li><a href=
"#httpSetExpect" title=
"Set the Expect: header in a request.">httpSetExpect
</a></li>
461 <li><a href=
"#httpSetField" title=
"Set the value of an HTTP header.">httpSetField
</a></li>
462 <li><a href=
"#httpSetLength" title=
"Set the content-length and content-encoding.">httpSetLength
</a></li>
463 <li><a href=
"#httpStatus" title=
"Return a short string describing a HTTP status code.">httpStatus
</a></li>
464 <li><a href=
"#httpTrace" title=
"Send an TRACE request to the server.">httpTrace
</a></li>
465 <li><a href=
"#httpUpdate" title=
"Update the current HTTP state for incoming data.">httpUpdate
</a></li>
466 <li><a href=
"#httpWait" title=
"Wait for data available on a connection.">httpWait
</a></li>
467 <li><a href=
"#httpWrite" title=
"Write data to a HTTP connection.">httpWrite
</a></li>
468 <li><a href=
"#httpWrite2" title=
"Write data to a HTTP connection.">httpWrite2
</a></li>
469 <li><a href=
"#ippAddBoolean" title=
"Add a boolean attribute to an IPP message.">ippAddBoolean
</a></li>
470 <li><a href=
"#ippAddBooleans" title=
"Add an array of boolean values.">ippAddBooleans
</a></li>
471 <li><a href=
"#ippAddCollection" title=
"Add a collection value.">ippAddCollection
</a></li>
472 <li><a href=
"#ippAddCollections" title=
"Add an array of collection values.">ippAddCollections
</a></li>
473 <li><a href=
"#ippAddDate" title=
"Add a date attribute to an IPP message.">ippAddDate
</a></li>
474 <li><a href=
"#ippAddInteger" title=
"Add a integer attribute to an IPP message.">ippAddInteger
</a></li>
475 <li><a href=
"#ippAddIntegers" title=
"Add an array of integer values.">ippAddIntegers
</a></li>
476 <li><a href=
"#ippAddOctetString" title=
"Add an octetString value to an IPP message.">ippAddOctetString
</a></li>
477 <li><a href=
"#ippAddRange" title=
"Add a range of values to an IPP message.">ippAddRange
</a></li>
478 <li><a href=
"#ippAddRanges" title=
"Add ranges of values to an IPP message.">ippAddRanges
</a></li>
479 <li><a href=
"#ippAddResolution" title=
"Add a resolution value to an IPP message.">ippAddResolution
</a></li>
480 <li><a href=
"#ippAddResolutions" title=
"Add resolution values to an IPP message.">ippAddResolutions
</a></li>
481 <li><a href=
"#ippAddSeparator" title=
"Add a group separator to an IPP message.">ippAddSeparator
</a></li>
482 <li><a href=
"#ippAddString" title=
"Add a language-encoded string to an IPP message.">ippAddString
</a></li>
483 <li><a href=
"#ippAddStrings" title=
"Add language-encoded strings to an IPP message.">ippAddStrings
</a></li>
484 <li><a href=
"#ippDateToTime" title=
"Convert from RFC 1903 Date/Time format to UNIX time
485 in seconds.">ippDateToTime
</a></li>
486 <li><a href=
"#ippDelete" title=
"Delete an IPP message.">ippDelete
</a></li>
487 <li><a href=
"#ippDeleteAttribute" title=
"Delete a single attribute in an IPP message.">ippDeleteAttribute
</a></li>
488 <li><a href=
"#ippErrorString" title=
"Return a name for the given status code.">ippErrorString
</a></li>
489 <li><a href=
"#ippErrorValue" title=
"Return a status code for the given name.">ippErrorValue
</a></li>
490 <li><a href=
"#ippFindAttribute" title=
"Find a named attribute in a request...">ippFindAttribute
</a></li>
491 <li><a href=
"#ippFindNextAttribute" title=
"Find the next named attribute in a request...">ippFindNextAttribute
</a></li>
492 <li><a href=
"#ippLength" title=
"Compute the length of an IPP message.">ippLength
</a></li>
493 <li><a href=
"#ippNew" title=
"Allocate a new IPP message.">ippNew
</a></li>
494 <li><a href=
"#ippNewRequest" title=
"Allocate a new IPP request message.">ippNewRequest
</a></li>
495 <li><a href=
"#ippOpString" title=
"Return a name for the given operation id.">ippOpString
</a></li>
496 <li><a href=
"#ippOpValue" title=
"Return an operation id for the given name.">ippOpValue
</a></li>
497 <li><a href=
"#ippPort" title=
"Return the default IPP port number.">ippPort
</a></li>
498 <li><a href=
"#ippRead" title=
"Read data for an IPP message from a HTTP connection.">ippRead
</a></li>
499 <li><a href=
"#ippReadFile" title=
"Read data for an IPP message from a file.">ippReadFile
</a></li>
500 <li><a href=
"#ippReadIO" title=
"Read data for an IPP message.">ippReadIO
</a></li>
501 <li><a href=
"#ippSetPort" title=
"Set the default port number.">ippSetPort
</a></li>
502 <li><a href=
"#ippTagString" title=
"Return the tag name corresponding to a tag value.">ippTagString
</a></li>
503 <li><a href=
"#ippTagValue" title=
"Return the tag value corresponding to a tag name.">ippTagValue
</a></li>
504 <li><a href=
"#ippTimeToDate" title=
"Convert from UNIX time to RFC 1903 format.">ippTimeToDate
</a></li>
505 <li><a href=
"#ippWrite" title=
"Write data for an IPP message to a HTTP connection.">ippWrite
</a></li>
506 <li><a href=
"#ippWriteFile" title=
"Write data for an IPP message to a file.">ippWriteFile
</a></li>
507 <li><a href=
"#ippWriteIO" title=
"Write data for an IPP message.">ippWriteIO
</a></li>
509 <li><a href=
"#TYPES">Data Types
</a><ul class=
"code">
510 <li><a href=
"#http_addrlist_t" title=
"Socket address list, which is
511 used to enumerate all of the
512 addresses that are associated
513 with a hostname. ">http_addrlist_t
</a></li>
514 <li><a href=
"#http_auth_t" title=
"HTTP authentication types">http_auth_t
</a></li>
515 <li><a href=
"#http_encoding_t" title=
"HTTP transfer encoding values">http_encoding_t
</a></li>
516 <li><a href=
"#http_encryption_t" title=
"HTTP encryption values">http_encryption_t
</a></li>
517 <li><a href=
"#http_field_t" title=
"HTTP field names">http_field_t
</a></li>
518 <li><a href=
"#http_keepalive_t" title=
"Types and structures...">http_keepalive_t
</a></li>
519 <li><a href=
"#http_status_t" title=
"HTTP status codes">http_status_t
</a></li>
520 <li><a href=
"#http_t" title=
"HTTP connection type">http_t
</a></li>
521 <li><a href=
"#http_uri_coding_t" title=
"HTTP version numbers">http_uri_coding_t
</a></li>
522 <li><a href=
"#http_uri_status_t" title=
"URI en/decode flags">http_uri_status_t
</a></li>
523 <li><a href=
"#http_version_t" title=
"Socket address union, which
524 makes using IPv6 and other
525 address types easier and
526 more portable. ">http_version_t
</a></li>
527 <li><a href=
"#ipp_attribute_t" title=
"Attribute">ipp_attribute_t
</a></li>
528 <li><a href=
"#ipp_finish_t" title=
"Orientation...">ipp_finish_t
</a></li>
529 <li><a href=
"#ipp_iocb_t" title=
"IPP IO Callback Function ">ipp_iocb_t
</a></li>
530 <li><a href=
"#ipp_jstate_t" title=
"Printer States....">ipp_jstate_t
</a></li>
531 <li><a href=
"#ipp_op_t" title=
"Old names for the operations">ipp_op_t
</a></li>
532 <li><a href=
"#ipp_orient_t" title=
"Qualities...">ipp_orient_t
</a></li>
533 <li><a href=
"#ipp_pstate_t" title=
"IPP states...">ipp_pstate_t
</a></li>
534 <li><a href=
"#ipp_quality_t" title=
"Job States....">ipp_quality_t
</a></li>
535 <li><a href=
"#ipp_request_t" title=
"Request Header">ipp_request_t
</a></li>
536 <li><a href=
"#ipp_res_t" title=
"Types and structures...">ipp_res_t
</a></li>
537 <li><a href=
"#ipp_state_t" title=
"IPP operations...">ipp_state_t
</a></li>
538 <li><a href=
"#ipp_t" title=
"Attribute Value">ipp_t
</a></li>
539 <li><a href=
"#ipp_uchar_t" title=
"IPP status codes...">ipp_uchar_t
</a></li>
540 <li><a href=
"#ipp_tag_t" title=
"Format tags for attributes...">ipp_tag_t
</a></li>
541 <li><a href=
"#ipp_value_t" title=
"New in CUPS 1.1.19">ipp_value_t
</a></li>
543 <li><a href=
"#STRUCTURES">Structures
</a><ul class=
"code">
544 <li><a href=
"#http_addrlist_s" title=
"Socket address list, which is
545 used to enumerate all of the
546 addresses that are associated
547 with a hostname. ">http_addrlist_s
</a></li>
548 <li><a href=
"#ipp_attribute_s" title=
"Attribute">ipp_attribute_s
</a></li>
549 <li><a href=
"#ipp_s" title=
"IPP Request/Response/Notification">ipp_s
</a></li>
551 <li><a href=
"#UNIONS">Unions
</a><ul class=
"code">
552 <li><a href=
"#ipp_request_u" title=
"Request Header">ipp_request_u
</a></li>
553 <li><a href=
"#ipp_value_u" title=
"New in CUPS 1.1.19">ipp_value_u
</a></li>
555 <li><a href=
"#ENUMERATIONS">Constants
</a><ul class=
"code">
556 <li><a href=
"#http_auth_e" title=
"HTTP authentication types">http_auth_e
</a></li>
557 <li><a href=
"#http_encoding_e" title=
"HTTP transfer encoding values">http_encoding_e
</a></li>
558 <li><a href=
"#http_encryption_e" title=
"HTTP encryption values">http_encryption_e
</a></li>
559 <li><a href=
"#http_field_e" title=
"HTTP field names">http_field_e
</a></li>
560 <li><a href=
"#http_keepalive_e" title=
"Types and structures...">http_keepalive_e
</a></li>
561 <li><a href=
"#http_state_e" title=
"">http_state_e
</a></li>
562 <li><a href=
"#http_status_e" title=
"HTTP status codes">http_status_e
</a></li>
563 <li><a href=
"#http_uri_coding_e" title=
"">http_uri_coding_e
</a></li>
564 <li><a href=
"#http_uri_status_e" title=
"">http_uri_status_e
</a></li>
565 <li><a href=
"#http_version_e" title=
"">http_version_e
</a></li>
566 <li><a href=
"#ipp_finish_e" title=
"">ipp_finish_e
</a></li>
567 <li><a href=
"#ipp_jstate_e" title=
"">ipp_jstate_e
</a></li>
568 <li><a href=
"#ipp_op_e" title=
"">ipp_op_e
</a></li>
569 <li><a href=
"#ipp_orient_e" title=
"">ipp_orient_e
</a></li>
570 <li><a href=
"#ipp_pstate_e" title=
"">ipp_pstate_e
</a></li>
571 <li><a href=
"#ipp_quality_e" title=
"">ipp_quality_e
</a></li>
572 <li><a href=
"#ipp_res_e" title=
"Types and structures...">ipp_res_e
</a></li>
573 <li><a href=
"#ipp_state_e" title=
"">ipp_state_e
</a></li>
574 <li><a href=
"#ipp_status_e" title=
"IPP status codes...">ipp_status_e
</a></li>
575 <li><a href=
"#ipp_tag_e" title=
"Format tags for attributes...">ipp_tag_e
</a></li>
578 "$Id: api-httpipp.shtml 7684 2008-06-23 16:47:38Z mike $"
580 HTTP and IPP API introduction for the Common UNIX Printing System (CUPS).
582 Copyright 2007-2008 by Apple Inc.
583 Copyright 1997-2006 by Easy Software Products, all rights reserved.
585 These coded instructions, statements, and computer programs are the
586 property of Apple Inc. and are protected by Federal copyright
587 law. Distribution and use rights are outlined in the file "LICENSE.txt"
588 which should have been included with this file. If this file is
589 file is missing or damaged, see the license at "http://www.cups.org/".
592 <h2 class='title'
><a name='OVERVIEW'
>Overview
</a></h2>
594 <p>The CUPS HTTP and IPP APIs provide low-level access to the HTTP and IPP
595 protocols and CUPS scheduler. They are typically used by monitoring and
596 administration programs to perform specific functions not supported by the
597 high-level CUPS API functions.
</p>
599 <p>The HTTP APIs use an opaque structure called
600 <a href='#http_t'
><code>http_t
</code></a> to manage connections to
601 a particular HTTP or IPP server. The
602 <a href='#httpConnectEncrypt'
><code>httpConnectEncrypt
</code></a> function is
603 used to create an instance of this structure for a particular server.
604 The constant
<code>CUPS_HTTP_DEFAULT
</code> can be used with all of the
605 <code>cups
</code> functions to refer to the default CUPS server - the functions
606 create a per-thread
<a href='#http_t'
><code>http_t
</code></a> as needed.
</p>
608 <p>The IPP APIs use two structures for requests (messages sent to the CUPS
609 scheduler) and responses (messages sent back to your application from the
610 scheduler). The
<a href='#ipp_t'
><code>ipp_t
</code></a> structure holds a
611 complete request or response and is allocated using the
612 <a href='#ippNew'
><code>ippNew
</code></a> or
613 <a href='#ippNewRequest'
><code>ippNewRequest
</code></a> functions and
614 freed using the
<a href='#ippDelete'
><code>ippDelete
</code></a> function.
</p>
616 <p>The second structure is called
617 <a href='#ipp_attribute_t'
><code>ipp_attribute_t
</code></a> and holds a
618 single IPP attribute which consists of a group tag (
<code>group_tag
</code>), a
619 value type tag (
<code>value_tag
</code>), the attribute name (
<code>name
</code>),
620 and
1 or more values (
<code>values[]
</code>). Attributes are added to an
621 <a href='#ipp_t'
><code>ipp_t
</code></a> structure using one of the
622 <code>ippAdd
</code> functions. For example, use
623 <a href='#ippAddString'
><code>ippAddString
</code></a> to add a
624 "requesting-user-name" string attribute to a request:
</p>
626 <pre class='example'
>
627 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_GET_JOBS);
629 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
633 <p>Once you have created an IPP request, use the
<code>cups
</code>
634 functions to send the request to and read the response from the server.
635 For example, the
<a href='#cupsDoRequest'
><code>cupsDoRequest
</code></a>
636 function can be used for simple query operations that do not involve files:
</p>
638 <pre class='example'
>
639 #include
<cups/cups.h
>
642 <a href='#ipp_t'
>ipp_t
</a> *
<a name='get_jobs'
>get_jobs
</a>(void)
644 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_GET_JOBS);
646 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
649 return (
<a href='#cupsDoRequest'
>cupsDoRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/"));
653 <p>The
<a href='#cupsDoRequest'
><code>cupsDoRequest
</code></a> function frees
654 the request structure and returns an IPP response structure or NULL pointer if
655 the request could not be sent to the server. Once you have a response from
656 the server, you can either use the
657 <a href='#ippFindAttribute'
><code>ippFindAttribute
</code></a> and
658 <a href='#ippFindNextAttribute'
><code>ippFindNextAttribute
</code></a> functions
659 to find specific attributes, for example:
</p>
661 <pre class='example'
>
662 <a href='#ipp_t'
>ipp_t
</a> *response;
663 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
665 attr =
<a href='#ippFindAttribute'
>ippFindAttribute
</a>(response,
"printer-state", IPP_TAG_ENUM);
668 <p>You can also walk the list of attributes with a simple
<code>for
</code> loop
671 <pre class='example'
>
672 <a href='#ipp_t'
>ipp_t
</a> *response;
673 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
675 for (attr = response-
>attrs; attr != NULL; attr = attr-
>next)
676 if (attr-
>name == NULL)
677 puts(
"--SEPARATOR--");
682 <p>The
<code>for
</code> loop approach is normally used when collecting
683 attributes for multiple objects (jobs, printers, etc.) in a response. Attributes
684 with
<code>NULL
</code> names indicate a separator between the attributes of
685 each object. For example, the following code will list the jobs returned from
686 our previous
<a href='#get_jobs'
><code>get_jobs
</code></a> example code:
</p>
688 <pre class='example'
>
689 <a href='#ipp_t'
>ipp_t
</a> *response =
<a href='#get_jobs'
>get_jobs
</a>();
691 if (response != NULL)
693 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
695 char *job_name = NULL;
696 char *job_originating_user_name = NULL;
698 puts(
"Job ID Owner Title");
699 puts(
"------ ---------------- ---------------------------------");
701 for (attr = response-
>attrs; attr != NULL; attr = attr-
>next)
703 /* Attributes without names are separators between jobs */
704 if (attr-
>name == NULL)
706 if (job_id
> 0 && job_name != NULL
&& job_originating_user_name != NULL)
707 printf(
"%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
711 job_originating_user_name = NULL;
714 else if (!strcmp(attr-
>name,
"job-id")
&& attr-
>value_tag == IPP_TAG_INTEGER)
715 job_id = attr-
>values[
0].integer;
716 else if (!strcmp(attr-
>name,
"job-name")
&& attr-
>value_tag == IPP_TAG_NAME)
717 job_name = attr-
>values[
0].string.text;
718 else if (!strcmp(attr-
>name,
"job-originating-user-name")
&&
719 attr-
>value_tag == IPP_TAG_NAME)
720 job_originating_user_name = attr-
>values[
0].string.text;
723 if (job_id
> 0 && job_name != NULL
&& job_originating_user_name != NULL)
724 printf(
"%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
728 <h3><a name='CREATING_URI_STRINGS'
>Creating URI Strings
</a></h3>
730 <p>To ensure proper encoding, the
731 <a href='#httpAssembleURIf'
><code>httpAssembleURIf
</code></a> function must be
732 used to format a
"printer-uri" string for all printer-based requests:
</p>
734 <pre class='example'
>
735 const char *name =
"Foo";
737 <a href='#ipp_t'
>ipp_t
</a> *request;
739 <a href='#httpAssembleURIf'
>httpAssembleURIf
</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri),
"ipp", NULL, cupsServer(),
740 ippPort(),
"/printers/%s", name);
741 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
744 <h3><a name='SENDING_REQUESTS_WITH_FILES'
>Sending Requests with Files
</a></h3>
746 <p>The
<a href='#cupsDoFileRequest'
><code>cupsDoFileRequest
</code></a> and
747 <a href='#cupsDoIORequest'
><code>cupsDoIORequest
</code></a> functions are
748 used for requests involving files. The
749 <a href='#cupsDoFileRequest'
><code>cupsDoFileRequest
</code></a> function
750 attaches the named file to a request and is typically used when sending a print
751 file or changing a printer's PPD file:
</p>
753 <pre class='example'
>
754 const char *filename =
"/usr/share/cups/data/testprint.ps";
755 const char *name =
"Foo";
758 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_PRINT_JOB);
759 <a href='#ipp_t'
>ipp_t
</a> *response;
761 /* Use httpAssembleURIf for the printer-uri string */
762 <a href='#httpAssembleURIf'
>httpAssembleURIf
</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri),
"ipp", NULL, cupsServer(),
763 ippPort(),
"/printers/%s", name);
764 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
765 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
767 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"job-name",
768 NULL,
"testprint.ps");
770 /* Use snprintf for the resource path */
771 snprintf(resource, sizeof(resource),
"/printers/%s", name);
773 response =
<a href='#cupsDoFileRequest'
>cupsDoFileRequest
</a>(CUPS_HTTP_DEFAULT, request, resource, filename);
776 <p>The
<a href='#cupsDoIORequest'
><code>cupsDoIORequest
</code></a> function
777 optionally attaches a file to the request and optionally saves a file in the
778 response from the server. It is used when using a pipe for the request
779 attachment or when using a request that returns a file, currently only
780 <code>CUPS_GET_DOCUMENT
</code> and
<code>CUPS_GET_PPD
</code>. For example,
781 the following code will download the PPD file for the sample HP LaserJet
784 <pre class='example'
>
787 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
788 <a href='#ipp_t'
>ipp_t
</a> *response;
790 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
791 NULL,
"laserjet.ppd");
793 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
795 response =
<a href='#cupsDoIORequest'
>cupsDoIORequest
</a>(CUPS_HTTP_DEFAULT, request,
"/", -
1, tempfd);
798 <p>The example passes
<code>-
1</code> for the input file descriptor to specify
799 that no file is to be attached to the request. The PPD file attached to the
800 response is written to the temporary file descriptor we created using the
801 <code>cupsTempFd
</code> function.
</p>
803 <h3><a name='ASYNCHRONOUS_REQUEST_PROCESSING'
>Asynchronous Request Processing
</a></h3>
805 <p>The
<a href='#cupsSendRequest'
><code>cupsSendRequest
</code></a> and
806 <a href='#cupsGetResponse'
><code>cupsGetResponse
</code></a> support
807 asynchronous communications with the server. Unlike the other request
808 functions, the IPP request is not automatically freed, so remember to
809 free your request with the
<a href='#ippDelete'
><code>ippDelete
</code></a>
812 <p>File data is attached to the request using the
813 <a href='#cupsWriteRequestData'
><code>cupsWriteRequestData
</code></a>
814 function, while file data returned from the server is read using the
815 <a href='#cupsReadResponseData'
><code>cupsReadResponseData
</code></a>
816 function. We can rewrite the previous
<code>CUPS_GET_PPD
</code> example
817 to use the asynchronous functions quite easily:
</p>
819 <pre class='example'
>
822 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
823 <a href='#ipp_t'
>ipp_t
</a> *response;
825 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
826 NULL,
"laserjet.ppd");
828 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
830 if (
<a href='#cupsSendRequest'
>cupsSendRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/") == HTTP_CONTINUE)
832 response =
<a href='#cupsGetResponse'
>cupsGetResponse
</a>(CUPS_HTTP_DEFAULT,
"/");
834 if (response != NULL)
839 while ((bytes =
<a href='#cupsReadResponseData'
>cupsReadResponseData
</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer)))
> 0)
840 write(tempfd, buffer, bytes);
844 /* Free the request! */
845 <a href='#ippDelete'
>ippDelete
</a>(request);
848 <p>The
<a href='#cupsSendRequest'
><code>cupsSendRequest
</code></a> function
849 returns the initial HTTP request status, typically either
850 <code>HTTP_CONTINUE
</code> or
<code>HTTP_UNAUTHORIZED
</code>. The latter status
851 is returned when the request requires authentication of some sort. The
852 <a href='#cupsDoAuthentication'
><code>cupsDoAuthentication
</code></a> function
853 must be called when your see
<code>HTTP_UNAUTHORIZED
</code> and the request
854 re-sent. We can add authentication support to our example code by using a
855 <code>do ... while
</code> loop:
</p>
857 <pre class='example'
>
860 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
861 <a href='#ipp_t'
>ipp_t
</a> *response;
862 http_status_t status;
864 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
865 NULL,
"laserjet.ppd");
867 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
869 /* Loop for authentication */
872 status =
<a href='#cupsSendRequest'
>cupsSendRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/");
874 if (status == HTTP_UNAUTHORIZED)
876 /* Try to authenticate, break out of the loop if that fails */
877 if (
<a href='#cupsDoAuthentication'
>cupsDoAuthentication
</a>(CUPS_HTTP_DEFAULT,
"POST",
"/"))
881 while (status != HTTP_CONTINUE
&& status != HTTP_UNAUTHORIZED);
883 if (status == HTTP_CONTINUE)
885 response =
<a href='#cupsGetResponse'
>cupsGetResponse
</a>(CUPS_HTTP_DEFAULT,
"/");
887 if (response != NULL)
892 while ((bytes =
<a href='#cupsReadResponseData'
>cupsReadResponseData
</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer)))
> 0)
893 write(tempfd, buffer, bytes);
897 /* Free the request! */
898 <a href='#ippDelete'
>ippDelete
</a>(request);
900 <h2 class=
"title"><a name=
"FUNCTIONS">Functions
</a></h2>
901 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/Mac OS X
10.4 </span><a name=
"cupsDoAuthentication">cupsDoAuthentication
</a></h3>
902 <p class=
"description">Authenticate a request.
</p>
904 int cupsDoAuthentication (
<br>
905 <a href=
"#http_t">http_t
</a> *http,
<br>
906 const char *method,
<br>
907 const char *resource
<br>
909 <h4 class=
"parameters">Parameters
</h4>
912 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
914 <dd class=
"description">Request method (
"GET
",
"POST
",
"PUT
")
</dd>
916 <dd class=
"description">Resource path
</dd>
918 <h4 class=
"returnvalue">Return Value
</h4>
919 <p class=
"description">0 on success, -
1 on error
</p>
920 <h4 class=
"discussion">Discussion
</h4>
921 <p class=
"discussion">This function should be called in response to a
<code>HTTP_UNAUTHORIZED
</code>
922 status, prior to resubmitting your request.
925 <h3 class=
"function"><a name=
"cupsDoFileRequest">cupsDoFileRequest
</a></h3>
926 <p class=
"description">Do an IPP request with a file.
</p>
928 <a href=
"#ipp_t">ipp_t
</a> *cupsDoFileRequest (
<br>
929 <a href=
"#http_t">http_t
</a> *http,
<br>
930 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
931 const char *resource,
<br>
932 const char *filename
<br>
934 <h4 class=
"parameters">Parameters
</h4>
937 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
939 <dd class=
"description">IPP request
</dd>
941 <dd class=
"description">HTTP resource for POST
</dd>
943 <dd class=
"description">File to send or
<code>NULL
</code> for none
</dd>
945 <h4 class=
"returnvalue">Return Value
</h4>
946 <p class=
"description">Response data
</p>
947 <h4 class=
"discussion">Discussion
</h4>
948 <p class=
"discussion">This function sends the IPP request to the specified server, retrying
949 and authenticating as necessary. The request is freed with
<a href=
"#ippDelete"><code>ippDelete
</code></a>
950 after receiving a valid IPP response.
</p>
951 <h3 class=
"function"><span class=
"info"> CUPS
1.3/Mac OS X
10.5 </span><a name=
"cupsDoIORequest">cupsDoIORequest
</a></h3>
952 <p class=
"description">Do an IPP request with file descriptors.
</p>
954 <a href=
"#ipp_t">ipp_t
</a> *cupsDoIORequest (
<br>
955 <a href=
"#http_t">http_t
</a> *http,
<br>
956 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
957 const char *resource,
<br>
958 int infile,
<br>
959 int outfile
<br>
961 <h4 class=
"parameters">Parameters
</h4>
964 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
966 <dd class=
"description">IPP request
</dd>
968 <dd class=
"description">HTTP resource for POST
</dd>
970 <dd class=
"description">File to read from or -
1 for none
</dd>
972 <dd class=
"description">File to write to or -
1 for none
</dd>
974 <h4 class=
"returnvalue">Return Value
</h4>
975 <p class=
"description">Response data
</p>
976 <h4 class=
"discussion">Discussion
</h4>
977 <p class=
"discussion">This function sends the IPP request to the specified server, retrying
978 and authenticating as necessary. The request is freed with ippDelete()
979 after receiving a valid IPP response.
<br>
981 If
"infile
" is a valid file descriptor, cupsDoIORequest() copies
982 all of the data from the file after the IPP request message.
<br>
984 If
"outfile
" is a valid file descriptor, cupsDoIORequest() copies
985 all of the data after the IPP response message to the file.
988 <h3 class=
"function"><a name=
"cupsDoRequest">cupsDoRequest
</a></h3>
989 <p class=
"description">Do an IPP request.
</p>
991 <a href=
"#ipp_t">ipp_t
</a> *cupsDoRequest (
<br>
992 <a href=
"#http_t">http_t
</a> *http,
<br>
993 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
994 const char *resource
<br>
996 <h4 class=
"parameters">Parameters
</h4>
999 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1001 <dd class=
"description">IPP request
</dd>
1003 <dd class=
"description">HTTP resource for POST
</dd>
1005 <h4 class=
"returnvalue">Return Value
</h4>
1006 <p class=
"description">Response data
</p>
1007 <h4 class=
"discussion">Discussion
</h4>
1008 <p class=
"discussion">This function sends the IPP request to the specified server, retrying
1009 and authenticating as necessary. The request is freed with ippDelete()
1010 after receiving a valid IPP response.
</p>
1011 <h3 class=
"function"><a name=
"cupsEncodeOptions">cupsEncodeOptions
</a></h3>
1012 <p class=
"description">Encode printer options into IPP attributes.
</p>
1014 void cupsEncodeOptions (
<br>
1015 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
1016 int num_options,
<br>
1017 cups_option_t *options
<br>
1019 <h4 class=
"parameters">Parameters
</h4>
1022 <dd class=
"description">Request to add to
</dd>
1023 <dt>num_options
</dt>
1024 <dd class=
"description">Number of options
</dd>
1026 <dd class=
"description">Options
</dd>
1028 <h4 class=
"discussion">Discussion
</h4>
1029 <p class=
"discussion">This function adds operation, job, and then subscription attributes,
1030 in that order. Use the cupsEncodeOptions2() function to add attributes
1031 for a single group.
</p>
1032 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"cupsEncodeOptions2">cupsEncodeOptions2
</a></h3>
1033 <p class=
"description">Encode printer options into IPP attributes for a group.
</p>
1035 void cupsEncodeOptions2 (
<br>
1036 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
1037 int num_options,
<br>
1038 cups_option_t *options,
<br>
1039 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group_tag
<br>
1041 <h4 class=
"parameters">Parameters
</h4>
1044 <dd class=
"description">Request to add to
</dd>
1045 <dt>num_options
</dt>
1046 <dd class=
"description">Number of options
</dd>
1048 <dd class=
"description">Options
</dd>
1050 <dd class=
"description">Group to encode
</dd>
1052 <h4 class=
"discussion">Discussion
</h4>
1053 <p class=
"discussion">This function only adds attributes for a single group. Call this
1054 function multiple times for each group, or use cupsEncodeOptions()
1055 to add the standard groups.
1058 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"cupsGetDevices">cupsGetDevices
</a></h3>
1059 <p class=
"description">Get available printer devices.
</p>
1061 ipp_status_t cupsGetDevices (
<br>
1062 <a href=
"#http_t">http_t
</a> *http,
<br>
1063 int timeout,
<br>
1064 const char *include_schemes,
<br>
1065 const char *exclude_schemes,
<br>
1066 cups_device_cb_t callback,
<br>
1067 void *user_data
<br>
1069 <h4 class=
"parameters">Parameters
</h4>
1072 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1074 <dd class=
"description">Timeout in seconds or
<code>CUPS_TIMEOUT_DEFAULT
</code></dd>
1075 <dt>include_schemes
</dt>
1076 <dd class=
"description">Comma-separated URI schemes to include or
<code>CUPS_INCLUDE_ALL
</code></dd>
1077 <dt>exclude_schemes
</dt>
1078 <dd class=
"description">Comma-separated URI schemes to exclude or
<code>CUPS_EXCLUDE_NONE
</code></dd>
1080 <dd class=
"description">Callback function
</dd>
1082 <dd class=
"description">User data pointer
</dd>
1084 <h4 class=
"returnvalue">Return Value
</h4>
1085 <p class=
"description">Request status -
<code>IPP_OK
</code> on success.
</p>
1086 <h4 class=
"discussion">Discussion
</h4>
1087 <p class=
"discussion">This function sends a CUPS-Get-Devices request and streams the discovered
1088 devices to the specified callback function. The
"timeout
" parameter controls
1089 how long the request lasts, while the
"include_schemes
" and
"exclude_schemes
"
1090 parameters provide comma-delimited lists of backends to include or omit from
1091 the request respectively.
1094 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/Mac OS X
10.4 </span><a name=
"cupsGetFd">cupsGetFd
</a></h3>
1095 <p class=
"description">Get a file from the server.
</p>
1097 <a href=
"#http_status_t">http_status_t
</a> cupsGetFd (
<br>
1098 <a href=
"#http_t">http_t
</a> *http,
<br>
1099 const char *resource,
<br>
1100 int fd
<br>
1102 <h4 class=
"parameters">Parameters
</h4>
1105 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1107 <dd class=
"description">Resource name
</dd>
1109 <dd class=
"description">File descriptor
</dd>
1111 <h4 class=
"returnvalue">Return Value
</h4>
1112 <p class=
"description">HTTP status
</p>
1113 <h4 class=
"discussion">Discussion
</h4>
1114 <p class=
"discussion">This function returns
<code>HTTP_OK
</code> when the file is successfully retrieved.
1117 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/Mac OS X
10.4 </span><a name=
"cupsGetFile">cupsGetFile
</a></h3>
1118 <p class=
"description">Get a file from the server.
</p>
1120 <a href=
"#http_status_t">http_status_t
</a> cupsGetFile (
<br>
1121 <a href=
"#http_t">http_t
</a> *http,
<br>
1122 const char *resource,
<br>
1123 const char *filename
<br>
1125 <h4 class=
"parameters">Parameters
</h4>
1128 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1130 <dd class=
"description">Resource name
</dd>
1132 <dd class=
"description">Filename
</dd>
1134 <h4 class=
"returnvalue">Return Value
</h4>
1135 <p class=
"description">HTTP status
</p>
1136 <h4 class=
"discussion">Discussion
</h4>
1137 <p class=
"discussion">This function returns
<code>HTTP_OK
</code> when the file is successfully retrieved.
1140 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"cupsGetResponse">cupsGetResponse
</a></h3>
1141 <p class=
"description">Get a response to an IPP request.
</p>
1143 <a href=
"#ipp_t">ipp_t
</a> *cupsGetResponse (
<br>
1144 <a href=
"#http_t">http_t
</a> *http,
<br>
1145 const char *resource
<br>
1147 <h4 class=
"parameters">Parameters
</h4>
1150 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1152 <dd class=
"description">HTTP resource for POST
</dd>
1154 <h4 class=
"returnvalue">Return Value
</h4>
1155 <p class=
"description">Response or
<code>NULL
</code> on HTTP error
</p>
1156 <h4 class=
"discussion">Discussion
</h4>
1157 <p class=
"discussion">Use this function to get the response for an IPP request sent using
1158 cupsSendDocument() or cupsSendRequest(). For requests that return
1159 additional data, use httpRead() after getting a successful response.
1162 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/Mac OS X
10.4 </span><a name=
"cupsPutFd">cupsPutFd
</a></h3>
1163 <p class=
"description">Put a file on the server.
</p>
1165 <a href=
"#http_status_t">http_status_t
</a> cupsPutFd (
<br>
1166 <a href=
"#http_t">http_t
</a> *http,
<br>
1167 const char *resource,
<br>
1168 int fd
<br>
1170 <h4 class=
"parameters">Parameters
</h4>
1173 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1175 <dd class=
"description">Resource name
</dd>
1177 <dd class=
"description">File descriptor
</dd>
1179 <h4 class=
"returnvalue">Return Value
</h4>
1180 <p class=
"description">HTTP status
</p>
1181 <h4 class=
"discussion">Discussion
</h4>
1182 <p class=
"discussion">This function returns
<code>HTTP_CREATED
</code> when the file is stored
1186 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20/Mac OS X
10.4 </span><a name=
"cupsPutFile">cupsPutFile
</a></h3>
1187 <p class=
"description">Put a file on the server.
</p>
1189 <a href=
"#http_status_t">http_status_t
</a> cupsPutFile (
<br>
1190 <a href=
"#http_t">http_t
</a> *http,
<br>
1191 const char *resource,
<br>
1192 const char *filename
<br>
1194 <h4 class=
"parameters">Parameters
</h4>
1197 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1199 <dd class=
"description">Resource name
</dd>
1201 <dd class=
"description">Filename
</dd>
1203 <h4 class=
"returnvalue">Return Value
</h4>
1204 <p class=
"description">HTTP status
</p>
1205 <h4 class=
"discussion">Discussion
</h4>
1206 <p class=
"discussion">This function returns
<code>HTTP_CREATED
</code> when the file is stored
1210 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"cupsReadResponseData">cupsReadResponseData
</a></h3>
1211 <p class=
"description">Read additional data after the IPP response.
</p>
1213 ssize_t cupsReadResponseData (
<br>
1214 <a href=
"#http_t">http_t
</a> *http,
<br>
1215 char *buffer,
<br>
1216 size_t length
<br>
1218 <h4 class=
"parameters">Parameters
</h4>
1221 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1223 <dd class=
"description">Buffer to use
</dd>
1225 <dd class=
"description">Number of bytes to read
</dd>
1227 <h4 class=
"returnvalue">Return Value
</h4>
1228 <p class=
"description">Bytes read,
0 on EOF, -
1 on error
</p>
1229 <h4 class=
"discussion">Discussion
</h4>
1230 <p class=
"discussion">This function is used after cupsGetResponse() to read the PPD or document
1231 files for CUPS_GET_PPD and CUPS_GET_DOCUMENT requests, respectively.
1234 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"cupsSendRequest">cupsSendRequest
</a></h3>
1235 <p class=
"description">Send an IPP request.
</p>
1237 <a href=
"#http_status_t">http_status_t
</a> cupsSendRequest (
<br>
1238 <a href=
"#http_t">http_t
</a> *http,
<br>
1239 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
1240 const char *resource,
<br>
1241 size_t length
<br>
1243 <h4 class=
"parameters">Parameters
</h4>
1246 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1248 <dd class=
"description">IPP request
</dd>
1250 <dd class=
"description">Resource path
</dd>
1252 <dd class=
"description">Length of data to follow or
<code>CUPS_LENGTH_VARIABLE
</code></dd>
1254 <h4 class=
"returnvalue">Return Value
</h4>
1255 <p class=
"description">Initial HTTP status
</p>
1256 <h4 class=
"discussion">Discussion
</h4>
1257 <p class=
"discussion">Use httpWrite() to write any additional data (document, PPD file, etc.)
1258 for the request, cupsGetResponse() to get the IPP response, and httpRead()
1259 to read any additional data following the response. Only one request can be
1260 sent/queued at a time.
<br>
1262 Unlike cupsDoFileRequest(), cupsDoIORequest(), and cupsDoRequest(), the
1263 request is not freed.
1266 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"cupsWriteRequestData">cupsWriteRequestData
</a></h3>
1267 <p class=
"description">Write additional data after an IPP request.
</p>
1269 <a href=
"#http_status_t">http_status_t
</a> cupsWriteRequestData (
<br>
1270 <a href=
"#http_t">http_t
</a> *http,
<br>
1271 const char *buffer,
<br>
1272 size_t length
<br>
1274 <h4 class=
"parameters">Parameters
</h4>
1277 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1279 <dd class=
"description">Bytes to write
</dd>
1281 <dd class=
"description">Number of bytes to write
</dd>
1283 <h4 class=
"returnvalue">Return Value
</h4>
1284 <p class=
"description"><code>HTTP_CONTINUE
</code> if OK or HTTP status on error
</p>
1285 <h4 class=
"discussion">Discussion
</h4>
1286 <p class=
"discussion">This function is used after
<a href=
"#cupsSendRequest"><code>cupsSendRequest
</code></a> to provide a PPD and
1287 after
<a href=
"#cupsStartDocument"><code>cupsStartDocument
</code></a> to provide a document file.
1290 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrAny">httpAddrAny
</a></h3>
1291 <p class=
"description">Check for the
"any
" address.
</p>
1293 int httpAddrAny (
<br>
1294 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1296 <h4 class=
"parameters">Parameters
</h4>
1299 <dd class=
"description">Address to check
</dd>
1301 <h4 class=
"returnvalue">Return Value
</h4>
1302 <p class=
"description">1 if
"any
",
0 otherwise
</p>
1303 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrEqual">httpAddrEqual
</a></h3>
1304 <p class=
"description">Compare two addresses.
</p>
1306 int httpAddrEqual (
<br>
1307 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr1,
<br>
1308 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr2
<br>
1310 <h4 class=
"parameters">Parameters
</h4>
1313 <dd class=
"description">First address
</dd>
1315 <dd class=
"description">Second address
</dd>
1317 <h4 class=
"returnvalue">Return Value
</h4>
1318 <p class=
"description">1 if equal,
0 if not
</p>
1319 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrLength">httpAddrLength
</a></h3>
1320 <p class=
"description">Return the length of the address in bytes.
</p>
1322 int httpAddrLength (
<br>
1323 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1325 <h4 class=
"parameters">Parameters
</h4>
1328 <dd class=
"description">Address
</dd>
1330 <h4 class=
"returnvalue">Return Value
</h4>
1331 <p class=
"description">Length in bytes
</p>
1332 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrLocalhost">httpAddrLocalhost
</a></h3>
1333 <p class=
"description">Check for the local loopback address.
</p>
1335 int httpAddrLocalhost (
<br>
1336 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1338 <h4 class=
"parameters">Parameters
</h4>
1341 <dd class=
"description">Address to check
</dd>
1343 <h4 class=
"returnvalue">Return Value
</h4>
1344 <p class=
"description">1 if local host,
0 otherwise
</p>
1345 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrLookup">httpAddrLookup
</a></h3>
1346 <p class=
"description">Lookup the hostname associated with the address.
</p>
1348 char *httpAddrLookup (
<br>
1349 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
1350 char *name,
<br>
1351 int namelen
<br>
1353 <h4 class=
"parameters">Parameters
</h4>
1356 <dd class=
"description">Address to lookup
</dd>
1358 <dd class=
"description">Host name buffer
</dd>
1360 <dd class=
"description">Size of name buffer
</dd>
1362 <h4 class=
"returnvalue">Return Value
</h4>
1363 <p class=
"description">Host name
</p>
1364 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAddrString">httpAddrString
</a></h3>
1365 <p class=
"description">Convert an address to a numeric string.
</p>
1367 char *httpAddrString (
<br>
1368 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
1369 char *s,
<br>
1370 int slen
<br>
1372 <h4 class=
"parameters">Parameters
</h4>
1375 <dd class=
"description">Address to convert
</dd>
1377 <dd class=
"description">String buffer
</dd>
1379 <dd class=
"description">Length of string
</dd>
1381 <h4 class=
"returnvalue">Return Value
</h4>
1382 <p class=
"description">Numeric address string
</p>
1383 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAssembleURI">httpAssembleURI
</a></h3>
1384 <p class=
"description">Assemble a uniform resource identifier from its
1387 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpAssembleURI (
<br>
1388 <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> encoding,
<br>
1389 char *uri,
<br>
1390 int urilen,
<br>
1391 const char *scheme,
<br>
1392 const char *username,
<br>
1393 const char *host,
<br>
1394 int port,
<br>
1395 const char *resource
<br>
1397 <h4 class=
"parameters">Parameters
</h4>
1400 <dd class=
"description">Encoding flags
</dd>
1402 <dd class=
"description">URI buffer
</dd>
1404 <dd class=
"description">Size of URI buffer
</dd>
1406 <dd class=
"description">Scheme name
</dd>
1408 <dd class=
"description">Username
</dd>
1410 <dd class=
"description">Hostname or address
</dd>
1412 <dd class=
"description">Port number
</dd>
1414 <dd class=
"description">Resource
</dd>
1416 <h4 class=
"returnvalue">Return Value
</h4>
1417 <p class=
"description">URI status
</p>
1418 <h4 class=
"discussion">Discussion
</h4>
1419 <p class=
"discussion">This function escapes reserved characters in the URI depending on the
1420 value of the
"encoding
" argument. You should use this function in
1421 place of traditional string functions whenever you need to create a
1425 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpAssembleURIf">httpAssembleURIf
</a></h3>
1426 <p class=
"description">Assemble a uniform resource identifier from its
1427 components with a formatted resource.
</p>
1429 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpAssembleURIf (
<br>
1430 <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> encoding,
<br>
1431 char *uri,
<br>
1432 int urilen,
<br>
1433 const char *scheme,
<br>
1434 const char *username,
<br>
1435 const char *host,
<br>
1436 int port,
<br>
1437 const char *resourcef,
<br>
1438 ...
<br>
1440 <h4 class=
"parameters">Parameters
</h4>
1443 <dd class=
"description">Encoding flags
</dd>
1445 <dd class=
"description">URI buffer
</dd>
1447 <dd class=
"description">Size of URI buffer
</dd>
1449 <dd class=
"description">Scheme name
</dd>
1451 <dd class=
"description">Username
</dd>
1453 <dd class=
"description">Hostname or address
</dd>
1455 <dd class=
"description">Port number
</dd>
1457 <dd class=
"description">Printf-style resource
</dd>
1459 <dd class=
"description">Additional arguments as needed
</dd>
1461 <h4 class=
"returnvalue">Return Value
</h4>
1462 <p class=
"description">URI status
</p>
1463 <h4 class=
"discussion">Discussion
</h4>
1464 <p class=
"discussion">This function creates a formatted version of the resource string
1465 argument
"resourcef
" and escapes reserved characters in the URI
1466 depending on the value of the
"encoding
" argument. You should use
1467 this function in place of traditional string functions whenever
1468 you need to create a URI string.
1471 <h3 class=
"function"><a name=
"httpBlocking">httpBlocking
</a></h3>
1472 <p class=
"description">Set blocking/non-blocking behavior on a connection.
</p>
1474 void httpBlocking (
<br>
1475 <a href=
"#http_t">http_t
</a> *http,
<br>
1476 int b
<br>
1478 <h4 class=
"parameters">Parameters
</h4>
1481 <dd class=
"description">Connection to server
</dd>
1483 <dd class=
"description">1 = blocking,
0 = non-blocking
</dd>
1485 <h3 class=
"function"><a name=
"httpCheck">httpCheck
</a></h3>
1486 <p class=
"description">Check to see if there is a pending response from the server.
</p>
1489 <a href=
"#http_t">http_t
</a> *http
<br>
1491 <h4 class=
"parameters">Parameters
</h4>
1494 <dd class=
"description">Connection to server
</dd>
1496 <h4 class=
"returnvalue">Return Value
</h4>
1497 <p class=
"description">0 = no data,
1 = data available
</p>
1498 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"httpClearCookie">httpClearCookie
</a></h3>
1499 <p class=
"description">Clear the cookie value(s).
</p>
1501 void httpClearCookie (
<br>
1502 <a href=
"#http_t">http_t
</a> *http
<br>
1504 <h4 class=
"parameters">Parameters
</h4>
1507 <dd class=
"description">Connection to server
</dd>
1509 <h3 class=
"function"><a name=
"httpClearFields">httpClearFields
</a></h3>
1510 <p class=
"description">Clear HTTP request fields.
</p>
1512 void httpClearFields (
<br>
1513 <a href=
"#http_t">http_t
</a> *http
<br>
1515 <h4 class=
"parameters">Parameters
</h4>
1518 <dd class=
"description">Connection to server
</dd>
1520 <h3 class=
"function"><a name=
"httpClose">httpClose
</a></h3>
1521 <p class=
"description">Close an HTTP connection...
</p>
1523 void httpClose (
<br>
1524 <a href=
"#http_t">http_t
</a> *http
<br>
1526 <h4 class=
"parameters">Parameters
</h4>
1529 <dd class=
"description">Connection to server
</dd>
1531 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpConnect">httpConnect
</a></h3>
1532 <p class=
"description">Connect to a HTTP server.
</p>
1534 <a href=
"#http_t">http_t
</a> *httpConnect (
<br>
1535 const char *host,
<br>
1536 int port
<br>
1538 <h4 class=
"parameters">Parameters
</h4>
1541 <dd class=
"description">Host to connect to
</dd>
1543 <dd class=
"description">Port number
</dd>
1545 <h4 class=
"returnvalue">Return Value
</h4>
1546 <p class=
"description">New HTTP connection
</p>
1547 <h4 class=
"discussion">Discussion
</h4>
1548 <p class=
"discussion">This function is deprecated - use
<a href=
"#httpConnectEncrypt"><code>httpConnectEncrypt
</code></a> instead.
1551 <h3 class=
"function"><a name=
"httpConnectEncrypt">httpConnectEncrypt
</a></h3>
1552 <p class=
"description">Connect to a HTTP server using encryption.
</p>
1554 <a href=
"#http_t">http_t
</a> *httpConnectEncrypt (
<br>
1555 const char *host,
<br>
1556 int port,
<br>
1557 <a href=
"#http_encryption_t">http_encryption_t
</a> encryption
<br>
1559 <h4 class=
"parameters">Parameters
</h4>
1562 <dd class=
"description">Host to connect to
</dd>
1564 <dd class=
"description">Port number
</dd>
1566 <dd class=
"description">Type of encryption to use
</dd>
1568 <h4 class=
"returnvalue">Return Value
</h4>
1569 <p class=
"description">New HTTP connection
</p>
1570 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpDecode64">httpDecode64
</a></h3>
1571 <p class=
"description">Base64-decode a string.
</p>
1573 char *httpDecode64 (
<br>
1574 char *out,
<br>
1575 const char *in
<br>
1577 <h4 class=
"parameters">Parameters
</h4>
1580 <dd class=
"description">String to write to
</dd>
1582 <dd class=
"description">String to read from
</dd>
1584 <h4 class=
"returnvalue">Return Value
</h4>
1585 <p class=
"description">Decoded string
</p>
1586 <h4 class=
"discussion">Discussion
</h4>
1587 <p class=
"discussion">This function is deprecated. Use the httpDecode64_2() function instead
1588 which provides buffer length arguments.
1591 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/Mac OS X
10.4 </span><a name=
"httpDecode64_2">httpDecode64_2
</a></h3>
1592 <p class=
"description">Base64-decode a string.
</p>
1594 char *httpDecode64_2 (
<br>
1595 char *out,
<br>
1596 int *outlen,
<br>
1597 const char *in
<br>
1599 <h4 class=
"parameters">Parameters
</h4>
1602 <dd class=
"description">String to write to
</dd>
1604 <dd class=
"description">Size of output string
</dd>
1606 <dd class=
"description">String to read from
</dd>
1608 <h4 class=
"returnvalue">Return Value
</h4>
1609 <p class=
"description">Decoded string
</p>
1610 <h3 class=
"function"><a name=
"httpDelete">httpDelete
</a></h3>
1611 <p class=
"description">Send a DELETE request to the server.
</p>
1613 int httpDelete (
<br>
1614 <a href=
"#http_t">http_t
</a> *http,
<br>
1615 const char *uri
<br>
1617 <h4 class=
"parameters">Parameters
</h4>
1620 <dd class=
"description">Connection to server
</dd>
1622 <dd class=
"description">URI to delete
</dd>
1624 <h4 class=
"returnvalue">Return Value
</h4>
1625 <p class=
"description">Status of call (
0 = success)
</p>
1626 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpEncode64">httpEncode64
</a></h3>
1627 <p class=
"description">Base64-encode a string.
</p>
1629 char *httpEncode64 (
<br>
1630 char *out,
<br>
1631 const char *in
<br>
1633 <h4 class=
"parameters">Parameters
</h4>
1636 <dd class=
"description">String to write to
</dd>
1638 <dd class=
"description">String to read from
</dd>
1640 <h4 class=
"returnvalue">Return Value
</h4>
1641 <p class=
"description">Encoded string
</p>
1642 <h4 class=
"discussion">Discussion
</h4>
1643 <p class=
"discussion">This function is deprecated. Use the httpEncode64_2() function instead
1644 which provides buffer length arguments.
1647 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/Mac OS X
10.4 </span><a name=
"httpEncode64_2">httpEncode64_2
</a></h3>
1648 <p class=
"description">Base64-encode a string.
</p>
1650 char *httpEncode64_2 (
<br>
1651 char *out,
<br>
1652 int outlen,
<br>
1653 const char *in,
<br>
1654 int inlen
<br>
1656 <h4 class=
"parameters">Parameters
</h4>
1659 <dd class=
"description">String to write to
</dd>
1661 <dd class=
"description">Size of output string
</dd>
1663 <dd class=
"description">String to read from
</dd>
1665 <dd class=
"description">Size of input string
</dd>
1667 <h4 class=
"returnvalue">Return Value
</h4>
1668 <p class=
"description">Encoded string
</p>
1669 <h3 class=
"function"><a name=
"httpEncryption">httpEncryption
</a></h3>
1670 <p class=
"description">Set the required encryption on the link.
</p>
1672 int httpEncryption (
<br>
1673 <a href=
"#http_t">http_t
</a> *http,
<br>
1674 <a href=
"#http_encryption_t">http_encryption_t
</a> e
<br>
1676 <h4 class=
"parameters">Parameters
</h4>
1679 <dd class=
"description">Connection to server
</dd>
1681 <dd class=
"description">New encryption preference
</dd>
1683 <h4 class=
"returnvalue">Return Value
</h4>
1684 <p class=
"description">-
1 on error,
0 on success
</p>
1685 <h3 class=
"function"><a name=
"httpError">httpError
</a></h3>
1686 <p class=
"description">Get the last error on a connection.
</p>
1689 <a href=
"#http_t">http_t
</a> *http
<br>
1691 <h4 class=
"parameters">Parameters
</h4>
1694 <dd class=
"description">Connection to server
</dd>
1696 <h4 class=
"returnvalue">Return Value
</h4>
1697 <p class=
"description">Error code (errno) value
</p>
1698 <h3 class=
"function"><a name=
"httpFlush">httpFlush
</a></h3>
1699 <p class=
"description">Flush data from a HTTP connection.
</p>
1701 void httpFlush (
<br>
1702 <a href=
"#http_t">http_t
</a> *http
<br>
1704 <h4 class=
"parameters">Parameters
</h4>
1707 <dd class=
"description">Connection to server
</dd>
1709 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpFlushWrite">httpFlushWrite
</a></h3>
1710 <p class=
"description">Flush data in write buffer.
</p>
1712 int httpFlushWrite (
<br>
1713 <a href=
"#http_t">http_t
</a> *http
<br>
1715 <h4 class=
"parameters">Parameters
</h4>
1718 <dd class=
"description">Connection to server
</dd>
1720 <h4 class=
"returnvalue">Return Value
</h4>
1721 <p class=
"description">Bytes written or -
1 on error
</p>
1722 <h3 class=
"function"><a name=
"httpGet">httpGet
</a></h3>
1723 <p class=
"description">Send a GET request to the server.
</p>
1726 <a href=
"#http_t">http_t
</a> *http,
<br>
1727 const char *uri
<br>
1729 <h4 class=
"parameters">Parameters
</h4>
1732 <dd class=
"description">Connection to server
</dd>
1734 <dd class=
"description">URI to get
</dd>
1736 <h4 class=
"returnvalue">Return Value
</h4>
1737 <p class=
"description">Status of call (
0 = success)
</p>
1738 <h3 class=
"function"><span class=
"info"> CUPS
1.3/Mac OS X
10.5 </span><a name=
"httpGetAuthString">httpGetAuthString
</a></h3>
1739 <p class=
"description">Get the current authorization string.
</p>
1741 char *httpGetAuthString (
<br>
1742 <a href=
"#http_t">http_t
</a> *http
<br>
1744 <h4 class=
"parameters">Parameters
</h4>
1747 <dd class=
"description">Connection to server
</dd>
1749 <h4 class=
"returnvalue">Return Value
</h4>
1750 <p class=
"description">Authorization string
</p>
1751 <h4 class=
"discussion">Discussion
</h4>
1752 <p class=
"discussion">The authorization string is set by cupsDoAuthentication() and
1753 httpSetAuthString(). Use httpGetAuthString() to retrieve the
1754 string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
1758 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetBlocking">httpGetBlocking
</a></h3>
1759 <p class=
"description">Get the blocking/non-block state of a connection.
</p>
1761 int httpGetBlocking (
<br>
1762 <a href=
"#http_t">http_t
</a> *http
<br>
1764 <h4 class=
"parameters">Parameters
</h4>
1767 <dd class=
"description">Connection to server
</dd>
1769 <h4 class=
"returnvalue">Return Value
</h4>
1770 <p class=
"description">1 if blocking,
0 if non-blocking
</p>
1771 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"httpGetCookie">httpGetCookie
</a></h3>
1772 <p class=
"description">Get any cookie data from the response.
</p>
1774 const char *httpGetCookie (
<br>
1775 <a href=
"#http_t">http_t
</a> *http
<br>
1777 <h4 class=
"parameters">Parameters
</h4>
1780 <dd class=
"description">HTTP connecion
</dd>
1782 <h4 class=
"returnvalue">Return Value
</h4>
1783 <p class=
"description">Cookie data or NULL
</p>
1784 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetDateString">httpGetDateString
</a></h3>
1785 <p class=
"description">Get a formatted date/time string from a time value.
</p>
1787 const char *httpGetDateString (
<br>
1788 time_t t
<br>
1790 <h4 class=
"parameters">Parameters
</h4>
1793 <dd class=
"description">UNIX time
</dd>
1795 <h4 class=
"returnvalue">Return Value
</h4>
1796 <p class=
"description">Date/time string
</p>
1797 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetDateString2">httpGetDateString2
</a></h3>
1798 <p class=
"description">Get a formatted date/time string from a time value.
</p>
1800 const char *httpGetDateString2 (
<br>
1801 time_t t,
<br>
1802 char *s,
<br>
1803 int slen
<br>
1805 <h4 class=
"parameters">Parameters
</h4>
1808 <dd class=
"description">UNIX time
</dd>
1810 <dd class=
"description">String buffer
</dd>
1812 <dd class=
"description">Size of string buffer
</dd>
1814 <h4 class=
"returnvalue">Return Value
</h4>
1815 <p class=
"description">Date/time string
</p>
1816 <h3 class=
"function"><a name=
"httpGetDateTime">httpGetDateTime
</a></h3>
1817 <p class=
"description">Get a time value from a formatted date/time string.
</p>
1819 time_t httpGetDateTime (
<br>
1820 const char *s
<br>
1822 <h4 class=
"parameters">Parameters
</h4>
1825 <dd class=
"description">Date/time string
</dd>
1827 <h4 class=
"returnvalue">Return Value
</h4>
1828 <p class=
"description">UNIX time
</p>
1829 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetFd">httpGetFd
</a></h3>
1830 <p class=
"description">Get the file descriptor associated with a connection.
</p>
1833 <a href=
"#http_t">http_t
</a> *http
<br>
1835 <h4 class=
"parameters">Parameters
</h4>
1838 <dd class=
"description">Connection to server
</dd>
1840 <h4 class=
"returnvalue">Return Value
</h4>
1841 <p class=
"description">File descriptor or -
1 if none
</p>
1842 <h3 class=
"function"><a name=
"httpGetField">httpGetField
</a></h3>
1843 <p class=
"description">Get a field value from a request/response.
</p>
1845 const char *httpGetField (
<br>
1846 <a href=
"#http_t">http_t
</a> *http,
<br>
1847 <a href=
"#http_field_t">http_field_t
</a> field
<br>
1849 <h4 class=
"parameters">Parameters
</h4>
1852 <dd class=
"description">Connection to server
</dd>
1854 <dd class=
"description">Field to get
</dd>
1856 <h4 class=
"returnvalue">Return Value
</h4>
1857 <p class=
"description">Field value
</p>
1858 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetHostByName">httpGetHostByName
</a></h3>
1859 <p class=
"description">Lookup a hostname or IPv4 address, and return
1860 address records for the specified name.
</p>
1862 struct hostent *httpGetHostByName (
<br>
1863 const char *name
<br>
1865 <h4 class=
"parameters">Parameters
</h4>
1868 <dd class=
"description">Hostname or IP address
</dd>
1870 <h4 class=
"returnvalue">Return Value
</h4>
1871 <p class=
"description">Host entry
</p>
1872 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetHostname">httpGetHostname
</a></h3>
1873 <p class=
"description">Get the FQDN for the connection or local system.
</p>
1875 const char *httpGetHostname (
<br>
1876 <a href=
"#http_t">http_t
</a> *http,
<br>
1877 char *s,
<br>
1878 int slen
<br>
1880 <h4 class=
"parameters">Parameters
</h4>
1883 <dd class=
"description">HTTP connection or NULL
</dd>
1885 <dd class=
"description">String buffer for name
</dd>
1887 <dd class=
"description">Size of buffer
</dd>
1889 <h4 class=
"returnvalue">Return Value
</h4>
1890 <p class=
"description">FQDN for connection or system
</p>
1891 <h4 class=
"discussion">Discussion
</h4>
1892 <p class=
"discussion">When
"http
" points to a connected socket, return the hostname or
1893 address that was used in the call to httpConnect() or httpConnectEncrypt().
1894 Otherwise, return the FQDN for the local system using both gethostname()
1895 and gethostbyname() to get the local hostname with domain.
1898 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetLength">httpGetLength
</a></h3>
1899 <p class=
"description">Get the amount of data remaining from the
1900 content-length or transfer-encoding fields.
</p>
1902 int httpGetLength (
<br>
1903 <a href=
"#http_t">http_t
</a> *http
<br>
1905 <h4 class=
"parameters">Parameters
</h4>
1908 <dd class=
"description">Connection to server
</dd>
1910 <h4 class=
"returnvalue">Return Value
</h4>
1911 <p class=
"description">Content length
</p>
1912 <h4 class=
"discussion">Discussion
</h4>
1913 <p class=
"discussion">This function is deprecated and will not return lengths larger than
1914 2^
31 -
1; use httpGetLength2() instead.
1917 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetLength2">httpGetLength2
</a></h3>
1918 <p class=
"description">Get the amount of data remaining from the
1919 content-length or transfer-encoding fields.
</p>
1921 off_t httpGetLength2 (
<br>
1922 <a href=
"#http_t">http_t
</a> *http
<br>
1924 <h4 class=
"parameters">Parameters
</h4>
1927 <dd class=
"description">Connection to server
</dd>
1929 <h4 class=
"returnvalue">Return Value
</h4>
1930 <p class=
"description">Content length
</p>
1931 <h4 class=
"discussion">Discussion
</h4>
1932 <p class=
"discussion">This function returns the complete content length, even for
1933 content larger than
2^
31 -
1.
1936 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetStatus">httpGetStatus
</a></h3>
1937 <p class=
"description">Get the status of the last HTTP request.
</p>
1939 <a href=
"#http_status_t">http_status_t
</a> httpGetStatus (
<br>
1940 <a href=
"#http_t">http_t
</a> *http
<br>
1942 <h4 class=
"parameters">Parameters
</h4>
1945 <dd class=
"description">Connection to server
</dd>
1947 <h4 class=
"returnvalue">Return Value
</h4>
1948 <p class=
"description">HTTP status
</p>
1949 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetSubField">httpGetSubField
</a></h3>
1950 <p class=
"description">Get a sub-field value.
</p>
1952 char *httpGetSubField (
<br>
1953 <a href=
"#http_t">http_t
</a> *http,
<br>
1954 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
1955 const char *name,
<br>
1956 char *value
<br>
1958 <h4 class=
"parameters">Parameters
</h4>
1961 <dd class=
"description">Connection to server
</dd>
1963 <dd class=
"description">Field index
</dd>
1965 <dd class=
"description">Name of sub-field
</dd>
1967 <dd class=
"description">Value string
</dd>
1969 <h4 class=
"returnvalue">Return Value
</h4>
1970 <p class=
"description">Value or NULL
</p>
1971 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpGetSubField2">httpGetSubField2
</a></h3>
1972 <p class=
"description">Get a sub-field value.
</p>
1974 char *httpGetSubField2 (
<br>
1975 <a href=
"#http_t">http_t
</a> *http,
<br>
1976 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
1977 const char *name,
<br>
1978 char *value,
<br>
1979 int valuelen
<br>
1981 <h4 class=
"parameters">Parameters
</h4>
1984 <dd class=
"description">Connection to server
</dd>
1986 <dd class=
"description">Field index
</dd>
1988 <dd class=
"description">Name of sub-field
</dd>
1990 <dd class=
"description">Value string
</dd>
1992 <dd class=
"description">Size of value buffer
</dd>
1994 <h4 class=
"returnvalue">Return Value
</h4>
1995 <p class=
"description">Value or NULL
</p>
1996 <h3 class=
"function"><a name=
"httpGets">httpGets
</a></h3>
1997 <p class=
"description">Get a line of text from a HTTP connection.
</p>
1999 char *httpGets (
<br>
2000 char *line,
<br>
2001 int length,
<br>
2002 <a href=
"#http_t">http_t
</a> *http
<br>
2004 <h4 class=
"parameters">Parameters
</h4>
2007 <dd class=
"description">Line to read into
</dd>
2009 <dd class=
"description">Max length of buffer
</dd>
2011 <dd class=
"description">Connection to server
</dd>
2013 <h4 class=
"returnvalue">Return Value
</h4>
2014 <p class=
"description">Line or NULL
</p>
2015 <h3 class=
"function"><a name=
"httpHead">httpHead
</a></h3>
2016 <p class=
"description">Send a HEAD request to the server.
</p>
2019 <a href=
"#http_t">http_t
</a> *http,
<br>
2020 const char *uri
<br>
2022 <h4 class=
"parameters">Parameters
</h4>
2025 <dd class=
"description">Connection to server
</dd>
2027 <dd class=
"description">URI for head
</dd>
2029 <h4 class=
"returnvalue">Return Value
</h4>
2030 <p class=
"description">Status of call (
0 = success)
</p>
2031 <h3 class=
"function"><a name=
"httpInitialize">httpInitialize
</a></h3>
2032 <p class=
"description">Initialize the HTTP interface library and set the
2033 default HTTP proxy (if any).
</p>
2035 void httpInitialize (void);
</p>
2036 <h3 class=
"function"><a name=
"httpMD5">httpMD5
</a></h3>
2037 <p class=
"description">Compute the MD5 sum of the username:group:password.
</p>
2040 const char *username,
<br>
2041 const char *realm,
<br>
2042 const char *passwd,
<br>
2043 char md5[
33]
<br>
2045 <h4 class=
"parameters">Parameters
</h4>
2048 <dd class=
"description">User name
</dd>
2050 <dd class=
"description">Realm name
</dd>
2052 <dd class=
"description">Password string
</dd>
2054 <dd class=
"description">MD5 string
</dd>
2056 <h4 class=
"returnvalue">Return Value
</h4>
2057 <p class=
"description">MD5 sum
</p>
2058 <h3 class=
"function"><a name=
"httpMD5Final">httpMD5Final
</a></h3>
2059 <p class=
"description">Combine the MD5 sum of the username, group, and password
2060 with the server-supplied nonce value, method, and
2063 char *httpMD5Final (
<br>
2064 const char *nonce,
<br>
2065 const char *method,
<br>
2066 const char *resource,
<br>
2067 char md5[
33]
<br>
2069 <h4 class=
"parameters">Parameters
</h4>
2072 <dd class=
"description">Server nonce value
</dd>
2074 <dd class=
"description">METHOD (GET, POST, etc.)
</dd>
2076 <dd class=
"description">Resource path
</dd>
2078 <dd class=
"description">MD5 sum
</dd>
2080 <h4 class=
"returnvalue">Return Value
</h4>
2081 <p class=
"description">New sum
</p>
2082 <h3 class=
"function"><a name=
"httpMD5String">httpMD5String
</a></h3>
2083 <p class=
"description">Convert an MD5 sum to a character string.
</p>
2085 char *httpMD5String (
<br>
2086 const unsigned char *sum,
<br>
2087 char md5[
33]
<br>
2089 <h4 class=
"parameters">Parameters
</h4>
2092 <dd class=
"description">MD5 sum data
</dd>
2094 <dd class=
"description">MD5 sum in hex
</dd>
2096 <h4 class=
"returnvalue">Return Value
</h4>
2097 <p class=
"description">MD5 sum in hex
</p>
2098 <h3 class=
"function"><a name=
"httpOptions">httpOptions
</a></h3>
2099 <p class=
"description">Send an OPTIONS request to the server.
</p>
2101 int httpOptions (
<br>
2102 <a href=
"#http_t">http_t
</a> *http,
<br>
2103 const char *uri
<br>
2105 <h4 class=
"parameters">Parameters
</h4>
2108 <dd class=
"description">Connection to server
</dd>
2110 <dd class=
"description">URI for options
</dd>
2112 <h4 class=
"returnvalue">Return Value
</h4>
2113 <p class=
"description">Status of call (
0 = success)
</p>
2114 <h3 class=
"function"><a name=
"httpPost">httpPost
</a></h3>
2115 <p class=
"description">Send a POST request to the server.
</p>
2118 <a href=
"#http_t">http_t
</a> *http,
<br>
2119 const char *uri
<br>
2121 <h4 class=
"parameters">Parameters
</h4>
2124 <dd class=
"description">Connection to server
</dd>
2126 <dd class=
"description">URI for post
</dd>
2128 <h4 class=
"returnvalue">Return Value
</h4>
2129 <p class=
"description">Status of call (
0 = success)
</p>
2130 <h3 class=
"function"><a name=
"httpPut">httpPut
</a></h3>
2131 <p class=
"description">Send a PUT request to the server.
</p>
2134 <a href=
"#http_t">http_t
</a> *http,
<br>
2135 const char *uri
<br>
2137 <h4 class=
"parameters">Parameters
</h4>
2140 <dd class=
"description">Connection to server
</dd>
2142 <dd class=
"description">URI to put
</dd>
2144 <h4 class=
"returnvalue">Return Value
</h4>
2145 <p class=
"description">Status of call (
0 = success)
</p>
2146 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpRead">httpRead
</a></h3>
2147 <p class=
"description">Read data from a HTTP connection.
</p>
2150 <a href=
"#http_t">http_t
</a> *http,
<br>
2151 char *buffer,
<br>
2152 int length
<br>
2154 <h4 class=
"parameters">Parameters
</h4>
2157 <dd class=
"description">Connection to server
</dd>
2159 <dd class=
"description">Buffer for data
</dd>
2161 <dd class=
"description">Maximum number of bytes
</dd>
2163 <h4 class=
"returnvalue">Return Value
</h4>
2164 <p class=
"description">Number of bytes read
</p>
2165 <h4 class=
"discussion">Discussion
</h4>
2166 <p class=
"discussion">This function is deprecated. Use the httpRead2() function which can
2167 read more than
2GB of data.
2170 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpRead2">httpRead2
</a></h3>
2171 <p class=
"description">Read data from a HTTP connection.
</p>
2173 ssize_t httpRead2 (
<br>
2174 <a href=
"#http_t">http_t
</a> *http,
<br>
2175 char *buffer,
<br>
2176 size_t length
<br>
2178 <h4 class=
"parameters">Parameters
</h4>
2181 <dd class=
"description">Connection to server
</dd>
2183 <dd class=
"description">Buffer for data
</dd>
2185 <dd class=
"description">Maximum number of bytes
</dd>
2187 <h4 class=
"returnvalue">Return Value
</h4>
2188 <p class=
"description">Number of bytes read
</p>
2189 <h3 class=
"function"><a name=
"httpReconnect">httpReconnect
</a></h3>
2190 <p class=
"description">Reconnect to a HTTP server.
</p>
2192 int httpReconnect (
<br>
2193 <a href=
"#http_t">http_t
</a> *http
<br>
2195 <h4 class=
"parameters">Parameters
</h4>
2198 <dd class=
"description">Connection to server
</dd>
2200 <h4 class=
"returnvalue">Return Value
</h4>
2201 <p class=
"description">0 on success, non-zero on failure
</p>
2202 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpSeparate">httpSeparate
</a></h3>
2203 <p class=
"description">Separate a Universal Resource Identifier into its
2206 void httpSeparate (
<br>
2207 const char *uri,
<br>
2208 char *scheme,
<br>
2209 char *username,
<br>
2210 char *host,
<br>
2211 int *port,
<br>
2212 char *resource
<br>
2214 <h4 class=
"parameters">Parameters
</h4>
2217 <dd class=
"description">Universal Resource Identifier
</dd>
2219 <dd class=
"description">Scheme [
32] (http, https, etc.)
</dd>
2221 <dd class=
"description">Username [
1024]
</dd>
2223 <dd class=
"description">Hostname [
1024]
</dd>
2225 <dd class=
"description">Port number to use
</dd>
2227 <dd class=
"description">Resource/filename [
1024]
</dd>
2229 <h4 class=
"discussion">Discussion
</h4>
2230 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
2233 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21/Mac OS X
10.4 </span><a name=
"httpSeparate2">httpSeparate2
</a></h3>
2234 <p class=
"description">Separate a Universal Resource Identifier into its
2237 void httpSeparate2 (
<br>
2238 const char *uri,
<br>
2239 char *scheme,
<br>
2240 int schemelen,
<br>
2241 char *username,
<br>
2242 int usernamelen,
<br>
2243 char *host,
<br>
2244 int hostlen,
<br>
2245 int *port,
<br>
2246 char *resource,
<br>
2247 int resourcelen
<br>
2249 <h4 class=
"parameters">Parameters
</h4>
2252 <dd class=
"description">Universal Resource Identifier
</dd>
2254 <dd class=
"description">Scheme (http, https, etc.)
</dd>
2256 <dd class=
"description">Size of scheme buffer
</dd>
2258 <dd class=
"description">Username
</dd>
2259 <dt>usernamelen
</dt>
2260 <dd class=
"description">Size of username buffer
</dd>
2262 <dd class=
"description">Hostname
</dd>
2264 <dd class=
"description">Size of hostname buffer
</dd>
2266 <dd class=
"description">Port number to use
</dd>
2268 <dd class=
"description">Resource/filename
</dd>
2269 <dt>resourcelen
</dt>
2270 <dd class=
"description">Size of resource buffer
</dd>
2272 <h4 class=
"discussion">Discussion
</h4>
2273 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
2277 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpSeparateURI">httpSeparateURI
</a></h3>
2278 <p class=
"description">Separate a Universal Resource Identifier into its
2281 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpSeparateURI (
<br>
2282 <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> decoding,
<br>
2283 const char *uri,
<br>
2284 char *scheme,
<br>
2285 int schemelen,
<br>
2286 char *username,
<br>
2287 int usernamelen,
<br>
2288 char *host,
<br>
2289 int hostlen,
<br>
2290 int *port,
<br>
2291 char *resource,
<br>
2292 int resourcelen
<br>
2294 <h4 class=
"parameters">Parameters
</h4>
2297 <dd class=
"description">Decoding flags
</dd>
2299 <dd class=
"description">Universal Resource Identifier
</dd>
2301 <dd class=
"description">Scheme (http, https, etc.)
</dd>
2303 <dd class=
"description">Size of scheme buffer
</dd>
2305 <dd class=
"description">Username
</dd>
2306 <dt>usernamelen
</dt>
2307 <dd class=
"description">Size of username buffer
</dd>
2309 <dd class=
"description">Hostname
</dd>
2311 <dd class=
"description">Size of hostname buffer
</dd>
2313 <dd class=
"description">Port number to use
</dd>
2315 <dd class=
"description">Resource/filename
</dd>
2316 <dt>resourcelen
</dt>
2317 <dd class=
"description">Size of resource buffer
</dd>
2319 <h4 class=
"returnvalue">Return Value
</h4>
2320 <p class=
"description">Result of separation
</p>
2321 <h3 class=
"function"><span class=
"info"> CUPS
1.3/Mac OS X
10.5 </span><a name=
"httpSetAuthString">httpSetAuthString
</a></h3>
2322 <p class=
"description">Set the current authorization string.
</p>
2324 void httpSetAuthString (
<br>
2325 <a href=
"#http_t">http_t
</a> *http,
<br>
2326 const char *scheme,
<br>
2327 const char *data
<br>
2329 <h4 class=
"parameters">Parameters
</h4>
2332 <dd class=
"description">Connection to server
</dd>
2334 <dd class=
"description">Auth scheme (NULL to clear it)
</dd>
2336 <dd class=
"description">Auth data (NULL for none)
</dd>
2338 <h4 class=
"discussion">Discussion
</h4>
2339 <p class=
"discussion">This function just stores a copy of the current authorization string in
2340 the HTTP connection object. You must still call httpSetField() to set
2341 HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
2342 httpHead(), httpOptions(), httpPost, or httpPut().
2345 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"httpSetCookie">httpSetCookie
</a></h3>
2346 <p class=
"description">Set the cookie value(s)...
</p>
2348 void httpSetCookie (
<br>
2349 <a href=
"#http_t">http_t
</a> *http,
<br>
2350 const char *cookie
<br>
2352 <h4 class=
"parameters">Parameters
</h4>
2355 <dd class=
"description">Connection
</dd>
2357 <dd class=
"description">Cookie string
</dd>
2359 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpSetExpect">httpSetExpect
</a></h3>
2360 <p class=
"description">Set the Expect: header in a request.
</p>
2362 void httpSetExpect (
<br>
2363 <a href=
"#http_t">http_t
</a> *http,
<br>
2364 <a href=
"#http_status_t">http_status_t
</a> expect
<br>
2366 <h4 class=
"parameters">Parameters
</h4>
2369 <dd class=
"description">Connection to server
</dd>
2371 <dd class=
"description">HTTP status to expect (HTTP_CONTINUE)
</dd>
2373 <h4 class=
"discussion">Discussion
</h4>
2374 <p class=
"discussion">Currently only HTTP_CONTINUE is supported for the
"expect
" argument.
2377 <h3 class=
"function"><a name=
"httpSetField">httpSetField
</a></h3>
2378 <p class=
"description">Set the value of an HTTP header.
</p>
2380 void httpSetField (
<br>
2381 <a href=
"#http_t">http_t
</a> *http,
<br>
2382 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
2383 const char *value
<br>
2385 <h4 class=
"parameters">Parameters
</h4>
2388 <dd class=
"description">Connection to server
</dd>
2390 <dd class=
"description">Field index
</dd>
2392 <dd class=
"description">Value
</dd>
2394 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpSetLength">httpSetLength
</a></h3>
2395 <p class=
"description">Set the content-length and content-encoding.
</p>
2397 void httpSetLength (
<br>
2398 <a href=
"#http_t">http_t
</a> *http,
<br>
2399 size_t length
<br>
2401 <h4 class=
"parameters">Parameters
</h4>
2404 <dd class=
"description">Connection to server
</dd>
2406 <dd class=
"description">Length (
0 for chunked)
</dd>
2408 <h3 class=
"function"><a name=
"httpStatus">httpStatus
</a></h3>
2409 <p class=
"description">Return a short string describing a HTTP status code.
</p>
2411 const char *httpStatus (
<br>
2412 <a href=
"#http_status_t">http_status_t
</a> status
<br>
2414 <h4 class=
"parameters">Parameters
</h4>
2417 <dd class=
"description">HTTP status code
</dd>
2419 <h4 class=
"returnvalue">Return Value
</h4>
2420 <p class=
"description">Localized status string
</p>
2421 <h4 class=
"discussion">Discussion
</h4>
2422 <p class=
"discussion">The returned string is localized to the current POSIX locale and is based
2423 on the status strings defined in RFC
2616.
</p>
2424 <h3 class=
"function"><a name=
"httpTrace">httpTrace
</a></h3>
2425 <p class=
"description">Send an TRACE request to the server.
</p>
2428 <a href=
"#http_t">http_t
</a> *http,
<br>
2429 const char *uri
<br>
2431 <h4 class=
"parameters">Parameters
</h4>
2434 <dd class=
"description">Connection to server
</dd>
2436 <dd class=
"description">URI for trace
</dd>
2438 <h4 class=
"returnvalue">Return Value
</h4>
2439 <p class=
"description">Status of call (
0 = success)
</p>
2440 <h3 class=
"function"><a name=
"httpUpdate">httpUpdate
</a></h3>
2441 <p class=
"description">Update the current HTTP state for incoming data.
</p>
2443 <a href=
"#http_status_t">http_status_t
</a> httpUpdate (
<br>
2444 <a href=
"#http_t">http_t
</a> *http
<br>
2446 <h4 class=
"parameters">Parameters
</h4>
2449 <dd class=
"description">Connection to server
</dd>
2451 <h4 class=
"returnvalue">Return Value
</h4>
2452 <p class=
"description">HTTP status
</p>
2453 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"httpWait">httpWait
</a></h3>
2454 <p class=
"description">Wait for data available on a connection.
</p>
2457 <a href=
"#http_t">http_t
</a> *http,
<br>
2458 int msec
<br>
2460 <h4 class=
"parameters">Parameters
</h4>
2463 <dd class=
"description">Connection to server
</dd>
2465 <dd class=
"description">Milliseconds to wait
</dd>
2467 <h4 class=
"returnvalue">Return Value
</h4>
2468 <p class=
"description">1 if data is available,
0 otherwise
</p>
2469 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpWrite">httpWrite
</a></h3>
2470 <p class=
"description">Write data to a HTTP connection.
</p>
2473 <a href=
"#http_t">http_t
</a> *http,
<br>
2474 const char *buffer,
<br>
2475 int length
<br>
2477 <h4 class=
"parameters">Parameters
</h4>
2480 <dd class=
"description">Connection to server
</dd>
2482 <dd class=
"description">Buffer for data
</dd>
2484 <dd class=
"description">Number of bytes to write
</dd>
2486 <h4 class=
"returnvalue">Return Value
</h4>
2487 <p class=
"description">Number of bytes written
</p>
2488 <h4 class=
"discussion">Discussion
</h4>
2489 <p class=
"discussion">This function is deprecated. Use the httpWrite2() function which can
2490 write more than
2GB of data.
2493 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"httpWrite2">httpWrite2
</a></h3>
2494 <p class=
"description">Write data to a HTTP connection.
</p>
2496 ssize_t httpWrite2 (
<br>
2497 <a href=
"#http_t">http_t
</a> *http,
<br>
2498 const char *buffer,
<br>
2499 size_t length
<br>
2501 <h4 class=
"parameters">Parameters
</h4>
2504 <dd class=
"description">Connection to server
</dd>
2506 <dd class=
"description">Buffer for data
</dd>
2508 <dd class=
"description">Number of bytes to write
</dd>
2510 <h4 class=
"returnvalue">Return Value
</h4>
2511 <p class=
"description">Number of bytes written
</p>
2512 <h3 class=
"function"><a name=
"ippAddBoolean">ippAddBoolean
</a></h3>
2513 <p class=
"description">Add a boolean attribute to an IPP message.
</p>
2515 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBoolean (
<br>
2516 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2517 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2518 const char *name,
<br>
2519 char value
<br>
2521 <h4 class=
"parameters">Parameters
</h4>
2524 <dd class=
"description">IPP message
</dd>
2526 <dd class=
"description">IPP group
</dd>
2528 <dd class=
"description">Name of attribute
</dd>
2530 <dd class=
"description">Value of attribute
</dd>
2532 <h4 class=
"returnvalue">Return Value
</h4>
2533 <p class=
"description">New attribute
</p>
2534 <h3 class=
"function"><a name=
"ippAddBooleans">ippAddBooleans
</a></h3>
2535 <p class=
"description">Add an array of boolean values.
</p>
2537 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBooleans (
<br>
2538 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2539 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2540 const char *name,
<br>
2541 int num_values,
<br>
2542 const char *values
<br>
2544 <h4 class=
"parameters">Parameters
</h4>
2547 <dd class=
"description">IPP message
</dd>
2549 <dd class=
"description">IPP group
</dd>
2551 <dd class=
"description">Name of attribute
</dd>
2553 <dd class=
"description">Number of values
</dd>
2555 <dd class=
"description">Values
</dd>
2557 <h4 class=
"returnvalue">Return Value
</h4>
2558 <p class=
"description">New attribute
</p>
2559 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"ippAddCollection">ippAddCollection
</a></h3>
2560 <p class=
"description">Add a collection value.
</p>
2562 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollection (
<br>
2563 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2564 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2565 const char *name,
<br>
2566 <a href=
"#ipp_t">ipp_t
</a> *value
<br>
2568 <h4 class=
"parameters">Parameters
</h4>
2571 <dd class=
"description">IPP message
</dd>
2573 <dd class=
"description">IPP group
</dd>
2575 <dd class=
"description">Name of attribute
</dd>
2577 <dd class=
"description">Value
</dd>
2579 <h4 class=
"returnvalue">Return Value
</h4>
2580 <p class=
"description">New attribute
</p>
2581 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"ippAddCollections">ippAddCollections
</a></h3>
2582 <p class=
"description">Add an array of collection values.
</p>
2584 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollections (
<br>
2585 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2586 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2587 const char *name,
<br>
2588 int num_values,
<br>
2589 const
<a href=
"#ipp_t">ipp_t
</a> **values
<br>
2591 <h4 class=
"parameters">Parameters
</h4>
2594 <dd class=
"description">IPP message
</dd>
2596 <dd class=
"description">IPP group
</dd>
2598 <dd class=
"description">Name of attribute
</dd>
2600 <dd class=
"description">Number of values
</dd>
2602 <dd class=
"description">Values
</dd>
2604 <h4 class=
"returnvalue">Return Value
</h4>
2605 <p class=
"description">New attribute
</p>
2606 <h3 class=
"function"><a name=
"ippAddDate">ippAddDate
</a></h3>
2607 <p class=
"description">Add a date attribute to an IPP message.
</p>
2609 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddDate (
<br>
2610 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2611 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2612 const char *name,
<br>
2613 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *value
<br>
2615 <h4 class=
"parameters">Parameters
</h4>
2618 <dd class=
"description">IPP message
</dd>
2620 <dd class=
"description">IPP group
</dd>
2622 <dd class=
"description">Name of attribute
</dd>
2624 <dd class=
"description">Value
</dd>
2626 <h4 class=
"returnvalue">Return Value
</h4>
2627 <p class=
"description">New attribute
</p>
2628 <h3 class=
"function"><a name=
"ippAddInteger">ippAddInteger
</a></h3>
2629 <p class=
"description">Add a integer attribute to an IPP message.
</p>
2631 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddInteger (
<br>
2632 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2633 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2634 <a href=
"#ipp_tag_t">ipp_tag_t
</a> type,
<br>
2635 const char *name,
<br>
2636 int value
<br>
2638 <h4 class=
"parameters">Parameters
</h4>
2641 <dd class=
"description">IPP message
</dd>
2643 <dd class=
"description">IPP group
</dd>
2645 <dd class=
"description">Type of attribute
</dd>
2647 <dd class=
"description">Name of attribute
</dd>
2649 <dd class=
"description">Value of attribute
</dd>
2651 <h4 class=
"returnvalue">Return Value
</h4>
2652 <p class=
"description">New attribute
</p>
2653 <h3 class=
"function"><a name=
"ippAddIntegers">ippAddIntegers
</a></h3>
2654 <p class=
"description">Add an array of integer values.
</p>
2656 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddIntegers (
<br>
2657 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2658 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2659 <a href=
"#ipp_tag_t">ipp_tag_t
</a> type,
<br>
2660 const char *name,
<br>
2661 int num_values,
<br>
2662 const int *values
<br>
2664 <h4 class=
"parameters">Parameters
</h4>
2667 <dd class=
"description">IPP message
</dd>
2669 <dd class=
"description">IPP group
</dd>
2671 <dd class=
"description">Type of attribute
</dd>
2673 <dd class=
"description">Name of attribute
</dd>
2675 <dd class=
"description">Number of values
</dd>
2677 <dd class=
"description">Values
</dd>
2679 <h4 class=
"returnvalue">Return Value
</h4>
2680 <p class=
"description">New attribute
</p>
2681 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippAddOctetString">ippAddOctetString
</a></h3>
2682 <p class=
"description">Add an octetString value to an IPP message.
</p>
2684 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddOctetString (
<br>
2685 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2686 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2687 const char *name,
<br>
2688 const void *data,
<br>
2689 int datalen
<br>
2691 <h4 class=
"parameters">Parameters
</h4>
2694 <dd class=
"description">IPP message
</dd>
2696 <dd class=
"description">IPP group
</dd>
2698 <dd class=
"description">Name of attribute
</dd>
2700 <dd class=
"description">octetString data
</dd>
2702 <dd class=
"description">Length of data in bytes
</dd>
2704 <h4 class=
"returnvalue">Return Value
</h4>
2705 <p class=
"description">New attribute
</p>
2706 <h3 class=
"function"><a name=
"ippAddRange">ippAddRange
</a></h3>
2707 <p class=
"description">Add a range of values to an IPP message.
</p>
2709 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRange (
<br>
2710 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2711 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2712 const char *name,
<br>
2713 int lower,
<br>
2714 int upper
<br>
2716 <h4 class=
"parameters">Parameters
</h4>
2719 <dd class=
"description">IPP message
</dd>
2721 <dd class=
"description">IPP group
</dd>
2723 <dd class=
"description">Name of attribute
</dd>
2725 <dd class=
"description">Lower value
</dd>
2727 <dd class=
"description">Upper value
</dd>
2729 <h4 class=
"returnvalue">Return Value
</h4>
2730 <p class=
"description">New attribute
</p>
2731 <h3 class=
"function"><a name=
"ippAddRanges">ippAddRanges
</a></h3>
2732 <p class=
"description">Add ranges of values to an IPP message.
</p>
2734 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRanges (
<br>
2735 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2736 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2737 const char *name,
<br>
2738 int num_values,
<br>
2739 const int *lower,
<br>
2740 const int *upper
<br>
2742 <h4 class=
"parameters">Parameters
</h4>
2745 <dd class=
"description">IPP message
</dd>
2747 <dd class=
"description">IPP group
</dd>
2749 <dd class=
"description">Name of attribute
</dd>
2751 <dd class=
"description">Number of values
</dd>
2753 <dd class=
"description">Lower values
</dd>
2755 <dd class=
"description">Upper values
</dd>
2757 <h4 class=
"returnvalue">Return Value
</h4>
2758 <p class=
"description">New attribute
</p>
2759 <h3 class=
"function"><a name=
"ippAddResolution">ippAddResolution
</a></h3>
2760 <p class=
"description">Add a resolution value to an IPP message.
</p>
2762 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolution (
<br>
2763 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2764 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2765 const char *name,
<br>
2766 <a href=
"#ipp_res_t">ipp_res_t
</a> units,
<br>
2767 int xres,
<br>
2768 int yres
<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">Units for resolution
</dd>
2781 <dd class=
"description">X resolution
</dd>
2783 <dd class=
"description">Y resolution
</dd>
2785 <h4 class=
"returnvalue">Return Value
</h4>
2786 <p class=
"description">New attribute
</p>
2787 <h3 class=
"function"><a name=
"ippAddResolutions">ippAddResolutions
</a></h3>
2788 <p class=
"description">Add resolution values to an IPP message.
</p>
2790 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolutions (
<br>
2791 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2792 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2793 const char *name,
<br>
2794 int num_values,
<br>
2795 <a href=
"#ipp_res_t">ipp_res_t
</a> units,
<br>
2796 const int *xres,
<br>
2797 const int *yres
<br>
2799 <h4 class=
"parameters">Parameters
</h4>
2802 <dd class=
"description">IPP message
</dd>
2804 <dd class=
"description">IPP group
</dd>
2806 <dd class=
"description">Name of attribute
</dd>
2808 <dd class=
"description">Number of values
</dd>
2810 <dd class=
"description">Units for resolution
</dd>
2812 <dd class=
"description">X resolutions
</dd>
2814 <dd class=
"description">Y resolutions
</dd>
2816 <h4 class=
"returnvalue">Return Value
</h4>
2817 <p class=
"description">New attribute
</p>
2818 <h3 class=
"function"><a name=
"ippAddSeparator">ippAddSeparator
</a></h3>
2819 <p class=
"description">Add a group separator to an IPP message.
</p>
2821 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddSeparator (
<br>
2822 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
2824 <h4 class=
"parameters">Parameters
</h4>
2827 <dd class=
"description">IPP message
</dd>
2829 <h4 class=
"returnvalue">Return Value
</h4>
2830 <p class=
"description">New attribute
</p>
2831 <h3 class=
"function"><a name=
"ippAddString">ippAddString
</a></h3>
2832 <p class=
"description">Add a language-encoded string to an IPP message.
</p>
2834 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddString (
<br>
2835 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2836 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2837 <a href=
"#ipp_tag_t">ipp_tag_t
</a> type,
<br>
2838 const char *name,
<br>
2839 const char *charset,
<br>
2840 const char *value
<br>
2842 <h4 class=
"parameters">Parameters
</h4>
2845 <dd class=
"description">IPP message
</dd>
2847 <dd class=
"description">IPP group
</dd>
2849 <dd class=
"description">Type of attribute
</dd>
2851 <dd class=
"description">Name of attribute
</dd>
2853 <dd class=
"description">Character set
</dd>
2855 <dd class=
"description">Value
</dd>
2857 <h4 class=
"returnvalue">Return Value
</h4>
2858 <p class=
"description">New attribute
</p>
2859 <h3 class=
"function"><a name=
"ippAddStrings">ippAddStrings
</a></h3>
2860 <p class=
"description">Add language-encoded strings to an IPP message.
</p>
2862 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddStrings (
<br>
2863 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2864 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2865 <a href=
"#ipp_tag_t">ipp_tag_t
</a> type,
<br>
2866 const char *name,
<br>
2867 int num_values,
<br>
2868 const char *charset,
<br>
2869 const char *const *values
<br>
2871 <h4 class=
"parameters">Parameters
</h4>
2874 <dd class=
"description">IPP message
</dd>
2876 <dd class=
"description">IPP group
</dd>
2878 <dd class=
"description">Type of attribute
</dd>
2880 <dd class=
"description">Name of attribute
</dd>
2882 <dd class=
"description">Number of values
</dd>
2884 <dd class=
"description">Character set
</dd>
2886 <dd class=
"description">Values
</dd>
2888 <h4 class=
"returnvalue">Return Value
</h4>
2889 <p class=
"description">New attribute
</p>
2890 <h3 class=
"function"><a name=
"ippDateToTime">ippDateToTime
</a></h3>
2891 <p class=
"description">Convert from RFC
1903 Date/Time format to UNIX time
2894 time_t ippDateToTime (
<br>
2895 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *date
<br>
2897 <h4 class=
"parameters">Parameters
</h4>
2900 <dd class=
"description">RFC
1903 date info
</dd>
2902 <h4 class=
"returnvalue">Return Value
</h4>
2903 <p class=
"description">UNIX time value
</p>
2904 <h3 class=
"function"><a name=
"ippDelete">ippDelete
</a></h3>
2905 <p class=
"description">Delete an IPP message.
</p>
2907 void ippDelete (
<br>
2908 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
2910 <h4 class=
"parameters">Parameters
</h4>
2913 <dd class=
"description">IPP message
</dd>
2915 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"ippDeleteAttribute">ippDeleteAttribute
</a></h3>
2916 <p class=
"description">Delete a single attribute in an IPP message.
</p>
2918 void ippDeleteAttribute (
<br>
2919 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2920 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
2922 <h4 class=
"parameters">Parameters
</h4>
2925 <dd class=
"description">IPP message
</dd>
2927 <dd class=
"description">Attribute to delete
</dd>
2929 <h3 class=
"function"><a name=
"ippErrorString">ippErrorString
</a></h3>
2930 <p class=
"description">Return a name for the given status code.
</p>
2932 const char *ippErrorString (
<br>
2933 ipp_status_t error
<br>
2935 <h4 class=
"parameters">Parameters
</h4>
2938 <dd class=
"description">Error status
</dd>
2940 <h4 class=
"returnvalue">Return Value
</h4>
2941 <p class=
"description">Text string
</p>
2942 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippErrorValue">ippErrorValue
</a></h3>
2943 <p class=
"description">Return a status code for the given name.
</p>
2945 ipp_status_t ippErrorValue (
<br>
2946 const char *name
<br>
2948 <h4 class=
"parameters">Parameters
</h4>
2951 <dd class=
"description">Name
</dd>
2953 <h4 class=
"returnvalue">Return Value
</h4>
2954 <p class=
"description">IPP status code
</p>
2955 <h3 class=
"function"><a name=
"ippFindAttribute">ippFindAttribute
</a></h3>
2956 <p class=
"description">Find a named attribute in a request...
</p>
2958 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindAttribute (
<br>
2959 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2960 const char *name,
<br>
2961 <a href=
"#ipp_tag_t">ipp_tag_t
</a> type
<br>
2963 <h4 class=
"parameters">Parameters
</h4>
2966 <dd class=
"description">IPP message
</dd>
2968 <dd class=
"description">Name of attribute
</dd>
2970 <dd class=
"description">Type of attribute
</dd>
2972 <h4 class=
"returnvalue">Return Value
</h4>
2973 <p class=
"description">Matching attribute
</p>
2974 <h3 class=
"function"><a name=
"ippFindNextAttribute">ippFindNextAttribute
</a></h3>
2975 <p class=
"description">Find the next named attribute in a request...
</p>
2977 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindNextAttribute (
<br>
2978 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2979 const char *name,
<br>
2980 <a href=
"#ipp_tag_t">ipp_tag_t
</a> type
<br>
2982 <h4 class=
"parameters">Parameters
</h4>
2985 <dd class=
"description">IPP message
</dd>
2987 <dd class=
"description">Name of attribute
</dd>
2989 <dd class=
"description">Type of attribute
</dd>
2991 <h4 class=
"returnvalue">Return Value
</h4>
2992 <p class=
"description">Matching attribute
</p>
2993 <h3 class=
"function"><a name=
"ippLength">ippLength
</a></h3>
2994 <p class=
"description">Compute the length of an IPP message.
</p>
2996 size_t ippLength (
<br>
2997 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
2999 <h4 class=
"parameters">Parameters
</h4>
3002 <dd class=
"description">IPP message
</dd>
3004 <h4 class=
"returnvalue">Return Value
</h4>
3005 <p class=
"description">Size of IPP message
</p>
3006 <h3 class=
"function"><a name=
"ippNew">ippNew
</a></h3>
3007 <p class=
"description">Allocate a new IPP message.
</p>
3009 <a href=
"#ipp_t">ipp_t
</a> *ippNew (void);
</p>
3010 <h4 class=
"returnvalue">Return Value
</h4>
3011 <p class=
"description">New IPP message
</p>
3012 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippNewRequest">ippNewRequest
</a></h3>
3013 <p class=
"description">Allocate a new IPP request message.
</p>
3015 <a href=
"#ipp_t">ipp_t
</a> *ippNewRequest (
<br>
3016 <a href=
"#ipp_op_t">ipp_op_t
</a> op
<br>
3018 <h4 class=
"parameters">Parameters
</h4>
3021 <dd class=
"description">Operation code
</dd>
3023 <h4 class=
"returnvalue">Return Value
</h4>
3024 <p class=
"description">IPP request message
</p>
3025 <h4 class=
"discussion">Discussion
</h4>
3026 <p class=
"discussion">The new request message is initialized with the attributes-charset and
3027 attributes-natural-language attributes added. The
3028 attributes-natural-language value is derived from the current locale.
3031 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippOpString">ippOpString
</a></h3>
3032 <p class=
"description">Return a name for the given operation id.
</p>
3034 const char *ippOpString (
<br>
3035 <a href=
"#ipp_op_t">ipp_op_t
</a> op
<br>
3037 <h4 class=
"parameters">Parameters
</h4>
3040 <dd class=
"description">Operation ID
</dd>
3042 <h4 class=
"returnvalue">Return Value
</h4>
3043 <p class=
"description">Name
</p>
3044 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippOpValue">ippOpValue
</a></h3>
3045 <p class=
"description">Return an operation id for the given name.
</p>
3047 <a href=
"#ipp_op_t">ipp_op_t
</a> ippOpValue (
<br>
3048 const char *name
<br>
3050 <h4 class=
"parameters">Parameters
</h4>
3053 <dd class=
"description">Textual name
</dd>
3055 <h4 class=
"returnvalue">Return Value
</h4>
3056 <p class=
"description">Operation ID
</p>
3057 <h3 class=
"function"><a name=
"ippPort">ippPort
</a></h3>
3058 <p class=
"description">Return the default IPP port number.
</p>
3060 int ippPort (void);
</p>
3061 <h4 class=
"returnvalue">Return Value
</h4>
3062 <p class=
"description">Port number
</p>
3063 <h3 class=
"function"><a name=
"ippRead">ippRead
</a></h3>
3064 <p class=
"description">Read data for an IPP message from a HTTP connection.
</p>
3066 <a href=
"#ipp_state_t">ipp_state_t
</a> ippRead (
<br>
3067 <a href=
"#http_t">http_t
</a> *http,
<br>
3068 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3070 <h4 class=
"parameters">Parameters
</h4>
3073 <dd class=
"description">HTTP connection
</dd>
3075 <dd class=
"description">IPP data
</dd>
3077 <h4 class=
"returnvalue">Return Value
</h4>
3078 <p class=
"description">Current state
</p>
3079 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"ippReadFile">ippReadFile
</a></h3>
3080 <p class=
"description">Read data for an IPP message from a file.
</p>
3082 <a href=
"#ipp_state_t">ipp_state_t
</a> ippReadFile (
<br>
3083 int fd,
<br>
3084 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3086 <h4 class=
"parameters">Parameters
</h4>
3089 <dd class=
"description">HTTP data
</dd>
3091 <dd class=
"description">IPP data
</dd>
3093 <h4 class=
"returnvalue">Return Value
</h4>
3094 <p class=
"description">Current state
</p>
3095 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippReadIO">ippReadIO
</a></h3>
3096 <p class=
"description">Read data for an IPP message.
</p>
3098 <a href=
"#ipp_state_t">ipp_state_t
</a> ippReadIO (
<br>
3099 void *src,
<br>
3100 <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br>
3101 int blocking,
<br>
3102 <a href=
"#ipp_t">ipp_t
</a> *parent,
<br>
3103 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3105 <h4 class=
"parameters">Parameters
</h4>
3108 <dd class=
"description">Data source
</dd>
3110 <dd class=
"description">Read callback function
</dd>
3112 <dd class=
"description">Use blocking IO?
</dd>
3114 <dd class=
"description">Parent request, if any
</dd>
3116 <dd class=
"description">IPP data
</dd>
3118 <h4 class=
"returnvalue">Return Value
</h4>
3119 <p class=
"description">Current state
</p>
3120 <h3 class=
"function"><a name=
"ippSetPort">ippSetPort
</a></h3>
3121 <p class=
"description">Set the default port number.
</p>
3123 void ippSetPort (
<br>
3124 int p
<br>
3126 <h4 class=
"parameters">Parameters
</h4>
3129 <dd class=
"description">Port number to use
</dd>
3131 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"ippTagString">ippTagString
</a></h3>
3132 <p class=
"description">Return the tag name corresponding to a tag value.
</p>
3134 const char *ippTagString (
<br>
3135 <a href=
"#ipp_tag_t">ipp_tag_t
</a> tag
<br>
3137 <h4 class=
"parameters">Parameters
</h4>
3140 <dd class=
"description">Tag value
</dd>
3142 <h4 class=
"returnvalue">Return Value
</h4>
3143 <p class=
"description">Tag name
</p>
3144 <h4 class=
"discussion">Discussion
</h4>
3145 <p class=
"discussion">The returned names are defined in RFC
2911 and
3382.
3148 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"ippTagValue">ippTagValue
</a></h3>
3149 <p class=
"description">Return the tag value corresponding to a tag name.
</p>
3151 <a href=
"#ipp_tag_t">ipp_tag_t
</a> ippTagValue (
<br>
3152 const char *name
<br>
3154 <h4 class=
"parameters">Parameters
</h4>
3157 <dd class=
"description">Tag name
</dd>
3159 <h4 class=
"returnvalue">Return Value
</h4>
3160 <p class=
"description">Tag value
</p>
3161 <h4 class=
"discussion">Discussion
</h4>
3162 <p class=
"discussion">The tag names are defined in RFC
2911 and
3382.
3165 <h3 class=
"function"><a name=
"ippTimeToDate">ippTimeToDate
</a></h3>
3166 <p class=
"description">Convert from UNIX time to RFC
1903 format.
</p>
3168 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *ippTimeToDate (
<br>
3169 time_t t
<br>
3171 <h4 class=
"parameters">Parameters
</h4>
3174 <dd class=
"description">UNIX time value
</dd>
3176 <h4 class=
"returnvalue">Return Value
</h4>
3177 <p class=
"description">RFC-
1903 date/time data
</p>
3178 <h3 class=
"function"><a name=
"ippWrite">ippWrite
</a></h3>
3179 <p class=
"description">Write data for an IPP message to a HTTP connection.
</p>
3181 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWrite (
<br>
3182 <a href=
"#http_t">http_t
</a> *http,
<br>
3183 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3185 <h4 class=
"parameters">Parameters
</h4>
3188 <dd class=
"description">HTTP connection
</dd>
3190 <dd class=
"description">IPP data
</dd>
3192 <h4 class=
"returnvalue">Return Value
</h4>
3193 <p class=
"description">Current state
</p>
3194 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span><a name=
"ippWriteFile">ippWriteFile
</a></h3>
3195 <p class=
"description">Write data for an IPP message to a file.
</p>
3197 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWriteFile (
<br>
3198 int fd,
<br>
3199 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3201 <h4 class=
"parameters">Parameters
</h4>
3204 <dd class=
"description">HTTP data
</dd>
3206 <dd class=
"description">IPP data
</dd>
3208 <h4 class=
"returnvalue">Return Value
</h4>
3209 <p class=
"description">Current state
</p>
3210 <h3 class=
"function"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"ippWriteIO">ippWriteIO
</a></h3>
3211 <p class=
"description">Write data for an IPP message.
</p>
3213 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWriteIO (
<br>
3214 void *dst,
<br>
3215 <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br>
3216 int blocking,
<br>
3217 <a href=
"#ipp_t">ipp_t
</a> *parent,
<br>
3218 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3220 <h4 class=
"parameters">Parameters
</h4>
3223 <dd class=
"description">Destination
</dd>
3225 <dd class=
"description">Write callback function
</dd>
3227 <dd class=
"description">Use blocking IO?
</dd>
3229 <dd class=
"description">Parent IPP message
</dd>
3231 <dd class=
"description">IPP data
</dd>
3233 <h4 class=
"returnvalue">Return Value
</h4>
3234 <p class=
"description">Current state
</p>
3235 <h2 class=
"title"><a name=
"TYPES">Data Types
</a></h2>
3236 <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>
3237 <p class=
"description">Socket address list, which is
3238 used to enumerate all of the
3239 addresses that are associated
3240 with a hostname.
</p>
3242 typedef struct
<a href=
"#http_addrlist_s">http_addrlist_s
</a> / http_addrlist_t;
3244 <h3 class=
"typedef"><a name=
"http_auth_t">http_auth_t
</a></h3>
3245 <p class=
"description">HTTP authentication types
</p>
3247 typedef enum
<a href=
"#http_auth_e">http_auth_e
</a> http_auth_t;
3249 <h3 class=
"typedef"><a name=
"http_encoding_t">http_encoding_t
</a></h3>
3250 <p class=
"description">HTTP transfer encoding values
</p>
3252 typedef enum
<a href=
"#http_encoding_e">http_encoding_e
</a> http_encoding_t;
3254 <h3 class=
"typedef"><a name=
"http_encryption_t">http_encryption_t
</a></h3>
3255 <p class=
"description">HTTP encryption values
</p>
3257 typedef enum
<a href=
"#http_encryption_e">http_encryption_e
</a> http_encryption_t;
3259 <h3 class=
"typedef"><a name=
"http_field_t">http_field_t
</a></h3>
3260 <p class=
"description">HTTP field names
</p>
3262 typedef enum
<a href=
"#http_field_e">http_field_e
</a> http_field_t;
3264 <h3 class=
"typedef"><a name=
"http_keepalive_t">http_keepalive_t
</a></h3>
3265 <p class=
"description">Types and structures...
</p>
3267 typedef enum
<a href=
"#http_keepalive_e">http_keepalive_e
</a> http_keepalive_t;
3269 <h3 class=
"typedef"><a name=
"http_status_t">http_status_t
</a></h3>
3270 <p class=
"description">HTTP status codes
</p>
3272 typedef enum
<a href=
"#http_status_e">http_status_e
</a> http_status_t;
3274 <h3 class=
"typedef"><a name=
"http_t">http_t
</a></h3>
3275 <p class=
"description">HTTP connection type
</p>
3277 typedef struct _http_s http_t;
3279 <h3 class=
"typedef"><a name=
"http_uri_coding_t">http_uri_coding_t
</a></h3>
3280 <p class=
"description">HTTP version numbers
</p>
3282 typedef enum
<a href=
"#http_uri_coding_e">http_uri_coding_e
</a> http_uri_coding_t;
3284 <h3 class=
"typedef"><a name=
"http_uri_status_t">http_uri_status_t
</a></h3>
3285 <p class=
"description">URI en/decode flags
</p>
3287 typedef enum
<a href=
"#http_uri_status_e">http_uri_status_e
</a> http_uri_status_t;
3289 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span><a name=
"http_version_t">http_version_t
</a></h3>
3290 <p class=
"description">Socket address union, which
3291 makes using IPv6 and other
3292 address types easier and
3295 typedef enum
<a href=
"#http_version_e">http_version_e
</a> http_version_t;
3297 <h3 class=
"typedef"><a name=
"ipp_attribute_t">ipp_attribute_t
</a></h3>
3298 <p class=
"description">Attribute
</p>
3300 typedef struct
<a href=
"#ipp_attribute_s">ipp_attribute_s
</a> ipp_attribute_t;
3302 <h3 class=
"typedef"><a name=
"ipp_finish_t">ipp_finish_t
</a></h3>
3303 <p class=
"description">Orientation...
</p>
3305 typedef enum
<a href=
"#ipp_finish_e">ipp_finish_e
</a> ipp_finish_t;
3307 <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>
3308 <p class=
"description">IPP IO Callback Function
</p>
3310 typedef ssize_t (*ipp_iocb_t)(void *,
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *, size_t);
3312 <h3 class=
"typedef"><a name=
"ipp_jstate_t">ipp_jstate_t
</a></h3>
3313 <p class=
"description">Printer States....
</p>
3315 typedef enum
<a href=
"#ipp_jstate_e">ipp_jstate_e
</a> ipp_jstate_t;
3317 <h3 class=
"typedef"><a name=
"ipp_op_t">ipp_op_t
</a></h3>
3318 <p class=
"description">Old names for the operations
</p>
3320 typedef enum
<a href=
"#ipp_op_e">ipp_op_e
</a> ipp_op_t;
3322 <h3 class=
"typedef"><a name=
"ipp_orient_t">ipp_orient_t
</a></h3>
3323 <p class=
"description">Qualities...
</p>
3325 typedef enum
<a href=
"#ipp_orient_e">ipp_orient_e
</a> ipp_orient_t;
3327 <h3 class=
"typedef"><a name=
"ipp_pstate_t">ipp_pstate_t
</a></h3>
3328 <p class=
"description">IPP states...
</p>
3330 typedef enum
<a href=
"#ipp_pstate_e">ipp_pstate_e
</a> ipp_pstate_t;
3332 <h3 class=
"typedef"><a name=
"ipp_quality_t">ipp_quality_t
</a></h3>
3333 <p class=
"description">Job States....
</p>
3335 typedef enum
<a href=
"#ipp_quality_e">ipp_quality_e
</a> ipp_quality_t;
3337 <h3 class=
"typedef"><a name=
"ipp_request_t">ipp_request_t
</a></h3>
3338 <p class=
"description">Request Header
</p>
3340 typedef union
<a href=
"#ipp_request_u">ipp_request_u
</a> ipp_request_t;
3342 <h3 class=
"typedef"><a name=
"ipp_res_t">ipp_res_t
</a></h3>
3343 <p class=
"description">Types and structures...
</p>
3345 typedef enum
<a href=
"#ipp_res_e">ipp_res_e
</a> ipp_res_t;
3347 <h3 class=
"typedef"><a name=
"ipp_state_t">ipp_state_t
</a></h3>
3348 <p class=
"description">IPP operations...
</p>
3350 typedef enum
<a href=
"#ipp_state_e">ipp_state_e
</a> ipp_state_t;
3352 <h3 class=
"typedef"><a name=
"ipp_t">ipp_t
</a></h3>
3353 <p class=
"description">Attribute Value
</p>
3355 typedef struct
<a href=
"#ipp_s">ipp_s
</a> ipp_t;
3357 <h3 class=
"typedef"><a name=
"ipp_uchar_t">ipp_uchar_t
</a></h3>
3358 <p class=
"description">IPP status codes...
</p>
3360 typedef typedef unsigned char ipp_uchar_t;
3362 <h3 class=
"typedef"><a name=
"ipp_tag_t">ipp_tag_t
</a></h3>
3363 <p class=
"description">Format tags for attributes...
</p>
3365 typedef enum
<a href=
"#ipp_tag_e">ipp_tag_e
</a> ipp_tag_t;
3367 <h3 class=
"typedef"><a name=
"ipp_value_t">ipp_value_t
</a></h3>
3368 <p class=
"description">New in CUPS
1.1.19</p>
3370 typedef union
<a href=
"#ipp_value_u">ipp_value_u
</a> ipp_value_t;
3372 <h2 class=
"title"><a name=
"STRUCTURES">Structures
</a></h2>
3373 <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>
3374 <p class=
"description">Socket address list, which is
3375 used to enumerate all of the
3376 addresses that are associated
3377 with a hostname.
</p>
3378 <p class=
"code">struct http_addrlist_s {
<br>
3379 <a href=
"#http_addr_t">http_addr_t
</a> addr;
<br>
3380 struct
<a href=
"#http_addrlist_s">http_addrlist_s
</a> *next;
<br>
3382 <h4 class=
"members">Members
</h4>
3385 <dd class=
"description">Address
</dd>
3387 <dd class=
"description">Pointer to next address in list
</dd>
3389 <h3 class=
"struct"><a name=
"ipp_attribute_s">ipp_attribute_s
</a></h3>
3390 <p class=
"description">Attribute
</p>
3391 <p class=
"code">struct ipp_attribute_s {
<br>
3392 char *name;
<br>
3393 struct
<a href=
"#ipp_attribute_s">ipp_attribute_s
</a> *next;
<br>
3394 int num_values;
<br>
3395 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group_tag, value_tag;
<br>
3396 <a href=
"#ipp_value_t">ipp_value_t
</a> values[
1];
<br>
3398 <h4 class=
"members">Members
</h4>
3401 <dd class=
"description">Name of attribute
</dd>
3403 <dd class=
"description">Next attribute in list
</dd>
3404 <dt>num_values
</dt>
3405 <dd class=
"description">Number of values
</dd>
3407 <dd class=
"description">What type of value is it?
</dd>
3409 <dd class=
"description">Values
</dd>
3411 <h3 class=
"struct"><a name=
"ipp_s">ipp_s
</a></h3>
3412 <p class=
"description">IPP Request/Response/Notification
</p>
3413 <p class=
"code">struct ipp_s {
<br>
3414 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attrs;
<br>
3415 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *current;
<br>
3416 <a href=
"#ipp_tag_t">ipp_tag_t
</a> curtag;
<br>
3417 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *last;
<br>
3418 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *prev;
<br>
3419 <a href=
"#ipp_request_t">ipp_request_t
</a> request;
<br>
3420 <a href=
"#ipp_state_t">ipp_state_t
</a> state;
<br>
3422 <h4 class=
"members">Members
</h4>
3425 <dd class=
"description">Attributes
</dd>
3427 <dd class=
"description">Current attribute (for read/write)
</dd>
3429 <dd class=
"description">Current attribute group tag
</dd>
3431 <dd class=
"description">Last attribute in list
</dd>
3432 <dt>prev
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
3433 <dd class=
"description">Previous attribute (for read)
</dd>
3435 <dd class=
"description">Request header
</dd>
3437 <dd class=
"description">State of request
</dd>
3439 <h2 class=
"title"><a name=
"UNIONS">Unions
</a></h2>
3440 <h3 class=
"union"><a name=
"ipp_request_u">ipp_request_u
</a></h3>
3441 <p class=
"description">Request Header
</p>
3442 <p class=
"code">union ipp_request_u {
<br>
3444 <h4 class=
"members">Members
</h4>
3447 <h3 class=
"union"><a name=
"ipp_value_u">ipp_value_u
</a></h3>
3448 <p class=
"description">New in CUPS
1.1.19</p>
3449 <p class=
"code">union ipp_value_u {
<br>
3450 char boolean;
<br>
3451 <a href=
"#ipp_t">ipp_t
</a> *collection;
<br>
3452 <a href=
"#ipp_uchar_t">ipp_uchar_t
</a> date[
11];
<br>
3453 int integer;
<br>
3455 <h4 class=
"members">Members
</h4>
3458 <dd class=
"description">Boolean value
</dd>
3459 <dt>collection
<span class=
"info"> CUPS
1.1.19/Mac OS X
10.3 </span></dt>
3460 <dd class=
"description">Collection value
</dd>
3462 <dd class=
"description">Date/time value
</dd>
3464 <dd class=
"description">Integer/enumerated value
</dd>
3466 <h2 class=
"title"><a name=
"ENUMERATIONS">Constants
</a></h2>
3467 <h3 class=
"enumeration"><a name=
"http_auth_e">http_auth_e
</a></h3>
3468 <p class=
"description">HTTP authentication types
</p>
3469 <h4 class=
"constants">Constants
</h4>
3471 <dt>HTTP_AUTH_BASIC
</dt>
3472 <dd class=
"description">Basic authentication in use
</dd>
3473 <dt>HTTP_AUTH_MD5
</dt>
3474 <dd class=
"description">Digest authentication in use
</dd>
3475 <dt>HTTP_AUTH_MD5_INT
</dt>
3476 <dd class=
"description">Digest authentication in use for body
</dd>
3477 <dt>HTTP_AUTH_MD5_SESS
</dt>
3478 <dd class=
"description">MD5-session authentication in use
</dd>
3479 <dt>HTTP_AUTH_MD5_SESS_INT
</dt>
3480 <dd class=
"description">MD5-session authentication in use for body
</dd>
3481 <dt>HTTP_AUTH_NEGOTIATE
<span class=
"info"> CUPS
1.3/Mac OS X
10.5 </span></dt>
3482 <dd class=
"description">GSSAPI authentication in use
</dd>
3483 <dt>HTTP_AUTH_NONE
</dt>
3484 <dd class=
"description">No authentication in use
</dd>
3486 <h3 class=
"enumeration"><a name=
"http_encoding_e">http_encoding_e
</a></h3>
3487 <p class=
"description">HTTP transfer encoding values
</p>
3488 <h4 class=
"constants">Constants
</h4>
3490 <dt>HTTP_ENCODE_CHUNKED
</dt>
3491 <dd class=
"description">Data is chunked
</dd>
3492 <dt>HTTP_ENCODE_FIELDS
</dt>
3493 <dd class=
"description">Sending HTTP fields
</dd>
3494 <dt>HTTP_ENCODE_LENGTH
</dt>
3495 <dd class=
"description">Data is sent with Content-Length
</dd>
3497 <h3 class=
"enumeration"><a name=
"http_encryption_e">http_encryption_e
</a></h3>
3498 <p class=
"description">HTTP encryption values
</p>
3499 <h4 class=
"constants">Constants
</h4>
3501 <dt>HTTP_ENCRYPT_ALWAYS
</dt>
3502 <dd class=
"description">Always encrypt (SSL)
</dd>
3503 <dt>HTTP_ENCRYPT_IF_REQUESTED
</dt>
3504 <dd class=
"description">Encrypt if requested (TLS upgrade)
</dd>
3505 <dt>HTTP_ENCRYPT_NEVER
</dt>
3506 <dd class=
"description">Never encrypt
</dd>
3507 <dt>HTTP_ENCRYPT_REQUIRED
</dt>
3508 <dd class=
"description">Encryption is required (TLS upgrade)
</dd>
3510 <h3 class=
"enumeration"><a name=
"http_field_e">http_field_e
</a></h3>
3511 <p class=
"description">HTTP field names
</p>
3512 <h4 class=
"constants">Constants
</h4>
3514 <dt>HTTP_FIELD_ACCEPT_LANGUAGE
</dt>
3515 <dd class=
"description">Accept-Language field
</dd>
3516 <dt>HTTP_FIELD_ACCEPT_RANGES
</dt>
3517 <dd class=
"description">Accept-Ranges field
</dd>
3518 <dt>HTTP_FIELD_AUTHORIZATION
</dt>
3519 <dd class=
"description">Authorization field
</dd>
3520 <dt>HTTP_FIELD_CONNECTION
</dt>
3521 <dd class=
"description">Connection field
</dd>
3522 <dt>HTTP_FIELD_CONTENT_ENCODING
</dt>
3523 <dd class=
"description">Content-Encoding field
</dd>
3524 <dt>HTTP_FIELD_CONTENT_LANGUAGE
</dt>
3525 <dd class=
"description">Content-Language field
</dd>
3526 <dt>HTTP_FIELD_CONTENT_LENGTH
</dt>
3527 <dd class=
"description">Content-Length field
</dd>
3528 <dt>HTTP_FIELD_CONTENT_LOCATION
</dt>
3529 <dd class=
"description">Content-Location field
</dd>
3530 <dt>HTTP_FIELD_CONTENT_MD5
</dt>
3531 <dd class=
"description">Content-MD5 field
</dd>
3532 <dt>HTTP_FIELD_CONTENT_RANGE
</dt>
3533 <dd class=
"description">Content-Range field
</dd>
3534 <dt>HTTP_FIELD_CONTENT_TYPE
</dt>
3535 <dd class=
"description">Content-Type field
</dd>
3536 <dt>HTTP_FIELD_CONTENT_VERSION
</dt>
3537 <dd class=
"description">Content-Version field
</dd>
3538 <dt>HTTP_FIELD_DATE
</dt>
3539 <dd class=
"description">Date field
</dd>
3540 <dt>HTTP_FIELD_HOST
</dt>
3541 <dd class=
"description">Host field
</dd>
3542 <dt>HTTP_FIELD_IF_MODIFIED_SINCE
</dt>
3543 <dd class=
"description">If-Modified-Since field
</dd>
3544 <dt>HTTP_FIELD_IF_UNMODIFIED_SINCE
</dt>
3545 <dd class=
"description">If-Unmodified-Since field
</dd>
3546 <dt>HTTP_FIELD_KEEP_ALIVE
</dt>
3547 <dd class=
"description">Keep-Alive field
</dd>
3548 <dt>HTTP_FIELD_LAST_MODIFIED
</dt>
3549 <dd class=
"description">Last-Modified field
</dd>
3550 <dt>HTTP_FIELD_LINK
</dt>
3551 <dd class=
"description">Link field
</dd>
3552 <dt>HTTP_FIELD_LOCATION
</dt>
3553 <dd class=
"description">Location field
</dd>
3554 <dt>HTTP_FIELD_MAX
</dt>
3555 <dd class=
"description">Maximum field index
</dd>
3556 <dt>HTTP_FIELD_RANGE
</dt>
3557 <dd class=
"description">Range field
</dd>
3558 <dt>HTTP_FIELD_REFERER
</dt>
3559 <dd class=
"description">Referer field
</dd>
3560 <dt>HTTP_FIELD_RETRY_AFTER
</dt>
3561 <dd class=
"description">Retry-After field
</dd>
3562 <dt>HTTP_FIELD_TRANSFER_ENCODING
</dt>
3563 <dd class=
"description">Transfer-Encoding field
</dd>
3564 <dt>HTTP_FIELD_UNKNOWN
</dt>
3565 <dd class=
"description">Unknown field
</dd>
3566 <dt>HTTP_FIELD_UPGRADE
</dt>
3567 <dd class=
"description">Upgrade field
</dd>
3568 <dt>HTTP_FIELD_USER_AGENT
</dt>
3569 <dd class=
"description">User-Agent field
</dd>
3570 <dt>HTTP_FIELD_WWW_AUTHENTICATE
</dt>
3571 <dd class=
"description">WWW-Authenticate field
</dd>
3573 <h3 class=
"enumeration"><a name=
"http_keepalive_e">http_keepalive_e
</a></h3>
3574 <p class=
"description">Types and structures...
</p>
3575 <h4 class=
"constants">Constants
</h4>
3577 <dt>HTTP_KEEPALIVE_OFF
</dt>
3578 <dd class=
"description">No keep alive support
</dd>
3579 <dt>HTTP_KEEPALIVE_ON
</dt>
3580 <dd class=
"description">Use keep alive
</dd>
3582 <h3 class=
"enumeration"><a name=
"http_state_e">http_state_e
</a></h3>
3583 <p class=
"description"></p>
3584 <h4 class=
"constants">Constants
</h4>
3586 <dt>HTTP_CLOSE
</dt>
3587 <dd class=
"description">CLOSE command, waiting for blank line
</dd>
3588 <dt>HTTP_DELETE
</dt>
3589 <dd class=
"description">DELETE command, waiting for blank line
</dd>
3591 <dd class=
"description">GET command, waiting for blank line
</dd>
3592 <dt>HTTP_GET_SEND
</dt>
3593 <dd class=
"description">GET command, sending data
</dd>
3595 <dd class=
"description">HEAD command, waiting for blank line
</dd>
3596 <dt>HTTP_OPTIONS
</dt>
3597 <dd class=
"description">OPTIONS command, waiting for blank line
</dd>
3599 <dd class=
"description">POST command, waiting for blank line
</dd>
3600 <dt>HTTP_POST_RECV
</dt>
3601 <dd class=
"description">POST command, receiving data
</dd>
3602 <dt>HTTP_POST_SEND
</dt>
3603 <dd class=
"description">POST command, sending data
</dd>
3605 <dd class=
"description">PUT command, waiting for blank line
</dd>
3606 <dt>HTTP_PUT_RECV
</dt>
3607 <dd class=
"description">PUT command, receiving data
</dd>
3608 <dt>HTTP_STATUS
</dt>
3609 <dd class=
"description">Command complete, sending status
</dd>
3610 <dt>HTTP_TRACE
</dt>
3611 <dd class=
"description">TRACE command, waiting for blank line
</dd>
3612 <dt>HTTP_WAITING
</dt>
3613 <dd class=
"description">Waiting for command
</dd>
3615 <h3 class=
"enumeration"><a name=
"http_status_e">http_status_e
</a></h3>
3616 <p class=
"description">HTTP status codes
</p>
3617 <h4 class=
"constants">Constants
</h4>
3619 <dt>HTTP_ACCEPTED
</dt>
3620 <dd class=
"description">DELETE command was successful
</dd>
3621 <dt>HTTP_BAD_GATEWAY
</dt>
3622 <dd class=
"description">Bad gateway
</dd>
3623 <dt>HTTP_BAD_REQUEST
</dt>
3624 <dd class=
"description">Bad request
</dd>
3625 <dt>HTTP_CONFLICT
</dt>
3626 <dd class=
"description">Request is self-conflicting
</dd>
3627 <dt>HTTP_CONTINUE
</dt>
3628 <dd class=
"description">Everything OK, keep going...
</dd>
3629 <dt>HTTP_CREATED
</dt>
3630 <dd class=
"description">PUT command was successful
</dd>
3631 <dt>HTTP_ERROR
</dt>
3632 <dd class=
"description">An error response from httpXxxx()
</dd>
3633 <dt>HTTP_EXPECTATION_FAILED
</dt>
3634 <dd class=
"description">The expectation given in an Expect header field was not met
</dd>
3635 <dt>HTTP_FORBIDDEN
</dt>
3636 <dd class=
"description">Forbidden to access this URI
</dd>
3637 <dt>HTTP_GATEWAY_TIMEOUT
</dt>
3638 <dd class=
"description">Gateway connection timed out
</dd>
3640 <dd class=
"description">Server has gone away
</dd>
3641 <dt>HTTP_LENGTH_REQUIRED
</dt>
3642 <dd class=
"description">A content length or encoding is required
</dd>
3643 <dt>HTTP_METHOD_NOT_ALLOWED
</dt>
3644 <dd class=
"description">Method is not allowed
</dd>
3645 <dt>HTTP_MOVED_PERMANENTLY
</dt>
3646 <dd class=
"description">Document has moved permanently
</dd>
3647 <dt>HTTP_MOVED_TEMPORARILY
</dt>
3648 <dd class=
"description">Document has moved temporarily
</dd>
3649 <dt>HTTP_MULTIPLE_CHOICES
</dt>
3650 <dd class=
"description">Multiple files match request
</dd>
3651 <dt>HTTP_NOT_ACCEPTABLE
</dt>
3652 <dd class=
"description">Not Acceptable
</dd>
3653 <dt>HTTP_NOT_AUTHORITATIVE
</dt>
3654 <dd class=
"description">Information isn't authoritative
</dd>
3655 <dt>HTTP_NOT_FOUND
</dt>
3656 <dd class=
"description">URI was not found
</dd>
3657 <dt>HTTP_NOT_IMPLEMENTED
</dt>
3658 <dd class=
"description">Feature not implemented
</dd>
3659 <dt>HTTP_NOT_MODIFIED
</dt>
3660 <dd class=
"description">File not modified
</dd>
3661 <dt>HTTP_NOT_SUPPORTED
</dt>
3662 <dd class=
"description">HTTP version not supported
</dd>
3663 <dt>HTTP_NO_CONTENT
</dt>
3664 <dd class=
"description">Successful command, no new data
</dd>
3666 <dd class=
"description">OPTIONS/GET/HEAD/POST/TRACE command was successful
</dd>
3667 <dt>HTTP_PARTIAL_CONTENT
</dt>
3668 <dd class=
"description">Only a partial file was recieved/sent
</dd>
3669 <dt>HTTP_PAYMENT_REQUIRED
</dt>
3670 <dd class=
"description">Payment required
</dd>
3671 <dt>HTTP_PRECONDITION
</dt>
3672 <dd class=
"description">Precondition failed
</dd>
3673 <dt>HTTP_PROXY_AUTHENTICATION
</dt>
3674 <dd class=
"description">Proxy Authentication is Required
</dd>
3675 <dt>HTTP_REQUESTED_RANGE
</dt>
3676 <dd class=
"description">The requested range is not satisfiable
</dd>
3677 <dt>HTTP_REQUEST_TIMEOUT
</dt>
3678 <dd class=
"description">Request timed out
</dd>
3679 <dt>HTTP_REQUEST_TOO_LARGE
</dt>
3680 <dd class=
"description">Request entity too large
</dd>
3681 <dt>HTTP_RESET_CONTENT
</dt>
3682 <dd class=
"description">Content was reset/recreated
</dd>
3683 <dt>HTTP_SEE_OTHER
</dt>
3684 <dd class=
"description">See this other link...
</dd>
3685 <dt>HTTP_SERVER_ERROR
</dt>
3686 <dd class=
"description">Internal server error
</dd>
3687 <dt>HTTP_SERVICE_UNAVAILABLE
</dt>
3688 <dd class=
"description">Service is unavailable
</dd>
3689 <dt>HTTP_SWITCHING_PROTOCOLS
</dt>
3690 <dd class=
"description">HTTP upgrade to TLS/SSL
</dd>
3691 <dt>HTTP_UNAUTHORIZED
</dt>
3692 <dd class=
"description">Unauthorized to access host
</dd>
3693 <dt>HTTP_UNSUPPORTED_MEDIATYPE
</dt>
3694 <dd class=
"description">The requested media type is unsupported
</dd>
3695 <dt>HTTP_UPGRADE_REQUIRED
</dt>
3696 <dd class=
"description">Upgrade to SSL/TLS required
</dd>
3697 <dt>HTTP_URI_TOO_LONG
</dt>
3698 <dd class=
"description">URI too long
</dd>
3699 <dt>HTTP_USE_PROXY
</dt>
3700 <dd class=
"description">Must use a proxy to access this URI
</dd>
3702 <h3 class=
"enumeration"><a name=
"http_uri_coding_e">http_uri_coding_e
</a></h3>
3703 <p class=
"description"></p>
3704 <h4 class=
"constants">Constants
</h4>
3706 <dt>HTTP_URI_CODING_ALL
</dt>
3707 <dd class=
"description">En/decode everything
</dd>
3708 <dt>HTTP_URI_CODING_HOSTNAME
</dt>
3709 <dd class=
"description">En/decode the hostname portion
</dd>
3710 <dt>HTTP_URI_CODING_MOST
</dt>
3711 <dd class=
"description">En/decode all but the query
</dd>
3712 <dt>HTTP_URI_CODING_NONE
</dt>
3713 <dd class=
"description">Don't en/decode anything
</dd>
3714 <dt>HTTP_URI_CODING_QUERY
</dt>
3715 <dd class=
"description">En/decode the query portion
</dd>
3716 <dt>HTTP_URI_CODING_RESOURCE
</dt>
3717 <dd class=
"description">En/decode the resource portion
</dd>
3718 <dt>HTTP_URI_CODING_USERNAME
</dt>
3719 <dd class=
"description">En/decode the username portion
</dd>
3721 <h3 class=
"enumeration"><a name=
"http_uri_status_e">http_uri_status_e
</a></h3>
3722 <p class=
"description"></p>
3723 <h4 class=
"constants">Constants
</h4>
3725 <dt>HTTP_URI_BAD_ARGUMENTS
</dt>
3726 <dd class=
"description">Bad arguments to function (error)
</dd>
3727 <dt>HTTP_URI_BAD_HOSTNAME
</dt>
3728 <dd class=
"description">Bad hostname in URI (error)
</dd>
3729 <dt>HTTP_URI_BAD_PORT
</dt>
3730 <dd class=
"description">Bad port number in URI (error)
</dd>
3731 <dt>HTTP_URI_BAD_RESOURCE
</dt>
3732 <dd class=
"description">Bad resource in URI (error)
</dd>
3733 <dt>HTTP_URI_BAD_SCHEME
</dt>
3734 <dd class=
"description">Bad scheme in URI (error)
</dd>
3735 <dt>HTTP_URI_BAD_URI
</dt>
3736 <dd class=
"description">Bad/empty URI (error)
</dd>
3737 <dt>HTTP_URI_BAD_USERNAME
</dt>
3738 <dd class=
"description">Bad username in URI (error)
</dd>
3739 <dt>HTTP_URI_MISSING_RESOURCE
</dt>
3740 <dd class=
"description">Missing resource in URI (warning)
</dd>
3741 <dt>HTTP_URI_MISSING_SCHEME
</dt>
3742 <dd class=
"description">Missing scheme in URI (warning)
</dd>
3743 <dt>HTTP_URI_OK
</dt>
3744 <dd class=
"description">URI decoded OK
</dd>
3745 <dt>HTTP_URI_OVERFLOW
</dt>
3746 <dd class=
"description">URI buffer for httpAssembleURI is too small
</dd>
3747 <dt>HTTP_URI_UNKNOWN_SCHEME
</dt>
3748 <dd class=
"description">Unknown scheme in URI (warning)
</dd>
3750 <h3 class=
"enumeration"><a name=
"http_version_e">http_version_e
</a></h3>
3751 <p class=
"description"></p>
3752 <h4 class=
"constants">Constants
</h4>
3755 <dd class=
"description">HTTP/
0.9</dd>
3757 <dd class=
"description">HTTP/
1.0</dd>
3759 <dd class=
"description">HTTP/
1.1</dd>
3761 <h3 class=
"enumeration"><a name=
"ipp_finish_e">ipp_finish_e
</a></h3>
3762 <p class=
"description"></p>
3763 <h4 class=
"constants">Constants
</h4>
3765 <dt>IPP_FINISHINGS_BALE
</dt>
3766 <dd class=
"description">Bale (any type)
</dd>
3767 <dt>IPP_FINISHINGS_BIND
</dt>
3768 <dd class=
"description">Bind
</dd>
3769 <dt>IPP_FINISHINGS_BIND_BOTTOM
</dt>
3770 <dd class=
"description">Bind on bottom
</dd>
3771 <dt>IPP_FINISHINGS_BIND_LEFT
</dt>
3772 <dd class=
"description">Bind on left
</dd>
3773 <dt>IPP_FINISHINGS_BIND_RIGHT
</dt>
3774 <dd class=
"description">Bind on right
</dd>
3775 <dt>IPP_FINISHINGS_BIND_TOP
</dt>
3776 <dd class=
"description">Bind on top
</dd>
3777 <dt>IPP_FINISHINGS_BOOKLET_MAKER
</dt>
3778 <dd class=
"description">Fold to make booklet
</dd>
3779 <dt>IPP_FINISHINGS_COVER
</dt>
3780 <dd class=
"description">Add cover
</dd>
3781 <dt>IPP_FINISHINGS_EDGE_STITCH
</dt>
3782 <dd class=
"description">Stitch along any side
</dd>
3783 <dt>IPP_FINISHINGS_EDGE_STITCH_BOTTOM
</dt>
3784 <dd class=
"description">Stitch along bottom edge
</dd>
3785 <dt>IPP_FINISHINGS_EDGE_STITCH_LEFT
</dt>
3786 <dd class=
"description">Stitch along left side
</dd>
3787 <dt>IPP_FINISHINGS_EDGE_STITCH_RIGHT
</dt>
3788 <dd class=
"description">Stitch along right side
</dd>
3789 <dt>IPP_FINISHINGS_EDGE_STITCH_TOP
</dt>
3790 <dd class=
"description">Stitch along top edge
</dd>
3791 <dt>IPP_FINISHINGS_FOLD
</dt>
3792 <dd class=
"description">Fold (any type)
</dd>
3793 <dt>IPP_FINISHINGS_JOB_OFFSET
</dt>
3794 <dd class=
"description">Offset for binding (any type)
</dd>
3795 <dt>IPP_FINISHINGS_NONE
</dt>
3796 <dd class=
"description">No finishing
</dd>
3797 <dt>IPP_FINISHINGS_PUNCH
</dt>
3798 <dd class=
"description">Punch (any location/count)
</dd>
3799 <dt>IPP_FINISHINGS_SADDLE_STITCH
</dt>
3800 <dd class=
"description">Staple interior
</dd>
3801 <dt>IPP_FINISHINGS_STAPLE
</dt>
3802 <dd class=
"description">Staple (any location)
</dd>
3803 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_LEFT
</dt>
3804 <dd class=
"description">Staple bottom left corner
</dd>
3805 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT
</dt>
3806 <dd class=
"description">Staple bottom right corner
</dd>
3807 <dt>IPP_FINISHINGS_STAPLE_DUAL_BOTTOM
</dt>
3808 <dd class=
"description">Two staples on bottom
</dd>
3809 <dt>IPP_FINISHINGS_STAPLE_DUAL_LEFT
</dt>
3810 <dd class=
"description">Two staples on left
</dd>
3811 <dt>IPP_FINISHINGS_STAPLE_DUAL_RIGHT
</dt>
3812 <dd class=
"description">Two staples on right
</dd>
3813 <dt>IPP_FINISHINGS_STAPLE_DUAL_TOP
</dt>
3814 <dd class=
"description">Two staples on top
</dd>
3815 <dt>IPP_FINISHINGS_STAPLE_TOP_LEFT
</dt>
3816 <dd class=
"description">Staple top left corner
</dd>
3817 <dt>IPP_FINISHINGS_STAPLE_TOP_RIGHT
</dt>
3818 <dd class=
"description">Staple top right corner
</dd>
3819 <dt>IPP_FINISHINGS_TRIM
</dt>
3820 <dd class=
"description">Trim (any type)
</dd>
3822 <h3 class=
"enumeration"><a name=
"ipp_jstate_e">ipp_jstate_e
</a></h3>
3823 <p class=
"description"></p>
3824 <h4 class=
"constants">Constants
</h4>
3826 <dt>IPP_JOB_ABORTED
</dt>
3827 <dd class=
"description">Job has aborted due to error
</dd>
3828 <dt>IPP_JOB_CANCELED
</dt>
3829 <dd class=
"description">Job has been canceled
</dd>
3830 <dt>IPP_JOB_COMPLETED
</dt>
3831 <dd class=
"description">Job has completed successfully
</dd>
3832 <dt>IPP_JOB_HELD
</dt>
3833 <dd class=
"description">Job is held for printing
</dd>
3834 <dt>IPP_JOB_PENDING
</dt>
3835 <dd class=
"description">Job is waiting to be printed
</dd>
3836 <dt>IPP_JOB_PROCESSING
</dt>
3837 <dd class=
"description">Job is currently printing
</dd>
3838 <dt>IPP_JOB_STOPPED
</dt>
3839 <dd class=
"description">Job has been stopped
</dd>
3841 <h3 class=
"enumeration"><a name=
"ipp_op_e">ipp_op_e
</a></h3>
3842 <p class=
"description"></p>
3843 <h4 class=
"constants">Constants
</h4>
3845 <dt>CUPS_ACCEPT_JOBS
</dt>
3846 <dd class=
"description">Accept new jobs on a printer
</dd>
3847 <dt>CUPS_ADD_MODIFY_CLASS
</dt>
3848 <dd class=
"description">Add or modify a class
</dd>
3849 <dt>CUPS_ADD_MODIFY_PRINTER
</dt>
3850 <dd class=
"description">Add or modify a printer
</dd>
3851 <dt>CUPS_AUTHENTICATE_JOB
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
3852 <dd class=
"description">Authenticate a job
</dd>
3853 <dt>CUPS_DELETE_CLASS
</dt>
3854 <dd class=
"description">Delete a class
</dd>
3855 <dt>CUPS_DELETE_PRINTER
</dt>
3856 <dd class=
"description">Delete a printer
</dd>
3857 <dt>CUPS_GET_CLASSES
<span class=
"info"> DEPRECATED
</span></dt>
3858 <dd class=
"description">Get a list of classes
</dd>
3859 <dt>CUPS_GET_DEFAULT
</dt>
3860 <dd class=
"description">Get the default printer
</dd>
3861 <dt>CUPS_GET_DEVICES
</dt>
3862 <dd class=
"description">Get a list of supported devices
</dd>
3863 <dt>CUPS_GET_DOCUMENT
<span class=
"info"> CUPS
1.4 </span></dt>
3864 <dd class=
"description">Get a document file
</dd>
3865 <dt>CUPS_GET_PPD
<span class=
"info"> CUPS
1.3/Mac OS X
10.5 </span></dt>
3866 <dd class=
"description">Get a PPD file
</dd>
3867 <dt>CUPS_GET_PPDS
</dt>
3868 <dd class=
"description">Get a list of supported drivers
</dd>
3869 <dt>CUPS_GET_PRINTERS
</dt>
3870 <dd class=
"description">Get a list of printers and/or classes
</dd>
3871 <dt>CUPS_MOVE_JOB
</dt>
3872 <dd class=
"description">Move a job to a different printer
</dd>
3873 <dt>CUPS_REJECT_JOBS
</dt>
3874 <dd class=
"description">Reject new jobs on a printer
</dd>
3875 <dt>CUPS_SET_DEFAULT
</dt>
3876 <dd class=
"description">Set the default printer
</dd>
3877 <dt>IPP_CANCEL_JOB
</dt>
3878 <dd class=
"description">Cancel a job
</dd>
3879 <dt>IPP_CANCEL_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
3880 <dd class=
"description">Cancel a subscription
</dd>
3881 <dt>IPP_CREATE_JOB
</dt>
3882 <dd class=
"description">Create an empty print job
</dd>
3883 <dt>IPP_CREATE_JOB_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
3884 <dd class=
"description">Create a job subscription
</dd>
3885 <dt>IPP_CREATE_PRINTER_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
3886 <dd class=
"description">Create a printer subscription
</dd>
3887 <dt>IPP_DISABLE_PRINTER
</dt>
3888 <dd class=
"description">Stop a printer
</dd>
3889 <dt>IPP_ENABLE_PRINTER
</dt>
3890 <dd class=
"description">Start a printer
</dd>
3891 <dt>IPP_GET_JOBS
</dt>
3892 <dd class=
"description">Get a list of jobs
</dd>
3893 <dt>IPP_GET_JOB_ATTRIBUTES
</dt>
3894 <dd class=
"description">Get job attributes
</dd>
3895 <dt>IPP_GET_NOTIFICATIONS
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
3896 <dd class=
"description">Get notification events
</dd>
3897 <dt>IPP_GET_PRINTER_ATTRIBUTES
</dt>
3898 <dd class=
"description">Get printer attributes
</dd>
3899 <dt>IPP_GET_PRINTER_SUPPORTED_VALUES
</dt>
3900 <dd class=
"description">Get supported attribute values
</dd>
3901 <dt>IPP_GET_SUBSCRIPTIONS
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
3902 <dd class=
"description">Get list of subscriptions
</dd>
3903 <dt>IPP_GET_SUBSCRIPTION_ATTRIBUTES
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
3904 <dd class=
"description">Get subscription attributes
</dd>
3905 <dt>IPP_HOLD_JOB
</dt>
3906 <dd class=
"description">Hold a job for printing
</dd>
3907 <dt>IPP_PAUSE_PRINTER
</dt>
3908 <dd class=
"description">Stop a printer
</dd>
3909 <dt>IPP_PRINT_JOB
</dt>
3910 <dd class=
"description">Print a single file
</dd>
3911 <dt>IPP_PURGE_JOBS
</dt>
3912 <dd class=
"description">Cancel all jobs
</dd>
3913 <dt>IPP_RELEASE_JOB
</dt>
3914 <dd class=
"description">Release a job for printing
</dd>
3915 <dt>IPP_RENEW_SUBSCRIPTION
<span class=
"info"> CUPS
1.2/Mac OS X
10.5 </span></dt>
3916 <dd class=
"description">Renew a printer subscription
</dd>
3917 <dt>IPP_RESTART_JOB
</dt>
3918 <dd class=
"description">Reprint a job
</dd>
3919 <dt>IPP_RESUME_PRINTER
</dt>
3920 <dd class=
"description">Start a printer
</dd>
3921 <dt>IPP_SEND_DOCUMENT
</dt>
3922 <dd class=
"description">Add a file to a job
</dd>
3923 <dt>IPP_SET_JOB_ATTRIBUTES
</dt>
3924 <dd class=
"description">Set job attributes
</dd>
3925 <dt>IPP_VALIDATE_JOB
</dt>
3926 <dd class=
"description">Validate job options
</dd>
3928 <h3 class=
"enumeration"><a name=
"ipp_orient_e">ipp_orient_e
</a></h3>
3929 <p class=
"description"></p>
3930 <h4 class=
"constants">Constants
</h4>
3932 <dt>IPP_LANDSCAPE
</dt>
3933 <dd class=
"description">90 degrees counter-clockwise
</dd>
3934 <dt>IPP_PORTRAIT
</dt>
3935 <dd class=
"description">No rotation
</dd>
3936 <dt>IPP_REVERSE_LANDSCAPE
</dt>
3937 <dd class=
"description">90 degrees clockwise
</dd>
3938 <dt>IPP_REVERSE_PORTRAIT
</dt>
3939 <dd class=
"description">180 degrees
</dd>
3941 <h3 class=
"enumeration"><a name=
"ipp_pstate_e">ipp_pstate_e
</a></h3>
3942 <p class=
"description"></p>
3943 <h4 class=
"constants">Constants
</h4>
3945 <dt>IPP_PRINTER_IDLE
</dt>
3946 <dd class=
"description">Printer is idle
</dd>
3947 <dt>IPP_PRINTER_PROCESSING
</dt>
3948 <dd class=
"description">Printer is working
</dd>
3949 <dt>IPP_PRINTER_STOPPED
</dt>
3950 <dd class=
"description">Printer is stopped
</dd>
3952 <h3 class=
"enumeration"><a name=
"ipp_quality_e">ipp_quality_e
</a></h3>
3953 <p class=
"description"></p>
3954 <h4 class=
"constants">Constants
</h4>
3956 <dt>IPP_QUALITY_DRAFT
</dt>
3957 <dd class=
"description">Draft quality
</dd>
3958 <dt>IPP_QUALITY_HIGH
</dt>
3959 <dd class=
"description">High quality
</dd>
3960 <dt>IPP_QUALITY_NORMAL
</dt>
3961 <dd class=
"description">Normal quality
</dd>
3963 <h3 class=
"enumeration"><a name=
"ipp_res_e">ipp_res_e
</a></h3>
3964 <p class=
"description">Types and structures...
</p>
3965 <h4 class=
"constants">Constants
</h4>
3967 <dt>IPP_RES_PER_CM
</dt>
3968 <dd class=
"description">Pixels per centimeter
</dd>
3969 <dt>IPP_RES_PER_INCH
</dt>
3970 <dd class=
"description">Pixels per inch
</dd>
3972 <h3 class=
"enumeration"><a name=
"ipp_state_e">ipp_state_e
</a></h3>
3973 <p class=
"description"></p>
3974 <h4 class=
"constants">Constants
</h4>
3976 <dt>IPP_ATTRIBUTE
</dt>
3977 <dd class=
"description">One or more attributes need to be sent/received
</dd>
3979 <dd class=
"description">IPP request data needs to be sent/received
</dd>
3981 <dd class=
"description">An error occurred
</dd>
3982 <dt>IPP_HEADER
</dt>
3983 <dd class=
"description">The request header needs to be sent/received
</dd>
3985 <dd class=
"description">Nothing is happening/request completed
</dd>
3987 <h3 class=
"enumeration"><a name=
"ipp_status_e">ipp_status_e
</a></h3>
3988 <p class=
"description">IPP status codes...
</p>
3989 <h4 class=
"constants">Constants
</h4>
3991 <dt>CUPS_SEE_OTHER
</dt>
3992 <dd class=
"description">cups-see-other
</dd>
3993 <dt>IPP_ATTRIBUTES
</dt>
3994 <dd class=
"description">client-error-attributes-or-values-not-supported
</dd>
3995 <dt>IPP_ATTRIBUTES_NOT_SETTABLE
</dt>
3996 <dd class=
"description">client-error-attributes-not-settable
</dd>
3997 <dt>IPP_BAD_REQUEST
</dt>
3998 <dd class=
"description">client-error-bad-request
</dd>
3999 <dt>IPP_CHARSET
</dt>
4000 <dd class=
"description">client-error-charset-not-supported
</dd>
4001 <dt>IPP_COMPRESSION_ERROR
</dt>
4002 <dd class=
"description">client-error-compression-error
</dd>
4003 <dt>IPP_COMPRESSION_NOT_SUPPORTED
</dt>
4004 <dd class=
"description">client-error-compression-not-supported
</dd>
4005 <dt>IPP_CONFLICT
</dt>
4006 <dd class=
"description">client-error-conflicting-attributes
</dd>
4007 <dt>IPP_DEVICE_ERROR
</dt>
4008 <dd class=
"description">server-error-device-error
</dd>
4009 <dt>IPP_DOCUMENT_ACCESS_ERROR
</dt>
4010 <dd class=
"description">client-error-document-access-error
</dd>
4011 <dt>IPP_DOCUMENT_FORMAT
</dt>
4012 <dd class=
"description">client-error-document-format-not-supported
</dd>
4013 <dt>IPP_DOCUMENT_FORMAT_ERROR
</dt>
4014 <dd class=
"description">client-error-document-format-error
</dd>
4015 <dt>IPP_ERROR_JOB_CANCELED
</dt>
4016 <dd class=
"description">server-error-job-canceled
</dd>
4017 <dt>IPP_FORBIDDEN
</dt>
4018 <dd class=
"description">client-error-forbidden
</dd>
4020 <dd class=
"description">client-error-gone
</dd>
4021 <dt>IPP_IGNORED_ALL_NOTIFICATIONS
</dt>
4022 <dd class=
"description">client-error-ignored-all-notifications
</dd>
4023 <dt>IPP_IGNORED_ALL_SUBSCRIPTIONS
</dt>
4024 <dd class=
"description">client-error-ignored-all-subscriptions
</dd>
4025 <dt>IPP_INTERNAL_ERROR
</dt>
4026 <dd class=
"description">server-error-internal-error
</dd>
4027 <dt>IPP_MULTIPLE_JOBS_NOT_SUPPORTED
</dt>
4028 <dd class=
"description">server-error-multiple-document-jobs-not-supported
</dd>
4029 <dt>IPP_NOT_ACCEPTING
</dt>
4030 <dd class=
"description">server-error-not-accepting-jobs
</dd>
4031 <dt>IPP_NOT_AUTHENTICATED
</dt>
4032 <dd class=
"description">client-error-not-authenticated
</dd>
4033 <dt>IPP_NOT_AUTHORIZED
</dt>
4034 <dd class=
"description">client-error-not-authorized
</dd>
4035 <dt>IPP_NOT_FOUND
</dt>
4036 <dd class=
"description">client-error-not-found
</dd>
4037 <dt>IPP_NOT_POSSIBLE
</dt>
4038 <dd class=
"description">client-error-not-possible
</dd>
4040 <dd class=
"description">successful-ok
</dd>
4041 <dt>IPP_OK_BUT_CANCEL_SUBSCRIPTION
</dt>
4042 <dd class=
"description">successful-ok-but-cancel-subscription
</dd>
4043 <dt>IPP_OK_CONFLICT
</dt>
4044 <dd class=
"description">successful-ok-conflicting-attributes
</dd>
4045 <dt>IPP_OK_EVENTS_COMPLETE
</dt>
4046 <dd class=
"description">successful-ok-events-complete
</dd>
4047 <dt>IPP_OK_IGNORED_NOTIFICATIONS
</dt>
4048 <dd class=
"description">successful-ok-ignored-notifications
</dd>
4049 <dt>IPP_OK_IGNORED_SUBSCRIPTIONS
</dt>
4050 <dd class=
"description">successful-ok-ignored-subscriptions
</dd>
4051 <dt>IPP_OK_SUBST
</dt>
4052 <dd class=
"description">successful-ok-ignored-or-substituted-attributes
</dd>
4053 <dt>IPP_OK_TOO_MANY_EVENTS
</dt>
4054 <dd class=
"description">successful-ok-too-many-events
</dd>
4055 <dt>IPP_OPERATION_NOT_SUPPORTED
</dt>
4056 <dd class=
"description">server-error-operation-not-supported
</dd>
4057 <dt>IPP_PRINTER_BUSY
</dt>
4058 <dd class=
"description">server-error-busy
</dd>
4059 <dt>IPP_PRINTER_IS_DEACTIVATED
</dt>
4060 <dd class=
"description">server-error-printer-is-deactivated
</dd>
4061 <dt>IPP_PRINT_SUPPORT_FILE_NOT_FOUND
</dt>
4062 <dd class=
"description">client-error-print-support-file-not-found
</dd>
4063 <dt>IPP_REQUEST_ENTITY
</dt>
4064 <dd class=
"description">client-error-request-entity-too-large
</dd>
4065 <dt>IPP_REQUEST_VALUE
</dt>
4066 <dd class=
"description">client-error-request-value-too-long
</dd>
4067 <dt>IPP_SERVICE_UNAVAILABLE
</dt>
4068 <dd class=
"description">server-error-service-unavailable
</dd>
4069 <dt>IPP_TEMPORARY_ERROR
</dt>
4070 <dd class=
"description">server-error-temporary-error
</dd>
4071 <dt>IPP_TIMEOUT
</dt>
4072 <dd class=
"description">client-error-timeout
</dd>
4073 <dt>IPP_TOO_MANY_SUBSCRIPTIONS
</dt>
4074 <dd class=
"description">client-error-too-many-subscriptions
</dd>
4075 <dt>IPP_URI_SCHEME
</dt>
4076 <dd class=
"description">client-error-uri-scheme-not-supported
</dd>
4077 <dt>IPP_VERSION_NOT_SUPPORTED
</dt>
4078 <dd class=
"description">server-error-version-not-supported
</dd>
4080 <h3 class=
"enumeration"><a name=
"ipp_tag_e">ipp_tag_e
</a></h3>
4081 <p class=
"description">Format tags for attributes...
</p>
4082 <h4 class=
"constants">Constants
</h4>
4084 <dt>IPP_TAG_ADMINDEFINE
</dt>
4085 <dd class=
"description">Admin-defined value
</dd>
4086 <dt>IPP_TAG_BEGIN_COLLECTION
</dt>
4087 <dd class=
"description">Beginning of collection value
</dd>
4088 <dt>IPP_TAG_BOOLEAN
</dt>
4089 <dd class=
"description">Boolean value
</dd>
4090 <dt>IPP_TAG_CHARSET
</dt>
4091 <dd class=
"description">Character set value
</dd>
4092 <dt>IPP_TAG_COPY
</dt>
4093 <dd class=
"description">Bitflag for copied attribute values
</dd>
4094 <dt>IPP_TAG_DATE
</dt>
4095 <dd class=
"description">Date/time value
</dd>
4096 <dt>IPP_TAG_DEFAULT
</dt>
4097 <dd class=
"description">Default value
</dd>
4098 <dt>IPP_TAG_DELETEATTR
</dt>
4099 <dd class=
"description">Delete-attribute value
</dd>
4100 <dt>IPP_TAG_END
</dt>
4101 <dd class=
"description">End-of-attributes
</dd>
4102 <dt>IPP_TAG_END_COLLECTION
</dt>
4103 <dd class=
"description">End of collection value
</dd>
4104 <dt>IPP_TAG_ENUM
</dt>
4105 <dd class=
"description">Enumeration value
</dd>
4106 <dt>IPP_TAG_EVENT_NOTIFICATION
</dt>
4107 <dd class=
"description">Event group
</dd>
4108 <dt>IPP_TAG_INTEGER
</dt>
4109 <dd class=
"description">Integer value
</dd>
4110 <dt>IPP_TAG_JOB
</dt>
4111 <dd class=
"description">Job group
</dd>
4112 <dt>IPP_TAG_KEYWORD
</dt>
4113 <dd class=
"description">Keyword value
</dd>
4114 <dt>IPP_TAG_LANGUAGE
</dt>
4115 <dd class=
"description">Language value
</dd>
4116 <dt>IPP_TAG_MASK
</dt>
4117 <dd class=
"description">Mask for copied attribute values
</dd>
4118 <dt>IPP_TAG_MEMBERNAME
</dt>
4119 <dd class=
"description">Collection member name value
</dd>
4120 <dt>IPP_TAG_MIMETYPE
</dt>
4121 <dd class=
"description">MIME media type value
</dd>
4122 <dt>IPP_TAG_NAME
</dt>
4123 <dd class=
"description">Name value
</dd>
4124 <dt>IPP_TAG_NAMELANG
</dt>
4125 <dd class=
"description">Name-with-language value
</dd>
4126 <dt>IPP_TAG_NOTSETTABLE
</dt>
4127 <dd class=
"description">Not-settable value
</dd>
4128 <dt>IPP_TAG_NOVALUE
</dt>
4129 <dd class=
"description">No-value value
</dd>
4130 <dt>IPP_TAG_OPERATION
</dt>
4131 <dd class=
"description">Operation group
</dd>
4132 <dt>IPP_TAG_PRINTER
</dt>
4133 <dd class=
"description">Printer group
</dd>
4134 <dt>IPP_TAG_RANGE
</dt>
4135 <dd class=
"description">Range value
</dd>
4136 <dt>IPP_TAG_RESOLUTION
</dt>
4137 <dd class=
"description">Resolution value
</dd>
4138 <dt>IPP_TAG_STRING
</dt>
4139 <dd class=
"description">Octet string value
</dd>
4140 <dt>IPP_TAG_SUBSCRIPTION
</dt>
4141 <dd class=
"description">Subscription group
</dd>
4142 <dt>IPP_TAG_TEXT
</dt>
4143 <dd class=
"description">Text value
</dd>
4144 <dt>IPP_TAG_TEXTLANG
</dt>
4145 <dd class=
"description">Text-with-language value
</dd>
4146 <dt>IPP_TAG_UNKNOWN
</dt>
4147 <dd class=
"description">Unknown value
</dd>
4148 <dt>IPP_TAG_UNSUPPORTED_GROUP
</dt>
4149 <dd class=
"description">Unsupported attributes group
</dd>
4150 <dt>IPP_TAG_UNSUPPORTED_VALUE
</dt>
4151 <dd class=
"description">Unsupported value
</dd>
4152 <dt>IPP_TAG_URI
</dt>
4153 <dd class=
"description">URI value
</dd>
4154 <dt>IPP_TAG_URISCHEME
</dt>
4155 <dd class=
"description">URI scheme value
</dd>
4156 <dt>IPP_TAG_ZERO
</dt>
4157 <dd class=
"description">Zero tag - used for separators
</dd>