]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Update CUPS filter/backend programming guide (STR #4355)
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 27 Mar 2014 20:57:18 +0000 (20:57 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 27 Mar 2014 20:57:18 +0000 (20:57 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11758 a1ca3aef-8c08-0410-bb20-df032aa958be

18 files changed:
CHANGES-1.7.txt
cups/api-filter.header
cups/api-filter.shtml
doc/help/api-array.html
doc/help/api-cgi.html
doc/help/api-cups.html
doc/help/api-filedir.html
doc/help/api-filter.html
doc/help/api-httpipp.html
doc/help/api-mime.html
doc/help/api-overview.html
doc/help/api-ppd.html
doc/help/api-ppdc.html
doc/help/api-raster.html
doc/help/postscript-driver.html
doc/help/ppd-compiler.html
doc/help/raster-driver.html
doc/help/spec-ppd.html

index c52c40dda2095010815feb25ca42f62f943f9228..1b775808756627ad9ce915108dcb219e17574734 100644 (file)
@@ -5,7 +5,7 @@ CHANGES IN CUPS V1.7.2
 
        - Security: The scheduler now blocks URLs containing embedded HTML
          (STR #4356)
-       - Documentation fixes (STR #3259, STR #4346)
+       - Documentation fixes (STR #3259, STR #4346, STR #4355)
        - Fixed the Japanese localization (STR #4385)
        - Added a German localization (STR #4363)
        - Fixed documentation and naming of Create-Job/Printer-Subscriptions
index 5b7ee181fbb63cf8eaa2a59a17001bd78a2eb72a..303145212d978184e91607e3eb42eb92327046aa 100644 (file)
@@ -3,7 +3,7 @@
 
   Filter and backend programming header for CUPS.
 
-  Copyright 2008-2011 by Apple Inc.
+  Copyright 2008-2014 by Apple Inc.
 
   These coded instructions, statements, and computer programs are the
   property of Apple Inc. and are protected by Federal copyright
index 3f912ba8644738786a0faf72d907acea8b4a1673..4b8372eddad88110de830d8e1a9a983eb0f73483 100644 (file)
@@ -237,7 +237,7 @@ prefix strings:</p>
        <code>marker-types</code>, <code>printer-alert</code>, and
        <code>printer-alert-description</code> printer attributes. Standard
        <code>marker-types</code> values are listed in <a href='#TABLE1'>Table
-       1</a>.</dd>
+       1</a>. String values need special handling - see <a href="#ATTR_STRINGS">Reporting Attribute String Values</a> below.</dd>
 
        <dt>CRIT: message</dt>
        <dd>Sets the printer-state-message attribute and adds the specified
@@ -320,11 +320,11 @@ the "DEBUG:" prefix string.</p>
        <td>Fuser unit</td>
 </tr>
 <tr>
-       <td>fuserCleaningPad</td>
+       <td>fuser-cleaning-pad</td>
        <td>Fuser cleaning pad</td>
 </tr>
 <tr>
-       <td>fuserOil</td>
+       <td>fuser-oil</td>
        <td>Fuser oil</td>
 </tr>
 <tr>
@@ -336,7 +336,7 @@ the "DEBUG:" prefix string.</p>
        <td>Photo conductor</td>
 </tr>
 <tr>
-       <td>solidWax</td>
+       <td>solid-wax</td>
        <td>Wax supply</td>
 </tr>
 <tr>
@@ -348,19 +348,19 @@ the "DEBUG:" prefix string.</p>
        <td>Toner supply</td>
 </tr>
 <tr>
-       <td>transferUnit</td>
+       <td>transfer-unit</td>
        <td>Transfer unit</td>
 </tr>
 <tr>
-       <td>wasteInk</td>
+       <td>waste-ink</td>
        <td>Waste ink tank</td>
 </tr>
 <tr>
-       <td>wasteToner</td>
+       <td>waste-toner</td>
        <td>Waste toner tank</td>
 </tr>
 <tr>
-       <td>wasteWax</td>
+       <td>waste-wax</td>
        <td>Waste wax tank</td>
 </tr>
 </tbody>
@@ -440,6 +440,95 @@ the "DEBUG:" prefix string.</p>
 </tbody>
 </table></div>
 
+
+<h4><a name="ATTR_STRINGS">Reporting Attribute String Values</a></h4>
+
+<p>When reporting string values using "ATTR:" messages, a filter or backend must take special care to appropriately quote those values. The scheduler uses the CUPS option parsing code for attributes, so the general syntax is:</p>
+
+<pre class="example">
+name=simple
+name=simple,simple,...
+name='complex value'
+name="complex value"
+name='"complex value"','"complex value"',...
+</pre>
+
+<p>Simple values are strings that do not contain spaces, quotes, backslashes, or the comma and can be placed verbatim in the "ATTR:" message, for example:</p>
+
+<pre class="example">
+int levels[4] = { 40, 50, 60, 70 }; /* CMYK */
+
+fputs("ATTR: marker-colors=#00FFFF,#FF00FF,#FFFF00,#000000\n", stderr);
+fputs("ATTR: marker-high-levels=100,100,100,100\n", stderr);
+fprintf(stderr, "ATTR: marker-levels=%d,%d,%d,%d\n", levels[0], levels[1],
+        levels[2], levels[3], levels[4]);
+fputs("ATTR: marker-low-levels=5,5,5,5\n", stderr);
+fputs("ATTR: marker-types=toner,toner,toner,toner\n", stderr);
+</pre>
+
+<p>Complex values that contains spaces, quotes, backslashes, or the comma must be quoted. For a single value a single set of quotes is sufficient:</p>
+
+<pre class="example">
+fputs("ATTR: marker-message='Levels shown are approximate.'\n", stderr);
+</pre>
+
+<p>When multiple values are reported, each value must be enclosed by a set of single and double quotes:</p>
+
+<pre class="example">
+fputs("ATTR: marker-names='\"Cyan Toner\"','\"Magenta Toner\"',"
+      "'\"Yellow Toner\"','\"Black Toner\"'\n", stderr);
+</pre>
+
+<p>The IPP backend includes a <var>quote_string</var> function that may be used to properly quote a complex value in an "ATTR:" message:</p>
+
+<pre class="example">
+static const char *                     /* O - Quoted string */
+quote_string(const char *s,             /* I - String */
+             char       *q,             /* I - Quoted string buffer */
+             size_t     qsize)          /* I - Size of quoted string buffer */
+{
+  char  *qptr,                          /* Pointer into string buffer */
+        *qend;                          /* End of string buffer */
+
+
+  qptr = q;
+  qend = q + qsize - 5;
+
+  if (qend &lt; q)
+  {
+    *q = '\0';
+    return (q);
+  }
+
+  *qptr++ = '\'';
+  *qptr++ = '\"';
+
+  while (*s && qptr &lt; qend)
+  {
+    if (*s == '\\' || *s == '\"' || *s == '\'')
+    {
+      if (qptr &lt; (qend - 4))
+      {
+        *qptr++ = '\\';
+        *qptr++ = '\\';
+        *qptr++ = '\\';
+      }
+      else
+        break;
+    }
+
+    *qptr++ = *s++;
+  }
+
+  *qptr++ = '\"';
+  *qptr++ = '\'';
+  *qptr   = '\0';
+
+  return (q);
+}
+</pre>
+
+
 <h4><a name="MANAGING_STATE">Managing Printer State in a Filter</a></h4>
 
 <p>Filters are responsible for managing the state keywords they set using
index 0c1998ee3371223dd04ca0f4b0a89a8a5d66de6a..6bd01d94e028d692b0cfa20b5298a378d2b14429 100644 (file)
@@ -38,7 +38,7 @@ P.example {
   font-style: italic;
   margin-left: 36pt;
 }
-  
+
 PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
@@ -77,7 +77,7 @@ A:link:hover IMG {
 }
 
 A:link, A:visited {
-  font-weight: normal;
+  font-weight: inherit;
   text-decoration: none;
 }
 
index 82c740a86b8bba9743f945a9136964ee132482a2..57087c5f575e9d74e1bcf00bfc03aef6516d7945 100644 (file)
@@ -38,7 +38,7 @@ P.example {
   font-style: italic;
   margin-left: 36pt;
 }
-  
+
 PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
@@ -77,7 +77,7 @@ A:link:hover IMG {
 }
 
 A:link, A:visited {
-  font-weight: normal;
+  font-weight: inherit;
   text-decoration: none;
 }
 
index b355e108bc35d45855068cb64e17d8b4a3a1994b..cdd11fdfa107b5a4e25fbdf872cb66f6a95f2921 100644 (file)
@@ -38,7 +38,7 @@ P.example {
   font-style: italic;
   margin-left: 36pt;
 }
-  
+
 PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
@@ -77,7 +77,7 @@ A:link:hover IMG {
 }
 
 A:link, A:visited {
-  font-weight: normal;
+  font-weight: inherit;
   text-decoration: none;
 }
 
index fc7b72a40238f81886f28fe4202c5a0599afb1b8..f07524af7d15ab1a2acfb18d8840a3a3b924744f 100644 (file)
@@ -38,7 +38,7 @@ P.example {
   font-style: italic;
   margin-left: 36pt;
 }
-  
+
 PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
@@ -77,7 +77,7 @@ A:link:hover IMG {
 }
 
 A:link, A:visited {
-  font-weight: normal;
+  font-weight: inherit;
   text-decoration: none;
 }
 
index 54280587924f1b3de79da0566a5ec312235aafdf..db774c4c0f58bab517cc61dc66b38ab9f6e3e2c8 100644 (file)
@@ -38,7 +38,7 @@ P.example {
   font-style: italic;
   margin-left: 36pt;
 }
-  
+
 PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
@@ -77,7 +77,7 @@ A:link:hover IMG {
 }
 
 A:link, A:visited {
-  font-weight: normal;
+  font-weight: inherit;
   text-decoration: none;
 }
 
@@ -345,7 +345,7 @@ div.contents ul.subcontents li {
 
   Filter and backend programming header for CUPS.
 
-  Copyright 2008-2011 by Apple Inc.
+  Copyright 2008-2014 by Apple Inc.
 
   These coded instructions, statements, and computer programs are the
   property of Apple Inc. and are protected by Federal copyright
@@ -664,7 +664,7 @@ prefix strings:</p>
        <code>marker-types</code>, <code>printer-alert</code>, and
        <code>printer-alert-description</code> printer attributes. Standard
        <code>marker-types</code> values are listed in <a href='#TABLE1'>Table
-       1</a>.</dd>
+       1</a>. String values need special handling - see <a href="#ATTR_STRINGS">Reporting Attribute String Values</a> below.</dd>
 
        <dt>CRIT: message</dt>
        <dd>Sets the printer-state-message attribute and adds the specified
@@ -747,11 +747,11 @@ the "DEBUG:" prefix string.</p>
        <td>Fuser unit</td>
 </tr>
 <tr>
-       <td>fuserCleaningPad</td>
+       <td>fuser-cleaning-pad</td>
        <td>Fuser cleaning pad</td>
 </tr>
 <tr>
-       <td>fuserOil</td>
+       <td>fuser-oil</td>
        <td>Fuser oil</td>
 </tr>
 <tr>
@@ -763,7 +763,7 @@ the "DEBUG:" prefix string.</p>
        <td>Photo conductor</td>
 </tr>
 <tr>
-       <td>solidWax</td>
+       <td>solid-wax</td>
        <td>Wax supply</td>
 </tr>
 <tr>
@@ -775,19 +775,19 @@ the "DEBUG:" prefix string.</p>
        <td>Toner supply</td>
 </tr>
 <tr>
-       <td>transferUnit</td>
+       <td>transfer-unit</td>
        <td>Transfer unit</td>
 </tr>
 <tr>
-       <td>wasteInk</td>
+       <td>waste-ink</td>
        <td>Waste ink tank</td>
 </tr>
 <tr>
-       <td>wasteToner</td>
+       <td>waste-toner</td>
        <td>Waste toner tank</td>
 </tr>
 <tr>
-       <td>wasteWax</td>
+       <td>waste-wax</td>
        <td>Waste wax tank</td>
 </tr>
 </tbody>
@@ -867,6 +867,95 @@ the "DEBUG:" prefix string.</p>
 </tbody>
 </table></div>
 
+
+<h4><a name="ATTR_STRINGS">Reporting Attribute String Values</a></h4>
+
+<p>When reporting string values using "ATTR:" messages, a filter or backend must take special care to appropriately quote those values. The scheduler uses the CUPS option parsing code for attributes, so the general syntax is:</p>
+
+<pre class="example">
+name=simple
+name=simple,simple,...
+name='complex value'
+name="complex value"
+name='"complex value"','"complex value"',...
+</pre>
+
+<p>Simple values are strings that do not contain spaces, quotes, backslashes, or the comma and can be placed verbatim in the "ATTR:" message, for example:</p>
+
+<pre class="example">
+int levels[4] = { 40, 50, 60, 70 }; /* CMYK */
+
+fputs("ATTR: marker-colors=#00FFFF,#FF00FF,#FFFF00,#000000\n", stderr);
+fputs("ATTR: marker-high-levels=100,100,100,100\n", stderr);
+fprintf(stderr, "ATTR: marker-levels=%d,%d,%d,%d\n", levels[0], levels[1],
+        levels[2], levels[3], levels[4]);
+fputs("ATTR: marker-low-levels=5,5,5,5\n", stderr);
+fputs("ATTR: marker-types=toner,toner,toner,toner\n", stderr);
+</pre>
+
+<p>Complex values that contains spaces, quotes, backslashes, or the comma must be quoted. For a single value a single set of quotes is sufficient:</p>
+
+<pre class="example">
+fputs("ATTR: marker-message='Levels shown are approximate.'\n", stderr);
+</pre>
+
+<p>When multiple values are reported, each value must be enclosed by a set of single and double quotes:</p>
+
+<pre class="example">
+fputs("ATTR: marker-names='\"Cyan Toner\"','\"Magenta Toner\"',"
+      "'\"Yellow Toner\"','\"Black Toner\"'\n", stderr);
+</pre>
+
+<p>The IPP backend includes a <var>quote_string</var> function that may be used to properly quote a complex value in an "ATTR:" message:</p>
+
+<pre class="example">
+static const char *                     /* O - Quoted string */
+quote_string(const char *s,             /* I - String */
+             char       *q,             /* I - Quoted string buffer */
+             size_t     qsize)          /* I - Size of quoted string buffer */
+{
+  char  *qptr,                          /* Pointer into string buffer */
+        *qend;                          /* End of string buffer */
+
+
+  qptr = q;
+  qend = q + qsize - 5;
+
+  if (qend &lt; q)
+  {
+    *q = '\0';
+    return (q);
+  }
+
+  *qptr++ = '\'';
+  *qptr++ = '\"';
+
+  while (*s && qptr &lt; qend)
+  {
+    if (*s == '\\' || *s == '\"' || *s == '\'')
+    {
+      if (qptr &lt; (qend - 4))
+      {
+        *qptr++ = '\\';
+        *qptr++ = '\\';
+        *qptr++ = '\\';
+      }
+      else
+        break;
+    }
+
+    *qptr++ = *s++;
+  }
+
+  *qptr++ = '\"';
+  *qptr++ = '\'';
+  *qptr   = '\0';
+
+  return (q);
+}
+</pre>
+
+
 <h4><a name="MANAGING_STATE">Managing Printer State in a Filter</a></h4>
 
 <p>Filters are responsible for managing the state keywords they set using
index f6f117b56b59dfa49049d7fc9791ef8edbee0930..5f4f2f38cbb4bdcb1e4e4285f23cd70805bd0df5 100644 (file)
@@ -38,7 +38,7 @@ P.example {
   font-style: italic;
   margin-left: 36pt;
 }
-  
+
 PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
@@ -77,7 +77,7 @@ A:link:hover IMG {
 }
 
 A:link, A:visited {
-  font-weight: normal;
+  font-weight: inherit;
   text-decoration: none;
 }
 
@@ -408,7 +408,10 @@ current thread.">cupsLastErrorString</a></li>
 specified listening socket.">httpAcceptConnection</a></li>
        <li><a href="#httpAddCredential" title="Allocates and adds a single credential to an array.">httpAddCredential</a></li>
        <li><a href="#httpAddrAny" title="Check for the &quot;any&quot; address.">httpAddrAny</a></li>
+       <li><a href="#httpAddrClose" title="Close a socket created by httpAddrConnect or
+httpAddrListen.">httpAddrClose</a></li>
        <li><a href="#httpAddrEqual" title="Compare two addresses.">httpAddrEqual</a></li>
+       <li><a href="#httpAddrFamily" title="Get the address family of an address.">httpAddrFamily</a></li>
        <li><a href="#httpAddrLength" title="Return the length of the address in bytes.">httpAddrLength</a></li>
        <li><a href="#httpAddrListen" title="Create a listening socket bound to the specified
 address and port.">httpAddrListen</a></li>
@@ -426,11 +429,10 @@ components with a formatted resource.">httpAssembleURIf</a></li>
        <li><a href="#httpClearCookie" title="Clear the cookie value(s).">httpClearCookie</a></li>
        <li><a href="#httpClearFields" title="Clear HTTP request fields.">httpClearFields</a></li>
        <li><a href="#httpClose" title="Close an HTTP connection.">httpClose</a></li>
+       <li><a href="#httpCompareCredentials" title="Compare two sets of X.509 credentials.">httpCompareCredentials</a></li>
        <li><a href="#httpConnect" title="Connect to a HTTP server.">httpConnect</a></li>
        <li><a href="#httpConnect2" title="Connect to a HTTP server.">httpConnect2</a></li>
        <li><a href="#httpConnectEncrypt" title="Connect to a HTTP server using encryption.">httpConnectEncrypt</a></li>
-       <li><a href="#httpCopyCredentials" title="Copy the credentials associated with an encrypted
-connection.">httpCopyCredentials</a></li>
        <li><a href="#httpDecode64" title="Base64-decode a string.">httpDecode64</a></li>
        <li><a href="#httpDecode64_2" title="Base64-decode a string.">httpDecode64_2</a></li>
        <li><a href="#httpDelete" title="Send a DELETE request to the server.">httpDelete</a></li>
@@ -438,10 +440,14 @@ connection.">httpCopyCredentials</a></li>
        <li><a href="#httpEncode64_2" title="Base64-encode a string.">httpEncode64_2</a></li>
        <li><a href="#httpEncryption" title="Set the required encryption on the link.">httpEncryption</a></li>
        <li><a href="#httpError" title="Get the last error on a connection.">httpError</a></li>
+       <li><a href="#httpFieldValue" title="Return the HTTP field enumeration value for a field
+name.">httpFieldValue</a></li>
        <li><a href="#httpFlush" title="Flush data from a HTTP connection.">httpFlush</a></li>
        <li><a href="#httpFlushWrite" title="Flush data in write buffer.">httpFlushWrite</a></li>
        <li><a href="#httpFreeCredentials" title="Free an array of credentials.">httpFreeCredentials</a></li>
        <li><a href="#httpGet" title="Send a GET request to the server.">httpGet</a></li>
+       <li><a href="#httpGetActivity" title="Get the most recent activity for a connection.">httpGetActivity</a></li>
+       <li><a href="#httpGetAddress" title="Get the address of the connected peer of a connection.">httpGetAddress</a></li>
        <li><a href="#httpGetAuthString" title="Get the current authorization string.">httpGetAuthString</a></li>
        <li><a href="#httpGetBlocking" title="Get the blocking/non-block state of a connection.">httpGetBlocking</a></li>
        <li><a href="#httpGetContentEncoding" title="Get a common content encoding, if any, between
@@ -450,16 +456,22 @@ the client and server.">httpGetContentEncoding</a></li>
        <li><a href="#httpGetDateString" title="Get a formatted date/time string from a time value.">httpGetDateString</a></li>
        <li><a href="#httpGetDateString2" title="Get a formatted date/time string from a time value.">httpGetDateString2</a></li>
        <li><a href="#httpGetDateTime" title="Get a time value from a formatted date/time string.">httpGetDateTime</a></li>
+       <li><a href="#httpGetEncryption" title="Get the current encryption mode of a connection.">httpGetEncryption</a></li>
        <li><a href="#httpGetExpect" title="Get the value of the Expect header, if any.">httpGetExpect</a></li>
        <li><a href="#httpGetFd" title="Get the file descriptor associated with a connection.">httpGetFd</a></li>
        <li><a href="#httpGetField" title="Get a field value from a request/response.">httpGetField</a></li>
        <li><a href="#httpGetHostByName" title="Lookup a hostname or IPv4 address, and return
 address records for the specified name.">httpGetHostByName</a></li>
        <li><a href="#httpGetHostname" title="Get the FQDN for the connection or local system.">httpGetHostname</a></li>
+       <li><a href="#httpGetKeepAlive" title="Get the current Keep-Alive state of the connection.">httpGetKeepAlive</a></li>
        <li><a href="#httpGetLength" title="Get the amount of data remaining from the
 content-length or transfer-encoding fields.">httpGetLength</a></li>
        <li><a href="#httpGetLength2" title="Get the amount of data remaining from the
 content-length or transfer-encoding fields.">httpGetLength2</a></li>
+       <li><a href="#httpGetPending" title="Get the number of bytes that are buffered for writing.">httpGetPending</a></li>
+       <li><a href="#httpGetReady" title="Get the number of bytes that can be read without blocking.">httpGetReady</a></li>
+       <li><a href="#httpGetRemaining" title="Get the number of remaining bytes in the message
+body or current chunk.">httpGetRemaining</a></li>
        <li><a href="#httpGetState" title="Get the current state of the HTTP request.">httpGetState</a></li>
        <li><a href="#httpGetStatus" title="Get the status of the last HTTP request.">httpGetStatus</a></li>
        <li><a href="#httpGetSubField" title="Get a sub-field value.">httpGetSubField</a></li>
@@ -469,6 +481,8 @@ content-length or transfer-encoding fields.">httpGetLength2</a></li>
        <li><a href="#httpHead" title="Send a HEAD request to the server.">httpHead</a></li>
        <li><a href="#httpInitialize" title="Initialize the HTTP interface library and set the
 default HTTP proxy (if any).">httpInitialize</a></li>
+       <li><a href="#httpIsChunked" title="Report whether a message body is chunked.">httpIsChunked</a></li>
+       <li><a href="#httpIsEncrypted" title="Report whether a connection is encrypted.">httpIsEncrypted</a></li>
        <li><a href="#httpMD5" title="Compute the MD5 sum of the username:group:password.">httpMD5</a></li>
        <li><a href="#httpMD5Final" title="Combine the MD5 sum of the username, group, and password
 with the server-supplied nonce value, method, and
@@ -484,6 +498,8 @@ request-uri.">httpMD5Final</a></li>
        <li><a href="#httpReconnect" title="Reconnect to a HTTP server.">httpReconnect</a></li>
        <li><a href="#httpReconnect2" title="Reconnect to a HTTP server with timeout and optional
 cancel.">httpReconnect2</a></li>
+       <li><a href="#httpResolveHostname" title="Resolve the hostname of the HTTP connection
+address.">httpResolveHostname</a></li>
        <li><a href="#httpSeparate" title="Separate a Universal Resource Identifier into its
 components.">httpSeparate</a></li>
        <li><a href="#httpSeparate2" title="Separate a Universal Resource Identifier into its
@@ -497,10 +513,14 @@ connection.">httpSetCredentials</a></li>
        <li><a href="#httpSetDefaultField" title="Set the default value of an HTTP header.">httpSetDefaultField</a></li>
        <li><a href="#httpSetExpect" title="Set the Expect: header in a request.">httpSetExpect</a></li>
        <li><a href="#httpSetField" title="Set the value of an HTTP header.">httpSetField</a></li>
+       <li><a href="#httpSetKeepAlive" title="Set the current Keep-Alive state of a connection.">httpSetKeepAlive</a></li>
        <li><a href="#httpSetLength" title="Set the content-length and content-encoding.">httpSetLength</a></li>
        <li><a href="#httpSetTimeout" title="Set read/write timeouts and an optional callback.">httpSetTimeout</a></li>
+       <li><a href="#httpShutdown" title="Shutdown one side of an HTTP connection.">httpShutdown</a></li>
+       <li><a href="#httpStateString" title="Return the string describing a HTTP state value.">httpStateString</a></li>
        <li><a href="#httpStatus" title="Return a short string describing a HTTP status code.">httpStatus</a></li>
        <li><a href="#httpTrace" title="Send an TRACE request to the server.">httpTrace</a></li>
+       <li><a href="#httpURIStatusString" title="Return a string describing a URI status code.">httpURIStatusString</a></li>
        <li><a href="#httpUpdate" title="Update the current HTTP state for incoming data.">httpUpdate</a></li>
        <li><a href="#httpWait" title="Wait for data available on a connection.">httpWait</a></li>
        <li><a href="#httpWrite" title="Write data to a HTTP connection.">httpWrite</a></li>
@@ -592,6 +612,7 @@ in seconds.">ippDateToTime</a></li>
        <li><a href="#ippSetStringfv" title="Set a formatted string value of an attribute.">ippSetStringfv</a></li>
        <li><a href="#ippSetValueTag" title="Set the value tag of an attribute.">ippSetValueTag</a></li>
        <li><a href="#ippSetVersion" title="Set the version number in an IPP message.">ippSetVersion</a></li>
+       <li><a href="#ippStateString" title="Return the name corresponding to a state value.">ippStateString</a></li>
        <li><a href="#ippTagString" title="Return the tag name corresponding to a tag value.">ippTagString</a></li>
        <li><a href="#ippTagValue" title="Return the tag value corresponding to a tag name.">ippTagValue</a></li>
        <li><a href="#ippTimeToDate" title="Convert from UNIX time to RFC 1903 format.">ippTimeToDate</a></li>
@@ -1455,6 +1476,29 @@ int httpAddrAny (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">1 if &quot;any&quot;, 0 otherwise</p>
+<h3 class="function"><span class="info">&nbsp;CUPS 2.0&nbsp;</span><a name="httpAddrClose">httpAddrClose</a></h3>
+<p class="description">Close a socket created by <a href="#httpAddrConnect"><code>httpAddrConnect</code></a> or
+<a href="#httpAddrListen"><code>httpAddrListen</code></a>.</p>
+<p class="code">
+int httpAddrClose (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_addr_t">http_addr_t</a> *addr,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;int fd<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>addr</dt>
+<dd class="description">Listen address or <code>NULL</code></dd>
+<dt>fd</dt>
+<dd class="description">Socket file descriptor</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">0 on success, -1 on failure</p>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">Pass <code>NULL</code> for sockets created with <a href="#httpAddrConnect"><code>httpAddrConnect</code></a> and the
+listen address for sockets created with <a href="#httpAddrListen"><code>httpAddrListen</code></a>. This will
+ensure that domain sockets are removed when closed.
+
+</p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpAddrEqual">httpAddrEqual</a></h3>
 <p class="description">Compare two addresses.</p>
 <p class="code">
@@ -1471,6 +1515,19 @@ int httpAddrEqual (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">1 if equal, 0 if not</p>
+<h3 class="function"><a name="httpAddrFamily">httpAddrFamily</a></h3>
+<p class="description">Get the address family of an address.</p>
+<p class="code">
+int httpAddrFamily (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_addr_t">http_addr_t</a> *addr<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>addr</dt>
+<dd class="description">Address</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">Address family</p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpAddrLength">httpAddrLength</a></h3>
 <p class="description">Return the length of the address in bytes.</p>
 <p class="code">
@@ -1699,7 +1756,7 @@ void httpBlocking (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>b</dt>
 <dd class="description">1 = blocking, 0 = non-blocking</dd>
 </dl>
@@ -1712,7 +1769,7 @@ int httpCheck (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">0 = no data, 1 = data available</p>
@@ -1725,7 +1782,7 @@ void httpClearCookie (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 </dl>
 <h3 class="function"><a name="httpClearFields">httpClearFields</a></h3>
 <p class="description">Clear HTTP request fields.</p>
@@ -1736,7 +1793,7 @@ void httpClearFields (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 </dl>
 <h3 class="function"><a name="httpClose">httpClose</a></h3>
 <p class="description">Close an HTTP connection.</p>
@@ -1747,8 +1804,24 @@ void httpClose (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 </dl>
+<h3 class="function"><span class="info">&nbsp;CUPS 2.0&nbsp;</span><a name="httpCompareCredentials">httpCompareCredentials</a></h3>
+<p class="description">Compare two sets of X.509 credentials.</p>
+<p class="code">
+int httpCompareCredentials (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;cups_array_t *cred1,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;cups_array_t *cred2<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>cred1</dt>
+<dd class="description">First set of X.509 credentials</dd>
+<dt>cred2</dt>
+<dd class="description">Second set of X.509 credentials</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">1 if they match, 0 if they do not</p>
 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpConnect">httpConnect</a></h3>
 <p class="description">Connect to a HTTP server.</p>
 <p class="code">
@@ -1827,23 +1900,6 @@ void httpClose (<br>
 instead.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.5/OS X 10.7&nbsp;</span><a name="httpCopyCredentials">httpCopyCredentials</a></h3>
-<p class="description">Copy the credentials associated with an encrypted
-connection.</p>
-<p class="code">
-int httpCopyCredentials (<br>
-&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;cups_array_t **credentials<br>
-);</p>
-<h4 class="parameters">Parameters</h4>
-<dl>
-<dt>http</dt>
-<dd class="description">Connection to server</dd>
-<dt>credentials</dt>
-<dd class="description">Array of credentials</dd>
-</dl>
-<h4 class="returnvalue">Return Value</h4>
-<p class="description">Status of call (0 = success)</p>
 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpDecode64">httpDecode64</a></h3>
 <p class="description">Base64-decode a string.</p>
 <p class="code">
@@ -1894,7 +1950,7 @@ int httpDelete (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>uri</dt>
 <dd class="description">URI to delete</dd>
 </dl>
@@ -1953,7 +2009,7 @@ int httpEncryption (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>e</dt>
 <dd class="description">New encryption preference</dd>
 </dl>
@@ -1968,10 +2024,24 @@ int httpError (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Error code (errno) value</p>
+<h3 class="function"><a name="httpFieldValue">httpFieldValue</a></h3>
+<p class="description">Return the HTTP field enumeration value for a field
+name.</p>
+<p class="code">
+<a href="#http_field_t">http_field_t</a> httpFieldValue (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>name</dt>
+<dd class="description">String name</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">Field index</p>
 <h3 class="function"><a name="httpFlush">httpFlush</a></h3>
 <p class="description">Flush data from a HTTP connection.</p>
 <p class="code">
@@ -1981,7 +2051,7 @@ void httpFlush (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 </dl>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpFlushWrite">httpFlushWrite</a></h3>
 <p class="description">Flush data in write buffer.</p>
@@ -1992,7 +2062,7 @@ int httpFlushWrite (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Bytes written or -1 on error</p>
@@ -2017,12 +2087,46 @@ int httpGet (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>uri</dt>
 <dd class="description">URI to get</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Status of call (0 = success)</p>
+<h3 class="function"><span class="info">&nbsp;CUPS 2.0&nbsp;</span><a name="httpGetActivity">httpGetActivity</a></h3>
+<p class="description">Get the most recent activity for a connection.</p>
+<p class="code">
+time_t httpGetActivity (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>http</dt>
+<dd class="description">HTTP connection</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">Time of last read or write</p>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">The return value is the UNIX time of the last read or write.
+
+</p>
+<h3 class="function"><span class="info">&nbsp;CUPS 2.0&nbsp;</span><a name="httpGetAddress">httpGetAddress</a></h3>
+<p class="description">Get the address of the connected peer of a connection.</p>
+<p class="code">
+<a href="#http_addr_t">http_addr_t</a> *httpGetAddress (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>http</dt>
+<dd class="description">HTTP connection</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">Connected address or <code>NULL</code></p>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">Returns <code>NULL</code> if the socket is currently unconnected.
+
+</p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.3/OS X 10.5&nbsp;</span><a name="httpGetAuthString">httpGetAuthString</a></h3>
 <p class="description">Get the current authorization string.</p>
 <p class="code">
@@ -2032,7 +2136,7 @@ char *httpGetAuthString (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Authorization string</p>
@@ -2052,7 +2156,7 @@ int httpGetBlocking (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">1 if blocking, 0 if non-blocking</p>
@@ -2066,7 +2170,7 @@ const char *httpGetContentEncoding (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to client/server</dd>
+<dd class="description">HTTP connection</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Content-Coding value or
@@ -2137,6 +2241,25 @@ time_t httpGetDateTime (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">UNIX time</p>
+<h3 class="function"><span class="info">&nbsp;CUPS 2.0&nbsp;</span><a name="httpGetEncryption">httpGetEncryption</a></h3>
+<p class="description">Get the current encryption mode of a connection.</p>
+<p class="code">
+<a href="#http_encryption_t">http_encryption_t</a> httpGetEncryption (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>http</dt>
+<dd class="description">HTTP connection</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">Current encryption mode</p>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">This function returns the encryption mode for the connection. Use the
+<a href="#httpIsEncrypted"><code>httpIsEncrypted</code></a> function to determine whether a TLS session has
+been established.
+
+</p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/OS X 10.9&nbsp;</span><a name="httpGetExpect">httpGetExpect</a></h3>
 <p class="description">Get the value of the Expect header, if any.</p>
 <p class="code">
@@ -2146,7 +2269,7 @@ http_status_t httpGetExpect (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to client</dd>
+<dd class="description">HTTP connection</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Expect: status, if any</p>
@@ -2164,7 +2287,7 @@ int httpGetFd (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">File descriptor or -1 if none</p>
@@ -2178,7 +2301,7 @@ const char *httpGetField (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>field</dt>
 <dd class="description">Field to get</dd>
 </dl>
@@ -2219,11 +2342,25 @@ const char *httpGetHostname (<br>
 <p class="description">FQDN for connection or system</p>
 <h4 class="discussion">Discussion</h4>
 <p class="discussion">When &quot;http&quot; points to a connected socket, return the hostname or
-address that was used in the call to httpConnect() or httpConnectEncrypt().
+address that was used in the call to httpConnect() or httpConnectEncrypt(),
+or the address of the client for the connection from httpAcceptConnection().
 Otherwise, return the FQDN for the local system using both gethostname()
 and gethostbyname() to get the local hostname with domain.
 
 </p>
+<h3 class="function"><span class="info">&nbsp;CUPS 2.0&nbsp;</span><a name="httpGetKeepAlive">httpGetKeepAlive</a></h3>
+<p class="description">Get the current Keep-Alive state of the connection.</p>
+<p class="code">
+<a href="#http_keepalive_t">http_keepalive_t</a> httpGetKeepAlive (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>http</dt>
+<dd class="description">HTTP connection</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">Keep-Alive state</p>
 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpGetLength">httpGetLength</a></h3>
 <p class="description">Get the amount of data remaining from the
 content-length or transfer-encoding fields.</p>
@@ -2234,7 +2371,7 @@ int httpGetLength (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Content length</p>
@@ -2253,7 +2390,7 @@ off_t httpGetLength2 (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Content length</p>
@@ -2261,6 +2398,51 @@ off_t httpGetLength2 (<br>
 <p class="discussion">This function returns the complete content length, even for
 content larger than 2^31 - 1.
 
+</p>
+<h3 class="function"><span class="info">&nbsp;CUPS 2.0&nbsp;</span><a name="httpGetPending">httpGetPending</a></h3>
+<p class="description">Get the number of bytes that are buffered for writing.</p>
+<p class="code">
+size_t httpGetPending (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>http</dt>
+<dd class="description">HTTP connection</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">Number of bytes buffered</p>
+<h3 class="function"><span class="info">&nbsp;CUPS 2.0&nbsp;</span><a name="httpGetReady">httpGetReady</a></h3>
+<p class="description">Get the number of bytes that can be read without blocking.</p>
+<p class="code">
+size_t httpGetReady (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>http</dt>
+<dd class="description">HTTP connection</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">Number of bytes available</p>
+<h3 class="function"><span class="info">&nbsp;CUPS 2.0&nbsp;</span><a name="httpGetRemaining">httpGetRemaining</a></h3>
+<p class="description">Get the number of remaining bytes in the message
+body or current chunk.</p>
+<p class="code">
+size_t httpGetRemaining (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>http</dt>
+<dd class="description">HTTP connection</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">Remaining bytes</p>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">The <a href="#httpIsChunked"><code>httpIsChunked</code></a> function can be used to determine whether the
+message body is chunked or fixed-length.
+
 </p>
 <h3 class="function"><a name="httpGetState">httpGetState</a></h3>
 <p class="description">Get the current state of the HTTP request.</p>
@@ -2271,7 +2453,7 @@ content larger than 2^31 - 1.
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">HTTP state</p>
@@ -2284,7 +2466,7 @@ http_status_t httpGetStatus (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">HTTP status</p>
@@ -2300,7 +2482,7 @@ char *httpGetSubField (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>field</dt>
 <dd class="description">Field index</dd>
 <dt>name</dt>
@@ -2323,7 +2505,7 @@ char *httpGetSubField2 (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>field</dt>
 <dd class="description">Field index</dd>
 <dt>name</dt>
@@ -2344,7 +2526,7 @@ char *httpGetSubField2 (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Version number</p>
@@ -2363,7 +2545,7 @@ char *httpGets (<br>
 <dt>length</dt>
 <dd class="description">Max length of buffer</dd>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Line or NULL</p>
@@ -2377,7 +2559,7 @@ int httpHead (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>uri</dt>
 <dd class="description">URI for head</dd>
 </dl>
@@ -2388,6 +2570,41 @@ int httpHead (<br>
 default HTTP proxy (if any).</p>
 <p class="code">
 void httpInitialize (void);</p>
+<h3 class="function"><span class="info">&nbsp;CUPS 2.0&nbsp;</span><a name="httpIsChunked">httpIsChunked</a></h3>
+<p class="description">Report whether a message body is chunked.</p>
+<p class="code">
+int httpIsChunked (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>http</dt>
+<dd class="description">HTTP connection</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">1 if chunked, 0 if not</p>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">This function returns non-zero if the message body is composed of
+variable-length chunks.
+
+</p>
+<h3 class="function"><span class="info">&nbsp;CUPS 2.0&nbsp;</span><a name="httpIsEncrypted">httpIsEncrypted</a></h3>
+<p class="description">Report whether a connection is encrypted.</p>
+<p class="code">
+int httpIsEncrypted (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>http</dt>
+<dd class="description">HTTP connection</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">1 if encrypted, 0 if not</p>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">This function returns non-zero if the connection is currently encrypted.
+
+</p>
 <h3 class="function"><a name="httpMD5">httpMD5</a></h3>
 <p class="description">Compute the MD5 sum of the username:group:password.</p>
 <p class="code">
@@ -2460,7 +2677,7 @@ int httpOptions (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>uri</dt>
 <dd class="description">URI for options</dd>
 </dl>
@@ -2477,7 +2694,7 @@ ssize_t httpPeek (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>buffer</dt>
 <dd class="description">Buffer for data</dd>
 <dt>length</dt>
@@ -2503,7 +2720,7 @@ int httpPost (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>uri</dt>
 <dd class="description">URI for post</dd>
 </dl>
@@ -2519,7 +2736,7 @@ int httpPut (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>uri</dt>
 <dd class="description">URI to put</dd>
 </dl>
@@ -2536,7 +2753,7 @@ int httpRead (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>buffer</dt>
 <dd class="description">Buffer for data</dd>
 <dt>length</dt>
@@ -2560,7 +2777,7 @@ ssize_t httpRead2 (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>buffer</dt>
 <dd class="description">Buffer for data</dd>
 <dt>length</dt>
@@ -2596,7 +2813,7 @@ int httpReconnect (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">0 on success, non-zero on failure</p>
@@ -2617,7 +2834,7 @@ int httpReconnect2 (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>msec</dt>
 <dd class="description">Timeout in milliseconds</dd>
 <dt>cancel</dt>
@@ -2625,6 +2842,26 @@ int httpReconnect2 (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">0 on success, non-zero on failure</p>
+<h3 class="function"><span class="info">&nbsp;CUPS 2.0&nbsp;</span><a name="httpResolveHostname">httpResolveHostname</a></h3>
+<p class="description">Resolve the hostname of the HTTP connection
+address.</p>
+<p class="code">
+const char *httpResolveHostname (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;char *buffer,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;size_t bufsize<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>http</dt>
+<dd class="description">HTTP connection</dd>
+<dt>buffer</dt>
+<dd class="description">Hostname buffer</dd>
+<dt>bufsize</dt>
+<dd class="description">Size of buffer</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">Resolved hostname or <code>NULL</code></p>
 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpSeparate">httpSeparate</a></h3>
 <p class="description">Separate a Universal Resource Identifier into its
 components.</p>
@@ -2755,7 +2992,7 @@ void httpSetAuthString (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>scheme</dt>
 <dd class="description">Auth scheme (NULL to clear it)</dd>
 <dt>data</dt>
@@ -2793,7 +3030,7 @@ int httpSetCredentials (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>credentials</dt>
 <dd class="description">Array of credentials</dd>
 </dl>
@@ -2810,7 +3047,7 @@ void httpSetDefaultField (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>field</dt>
 <dd class="description">Field index</dd>
 <dt>value</dt>
@@ -2831,7 +3068,7 @@ void httpSetExpect (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>expect</dt>
 <dd class="description">HTTP status to expect
 (<code>HTTP_STATUS_CONTINUE</code>)</dd>
@@ -2852,12 +3089,26 @@ void httpSetField (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>field</dt>
 <dd class="description">Field index</dd>
 <dt>value</dt>
 <dd class="description">Value</dd>
 </dl>
+<h3 class="function"><span class="info">&nbsp;CUPS 2.0&nbsp;</span><a name="httpSetKeepAlive">httpSetKeepAlive</a></h3>
+<p class="description">Set the current Keep-Alive state of a connection.</p>
+<p class="code">
+void httpSetKeepAlive (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_keepalive_t">http_keepalive_t</a> keep_alive<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>http</dt>
+<dd class="description">HTTP connection</dd>
+<dt>keep_alive</dt>
+<dd class="description">New Keep-Alive value</dd>
+</dl>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpSetLength">httpSetLength</a></h3>
 <p class="description">Set the content-length and content-encoding.</p>
 <p class="code">
@@ -2868,7 +3119,7 @@ void httpSetLength (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>length</dt>
 <dd class="description">Length (0 for chunked)</dd>
 </dl>
@@ -2884,7 +3135,7 @@ void httpSetTimeout (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>timeout</dt>
 <dd class="description">Number of seconds for timeout,
 must be greater than 0</dd>
@@ -2898,6 +3149,30 @@ must be greater than 0</dd>
 data pointer and must return 1 to continue or 0 to error (time) out.
 
 </p>
+<h3 class="function"><span class="info">&nbsp;CUPS 2.0&nbsp;</span><a name="httpShutdown">httpShutdown</a></h3>
+<p class="description">Shutdown one side of an HTTP connection.</p>
+<p class="code">
+void httpShutdown (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>http</dt>
+<dd class="description">HTTP connection</dd>
+</dl>
+<h3 class="function"><span class="info">&nbsp;CUPS 2.0&nbsp;</span><a name="httpStateString">httpStateString</a></h3>
+<p class="description">Return the string describing a HTTP state value.</p>
+<p class="code">
+const char *httpStateString (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_state_t">http_state_t</a> state<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>state</dt>
+<dd class="description">HTTP state value</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">State string</p>
 <h3 class="function"><a name="httpStatus">httpStatus</a></h3>
 <p class="description">Return a short string describing a HTTP status code.</p>
 <p class="code">
@@ -2924,12 +3199,25 @@ int httpTrace (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>uri</dt>
 <dd class="description">URI for trace</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Status of call (0 = success)</p>
+<h3 class="function"><span class="info">&nbsp;CUPS 2.0&nbsp;</span><a name="httpURIStatusString">httpURIStatusString</a></h3>
+<p class="description">Return a string describing a URI status code.</p>
+<p class="code">
+const char *httpURIStatusString (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_uri_status_t">http_uri_status_t</a> status<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>status</dt>
+<dd class="description">URI status code</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">Localized status string</p>
 <h3 class="function"><a name="httpUpdate">httpUpdate</a></h3>
 <p class="description">Update the current HTTP state for incoming data.</p>
 <p class="code">
@@ -2939,7 +3227,7 @@ http_status_t httpUpdate (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">HTTP status</p>
@@ -2953,7 +3241,7 @@ int httpWait (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>msec</dt>
 <dd class="description">Milliseconds to wait</dd>
 </dl>
@@ -2970,7 +3258,7 @@ int httpWrite (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>buffer</dt>
 <dd class="description">Buffer for data</dd>
 <dt>length</dt>
@@ -2994,7 +3282,7 @@ ssize_t httpWrite2 (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">Connection to server</dd>
+<dd class="description">HTTP connection</dd>
 <dt>buffer</dt>
 <dd class="description">Buffer for data</dd>
 <dt>length</dt>
@@ -5083,6 +5371,19 @@ the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ip
 The valid version numbers are currently 1.0, 1.1, 2.0, 2.1, and 2.2.
 
 </p>
+<h3 class="function"><span class="info">&nbsp;CUPS 2.0&nbsp;</span><a name="ippStateString">ippStateString</a></h3>
+<p class="description">Return the name corresponding to a state value.</p>
+<p class="code">
+const char *ippStateString (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_state_t">ipp_state_t</a> state<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>state</dt>
+<dd class="description">State value</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">State name</p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.4/OS X 10.6&nbsp;</span><a name="ippTagString">ippTagString</a></h3>
 <p class="description">Return the tag name corresponding to a tag value.</p>
 <p class="code">
@@ -5784,6 +6085,8 @@ are server-oriented...</p>
 <dd class="description">Bind on top</dd>
 <dt>IPP_FINISHINGS_BOOKLET_MAKER </dt>
 <dd class="description">Fold to make booklet</dd>
+<dt>IPP_FINISHINGS_COAT </dt>
+<dd class="description">Apply protective liquid or powder coating</dd>
 <dt>IPP_FINISHINGS_COVER </dt>
 <dd class="description">Add cover</dd>
 <dt>IPP_FINISHINGS_CUPS_FOLD_ACCORDIAN </dt>
@@ -5876,6 +6179,8 @@ are server-oriented...</p>
 <dd class="description">Fold the paper vertically into three sections, forming a Z</dd>
 <dt>IPP_FINISHINGS_JOG_OFFSET </dt>
 <dd class="description">Offset for binding (any type)</dd>
+<dt>IPP_FINISHINGS_LAMINATE </dt>
+<dd class="description">Apply protective (solid) material</dd>
 <dt>IPP_FINISHINGS_NONE </dt>
 <dd class="description">No finishing</dd>
 <dt>IPP_FINISHINGS_PUNCH </dt>
@@ -5932,6 +6237,14 @@ are server-oriented...</p>
 <dd class="description">Staple top left corner</dd>
 <dt>IPP_FINISHINGS_STAPLE_TOP_RIGHT </dt>
 <dd class="description">Staple top right corner</dd>
+<dt>IPP_FINISHINGS_STAPLE_TRIPLE_BOTTOM </dt>
+<dd class="description">Three staples on bottom</dd>
+<dt>IPP_FINISHINGS_STAPLE_TRIPLE_LEFT </dt>
+<dd class="description">Three staples on left</dd>
+<dt>IPP_FINISHINGS_STAPLE_TRIPLE_RIGHT </dt>
+<dd class="description">Three staples on right</dd>
+<dt>IPP_FINISHINGS_STAPLE_TRIPLE_TOP </dt>
+<dd class="description">Three staples on top</dd>
 <dt>IPP_FINISHINGS_TRIM </dt>
 <dd class="description">Trim (any type)</dd>
 <dt>IPP_FINISHINGS_TRIM_AFTER_COPIES </dt>
@@ -5986,10 +6299,10 @@ are server-oriented...</p>
 <dd class="description">Close-Job</dd>
 <dt>IPP_OP_CREATE_JOB </dt>
 <dd class="description">Create an empty print job</dd>
-<dt>IPP_OP_CREATE_JOB_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
-<dd class="description">Create a job subscription </dd>
-<dt>IPP_OP_CREATE_PRINTER_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
-<dd class="description">Create a printer subscription </dd>
+<dt>IPP_OP_CREATE_JOB_SUBSCRIPTIONS <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
+<dd class="description">Create one of more job subscriptions </dd>
+<dt>IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
+<dd class="description">Create one or more printer subscriptions </dd>
 <dt>IPP_OP_CUPS_ACCEPT_JOBS </dt>
 <dd class="description">Accept new jobs on a printer</dd>
 <dt>IPP_OP_CUPS_ADD_MODIFY_CLASS </dt>
@@ -6073,6 +6386,8 @@ are server-oriented...</p>
 <dl>
 <dt>IPP_ORIENT_LANDSCAPE </dt>
 <dd class="description">90 degrees counter-clockwise</dd>
+<dt>IPP_ORIENT_NONE </dt>
+<dd class="description">No rotation</dd>
 <dt>IPP_ORIENT_PORTRAIT </dt>
 <dd class="description">No rotation</dd>
 <dt>IPP_ORIENT_REVERSE_LANDSCAPE </dt>
index 226992780dd69bc3c50c204f0776dc356de98610..dab2365fd93fbc074c956c6fe6aa40814fa4e90a 100644 (file)
@@ -38,7 +38,7 @@ P.example {
   font-style: italic;
   margin-left: 36pt;
 }
-  
+
 PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
@@ -77,7 +77,7 @@ A:link:hover IMG {
 }
 
 A:link, A:visited {
-  font-weight: normal;
+  font-weight: inherit;
   text-decoration: none;
 }
 
index a310f6e1617cd2944d740a51baaf9fda472587cc..95c64e29a82826265faaeab37b312e5e71bd25a4 100644 (file)
@@ -38,7 +38,7 @@ P.example {
   font-style: italic;
   margin-left: 36pt;
 }
-  
+
 PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
@@ -77,7 +77,7 @@ A:link:hover IMG {
 }
 
 A:link, A:visited {
-  font-weight: normal;
+  font-weight: inherit;
   text-decoration: none;
 }
 
index 6530d4b9f0507cd72bff82e9f046d62aea561154..47c10386c359d7eaffc62e11533bdc7e7f9c659c 100644 (file)
@@ -38,7 +38,7 @@ P.example {
   font-style: italic;
   margin-left: 36pt;
 }
-  
+
 PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
@@ -77,7 +77,7 @@ A:link:hover IMG {
 }
 
 A:link, A:visited {
-  font-weight: normal;
+  font-weight: inherit;
   text-decoration: none;
 }
 
index 484288e688c1332f737d9ce8fba834ff8b791f1a..63285b48ea404c5c0a0b315e6126d40ab399f9c7 100644 (file)
@@ -38,7 +38,7 @@ P.example {
   font-style: italic;
   margin-left: 36pt;
 }
-  
+
 PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
@@ -77,7 +77,7 @@ A:link:hover IMG {
 }
 
 A:link, A:visited {
-  font-weight: normal;
+  font-weight: inherit;
   text-decoration: none;
 }
 
index f2dade43cdaf8f8d6335262165587cd72786fb74..859dde4212fef89dbe0fb0439c4e73c396ee5f4a 100644 (file)
@@ -38,7 +38,7 @@ P.example {
   font-style: italic;
   margin-left: 36pt;
 }
-  
+
 PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
@@ -77,7 +77,7 @@ A:link:hover IMG {
 }
 
 A:link, A:visited {
-  font-weight: normal;
+  font-weight: inherit;
   text-decoration: none;
 }
 
index fde5890befbeb979e7769c127426be2aa5e6e615..0a3314b761e9be9501d3b065b72a9ffde4559e79 100644 (file)
@@ -38,7 +38,7 @@ P.example {
   font-style: italic;
   margin-left: 36pt;
 }
-  
+
 PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
@@ -77,7 +77,7 @@ A:link:hover IMG {
 }
 
 A:link, A:visited {
-  font-weight: normal;
+  font-weight: inherit;
   text-decoration: none;
 }
 
index 27decdbbb769d1b8301c801041532f1aa3d5a595..2ef33fd28e0ee4ae60a1950850ddd8a728d7a25d 100644 (file)
@@ -38,7 +38,7 @@ P.example {
   font-style: italic;
   margin-left: 36pt;
 }
-  
+
 PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
@@ -77,7 +77,7 @@ A:link:hover IMG {
 }
 
 A:link, A:visited {
-  font-weight: normal;
+  font-weight: inherit;
   text-decoration: none;
 }
 
index 0399f057c438e23f97b0524a31b78765617231fd..40fc01d3e1ed77e0e981a9ac541aa9ff6c19373c 100644 (file)
@@ -38,7 +38,7 @@ P.example {
   font-style: italic;
   margin-left: 36pt;
 }
-  
+
 PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
@@ -77,7 +77,7 @@ A:link:hover IMG {
 }
 
 A:link, A:visited {
-  font-weight: normal;
+  font-weight: inherit;
   text-decoration: none;
 }
 
index 5853ede5faec924e35cef1d9347e0bc822a25658..894e0bf44a9ef8013a10ced5c1bd4e5de21cb02d 100644 (file)
@@ -38,7 +38,7 @@ P.example {
   font-style: italic;
   margin-left: 36pt;
 }
-  
+
 PRE.example {
   background: #eeeeee;
   border: dotted thin #999999;
@@ -77,7 +77,7 @@ A:link:hover IMG {
 }
 
 A:link, A:visited {
-  font-weight: normal;
+  font-weight: inherit;
   text-decoration: none;
 }