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.3'
>
8 <style type='text/css'
><!--
9 h1, h2, h3, p { font-family: sans-serif; text-align: justify; }
10 tt, pre a:link, pre a:visited, tt a:link, tt a:visited { font-weight: bold; color: #7f0000; }
11 pre { font-weight: bold; color: #7f0000; margin-left: 2em; }
12 span.info { background: #000000; border: solid thin #000000; color: #ffffff; font-size: 80%; font-style: italic; font-weight: bold; white-space: nowrap; }
13 h3 span.info { float: right; font-size: 100%; }
14 h1.title, h2.title, h3.title { border-bottom: solid 2px #000000; }
19 "$Id: api-httpipp.shtml 5138 2006-02-21 10:49:06Z mike $"
21 HTTP and IPP API introduction for the Common UNIX Printing System (CUPS).
23 Copyright 1997-2006 by Easy Software Products.
25 These coded instructions, statements, and computer programs are the
26 property of Easy Software Products and are protected by Federal
27 copyright law. Distribution and use rights are outlined in the file
28 "LICENSE.txt" which should have been included with this file. If this
29 file is missing or damaged please contact Easy Software Products
32 Attn: CUPS Licensing Information
33 Easy Software Products
34 44141 Airport View Drive, Suite 204
35 Hollywood, Maryland 20636 USA
38 EMail: cups-info@cups.org
39 WWW: http://www.cups.org
42 <h2 class='title'
>Introduction
</h2>
44 <p>The CUPS HTTP and IPP APIs provide low-level access to the
45 HTTP and IPP protocols and CUPS scheduler. They are typically
46 used by monitoring and administration programs to perform
47 specific functions not supported by the high-level CUPS API
50 <h2 class='title'
>General Usage
</h2>
52 <p>The
<var><cups/cups.h
></var> header file must be included to
53 use the HTTP and IPP functions.
</p>
55 <p>Programs using these functions must be linked to the CUPS
56 library:
<var>libcups.a
</var>,
<var>libcups.so
.2</var>,
57 <var>libcups
.2.dylib
</var>,
<var>libcups_s.a
</var>, or
58 <var>libcups2.lib
</var> depending on the platform. The following
59 command compiles
<var>myprogram.c
</var> using GCC and the CUPS
63 <kbd>gcc -o myprogram myprogram.c -lcups
</kbd>
66 <h2 class='title'
>Compatibility
</h2>
68 <p>Unless otherwise specified, the HTTP and IPP API functions
69 require CUPS
1.1 or higher.
</p>
70 <h2 class='title'
>Contents
</h2>
72 <li><a href='#ENUMERATIONS'
>Enumerations
</a></li>
73 <li><a href='#FUNCTIONS'
>Functions
</a></li>
74 <li><a href='#STRUCTURES'
>Structures
</a></li>
75 <li><a href='#TYPES'
>Types
</a></li>
76 <li><a href='#UNIONS'
>Unions
</a></li>
79 <h2 class='title'
><a name='ENUMERATIONS'
>Enumerations
</a></h2>
81 <li><a href='#http_auth_e'
><tt>http_auth_e
</tt></a> </li>
82 <li><a href='#http_encoding_e'
><tt>http_encoding_e
</tt></a> </li>
83 <li><a href='#http_encryption_e'
><tt>http_encryption_e
</tt></a> </li>
84 <li><a href='#http_field_e'
><tt>http_field_e
</tt></a> </li>
85 <li><a href='#http_keepalive_e'
><tt>http_keepalive_e
</tt></a> </li>
86 <li><a href='#http_status_e'
><tt>http_status_e
</tt></a> </li>
87 <li><a href='#ipp_res_e'
><tt>ipp_res_e
</tt></a> </li>
88 <li><a href='#ipp_status_e'
><tt>ipp_status_e
</tt></a> </li>
89 <li><a href='#ipp_tag_e'
><tt>ipp_tag_e
</tt></a> </li>
92 <h3 class='title'
><a name='http_auth_e'
>http_auth_e
</a></h3>
94 <p>HTTP authentication types
</p>
96 <div class='table'
><table align='center' border='
1' width='
80%'
>
97 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
99 <tr><td><tt>HTTP_AUTH_BASIC
</tt> </td><td>Basic authentication in use
</td></tr>
100 <tr><td><tt>HTTP_AUTH_MD5
</tt> </td><td>Digest authentication in use
</td></tr>
101 <tr><td><tt>HTTP_AUTH_MD5_INT
</tt> </td><td>Digest authentication in use for body
</td></tr>
102 <tr><td><tt>HTTP_AUTH_MD5_SESS
</tt> </td><td>MD5-session authentication in use
</td></tr>
103 <tr><td><tt>HTTP_AUTH_MD5_SESS_INT
</tt> </td><td>MD5-session authentication in use for body
</td></tr>
104 <tr><td><tt>HTTP_AUTH_NONE
</tt> </td><td>No authentication in use
</td></tr>
105 </tbody></table></div>
107 <h3 class='title'
><a name='http_encoding_e'
>http_encoding_e
</a></h3>
109 <p>HTTP transfer encoding values
</p>
111 <div class='table'
><table align='center' border='
1' width='
80%'
>
112 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
114 <tr><td><tt>HTTP_ENCODE_CHUNKED
</tt> </td><td>Data is chunked
</td></tr>
115 <tr><td><tt>HTTP_ENCODE_FIELDS
</tt> </td><td>Sending HTTP fields
</td></tr>
116 <tr><td><tt>HTTP_ENCODE_LENGTH
</tt> </td><td>Data is sent with Content-Length
</td></tr>
117 </tbody></table></div>
119 <h3 class='title'
><a name='http_encryption_e'
>http_encryption_e
</a></h3>
121 <p>HTTP encryption values
</p>
123 <div class='table'
><table align='center' border='
1' width='
80%'
>
124 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
126 <tr><td><tt>HTTP_ENCRYPT_ALWAYS
</tt> </td><td>Always encrypt (SSL)
</td></tr>
127 <tr><td><tt>HTTP_ENCRYPT_IF_REQUESTED
</tt> </td><td>Encrypt if requested (TLS upgrade)
</td></tr>
128 <tr><td><tt>HTTP_ENCRYPT_NEVER
</tt> </td><td>Never encrypt
</td></tr>
129 <tr><td><tt>HTTP_ENCRYPT_REQUIRED
</tt> </td><td>Encryption is required (TLS upgrade)
</td></tr>
130 </tbody></table></div>
132 <h3 class='title'
><a name='http_field_e'
>http_field_e
</a></h3>
134 <p>HTTP field names
</p>
136 <div class='table'
><table align='center' border='
1' width='
80%'
>
137 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
139 <tr><td><tt>HTTP_FIELD_ACCEPT_LANGUAGE
</tt> </td><td>Accept-Language field
</td></tr>
140 <tr><td><tt>HTTP_FIELD_ACCEPT_RANGES
</tt> </td><td>Accept-Ranges field
</td></tr>
141 <tr><td><tt>HTTP_FIELD_AUTHORIZATION
</tt> </td><td>Authorization field
</td></tr>
142 <tr><td><tt>HTTP_FIELD_CONNECTION
</tt> </td><td>Connection field
</td></tr>
143 <tr><td><tt>HTTP_FIELD_CONTENT_ENCODING
</tt> </td><td>Content-Encoding field
</td></tr>
144 <tr><td><tt>HTTP_FIELD_CONTENT_LANGUAGE
</tt> </td><td>Content-Language field
</td></tr>
145 <tr><td><tt>HTTP_FIELD_CONTENT_LENGTH
</tt> </td><td>Content-Length field
</td></tr>
146 <tr><td><tt>HTTP_FIELD_CONTENT_LOCATION
</tt> </td><td>Content-Location field
</td></tr>
147 <tr><td><tt>HTTP_FIELD_CONTENT_MD5
</tt> </td><td>Content-MD5 field
</td></tr>
148 <tr><td><tt>HTTP_FIELD_CONTENT_RANGE
</tt> </td><td>Content-Range field
</td></tr>
149 <tr><td><tt>HTTP_FIELD_CONTENT_TYPE
</tt> </td><td>Content-Type field
</td></tr>
150 <tr><td><tt>HTTP_FIELD_CONTENT_VERSION
</tt> </td><td>Content-Version field
</td></tr>
151 <tr><td><tt>HTTP_FIELD_DATE
</tt> </td><td>Date field
</td></tr>
152 <tr><td><tt>HTTP_FIELD_HOST
</tt> </td><td>Host field
</td></tr>
153 <tr><td><tt>HTTP_FIELD_IF_MODIFIED_SINCE
</tt> </td><td>If-Modified-Since field
</td></tr>
154 <tr><td><tt>HTTP_FIELD_IF_UNMODIFIED_SINCE
</tt> </td><td>If-Unmodified-Since field
</td></tr>
155 <tr><td><tt>HTTP_FIELD_KEEP_ALIVE
</tt> </td><td>Keep-Alive field
</td></tr>
156 <tr><td><tt>HTTP_FIELD_LAST_MODIFIED
</tt> </td><td>Last-Modified field
</td></tr>
157 <tr><td><tt>HTTP_FIELD_LINK
</tt> </td><td>Link field
</td></tr>
158 <tr><td><tt>HTTP_FIELD_LOCATION
</tt> </td><td>Location field
</td></tr>
159 <tr><td><tt>HTTP_FIELD_MAX
</tt> </td><td>Maximum field index
</td></tr>
160 <tr><td><tt>HTTP_FIELD_RANGE
</tt> </td><td>Range field
</td></tr>
161 <tr><td><tt>HTTP_FIELD_REFERER
</tt> </td><td>Referer field
</td></tr>
162 <tr><td><tt>HTTP_FIELD_RETRY_AFTER
</tt> </td><td>Retry-After field
</td></tr>
163 <tr><td><tt>HTTP_FIELD_TRANSFER_ENCODING
</tt> </td><td>Transfer-Encoding field
</td></tr>
164 <tr><td><tt>HTTP_FIELD_UNKNOWN
</tt> </td><td>Unknown field
</td></tr>
165 <tr><td><tt>HTTP_FIELD_UPGRADE
</tt> </td><td>Upgrade field
</td></tr>
166 <tr><td><tt>HTTP_FIELD_USER_AGENT
</tt> </td><td>User-Agent field
</td></tr>
167 <tr><td><tt>HTTP_FIELD_WWW_AUTHENTICATE
</tt> </td><td>WWW-Authenticate field
</td></tr>
168 </tbody></table></div>
170 <h3 class='title'
><a name='http_keepalive_e'
>http_keepalive_e
</a></h3>
172 <p>Types and structures...
</p>
174 <div class='table'
><table align='center' border='
1' width='
80%'
>
175 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
177 <tr><td><tt>HTTP_KEEPALIVE_OFF
</tt> </td><td>No keep alive support
</td></tr>
178 <tr><td><tt>HTTP_KEEPALIVE_ON
</tt> </td><td>Use keep alive
</td></tr>
179 </tbody></table></div>
181 <h3 class='title'
><a name='http_status_e'
>http_status_e
</a></h3>
183 <p>HTTP status codes
</p>
185 <div class='table'
><table align='center' border='
1' width='
80%'
>
186 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
188 <tr><td><tt>HTTP_ACCEPTED
</tt> </td><td>DELETE command was successful
</td></tr>
189 <tr><td><tt>HTTP_BAD_GATEWAY
</tt> </td><td>Bad gateway
</td></tr>
190 <tr><td><tt>HTTP_BAD_REQUEST
</tt> </td><td>Bad request
</td></tr>
191 <tr><td><tt>HTTP_CONFLICT
</tt> </td><td>Request is self-conflicting
</td></tr>
192 <tr><td><tt>HTTP_CONTINUE
</tt> </td><td>Everything OK, keep going...
</td></tr>
193 <tr><td><tt>HTTP_CREATED
</tt> </td><td>PUT command was successful
</td></tr>
194 <tr><td><tt>HTTP_ERROR
</tt> </td><td>An error response from httpXxxx()
</td></tr>
195 <tr><td><tt>HTTP_EXPECTATION_FAILED
</tt> </td><td>The expectation given in an Expect header field was not met
</td></tr>
196 <tr><td><tt>HTTP_FORBIDDEN
</tt> </td><td>Forbidden to access this URI
</td></tr>
197 <tr><td><tt>HTTP_GATEWAY_TIMEOUT
</tt> </td><td>Gateway connection timed out
</td></tr>
198 <tr><td><tt>HTTP_GONE
</tt> </td><td>Server has gone away
</td></tr>
199 <tr><td><tt>HTTP_LENGTH_REQUIRED
</tt> </td><td>A content length or encoding is required
</td></tr>
200 <tr><td><tt>HTTP_METHOD_NOT_ALLOWED
</tt> </td><td>Method is not allowed
</td></tr>
201 <tr><td><tt>HTTP_MOVED_PERMANENTLY
</tt> </td><td>Document has moved permanently
</td></tr>
202 <tr><td><tt>HTTP_MOVED_TEMPORARILY
</tt> </td><td>Document has moved temporarily
</td></tr>
203 <tr><td><tt>HTTP_MULTIPLE_CHOICES
</tt> </td><td>Multiple files match request
</td></tr>
204 <tr><td><tt>HTTP_NOT_ACCEPTABLE
</tt> </td><td>Not Acceptable
</td></tr>
205 <tr><td><tt>HTTP_NOT_AUTHORITATIVE
</tt> </td><td>Information isn't authoritative
</td></tr>
206 <tr><td><tt>HTTP_NOT_FOUND
</tt> </td><td>URI was not found
</td></tr>
207 <tr><td><tt>HTTP_NOT_IMPLEMENTED
</tt> </td><td>Feature not implemented
</td></tr>
208 <tr><td><tt>HTTP_NOT_MODIFIED
</tt> </td><td>File not modified
</td></tr>
209 <tr><td><tt>HTTP_NOT_SUPPORTED
</tt> </td><td>HTTP version not supported
</td></tr>
210 <tr><td><tt>HTTP_NO_CONTENT
</tt> </td><td>Successful command, no new data
</td></tr>
211 <tr><td><tt>HTTP_OK
</tt> </td><td>OPTIONS/GET/HEAD/POST/TRACE command was successful
</td></tr>
212 <tr><td><tt>HTTP_PARTIAL_CONTENT
</tt> </td><td>Only a partial file was recieved/sent
</td></tr>
213 <tr><td><tt>HTTP_PAYMENT_REQUIRED
</tt> </td><td>Payment required
</td></tr>
214 <tr><td><tt>HTTP_PRECONDITION
</tt> </td><td>Precondition failed
</td></tr>
215 <tr><td><tt>HTTP_PROXY_AUTHENTICATION
</tt> </td><td>Proxy Authentication is Required
</td></tr>
216 <tr><td><tt>HTTP_REQUESTED_RANGE
</tt> </td><td>The requested range is not satisfiable
</td></tr>
217 <tr><td><tt>HTTP_REQUEST_TIMEOUT
</tt> </td><td>Request timed out
</td></tr>
218 <tr><td><tt>HTTP_REQUEST_TOO_LARGE
</tt> </td><td>Request entity too large
</td></tr>
219 <tr><td><tt>HTTP_RESET_CONTENT
</tt> </td><td>Content was reset/recreated
</td></tr>
220 <tr><td><tt>HTTP_SEE_OTHER
</tt> </td><td>See this other link...
</td></tr>
221 <tr><td><tt>HTTP_SERVER_ERROR
</tt> </td><td>Internal server error
</td></tr>
222 <tr><td><tt>HTTP_SERVICE_UNAVAILABLE
</tt> </td><td>Service is unavailable
</td></tr>
223 <tr><td><tt>HTTP_SWITCHING_PROTOCOLS
</tt> </td><td>HTTP upgrade to TLS/SSL
</td></tr>
224 <tr><td><tt>HTTP_UNAUTHORIZED
</tt> </td><td>Unauthorized to access host
</td></tr>
225 <tr><td><tt>HTTP_UNSUPPORTED_MEDIATYPE
</tt> </td><td>The requested media type is unsupported
</td></tr>
226 <tr><td><tt>HTTP_UPGRADE_REQUIRED
</tt> </td><td>Upgrade to SSL/TLS required
</td></tr>
227 <tr><td><tt>HTTP_URI_TOO_LONG
</tt> </td><td>URI too long
</td></tr>
228 <tr><td><tt>HTTP_USE_PROXY
</tt> </td><td>Must use a proxy to access this URI
</td></tr>
229 </tbody></table></div>
231 <h3 class='title'
><a name='ipp_res_e'
>ipp_res_e
</a></h3>
233 <p>Types and structures...
</p>
235 <div class='table'
><table align='center' border='
1' width='
80%'
>
236 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
238 <tr><td><tt>IPP_RES_PER_CM
</tt> </td><td>Pixels per centimeter
</td></tr>
239 <tr><td><tt>IPP_RES_PER_INCH
</tt> </td><td>Pixels per inch
</td></tr>
240 </tbody></table></div>
242 <h3 class='title'
><a name='ipp_status_e'
>ipp_status_e
</a></h3>
244 <p>IPP status codes...
</p>
246 <div class='table'
><table align='center' border='
1' width='
80%'
>
247 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
249 <tr><td><tt>IPP_ATTRIBUTES
</tt> </td><td>client-error-attributes-or-values-not-supported
</td></tr>
250 <tr><td><tt>IPP_ATTRIBUTES_NOT_SETTABLE
</tt> </td><td>client-error-attributes-not-settable
</td></tr>
251 <tr><td><tt>IPP_BAD_REQUEST
</tt> </td><td>client-error-bad-request
</td></tr>
252 <tr><td><tt>IPP_CHARSET
</tt> </td><td>client-error-charset-not-supported
</td></tr>
253 <tr><td><tt>IPP_COMPRESSION_ERROR
</tt> </td><td>client-error-compression-error
</td></tr>
254 <tr><td><tt>IPP_COMPRESSION_NOT_SUPPORTED
</tt> </td><td>client-error-compression-not-supported
</td></tr>
255 <tr><td><tt>IPP_CONFLICT
</tt> </td><td>client-error-conflicting-attributes
</td></tr>
256 <tr><td><tt>IPP_DEVICE_ERROR
</tt> </td><td>server-error-device-error
</td></tr>
257 <tr><td><tt>IPP_DOCUMENT_ACCESS_ERROR
</tt> </td><td>client-error-document-access-error
</td></tr>
258 <tr><td><tt>IPP_DOCUMENT_FORMAT
</tt> </td><td>client-error-document-format-not-supported
</td></tr>
259 <tr><td><tt>IPP_DOCUMENT_FORMAT_ERROR
</tt> </td><td>client-error-document-format-error
</td></tr>
260 <tr><td><tt>IPP_ERROR_JOB_CANCELED
</tt> </td><td>server-error-job-canceled
</td></tr>
261 <tr><td><tt>IPP_FORBIDDEN
</tt> </td><td>client-error-forbidden
</td></tr>
262 <tr><td><tt>IPP_GONE
</tt> </td><td>client-error-gone
</td></tr>
263 <tr><td><tt>IPP_IGNORED_ALL_NOTIFICATIONS
</tt> </td><td>client-error-ignored-all-notifications
</td></tr>
264 <tr><td><tt>IPP_IGNORED_ALL_SUBSCRIPTIONS
</tt> </td><td>client-error-ignored-all-subscriptions
</td></tr>
265 <tr><td><tt>IPP_INTERNAL_ERROR
</tt> </td><td>server-error-internal-error
</td></tr>
266 <tr><td><tt>IPP_MULTIPLE_JOBS_NOT_SUPPORTED
</tt> </td><td>server-error-multiple-document-jobs-not-supported
</td></tr>
267 <tr><td><tt>IPP_NOT_ACCEPTING
</tt> </td><td>server-error-not-accepting-jobs
</td></tr>
268 <tr><td><tt>IPP_NOT_AUTHENTICATED
</tt> </td><td>client-error-not-authenticated
</td></tr>
269 <tr><td><tt>IPP_NOT_AUTHORIZED
</tt> </td><td>client-error-not-authorized
</td></tr>
270 <tr><td><tt>IPP_NOT_FOUND
</tt> </td><td>client-error-not-found
</td></tr>
271 <tr><td><tt>IPP_NOT_POSSIBLE
</tt> </td><td>client-error-not-possible
</td></tr>
272 <tr><td><tt>IPP_OK
</tt> </td><td>successful-ok
</td></tr>
273 <tr><td><tt>IPP_OK_BUT_CANCEL_SUBSCRIPTION
</tt> </td><td>successful-ok-but-cancel-subscription
</td></tr>
274 <tr><td><tt>IPP_OK_CONFLICT
</tt> </td><td>successful-ok-conflicting-attributes
</td></tr>
275 <tr><td><tt>IPP_OK_EVENTS_COMPLETE
</tt> </td><td>successful-ok-events-complete
</td></tr>
276 <tr><td><tt>IPP_OK_IGNORED_NOTIFICATIONS
</tt> </td><td>successful-ok-ignored-notifications
</td></tr>
277 <tr><td><tt>IPP_OK_IGNORED_SUBSCRIPTIONS
</tt> </td><td>successful-ok-ignored-subscriptions
</td></tr>
278 <tr><td><tt>IPP_OK_SUBST
</tt> </td><td>successful-ok-ignored-or-substituted-attributes
</td></tr>
279 <tr><td><tt>IPP_OK_TOO_MANY_EVENTS
</tt> </td><td>successful-ok-too-many-events
</td></tr>
280 <tr><td><tt>IPP_OPERATION_NOT_SUPPORTED
</tt> </td><td>server-error-operation-not-supported
</td></tr>
281 <tr><td><tt>IPP_PRINTER_BUSY
</tt> </td><td>server-error-busy
</td></tr>
282 <tr><td><tt>IPP_PRINTER_IS_DEACTIVATED
</tt> </td><td>server-error-printer-is-deactivated
</td></tr>
283 <tr><td><tt>IPP_PRINT_SUPPORT_FILE_NOT_FOUND
</tt> </td><td>client-error-print-support-file-not-found
</td></tr>
284 <tr><td><tt>IPP_REDIRECTION_OTHER_SITE
</tt> </td><td></td></tr>
285 <tr><td><tt>IPP_REQUEST_ENTITY
</tt> </td><td>client-error-request-entity-too-large
</td></tr>
286 <tr><td><tt>IPP_REQUEST_VALUE
</tt> </td><td>client-error-request-value-too-long
</td></tr>
287 <tr><td><tt>IPP_SERVICE_UNAVAILABLE
</tt> </td><td>server-error-service-unavailable
</td></tr>
288 <tr><td><tt>IPP_TEMPORARY_ERROR
</tt> </td><td>server-error-temporary-error
</td></tr>
289 <tr><td><tt>IPP_TIMEOUT
</tt> </td><td>client-error-timeout
</td></tr>
290 <tr><td><tt>IPP_TOO_MANY_SUBSCRIPTIONS
</tt> </td><td>client-error-too-many-subscriptions
</td></tr>
291 <tr><td><tt>IPP_URI_SCHEME
</tt> </td><td>client-error-uri-scheme-not-supported
</td></tr>
292 <tr><td><tt>IPP_VERSION_NOT_SUPPORTED
</tt> </td><td>server-error-version-not-supported
</td></tr>
293 </tbody></table></div>
295 <h3 class='title'
><a name='ipp_tag_e'
>ipp_tag_e
</a></h3>
297 <p>Format tags for attributes...
</p>
299 <div class='table'
><table align='center' border='
1' width='
80%'
>
300 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
302 <tr><td><tt>IPP_TAG_ADMINDEFINE
</tt> </td><td>Admin-defined value
</td></tr>
303 <tr><td><tt>IPP_TAG_BEGIN_COLLECTION
</tt> </td><td>Beginning of collection value
</td></tr>
304 <tr><td><tt>IPP_TAG_BOOLEAN
</tt> </td><td>Boolean value
</td></tr>
305 <tr><td><tt>IPP_TAG_CHARSET
</tt> </td><td>Character set value
</td></tr>
306 <tr><td><tt>IPP_TAG_COPY
</tt> </td><td>Bitflag for copied attribute values
</td></tr>
307 <tr><td><tt>IPP_TAG_DATE
</tt> </td><td>Date/time value
</td></tr>
308 <tr><td><tt>IPP_TAG_DEFAULT
</tt> </td><td>Default value
</td></tr>
309 <tr><td><tt>IPP_TAG_DELETEATTR
</tt> </td><td>Delete-attribute value
</td></tr>
310 <tr><td><tt>IPP_TAG_END
</tt> </td><td>End-of-attributes
</td></tr>
311 <tr><td><tt>IPP_TAG_END_COLLECTION
</tt> </td><td>End of collection value
</td></tr>
312 <tr><td><tt>IPP_TAG_ENUM
</tt> </td><td>Enumeration value
</td></tr>
313 <tr><td><tt>IPP_TAG_EVENT_NOTIFICATION
</tt> </td><td>Event group
</td></tr>
314 <tr><td><tt>IPP_TAG_INTEGER
</tt> </td><td>Integer value
</td></tr>
315 <tr><td><tt>IPP_TAG_JOB
</tt> </td><td>Job group
</td></tr>
316 <tr><td><tt>IPP_TAG_KEYWORD
</tt> </td><td>Keyword value
</td></tr>
317 <tr><td><tt>IPP_TAG_LANGUAGE
</tt> </td><td>Language value
</td></tr>
318 <tr><td><tt>IPP_TAG_MASK
</tt> </td><td>Mask for copied attribute values
</td></tr>
319 <tr><td><tt>IPP_TAG_MEMBERNAME
</tt> </td><td>Collection member name value
</td></tr>
320 <tr><td><tt>IPP_TAG_MIMETYPE
</tt> </td><td>MIME media type value
</td></tr>
321 <tr><td><tt>IPP_TAG_NAME
</tt> </td><td>Name value
</td></tr>
322 <tr><td><tt>IPP_TAG_NAMELANG
</tt> </td><td>Name-with-language value
</td></tr>
323 <tr><td><tt>IPP_TAG_NOTSETTABLE
</tt> </td><td>Not-settable value
</td></tr>
324 <tr><td><tt>IPP_TAG_NOVALUE
</tt> </td><td>No-value value
</td></tr>
325 <tr><td><tt>IPP_TAG_OPERATION
</tt> </td><td>Operation group
</td></tr>
326 <tr><td><tt>IPP_TAG_PRINTER
</tt> </td><td>Printer group
</td></tr>
327 <tr><td><tt>IPP_TAG_RANGE
</tt> </td><td>Range value
</td></tr>
328 <tr><td><tt>IPP_TAG_RESOLUTION
</tt> </td><td>Resolution value
</td></tr>
329 <tr><td><tt>IPP_TAG_STRING
</tt> </td><td>Octet string value
</td></tr>
330 <tr><td><tt>IPP_TAG_SUBSCRIPTION
</tt> </td><td>Subscription group
</td></tr>
331 <tr><td><tt>IPP_TAG_TEXT
</tt> </td><td>Text value
</td></tr>
332 <tr><td><tt>IPP_TAG_TEXTLANG
</tt> </td><td>Text-with-language value
</td></tr>
333 <tr><td><tt>IPP_TAG_UNKNOWN
</tt> </td><td>Unknown value
</td></tr>
334 <tr><td><tt>IPP_TAG_UNSUPPORTED_GROUP
</tt> </td><td>Unsupported attributes group
</td></tr>
335 <tr><td><tt>IPP_TAG_UNSUPPORTED_VALUE
</tt> </td><td>Unsupported value
</td></tr>
336 <tr><td><tt>IPP_TAG_URI
</tt> </td><td>URI value
</td></tr>
337 <tr><td><tt>IPP_TAG_URISCHEME
</tt> </td><td>URI scheme value
</td></tr>
338 <tr><td><tt>IPP_TAG_ZERO
</tt> </td><td>Zero tag - used for separators
</td></tr>
339 </tbody></table></div>
341 <h2 class='title'
><a name='FUNCTIONS'
>Functions
</a></h2>
343 <li><a href='#cupsDoAuthentication'
><tt>cupsDoAuthentication()
</tt></a> <span class='info'
> CUPS
1.1.20 </span></li>
344 <li><a href='#cupsDoFileRequest'
><tt>cupsDoFileRequest()
</tt></a> </li>
345 <li><a href='#cupsDoRequest'
><tt>cupsDoRequest()
</tt></a> </li>
346 <li><a href='#cupsEncodeOptions'
><tt>cupsEncodeOptions()
</tt></a> </li>
347 <li><a href='#cupsEncodeOptions2'
><tt>cupsEncodeOptions2()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
348 <li><a href='#httpAddrAny'
><tt>httpAddrAny()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
349 <li><a href='#httpAddrEqual'
><tt>httpAddrEqual()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
350 <li><a href='#httpAddrLength'
><tt>httpAddrLength()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
351 <li><a href='#httpAddrLocalhost'
><tt>httpAddrLocalhost()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
352 <li><a href='#httpAddrLookup'
><tt>httpAddrLookup()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
353 <li><a href='#httpAddrString'
><tt>httpAddrString()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
354 <li><a href='#httpAssembleURI'
><tt>httpAssembleURI()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
355 <li><a href='#httpAssembleURIf'
><tt>httpAssembleURIf()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
356 <li><a href='#httpBlocking'
><tt>httpBlocking()
</tt></a> </li>
357 <li><a href='#httpCheck'
><tt>httpCheck()
</tt></a> </li>
358 <li><a href='#httpClearCookie'
><tt>httpClearCookie()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
359 <li><a href='#httpClearFields'
><tt>httpClearFields()
</tt></a> </li>
360 <li><a href='#httpClose'
><tt>httpClose()
</tt></a> </li>
361 <li><a href='#httpConnect'
><tt>httpConnect()
</tt></a> </li>
362 <li><a href='#httpConnectEncrypt'
><tt>httpConnectEncrypt()
</tt></a> </li>
363 <li><a href='#httpDecode64'
><tt>httpDecode64()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
364 <li><a href='#httpDecode64_2'
><tt>httpDecode64_2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
365 <li><a href='#httpDelete'
><tt>httpDelete()
</tt></a> </li>
366 <li><a href='#httpEncode64'
><tt>httpEncode64()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
367 <li><a href='#httpEncode64_2'
><tt>httpEncode64_2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
368 <li><a href='#httpEncryption'
><tt>httpEncryption()
</tt></a> </li>
369 <li><a href='#httpError'
><tt>httpError()
</tt></a> </li>
370 <li><a href='#httpFlush'
><tt>httpFlush()
</tt></a> </li>
371 <li><a href='#httpFlushWrite'
><tt>httpFlushWrite()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
372 <li><a href='#httpGet'
><tt>httpGet()
</tt></a> </li>
373 <li><a href='#httpGetBlocking'
><tt>httpGetBlocking()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
374 <li><a href='#httpGetCookie'
><tt>httpGetCookie()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
375 <li><a href='#httpGetDateString'
><tt>httpGetDateString()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
376 <li><a href='#httpGetDateString2'
><tt>httpGetDateString2()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
377 <li><a href='#httpGetDateTime'
><tt>httpGetDateTime()
</tt></a> </li>
378 <li><a href='#httpGetFd'
><tt>httpGetFd()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
379 <li><a href='#httpGetField'
><tt>httpGetField()
</tt></a> </li>
380 <li><a href='#httpGetHostByName'
><tt>httpGetHostByName()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
381 <li><a href='#httpGetHostname'
><tt>httpGetHostname()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
382 <li><a href='#httpGetLength'
><tt>httpGetLength()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
383 <li><a href='#httpGetLength2'
><tt>httpGetLength2()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
384 <li><a href='#httpGetStatus'
><tt>httpGetStatus()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
385 <li><a href='#httpGetSubField'
><tt>httpGetSubField()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
386 <li><a href='#httpGetSubField2'
><tt>httpGetSubField2()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
387 <li><a href='#httpGets'
><tt>httpGets()
</tt></a> </li>
388 <li><a href='#httpHead'
><tt>httpHead()
</tt></a> </li>
389 <li><a href='#httpInitialize'
><tt>httpInitialize()
</tt></a> </li>
390 <li><a href='#httpMD5'
><tt>httpMD5()
</tt></a> </li>
391 <li><a href='#httpMD5Final'
><tt>httpMD5Final()
</tt></a> </li>
392 <li><a href='#httpMD5String'
><tt>httpMD5String()
</tt></a> </li>
393 <li><a href='#httpOptions'
><tt>httpOptions()
</tt></a> </li>
394 <li><a href='#httpPost'
><tt>httpPost()
</tt></a> </li>
395 <li><a href='#httpPut'
><tt>httpPut()
</tt></a> </li>
396 <li><a href='#httpRead'
><tt>httpRead()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
397 <li><a href='#httpRead2'
><tt>httpRead2()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
398 <li><a href='#httpReconnect'
><tt>httpReconnect()
</tt></a> </li>
399 <li><a href='#httpSeparate'
><tt>httpSeparate()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
400 <li><a href='#httpSeparate2'
><tt>httpSeparate2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
401 <li><a href='#httpSeparateURI'
><tt>httpSeparateURI()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
402 <li><a href='#httpSetCookie'
><tt>httpSetCookie()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
403 <li><a href='#httpSetExpect'
><tt>httpSetExpect()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
404 <li><a href='#httpSetField'
><tt>httpSetField()
</tt></a> </li>
405 <li><a href='#httpSetLength'
><tt>httpSetLength()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
406 <li><a href='#httpStatus'
><tt>httpStatus()
</tt></a> </li>
407 <li><a href='#httpTrace'
><tt>httpTrace()
</tt></a> </li>
408 <li><a href='#httpUpdate'
><tt>httpUpdate()
</tt></a> </li>
409 <li><a href='#httpWait'
><tt>httpWait()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
410 <li><a href='#httpWrite'
><tt>httpWrite()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
411 <li><a href='#httpWrite2'
><tt>httpWrite2()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
412 <li><a href='#ippAddBoolean'
><tt>ippAddBoolean()
</tt></a> </li>
413 <li><a href='#ippAddBooleans'
><tt>ippAddBooleans()
</tt></a> </li>
414 <li><a href='#ippAddCollection'
><tt>ippAddCollection()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
415 <li><a href='#ippAddCollections'
><tt>ippAddCollections()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
416 <li><a href='#ippAddDate'
><tt>ippAddDate()
</tt></a> </li>
417 <li><a href='#ippAddInteger'
><tt>ippAddInteger()
</tt></a> </li>
418 <li><a href='#ippAddIntegers'
><tt>ippAddIntegers()
</tt></a> </li>
419 <li><a href='#ippAddOctetString'
><tt>ippAddOctetString()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
420 <li><a href='#ippAddRange'
><tt>ippAddRange()
</tt></a> </li>
421 <li><a href='#ippAddRanges'
><tt>ippAddRanges()
</tt></a> </li>
422 <li><a href='#ippAddResolution'
><tt>ippAddResolution()
</tt></a> </li>
423 <li><a href='#ippAddResolutions'
><tt>ippAddResolutions()
</tt></a> </li>
424 <li><a href='#ippAddSeparator'
><tt>ippAddSeparator()
</tt></a> </li>
425 <li><a href='#ippAddString'
><tt>ippAddString()
</tt></a> </li>
426 <li><a href='#ippAddStrings'
><tt>ippAddStrings()
</tt></a> </li>
427 <li><a href='#ippDateToTime'
><tt>ippDateToTime()
</tt></a> </li>
428 <li><a href='#ippDelete'
><tt>ippDelete()
</tt></a> </li>
429 <li><a href='#ippDeleteAttribute'
><tt>ippDeleteAttribute()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
430 <li><a href='#ippErrorString'
><tt>ippErrorString()
</tt></a> </li>
431 <li><a href='#ippErrorValue'
><tt>ippErrorValue()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
432 <li><a href='#ippFindAttribute'
><tt>ippFindAttribute()
</tt></a> </li>
433 <li><a href='#ippFindNextAttribute'
><tt>ippFindNextAttribute()
</tt></a> </li>
434 <li><a href='#ippLength'
><tt>ippLength()
</tt></a> </li>
435 <li><a href='#ippNew'
><tt>ippNew()
</tt></a> </li>
436 <li><a href='#ippNewRequest'
><tt>ippNewRequest()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
437 <li><a href='#ippOpString'
><tt>ippOpString()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
438 <li><a href='#ippOpValue'
><tt>ippOpValue()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
439 <li><a href='#ippPort'
><tt>ippPort()
</tt></a> </li>
440 <li><a href='#ippRead'
><tt>ippRead()
</tt></a> </li>
441 <li><a href='#ippReadFile'
><tt>ippReadFile()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
442 <li><a href='#ippReadIO'
><tt>ippReadIO()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
443 <li><a href='#ippSetPort'
><tt>ippSetPort()
</tt></a> </li>
444 <li><a href='#ippTimeToDate'
><tt>ippTimeToDate()
</tt></a> </li>
445 <li><a href='#ippWrite'
><tt>ippWrite()
</tt></a> </li>
446 <li><a href='#ippWriteFile'
><tt>ippWriteFile()
</tt></a> <span class='info'
> CUPS
1.1.19 </span></li>
447 <li><a href='#ippWriteIO'
><tt>ippWriteIO()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
450 <h3 class='title'
><span class='info'
> CUPS
1.1.20 </span><a name='cupsDoAuthentication'
>cupsDoAuthentication()
</a></h3>
452 <p>Authenticate a request.
454 This function should be called in response to a HTTP_UNAUTHORIZED
455 status, prior to resubmitting your request.
461 cupsDoAuthentication(
462 <a href='#http_t'
>http_t
</a> * http,
464 const char * resource);
467 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
468 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
470 <tr><td><tt>http
</tt></td><td>HTTP connection to server
</td></tr>
471 <tr><td><tt>method
</tt></td><td>Request method (GET, POST, PUT)
</td></tr>
472 <tr><td><tt>resource
</tt></td><td>Resource path
</td></tr>
473 </tbody></table></div>
475 <p>0 on success, -
1 on error
</p>
477 <h3 class='title'
><a name='cupsDoFileRequest'
>cupsDoFileRequest()
</a></h3>
479 <p>Do an IPP request with a file.
481 This function sends the IPP request to the specified server, retrying
482 and authenticating as necessary. The request is freed with ippDelete()
483 after receiving a valid IPP response.
</p>
486 <a href='#ipp_t'
>ipp_t
</a> *
488 <a href='#http_t'
>http_t
</a> * http,
489 <a href='#ipp_t'
>ipp_t
</a> * request,
490 const char * resource,
491 const char * filename);
494 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
495 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
497 <tr><td><tt>http
</tt></td><td>HTTP connection to server
</td></tr>
498 <tr><td><tt>request
</tt></td><td>IPP request
</td></tr>
499 <tr><td><tt>resource
</tt></td><td>HTTP resource for POST
</td></tr>
500 <tr><td><tt>filename
</tt></td><td>File to send or NULL for none
</td></tr>
501 </tbody></table></div>
505 <h3 class='title'
><a name='cupsDoRequest'
>cupsDoRequest()
</a></h3>
507 <p>Do an IPP request.
509 This function sends the IPP request to the specified server, retrying
510 and authenticating as necessary. The request is freed with ippDelete()
511 after receiving a valid IPP response.
</p>
514 <a href='#ipp_t'
>ipp_t
</a> *
516 <a href='#http_t'
>http_t
</a> * http,
517 <a href='#ipp_t'
>ipp_t
</a> * request,
518 const char * resource);
521 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
522 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
524 <tr><td><tt>http
</tt></td><td>HTTP connection to server
</td></tr>
525 <tr><td><tt>request
</tt></td><td>IPP request
</td></tr>
526 <tr><td><tt>resource
</tt></td><td>HTTP resource for POST
</td></tr>
527 </tbody></table></div>
531 <h3 class='title'
><a name='cupsEncodeOptions'
>cupsEncodeOptions()
</a></h3>
533 <p>Encode printer options into IPP attributes.
535 This function adds operation, job, and then subscription attributes,
536 in that order. Use the cupsEncodeOptions2() function to add attributes
537 for a single group.
</p>
542 <a href='#ipp_t'
>ipp_t
</a> * ipp,
544 cups_option_t * options);
547 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
548 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
550 <tr><td><tt>ipp
</tt></td><td>Request to add to
</td></tr>
551 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
552 <tr><td><tt>options
</tt></td><td>Options
</td></tr>
553 </tbody></table></div>
557 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='cupsEncodeOptions2'
>cupsEncodeOptions2()
</a></h3>
559 <p>Encode printer options into IPP attributes for a group.
561 This function only adds attributes for a single group. Call this
562 function multiple times for each group, or use cupsEncodeOptions()
563 to add the standard groups.
570 <a href='#ipp_t'
>ipp_t
</a> * ipp,
572 cups_option_t * options,
573 ipp_tag_t group_tag);
576 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
577 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
579 <tr><td><tt>ipp
</tt></td><td>Request to add to
</td></tr>
580 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
581 <tr><td><tt>options
</tt></td><td>Options
</td></tr>
582 <tr><td><tt>group_tag
</tt></td><td>Group to encode
</td></tr>
583 </tbody></table></div>
587 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAddrAny'
>httpAddrAny()
</a></h3>
589 <p>Check for the
"any
" address.
596 const
<a href='#http_addr_t'
>http_addr_t
</a> * addr);
599 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
600 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
602 <tr><td><tt>addr
</tt></td><td>Address to check
</td></tr>
603 </tbody></table></div>
605 <p>1 if
"any
",
0 otherwise
</p>
607 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAddrEqual'
>httpAddrEqual()
</a></h3>
609 <p>Compare two addresses.
616 const
<a href='#http_addr_t'
>http_addr_t
</a> * addr1,
617 const
<a href='#http_addr_t'
>http_addr_t
</a> * addr2);
620 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
621 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
623 <tr><td><tt>addr1
</tt></td><td>First address
</td></tr>
624 <tr><td><tt>addr2
</tt></td><td>Second address
</td></tr>
625 </tbody></table></div>
627 <p>1 if equal,
0 if not
</p>
629 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAddrLength'
>httpAddrLength()
</a></h3>
631 <p>Return the length of the address in bytes.
638 const
<a href='#http_addr_t'
>http_addr_t
</a> * addr);
641 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
642 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
644 <tr><td><tt>addr
</tt></td><td>Address
</td></tr>
645 </tbody></table></div>
647 <p>Length in bytes
</p>
649 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAddrLocalhost'
>httpAddrLocalhost()
</a></h3>
651 <p>Check for the local loopback address.
658 const
<a href='#http_addr_t'
>http_addr_t
</a> * addr);
661 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
662 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
664 <tr><td><tt>addr
</tt></td><td>Address to check
</td></tr>
665 </tbody></table></div>
667 <p>1 if local host,
0 otherwise
</p>
669 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAddrLookup'
>httpAddrLookup()
</a></h3>
671 <p>Lookup the hostname associated with the address.
678 const
<a href='#http_addr_t'
>http_addr_t
</a> * addr,
683 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
684 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
686 <tr><td><tt>addr
</tt></td><td>Address to lookup
</td></tr>
687 <tr><td><tt>name
</tt></td><td>Host name buffer
</td></tr>
688 <tr><td><tt>namelen
</tt></td><td>Size of name buffer
</td></tr>
689 </tbody></table></div>
693 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAddrString'
>httpAddrString()
</a></h3>
695 <p>Convert an address to a numeric string.
702 const
<a href='#http_addr_t'
>http_addr_t
</a> * addr,
707 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
708 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
710 <tr><td><tt>addr
</tt></td><td>Address to convert
</td></tr>
711 <tr><td><tt>s
</tt></td><td>String buffer
</td></tr>
712 <tr><td><tt>slen
</tt></td><td>Length of string
</td></tr>
713 </tbody></table></div>
715 <p>Numeric address string
</p>
717 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAssembleURI'
>httpAssembleURI()
</a></h3>
719 <p>Assemble a uniform resource identifier from its
722 This function escapes reserved characters in the URI depending on the
723 value of the
"encoding
" argument. You should use this function in
724 place of traditional string functions whenever you need to create a
732 http_uri_coding_t encoding,
736 const char * username,
739 const char * resource);
742 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
743 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
745 <tr><td><tt>encoding
</tt></td><td>Encoding flags
</td></tr>
746 <tr><td><tt>uri
</tt></td><td>URI buffer
</td></tr>
747 <tr><td><tt>urilen
</tt></td><td>Size of URI buffer
</td></tr>
748 <tr><td><tt>scheme
</tt></td><td>Scheme name
</td></tr>
749 <tr><td><tt>username
</tt></td><td>Username
</td></tr>
750 <tr><td><tt>host
</tt></td><td>Hostname or address
</td></tr>
751 <tr><td><tt>port
</tt></td><td>Port number
</td></tr>
752 <tr><td><tt>resource
</tt></td><td>Resource
</td></tr>
753 </tbody></table></div>
757 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpAssembleURIf'
>httpAssembleURIf()
</a></h3>
759 <p>Assemble a uniform resource identifier from its
760 components with a formatted resource.
762 This function creates a formatted version of the resource string
763 argument
"resourcef
" and escapes reserved characters in the URI
764 depending on the value of the
"encoding
" argument. You should use
765 this function in place of traditional string functions whenever
766 you need to create a URI string.
773 http_uri_coding_t encoding,
777 const char * username,
780 const char * resourcef,
784 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
785 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
787 <tr><td><tt>encoding
</tt></td><td>Encoding flags
</td></tr>
788 <tr><td><tt>uri
</tt></td><td>URI buffer
</td></tr>
789 <tr><td><tt>urilen
</tt></td><td>Size of URI buffer
</td></tr>
790 <tr><td><tt>scheme
</tt></td><td>Scheme name
</td></tr>
791 <tr><td><tt>username
</tt></td><td>Username
</td></tr>
792 <tr><td><tt>host
</tt></td><td>Hostname or address
</td></tr>
793 <tr><td><tt>port
</tt></td><td>Port number
</td></tr>
794 <tr><td><tt>resourcef
</tt></td><td>Printf-style resource
</td></tr>
795 <tr><td><tt>...
</tt></td><td>Additional arguments as needed
</td></tr>
796 </tbody></table></div>
800 <h3 class='title'
><a name='httpBlocking'
>httpBlocking()
</a></h3>
802 <p>Set blocking/non-blocking behavior on a connection.
</p>
807 <a href='#http_t'
>http_t
</a> * http,
811 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
812 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
814 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
815 <tr><td><tt>b
</tt></td><td>1 = blocking,
0 = non-blocking
</td></tr>
816 </tbody></table></div>
820 <h3 class='title'
><a name='httpCheck'
>httpCheck()
</a></h3>
822 <p>Check to see if there is a pending response from the server.
</p>
827 <a href='#http_t'
>http_t
</a> * http);
830 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
831 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
833 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
834 </tbody></table></div>
836 <p>0 = no data,
1 = data available
</p>
838 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='httpClearCookie'
>httpClearCookie()
</a></h3>
840 <p>Clear the cookie value(s).
847 <a href='#http_t'
>http_t
</a> * http);
850 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
851 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
853 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
854 </tbody></table></div>
858 <h3 class='title'
><a name='httpClearFields'
>httpClearFields()
</a></h3>
860 <p>Clear HTTP request fields.
</p>
865 <a href='#http_t'
>http_t
</a> * http);
868 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
869 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
871 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
872 </tbody></table></div>
876 <h3 class='title'
><a name='httpClose'
>httpClose()
</a></h3>
878 <p>Close an HTTP connection...
</p>
883 <a href='#http_t'
>http_t
</a> * http);
886 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
887 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
889 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
890 </tbody></table></div>
894 <h3 class='title'
><a name='httpConnect'
>httpConnect()
</a></h3>
896 <p>Connect to a HTTP server.
</p>
899 <a href='#http_t'
>http_t
</a> *
905 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
906 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
908 <tr><td><tt>host
</tt></td><td>Host to connect to
</td></tr>
909 <tr><td><tt>port
</tt></td><td>Port number
</td></tr>
910 </tbody></table></div>
912 <p>New HTTP connection
</p>
914 <h3 class='title'
><a name='httpConnectEncrypt'
>httpConnectEncrypt()
</a></h3>
916 <p>Connect to a HTTP server using encryption.
</p>
919 <a href='#http_t'
>http_t
</a> *
923 <a href='#http_encryption_t'
>http_encryption_t
</a> encryption);
926 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
927 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
929 <tr><td><tt>host
</tt></td><td>Host to connect to
</td></tr>
930 <tr><td><tt>port
</tt></td><td>Port number
</td></tr>
931 <tr><td><tt>encryption
</tt></td><td>Type of encryption to use
</td></tr>
932 </tbody></table></div>
934 <p>New HTTP connection
</p>
936 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='httpDecode64'
>httpDecode64()
</a></h3>
938 <p>Base64-decode a string.
940 This function is deprecated. Use the httpDecode64_2() function instead
941 which provides buffer length arguments.
952 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
953 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
955 <tr><td><tt>out
</tt></td><td>String to write to
</td></tr>
956 <tr><td><tt>in
</tt></td><td>String to read from
</td></tr>
957 </tbody></table></div>
959 <p>Decoded string
</p>
961 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='httpDecode64_2'
>httpDecode64_2()
</a></h3>
963 <p>Base64-decode a string.
975 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
976 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
978 <tr><td><tt>out
</tt></td><td>String to write to
</td></tr>
979 <tr><td><tt>outlen
</tt></td><td>Size of output string
</td></tr>
980 <tr><td><tt>in
</tt></td><td>String to read from
</td></tr>
981 </tbody></table></div>
983 <p>Decoded string
</p>
985 <h3 class='title'
><a name='httpDelete'
>httpDelete()
</a></h3>
987 <p>Send a DELETE request to the server.
</p>
992 <a href='#http_t'
>http_t
</a> * http,
996 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
997 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
999 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1000 <tr><td><tt>uri
</tt></td><td>URI to delete
</td></tr>
1001 </tbody></table></div>
1003 <p>Status of call (
0 = success)
</p>
1005 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='httpEncode64'
>httpEncode64()
</a></h3>
1006 <h4>Description
</h4>
1007 <p>Base64-encode a string.
1009 This function is deprecated. Use the httpEncode64_2() function instead
1010 which provides buffer length arguments.
1021 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1022 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1024 <tr><td><tt>out
</tt></td><td>String to write to
</td></tr>
1025 <tr><td><tt>in
</tt></td><td>String to read from
</td></tr>
1026 </tbody></table></div>
1028 <p>Encoded string
</p>
1030 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='httpEncode64_2'
>httpEncode64_2()
</a></h3>
1031 <h4>Description
</h4>
1032 <p>Base64-encode a string.
1045 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1046 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1048 <tr><td><tt>out
</tt></td><td>String to write to
</td></tr>
1049 <tr><td><tt>outlen
</tt></td><td>Size of output string
</td></tr>
1050 <tr><td><tt>in
</tt></td><td>String to read from
</td></tr>
1051 <tr><td><tt>inlen
</tt></td><td>Size of input string
</td></tr>
1052 </tbody></table></div>
1054 <p>Encoded string
</p>
1056 <h3 class='title'
><a name='httpEncryption'
>httpEncryption()
</a></h3>
1057 <h4>Description
</h4>
1058 <p>Set the required encryption on the link.
</p>
1063 <a href='#http_t'
>http_t
</a> * http,
1064 <a href='#http_encryption_t'
>http_encryption_t
</a> e);
1067 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1068 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1070 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1071 <tr><td><tt>e
</tt></td><td>New encryption preference
</td></tr>
1072 </tbody></table></div>
1074 <p>-
1 on error,
0 on success
</p>
1076 <h3 class='title'
><a name='httpError'
>httpError()
</a></h3>
1077 <h4>Description
</h4>
1078 <p>Get the last error on a connection.
</p>
1083 <a href='#http_t'
>http_t
</a> * http);
1086 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1087 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1089 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1090 </tbody></table></div>
1092 <p>Error code (errno) value
</p>
1094 <h3 class='title'
><a name='httpFlush'
>httpFlush()
</a></h3>
1095 <h4>Description
</h4>
1096 <p>Flush data from a HTTP connection.
</p>
1101 <a href='#http_t'
>http_t
</a> * http);
1104 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1105 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1107 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1108 </tbody></table></div>
1112 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpFlushWrite'
>httpFlushWrite()
</a></h3>
1113 <h4>Description
</h4>
1114 <p>Flush data in write buffer.
1121 <a href='#http_t'
>http_t
</a> * http);
1124 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1125 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1127 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1128 </tbody></table></div>
1130 <p>Bytes written or -
1 on error
</p>
1132 <h3 class='title'
><a name='httpGet'
>httpGet()
</a></h3>
1133 <h4>Description
</h4>
1134 <p>Send a GET request to the server.
</p>
1139 <a href='#http_t'
>http_t
</a> * http,
1143 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1144 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1146 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1147 <tr><td><tt>uri
</tt></td><td>URI to get
</td></tr>
1148 </tbody></table></div>
1150 <p>Status of call (
0 = success)
</p>
1152 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpGetBlocking'
>httpGetBlocking()
</a></h3>
1153 <h4>Description
</h4>
1154 <p>Get the blocking/non-block state of a connection.
1161 <a href='#http_t'
>http_t
</a> * http);
1164 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1165 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1167 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1168 </tbody></table></div>
1170 <p>1 if blocking,
0 if non-blocking
</p>
1172 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='httpGetCookie'
>httpGetCookie()
</a></h3>
1173 <h4>Description
</h4>
1174 <p>Get any cookie data from the response.
1181 <a href='#http_t'
>http_t
</a> * http);
1184 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1185 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1187 <tr><td><tt>http
</tt></td><td>HTTP connecion
</td></tr>
1188 </tbody></table></div>
1190 <p>Cookie data or NULL
</p>
1192 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='httpGetDateString'
>httpGetDateString()
</a></h3>
1193 <h4>Description
</h4>
1194 <p>Get a formatted date/time string from a time value.
1204 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1205 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1207 <tr><td><tt>t
</tt></td><td>UNIX time
</td></tr>
1208 </tbody></table></div>
1210 <p>Date/time string
</p>
1212 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpGetDateString2'
>httpGetDateString2()
</a></h3>
1213 <h4>Description
</h4>
1214 <p>Get a formatted date/time string from a time value.
1226 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1227 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1229 <tr><td><tt>t
</tt></td><td>UNIX time
</td></tr>
1230 <tr><td><tt>s
</tt></td><td>String buffer
</td></tr>
1231 <tr><td><tt>slen
</tt></td><td>Size of string buffer
</td></tr>
1232 </tbody></table></div>
1234 <p>Date/time string
</p>
1236 <h3 class='title'
><a name='httpGetDateTime'
>httpGetDateTime()
</a></h3>
1237 <h4>Description
</h4>
1238 <p>Get a time value from a formatted date/time string.
</p>
1246 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1247 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1249 <tr><td><tt>s
</tt></td><td>Date/time string
</td></tr>
1250 </tbody></table></div>
1254 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpGetFd'
>httpGetFd()
</a></h3>
1255 <h4>Description
</h4>
1256 <p>Get the file descriptor associated with a connection.
1263 <a href='#http_t'
>http_t
</a> * http);
1266 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1267 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1269 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1270 </tbody></table></div>
1272 <p>File descriptor or -
1 if none
</p>
1274 <h3 class='title'
><a name='httpGetField'
>httpGetField()
</a></h3>
1275 <h4>Description
</h4>
1276 <p>Get a field value from a request/response.
</p>
1281 <a href='#http_t'
>http_t
</a> * http,
1282 http_field_t field);
1285 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1286 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1288 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1289 <tr><td><tt>field
</tt></td><td>Field to get
</td></tr>
1290 </tbody></table></div>
1294 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='httpGetHostByName'
>httpGetHostByName()
</a></h3>
1295 <h4>Description
</h4>
1296 <p>Lookup a hostname or IPv4 address, and return
1297 address records for the specified name.
1307 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1308 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1310 <tr><td><tt>name
</tt></td><td>Hostname or IP address
</td></tr>
1311 </tbody></table></div>
1315 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpGetHostname'
>httpGetHostname()
</a></h3>
1316 <h4>Description
</h4>
1317 <p>Get the FQDN for the connection or local system.
1319 When
"http
" points to a connected socket, return the hostname or
1320 address that was used in the call to httpConnect() or httpConnectEncrypt().
1321 Otherwise, return the FQDN for the local system using both gethostname()
1322 and gethostbyname() to get the local hostname with domain.
1329 <a href='#http_t'
>http_t
</a> * http,
1334 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1335 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1337 <tr><td><tt>http
</tt></td><td>HTTP connection or NULL
</td></tr>
1338 <tr><td><tt>s
</tt></td><td>String buffer for name
</td></tr>
1339 <tr><td><tt>slen
</tt></td><td>Size of buffer
</td></tr>
1340 </tbody></table></div>
1342 <p>FQDN for connection or system
</p>
1344 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='httpGetLength'
>httpGetLength()
</a></h3>
1345 <h4>Description
</h4>
1346 <p>Get the amount of data remaining from the
1347 content-length or transfer-encoding fields.
1349 This function is deprecated and will not return lengths larger than
1350 2^
31 -
1; use httpGetLength2() instead.
1357 <a href='#http_t'
>http_t
</a> * http);
1360 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1361 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1363 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1364 </tbody></table></div>
1366 <p>Content length
</p>
1368 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpGetLength2'
>httpGetLength2()
</a></h3>
1369 <h4>Description
</h4>
1370 <p>Get the amount of data remaining from the
1371 content-length or transfer-encoding fields.
1373 This function returns the complete content length, even for
1374 content larger than
2^
31 -
1.
1381 <a href='#http_t'
>http_t
</a> * http);
1384 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1385 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1387 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1388 </tbody></table></div>
1390 <p>Content length
</p>
1392 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpGetStatus'
>httpGetStatus()
</a></h3>
1393 <h4>Description
</h4>
1394 <p>Get the status of the last HTTP request.
1401 <a href='#http_t'
>http_t
</a> * http);
1404 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1405 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1407 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1408 </tbody></table></div>
1412 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='httpGetSubField'
>httpGetSubField()
</a></h3>
1413 <h4>Description
</h4>
1414 <p>Get a sub-field value.
1421 <a href='#http_t'
>http_t
</a> * http,
1427 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1428 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1430 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1431 <tr><td><tt>field
</tt></td><td>Field index
</td></tr>
1432 <tr><td><tt>name
</tt></td><td>Name of sub-field
</td></tr>
1433 <tr><td><tt>value
</tt></td><td>Value string
</td></tr>
1434 </tbody></table></div>
1436 <p>Value or NULL
</p>
1438 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpGetSubField2'
>httpGetSubField2()
</a></h3>
1439 <h4>Description
</h4>
1440 <p>Get a sub-field value.
1447 <a href='#http_t'
>http_t
</a> * http,
1454 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1455 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1457 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1458 <tr><td><tt>field
</tt></td><td>Field index
</td></tr>
1459 <tr><td><tt>name
</tt></td><td>Name of sub-field
</td></tr>
1460 <tr><td><tt>value
</tt></td><td>Value string
</td></tr>
1461 <tr><td><tt>valuelen
</tt></td><td>Size of value buffer
</td></tr>
1462 </tbody></table></div>
1464 <p>Value or NULL
</p>
1466 <h3 class='title'
><a name='httpGets'
>httpGets()
</a></h3>
1467 <h4>Description
</h4>
1468 <p>Get a line of text from a HTTP connection.
</p>
1475 <a href='#http_t'
>http_t
</a> * http);
1478 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1479 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1481 <tr><td><tt>line
</tt></td><td>Line to read into
</td></tr>
1482 <tr><td><tt>length
</tt></td><td>Max length of buffer
</td></tr>
1483 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1484 </tbody></table></div>
1488 <h3 class='title'
><a name='httpHead'
>httpHead()
</a></h3>
1489 <h4>Description
</h4>
1490 <p>Send a HEAD request to the server.
</p>
1495 <a href='#http_t'
>http_t
</a> * http,
1499 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1500 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1502 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1503 <tr><td><tt>uri
</tt></td><td>URI for head
</td></tr>
1504 </tbody></table></div>
1506 <p>Status of call (
0 = success)
</p>
1508 <h3 class='title'
><a name='httpInitialize'
>httpInitialize()
</a></h3>
1509 <h4>Description
</h4>
1510 <p>Initialize the HTTP interface library and set the
1511 default HTTP proxy (if any).
</p>
1515 httpInitialize(void);
1522 <h3 class='title'
><a name='httpMD5'
>httpMD5()
</a></h3>
1523 <h4>Description
</h4>
1524 <p>Compute the MD5 sum of the username:group:password.
</p>
1529 const char * username,
1531 const char * passwd,
1535 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1536 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1538 <tr><td><tt>username
</tt></td><td>User name
</td></tr>
1539 <tr><td><tt>realm
</tt></td><td>Realm name
</td></tr>
1540 <tr><td><tt>passwd
</tt></td><td>Password string
</td></tr>
1541 <tr><td><tt>md5[
33]
</tt></td><td>MD5 string
</td></tr>
1542 </tbody></table></div>
1546 <h3 class='title'
><a name='httpMD5Final'
>httpMD5Final()
</a></h3>
1547 <h4>Description
</h4>
1548 <p>Combine the MD5 sum of the username, group, and password
1549 with the server-supplied nonce value, method, and
1556 const char * method,
1557 const char * resource,
1561 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1562 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1564 <tr><td><tt>nonce
</tt></td><td>Server nonce value
</td></tr>
1565 <tr><td><tt>method
</tt></td><td>METHOD (GET, POST, etc.)
</td></tr>
1566 <tr><td><tt>resource
</tt></td><td>Resource path
</td></tr>
1567 <tr><td><tt>md5[
33]
</tt></td><td>MD5 sum
</td></tr>
1568 </tbody></table></div>
1572 <h3 class='title'
><a name='httpMD5String'
>httpMD5String()
</a></h3>
1573 <h4>Description
</h4>
1574 <p>Convert an MD5 sum to a character string.
</p>
1579 const unsigned char * sum,
1583 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1584 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1586 <tr><td><tt>sum
</tt></td><td>MD5 sum data
</td></tr>
1587 <tr><td><tt>md5[
33]
</tt></td><td>MD5 sum in hex
</td></tr>
1588 </tbody></table></div>
1590 <p>MD5 sum in hex
</p>
1592 <h3 class='title'
><a name='httpOptions'
>httpOptions()
</a></h3>
1593 <h4>Description
</h4>
1594 <p>Send an OPTIONS request to the server.
</p>
1599 <a href='#http_t'
>http_t
</a> * http,
1603 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1604 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1606 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1607 <tr><td><tt>uri
</tt></td><td>URI for options
</td></tr>
1608 </tbody></table></div>
1610 <p>Status of call (
0 = success)
</p>
1612 <h3 class='title'
><a name='httpPost'
>httpPost()
</a></h3>
1613 <h4>Description
</h4>
1614 <p>Send a POST request to the server.
</p>
1619 <a href='#http_t'
>http_t
</a> * http,
1623 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1624 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1626 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1627 <tr><td><tt>uri
</tt></td><td>URI for post
</td></tr>
1628 </tbody></table></div>
1630 <p>Status of call (
0 = success)
</p>
1632 <h3 class='title'
><a name='httpPut'
>httpPut()
</a></h3>
1633 <h4>Description
</h4>
1634 <p>Send a PUT request to the server.
</p>
1639 <a href='#http_t'
>http_t
</a> * http,
1643 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1644 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1646 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1647 <tr><td><tt>uri
</tt></td><td>URI to put
</td></tr>
1648 </tbody></table></div>
1650 <p>Status of call (
0 = success)
</p>
1652 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='httpRead'
>httpRead()
</a></h3>
1653 <h4>Description
</h4>
1654 <p>Read data from a HTTP connection.
1656 This function is deprecated. Use the httpRead2() function which can
1657 read more than
2GB of data.
1664 <a href='#http_t'
>http_t
</a> * http,
1669 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1670 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1672 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1673 <tr><td><tt>buffer
</tt></td><td>Buffer for data
</td></tr>
1674 <tr><td><tt>length
</tt></td><td>Maximum number of bytes
</td></tr>
1675 </tbody></table></div>
1677 <p>Number of bytes read
</p>
1679 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpRead2'
>httpRead2()
</a></h3>
1680 <h4>Description
</h4>
1681 <p>Read data from a HTTP connection.
1688 <a href='#http_t'
>http_t
</a> * http,
1693 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1694 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1696 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1697 <tr><td><tt>buffer
</tt></td><td>Buffer for data
</td></tr>
1698 <tr><td><tt>length
</tt></td><td>Maximum number of bytes
</td></tr>
1699 </tbody></table></div>
1701 <p>Number of bytes read
</p>
1703 <h3 class='title'
><a name='httpReconnect'
>httpReconnect()
</a></h3>
1704 <h4>Description
</h4>
1705 <p>Reconnect to a HTTP server.
</p>
1710 <a href='#http_t'
>http_t
</a> * http);
1713 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1714 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1716 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1717 </tbody></table></div>
1719 <p>0 on success, non-zero on failure
</p>
1721 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='httpSeparate'
>httpSeparate()
</a></h3>
1722 <h4>Description
</h4>
1723 <p>Separate a Universal Resource Identifier into its
1726 This function is deprecated; use the httpSeparateURI() function instead.
1741 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1742 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1744 <tr><td><tt>uri
</tt></td><td>Universal Resource Identifier
</td></tr>
1745 <tr><td><tt>scheme
</tt></td><td>Scheme [
32] (http, https, etc.)
</td></tr>
1746 <tr><td><tt>username
</tt></td><td>Username [
1024]
</td></tr>
1747 <tr><td><tt>host
</tt></td><td>Hostname [
1024]
</td></tr>
1748 <tr><td><tt>port
</tt></td><td>Port number to use
</td></tr>
1749 <tr><td><tt>resource
</tt></td><td>Resource/filename [
1024]
</td></tr>
1750 </tbody></table></div>
1754 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='httpSeparate2'
>httpSeparate2()
</a></h3>
1755 <h4>Description
</h4>
1756 <p>Separate a Universal Resource Identifier into its
1759 This function is deprecated; use the httpSeparateURI() function instead.
1779 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1780 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1782 <tr><td><tt>uri
</tt></td><td>Universal Resource Identifier
</td></tr>
1783 <tr><td><tt>scheme
</tt></td><td>Scheme (http, https, etc.)
</td></tr>
1784 <tr><td><tt>schemelen
</tt></td><td>Size of scheme buffer
</td></tr>
1785 <tr><td><tt>username
</tt></td><td>Username
</td></tr>
1786 <tr><td><tt>usernamelen
</tt></td><td>Size of username buffer
</td></tr>
1787 <tr><td><tt>host
</tt></td><td>Hostname
</td></tr>
1788 <tr><td><tt>hostlen
</tt></td><td>Size of hostname buffer
</td></tr>
1789 <tr><td><tt>port
</tt></td><td>Port number to use
</td></tr>
1790 <tr><td><tt>resource
</tt></td><td>Resource/filename
</td></tr>
1791 <tr><td><tt>resourcelen
</tt></td><td>Size of resource buffer
</td></tr>
1792 </tbody></table></div>
1796 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpSeparateURI'
>httpSeparateURI()
</a></h3>
1797 <h4>Description
</h4>
1798 <p>Separate a Universal Resource Identifier into its
1806 http_uri_coding_t decoding,
1819 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1820 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1822 <tr><td><tt>decoding
</tt></td><td>Decoding flags
</td></tr>
1823 <tr><td><tt>uri
</tt></td><td>Universal Resource Identifier
</td></tr>
1824 <tr><td><tt>scheme
</tt></td><td>Scheme (http, https, etc.)
</td></tr>
1825 <tr><td><tt>schemelen
</tt></td><td>Size of scheme buffer
</td></tr>
1826 <tr><td><tt>username
</tt></td><td>Username
</td></tr>
1827 <tr><td><tt>usernamelen
</tt></td><td>Size of username buffer
</td></tr>
1828 <tr><td><tt>host
</tt></td><td>Hostname
</td></tr>
1829 <tr><td><tt>hostlen
</tt></td><td>Size of hostname buffer
</td></tr>
1830 <tr><td><tt>port
</tt></td><td>Port number to use
</td></tr>
1831 <tr><td><tt>resource
</tt></td><td>Resource/filename
</td></tr>
1832 <tr><td><tt>resourcelen
</tt></td><td>Size of resource buffer
</td></tr>
1833 </tbody></table></div>
1835 <p>Result of separation
</p>
1837 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='httpSetCookie'
>httpSetCookie()
</a></h3>
1838 <h4>Description
</h4>
1839 <p>Set the cookie value(s)...
1846 <a href='#http_t'
>http_t
</a> * http,
1847 const char * cookie);
1850 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1851 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1853 <tr><td><tt>http
</tt></td><td>Connection
</td></tr>
1854 <tr><td><tt>cookie
</tt></td><td>Cookie string
</td></tr>
1855 </tbody></table></div>
1859 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpSetExpect'
>httpSetExpect()
</a></h3>
1860 <h4>Description
</h4>
1861 <p>Set the Expect: header in a request.
1863 Currently only HTTP_CONTINUE is supported for the
"expect
" argument.
1870 <a href='#http_t'
>http_t
</a> * http,
1871 http_status_t expect);
1874 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1875 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1877 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1878 <tr><td><tt>expect
</tt></td><td>HTTP status to expect (HTTP_CONTINUE)
</td></tr>
1879 </tbody></table></div>
1883 <h3 class='title'
><a name='httpSetField'
>httpSetField()
</a></h3>
1884 <h4>Description
</h4>
1885 <p>Set the value of an HTTP header.
</p>
1890 <a href='#http_t'
>http_t
</a> * http,
1892 const char * value);
1895 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1896 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1898 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1899 <tr><td><tt>field
</tt></td><td>Field index
</td></tr>
1900 <tr><td><tt>value
</tt></td><td>Value
</td></tr>
1901 </tbody></table></div>
1905 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpSetLength'
>httpSetLength()
</a></h3>
1906 <h4>Description
</h4>
1907 <p>Set the content-length and content-encoding.
1914 <a href='#http_t'
>http_t
</a> * http,
1918 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1919 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1921 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1922 <tr><td><tt>length
</tt></td><td>Length (
0 for chunked)
</td></tr>
1923 </tbody></table></div>
1927 <h3 class='title'
><a name='httpStatus'
>httpStatus()
</a></h3>
1928 <h4>Description
</h4>
1929 <p>Return a short string describing a HTTP status code.
</p>
1934 http_status_t status);
1937 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1938 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1940 <tr><td><tt>status
</tt></td><td>HTTP status code
</td></tr>
1941 </tbody></table></div>
1943 <p>String or NULL
</p>
1945 <h3 class='title'
><a name='httpTrace'
>httpTrace()
</a></h3>
1946 <h4>Description
</h4>
1947 <p>Send an TRACE request to the server.
</p>
1952 <a href='#http_t'
>http_t
</a> * http,
1956 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1957 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1959 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1960 <tr><td><tt>uri
</tt></td><td>URI for trace
</td></tr>
1961 </tbody></table></div>
1963 <p>Status of call (
0 = success)
</p>
1965 <h3 class='title'
><a name='httpUpdate'
>httpUpdate()
</a></h3>
1966 <h4>Description
</h4>
1967 <p>Update the current HTTP state for incoming data.
</p>
1972 <a href='#http_t'
>http_t
</a> * http);
1975 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1976 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1978 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1979 </tbody></table></div>
1983 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='httpWait'
>httpWait()
</a></h3>
1984 <h4>Description
</h4>
1985 <p>Wait for data available on a connection.
1992 <a href='#http_t'
>http_t
</a> * http,
1996 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1997 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1999 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
2000 <tr><td><tt>msec
</tt></td><td>Milliseconds to wait
</td></tr>
2001 </tbody></table></div>
2003 <p>1 if data is available,
0 otherwise
</p>
2005 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='httpWrite'
>httpWrite()
</a></h3>
2006 <h4>Description
</h4>
2007 <p>Write data to a HTTP connection.
2009 This function is deprecated. Use the httpWrite2() function which can
2010 write more than
2GB of data.
2017 <a href='#http_t'
>http_t
</a> * http,
2018 const char * buffer,
2022 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2023 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2025 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
2026 <tr><td><tt>buffer
</tt></td><td>Buffer for data
</td></tr>
2027 <tr><td><tt>length
</tt></td><td>Number of bytes to write
</td></tr>
2028 </tbody></table></div>
2030 <p>Number of bytes written
</p>
2032 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='httpWrite2'
>httpWrite2()
</a></h3>
2033 <h4>Description
</h4>
2034 <p>Write data to a HTTP connection.
2041 <a href='#http_t'
>http_t
</a> * http,
2042 const char * buffer,
2046 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2047 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2049 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
2050 <tr><td><tt>buffer
</tt></td><td>Buffer for data
</td></tr>
2051 <tr><td><tt>length
</tt></td><td>Number of bytes to write
</td></tr>
2052 </tbody></table></div>
2054 <p>Number of bytes written
</p>
2056 <h3 class='title'
><a name='ippAddBoolean'
>ippAddBoolean()
</a></h3>
2057 <h4>Description
</h4>
2058 <p>Add a boolean attribute to an IPP message.
</p>
2061 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2063 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2069 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2070 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2072 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2073 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2074 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2075 <tr><td><tt>value
</tt></td><td>Value of attribute
</td></tr>
2076 </tbody></table></div>
2078 <p>New attribute
</p>
2080 <h3 class='title'
><a name='ippAddBooleans'
>ippAddBooleans()
</a></h3>
2081 <h4>Description
</h4>
2082 <p>Add an array of boolean values.
</p>
2085 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2087 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2091 const char * values);
2094 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2095 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2097 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2098 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2099 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2100 <tr><td><tt>num_values
</tt></td><td>Number of values
</td></tr>
2101 <tr><td><tt>values
</tt></td><td>Values
</td></tr>
2102 </tbody></table></div>
2104 <p>New attribute
</p>
2106 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ippAddCollection'
>ippAddCollection()
</a></h3>
2107 <h4>Description
</h4>
2108 <p>Add a collection value.
2113 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2115 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2118 <a href='#ipp_t'
>ipp_t
</a> * value);
2121 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2122 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2124 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2125 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2126 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2127 <tr><td><tt>value
</tt></td><td>Value
</td></tr>
2128 </tbody></table></div>
2130 <p>New attribute
</p>
2132 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ippAddCollections'
>ippAddCollections()
</a></h3>
2133 <h4>Description
</h4>
2134 <p>Add an array of collection values.
2139 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2141 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2145 const
<a href='#ipp_t'
>ipp_t
</a> ** values);
2148 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2149 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2151 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2152 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2153 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2154 <tr><td><tt>num_values
</tt></td><td>Number of values
</td></tr>
2155 <tr><td><tt>values
</tt></td><td>Values
</td></tr>
2156 </tbody></table></div>
2158 <p>New attribute
</p>
2160 <h3 class='title'
><a name='ippAddDate'
>ippAddDate()
</a></h3>
2161 <h4>Description
</h4>
2162 <p>Add a date attribute to an IPP message.
</p>
2165 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2167 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2170 const
<a href='#ipp_uchar_t'
>ipp_uchar_t
</a> * value);
2173 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2174 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2176 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2177 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2178 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2179 <tr><td><tt>value
</tt></td><td>Value
</td></tr>
2180 </tbody></table></div>
2182 <p>New attribute
</p>
2184 <h3 class='title'
><a name='ippAddInteger'
>ippAddInteger()
</a></h3>
2185 <h4>Description
</h4>
2186 <p>Add a integer attribute to an IPP message.
</p>
2189 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2191 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2198 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2199 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2201 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2202 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2203 <tr><td><tt>type
</tt></td><td>Type of attribute
</td></tr>
2204 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2205 <tr><td><tt>value
</tt></td><td>Value of attribute
</td></tr>
2206 </tbody></table></div>
2208 <p>New attribute
</p>
2210 <h3 class='title'
><a name='ippAddIntegers'
>ippAddIntegers()
</a></h3>
2211 <h4>Description
</h4>
2212 <p>Add an array of integer values.
</p>
2215 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2217 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2222 const int * values);
2225 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2226 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2228 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2229 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2230 <tr><td><tt>type
</tt></td><td>Type of attribute
</td></tr>
2231 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2232 <tr><td><tt>num_values
</tt></td><td>Number of values
</td></tr>
2233 <tr><td><tt>values
</tt></td><td>Values
</td></tr>
2234 </tbody></table></div>
2236 <p>New attribute
</p>
2238 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ippAddOctetString'
>ippAddOctetString()
</a></h3>
2239 <h4>Description
</h4>
2240 <p>Add an octetString value to an IPP message.
2245 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2247 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2254 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2255 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2257 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2258 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2259 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2260 <tr><td><tt>data
</tt></td><td>octetString data
</td></tr>
2261 <tr><td><tt>datalen
</tt></td><td>Length of data in bytes
</td></tr>
2262 </tbody></table></div>
2264 <p>New attribute
</p>
2266 <h3 class='title'
><a name='ippAddRange'
>ippAddRange()
</a></h3>
2267 <h4>Description
</h4>
2268 <p>Add a range of values to an IPP message.
</p>
2271 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2273 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2280 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2281 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2283 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2284 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2285 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2286 <tr><td><tt>lower
</tt></td><td>Lower value
</td></tr>
2287 <tr><td><tt>upper
</tt></td><td>Upper value
</td></tr>
2288 </tbody></table></div>
2290 <p>New attribute
</p>
2292 <h3 class='title'
><a name='ippAddRanges'
>ippAddRanges()
</a></h3>
2293 <h4>Description
</h4>
2294 <p>Add ranges of values to an IPP message.
</p>
2297 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2299 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2307 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2308 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2310 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2311 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2312 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2313 <tr><td><tt>num_values
</tt></td><td>Number of values
</td></tr>
2314 <tr><td><tt>lower
</tt></td><td>Lower values
</td></tr>
2315 <tr><td><tt>upper
</tt></td><td>Upper values
</td></tr>
2316 </tbody></table></div>
2318 <p>New attribute
</p>
2320 <h3 class='title'
><a name='ippAddResolution'
>ippAddResolution()
</a></h3>
2321 <h4>Description
</h4>
2322 <p>Add a resolution value to an IPP message.
</p>
2325 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2327 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2335 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2336 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2338 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2339 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2340 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2341 <tr><td><tt>units
</tt></td><td>Units for resolution
</td></tr>
2342 <tr><td><tt>xres
</tt></td><td>X resolution
</td></tr>
2343 <tr><td><tt>yres
</tt></td><td>Y resolution
</td></tr>
2344 </tbody></table></div>
2346 <p>New attribute
</p>
2348 <h3 class='title'
><a name='ippAddResolutions'
>ippAddResolutions()
</a></h3>
2349 <h4>Description
</h4>
2350 <p>Add resolution values to an IPP message.
</p>
2353 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2355 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2364 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2365 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2367 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2368 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2369 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2370 <tr><td><tt>num_values
</tt></td><td>Number of values
</td></tr>
2371 <tr><td><tt>units
</tt></td><td>Units for resolution
</td></tr>
2372 <tr><td><tt>xres
</tt></td><td>X resolutions
</td></tr>
2373 <tr><td><tt>yres
</tt></td><td>Y resolutions
</td></tr>
2374 </tbody></table></div>
2376 <p>New attribute
</p>
2378 <h3 class='title'
><a name='ippAddSeparator'
>ippAddSeparator()
</a></h3>
2379 <h4>Description
</h4>
2380 <p>Add a group separator to an IPP message.
</p>
2383 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2385 <a href='#ipp_t'
>ipp_t
</a> * ipp);
2388 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2389 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2391 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2392 </tbody></table></div>
2394 <p>New attribute
</p>
2396 <h3 class='title'
><a name='ippAddString'
>ippAddString()
</a></h3>
2397 <h4>Description
</h4>
2398 <p>Add a language-encoded string to an IPP message.
</p>
2401 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2403 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2407 const char * charset,
2408 const char * value);
2411 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2412 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2414 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2415 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2416 <tr><td><tt>type
</tt></td><td>Type of attribute
</td></tr>
2417 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2418 <tr><td><tt>charset
</tt></td><td>Character set
</td></tr>
2419 <tr><td><tt>value
</tt></td><td>Value
</td></tr>
2420 </tbody></table></div>
2422 <p>New attribute
</p>
2424 <h3 class='title'
><a name='ippAddStrings'
>ippAddStrings()
</a></h3>
2425 <h4>Description
</h4>
2426 <p>Add language-encoded strings to an IPP message.
</p>
2429 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2431 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2436 const char * charset,
2437 const char *const * values);
2440 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2441 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2443 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2444 <tr><td><tt>group
</tt></td><td>IPP group
</td></tr>
2445 <tr><td><tt>type
</tt></td><td>Type of attribute
</td></tr>
2446 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2447 <tr><td><tt>num_values
</tt></td><td>Number of values
</td></tr>
2448 <tr><td><tt>charset
</tt></td><td>Character set
</td></tr>
2449 <tr><td><tt>values
</tt></td><td>Values
</td></tr>
2450 </tbody></table></div>
2452 <p>New attribute
</p>
2454 <h3 class='title'
><a name='ippDateToTime'
>ippDateToTime()
</a></h3>
2455 <h4>Description
</h4>
2456 <p>Convert from RFC
1903 Date/Time format to UNIX time
2462 const
<a href='#ipp_uchar_t'
>ipp_uchar_t
</a> * date);
2465 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2466 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2468 <tr><td><tt>date
</tt></td><td>RFC
1903 date info
</td></tr>
2469 </tbody></table></div>
2471 <p>UNIX time value
</p>
2473 <h3 class='title'
><a name='ippDelete'
>ippDelete()
</a></h3>
2474 <h4>Description
</h4>
2475 <p>Delete an IPP message.
</p>
2480 <a href='#ipp_t'
>ipp_t
</a> * ipp);
2483 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2484 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2486 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2487 </tbody></table></div>
2491 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ippDeleteAttribute'
>ippDeleteAttribute()
</a></h3>
2492 <h4>Description
</h4>
2493 <p>Delete a single attribute in an IPP message.
2500 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2501 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> * attr);
2504 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2505 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2507 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2508 <tr><td><tt>attr
</tt></td><td>Attribute to delete
</td></tr>
2509 </tbody></table></div>
2513 <h3 class='title'
><a name='ippErrorString'
>ippErrorString()
</a></h3>
2514 <h4>Description
</h4>
2515 <p>Return a name for the given status code.
</p>
2520 ipp_status_t error);
2523 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2524 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2526 <tr><td><tt>error
</tt></td><td>Error status
</td></tr>
2527 </tbody></table></div>
2531 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ippErrorValue'
>ippErrorValue()
</a></h3>
2532 <h4>Description
</h4>
2533 <p>Return a status code for the given name.
2543 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2544 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2546 <tr><td><tt>name
</tt></td><td>Name
</td></tr>
2547 </tbody></table></div>
2549 <p>IPP status code
</p>
2551 <h3 class='title'
><a name='ippFindAttribute'
>ippFindAttribute()
</a></h3>
2552 <h4>Description
</h4>
2553 <p>Find a named attribute in a request...
</p>
2556 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2558 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2563 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2564 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2566 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2567 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2568 <tr><td><tt>type
</tt></td><td>Type of attribute
</td></tr>
2569 </tbody></table></div>
2571 <p>Matching attribute
</p>
2573 <h3 class='title'
><a name='ippFindNextAttribute'
>ippFindNextAttribute()
</a></h3>
2574 <h4>Description
</h4>
2575 <p>Find the next named attribute in a request...
</p>
2578 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> *
2579 ippFindNextAttribute(
2580 <a href='#ipp_t'
>ipp_t
</a> * ipp,
2585 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2586 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2588 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2589 <tr><td><tt>name
</tt></td><td>Name of attribute
</td></tr>
2590 <tr><td><tt>type
</tt></td><td>Type of attribute
</td></tr>
2591 </tbody></table></div>
2593 <p>Matching attribute
</p>
2595 <h3 class='title'
><a name='ippLength'
>ippLength()
</a></h3>
2596 <h4>Description
</h4>
2597 <p>Compute the length of an IPP message.
</p>
2602 <a href='#ipp_t'
>ipp_t
</a> * ipp);
2605 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2606 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2608 <tr><td><tt>ipp
</tt></td><td>IPP message
</td></tr>
2609 </tbody></table></div>
2611 <p>Size of IPP message
</p>
2613 <h3 class='title'
><a name='ippNew'
>ippNew()
</a></h3>
2614 <h4>Description
</h4>
2615 <p>Allocate a new IPP message.
</p>
2618 <a href='#ipp_t'
>ipp_t
</a> *
2624 <p>New IPP message
</p>
2626 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ippNewRequest'
>ippNewRequest()
</a></h3>
2627 <h4>Description
</h4>
2628 <p>Allocate a new IPP request message.
2630 The new request message is initialized with the attributes-charset and
2631 attributes-natural-language attributes added. The
2632 attributes-natural-language value is derived from the current locale.
2637 <a href='#ipp_t'
>ipp_t
</a> *
2642 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2643 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2645 <tr><td><tt>op
</tt></td><td>Operation code
</td></tr>
2646 </tbody></table></div>
2648 <p>IPP request message
</p>
2650 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ippOpString'
>ippOpString()
</a></h3>
2651 <h4>Description
</h4>
2652 <p>Return a name for the given operation id.
2662 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2663 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2665 <tr><td><tt>op
</tt></td><td>Operation ID
</td></tr>
2666 </tbody></table></div>
2670 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ippOpValue'
>ippOpValue()
</a></h3>
2671 <h4>Description
</h4>
2672 <p>Return an operation id for the given name.
2682 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2683 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2685 <tr><td><tt>name
</tt></td><td>Textual name
</td></tr>
2686 </tbody></table></div>
2690 <h3 class='title'
><a name='ippPort'
>ippPort()
</a></h3>
2691 <h4>Description
</h4>
2692 <p>Return the default IPP port number.
</p>
2703 <h3 class='title'
><a name='ippRead'
>ippRead()
</a></h3>
2704 <h4>Description
</h4>
2705 <p>Read data for an IPP message from a HTTP connection.
</p>
2710 <a href='#http_t'
>http_t
</a> * http,
2711 <a href='#ipp_t'
>ipp_t
</a> * ipp);
2714 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2715 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2717 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
2718 <tr><td><tt>ipp
</tt></td><td>IPP data
</td></tr>
2719 </tbody></table></div>
2721 <p>Current state
</p>
2723 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ippReadFile'
>ippReadFile()
</a></h3>
2724 <h4>Description
</h4>
2725 <p>Read data for an IPP message from a file.
2733 <a href='#ipp_t'
>ipp_t
</a> * ipp);
2736 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2737 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2739 <tr><td><tt>fd
</tt></td><td>HTTP data
</td></tr>
2740 <tr><td><tt>ipp
</tt></td><td>IPP data
</td></tr>
2741 </tbody></table></div>
2743 <p>Current state
</p>
2745 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ippReadIO'
>ippReadIO()
</a></h3>
2746 <h4>Description
</h4>
2747 <p>Read data for an IPP message.
2755 <a href='#ipp_iocb_t'
>ipp_iocb_t
</a> cb,
2757 <a href='#ipp_t'
>ipp_t
</a> * parent,
2758 <a href='#ipp_t'
>ipp_t
</a> * ipp);
2761 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2762 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2764 <tr><td><tt>src
</tt></td><td>Data source
</td></tr>
2765 <tr><td><tt>cb
</tt></td><td>Read callback function
</td></tr>
2766 <tr><td><tt>blocking
</tt></td><td>Use blocking IO?
</td></tr>
2767 <tr><td><tt>parent
</tt></td><td>Parent request, if any
</td></tr>
2768 <tr><td><tt>ipp
</tt></td><td>IPP data
</td></tr>
2769 </tbody></table></div>
2771 <p>Current state
</p>
2773 <h3 class='title'
><a name='ippSetPort'
>ippSetPort()
</a></h3>
2774 <h4>Description
</h4>
2775 <p>Set the default port number.
</p>
2783 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2784 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2786 <tr><td><tt>p
</tt></td><td>Port number to use
</td></tr>
2787 </tbody></table></div>
2791 <h3 class='title'
><a name='ippTimeToDate'
>ippTimeToDate()
</a></h3>
2792 <h4>Description
</h4>
2793 <p>Convert from UNIX time to RFC
1903 format.
</p>
2796 const
<a href='#ipp_uchar_t'
>ipp_uchar_t
</a> *
2801 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2802 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2804 <tr><td><tt>t
</tt></td><td>UNIX time value
</td></tr>
2805 </tbody></table></div>
2807 <p>RFC-
1903 date/time data
</p>
2809 <h3 class='title'
><a name='ippWrite'
>ippWrite()
</a></h3>
2810 <h4>Description
</h4>
2811 <p>Write data for an IPP message to a HTTP connection.
</p>
2816 <a href='#http_t'
>http_t
</a> * http,
2817 <a href='#ipp_t'
>ipp_t
</a> * ipp);
2820 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2821 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2823 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
2824 <tr><td><tt>ipp
</tt></td><td>IPP data
</td></tr>
2825 </tbody></table></div>
2827 <p>Current state
</p>
2829 <h3 class='title'
><span class='info'
> CUPS
1.1.19 </span><a name='ippWriteFile'
>ippWriteFile()
</a></h3>
2830 <h4>Description
</h4>
2831 <p>Write data for an IPP message to a file.
2839 <a href='#ipp_t'
>ipp_t
</a> * ipp);
2842 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2843 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2845 <tr><td><tt>fd
</tt></td><td>HTTP data
</td></tr>
2846 <tr><td><tt>ipp
</tt></td><td>IPP data
</td></tr>
2847 </tbody></table></div>
2849 <p>Current state
</p>
2851 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ippWriteIO'
>ippWriteIO()
</a></h3>
2852 <h4>Description
</h4>
2853 <p>Write data for an IPP message.
2861 <a href='#ipp_iocb_t'
>ipp_iocb_t
</a> cb,
2863 <a href='#ipp_t'
>ipp_t
</a> * parent,
2864 <a href='#ipp_t'
>ipp_t
</a> * ipp);
2867 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
2868 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2870 <tr><td><tt>dst
</tt></td><td>Destination
</td></tr>
2871 <tr><td><tt>cb
</tt></td><td>Write callback function
</td></tr>
2872 <tr><td><tt>blocking
</tt></td><td>Use blocking IO?
</td></tr>
2873 <tr><td><tt>parent
</tt></td><td>Parent IPP message
</td></tr>
2874 <tr><td><tt>ipp
</tt></td><td>IPP data
</td></tr>
2875 </tbody></table></div>
2877 <p>Current state
</p>
2879 <h2 class='title'
><a name='STRUCTURES'
>Structures
</a></h2>
2881 <li><a href='#http_addrlist_s'
><tt>http_addrlist_s
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
2882 <li><a href='#ipp_attribute_s'
><tt>ipp_attribute_s
</tt></a> </li>
2883 <li><a href='#ipp_s'
><tt>ipp_s
</tt></a> </li>
2886 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='http_addrlist_s'
>http_addrlist_s
</a></h3>
2887 <h4>Description
</h4>
2888 <p>Socket address list, which is
2889 used to enumerate all of the
2890 addresses that are associated
2891 with a hostname.
</p>
2894 struct http_addrlist_s
2896 <a href='#http_addr_t'
>http_addr_t
</a> addr;
2897 struct
<a href='#http_addrlist_s'
>http_addrlist_s
</a> * next;
2901 <div class='table'
><table align='center' border='
1' width='
80%'
>
2902 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2904 <tr><td><tt>addr
</tt> </td><td>Address
</td></tr>
2905 <tr><td><tt>next
</tt> </td><td>Pointer to next address in list
</td></tr>
2906 </tbody></table></div>
2908 <h3 class='title'
><a name='ipp_attribute_s'
>ipp_attribute_s
</a></h3>
2909 <h4>Description
</h4>
2913 struct ipp_attribute_s
2916 struct
<a href='#ipp_attribute_s'
>ipp_attribute_s
</a> * next;
2918 ipp_tag_t group_tag, value_tag;
2919 <a href='#ipp_value_t'
>ipp_value_t
</a> values[
1];
2923 <div class='table'
><table align='center' border='
1' width='
80%'
>
2924 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2926 <tr><td><tt>name
</tt> </td><td>Name of attribute
</td></tr>
2927 <tr><td><tt>next
</tt> </td><td>Next attribute in list
</td></tr>
2928 <tr><td><tt>num_values
</tt> </td><td>Number of values
</td></tr>
2929 <tr><td><tt>value_tag
</tt> </td><td>What type of value is it?
</td></tr>
2930 <tr><td><tt>values[
1]
</tt> </td><td>Values
</td></tr>
2931 </tbody></table></div>
2933 <h3 class='title'
><a name='ipp_s'
>ipp_s
</a></h3>
2934 <h4>Description
</h4>
2935 <p>IPP Request/Response/Notification
</p>
2940 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> * attrs;
2941 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> * current;
2943 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> * last;
2944 <a href='#ipp_attribute_t'
>ipp_attribute_t
</a> * prev;
2945 <a href='#ipp_request_t'
>ipp_request_t
</a> request;
2950 <div class='table'
><table align='center' border='
1' width='
80%'
>
2951 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
2953 <tr><td><tt>attrs
</tt> </td><td>Attributes
</td></tr>
2954 <tr><td><tt>current
</tt> </td><td>Current attribute (for read/write)
</td></tr>
2955 <tr><td><tt>curtag
</tt> </td><td>Current attribute group tag
</td></tr>
2956 <tr><td><tt>last
</tt> </td><td>Last attribute in list
</td></tr>
2957 <tr><td><tt>prev
</tt> </td><td>Previous attribute (for read)
</td></tr>
2958 <tr><td><tt>request
</tt> </td><td>Request header
</td></tr>
2959 <tr><td><tt>state
</tt> </td><td>State of request
</td></tr>
2960 </tbody></table></div>
2962 <h2 class='title'
><a name='TYPES'
>Types
</a></h2>
2964 <li><a href='#http_addrlist_t'
><tt>http_addrlist_t
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
2965 <li><a href='#http_auth_t'
><tt>http_auth_t
</tt></a> </li>
2966 <li><a href='#http_encoding_t'
><tt>http_encoding_t
</tt></a> </li>
2967 <li><a href='#http_encryption_t'
><tt>http_encryption_t
</tt></a> </li>
2968 <li><a href='#http_t'
><tt>http_t
</tt></a> </li>
2969 <li><a href='#ipp_attribute_t'
><tt>ipp_attribute_t
</tt></a> </li>
2970 <li><a href='#ipp_iocb_t'
><tt>ipp_iocb_t
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
2971 <li><a href='#ipp_request_t'
><tt>ipp_request_t
</tt></a> </li>
2972 <li><a href='#ipp_t'
><tt>ipp_t
</tt></a> </li>
2973 <li><a href='#ipp_uchar_t'
><tt>ipp_uchar_t
</tt></a> </li>
2974 <li><a href='#ipp_value_t'
><tt>ipp_value_t
</tt></a> </li>
2977 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='http_addrlist_t'
>http_addrlist_t
</a></h3>
2978 <h4>Description
</h4>
2979 <p>Socket address list, which is
2980 used to enumerate all of the
2981 addresses that are associated
2982 with a hostname.
</p>
2985 typedef struct
<a href='#http_addrlist_s'
>http_addrlist_s
</a> / http_addrlist_t;
2988 <h3 class='title'
><a name='http_auth_t'
>http_auth_t
</a></h3>
2989 <h4>Description
</h4>
2990 <p>HTTP authentication types
</p>
2993 typedef enum
<a href='#http_auth_e'
>http_auth_e
</a> http_auth_t;
2996 <h3 class='title'
><a name='http_encoding_t'
>http_encoding_t
</a></h3>
2997 <h4>Description
</h4>
2998 <p>HTTP transfer encoding values
</p>
3001 typedef enum
<a href='#http_encoding_e'
>http_encoding_e
</a> http_encoding_t;
3004 <h3 class='title'
><a name='http_encryption_t'
>http_encryption_t
</a></h3>
3005 <h4>Description
</h4>
3006 <p>HTTP encryption values
</p>
3009 typedef enum
<a href='#http_encryption_e'
>http_encryption_e
</a> http_encryption_t;
3012 <h3 class='title'
><a name='http_t'
>http_t
</a></h3>
3013 <h4>Description
</h4>
3014 <p>HTTP connection structure.
</p>
3017 typedef struct _http_s http_t;
3020 <h3 class='title'
><a name='ipp_attribute_t'
>ipp_attribute_t
</a></h3>
3021 <h4>Description
</h4>
3025 typedef struct
<a href='#ipp_attribute_s'
>ipp_attribute_s
</a> ipp_attribute_t;
3028 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='ipp_iocb_t'
>ipp_iocb_t
</a></h3>
3029 <h4>Description
</h4>
3030 <p>IPP IO Callback Function
</p>
3033 typedef ssize_t (*ipp_iocb_t)(void *,
<a href='#ipp_uchar_t'
>ipp_uchar_t
</a> *, size_t);
3036 <h3 class='title'
><a name='ipp_request_t'
>ipp_request_t
</a></h3>
3037 <h4>Description
</h4>
3038 <p>Request Header
</p>
3041 typedef union
<a href='#ipp_request_u'
>ipp_request_u
</a> ipp_request_t;
3044 <h3 class='title'
><a name='ipp_t'
>ipp_t
</a></h3>
3045 <h4>Description
</h4>
3046 <p>Attribute Value
</p>
3049 typedef struct
<a href='#ipp_s'
>ipp_s
</a> ipp_t;
3052 <h3 class='title'
><a name='ipp_uchar_t'
>ipp_uchar_t
</a></h3>
3053 <h4>Description
</h4>
3054 <p>IPP status codes...
</p>
3057 typedef typedef unsigned char ipp_uchar_t;
3060 <h3 class='title'
><a name='ipp_value_t'
>ipp_value_t
</a></h3>
3061 <h4>Description
</h4>
3062 <p>New in CUPS
1.1.19</p>
3065 typedef union
<a href='#ipp_value_u'
>ipp_value_u
</a> ipp_value_t;
3068 <h2 class='title'
><a name='UNIONS'
>Unions
</a></h2>
3070 <li><a href='#ipp_request_u'
><tt>ipp_request_u
</tt></a> </li>
3071 <li><a href='#ipp_value_u'
><tt>ipp_value_u
</tt></a> </li>
3074 <h3 class='title'
><a name='ipp_request_u'
>ipp_request_u
</a></h3>
3075 <h4>Description
</h4>
3076 <p>Request Header
</p>
3084 <div class='table'
><table align='center' border='
1' width='
80%'
>
3085 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3087 </tbody></table></div>
3089 <h3 class='title'
><a name='ipp_value_u'
>ipp_value_u
</a></h3>
3090 <h4>Description
</h4>
3091 <p>New in CUPS
1.1.19</p>
3097 <a href='#ipp_t'
>ipp_t
</a> * collection;
3098 <a href='#ipp_uchar_t'
>ipp_uchar_t
</a> date[
11];
3103 <div class='table'
><table align='center' border='
1' width='
80%'
>
3104 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
3106 <tr><td><tt>boolean
</tt> </td><td>Boolean value
</td></tr>
3107 <tr><td><tt>collection
</tt> </td><td>Collection value
</td></tr>
3108 <tr><td><tt>date[
11]
</tt> </td><td>Date/time value
</td></tr>
3109 <tr><td><tt>integer
</tt> </td><td>Integer/enumerated value
</td></tr>
3110 </tbody></table></div>