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_t" title=
"HTTP connection type">http_t
</a></li>
440 <li><a href=
"#ipp_attribute_t" title=
"Attribute">ipp_attribute_t
</a></li>
441 <li><a href=
"#ipp_iocb_t" title=
"IPP IO Callback Function ">ipp_iocb_t
</a></li>
442 <li><a href=
"#ipp_request_t" title=
"Request Header">ipp_request_t
</a></li>
443 <li><a href=
"#ipp_t" title=
"Attribute Value">ipp_t
</a></li>
444 <li><a href=
"#ipp_uchar_t" title=
"IPP status codes...">ipp_uchar_t
</a></li>
445 <li><a href=
"#ipp_value_t" title=
"New in CUPS 1.1.19">ipp_value_t
</a></li>
447 <li><a href=
"#STRUCTURES">Structures
</a><ul class=
"code">
448 <li><a href=
"#http_addrlist_s" title=
"Socket address list, which is
449 used to enumerate all of the
450 addresses that are associated
451 with a hostname. ">http_addrlist_s
</a></li>
452 <li><a href=
"#ipp_attribute_s" title=
"Attribute">ipp_attribute_s
</a></li>
453 <li><a href=
"#ipp_s" title=
"IPP Request/Response/Notification">ipp_s
</a></li>
455 <li><a href=
"#UNIONS">Unions
</a><ul class=
"code">
456 <li><a href=
"#ipp_request_u" title=
"Request Header">ipp_request_u
</a></li>
457 <li><a href=
"#ipp_value_u" title=
"New in CUPS 1.1.19">ipp_value_u
</a></li>
459 <li><a href=
"#ENUMERATIONS">Constants
</a><ul class=
"code">
460 <li><a href=
"#http_auth_e" title=
"HTTP authentication types">http_auth_e
</a></li>
461 <li><a href=
"#http_encoding_e" title=
"HTTP transfer encoding values">http_encoding_e
</a></li>
462 <li><a href=
"#http_encryption_e" title=
"HTTP encryption values">http_encryption_e
</a></li>
463 <li><a href=
"#http_field_e" title=
"HTTP field names">http_field_e
</a></li>
464 <li><a href=
"#http_keepalive_e" title=
"Types and structures...">http_keepalive_e
</a></li>
465 <li><a href=
"#http_state_e" title=
"">http_state_e
</a></li>
466 <li><a href=
"#http_status_e" title=
"HTTP status codes">http_status_e
</a></li>
467 <li><a href=
"#http_uri_coding_e" title=
"">http_uri_coding_e
</a></li>
468 <li><a href=
"#http_uri_status_e" title=
"">http_uri_status_e
</a></li>
469 <li><a href=
"#http_version_e" title=
"">http_version_e
</a></li>
470 <li><a href=
"#ipp_finish_e" title=
"">ipp_finish_e
</a></li>
471 <li><a href=
"#ipp_jstate_e" title=
"">ipp_jstate_e
</a></li>
472 <li><a href=
"#ipp_op_e" title=
"">ipp_op_e
</a></li>
473 <li><a href=
"#ipp_orient_e" title=
"">ipp_orient_e
</a></li>
474 <li><a href=
"#ipp_pstate_e" title=
"">ipp_pstate_e
</a></li>
475 <li><a href=
"#ipp_quality_e" title=
"">ipp_quality_e
</a></li>
476 <li><a href=
"#ipp_res_e" title=
"Types and structures...">ipp_res_e
</a></li>
477 <li><a href=
"#ipp_state_e" title=
"">ipp_state_e
</a></li>
478 <li><a href=
"#ipp_status_e" title=
"IPP status codes...">ipp_status_e
</a></li>
479 <li><a href=
"#ipp_tag_e" title=
"Format tags for attributes...">ipp_tag_e
</a></li>
483 "$Id: api-httpipp.shtml 7258 2008-01-28 00:15:05Z mike $"
485 HTTP and IPP API introduction for the Common UNIX Printing System (CUPS).
487 Copyright 2007-2008 by Apple Inc.
488 Copyright 1997-2006 by Easy Software Products, all rights reserved.
490 These coded instructions, statements, and computer programs are the
491 property of Apple Inc. and are protected by Federal copyright
492 law. Distribution and use rights are outlined in the file "LICENSE.txt"
493 which should have been included with this file. If this file is
494 file is missing or damaged, see the license at "http://www.cups.org/".
497 <h2 class='title'
><a name='OVERVIEW'
>Overview
</a></h2>
499 <p>The CUPS HTTP and IPP APIs provide low-level access to the HTTP and IPP
500 protocols and CUPS scheduler. They are typically used by monitoring and
501 administration programs to perform specific functions not supported by the
502 high-level CUPS API functions.
</p>
504 <p>The HTTP APIs use an opaque structure called
505 <a href='#http_t'
><code>http_t
</code></a> to manage connections to
506 a particular HTTP or IPP server. The
507 <a href='#httpConnectEncrypt'
><code>httpConnectEncrypt
</code></a> function is
508 used to create an instance of this structure for a particular server.
509 The constant
<code>CUPS_HTTP_DEFAULT
</code> can be used with all of the
510 <code>cups
</code> functions to refer to the default CUPS server - the functions
511 create a per-thread
<a href='#http_t'
><code>http_t
</code></a> as needed.
</p>
513 <p>The IPP APIs use two structures for requests (messages sent to the CUPS
514 scheduler) and responses (messages sent back to your application from the
515 scheduler). The
<a href='#ipp_t'
><code>ipp_t
</code></a> structure holds a
516 complete request or response and is allocated using the
517 <a href='#ippNew'
><code>ippNew
</code></a> or
518 <a href='#ippNewRequest'
><code>ippNewRequest
</code></a> functions and
519 freed using the
<a href='#ippDelete'
><code>ippDelete
</code></a> function.
</p>
521 <p>The second structure is called
522 <a href='#ipp_attribute_t'
><code>ipp_attribute_t
</code></a> and holds a
523 single IPP attribute which consists of a group tag (
<code>group_tag
</code>), a
524 value type tag (
<code>value_tag
</code>), the attribute name (
<code>name
</code>),
525 and
1 or more values (
<code>values[]
</code>). Attributes are added to an
526 <a href='#ipp_t'
><code>ipp_t
</code></a> structure using one of the
527 <code>ippAdd
</code> functions. For example, use
528 <a href='#ippAddString'
><code>ippAddString
</code></a> to add a
529 "requesting-user-name" string attribute to a request:
</p>
531 <pre class='example'
>
532 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_GET_JOBS);
534 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
538 <p>Once you have created an IPP request, use the
<code>cups
</code>
539 functions to send the request to and read the response from the server.
540 For example, the
<a href='#cupsDoRequest'
><code>cupsDoRequest
</code></a>
541 function can be used for simple query operations that do not involve files:
</p>
543 <pre class='example'
>
544 #include
<cups/cups.h
>
547 <a href='#ipp_t'
>ipp_t
</a> *
<a name='get_jobs'
>get_jobs
</a>(void)
549 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_GET_JOBS);
551 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
554 return (
<a href='#cupsDoRequest'
>cupsDoRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/"));
558 <p>The
<a href='#cupsDoRequest'
><code>cupsDoRequest
</code></a> function frees
559 the request structure and returns an IPP response structure or NULL pointer if
560 the request could not be sent to the server. Once you have a response from
561 the server, you can either use the
562 <a href='#ippFindAttribute'
><code>ippFindAttribute
</code></a> and
563 <a href='#ippFindNextAttribute'
><code>ippFindNextAttribute
</code></a> functions
564 to find specific attributes, for example:
</p>
566 <pre class='example'
>
567 <a href='#ipp_t'
>ipp_t
</a> *response;
568 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
570 attr =
<a href='#ippFindAttribute'
>ippFindAttribute
</a>(response,
"printer-state", IPP_TAG_ENUM);
573 <p>You can also walk the list of attributes with a simple
<code>for
</code> loop
576 <pre class='example'
>
577 <a href='#ipp_t'
>ipp_t
</a> *response;
578 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
580 for (attr = response-
>attrs; attr != NULL; attr = attr-
>next)
581 if (attr-
>name == NULL)
582 puts(
"--SEPARATOR--");
587 <p>The
<code>for
</code> loop approach is normally used when collecting
588 attributes for multiple objects (jobs, printers, etc.) in a response. Attributes
589 with
<code>NULL
</code> names indicate a separator between the attributes of
590 each object. For example, the following code will list the jobs returned from
591 our previous
<a href='#get_jobs'
><code>get_jobs
</code></a> example code:
</p>
593 <pre class='example'
>
594 <a href='#ipp_t'
>ipp_t
</a> *response =
<a href='#get_jobs'
>get_jobs
</a>();
596 if (response != NULL)
598 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *attr;
600 char *job_name = NULL;
601 char *job_originating_user_name = NULL;
603 puts(
"Job ID Owner Title");
604 puts(
"------ ---------------- ---------------------------------");
606 for (attr = response-
>attrs; attr != NULL; attr = attr-
>next)
608 /* Attributes without names are separators between jobs */
609 if (attr-
>name == NULL)
611 if (job_id
> 0 && job_name != NULL
&& job_originating_user_name != NULL)
612 printf(
"%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
616 job_originating_user_name = NULL;
619 else if (!strcmp(attr-
>name,
"job-id")
&& attr-
>value_tag == IPP_TAG_INTEGER)
620 job_id = attr-
>values[
0].integer;
621 else if (!strcmp(attr-
>name,
"job-name")
&& attr-
>value_tag == IPP_TAG_NAME)
622 job_name = attr-
>values[
0].string.text;
623 else if (!strcmp(attr-
>name,
"job-originating-user-name")
&&
624 attr-
>value_tag == IPP_TAG_NAME)
625 job_originating_user_name = attr-
>values[
0].string.text;
628 if (job_id
> 0 && job_name != NULL
&& job_originating_user_name != NULL)
629 printf(
"%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
633 <h3><a name='CREATING_URI_STRINGS'
>Creating URI Strings
</a></h3>
635 <p>To ensure proper encoding, the
636 <a href='#httpAssembleURIf'
><code>httpAssembleURIf
</code></a> function must be
637 used to format a
"printer-uri" string for all printer-based requests:
</p>
639 <pre class='example'
>
640 const char *name =
"Foo";
642 <a href='#ipp_t'
>ipp_t
</a> *request;
644 <a href='#httpAssembleURIf'
>httpAssembleURIf
</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri),
"ipp", NULL, cupsServer(),
645 ippPort(),
"/printers/%s", name);
646 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
649 <h3><a name='SENDING_REQUESTS_WITH_FILES'
>Sending Requests with Files
</a></h3>
651 <p>The
<a href='#cupsDoFileRequest'
><code>cupsDoFileRequest
</code></a> and
652 <a href='#cupsDoIORequest'
><code>cupsDoIORequest
</code></a> functions are
653 used for requests involving files. The
654 <a href='#cupsDoFileRequest'
><code>cupsDoFileRequest
</code></a> function
655 attaches the named file to a request and is typically used when sending a print
656 file or changing a printer's PPD file:
</p>
658 <pre class='example'
>
659 const char *filename =
"/usr/share/cups/data/testprint.ps";
660 const char *name =
"Foo";
663 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(IPP_PRINT_JOB);
664 <a href='#ipp_t'
>ipp_t
</a> *response;
666 /* Use httpAssembleURIf for the printer-uri string */
667 <a href='#httpAssembleURIf'
>httpAssembleURIf
</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri),
"ipp", NULL, cupsServer(),
668 ippPort(),
"/printers/%s", name);
669 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
670 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name",
672 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"job-name",
673 NULL,
"testprint.ps");
675 /* Use snprintf for the resource path */
676 snprintf(resource, sizeof(resource),
"/printers/%s", name);
678 response =
<a href='#cupsDoFileRequest'
>cupsDoFileRequest
</a>(CUPS_HTTP_DEFAULT, request, resource, filename);
681 <p>The
<a href='#cupsDoIORequest'
><code>cupsDoIORequest
</code></a> function
682 optionally attaches a file to the request and optionally saves a file in the
683 response from the server. It is used when using a pipe for the request
684 attachment or when using a request that returns a file, currently only
685 <code>CUPS_GET_DOCUMENT
</code> and
<code>CUPS_GET_PPD
</code>. For example,
686 the following code will download the PPD file for the sample HP LaserJet
689 <pre class='example'
>
692 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
693 <a href='#ipp_t'
>ipp_t
</a> *response;
695 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
696 NULL,
"laserjet.ppd");
698 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
700 response =
<a href='#cupsDoIORequest'
>cupsDoIORequest
</a>(CUPS_HTTP_DEFAULT, request,
"/", -
1, tempfd);
703 <p>The example passes
<code>-
1</code> for the input file descriptor to specify
704 that no file is to be attached to the request. The PPD file attached to the
705 response is written to the temporary file descriptor we created using the
706 <code>cupsTempFd
</code> function.
</p>
708 <h3><a name='ASYNCHRONOUS_REQUEST_PROCESSING'
>Asynchronous Request Processing
</a></h3>
710 <p>The
<a href='#cupsSendRequest'
><code>cupsSendRequest
</code></a> and
711 <a href='#cupsGetResponse'
><code>cupsGetResponse
</code></a> support
712 asynchronous communications with the server. Unlike the other request
713 functions, the IPP request is not automatically freed, so remember to
714 free your request with the
<a href='#ippDelete'
><code>ippDelete
</code></a>
717 <p>File data is attached to the request using the
718 <a href='#cupsWriteRequestData'
><code>cupsWriteRequestData
</code></a>
719 function, while file data returned from the server is read using the
720 <a href='#cupsReadResponseData'
><code>cupsReadResponseData
</code></a>
721 function. We can rewrite the previous
<code>CUPS_GET_PPD
</code> example
722 to use the asynchronous functions quite easily:
</p>
724 <pre class='example'
>
727 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
728 <a href='#ipp_t'
>ipp_t
</a> *response;
730 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
731 NULL,
"laserjet.ppd");
733 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
735 if (
<a href='#cupsSendRequest'
>cupsSendRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/") == HTTP_CONTINUE)
737 response =
<a href='#cupsGetResponse'
>cupsGetResponse
</a>(CUPS_HTTP_DEFAULT,
"/");
739 if (response != NULL)
744 while ((bytes =
<a href='#cupsReadResponseData'
>cupsReadResponseData
</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer)))
> 0)
745 write(tempfd, buffer, bytes);
749 /* Free the request! */
750 <a href='#ippDelete'
>ippDelete
</a>(request);
753 <p>The
<a href='#cupsSendRequest'
><code>cupsSendRequest
</code></a> function
754 returns the initial HTTP request status, typically either
755 <code>HTTP_CONTINUE
</code> or
<code>HTTP_UNAUTHORIZED
</code>. The latter status
756 is returned when the request requires authentication of some sort. The
757 <a href='#cupsDoAuthentication'
><code>cupsDoAuthentication
</code></a> function
758 must be called when your see
<code>HTTP_UNAUTHORIZED
</code> and the request
759 re-sent. We can add authentication support to our example code by using a
760 <code>do ... while
</code> loop:
</p>
762 <pre class='example'
>
765 <a href='#ipp_t'
>ipp_t
</a> *request =
<a href='#ippNewRequest'
>ippNewRequest
</a>(CUPS_GET_PPD);
766 <a href='#ipp_t'
>ipp_t
</a> *response;
767 http_status_t status;
769 <a href='#ippAddString'
>ippAddString
</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"ppd-name",
770 NULL,
"laserjet.ppd");
772 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
774 /* Loop for authentication */
777 status = a href='#cupsSendRequest'
>cupsSendRequest
</a>(CUPS_HTTP_DEFAULT, request,
"/");
779 if (status == HTTP_UNAUTHORIZED)
781 /* Try to authenticate, break out of the loop if that fails */
782 if (
<a href='#cupsDoAuthentication'
>cupsDoAuthentication
</a>(CUPS_HTTP_DEFAULT,
"POST",
"/"))
786 while (status != HTTP_CONTINUE
&& status != HTTP_UNAUTHORIZED);
788 if (status == HTTP_CONTINUE)
790 response =
<a href='#cupsGetResponse'
>cupsGetResponse
</a>(CUPS_HTTP_DEFAULT,
"/");
792 if (response != NULL)
797 while ((bytes =
<a href='#cupsReadResponseData'
>cupsReadResponseData
</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer)))
> 0)
798 write(tempfd, buffer, bytes);
802 /* Free the request! */
803 <a href='#ippDelete'
>ippDelete
</a>(request);
805 <h2 class=
"title"><a name=
"FUNCTIONS">Functions
</a></h2>
806 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20 </span><a name=
"cupsDoAuthentication">cupsDoAuthentication
</a></h3>
807 <p class=
"description">Authenticate a request.
</p>
809 int cupsDoAuthentication (
<br>
810 <a href=
"#http_t">http_t
</a> *http,
<br>
811 const char *method,
<br>
812 const char *resource
<br>
814 <h4 class=
"parameters">Parameters
</h4>
817 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
819 <dd class=
"description">Request method (
"GET
",
"POST
",
"PUT
")
</dd>
821 <dd class=
"description">Resource path
</dd>
823 <h4 class=
"returnvalue">Return Value
</h4>
824 <p class=
"description">0 on success, -
1 on error
</p>
825 <h4 class=
"discussion">Discussion
</h4>
826 <p class=
"discussion">This function should be called in response to a
<code>HTTP_UNAUTHORIZED
</code>
827 status, prior to resubmitting your request.
830 <h3 class=
"function"><a name=
"cupsDoFileRequest">cupsDoFileRequest
</a></h3>
831 <p class=
"description">Do an IPP request with a file.
</p>
833 <a href=
"#ipp_t">ipp_t
</a> *cupsDoFileRequest (
<br>
834 <a href=
"#http_t">http_t
</a> *http,
<br>
835 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
836 const char *resource,
<br>
837 const char *filename
<br>
839 <h4 class=
"parameters">Parameters
</h4>
842 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
844 <dd class=
"description">IPP request
</dd>
846 <dd class=
"description">HTTP resource for POST
</dd>
848 <dd class=
"description">File to send or
<code>NULL
</code> for none
</dd>
850 <h4 class=
"returnvalue">Return Value
</h4>
851 <p class=
"description">Response data
</p>
852 <h4 class=
"discussion">Discussion
</h4>
853 <p class=
"discussion">This function sends the IPP request to the specified server, retrying
854 and authenticating as necessary. The request is freed with
<a href=
"#ippDelete"><code>ippDelete
</code></a>
855 after receiving a valid IPP response.
</p>
856 <h3 class=
"function"><span class=
"info"> CUPS
1.3 </span><a name=
"cupsDoIORequest">cupsDoIORequest
</a></h3>
857 <p class=
"description">Do an IPP request with file descriptors.
</p>
859 <a href=
"#ipp_t">ipp_t
</a> *cupsDoIORequest (
<br>
860 <a href=
"#http_t">http_t
</a> *http,
<br>
861 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
862 const char *resource,
<br>
863 int infile,
<br>
864 int outfile
<br>
866 <h4 class=
"parameters">Parameters
</h4>
869 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
871 <dd class=
"description">IPP request
</dd>
873 <dd class=
"description">HTTP resource for POST
</dd>
875 <dd class=
"description">File to read from or -
1 for none
</dd>
877 <dd class=
"description">File to write to or -
1 for none
</dd>
879 <h4 class=
"returnvalue">Return Value
</h4>
880 <p class=
"description">Response data
</p>
881 <h4 class=
"discussion">Discussion
</h4>
882 <p class=
"discussion">This function sends the IPP request to the specified server, retrying
883 and authenticating as necessary. The request is freed with ippDelete()
884 after receiving a valid IPP response.
<br>
886 If
"infile
" is a valid file descriptor, cupsDoIORequest() copies
887 all of the data from the file after the IPP request message.
<br>
889 If
"outfile
" is a valid file descriptor, cupsDoIORequest() copies
890 all of the data after the IPP response message to the file.
893 <h3 class=
"function"><a name=
"cupsDoRequest">cupsDoRequest
</a></h3>
894 <p class=
"description">Do an IPP request.
</p>
896 <a href=
"#ipp_t">ipp_t
</a> *cupsDoRequest (
<br>
897 <a href=
"#http_t">http_t
</a> *http,
<br>
898 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
899 const char *resource
<br>
901 <h4 class=
"parameters">Parameters
</h4>
904 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
906 <dd class=
"description">IPP request
</dd>
908 <dd class=
"description">HTTP resource for POST
</dd>
910 <h4 class=
"returnvalue">Return Value
</h4>
911 <p class=
"description">Response data
</p>
912 <h4 class=
"discussion">Discussion
</h4>
913 <p class=
"discussion">This function sends the IPP request to the specified server, retrying
914 and authenticating as necessary. The request is freed with ippDelete()
915 after receiving a valid IPP response.
</p>
916 <h3 class=
"function"><a name=
"cupsEncodeOptions">cupsEncodeOptions
</a></h3>
917 <p class=
"description">Encode printer options into IPP attributes.
</p>
919 void cupsEncodeOptions (
<br>
920 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
921 int num_options,
<br>
922 cups_option_t *options
<br>
924 <h4 class=
"parameters">Parameters
</h4>
927 <dd class=
"description">Request to add to
</dd>
929 <dd class=
"description">Number of options
</dd>
931 <dd class=
"description">Options
</dd>
933 <h4 class=
"discussion">Discussion
</h4>
934 <p class=
"discussion">This function adds operation, job, and then subscription attributes,
935 in that order. Use the cupsEncodeOptions2() function to add attributes
936 for a single group.
</p>
937 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"cupsEncodeOptions2">cupsEncodeOptions2
</a></h3>
938 <p class=
"description">Encode printer options into IPP attributes for a group.
</p>
940 void cupsEncodeOptions2 (
<br>
941 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
942 int num_options,
<br>
943 cups_option_t *options,
<br>
944 ipp_tag_t group_tag
<br>
946 <h4 class=
"parameters">Parameters
</h4>
949 <dd class=
"description">Request to add to
</dd>
951 <dd class=
"description">Number of options
</dd>
953 <dd class=
"description">Options
</dd>
955 <dd class=
"description">Group to encode
</dd>
957 <h4 class=
"discussion">Discussion
</h4>
958 <p class=
"discussion">This function only adds attributes for a single group. Call this
959 function multiple times for each group, or use cupsEncodeOptions()
960 to add the standard groups.
963 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"cupsGetDevices">cupsGetDevices
</a></h3>
964 <p class=
"description">Get available printer devices.
</p>
966 ipp_status_t cupsGetDevices (
<br>
967 <a href=
"#http_t">http_t
</a> *http,
<br>
968 int timeout,
<br>
969 const char *exclude_schemes,
<br>
970 cups_device_cb_t callback,
<br>
971 void *user_data
<br>
973 <h4 class=
"parameters">Parameters
</h4>
976 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
978 <dd class=
"description">Timeout in seconds or
<code>CUPS_TIMEOUT_DEFAULT
</code></dd>
979 <dt>exclude_schemes
</dt>
980 <dd class=
"description">Comma-separated URI schemes to exclude or
<code>CUPS_EXCLUDE_NONE
</code></dd>
982 <dd class=
"description">Callback function
</dd>
984 <dd class=
"description">User data pointer
</dd>
986 <h4 class=
"returnvalue">Return Value
</h4>
987 <p class=
"description">Request status -
<code>IPP_OK
</code> on success.
</p>
988 <h4 class=
"discussion">Discussion
</h4>
989 <p class=
"discussion">This function sends a CUPS-Get-Devices request and streams the discovered
990 devices to the specified callback function. The
"timeout
" parameter controls
991 how long the request lasts, while the
"exclude_schemes
" parameter provides
992 a comma-delimited list of backends to omit from the request.
995 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20 </span><a name=
"cupsGetFd">cupsGetFd
</a></h3>
996 <p class=
"description">Get a file from the server.
</p>
998 http_status_t cupsGetFd (
<br>
999 <a href=
"#http_t">http_t
</a> *http,
<br>
1000 const char *resource,
<br>
1001 int fd
<br>
1003 <h4 class=
"parameters">Parameters
</h4>
1006 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1008 <dd class=
"description">Resource name
</dd>
1010 <dd class=
"description">File descriptor
</dd>
1012 <h4 class=
"returnvalue">Return Value
</h4>
1013 <p class=
"description">HTTP status
</p>
1014 <h4 class=
"discussion">Discussion
</h4>
1015 <p class=
"discussion">This function returns
<code>HTTP_OK
</code> when the file is successfully retrieved.
1018 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20 </span><a name=
"cupsGetFile">cupsGetFile
</a></h3>
1019 <p class=
"description">Get a file from the server.
</p>
1021 http_status_t cupsGetFile (
<br>
1022 <a href=
"#http_t">http_t
</a> *http,
<br>
1023 const char *resource,
<br>
1024 const char *filename
<br>
1026 <h4 class=
"parameters">Parameters
</h4>
1029 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1031 <dd class=
"description">Resource name
</dd>
1033 <dd class=
"description">Filename
</dd>
1035 <h4 class=
"returnvalue">Return Value
</h4>
1036 <p class=
"description">HTTP status
</p>
1037 <h4 class=
"discussion">Discussion
</h4>
1038 <p class=
"discussion">This function returns
<code>HTTP_OK
</code> when the file is successfully retrieved.
1041 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"cupsGetResponse">cupsGetResponse
</a></h3>
1042 <p class=
"description">Get a response to an IPP request.
</p>
1044 <a href=
"#ipp_t">ipp_t
</a> *cupsGetResponse (
<br>
1045 <a href=
"#http_t">http_t
</a> *http,
<br>
1046 const char *resource
<br>
1048 <h4 class=
"parameters">Parameters
</h4>
1051 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1053 <dd class=
"description">HTTP resource for POST
</dd>
1055 <h4 class=
"returnvalue">Return Value
</h4>
1056 <p class=
"description">Response or
<code>NULL
</code> on HTTP error
</p>
1057 <h4 class=
"discussion">Discussion
</h4>
1058 <p class=
"discussion">Use this function to get the response for an IPP request sent using
1059 cupsSendDocument() or cupsSendRequest(). For requests that return
1060 additional data, use httpRead() after getting a successful response.
1063 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20 </span><a name=
"cupsPutFd">cupsPutFd
</a></h3>
1064 <p class=
"description">Put a file on the server.
</p>
1066 http_status_t cupsPutFd (
<br>
1067 <a href=
"#http_t">http_t
</a> *http,
<br>
1068 const char *resource,
<br>
1069 int fd
<br>
1071 <h4 class=
"parameters">Parameters
</h4>
1074 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1076 <dd class=
"description">Resource name
</dd>
1078 <dd class=
"description">File descriptor
</dd>
1080 <h4 class=
"returnvalue">Return Value
</h4>
1081 <p class=
"description">HTTP status
</p>
1082 <h4 class=
"discussion">Discussion
</h4>
1083 <p class=
"discussion">This function returns
<code>HTTP_CREATED
</code> when the file is stored
1087 <h3 class=
"function"><span class=
"info"> CUPS
1.1.20 </span><a name=
"cupsPutFile">cupsPutFile
</a></h3>
1088 <p class=
"description">Put a file on the server.
</p>
1090 http_status_t cupsPutFile (
<br>
1091 <a href=
"#http_t">http_t
</a> *http,
<br>
1092 const char *resource,
<br>
1093 const char *filename
<br>
1095 <h4 class=
"parameters">Parameters
</h4>
1098 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1100 <dd class=
"description">Resource name
</dd>
1102 <dd class=
"description">Filename
</dd>
1104 <h4 class=
"returnvalue">Return Value
</h4>
1105 <p class=
"description">HTTP status
</p>
1106 <h4 class=
"discussion">Discussion
</h4>
1107 <p class=
"discussion">This function returns
<code>HTTP_CREATED
</code> when the file is stored
1111 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"cupsReadResponseData">cupsReadResponseData
</a></h3>
1112 <p class=
"description">Read additional data after the IPP response.
</p>
1114 ssize_t cupsReadResponseData (
<br>
1115 <a href=
"#http_t">http_t
</a> *http,
<br>
1116 char *buffer,
<br>
1117 size_t length
<br>
1119 <h4 class=
"parameters">Parameters
</h4>
1122 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1124 <dd class=
"description">Buffer to use
</dd>
1126 <dd class=
"description">Number of bytes to read
</dd>
1128 <h4 class=
"returnvalue">Return Value
</h4>
1129 <p class=
"description">Bytes read,
0 on EOF, -
1 on error
</p>
1130 <h4 class=
"discussion">Discussion
</h4>
1131 <p class=
"discussion">This function is used after cupsGetResponse() to read the PPD or document
1132 files for CUPS_GET_PPD and CUPS_GET_DOCUMENT requests, respectively.
1135 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"cupsSendRequest">cupsSendRequest
</a></h3>
1136 <p class=
"description">Send an IPP request.
</p>
1138 http_status_t cupsSendRequest (
<br>
1139 <a href=
"#http_t">http_t
</a> *http,
<br>
1140 <a href=
"#ipp_t">ipp_t
</a> *request,
<br>
1141 const char *resource,
<br>
1142 size_t length
<br>
1144 <h4 class=
"parameters">Parameters
</h4>
1147 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1149 <dd class=
"description">IPP request
</dd>
1151 <dd class=
"description">Resource path
</dd>
1153 <dd class=
"description">Length of data to follow or
<code>CUPS_LENGTH_VARIABLE
</code></dd>
1155 <h4 class=
"returnvalue">Return Value
</h4>
1156 <p class=
"description">Initial HTTP status
</p>
1157 <h4 class=
"discussion">Discussion
</h4>
1158 <p class=
"discussion">Use httpWrite() to write any additional data (document, PPD file, etc.)
1159 for the request, cupsGetResponse() to get the IPP response, and httpRead()
1160 to read any additional data following the response. Only one request can be
1161 sent/queued at a time.
<br>
1163 Unlike cupsDoFileRequest(), cupsDoIORequest(), and cupsDoRequest(), the
1164 request is not freed.
1167 <h3 class=
"function"><span class=
"info"> CUPS
1.4 </span><a name=
"cupsWriteRequestData">cupsWriteRequestData
</a></h3>
1168 <p class=
"description">Write additional data after an IPP request.
</p>
1170 http_status_t cupsWriteRequestData (
<br>
1171 <a href=
"#http_t">http_t
</a> *http,
<br>
1172 const char *buffer,
<br>
1173 size_t length
<br>
1175 <h4 class=
"parameters">Parameters
</h4>
1178 <dd class=
"description">Connection to server or
<code>CUPS_HTTP_DEFAULT
</code></dd>
1180 <dd class=
"description">Bytes to write
</dd>
1182 <dd class=
"description">Number of bytes to write
</dd>
1184 <h4 class=
"returnvalue">Return Value
</h4>
1185 <p class=
"description"><code>HTTP_CONTINUE
</code> if OK or HTTP status on error
</p>
1186 <h4 class=
"discussion">Discussion
</h4>
1187 <p class=
"discussion">This function is used after
<a href=
"#cupsSendRequest"><code>cupsSendRequest
</code></a> to provide a PPD and
1188 after
<a href=
"#cupsStartDocument"><code>cupsStartDocument
</code></a> to provide a document file.
1191 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpAddrAny">httpAddrAny
</a></h3>
1192 <p class=
"description">Check for the
"any
" address.
</p>
1194 int httpAddrAny (
<br>
1195 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1197 <h4 class=
"parameters">Parameters
</h4>
1200 <dd class=
"description">Address to check
</dd>
1202 <h4 class=
"returnvalue">Return Value
</h4>
1203 <p class=
"description">1 if
"any
",
0 otherwise
</p>
1204 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpAddrEqual">httpAddrEqual
</a></h3>
1205 <p class=
"description">Compare two addresses.
</p>
1207 int httpAddrEqual (
<br>
1208 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr1,
<br>
1209 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr2
<br>
1211 <h4 class=
"parameters">Parameters
</h4>
1214 <dd class=
"description">First address
</dd>
1216 <dd class=
"description">Second address
</dd>
1218 <h4 class=
"returnvalue">Return Value
</h4>
1219 <p class=
"description">1 if equal,
0 if not
</p>
1220 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpAddrLength">httpAddrLength
</a></h3>
1221 <p class=
"description">Return the length of the address in bytes.
</p>
1223 int httpAddrLength (
<br>
1224 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1226 <h4 class=
"parameters">Parameters
</h4>
1229 <dd class=
"description">Address
</dd>
1231 <h4 class=
"returnvalue">Return Value
</h4>
1232 <p class=
"description">Length in bytes
</p>
1233 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpAddrLocalhost">httpAddrLocalhost
</a></h3>
1234 <p class=
"description">Check for the local loopback address.
</p>
1236 int httpAddrLocalhost (
<br>
1237 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr
<br>
1239 <h4 class=
"parameters">Parameters
</h4>
1242 <dd class=
"description">Address to check
</dd>
1244 <h4 class=
"returnvalue">Return Value
</h4>
1245 <p class=
"description">1 if local host,
0 otherwise
</p>
1246 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpAddrLookup">httpAddrLookup
</a></h3>
1247 <p class=
"description">Lookup the hostname associated with the address.
</p>
1249 char *httpAddrLookup (
<br>
1250 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
1251 char *name,
<br>
1252 int namelen
<br>
1254 <h4 class=
"parameters">Parameters
</h4>
1257 <dd class=
"description">Address to lookup
</dd>
1259 <dd class=
"description">Host name buffer
</dd>
1261 <dd class=
"description">Size of name buffer
</dd>
1263 <h4 class=
"returnvalue">Return Value
</h4>
1264 <p class=
"description">Host name
</p>
1265 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpAddrString">httpAddrString
</a></h3>
1266 <p class=
"description">Convert an address to a numeric string.
</p>
1268 char *httpAddrString (
<br>
1269 const
<a href=
"#http_addr_t">http_addr_t
</a> *addr,
<br>
1270 char *s,
<br>
1271 int slen
<br>
1273 <h4 class=
"parameters">Parameters
</h4>
1276 <dd class=
"description">Address to convert
</dd>
1278 <dd class=
"description">String buffer
</dd>
1280 <dd class=
"description">Length of string
</dd>
1282 <h4 class=
"returnvalue">Return Value
</h4>
1283 <p class=
"description">Numeric address string
</p>
1284 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpAssembleURI">httpAssembleURI
</a></h3>
1285 <p class=
"description">Assemble a uniform resource identifier from its
1288 http_uri_status_t httpAssembleURI (
<br>
1289 http_uri_coding_t encoding,
<br>
1290 char *uri,
<br>
1291 int urilen,
<br>
1292 const char *scheme,
<br>
1293 const char *username,
<br>
1294 const char *host,
<br>
1295 int port,
<br>
1296 const char *resource
<br>
1298 <h4 class=
"parameters">Parameters
</h4>
1301 <dd class=
"description">Encoding flags
</dd>
1303 <dd class=
"description">URI buffer
</dd>
1305 <dd class=
"description">Size of URI buffer
</dd>
1307 <dd class=
"description">Scheme name
</dd>
1309 <dd class=
"description">Username
</dd>
1311 <dd class=
"description">Hostname or address
</dd>
1313 <dd class=
"description">Port number
</dd>
1315 <dd class=
"description">Resource
</dd>
1317 <h4 class=
"returnvalue">Return Value
</h4>
1318 <p class=
"description">URI status
</p>
1319 <h4 class=
"discussion">Discussion
</h4>
1320 <p class=
"discussion">This function escapes reserved characters in the URI depending on the
1321 value of the
"encoding
" argument. You should use this function in
1322 place of traditional string functions whenever you need to create a
1326 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpAssembleURIf">httpAssembleURIf
</a></h3>
1327 <p class=
"description">Assemble a uniform resource identifier from its
1328 components with a formatted resource.
</p>
1330 http_uri_status_t httpAssembleURIf (
<br>
1331 http_uri_coding_t encoding,
<br>
1332 char *uri,
<br>
1333 int urilen,
<br>
1334 const char *scheme,
<br>
1335 const char *username,
<br>
1336 const char *host,
<br>
1337 int port,
<br>
1338 const char *resourcef,
<br>
1339 ...
<br>
1341 <h4 class=
"parameters">Parameters
</h4>
1344 <dd class=
"description">Encoding flags
</dd>
1346 <dd class=
"description">URI buffer
</dd>
1348 <dd class=
"description">Size of URI buffer
</dd>
1350 <dd class=
"description">Scheme name
</dd>
1352 <dd class=
"description">Username
</dd>
1354 <dd class=
"description">Hostname or address
</dd>
1356 <dd class=
"description">Port number
</dd>
1358 <dd class=
"description">Printf-style resource
</dd>
1360 <dd class=
"description">Additional arguments as needed
</dd>
1362 <h4 class=
"returnvalue">Return Value
</h4>
1363 <p class=
"description">URI status
</p>
1364 <h4 class=
"discussion">Discussion
</h4>
1365 <p class=
"discussion">This function creates a formatted version of the resource string
1366 argument
"resourcef
" and escapes reserved characters in the URI
1367 depending on the value of the
"encoding
" argument. You should use
1368 this function in place of traditional string functions whenever
1369 you need to create a URI string.
1372 <h3 class=
"function"><a name=
"httpBlocking">httpBlocking
</a></h3>
1373 <p class=
"description">Set blocking/non-blocking behavior on a connection.
</p>
1375 void httpBlocking (
<br>
1376 <a href=
"#http_t">http_t
</a> *http,
<br>
1377 int b
<br>
1379 <h4 class=
"parameters">Parameters
</h4>
1382 <dd class=
"description">Connection to server
</dd>
1384 <dd class=
"description">1 = blocking,
0 = non-blocking
</dd>
1386 <h3 class=
"function"><a name=
"httpCheck">httpCheck
</a></h3>
1387 <p class=
"description">Check to see if there is a pending response from the server.
</p>
1390 <a href=
"#http_t">http_t
</a> *http
<br>
1392 <h4 class=
"parameters">Parameters
</h4>
1395 <dd class=
"description">Connection to server
</dd>
1397 <h4 class=
"returnvalue">Return Value
</h4>
1398 <p class=
"description">0 = no data,
1 = data available
</p>
1399 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"httpClearCookie">httpClearCookie
</a></h3>
1400 <p class=
"description">Clear the cookie value(s).
</p>
1402 void httpClearCookie (
<br>
1403 <a href=
"#http_t">http_t
</a> *http
<br>
1405 <h4 class=
"parameters">Parameters
</h4>
1408 <dd class=
"description">Connection to server
</dd>
1410 <h3 class=
"function"><a name=
"httpClearFields">httpClearFields
</a></h3>
1411 <p class=
"description">Clear HTTP request fields.
</p>
1413 void httpClearFields (
<br>
1414 <a href=
"#http_t">http_t
</a> *http
<br>
1416 <h4 class=
"parameters">Parameters
</h4>
1419 <dd class=
"description">Connection to server
</dd>
1421 <h3 class=
"function"><a name=
"httpClose">httpClose
</a></h3>
1422 <p class=
"description">Close an HTTP connection...
</p>
1424 void httpClose (
<br>
1425 <a href=
"#http_t">http_t
</a> *http
<br>
1427 <h4 class=
"parameters">Parameters
</h4>
1430 <dd class=
"description">Connection to server
</dd>
1432 <h3 class=
"function"><a name=
"httpConnect">httpConnect
</a></h3>
1433 <p class=
"description">Connect to a HTTP server.
</p>
1435 <a href=
"#http_t">http_t
</a> *httpConnect (
<br>
1436 const char *host,
<br>
1437 int port
<br>
1439 <h4 class=
"parameters">Parameters
</h4>
1442 <dd class=
"description">Host to connect to
</dd>
1444 <dd class=
"description">Port number
</dd>
1446 <h4 class=
"returnvalue">Return Value
</h4>
1447 <p class=
"description">New HTTP connection
</p>
1448 <h3 class=
"function"><a name=
"httpConnectEncrypt">httpConnectEncrypt
</a></h3>
1449 <p class=
"description">Connect to a HTTP server using encryption.
</p>
1451 <a href=
"#http_t">http_t
</a> *httpConnectEncrypt (
<br>
1452 const char *host,
<br>
1453 int port,
<br>
1454 <a href=
"#http_encryption_t">http_encryption_t
</a> encryption
<br>
1456 <h4 class=
"parameters">Parameters
</h4>
1459 <dd class=
"description">Host to connect to
</dd>
1461 <dd class=
"description">Port number
</dd>
1463 <dd class=
"description">Type of encryption to use
</dd>
1465 <h4 class=
"returnvalue">Return Value
</h4>
1466 <p class=
"description">New HTTP connection
</p>
1467 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpDecode64">httpDecode64
</a></h3>
1468 <p class=
"description">Base64-decode a string.
</p>
1470 char *httpDecode64 (
<br>
1471 char *out,
<br>
1472 const char *in
<br>
1474 <h4 class=
"parameters">Parameters
</h4>
1477 <dd class=
"description">String to write to
</dd>
1479 <dd class=
"description">String to read from
</dd>
1481 <h4 class=
"returnvalue">Return Value
</h4>
1482 <p class=
"description">Decoded string
</p>
1483 <h4 class=
"discussion">Discussion
</h4>
1484 <p class=
"discussion">This function is deprecated. Use the httpDecode64_2() function instead
1485 which provides buffer length arguments.
1488 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21 </span><a name=
"httpDecode64_2">httpDecode64_2
</a></h3>
1489 <p class=
"description">Base64-decode a string.
</p>
1491 char *httpDecode64_2 (
<br>
1492 char *out,
<br>
1493 int *outlen,
<br>
1494 const char *in
<br>
1496 <h4 class=
"parameters">Parameters
</h4>
1499 <dd class=
"description">String to write to
</dd>
1501 <dd class=
"description">Size of output string
</dd>
1503 <dd class=
"description">String to read from
</dd>
1505 <h4 class=
"returnvalue">Return Value
</h4>
1506 <p class=
"description">Decoded string
</p>
1507 <h3 class=
"function"><a name=
"httpDelete">httpDelete
</a></h3>
1508 <p class=
"description">Send a DELETE request to the server.
</p>
1510 int httpDelete (
<br>
1511 <a href=
"#http_t">http_t
</a> *http,
<br>
1512 const char *uri
<br>
1514 <h4 class=
"parameters">Parameters
</h4>
1517 <dd class=
"description">Connection to server
</dd>
1519 <dd class=
"description">URI to delete
</dd>
1521 <h4 class=
"returnvalue">Return Value
</h4>
1522 <p class=
"description">Status of call (
0 = success)
</p>
1523 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpEncode64">httpEncode64
</a></h3>
1524 <p class=
"description">Base64-encode a string.
</p>
1526 char *httpEncode64 (
<br>
1527 char *out,
<br>
1528 const char *in
<br>
1530 <h4 class=
"parameters">Parameters
</h4>
1533 <dd class=
"description">String to write to
</dd>
1535 <dd class=
"description">String to read from
</dd>
1537 <h4 class=
"returnvalue">Return Value
</h4>
1538 <p class=
"description">Encoded string
</p>
1539 <h4 class=
"discussion">Discussion
</h4>
1540 <p class=
"discussion">This function is deprecated. Use the httpEncode64_2() function instead
1541 which provides buffer length arguments.
1544 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21 </span><a name=
"httpEncode64_2">httpEncode64_2
</a></h3>
1545 <p class=
"description">Base64-encode a string.
</p>
1547 char *httpEncode64_2 (
<br>
1548 char *out,
<br>
1549 int outlen,
<br>
1550 const char *in,
<br>
1551 int inlen
<br>
1553 <h4 class=
"parameters">Parameters
</h4>
1556 <dd class=
"description">String to write to
</dd>
1558 <dd class=
"description">Size of output string
</dd>
1560 <dd class=
"description">String to read from
</dd>
1562 <dd class=
"description">Size of input string
</dd>
1564 <h4 class=
"returnvalue">Return Value
</h4>
1565 <p class=
"description">Encoded string
</p>
1566 <h3 class=
"function"><a name=
"httpEncryption">httpEncryption
</a></h3>
1567 <p class=
"description">Set the required encryption on the link.
</p>
1569 int httpEncryption (
<br>
1570 <a href=
"#http_t">http_t
</a> *http,
<br>
1571 <a href=
"#http_encryption_t">http_encryption_t
</a> e
<br>
1573 <h4 class=
"parameters">Parameters
</h4>
1576 <dd class=
"description">Connection to server
</dd>
1578 <dd class=
"description">New encryption preference
</dd>
1580 <h4 class=
"returnvalue">Return Value
</h4>
1581 <p class=
"description">-
1 on error,
0 on success
</p>
1582 <h3 class=
"function"><a name=
"httpError">httpError
</a></h3>
1583 <p class=
"description">Get the last error on a connection.
</p>
1586 <a href=
"#http_t">http_t
</a> *http
<br>
1588 <h4 class=
"parameters">Parameters
</h4>
1591 <dd class=
"description">Connection to server
</dd>
1593 <h4 class=
"returnvalue">Return Value
</h4>
1594 <p class=
"description">Error code (errno) value
</p>
1595 <h3 class=
"function"><a name=
"httpFlush">httpFlush
</a></h3>
1596 <p class=
"description">Flush data from a HTTP connection.
</p>
1598 void httpFlush (
<br>
1599 <a href=
"#http_t">http_t
</a> *http
<br>
1601 <h4 class=
"parameters">Parameters
</h4>
1604 <dd class=
"description">Connection to server
</dd>
1606 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpFlushWrite">httpFlushWrite
</a></h3>
1607 <p class=
"description">Flush data in write buffer.
</p>
1609 int httpFlushWrite (
<br>
1610 <a href=
"#http_t">http_t
</a> *http
<br>
1612 <h4 class=
"parameters">Parameters
</h4>
1615 <dd class=
"description">Connection to server
</dd>
1617 <h4 class=
"returnvalue">Return Value
</h4>
1618 <p class=
"description">Bytes written or -
1 on error
</p>
1619 <h3 class=
"function"><a name=
"httpGet">httpGet
</a></h3>
1620 <p class=
"description">Send a GET request to the server.
</p>
1623 <a href=
"#http_t">http_t
</a> *http,
<br>
1624 const char *uri
<br>
1626 <h4 class=
"parameters">Parameters
</h4>
1629 <dd class=
"description">Connection to server
</dd>
1631 <dd class=
"description">URI to get
</dd>
1633 <h4 class=
"returnvalue">Return Value
</h4>
1634 <p class=
"description">Status of call (
0 = success)
</p>
1635 <h3 class=
"function"><span class=
"info"> CUPS
1.3 </span><a name=
"httpGetAuthString">httpGetAuthString
</a></h3>
1636 <p class=
"description">Get the current authorization string.
</p>
1638 char *httpGetAuthString (
<br>
1639 <a href=
"#http_t">http_t
</a> *http
<br>
1641 <h4 class=
"parameters">Parameters
</h4>
1644 <dd class=
"description">Connection to server
</dd>
1646 <h4 class=
"returnvalue">Return Value
</h4>
1647 <p class=
"description">Authorization string
</p>
1648 <h4 class=
"discussion">Discussion
</h4>
1649 <p class=
"discussion">The authorization string is set by cupsDoAuthentication() and
1650 httpSetAuthString(). Use httpGetAuthString() to retrieve the
1651 string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
1655 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpGetBlocking">httpGetBlocking
</a></h3>
1656 <p class=
"description">Get the blocking/non-block state of a connection.
</p>
1658 int httpGetBlocking (
<br>
1659 <a href=
"#http_t">http_t
</a> *http
<br>
1661 <h4 class=
"parameters">Parameters
</h4>
1664 <dd class=
"description">Connection to server
</dd>
1666 <h4 class=
"returnvalue">Return Value
</h4>
1667 <p class=
"description">1 if blocking,
0 if non-blocking
</p>
1668 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"httpGetCookie">httpGetCookie
</a></h3>
1669 <p class=
"description">Get any cookie data from the response.
</p>
1671 const char *httpGetCookie (
<br>
1672 <a href=
"#http_t">http_t
</a> *http
<br>
1674 <h4 class=
"parameters">Parameters
</h4>
1677 <dd class=
"description">HTTP connecion
</dd>
1679 <h4 class=
"returnvalue">Return Value
</h4>
1680 <p class=
"description">Cookie data or NULL
</p>
1681 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetDateString">httpGetDateString
</a></h3>
1682 <p class=
"description">Get a formatted date/time string from a time value.
</p>
1684 const char *httpGetDateString (
<br>
1685 time_t t
<br>
1687 <h4 class=
"parameters">Parameters
</h4>
1690 <dd class=
"description">UNIX time
</dd>
1692 <h4 class=
"returnvalue">Return Value
</h4>
1693 <p class=
"description">Date/time string
</p>
1694 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpGetDateString2">httpGetDateString2
</a></h3>
1695 <p class=
"description">Get a formatted date/time string from a time value.
</p>
1697 const char *httpGetDateString2 (
<br>
1698 time_t t,
<br>
1699 char *s,
<br>
1700 int slen
<br>
1702 <h4 class=
"parameters">Parameters
</h4>
1705 <dd class=
"description">UNIX time
</dd>
1707 <dd class=
"description">String buffer
</dd>
1709 <dd class=
"description">Size of string buffer
</dd>
1711 <h4 class=
"returnvalue">Return Value
</h4>
1712 <p class=
"description">Date/time string
</p>
1713 <h3 class=
"function"><a name=
"httpGetDateTime">httpGetDateTime
</a></h3>
1714 <p class=
"description">Get a time value from a formatted date/time string.
</p>
1716 time_t httpGetDateTime (
<br>
1717 const char *s
<br>
1719 <h4 class=
"parameters">Parameters
</h4>
1722 <dd class=
"description">Date/time string
</dd>
1724 <h4 class=
"returnvalue">Return Value
</h4>
1725 <p class=
"description">UNIX time
</p>
1726 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpGetFd">httpGetFd
</a></h3>
1727 <p class=
"description">Get the file descriptor associated with a connection.
</p>
1730 <a href=
"#http_t">http_t
</a> *http
<br>
1732 <h4 class=
"parameters">Parameters
</h4>
1735 <dd class=
"description">Connection to server
</dd>
1737 <h4 class=
"returnvalue">Return Value
</h4>
1738 <p class=
"description">File descriptor or -
1 if none
</p>
1739 <h3 class=
"function"><a name=
"httpGetField">httpGetField
</a></h3>
1740 <p class=
"description">Get a field value from a request/response.
</p>
1742 const char *httpGetField (
<br>
1743 <a href=
"#http_t">http_t
</a> *http,
<br>
1744 http_field_t field
<br>
1746 <h4 class=
"parameters">Parameters
</h4>
1749 <dd class=
"description">Connection to server
</dd>
1751 <dd class=
"description">Field to get
</dd>
1753 <h4 class=
"returnvalue">Return Value
</h4>
1754 <p class=
"description">Field value
</p>
1755 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetHostByName">httpGetHostByName
</a></h3>
1756 <p class=
"description">Lookup a hostname or IPv4 address, and return
1757 address records for the specified name.
</p>
1759 struct hostent *httpGetHostByName (
<br>
1760 const char *name
<br>
1762 <h4 class=
"parameters">Parameters
</h4>
1765 <dd class=
"description">Hostname or IP address
</dd>
1767 <h4 class=
"returnvalue">Return Value
</h4>
1768 <p class=
"description">Host entry
</p>
1769 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpGetHostname">httpGetHostname
</a></h3>
1770 <p class=
"description">Get the FQDN for the connection or local system.
</p>
1772 const char *httpGetHostname (
<br>
1773 <a href=
"#http_t">http_t
</a> *http,
<br>
1774 char *s,
<br>
1775 int slen
<br>
1777 <h4 class=
"parameters">Parameters
</h4>
1780 <dd class=
"description">HTTP connection or NULL
</dd>
1782 <dd class=
"description">String buffer for name
</dd>
1784 <dd class=
"description">Size of buffer
</dd>
1786 <h4 class=
"returnvalue">Return Value
</h4>
1787 <p class=
"description">FQDN for connection or system
</p>
1788 <h4 class=
"discussion">Discussion
</h4>
1789 <p class=
"discussion">When
"http
" points to a connected socket, return the hostname or
1790 address that was used in the call to httpConnect() or httpConnectEncrypt().
1791 Otherwise, return the FQDN for the local system using both gethostname()
1792 and gethostbyname() to get the local hostname with domain.
1795 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetLength">httpGetLength
</a></h3>
1796 <p class=
"description">Get the amount of data remaining from the
1797 content-length or transfer-encoding fields.
</p>
1799 int httpGetLength (
<br>
1800 <a href=
"#http_t">http_t
</a> *http
<br>
1802 <h4 class=
"parameters">Parameters
</h4>
1805 <dd class=
"description">Connection to server
</dd>
1807 <h4 class=
"returnvalue">Return Value
</h4>
1808 <p class=
"description">Content length
</p>
1809 <h4 class=
"discussion">Discussion
</h4>
1810 <p class=
"discussion">This function is deprecated and will not return lengths larger than
1811 2^
31 -
1; use httpGetLength2() instead.
1814 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpGetLength2">httpGetLength2
</a></h3>
1815 <p class=
"description">Get the amount of data remaining from the
1816 content-length or transfer-encoding fields.
</p>
1818 off_t httpGetLength2 (
<br>
1819 <a href=
"#http_t">http_t
</a> *http
<br>
1821 <h4 class=
"parameters">Parameters
</h4>
1824 <dd class=
"description">Connection to server
</dd>
1826 <h4 class=
"returnvalue">Return Value
</h4>
1827 <p class=
"description">Content length
</p>
1828 <h4 class=
"discussion">Discussion
</h4>
1829 <p class=
"discussion">This function returns the complete content length, even for
1830 content larger than
2^
31 -
1.
1833 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpGetStatus">httpGetStatus
</a></h3>
1834 <p class=
"description">Get the status of the last HTTP request.
</p>
1836 http_status_t httpGetStatus (
<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">HTTP status
</p>
1846 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpGetSubField">httpGetSubField
</a></h3>
1847 <p class=
"description">Get a sub-field value.
</p>
1849 char *httpGetSubField (
<br>
1850 <a href=
"#http_t">http_t
</a> *http,
<br>
1851 http_field_t field,
<br>
1852 const char *name,
<br>
1853 char *value
<br>
1855 <h4 class=
"parameters">Parameters
</h4>
1858 <dd class=
"description">Connection to server
</dd>
1860 <dd class=
"description">Field index
</dd>
1862 <dd class=
"description">Name of sub-field
</dd>
1864 <dd class=
"description">Value string
</dd>
1866 <h4 class=
"returnvalue">Return Value
</h4>
1867 <p class=
"description">Value or NULL
</p>
1868 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpGetSubField2">httpGetSubField2
</a></h3>
1869 <p class=
"description">Get a sub-field value.
</p>
1871 char *httpGetSubField2 (
<br>
1872 <a href=
"#http_t">http_t
</a> *http,
<br>
1873 http_field_t field,
<br>
1874 const char *name,
<br>
1875 char *value,
<br>
1876 int valuelen
<br>
1878 <h4 class=
"parameters">Parameters
</h4>
1881 <dd class=
"description">Connection to server
</dd>
1883 <dd class=
"description">Field index
</dd>
1885 <dd class=
"description">Name of sub-field
</dd>
1887 <dd class=
"description">Value string
</dd>
1889 <dd class=
"description">Size of value buffer
</dd>
1891 <h4 class=
"returnvalue">Return Value
</h4>
1892 <p class=
"description">Value or NULL
</p>
1893 <h3 class=
"function"><a name=
"httpGets">httpGets
</a></h3>
1894 <p class=
"description">Get a line of text from a HTTP connection.
</p>
1896 char *httpGets (
<br>
1897 char *line,
<br>
1898 int length,
<br>
1899 <a href=
"#http_t">http_t
</a> *http
<br>
1901 <h4 class=
"parameters">Parameters
</h4>
1904 <dd class=
"description">Line to read into
</dd>
1906 <dd class=
"description">Max length of buffer
</dd>
1908 <dd class=
"description">Connection to server
</dd>
1910 <h4 class=
"returnvalue">Return Value
</h4>
1911 <p class=
"description">Line or NULL
</p>
1912 <h3 class=
"function"><a name=
"httpHead">httpHead
</a></h3>
1913 <p class=
"description">Send a HEAD request to the server.
</p>
1916 <a href=
"#http_t">http_t
</a> *http,
<br>
1917 const char *uri
<br>
1919 <h4 class=
"parameters">Parameters
</h4>
1922 <dd class=
"description">Connection to server
</dd>
1924 <dd class=
"description">URI for head
</dd>
1926 <h4 class=
"returnvalue">Return Value
</h4>
1927 <p class=
"description">Status of call (
0 = success)
</p>
1928 <h3 class=
"function"><a name=
"httpInitialize">httpInitialize
</a></h3>
1929 <p class=
"description">Initialize the HTTP interface library and set the
1930 default HTTP proxy (if any).
</p>
1932 void httpInitialize (void);
</p>
1933 <h3 class=
"function"><a name=
"httpMD5">httpMD5
</a></h3>
1934 <p class=
"description">Compute the MD5 sum of the username:group:password.
</p>
1937 const char *username,
<br>
1938 const char *realm,
<br>
1939 const char *passwd,
<br>
1940 char md5[
33]
<br>
1942 <h4 class=
"parameters">Parameters
</h4>
1945 <dd class=
"description">User name
</dd>
1947 <dd class=
"description">Realm name
</dd>
1949 <dd class=
"description">Password string
</dd>
1951 <dd class=
"description">MD5 string
</dd>
1953 <h4 class=
"returnvalue">Return Value
</h4>
1954 <p class=
"description">MD5 sum
</p>
1955 <h3 class=
"function"><a name=
"httpMD5Final">httpMD5Final
</a></h3>
1956 <p class=
"description">Combine the MD5 sum of the username, group, and password
1957 with the server-supplied nonce value, method, and
1960 char *httpMD5Final (
<br>
1961 const char *nonce,
<br>
1962 const char *method,
<br>
1963 const char *resource,
<br>
1964 char md5[
33]
<br>
1966 <h4 class=
"parameters">Parameters
</h4>
1969 <dd class=
"description">Server nonce value
</dd>
1971 <dd class=
"description">METHOD (GET, POST, etc.)
</dd>
1973 <dd class=
"description">Resource path
</dd>
1975 <dd class=
"description">MD5 sum
</dd>
1977 <h4 class=
"returnvalue">Return Value
</h4>
1978 <p class=
"description">New sum
</p>
1979 <h3 class=
"function"><a name=
"httpMD5String">httpMD5String
</a></h3>
1980 <p class=
"description">Convert an MD5 sum to a character string.
</p>
1982 char *httpMD5String (
<br>
1983 const unsigned char *sum,
<br>
1984 char md5[
33]
<br>
1986 <h4 class=
"parameters">Parameters
</h4>
1989 <dd class=
"description">MD5 sum data
</dd>
1991 <dd class=
"description">MD5 sum in hex
</dd>
1993 <h4 class=
"returnvalue">Return Value
</h4>
1994 <p class=
"description">MD5 sum in hex
</p>
1995 <h3 class=
"function"><a name=
"httpOptions">httpOptions
</a></h3>
1996 <p class=
"description">Send an OPTIONS request to the server.
</p>
1998 int httpOptions (
<br>
1999 <a href=
"#http_t">http_t
</a> *http,
<br>
2000 const char *uri
<br>
2002 <h4 class=
"parameters">Parameters
</h4>
2005 <dd class=
"description">Connection to server
</dd>
2007 <dd class=
"description">URI for options
</dd>
2009 <h4 class=
"returnvalue">Return Value
</h4>
2010 <p class=
"description">Status of call (
0 = success)
</p>
2011 <h3 class=
"function"><a name=
"httpPost">httpPost
</a></h3>
2012 <p class=
"description">Send a POST request to the server.
</p>
2015 <a href=
"#http_t">http_t
</a> *http,
<br>
2016 const char *uri
<br>
2018 <h4 class=
"parameters">Parameters
</h4>
2021 <dd class=
"description">Connection to server
</dd>
2023 <dd class=
"description">URI for post
</dd>
2025 <h4 class=
"returnvalue">Return Value
</h4>
2026 <p class=
"description">Status of call (
0 = success)
</p>
2027 <h3 class=
"function"><a name=
"httpPut">httpPut
</a></h3>
2028 <p class=
"description">Send a PUT request to the server.
</p>
2031 <a href=
"#http_t">http_t
</a> *http,
<br>
2032 const char *uri
<br>
2034 <h4 class=
"parameters">Parameters
</h4>
2037 <dd class=
"description">Connection to server
</dd>
2039 <dd class=
"description">URI to put
</dd>
2041 <h4 class=
"returnvalue">Return Value
</h4>
2042 <p class=
"description">Status of call (
0 = success)
</p>
2043 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpRead">httpRead
</a></h3>
2044 <p class=
"description">Read data from a HTTP connection.
</p>
2047 <a href=
"#http_t">http_t
</a> *http,
<br>
2048 char *buffer,
<br>
2049 int length
<br>
2051 <h4 class=
"parameters">Parameters
</h4>
2054 <dd class=
"description">Connection to server
</dd>
2056 <dd class=
"description">Buffer for data
</dd>
2058 <dd class=
"description">Maximum number of bytes
</dd>
2060 <h4 class=
"returnvalue">Return Value
</h4>
2061 <p class=
"description">Number of bytes read
</p>
2062 <h4 class=
"discussion">Discussion
</h4>
2063 <p class=
"discussion">This function is deprecated. Use the httpRead2() function which can
2064 read more than
2GB of data.
2067 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpRead2">httpRead2
</a></h3>
2068 <p class=
"description">Read data from a HTTP connection.
</p>
2070 ssize_t httpRead2 (
<br>
2071 <a href=
"#http_t">http_t
</a> *http,
<br>
2072 char *buffer,
<br>
2073 size_t length
<br>
2075 <h4 class=
"parameters">Parameters
</h4>
2078 <dd class=
"description">Connection to server
</dd>
2080 <dd class=
"description">Buffer for data
</dd>
2082 <dd class=
"description">Maximum number of bytes
</dd>
2084 <h4 class=
"returnvalue">Return Value
</h4>
2085 <p class=
"description">Number of bytes read
</p>
2086 <h3 class=
"function"><a name=
"httpReconnect">httpReconnect
</a></h3>
2087 <p class=
"description">Reconnect to a HTTP server.
</p>
2089 int httpReconnect (
<br>
2090 <a href=
"#http_t">http_t
</a> *http
<br>
2092 <h4 class=
"parameters">Parameters
</h4>
2095 <dd class=
"description">Connection to server
</dd>
2097 <h4 class=
"returnvalue">Return Value
</h4>
2098 <p class=
"description">0 on success, non-zero on failure
</p>
2099 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpSeparate">httpSeparate
</a></h3>
2100 <p class=
"description">Separate a Universal Resource Identifier into its
2103 void httpSeparate (
<br>
2104 const char *uri,
<br>
2105 char *scheme,
<br>
2106 char *username,
<br>
2107 char *host,
<br>
2108 int *port,
<br>
2109 char *resource
<br>
2111 <h4 class=
"parameters">Parameters
</h4>
2114 <dd class=
"description">Universal Resource Identifier
</dd>
2116 <dd class=
"description">Scheme [
32] (http, https, etc.)
</dd>
2118 <dd class=
"description">Username [
1024]
</dd>
2120 <dd class=
"description">Hostname [
1024]
</dd>
2122 <dd class=
"description">Port number to use
</dd>
2124 <dd class=
"description">Resource/filename [
1024]
</dd>
2126 <h4 class=
"discussion">Discussion
</h4>
2127 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
2130 <h3 class=
"function"><span class=
"info"> CUPS
1.1.21 </span><a name=
"httpSeparate2">httpSeparate2
</a></h3>
2131 <p class=
"description">Separate a Universal Resource Identifier into its
2134 void httpSeparate2 (
<br>
2135 const char *uri,
<br>
2136 char *scheme,
<br>
2137 int schemelen,
<br>
2138 char *username,
<br>
2139 int usernamelen,
<br>
2140 char *host,
<br>
2141 int hostlen,
<br>
2142 int *port,
<br>
2143 char *resource,
<br>
2144 int resourcelen
<br>
2146 <h4 class=
"parameters">Parameters
</h4>
2149 <dd class=
"description">Universal Resource Identifier
</dd>
2151 <dd class=
"description">Scheme (http, https, etc.)
</dd>
2153 <dd class=
"description">Size of scheme buffer
</dd>
2155 <dd class=
"description">Username
</dd>
2156 <dt>usernamelen
</dt>
2157 <dd class=
"description">Size of username buffer
</dd>
2159 <dd class=
"description">Hostname
</dd>
2161 <dd class=
"description">Size of hostname buffer
</dd>
2163 <dd class=
"description">Port number to use
</dd>
2165 <dd class=
"description">Resource/filename
</dd>
2166 <dt>resourcelen
</dt>
2167 <dd class=
"description">Size of resource buffer
</dd>
2169 <h4 class=
"discussion">Discussion
</h4>
2170 <p class=
"discussion">This function is deprecated; use the httpSeparateURI() function instead.
2174 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpSeparateURI">httpSeparateURI
</a></h3>
2175 <p class=
"description">Separate a Universal Resource Identifier into its
2178 http_uri_status_t httpSeparateURI (
<br>
2179 http_uri_coding_t decoding,
<br>
2180 const char *uri,
<br>
2181 char *scheme,
<br>
2182 int schemelen,
<br>
2183 char *username,
<br>
2184 int usernamelen,
<br>
2185 char *host,
<br>
2186 int hostlen,
<br>
2187 int *port,
<br>
2188 char *resource,
<br>
2189 int resourcelen
<br>
2191 <h4 class=
"parameters">Parameters
</h4>
2194 <dd class=
"description">Decoding flags
</dd>
2196 <dd class=
"description">Universal Resource Identifier
</dd>
2198 <dd class=
"description">Scheme (http, https, etc.)
</dd>
2200 <dd class=
"description">Size of scheme buffer
</dd>
2202 <dd class=
"description">Username
</dd>
2203 <dt>usernamelen
</dt>
2204 <dd class=
"description">Size of username buffer
</dd>
2206 <dd class=
"description">Hostname
</dd>
2208 <dd class=
"description">Size of hostname buffer
</dd>
2210 <dd class=
"description">Port number to use
</dd>
2212 <dd class=
"description">Resource/filename
</dd>
2213 <dt>resourcelen
</dt>
2214 <dd class=
"description">Size of resource buffer
</dd>
2216 <h4 class=
"returnvalue">Return Value
</h4>
2217 <p class=
"description">Result of separation
</p>
2218 <h3 class=
"function"><span class=
"info"> CUPS
1.3 </span><a name=
"httpSetAuthString">httpSetAuthString
</a></h3>
2219 <p class=
"description">Set the current authorization string.
</p>
2221 void httpSetAuthString (
<br>
2222 <a href=
"#http_t">http_t
</a> *http,
<br>
2223 const char *scheme,
<br>
2224 const char *data
<br>
2226 <h4 class=
"parameters">Parameters
</h4>
2229 <dd class=
"description">Connection to server
</dd>
2231 <dd class=
"description">Auth scheme (NULL to clear it)
</dd>
2233 <dd class=
"description">Auth data (NULL for none)
</dd>
2235 <h4 class=
"discussion">Discussion
</h4>
2236 <p class=
"discussion">This function just stores a copy of the current authorization string in
2237 the HTTP connection object. You must still call httpSetField() to set
2238 HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
2239 httpHead(), httpOptions(), httpPost, or httpPut().
2242 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"httpSetCookie">httpSetCookie
</a></h3>
2243 <p class=
"description">Set the cookie value(s)...
</p>
2245 void httpSetCookie (
<br>
2246 <a href=
"#http_t">http_t
</a> *http,
<br>
2247 const char *cookie
<br>
2249 <h4 class=
"parameters">Parameters
</h4>
2252 <dd class=
"description">Connection
</dd>
2254 <dd class=
"description">Cookie string
</dd>
2256 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpSetExpect">httpSetExpect
</a></h3>
2257 <p class=
"description">Set the Expect: header in a request.
</p>
2259 void httpSetExpect (
<br>
2260 <a href=
"#http_t">http_t
</a> *http,
<br>
2261 http_status_t expect
<br>
2263 <h4 class=
"parameters">Parameters
</h4>
2266 <dd class=
"description">Connection to server
</dd>
2268 <dd class=
"description">HTTP status to expect (HTTP_CONTINUE)
</dd>
2270 <h4 class=
"discussion">Discussion
</h4>
2271 <p class=
"discussion">Currently only HTTP_CONTINUE is supported for the
"expect
" argument.
2274 <h3 class=
"function"><a name=
"httpSetField">httpSetField
</a></h3>
2275 <p class=
"description">Set the value of an HTTP header.
</p>
2277 void httpSetField (
<br>
2278 <a href=
"#http_t">http_t
</a> *http,
<br>
2279 http_field_t field,
<br>
2280 const char *value
<br>
2282 <h4 class=
"parameters">Parameters
</h4>
2285 <dd class=
"description">Connection to server
</dd>
2287 <dd class=
"description">Field index
</dd>
2289 <dd class=
"description">Value
</dd>
2291 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpSetLength">httpSetLength
</a></h3>
2292 <p class=
"description">Set the content-length and content-encoding.
</p>
2294 void httpSetLength (
<br>
2295 <a href=
"#http_t">http_t
</a> *http,
<br>
2296 size_t length
<br>
2298 <h4 class=
"parameters">Parameters
</h4>
2301 <dd class=
"description">Connection to server
</dd>
2303 <dd class=
"description">Length (
0 for chunked)
</dd>
2305 <h3 class=
"function"><a name=
"httpStatus">httpStatus
</a></h3>
2306 <p class=
"description">Return a short string describing a HTTP status code.
</p>
2308 const char *httpStatus (
<br>
2309 http_status_t status
<br>
2311 <h4 class=
"parameters">Parameters
</h4>
2314 <dd class=
"description">HTTP status code
</dd>
2316 <h4 class=
"returnvalue">Return Value
</h4>
2317 <p class=
"description">String or NULL
</p>
2318 <h3 class=
"function"><a name=
"httpTrace">httpTrace
</a></h3>
2319 <p class=
"description">Send an TRACE request to the server.
</p>
2322 <a href=
"#http_t">http_t
</a> *http,
<br>
2323 const char *uri
<br>
2325 <h4 class=
"parameters">Parameters
</h4>
2328 <dd class=
"description">Connection to server
</dd>
2330 <dd class=
"description">URI for trace
</dd>
2332 <h4 class=
"returnvalue">Return Value
</h4>
2333 <p class=
"description">Status of call (
0 = success)
</p>
2334 <h3 class=
"function"><a name=
"httpUpdate">httpUpdate
</a></h3>
2335 <p class=
"description">Update the current HTTP state for incoming data.
</p>
2337 http_status_t httpUpdate (
<br>
2338 <a href=
"#http_t">http_t
</a> *http
<br>
2340 <h4 class=
"parameters">Parameters
</h4>
2343 <dd class=
"description">Connection to server
</dd>
2345 <h4 class=
"returnvalue">Return Value
</h4>
2346 <p class=
"description">HTTP status
</p>
2347 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"httpWait">httpWait
</a></h3>
2348 <p class=
"description">Wait for data available on a connection.
</p>
2351 <a href=
"#http_t">http_t
</a> *http,
<br>
2352 int msec
<br>
2354 <h4 class=
"parameters">Parameters
</h4>
2357 <dd class=
"description">Connection to server
</dd>
2359 <dd class=
"description">Milliseconds to wait
</dd>
2361 <h4 class=
"returnvalue">Return Value
</h4>
2362 <p class=
"description">1 if data is available,
0 otherwise
</p>
2363 <h3 class=
"function"><span class=
"info"> DEPRECATED
</span><a name=
"httpWrite">httpWrite
</a></h3>
2364 <p class=
"description">Write data to a HTTP connection.
</p>
2367 <a href=
"#http_t">http_t
</a> *http,
<br>
2368 const char *buffer,
<br>
2369 int length
<br>
2371 <h4 class=
"parameters">Parameters
</h4>
2374 <dd class=
"description">Connection to server
</dd>
2376 <dd class=
"description">Buffer for data
</dd>
2378 <dd class=
"description">Number of bytes to write
</dd>
2380 <h4 class=
"returnvalue">Return Value
</h4>
2381 <p class=
"description">Number of bytes written
</p>
2382 <h4 class=
"discussion">Discussion
</h4>
2383 <p class=
"discussion">This function is deprecated. Use the httpWrite2() function which can
2384 write more than
2GB of data.
2387 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"httpWrite2">httpWrite2
</a></h3>
2388 <p class=
"description">Write data to a HTTP connection.
</p>
2390 ssize_t httpWrite2 (
<br>
2391 <a href=
"#http_t">http_t
</a> *http,
<br>
2392 const char *buffer,
<br>
2393 size_t length
<br>
2395 <h4 class=
"parameters">Parameters
</h4>
2398 <dd class=
"description">Connection to server
</dd>
2400 <dd class=
"description">Buffer for data
</dd>
2402 <dd class=
"description">Number of bytes to write
</dd>
2404 <h4 class=
"returnvalue">Return Value
</h4>
2405 <p class=
"description">Number of bytes written
</p>
2406 <h3 class=
"function"><a name=
"ippAddBoolean">ippAddBoolean
</a></h3>
2407 <p class=
"description">Add a boolean attribute to an IPP message.
</p>
2409 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBoolean (
<br>
2410 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2411 ipp_tag_t group,
<br>
2412 const char *name,
<br>
2413 char value
<br>
2415 <h4 class=
"parameters">Parameters
</h4>
2418 <dd class=
"description">IPP message
</dd>
2420 <dd class=
"description">IPP group
</dd>
2422 <dd class=
"description">Name of attribute
</dd>
2424 <dd class=
"description">Value of attribute
</dd>
2426 <h4 class=
"returnvalue">Return Value
</h4>
2427 <p class=
"description">New attribute
</p>
2428 <h3 class=
"function"><a name=
"ippAddBooleans">ippAddBooleans
</a></h3>
2429 <p class=
"description">Add an array of boolean values.
</p>
2431 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddBooleans (
<br>
2432 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2433 ipp_tag_t group,
<br>
2434 const char *name,
<br>
2435 int num_values,
<br>
2436 const char *values
<br>
2438 <h4 class=
"parameters">Parameters
</h4>
2441 <dd class=
"description">IPP message
</dd>
2443 <dd class=
"description">IPP group
</dd>
2445 <dd class=
"description">Name of attribute
</dd>
2447 <dd class=
"description">Number of values
</dd>
2449 <dd class=
"description">Values
</dd>
2451 <h4 class=
"returnvalue">Return Value
</h4>
2452 <p class=
"description">New attribute
</p>
2453 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ippAddCollection">ippAddCollection
</a></h3>
2454 <p class=
"description">Add a collection value.
</p>
2456 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollection (
<br>
2457 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2458 ipp_tag_t group,
<br>
2459 const char *name,
<br>
2460 <a href=
"#ipp_t">ipp_t
</a> *value
<br>
2462 <h4 class=
"parameters">Parameters
</h4>
2465 <dd class=
"description">IPP message
</dd>
2467 <dd class=
"description">IPP group
</dd>
2469 <dd class=
"description">Name of attribute
</dd>
2471 <dd class=
"description">Value
</dd>
2473 <h4 class=
"returnvalue">Return Value
</h4>
2474 <p class=
"description">New attribute
</p>
2475 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ippAddCollections">ippAddCollections
</a></h3>
2476 <p class=
"description">Add an array of collection values.
</p>
2478 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddCollections (
<br>
2479 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2480 ipp_tag_t group,
<br>
2481 const char *name,
<br>
2482 int num_values,
<br>
2483 const
<a href=
"#ipp_t">ipp_t
</a> **values
<br>
2485 <h4 class=
"parameters">Parameters
</h4>
2488 <dd class=
"description">IPP message
</dd>
2490 <dd class=
"description">IPP group
</dd>
2492 <dd class=
"description">Name of attribute
</dd>
2494 <dd class=
"description">Number of values
</dd>
2496 <dd class=
"description">Values
</dd>
2498 <h4 class=
"returnvalue">Return Value
</h4>
2499 <p class=
"description">New attribute
</p>
2500 <h3 class=
"function"><a name=
"ippAddDate">ippAddDate
</a></h3>
2501 <p class=
"description">Add a date attribute to an IPP message.
</p>
2503 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddDate (
<br>
2504 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2505 ipp_tag_t group,
<br>
2506 const char *name,
<br>
2507 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *value
<br>
2509 <h4 class=
"parameters">Parameters
</h4>
2512 <dd class=
"description">IPP message
</dd>
2514 <dd class=
"description">IPP group
</dd>
2516 <dd class=
"description">Name of attribute
</dd>
2518 <dd class=
"description">Value
</dd>
2520 <h4 class=
"returnvalue">Return Value
</h4>
2521 <p class=
"description">New attribute
</p>
2522 <h3 class=
"function"><a name=
"ippAddInteger">ippAddInteger
</a></h3>
2523 <p class=
"description">Add a integer attribute to an IPP message.
</p>
2525 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddInteger (
<br>
2526 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2527 ipp_tag_t group,
<br>
2528 ipp_tag_t type,
<br>
2529 const char *name,
<br>
2530 int value
<br>
2532 <h4 class=
"parameters">Parameters
</h4>
2535 <dd class=
"description">IPP message
</dd>
2537 <dd class=
"description">IPP group
</dd>
2539 <dd class=
"description">Type of attribute
</dd>
2541 <dd class=
"description">Name of attribute
</dd>
2543 <dd class=
"description">Value of attribute
</dd>
2545 <h4 class=
"returnvalue">Return Value
</h4>
2546 <p class=
"description">New attribute
</p>
2547 <h3 class=
"function"><a name=
"ippAddIntegers">ippAddIntegers
</a></h3>
2548 <p class=
"description">Add an array of integer values.
</p>
2550 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddIntegers (
<br>
2551 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2552 ipp_tag_t group,
<br>
2553 ipp_tag_t type,
<br>
2554 const char *name,
<br>
2555 int num_values,
<br>
2556 const int *values
<br>
2558 <h4 class=
"parameters">Parameters
</h4>
2561 <dd class=
"description">IPP message
</dd>
2563 <dd class=
"description">IPP group
</dd>
2565 <dd class=
"description">Type of attribute
</dd>
2567 <dd class=
"description">Name of attribute
</dd>
2569 <dd class=
"description">Number of values
</dd>
2571 <dd class=
"description">Values
</dd>
2573 <h4 class=
"returnvalue">Return Value
</h4>
2574 <p class=
"description">New attribute
</p>
2575 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ippAddOctetString">ippAddOctetString
</a></h3>
2576 <p class=
"description">Add an octetString value to an IPP message.
</p>
2578 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddOctetString (
<br>
2579 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2580 ipp_tag_t group,
<br>
2581 const char *name,
<br>
2582 const void *data,
<br>
2583 int datalen
<br>
2585 <h4 class=
"parameters">Parameters
</h4>
2588 <dd class=
"description">IPP message
</dd>
2590 <dd class=
"description">IPP group
</dd>
2592 <dd class=
"description">Name of attribute
</dd>
2594 <dd class=
"description">octetString data
</dd>
2596 <dd class=
"description">Length of data in bytes
</dd>
2598 <h4 class=
"returnvalue">Return Value
</h4>
2599 <p class=
"description">New attribute
</p>
2600 <h3 class=
"function"><a name=
"ippAddRange">ippAddRange
</a></h3>
2601 <p class=
"description">Add a range of values to an IPP message.
</p>
2603 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRange (
<br>
2604 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2605 ipp_tag_t group,
<br>
2606 const char *name,
<br>
2607 int lower,
<br>
2608 int upper
<br>
2610 <h4 class=
"parameters">Parameters
</h4>
2613 <dd class=
"description">IPP message
</dd>
2615 <dd class=
"description">IPP group
</dd>
2617 <dd class=
"description">Name of attribute
</dd>
2619 <dd class=
"description">Lower value
</dd>
2621 <dd class=
"description">Upper value
</dd>
2623 <h4 class=
"returnvalue">Return Value
</h4>
2624 <p class=
"description">New attribute
</p>
2625 <h3 class=
"function"><a name=
"ippAddRanges">ippAddRanges
</a></h3>
2626 <p class=
"description">Add ranges of values to an IPP message.
</p>
2628 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddRanges (
<br>
2629 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2630 ipp_tag_t group,
<br>
2631 const char *name,
<br>
2632 int num_values,
<br>
2633 const int *lower,
<br>
2634 const int *upper
<br>
2636 <h4 class=
"parameters">Parameters
</h4>
2639 <dd class=
"description">IPP message
</dd>
2641 <dd class=
"description">IPP group
</dd>
2643 <dd class=
"description">Name of attribute
</dd>
2645 <dd class=
"description">Number of values
</dd>
2647 <dd class=
"description">Lower values
</dd>
2649 <dd class=
"description">Upper values
</dd>
2651 <h4 class=
"returnvalue">Return Value
</h4>
2652 <p class=
"description">New attribute
</p>
2653 <h3 class=
"function"><a name=
"ippAddResolution">ippAddResolution
</a></h3>
2654 <p class=
"description">Add a resolution value to an IPP message.
</p>
2656 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolution (
<br>
2657 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2658 ipp_tag_t group,
<br>
2659 const char *name,
<br>
2660 ipp_res_t units,
<br>
2661 int xres,
<br>
2662 int yres
<br>
2664 <h4 class=
"parameters">Parameters
</h4>
2667 <dd class=
"description">IPP message
</dd>
2669 <dd class=
"description">IPP group
</dd>
2671 <dd class=
"description">Name of attribute
</dd>
2673 <dd class=
"description">Units for resolution
</dd>
2675 <dd class=
"description">X resolution
</dd>
2677 <dd class=
"description">Y resolution
</dd>
2679 <h4 class=
"returnvalue">Return Value
</h4>
2680 <p class=
"description">New attribute
</p>
2681 <h3 class=
"function"><a name=
"ippAddResolutions">ippAddResolutions
</a></h3>
2682 <p class=
"description">Add resolution values to an IPP message.
</p>
2684 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddResolutions (
<br>
2685 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2686 ipp_tag_t group,
<br>
2687 const char *name,
<br>
2688 int num_values,
<br>
2689 ipp_res_t units,
<br>
2690 const int *xres,
<br>
2691 const int *yres
<br>
2693 <h4 class=
"parameters">Parameters
</h4>
2696 <dd class=
"description">IPP message
</dd>
2698 <dd class=
"description">IPP group
</dd>
2700 <dd class=
"description">Name of attribute
</dd>
2702 <dd class=
"description">Number of values
</dd>
2704 <dd class=
"description">Units for resolution
</dd>
2706 <dd class=
"description">X resolutions
</dd>
2708 <dd class=
"description">Y resolutions
</dd>
2710 <h4 class=
"returnvalue">Return Value
</h4>
2711 <p class=
"description">New attribute
</p>
2712 <h3 class=
"function"><a name=
"ippAddSeparator">ippAddSeparator
</a></h3>
2713 <p class=
"description">Add a group separator to an IPP message.
</p>
2715 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddSeparator (
<br>
2716 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
2718 <h4 class=
"parameters">Parameters
</h4>
2721 <dd class=
"description">IPP message
</dd>
2723 <h4 class=
"returnvalue">Return Value
</h4>
2724 <p class=
"description">New attribute
</p>
2725 <h3 class=
"function"><a name=
"ippAddString">ippAddString
</a></h3>
2726 <p class=
"description">Add a language-encoded string to an IPP message.
</p>
2728 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddString (
<br>
2729 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2730 ipp_tag_t group,
<br>
2731 ipp_tag_t type,
<br>
2732 const char *name,
<br>
2733 const char *charset,
<br>
2734 const char *value
<br>
2736 <h4 class=
"parameters">Parameters
</h4>
2739 <dd class=
"description">IPP message
</dd>
2741 <dd class=
"description">IPP group
</dd>
2743 <dd class=
"description">Type of attribute
</dd>
2745 <dd class=
"description">Name of attribute
</dd>
2747 <dd class=
"description">Character set
</dd>
2749 <dd class=
"description">Value
</dd>
2751 <h4 class=
"returnvalue">Return Value
</h4>
2752 <p class=
"description">New attribute
</p>
2753 <h3 class=
"function"><a name=
"ippAddStrings">ippAddStrings
</a></h3>
2754 <p class=
"description">Add language-encoded strings to an IPP message.
</p>
2756 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippAddStrings (
<br>
2757 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2758 ipp_tag_t group,
<br>
2759 ipp_tag_t type,
<br>
2760 const char *name,
<br>
2761 int num_values,
<br>
2762 const char *charset,
<br>
2763 const char *const *values
<br>
2765 <h4 class=
"parameters">Parameters
</h4>
2768 <dd class=
"description">IPP message
</dd>
2770 <dd class=
"description">IPP group
</dd>
2772 <dd class=
"description">Type of attribute
</dd>
2774 <dd class=
"description">Name of attribute
</dd>
2776 <dd class=
"description">Number of values
</dd>
2778 <dd class=
"description">Character set
</dd>
2780 <dd class=
"description">Values
</dd>
2782 <h4 class=
"returnvalue">Return Value
</h4>
2783 <p class=
"description">New attribute
</p>
2784 <h3 class=
"function"><a name=
"ippDateToTime">ippDateToTime
</a></h3>
2785 <p class=
"description">Convert from RFC
1903 Date/Time format to UNIX time
2788 time_t ippDateToTime (
<br>
2789 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *date
<br>
2791 <h4 class=
"parameters">Parameters
</h4>
2794 <dd class=
"description">RFC
1903 date info
</dd>
2796 <h4 class=
"returnvalue">Return Value
</h4>
2797 <p class=
"description">UNIX time value
</p>
2798 <h3 class=
"function"><a name=
"ippDelete">ippDelete
</a></h3>
2799 <p class=
"description">Delete an IPP message.
</p>
2801 void ippDelete (
<br>
2802 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
2804 <h4 class=
"parameters">Parameters
</h4>
2807 <dd class=
"description">IPP message
</dd>
2809 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ippDeleteAttribute">ippDeleteAttribute
</a></h3>
2810 <p class=
"description">Delete a single attribute in an IPP message.
</p>
2812 void ippDeleteAttribute (
<br>
2813 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2814 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attr
<br>
2816 <h4 class=
"parameters">Parameters
</h4>
2819 <dd class=
"description">IPP message
</dd>
2821 <dd class=
"description">Attribute to delete
</dd>
2823 <h3 class=
"function"><a name=
"ippErrorString">ippErrorString
</a></h3>
2824 <p class=
"description">Return a name for the given status code.
</p>
2826 const char *ippErrorString (
<br>
2827 ipp_status_t error
<br>
2829 <h4 class=
"parameters">Parameters
</h4>
2832 <dd class=
"description">Error status
</dd>
2834 <h4 class=
"returnvalue">Return Value
</h4>
2835 <p class=
"description">Text string
</p>
2836 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ippErrorValue">ippErrorValue
</a></h3>
2837 <p class=
"description">Return a status code for the given name.
</p>
2839 ipp_status_t ippErrorValue (
<br>
2840 const char *name
<br>
2842 <h4 class=
"parameters">Parameters
</h4>
2845 <dd class=
"description">Name
</dd>
2847 <h4 class=
"returnvalue">Return Value
</h4>
2848 <p class=
"description">IPP status code
</p>
2849 <h3 class=
"function"><a name=
"ippFindAttribute">ippFindAttribute
</a></h3>
2850 <p class=
"description">Find a named attribute in a request...
</p>
2852 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindAttribute (
<br>
2853 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2854 const char *name,
<br>
2855 ipp_tag_t type
<br>
2857 <h4 class=
"parameters">Parameters
</h4>
2860 <dd class=
"description">IPP message
</dd>
2862 <dd class=
"description">Name of attribute
</dd>
2864 <dd class=
"description">Type of attribute
</dd>
2866 <h4 class=
"returnvalue">Return Value
</h4>
2867 <p class=
"description">Matching attribute
</p>
2868 <h3 class=
"function"><a name=
"ippFindNextAttribute">ippFindNextAttribute
</a></h3>
2869 <p class=
"description">Find the next named attribute in a request...
</p>
2871 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *ippFindNextAttribute (
<br>
2872 <a href=
"#ipp_t">ipp_t
</a> *ipp,
<br>
2873 const char *name,
<br>
2874 ipp_tag_t type
<br>
2876 <h4 class=
"parameters">Parameters
</h4>
2879 <dd class=
"description">IPP message
</dd>
2881 <dd class=
"description">Name of attribute
</dd>
2883 <dd class=
"description">Type of attribute
</dd>
2885 <h4 class=
"returnvalue">Return Value
</h4>
2886 <p class=
"description">Matching attribute
</p>
2887 <h3 class=
"function"><a name=
"ippLength">ippLength
</a></h3>
2888 <p class=
"description">Compute the length of an IPP message.
</p>
2890 size_t ippLength (
<br>
2891 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
2893 <h4 class=
"parameters">Parameters
</h4>
2896 <dd class=
"description">IPP message
</dd>
2898 <h4 class=
"returnvalue">Return Value
</h4>
2899 <p class=
"description">Size of IPP message
</p>
2900 <h3 class=
"function"><a name=
"ippNew">ippNew
</a></h3>
2901 <p class=
"description">Allocate a new IPP message.
</p>
2903 <a href=
"#ipp_t">ipp_t
</a> *ippNew (void);
</p>
2904 <h4 class=
"returnvalue">Return Value
</h4>
2905 <p class=
"description">New IPP message
</p>
2906 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ippNewRequest">ippNewRequest
</a></h3>
2907 <p class=
"description">Allocate a new IPP request message.
</p>
2909 <a href=
"#ipp_t">ipp_t
</a> *ippNewRequest (
<br>
2910 ipp_op_t op
<br>
2912 <h4 class=
"parameters">Parameters
</h4>
2915 <dd class=
"description">Operation code
</dd>
2917 <h4 class=
"returnvalue">Return Value
</h4>
2918 <p class=
"description">IPP request message
</p>
2919 <h4 class=
"discussion">Discussion
</h4>
2920 <p class=
"discussion">The new request message is initialized with the attributes-charset and
2921 attributes-natural-language attributes added. The
2922 attributes-natural-language value is derived from the current locale.
2925 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ippOpString">ippOpString
</a></h3>
2926 <p class=
"description">Return a name for the given operation id.
</p>
2928 const char *ippOpString (
<br>
2929 ipp_op_t op
<br>
2931 <h4 class=
"parameters">Parameters
</h4>
2934 <dd class=
"description">Operation ID
</dd>
2936 <h4 class=
"returnvalue">Return Value
</h4>
2937 <p class=
"description">Name
</p>
2938 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ippOpValue">ippOpValue
</a></h3>
2939 <p class=
"description">Return an operation id for the given name.
</p>
2941 ipp_op_t ippOpValue (
<br>
2942 const char *name
<br>
2944 <h4 class=
"parameters">Parameters
</h4>
2947 <dd class=
"description">Textual name
</dd>
2949 <h4 class=
"returnvalue">Return Value
</h4>
2950 <p class=
"description">Operation ID
</p>
2951 <h3 class=
"function"><a name=
"ippPort">ippPort
</a></h3>
2952 <p class=
"description">Return the default IPP port number.
</p>
2954 int ippPort (void);
</p>
2955 <h4 class=
"returnvalue">Return Value
</h4>
2956 <p class=
"description">Port number
</p>
2957 <h3 class=
"function"><a name=
"ippRead">ippRead
</a></h3>
2958 <p class=
"description">Read data for an IPP message from a HTTP connection.
</p>
2960 ipp_state_t ippRead (
<br>
2961 <a href=
"#http_t">http_t
</a> *http,
<br>
2962 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
2964 <h4 class=
"parameters">Parameters
</h4>
2967 <dd class=
"description">HTTP connection
</dd>
2969 <dd class=
"description">IPP data
</dd>
2971 <h4 class=
"returnvalue">Return Value
</h4>
2972 <p class=
"description">Current state
</p>
2973 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ippReadFile">ippReadFile
</a></h3>
2974 <p class=
"description">Read data for an IPP message from a file.
</p>
2976 ipp_state_t ippReadFile (
<br>
2977 int fd,
<br>
2978 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
2980 <h4 class=
"parameters">Parameters
</h4>
2983 <dd class=
"description">HTTP data
</dd>
2985 <dd class=
"description">IPP data
</dd>
2987 <h4 class=
"returnvalue">Return Value
</h4>
2988 <p class=
"description">Current state
</p>
2989 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ippReadIO">ippReadIO
</a></h3>
2990 <p class=
"description">Read data for an IPP message.
</p>
2992 ipp_state_t ippReadIO (
<br>
2993 void *src,
<br>
2994 <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br>
2995 int blocking,
<br>
2996 <a href=
"#ipp_t">ipp_t
</a> *parent,
<br>
2997 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
2999 <h4 class=
"parameters">Parameters
</h4>
3002 <dd class=
"description">Data source
</dd>
3004 <dd class=
"description">Read callback function
</dd>
3006 <dd class=
"description">Use blocking IO?
</dd>
3008 <dd class=
"description">Parent request, if any
</dd>
3010 <dd class=
"description">IPP data
</dd>
3012 <h4 class=
"returnvalue">Return Value
</h4>
3013 <p class=
"description">Current state
</p>
3014 <h3 class=
"function"><a name=
"ippSetPort">ippSetPort
</a></h3>
3015 <p class=
"description">Set the default port number.
</p>
3017 void ippSetPort (
<br>
3018 int p
<br>
3020 <h4 class=
"parameters">Parameters
</h4>
3023 <dd class=
"description">Port number to use
</dd>
3025 <h3 class=
"function"><a name=
"ippTimeToDate">ippTimeToDate
</a></h3>
3026 <p class=
"description">Convert from UNIX time to RFC
1903 format.
</p>
3028 const
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *ippTimeToDate (
<br>
3029 time_t t
<br>
3031 <h4 class=
"parameters">Parameters
</h4>
3034 <dd class=
"description">UNIX time value
</dd>
3036 <h4 class=
"returnvalue">Return Value
</h4>
3037 <p class=
"description">RFC-
1903 date/time data
</p>
3038 <h3 class=
"function"><a name=
"ippWrite">ippWrite
</a></h3>
3039 <p class=
"description">Write data for an IPP message to a HTTP connection.
</p>
3041 ipp_state_t ippWrite (
<br>
3042 <a href=
"#http_t">http_t
</a> *http,
<br>
3043 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3045 <h4 class=
"parameters">Parameters
</h4>
3048 <dd class=
"description">HTTP connection
</dd>
3050 <dd class=
"description">IPP data
</dd>
3052 <h4 class=
"returnvalue">Return Value
</h4>
3053 <p class=
"description">Current state
</p>
3054 <h3 class=
"function"><span class=
"info"> CUPS
1.1.19 </span><a name=
"ippWriteFile">ippWriteFile
</a></h3>
3055 <p class=
"description">Write data for an IPP message to a file.
</p>
3057 ipp_state_t ippWriteFile (
<br>
3058 int fd,
<br>
3059 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3061 <h4 class=
"parameters">Parameters
</h4>
3064 <dd class=
"description">HTTP data
</dd>
3066 <dd class=
"description">IPP data
</dd>
3068 <h4 class=
"returnvalue">Return Value
</h4>
3069 <p class=
"description">Current state
</p>
3070 <h3 class=
"function"><span class=
"info"> CUPS
1.2 </span><a name=
"ippWriteIO">ippWriteIO
</a></h3>
3071 <p class=
"description">Write data for an IPP message.
</p>
3073 ipp_state_t ippWriteIO (
<br>
3074 void *dst,
<br>
3075 <a href=
"#ipp_iocb_t">ipp_iocb_t
</a> cb,
<br>
3076 int blocking,
<br>
3077 <a href=
"#ipp_t">ipp_t
</a> *parent,
<br>
3078 <a href=
"#ipp_t">ipp_t
</a> *ipp
<br>
3080 <h4 class=
"parameters">Parameters
</h4>
3083 <dd class=
"description">Destination
</dd>
3085 <dd class=
"description">Write callback function
</dd>
3087 <dd class=
"description">Use blocking IO?
</dd>
3089 <dd class=
"description">Parent IPP message
</dd>
3091 <dd class=
"description">IPP data
</dd>
3093 <h4 class=
"returnvalue">Return Value
</h4>
3094 <p class=
"description">Current state
</p>
3095 <h2 class=
"title"><a name=
"TYPES">Data Types
</a></h2>
3096 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"http_addrlist_t">http_addrlist_t
</a></h3>
3097 <p class=
"description">Socket address list, which is
3098 used to enumerate all of the
3099 addresses that are associated
3100 with a hostname.
</p>
3102 typedef struct
<a href=
"#http_addrlist_s">http_addrlist_s
</a> / http_addrlist_t;
3104 <h3 class=
"typedef"><a name=
"http_auth_t">http_auth_t
</a></h3>
3105 <p class=
"description">HTTP authentication types
</p>
3107 typedef enum
<a href=
"#http_auth_e">http_auth_e
</a> http_auth_t;
3109 <h3 class=
"typedef"><a name=
"http_encoding_t">http_encoding_t
</a></h3>
3110 <p class=
"description">HTTP transfer encoding values
</p>
3112 typedef enum
<a href=
"#http_encoding_e">http_encoding_e
</a> http_encoding_t;
3114 <h3 class=
"typedef"><a name=
"http_encryption_t">http_encryption_t
</a></h3>
3115 <p class=
"description">HTTP encryption values
</p>
3117 typedef enum
<a href=
"#http_encryption_e">http_encryption_e
</a> http_encryption_t;
3119 <h3 class=
"typedef"><a name=
"http_t">http_t
</a></h3>
3120 <p class=
"description">HTTP connection type
</p>
3122 typedef struct _http_s http_t;
3124 <h3 class=
"typedef"><a name=
"ipp_attribute_t">ipp_attribute_t
</a></h3>
3125 <p class=
"description">Attribute
</p>
3127 typedef struct
<a href=
"#ipp_attribute_s">ipp_attribute_s
</a> ipp_attribute_t;
3129 <h3 class=
"typedef"><span class=
"info"> CUPS
1.2 </span><a name=
"ipp_iocb_t">ipp_iocb_t
</a></h3>
3130 <p class=
"description">IPP IO Callback Function
</p>
3132 typedef ssize_t (*ipp_iocb_t)(void *,
<a href=
"#ipp_uchar_t">ipp_uchar_t
</a> *, size_t);
3134 <h3 class=
"typedef"><a name=
"ipp_request_t">ipp_request_t
</a></h3>
3135 <p class=
"description">Request Header
</p>
3137 typedef union
<a href=
"#ipp_request_u">ipp_request_u
</a> ipp_request_t;
3139 <h3 class=
"typedef"><a name=
"ipp_t">ipp_t
</a></h3>
3140 <p class=
"description">Attribute Value
</p>
3142 typedef struct
<a href=
"#ipp_s">ipp_s
</a> ipp_t;
3144 <h3 class=
"typedef"><a name=
"ipp_uchar_t">ipp_uchar_t
</a></h3>
3145 <p class=
"description">IPP status codes...
</p>
3147 typedef typedef unsigned char ipp_uchar_t;
3149 <h3 class=
"typedef"><a name=
"ipp_value_t">ipp_value_t
</a></h3>
3150 <p class=
"description">New in CUPS
1.1.19</p>
3152 typedef union
<a href=
"#ipp_value_u">ipp_value_u
</a> ipp_value_t;
3154 <h2 class=
"title"><a name=
"STRUCTURES">Structures
</a></h2>
3155 <h3 class=
"struct"><span class=
"info"> CUPS
1.2 </span><a name=
"http_addrlist_s">http_addrlist_s
</a></h3>
3156 <p class=
"description">Socket address list, which is
3157 used to enumerate all of the
3158 addresses that are associated
3159 with a hostname.
</p>
3160 <p class=
"code">struct http_addrlist_s {
<br>
3161 <a href=
"#http_addr_t">http_addr_t
</a> addr;
<br>
3162 struct
<a href=
"#http_addrlist_s">http_addrlist_s
</a> *next;
<br>
3164 <h4 class=
"members">Members
</h4>
3167 <dd class=
"description">Address
</dd>
3169 <dd class=
"description">Pointer to next address in list
</dd>
3171 <h3 class=
"struct"><a name=
"ipp_attribute_s">ipp_attribute_s
</a></h3>
3172 <p class=
"description">Attribute
</p>
3173 <p class=
"code">struct ipp_attribute_s {
<br>
3174 char *name;
<br>
3175 struct
<a href=
"#ipp_attribute_s">ipp_attribute_s
</a> *next;
<br>
3176 int num_values;
<br>
3177 ipp_tag_t group_tag, value_tag;
<br>
3178 <a href=
"#ipp_value_t">ipp_value_t
</a> values[
1];
<br>
3180 <h4 class=
"members">Members
</h4>
3183 <dd class=
"description">Name of attribute
</dd>
3185 <dd class=
"description">Next attribute in list
</dd>
3186 <dt>num_values
</dt>
3187 <dd class=
"description">Number of values
</dd>
3189 <dd class=
"description">What type of value is it?
</dd>
3191 <dd class=
"description">Values
</dd>
3193 <h3 class=
"struct"><a name=
"ipp_s">ipp_s
</a></h3>
3194 <p class=
"description">IPP Request/Response/Notification
</p>
3195 <p class=
"code">struct ipp_s {
<br>
3196 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *attrs;
<br>
3197 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *current;
<br>
3198 ipp_tag_t curtag;
<br>
3199 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *last;
<br>
3200 <a href=
"#ipp_attribute_t">ipp_attribute_t
</a> *prev;
<br>
3201 <a href=
"#ipp_request_t">ipp_request_t
</a> request;
<br>
3202 ipp_state_t state;
<br>
3204 <h4 class=
"members">Members
</h4>
3207 <dd class=
"description">Attributes
</dd>
3209 <dd class=
"description">Current attribute (for read/write)
</dd>
3211 <dd class=
"description">Current attribute group tag
</dd>
3213 <dd class=
"description">Last attribute in list
</dd>
3215 <dd class=
"description">Previous attribute (for read)
</dd>
3217 <dd class=
"description">Request header
</dd>
3219 <dd class=
"description">State of request
</dd>
3221 <h2 class=
"title"><a name=
"UNIONS">Unions
</a></h2>
3222 <h3 class=
"union"><a name=
"ipp_request_u">ipp_request_u
</a></h3>
3223 <p class=
"description">Request Header
</p>
3224 <p class=
"code">union ipp_request_u {
<br>
3226 <h4 class=
"members">Members
</h4>
3229 <h3 class=
"union"><a name=
"ipp_value_u">ipp_value_u
</a></h3>
3230 <p class=
"description">New in CUPS
1.1.19</p>
3231 <p class=
"code">union ipp_value_u {
<br>
3232 char boolean;
<br>
3233 <a href=
"#ipp_t">ipp_t
</a> *collection;
<br>
3234 <a href=
"#ipp_uchar_t">ipp_uchar_t
</a> date[
11];
<br>
3235 int integer;
<br>
3237 <h4 class=
"members">Members
</h4>
3240 <dd class=
"description">Boolean value
</dd>
3241 <dt>collection
</dt>
3242 <dd class=
"description">Collection value
</dd>
3244 <dd class=
"description">Date/time value
</dd>
3246 <dd class=
"description">Integer/enumerated value
</dd>
3248 <h2 class=
"title"><a name=
"ENUMERATIONS">Constants
</a></h2>
3249 <h3 class=
"enumeration"><a name=
"http_auth_e">http_auth_e
</a></h3>
3250 <p class=
"description">HTTP authentication types
</p>
3251 <h4 class=
"constants">Constants
</h4>
3253 <dt>HTTP_AUTH_BASIC
</dt>
3254 <dd class=
"description">Basic authentication in use
</dd>
3255 <dt>HTTP_AUTH_MD5
</dt>
3256 <dd class=
"description">Digest authentication in use
</dd>
3257 <dt>HTTP_AUTH_MD5_INT
</dt>
3258 <dd class=
"description">Digest authentication in use for body
</dd>
3259 <dt>HTTP_AUTH_MD5_SESS
</dt>
3260 <dd class=
"description">MD5-session authentication in use
</dd>
3261 <dt>HTTP_AUTH_MD5_SESS_INT
</dt>
3262 <dd class=
"description">MD5-session authentication in use for body
</dd>
3263 <dt>HTTP_AUTH_NEGOTIATE
<span class=
"info"> CUPS
1.3 </span></dt>
3264 <dd class=
"description">GSSAPI authentication in use
</dd>
3265 <dt>HTTP_AUTH_NONE
</dt>
3266 <dd class=
"description">No authentication in use
</dd>
3268 <h3 class=
"enumeration"><a name=
"http_encoding_e">http_encoding_e
</a></h3>
3269 <p class=
"description">HTTP transfer encoding values
</p>
3270 <h4 class=
"constants">Constants
</h4>
3272 <dt>HTTP_ENCODE_CHUNKED
</dt>
3273 <dd class=
"description">Data is chunked
</dd>
3274 <dt>HTTP_ENCODE_FIELDS
</dt>
3275 <dd class=
"description">Sending HTTP fields
</dd>
3276 <dt>HTTP_ENCODE_LENGTH
</dt>
3277 <dd class=
"description">Data is sent with Content-Length
</dd>
3279 <h3 class=
"enumeration"><a name=
"http_encryption_e">http_encryption_e
</a></h3>
3280 <p class=
"description">HTTP encryption values
</p>
3281 <h4 class=
"constants">Constants
</h4>
3283 <dt>HTTP_ENCRYPT_ALWAYS
</dt>
3284 <dd class=
"description">Always encrypt (SSL)
</dd>
3285 <dt>HTTP_ENCRYPT_IF_REQUESTED
</dt>
3286 <dd class=
"description">Encrypt if requested (TLS upgrade)
</dd>
3287 <dt>HTTP_ENCRYPT_NEVER
</dt>
3288 <dd class=
"description">Never encrypt
</dd>
3289 <dt>HTTP_ENCRYPT_REQUIRED
</dt>
3290 <dd class=
"description">Encryption is required (TLS upgrade)
</dd>
3292 <h3 class=
"enumeration"><a name=
"http_field_e">http_field_e
</a></h3>
3293 <p class=
"description">HTTP field names
</p>
3294 <h4 class=
"constants">Constants
</h4>
3296 <dt>HTTP_FIELD_ACCEPT_LANGUAGE
</dt>
3297 <dd class=
"description">Accept-Language field
</dd>
3298 <dt>HTTP_FIELD_ACCEPT_RANGES
</dt>
3299 <dd class=
"description">Accept-Ranges field
</dd>
3300 <dt>HTTP_FIELD_AUTHORIZATION
</dt>
3301 <dd class=
"description">Authorization field
</dd>
3302 <dt>HTTP_FIELD_CONNECTION
</dt>
3303 <dd class=
"description">Connection field
</dd>
3304 <dt>HTTP_FIELD_CONTENT_ENCODING
</dt>
3305 <dd class=
"description">Content-Encoding field
</dd>
3306 <dt>HTTP_FIELD_CONTENT_LANGUAGE
</dt>
3307 <dd class=
"description">Content-Language field
</dd>
3308 <dt>HTTP_FIELD_CONTENT_LENGTH
</dt>
3309 <dd class=
"description">Content-Length field
</dd>
3310 <dt>HTTP_FIELD_CONTENT_LOCATION
</dt>
3311 <dd class=
"description">Content-Location field
</dd>
3312 <dt>HTTP_FIELD_CONTENT_MD5
</dt>
3313 <dd class=
"description">Content-MD5 field
</dd>
3314 <dt>HTTP_FIELD_CONTENT_RANGE
</dt>
3315 <dd class=
"description">Content-Range field
</dd>
3316 <dt>HTTP_FIELD_CONTENT_TYPE
</dt>
3317 <dd class=
"description">Content-Type field
</dd>
3318 <dt>HTTP_FIELD_CONTENT_VERSION
</dt>
3319 <dd class=
"description">Content-Version field
</dd>
3320 <dt>HTTP_FIELD_DATE
</dt>
3321 <dd class=
"description">Date field
</dd>
3322 <dt>HTTP_FIELD_HOST
</dt>
3323 <dd class=
"description">Host field
</dd>
3324 <dt>HTTP_FIELD_IF_MODIFIED_SINCE
</dt>
3325 <dd class=
"description">If-Modified-Since field
</dd>
3326 <dt>HTTP_FIELD_IF_UNMODIFIED_SINCE
</dt>
3327 <dd class=
"description">If-Unmodified-Since field
</dd>
3328 <dt>HTTP_FIELD_KEEP_ALIVE
</dt>
3329 <dd class=
"description">Keep-Alive field
</dd>
3330 <dt>HTTP_FIELD_LAST_MODIFIED
</dt>
3331 <dd class=
"description">Last-Modified field
</dd>
3332 <dt>HTTP_FIELD_LINK
</dt>
3333 <dd class=
"description">Link field
</dd>
3334 <dt>HTTP_FIELD_LOCATION
</dt>
3335 <dd class=
"description">Location field
</dd>
3336 <dt>HTTP_FIELD_MAX
</dt>
3337 <dd class=
"description">Maximum field index
</dd>
3338 <dt>HTTP_FIELD_RANGE
</dt>
3339 <dd class=
"description">Range field
</dd>
3340 <dt>HTTP_FIELD_REFERER
</dt>
3341 <dd class=
"description">Referer field
</dd>
3342 <dt>HTTP_FIELD_RETRY_AFTER
</dt>
3343 <dd class=
"description">Retry-After field
</dd>
3344 <dt>HTTP_FIELD_TRANSFER_ENCODING
</dt>
3345 <dd class=
"description">Transfer-Encoding field
</dd>
3346 <dt>HTTP_FIELD_UNKNOWN
</dt>
3347 <dd class=
"description">Unknown field
</dd>
3348 <dt>HTTP_FIELD_UPGRADE
</dt>
3349 <dd class=
"description">Upgrade field
</dd>
3350 <dt>HTTP_FIELD_USER_AGENT
</dt>
3351 <dd class=
"description">User-Agent field
</dd>
3352 <dt>HTTP_FIELD_WWW_AUTHENTICATE
</dt>
3353 <dd class=
"description">WWW-Authenticate field
</dd>
3355 <h3 class=
"enumeration"><a name=
"http_keepalive_e">http_keepalive_e
</a></h3>
3356 <p class=
"description">Types and structures...
</p>
3357 <h4 class=
"constants">Constants
</h4>
3359 <dt>HTTP_KEEPALIVE_OFF
</dt>
3360 <dd class=
"description">No keep alive support
</dd>
3361 <dt>HTTP_KEEPALIVE_ON
</dt>
3362 <dd class=
"description">Use keep alive
</dd>
3364 <h3 class=
"enumeration"><a name=
"http_state_e">http_state_e
</a></h3>
3365 <p class=
"description"></p>
3366 <h4 class=
"constants">Constants
</h4>
3368 <dt>HTTP_CLOSE
</dt>
3369 <dd class=
"description">CLOSE command, waiting for blank line
</dd>
3370 <dt>HTTP_DELETE
</dt>
3371 <dd class=
"description">DELETE command, waiting for blank line
</dd>
3373 <dd class=
"description">GET command, waiting for blank line
</dd>
3374 <dt>HTTP_GET_SEND
</dt>
3375 <dd class=
"description">GET command, sending data
</dd>
3377 <dd class=
"description">HEAD command, waiting for blank line
</dd>
3378 <dt>HTTP_OPTIONS
</dt>
3379 <dd class=
"description">OPTIONS command, waiting for blank line
</dd>
3381 <dd class=
"description">POST command, waiting for blank line
</dd>
3382 <dt>HTTP_POST_RECV
</dt>
3383 <dd class=
"description">POST command, receiving data
</dd>
3384 <dt>HTTP_POST_SEND
</dt>
3385 <dd class=
"description">POST command, sending data
</dd>
3387 <dd class=
"description">PUT command, waiting for blank line
</dd>
3388 <dt>HTTP_PUT_RECV
</dt>
3389 <dd class=
"description">PUT command, receiving data
</dd>
3390 <dt>HTTP_STATUS
</dt>
3391 <dd class=
"description">Command complete, sending status
</dd>
3392 <dt>HTTP_TRACE
</dt>
3393 <dd class=
"description">TRACE command, waiting for blank line
</dd>
3394 <dt>HTTP_WAITING
</dt>
3395 <dd class=
"description">Waiting for command
</dd>
3397 <h3 class=
"enumeration"><a name=
"http_status_e">http_status_e
</a></h3>
3398 <p class=
"description">HTTP status codes
</p>
3399 <h4 class=
"constants">Constants
</h4>
3401 <dt>HTTP_ACCEPTED
</dt>
3402 <dd class=
"description">DELETE command was successful
</dd>
3403 <dt>HTTP_BAD_GATEWAY
</dt>
3404 <dd class=
"description">Bad gateway
</dd>
3405 <dt>HTTP_BAD_REQUEST
</dt>
3406 <dd class=
"description">Bad request
</dd>
3407 <dt>HTTP_CONFLICT
</dt>
3408 <dd class=
"description">Request is self-conflicting
</dd>
3409 <dt>HTTP_CONTINUE
</dt>
3410 <dd class=
"description">Everything OK, keep going...
</dd>
3411 <dt>HTTP_CREATED
</dt>
3412 <dd class=
"description">PUT command was successful
</dd>
3413 <dt>HTTP_ERROR
</dt>
3414 <dd class=
"description">An error response from httpXxxx()
</dd>
3415 <dt>HTTP_EXPECTATION_FAILED
</dt>
3416 <dd class=
"description">The expectation given in an Expect header field was not met
</dd>
3417 <dt>HTTP_FORBIDDEN
</dt>
3418 <dd class=
"description">Forbidden to access this URI
</dd>
3419 <dt>HTTP_GATEWAY_TIMEOUT
</dt>
3420 <dd class=
"description">Gateway connection timed out
</dd>
3422 <dd class=
"description">Server has gone away
</dd>
3423 <dt>HTTP_LENGTH_REQUIRED
</dt>
3424 <dd class=
"description">A content length or encoding is required
</dd>
3425 <dt>HTTP_METHOD_NOT_ALLOWED
</dt>
3426 <dd class=
"description">Method is not allowed
</dd>
3427 <dt>HTTP_MOVED_PERMANENTLY
</dt>
3428 <dd class=
"description">Document has moved permanently
</dd>
3429 <dt>HTTP_MOVED_TEMPORARILY
</dt>
3430 <dd class=
"description">Document has moved temporarily
</dd>
3431 <dt>HTTP_MULTIPLE_CHOICES
</dt>
3432 <dd class=
"description">Multiple files match request
</dd>
3433 <dt>HTTP_NOT_ACCEPTABLE
</dt>
3434 <dd class=
"description">Not Acceptable
</dd>
3435 <dt>HTTP_NOT_AUTHORITATIVE
</dt>
3436 <dd class=
"description">Information isn't authoritative
</dd>
3437 <dt>HTTP_NOT_FOUND
</dt>
3438 <dd class=
"description">URI was not found
</dd>
3439 <dt>HTTP_NOT_IMPLEMENTED
</dt>
3440 <dd class=
"description">Feature not implemented
</dd>
3441 <dt>HTTP_NOT_MODIFIED
</dt>
3442 <dd class=
"description">File not modified
</dd>
3443 <dt>HTTP_NOT_SUPPORTED
</dt>
3444 <dd class=
"description">HTTP version not supported
</dd>
3445 <dt>HTTP_NO_CONTENT
</dt>
3446 <dd class=
"description">Successful command, no new data
</dd>
3448 <dd class=
"description">OPTIONS/GET/HEAD/POST/TRACE command was successful
</dd>
3449 <dt>HTTP_PARTIAL_CONTENT
</dt>
3450 <dd class=
"description">Only a partial file was recieved/sent
</dd>
3451 <dt>HTTP_PAYMENT_REQUIRED
</dt>
3452 <dd class=
"description">Payment required
</dd>
3453 <dt>HTTP_PRECONDITION
</dt>
3454 <dd class=
"description">Precondition failed
</dd>
3455 <dt>HTTP_PROXY_AUTHENTICATION
</dt>
3456 <dd class=
"description">Proxy Authentication is Required
</dd>
3457 <dt>HTTP_REQUESTED_RANGE
</dt>
3458 <dd class=
"description">The requested range is not satisfiable
</dd>
3459 <dt>HTTP_REQUEST_TIMEOUT
</dt>
3460 <dd class=
"description">Request timed out
</dd>
3461 <dt>HTTP_REQUEST_TOO_LARGE
</dt>
3462 <dd class=
"description">Request entity too large
</dd>
3463 <dt>HTTP_RESET_CONTENT
</dt>
3464 <dd class=
"description">Content was reset/recreated
</dd>
3465 <dt>HTTP_SEE_OTHER
</dt>
3466 <dd class=
"description">See this other link...
</dd>
3467 <dt>HTTP_SERVER_ERROR
</dt>
3468 <dd class=
"description">Internal server error
</dd>
3469 <dt>HTTP_SERVICE_UNAVAILABLE
</dt>
3470 <dd class=
"description">Service is unavailable
</dd>
3471 <dt>HTTP_SWITCHING_PROTOCOLS
</dt>
3472 <dd class=
"description">HTTP upgrade to TLS/SSL
</dd>
3473 <dt>HTTP_UNAUTHORIZED
</dt>
3474 <dd class=
"description">Unauthorized to access host
</dd>
3475 <dt>HTTP_UNSUPPORTED_MEDIATYPE
</dt>
3476 <dd class=
"description">The requested media type is unsupported
</dd>
3477 <dt>HTTP_UPGRADE_REQUIRED
</dt>
3478 <dd class=
"description">Upgrade to SSL/TLS required
</dd>
3479 <dt>HTTP_URI_TOO_LONG
</dt>
3480 <dd class=
"description">URI too long
</dd>
3481 <dt>HTTP_USE_PROXY
</dt>
3482 <dd class=
"description">Must use a proxy to access this URI
</dd>
3484 <h3 class=
"enumeration"><a name=
"http_uri_coding_e">http_uri_coding_e
</a></h3>
3485 <p class=
"description"></p>
3486 <h4 class=
"constants">Constants
</h4>
3488 <dt>HTTP_URI_CODING_ALL
</dt>
3489 <dd class=
"description">En/decode everything
</dd>
3490 <dt>HTTP_URI_CODING_HOSTNAME
</dt>
3491 <dd class=
"description">En/decode the hostname portion
</dd>
3492 <dt>HTTP_URI_CODING_MOST
</dt>
3493 <dd class=
"description">En/decode all but the query
</dd>
3494 <dt>HTTP_URI_CODING_NONE
</dt>
3495 <dd class=
"description">Don't en/decode anything
</dd>
3496 <dt>HTTP_URI_CODING_QUERY
</dt>
3497 <dd class=
"description">En/decode the query portion
</dd>
3498 <dt>HTTP_URI_CODING_RESOURCE
</dt>
3499 <dd class=
"description">En/decode the resource portion
</dd>
3500 <dt>HTTP_URI_CODING_USERNAME
</dt>
3501 <dd class=
"description">En/decode the username portion
</dd>
3503 <h3 class=
"enumeration"><a name=
"http_uri_status_e">http_uri_status_e
</a></h3>
3504 <p class=
"description"></p>
3505 <h4 class=
"constants">Constants
</h4>
3507 <dt>HTTP_URI_BAD_ARGUMENTS
</dt>
3508 <dd class=
"description">Bad arguments to function (error)
</dd>
3509 <dt>HTTP_URI_BAD_HOSTNAME
</dt>
3510 <dd class=
"description">Bad hostname in URI (error)
</dd>
3511 <dt>HTTP_URI_BAD_PORT
</dt>
3512 <dd class=
"description">Bad port number in URI (error)
</dd>
3513 <dt>HTTP_URI_BAD_RESOURCE
</dt>
3514 <dd class=
"description">Bad resource in URI (error)
</dd>
3515 <dt>HTTP_URI_BAD_SCHEME
</dt>
3516 <dd class=
"description">Bad scheme in URI (error)
</dd>
3517 <dt>HTTP_URI_BAD_URI
</dt>
3518 <dd class=
"description">Bad/empty URI (error)
</dd>
3519 <dt>HTTP_URI_BAD_USERNAME
</dt>
3520 <dd class=
"description">Bad username in URI (error)
</dd>
3521 <dt>HTTP_URI_MISSING_RESOURCE
</dt>
3522 <dd class=
"description">Missing resource in URI (warning)
</dd>
3523 <dt>HTTP_URI_MISSING_SCHEME
</dt>
3524 <dd class=
"description">Missing scheme in URI (warning)
</dd>
3525 <dt>HTTP_URI_OK
</dt>
3526 <dd class=
"description">URI decoded OK
</dd>
3527 <dt>HTTP_URI_OVERFLOW
</dt>
3528 <dd class=
"description">URI buffer for httpAssembleURI is too small
</dd>
3529 <dt>HTTP_URI_UNKNOWN_SCHEME
</dt>
3530 <dd class=
"description">Unknown scheme in URI (warning)
</dd>
3532 <h3 class=
"enumeration"><a name=
"http_version_e">http_version_e
</a></h3>
3533 <p class=
"description"></p>
3534 <h4 class=
"constants">Constants
</h4>
3537 <dd class=
"description">HTTP/
0.9</dd>
3539 <dd class=
"description">HTTP/
1.0</dd>
3541 <dd class=
"description">HTTP/
1.1</dd>
3543 <h3 class=
"enumeration"><a name=
"ipp_finish_e">ipp_finish_e
</a></h3>
3544 <p class=
"description"></p>
3545 <h4 class=
"constants">Constants
</h4>
3547 <dt>IPP_FINISHINGS_BALE
</dt>
3548 <dd class=
"description">Bale (any type)
</dd>
3549 <dt>IPP_FINISHINGS_BIND
</dt>
3550 <dd class=
"description">Bind
</dd>
3551 <dt>IPP_FINISHINGS_BIND_BOTTOM
</dt>
3552 <dd class=
"description">Bind on bottom
</dd>
3553 <dt>IPP_FINISHINGS_BIND_LEFT
</dt>
3554 <dd class=
"description">Bind on left
</dd>
3555 <dt>IPP_FINISHINGS_BIND_RIGHT
</dt>
3556 <dd class=
"description">Bind on right
</dd>
3557 <dt>IPP_FINISHINGS_BIND_TOP
</dt>
3558 <dd class=
"description">Bind on top
</dd>
3559 <dt>IPP_FINISHINGS_BOOKLET_MAKER
</dt>
3560 <dd class=
"description">Fold to make booklet
</dd>
3561 <dt>IPP_FINISHINGS_COVER
</dt>
3562 <dd class=
"description">Add cover
</dd>
3563 <dt>IPP_FINISHINGS_EDGE_STITCH
</dt>
3564 <dd class=
"description">Stitch along any side
</dd>
3565 <dt>IPP_FINISHINGS_EDGE_STITCH_BOTTOM
</dt>
3566 <dd class=
"description">Stitch along bottom edge
</dd>
3567 <dt>IPP_FINISHINGS_EDGE_STITCH_LEFT
</dt>
3568 <dd class=
"description">Stitch along left side
</dd>
3569 <dt>IPP_FINISHINGS_EDGE_STITCH_RIGHT
</dt>
3570 <dd class=
"description">Stitch along right side
</dd>
3571 <dt>IPP_FINISHINGS_EDGE_STITCH_TOP
</dt>
3572 <dd class=
"description">Stitch along top edge
</dd>
3573 <dt>IPP_FINISHINGS_FOLD
</dt>
3574 <dd class=
"description">Fold (any type)
</dd>
3575 <dt>IPP_FINISHINGS_JOB_OFFSET
</dt>
3576 <dd class=
"description">Offset for binding (any type)
</dd>
3577 <dt>IPP_FINISHINGS_NONE
</dt>
3578 <dd class=
"description">No finishing
</dd>
3579 <dt>IPP_FINISHINGS_PUNCH
</dt>
3580 <dd class=
"description">Punch (any location/count)
</dd>
3581 <dt>IPP_FINISHINGS_SADDLE_STITCH
</dt>
3582 <dd class=
"description">Staple interior
</dd>
3583 <dt>IPP_FINISHINGS_STAPLE
</dt>
3584 <dd class=
"description">Staple (any location)
</dd>
3585 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_LEFT
</dt>
3586 <dd class=
"description">Staple bottom left corner
</dd>
3587 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT
</dt>
3588 <dd class=
"description">Staple bottom right corner
</dd>
3589 <dt>IPP_FINISHINGS_STAPLE_DUAL_BOTTOM
</dt>
3590 <dd class=
"description">Two staples on bottom
</dd>
3591 <dt>IPP_FINISHINGS_STAPLE_DUAL_LEFT
</dt>
3592 <dd class=
"description">Two staples on left
</dd>
3593 <dt>IPP_FINISHINGS_STAPLE_DUAL_RIGHT
</dt>
3594 <dd class=
"description">Two staples on right
</dd>
3595 <dt>IPP_FINISHINGS_STAPLE_DUAL_TOP
</dt>
3596 <dd class=
"description">Two staples on top
</dd>
3597 <dt>IPP_FINISHINGS_STAPLE_TOP_LEFT
</dt>
3598 <dd class=
"description">Staple top left corner
</dd>
3599 <dt>IPP_FINISHINGS_STAPLE_TOP_RIGHT
</dt>
3600 <dd class=
"description">Staple top right corner
</dd>
3601 <dt>IPP_FINISHINGS_TRIM
</dt>
3602 <dd class=
"description">Trim (any type)
</dd>
3604 <h3 class=
"enumeration"><a name=
"ipp_jstate_e">ipp_jstate_e
</a></h3>
3605 <p class=
"description"></p>
3606 <h4 class=
"constants">Constants
</h4>
3608 <dt>IPP_JOB_ABORTED
</dt>
3609 <dd class=
"description">Job has aborted due to error
</dd>
3610 <dt>IPP_JOB_CANCELED
</dt>
3611 <dd class=
"description">Job has been canceled
</dd>
3612 <dt>IPP_JOB_COMPLETED
</dt>
3613 <dd class=
"description">Job has completed successfully
</dd>
3614 <dt>IPP_JOB_HELD
</dt>
3615 <dd class=
"description">Job is held for printing
</dd>
3616 <dt>IPP_JOB_PENDING
</dt>
3617 <dd class=
"description">Job is waiting to be printed
</dd>
3618 <dt>IPP_JOB_PROCESSING
</dt>
3619 <dd class=
"description">Job is currently printing
</dd>
3620 <dt>IPP_JOB_STOPPED
</dt>
3621 <dd class=
"description">Job has been stopped
</dd>
3623 <h3 class=
"enumeration"><a name=
"ipp_op_e">ipp_op_e
</a></h3>
3624 <p class=
"description"></p>
3625 <h4 class=
"constants">Constants
</h4>
3627 <dt>CUPS_ACCEPT_JOBS
</dt>
3628 <dd class=
"description">Accept new jobs on a printer
</dd>
3629 <dt>CUPS_ADD_MODIFY_CLASS
</dt>
3630 <dd class=
"description">Add or modify a class
</dd>
3631 <dt>CUPS_ADD_MODIFY_PRINTER
</dt>
3632 <dd class=
"description">Add or modify a printer
</dd>
3633 <dt>CUPS_AUTHENTICATE_JOB
<span class=
"info"> CUPS
1.2 </span></dt>
3634 <dd class=
"description">Authenticate a job
</dd>
3635 <dt>CUPS_DELETE_CLASS
</dt>
3636 <dd class=
"description">Delete a class
</dd>
3637 <dt>CUPS_DELETE_PRINTER
</dt>
3638 <dd class=
"description">Delete a printer
</dd>
3639 <dt>CUPS_GET_CLASSES
<span class=
"info"> DEPRECATED
</span></dt>
3640 <dd class=
"description">Get a list of classes
</dd>
3641 <dt>CUPS_GET_DEFAULT
</dt>
3642 <dd class=
"description">Get the default printer
</dd>
3643 <dt>CUPS_GET_DEVICES
</dt>
3644 <dd class=
"description">Get a list of supported devices
</dd>
3645 <dt>CUPS_GET_DOCUMENT
<span class=
"info"> CUPS
1.4 </span></dt>
3646 <dd class=
"description">Get a document file
</dd>
3647 <dt>CUPS_GET_PPD
<span class=
"info"> CUPS
1.3 </span></dt>
3648 <dd class=
"description">Get a PPD file
</dd>
3649 <dt>CUPS_GET_PPDS
</dt>
3650 <dd class=
"description">Get a list of supported drivers
</dd>
3651 <dt>CUPS_GET_PRINTERS
</dt>
3652 <dd class=
"description">Get a list of printers and/or classes
</dd>
3653 <dt>CUPS_MOVE_JOB
</dt>
3654 <dd class=
"description">Move a job to a different printer
</dd>
3655 <dt>CUPS_REJECT_JOBS
</dt>
3656 <dd class=
"description">Reject new jobs on a printer
</dd>
3657 <dt>CUPS_SET_DEFAULT
</dt>
3658 <dd class=
"description">Set the default printer
</dd>
3659 <dt>IPP_CANCEL_JOB
</dt>
3660 <dd class=
"description">Cancel a job
</dd>
3661 <dt>IPP_CANCEL_SUBSCRIPTION
<span class=
"info"> CUPS
1.2 </span></dt>
3662 <dd class=
"description">Cancel a subscription
</dd>
3663 <dt>IPP_CREATE_JOB
</dt>
3664 <dd class=
"description">Create an empty print job
</dd>
3665 <dt>IPP_CREATE_JOB_SUBSCRIPTION
<span class=
"info"> CUPS
1.2 </span></dt>
3666 <dd class=
"description">Create a job subscription
</dd>
3667 <dt>IPP_CREATE_PRINTER_SUBSCRIPTION
<span class=
"info"> CUPS
1.2 </span></dt>
3668 <dd class=
"description">Create a printer subscription
</dd>
3669 <dt>IPP_DISABLE_PRINTER
</dt>
3670 <dd class=
"description">Stop a printer
</dd>
3671 <dt>IPP_ENABLE_PRINTER
</dt>
3672 <dd class=
"description">Start a printer
</dd>
3673 <dt>IPP_GET_JOBS
</dt>
3674 <dd class=
"description">Get a list of jobs
</dd>
3675 <dt>IPP_GET_JOB_ATTRIBUTES
</dt>
3676 <dd class=
"description">Get job attributes
</dd>
3677 <dt>IPP_GET_NOTIFICATIONS
<span class=
"info"> CUPS
1.2 </span></dt>
3678 <dd class=
"description">Get notification events
</dd>
3679 <dt>IPP_GET_PRINTER_ATTRIBUTES
</dt>
3680 <dd class=
"description">Get printer attributes
</dd>
3681 <dt>IPP_GET_PRINTER_SUPPORTED_VALUES
</dt>
3682 <dd class=
"description">Get supported attribute values
</dd>
3683 <dt>IPP_GET_SUBSCRIPTIONS
<span class=
"info"> CUPS
1.2 </span></dt>
3684 <dd class=
"description">Get list of subscriptions
</dd>
3685 <dt>IPP_GET_SUBSCRIPTION_ATTRIBUTES
<span class=
"info"> CUPS
1.2 </span></dt>
3686 <dd class=
"description">Get subscription attributes
</dd>
3687 <dt>IPP_HOLD_JOB
</dt>
3688 <dd class=
"description">Hold a job for printing
</dd>
3689 <dt>IPP_PAUSE_PRINTER
</dt>
3690 <dd class=
"description">Stop a printer
</dd>
3691 <dt>IPP_PRINT_JOB
</dt>
3692 <dd class=
"description">Print a single file
</dd>
3693 <dt>IPP_PURGE_JOBS
</dt>
3694 <dd class=
"description">Cancel all jobs
</dd>
3695 <dt>IPP_RELEASE_JOB
</dt>
3696 <dd class=
"description">Release a job for printing
</dd>
3697 <dt>IPP_RENEW_SUBSCRIPTION
<span class=
"info"> CUPS
1.2 </span></dt>
3698 <dd class=
"description">Renew a printer subscription
</dd>
3699 <dt>IPP_RESTART_JOB
</dt>
3700 <dd class=
"description">Reprint a job
</dd>
3701 <dt>IPP_RESUME_PRINTER
</dt>
3702 <dd class=
"description">Start a printer
</dd>
3703 <dt>IPP_SEND_DOCUMENT
</dt>
3704 <dd class=
"description">Add a file to a job
</dd>
3705 <dt>IPP_SET_JOB_ATTRIBUTES
</dt>
3706 <dd class=
"description">Set job attributes
</dd>
3707 <dt>IPP_VALIDATE_JOB
</dt>
3708 <dd class=
"description">Validate job options
</dd>
3710 <h3 class=
"enumeration"><a name=
"ipp_orient_e">ipp_orient_e
</a></h3>
3711 <p class=
"description"></p>
3712 <h4 class=
"constants">Constants
</h4>
3714 <dt>IPP_LANDSCAPE
</dt>
3715 <dd class=
"description">90 degrees counter-clockwise
</dd>
3716 <dt>IPP_PORTRAIT
</dt>
3717 <dd class=
"description">No rotation
</dd>
3718 <dt>IPP_REVERSE_LANDSCAPE
</dt>
3719 <dd class=
"description">90 degrees clockwise
</dd>
3720 <dt>IPP_REVERSE_PORTRAIT
</dt>
3721 <dd class=
"description">180 degrees
</dd>
3723 <h3 class=
"enumeration"><a name=
"ipp_pstate_e">ipp_pstate_e
</a></h3>
3724 <p class=
"description"></p>
3725 <h4 class=
"constants">Constants
</h4>
3727 <dt>IPP_PRINTER_IDLE
</dt>
3728 <dd class=
"description">Printer is idle
</dd>
3729 <dt>IPP_PRINTER_PROCESSING
</dt>
3730 <dd class=
"description">Printer is working
</dd>
3731 <dt>IPP_PRINTER_STOPPED
</dt>
3732 <dd class=
"description">Printer is stopped
</dd>
3734 <h3 class=
"enumeration"><a name=
"ipp_quality_e">ipp_quality_e
</a></h3>
3735 <p class=
"description"></p>
3736 <h4 class=
"constants">Constants
</h4>
3738 <dt>IPP_QUALITY_DRAFT
</dt>
3739 <dd class=
"description">Draft quality
</dd>
3740 <dt>IPP_QUALITY_HIGH
</dt>
3741 <dd class=
"description">High quality
</dd>
3742 <dt>IPP_QUALITY_NORMAL
</dt>
3743 <dd class=
"description">Normal quality
</dd>
3745 <h3 class=
"enumeration"><a name=
"ipp_res_e">ipp_res_e
</a></h3>
3746 <p class=
"description">Types and structures...
</p>
3747 <h4 class=
"constants">Constants
</h4>
3749 <dt>IPP_RES_PER_CM
</dt>
3750 <dd class=
"description">Pixels per centimeter
</dd>
3751 <dt>IPP_RES_PER_INCH
</dt>
3752 <dd class=
"description">Pixels per inch
</dd>
3754 <h3 class=
"enumeration"><a name=
"ipp_state_e">ipp_state_e
</a></h3>
3755 <p class=
"description"></p>
3756 <h4 class=
"constants">Constants
</h4>
3758 <dt>IPP_ATTRIBUTE
</dt>
3759 <dd class=
"description">One or more attributes need to be sent/received
</dd>
3761 <dd class=
"description">IPP request data needs to be sent/received
</dd>
3763 <dd class=
"description">An error occurred
</dd>
3764 <dt>IPP_HEADER
</dt>
3765 <dd class=
"description">The request header needs to be sent/received
</dd>
3767 <dd class=
"description">Nothing is happening/request completed
</dd>
3769 <h3 class=
"enumeration"><a name=
"ipp_status_e">ipp_status_e
</a></h3>
3770 <p class=
"description">IPP status codes...
</p>
3771 <h4 class=
"constants">Constants
</h4>
3773 <dt>CUPS_SEE_OTHER
</dt>
3774 <dd class=
"description">cups-see-other
</dd>
3775 <dt>IPP_ATTRIBUTES
</dt>
3776 <dd class=
"description">client-error-attributes-or-values-not-supported
</dd>
3777 <dt>IPP_ATTRIBUTES_NOT_SETTABLE
</dt>
3778 <dd class=
"description">client-error-attributes-not-settable
</dd>
3779 <dt>IPP_BAD_REQUEST
</dt>
3780 <dd class=
"description">client-error-bad-request
</dd>
3781 <dt>IPP_CHARSET
</dt>
3782 <dd class=
"description">client-error-charset-not-supported
</dd>
3783 <dt>IPP_COMPRESSION_ERROR
</dt>
3784 <dd class=
"description">client-error-compression-error
</dd>
3785 <dt>IPP_COMPRESSION_NOT_SUPPORTED
</dt>
3786 <dd class=
"description">client-error-compression-not-supported
</dd>
3787 <dt>IPP_CONFLICT
</dt>
3788 <dd class=
"description">client-error-conflicting-attributes
</dd>
3789 <dt>IPP_DEVICE_ERROR
</dt>
3790 <dd class=
"description">server-error-device-error
</dd>
3791 <dt>IPP_DOCUMENT_ACCESS_ERROR
</dt>
3792 <dd class=
"description">client-error-document-access-error
</dd>
3793 <dt>IPP_DOCUMENT_FORMAT
</dt>
3794 <dd class=
"description">client-error-document-format-not-supported
</dd>
3795 <dt>IPP_DOCUMENT_FORMAT_ERROR
</dt>
3796 <dd class=
"description">client-error-document-format-error
</dd>
3797 <dt>IPP_ERROR_JOB_CANCELED
</dt>
3798 <dd class=
"description">server-error-job-canceled
</dd>
3799 <dt>IPP_FORBIDDEN
</dt>
3800 <dd class=
"description">client-error-forbidden
</dd>
3802 <dd class=
"description">client-error-gone
</dd>
3803 <dt>IPP_IGNORED_ALL_NOTIFICATIONS
</dt>
3804 <dd class=
"description">client-error-ignored-all-notifications
</dd>
3805 <dt>IPP_IGNORED_ALL_SUBSCRIPTIONS
</dt>
3806 <dd class=
"description">client-error-ignored-all-subscriptions
</dd>
3807 <dt>IPP_INTERNAL_ERROR
</dt>
3808 <dd class=
"description">server-error-internal-error
</dd>
3809 <dt>IPP_MULTIPLE_JOBS_NOT_SUPPORTED
</dt>
3810 <dd class=
"description">server-error-multiple-document-jobs-not-supported
</dd>
3811 <dt>IPP_NOT_ACCEPTING
</dt>
3812 <dd class=
"description">server-error-not-accepting-jobs
</dd>
3813 <dt>IPP_NOT_AUTHENTICATED
</dt>
3814 <dd class=
"description">client-error-not-authenticated
</dd>
3815 <dt>IPP_NOT_AUTHORIZED
</dt>
3816 <dd class=
"description">client-error-not-authorized
</dd>
3817 <dt>IPP_NOT_FOUND
</dt>
3818 <dd class=
"description">client-error-not-found
</dd>
3819 <dt>IPP_NOT_POSSIBLE
</dt>
3820 <dd class=
"description">client-error-not-possible
</dd>
3822 <dd class=
"description">successful-ok
</dd>
3823 <dt>IPP_OK_BUT_CANCEL_SUBSCRIPTION
</dt>
3824 <dd class=
"description">successful-ok-but-cancel-subscription
</dd>
3825 <dt>IPP_OK_CONFLICT
</dt>
3826 <dd class=
"description">successful-ok-conflicting-attributes
</dd>
3827 <dt>IPP_OK_EVENTS_COMPLETE
</dt>
3828 <dd class=
"description">successful-ok-events-complete
</dd>
3829 <dt>IPP_OK_IGNORED_NOTIFICATIONS
</dt>
3830 <dd class=
"description">successful-ok-ignored-notifications
</dd>
3831 <dt>IPP_OK_IGNORED_SUBSCRIPTIONS
</dt>
3832 <dd class=
"description">successful-ok-ignored-subscriptions
</dd>
3833 <dt>IPP_OK_SUBST
</dt>
3834 <dd class=
"description">successful-ok-ignored-or-substituted-attributes
</dd>
3835 <dt>IPP_OK_TOO_MANY_EVENTS
</dt>
3836 <dd class=
"description">successful-ok-too-many-events
</dd>
3837 <dt>IPP_OPERATION_NOT_SUPPORTED
</dt>
3838 <dd class=
"description">server-error-operation-not-supported
</dd>
3839 <dt>IPP_PRINTER_BUSY
</dt>
3840 <dd class=
"description">server-error-busy
</dd>
3841 <dt>IPP_PRINTER_IS_DEACTIVATED
</dt>
3842 <dd class=
"description">server-error-printer-is-deactivated
</dd>
3843 <dt>IPP_PRINT_SUPPORT_FILE_NOT_FOUND
</dt>
3844 <dd class=
"description">client-error-print-support-file-not-found
</dd>
3845 <dt>IPP_REQUEST_ENTITY
</dt>
3846 <dd class=
"description">client-error-request-entity-too-large
</dd>
3847 <dt>IPP_REQUEST_VALUE
</dt>
3848 <dd class=
"description">client-error-request-value-too-long
</dd>
3849 <dt>IPP_SERVICE_UNAVAILABLE
</dt>
3850 <dd class=
"description">server-error-service-unavailable
</dd>
3851 <dt>IPP_TEMPORARY_ERROR
</dt>
3852 <dd class=
"description">server-error-temporary-error
</dd>
3853 <dt>IPP_TIMEOUT
</dt>
3854 <dd class=
"description">client-error-timeout
</dd>
3855 <dt>IPP_TOO_MANY_SUBSCRIPTIONS
</dt>
3856 <dd class=
"description">client-error-too-many-subscriptions
</dd>
3857 <dt>IPP_URI_SCHEME
</dt>
3858 <dd class=
"description">client-error-uri-scheme-not-supported
</dd>
3859 <dt>IPP_VERSION_NOT_SUPPORTED
</dt>
3860 <dd class=
"description">server-error-version-not-supported
</dd>
3862 <h3 class=
"enumeration"><a name=
"ipp_tag_e">ipp_tag_e
</a></h3>
3863 <p class=
"description">Format tags for attributes...
</p>
3864 <h4 class=
"constants">Constants
</h4>
3866 <dt>IPP_TAG_ADMINDEFINE
</dt>
3867 <dd class=
"description">Admin-defined value
</dd>
3868 <dt>IPP_TAG_BEGIN_COLLECTION
</dt>
3869 <dd class=
"description">Beginning of collection value
</dd>
3870 <dt>IPP_TAG_BOOLEAN
</dt>
3871 <dd class=
"description">Boolean value
</dd>
3872 <dt>IPP_TAG_CHARSET
</dt>
3873 <dd class=
"description">Character set value
</dd>
3874 <dt>IPP_TAG_COPY
</dt>
3875 <dd class=
"description">Bitflag for copied attribute values
</dd>
3876 <dt>IPP_TAG_DATE
</dt>
3877 <dd class=
"description">Date/time value
</dd>
3878 <dt>IPP_TAG_DEFAULT
</dt>
3879 <dd class=
"description">Default value
</dd>
3880 <dt>IPP_TAG_DELETEATTR
</dt>
3881 <dd class=
"description">Delete-attribute value
</dd>
3882 <dt>IPP_TAG_END
</dt>
3883 <dd class=
"description">End-of-attributes
</dd>
3884 <dt>IPP_TAG_END_COLLECTION
</dt>
3885 <dd class=
"description">End of collection value
</dd>
3886 <dt>IPP_TAG_ENUM
</dt>
3887 <dd class=
"description">Enumeration value
</dd>
3888 <dt>IPP_TAG_EVENT_NOTIFICATION
</dt>
3889 <dd class=
"description">Event group
</dd>
3890 <dt>IPP_TAG_INTEGER
</dt>
3891 <dd class=
"description">Integer value
</dd>
3892 <dt>IPP_TAG_JOB
</dt>
3893 <dd class=
"description">Job group
</dd>
3894 <dt>IPP_TAG_KEYWORD
</dt>
3895 <dd class=
"description">Keyword value
</dd>
3896 <dt>IPP_TAG_LANGUAGE
</dt>
3897 <dd class=
"description">Language value
</dd>
3898 <dt>IPP_TAG_MASK
</dt>
3899 <dd class=
"description">Mask for copied attribute values
</dd>
3900 <dt>IPP_TAG_MEMBERNAME
</dt>
3901 <dd class=
"description">Collection member name value
</dd>
3902 <dt>IPP_TAG_MIMETYPE
</dt>
3903 <dd class=
"description">MIME media type value
</dd>
3904 <dt>IPP_TAG_NAME
</dt>
3905 <dd class=
"description">Name value
</dd>
3906 <dt>IPP_TAG_NAMELANG
</dt>
3907 <dd class=
"description">Name-with-language value
</dd>
3908 <dt>IPP_TAG_NOTSETTABLE
</dt>
3909 <dd class=
"description">Not-settable value
</dd>
3910 <dt>IPP_TAG_NOVALUE
</dt>
3911 <dd class=
"description">No-value value
</dd>
3912 <dt>IPP_TAG_OPERATION
</dt>
3913 <dd class=
"description">Operation group
</dd>
3914 <dt>IPP_TAG_PRINTER
</dt>
3915 <dd class=
"description">Printer group
</dd>
3916 <dt>IPP_TAG_RANGE
</dt>
3917 <dd class=
"description">Range value
</dd>
3918 <dt>IPP_TAG_RESOLUTION
</dt>
3919 <dd class=
"description">Resolution value
</dd>
3920 <dt>IPP_TAG_STRING
</dt>
3921 <dd class=
"description">Octet string value
</dd>
3922 <dt>IPP_TAG_SUBSCRIPTION
</dt>
3923 <dd class=
"description">Subscription group
</dd>
3924 <dt>IPP_TAG_TEXT
</dt>
3925 <dd class=
"description">Text value
</dd>
3926 <dt>IPP_TAG_TEXTLANG
</dt>
3927 <dd class=
"description">Text-with-language value
</dd>
3928 <dt>IPP_TAG_UNKNOWN
</dt>
3929 <dd class=
"description">Unknown value
</dd>
3930 <dt>IPP_TAG_UNSUPPORTED_GROUP
</dt>
3931 <dd class=
"description">Unsupported attributes group
</dd>
3932 <dt>IPP_TAG_UNSUPPORTED_VALUE
</dt>
3933 <dd class=
"description">Unsupported value
</dd>
3934 <dt>IPP_TAG_URI
</dt>
3935 <dd class=
"description">URI value
</dd>
3936 <dt>IPP_TAG_URISCHEME
</dt>
3937 <dd class=
"description">URI scheme value
</dd>
3938 <dt>IPP_TAG_ZERO
</dt>
3939 <dd class=
"description">Zero tag - used for separators
</dd>