1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/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.5">
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;
32 border: dotted thin #999999;
37 PRE.command EM, PRE.example EM {
38 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
42 font-family: monaco, courier, monospace;
53 border: solid thin #999999;
59 text-decoration: none;
62 A:link:hover, A:visited:hover, A:active {
63 text-decoration: underline;
71 border: solid thin #999999;
72 border-collapse: collapse;
88 border: solid thin #cccccc;
95 border-bottom: solid thin #999999;
104 caption-side: bottom;
124 border: thin solid #000000;
132 H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
138 border-bottom: solid 2pt #000000;
156 font-family: monaco, courier, monospace;
165 border: solid thin #999999;
166 border-collapse: collapse;
171 DIV.summary TABLE TD, DIV.summary TABLE TH {
172 border: solid thin #999999;
178 DIV.summary TABLE THEAD TH {
182 /* API documentation styles... */
189 div.body h3, div.body h4, div.body h5 {
190 margin-bottom: 0.5em;
193 .class, .enumeration, .function, .struct, .typedef, .union {
194 border-bottom: solid thin #999999;
201 code, p.code, pre, ul.code li {
202 font-family: monaco, courier, monospace;
205 ul.code, ul.contents, ul.subcontents {
206 list-style-type: none;
216 ul.contents li ul.code, ul.contents li ul.subcontents {
229 margin-bottom: 0.5em;
232 /* This is just for the HTML files generated with the framedhelp target */
235 border: solid thin black;
244 div.contents ul.contents {
247 div.contents ul.subcontents li {
256 "$Id: api-httpipp.header 7258 2008-01-28 00:15:05Z mike $"
258 HTTP and IPP API header for the Common UNIX Printing System (CUPS).
260 Copyright 2007-2008 by Apple Inc.
261 Copyright 1997-2006 by Easy Software Products, all rights reserved.
263 These coded instructions, statements, and computer programs are the
264 property of Apple Inc. and are protected by Federal copyright
265 law. Distribution and use rights are outlined in the file "LICENSE.txt"
266 which should have been included with this file. If this file is
267 file is missing or damaged, see the license at "http://www.cups.org/".
270 <h1 class=
"title">HTTP and IPP APIs
</h1>
272 <div class='summary'
><table summary='General Information'
>
286 <td>Programming:
<a href='api-overview.html'
>Introduction to CUPS Programming
</a><br>
287 Programming:
<a href='api-cups.html'
>CUPS API
</a><br>
288 References:
<a href='spec-ipp.html'
>CUPS Implementation of IPP
</a></td>
292 <h2 class=
"title">Contents
</h2>
293 <ul class=
"contents">
295 <li><a href=
"#OVERVIEW">Overview
</a><ul class=
"subcontents">
296 <li><a href=
"#CREATING_URI_STRINGS">Creating URI Strings
</a></li>
297 <li><a href=
"#SENDING_REQUESTS_WITH_FILES">Sending Requests with Files
</a></li>
298 <li><a href=
"#ASYNCHRONOUS_REQUEST_PROCESSING">Asynchronous Request Processing
</a></li>
300 <li><a href=
"#FUNCTIONS">Functions
</a><ul class=
"code">
301 <li><a href=
"#cupsDoAuthentication" title=
"Authenticate a request.">cupsDoAuthentication
</a></li>
302 <li><a href=
"#cupsDoFileRequest" title=
"Do an IPP request with a file.">cupsDoFileRequest
</a></li>
303 <li><a href=
"#cupsDoIORequest" title=
"Do an IPP request with file descriptors.">cupsDoIORequest
</a></li>
304 <li><a href=
"#cupsDoRequest" title=
"Do an IPP request.">cupsDoRequest
</a></li>
305 <li><a href=
"#cupsEncodeOptions" title=
"Encode printer options into IPP attributes.">cupsEncodeOptions
</a></li>
306 <li><a href=
"#cupsEncodeOptions2" title=
"Encode printer options into IPP attributes for a group.">cupsEncodeOptions2
</a></li>
307 <li><a href=
"#cupsGetDevices" title=
"Get available printer devices.">cupsGetDevices
</a></li>
308 <li><a href=
"#cupsGetFd" title=
"Get a file from the server.">cupsGetFd
</a></li>
309 <li><a href=
"#cupsGetFile" title=
"Get a file from the server.">cupsGetFile
</a></li>
310 <li><a href=
"#cupsGetResponse" title=
"Get a response to an IPP request.">cupsGetResponse
</a></li>
311 <li><a href=
"#cupsPutFd" title=
"Put a file on the server.">cupsPutFd
</a></li>
312 <li><a href=
"#cupsPutFile" title=
"Put a file on the server.">cupsPutFile
</a></li>
313 <li><a href=
"#cupsReadResponseData" title=
"Read additional data after the IPP response.">cupsReadResponseData
</a></li>
314 <li><a href=
"#cupsSendRequest" title=
"Send an IPP request.">cupsSendRequest
</a></li>
315 <li><a href=
"#cupsWriteRequestData" title=
"Write additional data after an IPP request.">cupsWriteRequestData
</a></li>
316 <li><a href=
"#httpAddrAny" title=
"Check for the "any" address.">httpAddrAny
</a></li>
317 <li><a href=
"#httpAddrEqual" title=
"Compare two addresses.">httpAddrEqual
</a></li>
318 <li><a href=
"#httpAddrLength" title=
"Return the length of the address in bytes.">httpAddrLength
</a></li>
319 <li><a href=
"#httpAddrLocalhost" title=
"Check for the local loopback address.">httpAddrLocalhost
</a></li>
320 <li><a href=
"#httpAddrLookup" title=
"Lookup the hostname associated with the address.">httpAddrLookup
</a></li>
321 <li><a href=
"#httpAddrString" title=
"Convert an address to a numeric string.">httpAddrString
</a></li>
322 <li><a href=
"#httpAssembleURI" title=
"Assemble a uniform resource identifier from its
323 components.">httpAssembleURI
</a></li>
324 <li><a href=
"#httpAssembleURIf" title=
"Assemble a uniform resource identifier from its
325 components with a formatted resource.">httpAssembleURIf
</a></li>
326 <li><a href=
"#httpBlocking" title=
"Set blocking/non-blocking behavior on a connection.">httpBlocking
</a></li>
327 <li><a href=
"#httpCheck" title=
"Check to see if there is a pending response from the server.">httpCheck
</a></li>
328 <li><a href=
"#httpClearCookie" title=
"Clear the cookie value(s).">httpClearCookie
</a></li>
329 <li><a href=
"#httpClearFields" title=
"Clear HTTP request fields.">httpClearFields
</a></li>
330 <li><a href=
"#httpClose" title=
"Close an HTTP connection...">httpClose
</a></li>
331 <li><a href=
"#httpConnect" title=
"Connect to a HTTP server.">httpConnect
</a></li>
332 <li><a href=
"#httpConnectEncrypt" title=
"Connect to a HTTP server using encryption.">httpConnectEncrypt
</a></li>
333 <li><a href=
"#httpDecode64" title=
"Base64-decode a string.">httpDecode64
</a></li>
334 <li><a href=
"#httpDecode64_2" title=
"Base64-decode a string.">httpDecode64_2
</a></li>
335 <li><a href=
"#httpDelete" title=
"Send a DELETE request to the server.">httpDelete
</a></li>
336 <li><a href=
"#httpEncode64" title=
"Base64-encode a string.">httpEncode64
</a></li>
337 <li><a href=
"#httpEncode64_2" title=
"Base64-encode a string.">httpEncode64_2
</a></li>
338 <li><a href=
"#httpEncryption" title=
"Set the required encryption on the link.">httpEncryption
</a></li>
339 <li><a href=
"#httpError" title=
"Get the last error on a connection.">httpError
</a></li>
340 <li><a href=
"#httpFlush" title=
"Flush data from a HTTP connection.">httpFlush
</a></li>
341 <li><a href=
"#httpFlushWrite" title=
"Flush data in write buffer.">httpFlushWrite
</a></li>
342 <li><a href=
"#httpGet" title=
"Send a GET request to the server.">httpGet
</a></li>
343 <li><a href=
"#httpGetAuthString" title=
"Get the current authorization string.">httpGetAuthString
</a></li>
344 <li><a href=
"#httpGetBlocking" title=
"Get the blocking/non-block state of a connection.">httpGetBlocking
</a></li>
345 <li><a href=
"#httpGetCookie" title=
"Get any cookie data from the response.">httpGetCookie
</a></li>
346 <li><a href=
"#httpGetDateString" title=
"Get a formatted date/time string from a time value.">httpGetDateString
</a></li>
347 <li><a href=
"#httpGetDateString2" title=
"Get a formatted date/time string from a time value.">httpGetDateString2
</a></li>
348 <li><a href=
"#httpGetDateTime" title=
"Get a time value from a formatted date/time string.">httpGetDateTime
</a></li>
349 <li><a href=
"#httpGetFd" title=
"Get the file descriptor associated with a connection.">httpGetFd
</a></li>
350 <li><a href=
"#httpGetField" title=
"Get a field value from a request/response.">httpGetField
</a></li>
351 <li><a href=
"#httpGetHostByName" title=
"Lookup a hostname or IPv4 address, and return
352 address records for the specified name.">httpGetHostByName
</a></li>
353 <li><a href=
"#httpGetHostname" title=
"Get the FQDN for the connection or local system.">httpGetHostname
</a></li>
354 <li><a href=
"#httpGetLength" title=
"Get the amount of data remaining from the
355 content-length or transfer-encoding fields.">httpGetLength
</a></li>
356 <li><a href=
"#httpGetLength2" title=
"Get the amount of data remaining from the
357 content-length or transfer-encoding fields.">httpGetLength2
</a></li>
358 <li><a href=
"#httpGetStatus" title=
"Get the status of the last HTTP request.">httpGetStatus
</a></li>
359 <li><a href=
"#httpGetSubField" title=
"Get a sub-field value.">httpGetSubField
</a></li>
360 <li><a href=
"#httpGetSubField2" title=
"Get a sub-field value.">httpGetSubField2
</a></li>
361 <li><a href=
"#httpGets" title=
"Get a line of text from a HTTP connection.">httpGets
</a></li>
362 <li><a href=
"#httpHead" title=
"Send a HEAD request to the server.">httpHead
</a></li>
363 <li><a href=
"#httpInitialize" title=
"Initialize the HTTP interface library and set the
364 default HTTP proxy (if any).">httpInitialize
</a></li>
365 <li><a href=
"#httpMD5" title=
"Compute the MD5 sum of the username:group:password.">httpMD5
</a></li>
366 <li><a href=
"#httpMD5Final" title=
"Combine the MD5 sum of the username, group, and password
367 with the server-supplied nonce value, method, and
368 request-uri.">httpMD5Final
</a></li>
369 <li><a href=
"#httpMD5String" title=
"Convert an MD5 sum to a character string.">httpMD5String
</a></li>
370 <li><a href=
"#httpOptions" title=
"Send an OPTIONS request to the server.">httpOptions
</a></li>
371 <li><a href=
"#httpPost" title=
"Send a POST request to the server.">httpPost
</a></li>
372 <li><a href=
"#httpPut" title=
"Send a PUT request to the server.">httpPut
</a></li>
373 <li><a href=
"#httpRead" title=
"Read data from a HTTP connection.">httpRead
</a></li>
374 <li><a href=
"#httpRead2" title=
"Read data from a HTTP connection.">httpRead2
</a></li>
375 <li><a href=
"#httpReconnect" title=
"Reconnect to a HTTP server.">httpReconnect
</a></li>
376 <li><a href=
"#httpSeparate" title=
"Separate a Universal Resource Identifier into its
377 components.">httpSeparate
</a></li>
378 <li><a href=
"#httpSeparate2" title=
"Separate a Universal Resource Identifier into its
379 components.">httpSeparate2
</a></li>
380 <li><a href=
"#httpSeparateURI" title=
"Separate a Universal Resource Identifier into its
381 components.">httpSeparateURI
</a></li>
382 <li><a href=
"#httpSetAuthString" title=
"Set the current authorization string.">httpSetAuthString
</a></li>
383 <li><a href=
"#httpSetCookie" title=
"Set the cookie value(s)...">httpSetCookie
</a></li>
384 <li><a href=
"#httpSetExpect" title=
"Set the Expect: header in a request.">httpSetExpect
</a></li>
385 <li><a href=
"#httpSetField" title=
"Set the value of an HTTP header.">httpSetField
</a></li>
386 <li><a href=
"#httpSetLength" title=
"Set the content-length and content-encoding.">httpSetLength
</a></li>
387 <li><a href=
"#httpStatus" title=
"Return a short string describing a HTTP status code.">httpStatus
</a></li>
388 <li><a href=
"#httpTrace" title=
"Send an TRACE request to the server.">httpTrace
</a></li>
389 <li><a href=
"#httpUpdate" title=
"Update the current HTTP state for incoming data.">httpUpdate
</a></li>
390 <li><a href=
"#httpWait" title=
"Wait for data available on a connection.">httpWait
</a></li>
391 <li><a href=
"#httpWrite" title=
"Write data to a HTTP connection.">httpWrite
</a></li>
392 <li><a href=
"#httpWrite2" title=
"Write data to a HTTP connection.">httpWrite2
</a></li>
393 <li><a href=
"#ippAddBoolean" title=
"Add a boolean attribute to an IPP message.">ippAddBoolean
</a></li>
394 <li><a href=
"#ippAddBooleans" title=
"Add an array of boolean values.">ippAddBooleans
</a></li>
395 <li><a href=
"#ippAddCollection" title=
"Add a collection value.">ippAddCollection
</a></li>
396 <li><a href=
"#ippAddCollections" title=
"Add an array of collection values.">ippAddCollections
</a></li>
397 <li><a href=
"#ippAddDate" title=
"Add a date attribute to an IPP message.">ippAddDate
</a></li>
398 <li><a href=
"#ippAddInteger" title=
"Add a integer attribute to an IPP message.">ippAddInteger
</a></li>
399 <li><a href=
"#ippAddIntegers" title=
"Add an array of integer values.">ippAddIntegers
</a></li>
400 <li><a href=
"#ippAddOctetString" title=
"Add an octetString value to an IPP message.">ippAddOctetString
</a></li>
401 <li><a href=
"#ippAddRange" title=
"Add a range of values to an IPP message.">ippAddRange
</a></li>
402 <li><a href=
"#ippAddRanges" title=
"Add ranges of values to an IPP message.">ippAddRanges
</a></li>
403 <li><a href=
"#ippAddResolution" title=
"Add a resolution value to an IPP message.">ippAddResolution
</a></li>
404 <li><a href=
"#ippAddResolutions" title=
"Add resolution values to an IPP message.">ippAddResolutions
</a></li>
405 <li><a href=
"#ippAddSeparator" title=
"Add a group separator to an IPP message.">ippAddSeparator
</a></li>
406 <li><a href=
"#ippAddString" title=
"Add a language-encoded string to an IPP message.">ippAddString
</a></li>
407 <li><a href=
"#ippAddStrings" title=
"Add language-encoded strings to an IPP message.">ippAddStrings
</a></li>
408 <li><a href=
"#ippDateToTime" title=
"Convert from RFC 1903 Date/Time format to UNIX time
409 in seconds.">ippDateToTime
</a></li>
410 <li><a href=
"#ippDelete" title=
"Delete an IPP message.">ippDelete
</a></li>
411 <li><a href=
"#ippDeleteAttribute" title=
"Delete a single attribute in an IPP message.">ippDeleteAttribute
</a></li>
412 <li><a href=
"#ippErrorString" title=
"Return a name for the given status code.">ippErrorString
</a></li>
413 <li><a href=
"#ippErrorValue" title=
"Return a status code for the given name.">ippErrorValue
</a></li>
414 <li><a href=
"#ippFindAttribute" title=
"Find a named attribute in a request...">ippFindAttribute
</a></li>
415 <li><a href=
"#ippFindNextAttribute" title=
"Find the next named attribute in a request...">ippFindNextAttribute
</a></li>
416 <li><a href=
"#ippLength" title=
"Compute the length of an IPP message.">ippLength
</a></li>
417 <li><a href=
"#ippNew" title=
"Allocate a new IPP message.">ippNew
</a></li>
418 <li><a href=
"#ippNewRequest" title=
"Allocate a new IPP request message.">ippNewRequest
</a></li>
419 <li><a href=
"#ippOpString" title=
"Return a name for the given operation id.">ippOpString
</a></li>
420 <li><a href=
"#ippOpValue" title=
"Return an operation id for the given name.">ippOpValue
</a></li>
421 <li><a href=
"#ippPort" title=
"Return the default IPP port number.">ippPort
</a></li>
422 <li><a href=
"#ippRead" title=
"Read data for an IPP message from a HTTP connection.">ippRead
</a></li>
423 <li><a href=
"#ippReadFile" title=
"Read data for an IPP message from a file.">ippReadFile
</a></li>
424 <li><a href=
"#ippReadIO" title=
"Read data for an IPP message.">ippReadIO
</a></li>
425 <li><a href=
"#ippSetPort" title=
"Set the default port number.">ippSetPort
</a></li>
426 <li><a href=
"#ippTimeToDate" title=
"Convert from UNIX time to RFC 1903 format.">ippTimeToDate
</a></li>
427 <li><a href=
"#ippWrite" title=
"Write data for an IPP message to a HTTP connection.">ippWrite
</a></li>
428 <li><a href=
"#ippWriteFile" title=
"Write data for an IPP message to a file.">ippWriteFile
</a></li>
429 <li><a href=
"#ippWriteIO" title=
"Write data for an IPP message.">ippWriteIO
</a></li>
431 <li><a href=
"#TYPES">Data Types
</a><ul class=
"code">
432 <li><a href=
"#http_addrlist_t" title=
"Socket address list, which is
433 used to enumerate all of the
434 addresses that are associated
435 with a hostname. ">http_addrlist_t
</a></li>
436 <li><a href=
"#http_auth_t" title=
"HTTP authentication types">http_auth_t
</a></li>
437 <li><a href=
"#http_encoding_t" title=
"HTTP transfer encoding values">http_encoding_t
</a></li>
438 <li><a href=
"#http_encryption_t" title=
"HTTP encryption values">http_encryption_t
</a></li>
439 <li><a href=
"#http_field_t" title=
"HTTP field names">http_field_t
</a></li>
440 <li><a href=
"#http_keepalive_t" title=
"Types and structures...">http_keepalive_t
</a></li>
441 <li><a href=
"#http_status_t" title=
"HTTP status codes">http_status_t
</a></li>
442 <li><a href=
"#http_t" title=
"HTTP connection type">http_t
</a></li>
443 <li><a href=
"#http_uri_coding_t" title=
"HTTP version numbers">http_uri_coding_t
</a></li>
444 <li><a href=
"#http_uri_status_t" title=
"URI en/decode flags">http_uri_status_t
</a></li>
445 <li><a href=
"#http_version_t" title=
"Socket address union, which
446 makes using IPv6 and other
447 address types easier and
448 more portable. ">http_version_t
</a></li>
449 <li><a href=
"#ipp_attribute_t" title=
"Attribute">ipp_attribute_t
</a></li>
450 <li><a href=
"#ipp_finish_t" title=
"Orientation...">ipp_finish_t
</a></li>
451 <li><a href=
"#ipp_iocb_t" title=
"IPP IO Callback Function ">ipp_iocb_t
</a></li>
452 <li><a href=
"#ipp_jstate_t" title=
"Printer States....">ipp_jstate_t
</a></li>
453 <li><a href=
"#ipp_op_t" title=
"Old names for the operations">ipp_op_t
</a></li>
454 <li><a href=
"#ipp_orient_t" title=
"Qualities...">ipp_orient_t
</a></li>
455 <li><a href=
"#ipp_pstate_t" title=
"IPP states...">ipp_pstate_t
</a></li>
456 <li><a href=
"#ipp_quality_t" title=
"Job States....">ipp_quality_t
</a></li>
457 <li><a href=
"#ipp_request_t" title=
"Request Header">ipp_request_t
</a></li>
458 <li><a href=
"#ipp_res_t" title=
"Types and structures...">ipp_res_t
</a></li>
459 <li><a href=
"#ipp_state_t" title=
"IPP operations...">ipp_state_t
</a></li>
460 <li><a href=
"#ipp_t" title=
"Attribute Value">ipp_t
</a></li>
461 <li><a href=
"#ipp_uchar_t" title=
"IPP status codes...">ipp_uchar_t
</a></li>
462 <li><a href=
"#ipp_tag_t" title=
"Format tags for attributes...">ipp_tag_t
</a></li>
463 <li><a href=
"#ipp_value_t" title=
"New in CUPS 1.1.19">ipp_value_t
</a></li>
465 <li><a href=
"#STRUCTURES">Structures
</a><ul class=
"code">
466 <li><a href=
"#http_addrlist_s" title=
"Socket address list, which is
467 used to enumerate all of the
468 addresses that are associated
469 with a hostname. ">http_addrlist_s
</a></li>
470 <li><a href=
"#ipp_attribute_s" title=
"Attribute">ipp_attribute_s
</a></li>
471 <li><a href=
"#ipp_s" title=
"IPP Request/Response/Notification">ipp_s
</a></li>
473 <li><a href=
"#UNIONS">Unions
</a><ul class=
"code">
474 <li><a href=
"#ipp_request_u" title=
"Request Header">ipp_request_u
</a></li>
475 <li><a href=
"#ipp_value_u" title=
"New in CUPS 1.1.19">ipp_value_u
</a></li>
477 <li><a href=
"#ENUMERATIONS">Constants
</a><ul class=
"code">
478 <li><a href=
"#http_auth_e" title=
"HTTP authentication types">http_auth_e
</a></li>
479 <li><a href=
"#http_encoding_e" title=
"HTTP transfer encoding values">http_encoding_e
</a></li>
480 <li><a href=
"#http_encryption_e" title=
"HTTP encryption values">http_encryption_e
</a></li>
481 <li><a href=
"#http_field_e" title=
"HTTP field names">http_field_e
</a></li>
482 <li><a href=
"#http_keepalive_e" title=
"Types and structures...">http_keepalive_e
</a></li>
483 <li><a href=
"#http_state_e" title=
"">http_state_e
</a></li>
484 <li><a href=
"#http_status_e" title=
"HTTP status codes">http_status_e
</a></li>
485 <li><a href=
"#http_uri_coding_e" title=
"">http_uri_coding_e
</a></li>
486 <li><a href=
"#http_uri_status_e" title=
"">http_uri_status_e
</a></li>
487 <li><a href=
"#http_version_e" title=
"">http_version_e
</a></li>
488 <li><a href=
"#ipp_finish_e" title=
"">ipp_finish_e
</a></li>
489 <li><a href=
"#ipp_jstate_e" title=
"">ipp_jstate_e
</a></li>
490 <li><a href=
"#ipp_op_e" title=
"">ipp_op_e
</a></li>
491 <li><a href=
"#ipp_orient_e" title=
"">ipp_orient_e
</a></li>
492 <li><a href=
"#ipp_pstate_e" title=
"">ipp_pstate_e
</a></li>
493 <li><a href=
"#ipp_quality_e" title=
"">ipp_quality_e
</a></li>
494 <li><a href=
"#ipp_res_e" title=
"Types and structures...">ipp_res_e
</a></li>
495 <li><a href=
"#ipp_state_e" title=
"">ipp_state_e
</a></li>
496 <li><a href=
"#ipp_status_e" title=
"IPP status codes...">ipp_status_e
</a></li>
497 <li><a href=
"#ipp_tag_e" title=
"Format tags for attributes...">ipp_tag_e
</a></li>
501 "$Id: api-httpipp.shtml 7258 2008-01-28 00:15:05Z mike $"
503 HTTP and IPP API introduction for the Common UNIX Printing System (CUPS).
505 Copyright 2007-2008 by Apple Inc.
506 Copyright 1997-2006 by Easy Software Products, all rights reserved.
508 These coded instructions, statements, and computer programs are the
509 property of Apple Inc. and are protected by Federal copyright
510 law. Distribution and use rights are outlined in the file "LICENSE.txt"
511 which should have been included with this file. If this file is
512 file is missing or damaged, see the license at "http://www.cups.org/".
515 <h2 class='title'
><a name='OVERVIEW'
>Overview
</a></h2>
517 <p>The CUPS HTTP and IPP APIs provide low-level access to the HTTP and IPP
518 protocols and CUPS scheduler. They are typically used by monitoring and
519 administration programs to perform specific functions not supported by the
520 high-level CUPS API functions.
</p>
522 <p>The HTTP APIs use an opaque structure called
523 <a href='#http_t'
><code>http_t
</code></a> to manage connections to
524 a particular HTTP or IPP server. The
525 <a href='#httpConnectEncrypt'
><code>httpConnectEncrypt
</code></a> function is
526 used to create an instance of this structure for a particular server.
527 The constant
<code>CUPS_HTTP_DEFAULT
</code> can be used with all of the
528 <code>cups
</code> functions to refer to the default CUPS server - the functions
529 create a per-thread
<a href='#http_t'
><code>http_t
</code></a> as needed.
</p>
531 <p>The IPP APIs use two structures for requests (messages sent to the CUPS
532 scheduler) and responses (messages sent back to your application from the
533 scheduler). The
<a href='#ipp_t'
><code>ipp_t
</code></a> structure holds a
534 complete request or response and is allocated using the
535 <a href='#ippNew'
><code>ippNew
</code></a> or
536 <a href='#ippNewRequest'
><code>ippNewRequest
</code></a> functions and
537 freed using the
<a href='#ippDelete'
><code>ippDelete
</code></a> function.
</p>
539 <p>The second structure is called
540 <a href='#ipp_attribute_t'
><code>ipp_attribute_t
</code></a> and holds a
541 single IPP attribute which consists of a group tag (
<code>group_tag
</code>), a
542 value type tag (
<code>value_tag
</code>), the attribute name (
<code>name
</code>),
543 and
1 or more values (
<code>values[]
</code>). Attributes are added to an
544 <a href='#ipp_t'
><code>ipp_t
</code></a> structure using one of the
545 <code>ippAdd
</code> functions. For example, use
546 <a href='#ippAddString'
><code>ippAddString
</code></a> to add a
547 "requesting-user-name" string attribute to a request:
</p>
549 <pre class='example'
>
550 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_GET_JOBS);
552 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
556 <p>Once you have created an IPP request, use the
<code>cups
</code>
557 functions to send the request to and read the response from the server.
558 For example, the
<a href='#cupsDoRequest'
><code>cupsDoRequest
</code></a>
559 function can be used for simple query operations that do not involve files:
</p>
561 <pre class='example'
>
562 #include
<cups/cups.h
>
565 <a href='#ipp_t'
>ipp_t
</a> *
<a name='get_jobs'
>get_jobs
</a>(void)
567 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_GET_JOBS);
569 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
572 return (
<a href='#cupsDoRequest'
>cupsDoRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/"));
576 <p>The
<a href='#cupsDoRequest'
><code>cupsDoRequest
</code></a> function frees
577 the request structure and returns an IPP response structure or NULL pointer if
578 the request could not be sent to the server. Once you have a response from
579 the server, you can either use the
580 <a href='#ippFindAttribute'
><code>ippFindAttribute
</code></a> and
581 <a href='#ippFindNextAttribute'
><code>ippFindNextAttribute
</code></a> functions
582 to find specific attributes, for example:
</p>
584 <pre class='example'
>
585 <a href='#ipp_t'
>ipp_t
</a> *response;
586 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
588 attr =
<a href='#ippFindAttribute'
>ippFindAttribute
</a>(response,
"printer-state", IPP_TAG_ENUM);
591 <p>You can also walk the list of attributes with a simple
<code>for
</code> loop
594 <pre class='example'
>
595 <a href='#ipp_t'
>ipp_t
</a> *response;
596 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
598 for (attr = response-
>attrs; attr != NULL; attr = attr-
>next)
599 if (attr-
>name == NULL)
600 puts(
"--SEPARATOR--");
605 <p>The
<code>for
</code> loop approach is normally used when collecting
606 attributes for multiple objects (jobs, printers, etc.) in a response. Attributes
607 with
<code>NULL
</code> names indicate a separator between the attributes of
608 each object. For example, the following code will list the jobs returned from
609 our previous
<a href='#get_jobs'
><code>get_jobs
</code></a> example code:
</p>
611 <pre class='example'
>
612 <a href='#ipp_t'
>ipp_t
</a> *response =
<a href='#get_jobs'
>get_jobs
</a>();
614 if (response != NULL)
616 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
618 char *job_name = NULL;
619 char *job_originating_user_name = NULL;
621 puts(
"Job ID Owner Title");
622 puts(
"------ ---------------- ---------------------------------");
624 for (attr = response-
>attrs; attr != NULL; attr = attr-
>next)
626 /* Attributes without names are separators between jobs */
627 if (attr-
>name == NULL)
629 if (job_id
> 0 && job_name != NULL
&& job_originating_user_name != NULL)
630 printf(
"%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
634 job_originating_user_name = NULL;
637 else if (!strcmp(attr-
>name,
"job-id")
&& attr-
>value_tag == IPP_TAG_INTEGER)
638 job_id = attr-
>values[
0].integer;
639 else if (!strcmp(attr-
>name,
"job-name")
&& attr-
>value_tag == IPP_TAG_NAME)
640 job_name = attr-
>values[
0].string.text;
641 else if (!strcmp(attr-
>name,
"job-originating-user-name")
&&
642 attr-
>value_tag == IPP_TAG_NAME)
643 job_originating_user_name = attr-
>values[
0].string.text;
646 if (job_id
> 0 && job_name != NULL
&& job_originating_user_name != NULL)
647 printf(
"%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
651 <h3><a name='CREATING_URI_STRINGS'
>Creating URI Strings
</a></h3>
653 <p>To ensure proper encoding, the
654 <a href='#httpAssembleURIf'
><code>httpAssembleURIf
</code></a> function must be
655 used to format a
"printer-uri" string for all printer-based requests:
</p>
657 <pre class='example'
>
658 const char *name =
"Foo";
660 <a href='#ipp_t'
>ipp_t
</a> *request;
662 <a href='#httpAssembleURIf'
>httpAssembleURIf
</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri),
"ipp", NULL, cupsServer(),
663 ippPort(),
"/printers/%s", name);
664 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
667 <h3><a name='SENDING_REQUESTS_WITH_FILES'
>Sending Requests with Files
</a></h3>
669 <p>The
<a href='#cupsDoFileRequest'
><code>cupsDoFileRequest
</code></a> and
670 <a href='#cupsDoIORequest'
><code>cupsDoIORequest
</code></a> functions are
671 used for requests involving files. The
672 <a href='#cupsDoFileRequest'
><code>cupsDoFileRequest
</code></a> function
673 attaches the named file to a request and is typically used when sending a print
674 file or changing a printer's PPD file:
</p>
676 <pre class='example'
>
677 const char *filename =
"/usr/share/cups/data/testprint.ps";
678 const char *name =
"Foo";
681 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_PRINT_JOB);
682 <a href='#ipp_t'
>ipp_t
</a> *response;
684 /* Use httpAssembleURIf for the printer-uri string */
685 <a href='#httpAssembleURIf'
>httpAssembleURIf
</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri),
"ipp", NULL, cupsServer(),
686 ippPort(),
"/printers/%s", name);
687 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
688 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
690 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"job-name",
691 NULL,
"testprint.ps");
693 /* Use snprintf for the resource path */
694 snprintf(resource, sizeof(resource),
"/printers/%s", name);
696 response =
<a href='#cupsDoFileRequest'
>cupsDoFileRequest
</a>(CUPS_HTTP_DEFAULT, request, resource, filename);
699 <p>The
<a href='#cupsDoIORequest'
><code>cupsDoIORequest
</code></a> function
700 optionally attaches a file to the request and optionally saves a file in the
701 response from the server. It is used when using a pipe for the request
702 attachment or when using a request that returns a file, currently only
703 <code>CUPS_GET_DOCUMENT
</code> and
<code>CUPS_GET_PPD
</code>. For example,
704 the following code will download the PPD file for the sample HP LaserJet
707 <pre class='example'
>
710 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
711 <a href='#ipp_t'
>ipp_t
</a> *response;
713 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
714 NULL,
"laserjet.ppd");
716 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
718 response =
<a href='#cupsDoIORequest'
>cupsDoIORequest
</a>(CUPS_HTTP_DEFAULT, request,
"/", -
1, tempfd);
721 <p>The example passes
<code>-
1</code> for the input file descriptor to specify
722 that no file is to be attached to the request. The PPD file attached to the
723 response is written to the temporary file descriptor we created using the
724 <code>cupsTempFd
</code> function.
</p>
726 <h3><a name='ASYNCHRONOUS_REQUEST_PROCESSING'
>Asynchronous Request Processing
</a></h3>
728 <p>The
<a href='#cupsSendRequest'
><code>cupsSendRequest
</code></a> and
729 <a href='#cupsGetResponse'
><code>cupsGetResponse
</code></a> support
730 asynchronous communications with the server. Unlike the other request
731 functions, the IPP request is not automatically freed, so remember to
732 free your request with the
<a href='#ippDelete'
><code>ippDelete
</code></a>
735 <p>File data is attached to the request using the
736 <a href='#cupsWriteRequestData'
><code>cupsWriteRequestData
</code></a>
737 function, while file data returned from the server is read using the
738 <a href='#cupsReadResponseData'
><code>cupsReadResponseData
</code></a>
739 function. We can rewrite the previous
<code>CUPS_GET_PPD
</code> example
740 to use the asynchronous functions quite easily:
</p>
742 <pre class='example'
>
745 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
746 <a href='#ipp_t'
>ipp_t
</a> *response;
748 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
749 NULL,
"laserjet.ppd");
751 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
753 if (
<a href='#cupsSendRequest'
>cupsSendRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/") == HTTP_CONTINUE)
755 response =
<a href='#cupsGetResponse'
>cupsGetResponse
</a>(CUPS_HTTP_DEFAULT,
"/");
757 if (response != NULL)
762 while ((bytes =
<a href='#cupsReadResponseData'
>cupsReadResponseData
</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer)))
> 0)
763 write(tempfd, buffer, bytes);
767 /* Free the request! */
768 <a href='#ippDelete'
>ippDelete
</a>(request);
771 <p>The
<a href='#cupsSendRequest'
><code>cupsSendRequest
</code></a> function
772 returns the initial HTTP request status, typically either
773 <code>HTTP_CONTINUE
</code> or
<code>HTTP_UNAUTHORIZED
</code>. The latter status
774 is returned when the request requires authentication of some sort. The
775 <a href='#cupsDoAuthentication'
><code>cupsDoAuthentication
</code></a> function
776 must be called when your see
<code>HTTP_UNAUTHORIZED
</code> and the request
777 re-sent. We can add authentication support to our example code by using a
778 <code>do ... while
</code> loop:
</p>
780 <pre class='example'
>
783 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
784 <a href='#ipp_t'
>ipp_t
</a> *response;
785 http_status_t status;
787 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
788 NULL,
"laserjet.ppd");
790 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
792 /* Loop for authentication */
795 status =
<a href='#cupsSendRequest'
>cupsSendRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/");
797 if (status == HTTP_UNAUTHORIZED)
799 /* Try to authenticate, break out of the loop if that fails */
800 if (
<a href='#cupsDoAuthentication'
>cupsDoAuthentication
</a>(CUPS_HTTP_DEFAULT,
"POST",
"/"))
804 while (status != HTTP_CONTINUE
&& status != HTTP_UNAUTHORIZED);
806 if (status == HTTP_CONTINUE)
808 response =
<a href='#cupsGetResponse'
>cupsGetResponse
</a>(CUPS_HTTP_DEFAULT,
"/");
810 if (response != NULL)
815 while ((bytes =
<a href='#cupsReadResponseData'
>cupsReadResponseData
</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer)))
> 0)
816 write(tempfd, buffer, bytes);
820 /* Free the request! */
821 <a href='#ippDelete'
>ippDelete
</a>(request);
823 <h2 class=
"title"><a name=
"FUNCTIONS">Functions
</a></h2>
824 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20 </span><a name=
"cupsDoAuthentication">cupsDoAuthentication
</a></h3>
825 <p class=
"description">Authenticate a request.
</p>
827 int cupsDoAuthentication (
<br>
828 <a href=
"#http_t">http_t
</a> *http,
<br>
829 const char *method,
<br>
830 const char *resource
<br>
832 <h4 class=
"parameters">Parameters
</h4>
835 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
837 <dd class=
"description">Request method (
"GET
",
"POST
",
"PUT
")
</dd>
839 <dd class=
"description">Resource path
</dd>
841 <h4 class=
"returnvalue">Return Value
</h4>
842 <p class=
"description">0 on success, -
1 on error
</p>
843 <h4 class=
"discussion">Discussion
</h4>
844 <p class=
"discussion">This function should be called in response to a
<code>HTTP_UNAUTHORIZED
</code>
845 status, prior to resubmitting your request.
848 <h3 class=
"function"><a name=
"cupsDoFileRequest">cupsDoFileRequest
</a></h3>
849 <p class=
"description">Do an IPP request with a file.
</p>
851 <a href=
"#ipp_t">ipp_t
</a> *cupsDoFileRequest (
<br>
852 <a href=
"#http_t">http_t
</a> *http,
<br>
853 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
854 const char *resource,
<br>
855 const char *filename
<br>
857 <h4 class=
"parameters">Parameters
</h4>
860 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
862 <dd class=
"description">IPP request
</dd>
864 <dd class=
"description">HTTP resource for POST
</dd>
866 <dd class=
"description">File to send or
<code>NULL
</code> for none
</dd>
868 <h4 class=
"returnvalue">Return Value
</h4>
869 <p class=
"description">Response data
</p>
870 <h4 class=
"discussion">Discussion
</h4>
871 <p class=
"discussion">This function sends the IPP request to the specified server, retrying
872 and authenticating as necessary. The request is freed with
<a href=
"#ippDelete"><code>ippDelete
</code></a>
873 after receiving a valid IPP response.
</p>
874 <h3 class=
"function"><span class=
"info"> CUPS
1.3 </span><a name=
"cupsDoIORequest">cupsDoIORequest
</a></h3>
875 <p class=
"description">Do an IPP request with file descriptors.
</p>
877 <a href=
"#ipp_t">ipp_t
</a> *cupsDoIORequest (
<br>
878 <a href=
"#http_t">http_t
</a> *http,
<br>
879 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
880 const char *resource,
<br>
881 int infile,
<br>
882 int outfile
<br>
884 <h4 class=
"parameters">Parameters
</h4>
887 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
889 <dd class=
"description">IPP request
</dd>
891 <dd class=
"description">HTTP resource for POST
</dd>
893 <dd class=
"description">File to read from or -
1 for none
</dd>
895 <dd class=
"description">File to write to or -
1 for none
</dd>
897 <h4 class=
"returnvalue">Return Value
</h4>
898 <p class=
"description">Response data
</p>
899 <h4 class=
"discussion">Discussion
</h4>
900 <p class=
"discussion">This function sends the IPP request to the specified server, retrying
901 and authenticating as necessary. The request is freed with ippDelete()
902 after receiving a valid IPP response.
<br>
904 If
"infile
" is a valid file descriptor, cupsDoIORequest() copies
905 all of the data from the file after the IPP request message.
<br>
907 If
"outfile
" is a valid file descriptor, cupsDoIORequest() copies
908 all of the data after the IPP response message to the file.
911 <h3 class=
"function"><a name=
"cupsDoRequest">cupsDoRequest
</a></h3>
912 <p class=
"description">Do an IPP request.
</p>
914 <a href=
"#ipp_t">ipp_t
</a> *cupsDoRequest (
<br>
915 <a href=
"#http_t">http_t
</a> *http,
<br>
916 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
917 const char *resource
<br>
919 <h4 class=
"parameters">Parameters
</h4>
922 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
924 <dd class=
"description">IPP request
</dd>
926 <dd class=
"description">HTTP resource for POST
</dd>
928 <h4 class=
"returnvalue">Return Value
</h4>
929 <p class=
"description">Response data
</p>
930 <h4 class=
"discussion">Discussion
</h4>
931 <p class=
"discussion">This function sends the IPP request to the specified server, retrying
932 and authenticating as necessary. The request is freed with ippDelete()
933 after receiving a valid IPP response.
</p>
934 <h3 class=
"function"><a name=
"cupsEncodeOptions">cupsEncodeOptions
</a></h3>
935 <p class=
"description">Encode printer options into IPP attributes.
</p>
937 void cupsEncodeOptions (
<br>
938 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
939 int num_options,
<br>
940 cups_option_t *options
<br>
942 <h4 class=
"parameters">Parameters
</h4>
945 <dd class=
"description">Request to add to
</dd>
947 <dd class=
"description">Number of options
</dd>
949 <dd class=
"description">Options
</dd>
951 <h4 class=
"discussion">Discussion
</h4>
952 <p class=
"discussion">This function adds operation, job, and then subscription attributes,
953 in that order. Use the cupsEncodeOptions2() function to add attributes
954 for a single group.
</p>
955 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"cupsEncodeOptions2">cupsEncodeOptions2
</a></h3>
956 <p class=
"description">Encode printer options into IPP attributes for a group.
</p>
958 void cupsEncodeOptions2 (
<br>
959 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
960 int num_options,
<br>
961 cups_option_t *options,
<br>
962 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group_tag
<br>
964 <h4 class=
"parameters">Parameters
</h4>
967 <dd class=
"description">Request to add to
</dd>
969 <dd class=
"description">Number of options
</dd>
971 <dd class=
"description">Options
</dd>
973 <dd class=
"description">Group to encode
</dd>
975 <h4 class=
"discussion">Discussion
</h4>
976 <p class=
"discussion">This function only adds attributes for a single group. Call this
977 function multiple times for each group, or use cupsEncodeOptions()
978 to add the standard groups.
981 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"cupsGetDevices">cupsGetDevices
</a></h3>
982 <p class=
"description">Get available printer devices.
</p>
984 ipp_status_t cupsGetDevices (
<br>
985 <a href=
"#http_t">http_t
</a> *http,
<br>
986 int timeout,
<br>
987 const char *exclude_schemes,
<br>
988 cups_device_cb_t callback,
<br>
989 void *user_data
<br>
991 <h4 class=
"parameters">Parameters
</h4>
994 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
996 <dd class=
"description">Timeout in seconds or
<code>CUPS_TIMEOUT_DEFAULT
</code></dd>
997 <dt>exclude_schemes
</dt>
998 <dd class=
"description">Comma-separated URI schemes to exclude or
<code>CUPS_EXCLUDE_NONE
</code></dd>
1000 <dd class=
"description">Callback function
</dd>
1002 <dd class=
"description">User data pointer
</dd>
1004 <h4 class=
"returnvalue">Return Value
</h4>
1005 <p class=
"description">Request status -
<code>IPP_OK
</code> on success.
</p>
1006 <h4 class=
"discussion">Discussion
</h4>
1007 <p class=
"discussion">This function sends a CUPS-Get-Devices request and streams the discovered
1008 devices to the specified callback function. The
"timeout
" parameter controls
1009 how long the request lasts, while the
"exclude_schemes
" parameter provides
1010 a comma-delimited list of backends to omit from the request.
1013 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20 </span><a name=
"cupsGetFd">cupsGetFd
</a></h3>
1014 <p class=
"description">Get a file from the server.
</p>
1016 <a href=
"#http_status_t">http_status_t
</a> cupsGetFd (
<br>
1017 <a href=
"#http_t">http_t
</a> *http,
<br>
1018 const char *resource,
<br>
1019 int fd
<br>
1021 <h4 class=
"parameters">Parameters
</h4>
1024 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1026 <dd class=
"description">Resource name
</dd>
1028 <dd class=
"description">File descriptor
</dd>
1030 <h4 class=
"returnvalue">Return Value
</h4>
1031 <p class=
"description">HTTP status
</p>
1032 <h4 class=
"discussion">Discussion
</h4>
1033 <p class=
"discussion">This function returns
<code>HTTP_OK
</code> when the file is successfully retrieved.
1036 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20 </span><a name=
"cupsGetFile">cupsGetFile
</a></h3>
1037 <p class=
"description">Get a file from the server.
</p>
1039 <a href=
"#http_status_t">http_status_t
</a> cupsGetFile (
<br>
1040 <a href=
"#http_t">http_t
</a> *http,
<br>
1041 const char *resource,
<br>
1042 const char *filename
<br>
1044 <h4 class=
"parameters">Parameters
</h4>
1047 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1049 <dd class=
"description">Resource name
</dd>
1051 <dd class=
"description">Filename
</dd>
1053 <h4 class=
"returnvalue">Return Value
</h4>
1054 <p class=
"description">HTTP status
</p>
1055 <h4 class=
"discussion">Discussion
</h4>
1056 <p class=
"discussion">This function returns
<code>HTTP_OK
</code> when the file is successfully retrieved.
1059 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"cupsGetResponse">cupsGetResponse
</a></h3>
1060 <p class=
"description">Get a response to an IPP request.
</p>
1062 <a href=
"#ipp_t">ipp_t
</a> *cupsGetResponse (
<br>
1063 <a href=
"#http_t">http_t
</a> *http,
<br>
1064 const char *resource
<br>
1066 <h4 class=
"parameters">Parameters
</h4>
1069 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1071 <dd class=
"description">HTTP resource for POST
</dd>
1073 <h4 class=
"returnvalue">Return Value
</h4>
1074 <p class=
"description">Response or
<code>NULL
</code> on HTTP error
</p>
1075 <h4 class=
"discussion">Discussion
</h4>
1076 <p class=
"discussion">Use this function to get the response for an IPP request sent using
1077 cupsSendDocument() or cupsSendRequest(). For requests that return
1078 additional data, use httpRead() after getting a successful response.
1081 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20 </span><a name=
"cupsPutFd">cupsPutFd
</a></h3>
1082 <p class=
"description">Put a file on the server.
</p>
1084 <a href=
"#http_status_t">http_status_t
</a> cupsPutFd (
<br>
1085 <a href=
"#http_t">http_t
</a> *http,
<br>
1086 const char *resource,
<br>
1087 int fd
<br>
1089 <h4 class=
"parameters">Parameters
</h4>
1092 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1094 <dd class=
"description">Resource name
</dd>
1096 <dd class=
"description">File descriptor
</dd>
1098 <h4 class=
"returnvalue">Return Value
</h4>
1099 <p class=
"description">HTTP status
</p>
1100 <h4 class=
"discussion">Discussion
</h4>
1101 <p class=
"discussion">This function returns
<code>HTTP_CREATED
</code> when the file is stored
1105 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20 </span><a name=
"cupsPutFile">cupsPutFile
</a></h3>
1106 <p class=
"description">Put a file on the server.
</p>
1108 <a href=
"#http_status_t">http_status_t
</a> cupsPutFile (
<br>
1109 <a href=
"#http_t">http_t
</a> *http,
<br>
1110 const char *resource,
<br>
1111 const char *filename
<br>
1113 <h4 class=
"parameters">Parameters
</h4>
1116 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1118 <dd class=
"description">Resource name
</dd>
1120 <dd class=
"description">Filename
</dd>
1122 <h4 class=
"returnvalue">Return Value
</h4>
1123 <p class=
"description">HTTP status
</p>
1124 <h4 class=
"discussion">Discussion
</h4>
1125 <p class=
"discussion">This function returns
<code>HTTP_CREATED
</code> when the file is stored
1129 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"cupsReadResponseData">cupsReadResponseData
</a></h3>
1130 <p class=
"description">Read additional data after the IPP response.
</p>
1132 ssize_t cupsReadResponseData (
<br>
1133 <a href=
"#http_t">http_t
</a> *http,
<br>
1134 char *buffer,
<br>
1135 size_t length
<br>
1137 <h4 class=
"parameters">Parameters
</h4>
1140 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1142 <dd class=
"description">Buffer to use
</dd>
1144 <dd class=
"description">Number of bytes to read
</dd>
1146 <h4 class=
"returnvalue">Return Value
</h4>
1147 <p class=
"description">Bytes read,
0 on EOF, -
1 on error
</p>
1148 <h4 class=
"discussion">Discussion
</h4>
1149 <p class=
"discussion">This function is used after cupsGetResponse() to read the PPD or document
1150 files for CUPS_GET_PPD and CUPS_GET_DOCUMENT requests, respectively.
1153 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"cupsSendRequest">cupsSendRequest
</a></h3>
1154 <p class=
"description">Send an IPP request.
</p>
1156 <a href=
"#http_status_t">http_status_t
</a> cupsSendRequest (
<br>
1157 <a href=
"#http_t">http_t
</a> *http,
<br>
1158 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
1159 const char *resource,
<br>
1160 size_t length
<br>
1162 <h4 class=
"parameters">Parameters
</h4>
1165 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1167 <dd class=
"description">IPP request
</dd>
1169 <dd class=
"description">Resource path
</dd>
1171 <dd class=
"description">Length of data to follow or
<code>CUPS_LENGTH_VARIABLE
</code></dd>
1173 <h4 class=
"returnvalue">Return Value
</h4>
1174 <p class=
"description">Initial HTTP status
</p>
1175 <h4 class=
"discussion">Discussion
</h4>
1176 <p class=
"discussion">Use httpWrite() to write any additional data (document, PPD file, etc.)
1177 for the request, cupsGetResponse() to get the IPP response, and httpRead()
1178 to read any additional data following the response. Only one request can be
1179 sent/queued at a time.
<br>
1181 Unlike cupsDoFileRequest(), cupsDoIORequest(), and cupsDoRequest(), the
1182 request is not freed.
1185 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"cupsWriteRequestData">cupsWriteRequestData
</a></h3>
1186 <p class=
"description">Write additional data after an IPP request.
</p>
1188 <a href=
"#http_status_t">http_status_t
</a> cupsWriteRequestData (
<br>
1189 <a href=
"#http_t">http_t
</a> *http,
<br>
1190 const char *buffer,
<br>
1191 size_t length
<br>
1193 <h4 class=
"parameters">Parameters
</h4>
1196 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1198 <dd class=
"description">Bytes to write
</dd>
1200 <dd class=
"description">Number of bytes to write
</dd>
1202 <h4 class=
"returnvalue">Return Value
</h4>
1203 <p class=
"description"><code>HTTP_CONTINUE
</code> if OK or HTTP status on error
</p>
1204 <h4 class=
"discussion">Discussion
</h4>
1205 <p class=
"discussion">This function is used after
<a href=
"#cupsSendRequest"><code>cupsSendRequest
</code></a> to provide a PPD and
1206 after
<a href=
"#cupsStartDocument"><code>cupsStartDocument
</code></a> to provide a document file.
1209 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpAddrAny">httpAddrAny
</a></h3>
1210 <p class=
"description">Check for the
"any
" address.
</p>
1212 int httpAddrAny (
<br>
1213 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1215 <h4 class=
"parameters">Parameters
</h4>
1218 <dd class=
"description">Address to check
</dd>
1220 <h4 class=
"returnvalue">Return Value
</h4>
1221 <p class=
"description">1 if
"any
",
0 otherwise
</p>
1222 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpAddrEqual">httpAddrEqual
</a></h3>
1223 <p class=
"description">Compare two addresses.
</p>
1225 int httpAddrEqual (
<br>
1226 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr1,
<br>
1227 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr2
<br>
1229 <h4 class=
"parameters">Parameters
</h4>
1232 <dd class=
"description">First address
</dd>
1234 <dd class=
"description">Second address
</dd>
1236 <h4 class=
"returnvalue">Return Value
</h4>
1237 <p class=
"description">1 if equal,
0 if not
</p>
1238 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpAddrLength">httpAddrLength
</a></h3>
1239 <p class=
"description">Return the length of the address in bytes.
</p>
1241 int httpAddrLength (
<br>
1242 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1244 <h4 class=
"parameters">Parameters
</h4>
1247 <dd class=
"description">Address
</dd>
1249 <h4 class=
"returnvalue">Return Value
</h4>
1250 <p class=
"description">Length in bytes
</p>
1251 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpAddrLocalhost">httpAddrLocalhost
</a></h3>
1252 <p class=
"description">Check for the local loopback address.
</p>
1254 int httpAddrLocalhost (
<br>
1255 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1257 <h4 class=
"parameters">Parameters
</h4>
1260 <dd class=
"description">Address to check
</dd>
1262 <h4 class=
"returnvalue">Return Value
</h4>
1263 <p class=
"description">1 if local host,
0 otherwise
</p>
1264 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpAddrLookup">httpAddrLookup
</a></h3>
1265 <p class=
"description">Lookup the hostname associated with the address.
</p>
1267 char *httpAddrLookup (
<br>
1268 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
1269 char *name,
<br>
1270 int namelen
<br>
1272 <h4 class=
"parameters">Parameters
</h4>
1275 <dd class=
"description">Address to lookup
</dd>
1277 <dd class=
"description">Host name buffer
</dd>
1279 <dd class=
"description">Size of name buffer
</dd>
1281 <h4 class=
"returnvalue">Return Value
</h4>
1282 <p class=
"description">Host name
</p>
1283 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpAddrString">httpAddrString
</a></h3>
1284 <p class=
"description">Convert an address to a numeric string.
</p>
1286 char *httpAddrString (
<br>
1287 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
1288 char *s,
<br>
1289 int slen
<br>
1291 <h4 class=
"parameters">Parameters
</h4>
1294 <dd class=
"description">Address to convert
</dd>
1296 <dd class=
"description">String buffer
</dd>
1298 <dd class=
"description">Length of string
</dd>
1300 <h4 class=
"returnvalue">Return Value
</h4>
1301 <p class=
"description">Numeric address string
</p>
1302 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpAssembleURI">httpAssembleURI
</a></h3>
1303 <p class=
"description">Assemble a uniform resource identifier from its
1306 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpAssembleURI (
<br>
1307 <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> encoding,
<br>
1308 char *uri,
<br>
1309 int urilen,
<br>
1310 const char *scheme,
<br>
1311 const char *username,
<br>
1312 const char *host,
<br>
1313 int port,
<br>
1314 const char *resource
<br>
1316 <h4 class=
"parameters">Parameters
</h4>
1319 <dd class=
"description">Encoding flags
</dd>
1321 <dd class=
"description">URI buffer
</dd>
1323 <dd class=
"description">Size of URI buffer
</dd>
1325 <dd class=
"description">Scheme name
</dd>
1327 <dd class=
"description">Username
</dd>
1329 <dd class=
"description">Hostname or address
</dd>
1331 <dd class=
"description">Port number
</dd>
1333 <dd class=
"description">Resource
</dd>
1335 <h4 class=
"returnvalue">Return Value
</h4>
1336 <p class=
"description">URI status
</p>
1337 <h4 class=
"discussion">Discussion
</h4>
1338 <p class=
"discussion">This function escapes reserved characters in the URI depending on the
1339 value of the
"encoding
" argument. You should use this function in
1340 place of traditional string functions whenever you need to create a
1344 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpAssembleURIf">httpAssembleURIf
</a></h3>
1345 <p class=
"description">Assemble a uniform resource identifier from its
1346 components with a formatted resource.
</p>
1348 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpAssembleURIf (
<br>
1349 <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> encoding,
<br>
1350 char *uri,
<br>
1351 int urilen,
<br>
1352 const char *scheme,
<br>
1353 const char *username,
<br>
1354 const char *host,
<br>
1355 int port,
<br>
1356 const char *resourcef,
<br>
1357 ...
<br>
1359 <h4 class=
"parameters">Parameters
</h4>
1362 <dd class=
"description">Encoding flags
</dd>
1364 <dd class=
"description">URI buffer
</dd>
1366 <dd class=
"description">Size of URI buffer
</dd>
1368 <dd class=
"description">Scheme name
</dd>
1370 <dd class=
"description">Username
</dd>
1372 <dd class=
"description">Hostname or address
</dd>
1374 <dd class=
"description">Port number
</dd>
1376 <dd class=
"description">Printf-style resource
</dd>
1378 <dd class=
"description">Additional arguments as needed
</dd>
1380 <h4 class=
"returnvalue">Return Value
</h4>
1381 <p class=
"description">URI status
</p>
1382 <h4 class=
"discussion">Discussion
</h4>
1383 <p class=
"discussion">This function creates a formatted version of the resource string
1384 argument
"resourcef
" and escapes reserved characters in the URI
1385 depending on the value of the
"encoding
" argument. You should use
1386 this function in place of traditional string functions whenever
1387 you need to create a URI string.
1390 <h3 class=
"function"><a name=
"httpBlocking">httpBlocking
</a></h3>
1391 <p class=
"description">Set blocking/non-blocking behavior on a connection.
</p>
1393 void httpBlocking (
<br>
1394 <a href=
"#http_t">http_t
</a> *http,
<br>
1395 int b
<br>
1397 <h4 class=
"parameters">Parameters
</h4>
1400 <dd class=
"description">Connection to server
</dd>
1402 <dd class=
"description">1 = blocking,
0 = non-blocking
</dd>
1404 <h3 class=
"function"><a name=
"httpCheck">httpCheck
</a></h3>
1405 <p class=
"description">Check to see if there is a pending response from the server.
</p>
1408 <a href=
"#http_t">http_t
</a> *http
<br>
1410 <h4 class=
"parameters">Parameters
</h4>
1413 <dd class=
"description">Connection to server
</dd>
1415 <h4 class=
"returnvalue">Return Value
</h4>
1416 <p class=
"description">0 = no data,
1 = data available
</p>
1417 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"httpClearCookie">httpClearCookie
</a></h3>
1418 <p class=
"description">Clear the cookie value(s).
</p>
1420 void httpClearCookie (
<br>
1421 <a href=
"#http_t">http_t
</a> *http
<br>
1423 <h4 class=
"parameters">Parameters
</h4>
1426 <dd class=
"description">Connection to server
</dd>
1428 <h3 class=
"function"><a name=
"httpClearFields">httpClearFields
</a></h3>
1429 <p class=
"description">Clear HTTP request fields.
</p>
1431 void httpClearFields (
<br>
1432 <a href=
"#http_t">http_t
</a> *http
<br>
1434 <h4 class=
"parameters">Parameters
</h4>
1437 <dd class=
"description">Connection to server
</dd>
1439 <h3 class=
"function"><a name=
"httpClose">httpClose
</a></h3>
1440 <p class=
"description">Close an HTTP connection...
</p>
1442 void httpClose (
<br>
1443 <a href=
"#http_t">http_t
</a> *http
<br>
1445 <h4 class=
"parameters">Parameters
</h4>
1448 <dd class=
"description">Connection to server
</dd>
1450 <h3 class=
"function"><a name=
"httpConnect">httpConnect
</a></h3>
1451 <p class=
"description">Connect to a HTTP server.
</p>
1453 <a href=
"#http_t">http_t
</a> *httpConnect (
<br>
1454 const char *host,
<br>
1455 int port
<br>
1457 <h4 class=
"parameters">Parameters
</h4>
1460 <dd class=
"description">Host to connect to
</dd>
1462 <dd class=
"description">Port number
</dd>
1464 <h4 class=
"returnvalue">Return Value
</h4>
1465 <p class=
"description">New HTTP connection
</p>
1466 <h3 class=
"function"><a name=
"httpConnectEncrypt">httpConnectEncrypt
</a></h3>
1467 <p class=
"description">Connect to a HTTP server using encryption.
</p>
1469 <a href=
"#http_t">http_t
</a> *httpConnectEncrypt (
<br>
1470 const char *host,
<br>
1471 int port,
<br>
1472 <a href=
"#http_encryption_t">http_encryption_t
</a> encryption
<br>
1474 <h4 class=
"parameters">Parameters
</h4>
1477 <dd class=
"description">Host to connect to
</dd>
1479 <dd class=
"description">Port number
</dd>
1481 <dd class=
"description">Type of encryption to use
</dd>
1483 <h4 class=
"returnvalue">Return Value
</h4>
1484 <p class=
"description">New HTTP connection
</p>
1485 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpDecode64">httpDecode64
</a></h3>
1486 <p class=
"description">Base64-decode a string.
</p>
1488 char *httpDecode64 (
<br>
1489 char *out,
<br>
1490 const char *in
<br>
1492 <h4 class=
"parameters">Parameters
</h4>
1495 <dd class=
"description">String to write to
</dd>
1497 <dd class=
"description">String to read from
</dd>
1499 <h4 class=
"returnvalue">Return Value
</h4>
1500 <p class=
"description">Decoded string
</p>
1501 <h4 class=
"discussion">Discussion
</h4>
1502 <p class=
"discussion">This function is deprecated. Use the httpDecode64_2() function instead
1503 which provides buffer length arguments.
1506 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21 </span><a name=
"httpDecode64_2">httpDecode64_2
</a></h3>
1507 <p class=
"description">Base64-decode a string.
</p>
1509 char *httpDecode64_2 (
<br>
1510 char *out,
<br>
1511 int *outlen,
<br>
1512 const char *in
<br>
1514 <h4 class=
"parameters">Parameters
</h4>
1517 <dd class=
"description">String to write to
</dd>
1519 <dd class=
"description">Size of output string
</dd>
1521 <dd class=
"description">String to read from
</dd>
1523 <h4 class=
"returnvalue">Return Value
</h4>
1524 <p class=
"description">Decoded string
</p>
1525 <h3 class=
"function"><a name=
"httpDelete">httpDelete
</a></h3>
1526 <p class=
"description">Send a DELETE request to the server.
</p>
1528 int httpDelete (
<br>
1529 <a href=
"#http_t">http_t
</a> *http,
<br>
1530 const char *uri
<br>
1532 <h4 class=
"parameters">Parameters
</h4>
1535 <dd class=
"description">Connection to server
</dd>
1537 <dd class=
"description">URI to delete
</dd>
1539 <h4 class=
"returnvalue">Return Value
</h4>
1540 <p class=
"description">Status of call (
0 = success)
</p>
1541 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpEncode64">httpEncode64
</a></h3>
1542 <p class=
"description">Base64-encode a string.
</p>
1544 char *httpEncode64 (
<br>
1545 char *out,
<br>
1546 const char *in
<br>
1548 <h4 class=
"parameters">Parameters
</h4>
1551 <dd class=
"description">String to write to
</dd>
1553 <dd class=
"description">String to read from
</dd>
1555 <h4 class=
"returnvalue">Return Value
</h4>
1556 <p class=
"description">Encoded string
</p>
1557 <h4 class=
"discussion">Discussion
</h4>
1558 <p class=
"discussion">This function is deprecated. Use the httpEncode64_2() function instead
1559 which provides buffer length arguments.
1562 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21 </span><a name=
"httpEncode64_2">httpEncode64_2
</a></h3>
1563 <p class=
"description">Base64-encode a string.
</p>
1565 char *httpEncode64_2 (
<br>
1566 char *out,
<br>
1567 int outlen,
<br>
1568 const char *in,
<br>
1569 int inlen
<br>
1571 <h4 class=
"parameters">Parameters
</h4>
1574 <dd class=
"description">String to write to
</dd>
1576 <dd class=
"description">Size of output string
</dd>
1578 <dd class=
"description">String to read from
</dd>
1580 <dd class=
"description">Size of input string
</dd>
1582 <h4 class=
"returnvalue">Return Value
</h4>
1583 <p class=
"description">Encoded string
</p>
1584 <h3 class=
"function"><a name=
"httpEncryption">httpEncryption
</a></h3>
1585 <p class=
"description">Set the required encryption on the link.
</p>
1587 int httpEncryption (
<br>
1588 <a href=
"#http_t">http_t
</a> *http,
<br>
1589 <a href=
"#http_encryption_t">http_encryption_t
</a> e
<br>
1591 <h4 class=
"parameters">Parameters
</h4>
1594 <dd class=
"description">Connection to server
</dd>
1596 <dd class=
"description">New encryption preference
</dd>
1598 <h4 class=
"returnvalue">Return Value
</h4>
1599 <p class=
"description">-
1 on error,
0 on success
</p>
1600 <h3 class=
"function"><a name=
"httpError">httpError
</a></h3>
1601 <p class=
"description">Get the last error on a connection.
</p>
1604 <a href=
"#http_t">http_t
</a> *http
<br>
1606 <h4 class=
"parameters">Parameters
</h4>
1609 <dd class=
"description">Connection to server
</dd>
1611 <h4 class=
"returnvalue">Return Value
</h4>
1612 <p class=
"description">Error code (errno) value
</p>
1613 <h3 class=
"function"><a name=
"httpFlush">httpFlush
</a></h3>
1614 <p class=
"description">Flush data from a HTTP connection.
</p>
1616 void httpFlush (
<br>
1617 <a href=
"#http_t">http_t
</a> *http
<br>
1619 <h4 class=
"parameters">Parameters
</h4>
1622 <dd class=
"description">Connection to server
</dd>
1624 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpFlushWrite">httpFlushWrite
</a></h3>
1625 <p class=
"description">Flush data in write buffer.
</p>
1627 int httpFlushWrite (
<br>
1628 <a href=
"#http_t">http_t
</a> *http
<br>
1630 <h4 class=
"parameters">Parameters
</h4>
1633 <dd class=
"description">Connection to server
</dd>
1635 <h4 class=
"returnvalue">Return Value
</h4>
1636 <p class=
"description">Bytes written or -
1 on error
</p>
1637 <h3 class=
"function"><a name=
"httpGet">httpGet
</a></h3>
1638 <p class=
"description">Send a GET request to the server.
</p>
1641 <a href=
"#http_t">http_t
</a> *http,
<br>
1642 const char *uri
<br>
1644 <h4 class=
"parameters">Parameters
</h4>
1647 <dd class=
"description">Connection to server
</dd>
1649 <dd class=
"description">URI to get
</dd>
1651 <h4 class=
"returnvalue">Return Value
</h4>
1652 <p class=
"description">Status of call (
0 = success)
</p>
1653 <h3 class=
"function"><span class=
"info"> CUPS
1.3 </span><a name=
"httpGetAuthString">httpGetAuthString
</a></h3>
1654 <p class=
"description">Get the current authorization string.
</p>
1656 char *httpGetAuthString (
<br>
1657 <a href=
"#http_t">http_t
</a> *http
<br>
1659 <h4 class=
"parameters">Parameters
</h4>
1662 <dd class=
"description">Connection to server
</dd>
1664 <h4 class=
"returnvalue">Return Value
</h4>
1665 <p class=
"description">Authorization string
</p>
1666 <h4 class=
"discussion">Discussion
</h4>
1667 <p class=
"discussion">The authorization string is set by cupsDoAuthentication() and
1668 httpSetAuthString(). Use httpGetAuthString() to retrieve the
1669 string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
1673 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpGetBlocking">httpGetBlocking
</a></h3>
1674 <p class=
"description">Get the blocking/non-block state of a connection.
</p>
1676 int httpGetBlocking (
<br>
1677 <a href=
"#http_t">http_t
</a> *http
<br>
1679 <h4 class=
"parameters">Parameters
</h4>
1682 <dd class=
"description">Connection to server
</dd>
1684 <h4 class=
"returnvalue">Return Value
</h4>
1685 <p class=
"description">1 if blocking,
0 if non-blocking
</p>
1686 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"httpGetCookie">httpGetCookie
</a></h3>
1687 <p class=
"description">Get any cookie data from the response.
</p>
1689 const char *httpGetCookie (
<br>
1690 <a href=
"#http_t">http_t
</a> *http
<br>
1692 <h4 class=
"parameters">Parameters
</h4>
1695 <dd class=
"description">HTTP connecion
</dd>
1697 <h4 class=
"returnvalue">Return Value
</h4>
1698 <p class=
"description">Cookie data or NULL
</p>
1699 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetDateString">httpGetDateString
</a></h3>
1700 <p class=
"description">Get a formatted date/time string from a time value.
</p>
1702 const char *httpGetDateString (
<br>
1703 time_t t
<br>
1705 <h4 class=
"parameters">Parameters
</h4>
1708 <dd class=
"description">UNIX time
</dd>
1710 <h4 class=
"returnvalue">Return Value
</h4>
1711 <p class=
"description">Date/time string
</p>
1712 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpGetDateString2">httpGetDateString2
</a></h3>
1713 <p class=
"description">Get a formatted date/time string from a time value.
</p>
1715 const char *httpGetDateString2 (
<br>
1716 time_t t,
<br>
1717 char *s,
<br>
1718 int slen
<br>
1720 <h4 class=
"parameters">Parameters
</h4>
1723 <dd class=
"description">UNIX time
</dd>
1725 <dd class=
"description">String buffer
</dd>
1727 <dd class=
"description">Size of string buffer
</dd>
1729 <h4 class=
"returnvalue">Return Value
</h4>
1730 <p class=
"description">Date/time string
</p>
1731 <h3 class=
"function"><a name=
"httpGetDateTime">httpGetDateTime
</a></h3>
1732 <p class=
"description">Get a time value from a formatted date/time string.
</p>
1734 time_t httpGetDateTime (
<br>
1735 const char *s
<br>
1737 <h4 class=
"parameters">Parameters
</h4>
1740 <dd class=
"description">Date/time string
</dd>
1742 <h4 class=
"returnvalue">Return Value
</h4>
1743 <p class=
"description">UNIX time
</p>
1744 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpGetFd">httpGetFd
</a></h3>
1745 <p class=
"description">Get the file descriptor associated with a connection.
</p>
1748 <a href=
"#http_t">http_t
</a> *http
<br>
1750 <h4 class=
"parameters">Parameters
</h4>
1753 <dd class=
"description">Connection to server
</dd>
1755 <h4 class=
"returnvalue">Return Value
</h4>
1756 <p class=
"description">File descriptor or -
1 if none
</p>
1757 <h3 class=
"function"><a name=
"httpGetField">httpGetField
</a></h3>
1758 <p class=
"description">Get a field value from a request/response.
</p>
1760 const char *httpGetField (
<br>
1761 <a href=
"#http_t">http_t
</a> *http,
<br>
1762 <a href=
"#http_field_t">http_field_t
</a> field
<br>
1764 <h4 class=
"parameters">Parameters
</h4>
1767 <dd class=
"description">Connection to server
</dd>
1769 <dd class=
"description">Field to get
</dd>
1771 <h4 class=
"returnvalue">Return Value
</h4>
1772 <p class=
"description">Field value
</p>
1773 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetHostByName">httpGetHostByName
</a></h3>
1774 <p class=
"description">Lookup a hostname or IPv4 address, and return
1775 address records for the specified name.
</p>
1777 struct hostent *httpGetHostByName (
<br>
1778 const char *name
<br>
1780 <h4 class=
"parameters">Parameters
</h4>
1783 <dd class=
"description">Hostname or IP address
</dd>
1785 <h4 class=
"returnvalue">Return Value
</h4>
1786 <p class=
"description">Host entry
</p>
1787 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpGetHostname">httpGetHostname
</a></h3>
1788 <p class=
"description">Get the FQDN for the connection or local system.
</p>
1790 const char *httpGetHostname (
<br>
1791 <a href=
"#http_t">http_t
</a> *http,
<br>
1792 char *s,
<br>
1793 int slen
<br>
1795 <h4 class=
"parameters">Parameters
</h4>
1798 <dd class=
"description">HTTP connection or NULL
</dd>
1800 <dd class=
"description">String buffer for name
</dd>
1802 <dd class=
"description">Size of buffer
</dd>
1804 <h4 class=
"returnvalue">Return Value
</h4>
1805 <p class=
"description">FQDN for connection or system
</p>
1806 <h4 class=
"discussion">Discussion
</h4>
1807 <p class=
"discussion">When
"http
" points to a connected socket, return the hostname or
1808 address that was used in the call to httpConnect() or httpConnectEncrypt().
1809 Otherwise, return the FQDN for the local system using both gethostname()
1810 and gethostbyname() to get the local hostname with domain.
1813 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetLength">httpGetLength
</a></h3>
1814 <p class=
"description">Get the amount of data remaining from the
1815 content-length or transfer-encoding fields.
</p>
1817 int httpGetLength (
<br>
1818 <a href=
"#http_t">http_t
</a> *http
<br>
1820 <h4 class=
"parameters">Parameters
</h4>
1823 <dd class=
"description">Connection to server
</dd>
1825 <h4 class=
"returnvalue">Return Value
</h4>
1826 <p class=
"description">Content length
</p>
1827 <h4 class=
"discussion">Discussion
</h4>
1828 <p class=
"discussion">This function is deprecated and will not return lengths larger than
1829 2^
31 -
1; use httpGetLength2() instead.
1832 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpGetLength2">httpGetLength2
</a></h3>
1833 <p class=
"description">Get the amount of data remaining from the
1834 content-length or transfer-encoding fields.
</p>
1836 off_t httpGetLength2 (
<br>
1837 <a href=
"#http_t">http_t
</a> *http
<br>
1839 <h4 class=
"parameters">Parameters
</h4>
1842 <dd class=
"description">Connection to server
</dd>
1844 <h4 class=
"returnvalue">Return Value
</h4>
1845 <p class=
"description">Content length
</p>
1846 <h4 class=
"discussion">Discussion
</h4>
1847 <p class=
"discussion">This function returns the complete content length, even for
1848 content larger than
2^
31 -
1.
1851 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpGetStatus">httpGetStatus
</a></h3>
1852 <p class=
"description">Get the status of the last HTTP request.
</p>
1854 <a href=
"#http_status_t">http_status_t
</a> httpGetStatus (
<br>
1855 <a href=
"#http_t">http_t
</a> *http
<br>
1857 <h4 class=
"parameters">Parameters
</h4>
1860 <dd class=
"description">Connection to server
</dd>
1862 <h4 class=
"returnvalue">Return Value
</h4>
1863 <p class=
"description">HTTP status
</p>
1864 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetSubField">httpGetSubField
</a></h3>
1865 <p class=
"description">Get a sub-field value.
</p>
1867 char *httpGetSubField (
<br>
1868 <a href=
"#http_t">http_t
</a> *http,
<br>
1869 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
1870 const char *name,
<br>
1871 char *value
<br>
1873 <h4 class=
"parameters">Parameters
</h4>
1876 <dd class=
"description">Connection to server
</dd>
1878 <dd class=
"description">Field index
</dd>
1880 <dd class=
"description">Name of sub-field
</dd>
1882 <dd class=
"description">Value string
</dd>
1884 <h4 class=
"returnvalue">Return Value
</h4>
1885 <p class=
"description">Value or NULL
</p>
1886 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpGetSubField2">httpGetSubField2
</a></h3>
1887 <p class=
"description">Get a sub-field value.
</p>
1889 char *httpGetSubField2 (
<br>
1890 <a href=
"#http_t">http_t
</a> *http,
<br>
1891 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
1892 const char *name,
<br>
1893 char *value,
<br>
1894 int valuelen
<br>
1896 <h4 class=
"parameters">Parameters
</h4>
1899 <dd class=
"description">Connection to server
</dd>
1901 <dd class=
"description">Field index
</dd>
1903 <dd class=
"description">Name of sub-field
</dd>
1905 <dd class=
"description">Value string
</dd>
1907 <dd class=
"description">Size of value buffer
</dd>
1909 <h4 class=
"returnvalue">Return Value
</h4>
1910 <p class=
"description">Value or NULL
</p>
1911 <h3 class=
"function"><a name=
"httpGets">httpGets
</a></h3>
1912 <p class=
"description">Get a line of text from a HTTP connection.
</p>
1914 char *httpGets (
<br>
1915 char *line,
<br>
1916 int length,
<br>
1917 <a href=
"#http_t">http_t
</a> *http
<br>
1919 <h4 class=
"parameters">Parameters
</h4>
1922 <dd class=
"description">Line to read into
</dd>
1924 <dd class=
"description">Max length of buffer
</dd>
1926 <dd class=
"description">Connection to server
</dd>
1928 <h4 class=
"returnvalue">Return Value
</h4>
1929 <p class=
"description">Line or NULL
</p>
1930 <h3 class=
"function"><a name=
"httpHead">httpHead
</a></h3>
1931 <p class=
"description">Send a HEAD request to the server.
</p>
1934 <a href=
"#http_t">http_t
</a> *http,
<br>
1935 const char *uri
<br>
1937 <h4 class=
"parameters">Parameters
</h4>
1940 <dd class=
"description">Connection to server
</dd>
1942 <dd class=
"description">URI for head
</dd>
1944 <h4 class=
"returnvalue">Return Value
</h4>
1945 <p class=
"description">Status of call (
0 = success)
</p>
1946 <h3 class=
"function"><a name=
"httpInitialize">httpInitialize
</a></h3>
1947 <p class=
"description">Initialize the HTTP interface library and set the
1948 default HTTP proxy (if any).
</p>
1950 void httpInitialize (void);
</p>
1951 <h3 class=
"function"><a name=
"httpMD5">httpMD5
</a></h3>
1952 <p class=
"description">Compute the MD5 sum of the username:group:password.
</p>
1955 const char *username,
<br>
1956 const char *realm,
<br>
1957 const char *passwd,
<br>
1958 char md5[
33]
<br>
1960 <h4 class=
"parameters">Parameters
</h4>
1963 <dd class=
"description">User name
</dd>
1965 <dd class=
"description">Realm name
</dd>
1967 <dd class=
"description">Password string
</dd>
1969 <dd class=
"description">MD5 string
</dd>
1971 <h4 class=
"returnvalue">Return Value
</h4>
1972 <p class=
"description">MD5 sum
</p>
1973 <h3 class=
"function"><a name=
"httpMD5Final">httpMD5Final
</a></h3>
1974 <p class=
"description">Combine the MD5 sum of the username, group, and password
1975 with the server-supplied nonce value, method, and
1978 char *httpMD5Final (
<br>
1979 const char *nonce,
<br>
1980 const char *method,
<br>
1981 const char *resource,
<br>
1982 char md5[
33]
<br>
1984 <h4 class=
"parameters">Parameters
</h4>
1987 <dd class=
"description">Server nonce value
</dd>
1989 <dd class=
"description">METHOD (GET, POST, etc.)
</dd>
1991 <dd class=
"description">Resource path
</dd>
1993 <dd class=
"description">MD5 sum
</dd>
1995 <h4 class=
"returnvalue">Return Value
</h4>
1996 <p class=
"description">New sum
</p>
1997 <h3 class=
"function"><a name=
"httpMD5String">httpMD5String
</a></h3>
1998 <p class=
"description">Convert an MD5 sum to a character string.
</p>
2000 char *httpMD5String (
<br>
2001 const unsigned char *sum,
<br>
2002 char md5[
33]
<br>
2004 <h4 class=
"parameters">Parameters
</h4>
2007 <dd class=
"description">MD5 sum data
</dd>
2009 <dd class=
"description">MD5 sum in hex
</dd>
2011 <h4 class=
"returnvalue">Return Value
</h4>
2012 <p class=
"description">MD5 sum in hex
</p>
2013 <h3 class=
"function"><a name=
"httpOptions">httpOptions
</a></h3>
2014 <p class=
"description">Send an OPTIONS request to the server.
</p>
2016 int httpOptions (
<br>
2017 <a href=
"#http_t">http_t
</a> *http,
<br>
2018 const char *uri
<br>
2020 <h4 class=
"parameters">Parameters
</h4>
2023 <dd class=
"description">Connection to server
</dd>
2025 <dd class=
"description">URI for options
</dd>
2027 <h4 class=
"returnvalue">Return Value
</h4>
2028 <p class=
"description">Status of call (
0 = success)
</p>
2029 <h3 class=
"function"><a name=
"httpPost">httpPost
</a></h3>
2030 <p class=
"description">Send a POST request to the server.
</p>
2033 <a href=
"#http_t">http_t
</a> *http,
<br>
2034 const char *uri
<br>
2036 <h4 class=
"parameters">Parameters
</h4>
2039 <dd class=
"description">Connection to server
</dd>
2041 <dd class=
"description">URI for post
</dd>
2043 <h4 class=
"returnvalue">Return Value
</h4>
2044 <p class=
"description">Status of call (
0 = success)
</p>
2045 <h3 class=
"function"><a name=
"httpPut">httpPut
</a></h3>
2046 <p class=
"description">Send a PUT request to the server.
</p>
2049 <a href=
"#http_t">http_t
</a> *http,
<br>
2050 const char *uri
<br>
2052 <h4 class=
"parameters">Parameters
</h4>
2055 <dd class=
"description">Connection to server
</dd>
2057 <dd class=
"description">URI to put
</dd>
2059 <h4 class=
"returnvalue">Return Value
</h4>
2060 <p class=
"description">Status of call (
0 = success)
</p>
2061 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpRead">httpRead
</a></h3>
2062 <p class=
"description">Read data from a HTTP connection.
</p>
2065 <a href=
"#http_t">http_t
</a> *http,
<br>
2066 char *buffer,
<br>
2067 int length
<br>
2069 <h4 class=
"parameters">Parameters
</h4>
2072 <dd class=
"description">Connection to server
</dd>
2074 <dd class=
"description">Buffer for data
</dd>
2076 <dd class=
"description">Maximum number of bytes
</dd>
2078 <h4 class=
"returnvalue">Return Value
</h4>
2079 <p class=
"description">Number of bytes read
</p>
2080 <h4 class=
"discussion">Discussion
</h4>
2081 <p class=
"discussion">This function is deprecated. Use the httpRead2() function which can
2082 read more than
2GB of data.
2085 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpRead2">httpRead2
</a></h3>
2086 <p class=
"description">Read data from a HTTP connection.
</p>
2088 ssize_t httpRead2 (
<br>
2089 <a href=
"#http_t">http_t
</a> *http,
<br>
2090 char *buffer,
<br>
2091 size_t length
<br>
2093 <h4 class=
"parameters">Parameters
</h4>
2096 <dd class=
"description">Connection to server
</dd>
2098 <dd class=
"description">Buffer for data
</dd>
2100 <dd class=
"description">Maximum number of bytes
</dd>
2102 <h4 class=
"returnvalue">Return Value
</h4>
2103 <p class=
"description">Number of bytes read
</p>
2104 <h3 class=
"function"><a name=
"httpReconnect">httpReconnect
</a></h3>
2105 <p class=
"description">Reconnect to a HTTP server.
</p>
2107 int httpReconnect (
<br>
2108 <a href=
"#http_t">http_t
</a> *http
<br>
2110 <h4 class=
"parameters">Parameters
</h4>
2113 <dd class=
"description">Connection to server
</dd>
2115 <h4 class=
"returnvalue">Return Value
</h4>
2116 <p class=
"description">0 on success, non-zero on failure
</p>
2117 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpSeparate">httpSeparate
</a></h3>
2118 <p class=
"description">Separate a Universal Resource Identifier into its
2121 void httpSeparate (
<br>
2122 const char *uri,
<br>
2123 char *scheme,
<br>
2124 char *username,
<br>
2125 char *host,
<br>
2126 int *port,
<br>
2127 char *resource
<br>
2129 <h4 class=
"parameters">Parameters
</h4>
2132 <dd class=
"description">Universal Resource Identifier
</dd>
2134 <dd class=
"description">Scheme [
32] (http, https, etc.)
</dd>
2136 <dd class=
"description">Username [
1024]
</dd>
2138 <dd class=
"description">Hostname [
1024]
</dd>
2140 <dd class=
"description">Port number to use
</dd>
2142 <dd class=
"description">Resource/filename [
1024]
</dd>
2144 <h4 class=
"discussion">Discussion
</h4>
2145 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
2148 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21 </span><a name=
"httpSeparate2">httpSeparate2
</a></h3>
2149 <p class=
"description">Separate a Universal Resource Identifier into its
2152 void httpSeparate2 (
<br>
2153 const char *uri,
<br>
2154 char *scheme,
<br>
2155 int schemelen,
<br>
2156 char *username,
<br>
2157 int usernamelen,
<br>
2158 char *host,
<br>
2159 int hostlen,
<br>
2160 int *port,
<br>
2161 char *resource,
<br>
2162 int resourcelen
<br>
2164 <h4 class=
"parameters">Parameters
</h4>
2167 <dd class=
"description">Universal Resource Identifier
</dd>
2169 <dd class=
"description">Scheme (http, https, etc.)
</dd>
2171 <dd class=
"description">Size of scheme buffer
</dd>
2173 <dd class=
"description">Username
</dd>
2174 <dt>usernamelen
</dt>
2175 <dd class=
"description">Size of username buffer
</dd>
2177 <dd class=
"description">Hostname
</dd>
2179 <dd class=
"description">Size of hostname buffer
</dd>
2181 <dd class=
"description">Port number to use
</dd>
2183 <dd class=
"description">Resource/filename
</dd>
2184 <dt>resourcelen
</dt>
2185 <dd class=
"description">Size of resource buffer
</dd>
2187 <h4 class=
"discussion">Discussion
</h4>
2188 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
2192 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpSeparateURI">httpSeparateURI
</a></h3>
2193 <p class=
"description">Separate a Universal Resource Identifier into its
2196 <a href=
"#http_uri_status_t">http_uri_status_t
</a> httpSeparateURI (
<br>
2197 <a href=
"#http_uri_coding_t">http_uri_coding_t
</a> decoding,
<br>
2198 const char *uri,
<br>
2199 char *scheme,
<br>
2200 int schemelen,
<br>
2201 char *username,
<br>
2202 int usernamelen,
<br>
2203 char *host,
<br>
2204 int hostlen,
<br>
2205 int *port,
<br>
2206 char *resource,
<br>
2207 int resourcelen
<br>
2209 <h4 class=
"parameters">Parameters
</h4>
2212 <dd class=
"description">Decoding flags
</dd>
2214 <dd class=
"description">Universal Resource Identifier
</dd>
2216 <dd class=
"description">Scheme (http, https, etc.)
</dd>
2218 <dd class=
"description">Size of scheme buffer
</dd>
2220 <dd class=
"description">Username
</dd>
2221 <dt>usernamelen
</dt>
2222 <dd class=
"description">Size of username buffer
</dd>
2224 <dd class=
"description">Hostname
</dd>
2226 <dd class=
"description">Size of hostname buffer
</dd>
2228 <dd class=
"description">Port number to use
</dd>
2230 <dd class=
"description">Resource/filename
</dd>
2231 <dt>resourcelen
</dt>
2232 <dd class=
"description">Size of resource buffer
</dd>
2234 <h4 class=
"returnvalue">Return Value
</h4>
2235 <p class=
"description">Result of separation
</p>
2236 <h3 class=
"function"><span class=
"info"> CUPS
1.3 </span><a name=
"httpSetAuthString">httpSetAuthString
</a></h3>
2237 <p class=
"description">Set the current authorization string.
</p>
2239 void httpSetAuthString (
<br>
2240 <a href=
"#http_t">http_t
</a> *http,
<br>
2241 const char *scheme,
<br>
2242 const char *data
<br>
2244 <h4 class=
"parameters">Parameters
</h4>
2247 <dd class=
"description">Connection to server
</dd>
2249 <dd class=
"description">Auth scheme (NULL to clear it)
</dd>
2251 <dd class=
"description">Auth data (NULL for none)
</dd>
2253 <h4 class=
"discussion">Discussion
</h4>
2254 <p class=
"discussion">This function just stores a copy of the current authorization string in
2255 the HTTP connection object. You must still call httpSetField() to set
2256 HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
2257 httpHead(), httpOptions(), httpPost, or httpPut().
2260 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"httpSetCookie">httpSetCookie
</a></h3>
2261 <p class=
"description">Set the cookie value(s)...
</p>
2263 void httpSetCookie (
<br>
2264 <a href=
"#http_t">http_t
</a> *http,
<br>
2265 const char *cookie
<br>
2267 <h4 class=
"parameters">Parameters
</h4>
2270 <dd class=
"description">Connection
</dd>
2272 <dd class=
"description">Cookie string
</dd>
2274 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpSetExpect">httpSetExpect
</a></h3>
2275 <p class=
"description">Set the Expect: header in a request.
</p>
2277 void httpSetExpect (
<br>
2278 <a href=
"#http_t">http_t
</a> *http,
<br>
2279 <a href=
"#http_status_t">http_status_t
</a> expect
<br>
2281 <h4 class=
"parameters">Parameters
</h4>
2284 <dd class=
"description">Connection to server
</dd>
2286 <dd class=
"description">HTTP status to expect (HTTP_CONTINUE)
</dd>
2288 <h4 class=
"discussion">Discussion
</h4>
2289 <p class=
"discussion">Currently only HTTP_CONTINUE is supported for the
"expect
" argument.
2292 <h3 class=
"function"><a name=
"httpSetField">httpSetField
</a></h3>
2293 <p class=
"description">Set the value of an HTTP header.
</p>
2295 void httpSetField (
<br>
2296 <a href=
"#http_t">http_t
</a> *http,
<br>
2297 <a href=
"#http_field_t">http_field_t
</a> field,
<br>
2298 const char *value
<br>
2300 <h4 class=
"parameters">Parameters
</h4>
2303 <dd class=
"description">Connection to server
</dd>
2305 <dd class=
"description">Field index
</dd>
2307 <dd class=
"description">Value
</dd>
2309 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpSetLength">httpSetLength
</a></h3>
2310 <p class=
"description">Set the content-length and content-encoding.
</p>
2312 void httpSetLength (
<br>
2313 <a href=
"#http_t">http_t
</a> *http,
<br>
2314 size_t length
<br>
2316 <h4 class=
"parameters">Parameters
</h4>
2319 <dd class=
"description">Connection to server
</dd>
2321 <dd class=
"description">Length (
0 for chunked)
</dd>
2323 <h3 class=
"function"><a name=
"httpStatus">httpStatus
</a></h3>
2324 <p class=
"description">Return a short string describing a HTTP status code.
</p>
2326 const char *httpStatus (
<br>
2327 <a href=
"#http_status_t">http_status_t
</a> status
<br>
2329 <h4 class=
"parameters">Parameters
</h4>
2332 <dd class=
"description">HTTP status code
</dd>
2334 <h4 class=
"returnvalue">Return Value
</h4>
2335 <p class=
"description">String or NULL
</p>
2336 <h3 class=
"function"><a name=
"httpTrace">httpTrace
</a></h3>
2337 <p class=
"description">Send an TRACE request to the server.
</p>
2340 <a href=
"#http_t">http_t
</a> *http,
<br>
2341 const char *uri
<br>
2343 <h4 class=
"parameters">Parameters
</h4>
2346 <dd class=
"description">Connection to server
</dd>
2348 <dd class=
"description">URI for trace
</dd>
2350 <h4 class=
"returnvalue">Return Value
</h4>
2351 <p class=
"description">Status of call (
0 = success)
</p>
2352 <h3 class=
"function"><a name=
"httpUpdate">httpUpdate
</a></h3>
2353 <p class=
"description">Update the current HTTP state for incoming data.
</p>
2355 <a href=
"#http_status_t">http_status_t
</a> httpUpdate (
<br>
2356 <a href=
"#http_t">http_t
</a> *http
<br>
2358 <h4 class=
"parameters">Parameters
</h4>
2361 <dd class=
"description">Connection to server
</dd>
2363 <h4 class=
"returnvalue">Return Value
</h4>
2364 <p class=
"description">HTTP status
</p>
2365 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"httpWait">httpWait
</a></h3>
2366 <p class=
"description">Wait for data available on a connection.
</p>
2369 <a href=
"#http_t">http_t
</a> *http,
<br>
2370 int msec
<br>
2372 <h4 class=
"parameters">Parameters
</h4>
2375 <dd class=
"description">Connection to server
</dd>
2377 <dd class=
"description">Milliseconds to wait
</dd>
2379 <h4 class=
"returnvalue">Return Value
</h4>
2380 <p class=
"description">1 if data is available,
0 otherwise
</p>
2381 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpWrite">httpWrite
</a></h3>
2382 <p class=
"description">Write data to a HTTP connection.
</p>
2385 <a href=
"#http_t">http_t
</a> *http,
<br>
2386 const char *buffer,
<br>
2387 int length
<br>
2389 <h4 class=
"parameters">Parameters
</h4>
2392 <dd class=
"description">Connection to server
</dd>
2394 <dd class=
"description">Buffer for data
</dd>
2396 <dd class=
"description">Number of bytes to write
</dd>
2398 <h4 class=
"returnvalue">Return Value
</h4>
2399 <p class=
"description">Number of bytes written
</p>
2400 <h4 class=
"discussion">Discussion
</h4>
2401 <p class=
"discussion">This function is deprecated. Use the httpWrite2() function which can
2402 write more than
2GB of data.
2405 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpWrite2">httpWrite2
</a></h3>
2406 <p class=
"description">Write data to a HTTP connection.
</p>
2408 ssize_t httpWrite2 (
<br>
2409 <a href=
"#http_t">http_t
</a> *http,
<br>
2410 const char *buffer,
<br>
2411 size_t length
<br>
2413 <h4 class=
"parameters">Parameters
</h4>
2416 <dd class=
"description">Connection to server
</dd>
2418 <dd class=
"description">Buffer for data
</dd>
2420 <dd class=
"description">Number of bytes to write
</dd>
2422 <h4 class=
"returnvalue">Return Value
</h4>
2423 <p class=
"description">Number of bytes written
</p>
2424 <h3 class=
"function"><a name=
"ippAddBoolean">ippAddBoolean
</a></h3>
2425 <p class=
"description">Add a boolean attribute to an IPP message.
</p>
2427 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBoolean (
<br>
2428 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2429 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2430 const char *name,
<br>
2431 char value
<br>
2433 <h4 class=
"parameters">Parameters
</h4>
2436 <dd class=
"description">IPP message
</dd>
2438 <dd class=
"description">IPP group
</dd>
2440 <dd class=
"description">Name of attribute
</dd>
2442 <dd class=
"description">Value of attribute
</dd>
2444 <h4 class=
"returnvalue">Return Value
</h4>
2445 <p class=
"description">New attribute
</p>
2446 <h3 class=
"function"><a name=
"ippAddBooleans">ippAddBooleans
</a></h3>
2447 <p class=
"description">Add an array of boolean values.
</p>
2449 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBooleans (
<br>
2450 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2451 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2452 const char *name,
<br>
2453 int num_values,
<br>
2454 const char *values
<br>
2456 <h4 class=
"parameters">Parameters
</h4>
2459 <dd class=
"description">IPP message
</dd>
2461 <dd class=
"description">IPP group
</dd>
2463 <dd class=
"description">Name of attribute
</dd>
2465 <dd class=
"description">Number of values
</dd>
2467 <dd class=
"description">Values
</dd>
2469 <h4 class=
"returnvalue">Return Value
</h4>
2470 <p class=
"description">New attribute
</p>
2471 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ippAddCollection">ippAddCollection
</a></h3>
2472 <p class=
"description">Add a collection value.
</p>
2474 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollection (
<br>
2475 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2476 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2477 const char *name,
<br>
2478 <a href=
"#ipp_t">ipp_t
</a> *value
<br>
2480 <h4 class=
"parameters">Parameters
</h4>
2483 <dd class=
"description">IPP message
</dd>
2485 <dd class=
"description">IPP group
</dd>
2487 <dd class=
"description">Name of attribute
</dd>
2489 <dd class=
"description">Value
</dd>
2491 <h4 class=
"returnvalue">Return Value
</h4>
2492 <p class=
"description">New attribute
</p>
2493 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ippAddCollections">ippAddCollections
</a></h3>
2494 <p class=
"description">Add an array of collection values.
</p>
2496 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollections (
<br>
2497 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2498 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2499 const char *name,
<br>
2500 int num_values,
<br>
2501 const
<a href=
"#ipp_t">ipp_t
</a> **values
<br>
2503 <h4 class=
"parameters">Parameters
</h4>
2506 <dd class=
"description">IPP message
</dd>
2508 <dd class=
"description">IPP group
</dd>
2510 <dd class=
"description">Name of attribute
</dd>
2512 <dd class=
"description">Number of values
</dd>
2514 <dd class=
"description">Values
</dd>
2516 <h4 class=
"returnvalue">Return Value
</h4>
2517 <p class=
"description">New attribute
</p>
2518 <h3 class=
"function"><a name=
"ippAddDate">ippAddDate
</a></h3>
2519 <p class=
"description">Add a date attribute to an IPP message.
</p>
2521 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddDate (
<br>
2522 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2523 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2524 const char *name,
<br>
2525 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *value
<br>
2527 <h4 class=
"parameters">Parameters
</h4>
2530 <dd class=
"description">IPP message
</dd>
2532 <dd class=
"description">IPP group
</dd>
2534 <dd class=
"description">Name of attribute
</dd>
2536 <dd class=
"description">Value
</dd>
2538 <h4 class=
"returnvalue">Return Value
</h4>
2539 <p class=
"description">New attribute
</p>
2540 <h3 class=
"function"><a name=
"ippAddInteger">ippAddInteger
</a></h3>
2541 <p class=
"description">Add a integer attribute to an IPP message.
</p>
2543 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddInteger (
<br>
2544 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2545 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2546 <a href=
"#ipp_tag_t">ipp_tag_t
</a> type,
<br>
2547 const char *name,
<br>
2548 int value
<br>
2550 <h4 class=
"parameters">Parameters
</h4>
2553 <dd class=
"description">IPP message
</dd>
2555 <dd class=
"description">IPP group
</dd>
2557 <dd class=
"description">Type of attribute
</dd>
2559 <dd class=
"description">Name of attribute
</dd>
2561 <dd class=
"description">Value of attribute
</dd>
2563 <h4 class=
"returnvalue">Return Value
</h4>
2564 <p class=
"description">New attribute
</p>
2565 <h3 class=
"function"><a name=
"ippAddIntegers">ippAddIntegers
</a></h3>
2566 <p class=
"description">Add an array of integer values.
</p>
2568 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddIntegers (
<br>
2569 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2570 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2571 <a href=
"#ipp_tag_t">ipp_tag_t
</a> type,
<br>
2572 const char *name,
<br>
2573 int num_values,
<br>
2574 const int *values
<br>
2576 <h4 class=
"parameters">Parameters
</h4>
2579 <dd class=
"description">IPP message
</dd>
2581 <dd class=
"description">IPP group
</dd>
2583 <dd class=
"description">Type of attribute
</dd>
2585 <dd class=
"description">Name of attribute
</dd>
2587 <dd class=
"description">Number of values
</dd>
2589 <dd class=
"description">Values
</dd>
2591 <h4 class=
"returnvalue">Return Value
</h4>
2592 <p class=
"description">New attribute
</p>
2593 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ippAddOctetString">ippAddOctetString
</a></h3>
2594 <p class=
"description">Add an octetString value to an IPP message.
</p>
2596 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddOctetString (
<br>
2597 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2598 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2599 const char *name,
<br>
2600 const void *data,
<br>
2601 int datalen
<br>
2603 <h4 class=
"parameters">Parameters
</h4>
2606 <dd class=
"description">IPP message
</dd>
2608 <dd class=
"description">IPP group
</dd>
2610 <dd class=
"description">Name of attribute
</dd>
2612 <dd class=
"description">octetString data
</dd>
2614 <dd class=
"description">Length of data in bytes
</dd>
2616 <h4 class=
"returnvalue">Return Value
</h4>
2617 <p class=
"description">New attribute
</p>
2618 <h3 class=
"function"><a name=
"ippAddRange">ippAddRange
</a></h3>
2619 <p class=
"description">Add a range of values to an IPP message.
</p>
2621 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRange (
<br>
2622 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2623 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2624 const char *name,
<br>
2625 int lower,
<br>
2626 int upper
<br>
2628 <h4 class=
"parameters">Parameters
</h4>
2631 <dd class=
"description">IPP message
</dd>
2633 <dd class=
"description">IPP group
</dd>
2635 <dd class=
"description">Name of attribute
</dd>
2637 <dd class=
"description">Lower value
</dd>
2639 <dd class=
"description">Upper value
</dd>
2641 <h4 class=
"returnvalue">Return Value
</h4>
2642 <p class=
"description">New attribute
</p>
2643 <h3 class=
"function"><a name=
"ippAddRanges">ippAddRanges
</a></h3>
2644 <p class=
"description">Add ranges of values to an IPP message.
</p>
2646 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRanges (
<br>
2647 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2648 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2649 const char *name,
<br>
2650 int num_values,
<br>
2651 const int *lower,
<br>
2652 const int *upper
<br>
2654 <h4 class=
"parameters">Parameters
</h4>
2657 <dd class=
"description">IPP message
</dd>
2659 <dd class=
"description">IPP group
</dd>
2661 <dd class=
"description">Name of attribute
</dd>
2663 <dd class=
"description">Number of values
</dd>
2665 <dd class=
"description">Lower values
</dd>
2667 <dd class=
"description">Upper values
</dd>
2669 <h4 class=
"returnvalue">Return Value
</h4>
2670 <p class=
"description">New attribute
</p>
2671 <h3 class=
"function"><a name=
"ippAddResolution">ippAddResolution
</a></h3>
2672 <p class=
"description">Add a resolution value to an IPP message.
</p>
2674 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolution (
<br>
2675 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2676 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2677 const char *name,
<br>
2678 <a href=
"#ipp_res_t">ipp_res_t
</a> units,
<br>
2679 int xres,
<br>
2680 int yres
<br>
2682 <h4 class=
"parameters">Parameters
</h4>
2685 <dd class=
"description">IPP message
</dd>
2687 <dd class=
"description">IPP group
</dd>
2689 <dd class=
"description">Name of attribute
</dd>
2691 <dd class=
"description">Units for resolution
</dd>
2693 <dd class=
"description">X resolution
</dd>
2695 <dd class=
"description">Y resolution
</dd>
2697 <h4 class=
"returnvalue">Return Value
</h4>
2698 <p class=
"description">New attribute
</p>
2699 <h3 class=
"function"><a name=
"ippAddResolutions">ippAddResolutions
</a></h3>
2700 <p class=
"description">Add resolution values to an IPP message.
</p>
2702 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolutions (
<br>
2703 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2704 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2705 const char *name,
<br>
2706 int num_values,
<br>
2707 <a href=
"#ipp_res_t">ipp_res_t
</a> units,
<br>
2708 const int *xres,
<br>
2709 const int *yres
<br>
2711 <h4 class=
"parameters">Parameters
</h4>
2714 <dd class=
"description">IPP message
</dd>
2716 <dd class=
"description">IPP group
</dd>
2718 <dd class=
"description">Name of attribute
</dd>
2720 <dd class=
"description">Number of values
</dd>
2722 <dd class=
"description">Units for resolution
</dd>
2724 <dd class=
"description">X resolutions
</dd>
2726 <dd class=
"description">Y resolutions
</dd>
2728 <h4 class=
"returnvalue">Return Value
</h4>
2729 <p class=
"description">New attribute
</p>
2730 <h3 class=
"function"><a name=
"ippAddSeparator">ippAddSeparator
</a></h3>
2731 <p class=
"description">Add a group separator to an IPP message.
</p>
2733 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddSeparator (
<br>
2734 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
2736 <h4 class=
"parameters">Parameters
</h4>
2739 <dd class=
"description">IPP message
</dd>
2741 <h4 class=
"returnvalue">Return Value
</h4>
2742 <p class=
"description">New attribute
</p>
2743 <h3 class=
"function"><a name=
"ippAddString">ippAddString
</a></h3>
2744 <p class=
"description">Add a language-encoded string to an IPP message.
</p>
2746 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddString (
<br>
2747 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2748 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2749 <a href=
"#ipp_tag_t">ipp_tag_t
</a> type,
<br>
2750 const char *name,
<br>
2751 const char *charset,
<br>
2752 const char *value
<br>
2754 <h4 class=
"parameters">Parameters
</h4>
2757 <dd class=
"description">IPP message
</dd>
2759 <dd class=
"description">IPP group
</dd>
2761 <dd class=
"description">Type of attribute
</dd>
2763 <dd class=
"description">Name of attribute
</dd>
2765 <dd class=
"description">Character set
</dd>
2767 <dd class=
"description">Value
</dd>
2769 <h4 class=
"returnvalue">Return Value
</h4>
2770 <p class=
"description">New attribute
</p>
2771 <h3 class=
"function"><a name=
"ippAddStrings">ippAddStrings
</a></h3>
2772 <p class=
"description">Add language-encoded strings to an IPP message.
</p>
2774 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddStrings (
<br>
2775 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2776 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group,
<br>
2777 <a href=
"#ipp_tag_t">ipp_tag_t
</a> type,
<br>
2778 const char *name,
<br>
2779 int num_values,
<br>
2780 const char *charset,
<br>
2781 const char *const *values
<br>
2783 <h4 class=
"parameters">Parameters
</h4>
2786 <dd class=
"description">IPP message
</dd>
2788 <dd class=
"description">IPP group
</dd>
2790 <dd class=
"description">Type of attribute
</dd>
2792 <dd class=
"description">Name of attribute
</dd>
2794 <dd class=
"description">Number of values
</dd>
2796 <dd class=
"description">Character set
</dd>
2798 <dd class=
"description">Values
</dd>
2800 <h4 class=
"returnvalue">Return Value
</h4>
2801 <p class=
"description">New attribute
</p>
2802 <h3 class=
"function"><a name=
"ippDateToTime">ippDateToTime
</a></h3>
2803 <p class=
"description">Convert from RFC
1903 Date/Time format to UNIX time
2806 time_t ippDateToTime (
<br>
2807 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *date
<br>
2809 <h4 class=
"parameters">Parameters
</h4>
2812 <dd class=
"description">RFC
1903 date info
</dd>
2814 <h4 class=
"returnvalue">Return Value
</h4>
2815 <p class=
"description">UNIX time value
</p>
2816 <h3 class=
"function"><a name=
"ippDelete">ippDelete
</a></h3>
2817 <p class=
"description">Delete an IPP message.
</p>
2819 void ippDelete (
<br>
2820 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
2822 <h4 class=
"parameters">Parameters
</h4>
2825 <dd class=
"description">IPP message
</dd>
2827 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ippDeleteAttribute">ippDeleteAttribute
</a></h3>
2828 <p class=
"description">Delete a single attribute in an IPP message.
</p>
2830 void ippDeleteAttribute (
<br>
2831 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2832 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
2834 <h4 class=
"parameters">Parameters
</h4>
2837 <dd class=
"description">IPP message
</dd>
2839 <dd class=
"description">Attribute to delete
</dd>
2841 <h3 class=
"function"><a name=
"ippErrorString">ippErrorString
</a></h3>
2842 <p class=
"description">Return a name for the given status code.
</p>
2844 const char *ippErrorString (
<br>
2845 ipp_status_t error
<br>
2847 <h4 class=
"parameters">Parameters
</h4>
2850 <dd class=
"description">Error status
</dd>
2852 <h4 class=
"returnvalue">Return Value
</h4>
2853 <p class=
"description">Text string
</p>
2854 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ippErrorValue">ippErrorValue
</a></h3>
2855 <p class=
"description">Return a status code for the given name.
</p>
2857 ipp_status_t ippErrorValue (
<br>
2858 const char *name
<br>
2860 <h4 class=
"parameters">Parameters
</h4>
2863 <dd class=
"description">Name
</dd>
2865 <h4 class=
"returnvalue">Return Value
</h4>
2866 <p class=
"description">IPP status code
</p>
2867 <h3 class=
"function"><a name=
"ippFindAttribute">ippFindAttribute
</a></h3>
2868 <p class=
"description">Find a named attribute in a request...
</p>
2870 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindAttribute (
<br>
2871 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2872 const char *name,
<br>
2873 <a href=
"#ipp_tag_t">ipp_tag_t
</a> type
<br>
2875 <h4 class=
"parameters">Parameters
</h4>
2878 <dd class=
"description">IPP message
</dd>
2880 <dd class=
"description">Name of attribute
</dd>
2882 <dd class=
"description">Type of attribute
</dd>
2884 <h4 class=
"returnvalue">Return Value
</h4>
2885 <p class=
"description">Matching attribute
</p>
2886 <h3 class=
"function"><a name=
"ippFindNextAttribute">ippFindNextAttribute
</a></h3>
2887 <p class=
"description">Find the next named attribute in a request...
</p>
2889 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindNextAttribute (
<br>
2890 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2891 const char *name,
<br>
2892 <a href=
"#ipp_tag_t">ipp_tag_t
</a> type
<br>
2894 <h4 class=
"parameters">Parameters
</h4>
2897 <dd class=
"description">IPP message
</dd>
2899 <dd class=
"description">Name of attribute
</dd>
2901 <dd class=
"description">Type of attribute
</dd>
2903 <h4 class=
"returnvalue">Return Value
</h4>
2904 <p class=
"description">Matching attribute
</p>
2905 <h3 class=
"function"><a name=
"ippLength">ippLength
</a></h3>
2906 <p class=
"description">Compute the length of an IPP message.
</p>
2908 size_t ippLength (
<br>
2909 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
2911 <h4 class=
"parameters">Parameters
</h4>
2914 <dd class=
"description">IPP message
</dd>
2916 <h4 class=
"returnvalue">Return Value
</h4>
2917 <p class=
"description">Size of IPP message
</p>
2918 <h3 class=
"function"><a name=
"ippNew">ippNew
</a></h3>
2919 <p class=
"description">Allocate a new IPP message.
</p>
2921 <a href=
"#ipp_t">ipp_t
</a> *ippNew (void);
</p>
2922 <h4 class=
"returnvalue">Return Value
</h4>
2923 <p class=
"description">New IPP message
</p>
2924 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ippNewRequest">ippNewRequest
</a></h3>
2925 <p class=
"description">Allocate a new IPP request message.
</p>
2927 <a href=
"#ipp_t">ipp_t
</a> *ippNewRequest (
<br>
2928 <a href=
"#ipp_op_t">ipp_op_t
</a> op
<br>
2930 <h4 class=
"parameters">Parameters
</h4>
2933 <dd class=
"description">Operation code
</dd>
2935 <h4 class=
"returnvalue">Return Value
</h4>
2936 <p class=
"description">IPP request message
</p>
2937 <h4 class=
"discussion">Discussion
</h4>
2938 <p class=
"discussion">The new request message is initialized with the attributes-charset and
2939 attributes-natural-language attributes added. The
2940 attributes-natural-language value is derived from the current locale.
2943 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ippOpString">ippOpString
</a></h3>
2944 <p class=
"description">Return a name for the given operation id.
</p>
2946 const char *ippOpString (
<br>
2947 <a href=
"#ipp_op_t">ipp_op_t
</a> op
<br>
2949 <h4 class=
"parameters">Parameters
</h4>
2952 <dd class=
"description">Operation ID
</dd>
2954 <h4 class=
"returnvalue">Return Value
</h4>
2955 <p class=
"description">Name
</p>
2956 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ippOpValue">ippOpValue
</a></h3>
2957 <p class=
"description">Return an operation id for the given name.
</p>
2959 <a href=
"#ipp_op_t">ipp_op_t
</a> ippOpValue (
<br>
2960 const char *name
<br>
2962 <h4 class=
"parameters">Parameters
</h4>
2965 <dd class=
"description">Textual name
</dd>
2967 <h4 class=
"returnvalue">Return Value
</h4>
2968 <p class=
"description">Operation ID
</p>
2969 <h3 class=
"function"><a name=
"ippPort">ippPort
</a></h3>
2970 <p class=
"description">Return the default IPP port number.
</p>
2972 int ippPort (void);
</p>
2973 <h4 class=
"returnvalue">Return Value
</h4>
2974 <p class=
"description">Port number
</p>
2975 <h3 class=
"function"><a name=
"ippRead">ippRead
</a></h3>
2976 <p class=
"description">Read data for an IPP message from a HTTP connection.
</p>
2978 <a href=
"#ipp_state_t">ipp_state_t
</a> ippRead (
<br>
2979 <a href=
"#http_t">http_t
</a> *http,
<br>
2980 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
2982 <h4 class=
"parameters">Parameters
</h4>
2985 <dd class=
"description">HTTP connection
</dd>
2987 <dd class=
"description">IPP data
</dd>
2989 <h4 class=
"returnvalue">Return Value
</h4>
2990 <p class=
"description">Current state
</p>
2991 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ippReadFile">ippReadFile
</a></h3>
2992 <p class=
"description">Read data for an IPP message from a file.
</p>
2994 <a href=
"#ipp_state_t">ipp_state_t
</a> ippReadFile (
<br>
2995 int fd,
<br>
2996 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
2998 <h4 class=
"parameters">Parameters
</h4>
3001 <dd class=
"description">HTTP data
</dd>
3003 <dd class=
"description">IPP data
</dd>
3005 <h4 class=
"returnvalue">Return Value
</h4>
3006 <p class=
"description">Current state
</p>
3007 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ippReadIO">ippReadIO
</a></h3>
3008 <p class=
"description">Read data for an IPP message.
</p>
3010 <a href=
"#ipp_state_t">ipp_state_t
</a> ippReadIO (
<br>
3011 void *src,
<br>
3012 <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br>
3013 int blocking,
<br>
3014 <a href=
"#ipp_t">ipp_t
</a> *parent,
<br>
3015 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3017 <h4 class=
"parameters">Parameters
</h4>
3020 <dd class=
"description">Data source
</dd>
3022 <dd class=
"description">Read callback function
</dd>
3024 <dd class=
"description">Use blocking IO?
</dd>
3026 <dd class=
"description">Parent request, if any
</dd>
3028 <dd class=
"description">IPP data
</dd>
3030 <h4 class=
"returnvalue">Return Value
</h4>
3031 <p class=
"description">Current state
</p>
3032 <h3 class=
"function"><a name=
"ippSetPort">ippSetPort
</a></h3>
3033 <p class=
"description">Set the default port number.
</p>
3035 void ippSetPort (
<br>
3036 int p
<br>
3038 <h4 class=
"parameters">Parameters
</h4>
3041 <dd class=
"description">Port number to use
</dd>
3043 <h3 class=
"function"><a name=
"ippTimeToDate">ippTimeToDate
</a></h3>
3044 <p class=
"description">Convert from UNIX time to RFC
1903 format.
</p>
3046 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *ippTimeToDate (
<br>
3047 time_t t
<br>
3049 <h4 class=
"parameters">Parameters
</h4>
3052 <dd class=
"description">UNIX time value
</dd>
3054 <h4 class=
"returnvalue">Return Value
</h4>
3055 <p class=
"description">RFC-
1903 date/time data
</p>
3056 <h3 class=
"function"><a name=
"ippWrite">ippWrite
</a></h3>
3057 <p class=
"description">Write data for an IPP message to a HTTP connection.
</p>
3059 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWrite (
<br>
3060 <a href=
"#http_t">http_t
</a> *http,
<br>
3061 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3063 <h4 class=
"parameters">Parameters
</h4>
3066 <dd class=
"description">HTTP connection
</dd>
3068 <dd class=
"description">IPP data
</dd>
3070 <h4 class=
"returnvalue">Return Value
</h4>
3071 <p class=
"description">Current state
</p>
3072 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ippWriteFile">ippWriteFile
</a></h3>
3073 <p class=
"description">Write data for an IPP message to a file.
</p>
3075 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWriteFile (
<br>
3076 int fd,
<br>
3077 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3079 <h4 class=
"parameters">Parameters
</h4>
3082 <dd class=
"description">HTTP data
</dd>
3084 <dd class=
"description">IPP data
</dd>
3086 <h4 class=
"returnvalue">Return Value
</h4>
3087 <p class=
"description">Current state
</p>
3088 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ippWriteIO">ippWriteIO
</a></h3>
3089 <p class=
"description">Write data for an IPP message.
</p>
3091 <a href=
"#ipp_state_t">ipp_state_t
</a> ippWriteIO (
<br>
3092 void *dst,
<br>
3093 <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br>
3094 int blocking,
<br>
3095 <a href=
"#ipp_t">ipp_t
</a> *parent,
<br>
3096 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3098 <h4 class=
"parameters">Parameters
</h4>
3101 <dd class=
"description">Destination
</dd>
3103 <dd class=
"description">Write callback function
</dd>
3105 <dd class=
"description">Use blocking IO?
</dd>
3107 <dd class=
"description">Parent IPP message
</dd>
3109 <dd class=
"description">IPP data
</dd>
3111 <h4 class=
"returnvalue">Return Value
</h4>
3112 <p class=
"description">Current state
</p>
3113 <h2 class=
"title"><a name=
"TYPES">Data Types
</a></h2>
3114 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"http_addrlist_t">http_addrlist_t
</a></h3>
3115 <p class=
"description">Socket address list, which is
3116 used to enumerate all of the
3117 addresses that are associated
3118 with a hostname.
</p>
3120 typedef struct
<a href=
"#http_addrlist_s">http_addrlist_s
</a> / http_addrlist_t;
3122 <h3 class=
"typedef"><a name=
"http_auth_t">http_auth_t
</a></h3>
3123 <p class=
"description">HTTP authentication types
</p>
3125 typedef enum
<a href=
"#http_auth_e">http_auth_e
</a> http_auth_t;
3127 <h3 class=
"typedef"><a name=
"http_encoding_t">http_encoding_t
</a></h3>
3128 <p class=
"description">HTTP transfer encoding values
</p>
3130 typedef enum
<a href=
"#http_encoding_e">http_encoding_e
</a> http_encoding_t;
3132 <h3 class=
"typedef"><a name=
"http_encryption_t">http_encryption_t
</a></h3>
3133 <p class=
"description">HTTP encryption values
</p>
3135 typedef enum
<a href=
"#http_encryption_e">http_encryption_e
</a> http_encryption_t;
3137 <h3 class=
"typedef"><a name=
"http_field_t">http_field_t
</a></h3>
3138 <p class=
"description">HTTP field names
</p>
3140 typedef enum
<a href=
"#http_field_e">http_field_e
</a> http_field_t;
3142 <h3 class=
"typedef"><a name=
"http_keepalive_t">http_keepalive_t
</a></h3>
3143 <p class=
"description">Types and structures...
</p>
3145 typedef enum
<a href=
"#http_keepalive_e">http_keepalive_e
</a> http_keepalive_t;
3147 <h3 class=
"typedef"><a name=
"http_status_t">http_status_t
</a></h3>
3148 <p class=
"description">HTTP status codes
</p>
3150 typedef enum
<a href=
"#http_status_e">http_status_e
</a> http_status_t;
3152 <h3 class=
"typedef"><a name=
"http_t">http_t
</a></h3>
3153 <p class=
"description">HTTP connection type
</p>
3155 typedef struct _http_s http_t;
3157 <h3 class=
"typedef"><a name=
"http_uri_coding_t">http_uri_coding_t
</a></h3>
3158 <p class=
"description">HTTP version numbers
</p>
3160 typedef enum
<a href=
"#http_uri_coding_e">http_uri_coding_e
</a> http_uri_coding_t;
3162 <h3 class=
"typedef"><a name=
"http_uri_status_t">http_uri_status_t
</a></h3>
3163 <p class=
"description">URI en/decode flags
</p>
3165 typedef enum
<a href=
"#http_uri_status_e">http_uri_status_e
</a> http_uri_status_t;
3167 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"http_version_t">http_version_t
</a></h3>
3168 <p class=
"description">Socket address union, which
3169 makes using IPv6 and other
3170 address types easier and
3173 typedef enum
<a href=
"#http_version_e">http_version_e
</a> http_version_t;
3175 <h3 class=
"typedef"><a name=
"ipp_attribute_t">ipp_attribute_t
</a></h3>
3176 <p class=
"description">Attribute
</p>
3178 typedef struct
<a href=
"#ipp_attribute_s">ipp_attribute_s
</a> ipp_attribute_t;
3180 <h3 class=
"typedef"><a name=
"ipp_finish_t">ipp_finish_t
</a></h3>
3181 <p class=
"description">Orientation...
</p>
3183 typedef enum
<a href=
"#ipp_finish_e">ipp_finish_e
</a> ipp_finish_t;
3185 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ipp_iocb_t">ipp_iocb_t
</a></h3>
3186 <p class=
"description">IPP IO Callback Function
</p>
3188 typedef ssize_t (*ipp_iocb_t)(void *,
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *, size_t);
3190 <h3 class=
"typedef"><a name=
"ipp_jstate_t">ipp_jstate_t
</a></h3>
3191 <p class=
"description">Printer States....
</p>
3193 typedef enum
<a href=
"#ipp_jstate_e">ipp_jstate_e
</a> ipp_jstate_t;
3195 <h3 class=
"typedef"><a name=
"ipp_op_t">ipp_op_t
</a></h3>
3196 <p class=
"description">Old names for the operations
</p>
3198 typedef enum
<a href=
"#ipp_op_e">ipp_op_e
</a> ipp_op_t;
3200 <h3 class=
"typedef"><a name=
"ipp_orient_t">ipp_orient_t
</a></h3>
3201 <p class=
"description">Qualities...
</p>
3203 typedef enum
<a href=
"#ipp_orient_e">ipp_orient_e
</a> ipp_orient_t;
3205 <h3 class=
"typedef"><a name=
"ipp_pstate_t">ipp_pstate_t
</a></h3>
3206 <p class=
"description">IPP states...
</p>
3208 typedef enum
<a href=
"#ipp_pstate_e">ipp_pstate_e
</a> ipp_pstate_t;
3210 <h3 class=
"typedef"><a name=
"ipp_quality_t">ipp_quality_t
</a></h3>
3211 <p class=
"description">Job States....
</p>
3213 typedef enum
<a href=
"#ipp_quality_e">ipp_quality_e
</a> ipp_quality_t;
3215 <h3 class=
"typedef"><a name=
"ipp_request_t">ipp_request_t
</a></h3>
3216 <p class=
"description">Request Header
</p>
3218 typedef union
<a href=
"#ipp_request_u">ipp_request_u
</a> ipp_request_t;
3220 <h3 class=
"typedef"><a name=
"ipp_res_t">ipp_res_t
</a></h3>
3221 <p class=
"description">Types and structures...
</p>
3223 typedef enum
<a href=
"#ipp_res_e">ipp_res_e
</a> ipp_res_t;
3225 <h3 class=
"typedef"><a name=
"ipp_state_t">ipp_state_t
</a></h3>
3226 <p class=
"description">IPP operations...
</p>
3228 typedef enum
<a href=
"#ipp_state_e">ipp_state_e
</a> ipp_state_t;
3230 <h3 class=
"typedef"><a name=
"ipp_t">ipp_t
</a></h3>
3231 <p class=
"description">Attribute Value
</p>
3233 typedef struct
<a href=
"#ipp_s">ipp_s
</a> ipp_t;
3235 <h3 class=
"typedef"><a name=
"ipp_uchar_t">ipp_uchar_t
</a></h3>
3236 <p class=
"description">IPP status codes...
</p>
3238 typedef typedef unsigned char ipp_uchar_t;
3240 <h3 class=
"typedef"><a name=
"ipp_tag_t">ipp_tag_t
</a></h3>
3241 <p class=
"description">Format tags for attributes...
</p>
3243 typedef enum
<a href=
"#ipp_tag_e">ipp_tag_e
</a> ipp_tag_t;
3245 <h3 class=
"typedef"><a name=
"ipp_value_t">ipp_value_t
</a></h3>
3246 <p class=
"description">New in CUPS
1.1.19</p>
3248 typedef union
<a href=
"#ipp_value_u">ipp_value_u
</a> ipp_value_t;
3250 <h2 class=
"title"><a name=
"STRUCTURES">Structures
</a></h2>
3251 <h3 class=
"struct"><span class=
"info"> CUPS
1.2 </span><a name=
"http_addrlist_s">http_addrlist_s
</a></h3>
3252 <p class=
"description">Socket address list, which is
3253 used to enumerate all of the
3254 addresses that are associated
3255 with a hostname.
</p>
3256 <p class=
"code">struct http_addrlist_s {
<br>
3257 <a href=
"#http_addr_t">http_addr_t
</a> addr;
<br>
3258 struct
<a href=
"#http_addrlist_s">http_addrlist_s
</a> *next;
<br>
3260 <h4 class=
"members">Members
</h4>
3263 <dd class=
"description">Address
</dd>
3265 <dd class=
"description">Pointer to next address in list
</dd>
3267 <h3 class=
"struct"><a name=
"ipp_attribute_s">ipp_attribute_s
</a></h3>
3268 <p class=
"description">Attribute
</p>
3269 <p class=
"code">struct ipp_attribute_s {
<br>
3270 char *name;
<br>
3271 struct
<a href=
"#ipp_attribute_s">ipp_attribute_s
</a> *next;
<br>
3272 int num_values;
<br>
3273 <a href=
"#ipp_tag_t">ipp_tag_t
</a> group_tag, value_tag;
<br>
3274 <a href=
"#ipp_value_t">ipp_value_t
</a> values[
1];
<br>
3276 <h4 class=
"members">Members
</h4>
3279 <dd class=
"description">Name of attribute
</dd>
3281 <dd class=
"description">Next attribute in list
</dd>
3282 <dt>num_values
</dt>
3283 <dd class=
"description">Number of values
</dd>
3285 <dd class=
"description">What type of value is it?
</dd>
3287 <dd class=
"description">Values
</dd>
3289 <h3 class=
"struct"><a name=
"ipp_s">ipp_s
</a></h3>
3290 <p class=
"description">IPP Request/Response/Notification
</p>
3291 <p class=
"code">struct ipp_s {
<br>
3292 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attrs;
<br>
3293 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *current;
<br>
3294 <a href=
"#ipp_tag_t">ipp_tag_t
</a> curtag;
<br>
3295 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *last;
<br>
3296 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *prev;
<br>
3297 <a href=
"#ipp_request_t">ipp_request_t
</a> request;
<br>
3298 <a href=
"#ipp_state_t">ipp_state_t
</a> state;
<br>
3300 <h4 class=
"members">Members
</h4>
3303 <dd class=
"description">Attributes
</dd>
3305 <dd class=
"description">Current attribute (for read/write)
</dd>
3307 <dd class=
"description">Current attribute group tag
</dd>
3309 <dd class=
"description">Last attribute in list
</dd>
3311 <dd class=
"description">Previous attribute (for read)
</dd>
3313 <dd class=
"description">Request header
</dd>
3315 <dd class=
"description">State of request
</dd>
3317 <h2 class=
"title"><a name=
"UNIONS">Unions
</a></h2>
3318 <h3 class=
"union"><a name=
"ipp_request_u">ipp_request_u
</a></h3>
3319 <p class=
"description">Request Header
</p>
3320 <p class=
"code">union ipp_request_u {
<br>
3322 <h4 class=
"members">Members
</h4>
3325 <h3 class=
"union"><a name=
"ipp_value_u">ipp_value_u
</a></h3>
3326 <p class=
"description">New in CUPS
1.1.19</p>
3327 <p class=
"code">union ipp_value_u {
<br>
3328 char boolean;
<br>
3329 <a href=
"#ipp_t">ipp_t
</a> *collection;
<br>
3330 <a href=
"#ipp_uchar_t">ipp_uchar_t
</a> date[
11];
<br>
3331 int integer;
<br>
3333 <h4 class=
"members">Members
</h4>
3336 <dd class=
"description">Boolean value
</dd>
3337 <dt>collection
</dt>
3338 <dd class=
"description">Collection value
</dd>
3340 <dd class=
"description">Date/time value
</dd>
3342 <dd class=
"description">Integer/enumerated value
</dd>
3344 <h2 class=
"title"><a name=
"ENUMERATIONS">Constants
</a></h2>
3345 <h3 class=
"enumeration"><a name=
"http_auth_e">http_auth_e
</a></h3>
3346 <p class=
"description">HTTP authentication types
</p>
3347 <h4 class=
"constants">Constants
</h4>
3349 <dt>HTTP_AUTH_BASIC
</dt>
3350 <dd class=
"description">Basic authentication in use
</dd>
3351 <dt>HTTP_AUTH_MD5
</dt>
3352 <dd class=
"description">Digest authentication in use
</dd>
3353 <dt>HTTP_AUTH_MD5_INT
</dt>
3354 <dd class=
"description">Digest authentication in use for body
</dd>
3355 <dt>HTTP_AUTH_MD5_SESS
</dt>
3356 <dd class=
"description">MD5-session authentication in use
</dd>
3357 <dt>HTTP_AUTH_MD5_SESS_INT
</dt>
3358 <dd class=
"description">MD5-session authentication in use for body
</dd>
3359 <dt>HTTP_AUTH_NEGOTIATE
<span class=
"info"> CUPS
1.3 </span></dt>
3360 <dd class=
"description">GSSAPI authentication in use
</dd>
3361 <dt>HTTP_AUTH_NONE
</dt>
3362 <dd class=
"description">No authentication in use
</dd>
3364 <h3 class=
"enumeration"><a name=
"http_encoding_e">http_encoding_e
</a></h3>
3365 <p class=
"description">HTTP transfer encoding values
</p>
3366 <h4 class=
"constants">Constants
</h4>
3368 <dt>HTTP_ENCODE_CHUNKED
</dt>
3369 <dd class=
"description">Data is chunked
</dd>
3370 <dt>HTTP_ENCODE_FIELDS
</dt>
3371 <dd class=
"description">Sending HTTP fields
</dd>
3372 <dt>HTTP_ENCODE_LENGTH
</dt>
3373 <dd class=
"description">Data is sent with Content-Length
</dd>
3375 <h3 class=
"enumeration"><a name=
"http_encryption_e">http_encryption_e
</a></h3>
3376 <p class=
"description">HTTP encryption values
</p>
3377 <h4 class=
"constants">Constants
</h4>
3379 <dt>HTTP_ENCRYPT_ALWAYS
</dt>
3380 <dd class=
"description">Always encrypt (SSL)
</dd>
3381 <dt>HTTP_ENCRYPT_IF_REQUESTED
</dt>
3382 <dd class=
"description">Encrypt if requested (TLS upgrade)
</dd>
3383 <dt>HTTP_ENCRYPT_NEVER
</dt>
3384 <dd class=
"description">Never encrypt
</dd>
3385 <dt>HTTP_ENCRYPT_REQUIRED
</dt>
3386 <dd class=
"description">Encryption is required (TLS upgrade)
</dd>
3388 <h3 class=
"enumeration"><a name=
"http_field_e">http_field_e
</a></h3>
3389 <p class=
"description">HTTP field names
</p>
3390 <h4 class=
"constants">Constants
</h4>
3392 <dt>HTTP_FIELD_ACCEPT_LANGUAGE
</dt>
3393 <dd class=
"description">Accept-Language field
</dd>
3394 <dt>HTTP_FIELD_ACCEPT_RANGES
</dt>
3395 <dd class=
"description">Accept-Ranges field
</dd>
3396 <dt>HTTP_FIELD_AUTHORIZATION
</dt>
3397 <dd class=
"description">Authorization field
</dd>
3398 <dt>HTTP_FIELD_CONNECTION
</dt>
3399 <dd class=
"description">Connection field
</dd>
3400 <dt>HTTP_FIELD_CONTENT_ENCODING
</dt>
3401 <dd class=
"description">Content-Encoding field
</dd>
3402 <dt>HTTP_FIELD_CONTENT_LANGUAGE
</dt>
3403 <dd class=
"description">Content-Language field
</dd>
3404 <dt>HTTP_FIELD_CONTENT_LENGTH
</dt>
3405 <dd class=
"description">Content-Length field
</dd>
3406 <dt>HTTP_FIELD_CONTENT_LOCATION
</dt>
3407 <dd class=
"description">Content-Location field
</dd>
3408 <dt>HTTP_FIELD_CONTENT_MD5
</dt>
3409 <dd class=
"description">Content-MD5 field
</dd>
3410 <dt>HTTP_FIELD_CONTENT_RANGE
</dt>
3411 <dd class=
"description">Content-Range field
</dd>
3412 <dt>HTTP_FIELD_CONTENT_TYPE
</dt>
3413 <dd class=
"description">Content-Type field
</dd>
3414 <dt>HTTP_FIELD_CONTENT_VERSION
</dt>
3415 <dd class=
"description">Content-Version field
</dd>
3416 <dt>HTTP_FIELD_DATE
</dt>
3417 <dd class=
"description">Date field
</dd>
3418 <dt>HTTP_FIELD_HOST
</dt>
3419 <dd class=
"description">Host field
</dd>
3420 <dt>HTTP_FIELD_IF_MODIFIED_SINCE
</dt>
3421 <dd class=
"description">If-Modified-Since field
</dd>
3422 <dt>HTTP_FIELD_IF_UNMODIFIED_SINCE
</dt>
3423 <dd class=
"description">If-Unmodified-Since field
</dd>
3424 <dt>HTTP_FIELD_KEEP_ALIVE
</dt>
3425 <dd class=
"description">Keep-Alive field
</dd>
3426 <dt>HTTP_FIELD_LAST_MODIFIED
</dt>
3427 <dd class=
"description">Last-Modified field
</dd>
3428 <dt>HTTP_FIELD_LINK
</dt>
3429 <dd class=
"description">Link field
</dd>
3430 <dt>HTTP_FIELD_LOCATION
</dt>
3431 <dd class=
"description">Location field
</dd>
3432 <dt>HTTP_FIELD_MAX
</dt>
3433 <dd class=
"description">Maximum field index
</dd>
3434 <dt>HTTP_FIELD_RANGE
</dt>
3435 <dd class=
"description">Range field
</dd>
3436 <dt>HTTP_FIELD_REFERER
</dt>
3437 <dd class=
"description">Referer field
</dd>
3438 <dt>HTTP_FIELD_RETRY_AFTER
</dt>
3439 <dd class=
"description">Retry-After field
</dd>
3440 <dt>HTTP_FIELD_TRANSFER_ENCODING
</dt>
3441 <dd class=
"description">Transfer-Encoding field
</dd>
3442 <dt>HTTP_FIELD_UNKNOWN
</dt>
3443 <dd class=
"description">Unknown field
</dd>
3444 <dt>HTTP_FIELD_UPGRADE
</dt>
3445 <dd class=
"description">Upgrade field
</dd>
3446 <dt>HTTP_FIELD_USER_AGENT
</dt>
3447 <dd class=
"description">User-Agent field
</dd>
3448 <dt>HTTP_FIELD_WWW_AUTHENTICATE
</dt>
3449 <dd class=
"description">WWW-Authenticate field
</dd>
3451 <h3 class=
"enumeration"><a name=
"http_keepalive_e">http_keepalive_e
</a></h3>
3452 <p class=
"description">Types and structures...
</p>
3453 <h4 class=
"constants">Constants
</h4>
3455 <dt>HTTP_KEEPALIVE_OFF
</dt>
3456 <dd class=
"description">No keep alive support
</dd>
3457 <dt>HTTP_KEEPALIVE_ON
</dt>
3458 <dd class=
"description">Use keep alive
</dd>
3460 <h3 class=
"enumeration"><a name=
"http_state_e">http_state_e
</a></h3>
3461 <p class=
"description"></p>
3462 <h4 class=
"constants">Constants
</h4>
3464 <dt>HTTP_CLOSE
</dt>
3465 <dd class=
"description">CLOSE command, waiting for blank line
</dd>
3466 <dt>HTTP_DELETE
</dt>
3467 <dd class=
"description">DELETE command, waiting for blank line
</dd>
3469 <dd class=
"description">GET command, waiting for blank line
</dd>
3470 <dt>HTTP_GET_SEND
</dt>
3471 <dd class=
"description">GET command, sending data
</dd>
3473 <dd class=
"description">HEAD command, waiting for blank line
</dd>
3474 <dt>HTTP_OPTIONS
</dt>
3475 <dd class=
"description">OPTIONS command, waiting for blank line
</dd>
3477 <dd class=
"description">POST command, waiting for blank line
</dd>
3478 <dt>HTTP_POST_RECV
</dt>
3479 <dd class=
"description">POST command, receiving data
</dd>
3480 <dt>HTTP_POST_SEND
</dt>
3481 <dd class=
"description">POST command, sending data
</dd>
3483 <dd class=
"description">PUT command, waiting for blank line
</dd>
3484 <dt>HTTP_PUT_RECV
</dt>
3485 <dd class=
"description">PUT command, receiving data
</dd>
3486 <dt>HTTP_STATUS
</dt>
3487 <dd class=
"description">Command complete, sending status
</dd>
3488 <dt>HTTP_TRACE
</dt>
3489 <dd class=
"description">TRACE command, waiting for blank line
</dd>
3490 <dt>HTTP_WAITING
</dt>
3491 <dd class=
"description">Waiting for command
</dd>
3493 <h3 class=
"enumeration"><a name=
"http_status_e">http_status_e
</a></h3>
3494 <p class=
"description">HTTP status codes
</p>
3495 <h4 class=
"constants">Constants
</h4>
3497 <dt>HTTP_ACCEPTED
</dt>
3498 <dd class=
"description">DELETE command was successful
</dd>
3499 <dt>HTTP_BAD_GATEWAY
</dt>
3500 <dd class=
"description">Bad gateway
</dd>
3501 <dt>HTTP_BAD_REQUEST
</dt>
3502 <dd class=
"description">Bad request
</dd>
3503 <dt>HTTP_CONFLICT
</dt>
3504 <dd class=
"description">Request is self-conflicting
</dd>
3505 <dt>HTTP_CONTINUE
</dt>
3506 <dd class=
"description">Everything OK, keep going...
</dd>
3507 <dt>HTTP_CREATED
</dt>
3508 <dd class=
"description">PUT command was successful
</dd>
3509 <dt>HTTP_ERROR
</dt>
3510 <dd class=
"description">An error response from httpXxxx()
</dd>
3511 <dt>HTTP_EXPECTATION_FAILED
</dt>
3512 <dd class=
"description">The expectation given in an Expect header field was not met
</dd>
3513 <dt>HTTP_FORBIDDEN
</dt>
3514 <dd class=
"description">Forbidden to access this URI
</dd>
3515 <dt>HTTP_GATEWAY_TIMEOUT
</dt>
3516 <dd class=
"description">Gateway connection timed out
</dd>
3518 <dd class=
"description">Server has gone away
</dd>
3519 <dt>HTTP_LENGTH_REQUIRED
</dt>
3520 <dd class=
"description">A content length or encoding is required
</dd>
3521 <dt>HTTP_METHOD_NOT_ALLOWED
</dt>
3522 <dd class=
"description">Method is not allowed
</dd>
3523 <dt>HTTP_MOVED_PERMANENTLY
</dt>
3524 <dd class=
"description">Document has moved permanently
</dd>
3525 <dt>HTTP_MOVED_TEMPORARILY
</dt>
3526 <dd class=
"description">Document has moved temporarily
</dd>
3527 <dt>HTTP_MULTIPLE_CHOICES
</dt>
3528 <dd class=
"description">Multiple files match request
</dd>
3529 <dt>HTTP_NOT_ACCEPTABLE
</dt>
3530 <dd class=
"description">Not Acceptable
</dd>
3531 <dt>HTTP_NOT_AUTHORITATIVE
</dt>
3532 <dd class=
"description">Information isn't authoritative
</dd>
3533 <dt>HTTP_NOT_FOUND
</dt>
3534 <dd class=
"description">URI was not found
</dd>
3535 <dt>HTTP_NOT_IMPLEMENTED
</dt>
3536 <dd class=
"description">Feature not implemented
</dd>
3537 <dt>HTTP_NOT_MODIFIED
</dt>
3538 <dd class=
"description">File not modified
</dd>
3539 <dt>HTTP_NOT_SUPPORTED
</dt>
3540 <dd class=
"description">HTTP version not supported
</dd>
3541 <dt>HTTP_NO_CONTENT
</dt>
3542 <dd class=
"description">Successful command, no new data
</dd>
3544 <dd class=
"description">OPTIONS/GET/HEAD/POST/TRACE command was successful
</dd>
3545 <dt>HTTP_PARTIAL_CONTENT
</dt>
3546 <dd class=
"description">Only a partial file was recieved/sent
</dd>
3547 <dt>HTTP_PAYMENT_REQUIRED
</dt>
3548 <dd class=
"description">Payment required
</dd>
3549 <dt>HTTP_PRECONDITION
</dt>
3550 <dd class=
"description">Precondition failed
</dd>
3551 <dt>HTTP_PROXY_AUTHENTICATION
</dt>
3552 <dd class=
"description">Proxy Authentication is Required
</dd>
3553 <dt>HTTP_REQUESTED_RANGE
</dt>
3554 <dd class=
"description">The requested range is not satisfiable
</dd>
3555 <dt>HTTP_REQUEST_TIMEOUT
</dt>
3556 <dd class=
"description">Request timed out
</dd>
3557 <dt>HTTP_REQUEST_TOO_LARGE
</dt>
3558 <dd class=
"description">Request entity too large
</dd>
3559 <dt>HTTP_RESET_CONTENT
</dt>
3560 <dd class=
"description">Content was reset/recreated
</dd>
3561 <dt>HTTP_SEE_OTHER
</dt>
3562 <dd class=
"description">See this other link...
</dd>
3563 <dt>HTTP_SERVER_ERROR
</dt>
3564 <dd class=
"description">Internal server error
</dd>
3565 <dt>HTTP_SERVICE_UNAVAILABLE
</dt>
3566 <dd class=
"description">Service is unavailable
</dd>
3567 <dt>HTTP_SWITCHING_PROTOCOLS
</dt>
3568 <dd class=
"description">HTTP upgrade to TLS/SSL
</dd>
3569 <dt>HTTP_UNAUTHORIZED
</dt>
3570 <dd class=
"description">Unauthorized to access host
</dd>
3571 <dt>HTTP_UNSUPPORTED_MEDIATYPE
</dt>
3572 <dd class=
"description">The requested media type is unsupported
</dd>
3573 <dt>HTTP_UPGRADE_REQUIRED
</dt>
3574 <dd class=
"description">Upgrade to SSL/TLS required
</dd>
3575 <dt>HTTP_URI_TOO_LONG
</dt>
3576 <dd class=
"description">URI too long
</dd>
3577 <dt>HTTP_USE_PROXY
</dt>
3578 <dd class=
"description">Must use a proxy to access this URI
</dd>
3580 <h3 class=
"enumeration"><a name=
"http_uri_coding_e">http_uri_coding_e
</a></h3>
3581 <p class=
"description"></p>
3582 <h4 class=
"constants">Constants
</h4>
3584 <dt>HTTP_URI_CODING_ALL
</dt>
3585 <dd class=
"description">En/decode everything
</dd>
3586 <dt>HTTP_URI_CODING_HOSTNAME
</dt>
3587 <dd class=
"description">En/decode the hostname portion
</dd>
3588 <dt>HTTP_URI_CODING_MOST
</dt>
3589 <dd class=
"description">En/decode all but the query
</dd>
3590 <dt>HTTP_URI_CODING_NONE
</dt>
3591 <dd class=
"description">Don't en/decode anything
</dd>
3592 <dt>HTTP_URI_CODING_QUERY
</dt>
3593 <dd class=
"description">En/decode the query portion
</dd>
3594 <dt>HTTP_URI_CODING_RESOURCE
</dt>
3595 <dd class=
"description">En/decode the resource portion
</dd>
3596 <dt>HTTP_URI_CODING_USERNAME
</dt>
3597 <dd class=
"description">En/decode the username portion
</dd>
3599 <h3 class=
"enumeration"><a name=
"http_uri_status_e">http_uri_status_e
</a></h3>
3600 <p class=
"description"></p>
3601 <h4 class=
"constants">Constants
</h4>
3603 <dt>HTTP_URI_BAD_ARGUMENTS
</dt>
3604 <dd class=
"description">Bad arguments to function (error)
</dd>
3605 <dt>HTTP_URI_BAD_HOSTNAME
</dt>
3606 <dd class=
"description">Bad hostname in URI (error)
</dd>
3607 <dt>HTTP_URI_BAD_PORT
</dt>
3608 <dd class=
"description">Bad port number in URI (error)
</dd>
3609 <dt>HTTP_URI_BAD_RESOURCE
</dt>
3610 <dd class=
"description">Bad resource in URI (error)
</dd>
3611 <dt>HTTP_URI_BAD_SCHEME
</dt>
3612 <dd class=
"description">Bad scheme in URI (error)
</dd>
3613 <dt>HTTP_URI_BAD_URI
</dt>
3614 <dd class=
"description">Bad/empty URI (error)
</dd>
3615 <dt>HTTP_URI_BAD_USERNAME
</dt>
3616 <dd class=
"description">Bad username in URI (error)
</dd>
3617 <dt>HTTP_URI_MISSING_RESOURCE
</dt>
3618 <dd class=
"description">Missing resource in URI (warning)
</dd>
3619 <dt>HTTP_URI_MISSING_SCHEME
</dt>
3620 <dd class=
"description">Missing scheme in URI (warning)
</dd>
3621 <dt>HTTP_URI_OK
</dt>
3622 <dd class=
"description">URI decoded OK
</dd>
3623 <dt>HTTP_URI_OVERFLOW
</dt>
3624 <dd class=
"description">URI buffer for httpAssembleURI is too small
</dd>
3625 <dt>HTTP_URI_UNKNOWN_SCHEME
</dt>
3626 <dd class=
"description">Unknown scheme in URI (warning)
</dd>
3628 <h3 class=
"enumeration"><a name=
"http_version_e">http_version_e
</a></h3>
3629 <p class=
"description"></p>
3630 <h4 class=
"constants">Constants
</h4>
3633 <dd class=
"description">HTTP/
0.9</dd>
3635 <dd class=
"description">HTTP/
1.0</dd>
3637 <dd class=
"description">HTTP/
1.1</dd>
3639 <h3 class=
"enumeration"><a name=
"ipp_finish_e">ipp_finish_e
</a></h3>
3640 <p class=
"description"></p>
3641 <h4 class=
"constants">Constants
</h4>
3643 <dt>IPP_FINISHINGS_BALE
</dt>
3644 <dd class=
"description">Bale (any type)
</dd>
3645 <dt>IPP_FINISHINGS_BIND
</dt>
3646 <dd class=
"description">Bind
</dd>
3647 <dt>IPP_FINISHINGS_BIND_BOTTOM
</dt>
3648 <dd class=
"description">Bind on bottom
</dd>
3649 <dt>IPP_FINISHINGS_BIND_LEFT
</dt>
3650 <dd class=
"description">Bind on left
</dd>
3651 <dt>IPP_FINISHINGS_BIND_RIGHT
</dt>
3652 <dd class=
"description">Bind on right
</dd>
3653 <dt>IPP_FINISHINGS_BIND_TOP
</dt>
3654 <dd class=
"description">Bind on top
</dd>
3655 <dt>IPP_FINISHINGS_BOOKLET_MAKER
</dt>
3656 <dd class=
"description">Fold to make booklet
</dd>
3657 <dt>IPP_FINISHINGS_COVER
</dt>
3658 <dd class=
"description">Add cover
</dd>
3659 <dt>IPP_FINISHINGS_EDGE_STITCH
</dt>
3660 <dd class=
"description">Stitch along any side
</dd>
3661 <dt>IPP_FINISHINGS_EDGE_STITCH_BOTTOM
</dt>
3662 <dd class=
"description">Stitch along bottom edge
</dd>
3663 <dt>IPP_FINISHINGS_EDGE_STITCH_LEFT
</dt>
3664 <dd class=
"description">Stitch along left side
</dd>
3665 <dt>IPP_FINISHINGS_EDGE_STITCH_RIGHT
</dt>
3666 <dd class=
"description">Stitch along right side
</dd>
3667 <dt>IPP_FINISHINGS_EDGE_STITCH_TOP
</dt>
3668 <dd class=
"description">Stitch along top edge
</dd>
3669 <dt>IPP_FINISHINGS_FOLD
</dt>
3670 <dd class=
"description">Fold (any type)
</dd>
3671 <dt>IPP_FINISHINGS_JOB_OFFSET
</dt>
3672 <dd class=
"description">Offset for binding (any type)
</dd>
3673 <dt>IPP_FINISHINGS_NONE
</dt>
3674 <dd class=
"description">No finishing
</dd>
3675 <dt>IPP_FINISHINGS_PUNCH
</dt>
3676 <dd class=
"description">Punch (any location/count)
</dd>
3677 <dt>IPP_FINISHINGS_SADDLE_STITCH
</dt>
3678 <dd class=
"description">Staple interior
</dd>
3679 <dt>IPP_FINISHINGS_STAPLE
</dt>
3680 <dd class=
"description">Staple (any location)
</dd>
3681 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_LEFT
</dt>
3682 <dd class=
"description">Staple bottom left corner
</dd>
3683 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT
</dt>
3684 <dd class=
"description">Staple bottom right corner
</dd>
3685 <dt>IPP_FINISHINGS_STAPLE_DUAL_BOTTOM
</dt>
3686 <dd class=
"description">Two staples on bottom
</dd>
3687 <dt>IPP_FINISHINGS_STAPLE_DUAL_LEFT
</dt>
3688 <dd class=
"description">Two staples on left
</dd>
3689 <dt>IPP_FINISHINGS_STAPLE_DUAL_RIGHT
</dt>
3690 <dd class=
"description">Two staples on right
</dd>
3691 <dt>IPP_FINISHINGS_STAPLE_DUAL_TOP
</dt>
3692 <dd class=
"description">Two staples on top
</dd>
3693 <dt>IPP_FINISHINGS_STAPLE_TOP_LEFT
</dt>
3694 <dd class=
"description">Staple top left corner
</dd>
3695 <dt>IPP_FINISHINGS_STAPLE_TOP_RIGHT
</dt>
3696 <dd class=
"description">Staple top right corner
</dd>
3697 <dt>IPP_FINISHINGS_TRIM
</dt>
3698 <dd class=
"description">Trim (any type)
</dd>
3700 <h3 class=
"enumeration"><a name=
"ipp_jstate_e">ipp_jstate_e
</a></h3>
3701 <p class=
"description"></p>
3702 <h4 class=
"constants">Constants
</h4>
3704 <dt>IPP_JOB_ABORTED
</dt>
3705 <dd class=
"description">Job has aborted due to error
</dd>
3706 <dt>IPP_JOB_CANCELED
</dt>
3707 <dd class=
"description">Job has been canceled
</dd>
3708 <dt>IPP_JOB_COMPLETED
</dt>
3709 <dd class=
"description">Job has completed successfully
</dd>
3710 <dt>IPP_JOB_HELD
</dt>
3711 <dd class=
"description">Job is held for printing
</dd>
3712 <dt>IPP_JOB_PENDING
</dt>
3713 <dd class=
"description">Job is waiting to be printed
</dd>
3714 <dt>IPP_JOB_PROCESSING
</dt>
3715 <dd class=
"description">Job is currently printing
</dd>
3716 <dt>IPP_JOB_STOPPED
</dt>
3717 <dd class=
"description">Job has been stopped
</dd>
3719 <h3 class=
"enumeration"><a name=
"ipp_op_e">ipp_op_e
</a></h3>
3720 <p class=
"description"></p>
3721 <h4 class=
"constants">Constants
</h4>
3723 <dt>CUPS_ACCEPT_JOBS
</dt>
3724 <dd class=
"description">Accept new jobs on a printer
</dd>
3725 <dt>CUPS_ADD_MODIFY_CLASS
</dt>
3726 <dd class=
"description">Add or modify a class
</dd>
3727 <dt>CUPS_ADD_MODIFY_PRINTER
</dt>
3728 <dd class=
"description">Add or modify a printer
</dd>
3729 <dt>CUPS_AUTHENTICATE_JOB
<span class=
"info"> CUPS
1.2 </span></dt>
3730 <dd class=
"description">Authenticate a job
</dd>
3731 <dt>CUPS_DELETE_CLASS
</dt>
3732 <dd class=
"description">Delete a class
</dd>
3733 <dt>CUPS_DELETE_PRINTER
</dt>
3734 <dd class=
"description">Delete a printer
</dd>
3735 <dt>CUPS_GET_CLASSES
<span class=
"info"> DEPRECATED
</span></dt>
3736 <dd class=
"description">Get a list of classes
</dd>
3737 <dt>CUPS_GET_DEFAULT
</dt>
3738 <dd class=
"description">Get the default printer
</dd>
3739 <dt>CUPS_GET_DEVICES
</dt>
3740 <dd class=
"description">Get a list of supported devices
</dd>
3741 <dt>CUPS_GET_DOCUMENT
<span class=
"info"> CUPS
1.4 </span></dt>
3742 <dd class=
"description">Get a document file
</dd>
3743 <dt>CUPS_GET_PPD
<span class=
"info"> CUPS
1.3 </span></dt>
3744 <dd class=
"description">Get a PPD file
</dd>
3745 <dt>CUPS_GET_PPDS
</dt>
3746 <dd class=
"description">Get a list of supported drivers
</dd>
3747 <dt>CUPS_GET_PRINTERS
</dt>
3748 <dd class=
"description">Get a list of printers and/or classes
</dd>
3749 <dt>CUPS_MOVE_JOB
</dt>
3750 <dd class=
"description">Move a job to a different printer
</dd>
3751 <dt>CUPS_REJECT_JOBS
</dt>
3752 <dd class=
"description">Reject new jobs on a printer
</dd>
3753 <dt>CUPS_SET_DEFAULT
</dt>
3754 <dd class=
"description">Set the default printer
</dd>
3755 <dt>IPP_CANCEL_JOB
</dt>
3756 <dd class=
"description">Cancel a job
</dd>
3757 <dt>IPP_CANCEL_SUBSCRIPTION
<span class=
"info"> CUPS
1.2 </span></dt>
3758 <dd class=
"description">Cancel a subscription
</dd>
3759 <dt>IPP_CREATE_JOB
</dt>
3760 <dd class=
"description">Create an empty print job
</dd>
3761 <dt>IPP_CREATE_JOB_SUBSCRIPTION
<span class=
"info"> CUPS
1.2 </span></dt>
3762 <dd class=
"description">Create a job subscription
</dd>
3763 <dt>IPP_CREATE_PRINTER_SUBSCRIPTION
<span class=
"info"> CUPS
1.2 </span></dt>
3764 <dd class=
"description">Create a printer subscription
</dd>
3765 <dt>IPP_DISABLE_PRINTER
</dt>
3766 <dd class=
"description">Stop a printer
</dd>
3767 <dt>IPP_ENABLE_PRINTER
</dt>
3768 <dd class=
"description">Start a printer
</dd>
3769 <dt>IPP_GET_JOBS
</dt>
3770 <dd class=
"description">Get a list of jobs
</dd>
3771 <dt>IPP_GET_JOB_ATTRIBUTES
</dt>
3772 <dd class=
"description">Get job attributes
</dd>
3773 <dt>IPP_GET_NOTIFICATIONS
<span class=
"info"> CUPS
1.2 </span></dt>
3774 <dd class=
"description">Get notification events
</dd>
3775 <dt>IPP_GET_PRINTER_ATTRIBUTES
</dt>
3776 <dd class=
"description">Get printer attributes
</dd>
3777 <dt>IPP_GET_PRINTER_SUPPORTED_VALUES
</dt>
3778 <dd class=
"description">Get supported attribute values
</dd>
3779 <dt>IPP_GET_SUBSCRIPTIONS
<span class=
"info"> CUPS
1.2 </span></dt>
3780 <dd class=
"description">Get list of subscriptions
</dd>
3781 <dt>IPP_GET_SUBSCRIPTION_ATTRIBUTES
<span class=
"info"> CUPS
1.2 </span></dt>
3782 <dd class=
"description">Get subscription attributes
</dd>
3783 <dt>IPP_HOLD_JOB
</dt>
3784 <dd class=
"description">Hold a job for printing
</dd>
3785 <dt>IPP_PAUSE_PRINTER
</dt>
3786 <dd class=
"description">Stop a printer
</dd>
3787 <dt>IPP_PRINT_JOB
</dt>
3788 <dd class=
"description">Print a single file
</dd>
3789 <dt>IPP_PURGE_JOBS
</dt>
3790 <dd class=
"description">Cancel all jobs
</dd>
3791 <dt>IPP_RELEASE_JOB
</dt>
3792 <dd class=
"description">Release a job for printing
</dd>
3793 <dt>IPP_RENEW_SUBSCRIPTION
<span class=
"info"> CUPS
1.2 </span></dt>
3794 <dd class=
"description">Renew a printer subscription
</dd>
3795 <dt>IPP_RESTART_JOB
</dt>
3796 <dd class=
"description">Reprint a job
</dd>
3797 <dt>IPP_RESUME_PRINTER
</dt>
3798 <dd class=
"description">Start a printer
</dd>
3799 <dt>IPP_SEND_DOCUMENT
</dt>
3800 <dd class=
"description">Add a file to a job
</dd>
3801 <dt>IPP_SET_JOB_ATTRIBUTES
</dt>
3802 <dd class=
"description">Set job attributes
</dd>
3803 <dt>IPP_VALIDATE_JOB
</dt>
3804 <dd class=
"description">Validate job options
</dd>
3806 <h3 class=
"enumeration"><a name=
"ipp_orient_e">ipp_orient_e
</a></h3>
3807 <p class=
"description"></p>
3808 <h4 class=
"constants">Constants
</h4>
3810 <dt>IPP_LANDSCAPE
</dt>
3811 <dd class=
"description">90 degrees counter-clockwise
</dd>
3812 <dt>IPP_PORTRAIT
</dt>
3813 <dd class=
"description">No rotation
</dd>
3814 <dt>IPP_REVERSE_LANDSCAPE
</dt>
3815 <dd class=
"description">90 degrees clockwise
</dd>
3816 <dt>IPP_REVERSE_PORTRAIT
</dt>
3817 <dd class=
"description">180 degrees
</dd>
3819 <h3 class=
"enumeration"><a name=
"ipp_pstate_e">ipp_pstate_e
</a></h3>
3820 <p class=
"description"></p>
3821 <h4 class=
"constants">Constants
</h4>
3823 <dt>IPP_PRINTER_IDLE
</dt>
3824 <dd class=
"description">Printer is idle
</dd>
3825 <dt>IPP_PRINTER_PROCESSING
</dt>
3826 <dd class=
"description">Printer is working
</dd>
3827 <dt>IPP_PRINTER_STOPPED
</dt>
3828 <dd class=
"description">Printer is stopped
</dd>
3830 <h3 class=
"enumeration"><a name=
"ipp_quality_e">ipp_quality_e
</a></h3>
3831 <p class=
"description"></p>
3832 <h4 class=
"constants">Constants
</h4>
3834 <dt>IPP_QUALITY_DRAFT
</dt>
3835 <dd class=
"description">Draft quality
</dd>
3836 <dt>IPP_QUALITY_HIGH
</dt>
3837 <dd class=
"description">High quality
</dd>
3838 <dt>IPP_QUALITY_NORMAL
</dt>
3839 <dd class=
"description">Normal quality
</dd>
3841 <h3 class=
"enumeration"><a name=
"ipp_res_e">ipp_res_e
</a></h3>
3842 <p class=
"description">Types and structures...
</p>
3843 <h4 class=
"constants">Constants
</h4>
3845 <dt>IPP_RES_PER_CM
</dt>
3846 <dd class=
"description">Pixels per centimeter
</dd>
3847 <dt>IPP_RES_PER_INCH
</dt>
3848 <dd class=
"description">Pixels per inch
</dd>
3850 <h3 class=
"enumeration"><a name=
"ipp_state_e">ipp_state_e
</a></h3>
3851 <p class=
"description"></p>
3852 <h4 class=
"constants">Constants
</h4>
3854 <dt>IPP_ATTRIBUTE
</dt>
3855 <dd class=
"description">One or more attributes need to be sent/received
</dd>
3857 <dd class=
"description">IPP request data needs to be sent/received
</dd>
3859 <dd class=
"description">An error occurred
</dd>
3860 <dt>IPP_HEADER
</dt>
3861 <dd class=
"description">The request header needs to be sent/received
</dd>
3863 <dd class=
"description">Nothing is happening/request completed
</dd>
3865 <h3 class=
"enumeration"><a name=
"ipp_status_e">ipp_status_e
</a></h3>
3866 <p class=
"description">IPP status codes...
</p>
3867 <h4 class=
"constants">Constants
</h4>
3869 <dt>CUPS_SEE_OTHER
</dt>
3870 <dd class=
"description">cups-see-other
</dd>
3871 <dt>IPP_ATTRIBUTES
</dt>
3872 <dd class=
"description">client-error-attributes-or-values-not-supported
</dd>
3873 <dt>IPP_ATTRIBUTES_NOT_SETTABLE
</dt>
3874 <dd class=
"description">client-error-attributes-not-settable
</dd>
3875 <dt>IPP_BAD_REQUEST
</dt>
3876 <dd class=
"description">client-error-bad-request
</dd>
3877 <dt>IPP_CHARSET
</dt>
3878 <dd class=
"description">client-error-charset-not-supported
</dd>
3879 <dt>IPP_COMPRESSION_ERROR
</dt>
3880 <dd class=
"description">client-error-compression-error
</dd>
3881 <dt>IPP_COMPRESSION_NOT_SUPPORTED
</dt>
3882 <dd class=
"description">client-error-compression-not-supported
</dd>
3883 <dt>IPP_CONFLICT
</dt>
3884 <dd class=
"description">client-error-conflicting-attributes
</dd>
3885 <dt>IPP_DEVICE_ERROR
</dt>
3886 <dd class=
"description">server-error-device-error
</dd>
3887 <dt>IPP_DOCUMENT_ACCESS_ERROR
</dt>
3888 <dd class=
"description">client-error-document-access-error
</dd>
3889 <dt>IPP_DOCUMENT_FORMAT
</dt>
3890 <dd class=
"description">client-error-document-format-not-supported
</dd>
3891 <dt>IPP_DOCUMENT_FORMAT_ERROR
</dt>
3892 <dd class=
"description">client-error-document-format-error
</dd>
3893 <dt>IPP_ERROR_JOB_CANCELED
</dt>
3894 <dd class=
"description">server-error-job-canceled
</dd>
3895 <dt>IPP_FORBIDDEN
</dt>
3896 <dd class=
"description">client-error-forbidden
</dd>
3898 <dd class=
"description">client-error-gone
</dd>
3899 <dt>IPP_IGNORED_ALL_NOTIFICATIONS
</dt>
3900 <dd class=
"description">client-error-ignored-all-notifications
</dd>
3901 <dt>IPP_IGNORED_ALL_SUBSCRIPTIONS
</dt>
3902 <dd class=
"description">client-error-ignored-all-subscriptions
</dd>
3903 <dt>IPP_INTERNAL_ERROR
</dt>
3904 <dd class=
"description">server-error-internal-error
</dd>
3905 <dt>IPP_MULTIPLE_JOBS_NOT_SUPPORTED
</dt>
3906 <dd class=
"description">server-error-multiple-document-jobs-not-supported
</dd>
3907 <dt>IPP_NOT_ACCEPTING
</dt>
3908 <dd class=
"description">server-error-not-accepting-jobs
</dd>
3909 <dt>IPP_NOT_AUTHENTICATED
</dt>
3910 <dd class=
"description">client-error-not-authenticated
</dd>
3911 <dt>IPP_NOT_AUTHORIZED
</dt>
3912 <dd class=
"description">client-error-not-authorized
</dd>
3913 <dt>IPP_NOT_FOUND
</dt>
3914 <dd class=
"description">client-error-not-found
</dd>
3915 <dt>IPP_NOT_POSSIBLE
</dt>
3916 <dd class=
"description">client-error-not-possible
</dd>
3918 <dd class=
"description">successful-ok
</dd>
3919 <dt>IPP_OK_BUT_CANCEL_SUBSCRIPTION
</dt>
3920 <dd class=
"description">successful-ok-but-cancel-subscription
</dd>
3921 <dt>IPP_OK_CONFLICT
</dt>
3922 <dd class=
"description">successful-ok-conflicting-attributes
</dd>
3923 <dt>IPP_OK_EVENTS_COMPLETE
</dt>
3924 <dd class=
"description">successful-ok-events-complete
</dd>
3925 <dt>IPP_OK_IGNORED_NOTIFICATIONS
</dt>
3926 <dd class=
"description">successful-ok-ignored-notifications
</dd>
3927 <dt>IPP_OK_IGNORED_SUBSCRIPTIONS
</dt>
3928 <dd class=
"description">successful-ok-ignored-subscriptions
</dd>
3929 <dt>IPP_OK_SUBST
</dt>
3930 <dd class=
"description">successful-ok-ignored-or-substituted-attributes
</dd>
3931 <dt>IPP_OK_TOO_MANY_EVENTS
</dt>
3932 <dd class=
"description">successful-ok-too-many-events
</dd>
3933 <dt>IPP_OPERATION_NOT_SUPPORTED
</dt>
3934 <dd class=
"description">server-error-operation-not-supported
</dd>
3935 <dt>IPP_PRINTER_BUSY
</dt>
3936 <dd class=
"description">server-error-busy
</dd>
3937 <dt>IPP_PRINTER_IS_DEACTIVATED
</dt>
3938 <dd class=
"description">server-error-printer-is-deactivated
</dd>
3939 <dt>IPP_PRINT_SUPPORT_FILE_NOT_FOUND
</dt>
3940 <dd class=
"description">client-error-print-support-file-not-found
</dd>
3941 <dt>IPP_REQUEST_ENTITY
</dt>
3942 <dd class=
"description">client-error-request-entity-too-large
</dd>
3943 <dt>IPP_REQUEST_VALUE
</dt>
3944 <dd class=
"description">client-error-request-value-too-long
</dd>
3945 <dt>IPP_SERVICE_UNAVAILABLE
</dt>
3946 <dd class=
"description">server-error-service-unavailable
</dd>
3947 <dt>IPP_TEMPORARY_ERROR
</dt>
3948 <dd class=
"description">server-error-temporary-error
</dd>
3949 <dt>IPP_TIMEOUT
</dt>
3950 <dd class=
"description">client-error-timeout
</dd>
3951 <dt>IPP_TOO_MANY_SUBSCRIPTIONS
</dt>
3952 <dd class=
"description">client-error-too-many-subscriptions
</dd>
3953 <dt>IPP_URI_SCHEME
</dt>
3954 <dd class=
"description">client-error-uri-scheme-not-supported
</dd>
3955 <dt>IPP_VERSION_NOT_SUPPORTED
</dt>
3956 <dd class=
"description">server-error-version-not-supported
</dd>
3958 <h3 class=
"enumeration"><a name=
"ipp_tag_e">ipp_tag_e
</a></h3>
3959 <p class=
"description">Format tags for attributes...
</p>
3960 <h4 class=
"constants">Constants
</h4>
3962 <dt>IPP_TAG_ADMINDEFINE
</dt>
3963 <dd class=
"description">Admin-defined value
</dd>
3964 <dt>IPP_TAG_BEGIN_COLLECTION
</dt>
3965 <dd class=
"description">Beginning of collection value
</dd>
3966 <dt>IPP_TAG_BOOLEAN
</dt>
3967 <dd class=
"description">Boolean value
</dd>
3968 <dt>IPP_TAG_CHARSET
</dt>
3969 <dd class=
"description">Character set value
</dd>
3970 <dt>IPP_TAG_COPY
</dt>
3971 <dd class=
"description">Bitflag for copied attribute values
</dd>
3972 <dt>IPP_TAG_DATE
</dt>
3973 <dd class=
"description">Date/time value
</dd>
3974 <dt>IPP_TAG_DEFAULT
</dt>
3975 <dd class=
"description">Default value
</dd>
3976 <dt>IPP_TAG_DELETEATTR
</dt>
3977 <dd class=
"description">Delete-attribute value
</dd>
3978 <dt>IPP_TAG_END
</dt>
3979 <dd class=
"description">End-of-attributes
</dd>
3980 <dt>IPP_TAG_END_COLLECTION
</dt>
3981 <dd class=
"description">End of collection value
</dd>
3982 <dt>IPP_TAG_ENUM
</dt>
3983 <dd class=
"description">Enumeration value
</dd>
3984 <dt>IPP_TAG_EVENT_NOTIFICATION
</dt>
3985 <dd class=
"description">Event group
</dd>
3986 <dt>IPP_TAG_INTEGER
</dt>
3987 <dd class=
"description">Integer value
</dd>
3988 <dt>IPP_TAG_JOB
</dt>
3989 <dd class=
"description">Job group
</dd>
3990 <dt>IPP_TAG_KEYWORD
</dt>
3991 <dd class=
"description">Keyword value
</dd>
3992 <dt>IPP_TAG_LANGUAGE
</dt>
3993 <dd class=
"description">Language value
</dd>
3994 <dt>IPP_TAG_MASK
</dt>
3995 <dd class=
"description">Mask for copied attribute values
</dd>
3996 <dt>IPP_TAG_MEMBERNAME
</dt>
3997 <dd class=
"description">Collection member name value
</dd>
3998 <dt>IPP_TAG_MIMETYPE
</dt>
3999 <dd class=
"description">MIME media type value
</dd>
4000 <dt>IPP_TAG_NAME
</dt>
4001 <dd class=
"description">Name value
</dd>
4002 <dt>IPP_TAG_NAMELANG
</dt>
4003 <dd class=
"description">Name-with-language value
</dd>
4004 <dt>IPP_TAG_NOTSETTABLE
</dt>
4005 <dd class=
"description">Not-settable value
</dd>
4006 <dt>IPP_TAG_NOVALUE
</dt>
4007 <dd class=
"description">No-value value
</dd>
4008 <dt>IPP_TAG_OPERATION
</dt>
4009 <dd class=
"description">Operation group
</dd>
4010 <dt>IPP_TAG_PRINTER
</dt>
4011 <dd class=
"description">Printer group
</dd>
4012 <dt>IPP_TAG_RANGE
</dt>
4013 <dd class=
"description">Range value
</dd>
4014 <dt>IPP_TAG_RESOLUTION
</dt>
4015 <dd class=
"description">Resolution value
</dd>
4016 <dt>IPP_TAG_STRING
</dt>
4017 <dd class=
"description">Octet string value
</dd>
4018 <dt>IPP_TAG_SUBSCRIPTION
</dt>
4019 <dd class=
"description">Subscription group
</dd>
4020 <dt>IPP_TAG_TEXT
</dt>
4021 <dd class=
"description">Text value
</dd>
4022 <dt>IPP_TAG_TEXTLANG
</dt>
4023 <dd class=
"description">Text-with-language value
</dd>
4024 <dt>IPP_TAG_UNKNOWN
</dt>
4025 <dd class=
"description">Unknown value
</dd>
4026 <dt>IPP_TAG_UNSUPPORTED_GROUP
</dt>
4027 <dd class=
"description">Unsupported attributes group
</dd>
4028 <dt>IPP_TAG_UNSUPPORTED_VALUE
</dt>
4029 <dd class=
"description">Unsupported value
</dd>
4030 <dt>IPP_TAG_URI
</dt>
4031 <dd class=
"description">URI value
</dd>
4032 <dt>IPP_TAG_URISCHEME
</dt>
4033 <dd class=
"description">URI scheme value
</dd>
4034 <dt>IPP_TAG_ZERO
</dt>
4035 <dd class=
"description">Zero tag - used for separators
</dd>